* [GIT PULL v2] Renesas ARM-based SoC: Marzen and r8a7779 for 3.7
@ 2012-08-31 1:28 Simon Horman
2012-08-31 1:28 ` [PATCH 01/11] r8a7779: add SDHI clock support Simon Horman
` (11 more replies)
0 siblings, 12 replies; 26+ messages in thread
From: Simon Horman @ 2012-08-31 1:28 UTC (permalink / raw)
To: linux-arm-kernel
Hi Olof, Hi Arnd,
please consider the following enhancements to the Marzen board
and r8a7779 SoC by Phil Edworthy, Morimoto-san and myself for 3.7.
* This pull requests superceedes the previous request,
"[GIT PULL v2] Renesas ARM-based SoC: Marzen and r8a7779 for 3.7"
which I made earlier today. The difference to that request is that
I have pushed one more patch. There was no rebase.
* This pull request is based on the usb-next branch of Greg KH's USB tree,
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git,
which is based on v3.6-rc3.
This is to satisfy compile-time dependencies.
Please let me know if you would like this handled a different way.
----------------------------------------------------------------
The following changes since commit a7bdf7fa33127bf08eb0810698bca607a9462df4:
Merge v3.6-rc3 into usb-next (2012-08-27 07:15:30 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git marzen
for you to fetch changes up to 3553395437f2ac42a73255a0ffac09efc9acf5c4:
ARM: shmobile: marzen: add USB OHCI driver support (2012-08-31 09:41:44 +0900)
----------------------------------------------------------------
Kuninori Morimoto (8):
ARM: shmobile: r8a7779: PFC rename PENCx -> USB_PENCx
ARM: shmobile: r8a7779: add USB common phy initializer
ARM: shmobile: r8a7779: add USB EHCI clock support
ARM: shmobile: r8a7779: add USB OHCI clock support
ARM: shmobile: marzen: add USB EHCI driver support
ARM: shmobile: marzen: fixup regulator id for smsc911x
ARM: shmobile: marzen: enable thermal sensor
ARM: shmobile: marzen: add USB OHCI driver support
Phil Edworthy (2):
r8a7779: add SDHI clock support
marzen: add SDHI0 support
Simon Horman (1):
ARM: mach-shmobile: marzen: defconfig update
arch/arm/configs/marzen_defconfig | 30 ++--
arch/arm/mach-shmobile/Kconfig | 2 +
arch/arm/mach-shmobile/board-marzen.c | 213 +++++++++++++++++++++++++-
arch/arm/mach-shmobile/clock-r8a7779.c | 18 ++-
arch/arm/mach-shmobile/include/mach/common.h | 1 +
arch/arm/mach-shmobile/include/mach/r8a7779.h | 2 +-
arch/arm/mach-shmobile/pfc-r8a7779.c | 16 +-
arch/arm/mach-shmobile/setup-r8a7779.c | 93 +++++++++++
8 files changed, 355 insertions(+), 20 deletions(-)
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 01/11] r8a7779: add SDHI clock support
2012-08-31 1:28 [GIT PULL v2] Renesas ARM-based SoC: Marzen and r8a7779 for 3.7 Simon Horman
@ 2012-08-31 1:28 ` Simon Horman
2012-08-31 1:28 ` [PATCH 02/11] marzen: add SDHI0 support Simon Horman
` (10 subsequent siblings)
11 siblings, 0 replies; 26+ messages in thread
From: Simon Horman @ 2012-08-31 1:28 UTC (permalink / raw)
To: linux-arm-kernel
From: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
arch/arm/mach-shmobile/clock-r8a7779.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c
index 339c62c..3cafb6a 100644
--- a/arch/arm/mach-shmobile/clock-r8a7779.c
+++ b/arch/arm/mach-shmobile/clock-r8a7779.c
@@ -86,11 +86,16 @@ static struct clk div4_clks[DIV4_NR] = {
0x0300, CLK_ENABLE_ON_INIT),
};
-enum { MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021,
+enum { MSTP323, MSTP322, MSTP321, MSTP320,
+ MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021,
MSTP016, MSTP015, MSTP014,
MSTP_NR };
static struct clk mstp_clks[MSTP_NR] = {
+ [MSTP323] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 23, 0), /* SDHI0 */
+ [MSTP322] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 22, 0), /* SDHI1 */
+ [MSTP321] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 21, 0), /* SDHI2 */
+ [MSTP320] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 20, 0), /* SDHI3 */
[MSTP026] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 26, 0), /* SCIF0 */
[MSTP025] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 25, 0), /* SCIF1 */
[MSTP024] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 24, 0), /* SCIF2 */
@@ -149,6 +154,10 @@ static struct clk_lookup lookups[] = {
CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP023]), /* SCIF3 */
CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP022]), /* SCIF4 */
CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP021]), /* SCIF6 */
+ CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP323]), /* SDHI0 */
+ CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */
+ CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */
+ CLKDEV_DEV_ID("sh_mobile_sdhi.3", &mstp_clks[MSTP320]), /* SDHI3 */
};
void __init r8a7779_clock_init(void)
--
1.7.10.2.484.gcd07cc5
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 02/11] marzen: add SDHI0 support
2012-08-31 1:28 [GIT PULL v2] Renesas ARM-based SoC: Marzen and r8a7779 for 3.7 Simon Horman
2012-08-31 1:28 ` [PATCH 01/11] r8a7779: add SDHI clock support Simon Horman
@ 2012-08-31 1:28 ` Simon Horman
2012-08-31 1:28 ` [PATCH 03/11] ARM: mach-shmobile: marzen: defconfig update Simon Horman
` (9 subsequent siblings)
11 siblings, 0 replies; 26+ messages in thread
From: Simon Horman @ 2012-08-31 1:28 UTC (permalink / raw)
To: linux-arm-kernel
From: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
arch/arm/configs/marzen_defconfig | 4 +--
arch/arm/mach-shmobile/board-marzen.c | 52 ++++++++++++++++++++++++++++++++++-
2 files changed, 53 insertions(+), 3 deletions(-)
diff --git a/arch/arm/configs/marzen_defconfig b/arch/arm/configs/marzen_defconfig
index 864f9a5..bf42ad2 100644
--- a/arch/arm/configs/marzen_defconfig
+++ b/arch/arm/configs/marzen_defconfig
@@ -71,12 +71,12 @@ CONFIG_GPIO_SYSFS=y
CONFIG_SSB=y
# CONFIG_HID_SUPPORT is not set
# CONFIG_USB_SUPPORT is not set
+CONFIG_MMC=y
+CONFIG_MMC_SDHI=y
CONFIG_UIO=y
CONFIG_UIO_PDRV_GENIRQ=y
# CONFIG_IOMMU_SUPPORT is not set
# CONFIG_FILE_LOCKING is not set
-# CONFIG_DNOTIFY is not set
-# CONFIG_INOTIFY_USER is not set
CONFIG_TMPFS=y
# CONFIG_MISC_FILESYSTEMS is not set
CONFIG_MAGIC_SYSRQ=y
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c
index 3a528cf..dec3ffc 100644
--- a/arch/arm/mach-shmobile/board-marzen.c
+++ b/arch/arm/mach-shmobile/board-marzen.c
@@ -30,6 +30,8 @@
#include <linux/regulator/fixed.h>
#include <linux/regulator/machine.h>
#include <linux/smsc911x.h>
+#include <linux/mmc/sh_mobile_sdhi.h>
+#include <linux/mfd/tmio.h>
#include <mach/hardware.h>
#include <mach/r8a7779.h>
#include <mach/common.h>
@@ -39,6 +41,12 @@
#include <asm/hardware/gic.h>
#include <asm/traps.h>
+/* Fixed 3.3V regulator to be used by SDHI0 */
+static struct regulator_consumer_supply fixed3v3_power_consumers[] = {
+ REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
+ REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"),
+};
+
/* Dummy supplies, where voltage doesn't matter */
static struct regulator_consumer_supply dummy_supplies[] = {
REGULATOR_SUPPLY("vddvario", "smsc911x"),
@@ -75,13 +83,45 @@ static struct platform_device eth_device = {
.num_resources = ARRAY_SIZE(smsc911x_resources),
};
+static struct resource sdhi0_resources[] = {
+ [0] = {
+ .name = "sdhi0",
+ .start = 0xffe4c000,
+ .end = 0xffe4c0ff,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = gic_spi(104),
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct sh_mobile_sdhi_info sdhi0_platform_data = {
+ .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE | TMIO_MMC_HAS_IDLE_WAIT,
+ .tmio_caps = MMC_CAP_SD_HIGHSPEED,
+};
+
+static struct platform_device sdhi0_device = {
+ .name = "sh_mobile_sdhi",
+ .num_resources = ARRAY_SIZE(sdhi0_resources),
+ .resource = sdhi0_resources,
+ .id = 0,
+ .dev = {
+ .platform_data = &sdhi0_platform_data,
+ }
+};
+
static struct platform_device *marzen_devices[] __initdata = {
ð_device,
+ &sdhi0_device,
};
static void __init marzen_init(void)
{
- regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
+ regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers,
+ ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
+ regulator_register_fixed(0, dummy_supplies,
+ ARRAY_SIZE(dummy_supplies));
r8a7779_pinmux_init();
@@ -97,6 +137,16 @@ static void __init marzen_init(void)
gpio_request(GPIO_FN_EX_CS0, NULL); /* nCS */
gpio_request(GPIO_FN_IRQ1_B, NULL); /* IRQ + PME */
+ /* SD0 (CN20) */
+ gpio_request(GPIO_FN_SD0_CLK, NULL);
+ gpio_request(GPIO_FN_SD0_CMD, NULL);
+ gpio_request(GPIO_FN_SD0_DAT0, NULL);
+ gpio_request(GPIO_FN_SD0_DAT1, NULL);
+ gpio_request(GPIO_FN_SD0_DAT2, NULL);
+ gpio_request(GPIO_FN_SD0_DAT3, NULL);
+ gpio_request(GPIO_FN_SD0_CD, NULL);
+ gpio_request(GPIO_FN_SD0_WP, NULL);
+
r8a7779_add_standard_devices();
platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices));
}
--
1.7.10.2.484.gcd07cc5
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 03/11] ARM: mach-shmobile: marzen: defconfig update
2012-08-31 1:28 [GIT PULL v2] Renesas ARM-based SoC: Marzen and r8a7779 for 3.7 Simon Horman
2012-08-31 1:28 ` [PATCH 01/11] r8a7779: add SDHI clock support Simon Horman
2012-08-31 1:28 ` [PATCH 02/11] marzen: add SDHI0 support Simon Horman
@ 2012-08-31 1:28 ` Simon Horman
2012-08-31 1:28 ` [PATCH 04/11] ARM: shmobile: r8a7779: PFC rename PENCx -> USB_PENCx Simon Horman
` (8 subsequent siblings)
11 siblings, 0 replies; 26+ messages in thread
From: Simon Horman @ 2012-08-31 1:28 UTC (permalink / raw)
To: linux-arm-kernel
Update marzen defconfig
* Enable MMC Block device as SDHI hw is now supported.
* Default to NFS root, this is consistent with many other
shmobile boards
* Enable UNIX which is required by udevd
Other changes are noise due to using make savedefconfig
to create the new defconfig.
Cc: Phil Edworthy <phil.edworthy@renesas.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
arch/arm/configs/marzen_defconfig | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/arch/arm/configs/marzen_defconfig b/arch/arm/configs/marzen_defconfig
index bf42ad2..cd2dc21 100644
--- a/arch/arm/configs/marzen_defconfig
+++ b/arch/arm/configs/marzen_defconfig
@@ -1,13 +1,14 @@
# CONFIG_ARM_PATCH_PHYS_VIRT is not set
CONFIG_EXPERIMENTAL=y
CONFIG_KERNEL_LZMA=y
+CONFIG_NO_HZ=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=16
CONFIG_SYSCTL_SYSCALL=y
CONFIG_EMBEDDED=y
CONFIG_SLAB=y
-# CONFIG_BLOCK is not set
+# CONFIG_IOSCHED_CFQ is not set
CONFIG_ARCH_SHMOBILE=y
CONFIG_ARCH_R8A7779=y
CONFIG_MACH_MARZEN=y
@@ -21,7 +22,6 @@ CONFIG_ARM_ERRATA_458693=y
CONFIG_ARM_ERRATA_460075=y
CONFIG_ARM_ERRATA_743622=y
CONFIG_ARM_ERRATA_754322=y
-CONFIG_NO_HZ=y
CONFIG_SMP=y
# CONFIG_ARM_CPU_TOPOLOGY is not set
CONFIG_AEABI=y
@@ -29,13 +29,16 @@ CONFIG_AEABI=y
CONFIG_HIGHMEM=y
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
-CONFIG_CMDLINE="console=ttySC2,115200 earlyprintk=sh-sci.2,115200 ignore_loglevel"
+CONFIG_CMDLINE="console=ttySC2,115200 earlyprintk=sh-sci.2,115200 ignore_loglevel root=/dev/nfs ip=on"
CONFIG_CMDLINE_FORCE=y
CONFIG_KEXEC=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
CONFIG_PM_RUNTIME=y
CONFIG_NET=y
+CONFIG_UNIX=y
CONFIG_INET=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
# CONFIG_IPV6 is not set
# CONFIG_WIRELESS is not set
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
@@ -69,16 +72,16 @@ CONFIG_SERIAL_SH_SCI_CONSOLE=y
CONFIG_GPIO_SYSFS=y
# CONFIG_HWMON is not set
CONFIG_SSB=y
-# CONFIG_HID_SUPPORT is not set
# CONFIG_USB_SUPPORT is not set
CONFIG_MMC=y
CONFIG_MMC_SDHI=y
CONFIG_UIO=y
CONFIG_UIO_PDRV_GENIRQ=y
# CONFIG_IOMMU_SUPPORT is not set
-# CONFIG_FILE_LOCKING is not set
CONFIG_TMPFS=y
# CONFIG_MISC_FILESYSTEMS is not set
+CONFIG_NFS_FS=y
+CONFIG_ROOT_NFS=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_INFO_REDUCED=y
--
1.7.10.2.484.gcd07cc5
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 04/11] ARM: shmobile: r8a7779: PFC rename PENCx -> USB_PENCx
2012-08-31 1:28 [GIT PULL v2] Renesas ARM-based SoC: Marzen and r8a7779 for 3.7 Simon Horman
` (2 preceding siblings ...)
2012-08-31 1:28 ` [PATCH 03/11] ARM: mach-shmobile: marzen: defconfig update Simon Horman
@ 2012-08-31 1:28 ` Simon Horman
2012-08-31 1:28 ` [PATCH 05/11] ARM: shmobile: r8a7779: add USB common phy initializer Simon Horman
` (7 subsequent siblings)
11 siblings, 0 replies; 26+ messages in thread
From: Simon Horman @ 2012-08-31 1:28 UTC (permalink / raw)
To: linux-arm-kernel
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
PENCx is Power Enable Control pin for USB.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
arch/arm/mach-shmobile/include/mach/r8a7779.h | 2 +-
arch/arm/mach-shmobile/pfc-r8a7779.c | 16 ++++++++--------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7779.h b/arch/arm/mach-shmobile/include/mach/r8a7779.h
index b07ad31..7597a37 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7779.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7779.h
@@ -71,7 +71,7 @@ enum {
GPIO_FN_A19,
/* IPSR0 */
- GPIO_FN_PENC2, GPIO_FN_SCK0, GPIO_FN_PWM1, GPIO_FN_PWMFSW0,
+ GPIO_FN_USB_PENC2, GPIO_FN_SCK0, GPIO_FN_PWM1, GPIO_FN_PWMFSW0,
GPIO_FN_SCIF_CLK, GPIO_FN_TCLK0_C, GPIO_FN_BS, GPIO_FN_SD1_DAT2,
GPIO_FN_MMC0_D2, GPIO_FN_FD2, GPIO_FN_ATADIR0, GPIO_FN_SDSELF,
GPIO_FN_HCTS1, GPIO_FN_TX4_C, GPIO_FN_A0, GPIO_FN_SD1_DAT3,
diff --git a/arch/arm/mach-shmobile/pfc-r8a7779.c b/arch/arm/mach-shmobile/pfc-r8a7779.c
index d14c9b0..9fac32e4 100644
--- a/arch/arm/mach-shmobile/pfc-r8a7779.c
+++ b/arch/arm/mach-shmobile/pfc-r8a7779.c
@@ -140,7 +140,7 @@ enum {
FN_IP7_3_2, FN_IP7_6_4, FN_IP7_9_7, FN_IP7_12_10,
FN_IP7_14_13, FN_IP2_7_4, FN_IP2_11_8, FN_IP2_15_12,
FN_IP1_28_25, FN_IP2_3_0, FN_IP8_3_0, FN_IP8_7_4,
- FN_IP8_11_8, FN_IP8_15_12, FN_PENC0, FN_PENC1,
+ FN_IP8_11_8, FN_IP8_15_12, FN_USB_PENC0, FN_USB_PENC1,
FN_IP0_2_0, FN_IP8_17_16, FN_IP8_18, FN_IP8_19,
/* GPSR5 */
@@ -176,7 +176,7 @@ enum {
FN_A0, FN_SD1_DAT3, FN_MMC0_D3, FN_FD3,
FN_BS, FN_SD1_DAT2, FN_MMC0_D2, FN_FD2,
FN_ATADIR0, FN_SDSELF, FN_HCTS1, FN_TX4_C,
- FN_PENC2, FN_SCK0, FN_PWM1, FN_PWMFSW0,
+ FN_USB_PENC2, FN_SCK0, FN_PWM1, FN_PWMFSW0,
FN_SCIF_CLK, FN_TCLK0_C,
/* IPSR1 */
@@ -447,7 +447,7 @@ enum {
A0_MARK, SD1_DAT3_MARK, MMC0_D3_MARK, FD3_MARK,
BS_MARK, SD1_DAT2_MARK, MMC0_D2_MARK, FD2_MARK,
ATADIR0_MARK, SDSELF_MARK, HCTS1_MARK, TX4_C_MARK,
- PENC2_MARK, SCK0_MARK, PWM1_MARK, PWMFSW0_MARK,
+ USB_PENC2_MARK, SCK0_MARK, PWM1_MARK, PWMFSW0_MARK,
SCIF_CLK_MARK, TCLK0_C_MARK,
EX_CS0_MARK, RX3_C_IRDA_RX_C_MARK, MMC0_D6_MARK,
@@ -658,7 +658,7 @@ static pinmux_enum_t pinmux_data[] = {
PINMUX_DATA(A18_MARK, FN_A18),
PINMUX_DATA(A19_MARK, FN_A19),
- PINMUX_IPSR_DATA(IP0_2_0, PENC2),
+ PINMUX_IPSR_DATA(IP0_2_0, USB_PENC2),
PINMUX_IPSR_MODSEL_DATA(IP0_2_0, SCK0, SEL_SCIF0_0),
PINMUX_IPSR_DATA(IP0_2_0, PWM1),
PINMUX_IPSR_MODSEL_DATA(IP0_2_0, PWMFSW0, SEL_PWMFSW_0),
@@ -1456,7 +1456,7 @@ static struct pinmux_gpio pinmux_gpios[] = {
GPIO_FN(A19),
/* IPSR0 */
- GPIO_FN(PENC2), GPIO_FN(SCK0), GPIO_FN(PWM1), GPIO_FN(PWMFSW0),
+ GPIO_FN(USB_PENC2), GPIO_FN(SCK0), GPIO_FN(PWM1), GPIO_FN(PWMFSW0),
GPIO_FN(SCIF_CLK), GPIO_FN(TCLK0_C), GPIO_FN(BS), GPIO_FN(SD1_DAT2),
GPIO_FN(MMC0_D2), GPIO_FN(FD2), GPIO_FN(ATADIR0), GPIO_FN(SDSELF),
GPIO_FN(HCTS1), GPIO_FN(TX4_C), GPIO_FN(A0), GPIO_FN(SD1_DAT3),
@@ -1865,8 +1865,8 @@ static struct pinmux_cfg_reg pinmux_config_regs[] = {
GP_4_30_FN, FN_IP8_18,
GP_4_29_FN, FN_IP8_17_16,
GP_4_28_FN, FN_IP0_2_0,
- GP_4_27_FN, FN_PENC1,
- GP_4_26_FN, FN_PENC0,
+ GP_4_27_FN, FN_USB_PENC1,
+ GP_4_26_FN, FN_USB_PENC0,
GP_4_25_FN, FN_IP8_15_12,
GP_4_24_FN, FN_IP8_11_8,
GP_4_23_FN, FN_IP8_7_4,
@@ -1981,7 +1981,7 @@ static struct pinmux_cfg_reg pinmux_config_regs[] = {
FN_BS, FN_SD1_DAT2, FN_MMC0_D2, FN_FD2,
FN_ATADIR0, FN_SDSELF, FN_HCTS1, FN_TX4_C,
/* IP0_2_0 [3] */
- FN_PENC2, FN_SCK0, FN_PWM1, FN_PWMFSW0,
+ FN_USB_PENC2, FN_SCK0, FN_PWM1, FN_PWMFSW0,
FN_SCIF_CLK, FN_TCLK0_C, 0, 0 }
},
{ PINMUX_CFG_REG_VAR("IPSR1", 0xfffc0024, 32,
--
1.7.10.2.484.gcd07cc5
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 05/11] ARM: shmobile: r8a7779: add USB common phy initializer
2012-08-31 1:28 [GIT PULL v2] Renesas ARM-based SoC: Marzen and r8a7779 for 3.7 Simon Horman
` (3 preceding siblings ...)
2012-08-31 1:28 ` [PATCH 04/11] ARM: shmobile: r8a7779: PFC rename PENCx -> USB_PENCx Simon Horman
@ 2012-08-31 1:28 ` Simon Horman
2012-09-03 21:38 ` Arnd Bergmann
2012-08-31 1:28 ` [PATCH 06/11] ARM: shmobile: r8a7779: add USB EHCI clock support Simon Horman
` (6 subsequent siblings)
11 siblings, 1 reply; 26+ messages in thread
From: Simon Horman @ 2012-08-31 1:28 UTC (permalink / raw)
To: linux-arm-kernel
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
This patch adds common USB phy ports initializer for r8a7779.
The note is that each USB IP have own MSTP clock bit,
and common USB phy port doesn't have MSTP clock,
but this USB phy needs USB clock.
Each USB driver / platform should keep USB MSTP clock somehow.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
arch/arm/mach-shmobile/include/mach/common.h | 1 +
arch/arm/mach-shmobile/setup-r8a7779.c | 93 ++++++++++++++++++++++++++++
2 files changed, 94 insertions(+)
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
index 45e61da..00b2eb5 100644
--- a/arch/arm/mach-shmobile/include/mach/common.h
+++ b/arch/arm/mach-shmobile/include/mach/common.h
@@ -78,6 +78,7 @@ extern void r8a7779_clock_init(void);
extern void r8a7779_pinmux_init(void);
extern void r8a7779_pm_init(void);
extern void r8a7740_meram_workaround(void);
+extern int r8a7779_usb_phy_init(u32 usbpctrl0);
extern unsigned int r8a7779_get_core_count(void);
extern int r8a7779_platform_cpu_kill(unsigned int cpu);
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
index e98e46f..17fdd1f 100644
--- a/arch/arm/mach-shmobile/setup-r8a7779.c
+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
@@ -25,6 +25,7 @@
#include <linux/delay.h>
#include <linux/input.h>
#include <linux/io.h>
+#include <linux/pm_runtime.h>
#include <linux/serial_sci.h>
#include <linux/sh_intc.h>
#include <linux/sh_timer.h>
@@ -243,6 +244,98 @@ static struct platform_device *r8a7779_early_devices[] __initdata = {
static struct platform_device *r8a7779_late_devices[] __initdata = {
};
+/* USBH common register */
+#define USBPCTRL0 0x0800
+#define USBPCTRL1 0x0804
+#define USBST 0x0808
+#define USBEH0 0x080C
+#define USBOH0 0x081C
+#define USBCTL0 0x0858
+#define EIIBC1 0x0094
+#define EIIBC2 0x009C
+
+#ifdef CONFIG_ARCH_SUPPORTS_BIG_ENDIAN
+# define xHCI_ENDIAN "BIG"
+# define xHCI_NO_SWAP 0x00000003
+#else
+# define xHCI_ENDIAN "LITTLE"
+# define xHCI_NO_SWAP 0x00000000
+#endif
+
+/*
+ * USB initial/install operation.
+ *
+ * This function setup USB phy.
+ * The used value and setting order came from
+ * [USB :: Initial setting] on datasheet.
+ */
+int __init r8a7779_usb_phy_init(u32 usbpctrl0)
+{
+ void __iomem *reg0, *reg1;
+ int i;
+ u32 val;
+
+ reg0 = ioremap_nocache(0xffe70000, 0x900);
+ reg1 = ioremap_nocache(0xfff70000, 0x900);
+
+ /*----------------------------------------*
+ * USB phy start-up
+ *----------------------------------------*/
+
+ /* (1) USB-PHY standby release */
+ iowrite32(0x00000001, (reg0 + USBPCTRL1));
+
+ /* (2) start USB-PHY internal PLL */
+ iowrite32(0x00000003, (reg0 + USBPCTRL1));
+
+ /* (3) USB module status check */
+ for (i = 0; i < 1024; i++) {
+ udelay(10);
+ val = ioread32(reg0 + USBST);
+ if (0xc0000000 == val)
+ goto usb_module_is_working;
+ }
+ pr_err("USB module not ready\n");
+ return -EIO;
+
+usb_module_is_working:
+ /* (4) USB-PHY reset clear */
+ iowrite32(0x00000007, (reg0 + USBPCTRL1));
+
+ /* set platform specific port settings */
+ iowrite32(usbpctrl0, (reg0 + USBPCTRL0));
+
+ /*----------------------------------------*
+ * EHCI IP Internal Buffer Setting
+ *----------------------------------------*/
+
+ /* (1) EHCI IP internal buffer setting */
+ iowrite32(0x00ff0040, (reg0 + EIIBC1));
+ iowrite32(0x00ff0040, (reg1 + EIIBC1));
+
+ /* (2) EHCI IP internal buffer enable */
+ iowrite32(0x00000001, (reg0 + EIIBC2));
+ iowrite32(0x00000001, (reg1 + EIIBC2));
+
+ /*----------------------------------------*
+ * Bus alignment settings
+ *----------------------------------------*/
+
+ /* (1) EHCI bus alignment */
+ iowrite32(xHCI_NO_SWAP, (reg0 + USBEH0));
+
+ /* (1) OHCI bus alignment */
+ iowrite32(xHCI_NO_SWAP, (reg0 + USBOH0));
+
+ pr_info("USB xHCI alignment was initialized as %s endian no swap\n",
+ xHCI_ENDIAN);
+
+ iounmap(reg0);
+ iounmap(reg1);
+
+ return 0;
+}
+
void __init r8a7779_add_standard_devices(void)
{
#ifdef CONFIG_CACHE_L2X0
--
1.7.10.2.484.gcd07cc5
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 06/11] ARM: shmobile: r8a7779: add USB EHCI clock support
2012-08-31 1:28 [GIT PULL v2] Renesas ARM-based SoC: Marzen and r8a7779 for 3.7 Simon Horman
` (4 preceding siblings ...)
2012-08-31 1:28 ` [PATCH 05/11] ARM: shmobile: r8a7779: add USB common phy initializer Simon Horman
@ 2012-08-31 1:28 ` Simon Horman
2012-08-31 1:28 ` [PATCH 07/11] ARM: shmobile: r8a7779: add USB OHCI " Simon Horman
` (5 subsequent siblings)
11 siblings, 0 replies; 26+ messages in thread
From: Simon Horman @ 2012-08-31 1:28 UTC (permalink / raw)
To: linux-arm-kernel
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
ehci-platform driver require these clocks
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
arch/arm/mach-shmobile/clock-r8a7779.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c
index 3cafb6a..1d8842b 100644
--- a/arch/arm/mach-shmobile/clock-r8a7779.c
+++ b/arch/arm/mach-shmobile/clock-r8a7779.c
@@ -87,6 +87,7 @@ static struct clk div4_clks[DIV4_NR] = {
};
enum { MSTP323, MSTP322, MSTP321, MSTP320,
+ MSTP101, MSTP100,
MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021,
MSTP016, MSTP015, MSTP014,
MSTP_NR };
@@ -96,6 +97,8 @@ static struct clk mstp_clks[MSTP_NR] = {
[MSTP322] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 22, 0), /* SDHI1 */
[MSTP321] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 21, 0), /* SDHI2 */
[MSTP320] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 20, 0), /* SDHI3 */
+ [MSTP101] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 1, 0), /* USB2 */
+ [MSTP100] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 0, 0), /* USB0/1 */
[MSTP026] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 26, 0), /* SCIF0 */
[MSTP025] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 25, 0), /* SCIF1 */
[MSTP024] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 24, 0), /* SCIF2 */
@@ -154,6 +157,8 @@ static struct clk_lookup lookups[] = {
CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP023]), /* SCIF3 */
CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP022]), /* SCIF4 */
CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP021]), /* SCIF6 */
+ CLKDEV_DEV_ID("ehci-platform.1", &mstp_clks[MSTP101]), /* USB EHCI port2 */
+ CLKDEV_DEV_ID("ehci-platform.0", &mstp_clks[MSTP100]), /* USB EHCI port0/1 */
CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP323]), /* SDHI0 */
CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */
CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */
--
1.7.10.2.484.gcd07cc5
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 07/11] ARM: shmobile: r8a7779: add USB OHCI clock support
2012-08-31 1:28 [GIT PULL v2] Renesas ARM-based SoC: Marzen and r8a7779 for 3.7 Simon Horman
` (5 preceding siblings ...)
2012-08-31 1:28 ` [PATCH 06/11] ARM: shmobile: r8a7779: add USB EHCI clock support Simon Horman
@ 2012-08-31 1:28 ` Simon Horman
2012-08-31 1:28 ` [PATCH 08/11] ARM: shmobile: marzen: add USB EHCI driver support Simon Horman
` (4 subsequent siblings)
11 siblings, 0 replies; 26+ messages in thread
From: Simon Horman @ 2012-08-31 1:28 UTC (permalink / raw)
To: linux-arm-kernel
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
ohci-platform driver require these clocks
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
arch/arm/mach-shmobile/clock-r8a7779.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c
index 1d8842b..7c62e3d 100644
--- a/arch/arm/mach-shmobile/clock-r8a7779.c
+++ b/arch/arm/mach-shmobile/clock-r8a7779.c
@@ -158,7 +158,9 @@ static struct clk_lookup lookups[] = {
CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP022]), /* SCIF4 */
CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP021]), /* SCIF6 */
CLKDEV_DEV_ID("ehci-platform.1", &mstp_clks[MSTP101]), /* USB EHCI port2 */
+ CLKDEV_DEV_ID("ohci-platform.1", &mstp_clks[MSTP101]), /* USB OHCI port2 */
CLKDEV_DEV_ID("ehci-platform.0", &mstp_clks[MSTP100]), /* USB EHCI port0/1 */
+ CLKDEV_DEV_ID("ohci-platform.0", &mstp_clks[MSTP100]), /* USB OHCI port0/1 */
CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP323]), /* SDHI0 */
CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */
CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */
--
1.7.10.2.484.gcd07cc5
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 08/11] ARM: shmobile: marzen: add USB EHCI driver support
2012-08-31 1:28 [GIT PULL v2] Renesas ARM-based SoC: Marzen and r8a7779 for 3.7 Simon Horman
` (6 preceding siblings ...)
2012-08-31 1:28 ` [PATCH 07/11] ARM: shmobile: r8a7779: add USB OHCI " Simon Horman
@ 2012-08-31 1:28 ` Simon Horman
2012-08-31 1:28 ` [PATCH 09/11] ARM: shmobile: marzen: fixup regulator id for smsc911x Simon Horman
` (3 subsequent siblings)
11 siblings, 0 replies; 26+ messages in thread
From: Simon Horman @ 2012-08-31 1:28 UTC (permalink / raw)
To: linux-arm-kernel
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
This patch supports CN21/CN22 USB 2.0 (port 0/1/2),
and enable USB momery on defconfig
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
arch/arm/configs/marzen_defconfig | 6 +++
arch/arm/mach-shmobile/Kconfig | 1 +
arch/arm/mach-shmobile/board-marzen.c | 88 +++++++++++++++++++++++++++++++++++
3 files changed, 95 insertions(+)
diff --git a/arch/arm/configs/marzen_defconfig b/arch/arm/configs/marzen_defconfig
index cd2dc21..61d1c55 100644
--- a/arch/arm/configs/marzen_defconfig
+++ b/arch/arm/configs/marzen_defconfig
@@ -47,6 +47,8 @@ CONFIG_DEVTMPFS_MOUNT=y
# CONFIG_STANDALONE is not set
# CONFIG_PREVENT_FIRMWARE_BUILD is not set
# CONFIG_FW_LOADER is not set
+CONFIG_SCSI=y
+CONFIG_BLK_DEV_SD=y
CONFIG_NETDEVICES=y
# CONFIG_NET_VENDOR_BROADCOM is not set
# CONFIG_NET_VENDOR_FARADAY is not set
@@ -75,6 +77,10 @@ CONFIG_SSB=y
# CONFIG_USB_SUPPORT is not set
CONFIG_MMC=y
CONFIG_MMC_SDHI=y
+CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_HCD_PLATFORM=y
+CONFIG_USB_STORAGE=y
CONFIG_UIO=y
CONFIG_UIO_PDRV_GENIRQ=y
# CONFIG_IOMMU_SUPPORT is not set
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 4cacc2d..8937d69 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -41,6 +41,7 @@ config ARCH_R8A7779
select SH_CLK_CPG
select ARM_GIC
select ARCH_WANT_OPTIONAL_GPIOLIB
+ select USB_ARCH_HAS_EHCI
config ARCH_EMEV2
bool "Emma Mobile EV2"
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c
index dec3ffc..0249c0e 100644
--- a/arch/arm/mach-shmobile/board-marzen.c
+++ b/arch/arm/mach-shmobile/board-marzen.c
@@ -32,6 +32,8 @@
#include <linux/smsc911x.h>
#include <linux/mmc/sh_mobile_sdhi.h>
#include <linux/mfd/tmio.h>
+#include <linux/usb/ehci_pdriver.h>
+#include <linux/pm_runtime.h>
#include <mach/hardware.h>
#include <mach/r8a7779.h>
#include <mach/common.h>
@@ -116,6 +118,80 @@ static struct platform_device *marzen_devices[] __initdata = {
&sdhi0_device,
};
+/* USB */
+static int xhci_power_on(struct platform_device *pdev)
+{
+ pm_runtime_enable(&pdev->dev);
+ pm_runtime_get_sync(&pdev->dev);
+
+ return 0;
+}
+
+static void xhci_power_off(struct platform_device *pdev)
+{
+ pm_runtime_put_sync(&pdev->dev);
+ pm_runtime_disable(&pdev->dev);
+}
+
+static struct usb_ehci_pdata ehcix_pdata = {
+ .power_on = xhci_power_on,
+ .power_off = xhci_power_off,
+ .power_suspend = xhci_power_off,
+};
+
+static struct resource ehci0_resources[] = {
+ [0] = {
+ .start = 0xffe70000,
+ .end = 0xffe70400 - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = gic_spi(44),
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device ehci0_device = {
+ .name = "ehci-platform",
+ .id = 0,
+ .dev = {
+ .dma_mask = &ehci0_device.dev.coherent_dma_mask,
+ .coherent_dma_mask = 0xffffffff,
+ .platform_data = &ehcix_pdata,
+ },
+ .num_resources = ARRAY_SIZE(ehci0_resources),
+ .resource = ehci0_resources,
+};
+
+static struct resource ehci1_resources[] = {
+ [0] = {
+ .start = 0xfff70000,
+ .end = 0xfff70400 - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = gic_spi(45),
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device ehci1_device = {
+ .name = "ehci-platform",
+ .id = 1,
+ .dev = {
+ .dma_mask = &ehci1_device.dev.coherent_dma_mask,
+ .coherent_dma_mask = 0xffffffff,
+ .platform_data = &ehcix_pdata,
+ },
+ .num_resources = ARRAY_SIZE(ehci1_resources),
+ .resource = ehci1_resources,
+};
+
+static struct platform_device *marzen_usb_devices[] __initdata = {
+ &ehci0_device,
+ &ehci1_device,
+};
+
static void __init marzen_init(void)
{
regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers,
@@ -147,8 +223,20 @@ static void __init marzen_init(void)
gpio_request(GPIO_FN_SD0_CD, NULL);
gpio_request(GPIO_FN_SD0_WP, NULL);
+ /* USB (CN21) */
+ gpio_request(GPIO_FN_USB_OVC0, NULL);
+ gpio_request(GPIO_FN_USB_OVC1, NULL);
+ gpio_request(GPIO_FN_USB_OVC2, NULL);
+
+ /* USB (CN22) */
+ gpio_request(GPIO_FN_USB_PENC2, NULL);
+
r8a7779_add_standard_devices();
platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices));
+
+ if (0 == r8a7779_usb_phy_init(0))
+ platform_add_devices(marzen_usb_devices,
+ ARRAY_SIZE(marzen_usb_devices));
}
MACHINE_START(MARZEN, "marzen")
--
1.7.10.2.484.gcd07cc5
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 09/11] ARM: shmobile: marzen: fixup regulator id for smsc911x
2012-08-31 1:28 [GIT PULL v2] Renesas ARM-based SoC: Marzen and r8a7779 for 3.7 Simon Horman
` (7 preceding siblings ...)
2012-08-31 1:28 ` [PATCH 08/11] ARM: shmobile: marzen: add USB EHCI driver support Simon Horman
@ 2012-08-31 1:28 ` Simon Horman
2012-08-31 1:28 ` [PATCH 10/11] ARM: shmobile: marzen: enable thermal sensor Simon Horman
` (2 subsequent siblings)
11 siblings, 0 replies; 26+ messages in thread
From: Simon Horman @ 2012-08-31 1:28 UTC (permalink / raw)
To: linux-arm-kernel
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
regulator id = 0 is used for sh_mobile_sdhi.
smsc911x's regulator can use id = 1
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
arch/arm/mach-shmobile/board-marzen.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c
index 0249c0e..91e81e9 100644
--- a/arch/arm/mach-shmobile/board-marzen.c
+++ b/arch/arm/mach-shmobile/board-marzen.c
@@ -196,7 +196,7 @@ static void __init marzen_init(void)
{
regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers,
ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
- regulator_register_fixed(0, dummy_supplies,
+ regulator_register_fixed(1, dummy_supplies,
ARRAY_SIZE(dummy_supplies));
r8a7779_pinmux_init();
--
1.7.10.2.484.gcd07cc5
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 10/11] ARM: shmobile: marzen: enable thermal sensor
2012-08-31 1:28 [GIT PULL v2] Renesas ARM-based SoC: Marzen and r8a7779 for 3.7 Simon Horman
` (8 preceding siblings ...)
2012-08-31 1:28 ` [PATCH 09/11] ARM: shmobile: marzen: fixup regulator id for smsc911x Simon Horman
@ 2012-08-31 1:28 ` Simon Horman
2012-08-31 1:28 ` [PATCH 11/11] ARM: shmobile: marzen: add USB OHCI driver support Simon Horman
2012-08-31 6:24 ` [GIT PULL v2] Renesas ARM-based SoC: Marzen and r8a7779 for 3.7 Simon Horman
11 siblings, 0 replies; 26+ messages in thread
From: Simon Horman @ 2012-08-31 1:28 UTC (permalink / raw)
To: linux-arm-kernel
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Marzen board can measure its thermal by this patch.
cat /sys/class/thermal/thermal_zoneX/temp
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
arch/arm/configs/marzen_defconfig | 2 ++
arch/arm/mach-shmobile/board-marzen.c | 16 ++++++++++++++++
2 files changed, 18 insertions(+)
diff --git a/arch/arm/configs/marzen_defconfig b/arch/arm/configs/marzen_defconfig
index 61d1c55..c30ea5e 100644
--- a/arch/arm/configs/marzen_defconfig
+++ b/arch/arm/configs/marzen_defconfig
@@ -73,6 +73,8 @@ CONFIG_SERIAL_SH_SCI_CONSOLE=y
# CONFIG_HW_RANDOM is not set
CONFIG_GPIO_SYSFS=y
# CONFIG_HWMON is not set
+CONFIG_THERMAL=y
+CONFIG_RCAR_THERMAL=y
CONFIG_SSB=y
# CONFIG_USB_SUPPORT is not set
CONFIG_MMC=y
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c
index 91e81e9..eb0a05a 100644
--- a/arch/arm/mach-shmobile/board-marzen.c
+++ b/arch/arm/mach-shmobile/board-marzen.c
@@ -113,9 +113,25 @@ static struct platform_device sdhi0_device = {
}
};
+/* Thermal */
+static struct resource thermal_resources[] = {
+ [0] = {
+ .start = 0xFFC48000,
+ .end = 0xFFC48038 - 1,
+ .flags = IORESOURCE_MEM,
+ },
+};
+
+static struct platform_device thermal_device = {
+ .name = "rcar_thermal",
+ .resource = thermal_resources,
+ .num_resources = ARRAY_SIZE(thermal_resources),
+};
+
static struct platform_device *marzen_devices[] __initdata = {
ð_device,
&sdhi0_device,
+ &thermal_device,
};
/* USB */
--
1.7.10.2.484.gcd07cc5
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 11/11] ARM: shmobile: marzen: add USB OHCI driver support
2012-08-31 1:28 [GIT PULL v2] Renesas ARM-based SoC: Marzen and r8a7779 for 3.7 Simon Horman
` (9 preceding siblings ...)
2012-08-31 1:28 ` [PATCH 10/11] ARM: shmobile: marzen: enable thermal sensor Simon Horman
@ 2012-08-31 1:28 ` Simon Horman
2012-08-31 6:24 ` [GIT PULL v2] Renesas ARM-based SoC: Marzen and r8a7779 for 3.7 Simon Horman
11 siblings, 0 replies; 26+ messages in thread
From: Simon Horman @ 2012-08-31 1:28 UTC (permalink / raw)
To: linux-arm-kernel
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
This patch supports CN21/CN22 USB 1.x (port 0/1/2),
and enable input event on defconfig
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
arch/arm/configs/marzen_defconfig | 5 +--
arch/arm/mach-shmobile/Kconfig | 1 +
arch/arm/mach-shmobile/board-marzen.c | 57 +++++++++++++++++++++++++++++++++++
3 files changed, 61 insertions(+), 2 deletions(-)
diff --git a/arch/arm/configs/marzen_defconfig b/arch/arm/configs/marzen_defconfig
index c30ea5e..30f2714 100644
--- a/arch/arm/configs/marzen_defconfig
+++ b/arch/arm/configs/marzen_defconfig
@@ -61,9 +61,8 @@ CONFIG_SMSC911X=y
# CONFIG_NET_VENDOR_STMICRO is not set
# CONFIG_WLAN is not set
# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_KEYBOARD is not set
+CONFIG_INPUT_EVDEV=y
# CONFIG_INPUT_MOUSE is not set
-# CONFIG_SERIO is not set
# CONFIG_VT is not set
# CONFIG_LEGACY_PTYS is not set
# CONFIG_DEVKMEM is not set
@@ -81,6 +80,8 @@ CONFIG_MMC=y
CONFIG_MMC_SDHI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_HCD_PLATFORM=y
CONFIG_USB_EHCI_HCD_PLATFORM=y
CONFIG_USB_STORAGE=y
CONFIG_UIO=y
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 8937d69..66befbc 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -42,6 +42,7 @@ config ARCH_R8A7779
select ARM_GIC
select ARCH_WANT_OPTIONAL_GPIOLIB
select USB_ARCH_HAS_EHCI
+ select USB_ARCH_HAS_OHCI
config ARCH_EMEV2
bool "Emma Mobile EV2"
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c
index eb0a05a..30c794b 100644
--- a/arch/arm/mach-shmobile/board-marzen.c
+++ b/arch/arm/mach-shmobile/board-marzen.c
@@ -33,6 +33,7 @@
#include <linux/mmc/sh_mobile_sdhi.h>
#include <linux/mfd/tmio.h>
#include <linux/usb/ehci_pdriver.h>
+#include <linux/usb/ohci_pdriver.h>
#include <linux/pm_runtime.h>
#include <mach/hardware.h>
#include <mach/r8a7779.h>
@@ -203,9 +204,65 @@ static struct platform_device ehci1_device = {
.resource = ehci1_resources,
};
+static struct usb_ohci_pdata ohcix_pdata = {
+ .power_on = xhci_power_on,
+ .power_off = xhci_power_off,
+ .power_suspend = xhci_power_off,
+};
+
+static struct resource ohci0_resources[] = {
+ [0] = {
+ .start = 0xffe70400,
+ .end = 0xffe70800 - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = gic_spi(44),
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device ohci0_device = {
+ .name = "ohci-platform",
+ .id = 0,
+ .dev = {
+ .dma_mask = &ohci0_device.dev.coherent_dma_mask,
+ .coherent_dma_mask = 0xffffffff,
+ .platform_data = &ohcix_pdata,
+ },
+ .num_resources = ARRAY_SIZE(ohci0_resources),
+ .resource = ohci0_resources,
+};
+
+static struct resource ohci1_resources[] = {
+ [0] = {
+ .start = 0xfff70400,
+ .end = 0xfff70800 - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = gic_spi(45),
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device ohci1_device = {
+ .name = "ohci-platform",
+ .id = 1,
+ .dev = {
+ .dma_mask = &ohci1_device.dev.coherent_dma_mask,
+ .coherent_dma_mask = 0xffffffff,
+ .platform_data = &ohcix_pdata,
+ },
+ .num_resources = ARRAY_SIZE(ohci1_resources),
+ .resource = ohci1_resources,
+};
+
static struct platform_device *marzen_usb_devices[] __initdata = {
&ehci0_device,
&ehci1_device,
+ &ohci0_device,
+ &ohci1_device,
};
static void __init marzen_init(void)
--
1.7.10.2.484.gcd07cc5
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [GIT PULL v2] Renesas ARM-based SoC: Marzen and r8a7779 for 3.7
2012-08-31 1:28 [GIT PULL v2] Renesas ARM-based SoC: Marzen and r8a7779 for 3.7 Simon Horman
` (10 preceding siblings ...)
2012-08-31 1:28 ` [PATCH 11/11] ARM: shmobile: marzen: add USB OHCI driver support Simon Horman
@ 2012-08-31 6:24 ` Simon Horman
11 siblings, 0 replies; 26+ messages in thread
From: Simon Horman @ 2012-08-31 6:24 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Aug 31, 2012 at 10:28:11AM +0900, Simon Horman wrote:
> Hi Olof, Hi Arnd,
>
> please consider the following enhancements to the Marzen board
> and r8a7779 SoC by Phil Edworthy, Morimoto-san and myself for 3.7.
>
> * This pull requests superceedes the previous request,
> "[GIT PULL v2] Renesas ARM-based SoC: Marzen and r8a7779 for 3.7"
The line above should be:
"[GIT PULL] Renesas ARM-based SoC: Marzen and r8a7779 for 3.7"
> which I made earlier today. The difference to that request is that
> I have pushed one more patch. There was no rebase.
>
> * This pull request is based on the usb-next branch of Greg KH's USB tree,
> git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git,
> which is based on v3.6-rc3.
>
> This is to satisfy compile-time dependencies.
> Please let me know if you would like this handled a different way.
>
> ----------------------------------------------------------------
> The following changes since commit a7bdf7fa33127bf08eb0810698bca607a9462df4:
>
> Merge v3.6-rc3 into usb-next (2012-08-27 07:15:30 -0700)
>
> are available in the git repository at:
>
>
> git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git marzen
>
> for you to fetch changes up to 3553395437f2ac42a73255a0ffac09efc9acf5c4:
>
> ARM: shmobile: marzen: add USB OHCI driver support (2012-08-31 09:41:44 +0900)
>
> ----------------------------------------------------------------
> Kuninori Morimoto (8):
> ARM: shmobile: r8a7779: PFC rename PENCx -> USB_PENCx
> ARM: shmobile: r8a7779: add USB common phy initializer
> ARM: shmobile: r8a7779: add USB EHCI clock support
> ARM: shmobile: r8a7779: add USB OHCI clock support
> ARM: shmobile: marzen: add USB EHCI driver support
> ARM: shmobile: marzen: fixup regulator id for smsc911x
> ARM: shmobile: marzen: enable thermal sensor
> ARM: shmobile: marzen: add USB OHCI driver support
>
> Phil Edworthy (2):
> r8a7779: add SDHI clock support
> marzen: add SDHI0 support
>
> Simon Horman (1):
> ARM: mach-shmobile: marzen: defconfig update
>
> arch/arm/configs/marzen_defconfig | 30 ++--
> arch/arm/mach-shmobile/Kconfig | 2 +
> arch/arm/mach-shmobile/board-marzen.c | 213 +++++++++++++++++++++++++-
> arch/arm/mach-shmobile/clock-r8a7779.c | 18 ++-
> arch/arm/mach-shmobile/include/mach/common.h | 1 +
> arch/arm/mach-shmobile/include/mach/r8a7779.h | 2 +-
> arch/arm/mach-shmobile/pfc-r8a7779.c | 16 +-
> arch/arm/mach-shmobile/setup-r8a7779.c | 93 +++++++++++
> 8 files changed, 355 insertions(+), 20 deletions(-)
>
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 05/11] ARM: shmobile: r8a7779: add USB common phy initializer
2012-08-31 1:28 ` [PATCH 05/11] ARM: shmobile: r8a7779: add USB common phy initializer Simon Horman
@ 2012-09-03 21:38 ` Arnd Bergmann
2012-09-04 0:21 ` Kuninori Morimoto
0 siblings, 1 reply; 26+ messages in thread
From: Arnd Bergmann @ 2012-09-03 21:38 UTC (permalink / raw)
To: linux-arm-kernel
On Friday 31 August 2012, Simon Horman wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> This patch adds common USB phy ports initializer for r8a7779.
>
> The note is that each USB IP have own MSTP clock bit,
> and common USB phy port doesn't have MSTP clock,
> but this USB phy needs USB clock.
> Each USB driver / platform should keep USB MSTP clock somehow.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Signed-off-by: Simon Horman <horms@verge.net.au>
> ---
> arch/arm/mach-shmobile/include/mach/common.h | 1 +
> arch/arm/mach-shmobile/setup-r8a7779.c | 93 ++++++++++++++++++++++++++++
> 2 files changed, 94 insertions(+)
Shouldn't the USB PHY driver go to drivers/usb/phy/ or
drivers/usb/host/ehci-sh.c?
We are trying hard to move driver code out of the platform and into driver
directories these days, and having it wired up as part of the platform
the way you do also means it is always powered on.
On Friday 31 August 2012, Simon Horman wrote:
> +#ifdef CONFIG_ARCH_SUPPORTS_BIG_ENDIAN
> +# define xHCI_ENDIAN "BIG"
> +# define xHCI_NO_SWAP 0x00000003
> +#else
> +# define xHCI_ENDIAN "LITTLE"
> +# define xHCI_NO_SWAP 0x00000000
> +#endif
> +
> +/*
> + * USB initial/install operation.
> + *
> + * This function setup USB phy.
> + * The used value and setting order came from
> + * [USB :: Initial setting] on datasheet.
> + */
> +int __init r8a7779_usb_phy_init(u32 usbpctrl0)
> +{
> + void __iomem *reg0, *reg1;
> + int i;
> + u32 val;
> +
> + reg0 = ioremap_nocache(0xffe70000, 0x900);
> + reg1 = ioremap_nocache(0xfff70000, 0x900);
> +
I see neither big-endian support on shmobile, nor any XHCI (USB-3.0) driver, just
the old EHCI (USB-2.0) and OHCI (USB-1.1) drivers. Are you submitting the XHCI
support and big-endian platform code separately?
Arnd
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 05/11] ARM: shmobile: r8a7779: add USB common phy initializer
2012-09-03 21:38 ` Arnd Bergmann
@ 2012-09-04 0:21 ` Kuninori Morimoto
2012-09-04 0:34 ` Simon Horman
0 siblings, 1 reply; 26+ messages in thread
From: Kuninori Morimoto @ 2012-09-04 0:21 UTC (permalink / raw)
To: linux-arm-kernel
Hi Arnd, Simon
> > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> >
> > This patch adds common USB phy ports initializer for r8a7779.
> >
> > The note is that each USB IP have own MSTP clock bit,
> > and common USB phy port doesn't have MSTP clock,
> > but this USB phy needs USB clock.
> > Each USB driver / platform should keep USB MSTP clock somehow.
> >
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > Signed-off-by: Simon Horman <horms@verge.net.au>
> > ---
> > arch/arm/mach-shmobile/include/mach/common.h | 1 +
> > arch/arm/mach-shmobile/setup-r8a7779.c | 93 ++++++++++++++++++++++++++++
> > 2 files changed, 94 insertions(+)
>
> Shouldn't the USB PHY driver go to drivers/usb/phy/ or
> drivers/usb/host/ehci-sh.c?
>
> We are trying hard to move driver code out of the platform and into driver
> directories these days, and having it wired up as part of the platform
> the way you do also means it is always powered on.
I see.
I can move this code to under driver.
Can I send additional patch for it ?
- move usb phy code to driver (to Simon, USB ML)
Or should I send multi patches ?
- remove this patch (to Simon)
- add usb phy driver patch (to USB ML)
- use usb phy driver patch (to Simon)
> I see neither big-endian support on shmobile, nor any XHCI (USB-3.0) driver, just
> the old EHCI (USB-2.0) and OHCI (USB-1.1) drivers. Are you submitting the XHCI
> support and big-endian platform code separately?
Sorry for very confusing naming.
I fix it
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 05/11] ARM: shmobile: r8a7779: add USB common phy initializer
2012-09-04 0:21 ` Kuninori Morimoto
@ 2012-09-04 0:34 ` Simon Horman
2012-09-04 4:50 ` [PATCH] ARM: shmobile: r8a7779: remove USB " Kuninori Morimoto
0 siblings, 1 reply; 26+ messages in thread
From: Simon Horman @ 2012-09-04 0:34 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Sep 03, 2012 at 05:21:22PM -0700, Kuninori Morimoto wrote:
>
> Hi Arnd, Simon
>
> > > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > >
> > > This patch adds common USB phy ports initializer for r8a7779.
> > >
> > > The note is that each USB IP have own MSTP clock bit,
> > > and common USB phy port doesn't have MSTP clock,
> > > but this USB phy needs USB clock.
> > > Each USB driver / platform should keep USB MSTP clock somehow.
> > >
> > > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > > Signed-off-by: Simon Horman <horms@verge.net.au>
> > > ---
> > > arch/arm/mach-shmobile/include/mach/common.h | 1 +
> > > arch/arm/mach-shmobile/setup-r8a7779.c | 93 ++++++++++++++++++++++++++++
> > > 2 files changed, 94 insertions(+)
> >
> > Shouldn't the USB PHY driver go to drivers/usb/phy/ or
> > drivers/usb/host/ehci-sh.c?
> >
> > We are trying hard to move driver code out of the platform and into driver
> > directories these days, and having it wired up as part of the platform
> > the way you do also means it is always powered on.
>
> I see.
> I can move this code to under driver.
> Can I send additional patch for it ?
> - move usb phy code to driver (to Simon, USB ML)
>
> Or should I send multi patches ?
> - remove this patch (to Simon)
> - add usb phy driver patch (to USB ML)
> - use usb phy driver patch (to Simon)
I think that the best approach would be for
a) me to remove the patches in question from your tree
b) you to send fresh patches, perhaps the USB ones need
to go through another tree (= other than my renesas tree)
c) I will send a fresh pull request.
I am guessing this may take a little time. If so, as the end of opportunity
to get fresh code into 3.7 is approaching I may post an intermediate pull
request that omits the USB changes.
> > I see neither big-endian support on shmobile, nor any XHCI (USB-3.0) driver, just
> > the old EHCI (USB-2.0) and OHCI (USB-1.1) drivers. Are you submitting the XHCI
> > support and big-endian platform code separately?
>
> Sorry for very confusing naming.
> I fix it
>
> Best regards
> ---
> Kuninori Morimoto
>
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH] ARM: shmobile: r8a7779: remove USB phy initializer
2012-09-04 0:34 ` Simon Horman
@ 2012-09-04 4:50 ` Kuninori Morimoto
2012-09-05 1:20 ` Simon Horman
0 siblings, 1 reply; 26+ messages in thread
From: Kuninori Morimoto @ 2012-09-04 4:50 UTC (permalink / raw)
To: linux-arm-kernel
f9929ab55cf967791c65a3b58696d77e26d19a6f
(ARM: shmobile: r8a7779: add USB common phy initializer)
added r8a7779 USB phy initializer,
but ARM kernel is trying hard to move driver code out of the platform
and into driver directories.
This patch remove USB phy initializer code from platform.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
Simon
This patch remove current USB phy initializer code from platform.
And I sent USB phy driver support patch to USB ML today.
If this driver was accepted, then, I will send a patch to use it.
arch/arm/mach-shmobile/board-marzen.c | 5 +-
arch/arm/mach-shmobile/include/mach/common.h | 1 -
arch/arm/mach-shmobile/setup-r8a7779.c | 92 --------------------------
3 files changed, 2 insertions(+), 96 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c
index 30c794b..ae859d2 100644
--- a/arch/arm/mach-shmobile/board-marzen.c
+++ b/arch/arm/mach-shmobile/board-marzen.c
@@ -307,9 +307,8 @@ static void __init marzen_init(void)
r8a7779_add_standard_devices();
platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices));
- if (0 == r8a7779_usb_phy_init(0))
- platform_add_devices(marzen_usb_devices,
- ARRAY_SIZE(marzen_usb_devices));
+ platform_add_devices(marzen_usb_devices,
+ ARRAY_SIZE(marzen_usb_devices));
}
MACHINE_START(MARZEN, "marzen")
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
index 00b2eb5..45e61da 100644
--- a/arch/arm/mach-shmobile/include/mach/common.h
+++ b/arch/arm/mach-shmobile/include/mach/common.h
@@ -78,7 +78,6 @@ extern void r8a7779_clock_init(void);
extern void r8a7779_pinmux_init(void);
extern void r8a7779_pm_init(void);
extern void r8a7740_meram_workaround(void);
-extern int r8a7779_usb_phy_init(u32 usbpctrl0);
extern unsigned int r8a7779_get_core_count(void);
extern int r8a7779_platform_cpu_kill(unsigned int cpu);
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
index 17fdd1f..af84cb4 100644
--- a/arch/arm/mach-shmobile/setup-r8a7779.c
+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
@@ -244,98 +244,6 @@ static struct platform_device *r8a7779_early_devices[] __initdata = {
static struct platform_device *r8a7779_late_devices[] __initdata = {
};
-/* USBH common register */
-#define USBPCTRL0 0x0800
-#define USBPCTRL1 0x0804
-#define USBST 0x0808
-#define USBEH0 0x080C
-#define USBOH0 0x081C
-#define USBCTL0 0x0858
-#define EIIBC1 0x0094
-#define EIIBC2 0x009C
-
-#ifdef CONFIG_ARCH_SUPPORTS_BIG_ENDIAN
-# define xHCI_ENDIAN "BIG"
-# define xHCI_NO_SWAP 0x00000003
-#else
-# define xHCI_ENDIAN "LITTLE"
-# define xHCI_NO_SWAP 0x00000000
-#endif
-
-/*
- * USB initial/install operation.
- *
- * This function setup USB phy.
- * The used value and setting order came from
- * [USB :: Initial setting] on datasheet.
- */
-int __init r8a7779_usb_phy_init(u32 usbpctrl0)
-{
- void __iomem *reg0, *reg1;
- int i;
- u32 val;
-
- reg0 = ioremap_nocache(0xffe70000, 0x900);
- reg1 = ioremap_nocache(0xfff70000, 0x900);
-
- /*----------------------------------------*
- * USB phy start-up
- *----------------------------------------*/
-
- /* (1) USB-PHY standby release */
- iowrite32(0x00000001, (reg0 + USBPCTRL1));
-
- /* (2) start USB-PHY internal PLL */
- iowrite32(0x00000003, (reg0 + USBPCTRL1));
-
- /* (3) USB module status check */
- for (i = 0; i < 1024; i++) {
- udelay(10);
- val = ioread32(reg0 + USBST);
- if (0xc0000000 == val)
- goto usb_module_is_working;
- }
- pr_err("USB module not ready\n");
- return -EIO;
-
-usb_module_is_working:
- /* (4) USB-PHY reset clear */
- iowrite32(0x00000007, (reg0 + USBPCTRL1));
-
- /* set platform specific port settings */
- iowrite32(usbpctrl0, (reg0 + USBPCTRL0));
-
- /*----------------------------------------*
- * EHCI IP Internal Buffer Setting
- *----------------------------------------*/
-
- /* (1) EHCI IP internal buffer setting */
- iowrite32(0x00ff0040, (reg0 + EIIBC1));
- iowrite32(0x00ff0040, (reg1 + EIIBC1));
-
- /* (2) EHCI IP internal buffer enable */
- iowrite32(0x00000001, (reg0 + EIIBC2));
- iowrite32(0x00000001, (reg1 + EIIBC2));
-
- /*----------------------------------------*
- * Bus alignment settings
- *----------------------------------------*/
-
- /* (1) EHCI bus alignment */
- iowrite32(xHCI_NO_SWAP, (reg0 + USBEH0));
-
- /* (1) OHCI bus alignment */
- iowrite32(xHCI_NO_SWAP, (reg0 + USBOH0));
-
- pr_info("USB xHCI alignment was initialized as %s endian no swap\n",
- xHCI_ENDIAN);
-
- iounmap(reg0);
- iounmap(reg1);
-
- return 0;
-}
-
void __init r8a7779_add_standard_devices(void)
{
#ifdef CONFIG_CACHE_L2X0
--
1.7.9.5
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH] ARM: shmobile: r8a7779: remove USB phy initializer
2012-09-04 4:50 ` [PATCH] ARM: shmobile: r8a7779: remove USB " Kuninori Morimoto
@ 2012-09-05 1:20 ` Simon Horman
2012-09-05 1:23 ` Simon Horman
0 siblings, 1 reply; 26+ messages in thread
From: Simon Horman @ 2012-09-05 1:20 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Sep 03, 2012 at 09:50:03PM -0700, Kuninori Morimoto wrote:
> f9929ab55cf967791c65a3b58696d77e26d19a6f
> (ARM: shmobile: r8a7779: add USB common phy initializer)
> added r8a7779 USB phy initializer,
> but ARM kernel is trying hard to move driver code out of the platform
> and into driver directories.
> This patch remove USB phy initializer code from platform.
Hi Morimoto-san,
my preferred approach is to drop the following patches from the marzen
branch and get the remaining changes merged (hopefully). Then look at
USB once again.
f58f278 ARM: shmobile: marzen: add USB EHCI driver support
4150c1d ARM: shmobile: r8a7779: add USB OHCI clock support
535b372c ARM: shmobile: r8a7779: add USB EHCI clock support
f9929ab ARM: shmobile: r8a7779: add USB common phy initializer
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH] ARM: shmobile: r8a7779: remove USB phy initializer
2012-09-05 1:20 ` Simon Horman
@ 2012-09-05 1:23 ` Simon Horman
2012-09-05 2:00 ` Kuninori Morimoto
0 siblings, 1 reply; 26+ messages in thread
From: Simon Horman @ 2012-09-05 1:23 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Sep 05, 2012 at 10:20:57AM +0900, Simon Horman wrote:
> On Mon, Sep 03, 2012 at 09:50:03PM -0700, Kuninori Morimoto wrote:
> > f9929ab55cf967791c65a3b58696d77e26d19a6f
> > (ARM: shmobile: r8a7779: add USB common phy initializer)
> > added r8a7779 USB phy initializer,
> > but ARM kernel is trying hard to move driver code out of the platform
> > and into driver directories.
> > This patch remove USB phy initializer code from platform.
>
> Hi Morimoto-san,
>
> my preferred approach is to drop the following patches from the marzen
> branch and get the remaining changes merged (hopefully). Then look at
> USB once again.
>
> f58f278 ARM: shmobile: marzen: add USB EHCI driver support
> 4150c1d ARM: shmobile: r8a7779: add USB OHCI clock support
> 535b372c ARM: shmobile: r8a7779: add USB EHCI clock support
> f9929ab ARM: shmobile: r8a7779: add USB common phy initializer
and
3553395 ARM: shmobile: marzen: add USB OHCI driver support
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH] ARM: shmobile: r8a7779: remove USB phy initializer
2012-09-05 1:23 ` Simon Horman
@ 2012-09-05 2:00 ` Kuninori Morimoto
2012-09-05 8:13 ` Simon Horman
0 siblings, 1 reply; 26+ messages in thread
From: Kuninori Morimoto @ 2012-09-05 2:00 UTC (permalink / raw)
To: linux-arm-kernel
Hi Simon
> > my preferred approach is to drop the following patches from the marzen
> > branch and get the remaining changes merged (hopefully). Then look at
> > USB once again.
> >
> > f58f278 ARM: shmobile: marzen: add USB EHCI driver support
> > 4150c1d ARM: shmobile: r8a7779: add USB OHCI clock support
> > 535b372c ARM: shmobile: r8a7779: add USB EHCI clock support
> > f9929ab ARM: shmobile: r8a7779: add USB common phy initializer
>
> and
>
> 3553395 ARM: shmobile: marzen: add USB OHCI driver support
Thank you for your help
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH] ARM: shmobile: r8a7779: remove USB phy initializer
2012-09-05 2:00 ` Kuninori Morimoto
@ 2012-09-05 8:13 ` Simon Horman
2012-09-12 5:16 ` Simon Horman
0 siblings, 1 reply; 26+ messages in thread
From: Simon Horman @ 2012-09-05 8:13 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Sep 05, 2012 at 11:00:22AM +0900, Kuninori Morimoto wrote:
>
> Hi Simon
>
> > > my preferred approach is to drop the following patches from the marzen
> > > branch and get the remaining changes merged (hopefully). Then look at
> > > USB once again.
> > >
> > > f58f278 ARM: shmobile: marzen: add USB EHCI driver support
> > > 4150c1d ARM: shmobile: r8a7779: add USB OHCI clock support
> > > 535b372c ARM: shmobile: r8a7779: add USB EHCI clock support
> > > f9929ab ARM: shmobile: r8a7779: add USB common phy initializer
> >
> > and
> >
> > 3553395 ARM: shmobile: marzen: add USB OHCI driver support
>
> Thank you for your help
Thanks, I have pushed a rebased marzen tree accordingly.
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH] ARM: shmobile: r8a7779: remove USB phy initializer
2012-09-05 8:13 ` Simon Horman
@ 2012-09-12 5:16 ` Simon Horman
2012-09-12 5:31 ` Kuninori Morimoto
0 siblings, 1 reply; 26+ messages in thread
From: Simon Horman @ 2012-09-12 5:16 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Sep 05, 2012 at 05:13:20PM +0900, Simon Horman wrote:
> On Wed, Sep 05, 2012 at 11:00:22AM +0900, Kuninori Morimoto wrote:
> >
> > Hi Simon
> >
> > > > my preferred approach is to drop the following patches from the marzen
> > > > branch and get the remaining changes merged (hopefully). Then look at
> > > > USB once again.
> > > >
> > > > f58f278 ARM: shmobile: marzen: add USB EHCI driver support
> > > > 4150c1d ARM: shmobile: r8a7779: add USB OHCI clock support
> > > > 535b372c ARM: shmobile: r8a7779: add USB EHCI clock support
> > > > f9929ab ARM: shmobile: r8a7779: add USB common phy initializer
> > >
> > > and
> > >
> > > 3553395 ARM: shmobile: marzen: add USB OHCI driver support
> >
> > Thank you for your help
>
> Thanks, I have pushed a rebased marzen tree accordingly.
Hi Morimoto-san,
I realise you are busy at the moment, but when you get a chance
could you let me know what the status of the above changes is?
I believe that I am waiting for fresh "use usb phy driver" patches.
But perhaps these depend on "add usb phy driver" patches being
accepted into the USB tree first?
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH] ARM: shmobile: r8a7779: remove USB phy initializer
2012-09-12 5:16 ` Simon Horman
@ 2012-09-12 5:31 ` Kuninori Morimoto
2012-09-12 6:30 ` Felipe Balbi
0 siblings, 1 reply; 26+ messages in thread
From: Kuninori Morimoto @ 2012-09-12 5:31 UTC (permalink / raw)
To: linux-arm-kernel
Hi Simon, Felipe
Thank you for your reply
> I realise you are busy at the moment, but when you get a chance
> could you let me know what the status of the above changes is?
>
> I believe that I am waiting for fresh "use usb phy driver" patches.
> But perhaps these depend on "add usb phy driver" patches being
> accepted into the USB tree first?
Yes.
I sent "usb: phy: add R-Car USB phy driver" patch to USB ML few days ago.
>> Felipe
Please let us know current status of this patch ?
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH] ARM: shmobile: r8a7779: remove USB phy initializer
2012-09-12 5:31 ` Kuninori Morimoto
@ 2012-09-12 6:30 ` Felipe Balbi
2012-09-12 7:16 ` Kuninori Morimoto
0 siblings, 1 reply; 26+ messages in thread
From: Felipe Balbi @ 2012-09-12 6:30 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Tue, Sep 11, 2012 at 10:31:28PM -0700, Kuninori Morimoto wrote:
>
> Hi Simon, Felipe
>
> Thank you for your reply
>
> > I realise you are busy at the moment, but when you get a chance
> > could you let me know what the status of the above changes is?
> >
> > I believe that I am waiting for fresh "use usb phy driver" patches.
> > But perhaps these depend on "add usb phy driver" patches being
> > accepted into the USB tree first?
>
> Yes.
> I sent "usb: phy: add R-Car USB phy driver" patch to USB ML few days ago.
>
> >> Felipe
>
> Please let us know current status of this patch ?
It will have to wait for v3.8... there wasn't enough time for me to pick
that up, sorry.
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120912/30d8ab2a/attachment.sig>
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH] ARM: shmobile: r8a7779: remove USB phy initializer
2012-09-12 6:30 ` Felipe Balbi
@ 2012-09-12 7:16 ` Kuninori Morimoto
2012-09-12 7:19 ` Simon Horman
0 siblings, 1 reply; 26+ messages in thread
From: Kuninori Morimoto @ 2012-09-12 7:16 UTC (permalink / raw)
To: linux-arm-kernel
Hi Simon, Felipe
> > >> Felipe
> >
> > Please let us know current status of this patch ?
>
> It will have to wait for v3.8... there wasn't enough time for me to pick
> that up, sorry.
OK. no worry
>> Simon
Marzen board USB depends on this phy driver.
So, let's aim to v3.8.
Is is OK ?
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH] ARM: shmobile: r8a7779: remove USB phy initializer
2012-09-12 7:16 ` Kuninori Morimoto
@ 2012-09-12 7:19 ` Simon Horman
0 siblings, 0 replies; 26+ messages in thread
From: Simon Horman @ 2012-09-12 7:19 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Sep 12, 2012 at 12:16:00AM -0700, Kuninori Morimoto wrote:
>
> Hi Simon, Felipe
>
> > > >> Felipe
> > >
> > > Please let us know current status of this patch ?
> >
> > It will have to wait for v3.8... there wasn't enough time for me to pick
> > that up, sorry.
>
> OK. no worry
>
> >> Simon
>
> Marzen board USB depends on this phy driver.
> So, let's aim to v3.8.
> Is is OK ?
Its ok by me.
^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2012-09-12 7:19 UTC | newest]
Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-31 1:28 [GIT PULL v2] Renesas ARM-based SoC: Marzen and r8a7779 for 3.7 Simon Horman
2012-08-31 1:28 ` [PATCH 01/11] r8a7779: add SDHI clock support Simon Horman
2012-08-31 1:28 ` [PATCH 02/11] marzen: add SDHI0 support Simon Horman
2012-08-31 1:28 ` [PATCH 03/11] ARM: mach-shmobile: marzen: defconfig update Simon Horman
2012-08-31 1:28 ` [PATCH 04/11] ARM: shmobile: r8a7779: PFC rename PENCx -> USB_PENCx Simon Horman
2012-08-31 1:28 ` [PATCH 05/11] ARM: shmobile: r8a7779: add USB common phy initializer Simon Horman
2012-09-03 21:38 ` Arnd Bergmann
2012-09-04 0:21 ` Kuninori Morimoto
2012-09-04 0:34 ` Simon Horman
2012-09-04 4:50 ` [PATCH] ARM: shmobile: r8a7779: remove USB " Kuninori Morimoto
2012-09-05 1:20 ` Simon Horman
2012-09-05 1:23 ` Simon Horman
2012-09-05 2:00 ` Kuninori Morimoto
2012-09-05 8:13 ` Simon Horman
2012-09-12 5:16 ` Simon Horman
2012-09-12 5:31 ` Kuninori Morimoto
2012-09-12 6:30 ` Felipe Balbi
2012-09-12 7:16 ` Kuninori Morimoto
2012-09-12 7:19 ` Simon Horman
2012-08-31 1:28 ` [PATCH 06/11] ARM: shmobile: r8a7779: add USB EHCI clock support Simon Horman
2012-08-31 1:28 ` [PATCH 07/11] ARM: shmobile: r8a7779: add USB OHCI " Simon Horman
2012-08-31 1:28 ` [PATCH 08/11] ARM: shmobile: marzen: add USB EHCI driver support Simon Horman
2012-08-31 1:28 ` [PATCH 09/11] ARM: shmobile: marzen: fixup regulator id for smsc911x Simon Horman
2012-08-31 1:28 ` [PATCH 10/11] ARM: shmobile: marzen: enable thermal sensor Simon Horman
2012-08-31 1:28 ` [PATCH 11/11] ARM: shmobile: marzen: add USB OHCI driver support Simon Horman
2012-08-31 6:24 ` [GIT PULL v2] Renesas ARM-based SoC: Marzen and r8a7779 for 3.7 Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).