* [PATCH RFC] davinci: poll for sleep completion in resume routine.
From: Vishwanathrao Badarkhe, Manish @ 2013-01-31 9:26 UTC (permalink / raw)
To: linux-arm-kernel
As per OMAP-L138 TRM, Software must poll for
SLEEPCOMPLETE bit until it is set to 1 before clearing
SLEEPENABLE bit in DEEPSLEEP register in resume routine.
Modifications are as per datasheet:
http://www.ti.com/lit/ug/spruh77a/spruh77a.pdf
See sections 10.10.2.2 and 11.5.21 for more detailed
explanation.
Tested on da850-evm.
Signed-off-by: Vishwanathrao Badarkhe, Manish <manishv.b@ti.com>
---
:100644 100644 d4e9316... 976f096... M arch/arm/mach-davinci/sleep.S
arch/arm/mach-davinci/sleep.S | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-davinci/sleep.S b/arch/arm/mach-davinci/sleep.S
index d4e9316..976f096 100644
--- a/arch/arm/mach-davinci/sleep.S
+++ b/arch/arm/mach-davinci/sleep.S
@@ -35,6 +35,7 @@
#define PLL_LOCK_CYCLES (PLL_LOCK_TIME * 25)
#define DEEPSLEEP_SLEEPENABLE_BIT BIT(31)
+#define DEEPSLEEP_SLEEPCOMPLETE_BIT BIT(30)
.text
/*
@@ -110,6 +111,13 @@ ENTRY(davinci_cpu_suspend)
/* Wake up from sleep */
+ /* wait for sleep complete */
+sleep_complete:
+ ldr ip, [r4]
+ and ip, ip, #DEEPSLEEP_SLEEPCOMPLETE_BIT
+ cmp ip, #DEEPSLEEP_SLEEPCOMPLETE_BIT
+ bne sleep_complete
+
/* Clear sleep enable */
ldr ip, [r4]
bic ip, ip, #DEEPSLEEP_SLEEPENABLE_BIT
--
1.7.4.1
^ permalink raw reply related
* [PATCH 2/6] USB: add devicetree helpers for determining dr_mode and phy_type
From: Sascha Hauer @ 2013-01-31 9:26 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130131092059.GA3361@kroah.com>
On Thu, Jan 31, 2013 at 10:20:59AM +0100, Greg KH wrote:
> On Thu, Jan 31, 2013 at 10:01:09AM +0100, Sascha Hauer wrote:
> > From: Michael Grzeschik <m.grzeschik@pengutronix.de>
> >
> > This adds two little devicetree helper functions for determining the
> > dr_mode (host, peripheral, otg) and phy_type (utmi, ulpi,...) from
> > the devicetree.
> >
> > Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> > Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> > drivers/usb/phy/Makefile | 1 +
> > drivers/usb/phy/phy.c | 10 ++++++++++
> > drivers/usb/usb-common.c | 36 ++++++++++++++++++++++++++++++++++++
> > include/linux/usb/of.h | 27 +++++++++++++++++++++++++++
> > include/linux/usb/otg.h | 7 +++++++
> > include/linux/usb/phy.h | 9 +++++++++
> > 6 files changed, 90 insertions(+)
> > create mode 100644 include/linux/usb/of.h
> >
> > diff --git a/drivers/usb/phy/Makefile b/drivers/usb/phy/Makefile
> > index 9fa6327..e1be1e8 100644
> > --- a/drivers/usb/phy/Makefile
> > +++ b/drivers/usb/phy/Makefile
> > @@ -5,6 +5,7 @@
> > ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG
> >
> > obj-$(CONFIG_USB_OTG_UTILS) += phy.o
> > +obj-$(CONFIG_OF) += of.o
> > obj-$(CONFIG_OMAP_USB2) += omap-usb2.o
> > obj-$(CONFIG_OMAP_USB3) += omap-usb3.o
> > obj-$(CONFIG_OMAP_CONTROL_USB) += omap-control-usb.o
> > diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c
> > index ef35eb0..3ad4b5c 100644
> > --- a/drivers/usb/phy/phy.c
> > +++ b/drivers/usb/phy/phy.c
> > @@ -1,3 +1,13 @@
> > +/*
> > + * phy.c -- USB phy handling
> > + *
> > + * Copyright (C) 2004 Texas Instruments
> > + *
> > + * This program is free software; you can redistribute it and/or modify
> > + * it under the terms of the GNU General Public License as published by
> > + * the Free Software Foundation; either version 2 of the License, or
> > + * (at your option) any later version.
> > + */
>
> Do you really mean to change the license of the file from GPLv2 to
> GPLv2+? Did TI agree to that licening change? I need some
> documentation from some TI people before I can ever accept something
> like this.
Sorry, the hunk above belongs to patch 1/6. I did not change the
license, the header is a copy from drivers/usb/otg/otg.c which was
GPLv2+ already.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply
* [RFC] arm: use built-in byte swap function
From: Russell King - ARM Linux @ 2013-01-31 9:28 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130130200900.9d7cf7908caeaef4ecee1d61@freescale.com>
On Wed, Jan 30, 2013 at 08:09:00PM -0600, Kim Phillips wrote:
> The savings come mostly from device-tree related code, and some
> from drivers.
You forget that IP networking is all big endian, so these will be using
the byte swapping too (search it for htons/ntohs/htonl/ntohl).
> v2:
> - at91 and lpd270 builds fixed by limiting to ARMv6 and above
> (i.e., ARM cores that have support for the 'rev' instruction).
> Otherwise, the compiler emits calls to libgcc's __bswapsi2 on
> these ARMv4/v5 builds (and arch ARM doesn't link with libgcc).
Which compiler version? gcc 4.5.4 doesn't do this, except for the 16-bit
swap, so I doubt that any later compiler does.
> --- a/arch/arm/include/uapi/asm/swab.h
> +++ b/arch/arm/include/uapi/asm/swab.h
> @@ -50,4 +50,14 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
>
> #endif
>
> +#if defined(__KERNEL__) && __LINUX_ARM_ARCH__ >= 6
> +#if GCC_VERSION >= 40600
> +#define __HAVE_BUILTIN_BSWAP32__
> +#define __HAVE_BUILTIN_BSWAP64__
> +#endif
> +#if GCC_VERSION >= 40800
> +#define __HAVE_BUILTIN_BSWAP16__
> +#endif
> +#endif
If this is __KERNEL__ only, it should not be in a uapi header. UAPI
headers get exported to userland, this is not userland interface code.
IT should be in arch/arm/include/asm/swab.h
^ permalink raw reply
* [PATCH 2/6] USB: add devicetree helpers for determining dr_mode and phy_type
From: Sascha Hauer @ 2013-01-31 9:28 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <510A3590.2090309@ti.com>
On Thu, Jan 31, 2013 at 02:42:48PM +0530, kishon wrote:
> Hi,
>
> On Thursday 31 January 2013 02:31 PM, Sascha Hauer wrote:
> >From: Michael Grzeschik <m.grzeschik@pengutronix.de>
> >
> >This adds two little devicetree helper functions for determining the
> >dr_mode (host, peripheral, otg) and phy_type (utmi, ulpi,...) from
> >the devicetree.
> >
> >Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> >Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> >Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> >---
> > drivers/usb/phy/Makefile | 1 +
> > drivers/usb/phy/phy.c | 10 ++++++++++
> > drivers/usb/usb-common.c | 36 ++++++++++++++++++++++++++++++++++++
> > include/linux/usb/of.h | 27 +++++++++++++++++++++++++++
> > include/linux/usb/otg.h | 7 +++++++
> > include/linux/usb/phy.h | 9 +++++++++
> > 6 files changed, 90 insertions(+)
> > create mode 100644 include/linux/usb/of.h
> >
> >diff --git a/drivers/usb/phy/Makefile b/drivers/usb/phy/Makefile
> >index 9fa6327..e1be1e8 100644
> >--- a/drivers/usb/phy/Makefile
> >+++ b/drivers/usb/phy/Makefile
> >@@ -5,6 +5,7 @@
> > ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG
> >
> > obj-$(CONFIG_USB_OTG_UTILS) += phy.o
> >+obj-$(CONFIG_OF) += of.o
>
> You've missed doing "git add ..usb/phy/of.c".
>
> > obj-$(CONFIG_OMAP_USB2) += omap-usb2.o
> > obj-$(CONFIG_OMAP_USB3) += omap-usb3.o
> > obj-$(CONFIG_OMAP_CONTROL_USB) += omap-control-usb.o
> >diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c
> >index ef35eb0..3ad4b5c 100644
> >--- a/drivers/usb/phy/phy.c
> >+++ b/drivers/usb/phy/phy.c
> >@@ -1,3 +1,13 @@
> >+/*
> >+ * phy.c -- USB phy handling
> >+ *
> >+ * Copyright (C) 2004 Texas Instruments
>
> it's 2013 already :-P
> >+ *
> >+ * This program is free software; you can redistribute it and/or modify
> >+ * it under the terms of the GNU General Public License as published by
> >+ * the Free Software Foundation; either version 2 of the License, or
> >+ * (at your option) any later version.
>
> But your *MODULE_LICENSE("GPL")* below tells it's only GPL.
The MODULE_LICENSE("GPL") is in usb-common.c, not in the file I added.
Sascha
> .
> <snip>
> .
> .
>
> > MODULE_LICENSE("GPL");
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply
* [PATCH 2/6] USB: add devicetree helpers for determining dr_mode and phy_type
From: kishon @ 2013-01-31 9:30 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130131092805.GB24675@pengutronix.de>
On Thursday 31 January 2013 02:58 PM, Sascha Hauer wrote:
> On Thu, Jan 31, 2013 at 02:42:48PM +0530, kishon wrote:
>> Hi,
>>
>> On Thursday 31 January 2013 02:31 PM, Sascha Hauer wrote:
>>> From: Michael Grzeschik <m.grzeschik@pengutronix.de>
>>>
>>> This adds two little devicetree helper functions for determining the
>>> dr_mode (host, peripheral, otg) and phy_type (utmi, ulpi,...) from
>>> the devicetree.
>>>
>>> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
>>> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
>>> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
>>> ---
>>> drivers/usb/phy/Makefile | 1 +
>>> drivers/usb/phy/phy.c | 10 ++++++++++
>>> drivers/usb/usb-common.c | 36 ++++++++++++++++++++++++++++++++++++
>>> include/linux/usb/of.h | 27 +++++++++++++++++++++++++++
>>> include/linux/usb/otg.h | 7 +++++++
>>> include/linux/usb/phy.h | 9 +++++++++
>>> 6 files changed, 90 insertions(+)
>>> create mode 100644 include/linux/usb/of.h
>>>
>>> diff --git a/drivers/usb/phy/Makefile b/drivers/usb/phy/Makefile
>>> index 9fa6327..e1be1e8 100644
>>> --- a/drivers/usb/phy/Makefile
>>> +++ b/drivers/usb/phy/Makefile
>>> @@ -5,6 +5,7 @@
>>> ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG
>>>
>>> obj-$(CONFIG_USB_OTG_UTILS) += phy.o
>>> +obj-$(CONFIG_OF) += of.o
>>
>> You've missed doing "git add ..usb/phy/of.c".
>>
>>> obj-$(CONFIG_OMAP_USB2) += omap-usb2.o
>>> obj-$(CONFIG_OMAP_USB3) += omap-usb3.o
>>> obj-$(CONFIG_OMAP_CONTROL_USB) += omap-control-usb.o
>>> diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c
>>> index ef35eb0..3ad4b5c 100644
>>> --- a/drivers/usb/phy/phy.c
>>> +++ b/drivers/usb/phy/phy.c
>>> @@ -1,3 +1,13 @@
>>> +/*
>>> + * phy.c -- USB phy handling
>>> + *
>>> + * Copyright (C) 2004 Texas Instruments
>>
>> it's 2013 already :-P
>>> + *
>>> + * This program is free software; you can redistribute it and/or modify
>>> + * it under the terms of the GNU General Public License as published by
>>> + * the Free Software Foundation; either version 2 of the License, or
>>> + * (at your option) any later version.
>>
>> But your *MODULE_LICENSE("GPL")* below tells it's only GPL.
>
> The MODULE_LICENSE("GPL") is in usb-common.c, not in the file I added.
huh.. just noticed. sorry for the noise.
Thanks
Kishon
^ permalink raw reply
* [PATCH v2 0/3] Add device tree support for NAND flash in am335x-evm
From: Philip, Avinash @ 2013-01-31 9:36 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <cover.1359007746.git.avinashphilip@ti.com>
Benoit,
On Thu, Jan 24, 2013 at 13:32:26, Philip, Avinash wrote:
> This patch series adds device tree support for NAND flash in am335x-evm.
> Also ELM node is populated in device tree and been used for BCH error
> correction in NAND flash part. Also this patch series ensures RBL ecc
> layout maintained in Linux kernel with BCH8 ecc scheme.
>
> This patch series based on [1] and depends on [2].
>
> 1. http://git.kernel.org/?p=linux/kernel/git/bcousson/linux-omap-dt.git;a=tree;h=refs/heads/for_3.9/dts;hb=refs/heads/for_3.9/dts
>
> 2.mtd: devices: elm: Removes <xx> literals in elm DT node
> https://lkml.org/lkml/2013/1/24/30
>
Can you accept this patch series so that NAND flash with BCH support
for am335x-evm available in 3.9.
Thanks
Avinash
> Philip Avinash (1):
> ARM: dts: AM33XX: Add NAND flash device tree data to am335x-evm
>
> Philip, Avinash (2):
> ARM: dts: AM33XX: Add ELM node
> ARM: dts: AM33XX: Add GPMC node
>
> arch/arm/boot/dts/am335x-evm.dts | 98 +++++++++++++++++++++++++++++++++++++-
> arch/arm/boot/dts/am33xx.dtsi | 20 ++++++++
> 2 files changed, 117 insertions(+), 1 deletion(-)
>
> --
> 1.7.9.5
>
>
^ permalink raw reply
* [PATCH 0/5] ARM: OMAP2+: System timer updates
From: Santosh Shilimkar @ 2013-01-31 9:40 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359565471-30721-1-git-send-email-jon-hunter@ti.com>
On Wednesday 30 January 2013 10:34 PM, Jon Hunter wrote:
> This series consists mainly of clean-ups for clockevents and
> clocksource timers on OMAP2+ devices. The most significant change
> in functionality comes from the 5th patch which is changing the
> selection of the clocksource timer for OMAP3 and AM335x devices
> when gptimers are used for clocksource. This change came about from
> Vaibhav Bedia's series for AM335x [1]. See patch for more details on
> the exact nature of the change.
>
> Boot tested with and without device-tree on OMAP2420 H4,
> OMAP3430 SDP, OMAP3430 Beagle Board, OMAP4430 SDP and
> AM335x EVM (AM335x only supports device-tree boot).
>
> This series is based upon ARM-SoC next branch.
>
> [1] https://patchwork.kernel.org/patch/1921421/
>
> Jon Hunter (5):
> ARM: OMAP2+: Display correct system timer name
> ARM: OMAP2+: Remove hard-coded test on timer ID
> ARM: OMAP2+: Simplify system timer clock definitions
> ARM: OMAP2+: Simplify system timers definitions
> ARM: OMAP3: Update clocksource timer selection
>
Nice work Jon. All the patches in the series looks good
to my eyes.
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
^ permalink raw reply
* [PATCH] ARM: omap2: register cpufreq-cpu0 device for am33xx
From: AnilKumar, Chimata @ 2013-01-31 9:40 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359556342-17020-1-git-send-email-shawn.guo@linaro.org>
On Wed, Jan 30, 2013 at 20:02:22, Shawn Guo wrote:
> The cpufreq-cpu0 driver changes to instantiate use platform_driver
> mechanism. The patch is an am33xx platform level adaptation for it.
Tested-by: AnilKumar Ch <anilkumar@ti.com>
Hi Shawn,
I have tested your patch on AM335x-EVM, no issues observed.
I think, better post v3 version which contains this patch
and cpu0-cpufreq driver changes.
Or
Post v3 of cpufreq-cpu0 driver changes.
Thanks
AnilKumar
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
> arch/arm/mach-omap2/board-generic.c | 1 +
> arch/arm/mach-omap2/cclock33xx_data.c | 2 +-
> arch/arm/mach-omap2/common.h | 1 +
> arch/arm/mach-omap2/io.c | 8 ++++++++
> 4 files changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
> index 53cb380b..b945480 100644
> --- a/arch/arm/mach-omap2/board-generic.c
> +++ b/arch/arm/mach-omap2/board-generic.c
> @@ -139,6 +139,7 @@ DT_MACHINE_START(AM33XX_DT, "Generic AM33XX (Flattened Device Tree)")
> .init_irq = omap_intc_of_init,
> .handle_irq = omap3_intc_handle_irq,
> .init_machine = omap_generic_init,
> + .init_late = am33xx_init_late,
> .timer = &omap3_am33xx_timer,
> .dt_compat = am33xx_boards_compat,
> MACHINE_END
> diff --git a/arch/arm/mach-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c
> index ea64ad6..acb1620 100644
> --- a/arch/arm/mach-omap2/cclock33xx_data.c
> +++ b/arch/arm/mach-omap2/cclock33xx_data.c
> @@ -850,7 +850,7 @@ static struct omap_clk am33xx_clks[] = {
> CLK(NULL, "dpll_core_m5_ck", &dpll_core_m5_ck, CK_AM33XX),
> CLK(NULL, "dpll_core_m6_ck", &dpll_core_m6_ck, CK_AM33XX),
> CLK(NULL, "dpll_mpu_ck", &dpll_mpu_ck, CK_AM33XX),
> - CLK("cpu0", NULL, &dpll_mpu_ck, CK_AM33XX),
> + CLK("cpufreq-cpu0.0", NULL, &dpll_mpu_ck, CK_AM33XX),
> CLK(NULL, "dpll_mpu_m2_ck", &dpll_mpu_m2_ck, CK_AM33XX),
> CLK(NULL, "dpll_ddr_ck", &dpll_ddr_ck, CK_AM33XX),
> CLK(NULL, "dpll_ddr_m2_ck", &dpll_ddr_m2_ck, CK_AM33XX),
> diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
> index 948bcaa..e3355df5 100644
> --- a/arch/arm/mach-omap2/common.h
> +++ b/arch/arm/mach-omap2/common.h
> @@ -106,6 +106,7 @@ void omap2430_init_late(void);
> void omap3430_init_late(void);
> void omap35xx_init_late(void);
> void omap3630_init_late(void);
> +void am33xx_init_late(void);
> void am35xx_init_late(void);
> void ti81xx_init_late(void);
> void omap4430_init_late(void);
> diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
> index 2c3fdd6..0e67711 100644
> --- a/arch/arm/mach-omap2/io.c
> +++ b/arch/arm/mach-omap2/io.c
> @@ -535,6 +535,14 @@ void __init omap3630_init_late(void)
> omap2_clk_enable_autoidle_all();
> }
>
> +void __init am33xx_init_late(void)
> +{
> + struct platform_device_info devinfo = { .name = "cpufreq-cpu0", };
> +
> + if (IS_ENABLED(CONFIG_GENERIC_CPUFREQ_CPU0))
> + platform_device_register_full(&devinfo);
> +}
> +
> void __init am35xx_init_late(void)
> {
> omap_mux_late_init();
> --
> 1.7.9.5
>
>
>
^ permalink raw reply
* [PATCH 4/6] usb: chipidea: add PTW and PTS handling
From: Sascha Hauer @ 2013-01-31 9:42 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <510A364A.4020209@parrot.com>
On Thu, Jan 31, 2013 at 10:15:54AM +0100, Matthieu CASTET wrote:
> >> Why you don't implement it ?
> >>
> >> If you don't implement it, I believe you should add a warning in order to catch
> >> it when used with lpm devices.
> >
> > I'm against adding a warning because current users seem to go well
> > without this setting. Adding a warning would lead to more confusion than
> > it would help.
> >
> > I could try and implement it, though I'm unsure about the register
> > layout.
> >
> > What I know from an earlier post from you is this:
> >
> > #define LPM_PTS(d) (((d)>>29)&7)
> > #define LPM_STS BIT(28) /* serial transceiver select */
> > #define LPM_PTW BIT(27) /* parallel transceiver width */
> >
> > Do you also know how LPM_PTS is decoded?
>
> I will say the same as not lpm device :
>
> PTS is made up from PORTSCx bits 25, 30 and 31.
Here it is
PTS0 -> bit 30
PTS1 -> bit 31
PTS2 -> bit 25
>
> PTS is made up from devlc bits 31, 30 and 29.
In my new series I now assumed:
PTS0 -> bit 29
PTS1 -> bit 30
PTS2 -> bit 31
>
>
> Also in my datasheet, they give a way to check if the bits are read only or read
> write [1]. I don't know if it is worth the trouble to check it.
>
>
> Matthieu
>
>
> [1]
> PTS
> This register bit pair is used in conjunction with the configuration constant
> VUSB_HS_PHY_TYPE to control which parallel transceiver interface is selected. If
> VUSB_HS_PHY_TYPE is set for 0, 1, 2, 3, 8 or 10 then this bit is read only. If
> VUSB_HS_PHY_TYPE is 4, 5, 6, 7, 9 or 11 then this bit is read/write.
>
> This field is reset to:
> '000b' if VUSB_HS_PHY_TYPE = 0, 4 ? UTMI/UTMI+
> '001b' if VUSB_HS_PHY_TYPE = 1, 5 ? ULPI DDR
> '010b' if VUSB_HS_PHY_TYPE = 2, 6 ? ULPI
> '011b' if VUSB_HS_PHY_TYPE = 3, 7, 8, 9 ? Serial/1.1 PHY/IC_USB (FS Only)
> '100b' if VUSB_HS_PHY_TYPE = 10, 11 ? UTMI for HSIC PHY
Ok, this seems to match my assumption, except that our controller marks
the 'ULPI DDR' setting as reserved.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply
* [PATCH 3/6] USB: chipidea: ci13xxx-imx: create dynamic platformdata
From: Peter Chen @ 2013-01-31 9:44 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359622873-23345-4-git-send-email-s.hauer@pengutronix.de>
On Thu, Jan 31, 2013 at 10:01:10AM +0100, Sascha Hauer wrote:
> From: Michael Grzeschik <m.grzeschik@pengutronix.de>
>
> This patch removes the limitation of having only one instance of the
> ci13xxx-imx platformdata and makes different configurations possible.
>
> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> drivers/usb/chipidea/ci13xxx_imx.c | 25 +++++++++++++++----------
> 1 file changed, 15 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/usb/chipidea/ci13xxx_imx.c b/drivers/usb/chipidea/ci13xxx_imx.c
> index 8c29122..69024e0 100644
> --- a/drivers/usb/chipidea/ci13xxx_imx.c
> +++ b/drivers/usb/chipidea/ci13xxx_imx.c
> @@ -85,17 +85,10 @@ EXPORT_SYMBOL_GPL(usbmisc_get_init_data);
>
> /* End of common functions shared by usbmisc drivers*/
>
> -static struct ci13xxx_platform_data ci13xxx_imx_platdata = {
> - .name = "ci13xxx_imx",
> - .flags = CI13XXX_REQUIRE_TRANSCEIVER |
> - CI13XXX_PULLUP_ON_VBUS |
> - CI13XXX_DISABLE_STREAMING,
> - .capoffset = DEF_CAPOFFSET,
> -};
> -
> static int ci13xxx_imx_probe(struct platform_device *pdev)
> {
> struct ci13xxx_imx_data *data;
> + struct ci13xxx_platform_data *pdata;
> struct platform_device *plat_ci, *phy_pdev;
> struct device_node *phy_np;
> struct resource *res;
> @@ -107,6 +100,18 @@ static int ci13xxx_imx_probe(struct platform_device *pdev)
> && !usbmisc_ops)
> return -EPROBE_DEFER;
>
> + pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
> + if (!pdata) {
> + dev_err(&pdev->dev, "Failed to allocate CI13xxx-IMX pdata!\n");
> + return -ENOMEM;
> + }
> +
> + pdata->name = "ci13xxx_imx";
> + pdata->capoffset = DEF_CAPOFFSET;
> + pdata->flags = CI13XXX_REQUIRE_TRANSCEIVER |
> + CI13XXX_PULLUP_ON_VBUS |
> + CI13XXX_DISABLE_STREAMING;
> +
> data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
> if (!data) {
> dev_err(&pdev->dev, "Failed to allocate CI13xxx-IMX data!\n");
> @@ -168,7 +173,7 @@ static int ci13xxx_imx_probe(struct platform_device *pdev)
> reg_vbus = NULL;
> }
>
> - ci13xxx_imx_platdata.phy = data->phy;
> + pdata->phy = data->phy;
>
> if (!pdev->dev.dma_mask) {
> pdev->dev.dma_mask = devm_kzalloc(&pdev->dev,
> @@ -193,7 +198,7 @@ static int ci13xxx_imx_probe(struct platform_device *pdev)
>
> plat_ci = ci13xxx_add_device(&pdev->dev,
> pdev->resource, pdev->num_resources,
> - &ci13xxx_imx_platdata);
> + pdata);
> if (IS_ERR(plat_ci)) {
> ret = PTR_ERR(plat_ci);
> dev_err(&pdev->dev,
> --
> 1.7.10.4
>
>
Reviewed-by: Peter Chen <peter.chen@freescale.com>
--
Best Regards,
Peter Chen
^ permalink raw reply
* [PATCH 4/6] USB: chipidea: add PTW and PTS handling
From: Peter Chen @ 2013-01-31 9:46 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359622873-23345-5-git-send-email-s.hauer@pengutronix.de>
On Thu, Jan 31, 2013 at 10:01:11AM +0100, Sascha Hauer wrote:
> From: Michael Grzeschik <m.grzeschik@pengutronix.de>
>
> This patch makes it possible to configure the PTW and PTS bits inside
> the portsc register for host and device mode before the driver starts
> and the phy can be addressed as hardware implementation is designed.
>
> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> .../devicetree/bindings/usb/ci13xxx-imx.txt | 5 +++
> drivers/usb/chipidea/bits.h | 14 ++++++-
> drivers/usb/chipidea/ci13xxx_imx.c | 3 ++
> drivers/usb/chipidea/core.c | 39 ++++++++++++++++++++
> include/linux/usb/chipidea.h | 1 +
> 5 files changed, 61 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt b/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt
> index 5778b9c..dd42ccd 100644
> --- a/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt
> +++ b/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt
> @@ -5,6 +5,11 @@ Required properties:
> - reg: Should contain registers location and length
> - interrupts: Should contain controller interrupt
>
> +Recommended properies:
> +- phy_type: the type of the phy connected to the core. Should be one
> + of "utmi", "utmi_wide", "ulpi", "serial" or "hsic". Without this
> + property the PORTSC register won't be touched
> +
> Optional properties:
> - fsl,usbphy: phandler of usb phy that connects to the only one port
> - fsl,usbmisc: phandler of non-core register device, with one argument
> diff --git a/drivers/usb/chipidea/bits.h b/drivers/usb/chipidea/bits.h
> index 050de85..d8ffc2f 100644
> --- a/drivers/usb/chipidea/bits.h
> +++ b/drivers/usb/chipidea/bits.h
> @@ -48,10 +48,22 @@
> #define PORTSC_SUSP BIT(7)
> #define PORTSC_HSP BIT(9)
> #define PORTSC_PTC (0x0FUL << 16)
> +/* PTS and PTW for non lpm version only */
> +#define PORTSC_PTS(d) ((((d) & 0x3) << 30) | (((d) & 0x4) ? BIT(25) : 0))
> +#define PORTSC_PTW BIT(28)
>
> /* DEVLC */
> #define DEVLC_PSPD (0x03UL << 25)
> -#define DEVLC_PSPD_HS (0x02UL << 25)
> +#define DEVLC_PSPD_HS (0x02UL << 25)
> +#define DEVLC_PTW BIT(27)
> +#define DEVLC_STS BIT(28)
> +#define DEVLC_PTS(d) (((d) & 0x7) << 29)
> +
> +/* Encoding for DEVLC_PTS and PORTSC_PTS */
> +#define PTS_UTMI 0
> +#define PTS_ULPI 2
> +#define PTS_SERIAL 3
> +#define PTS_HSIC 4
>
> /* OTGSC */
> #define OTGSC_IDPU BIT(5)
> diff --git a/drivers/usb/chipidea/ci13xxx_imx.c b/drivers/usb/chipidea/ci13xxx_imx.c
> index 69024e0..ebc1148 100644
> --- a/drivers/usb/chipidea/ci13xxx_imx.c
> +++ b/drivers/usb/chipidea/ci13xxx_imx.c
> @@ -21,6 +21,7 @@
> #include <linux/clk.h>
> #include <linux/regulator/consumer.h>
> #include <linux/pinctrl/consumer.h>
> +#include <linux/usb/of.h>
>
> #include "ci.h"
> #include "ci13xxx_imx.h"
> @@ -112,6 +113,8 @@ static int ci13xxx_imx_probe(struct platform_device *pdev)
> CI13XXX_PULLUP_ON_VBUS |
> CI13XXX_DISABLE_STREAMING;
>
> + pdata->phy_mode = of_usb_get_phy_mode(pdev->dev.of_node);
> +
> data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
> if (!data) {
> dev_err(&pdev->dev, "Failed to allocate CI13xxx-IMX data!\n");
> diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
> index 57cae1f..a3ec29d 100644
> --- a/drivers/usb/chipidea/core.c
> +++ b/drivers/usb/chipidea/core.c
> @@ -67,6 +67,8 @@
> #include <linux/usb/gadget.h>
> #include <linux/usb/otg.h>
> #include <linux/usb/chipidea.h>
> +#include <linux/usb/of.h>
> +#include <linux/phy.h>
>
> #include "ci.h"
> #include "udc.h"
> @@ -211,6 +213,41 @@ static int hw_device_init(struct ci13xxx *ci, void __iomem *base)
> return 0;
> }
>
> +static void hw_phymode_configure(struct ci13xxx *ci)
> +{
> + u32 portsc, lpm;
> +
> + switch (ci->platdata->phy_mode) {
> + case USBPHY_INTERFACE_MODE_UTMI:
> + portsc = PORTSC_PTS(PTS_UTMI);
> + lpm = DEVLC_PTS(PTS_UTMI);
> + break;
> + case USBPHY_INTERFACE_MODE_UTMIW:
> + portsc = PORTSC_PTS(PTS_UTMI) | PORTSC_PTW;
> + lpm = DEVLC_PTS(PTS_UTMI) | DEVLC_PTW;
> + break;
> + case USBPHY_INTERFACE_MODE_ULPI:
> + portsc = PORTSC_PTS(PTS_ULPI);
> + lpm = DEVLC_PTS(PTS_ULPI);
> + break;
> + case USBPHY_INTERFACE_MODE_SERIAL:
> + portsc = PORTSC_PTS(PTS_SERIAL);
> + lpm = DEVLC_PTS(PTS_SERIAL);
> + break;
> + case USBPHY_INTERFACE_MODE_HSIC:
> + portsc = PORTSC_PTS(PTS_HSIC);
> + lpm = DEVLC_PTS(PTS_HSIC);
> + break;
> + default:
> + return;
> + }
> +
> + if (ci->hw_bank.lpm)
> + hw_write(ci, OP_PORTSC, DEVLC_PTS(7) | DEVLC_PTW, lpm);
> + else
> + hw_write(ci, OP_PORTSC, PORTSC_PTS(7) | PORTSC_PTW, portsc);
> +}
> +
It is ok for no_lpm controller (Freescale's)
> /**
> * hw_device_reset: resets chip (execute without interruption)
> * @ci: the controller
> @@ -476,6 +513,8 @@ static int ci_hdrc_probe(struct platform_device *pdev)
> : CI_ROLE_GADGET;
> }
>
> + hw_phymode_configure(ci);
> +
> ret = ci_role_start(ci, ci->role);
> if (ret) {
> dev_err(dev, "can't start %s role\n", ci_role(ci)->name);
> diff --git a/include/linux/usb/chipidea.h b/include/linux/usb/chipidea.h
> index 544825d..1a2aa18 100644
> --- a/include/linux/usb/chipidea.h
> +++ b/include/linux/usb/chipidea.h
> @@ -14,6 +14,7 @@ struct ci13xxx_platform_data {
> uintptr_t capoffset;
> unsigned power_budget;
> struct usb_phy *phy;
> + enum usb_phy_interface phy_mode;
> unsigned long flags;
> #define CI13XXX_REGS_SHARED BIT(0)
> #define CI13XXX_REQUIRE_TRANSCEIVER BIT(1)
> --
> 1.7.10.4
>
>
--
Best Regards,
Peter Chen
^ permalink raw reply
* [PATCH 6/6] USB chipidea i.MX: introduce dr_mode property
From: Peter Chen @ 2013-01-31 9:47 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359622873-23345-7-git-send-email-s.hauer@pengutronix.de>
On Thu, Jan 31, 2013 at 10:01:13AM +0100, Sascha Hauer wrote:
> The dr_mode devicetree property allows to explicitly specify the
> host/peripheral/otg mode. This is necessary for boards without proper
> ID pin handling.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> Documentation/devicetree/bindings/usb/ci13xxx-imx.txt | 1 +
> drivers/usb/chipidea/ci13xxx_imx.c | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt b/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt
> index dd42ccd..493a414 100644
> --- a/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt
> +++ b/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt
> @@ -9,6 +9,7 @@ Recommended properies:
> - phy_type: the type of the phy connected to the core. Should be one
> of "utmi", "utmi_wide", "ulpi", "serial" or "hsic". Without this
> property the PORTSC register won't be touched
> +- dr_mode: One of "host", "peripheral" or "otg". Defaults to "otg"
>
> Optional properties:
> - fsl,usbphy: phandler of usb phy that connects to the only one port
> diff --git a/drivers/usb/chipidea/ci13xxx_imx.c b/drivers/usb/chipidea/ci13xxx_imx.c
> index ebc1148..b598bb8f 100644
> --- a/drivers/usb/chipidea/ci13xxx_imx.c
> +++ b/drivers/usb/chipidea/ci13xxx_imx.c
> @@ -114,6 +114,7 @@ static int ci13xxx_imx_probe(struct platform_device *pdev)
> CI13XXX_DISABLE_STREAMING;
>
> pdata->phy_mode = of_usb_get_phy_mode(pdev->dev.of_node);
> + pdata->dr_mode = of_usb_get_dr_mode(pdev->dev.of_node);
>
> data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
> if (!data) {
Reviewed-by: Peter Chen <peter.chen@freescale.com>
> --
> 1.7.10.4
>
>
--
Best Regards,
Peter Chen
^ permalink raw reply
* [PATCH] arm: mvebu: support for the new Armada XP evaluation board(DB-MV784MP-GP)
From: Andrew Lunn @ 2013-01-31 9:50 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130130181035.GP7717@titan.lakedaemon.net>
On Wed, Jan 30, 2013 at 01:10:35PM -0500, Jason Cooper wrote:
>
> Gregory,
>
> Adding devicetree-discuss.
>
> Guys, how do you prefer to handle plug-in RAM modules? describe the
> soldered-in amount, or?
>
> On Wed, Jan 30, 2013 at 06:35:17PM +0100, Gregory CLEMENT wrote:
> > On 01/30/2013 06:33 PM, Jason Cooper wrote:
> > > On Wed, Jan 30, 2013 at 06:26:14PM +0100, Gregory CLEMENT wrote:
> > >> This is the new Armada XP evaluation board from Marvell. It comes with
> > >> a RS232 port over USB, a SATA link, an internal SSD, 4 Ethernet
> > >> Gigabit links.
> > >>
> > >> Support for USB (Host and device), SDIO, PCIe will be added as drivers
> > >> when they become available for Armada XP in mainline.
> > >>
> > >> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> > >> ---
> > >> arch/arm/boot/dts/Makefile | 1 +
> > >> arch/arm/boot/dts/armada-xp-gp.dts | 94 ++++++++++++++++++++++++++++++++++++
> > >> 2 files changed, 95 insertions(+)
> > >> create mode 100644 arch/arm/boot/dts/armada-xp-gp.dts
> > >>
> ...
> > >> + memory {
> > >> + device_type = "memory";
> > >> + reg = <0x00000000 0xC0000000>; /* 3 GB */
> > >
> > > Is this the soldered on the board amount, or the amount with an
> > > expandable slot filled?
> >
> > It is not soldered, so you can change the amount of memory
>
> Well, there's something we don't encounter too much in the embedded
> world. ;-) I'm inclined to think the entry here should be the soldered
> on amount, and the bootloader would (hypothetically) change the DT to
> the probed amount. But I haven't seen a precedent set yet...
Hi Jason
We have the same issue with OpenBox AX3. All the devices we have in
our hands have 1GB soldered down, plus 2GB on expansion. The DT
currently has the full 3GB.
However, there has been discussion of reducing this down to 1GB since
both Thomas and Gregory have unstable systems with the full 3GB, but
mine box is stable with the full 3GB. So i don't know how strong a
precedent that sets....
Andrew
^ permalink raw reply
* [PATCH RFC] davinci: poll for sleep completion in resume routine.
From: Sekhar Nori @ 2013-01-31 9:51 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359624393-5898-1-git-send-email-manishv.b@ti.com>
On 1/31/2013 2:56 PM, Vishwanathrao Badarkhe, Manish wrote:
> As per OMAP-L138 TRM, Software must poll for
> SLEEPCOMPLETE bit until it is set to 1 before clearing
> SLEEPENABLE bit in DEEPSLEEP register in resume routine.
> Modifications are as per datasheet:
> http://www.ti.com/lit/ug/spruh77a/spruh77a.pdf
> See sections 10.10.2.2 and 11.5.21 for more detailed
> explanation.
>
> Tested on da850-evm.
>
> Signed-off-by: Vishwanathrao Badarkhe, Manish <manishv.b@ti.com>
Is this a bug fix? Do you see any issue without this patch?
Thanks,
Sekhar
^ permalink raw reply
* [PATCH 2/2] ARM: imx_v6_v7_defconfig: Add VPU support
From: Sascha Hauer @ 2013-01-31 9:54 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130130130453.GC2757@S2101-09.ap.freescale.net>
On Wed, Jan 30, 2013 at 09:04:55PM +0800, Shawn Guo wrote:
> On Tue, Jan 29, 2013 at 01:49:13PM -0200, Fabio Estevam wrote:
> > Let the VPU driver be built by default.
> >
> Do we have any imx_v6_v7 platform supported by VPU driver today?
Does this matter? IMO it's good to keep the driver in a compilable state
even if it ends up being unused for now.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply
* [PATCH 2/6] ARM: cache: remove ARMv3 support code
From: Will Deacon @ 2013-01-31 9:56 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <0a6801cdff4b$8ae22940$a0a67bc0$@samsung.com>
Hello,
On Thu, Jan 31, 2013 at 12:40:18AM +0000, Hyok S. Choi wrote:
> I know there is no v3 architecture in current platforms in mainline tree,
> but can we _remove_ v3 support codes? IOW, Is there no platform port users
> for ARM7 nommu families(such as ARM700 or ARM710)?
Nope, 610 and 710 support was removed last year with
357c9c1f07d4 ("ARM: Remove support for ARMv3 ARM610 and ARM710 CPUs"). The
only remaining user of cache-v3.S is 740T (grep for CPU_CACHE_V3).
Will
^ permalink raw reply
* [PATCH 1/2] ARM: mxs: dts: Add gpio-keys for the rotary to the CFA-10049
From: Maxime Ripard @ 2013-01-31 10:00 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359626424-22546-1-git-send-email-maxime.ripard@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
arch/arm/boot/dts/imx28-cfa10049.dts | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/arm/boot/dts/imx28-cfa10049.dts b/arch/arm/boot/dts/imx28-cfa10049.dts
index cabc33a..5db3789 100644
--- a/arch/arm/boot/dts/imx28-cfa10049.dts
+++ b/arch/arm/boot/dts/imx28-cfa10049.dts
@@ -45,6 +45,7 @@
reg = <0>;
fsl,pinmux-ids = <
0x2133 /* MX28_PAD_SSP2_D3__GPIO_2_19 */
+ 0x31a3 /* MX28_PAD_SAIF_SDATA0__GPIO_3_26 */
0x31e3 /* MX28_PAD_LCD_RESET__GPIO_3_30 */
>;
fsl,drive-strength = <0>;
@@ -276,6 +277,19 @@
};
};
+ gpio_keys {
+ compatible = "gpio-keys";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rotary_button {
+ label = "rotary_button";
+ gpios = <&gpio3 26 1>;
+ debounce-interval = <10>;
+ linux,code = <28>;
+ };
+ };
+
backlight {
compatible = "pwm-backlight";
pwms = <&pwm 3 5000000>;
--
1.7.10.4
^ permalink raw reply related
* [PATCH 2/2] ARM: mxs: dts: Add rotary encoder to the CFA-10049
From: Maxime Ripard @ 2013-01-31 10:00 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359626424-22546-1-git-send-email-maxime.ripard@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
arch/arm/boot/dts/imx28-cfa10049.dts | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm/boot/dts/imx28-cfa10049.dts b/arch/arm/boot/dts/imx28-cfa10049.dts
index 5db3789..a0d3e9f 100644
--- a/arch/arm/boot/dts/imx28-cfa10049.dts
+++ b/arch/arm/boot/dts/imx28-cfa10049.dts
@@ -45,6 +45,8 @@
reg = <0>;
fsl,pinmux-ids = <
0x2133 /* MX28_PAD_SSP2_D3__GPIO_2_19 */
+ 0x3183 /* MX28_PAD_I2C0_SCL__GPIO_3_24 */
+ 0x3193 /* MX28_PAD_I2C0_SDA__GPIO_3_25 */
0x31a3 /* MX28_PAD_SAIF_SDATA0__GPIO_3_26 */
0x31e3 /* MX28_PAD_LCD_RESET__GPIO_3_30 */
>;
@@ -290,6 +292,13 @@
};
};
+ rotary {
+ compatible = "rotary-encoder";
+ gpios = <&gpio3 24 1>, <&gpio3 25 1>;
+ linux,axis = <1>; /* REL_Y */
+ rotary-encoder,relative-axis;
+ };
+
backlight {
compatible = "pwm-backlight";
pwms = <&pwm 3 5000000>;
--
1.7.10.4
^ permalink raw reply related
* [PATCH 2/6] USB: add devicetree helpers for determining dr_mode and phy_type
From: Peter Chen @ 2013-01-31 10:01 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359622873-23345-3-git-send-email-s.hauer@pengutronix.de>
On Thu, Jan 31, 2013 at 10:01:09AM +0100, Sascha Hauer wrote:
> From: Michael Grzeschik <m.grzeschik@pengutronix.de>
>
>
> + for (i = 0; i < ARRAY_SIZE(usb_dr_modes); i++)
> + if (!strcmp(dr_mode, usb_dr_modes[i]))
> + return i;
if (strcmp(dr_mode, usb_dr_modes[i]) == 0) may be more friendly.
> +
> +#ifndef __LINUX_USB_OF_H
> +#define __LINUX_USB_OF_H
> +
> +#include <linux/usb/phy.h>
> +
> +#ifdef CONFIG_OF
> +enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np);
Will you put definition to phy.c, I can't find it at this version
> index e8a5fe8..4e8bfbb 100644
> --- a/include/linux/usb/otg.h
> +++ b/include/linux/usb/otg.h
> @@ -99,4 +99,11 @@ otg_start_srp(struct usb_otg *otg)
> /* for OTG controller drivers (and maybe other stuff) */
> extern int usb_bus_start_enum(struct usb_bus *bus, unsigned port_num);
>
> +enum usb_dr_mode {
> + USB_DR_MODE_UNKNOWN,
> + USB_DR_MODE_HOST,
> + USB_DR_MODE_PERIPHERAL,
> + USB_DR_MODE_OTG,
> +};
> +
I am not sure if otg.h is a good place to put this, in fact, we need
a common header file for it.
--
Best Regards,
Peter Chen
^ permalink raw reply
* [PATCH] arm: mvebu: support for the new Armada XP evaluation board(DB-MV784MP-GP)
From: Thomas Petazzoni @ 2013-01-31 10:07 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130131095025.GC20242@lunn.ch>
Dear Andrew Lunn,
On Thu, 31 Jan 2013 10:50:25 +0100, Andrew Lunn wrote:
> We have the same issue with OpenBox AX3. All the devices we have in
> our hands have 1GB soldered down, plus 2GB on expansion. The DT
> currently has the full 3GB.
>
> However, there has been discussion of reducing this down to 1GB since
> both Thomas and Gregory have unstable systems with the full 3GB, but
> mine box is stable with the full 3GB. So i don't know how strong a
> precedent that sets....
It seems that if we have CONFIG_ARM_ATAG_DTB_COMPAT, then the code in
arch/arm/boot/compressed/atags_to_fdt.c will update the DT memory node
according to the ATAG_MEM passed by the bootloader.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply
* [PATCH RFC] davinci: poll for sleep completion in resume routine.
From: Vishwanathrao Badarkhe, Manish @ 2013-01-31 10:11 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <510A3EAE.107@ti.com>
Hi Sekhar
On Thu, Jan 31, 2013 at 15:21:42, Nori, Sekhar wrote:
>
>
> On 1/31/2013 2:56 PM, Vishwanathrao Badarkhe, Manish wrote:
> > As per OMAP-L138 TRM, Software must poll for SLEEPCOMPLETE bit until
> > it is set to 1 before clearing SLEEPENABLE bit in DEEPSLEEP register
> > in resume routine.
> > Modifications are as per datasheet:
> > http://www.ti.com/lit/ug/spruh77a/spruh77a.pdf
> > See sections 10.10.2.2 and 11.5.21 for more detailed explanation.
> >
> > Tested on da850-evm.
> >
> > Signed-off-by: Vishwanathrao Badarkhe, Manish <manishv.b@ti.com>
>
> Is this a bug fix? Do you see any issue without this patch?
This is not a bug fix. I have not seen any issue without this patch.
Only, modifications are done as per OMAP-L138 TRM.
>
> Thanks,
> Sekhar
>
Regards,
Manish
^ permalink raw reply
* [PATCH 2/6] USB: add devicetree helpers for determining dr_mode and phy_type
From: Sascha Hauer @ 2013-01-31 10:12 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130131100107.GD14629@nchen-desktop>
On Thu, Jan 31, 2013 at 06:01:08PM +0800, Peter Chen wrote:
> On Thu, Jan 31, 2013 at 10:01:09AM +0100, Sascha Hauer wrote:
> > From: Michael Grzeschik <m.grzeschik@pengutronix.de>
> >
> >
> > + for (i = 0; i < ARRAY_SIZE(usb_dr_modes); i++)
> > + if (!strcmp(dr_mode, usb_dr_modes[i]))
> > + return i;
>
> if (strcmp(dr_mode, usb_dr_modes[i]) == 0) may be more friendly.
>
> > +
> > +#ifndef __LINUX_USB_OF_H
> > +#define __LINUX_USB_OF_H
> > +
> > +#include <linux/usb/phy.h>
> > +
> > +#ifdef CONFIG_OF
> > +enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np);
>
> Will you put definition to phy.c, I can't find it at this version
This goes to drivers/usb/phy/of.c Sorry, as Kishon noted I missed to git
add the file. See the attached updated patch.
>
> > index e8a5fe8..4e8bfbb 100644
> > --- a/include/linux/usb/otg.h
> > +++ b/include/linux/usb/otg.h
> > @@ -99,4 +99,11 @@ otg_start_srp(struct usb_otg *otg)
> > /* for OTG controller drivers (and maybe other stuff) */
> > extern int usb_bus_start_enum(struct usb_bus *bus, unsigned port_num);
> >
> > +enum usb_dr_mode {
> > + USB_DR_MODE_UNKNOWN,
> > + USB_DR_MODE_HOST,
> > + USB_DR_MODE_PERIPHERAL,
> > + USB_DR_MODE_OTG,
> > +};
> > +
>
> I am not sure if otg.h is a good place to put this, in fact, we need
> a common header file for it.
Well linux/usb/otg.h is at least a header which can be included safely
by everyone interested in usb_dr_mode. Anyway, I'm open for better
suggestions, I just hesitated to add a new file just for this enum.
Sascha
>From 19c1a6552d6aa93f5ff354a224de0679d55a8126 Mon Sep 17 00:00:00 2001
From: Michael Grzeschik <m.grzeschik@pengutronix.de>
Date: Tue, 6 Nov 2012 16:10:10 +0100
Subject: [PATCH] USB: add devicetree helpers for determining dr_mode and
phy_type
This adds two little devicetree helper functions for determining the
dr_mode (host, peripheral, otg) and phy_type (utmi, ulpi,...) from
the devicetree.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/usb/phy/Makefile | 1 +
drivers/usb/phy/of.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++
drivers/usb/usb-common.c | 36 +++++++++++++++++++++++++++++++++++
include/linux/usb/of.h | 27 ++++++++++++++++++++++++++
include/linux/usb/otg.h | 7 +++++++
include/linux/usb/phy.h | 9 +++++++++
6 files changed, 127 insertions(+)
create mode 100644 drivers/usb/phy/of.c
create mode 100644 include/linux/usb/of.h
diff --git a/drivers/usb/phy/Makefile b/drivers/usb/phy/Makefile
index 9fa6327..e1be1e8 100644
--- a/drivers/usb/phy/Makefile
+++ b/drivers/usb/phy/Makefile
@@ -5,6 +5,7 @@
ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG
obj-$(CONFIG_USB_OTG_UTILS) += phy.o
+obj-$(CONFIG_OF) += of.o
obj-$(CONFIG_OMAP_USB2) += omap-usb2.o
obj-$(CONFIG_OMAP_USB3) += omap-usb3.o
obj-$(CONFIG_OMAP_CONTROL_USB) += omap-control-usb.o
diff --git a/drivers/usb/phy/of.c b/drivers/usb/phy/of.c
new file mode 100644
index 0000000..e6f3b74
--- /dev/null
+++ b/drivers/usb/phy/of.c
@@ -0,0 +1,47 @@
+/*
+ * USB of helper code
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/usb/of.h>
+#include <linux/usb/otg.h>
+
+static const char *usbphy_modes[] = {
+ [USBPHY_INTERFACE_MODE_UNKNOWN] = "",
+ [USBPHY_INTERFACE_MODE_UTMI] = "utmi",
+ [USBPHY_INTERFACE_MODE_UTMIW] = "utmi_wide",
+ [USBPHY_INTERFACE_MODE_ULPI] = "ulpi",
+ [USBPHY_INTERFACE_MODE_SERIAL] = "serial",
+ [USBPHY_INTERFACE_MODE_HSIC] = "hsic",
+};
+
+/**
+ * of_usb_get_phy_mode - Get phy mode for given device_node
+ * @np: Pointer to the given device_node
+ *
+ * The function gets phy interface string from property 'phy_type',
+ * and returns the correspondig enum usb_phy_interface
+ */
+enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np)
+{
+ const char *phy_type;
+ int err, i;
+
+ err = of_property_read_string(np, "phy_type", &phy_type);
+ if (err < 0)
+ return USBPHY_INTERFACE_MODE_UNKNOWN;
+
+ for (i = 0; i < ARRAY_SIZE(usbphy_modes); i++)
+ if (!strcmp(phy_type, usbphy_modes[i]))
+ return i;
+
+ return USBPHY_INTERFACE_MODE_UNKNOWN;
+}
+EXPORT_SYMBOL_GPL(of_usb_get_phy_mode);
diff --git a/drivers/usb/usb-common.c b/drivers/usb/usb-common.c
index d29503e..ad4d87d 100644
--- a/drivers/usb/usb-common.c
+++ b/drivers/usb/usb-common.c
@@ -14,6 +14,9 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/usb/ch9.h>
+#include <linux/of.h>
+#include <linux/usb/of.h>
+#include <linux/usb/otg.h>
const char *usb_speed_string(enum usb_device_speed speed)
{
@@ -32,4 +35,37 @@ const char *usb_speed_string(enum usb_device_speed speed)
}
EXPORT_SYMBOL_GPL(usb_speed_string);
+#ifdef CONFIG_OF
+static const char *usb_dr_modes[] = {
+ [USB_DR_MODE_UNKNOWN] = "",
+ [USB_DR_MODE_HOST] = "host",
+ [USB_DR_MODE_PERIPHERAL] = "peripheral",
+ [USB_DR_MODE_OTG] = "otg",
+};
+
+/**
+ * of_usb_get_dr_mode - Get dual role mode for given device_node
+ * @np: Pointer to the given device_node
+ *
+ * The function gets phy interface string from property 'dr_mode',
+ * and returns the correspondig enum usb_dr_mode
+ */
+enum usb_dr_mode of_usb_get_dr_mode(struct device_node *np)
+{
+ const char *dr_mode;
+ int err, i;
+
+ err = of_property_read_string(np, "dr_mode", &dr_mode);
+ if (err < 0)
+ return USB_DR_MODE_UNKNOWN;
+
+ for (i = 0; i < ARRAY_SIZE(usb_dr_modes); i++)
+ if (!strcmp(dr_mode, usb_dr_modes[i]))
+ return i;
+
+ return USB_DR_MODE_UNKNOWN;
+}
+EXPORT_SYMBOL_GPL(of_usb_get_dr_mode);
+#endif
+
MODULE_LICENSE("GPL");
diff --git a/include/linux/usb/of.h b/include/linux/usb/of.h
new file mode 100644
index 0000000..4681a20
--- /dev/null
+++ b/include/linux/usb/of.h
@@ -0,0 +1,27 @@
+/*
+ * OF helpers for usb devices.
+ *
+ * This file is released under the GPLv2
+ */
+
+#ifndef __LINUX_USB_OF_H
+#define __LINUX_USB_OF_H
+
+#include <linux/usb/phy.h>
+
+#ifdef CONFIG_OF
+enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np);
+enum usb_dr_mode of_usb_get_dr_mode(struct device_node *np);
+#else
+static inline enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np)
+{
+ return USBPHY_INTERFACE_MODE_UNKNOWN;
+}
+
+static inline enum usb_dr_mode of_usb_get_dr_mode(struct device_node *np)
+{
+ return USB_DR_MODE_UNKNOWN;
+}
+#endif
+
+#endif /* __LINUX_USB_OF_H */
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h
index e8a5fe8..4e8bfbb 100644
--- a/include/linux/usb/otg.h
+++ b/include/linux/usb/otg.h
@@ -99,4 +99,11 @@ otg_start_srp(struct usb_otg *otg)
/* for OTG controller drivers (and maybe other stuff) */
extern int usb_bus_start_enum(struct usb_bus *bus, unsigned port_num);
+enum usb_dr_mode {
+ USB_DR_MODE_UNKNOWN,
+ USB_DR_MODE_HOST,
+ USB_DR_MODE_PERIPHERAL,
+ USB_DR_MODE_OTG,
+};
+
#endif /* __LINUX_USB_OTG_H */
diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h
index 15847cb..5edddb1 100644
--- a/include/linux/usb/phy.h
+++ b/include/linux/usb/phy.h
@@ -12,6 +12,15 @@
#include <linux/notifier.h>
#include <linux/usb.h>
+enum usb_phy_interface {
+ USBPHY_INTERFACE_MODE_UNKNOWN,
+ USBPHY_INTERFACE_MODE_UTMI,
+ USBPHY_INTERFACE_MODE_UTMIW,
+ USBPHY_INTERFACE_MODE_ULPI,
+ USBPHY_INTERFACE_MODE_SERIAL,
+ USBPHY_INTERFACE_MODE_HSIC,
+};
+
enum usb_phy_events {
USB_EVENT_NONE, /* no events or cable disconnected */
USB_EVENT_VBUS, /* vbus valid event */
--
1.7.10.4
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply related
* [PATCH 1/1] drivers: net: davinci_cpdma: acknowledge interrupt properly
From: Mugunthan V N @ 2013-01-31 10:17 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <EF466712-C5FF-4A91-BDF3-477559B02705@dominion.thruhere.net>
On 1/31/2013 1:33 AM, Koen Kooi wrote:
> Op 30 jan. 2013, om 20:56 heeft Mugunthan V N <mugunthanvnm@ti.com> het volgende geschreven:
>
>> CPDMA interrupts are not properly acknowledged which leads to interrupt
>> storm, only cpdma interrupt 0 is acknowledged in Davinci CPDMA driver.
>> Changed cpdma_ctlr_eoi api to acknowledge 1 and 2 interrupts which are
>> used for rx and tx respectively.
> A brief inspection shows that this still isn't following the TRM, but Pantelis' patch does. Can you please fix this driver to follow the TRM and make it work on both PG1.0 and PG2.0 instead of papering over bugs instead of fixing them properly?
Existing driver implementation is also complies with TRM. What Pantelis
added
additionally are non-napi implementation, handled cpdma processed tx and rx
processing separately and renamed wr_reg as per TRM naming convention..
Also he
has added a dummy reading tx/rx stat which is mentioned in TRM, but this
stat
is required only when using multichannel for data transfer. Current
implementation
of CPSW driver uses only channel 0 of Tx and Rx channels respectively
for transmission
and reading stat doesn't gets any effect in interrupt acknowledgment.
Since both tx and rx are processed in same napi api, so i have added
interrupt
acknowledgment to the same existing api.
Regards
Mugunthan V N
^ permalink raw reply
* [PATCH,RFC] usb: add devicetree helpers for determining dr_mode and phy_type
From: Sascha Hauer @ 2013-01-31 10:29 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130131020542.GD9777@nchen-desktop>
On Thu, Jan 31, 2013 at 10:05:44AM +0800, Peter Chen wrote:
> On Wed, Jan 30, 2013 at 03:00:15PM +0100, Sascha Hauer wrote:
> > On Wed, Jan 30, 2013 at 10:06:28AM +0800, Peter Chen wrote:
> > > On Tue, Jan 29, 2013 at 01:55:04PM +0200, Alexander Shishkin wrote:
> > > > Sascha Hauer <s.hauer@pengutronix.de> writes:
> > > >
> > > > > From: Michael Grzeschik <m.grzeschik@pengutronix.de>
> > > > >
> > > > > This adds two little devicetree helper functions for determining the
> > > > > dr_mode (host, peripheral, otg) and phy_type (utmi, ulpi,...) from
> > > > > the devicetree.
> > > > >
> > > > > Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> > > > > Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> > > > > ---
> > > > >
> > > > > The properties and their values have been taken from the fsl-mph-dr driver.
> > > > > This binding is also documented (though currently not used) for the tegra
> > > > > ehci driver (Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt).
> > > > > This is a first attempt to parse these bindings at a common place so that
> > > > > others can make use of it.
> > > > >
> > > > > Basically I want to know whether this binding is recommended for new drivers
> > > > > since normally the devicetree uses '-' instead of '_', and maybe there are
> > > > > other problems with it.
> > > > >
> > > > > I need this binding for the chipidea driver. I suspect that the fsl-mph-dr
> > > > > driver also really handles a chipidea core.
> > > >
> > > > As far as I know, it is a chipidea core. Adding Peter to Cc list, he can
> > > > probably confirm.
> > >
> > > The fsl-mph-dr can't be used for chipdiea as it handles three platform
> > > drivers for three roles (peripheral , host, otg). But chipidea only has
> > > two platform drivers, one is the chipidea core, the other is related
> > > controller wrapper.
> >
> > What do you mean by 'three platform drivers'? That's only how the driver
> > is built, no? I was talking about the hardware the fsl-mph-dr driver
> > handles which definitely smells like chipidea.
>
> It creates host/device/otg platform device according to dr_mode from
> the device tree.
Again, that's software specific. What I'd like to know is whether the
*hardware* could be handled by the chipidea driver.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply
* [PATCH v2 0/4] Preparatory GIC patches for arm64 support
From: Catalin Marinas @ 2013-01-31 10:30 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359476319-23720-1-git-send-email-catalin.marinas@arm.com>
Olof, Arnd,
On Tue, Jan 29, 2013 at 04:18:35PM +0000, Catalin Marinas wrote:
> That's the second version of the GIC clean-up patches to support arm64.
> The only change from v1 is that the second patch (chained_irq.h) also
> covers drivers/gpio and drivers/pinctrl (#include change).
Are you ok to merge this series via the arm-soc tree for 3.9-rc1? There
are no complaints so far (only acks ;). This would allow me to push GIC
support for arm64.
Thanks,
Catalin
Stats below for reference:
> Catalin Marinas (4):
> arm: Move the set_handle_irq and handle_arch_irq declarations to
> asm/irq.h
> arm: Move chained_irq_(enter|exit) to a generic file
> irqchip: gic: Call handle_bad_irq() directly
> irqchip: gic: Perform the gic_secondary_init() call via CPU notifier
>
> arch/arm/include/asm/irq.h | 5 +++
> arch/arm/include/asm/mach/irq.h | 36 --------------------
> arch/arm/mach-at91/gpio.c | 3 +-
> arch/arm/mach-exynos/common.c | 1 +
> arch/arm/mach-exynos/platsmp.c | 8 -----
> arch/arm/mach-highbank/platsmp.c | 7 ----
> arch/arm/mach-imx/platsmp.c | 12 -------
> arch/arm/mach-msm/platsmp.c | 8 -----
> arch/arm/mach-omap2/omap-smp.c | 7 ----
> arch/arm/mach-shmobile/smp-emev2.c | 7 ----
> arch/arm/mach-shmobile/smp-r8a7779.c | 7 ----
> arch/arm/mach-shmobile/smp-sh73a0.c | 7 ----
> arch/arm/mach-socfpga/platsmp.c | 12 -------
> arch/arm/mach-spear13xx/platsmp.c | 8 -----
> arch/arm/mach-tegra/platsmp.c | 8 -----
> arch/arm/mach-ux500/platsmp.c | 8 -----
> arch/arm/plat-samsung/irq-vic-timer.c | 3 +-
> arch/arm/plat-samsung/s5p-irq-gpioint.c | 3 +-
> arch/arm/plat-versatile/platsmp.c | 8 -----
> drivers/gpio/gpio-msm-v2.c | 3 +-
> drivers/gpio/gpio-mxc.c | 2 +-
> drivers/gpio/gpio-omap.c | 3 +-
> drivers/gpio/gpio-pl061.c | 2 +-
> drivers/gpio/gpio-pxa.c | 3 +-
> drivers/gpio/gpio-tegra.c | 3 +-
> drivers/irqchip/irq-gic.c | 32 +++++++++++++-----
> drivers/irqchip/irq-vic.c | 2 +-
> drivers/pinctrl/pinctrl-at91.c | 3 +-
> drivers/pinctrl/pinctrl-exynos.c | 3 +-
> drivers/pinctrl/pinctrl-nomadik.c | 2 +-
> drivers/pinctrl/pinctrl-sirf.c | 2 +-
> drivers/pinctrl/spear/pinctrl-plgpio.c | 2 +-
> drivers/staging/imx-drm/ipu-v3/ipu-common.c | 2 +-
> include/linux/irqchip/arm-gic.h | 1 -
> include/linux/irqchip/chained_irq.h | 52 +++++++++++++++++++++++++++++
> 35 files changed, 97 insertions(+), 178 deletions(-)
> create mode 100644 include/linux/irqchip/chained_irq.h
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox