From a2a4759b5262979cbe4bc1f681ec5a6ab064fce3 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Fri, 20 Dec 2013 02:20:54 +0300 Subject: [PATCH 01/92] ARM: shmobile: Lager: conditionally select CONFIG_MICREL_PHY Now that support for KSZ8041RNLI is added to the Micrel PHY driver and we intend to support PHY IRQs on the Lager board, we have to enable the Micrel driver. Do this by selecting CONFIG_MICREL_PHY for Lager if CONFIG_SH_ETH is enabled. Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 338640631e08..a127252ab9e1 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig @@ -54,6 +54,7 @@ config MACH_KZM9D config MACH_LAGER bool "Lager board" depends on ARCH_R8A7790 + select MICREL_PHY if SH_ETH comment "Renesas ARM SoCs System Configuration" endif @@ -261,6 +262,7 @@ config MACH_LAGER bool "Lager board" depends on ARCH_R8A7790 select USE_OF + select MICREL_PHY if SH_ETH config MACH_KOELSCH bool "Koelsch board" From 6d0ef79743abd39c1867a7fb9eaccdda0b2136db Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 23 Dec 2013 20:44:15 -0800 Subject: [PATCH 02/92] ARM: shmobile: bockw: use SSI DMAEngine for sound R-Car sound driver is supporting Mem <-> SSI direct transfer via DMAEngine. Current HPB-DMA is using double plane transfer, but the sound may have noise since SSI doesn't have FIFO. This patch supports it. Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-bockw.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index c475220545f2..bdb78a77e78f 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c @@ -332,12 +332,12 @@ static struct rsnd_ssi_platform_info rsnd_ssi[] = { RSND_SSI_UNUSED, /* SSI 0 */ RSND_SSI_UNUSED, /* SSI 1 */ RSND_SSI_UNUSED, /* SSI 2 */ - RSND_SSI_SET(1, 0, gic_iid(0x85), RSND_SSI_PLAY), - RSND_SSI_SET(2, 0, gic_iid(0x85), RSND_SSI_CLK_PIN_SHARE), - RSND_SSI_SET(0, 0, gic_iid(0x86), RSND_SSI_PLAY), - RSND_SSI_SET(0, 0, gic_iid(0x86), 0), - RSND_SSI_SET(3, 0, gic_iid(0x86), RSND_SSI_PLAY), - RSND_SSI_SET(4, 0, gic_iid(0x86), RSND_SSI_CLK_PIN_SHARE), + RSND_SSI_SET(1, HPBDMA_SLAVE_SSI3_TX, gic_iid(0x85), RSND_SSI_PLAY), + RSND_SSI_SET(2, HPBDMA_SLAVE_SSI4_RX, gic_iid(0x85), RSND_SSI_CLK_PIN_SHARE), + RSND_SSI_SET(0, HPBDMA_SLAVE_SSI5_TX, gic_iid(0x86), RSND_SSI_PLAY), + RSND_SSI_SET(0, HPBDMA_SLAVE_SSI6_RX, gic_iid(0x86), 0), + RSND_SSI_SET(3, HPBDMA_SLAVE_SSI7_TX, gic_iid(0x86), RSND_SSI_PLAY), + RSND_SSI_SET(4, HPBDMA_SLAVE_SSI8_RX, gic_iid(0x86), RSND_SSI_CLK_PIN_SHARE), }; static struct rsnd_scu_platform_info rsnd_scu[9] = { From 88bf7f6846dea22bd50f8abf4c30530bbe2b6424 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 23 Dec 2013 20:44:23 -0800 Subject: [PATCH 03/92] ARM: shmobile: bockw: use HPBIF DMAEngine for sound R-Car sound driver is supporting Mem <-> SRU <-> SSI transfer via DMAEngine. The sound will be less noise if it uses SRU path since it has FIFO. This patch supports it. Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-bockw.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index bdb78a77e78f..24b41613eabe 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c @@ -332,16 +332,24 @@ static struct rsnd_ssi_platform_info rsnd_ssi[] = { RSND_SSI_UNUSED, /* SSI 0 */ RSND_SSI_UNUSED, /* SSI 1 */ RSND_SSI_UNUSED, /* SSI 2 */ - RSND_SSI_SET(1, HPBDMA_SLAVE_SSI3_TX, gic_iid(0x85), RSND_SSI_PLAY), - RSND_SSI_SET(2, HPBDMA_SLAVE_SSI4_RX, gic_iid(0x85), RSND_SSI_CLK_PIN_SHARE), - RSND_SSI_SET(0, HPBDMA_SLAVE_SSI5_TX, gic_iid(0x86), RSND_SSI_PLAY), - RSND_SSI_SET(0, HPBDMA_SLAVE_SSI6_RX, gic_iid(0x86), 0), - RSND_SSI_SET(3, HPBDMA_SLAVE_SSI7_TX, gic_iid(0x86), RSND_SSI_PLAY), - RSND_SSI_SET(4, HPBDMA_SLAVE_SSI8_RX, gic_iid(0x86), RSND_SSI_CLK_PIN_SHARE), + RSND_SSI_SET(1, HPBDMA_SLAVE_HPBIF3_TX, gic_iid(0x85), RSND_SSI_PLAY), + RSND_SSI_SET(2, HPBDMA_SLAVE_HPBIF4_RX, gic_iid(0x85), RSND_SSI_CLK_PIN_SHARE), + RSND_SSI_SET(0, HPBDMA_SLAVE_HPBIF5_TX, gic_iid(0x86), RSND_SSI_PLAY), + RSND_SSI_SET(0, HPBDMA_SLAVE_HPBIF6_RX, gic_iid(0x86), 0), + RSND_SSI_SET(3, HPBDMA_SLAVE_HPBIF7_TX, gic_iid(0x86), RSND_SSI_PLAY), + RSND_SSI_SET(4, HPBDMA_SLAVE_HPBIF8_RX, gic_iid(0x86), RSND_SSI_CLK_PIN_SHARE), }; static struct rsnd_scu_platform_info rsnd_scu[9] = { - /* no member at this point */ + { .flags = 0, }, /* SRU 0 */ + { .flags = 0, }, /* SRU 1 */ + { .flags = 0, }, /* SRU 2 */ + { .flags = RSND_SCU_USE_HPBIF, }, + { .flags = RSND_SCU_USE_HPBIF, }, + { .flags = RSND_SCU_USE_HPBIF, }, + { .flags = RSND_SCU_USE_HPBIF, }, + { .flags = RSND_SCU_USE_HPBIF, }, + { .flags = RSND_SCU_USE_HPBIF, }, }; enum { From f3ffa47c8d563d8ea3e378fa59aca5dde9624a01 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 23 Dec 2013 20:44:30 -0800 Subject: [PATCH 04/92] ARM: shmobile: bockw: add USB Func DMAEngine support Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-bockw.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index 24b41613eabe..684a529e400d 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c @@ -168,6 +168,8 @@ static struct renesas_usbhs_platform_info usbhs_info __initdata = { }, .driver_param = { .buswait_bwait = 4, + .d0_tx_id = HPBDMA_SLAVE_USBFUNC_TX, + .d1_rx_id = HPBDMA_SLAVE_USBFUNC_RX, }, }; From aefe88ba044bdcd91bc0cd1e75ab2dc524ed5107 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Thu, 26 Dec 2013 14:30:38 +0900 Subject: [PATCH 05/92] ARM: shmobile: koelsch: Conditionally select MICREL_PHY for Multiplatform The koelsch board uses has an SH ethernet controller which uses a Micrel phy. Select MICREL_PHY for koelsch if SH_ETH is enabled to make use of the Micrel-specific phy driver rather than relying on the generic phy driver. Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index a127252ab9e1..958ccf3d2919 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig @@ -45,6 +45,7 @@ config MACH_GENMAI config MACH_KOELSCH bool "Koelsch board" depends on ARCH_R8A7791 + select MICREL_PHY if SH_ETH config MACH_KZM9D bool "KZM9D board" From a56585d12cbe8903dcc71332579b9e2e0807fe44 Mon Sep 17 00:00:00 2001 From: Ulrich Hecht Date: Tue, 26 Nov 2013 21:53:20 +0100 Subject: [PATCH 06/92] ARM: mach-shmobile: kzm9g: add zboot support Adds support to run the kernel on the uninitialized KZM9G board, using for instance the mask ROM boot loader or JTAG. This patch tries to emulate the style of the corresponding "mackerel" implementation. The DRAM controller setup code has been adapted from u-boot. Signed-off-by: Ulrich Hecht Signed-off-by: Simon Horman --- .../mach-shmobile/include/mach/head-kzm9g.txt | 410 ++++++++++++++++++ arch/arm/mach-shmobile/include/mach/zboot.h | 3 + .../mach-shmobile/include/mach/zboot_macros.h | 43 ++ 3 files changed, 456 insertions(+) create mode 100644 arch/arm/mach-shmobile/include/mach/head-kzm9g.txt diff --git a/arch/arm/mach-shmobile/include/mach/head-kzm9g.txt b/arch/arm/mach-shmobile/include/mach/head-kzm9g.txt new file mode 100644 index 000000000000..9531f46a822a --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/head-kzm9g.txt @@ -0,0 +1,410 @@ +LIST "KZM9G low-level initialization routine." +LIST "Adapted from u-boot KZM9G support code." + +LIST "Copyright (C) 2013 Ulrich Hecht" + +LIST "This program is free software; you can redistribute it and/or modify" +LIST "it under the terms of the GNU General Public License version 2 as" +LIST "published by the Free Software Foundation." + +LIST "This program is distributed in the hope that it will be useful," +LIST "but WITHOUT ANY WARRANTY; without even the implied warranty of" +LIST "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the" +LIST "GNU General Public License for more details." + + +LIST "Register definitions:" + +LIST "Secure control register" +#define LIFEC_SEC_SRC (0xE6110008) + +LIST "RWDT" +#define RWDT_BASE (0xE6020000) +#define RWTCSRA0 (RWDT_BASE + 0x04) + +LIST "HPB Semaphore Control Registers" +#define HPBSCR_BASE (0xE6000000) +#define HPBCTRL6 (HPBSCR_BASE + 0x1030) + +#define SBSC1_BASE (0xFE400000) +#define SDCR0A (SBSC1_BASE + 0x0008) +#define SDCR1A (SBSC1_BASE + 0x000C) +#define SDPCRA (SBSC1_BASE + 0x0010) +#define SDCR0SA (SBSC1_BASE + 0x0018) +#define SDCR1SA (SBSC1_BASE + 0x001C) +#define RTCSRA (SBSC1_BASE + 0x0020) +#define RTCORA (SBSC1_BASE + 0x0028) +#define RTCORHA (SBSC1_BASE + 0x002C) +#define SDWCRC0A (SBSC1_BASE + 0x0040) +#define SDWCRC1A (SBSC1_BASE + 0x0044) +#define SDWCR00A (SBSC1_BASE + 0x0048) +#define SDWCR01A (SBSC1_BASE + 0x004C) +#define SDWCR10A (SBSC1_BASE + 0x0050) +#define SDWCR11A (SBSC1_BASE + 0x0054) +#define SDWCR2A (SBSC1_BASE + 0x0060) +#define SDWCRC2A (SBSC1_BASE + 0x0064) +#define ZQCCRA (SBSC1_BASE + 0x0068) +#define SDMRACR0A (SBSC1_BASE + 0x0084) +#define SDMRTMPCRA (SBSC1_BASE + 0x008C) +#define SDMRTMPMSKA (SBSC1_BASE + 0x0094) +#define SDGENCNTA (SBSC1_BASE + 0x009C) +#define SDDRVCR0A (SBSC1_BASE + 0x00B4) +#define DLLCNT0A (SBSC1_BASE + 0x0354) + +#define SDMRA1 (0xFE500000) +#define SDMRA2 (0xFE5C0000) +#define SDMRA3 (0xFE504000) + +#define SBSC2_BASE (0xFB400000) +#define SDCR0B (SBSC2_BASE + 0x0008) +#define SDCR1B (SBSC2_BASE + 0x000C) +#define SDPCRB (SBSC2_BASE + 0x0010) +#define SDCR0SB (SBSC2_BASE + 0x0018) +#define SDCR1SB (SBSC2_BASE + 0x001C) +#define RTCSRB (SBSC2_BASE + 0x0020) +#define RTCORB (SBSC2_BASE + 0x0028) +#define RTCORHB (SBSC2_BASE + 0x002C) +#define SDWCRC0B (SBSC2_BASE + 0x0040) +#define SDWCRC1B (SBSC2_BASE + 0x0044) +#define SDWCR00B (SBSC2_BASE + 0x0048) +#define SDWCR01B (SBSC2_BASE + 0x004C) +#define SDWCR10B (SBSC2_BASE + 0x0050) +#define SDWCR11B (SBSC2_BASE + 0x0054) +#define SDPDCR0B (SBSC2_BASE + 0x0058) +#define SDWCR2B (SBSC2_BASE + 0x0060) +#define SDWCRC2B (SBSC2_BASE + 0x0064) +#define ZQCCRB (SBSC2_BASE + 0x0068) +#define SDMRACR0B (SBSC2_BASE + 0x0084) +#define SDMRTMPCRB (SBSC2_BASE + 0x008C) +#define SDMRTMPMSKB (SBSC2_BASE + 0x0094) +#define SDGENCNTB (SBSC2_BASE + 0x009C) +#define DPHYCNT0B (SBSC2_BASE + 0x00A0) +#define DPHYCNT1B (SBSC2_BASE + 0x00A4) +#define DPHYCNT2B (SBSC2_BASE + 0x00A8) +#define SDDRVCR0B (SBSC2_BASE + 0x00B4) +#define DLLCNT0B (SBSC2_BASE + 0x0354) + +#define SDMRB1 (0xFB500000) +#define SDMRB2 (0xFB5C0000) +#define SDMRB3 (0xFB504000) + +#define CPG_BASE (0xE6150000) +#define FRQCRA (CPG_BASE + 0x0000) +#define FRQCRB (CPG_BASE + 0x0004) +#define FRQCRD (CPG_BASE + 0x00E4) +#define VCLKCR1 (CPG_BASE + 0x0008) +#define VCLKCR2 (CPG_BASE + 0x000C) +#define VCLKCR3 (CPG_BASE + 0x001C) +#define ZBCKCR (CPG_BASE + 0x0010) +#define FLCKCR (CPG_BASE + 0x0014) +#define SD0CKCR (CPG_BASE + 0x0074) +#define SD1CKCR (CPG_BASE + 0x0078) +#define SD2CKCR (CPG_BASE + 0x007C) +#define FSIACKCR (CPG_BASE + 0x0018) +#define SUBCKCR (CPG_BASE + 0x0080) +#define SPUACKCR (CPG_BASE + 0x0084) +#define SPUVCKCR (CPG_BASE + 0x0094) +#define MSUCKCR (CPG_BASE + 0x0088) +#define HSICKCR (CPG_BASE + 0x008C) +#define FSIBCKCR (CPG_BASE + 0x0090) +#define MFCK1CR (CPG_BASE + 0x0098) +#define MFCK2CR (CPG_BASE + 0x009C) +#define DSITCKCR (CPG_BASE + 0x0060) +#define DSI0PCKCR (CPG_BASE + 0x0064) +#define DSI1PCKCR (CPG_BASE + 0x0068) +#define DSI0PHYCR (CPG_BASE + 0x006C) +#define DVFSCR3 (CPG_BASE + 0x0174) +#define DVFSCR4 (CPG_BASE + 0x0178) +#define DVFSCR5 (CPG_BASE + 0x017C) +#define MPMODE (CPG_BASE + 0x00CC) + +#define PLLECR (CPG_BASE + 0x00D0) +#define PLL0CR (CPG_BASE + 0x00D8) +#define PLL1CR (CPG_BASE + 0x0028) +#define PLL2CR (CPG_BASE + 0x002C) +#define PLL3CR (CPG_BASE + 0x00DC) +#define PLL0STPCR (CPG_BASE + 0x00F0) +#define PLL1STPCR (CPG_BASE + 0x00C8) +#define PLL2STPCR (CPG_BASE + 0x00F8) +#define PLL3STPCR (CPG_BASE + 0x00FC) +#define RMSTPCR0 (CPG_BASE + 0x0110) +#define RMSTPCR1 (CPG_BASE + 0x0114) +#define RMSTPCR2 (CPG_BASE + 0x0118) +#define RMSTPCR3 (CPG_BASE + 0x011C) +#define RMSTPCR4 (CPG_BASE + 0x0120) +#define RMSTPCR5 (CPG_BASE + 0x0124) +#define SMSTPCR0 (CPG_BASE + 0x0130) +#define SMSTPCR2 (CPG_BASE + 0x0138) +#define SMSTPCR3 (CPG_BASE + 0x013C) +#define CPGXXCR4 (CPG_BASE + 0x0150) +#define SRCR0 (CPG_BASE + 0x80A0) +#define SRCR2 (CPG_BASE + 0x80B0) +#define SRCR3 (CPG_BASE + 0x80A8) +#define VREFCR (CPG_BASE + 0x00EC) +#define PCLKCR (CPG_BASE + 0x1020) + +#define PORT32CR (0xE6051020) +#define PORT33CR (0xE6051021) +#define PORT34CR (0xE6051022) +#define PORT35CR (0xE6051023) + +LIST "DRAM initialization code:" + +EW RWTCSRA0, 0xA507 + +ED_AND LIFEC_SEC_SRC, 0xFFFF7FFF + +ED_AND SMSTPCR3,0xFFFF7FFF +ED_AND SRCR3, 0xFFFF7FFF +ED_AND SMSTPCR2,0xFFFBFFFF +ED_AND SRCR2, 0xFFFBFFFF +ED PLLECR, 0x00000000 + +WAIT_MASK PLLECR, 0x00000F00, 0x00000000 +WAIT_MASK FRQCRB, 0x80000000, 0x00000000 + +ED PLL0CR, 0x2D000000 +ED PLL1CR, 0x17100000 +ED FRQCRB, 0x96235880 +WAIT_MASK FRQCRB, 0x80000000, 0x00000000 + +ED FLCKCR, 0x0000000B +ED_AND SMSTPCR0, 0xFFFFFFFD + +ED_AND SRCR0, 0xFFFFFFFD +ED 0xE6001628, 0x514 +ED 0xE6001648, 0x514 +ED 0xE6001658, 0x514 +ED 0xE6001678, 0x514 + +ED DVFSCR4, 0x00092000 +ED DVFSCR5, 0x000000DC +ED PLLECR, 0x00000000 +WAIT_MASK PLLECR, 0x00000F00, 0x00000000 + +ED FRQCRA, 0x0012453C +ED FRQCRB, 0x80431350 +WAIT_MASK FRQCRB, 0x80000000, 0x00000000 +ED FRQCRD, 0x00000B0B +WAIT_MASK FRQCRD, 0x80000000, 0x00000000 + +ED PCLKCR, 0x00000003 +ED VCLKCR1, 0x0000012F +ED VCLKCR2, 0x00000119 +ED VCLKCR3, 0x00000119 +ED ZBCKCR, 0x00000002 +ED FLCKCR, 0x00000005 +ED SD0CKCR, 0x00000080 +ED SD1CKCR, 0x00000080 +ED SD2CKCR, 0x00000080 +ED FSIACKCR, 0x0000003F +ED FSIBCKCR, 0x0000003F +ED SUBCKCR, 0x00000080 +ED SPUACKCR, 0x0000000B +ED SPUVCKCR, 0x0000000B +ED MSUCKCR, 0x0000013F +ED HSICKCR, 0x00000080 +ED MFCK1CR, 0x0000003F +ED MFCK2CR, 0x0000003F +ED DSITCKCR, 0x00000107 +ED DSI0PCKCR, 0x00000313 +ED DSI1PCKCR, 0x0000130D +ED DSI0PHYCR, 0x2A800E0E +ED PLL0CR, 0x1E000000 +ED PLL0CR, 0x2D000000 +ED PLL1CR, 0x17100000 +ED PLL2CR, 0x27000080 +ED PLL3CR, 0x1D000000 +ED PLL0STPCR, 0x00080000 +ED PLL1STPCR, 0x000120C0 +ED PLL2STPCR, 0x00012000 +ED PLL3STPCR, 0x00000030 +ED PLLECR, 0x0000000B +WAIT_MASK PLLECR, 0x00000B00, 0x00000B00 + +ED DVFSCR3, 0x000120F0 +ED MPMODE, 0x00000020 +ED VREFCR, 0x0000028A +ED RMSTPCR0, 0xE4628087 +ED RMSTPCR1, 0xFFFFFFFF +ED RMSTPCR2, 0x53FFFFFF +ED RMSTPCR3, 0xFFFFFFFF +ED RMSTPCR4, 0x00800D3D +ED RMSTPCR5, 0xFFFFF3FF +ED SMSTPCR2, 0x00000000 +ED SRCR2, 0x00040000 +ED_AND PLLECR, 0xFFFFFFF7 +WAIT_MASK PLLECR, 0x00000800, 0x00000000 + +LIST "set SBSC operational" +ED HPBCTRL6, 0x00000001 +WAIT_MASK HPBCTRL6, 0x00000001, 0x00000001 + +LIST "set SBSC operating frequency" +ED FRQCRD, 0x00001414 +WAIT_MASK FRQCRD, 0x80000000, 0x00000000 +ED PLL3CR, 0x1D000000 +ED_OR PLLECR, 0x00000008 +WAIT_MASK PLLECR, 0x00000800, 0x00000800 + +LIST "enable DLL oscillation in DDRPHY" +ED_OR DLLCNT0A, 0x00000002 + +LIST "wait >= 100 ns" +ED SDGENCNTA, 0x00000005 +WAIT_MASK SDGENCNTA, 0xFFFFFFFF, 0x00000000 + +LIST "target LPDDR2 device settings" +ED SDCR0A, 0xACC90159 +ED SDCR1A, 0x00010059 +ED SDWCRC0A, 0x50874114 +ED SDWCRC1A, 0x33199B37 +ED SDWCRC2A, 0x008F2313 +ED SDWCR00A, 0x31020707 +ED SDWCR01A, 0x0017040A +ED SDWCR10A, 0x31020707 +ED SDWCR11A, 0x0017040A + +ED SDDRVCR0A, 0x055557ff + +ED SDWCR2A, 0x30000000 + +LIST "drive CKE high" +ED_OR SDPCRA, 0x00000080 +WAIT_MASK SDPCRA, 0x00000080, 0x00000080 + +LIST "wait >= 200 us" +ED SDGENCNTA, 0x00002710 +WAIT_MASK SDGENCNTA, 0xFFFFFFFF, 0x00000000 + +LIST "issue reset command to LPDDR2 device" +ED SDMRACR0A, 0x0000003F +ED SDMRA1, 0x00000000 + +LIST "wait >= 10 (or 1) us (docs inconsistent)" +ED SDGENCNTA, 0x000001F4 +WAIT_MASK SDGENCNTA, 0xFFFFFFFF, 0x00000000 + +LIST "MRW ZS initialization calibration command" +ED SDMRACR0A, 0x0000FF0A +ED SDMRA3, 0x00000000 + +LIST "wait >= 1 us" +ED SDGENCNTA, 0x00000032 +WAIT_MASK SDGENCNTA, 0xFFFFFFFF, 0x00000000 + +LIST "specify operating mode in LPDDR2" +ED SDMRACR0A, 0x00002201 +ED SDMRA1, 0x00000000 +ED SDMRACR0A, 0x00000402 +ED SDMRA1, 0x00000000 +ED SDMRACR0A, 0x00000203 +ED SDMRA1, 0x00000000 + +LIST "initialize DDR interface" +ED SDMRA2, 0x00000000 + +LIST "temperature sensor control" +ED SDMRTMPCRA, 0x88800004 +ED SDMRTMPMSKA,0x00000004 + +LIST "auto-refreshing control" +ED RTCORA, 0xA55A0032 +ED RTCORHA, 0xA55A000C +ED RTCSRA, 0xA55A2048 + +ED_OR SDCR0A, 0x00000800 +ED_OR SDCR1A, 0x00000400 + +LIST "auto ZQ calibration control" +ED ZQCCRA, 0xFFF20000 + +ED_OR DLLCNT0B, 0x00000002 +ED SDGENCNTB, 0x00000005 +WAIT_MASK SDGENCNTB, 0xFFFFFFFF, 0x00000000 + +ED SDCR0B, 0xACC90159 +ED SDCR1B, 0x00010059 +ED SDWCRC0B, 0x50874114 +ED SDWCRC1B, 0x33199B37 +ED SDWCRC2B, 0x008F2313 +ED SDWCR00B, 0x31020707 +ED SDWCR01B, 0x0017040A +ED SDWCR10B, 0x31020707 +ED SDWCR11B, 0x0017040A +ED SDDRVCR0B, 0x055557ff +ED SDWCR2B, 0x30000000 +ED_OR SDPCRB, 0x00000080 +WAIT_MASK SDPCRB, 0x00000080, 0x00000080 + +ED SDGENCNTB, 0x00002710 +WAIT_MASK SDGENCNTB, 0xFFFFFFFF, 0x00000000 +ED SDMRACR0B, 0x0000003F + +LIST "upstream u-boot writes to SDMRA1A for both SBSC 1 and 2, which does" +LIST "not seem to make a lot of sense..." +ED SDMRB1, 0x00000000 + +ED SDGENCNTB, 0x000001F4 +WAIT_MASK SDGENCNTB, 0xFFFFFFFF, 0x00000000 + +ED SDMRACR0B, 0x0000FF0A +ED SDMRB3, 0x00000000 +ED SDGENCNTB, 0x00000032 +WAIT_MASK SDGENCNTB, 0xFFFFFFFF, 0x00000000 + +ED SDMRACR0B, 0x00002201 +ED SDMRB1, 0x00000000 +ED SDMRACR0B, 0x00000402 +ED SDMRB1, 0x00000000 +ED SDMRACR0B, 0x00000203 +ED SDMRB1, 0x00000000 +ED SDMRB2, 0x00000000 +ED SDMRTMPCRB, 0x88800004 +ED SDMRTMPMSKB, 0x00000004 +ED RTCORB, 0xA55A0032 +ED RTCORHB, 0xA55A000C +ED RTCSRB, 0xA55A2048 +ED_OR SDCR0B, 0x00000800 +ED_OR SDCR1B, 0x00000400 +ED ZQCCRB, 0xFFF20000 +ED_OR SDPDCR0B, 0x00030000 +ED DPHYCNT1B, 0xA5390000 +ED DPHYCNT0B, 0x00001200 +ED DPHYCNT1B, 0x07CE0000 +ED DPHYCNT0B, 0x00001247 +WAIT_MASK DPHYCNT2B, 0xFFFFFFFF, 0x07CE0000 + +ED_AND SDPDCR0B, 0xFFFCFFFF + +ED FRQCRD, 0x00000B0B +WAIT_MASK FRQCRD, 0x80000000, 0x00000000 + +ED CPGXXCR4, 0xfffffffc + +LIST "Setup SCIF4 / workaround" +EB PORT32CR, 0x12 +EB PORT33CR, 0x22 +EB PORT34CR, 0x12 +EB PORT35CR, 0x22 + +EW 0xE6C80000, 0 +EB 0xE6C80004, 0x19 +EW 0xE6C80008, 0x0030 +EW 0xE6C80018, 0 +EW 0xE6C80030, 0x0014 + +LIST "Magic to avoid hangs and corruption on DRAM writes." + +LIST "It has been observed that the system would most often hang while" +LIST "decompressing the kernel, and if it didn't it would always write" +LIST "a corrupt image to DRAM." +LIST "This problem does not occur in u-boot, and the reason is that" +LIST "u-boot performs an additional cache invalidation after setting up" +LIST "the DRAM controller. Such an invalidation should not be necessary at" +LIST "this point, and attempts at removing parts of the routine to arrive" +LIST "at the minimal snippet of code necessary to avoid the DRAM stability" +LIST "problem yielded the following:" + +MRC p15, 0, r0, c1, c0, 0 +MCR p15, 0, r0, c1, c0, 0 diff --git a/arch/arm/mach-shmobile/include/mach/zboot.h b/arch/arm/mach-shmobile/include/mach/zboot.h index c3c4669a2d72..727cc78ac8ec 100644 --- a/arch/arm/mach-shmobile/include/mach/zboot.h +++ b/arch/arm/mach-shmobile/include/mach/zboot.h @@ -12,6 +12,9 @@ #ifdef CONFIG_MACH_MACKEREL #define MEMORY_START 0x40000000 #include "mach/head-mackerel.txt" +#elif defined(CONFIG_MACH_KZM9G) || defined(CONFIG_MACH_KZM9G_REFERENCE) +#define MEMORY_START 0x43000000 +#include "mach/head-kzm9g.txt" #else #error "unsupported board." #endif diff --git a/arch/arm/mach-shmobile/include/mach/zboot_macros.h b/arch/arm/mach-shmobile/include/mach/zboot_macros.h index aa6111fbc989..14fd3d538e9a 100644 --- a/arch/arm/mach-shmobile/include/mach/zboot_macros.h +++ b/arch/arm/mach-shmobile/include/mach/zboot_macros.h @@ -62,4 +62,47 @@ 2 : .endm +/* loop until a given value has been read (with mask) */ +.macro WAIT_MASK, addr, data, cmp + LDR r0, 2f + LDR r1, 3f + LDR r2, 4f +1: + LDR r3, [r0, #0] + AND r3, r1, r3 + CMP r2, r3 + BNE 1b + B 5f +2: .long \addr +3: .long \data +4: .long \cmp +5: +.endm + +/* read 32-bit value from addr, "or" an immediate and write back */ +.macro ED_OR, addr, data + LDR r4, 1f + LDR r5, 2f + LDR r6, [r4] + ORR r5, r6, r5 + STR r5, [r4] + B 3f +1: .long \addr +2: .long \data +3: +.endm + +/* read 32-bit value from addr, "and" an immediate and write back */ +.macro ED_AND, addr, data + LDR r4, 1f + LDR r5, 2f + LDR r6, [r4] + AND r5, r6, r5 + STR r5, [r4] + B 3f +1: .long \addr +2: .long \data +3: +.endm + #endif /* __ZBOOT_MACRO_H */ From 094a804aa6943de0e9939e1c48341e87be93b3d2 Mon Sep 17 00:00:00 2001 From: Valentine Barshak Date: Fri, 27 Dec 2013 15:44:04 +0400 Subject: [PATCH 07/92] ARM: shmobile: lager: Add VIN1 SoC camera support This adds VIN1 SoC camera along with ADV7180 subdevice support to Lager. VIN0 camera is not registered because it has ADV7612 I2C subdevice which is not supported yet. Changes in V2: * made lager_add_vin_device function static. Changes in V3: * capitalized ARM in the subject. Signed-off-by: Valentine Barshak Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-lager.c | 76 ++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index f20c10a18543..c5643e1d647a 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -39,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -291,6 +293,62 @@ static const struct resource qspi_resources[] __initconst = { DEFINE_RES_IRQ(gic_spi(184)), }; +/* VIN */ +static const struct resource vin_resources[] __initconst = { + /* VIN0 */ + DEFINE_RES_MEM(0xe6ef0000, 0x1000), + DEFINE_RES_IRQ(gic_spi(188)), + /* VIN1 */ + DEFINE_RES_MEM(0xe6ef1000, 0x1000), + DEFINE_RES_IRQ(gic_spi(189)), +}; + +static void __init lager_add_vin_device(unsigned idx, + struct rcar_vin_platform_data *pdata) +{ + struct platform_device_info vin_info = { + .parent = &platform_bus, + .name = "r8a7790-vin", + .id = idx, + .res = &vin_resources[idx * 2], + .num_res = 2, + .dma_mask = DMA_BIT_MASK(32), + .data = pdata, + .size_data = sizeof(*pdata), + }; + + BUG_ON(idx > 1); + + platform_device_register_full(&vin_info); +} + +#define LAGER_CAMERA(idx, name, addr, pdata, flag) \ +static struct i2c_board_info i2c_cam##idx##_device = { \ + I2C_BOARD_INFO(name, addr), \ +}; \ + \ +static struct rcar_vin_platform_data vin##idx##_pdata = { \ + .flags = flag, \ +}; \ + \ +static struct soc_camera_link cam##idx##_link = { \ + .bus_id = idx, \ + .board_info = &i2c_cam##idx##_device, \ + .i2c_adapter_id = 2, \ + .module_name = name, \ + .priv = pdata, \ +} + +/* Camera 0 is not currently supported due to adv7612 support missing */ +LAGER_CAMERA(1, "adv7180", 0x20, NULL, RCAR_VIN_BT656); + +static void __init lager_add_camera1_device(void) +{ + platform_device_register_data(&platform_bus, "soc-camera-pdrv", 1, + &cam1_link, sizeof(cam1_link)); + lager_add_vin_device(1, &vin1_pdata); +} + static const struct pinctrl_map lager_pinctrl_map[] = { /* DU (CN10: ARGB0, CN13: LVDS) */ PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790", @@ -319,6 +377,22 @@ static const struct pinctrl_map lager_pinctrl_map[] = { "eth_rmii", "eth"), PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-ether", "pfc-r8a7790", "intc_irq0", "intc"), + /* VIN0 */ + PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-vin.0", "pfc-r8a7790", + "vin0_data24", "vin0"), + PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-vin.0", "pfc-r8a7790", + "vin0_sync", "vin0"), + PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-vin.0", "pfc-r8a7790", + "vin0_field", "vin0"), + PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-vin.0", "pfc-r8a7790", + "vin0_clkenb", "vin0"), + PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-vin.0", "pfc-r8a7790", + "vin0_clk", "vin0"), + /* VIN1 */ + PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-vin.1", "pfc-r8a7790", + "vin1_data8", "vin1"), + PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-vin.1", "pfc-r8a7790", + "vin1_clk", "vin1"), }; static void __init lager_add_standard_devices(void) @@ -368,6 +442,8 @@ static void __init lager_add_standard_devices(void) &vccq_sdhi0_info, sizeof(struct gpio_regulator_config)); platform_device_register_data(&platform_bus, "gpio-regulator", gpio_regulator_idx++, &vccq_sdhi2_info, sizeof(struct gpio_regulator_config)); + + lager_add_camera1_device(); } /* From ef5ecd1f20de2d1919714f029f5016bf6d061e66 Mon Sep 17 00:00:00 2001 From: Takashi Yoshii Date: Tue, 8 Oct 2013 14:34:03 +0900 Subject: [PATCH 08/92] ARM: shmobile: kzm9d: Use common clock framework Use common clock framework version of clock drivers/clk/shmobile/clk-emev2.c instead of sh-clkfwk version arch/arm/mach-shmobile/clock-emev2.c when it is configured as a part of multi-platform. Signed-off-by: Takashi Yoshii Acked-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-kzm9d-reference.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-shmobile/board-kzm9d-reference.c b/arch/arm/mach-shmobile/board-kzm9d-reference.c index 054d8d5c8fc1..853003c8988a 100644 --- a/arch/arm/mach-shmobile/board-kzm9d-reference.c +++ b/arch/arm/mach-shmobile/board-kzm9d-reference.c @@ -20,15 +20,14 @@ #include #include +#include #include #include #include static void __init kzm9d_add_standard_devices(void) { - if (!IS_ENABLED(CONFIG_COMMON_CLK)) - emev2_clock_init(); - + of_clk_init(NULL); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); } From d422c451a9795c7a10c3ae1ab7ca87ce7518546b Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Fri, 3 Jan 2014 16:48:48 +0100 Subject: [PATCH 09/92] ARM: shmobile: lager: Make spi_flash_data const Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-lager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index c5643e1d647a..aa8f1d915865 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c @@ -265,7 +265,7 @@ static struct mtd_partition spi_flash_part[] = { }, }; -static struct flash_platform_data spi_flash_data = { +static const struct flash_platform_data spi_flash_data = { .name = "m25p80", .parts = spi_flash_part, .nr_parts = ARRAY_SIZE(spi_flash_part), From 1e0d2c495316862fa3da73150ee86ba30c9faf0c Mon Sep 17 00:00:00 2001 From: Valentine Barshak Date: Thu, 19 Dec 2013 21:57:23 +0400 Subject: [PATCH 10/92] ARM: shmobile: lager: Add SATA support This adds SATA support to Lager board. Only SATA1 port is available. Signed-off-by: Valentine Barshak Acked-by: Magnus Damm [horms+renesas@verge.net.au: resolved trivial conflicts] [horms+renesas@verge.net.au: capitalised "ARM" in subject] Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-lager.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index aa8f1d915865..8dde4462f600 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c @@ -349,6 +349,21 @@ static void __init lager_add_camera1_device(void) lager_add_vin_device(1, &vin1_pdata); } +/* SATA1 */ +static const struct resource sata1_resources[] __initconst = { + DEFINE_RES_MEM(0xee500000, 0x2000), + DEFINE_RES_IRQ(gic_spi(106)), +}; + +static const struct platform_device_info sata1_info __initconst = { + .parent = &platform_bus, + .name = "sata-r8a7790", + .id = 1, + .res = sata1_resources, + .num_res = ARRAY_SIZE(sata1_resources), + .dma_mask = DMA_BIT_MASK(32), +}; + static const struct pinctrl_map lager_pinctrl_map[] = { /* DU (CN10: ARGB0, CN13: LVDS) */ PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790", @@ -444,6 +459,8 @@ static void __init lager_add_standard_devices(void) &vccq_sdhi2_info, sizeof(struct gpio_regulator_config)); lager_add_camera1_device(); + + platform_device_register_full(&sata1_info); } /* From 4fc0a0b93f178c0b077201ab70a53e1be6a69054 Mon Sep 17 00:00:00 2001 From: Valentine Barshak Date: Thu, 9 Jan 2014 19:23:22 +0400 Subject: [PATCH 11/92] ARM: shmobile: koelsch: Add SATA0 support This adds SATA0 support to Koelsch board. SATA1 is not available since its pinmux configuration is fixed to PCIe. Signed-off-by: Valentine Barshak Acked-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-koelsch.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c index de7cc64b1f37..2ab5c75ba2c2 100644 --- a/arch/arm/mach-shmobile/board-koelsch.c +++ b/arch/arm/mach-shmobile/board-koelsch.c @@ -148,6 +148,21 @@ static const struct gpio_keys_platform_data koelsch_keys_pdata __initconst = { .nbuttons = ARRAY_SIZE(gpio_buttons), }; +/* SATA0 */ +static const struct resource sata0_resources[] __initconst = { + DEFINE_RES_MEM(0xee300000, 0x2000), + DEFINE_RES_IRQ(gic_spi(105)), +}; + +static const struct platform_device_info sata0_info __initconst = { + .parent = &platform_bus, + .name = "sata-r8a7791", + .id = 0, + .res = sata0_resources, + .num_res = ARRAY_SIZE(sata0_resources), + .dma_mask = DMA_BIT_MASK(32), +}; + static const struct pinctrl_map koelsch_pinctrl_map[] = { /* DU */ PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7791", "pfc-r8a7791", @@ -192,6 +207,8 @@ static void __init koelsch_add_standard_devices(void) sizeof(koelsch_keys_pdata)); koelsch_add_du_device(); + + platform_device_register_full(&sata0_info); } /* From 9edaca863ea6807aca7bb8aa5c7791f7387f6022 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Tue, 7 Jan 2014 15:23:47 +0900 Subject: [PATCH 12/92] ARM: shmobile: ape6evm: Conditionally select SMSC_PHY The ape6evm board uses has an SMSC911X ethernet controller which uses an SMSC phy. Select SMSC_PHY for ape6evm if SMSC911X is enabled to make use of the SMSC-specific phy driver rather than relying on the generic phy driver. Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 958ccf3d2919..2673f68f4416 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig @@ -156,11 +156,13 @@ comment "Renesas ARM SoCs Board Type" config MACH_APE6EVM bool "APE6EVM board" depends on ARCH_R8A73A4 + select SMSC_PHY if SMSC911X select USE_OF config MACH_APE6EVM_REFERENCE bool "APE6EVM board - Reference Device Tree Implementation" depends on ARCH_R8A73A4 + select SMSC_PHY if SMSC911X select USE_OF ---help--- Use reference implementation of APE6EVM board support From 6a517b114d007a35fc264ef16b09db35548f0290 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Tue, 7 Jan 2014 15:55:49 +0900 Subject: [PATCH 13/92] ARM: shmobile: armadillo800eva: Conditionally select SMSC_PHY The armadillo800eva board uses has an SH ethernet controller which uses an SMSC phy. Select SMSC_PHY for koelsch if SH_ETH is enabled to make use of the SMSC-specific phy driver rather than relying on the generic phy driver. Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 2673f68f4416..b624b5a7f79f 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig @@ -184,6 +184,7 @@ config MACH_ARMADILLO800EVA depends on ARCH_R8A7740 select ARCH_REQUIRE_GPIOLIB select REGULATOR_FIXED_VOLTAGE if REGULATOR + select SMSC_PHY if SH_ETH select SND_SOC_WM8978 if SND_SIMPLE_CARD select USE_OF @@ -192,6 +193,7 @@ config MACH_ARMADILLO800EVA_REFERENCE depends on ARCH_R8A7740 select ARCH_REQUIRE_GPIOLIB select REGULATOR_FIXED_VOLTAGE if REGULATOR + select SMSC_PHY if SH_ETH select SND_SOC_WM8978 if SND_SIMPLE_CARD select USE_OF ---help--- From 2b2fd2755182d43e149259330c7b1fe0aa3243d6 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Tue, 7 Jan 2014 16:40:32 +0900 Subject: [PATCH 14/92] ARM: shmobile: bockw: Sort Kconfig node's selections Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index b624b5a7f79f..6f16983c41dd 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig @@ -207,11 +207,11 @@ config MACH_BOCKW bool "BOCK-W platform" depends on ARCH_R8A7778 select ARCH_REQUIRE_GPIOLIB - select RENESAS_INTC_IRQPIN select REGULATOR_FIXED_VOLTAGE if REGULATOR - select USE_OF + select RENESAS_INTC_IRQPIN select SND_SOC_AK4554 if SND_SIMPLE_CARD select SND_SOC_AK4642 if SND_SIMPLE_CARD + select USE_OF config MACH_BOCKW_REFERENCE bool "BOCK-W - Reference Device Tree Implementation" From 5d738332973d1b33cd9fb77062d3959d6c7e7a74 Mon Sep 17 00:00:00 2001 From: Valentine Barshak Date: Mon, 6 Jan 2014 18:55:41 +0400 Subject: [PATCH 15/92] ARM: shmobile: lager: Enable VIN along with ADV7180 decoder in defconfig This enables R-Car VIN SoC camera along with ADV7180 decoder, which can be found on Lager board, to lager_defconfig. Signed-off-by: Valentine Barshak Signed-off-by: Simon Horman --- arch/arm/configs/lager_defconfig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/configs/lager_defconfig b/arch/arm/configs/lager_defconfig index 883443f8f4f3..89b6e71006cb 100644 --- a/arch/arm/configs/lager_defconfig +++ b/arch/arm/configs/lager_defconfig @@ -90,6 +90,14 @@ CONFIG_RCAR_THERMAL=y CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED_VOLTAGE=y CONFIG_REGULATOR_GPIO=y +CONFIG_MEDIA_SUPPORT=y +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_SOC_CAMERA=y +CONFIG_SOC_CAMERA_PLATFORM=y +CONFIG_VIDEO_RCAR_VIN=y +# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set +CONFIG_VIDEO_ADV7180=y CONFIG_DRM=y CONFIG_DRM_RCAR_DU=y # CONFIG_USB_SUPPORT is not set From 7f03e3bf2bca488e1471e00b6b8b74242b065020 Mon Sep 17 00:00:00 2001 From: Valentine Barshak Date: Thu, 9 Jan 2014 19:23:23 +0400 Subject: [PATCH 16/92] ARM: shmobile: koelsch: Enable SATA in defconfig This enables block layer, R-Car SATA and SCSI disk in koelsch_defconfig. Signed-off-by: Valentine Barshak Signed-off-by: Simon Horman --- arch/arm/configs/koelsch_defconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/configs/koelsch_defconfig b/arch/arm/configs/koelsch_defconfig index e248f49d5549..4071e61d808f 100644 --- a/arch/arm/configs/koelsch_defconfig +++ b/arch/arm/configs/koelsch_defconfig @@ -8,7 +8,6 @@ CONFIG_SYSCTL_SYSCALL=y CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y CONFIG_SLAB=y -# CONFIG_BLOCK is not set CONFIG_ARCH_SHMOBILE_LEGACY=y CONFIG_ARCH_R8A7791=y CONFIG_MACH_KOELSCH=y @@ -36,6 +35,9 @@ CONFIG_INET=y CONFIG_IP_PNP=y CONFIG_IP_PNP_DHCP=y CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_BLK_DEV_SD=y +CONFIG_ATA=y +CONFIG_SATA_RCAR=y CONFIG_NETDEVICES=y # CONFIG_NET_VENDOR_ARC is not set # CONFIG_NET_CADENCE is not set From 9a4e2a5a11efb7734dabef77a6e1515cbfdd9f42 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Sun, 12 Jan 2014 12:15:49 +0100 Subject: [PATCH 17/92] ARM: shmobile: koelsch: Enable DEVTMPFS_MOUNT in defconfig Without this, a Debian jessie nfsroot hangs early in the boot process. Signed-off-by: Geert Uytterhoeven [horms+renesas@verge.net.au: resolved trivial conflict] Signed-off-by: Simon Horman --- arch/arm/configs/koelsch_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/koelsch_defconfig b/arch/arm/configs/koelsch_defconfig index 4071e61d808f..30157975998a 100644 --- a/arch/arm/configs/koelsch_defconfig +++ b/arch/arm/configs/koelsch_defconfig @@ -34,6 +34,8 @@ CONFIG_UNIX=y CONFIG_INET=y CONFIG_IP_PNP=y CONFIG_IP_PNP_DHCP=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_BLK_DEV_SD=y CONFIG_ATA=y From 0e02971e4047e61edc913c997ba9124df33d5112 Mon Sep 17 00:00:00 2001 From: Valentine Barshak Date: Thu, 9 Jan 2014 18:24:37 +0400 Subject: [PATCH 18/92] ARM: shmobile: lager: Enable SATA in defconfig This enables R-Car SATA and SCSI disk in lager_defconfig. Signed-off-by: Valentine Barshak Signed-off-by: Simon Horman --- arch/arm/configs/lager_defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/configs/lager_defconfig b/arch/arm/configs/lager_defconfig index 89b6e71006cb..ee93b8a55cf9 100644 --- a/arch/arm/configs/lager_defconfig +++ b/arch/arm/configs/lager_defconfig @@ -49,6 +49,9 @@ CONFIG_IP_PNP_DHCP=y # CONFIG_IPV6 is not set # CONFIG_WIRELESS is not set CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_BLK_DEV_SD=y +CONFIG_ATA=y +CONFIG_SATA_RCAR=y CONFIG_NETDEVICES=y # CONFIG_NET_CORE is not set # CONFIG_NET_VENDOR_ARC is not set From edcde600a0bf778d98d945bd27f51c941e35bb8c Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Wed, 29 Jan 2014 16:56:01 -0800 Subject: [PATCH 19/92] ARM: shmobile: marzen: enable CONFIG_DEVTMPFS in defconfig This reverts commit 41307133da4b6f242ecbb45950b9d043c0b21b96 ("ARM: shmobile: marzen: Do not enable CONFIG_DEVTMPFS defconfig"). DEVTMPFS is needed for udev. Signed-off-by: Kuninori Morimoto Acked-by: Geert Uytterhoeven [horms+renesas@verge.net.au: Added subject of reverted patch to changelog] Signed-off-by: Simon Horman --- arch/arm/configs/marzen_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/marzen_defconfig b/arch/arm/configs/marzen_defconfig index f21bd405cc2a..92994f7f6fd8 100644 --- a/arch/arm/configs/marzen_defconfig +++ b/arch/arm/configs/marzen_defconfig @@ -43,6 +43,8 @@ CONFIG_IP_PNP_DHCP=y # CONFIG_IPV6 is not set # CONFIG_WIRELESS is not set CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y # CONFIG_STANDALONE is not set # CONFIG_PREVENT_FIRMWARE_BUILD is not set # CONFIG_FW_LOADER is not set From 97b3fbccfae2d1fee679073f1690e2428868754c Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Wed, 29 Jan 2014 16:56:17 -0800 Subject: [PATCH 20/92] ARM: shmobile: mackerel: enable CONFIG_DEVTMPFS in defconfig DEVTMPFS is needed for udev Signed-off-by: Kuninori Morimoto Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- arch/arm/configs/mackerel_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/mackerel_defconfig b/arch/arm/configs/mackerel_defconfig index a61e1653fc5e..57ececba2ae6 100644 --- a/arch/arm/configs/mackerel_defconfig +++ b/arch/arm/configs/mackerel_defconfig @@ -42,6 +42,8 @@ CONFIG_IP_PNP_DHCP=y # CONFIG_IPV6 is not set # CONFIG_WIRELESS is not set CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y # CONFIG_FIRMWARE_IN_KERNEL is not set CONFIG_MTD=y CONFIG_MTD_CONCAT=y From 6ea8b5ff7ca2d200875ddd774faa8ca40d990d86 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Wed, 29 Jan 2014 16:56:33 -0800 Subject: [PATCH 21/92] ARM: shmobile: lager: enable CONFIG_DEVTMPFS in defconfig DEVTMPFS is needed for udev Signed-off-by: Kuninori Morimoto Acked-by: Geert Uytterhoeven [horms+renesas@verge.net.au: resolved trivial conflict] Signed-off-by: Simon Horman --- arch/arm/configs/lager_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/lager_defconfig b/arch/arm/configs/lager_defconfig index ee93b8a55cf9..3e7e0aef26c9 100644 --- a/arch/arm/configs/lager_defconfig +++ b/arch/arm/configs/lager_defconfig @@ -49,6 +49,8 @@ CONFIG_IP_PNP_DHCP=y # CONFIG_IPV6 is not set # CONFIG_WIRELESS is not set CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y CONFIG_BLK_DEV_SD=y CONFIG_ATA=y CONFIG_SATA_RCAR=y From 19bc39274b42052a198ae836c059652b65e2a21e Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Wed, 29 Jan 2014 16:56:55 -0800 Subject: [PATCH 22/92] ARM: shmobile: kzm9g: enable CONFIG_DEVTMPFS in defconfig DEVTMPFS is needed for udev Signed-off-by: Kuninori Morimoto Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- arch/arm/configs/kzm9g_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/kzm9g_defconfig b/arch/arm/configs/kzm9g_defconfig index 9934dbc23d64..12bd1f63c399 100644 --- a/arch/arm/configs/kzm9g_defconfig +++ b/arch/arm/configs/kzm9g_defconfig @@ -60,6 +60,8 @@ CONFIG_IRDA=y CONFIG_SH_IRDA=y # CONFIG_WIRELESS is not set CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y CONFIG_SCSI=y CONFIG_BLK_DEV_SD=y CONFIG_NETDEVICES=y From c5aa40f8485b9b6aaeae14e5bddd5e569829ac2f Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Wed, 29 Jan 2014 16:57:04 -0800 Subject: [PATCH 23/92] ARM: shmobile: kzm9d: enable CONFIG_DEVTMPFS in defconfig DEVTMPFS is needed for udev Signed-off-by: Kuninori Morimoto Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- arch/arm/configs/kzm9d_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/kzm9d_defconfig b/arch/arm/configs/kzm9d_defconfig index e42ce3756af3..1cc330b06bf6 100644 --- a/arch/arm/configs/kzm9d_defconfig +++ b/arch/arm/configs/kzm9d_defconfig @@ -50,6 +50,8 @@ CONFIG_IP_PNP_DHCP=y # CONFIG_IPV6 is not set # CONFIG_WIRELESS is not set CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y # CONFIG_BLK_DEV is not set CONFIG_NETDEVICES=y # CONFIG_NET_VENDOR_BROADCOM is not set From 2304de6ef7479b12fa4529c12a53cac631a2c67b Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Wed, 29 Jan 2014 16:57:24 -0800 Subject: [PATCH 24/92] ARM: shmobile: genmai: enable CONFIG_DEVTMPFS in defconfig DEVTMPFS is needed for udev Signed-off-by: Kuninori Morimoto Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- arch/arm/configs/genmai_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/genmai_defconfig b/arch/arm/configs/genmai_defconfig index aa0b704f48af..c56a7ff1dcd7 100644 --- a/arch/arm/configs/genmai_defconfig +++ b/arch/arm/configs/genmai_defconfig @@ -50,6 +50,8 @@ CONFIG_IP_PNP_DHCP=y # CONFIG_IPV6 is not set # CONFIG_WIRELESS is not set CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y CONFIG_NETDEVICES=y # CONFIG_NET_CORE is not set # CONFIG_NET_VENDOR_ARC is not set From f921163add46d0dd8321f9d59496bbc17fb38850 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Wed, 29 Jan 2014 16:57:39 -0800 Subject: [PATCH 25/92] ARM: shmobile: bockw: enable CONFIG_DEVTMPFS in defconfig This reverts commit e14ee5deab24200e4b70fe31a8c806f0acd3d37c ("ARM: shmobile: bockw: Do not enable CONFIG_DEVTMPFS defconfig"). Signed-off-by: Kuninori Morimoto Acked-by: Geert Uytterhoeven [horms+renesas@verge.net.au: Added subject of reverted commit to changelog] Signed-off-by: Simon Horman --- arch/arm/configs/bockw_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/bockw_defconfig b/arch/arm/configs/bockw_defconfig index 80cff50beb34..e816140d81c5 100644 --- a/arch/arm/configs/bockw_defconfig +++ b/arch/arm/configs/bockw_defconfig @@ -44,6 +44,8 @@ CONFIG_IP_PNP_DHCP=y # CONFIG_INET_DIAG is not set # CONFIG_IPV6 is not set CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y # CONFIG_STANDALONE is not set # CONFIG_PREVENT_FIRMWARE_BUILD is not set # CONFIG_FW_LOADER is not set From a3b74d3e45f2e28e7c57d5c16a94b59c1a68dd09 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Wed, 29 Jan 2014 16:57:49 -0800 Subject: [PATCH 26/92] ARM: shmobile: armadillo: enable CONFIG_DEVTMPFS in defconfig DEVTMPFS is needed for udev Signed-off-by: Kuninori Morimoto Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- arch/arm/configs/armadillo800eva_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/armadillo800eva_defconfig b/arch/arm/configs/armadillo800eva_defconfig index 9287a62de830..065adddeee3e 100644 --- a/arch/arm/configs/armadillo800eva_defconfig +++ b/arch/arm/configs/armadillo800eva_defconfig @@ -58,6 +58,8 @@ CONFIG_IP_PNP_DHCP=y # CONFIG_IPV6 is not set # CONFIG_WIRELESS is not set CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y CONFIG_SCSI=y CONFIG_BLK_DEV_SD=y CONFIG_MD=y From 0771ddff31186836f62a20c42e7958bd37f7b4ed Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Wed, 29 Jan 2014 16:57:59 -0800 Subject: [PATCH 27/92] ARM: shmobile: ape6evm: enable CONFIG_DEVTMPFS in defconfig DEVTMPFS is needed for udev Signed-off-by: Kuninori Morimoto Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- arch/arm/configs/ape6evm_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/ape6evm_defconfig b/arch/arm/configs/ape6evm_defconfig index cb26c62dc722..bb396c0e5fda 100644 --- a/arch/arm/configs/ape6evm_defconfig +++ b/arch/arm/configs/ape6evm_defconfig @@ -48,6 +48,8 @@ CONFIG_IP_PNP_DHCP=y # CONFIG_IPV6_SIT is not set CONFIG_NETFILTER=y CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y # CONFIG_FW_LOADER_USER_HELPER is not set CONFIG_NETDEVICES=y # CONFIG_NET_CADENCE is not set From 682100f59c0051e2b6f5af294da79df2419db157 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Tue, 7 Jan 2014 15:23:47 +0900 Subject: [PATCH 28/92] ARM: shmobile: kzm9d: Conditionally select SMSC_PHY The kzm9d board uses has an SMSC911X ethernet controller which uses an SMSC phy. Select SMSC_PHY for kzm9d if SMSC911X is enabled to make use of the SMSC-specific phy driver rather than relying on the generic phy driver. This only covers the case of multiplatform kzm9d as there is currently no Kconfig node for non-multiplatform kzm9d. One could be added if desired. Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 6f16983c41dd..b735ea8383d0 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig @@ -51,6 +51,7 @@ config MACH_KZM9D bool "KZM9D board" depends on ARCH_EMEV2 select REGULATOR_FIXED_VOLTAGE if REGULATOR + select SMSC_PHY if SMSC911X config MACH_LAGER bool "Lager board" From c5c2a294a4b24778cd3cab880bf05becee471edb Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Tue, 7 Jan 2014 15:23:47 +0900 Subject: [PATCH 29/92] ARM: shmobile: mackerel: Conditionally select SMSC_PHY The mackerel board uses has an SMSC911X ethernet controller which uses an SMSC phy. Select SMSC_PHY for mackerel if SMSC911X is enabled to make use of the SMSC-specific phy driver rather than relying on the generic phy driver. Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index b735ea8383d0..f8005ef62226 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig @@ -177,6 +177,7 @@ config MACH_MACKEREL depends on ARCH_SH7372 select ARCH_REQUIRE_GPIOLIB select REGULATOR_FIXED_VOLTAGE if REGULATOR + select SMSC_PHY if SMSC911X select SND_SOC_AK4642 if SND_SIMPLE_CARD select USE_OF From 317af6612ee29dfcb5ae04df9c58e9f79fc8d4ff Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Tue, 7 Jan 2014 15:23:47 +0900 Subject: [PATCH 30/92] ARM: shmobile: marzen: Conditionally select SMSC_PHY The marzen board uses has an SMSC911X ethernet controller which uses an SMSC phy. Select SMSC_PHY for marzen if SMSC911X is enabled to make use of the SMSC-specific phy driver rather than relying on the generic phy driver. Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index f8005ef62226..7e3f42bfaf6b 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig @@ -250,6 +250,7 @@ config MACH_MARZEN depends on ARCH_R8A7779 select ARCH_REQUIRE_GPIOLIB select REGULATOR_FIXED_VOLTAGE if REGULATOR + select SMSC_PHY if SMSC911X select USE_OF config MACH_MARZEN_REFERENCE @@ -257,6 +258,7 @@ config MACH_MARZEN_REFERENCE depends on ARCH_R8A7779 select ARCH_REQUIRE_GPIOLIB select REGULATOR_FIXED_VOLTAGE if REGULATOR + select SMSC_PHY if SMSC911X select USE_OF ---help--- Use reference implementation of Marzen board support From 7a543d8124e7e23190d36e7c57d3b9c394c4e4c1 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Tue, 14 Jan 2014 18:43:26 +0000 Subject: [PATCH 31/92] ARM: shmobile: lager: fix error return code check from clk_get() The lager_add_standard_devices() function calls clk_get() but then fails to check that it returns an error pointer instead of NULL on failure. This was added by 4a606af2 ("ARM: shmobile: lager-reference: Instantiate clkdevs for SCIF and CMT") patch in Simon Horman's renesas-boards2-for-v3.14 tag. The issue is not serious as it does not cause a crash and seems to not be actually causing any issues now the other clock bugs have been fixed. Signed-off-by: Ben Dooks Acked-by: Laurent Pinchart [horms+renesas@verge.net.au: tweaked changelog] Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-lager-reference.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c index a6e271d92af0..dc8d76b9a9f1 100644 --- a/arch/arm/mach-shmobile/board-lager-reference.c +++ b/arch/arm/mach-shmobile/board-lager-reference.c @@ -44,14 +44,14 @@ static void __init lager_add_standard_devices(void) for (i = 0; i < ARRAY_SIZE(scif_names); ++i) { clk = clk_get(NULL, scif_names[i]); - if (clk) { + if (!IS_ERR(clk)) { clk_register_clkdev(clk, NULL, "sh-sci.%u", i); clk_put(clk); } } clk = clk_get(NULL, "cmt0"); - if (clk) { + if (!IS_ERR(clk)) { clk_register_clkdev(clk, NULL, "sh_cmt.0"); clk_put(clk); } From ca1187521b78ce4f980cd1b457f8c634dd401021 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Tue, 14 Jan 2014 18:43:27 +0000 Subject: [PATCH 32/92] ARM: shmobile: koelsch: fix error return code check from clk_get() The koelsch_add_standard_devices() function calls clk_get() but then fails to check that it returns an error pointer instead of NULL on failure. This was added by f31239ef ("ARM: shmobile: koelsch-reference: Instantiate clkdevs for SCIF and CMT") in Simon Horman's renesas-boards2-for-v3.14 tag. The issue is not serious as it does not cause a crash and seems to not be actually causing any issues now the other clock bugs have been fixed. Signed-off-by: Ben Dooks Acked-by: Laurent Pinchart [horms+renesas@verge.net.au: tweaked changelog] Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-koelsch-reference.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c index 652b59268416..feb8d97ea2f7 100644 --- a/arch/arm/mach-shmobile/board-koelsch-reference.c +++ b/arch/arm/mach-shmobile/board-koelsch-reference.c @@ -45,14 +45,14 @@ static void __init koelsch_add_standard_devices(void) for (i = 0; i < ARRAY_SIZE(scif_names); ++i) { clk = clk_get(NULL, scif_names[i]); - if (clk) { + if (!IS_ERR(clk)) { clk_register_clkdev(clk, NULL, "sh-sci.%u", i); clk_put(clk); } } clk = clk_get(NULL, "cmt0"); - if (clk) { + if (!IS_ERR(clk)) { clk_register_clkdev(clk, NULL, "sh_cmt.0"); clk_put(clk); } From 1eabe028f8aacd7367fbdda9596cd3d64659a49f Mon Sep 17 00:00:00 2001 From: Valentine Barshak Date: Sat, 25 Jan 2014 02:28:47 +0400 Subject: [PATCH 33/92] ARM: shmobile: lager: Add USBHS support This adds USBHS PHY and registers USBHS device if the driver is enabled. Signed-off-by: Valentine Barshak Acked-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-lager.c | 138 +++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index 8dde4462f600..4a95a4593eb1 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -37,6 +38,8 @@ #include #include #include +#include +#include #include #include #include @@ -364,6 +367,131 @@ static const struct platform_device_info sata1_info __initconst = { .dma_mask = DMA_BIT_MASK(32), }; +/* USBHS */ +#if IS_ENABLED(CONFIG_USB_RENESAS_USBHS_UDC) +static const struct resource usbhs_resources[] __initconst = { + DEFINE_RES_MEM(0xe6590000, 0x100), + DEFINE_RES_IRQ(gic_spi(107)), +}; + +struct usbhs_private { + struct renesas_usbhs_platform_info info; + struct usb_phy *phy; +}; + +#define usbhs_get_priv(pdev) \ + container_of(renesas_usbhs_get_info(pdev), struct usbhs_private, info) + +static int usbhs_power_ctrl(struct platform_device *pdev, + void __iomem *base, int enable) +{ + struct usbhs_private *priv = usbhs_get_priv(pdev); + + if (!priv->phy) + return -ENODEV; + + if (enable) { + int retval = usb_phy_init(priv->phy); + + if (!retval) + retval = usb_phy_set_suspend(priv->phy, 0); + return retval; + } + + usb_phy_set_suspend(priv->phy, 1); + usb_phy_shutdown(priv->phy); + return 0; +} + +static int usbhs_hardware_init(struct platform_device *pdev) +{ + struct usbhs_private *priv = usbhs_get_priv(pdev); + struct usb_phy *phy; + + phy = usb_get_phy_dev(&pdev->dev, 0); + if (IS_ERR(phy)) + return PTR_ERR(phy); + + priv->phy = phy; + return 0; +} + +static int usbhs_hardware_exit(struct platform_device *pdev) +{ + struct usbhs_private *priv = usbhs_get_priv(pdev); + + if (!priv->phy) + return 0; + + usb_put_phy(priv->phy); + priv->phy = NULL; + return 0; +} + +static int usbhs_get_id(struct platform_device *pdev) +{ + return USBHS_GADGET; +} + +static u32 lager_usbhs_pipe_type[] = { + USB_ENDPOINT_XFER_CONTROL, + USB_ENDPOINT_XFER_ISOC, + USB_ENDPOINT_XFER_ISOC, + USB_ENDPOINT_XFER_BULK, + USB_ENDPOINT_XFER_BULK, + USB_ENDPOINT_XFER_BULK, + USB_ENDPOINT_XFER_INT, + USB_ENDPOINT_XFER_INT, + USB_ENDPOINT_XFER_INT, + USB_ENDPOINT_XFER_BULK, + USB_ENDPOINT_XFER_BULK, + USB_ENDPOINT_XFER_BULK, + USB_ENDPOINT_XFER_BULK, + USB_ENDPOINT_XFER_BULK, + USB_ENDPOINT_XFER_BULK, + USB_ENDPOINT_XFER_BULK, +}; + +static struct usbhs_private usbhs_priv __initdata = { + .info = { + .platform_callback = { + .power_ctrl = usbhs_power_ctrl, + .hardware_init = usbhs_hardware_init, + .hardware_exit = usbhs_hardware_exit, + .get_id = usbhs_get_id, + }, + .driver_param = { + .buswait_bwait = 4, + .pipe_type = lager_usbhs_pipe_type, + .pipe_size = ARRAY_SIZE(lager_usbhs_pipe_type), + }, + } +}; + +static void __init lager_register_usbhs(void) +{ + usb_bind_phy("renesas_usbhs", 0, "usb_phy_rcar_gen2"); + platform_device_register_resndata(&platform_bus, + "renesas_usbhs", -1, + usbhs_resources, + ARRAY_SIZE(usbhs_resources), + &usbhs_priv.info, + sizeof(usbhs_priv.info)); +} +#else /* CONFIG_USB_RENESAS_USBHS_UDC */ +static inline void lager_register_usbhs(void) { } +#endif /* CONFIG_USB_RENESAS_USBHS_UDC */ + +/* USBHS PHY */ +static const struct rcar_gen2_phy_platform_data usbhs_phy_pdata __initconst = { + .chan0_pci = 0, /* Channel 0 is USBHS */ + .chan2_pci = 1, /* Channel 2 is PCI USB */ +}; + +static const struct resource usbhs_phy_resources[] __initconst = { + DEFINE_RES_MEM(0xe6590100, 0x100), +}; + static const struct pinctrl_map lager_pinctrl_map[] = { /* DU (CN10: ARGB0, CN13: LVDS) */ PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790", @@ -408,6 +536,9 @@ static const struct pinctrl_map lager_pinctrl_map[] = { "vin1_data8", "vin1"), PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-vin.1", "pfc-r8a7790", "vin1_clk", "vin1"), + /* USB0 */ + PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs", "pfc-r8a7790", + "usb0", "usb0"), }; static void __init lager_add_standard_devices(void) @@ -461,6 +592,13 @@ static void __init lager_add_standard_devices(void) lager_add_camera1_device(); platform_device_register_full(&sata1_info); + + platform_device_register_resndata(&platform_bus, "usb_phy_rcar_gen2", + -1, usbhs_phy_resources, + ARRAY_SIZE(usbhs_phy_resources), + &usbhs_phy_pdata, + sizeof(usbhs_phy_pdata)); + lager_register_usbhs(); } /* From 235cda29e4d5047622ff9b82b1f0b4cb6cf95f6c Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Thu, 30 Jan 2014 08:10:09 +0900 Subject: [PATCH 34/92] ARM: shmobile: Remove Lager USBHS UDC ifdefs Remove ifdefs to make the Lager USBHS device always present. This makes it more like other devices, no need to be special. Also, these ifdefs by themselves do not hurt much, but combined with USB Host device ifdefs that were proposed earlier we could basically end up with a kernel that drives VBUS incorrectly depending on the kernel configuration - lets not do that. Signed-off-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-lager.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index 4a95a4593eb1..fdcc868de1fa 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c @@ -368,7 +368,6 @@ static const struct platform_device_info sata1_info __initconst = { }; /* USBHS */ -#if IS_ENABLED(CONFIG_USB_RENESAS_USBHS_UDC) static const struct resource usbhs_resources[] __initconst = { DEFINE_RES_MEM(0xe6590000, 0x100), DEFINE_RES_IRQ(gic_spi(107)), @@ -478,9 +477,6 @@ static void __init lager_register_usbhs(void) &usbhs_priv.info, sizeof(usbhs_priv.info)); } -#else /* CONFIG_USB_RENESAS_USBHS_UDC */ -static inline void lager_register_usbhs(void) { } -#endif /* CONFIG_USB_RENESAS_USBHS_UDC */ /* USBHS PHY */ static const struct rcar_gen2_phy_platform_data usbhs_phy_pdata __initconst = { From 4ba24a81bdc6baa47a9ddf92f1fb469047fd8cae Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Mon, 27 Jan 2014 10:26:29 -0300 Subject: [PATCH 35/92] ARM: dove: Remove UBI support from defconfig As NAND support is not enabled by default, it's hard to see why we'd want to have UBI support. Let's remove it. Signed-off-by: Ezequiel Garcia Signed-off-by: Jason Cooper --- arch/arm/configs/dove_defconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/configs/dove_defconfig b/arch/arm/configs/dove_defconfig index 110105476848..7242b11682ad 100644 --- a/arch/arm/configs/dove_defconfig +++ b/arch/arm/configs/dove_defconfig @@ -48,7 +48,6 @@ CONFIG_MTD_CFI_INTELEXT=y CONFIG_MTD_CFI_STAA=y CONFIG_MTD_PHYSMAP=y CONFIG_MTD_M25P80=y -CONFIG_MTD_UBI=y CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=1 From 5812b8b2bcc35e7928c0e5616bbe35a0e97c7749 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Tue, 4 Feb 2014 18:53:50 +0300 Subject: [PATCH 36/92] ARM: shmobile: Lager: pass Ether PHY IRQ Pass Ether's PHY IRQ (which is IRQC's IRQ0) to the 'sh_eth' driver. Set the IRQ trigger type to be low-level as per the Micrel PHY driver's setup. Signed-off-by: Sergei Shtylyov Acked-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-lager.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index fdcc868de1fa..30ebd0805a34 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -233,6 +234,7 @@ static const struct resource mmcif1_resources[] __initconst = { /* Ether */ static const struct sh_eth_plat_data ether_pdata __initconst = { .phy = 0x1, + .phy_irq = irq_pin(0), .edmac_endian = EDMAC_LITTLE_ENDIAN, .phy_interface = PHY_INTERFACE_MODE_RMII, .ether_link_active_low = 1, @@ -618,6 +620,8 @@ static void __init lager_init(void) { lager_add_standard_devices(); + irq_set_irq_type(irq_pin(0), IRQ_TYPE_LEVEL_LOW); + if (IS_ENABLED(CONFIG_PHYLIB)) phy_register_fixup_for_id("r8a7790-ether-ff:01", lager_ksz8041_fixup); From 29d9f010d7103f2b83ce1c25999a6f3a1e57f5e2 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Tue, 4 Feb 2014 18:55:32 +0300 Subject: [PATCH 37/92] ARM: shmobile: Koelsch: pass Ether PHY IRQ Pass Ether's PHY IRQ (which is IRQC's IRQ0) to the 'sh_eth' driver. Set the IRQ trigger type to be low-level as per the Micrel PHY driver's setup. Signed-off-by: Sergei Shtylyov Acked-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-koelsch.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c index 2ab5c75ba2c2..1ec3b91b475c 100644 --- a/arch/arm/mach-shmobile/board-koelsch.c +++ b/arch/arm/mach-shmobile/board-koelsch.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -92,6 +93,7 @@ static void __init koelsch_add_du_device(void) /* Ether */ static const struct sh_eth_plat_data ether_pdata __initconst = { .phy = 0x1, + .phy_irq = irq_pin(0), .edmac_endian = EDMAC_LITTLE_ENDIAN, .phy_interface = PHY_INTERFACE_MODE_RMII, .ether_link_active_low = 1, @@ -232,6 +234,8 @@ static void __init koelsch_init(void) { koelsch_add_standard_devices(); + irq_set_irq_type(irq_pin(0), IRQ_TYPE_LEVEL_LOW); + if (IS_ENABLED(CONFIG_PHYLIB)) phy_register_fixup_for_id("r8a7791-ether-ff:01", koelsch_ksz8041_fixup); From 12c1d5a54e874f26d08fa27f13f63ef7ccf38a2a Mon Sep 17 00:00:00 2001 From: Valentine Barshak Date: Tue, 4 Feb 2014 22:48:20 +0400 Subject: [PATCH 38/92] ARM: shmobile: koelsch: Add I2C support This adds I2C[1245] busses support to Koelsch board. I2C[03] do not have any slave devices connected and are not used because of the following: * I2C0 pins are multiplexed with LBSC pins; * I2C3 pins are multiplexed with EtherMAC and VIN0 pins. Signed-off-by: Valentine Barshak Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-koelsch.c | 46 ++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c index 1ec3b91b475c..2741dba74aaa 100644 --- a/arch/arm/mach-shmobile/board-koelsch.c +++ b/arch/arm/mach-shmobile/board-koelsch.c @@ -165,6 +165,38 @@ static const struct platform_device_info sata0_info __initconst = { .dma_mask = DMA_BIT_MASK(32), }; +/* I2C */ +static const struct resource i2c_resources[] __initconst = { + /* I2C0 */ + DEFINE_RES_MEM(0xE6508000, 0x40), + DEFINE_RES_IRQ(gic_spi(287)), + /* I2C1 */ + DEFINE_RES_MEM(0xE6518000, 0x40), + DEFINE_RES_IRQ(gic_spi(288)), + /* I2C2 */ + DEFINE_RES_MEM(0xE6530000, 0x40), + DEFINE_RES_IRQ(gic_spi(286)), + /* I2C3 */ + DEFINE_RES_MEM(0xE6540000, 0x40), + DEFINE_RES_IRQ(gic_spi(290)), + /* I2C4 */ + DEFINE_RES_MEM(0xE6520000, 0x40), + DEFINE_RES_IRQ(gic_spi(19)), + /* I2C5 */ + DEFINE_RES_MEM(0xE6528000, 0x40), + DEFINE_RES_IRQ(gic_spi(20)), +}; + +static void __init koelsch_add_i2c(unsigned idx) +{ + unsigned res_idx = idx * 2; + + BUG_ON(res_idx >= ARRAY_SIZE(i2c_resources)); + + platform_device_register_simple("i2c-rcar_gen2", idx, + i2c_resources + res_idx, 2); +} + static const struct pinctrl_map koelsch_pinctrl_map[] = { /* DU */ PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7791", "pfc-r8a7791", @@ -188,6 +220,15 @@ static const struct pinctrl_map koelsch_pinctrl_map[] = { /* SCIF1 (CN20: DEBUG SERIAL1) */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7791", "scif1_data_d", "scif1"), + /* I2C1 */ + PIN_MAP_MUX_GROUP_DEFAULT("i2c-rcar_gen2.1", "pfc-r8a7791", + "i2c1_e", "i2c1"), + /* I2C2 */ + PIN_MAP_MUX_GROUP_DEFAULT("i2c-rcar_gen2.2", "pfc-r8a7791", + "i2c2", "i2c2"), + /* I2C4 */ + PIN_MAP_MUX_GROUP_DEFAULT("i2c-rcar_gen2.4", "pfc-r8a7791", + "i2c4_c", "i2c4"), }; static void __init koelsch_add_standard_devices(void) @@ -211,6 +252,11 @@ static void __init koelsch_add_standard_devices(void) koelsch_add_du_device(); platform_device_register_full(&sata0_info); + + koelsch_add_i2c(1); + koelsch_add_i2c(2); + koelsch_add_i2c(4); + koelsch_add_i2c(5); } /* From ab44f75f1142edde5737203a0d259853f34686fb Mon Sep 17 00:00:00 2001 From: Valentine Barshak Date: Tue, 4 Feb 2014 22:48:22 +0400 Subject: [PATCH 39/92] ARM: shmobile: koelsch: Enable I2C in defconfig This enables I2C support in koelsch_defconfig. Signed-off-by: Valentine Barshak Signed-off-by: Simon Horman --- arch/arm/configs/koelsch_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/koelsch_defconfig b/arch/arm/configs/koelsch_defconfig index 30157975998a..c3b3c9d1d4e8 100644 --- a/arch/arm/configs/koelsch_defconfig +++ b/arch/arm/configs/koelsch_defconfig @@ -62,6 +62,8 @@ CONFIG_SH_ETH=y CONFIG_SERIAL_SH_SCI=y CONFIG_SERIAL_SH_SCI_NR_UARTS=20 CONFIG_SERIAL_SH_SCI_CONSOLE=y +CONFIG_I2C=y +CONFIG_I2C_RCAR=y # CONFIG_HWMON is not set CONFIG_THERMAL=y CONFIG_RCAR_THERMAL=y From f729dd554e9a04a55950693ea8eca0d3aaa28d22 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 30 Jan 2014 21:39:40 -0800 Subject: [PATCH 40/92] ARM: shmobile: bockw: use wp-gpios instead of WP pin Latest Renesas Chip has some SDHI channels and the WP pin availability depends on its channel or HW implementation. Thus, this patch decides new policy whch indicates WP is disabled as default. But, we can use wp-gpios property to enable it as other method. Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/boot/dts/r8a7778-bockw-reference.dts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/r8a7778-bockw-reference.dts b/arch/arm/boot/dts/r8a7778-bockw-reference.dts index bb62c7a906f4..06cda19dac6a 100644 --- a/arch/arm/boot/dts/r8a7778-bockw-reference.dts +++ b/arch/arm/boot/dts/r8a7778-bockw-reference.dts @@ -17,6 +17,7 @@ /dts-v1/; #include "r8a7778.dtsi" #include +#include / { model = "bockw"; @@ -84,7 +85,7 @@ mmc_pins: mmc { sdhi0_pins: sd0 { renesas,groups = "sdhi0_data4", "sdhi0_ctrl", - "sdhi0_cd", "sdhi0_wp"; + "sdhi0_cd"; renesas,function = "sdhi0"; }; @@ -101,6 +102,7 @@ &sdhi0 { vmmc-supply = <&fixedregulator3v3>; bus-width = <4>; status = "okay"; + wp-gpios = <&gpio3 18 GPIO_ACTIVE_HIGH>; }; &hspi0 { From 36be7686caa05334ca8d52df157b373a41d8d9f1 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Thu, 30 Jan 2014 08:10:29 +0900 Subject: [PATCH 41/92] ARM: shmobile: Lager USB0 cable detection workaround Add Lager board code to check the PWEN GPIO signal and refuse to allow probe of the USBHS driver in case of DIP misconfiguration. For correct operation Lager DIP switches SW5 and SW6 shall be configured in 2-3 position to enable USB Function support. If the DIP switch is configured incorrectly then the user can simply adjust the hardware and either reboot or use the bind interface to try to probe again: # echo renesas_usbhs > /sys/bus/platform/drivers/renesas_usbhs/bind Signed-off-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-lager.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index 30ebd0805a34..6a7041f9afa6 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c @@ -408,13 +408,30 @@ static int usbhs_hardware_init(struct platform_device *pdev) { struct usbhs_private *priv = usbhs_get_priv(pdev); struct usb_phy *phy; + int ret; + + /* USB0 Function - use PWEN as GPIO input to detect DIP Switch SW5 + * setting to avoid VBUS short circuit due to wrong cable. + * PWEN should be pulled up high if USB Function is selected by SW5 + */ + gpio_request_one(RCAR_GP_PIN(5, 18), GPIOF_IN, NULL); /* USB0_PWEN */ + if (!gpio_get_value(RCAR_GP_PIN(5, 18))) { + pr_warn("Error: USB Function not selected - check SW5 + SW6\n"); + ret = -ENOTSUPP; + goto error; + } phy = usb_get_phy_dev(&pdev->dev, 0); - if (IS_ERR(phy)) - return PTR_ERR(phy); + if (IS_ERR(phy)) { + ret = PTR_ERR(phy); + goto error; + } priv->phy = phy; return 0; + error: + gpio_free(RCAR_GP_PIN(5, 18)); + return ret; } static int usbhs_hardware_exit(struct platform_device *pdev) @@ -426,6 +443,8 @@ static int usbhs_hardware_exit(struct platform_device *pdev) usb_put_phy(priv->phy); priv->phy = NULL; + + gpio_free(RCAR_GP_PIN(5, 18)); return 0; } @@ -536,7 +555,7 @@ static const struct pinctrl_map lager_pinctrl_map[] = { "vin1_clk", "vin1"), /* USB0 */ PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs", "pfc-r8a7790", - "usb0", "usb0"), + "usb0_ovc_vbus", "usb0"), }; static void __init lager_add_standard_devices(void) From d58922ce8cadba7e758608fef9438bc183b46b0f Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 13 Jan 2014 18:25:50 -0800 Subject: [PATCH 42/92] ARM: shmobile: lager: add sound support This patch adds sound support for Lager board. But, it is using PIO transfer at this point. Signed-off-by: Kuninori Morimoto [horms+renesas@verge.net.au: resolved conflicts] Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/Kconfig | 1 + arch/arm/mach-shmobile/board-lager.c | 100 +++++++++++++++++++++++++++ 2 files changed, 101 insertions(+) diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 7e3f42bfaf6b..bcbd74c564a1 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig @@ -272,6 +272,7 @@ config MACH_LAGER depends on ARCH_R8A7790 select USE_OF select MICREL_PHY if SH_ETH + select SND_SOC_AK4642 if SND_SIMPLE_CARD config MACH_KOELSCH bool "Koelsch board" diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index 6a7041f9afa6..e8242c552da1 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -52,6 +53,20 @@ #include #include #include +#include +#include + +/* + * SSI-AK4643 + * + * SW1: 1: AK4643 + * 2: CN22 + * 3: ADV7511 + * + * this command is required when playback. + * + * # amixer set "LINEOUT Mixer DACL" on + */ /* DU */ static struct rcar_du_encoder_data lager_du_encoders[] = { @@ -509,6 +524,77 @@ static const struct resource usbhs_phy_resources[] __initconst = { DEFINE_RES_MEM(0xe6590100, 0x100), }; +/* I2C */ +static struct i2c_board_info i2c2_devices[] = { + { + I2C_BOARD_INFO("ak4643", 0x12), + } +}; + +/* Sound */ +static struct resource rsnd_resources[] __initdata = { + [RSND_GEN2_SCU] = DEFINE_RES_MEM(0xec500000, 0x1000), + [RSND_GEN2_ADG] = DEFINE_RES_MEM(0xec5a0000, 0x100), + [RSND_GEN2_SSIU] = DEFINE_RES_MEM(0xec540000, 0x1000), + [RSND_GEN2_SSI] = DEFINE_RES_MEM(0xec541000, 0x1280), +}; + +static struct rsnd_ssi_platform_info rsnd_ssi[] = { + RSND_SSI_SET(0, 0, gic_spi(370), RSND_SSI_PLAY), + RSND_SSI_SET(0, 0, gic_spi(371), RSND_SSI_CLK_PIN_SHARE), +}; + +static struct rsnd_scu_platform_info rsnd_scu[2] = { + /* no member at this point */ +}; + +static struct rcar_snd_info rsnd_info = { + .flags = RSND_GEN2, + .ssi_info = rsnd_ssi, + .ssi_info_nr = ARRAY_SIZE(rsnd_ssi), + .scu_info = rsnd_scu, + .scu_info_nr = ARRAY_SIZE(rsnd_scu), +}; + +static struct asoc_simple_card_info rsnd_card_info = { + .name = "AK4643", + .card = "SSI01-AK4643", + .codec = "ak4642-codec.2-0012", + .platform = "rcar_sound", + .daifmt = SND_SOC_DAIFMT_LEFT_J, + .cpu_dai = { + .name = "rcar_sound", + .fmt = SND_SOC_DAIFMT_CBS_CFS, + }, + .codec_dai = { + .name = "ak4642-hifi", + .fmt = SND_SOC_DAIFMT_CBM_CFM, + .sysclk = 11289600, + }, +}; + +static void __init lager_add_rsnd_device(void) +{ + struct platform_device_info cardinfo = { + .parent = &platform_bus, + .name = "asoc-simple-card", + .id = -1, + .data = &rsnd_card_info, + .size_data = sizeof(struct asoc_simple_card_info), + .dma_mask = DMA_BIT_MASK(32), + }; + + i2c_register_board_info(2, i2c2_devices, + ARRAY_SIZE(i2c2_devices)); + + platform_device_register_resndata( + &platform_bus, "rcar_sound", -1, + rsnd_resources, ARRAY_SIZE(rsnd_resources), + &rsnd_info, sizeof(rsnd_info)); + + platform_device_register_full(&cardinfo); +} + static const struct pinctrl_map lager_pinctrl_map[] = { /* DU (CN10: ARGB0, CN13: LVDS) */ PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790", @@ -517,12 +603,24 @@ static const struct pinctrl_map lager_pinctrl_map[] = { "du_sync_1", "du"), PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790", "du_clk_out_0", "du"), + /* I2C2 */ + PIN_MAP_MUX_GROUP_DEFAULT("i2c-rcar.2", "pfc-r8a7790", + "i2c2", "i2c2"), /* SCIF0 (CN19: DEBUG SERIAL0) */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790", "scif0_data", "scif0"), /* SCIF1 (CN20: DEBUG SERIAL1) */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7790", "scif1_data", "scif1"), + /* SSI (CN17: sound) */ + PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7790", + "ssi0129_ctrl", "ssi"), + PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7790", + "ssi0_data", "ssi"), + PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7790", + "ssi1_data", "ssi"), + PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7790", + "audio_clk_a", "audio_clk"), /* MMCIF1 */ PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.1", "pfc-r8a7790", "mmc1_data8", "mmc1"), @@ -616,6 +714,8 @@ static void __init lager_add_standard_devices(void) &usbhs_phy_pdata, sizeof(usbhs_phy_pdata)); lager_register_usbhs(); + + lager_add_rsnd_device(); } /* From 90bdadf5b05be16e7ba663ba8b9e42d20dcef861 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 13 Jan 2014 18:26:00 -0800 Subject: [PATCH 43/92] ARM: shmobile: lager: add sound support on defconfig Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/configs/lager_defconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/configs/lager_defconfig b/arch/arm/configs/lager_defconfig index 3e7e0aef26c9..b17f48739013 100644 --- a/arch/arm/configs/lager_defconfig +++ b/arch/arm/configs/lager_defconfig @@ -105,6 +105,10 @@ CONFIG_VIDEO_RCAR_VIN=y CONFIG_VIDEO_ADV7180=y CONFIG_DRM=y CONFIG_DRM_RCAR_DU=y +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_SOC=y +CONFIG_SND_SOC_RCAR=y # CONFIG_USB_SUPPORT is not set CONFIG_MMC=y CONFIG_MMC_SDHI=y From c73c7ff8d5b1f4ee0bb9cd7c57c37782954b2246 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Thu, 6 Feb 2014 17:54:02 +0900 Subject: [PATCH 44/92] Revert "ARM: shmobile: marzen: Conditionally select SMSC_PHY" This reverts commit 317af6612ee29dfcb5ae04df9c58e9f79fc8d4ff. This seems to prevent the board from booting now that the tree has been rebased on v3.14-rc1. Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/Kconfig | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index bcbd74c564a1..c431114d6325 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig @@ -250,7 +250,6 @@ config MACH_MARZEN depends on ARCH_R8A7779 select ARCH_REQUIRE_GPIOLIB select REGULATOR_FIXED_VOLTAGE if REGULATOR - select SMSC_PHY if SMSC911X select USE_OF config MACH_MARZEN_REFERENCE @@ -258,7 +257,6 @@ config MACH_MARZEN_REFERENCE depends on ARCH_R8A7779 select ARCH_REQUIRE_GPIOLIB select REGULATOR_FIXED_VOLTAGE if REGULATOR - select SMSC_PHY if SMSC911X select USE_OF ---help--- Use reference implementation of Marzen board support From 664517474c4993c5d560d0e394c36583b7c99535 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Tue, 4 Feb 2014 16:23:56 +0100 Subject: [PATCH 45/92] ARM: shmobile: genmai legacy: Add RSPI support Add RSPI platform device, resources, platform data, and SPI child. On this board, only rspi4 is in use. Its bus contains a single device (a wm8978 audio codec). Signed-off-by: Geert Uytterhoeven Acked-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-genmai.c | 44 +++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/arch/arm/mach-shmobile/board-genmai.c b/arch/arm/mach-shmobile/board-genmai.c index 3e92e3c62d4c..c4064610e223 100644 --- a/arch/arm/mach-shmobile/board-genmai.c +++ b/arch/arm/mach-shmobile/board-genmai.c @@ -20,15 +20,59 @@ #include #include +#include +#include #include +#include #include #include #include +/* RSPI */ +#define RSPI_RESOURCE(idx, baseaddr, irq) \ +static const struct resource rspi##idx##_resources[] __initconst = { \ + DEFINE_RES_MEM(baseaddr, 0x24), \ + DEFINE_RES_IRQ_NAMED(irq, "error"), \ + DEFINE_RES_IRQ_NAMED(irq + 1, "rx"), \ + DEFINE_RES_IRQ_NAMED(irq + 2, "tx"), \ +} + +RSPI_RESOURCE(0, 0xe800c800, gic_iid(270)); +RSPI_RESOURCE(1, 0xe800d000, gic_iid(273)); +RSPI_RESOURCE(2, 0xe800d800, gic_iid(276)); +RSPI_RESOURCE(3, 0xe800e000, gic_iid(279)); +RSPI_RESOURCE(4, 0xe800e800, gic_iid(282)); + +static const struct rspi_plat_data rspi_pdata __initconst = { + .num_chipselect = 1, +}; + +#define r7s72100_register_rspi(idx) \ + platform_device_register_resndata(&platform_bus, "rspi-rz", idx, \ + rspi##idx##_resources, \ + ARRAY_SIZE(rspi##idx##_resources), \ + &rspi_pdata, sizeof(rspi_pdata)) + +static const struct spi_board_info spi_info[] __initconst = { + { + .modalias = "wm8978", + .max_speed_hz = 5000000, + .bus_num = 4, + .chip_select = 0, + }, +}; + static void __init genmai_add_standard_devices(void) { r7s72100_clock_init(); r7s72100_add_dt_devices(); + + r7s72100_register_rspi(0); + r7s72100_register_rspi(1); + r7s72100_register_rspi(2); + r7s72100_register_rspi(3); + r7s72100_register_rspi(4); + spi_register_board_info(spi_info, ARRAY_SIZE(spi_info)); } static const char * const genmai_boards_compat_dt[] __initconst = { From bcca4e8e5b6383cea9a2b310d5a964d8db18b9c7 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Tue, 4 Feb 2014 16:24:01 +0100 Subject: [PATCH 46/92] ARM: shmobile: koelsch legacy: Add QSPI support Enable support for the Spansion s25fl512s SPI FLASH on the Koelsch board: - Add QSPI platform device, resources, platform data, and pinmux, - Add FLASH data and MTD partitions. Signed-off-by: Geert Uytterhoeven Acked-by: Laurent Pinchart Acked-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-koelsch.c | 64 ++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c index 2741dba74aaa..d42637db596a 100644 --- a/arch/arm/mach-shmobile/board-koelsch.c +++ b/arch/arm/mach-shmobile/board-koelsch.c @@ -26,12 +26,17 @@ #include #include #include +#include +#include #include #include #include #include #include #include +#include +#include +#include #include #include #include @@ -150,6 +155,55 @@ static const struct gpio_keys_platform_data koelsch_keys_pdata __initconst = { .nbuttons = ARRAY_SIZE(gpio_buttons), }; +/* QSPI */ +static const struct resource qspi_resources[] __initconst = { + DEFINE_RES_MEM(0xe6b10000, 0x1000), + DEFINE_RES_IRQ_NAMED(gic_spi(184), "mux"), +}; + +static const struct rspi_plat_data qspi_pdata __initconst = { + .num_chipselect = 1, +}; + +/* SPI Flash memory (Spansion S25FL512SAGMFIG11 64 MiB) */ +static struct mtd_partition spi_flash_part[] = { + { + .name = "loader", + .offset = 0x00000000, + .size = 512 * 1024, + .mask_flags = MTD_WRITEABLE, + }, + { + .name = "bootenv", + .offset = MTDPART_OFS_APPEND, + .size = 512 * 1024, + .mask_flags = MTD_WRITEABLE, + }, + { + .name = "data", + .offset = MTDPART_OFS_APPEND, + .size = MTDPART_SIZ_FULL, + }, +}; + +static const struct flash_platform_data spi_flash_data = { + .name = "m25p80", + .parts = spi_flash_part, + .nr_parts = ARRAY_SIZE(spi_flash_part), + .type = "s25fl512s", +}; + +static const struct spi_board_info spi_info[] __initconst = { + { + .modalias = "m25p80", + .platform_data = &spi_flash_data, + .mode = SPI_MODE_0, + .max_speed_hz = 30000000, + .bus_num = 0, + .chip_select = 0, + }, +}; + /* SATA0 */ static const struct resource sata0_resources[] __initconst = { DEFINE_RES_MEM(0xee300000, 0x2000), @@ -214,6 +268,11 @@ static const struct pinctrl_map koelsch_pinctrl_map[] = { "eth_rmii", "eth"), PIN_MAP_MUX_GROUP_DEFAULT("r8a7791-ether", "pfc-r8a7791", "intc_irq0", "intc"), + /* QSPI */ + PIN_MAP_MUX_GROUP_DEFAULT("qspi.0", "pfc-r8a7791", + "qspi_ctrl", "qspi"), + PIN_MAP_MUX_GROUP_DEFAULT("qspi.0", "pfc-r8a7791", + "qspi_data4", "qspi"), /* SCIF0 (CN19: DEBUG SERIAL0) */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7791", "scif0_data_d", "scif0"), @@ -248,6 +307,11 @@ static void __init koelsch_add_standard_devices(void) platform_device_register_data(&platform_bus, "gpio-keys", -1, &koelsch_keys_pdata, sizeof(koelsch_keys_pdata)); + platform_device_register_resndata(&platform_bus, "qspi", 0, + qspi_resources, + ARRAY_SIZE(qspi_resources), + &qspi_pdata, sizeof(qspi_pdata)); + spi_register_board_info(spi_info, ARRAY_SIZE(spi_info)); koelsch_add_du_device(); From a70eda7e40d09b8bf1a817488a255ce907587a71 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Tue, 4 Feb 2014 16:24:05 +0100 Subject: [PATCH 47/92] ARM: shmobile: lager legacy: Switch QSPI to named IRQs Signed-off-by: Geert Uytterhoeven Acked-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-lager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index e8242c552da1..317574864e7b 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c @@ -310,7 +310,7 @@ static const struct spi_board_info spi_info[] __initconst = { /* QSPI resource */ static const struct resource qspi_resources[] __initconst = { DEFINE_RES_MEM(0xe6b10000, 0x1000), - DEFINE_RES_IRQ(gic_spi(184)), + DEFINE_RES_IRQ_NAMED(gic_spi(184), "mux"), }; /* VIN */ From 201bd5ddcd9f11bb3942a062f0e907c3edc61f87 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Tue, 4 Feb 2014 16:24:02 +0100 Subject: [PATCH 48/92] ARM: shmobile: koelsch defconfig: Enable RSPI and MTD_M25P80 This enables support for the Spansion s25fl512s SPI FLASH on QSPI. Signed-off-by: Geert Uytterhoeven Acked-by: Magnus Damm [horms+renesas@verge.net.au: resolved conflict] Signed-off-by: Simon Horman --- arch/arm/configs/koelsch_defconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/configs/koelsch_defconfig b/arch/arm/configs/koelsch_defconfig index c3b3c9d1d4e8..95611392a20e 100644 --- a/arch/arm/configs/koelsch_defconfig +++ b/arch/arm/configs/koelsch_defconfig @@ -40,6 +40,8 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_BLK_DEV_SD=y CONFIG_ATA=y CONFIG_SATA_RCAR=y +CONFIG_MTD=y +CONFIG_MTD_M25P80=y CONFIG_NETDEVICES=y # CONFIG_NET_VENDOR_ARC is not set # CONFIG_NET_CADENCE is not set @@ -64,6 +66,8 @@ CONFIG_SERIAL_SH_SCI_NR_UARTS=20 CONFIG_SERIAL_SH_SCI_CONSOLE=y CONFIG_I2C=y CONFIG_I2C_RCAR=y +CONFIG_SPI=y +CONFIG_SPI_RSPI=y # CONFIG_HWMON is not set CONFIG_THERMAL=y CONFIG_RCAR_THERMAL=y From 8f33d31ee270f2a6bcc661815a520f76565674c3 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Tue, 4 Feb 2014 16:23:57 +0100 Subject: [PATCH 49/92] ARM: shmobile: genmai defconfig: Enable RSPI Signed-off-by: Geert Uytterhoeven Acked-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/configs/genmai_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/genmai_defconfig b/arch/arm/configs/genmai_defconfig index c56a7ff1dcd7..5ee6ac0931f7 100644 --- a/arch/arm/configs/genmai_defconfig +++ b/arch/arm/configs/genmai_defconfig @@ -81,6 +81,8 @@ CONFIG_SERIAL_SH_SCI_NR_UARTS=10 CONFIG_SERIAL_SH_SCI_CONSOLE=y # CONFIG_HW_RANDOM is not set CONFIG_I2C_SH_MOBILE=y +CONFIG_SPI=y +CONFIG_SPI_RSPI=y # CONFIG_HWMON is not set CONFIG_THERMAL=y CONFIG_RCAR_THERMAL=y From 03fec7dee502d43114f384a1588ce84a3c9bf38d Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Wed, 4 Dec 2013 13:12:20 +0900 Subject: [PATCH 50/92] ARM: shmobile: genmai: Enable r7s72100-ether Acked-by: Sergei Shtylyov Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-genmai.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm/mach-shmobile/board-genmai.c b/arch/arm/mach-shmobile/board-genmai.c index c4064610e223..e240980cc227 100644 --- a/arch/arm/mach-shmobile/board-genmai.c +++ b/arch/arm/mach-shmobile/board-genmai.c @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -28,6 +29,20 @@ #include #include +/* Ether */ +static const struct sh_eth_plat_data ether_pdata __initconst = { + .phy = 0x00, /* PD60610 */ + .edmac_endian = EDMAC_LITTLE_ENDIAN, + .phy_interface = PHY_INTERFACE_MODE_MII, + .no_ether_link = 1 +}; + +static const struct resource ether_resources[] __initconst = { + DEFINE_RES_MEM(0xe8203000, 0x800), + DEFINE_RES_MEM(0xe8204800, 0x200), + DEFINE_RES_IRQ(gic_iid(359)), +}; + /* RSPI */ #define RSPI_RESOURCE(idx, baseaddr, irq) \ static const struct resource rspi##idx##_resources[] __initconst = { \ @@ -67,6 +82,11 @@ static void __init genmai_add_standard_devices(void) r7s72100_clock_init(); r7s72100_add_dt_devices(); + platform_device_register_resndata(&platform_bus, "r7s72100-ether", -1, + ether_resources, + ARRAY_SIZE(ether_resources), + ðer_pdata, sizeof(ether_pdata)); + r7s72100_register_rspi(0); r7s72100_register_rspi(1); r7s72100_register_rspi(2); From 4f26b761531c00605010d595b495901106729f8b Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Wed, 5 Feb 2014 14:05:07 +0100 Subject: [PATCH 51/92] ARM: sunxi: Enable A31 SPI and SID in the defconfig Signed-off-by: Maxime Ripard --- arch/arm/configs/sunxi_defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/configs/sunxi_defconfig b/arch/arm/configs/sunxi_defconfig index 3e2259b60236..b5df4a511b0a 100644 --- a/arch/arm/configs/sunxi_defconfig +++ b/arch/arm/configs/sunxi_defconfig @@ -24,6 +24,7 @@ CONFIG_IP_PNP_BOOTP=y # CONFIG_WIRELESS is not set CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y +CONFIG_EEPROM_SUNXI_SID=y CONFIG_NETDEVICES=y CONFIG_SUN4I_EMAC=y # CONFIG_NET_CADENCE is not set @@ -48,6 +49,8 @@ CONFIG_I2C=y # CONFIG_I2C_COMPAT is not set CONFIG_I2C_CHARDEV=y CONFIG_I2C_MV64XXX=y +CONFIG_SPI=y +CONFIG_SPI_SUN6I=y CONFIG_GPIO_SYSFS=y # CONFIG_HWMON is not set CONFIG_WATCHDOG=y From 7fc2def52fbf6cdfebf48c51ce8ec61202a1d4b9 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 10 Feb 2014 19:19:59 +0100 Subject: [PATCH 52/92] ARM: mvebu: rename mvebu_defconfig to mvebu_v7_defconfig With the merge of the Kirkwood support into arch/arm/mach-mvebu/, the mvebu platform will no longer only contain ARMv7 compatible processors (Armada 370, Armada XP, and soon Armada 375, Armada 38x and Dove), but also ARMv5 compatible processors (Kirkwood, and hopefully Orion5x in the future). However, a single mvebu_defconfig cannot work, since it is not possible to build a kernel that supports both ARMv5 and ARMv7 platforms in the same binary. As a consequence, this commit renames mvebu_defconfig to mvebu_v7_defconfig, which is the configuration that will build a kernel that supports all ARMv7 mvebu platforms. As Kirkwood support gets merged into mach-mvebu, an additional mvebu_v5_defconfig will be added. Even though we already have a multi_v7_defconfig, the mvebu developers found it more convenient for development to have a defconfig that builds only the mvebu platforms. Signed-off-by: Thomas Petazzoni Acked-by: Andrew Lunn Signed-off-by: Jason Cooper --- arch/arm/configs/{mvebu_defconfig => mvebu_v7_defconfig} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename arch/arm/configs/{mvebu_defconfig => mvebu_v7_defconfig} (100%) diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_v7_defconfig similarity index 100% rename from arch/arm/configs/mvebu_defconfig rename to arch/arm/configs/mvebu_v7_defconfig From d12e699f44b8277b7b72b546c69948a2f20514f8 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Wed, 12 Feb 2014 13:26:21 +0900 Subject: [PATCH 53/92] ARM: shmobile: Add SDHI devices for legacy Koelsch Add SDHI0, SDHI1 and SDHI2 as platform devices to the legacy Koelsch board code. Also include regulators that are needed to control VCCQ and VDD. Signed-off-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-koelsch.c | 155 +++++++++++++++++++++++++ 1 file changed, 155 insertions(+) diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c index d42637db596a..893d47c7d7a6 100644 --- a/arch/arm/mach-shmobile/board-koelsch.c +++ b/arch/arm/mach-shmobile/board-koelsch.c @@ -26,6 +26,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -33,6 +36,10 @@ #include #include #include +#include +#include +#include +#include #include #include #include @@ -251,6 +258,103 @@ static void __init koelsch_add_i2c(unsigned idx) i2c_resources + res_idx, 2); } +#define SDHI_REGULATOR(idx, vdd_pin, vccq_pin) \ +static struct regulator_consumer_supply vcc_sdhi##idx##_consumer = \ + REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi." #idx); \ + \ +static struct regulator_init_data vcc_sdhi##idx##_init_data = { \ + .constraints = { \ + .valid_ops_mask = REGULATOR_CHANGE_STATUS, \ + }, \ + .consumer_supplies = &vcc_sdhi##idx##_consumer, \ + .num_consumer_supplies = 1, \ +}; \ + \ +static const struct fixed_voltage_config vcc_sdhi##idx##_info __initconst = {\ + .supply_name = "SDHI" #idx "Vcc", \ + .microvolts = 3300000, \ + .gpio = vdd_pin, \ + .enable_high = 1, \ + .init_data = &vcc_sdhi##idx##_init_data, \ +}; \ + \ +static struct regulator_consumer_supply vccq_sdhi##idx##_consumer = \ + REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi." #idx); \ + \ +static struct regulator_init_data vccq_sdhi##idx##_init_data = { \ + .constraints = { \ + .input_uV = 3300000, \ + .min_uV = 1800000, \ + .max_uV = 3300000, \ + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | \ + REGULATOR_CHANGE_STATUS, \ + }, \ + .consumer_supplies = &vccq_sdhi##idx##_consumer, \ + .num_consumer_supplies = 1, \ +}; \ + \ +static struct gpio vccq_sdhi##idx##_gpio = \ + { vccq_pin, GPIOF_OUT_INIT_HIGH, "vccq-sdhi" #idx }; \ + \ +static struct gpio_regulator_state vccq_sdhi##idx##_states[] = { \ + { .value = 1800000, .gpios = 0 }, \ + { .value = 3300000, .gpios = 1 }, \ +}; \ + \ +static const struct gpio_regulator_config vccq_sdhi##idx##_info __initconst = {\ + .supply_name = "vqmmc", \ + .gpios = &vccq_sdhi##idx##_gpio, \ + .nr_gpios = 1, \ + .states = vccq_sdhi##idx##_states, \ + .nr_states = ARRAY_SIZE(vccq_sdhi##idx##_states), \ + .type = REGULATOR_VOLTAGE, \ + .init_data = &vccq_sdhi##idx##_init_data, \ +}; + +SDHI_REGULATOR(0, RCAR_GP_PIN(7, 17), RCAR_GP_PIN(2, 12)); +SDHI_REGULATOR(1, RCAR_GP_PIN(7, 18), RCAR_GP_PIN(2, 13)); +SDHI_REGULATOR(2, RCAR_GP_PIN(7, 19), RCAR_GP_PIN(2, 26)); + +/* SDHI0 */ +static struct sh_mobile_sdhi_info sdhi0_info __initdata = { + .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ | + MMC_CAP_POWER_OFF_CARD, + .tmio_caps2 = MMC_CAP2_NO_MULTI_READ, + .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT, +}; + +static struct resource sdhi0_resources[] __initdata = { + DEFINE_RES_MEM(0xee100000, 0x200), + DEFINE_RES_IRQ(gic_spi(165)), +}; + +/* SDHI1 */ +static struct sh_mobile_sdhi_info sdhi1_info __initdata = { + .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ | + MMC_CAP_POWER_OFF_CARD, + .tmio_caps2 = MMC_CAP2_NO_MULTI_READ, + .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT, +}; + +static struct resource sdhi1_resources[] __initdata = { + DEFINE_RES_MEM(0xee140000, 0x100), + DEFINE_RES_IRQ(gic_spi(167)), +}; + +/* SDHI2 */ +static struct sh_mobile_sdhi_info sdhi2_info __initdata = { + .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ | + MMC_CAP_POWER_OFF_CARD, + .tmio_caps2 = MMC_CAP2_NO_MULTI_READ, + .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | + TMIO_MMC_WRPROTECT_DISABLE, +}; + +static struct resource sdhi2_resources[] __initdata = { + DEFINE_RES_MEM(0xee160000, 0x100), + DEFINE_RES_IRQ(gic_spi(168)), +}; + static const struct pinctrl_map koelsch_pinctrl_map[] = { /* DU */ PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7791", "pfc-r8a7791", @@ -288,6 +392,31 @@ static const struct pinctrl_map koelsch_pinctrl_map[] = { /* I2C4 */ PIN_MAP_MUX_GROUP_DEFAULT("i2c-rcar_gen2.4", "pfc-r8a7791", "i2c4_c", "i2c4"), + /* SDHI0 */ + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7791", + "sdhi0_data4", "sdhi0"), + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7791", + "sdhi0_ctrl", "sdhi0"), + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7791", + "sdhi0_cd", "sdhi0"), + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7791", + "sdhi0_wp", "sdhi0"), + /* SDHI2 */ + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7791", + "sdhi1_data4", "sdhi1"), + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7791", + "sdhi1_ctrl", "sdhi1"), + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7791", + "sdhi1_cd", "sdhi1"), + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7791", + "sdhi1_wp", "sdhi1"), + /* SDHI2 */ + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-r8a7791", + "sdhi2_data4", "sdhi2"), + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-r8a7791", + "sdhi2_ctrl", "sdhi2"), + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-r8a7791", + "sdhi2_cd", "sdhi2"), }; static void __init koelsch_add_standard_devices(void) @@ -321,6 +450,32 @@ static void __init koelsch_add_standard_devices(void) koelsch_add_i2c(2); koelsch_add_i2c(4); koelsch_add_i2c(5); + + platform_device_register_data(&platform_bus, "reg-fixed-voltage", 0, + &vcc_sdhi0_info, sizeof(struct fixed_voltage_config)); + platform_device_register_data(&platform_bus, "reg-fixed-voltage", 1, + &vcc_sdhi1_info, sizeof(struct fixed_voltage_config)); + platform_device_register_data(&platform_bus, "reg-fixed-voltage", 2, + &vcc_sdhi2_info, sizeof(struct fixed_voltage_config)); + platform_device_register_data(&platform_bus, "gpio-regulator", 0, + &vccq_sdhi0_info, sizeof(struct gpio_regulator_config)); + platform_device_register_data(&platform_bus, "gpio-regulator", 1, + &vccq_sdhi1_info, sizeof(struct gpio_regulator_config)); + platform_device_register_data(&platform_bus, "gpio-regulator", 2, + &vccq_sdhi2_info, sizeof(struct gpio_regulator_config)); + + platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 0, + sdhi0_resources, ARRAY_SIZE(sdhi0_resources), + &sdhi0_info, sizeof(struct sh_mobile_sdhi_info)); + + platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 1, + sdhi1_resources, ARRAY_SIZE(sdhi1_resources), + &sdhi1_info, sizeof(struct sh_mobile_sdhi_info)); + + platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 2, + sdhi2_resources, ARRAY_SIZE(sdhi2_resources), + &sdhi2_info, sizeof(struct sh_mobile_sdhi_info)); + } /* From 40e6a51e0cf44e944eed29697eb849140bf8258f Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Wed, 12 Feb 2014 20:29:24 -0800 Subject: [PATCH 54/92] ARM: shmobile: lager: add SDHI0/2 support SDHI0 (CN8) needs JP/SW settings Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-lager.c | 64 ++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index 317574864e7b..90d7e812d97b 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c @@ -26,8 +26,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -68,6 +70,19 @@ * # amixer set "LINEOUT Mixer DACL" on */ +/* + * SDHI0 (CN8) + * + * JP3: pin1 + * SW20: pin1 + + * GP5_24: 1: VDD 3.3V (defult) + * 0: VDD 0.0V + * GP5_29: 1: VccQ 3.3V (defult) + * 0: VccQ 1.8V + * + */ + /* DU */ static struct rcar_du_encoder_data lager_du_encoders[] = { { @@ -595,6 +610,34 @@ static void __init lager_add_rsnd_device(void) platform_device_register_full(&cardinfo); } +/* SDHI0 */ +static struct sh_mobile_sdhi_info sdhi0_info __initdata = { + .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ | + MMC_CAP_POWER_OFF_CARD, + .tmio_caps2 = MMC_CAP2_NO_MULTI_READ, + .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | + TMIO_MMC_WRPROTECT_DISABLE, +}; + +static struct resource sdhi0_resources[] __initdata = { + DEFINE_RES_MEM(0xee100000, 0x200), + DEFINE_RES_IRQ(gic_spi(165)), +}; + +/* SDHI2 */ +static struct sh_mobile_sdhi_info sdhi2_info __initdata = { + .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ | + MMC_CAP_POWER_OFF_CARD, + .tmio_caps2 = MMC_CAP2_NO_MULTI_READ, + .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | + TMIO_MMC_WRPROTECT_DISABLE, +}; + +static struct resource sdhi2_resources[] __initdata = { + DEFINE_RES_MEM(0xee140000, 0x100), + DEFINE_RES_IRQ(gic_spi(167)), +}; + static const struct pinctrl_map lager_pinctrl_map[] = { /* DU (CN10: ARGB0, CN13: LVDS) */ PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790", @@ -612,6 +655,20 @@ static const struct pinctrl_map lager_pinctrl_map[] = { /* SCIF1 (CN20: DEBUG SERIAL1) */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7790", "scif1_data", "scif1"), + /* SDHI0 */ + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7790", + "sdhi0_data4", "sdhi0"), + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7790", + "sdhi0_ctrl", "sdhi0"), + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7790", + "sdhi0_cd", "sdhi0"), + /* SDHI2 */ + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-r8a7790", + "sdhi2_data4", "sdhi2"), + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-r8a7790", + "sdhi2_ctrl", "sdhi2"), + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-r8a7790", + "sdhi2_cd", "sdhi2"), /* SSI (CN17: sound) */ PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7790", "ssi0129_ctrl", "ssi"), @@ -716,6 +773,13 @@ static void __init lager_add_standard_devices(void) lager_register_usbhs(); lager_add_rsnd_device(); + + platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 0, + sdhi0_resources, ARRAY_SIZE(sdhi0_resources), + &sdhi0_info, sizeof(struct sh_mobile_sdhi_info)); + platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 2, + sdhi2_resources, ARRAY_SIZE(sdhi2_resources), + &sdhi2_info, sizeof(struct sh_mobile_sdhi_info)); } /* From 248deabbd4a2f4c696338536fdaad3a01f66bee7 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 10 Feb 2014 11:47:28 +0100 Subject: [PATCH 55/92] ARM: shmobile: lager legacy: Add QSPI pinmux Signed-off-by: Geert Uytterhoeven Acked-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-lager.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index 90d7e812d97b..72886af7b737 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c @@ -649,6 +649,11 @@ static const struct pinctrl_map lager_pinctrl_map[] = { /* I2C2 */ PIN_MAP_MUX_GROUP_DEFAULT("i2c-rcar.2", "pfc-r8a7790", "i2c2", "i2c2"), + /* QSPI */ + PIN_MAP_MUX_GROUP_DEFAULT("qspi.0", "pfc-r8a7790", + "qspi_ctrl", "qspi"), + PIN_MAP_MUX_GROUP_DEFAULT("qspi.0", "pfc-r8a7790", + "qspi_data4", "qspi"), /* SCIF0 (CN19: DEBUG SERIAL0) */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790", "scif0_data", "scif0"), From 917163578a3dcfa3bfc05cc3bfc2653e2994971b Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 10 Feb 2014 11:47:31 +0100 Subject: [PATCH 56/92] ARM: shmobile: lager defconfig: Enable RSPI and MTD_M25P80 This enables support for the Spansion s25fl512s SPI FLASH on QSPI. Signed-off-by: Geert Uytterhoeven Acked-by: Magnus Damm [horms+renesas@verge.net.au: resolved conflict] Signed-off-by: Simon Horman --- arch/arm/configs/lager_defconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/configs/lager_defconfig b/arch/arm/configs/lager_defconfig index b17f48739013..58702440472a 100644 --- a/arch/arm/configs/lager_defconfig +++ b/arch/arm/configs/lager_defconfig @@ -51,6 +51,8 @@ CONFIG_IP_PNP_DHCP=y CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y +CONFIG_MTD=y +CONFIG_MTD_M25P80=y CONFIG_BLK_DEV_SD=y CONFIG_ATA=y CONFIG_SATA_RCAR=y @@ -86,6 +88,8 @@ CONFIG_SERIAL_SH_SCI_CONSOLE=y CONFIG_I2C=y CONFIG_I2C_GPIO=y CONFIG_I2C_RCAR=y +CONFIG_SPI=y +CONFIG_SPI_RSPI=y CONFIG_GPIO_SH_PFC=y CONFIG_GPIOLIB=y CONFIG_GPIO_RCAR=y From 8a76f048dc7fff769aa899f5ffc7975b57de0b16 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Fri, 14 Feb 2014 09:15:54 +0900 Subject: [PATCH 57/92] ARM: shmobile: Add defconfig for shmobile multiplatform This is intended to be a base for a defconfig to cover all shmobile multiplatform boards. It currently includes configuration for the following boards: * KZM9D * Lager * Koelsch Signed-off-by: Simon Horman Acked-by: Magnus Damm --- arch/arm/configs/shmobile_defconfig | 129 ++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 arch/arm/configs/shmobile_defconfig diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig new file mode 100644 index 000000000000..83b07258a385 --- /dev/null +++ b/arch/arm/configs/shmobile_defconfig @@ -0,0 +1,129 @@ +CONFIG_SYSVIPC=y +CONFIG_NO_HZ=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=16 +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_EMBEDDED=y +CONFIG_PERF_EVENTS=y +CONFIG_SLAB=y +CONFIG_ARCH_SHMOBILE_MULTI=y +CONFIG_ARCH_EMEV2=y +CONFIG_ARCH_R8A7790=y +CONFIG_ARCH_R8A7791=y +CONFIG_MACH_KOELSCH=y +CONFIG_MACH_LAGER=y +# CONFIG_SWP_EMULATE is not set +CONFIG_CPU_BPREDICT_DISABLE=y +CONFIG_PL310_ERRATA_588369=y +CONFIG_ARM_ERRATA_754322=y +CONFIG_PCI=y +CONFIG_PCI_RCAR_GEN2=y +CONFIG_SMP=y +CONFIG_SCHED_MC=y +CONFIG_HAVE_ARM_ARCH_TIMER=y +CONFIG_NR_CPUS=8 +CONFIG_AEABI=y +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_ARM_APPENDED_DTB=y +CONFIG_KEXEC=y +CONFIG_VFP=y +CONFIG_NEON=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_MTD=y +CONFIG_MTD_M25P80=y +CONFIG_BLK_DEV_SD=y +CONFIG_ATA=y +CONFIG_SATA_RCAR=y +CONFIG_NETDEVICES=y +# CONFIG_NET_VENDOR_ARC is not set +# CONFIG_NET_CADENCE is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_CIRRUS is not set +# CONFIG_NET_VENDOR_FARADAY is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +CONFIG_SH_ETH=y +# CONFIG_NET_VENDOR_SEEQ is not set +CONFIG_SMSC911X=y +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set +CONFIG_SMSC_PHY=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_KEYBOARD_GPIO=y +# CONFIG_INPUT_MOUSE is not set +# CONFIG_LEGACY_PTYS is not set +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_EM=y +CONFIG_SERIAL_SH_SCI=y +CONFIG_SERIAL_SH_SCI_NR_UARTS=20 +CONFIG_SERIAL_SH_SCI_CONSOLE=y +CONFIG_I2C_GPIO=y +CONFIG_I2C_RCAR=y +CONFIG_SPI=y +CONFIG_SPI_RSPI=y +CONFIG_GPIO_EM=y +CONFIG_GPIO_RCAR=y +# CONFIG_HWMON is not set +CONFIG_THERMAL=y +CONFIG_RCAR_THERMAL=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_GPIO=y +CONFIG_MEDIA_SUPPORT=y +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_SOC_CAMERA=y +CONFIG_SOC_CAMERA_PLATFORM=y +CONFIG_VIDEO_RCAR_VIN=y +# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set +CONFIG_VIDEO_ADV7180=y +CONFIG_DRM=y +CONFIG_DRM_RCAR_DU=y +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_SOC=y +CONFIG_SND_SOC_RCAR=y +CONFIG_USB_RCAR_GEN2_PHY=y +CONFIG_MMC=y +CONFIG_MMC_SDHI=y +CONFIG_MMC_SH_MMCIF=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_RTC_CLASS=y +CONFIG_DMADEVICES=y +CONFIG_SH_DMAE=y +# CONFIG_IOMMU_SUPPORT is not set +# CONFIG_DNOTIFY is not set +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_CONFIGFS_FS=y +# CONFIG_MISC_FILESYSTEMS is not set +CONFIG_NFS_FS=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_NFS_V4_1=y +CONFIG_ROOT_NFS=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ISO8859_1=y +# CONFIG_ENABLE_WARN_DEPRECATED is not set +# CONFIG_ENABLE_MUST_CHECK is not set +# CONFIG_ARM_UNWIND is not set From aa75fe820d269cc9e3eefeaba52f780b3593afda Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 12 Feb 2014 18:21:02 +0100 Subject: [PATCH 58/92] ARM: mvebu: enable audio options in mvebu_defconfig Since at least the Armada 370 SoC has audio support, it makes sense to enable the corresponding kernel configuration options in mvebu_defconfig. Signed-off-by: Thomas Petazzoni Signed-off-by: Jason Cooper --- arch/arm/configs/mvebu_v7_defconfig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/configs/mvebu_v7_defconfig b/arch/arm/configs/mvebu_v7_defconfig index 0f4511d2849f..5c58559d7a0c 100644 --- a/arch/arm/configs/mvebu_v7_defconfig +++ b/arch/arm/configs/mvebu_v7_defconfig @@ -62,6 +62,11 @@ CONFIG_GPIOLIB=y CONFIG_GPIO_SYSFS=y CONFIG_THERMAL=y CONFIG_ARMADA_THERMAL=y +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_SOC=y +CONFIG_SND_KIRKWOOD_SOC=y +CONFIG_SND_KIRKWOOD_SOC_ARMADA370_DB=y CONFIG_USB_SUPPORT=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y From 849f7b6c10d8016b55e13b7ad2e9f299e2da817b Mon Sep 17 00:00:00 2001 From: Valentine Barshak Date: Fri, 14 Feb 2014 12:29:48 +0900 Subject: [PATCH 59/92] ARM: shmobile: lager: Add internal USB PCI support This adds internal PCI USB host devices to R-Car H2 Lager board. Signed-off-by: Valentine Barshak [damm@opensource.se: Rebased and reworked to only include USB1 and USB2] Signed-off-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-lager.c | 50 ++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index 72886af7b737..193dff0267d8 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c @@ -638,6 +638,48 @@ static struct resource sdhi2_resources[] __initdata = { DEFINE_RES_IRQ(gic_spi(167)), }; +/* Internal PCI1 */ +static const struct resource pci1_resources[] __initconst = { + DEFINE_RES_MEM(0xee0b0000, 0x10000), /* CFG */ + DEFINE_RES_MEM(0xee0a0000, 0x10000), /* MEM */ + DEFINE_RES_IRQ(gic_spi(112)), +}; + +static const struct platform_device_info pci1_info __initconst = { + .parent = &platform_bus, + .name = "pci-rcar-gen2", + .id = 1, + .res = pci1_resources, + .num_res = ARRAY_SIZE(pci1_resources), + .dma_mask = DMA_BIT_MASK(32), +}; + +static void __init lager_add_usb1_device(void) +{ + platform_device_register_full(&pci1_info); +} + +/* Internal PCI2 */ +static const struct resource pci2_resources[] __initconst = { + DEFINE_RES_MEM(0xee0d0000, 0x10000), /* CFG */ + DEFINE_RES_MEM(0xee0c0000, 0x10000), /* MEM */ + DEFINE_RES_IRQ(gic_spi(113)), +}; + +static const struct platform_device_info pci2_info __initconst = { + .parent = &platform_bus, + .name = "pci-rcar-gen2", + .id = 2, + .res = pci2_resources, + .num_res = ARRAY_SIZE(pci2_resources), + .dma_mask = DMA_BIT_MASK(32), +}; + +static void __init lager_add_usb2_device(void) +{ + platform_device_register_full(&pci2_info); +} + static const struct pinctrl_map lager_pinctrl_map[] = { /* DU (CN10: ARGB0, CN13: LVDS) */ PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790", @@ -716,6 +758,12 @@ static const struct pinctrl_map lager_pinctrl_map[] = { /* USB0 */ PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs", "pfc-r8a7790", "usb0_ovc_vbus", "usb0"), + /* USB1 */ + PIN_MAP_MUX_GROUP_DEFAULT("pci-rcar-gen2.1", "pfc-r8a7790", + "usb1", "usb1"), + /* USB2 */ + PIN_MAP_MUX_GROUP_DEFAULT("pci-rcar-gen2.2", "pfc-r8a7790", + "usb2", "usb2"), }; static void __init lager_add_standard_devices(void) @@ -776,6 +824,8 @@ static void __init lager_add_standard_devices(void) &usbhs_phy_pdata, sizeof(usbhs_phy_pdata)); lager_register_usbhs(); + lager_add_usb1_device(); + lager_add_usb2_device(); lager_add_rsnd_device(); From 9a8c3ab9c0286a6c81012eaf9e95ec2d3e58d21f Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 16 Feb 2014 22:31:58 +0100 Subject: [PATCH 60/92] ARM: shmobile: lager-reference: Refactor clock lookup hack Make the clock lookup hack more generic to ease the addition of more devices. Signed-off-by: Laurent Pinchart Acked-by: Magnus Damm Signed-off-by: Simon Horman --- .../arm/mach-shmobile/board-lager-reference.c | 37 +++++++++++-------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c index dc8d76b9a9f1..634ef15e73e3 100644 --- a/arch/arm/mach-shmobile/board-lager-reference.c +++ b/arch/arm/mach-shmobile/board-lager-reference.c @@ -31,30 +31,37 @@ static void __init lager_add_standard_devices(void) { #ifdef CONFIG_COMMON_CLK /* - * This is a really crude hack to provide clkdev support to the SCIF - * and CMT devices until they get moved to DT. + * This is a really crude hack to provide clkdev support to platform + * devices until they get moved to DT. */ - static const char * const scif_names[] = { - "scifa0", "scifa1", "scifb0", "scifb1", - "scifb2", "scifa2", "scif0", "scif1", - "hscif0", "hscif1", + static const struct clk_name { + const char *clk; + const char *con_id; + const char *dev_id; + } clk_names[] = { + { "cmt0", NULL, "sh_cmt.0" }, + { "scifa0", NULL, "sh-sci.0" }, + { "scifa1", NULL, "sh-sci.1" }, + { "scifb0", NULL, "sh-sci.2" }, + { "scifb1", NULL, "sh-sci.3" }, + { "scifb2", NULL, "sh-sci.4" }, + { "scifa2", NULL, "sh-sci.5" }, + { "scif0", NULL, "sh-sci.6" }, + { "scif1", NULL, "sh-sci.7" }, + { "hscif0", NULL, "sh-sci.8" }, + { "hscif1", NULL, "sh-sci.9" }, }; struct clk *clk; unsigned int i; - for (i = 0; i < ARRAY_SIZE(scif_names); ++i) { - clk = clk_get(NULL, scif_names[i]); + for (i = 0; i < ARRAY_SIZE(clk_names); ++i) { + clk = clk_get(NULL, clk_names[i].clk); if (!IS_ERR(clk)) { - clk_register_clkdev(clk, NULL, "sh-sci.%u", i); + clk_register_clkdev(clk, clk_names[i].con_id, + clk_names[i].dev_id); clk_put(clk); } } - - clk = clk_get(NULL, "cmt0"); - if (!IS_ERR(clk)) { - clk_register_clkdev(clk, NULL, "sh_cmt.0"); - clk_put(clk); - } #else r8a7790_clock_init(); #endif From 433aa851d4b32dc3b3de1e84dc20b57e157b25b9 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 16 Feb 2014 22:31:59 +0100 Subject: [PATCH 61/92] ARM: shmobile: lager-reference: Add DU device The DU device has no DT bindings yet, instantiate it as a platform device for now. Signed-off-by: Laurent Pinchart Acked-by: Magnus Damm [horms+renesas@verge.net.au: omitted DTS portion] Signed-off-by: Simon Horman --- .../arm/mach-shmobile/board-lager-reference.c | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c index 634ef15e73e3..6ba8b3b41609 100644 --- a/arch/arm/mach-shmobile/board-lager-reference.c +++ b/arch/arm/mach-shmobile/board-lager-reference.c @@ -20,13 +20,72 @@ #include #include +#include #include #include +#include #include +#include #include #include #include +/* DU */ +static struct rcar_du_encoder_data lager_du_encoders[] = { + { + .type = RCAR_DU_ENCODER_VGA, + .output = RCAR_DU_OUTPUT_DPAD0, + }, { + .type = RCAR_DU_ENCODER_NONE, + .output = RCAR_DU_OUTPUT_LVDS1, + .connector.lvds.panel = { + .width_mm = 210, + .height_mm = 158, + .mode = { + .clock = 65000, + .hdisplay = 1024, + .hsync_start = 1048, + .hsync_end = 1184, + .htotal = 1344, + .vdisplay = 768, + .vsync_start = 771, + .vsync_end = 777, + .vtotal = 806, + .flags = 0, + }, + }, + }, +}; + +static struct rcar_du_platform_data lager_du_pdata = { + .encoders = lager_du_encoders, + .num_encoders = ARRAY_SIZE(lager_du_encoders), +}; + +static const struct resource du_resources[] __initconst = { + DEFINE_RES_MEM(0xfeb00000, 0x70000), + DEFINE_RES_MEM_NAMED(0xfeb90000, 0x1c, "lvds.0"), + DEFINE_RES_MEM_NAMED(0xfeb94000, 0x1c, "lvds.1"), + DEFINE_RES_IRQ(gic_spi(256)), + DEFINE_RES_IRQ(gic_spi(268)), + DEFINE_RES_IRQ(gic_spi(269)), +}; + +static void __init lager_add_du_device(void) +{ + struct platform_device_info info = { + .name = "rcar-du-r8a7790", + .id = -1, + .res = du_resources, + .num_res = ARRAY_SIZE(du_resources), + .data = &lager_du_pdata, + .size_data = sizeof(lager_du_pdata), + .dma_mask = DMA_BIT_MASK(32), + }; + + platform_device_register_full(&info); +} + static void __init lager_add_standard_devices(void) { #ifdef CONFIG_COMMON_CLK @@ -50,6 +109,11 @@ static void __init lager_add_standard_devices(void) { "scif1", NULL, "sh-sci.7" }, { "hscif0", NULL, "sh-sci.8" }, { "hscif1", NULL, "sh-sci.9" }, + { "du0", "du.0", "rcar-du-r8a7790" }, + { "du1", "du.1", "rcar-du-r8a7790" }, + { "du2", "du.2", "rcar-du-r8a7790" }, + { "lvds0", "lvds.0", "rcar-du-r8a7790" }, + { "lvds1", "lvds.1", "rcar-du-r8a7790" }, }; struct clk *clk; unsigned int i; @@ -68,6 +132,8 @@ static void __init lager_add_standard_devices(void) r8a7790_add_dt_devices(); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); + + lager_add_du_device(); } static const char *lager_boards_compat_dt[] __initdata = { From 189ef3d62df6701e58d216cf81277b88bb4ac7a8 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 16 Feb 2014 22:32:00 +0100 Subject: [PATCH 62/92] ARM: shmobile: koelsch-reference: Refactor clock lookup hack Make the clock lookup hack more generic to ease the addition of more devices. Signed-off-by: Laurent Pinchart Signed-off-by: Simon Horman --- .../mach-shmobile/board-koelsch-reference.c | 42 ++++++++++++------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c index feb8d97ea2f7..42c6eb4c3e67 100644 --- a/arch/arm/mach-shmobile/board-koelsch-reference.c +++ b/arch/arm/mach-shmobile/board-koelsch-reference.c @@ -32,30 +32,42 @@ static void __init koelsch_add_standard_devices(void) { #ifdef CONFIG_COMMON_CLK /* - * This is a really crude hack to provide clkdev support to the SCIF - * and CMT devices until they get moved to DT. + * This is a really crude hack to provide clkdev support to the CMT and + * DU devices until they get moved to DT. */ - static const char * const scif_names[] = { - "scifa0", "scifa1", "scifb0", "scifb1", "scifb2", "scifa2", - "scif0", "scif1", "scif2", "scif3", "scif4", "scif5", "scifa3", - "scifa4", "scifa5", + static const struct clk_name { + const char *clk; + const char *con_id; + const char *dev_id; + } clk_names[] = { + { "cmt0", NULL, "sh_cmt.0" }, + { "scifa0", NULL, "sh-sci.0" }, + { "scifa1", NULL, "sh-sci.1" }, + { "scifb0", NULL, "sh-sci.2" }, + { "scifb1", NULL, "sh-sci.3" }, + { "scifb2", NULL, "sh-sci.4" }, + { "scifa2", NULL, "sh-sci.5" }, + { "scif0", NULL, "sh-sci.6" }, + { "scif1", NULL, "sh-sci.7" }, + { "scif2", NULL, "sh-sci.8" }, + { "scif3", NULL, "sh-sci.9" }, + { "scif4", NULL, "sh-sci.10" }, + { "scif5", NULL, "sh-sci.11" }, + { "scifa3", NULL, "sh-sci.12" }, + { "scifa4", NULL, "sh-sci.13" }, + { "scifa5", NULL, "sh-sci.14" }, }; struct clk *clk; unsigned int i; - for (i = 0; i < ARRAY_SIZE(scif_names); ++i) { - clk = clk_get(NULL, scif_names[i]); + for (i = 0; i < ARRAY_SIZE(clk_names); ++i) { + clk = clk_get(NULL, clk_names[i].clk); if (!IS_ERR(clk)) { - clk_register_clkdev(clk, NULL, "sh-sci.%u", i); + clk_register_clkdev(clk, clk_names[i].con_id, + clk_names[i].dev_id); clk_put(clk); } } - - clk = clk_get(NULL, "cmt0"); - if (!IS_ERR(clk)) { - clk_register_clkdev(clk, NULL, "sh_cmt.0"); - clk_put(clk); - } #else r8a7791_clock_init(); #endif From 14c5ce178ee46b205ff4e9087d5ecba298798edc Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 16 Feb 2014 22:32:01 +0100 Subject: [PATCH 63/92] ARM: shmobile: koelsch-reference: Add DU device The DU device has no DT bindings yet, instantiate it as a platform device for now. Signed-off-by: Laurent Pinchart Acked-by: Magnus Damm [horms+renesas@verge.net.au: omitted DTS portion] Signed-off-by: Simon Horman --- .../mach-shmobile/board-koelsch-reference.c | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c index 42c6eb4c3e67..267fe8358cfe 100644 --- a/arch/arm/mach-shmobile/board-koelsch-reference.c +++ b/arch/arm/mach-shmobile/board-koelsch-reference.c @@ -21,13 +21,67 @@ #include #include +#include #include #include +#include #include +#include #include #include #include +/* DU */ +static struct rcar_du_encoder_data koelsch_du_encoders[] = { + { + .type = RCAR_DU_ENCODER_NONE, + .output = RCAR_DU_OUTPUT_LVDS0, + .connector.lvds.panel = { + .width_mm = 210, + .height_mm = 158, + .mode = { + .clock = 65000, + .hdisplay = 1024, + .hsync_start = 1048, + .hsync_end = 1184, + .htotal = 1344, + .vdisplay = 768, + .vsync_start = 771, + .vsync_end = 777, + .vtotal = 806, + .flags = 0, + }, + }, + }, +}; + +static struct rcar_du_platform_data koelsch_du_pdata = { + .encoders = koelsch_du_encoders, + .num_encoders = ARRAY_SIZE(koelsch_du_encoders), +}; + +static const struct resource du_resources[] __initconst = { + DEFINE_RES_MEM(0xfeb00000, 0x40000), + DEFINE_RES_MEM_NAMED(0xfeb90000, 0x1c, "lvds.0"), + DEFINE_RES_IRQ(gic_spi(256)), + DEFINE_RES_IRQ(gic_spi(268)), +}; + +static void __init koelsch_add_du_device(void) +{ + struct platform_device_info info = { + .name = "rcar-du-r8a7791", + .id = -1, + .res = du_resources, + .num_res = ARRAY_SIZE(du_resources), + .data = &koelsch_du_pdata, + .size_data = sizeof(koelsch_du_pdata), + .dma_mask = DMA_BIT_MASK(32), + }; + + platform_device_register_full(&info); +} + static void __init koelsch_add_standard_devices(void) { #ifdef CONFIG_COMMON_CLK @@ -56,6 +110,9 @@ static void __init koelsch_add_standard_devices(void) { "scifa3", NULL, "sh-sci.12" }, { "scifa4", NULL, "sh-sci.13" }, { "scifa5", NULL, "sh-sci.14" }, + { "du0", "du.0", "rcar-du-r8a7791" }, + { "du1", "du.1", "rcar-du-r8a7791" }, + { "lvds0", "lvds.0", "rcar-du-r8a7791" }, }; struct clk *clk; unsigned int i; @@ -73,6 +130,8 @@ static void __init koelsch_add_standard_devices(void) #endif r8a7791_add_dt_devices(); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); + + koelsch_add_du_device(); } static const char * const koelsch_boards_compat_dt[] __initconst = { From 78060840cd2286c0e382641e60dcd4145f82f881 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Sat, 15 Feb 2014 04:26:52 +0300 Subject: [PATCH 64/92] ARM: shmobile: Armadillo 800 EVA: set proper DMA masks for Ether device Ether MAC is a DMA-capable device and so should have 'dev.dma_mask' and 'dev.coherent_dma_mask' fields set properly, to reflect 32-bit DMA addressing ability. Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-armadillo800eva.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c index 93533e2710a8..4da3da7be3fa 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c @@ -383,6 +383,8 @@ static struct platform_device sh_eth_device = { .id = -1, .dev = { .platform_data = &sh_eth_platdata, + .dma_mask = &sh_eth_device.dev.coherent_dma_mask, + .coherent_dma_mask = DMA_BIT_MASK(32), }, .resource = sh_eth_resources, .num_resources = ARRAY_SIZE(sh_eth_resources), From ca6da5319761308e38bb97af9030d16e223355d1 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Sat, 15 Feb 2014 04:28:43 +0300 Subject: [PATCH 65/92] ARM: shmobile: BOCK-W: set proper DMA masks for Ether device Ether MAC is a DMA-capable device and so should have 'dev.dma_mask' and 'dev.coherent_dma_mask' fields set properly, to reflect 32-bit DMA addressing ability. Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-bockw.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index 684a529e400d..aaed215e96b9 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c @@ -1,9 +1,9 @@ /* * Bock-W board support * - * Copyright (C) 2013 Renesas Solutions Corp. + * Copyright (C) 2013-2014 Renesas Solutions Corp. * Copyright (C) 2013 Kuninori Morimoto - * Copyright (C) 2013 Cogent Embedded, Inc. + * Copyright (C) 2013-2014 Cogent Embedded, Inc. * * 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 @@ -235,6 +235,17 @@ static struct sh_eth_plat_data ether_platform_data __initdata = { .no_ether_link = 1, }; +static struct platform_device_info ether_info __initdata = { + .parent = &platform_bus, + .name = "r8a777x-ether", + .id = -1, + .res = ether_resources, + .num_res = ARRAY_SIZE(ether_resources), + .data = ðer_platform_data, + .size_data = sizeof(ether_platform_data), + .dma_mask = DMA_BIT_MASK(32), +}; + /* I2C */ static struct i2c_board_info i2c0_devices[] = { { @@ -592,11 +603,7 @@ static void __init bockw_init(void) r8a7778_init_irq_extpin(1); r8a7778_add_standard_devices(); - platform_device_register_resndata(&platform_bus, "r8a777x-ether", -1, - ether_resources, - ARRAY_SIZE(ether_resources), - ðer_platform_data, - sizeof(ether_platform_data)); + platform_device_register_full(ðer_info); platform_device_register_full(&vin0_info); /* VIN1 has a pin conflict with Ether */ From 5d5a87a5b6572426f8eae6e26ebcf9664d2d001a Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Sat, 15 Feb 2014 04:30:20 +0300 Subject: [PATCH 66/92] ARM: shmobile: Lager: set proper DMA masks for Ether device Ether MAC is a DMA-capable device and so should have 'dev.dma_mask' and 'dev.coherent_dma_mask' fields set properly, to reflect 32-bit DMA addressing ability. Currently, the code works without DMA masks but as we would have to enable CONFIG_HIGHMEM to access the full board memory in the future, when support for NETIF_F_SG would be added to the 'sh_eth' driver as well, the correct DMA masks should start to matter... Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-lager.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index 193dff0267d8..f0104bfe544e 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c @@ -1,8 +1,9 @@ /* * Lager board support * - * Copyright (C) 2013 Renesas Solutions Corp. + * Copyright (C) 2013-2014 Renesas Solutions Corp. * Copyright (C) 2013 Magnus Damm + * Copyright (C) 2014 Cogent Embedded, Inc. * * 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 @@ -275,6 +276,17 @@ static const struct resource ether_resources[] __initconst = { DEFINE_RES_IRQ(gic_spi(162)), }; +static const struct platform_device_info ether_info __initconst = { + .parent = &platform_bus, + .name = "r8a7790-ether", + .id = -1, + .res = ether_resources, + .num_res = ARRAY_SIZE(ether_resources), + .data = ðer_pdata, + .size_data = sizeof(ether_pdata), + .dma_mask = DMA_BIT_MASK(32), +}; + /* SPI Flash memory (Spansion S25FL512SAGMFIG11 64Mb) */ static struct mtd_partition spi_flash_part[] = { /* Reserved for user loader program, read-only */ @@ -791,10 +803,7 @@ static void __init lager_add_standard_devices(void) mmcif1_resources, ARRAY_SIZE(mmcif1_resources), &mmcif1_pdata, sizeof(mmcif1_pdata)); - platform_device_register_resndata(&platform_bus, "r8a7790-ether", -1, - ether_resources, - ARRAY_SIZE(ether_resources), - ðer_pdata, sizeof(ether_pdata)); + platform_device_register_full(ðer_info); lager_add_du_device(); From 379bfd7134bccccf58962b39e504bd639a5e75b2 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Sat, 15 Feb 2014 04:36:19 +0300 Subject: [PATCH 67/92] ARM: shmobile: Koelsch: set proper DMA masks for Ether device Ether MAC is a DMA-capable device and so should have 'dev.dma_mask' and 'dev.coherent_dma_mask' fields set properly, to reflect 32-bit DMA addressing ability. Currently, the code works without DMA masks but as we would have to enable CONFIG_HIGHMEM to access the full board memory in the future, when support for NETIF_F_SG would be added to the 'sh_eth' driver as well, the correct DMA masks should start to matter... Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-koelsch.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c index 893d47c7d7a6..5a034ff405d0 100644 --- a/arch/arm/mach-shmobile/board-koelsch.c +++ b/arch/arm/mach-shmobile/board-koelsch.c @@ -2,8 +2,9 @@ * Koelsch board support * * Copyright (C) 2013 Renesas Electronics Corporation - * Copyright (C) 2013 Renesas Solutions Corp. + * Copyright (C) 2013-2014 Renesas Solutions Corp. * Copyright (C) 2013 Magnus Damm + * Copyright (C) 2014 Cogent Embedded, Inc. * * 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 @@ -116,6 +117,17 @@ static const struct resource ether_resources[] __initconst = { DEFINE_RES_IRQ(gic_spi(162)), }; +static const struct platform_device_info ether_info __initconst = { + .parent = &platform_bus, + .name = "r8a7791-ether", + .id = -1, + .res = ether_resources, + .num_res = ARRAY_SIZE(ether_resources), + .data = ðer_pdata, + .size_data = sizeof(ether_pdata), + .dma_mask = DMA_BIT_MASK(32), +}; + /* LEDS */ static struct gpio_led koelsch_leds[] = { { @@ -426,10 +438,7 @@ static void __init koelsch_add_standard_devices(void) ARRAY_SIZE(koelsch_pinctrl_map)); r8a7791_pinmux_init(); r8a7791_add_standard_devices(); - platform_device_register_resndata(&platform_bus, "r8a7791-ether", -1, - ether_resources, - ARRAY_SIZE(ether_resources), - ðer_pdata, sizeof(ether_pdata)); + platform_device_register_full(ðer_info); platform_device_register_data(&platform_bus, "leds-gpio", -1, &koelsch_leds_pdata, sizeof(koelsch_leds_pdata)); From 583e2448629cc9fb3b1a0c850ddbe06819421d3e Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Sat, 15 Feb 2014 04:37:32 +0300 Subject: [PATCH 68/92] ARM: shmobile: Genmai: set proper DMA masks for Ether device Ether MAC is a DMA-capable device and so should have 'dev.dma_mask' and 'dev.coherent_dma_mask' fields set properly, to reflect 32-bit DMA addressing ability. Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-genmai.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-shmobile/board-genmai.c b/arch/arm/mach-shmobile/board-genmai.c index e240980cc227..6c328d63b819 100644 --- a/arch/arm/mach-shmobile/board-genmai.c +++ b/arch/arm/mach-shmobile/board-genmai.c @@ -1,8 +1,9 @@ /* * Genmai board support * - * Copyright (C) 2013 Renesas Solutions Corp. + * Copyright (C) 2013-2014 Renesas Solutions Corp. * Copyright (C) 2013 Magnus Damm + * Copyright (C) 2014 Cogent Embedded, Inc. * * 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 @@ -43,6 +44,17 @@ static const struct resource ether_resources[] __initconst = { DEFINE_RES_IRQ(gic_iid(359)), }; +static const struct platform_device_info ether_info __initconst = { + .parent = &platform_bus, + .name = "r7s72100-ether", + .id = -1, + .res = ether_resources, + .num_res = ARRAY_SIZE(ether_resources), + .data = ðer_pdata, + .size_data = sizeof(ether_pdata), + .dma_mask = DMA_BIT_MASK(32), +}; + /* RSPI */ #define RSPI_RESOURCE(idx, baseaddr, irq) \ static const struct resource rspi##idx##_resources[] __initconst = { \ @@ -82,10 +94,7 @@ static void __init genmai_add_standard_devices(void) r7s72100_clock_init(); r7s72100_add_dt_devices(); - platform_device_register_resndata(&platform_bus, "r7s72100-ether", -1, - ether_resources, - ARRAY_SIZE(ether_resources), - ðer_pdata, sizeof(ether_pdata)); + platform_device_register_full(ðer_info); r7s72100_register_rspi(0); r7s72100_register_rspi(1); From 30023bb4fae3eb30106c5f8986fc7ac87387aebc Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Thu, 13 Feb 2014 17:26:28 +0900 Subject: [PATCH 69/92] ARM: shmobile: Get rid of legacy KZM9D defconfig Get rid of the kzm9d_defconfig. The KZM9D is now supported as DT only in case of EMEV2 is selected in the kernel configuration. Signed-off-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/configs/kzm9d_defconfig | 91 -------------------------------- 1 file changed, 91 deletions(-) delete mode 100644 arch/arm/configs/kzm9d_defconfig diff --git a/arch/arm/configs/kzm9d_defconfig b/arch/arm/configs/kzm9d_defconfig deleted file mode 100644 index 1cc330b06bf6..000000000000 --- a/arch/arm/configs/kzm9d_defconfig +++ /dev/null @@ -1,91 +0,0 @@ -# CONFIG_ARM_PATCH_PHYS_VIRT is not set -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=16 -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_SYSCTL_SYSCALL=y -CONFIG_EMBEDDED=y -CONFIG_PERF_EVENTS=y -CONFIG_SLAB=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_SHMOBILE_LEGACY=y -CONFIG_ARCH_EMEV2=y -CONFIG_MACH_KZM9D=y -CONFIG_MEMORY_START=0x40000000 -CONFIG_MEMORY_SIZE=0x10000000 -# CONFIG_SH_TIMER_TMU is not set -# CONFIG_SWP_EMULATE is not set -# CONFIG_CACHE_L2X0 is not set -CONFIG_SMP=y -CONFIG_NR_CPUS=2 -CONFIG_HOTPLUG_CPU=y -# CONFIG_LOCAL_TIMERS is not set -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -# CONFIG_CROSS_MEMORY_ATTACH is not set -CONFIG_FORCE_MAX_ZONEORDER=13 -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_ARM_APPENDED_DTB=y -CONFIG_AUTO_ZRELADDR=y -CONFIG_VFP=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_PM_RUNTIME=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -# CONFIG_WIRELESS is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_BLK_DEV is not set -CONFIG_NETDEVICES=y -# CONFIG_NET_VENDOR_BROADCOM is not set -# CONFIG_NET_VENDOR_CHELSIO is not set -# CONFIG_NET_VENDOR_CIRRUS is not set -# CONFIG_NET_VENDOR_FARADAY is not set -# CONFIG_NET_VENDOR_INTEL is not set -# CONFIG_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_SEEQ is not set -CONFIG_SMSC911X=y -# CONFIG_NET_VENDOR_STMICRO is not set -# CONFIG_NET_VENDOR_WIZNET is not set -# CONFIG_WLAN is not set -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -# CONFIG_LEGACY_PTYS is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_EM=y -# CONFIG_HW_RANDOM is not set -CONFIG_GPIOLIB=y -CONFIG_GPIO_EM=y -# CONFIG_HWMON is not set -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -# CONFIG_IOMMU_SUPPORT is not set -# CONFIG_DNOTIFY is not set -CONFIG_TMPFS=y -# CONFIG_MISC_FILESYSTEMS is not set -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y -# CONFIG_FTRACE is not set From 62f95adf45722e14338d80d2bcfce2e00ad86026 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Thu, 13 Feb 2014 15:39:47 +0900 Subject: [PATCH 70/92] ARM: shmobile: koelsch: Enable SDHI, GPIO and regulators in defconfig Enable the following: * regulators (needed for SDHI) * SDHI * GPIO * GPIO keys * GPIO LEDs Signed-off-by: Simon Horman --- arch/arm/configs/koelsch_defconfig | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/configs/koelsch_defconfig b/arch/arm/configs/koelsch_defconfig index 95611392a20e..86faab565a96 100644 --- a/arch/arm/configs/koelsch_defconfig +++ b/arch/arm/configs/koelsch_defconfig @@ -59,6 +59,7 @@ CONFIG_SH_ETH=y # CONFIG_NET_VENDOR_VIA is not set # CONFIG_NET_VENDOR_WIZNET is not set # CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_KEYBOARD_GPIO=y # CONFIG_INPUT_MOUSE is not set # CONFIG_LEGACY_PTYS is not set CONFIG_SERIAL_SH_SCI=y @@ -68,13 +69,21 @@ CONFIG_I2C=y CONFIG_I2C_RCAR=y CONFIG_SPI=y CONFIG_SPI_RSPI=y +CONFIG_GPIOLIB=y +CONFIG_GPIO_RCAR=y # CONFIG_HWMON is not set CONFIG_THERMAL=y CONFIG_RCAR_THERMAL=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_GPIO=y # CONFIG_HID is not set # CONFIG_USB_SUPPORT is not set +CONFIG_MMC=y +CONFIG_MMC_SDHI=y CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y # CONFIG_IOMMU_SUPPORT is not set # CONFIG_DNOTIFY is not set CONFIG_TMPFS=y From 76149c035c59ad0be63ebb152e313d7ccce6616d Mon Sep 17 00:00:00 2001 From: Ivan Khoronzhuk Date: Tue, 10 Dec 2013 16:32:11 +0200 Subject: [PATCH 71/92] ARM: config: keystone: enable watchdog support Keystone SoC uses the same watchdog driver as Davinci, so enable WDT and core used by it. Signed-off-by: Ivan Khoronzhuk Signed-off-by: Santosh Shilimkar --- arch/arm/configs/keystone_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/keystone_defconfig b/arch/arm/configs/keystone_defconfig index 4582e160feab..332ca723763b 100644 --- a/arch/arm/configs/keystone_defconfig +++ b/arch/arm/configs/keystone_defconfig @@ -131,6 +131,8 @@ CONFIG_SPI_DAVINCI=y CONFIG_SPI_SPIDEV=y # CONFIG_HWMON is not set CONFIG_WATCHDOG=y +CONFIG_WATCHDOG_CORE=y +CONFIG_DAVINCI_WATCHDOG=y CONFIG_USB=y CONFIG_USB_DEBUG=y CONFIG_USB_ANNOUNCE_NEW_DEVICES=y From 82218c13e7ec0db28b05f92b5ef213b838750339 Mon Sep 17 00:00:00 2001 From: Grygorii Strashko Date: Mon, 10 Feb 2014 18:41:20 +0200 Subject: [PATCH 72/92] ARM: config: keystone: enable gpio support Enable enable GPIO support for Keystone by setting CONFIG_GPIOLIB and CONFIG_GPIO_DAVINCI options in keystone_defconfig. Signed-off-by: Grygorii Strashko Signed-off-by: Santosh Shilimkar --- arch/arm/configs/keystone_defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/configs/keystone_defconfig b/arch/arm/configs/keystone_defconfig index 332ca723763b..f9467ad379a0 100644 --- a/arch/arm/configs/keystone_defconfig +++ b/arch/arm/configs/keystone_defconfig @@ -179,3 +179,6 @@ CONFIG_CRYPTO_DES=y CONFIG_CRYPTO_ANSI_CPRNG=y CONFIG_CRYPTO_USER_API_HASH=y CONFIG_CRYPTO_USER_API_SKCIPHER=y +CONFIG_GPIOLIB=y +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_DAVINCI=y From 25427bf5c5d1edffac2cbe70444c9cc096baeb93 Mon Sep 17 00:00:00 2001 From: Grygorii Strashko Date: Mon, 10 Feb 2014 18:41:21 +0200 Subject: [PATCH 73/92] ARM: config: keystone: enable led support The Keystone GPIO functionality is ready for use, so LED support can be enabled in config. Signed-off-by: Grygorii Strashko Signed-off-by: Santosh Shilimkar --- arch/arm/configs/keystone_defconfig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/configs/keystone_defconfig b/arch/arm/configs/keystone_defconfig index f9467ad379a0..7056ef499657 100644 --- a/arch/arm/configs/keystone_defconfig +++ b/arch/arm/configs/keystone_defconfig @@ -182,3 +182,11 @@ CONFIG_CRYPTO_USER_API_SKCIPHER=y CONFIG_GPIOLIB=y CONFIG_GPIO_SYSFS=y CONFIG_GPIO_DAVINCI=y +CONFIG_LEDS_CLASS=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_GPIO=y From a96beda759f10bce58c64c2f2953331ed771a734 Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Mon, 10 Feb 2014 20:00:36 -0300 Subject: [PATCH 74/92] ARM: mvebu: Enable watchdog support in defconfig Now that we have proper support for Armada 370/XP watchdog let's enable it in mvebu_defconfig and multi_v7_defconfig. Signed-off-by: Ezequiel Garcia Signed-off-by: Jason Cooper --- arch/arm/configs/multi_v7_defconfig | 2 ++ arch/arm/configs/mvebu_v7_defconfig | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 845bc745706b..51cee833333c 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -187,6 +187,8 @@ CONFIG_POWER_RESET_GPIO=y CONFIG_SENSORS_LM90=y CONFIG_THERMAL=y CONFIG_ARMADA_THERMAL=y +CONFIG_WATCHDOG=y +CONFIG_ORION_WATCHDOG=y CONFIG_MFD_AS3722=y CONFIG_MFD_CROS_EC=y CONFIG_MFD_CROS_EC_SPI=y diff --git a/arch/arm/configs/mvebu_v7_defconfig b/arch/arm/configs/mvebu_v7_defconfig index 5c58559d7a0c..0ce72c159ab8 100644 --- a/arch/arm/configs/mvebu_v7_defconfig +++ b/arch/arm/configs/mvebu_v7_defconfig @@ -67,6 +67,8 @@ CONFIG_SND=y CONFIG_SND_SOC=y CONFIG_SND_KIRKWOOD_SOC=y CONFIG_SND_KIRKWOOD_SOC_ARMADA370_DB=y +CONFIG_WATCHDOG=y +CONFIG_ORION_WATCHDOG=y CONFIG_USB_SUPPORT=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y From ea7621968b522bc17fb3cb681f294cffb607eca1 Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Mon, 10 Feb 2014 20:00:37 -0300 Subject: [PATCH 75/92] ARM: dove: Enable watchdog support in the defconfig Now that we have watchdog support, let's add it to the defconfig. Signed-off-by: Ezequiel Garcia Signed-off-by: Jason Cooper --- arch/arm/configs/dove_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/dove_defconfig b/arch/arm/configs/dove_defconfig index 7242b11682ad..f15955144175 100644 --- a/arch/arm/configs/dove_defconfig +++ b/arch/arm/configs/dove_defconfig @@ -79,6 +79,8 @@ CONFIG_SPI_ORION=y # CONFIG_HWMON is not set CONFIG_THERMAL=y CONFIG_DOVE_THERMAL=y +CONFIG_WATCHDOG=y +CONFIG_ORION_WATCHDOG=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_EHCI_HCD=y From dd1d03afe8a0825d718f5d74225ad57978599a89 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 17 Feb 2014 15:23:30 +0100 Subject: [PATCH 76/92] ARM: mvebu: update defconfigs for Armada 375 and 38x This commit enables the Armada 375 and Armada 38x support in mvebu_defconfig and multi_v7_defconfig. Signed-off-by: Thomas Petazzoni Signed-off-by: Jason Cooper --- arch/arm/configs/multi_v7_defconfig | 2 ++ arch/arm/configs/mvebu_v7_defconfig | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 51cee833333c..11eb6e1f38d9 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -9,6 +9,8 @@ CONFIG_MODULE_UNLOAD=y CONFIG_PARTITION_ADVANCED=y CONFIG_ARCH_MVEBU=y CONFIG_MACH_ARMADA_370=y +CONFIG_MACH_ARMADA_375=y +CONFIG_MACH_ARMADA_38X=y CONFIG_MACH_ARMADA_XP=y CONFIG_ARCH_BCM=y CONFIG_ARCH_BCM_MOBILE=y diff --git a/arch/arm/configs/mvebu_v7_defconfig b/arch/arm/configs/mvebu_v7_defconfig index 0ce72c159ab8..62b6a37626c5 100644 --- a/arch/arm/configs/mvebu_v7_defconfig +++ b/arch/arm/configs/mvebu_v7_defconfig @@ -10,6 +10,8 @@ CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y CONFIG_ARCH_MVEBU=y CONFIG_MACH_ARMADA_370=y +CONFIG_MACH_ARMADA_375=y +CONFIG_MACH_ARMADA_38X=y CONFIG_MACH_ARMADA_XP=y # CONFIG_CACHE_L2X0 is not set # CONFIG_SWP_EMULATE is not set From 1ee101d9c416823f960a4841ef81044d461034b5 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Mon, 17 Feb 2014 16:24:19 +0900 Subject: [PATCH 77/92] ARM: shmobile: Remove KZM9D board code Get rid of KZM9D board code written in C. This version of the C board code was used in the case of multiplatform, but these days DT can be used instead, so because of that simply get rid of the C code to simplify and save space. Signed-off-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/Kconfig | 6 --- arch/arm/mach-shmobile/Makefile | 1 - .../arm/mach-shmobile/board-kzm9d-reference.c | 47 ------------------- 3 files changed, 54 deletions(-) delete mode 100644 arch/arm/mach-shmobile/board-kzm9d-reference.c diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index c431114d6325..cc2a18241944 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig @@ -47,12 +47,6 @@ config MACH_KOELSCH depends on ARCH_R8A7791 select MICREL_PHY if SH_ETH -config MACH_KZM9D - bool "KZM9D board" - depends on ARCH_EMEV2 - select REGULATOR_FIXED_VOLTAGE if REGULATOR - select SMSC_PHY if SMSC911X - config MACH_LAGER bool "Lager board" depends on ARCH_R8A7790 diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile index fe7d4ff706e4..1402d602f5a4 100644 --- a/arch/arm/mach-shmobile/Makefile +++ b/arch/arm/mach-shmobile/Makefile @@ -58,7 +58,6 @@ obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o ifdef CONFIG_ARCH_SHMOBILE_MULTI obj-$(CONFIG_MACH_GENMAI) += board-genmai-reference.o obj-$(CONFIG_MACH_KOELSCH) += board-koelsch-reference.o -obj-$(CONFIG_MACH_KZM9D) += board-kzm9d-reference.o obj-$(CONFIG_MACH_LAGER) += board-lager-reference.o else obj-$(CONFIG_MACH_APE6EVM) += board-ape6evm.o diff --git a/arch/arm/mach-shmobile/board-kzm9d-reference.c b/arch/arm/mach-shmobile/board-kzm9d-reference.c deleted file mode 100644 index 853003c8988a..000000000000 --- a/arch/arm/mach-shmobile/board-kzm9d-reference.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * kzm9d board support - Reference DT implementation - * - * Copyright (C) 2013 Renesas Solutions Corp. - * Copyright (C) 2013 Magnus Damm - * - * 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; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include -#include -#include -#include -#include -#include - -static void __init kzm9d_add_standard_devices(void) -{ - of_clk_init(NULL); - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); -} - -static const char *kzm9d_boards_compat_dt[] __initdata = { - "renesas,kzm9d", - "renesas,kzm9d-reference", - NULL, -}; - -DT_MACHINE_START(KZM9D_DT, "kzm9d") - .smp = smp_ops(emev2_smp_ops), - .map_io = emev2_map_io, - .init_early = emev2_init_delay, - .init_machine = kzm9d_add_standard_devices, - .init_late = shmobile_init_late, - .dt_compat = kzm9d_boards_compat_dt, -MACHINE_END From 34b6a241de1d965b1c047a97fad602687218a866 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Mon, 17 Feb 2014 16:21:28 +0900 Subject: [PATCH 78/92] ARM: shmobile: Remove Koelsch DT reference legacy clock bits Koelsch DT reference is these days built for multiplatform only which means that CCF comes with the package. Remove unused legacy code ifdefs to clean up the code. Signed-off-by: Magnus Damm Acked-by: Laurent Pinchart Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-koelsch-reference.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c index 267fe8358cfe..a3fd30242bd8 100644 --- a/arch/arm/mach-shmobile/board-koelsch-reference.c +++ b/arch/arm/mach-shmobile/board-koelsch-reference.c @@ -84,7 +84,6 @@ static void __init koelsch_add_du_device(void) static void __init koelsch_add_standard_devices(void) { -#ifdef CONFIG_COMMON_CLK /* * This is a really crude hack to provide clkdev support to the CMT and * DU devices until they get moved to DT. @@ -125,9 +124,7 @@ static void __init koelsch_add_standard_devices(void) clk_put(clk); } } -#else - r8a7791_clock_init(); -#endif + r8a7791_add_dt_devices(); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); From 6197c08ab81cf1430cbe7346fd6ca0b5a18580bf Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Mon, 17 Feb 2014 16:19:45 +0900 Subject: [PATCH 79/92] ARM: shmobile: Remove Lager DT reference legacy clock bits Lager DT reference is these days built for multiplatform only which means that CCF comes with the package. Remove unused legacy code ifdefs to clean up the code. Signed-off-by: Magnus Damm Acked-by: Laurent Pinchart Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-lager-reference.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c index 6ba8b3b41609..440aac36d693 100644 --- a/arch/arm/mach-shmobile/board-lager-reference.c +++ b/arch/arm/mach-shmobile/board-lager-reference.c @@ -88,7 +88,6 @@ static void __init lager_add_du_device(void) static void __init lager_add_standard_devices(void) { -#ifdef CONFIG_COMMON_CLK /* * This is a really crude hack to provide clkdev support to platform * devices until they get moved to DT. @@ -126,9 +125,6 @@ static void __init lager_add_standard_devices(void) clk_put(clk); } } -#else - r8a7790_clock_init(); -#endif r8a7790_add_dt_devices(); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); From 7573e89ba1fcbe492c52d5b1e72fcf5d23da21d1 Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Mon, 17 Feb 2014 22:19:19 +0100 Subject: [PATCH 80/92] ARM: shmobile: r7s72100: update defconfig for I2C usage Select the correct I2C driver and activate EEPROM support to have a slave device for testing. Also activate i2c-dev, so i2c-tools will work. Signed-off-by: Wolfram Sang Acked-by: Magnus Damm Signed-off-by: Simon Horman --- arch/arm/configs/genmai_defconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/configs/genmai_defconfig b/arch/arm/configs/genmai_defconfig index 5ee6ac0931f7..d238fafb6762 100644 --- a/arch/arm/configs/genmai_defconfig +++ b/arch/arm/configs/genmai_defconfig @@ -52,6 +52,7 @@ CONFIG_IP_PNP_DHCP=y CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y +CONFIG_EEPROM_AT24=y CONFIG_NETDEVICES=y # CONFIG_NET_CORE is not set # CONFIG_NET_VENDOR_ARC is not set @@ -80,7 +81,8 @@ CONFIG_SERIAL_SH_SCI=y CONFIG_SERIAL_SH_SCI_NR_UARTS=10 CONFIG_SERIAL_SH_SCI_CONSOLE=y # CONFIG_HW_RANDOM is not set -CONFIG_I2C_SH_MOBILE=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_RIIC=y CONFIG_SPI=y CONFIG_SPI_RSPI=y # CONFIG_HWMON is not set From b045f05456836f4d43f3770b09c9e8a1ff013c14 Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Sat, 22 Feb 2014 20:15:02 +0100 Subject: [PATCH 81/92] ARM: config: Add a multi_v5_defconfig To allow regression build testing of multi v5 systems, add a multi_v5_defconfig, similar to the multi_v7_defconfig. This is based on kirkwood_defconfig, but with a few other boards added which claim to be MULTI_v5. Signed-off-by: Andrew Lunn Tested-by: Jason Gunthorpe Signed-off-by: Jason Cooper --- arch/arm/configs/multi_v5_defconfig | 185 ++++++++++++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 arch/arm/configs/multi_v5_defconfig diff --git a/arch/arm/configs/multi_v5_defconfig b/arch/arm/configs/multi_v5_defconfig new file mode 100644 index 000000000000..2bc1e1707930 --- /dev/null +++ b/arch/arm/configs/multi_v5_defconfig @@ -0,0 +1,185 @@ +CONFIG_SYSVIPC=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_LOG_BUF_SHIFT=19 +CONFIG_PROFILING=y +CONFIG_OPROFILE=y +CONFIG_KPROBES=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_ARCH_MULTI_V7 is not set +CONFIG_ARCH_MVEBU=y +CONFIG_MACH_KIRKWOOD=y +CONFIG_ARCH_MXC=y +CONFIG_MACH_IMX25_DT=y +CONFIG_MACH_IMX27_DT=y +CONFIG_ARCH_U300=y +CONFIG_PCI_MVEBU=y +CONFIG_PREEMPT=y +CONFIG_AEABI=y +CONFIG_HIGHMEM=y +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_ARM_APPENDED_DTB=y +CONFIG_ARM_ATAG_DTB_COMPAT=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_STAT_DETAILS=y +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y +CONFIG_CPU_IDLE=y +CONFIG_ARM_KIRKWOOD_CPUIDLE=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +# CONFIG_IPV6 is not set +CONFIG_NET_PKTGEN=m +CONFIG_CFG80211=y +CONFIG_MAC80211=y +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_CFI=y +CONFIG_MTD_JEDECPROBE=y +CONFIG_MTD_CFI_ADV_OPTIONS=y +CONFIG_MTD_CFI_GEOMETRY=y +# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set +CONFIG_MTD_CFI_INTELEXT=y +CONFIG_MTD_CFI_STAA=y +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_M25P80=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_ORION=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_EEPROM_AT24=y +# CONFIG_SCSI_PROC_FS is not set +CONFIG_BLK_DEV_SD=y +CONFIG_BLK_DEV_SR=m +CONFIG_CHR_DEV_SG=m +CONFIG_ATA=y +CONFIG_SATA_AHCI=y +CONFIG_SATA_MV=y +CONFIG_NETDEVICES=y +CONFIG_NET_DSA_MV88E6123_61_65=y +CONFIG_MV643XX_ETH=y +CONFIG_R8169=y +CONFIG_MARVELL_PHY=y +CONFIG_LIBERTAS=y +CONFIG_LIBERTAS_SDIO=y +CONFIG_INPUT_EVDEV=y +CONFIG_KEYBOARD_GPIO=y +# CONFIG_INPUT_MOUSE is not set +CONFIG_LEGACY_PTY_COUNT=16 +# CONFIG_DEVKMEM is not set +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_RUNTIME_UARTS=2 +CONFIG_SERIAL_OF_PLATFORM=y +# CONFIG_HW_RANDOM is not set +CONFIG_I2C=y +# CONFIG_I2C_COMPAT is not set +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MV64XXX=y +CONFIG_I2C_NOMADIK=y +CONFIG_SPI=y +CONFIG_SPI_ORION=y +CONFIG_GPIO_SYSFS=y +CONFIG_POWER_SUPPLY=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_GPIO=y +CONFIG_POWER_RESET_QNAP=y +CONFIG_SENSORS_ADT7475=y +CONFIG_SENSORS_LM63=y +CONFIG_SENSORS_LM75=y +CONFIG_SENSORS_LM85=y +CONFIG_THERMAL=y +CONFIG_KIRKWOOD_THERMAL=y +CONFIG_WATCHDOG=y +CONFIG_ORION_WATCHDOG=y +# CONFIG_ABX500_CORE is not set +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_SOC=y +CONFIG_SND_KIRKWOOD_SOC=y +CONFIG_HID_DRAGONRISE=y +CONFIG_HID_GYRATION=y +CONFIG_HID_TWINHAN=y +CONFIG_HID_NTRIG=y +CONFIG_HID_PANTHERLORD=y +CONFIG_HID_PETALYNX=y +CONFIG_HID_SAMSUNG=y +CONFIG_HID_SONY=y +CONFIG_HID_SUNPLUS=y +CONFIG_HID_GREENASIA=y +CONFIG_HID_SMARTJOYPLUS=y +CONFIG_HID_TOPSEED=y +CONFIG_HID_THRUSTMASTER=y +CONFIG_HID_ZEROPLUS=y +CONFIG_USB=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +CONFIG_USB_PRINTER=m +CONFIG_USB_STORAGE=y +CONFIG_USB_STORAGE_DATAFAB=y +CONFIG_USB_STORAGE_FREECOM=y +CONFIG_USB_STORAGE_SDDR09=y +CONFIG_USB_STORAGE_SDDR55=y +CONFIG_USB_STORAGE_JUMPSHOT=y +CONFIG_MMC=y +CONFIG_SDIO_UART=y +CONFIG_MMC_MVSDIO=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_RS5C372=y +CONFIG_RTC_DRV_PCF8563=y +CONFIG_RTC_DRV_S35390A=y +CONFIG_RTC_DRV_MV=y +CONFIG_DMADEVICES=y +CONFIG_MV_XOR=y +CONFIG_EXT2_FS=y +CONFIG_EXT3_FS=y +# CONFIG_EXT3_FS_XATTR is not set +CONFIG_EXT4_FS=y +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_UDF_FS=m +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_JFFS2_FS=y +CONFIG_CRAMFS=y +CONFIG_NFS_FS=y +CONFIG_ROOT_NFS=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_850=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_2=y +CONFIG_NLS_UTF8=y +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_FS=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_DEBUG_KERNEL=y +# CONFIG_SCHED_DEBUG is not set +# CONFIG_DEBUG_PREEMPT is not set +# CONFIG_FTRACE is not set +CONFIG_DEBUG_USER=y +CONFIG_CRYPTO_CBC=m +CONFIG_CRYPTO_PCBC=m +# CONFIG_CRYPTO_ANSI_CPRNG is not set +CONFIG_CRYPTO_DEV_MV_CESA=y +CONFIG_CRC_CCITT=y +CONFIG_LIBCRC32C=y From a36bf67c0e58d5c834a059bb0bab9787e3fc6013 Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Sat, 22 Feb 2014 20:15:04 +0100 Subject: [PATCH 82/92] ARM: config: Add mvebu_v5_defconfig Now that there is both v5 and v7 systems in mach-mvebu, the mvebu_defconfig is not sufficient, since these systems cannot be combined. Add a v5 defconfig which is based on kirkwood_defconfig, but purely DT. Signed-off-by: Andrew Lunn Acked-by: Arnd Bergmann Tested-by: Jason Gunthorpe Signed-off-by: Jason Cooper --- arch/arm/configs/mvebu_v5_defconfig | 172 ++++++++++++++++++++++++++++ 1 file changed, 172 insertions(+) create mode 100644 arch/arm/configs/mvebu_v5_defconfig diff --git a/arch/arm/configs/mvebu_v5_defconfig b/arch/arm/configs/mvebu_v5_defconfig new file mode 100644 index 000000000000..2844636c0cf2 --- /dev/null +++ b/arch/arm/configs/mvebu_v5_defconfig @@ -0,0 +1,172 @@ +CONFIG_SYSVIPC=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_LOG_BUF_SHIFT=19 +CONFIG_PROFILING=y +CONFIG_OPROFILE=y +CONFIG_KPROBES=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_ARCH_MULTI_V7 is not set +CONFIG_ARCH_MVEBU=y +CONFIG_MACH_KIRKWOOD=y +# CONFIG_CPU_FEROCEON_OLD_ID is not set +CONFIG_PCI_MVEBU=y +CONFIG_PREEMPT=y +CONFIG_AEABI=y +CONFIG_HIGHMEM=y +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_STAT_DETAILS=y +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y +CONFIG_CPU_IDLE=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +# CONFIG_IPV6 is not set +CONFIG_NET_PKTGEN=m +CONFIG_CFG80211=y +CONFIG_MAC80211=y +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_CFI=y +CONFIG_MTD_JEDECPROBE=y +CONFIG_MTD_CFI_ADV_OPTIONS=y +CONFIG_MTD_CFI_GEOMETRY=y +# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set +CONFIG_MTD_CFI_INTELEXT=y +CONFIG_MTD_CFI_STAA=y +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_M25P80=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_ORION=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_EEPROM_AT24=y +# CONFIG_SCSI_PROC_FS is not set +CONFIG_BLK_DEV_SD=y +CONFIG_BLK_DEV_SR=m +CONFIG_CHR_DEV_SG=m +CONFIG_ATA=y +CONFIG_SATA_AHCI=y +CONFIG_SATA_MV=y +CONFIG_NETDEVICES=y +CONFIG_NET_DSA_MV88E6123_61_65=y +CONFIG_MV643XX_ETH=y +CONFIG_R8169=y +CONFIG_MARVELL_PHY=y +CONFIG_LIBERTAS=y +CONFIG_LIBERTAS_SDIO=y +CONFIG_INPUT_EVDEV=y +CONFIG_KEYBOARD_GPIO=y +# CONFIG_INPUT_MOUSE is not set +CONFIG_LEGACY_PTY_COUNT=16 +# CONFIG_DEVKMEM is not set +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_RUNTIME_UARTS=2 +CONFIG_SERIAL_OF_PLATFORM=y +# CONFIG_HW_RANDOM is not set +CONFIG_I2C=y +# CONFIG_I2C_COMPAT is not set +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MV64XXX=y +CONFIG_SPI=y +CONFIG_SPI_ORION=y +CONFIG_GPIO_SYSFS=y +CONFIG_POWER_SUPPLY=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_GPIO=y +CONFIG_POWER_RESET_QNAP=y +CONFIG_SENSORS_ADT7475=y +CONFIG_SENSORS_LM63=y +CONFIG_SENSORS_LM75=y +CONFIG_SENSORS_LM85=y +CONFIG_THERMAL=y +CONFIG_WATCHDOG=y +CONFIG_ORION_WATCHDOG=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_HID_DRAGONRISE=y +CONFIG_HID_GYRATION=y +CONFIG_HID_TWINHAN=y +CONFIG_HID_NTRIG=y +CONFIG_HID_PANTHERLORD=y +CONFIG_HID_PETALYNX=y +CONFIG_HID_SAMSUNG=y +CONFIG_HID_SONY=y +CONFIG_HID_SUNPLUS=y +CONFIG_HID_GREENASIA=y +CONFIG_HID_SMARTJOYPLUS=y +CONFIG_HID_TOPSEED=y +CONFIG_HID_THRUSTMASTER=y +CONFIG_HID_ZEROPLUS=y +CONFIG_USB=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +CONFIG_USB_PRINTER=m +CONFIG_USB_STORAGE=y +CONFIG_USB_STORAGE_DATAFAB=y +CONFIG_USB_STORAGE_FREECOM=y +CONFIG_USB_STORAGE_SDDR09=y +CONFIG_USB_STORAGE_SDDR55=y +CONFIG_USB_STORAGE_JUMPSHOT=y +CONFIG_MMC=y +CONFIG_SDIO_UART=y +CONFIG_MMC_MVSDIO=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_RS5C372=y +CONFIG_RTC_DRV_PCF8563=y +CONFIG_RTC_DRV_S35390A=y +CONFIG_RTC_DRV_MV=y +CONFIG_DMADEVICES=y +CONFIG_MV_XOR=y +CONFIG_EXT2_FS=y +CONFIG_EXT3_FS=y +# CONFIG_EXT3_FS_XATTR is not set +CONFIG_EXT4_FS=y +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_UDF_FS=m +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_JFFS2_FS=y +CONFIG_CRAMFS=y +CONFIG_NFS_FS=y +CONFIG_ROOT_NFS=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_850=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_2=y +CONFIG_NLS_UTF8=y +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_FS=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_DEBUG_KERNEL=y +# CONFIG_SCHED_DEBUG is not set +# CONFIG_DEBUG_PREEMPT is not set +# CONFIG_FTRACE is not set +CONFIG_DEBUG_USER=y +CONFIG_CRYPTO_CBC=m +CONFIG_CRYPTO_PCBC=m +# CONFIG_CRYPTO_ANSI_CPRNG is not set +CONFIG_CRYPTO_DEV_MV_CESA=y +CONFIG_CRC_CCITT=y +CONFIG_LIBCRC32C=y From 7c8f827f57ad1a7f52e1679ded1b99d8a0c881ad Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Tue, 25 Feb 2014 18:34:03 +0100 Subject: [PATCH 83/92] ARM: kirkwood: Add HP T5325 devices to {multi|mvebu}_v5_defconfig The HP T5325 has a PCI based VGA controller. Add the frame buffer driver, and frame buffer support to the defconfig's. Additionally add the soc audio framework and the necessary codec. Signed-off-by: Andrew Lunn Signed-off-by: Jason Cooper --- arch/arm/configs/multi_v5_defconfig | 9 +++++++++ arch/arm/configs/mvebu_v5_defconfig | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/arch/arm/configs/multi_v5_defconfig b/arch/arm/configs/multi_v5_defconfig index 2bc1e1707930..84ba24a0ead7 100644 --- a/arch/arm/configs/multi_v5_defconfig +++ b/arch/arm/configs/multi_v5_defconfig @@ -11,6 +11,7 @@ CONFIG_MODULE_UNLOAD=y # CONFIG_ARCH_MULTI_V7 is not set CONFIG_ARCH_MVEBU=y CONFIG_MACH_KIRKWOOD=y +CONFIG_MACH_T5325=y CONFIG_ARCH_MXC=y CONFIG_MACH_IMX25_DT=y CONFIG_MACH_IMX27_DT=y @@ -101,6 +102,12 @@ CONFIG_THERMAL=y CONFIG_KIRKWOOD_THERMAL=y CONFIG_WATCHDOG=y CONFIG_ORION_WATCHDOG=y +CONFIG_FB=y +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_SOC=y +CONFIG_SND_KIRKWOOD_SOC=y +CONFIG_SND_KIRKWOOD_SOC_T5325=y # CONFIG_ABX500_CORE is not set CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED_VOLTAGE=y @@ -150,6 +157,8 @@ CONFIG_RTC_DRV_S35390A=y CONFIG_RTC_DRV_MV=y CONFIG_DMADEVICES=y CONFIG_MV_XOR=y +CONFIG_STAGING=y +CONFIG_FB_XGI=y CONFIG_EXT2_FS=y CONFIG_EXT3_FS=y # CONFIG_EXT3_FS_XATTR is not set diff --git a/arch/arm/configs/mvebu_v5_defconfig b/arch/arm/configs/mvebu_v5_defconfig index 2844636c0cf2..36484a37a1ca 100644 --- a/arch/arm/configs/mvebu_v5_defconfig +++ b/arch/arm/configs/mvebu_v5_defconfig @@ -11,6 +11,7 @@ CONFIG_MODULE_UNLOAD=y # CONFIG_ARCH_MULTI_V7 is not set CONFIG_ARCH_MVEBU=y CONFIG_MACH_KIRKWOOD=y +CONFIG_MACH_T5325=y # CONFIG_CPU_FEROCEON_OLD_ID is not set CONFIG_PCI_MVEBU=y CONFIG_PREEMPT=y @@ -93,6 +94,12 @@ CONFIG_SENSORS_LM85=y CONFIG_THERMAL=y CONFIG_WATCHDOG=y CONFIG_ORION_WATCHDOG=y +CONFIG_FB=y +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_SOC=y +CONFIG_SND_KIRKWOOD_SOC=y +CONFIG_SND_KIRKWOOD_SOC_T5325=y CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED_VOLTAGE=y CONFIG_HID_DRAGONRISE=y @@ -137,6 +144,8 @@ CONFIG_RTC_DRV_S35390A=y CONFIG_RTC_DRV_MV=y CONFIG_DMADEVICES=y CONFIG_MV_XOR=y +CONFIG_STAGING=y +CONFIG_FB_XGI=y CONFIG_EXT2_FS=y CONFIG_EXT3_FS=y # CONFIG_EXT3_FS_XATTR is not set From b3e2e24348e3d5bf92bca4cecc09889f0969b868 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Tue, 25 Feb 2014 14:34:05 -0600 Subject: [PATCH 84/92] ARM: qcom: Enable basic support for Qualcomm platforms in multi_v7_defconfig Enable support for the MSM8x60, MSM8960, and MSM8974 SoCs, clocks and serial console as part of the standard multi_v7_defconfig. Signed-off-by: Kumar Gala [khilman: removed non-qcom changes] Signed-off-by: Kevin Hilman --- arch/arm/configs/multi_v7_defconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 56549f178fe3..64e850d4896c 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -33,6 +33,10 @@ CONFIG_SOC_OMAP5=y CONFIG_SOC_AM33XX=y CONFIG_SOC_DRA7XX=y CONFIG_SOC_AM43XX=y +CONFIG_ARCH_QCOM=y +CONFIG_ARCH_MSM8X60=y +CONFIG_ARCH_MSM8960=y +CONFIG_ARCH_MSM8974=y CONFIG_ARCH_ROCKCHIP=y CONFIG_ARCH_SOCFPGA=y CONFIG_PLAT_SPEAR=y @@ -148,6 +152,8 @@ CONFIG_SERIAL_SIRFSOC_CONSOLE=y CONFIG_SERIAL_TEGRA=y CONFIG_SERIAL_IMX=y CONFIG_SERIAL_IMX_CONSOLE=y +CONFIG_SERIAL_MSM=y +CONFIG_SERIAL_MSM_CONSOLE=y CONFIG_SERIAL_VT8500=y CONFIG_SERIAL_VT8500_CONSOLE=y CONFIG_SERIAL_OF_PLATFORM=y @@ -298,6 +304,10 @@ CONFIG_MFD_NVEC=y CONFIG_KEYBOARD_NVEC=y CONFIG_SERIO_NVEC_PS2=y CONFIG_NVEC_POWER=y +CONFIG_COMMON_CLK_QCOM=y +CONFIG_MSM_GCC_8660=y +CONFIG_MSM_MMCC_8960=y +CONFIG_MSM_MMCC_8974=y CONFIG_TEGRA_IOMMU_GART=y CONFIG_TEGRA_IOMMU_SMMU=y CONFIG_MEMORY=y From d6bb841291c44575e23ca0b6bb6b441661b0843f Mon Sep 17 00:00:00 2001 From: Ivan Khoronzhuk Date: Fri, 28 Feb 2014 21:06:29 -0500 Subject: [PATCH 85/92] ARM: config: keystone: enable AEMIF/NAND support Keystone SoC uses the same NAND driver as Davinci, so enable Davinci NAND and AEIMF that provides interface for it. Signed-off-by: Ivan Khoronzhuk Signed-off-by: Santosh Shilimkar --- arch/arm/configs/keystone_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/keystone_defconfig b/arch/arm/configs/keystone_defconfig index 7056ef499657..ec9a41d50680 100644 --- a/arch/arm/configs/keystone_defconfig +++ b/arch/arm/configs/keystone_defconfig @@ -111,6 +111,7 @@ CONFIG_MTD_BLOCK=y CONFIG_MTD_PLATRAM=y CONFIG_MTD_M25P80=y CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_DAVINCI=y CONFIG_MTD_UBI=y CONFIG_PROC_DEVICETREE=y CONFIG_BLK_DEV_LOOP=y @@ -147,6 +148,7 @@ CONFIG_DMADEVICES=y CONFIG_TI_EDMA=y CONFIG_COMMON_CLK_DEBUG=y CONFIG_MEMORY=y +CONFIG_TI_AEMIF=y CONFIG_EXT4_FS=y CONFIG_EXT4_FS_POSIX_ACL=y CONFIG_MSDOS_FS=y From d1c912c1001fb97c1233d0ce3379d0c3f25b8312 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Tue, 7 Jan 2014 14:09:59 +0530 Subject: [PATCH 86/92] ARM: tegra: defconfig updates - ams AS3722 is used as system PMIC for Tegra124 based Venice2. - NXP PCA9546 is used in Cardhu Tegra30 board to connect to 3 cameras. - GSPCA to support the webcam on Venice2. - Allocate 64 MiB for CMA by default; the default 16MiB is not enough for the majority of use-cases. This can still be overridden by the cma command-line option. Signed-off-by: Laxman Dewangan Signed-off-by: Bryan Wu Signed-off-by: Thierry Reding --- arch/arm/configs/tegra_defconfig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm/configs/tegra_defconfig b/arch/arm/configs/tegra_defconfig index 00fe9e9710fd..bd7f6dd95cd3 100644 --- a/arch/arm/configs/tegra_defconfig +++ b/arch/arm/configs/tegra_defconfig @@ -86,6 +86,7 @@ CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y # CONFIG_FIRMWARE_IN_KERNEL is not set CONFIG_DMA_CMA=y +CONFIG_CMA_SIZE_MBYTES=64 CONFIG_MTD=y CONFIG_MTD_M25P80=y CONFIG_PROC_DEVICETREE=y @@ -125,6 +126,7 @@ CONFIG_SERIAL_TEGRA=y CONFIG_SERIAL_OF_PLATFORM=y # CONFIG_HW_RANDOM is not set # CONFIG_I2C_COMPAT is not set +CONFIG_I2C_MUX_PCA954x=y CONFIG_I2C_MUX_PINCTRL=y CONFIG_I2C_TEGRA=y CONFIG_SPI=y @@ -141,6 +143,7 @@ CONFIG_POWER_SUPPLY=y CONFIG_BATTERY_SBS=y CONFIG_CHARGER_TPS65090=y CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_AS3722=y CONFIG_POWER_RESET_GPIO=y CONFIG_SENSORS_LM90=y CONFIG_MFD_AS3722=y @@ -166,7 +169,8 @@ CONFIG_REGULATOR_TPS65910=y CONFIG_MEDIA_SUPPORT=y CONFIG_MEDIA_CAMERA_SUPPORT=y CONFIG_MEDIA_USB_SUPPORT=y -CONFIG_USB_VIDEO_CLASS=m +CONFIG_USB_VIDEO_CLASS=y +CONFIG_USB_GSPCA=y CONFIG_DRM=y CONFIG_DRM_TEGRA=y CONFIG_DRM_PANEL_SIMPLE=y From dc5dfab4ed18f0756f304dc5699b5743ddf56f90 Mon Sep 17 00:00:00 2001 From: Dmitry Eremin-Solenikov Date: Tue, 25 Feb 2014 15:59:19 +0400 Subject: [PATCH 87/92] ARM: pxa: add gpio keys information Switching from corgikbd to matrixkbd corgi has lost support for few switches. Readd them through gpio-keys-polled device (-polled, since scoop does not provide IRQ for GPIO). Signed-off-by: Dmitry Eremin-Solenikov Signed-off-by: Haojian Zhuang --- arch/arm/mach-pxa/corgi.c | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index f162f1b77cd2..57d60542f982 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include