From 193da78bec1b510ab0a743348a7e9a2c24766268 Mon Sep 17 00:00:00 2001 From: Simon Baatz Date: Mon, 13 May 2013 23:19:01 +0200 Subject: ARM: Kirkwood: add DT support for Sheevaplug and Sheevaplug eSATA Signed-off-by: Simon Baatz Signed-off-by: Jason Cooper diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig index 7509a89..58518a2 100644 --- a/arch/arm/mach-kirkwood/Kconfig +++ b/arch/arm/mach-kirkwood/Kconfig @@ -296,6 +296,13 @@ config MACH_READYNAS_DT Say 'Y' here if you want your kernel to support the NETGEAR ReadyNAS Duo v2 using Fattened Device Tree. +config MACH_SHEEVAPLUG_DT + bool "Marvell (eSATA) SheevaPlug (Flattened Device Tree)" + select ARCH_KIRKWOOD_DT + help + Say 'Y' here if you want your kernel to support the + Marvell (eSATA) SheevaPlug (Flattened Device Tree). + config MACH_TOPKICK_DT bool "USI Topkick (Flattened Device Tree)" select ARCH_KIRKWOOD_DT diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile index e1f3735..8846abf 100644 --- a/arch/arm/mach-kirkwood/Makefile +++ b/arch/arm/mach-kirkwood/Makefile @@ -40,5 +40,6 @@ obj-$(CONFIG_MACH_NETSPACE_V2_DT) += board-ns2.o obj-$(CONFIG_MACH_NSA310_DT) += board-nsa310.o obj-$(CONFIG_MACH_OPENBLOCKS_A6_DT) += board-openblocks_a6.o obj-$(CONFIG_MACH_READYNAS_DT) += board-readynas.o +obj-$(CONFIG_MACH_SHEEVAPLUG_DT) += board-sheevaplug.o obj-$(CONFIG_MACH_TOPKICK_DT) += board-usi_topkick.o obj-$(CONFIG_MACH_TS219_DT) += board-ts219.o tsx1x-common.o diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index e9647b8..a09dbac 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c @@ -112,6 +112,9 @@ static void __init kirkwood_dt_init(void) if (of_machine_is_compatible("globalscale,guruplug")) guruplug_dt_init(); + if (of_machine_is_compatible("globalscale,sheevaplug")) + sheevaplug_dt_init(); + if (of_machine_is_compatible("dlink,dns-kirkwood")) dnskw_init(); @@ -165,6 +168,7 @@ static void __init kirkwood_dt_init(void) static const char * const kirkwood_dt_board_compat[] = { "globalscale,dreamplug", "globalscale,guruplug", + "globalscale,sheevaplug", "dlink,dns-320", "dlink,dns-325", "iom,iconnect", diff --git a/arch/arm/mach-kirkwood/board-sheevaplug.c b/arch/arm/mach-kirkwood/board-sheevaplug.c new file mode 100644 index 0000000..fa38937 --- /dev/null +++ b/arch/arm/mach-kirkwood/board-sheevaplug.c @@ -0,0 +1,27 @@ +/* + * arch/arm/mach-kirkwood/board-sheevaplug.c + * + * Marvell Sheevaplug Reference Board Init for drivers not converted to + * flattened device tree yet. + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#include +#include +#include +#include "common.h" + +static struct mv643xx_eth_platform_data sheevaplug_ge00_data = { + .phy_addr = MV643XX_ETH_PHY_ADDR(0), +}; + +void __init sheevaplug_dt_init(void) +{ + /* + * Basic setup. Needs to be called early. + */ + kirkwood_ge00_init(&sheevaplug_ge00_data); +} diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h index 21da3b1..974442e 100644 --- a/arch/arm/mach-kirkwood/common.h +++ b/arch/arm/mach-kirkwood/common.h @@ -65,6 +65,11 @@ void guruplug_dt_init(void); #else static inline void guruplug_dt_init(void) {}; #endif +#ifdef CONFIG_MACH_SHEEVAPLUG_DT +void sheevaplug_dt_init(void); +#else +static inline void sheevaplug_dt_init(void) {}; +#endif #ifdef CONFIG_MACH_TS219_DT void qnap_dt_ts219_init(void); #else -- cgit v0.10.2 From 4350a47bbac3f90c724d565d7b895262f454d0c3 Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Fri, 28 Dec 2012 13:25:10 +0100 Subject: ARM: Kirkwood: Make use of the QNAP Power off driver. Add a node into the DT binding and remove C code. Signed-off-by: Andrew Lunn Signed-off-by: Jason Cooper diff --git a/arch/arm/boot/dts/kirkwood-ts219.dtsi b/arch/arm/boot/dts/kirkwood-ts219.dtsi index 64ea27c..4e29460 100644 --- a/arch/arm/boot/dts/kirkwood-ts219.dtsi +++ b/arch/arm/boot/dts/kirkwood-ts219.dtsi @@ -31,6 +31,11 @@ clock-frequency = <200000000>; status = "okay"; }; + poweroff@12100 { + compatible = "qnap,power-off"; + reg = <0x12000 0x100>; + clocks = <&gate_clk 7>; + }; spi@10600 { status = "okay"; diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig index 58518a2..e12376b 100644 --- a/arch/arm/mach-kirkwood/Kconfig +++ b/arch/arm/mach-kirkwood/Kconfig @@ -315,6 +315,7 @@ config MACH_TS219_DT select ARCH_KIRKWOOD_DT select ARM_APPENDED_DTB select ARM_ATAG_DTB_COMPAT + select POWER_RESET_QNAP help Say 'Y' here if you want your kernel to support the QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and diff --git a/arch/arm/mach-kirkwood/board-ts219.c b/arch/arm/mach-kirkwood/board-ts219.c index acb0187..10fb397 100644 --- a/arch/arm/mach-kirkwood/board-ts219.c +++ b/arch/arm/mach-kirkwood/board-ts219.c @@ -23,7 +23,6 @@ #include #include #include "common.h" -#include "tsx1x-common.h" static struct mv643xx_eth_platform_data qnap_ts219_ge00_data = { .phy_addr = MV643XX_ETH_PHY_ADDR(8), @@ -38,8 +37,6 @@ void __init qnap_dt_ts219_init(void) qnap_ts219_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); kirkwood_ge00_init(&qnap_ts219_ge00_data); - - pm_power_off = qnap_tsx1x_power_off; } /* FIXME: Will not work with DT. Maybe use MPP40_GPIO? */ -- cgit v0.10.2 From 391a16c7783a64309dc930c6d454372d7a8beb12 Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Fri, 28 Dec 2012 13:25:12 +0100 Subject: ARM: Kirkwood: Convert LSXL to restart-poweroff driver. Add a device tree node and remove the C code. Signed-off-by: Andrew Lunn Tested-by: Michael Walle Signed-off-by: Jason Cooper diff --git a/arch/arm/boot/dts/kirkwood-lsxl.dtsi b/arch/arm/boot/dts/kirkwood-lsxl.dtsi index 37d45c4..996c7fe 100644 --- a/arch/arm/boot/dts/kirkwood-lsxl.dtsi +++ b/arch/arm/boot/dts/kirkwood-lsxl.dtsi @@ -172,6 +172,10 @@ alarm-gpios = <&gpio1 8 0>; }; + restart_poweroff { + compatible = "restart-poweroff"; + }; + regulators { compatible = "simple-bus"; #address-cells = <1>; diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig index e12376b..1f7078e 100644 --- a/arch/arm/mach-kirkwood/Kconfig +++ b/arch/arm/mach-kirkwood/Kconfig @@ -227,6 +227,7 @@ config MACH_KM_KIRKWOOD_DT config MACH_LSXL_DT bool "Buffalo Linkstation LS-XHL, LS-CHLv2 (Flattened Device Tree)" select ARCH_KIRKWOOD_DT + select POWER_RESET_RESTART help Say 'Y' here if you want your kernel to support the Buffalo Linkstation LS-XHL & LS-CHLv2 devices, using diff --git a/arch/arm/mach-kirkwood/board-lsxl.c b/arch/arm/mach-kirkwood/board-lsxl.c index 4ec8b7a..3483952 100644 --- a/arch/arm/mach-kirkwood/board-lsxl.c +++ b/arch/arm/mach-kirkwood/board-lsxl.c @@ -25,19 +25,6 @@ static struct mv643xx_eth_platform_data lsxl_ge01_data = { .phy_addr = MV643XX_ETH_PHY_ADDR(8), }; -/* - * On the LS-XHL/LS-CHLv2, the shutdown process is following: - * - Userland monitors key events until the power switch goes to off position - * - The board reboots - * - U-boot starts and goes into an idle mode waiting for the user - * to move the switch to ON position - * - */ -static void lsxl_power_off(void) -{ - kirkwood_restart('h', NULL); -} - void __init lsxl_init(void) { /* @@ -46,7 +33,4 @@ void __init lsxl_init(void) kirkwood_ge00_init(&lsxl_ge00_data); kirkwood_ge01_init(&lsxl_ge01_data); - - /* register power-off method */ - pm_power_off = lsxl_power_off; } -- cgit v0.10.2 From 5dc60e052897f73aac6f17f3036c51a55cff89e7 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Tue, 2 Apr 2013 14:21:48 +0100 Subject: ARM: ux500: Increase the size of the PRCMU's TCPM size The Tightly Coupled Program Memory location is actually 32kB in size, rather than the originally depicted 4kB. Signed-off-by: Lee Jones Signed-off-by: Linus Walleij diff --git a/arch/arm/mach-ux500/devices-db8500.c b/arch/arm/mach-ux500/devices-db8500.c index 1cf94ce..ddbdcda 100644 --- a/arch/arm/mach-ux500/devices-db8500.c +++ b/arch/arm/mach-ux500/devices-db8500.c @@ -227,7 +227,7 @@ static struct resource db8500_prcmu_res[] = { { .name = "prcmu-tcpm", .start = U8500_PRCMU_TCPM_BASE, - .end = U8500_PRCMU_TCPM_BASE + SZ_4K - 1, + .end = U8500_PRCMU_TCPM_BASE + SZ_32K - 1, .flags = IORESOURCE_MEM, }, }; -- cgit v0.10.2 From 039ec0b8dc71912fa707242a338b5c0dbfe0104a Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Tue, 2 Apr 2013 14:21:49 +0100 Subject: ARM: ux500: Remove incorrect DB9540 PRCMU TCDM base location The Tightly Coupled Data Memory for the DB9540 is actually in the same place as the DB8500's. This definition is just plain wrong. Signed-off-by: Lee Jones Signed-off-by: Linus Walleij diff --git a/arch/arm/mach-ux500/db8500-regs.h b/arch/arm/mach-ux500/db8500-regs.h index b2d7a0b..1055c54 100644 --- a/arch/arm/mach-ux500/db8500-regs.h +++ b/arch/arm/mach-ux500/db8500-regs.h @@ -102,7 +102,6 @@ #define U8500_PRCMU_BASE (U8500_PER4_BASE + 0x07000) #define U9540_DMC1_BASE (U8500_PER4_BASE + 0x0A000) #define U8500_PRCMU_TCDM_BASE (U8500_PER4_BASE + 0x68000) -#define U9540_PRCMU_TCDM_BASE (U8500_PER4_BASE + 0x6A000) #define U8500_PRCMU_TCPM_BASE (U8500_PER4_BASE + 0x60000) #define U8500_PRCMU_TIMER_3_BASE (U8500_PER4_BASE + 0x07338) #define U8500_PRCMU_TIMER_4_BASE (U8500_PER4_BASE + 0x07450) -- cgit v0.10.2 From b6ff56a4acdc16c626f713bbad0528984234e550 Mon Sep 17 00:00:00 2001 From: Ulf Hansson Date: Thu, 23 May 2013 15:13:45 +0200 Subject: ARM: ux500: Enable 100MHz for SD/SDIO/MMC devices We are able to cope with an SDMMC clock of 100MHz so let's make use of the full frequency instead of the half. Signed-off-by: Ulf Hansson Signed-off-by: Linus Walleij diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c index 0ef3877..eb9b2de 100644 --- a/arch/arm/mach-ux500/board-mop500-sdi.c +++ b/arch/arm/mach-ux500/board-mop500-sdi.c @@ -53,7 +53,7 @@ static struct stedma40_chan_cfg mop500_sdi0_dma_cfg_tx = { struct mmci_platform_data mop500_sdi0_data = { .ocr_mask = MMC_VDD_29_30, - .f_max = 50000000, + .f_max = 100000000, .capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED, @@ -106,7 +106,7 @@ static struct stedma40_chan_cfg sdi1_dma_cfg_tx = { struct mmci_platform_data mop500_sdi1_data = { .ocr_mask = MMC_VDD_29_30, - .f_max = 50000000, + .f_max = 100000000, .capabilities = MMC_CAP_4_BIT_DATA, .gpio_cd = -1, .gpio_wp = -1, @@ -143,7 +143,7 @@ static struct stedma40_chan_cfg mop500_sdi2_dma_cfg_tx = { struct mmci_platform_data mop500_sdi2_data = { .ocr_mask = MMC_VDD_165_195, - .f_max = 50000000, + .f_max = 100000000, .capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA | MMC_CAP_MMC_HIGHSPEED, .gpio_cd = -1, @@ -181,7 +181,7 @@ static struct stedma40_chan_cfg mop500_sdi4_dma_cfg_tx = { struct mmci_platform_data mop500_sdi4_data = { .ocr_mask = MMC_VDD_29_30, - .f_max = 50000000, + .f_max = 100000000, .capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA | MMC_CAP_MMC_HIGHSPEED, .gpio_cd = -1, -- cgit v0.10.2 From 4fa0614f40bfe8434d843da82664a6da06915bc1 Mon Sep 17 00:00:00 2001 From: Ulf Hansson Date: Thu, 23 May 2013 15:13:46 +0200 Subject: ARM: ux500: Don't set plf ocr mask for SD/MMC device The mmci host driver overrides platform ocr mask when a vmmc regulator can be used. This is the case for sdi0(SD-card) and for sdi4(eMMC). Thus it is pointless of specifing these mask and why we do remove them. Signed-off-by: Ulf Hansson Signed-off-by: Linus Walleij diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c index eb9b2de..c0573d2 100644 --- a/arch/arm/mach-ux500/board-mop500-sdi.c +++ b/arch/arm/mach-ux500/board-mop500-sdi.c @@ -52,7 +52,6 @@ static struct stedma40_chan_cfg mop500_sdi0_dma_cfg_tx = { #endif struct mmci_platform_data mop500_sdi0_data = { - .ocr_mask = MMC_VDD_29_30, .f_max = 100000000, .capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_SD_HIGHSPEED | @@ -180,7 +179,6 @@ static struct stedma40_chan_cfg mop500_sdi4_dma_cfg_tx = { #endif struct mmci_platform_data mop500_sdi4_data = { - .ocr_mask = MMC_VDD_29_30, .f_max = 100000000, .capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA | MMC_CAP_MMC_HIGHSPEED, -- cgit v0.10.2 From a2be776dcc7556fcb67e92ba6736bade9f2d9a4a Mon Sep 17 00:00:00 2001 From: Ulf Hansson Date: Thu, 23 May 2013 15:13:47 +0200 Subject: ARM: ux500: Enable support for RPMB and Reliable Write for eMMC By adding MMC_CAP_CMD23 for the eMMC devices, we can support RPMB and Reliable Write. Additionally it will mean CMD12 will not be sent to end a successful data transfer. Signed-off-by: Ulf Hansson Signed-off-by: Linus Walleij diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c index c0573d2..9bb3ca5 100644 --- a/arch/arm/mach-ux500/board-mop500-sdi.c +++ b/arch/arm/mach-ux500/board-mop500-sdi.c @@ -143,8 +143,10 @@ static struct stedma40_chan_cfg mop500_sdi2_dma_cfg_tx = { struct mmci_platform_data mop500_sdi2_data = { .ocr_mask = MMC_VDD_165_195, .f_max = 100000000, - .capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA | - MMC_CAP_MMC_HIGHSPEED, + .capabilities = MMC_CAP_4_BIT_DATA | + MMC_CAP_8_BIT_DATA | + MMC_CAP_MMC_HIGHSPEED | + MMC_CAP_CMD23, .gpio_cd = -1, .gpio_wp = -1, #ifdef CONFIG_STE_DMA40 @@ -180,8 +182,10 @@ static struct stedma40_chan_cfg mop500_sdi4_dma_cfg_tx = { struct mmci_platform_data mop500_sdi4_data = { .f_max = 100000000, - .capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA | - MMC_CAP_MMC_HIGHSPEED, + .capabilities = MMC_CAP_4_BIT_DATA | + MMC_CAP_8_BIT_DATA | + MMC_CAP_MMC_HIGHSPEED | + MMC_CAP_CMD23, .gpio_cd = -1, .gpio_wp = -1, #ifdef CONFIG_STE_DMA40 -- cgit v0.10.2 From fd1cc1b9d3b76cb187c10b1ac09fc1060e210ec9 Mon Sep 17 00:00:00 2001 From: Ulf Hansson Date: Thu, 23 May 2013 15:13:48 +0200 Subject: ARM: ux500: Enable support for discard for MMC/SD By enabling MMC_CAP_ERASE for the SD/MMC devices the mmc block layer will now act on DISCARD requests. Signed-off-by: Ulf Hansson Signed-off-by: Linus Walleij diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c index 9bb3ca5..3c07f55 100644 --- a/arch/arm/mach-ux500/board-mop500-sdi.c +++ b/arch/arm/mach-ux500/board-mop500-sdi.c @@ -55,7 +55,8 @@ struct mmci_platform_data mop500_sdi0_data = { .f_max = 100000000, .capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_SD_HIGHSPEED | - MMC_CAP_MMC_HIGHSPEED, + MMC_CAP_MMC_HIGHSPEED | + MMC_CAP_ERASE, .gpio_wp = -1, .sigdir = MCI_ST_FBCLKEN | MCI_ST_CMDDIREN | @@ -146,6 +147,7 @@ struct mmci_platform_data mop500_sdi2_data = { .capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA | MMC_CAP_MMC_HIGHSPEED | + MMC_CAP_ERASE | MMC_CAP_CMD23, .gpio_cd = -1, .gpio_wp = -1, @@ -185,6 +187,7 @@ struct mmci_platform_data mop500_sdi4_data = { .capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA | MMC_CAP_MMC_HIGHSPEED | + MMC_CAP_ERASE | MMC_CAP_CMD23, .gpio_cd = -1, .gpio_wp = -1, -- cgit v0.10.2 From a7de8b30ca14f5991f4c19e932b53f0461af0480 Mon Sep 17 00:00:00 2001 From: Ulf Hansson Date: Thu, 23 May 2013 15:13:49 +0200 Subject: ARM: ux500: Set eMMC and WLAN card slot as non-removable For several reasons, the mmc protocol layer expects devices being non-removable to use MMC_CAP_NONREMOVABLE, so then we adapt to this expectation. Signed-off-by: Ulf Hansson Signed-off-by: Linus Walleij diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c index 3c07f55..2e341fb 100644 --- a/arch/arm/mach-ux500/board-mop500-sdi.c +++ b/arch/arm/mach-ux500/board-mop500-sdi.c @@ -107,7 +107,8 @@ static struct stedma40_chan_cfg sdi1_dma_cfg_tx = { struct mmci_platform_data mop500_sdi1_data = { .ocr_mask = MMC_VDD_29_30, .f_max = 100000000, - .capabilities = MMC_CAP_4_BIT_DATA, + .capabilities = MMC_CAP_4_BIT_DATA | + MMC_CAP_NONREMOVABLE, .gpio_cd = -1, .gpio_wp = -1, #ifdef CONFIG_STE_DMA40 @@ -146,6 +147,7 @@ struct mmci_platform_data mop500_sdi2_data = { .f_max = 100000000, .capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA | + MMC_CAP_NONREMOVABLE | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_ERASE | MMC_CAP_CMD23, @@ -186,6 +188,7 @@ struct mmci_platform_data mop500_sdi4_data = { .f_max = 100000000, .capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA | + MMC_CAP_NONREMOVABLE | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_ERASE | MMC_CAP_CMD23, -- cgit v0.10.2 From 714c0b00c99798e3b7e1c7a37a06c35de6227549 Mon Sep 17 00:00:00 2001 From: Ulf Hansson Date: Thu, 23 May 2013 15:13:50 +0200 Subject: ARM: ux500: Enable support for UHS-I SD-cards By setting the host capabilities MMC_CAP_UHS_SDR12|25 for the SD card device we enable support for UHS cards. The supported mode is SDR12 and SDR25. Signed-off-by: Ulf Hansson Signed-off-by: Linus Walleij diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c index 2e341fb..43be3e0 100644 --- a/arch/arm/mach-ux500/board-mop500-sdi.c +++ b/arch/arm/mach-ux500/board-mop500-sdi.c @@ -56,7 +56,9 @@ struct mmci_platform_data mop500_sdi0_data = { .capabilities = MMC_CAP_4_BIT_DATA | MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED | - MMC_CAP_ERASE, + MMC_CAP_ERASE | + MMC_CAP_UHS_SDR12 | + MMC_CAP_UHS_SDR25, .gpio_wp = -1, .sigdir = MCI_ST_FBCLKEN | MCI_ST_CMDDIREN | -- cgit v0.10.2 From 19d323412447177208785ba391c0f2288b56b5c8 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Wed, 22 May 2013 14:06:35 +0100 Subject: ARM: ux500: regulators: Remove misleading comment This patch removes a comment which explains that the ab8505 platform uses the same initialisation settings as the ab8500. Well when this changed and the ab8505 started using its own set of initialisation values, someone forgot to remove it. Signed-off-by: Lee Jones Signed-off-by: Linus Walleij diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c index 33c353b..b34441b 100644 --- a/arch/arm/mach-ux500/board-mop500-regulators.c +++ b/arch/arm/mach-ux500/board-mop500-regulators.c @@ -996,7 +996,6 @@ struct ab8500_regulator_platform_data ab8500_regulator_plat_data = { .num_ext_regulator = ARRAY_SIZE(ab8500_ext_regulators), }; -/* Use the AB8500 init settings for AB8505 as they are the same right now */ struct ab8500_regulator_platform_data ab8505_regulator_plat_data = { .reg_init = ab8505_reg_init, .num_reg_init = ARRAY_SIZE(ab8505_reg_init), -- cgit v0.10.2 From af86e10cdd35dea3d9c63311daf6de2cc41ac6a8 Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Wed, 8 May 2013 11:09:53 +0200 Subject: ARM: ux500: update MSP1 pinctrl defintions Update MSP1 pinctrl definitions in mop500_family_pinmap by removing sleep state and setting default ones as pin hogs, as those are used by both ux500-msp-i2s.1 and ux500-msp-i2s.3. Signed-off-by: Fabio Baltieri Signed-off-by: Linus Walleij diff --git a/arch/arm/mach-ux500/board-mop500-pins.c b/arch/arm/mach-ux500/board-mop500-pins.c index 947bd9e..3f92308 100644 --- a/arch/arm/mach-ux500/board-mop500-pins.c +++ b/arch/arm/mach-ux500/board-mop500-pins.c @@ -174,17 +174,12 @@ static struct pinctrl_map __initdata mop500_family_pinmap[] = { DB8500_PIN_SLEEP("GPIO4_AH6", slpm_in_wkup_pdis, "uart1"), DB8500_PIN_SLEEP("GPIO5_AG6", slpm_out_wkup_pdis, "uart1"), /* MSP1 for ALSA codec */ - DB8500_MUX("msp1txrx_a_1", "msp1", "ux500-msp-i2s.1"), - DB8500_MUX("msp1_a_1", "msp1", "ux500-msp-i2s.1"), - DB8500_PIN("GPIO33_AF2", out_lo_slpm_nowkup, "ux500-msp-i2s.1"), - DB8500_PIN("GPIO34_AE1", in_nopull_slpm_nowkup, "ux500-msp-i2s.1"), - DB8500_PIN("GPIO35_AE2", in_nopull_slpm_nowkup, "ux500-msp-i2s.1"), - DB8500_PIN("GPIO36_AG2", in_nopull_slpm_nowkup, "ux500-msp-i2s.1"), - /* MSP1 sleep state */ - DB8500_PIN_SLEEP("GPIO33_AF2", slpm_out_lo_wkup, "ux500-msp-i2s.1"), - DB8500_PIN_SLEEP("GPIO34_AE1", slpm_in_nopull_wkup, "ux500-msp-i2s.1"), - DB8500_PIN_SLEEP("GPIO35_AE2", slpm_in_nopull_wkup, "ux500-msp-i2s.1"), - DB8500_PIN_SLEEP("GPIO36_AG2", slpm_in_nopull_wkup, "ux500-msp-i2s.1"), + DB8500_MUX_HOG("msp1txrx_a_1", "msp1"), + DB8500_MUX_HOG("msp1_a_1", "msp1"), + DB8500_PIN_HOG("GPIO33_AF2", out_lo_slpm_nowkup), + DB8500_PIN_HOG("GPIO34_AE1", in_nopull_slpm_nowkup), + DB8500_PIN_HOG("GPIO35_AE2", in_nopull_slpm_nowkup), + DB8500_PIN_HOG("GPIO36_AG2", in_nopull_slpm_nowkup), /* Mux in LCD data lines 8 thru 11 and LCDA CLK for MCDE TVOUT */ DB8500_MUX("lcd_d8_d11_a_1", "lcd", "mcde-tvout"), DB8500_MUX("lcdaclk_b_1", "lcda", "mcde-tvout"), -- cgit v0.10.2 From c321e7164493ac3684bfbb382d66a4a2416291fb Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Thu, 16 May 2013 20:43:30 -0600 Subject: ARM: bcm2835: defconfig updates Enable CONFIG_LEDS_GPIO and all options required to enable it, or make the option useful. Enable the simple framebuffer driver, fbconsole, and VT support. This patch also regenerated bcm2835_defconfig, which removes two HW_RANDOM entries, since they're enabled by default. Signed-off-by: Stephen Warren diff --git a/arch/arm/configs/bcm2835_defconfig b/arch/arm/configs/bcm2835_defconfig index ce98721..34e9780 100644 --- a/arch/arm/configs/bcm2835_defconfig +++ b/arch/arm/configs/bcm2835_defconfig @@ -55,14 +55,11 @@ CONFIG_DEVTMPFS_MOUNT=y # CONFIG_INPUT_KEYBOARD is not set # CONFIG_INPUT_MOUSE is not set # CONFIG_SERIO is not set -# CONFIG_VT is not set # CONFIG_LEGACY_PTYS is not set # CONFIG_DEVKMEM is not set CONFIG_SERIAL_AMBA_PL011=y CONFIG_SERIAL_AMBA_PL011_CONSOLE=y CONFIG_TTY_PRINTK=y -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_BCM2835=y CONFIG_I2C=y CONFIG_I2C_CHARDEV=y CONFIG_I2C_BCM2835=y @@ -70,11 +67,27 @@ CONFIG_SPI=y CONFIG_SPI_BCM2835=y CONFIG_GPIO_SYSFS=y # CONFIG_HWMON is not set +CONFIG_FB=y +CONFIG_FB_SIMPLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y # CONFIG_USB_SUPPORT is not set CONFIG_MMC=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_PLTFM=y CONFIG_MMC_SDHCI_BCM2835=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_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_CPU=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_LEDS_TRIGGER_TRANSIENT=y +CONFIG_LEDS_TRIGGER_CAMERA=y # CONFIG_IOMMU_SUPPORT is not set CONFIG_EXT2_FS=y CONFIG_EXT2_FS_XATTR=y -- cgit v0.10.2 From 8258b187c2ba91ba1ff276fd0413f5b655824247 Mon Sep 17 00:00:00 2001 From: Patrice Chotard Date: Tue, 28 May 2013 09:29:34 +0200 Subject: ARM: ux500: add ABx500 pinctrl tables This adds pin control tables for the ABx500 (AB8500 and AB8505) PMIC, which also happens to act as a multimedia pin expander on the ux500 platforms. Signed-off-by: Patrice Chotard Acked-by: Lee Jones Signed-off-by: Linus Walleij diff --git a/arch/arm/mach-ux500/board-mop500-pins.c b/arch/arm/mach-ux500/board-mop500-pins.c index 3f92308..6086062 100644 --- a/arch/arm/mach-ux500/board-mop500-pins.c +++ b/arch/arm/mach-ux500/board-mop500-pins.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -34,6 +35,11 @@ BIAS(in_pd, PIN_INPUT_PULLDOWN); BIAS(out_hi, PIN_OUTPUT_HIGH); BIAS(out_lo, PIN_OUTPUT_LOW); BIAS(out_lo_slpm_nowkup, PIN_OUTPUT_LOW|PIN_SLPM_WAKEUP_DISABLE); + +BIAS(abx500_out_lo, PIN_CONF_PACKED(PIN_CONFIG_OUTPUT, 0)); +BIAS(abx500_in_pd, PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_DOWN, 1)); +BIAS(abx500_in_nopull, PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_DOWN, 0)); + /* These also force them into GPIO mode */ BIAS(gpio_in_pu, PIN_INPUT_PULLUP|PIN_GPIOMODE_ENABLED); BIAS(gpio_in_pd, PIN_INPUT_PULLDOWN|PIN_GPIOMODE_ENABLED); @@ -97,6 +103,252 @@ BIAS(out_wkup_pdis, PIN_SLPM_DIR_OUTPUT|PIN_SLPM_WAKEUP_ENABLE| #define DB8500_PIN_STATE(pin, conf, dev, state) \ PIN_MAP_CONFIGS_PIN(dev, state, "pinctrl-db8500", pin, conf) +#define AB8500_MUX_HOG(group, func) \ + PIN_MAP_MUX_GROUP_HOG_DEFAULT("pinctrl-ab8500.0", group, func) +#define AB8500_PIN_HOG(pin, conf) \ + PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-ab8500.0", pin, abx500_##conf) + +#define AB8500_MUX_STATE(group, func, dev, state) \ + PIN_MAP_MUX_GROUP(dev, state, "pinctrl-ab8500.0", group, func) +#define AB8500_PIN_STATE(pin, conf, dev, state) \ + PIN_MAP_CONFIGS_PIN(dev, state, "pinctrl-ab8500.0", pin, abx500_##conf) + +#define AB8505_MUX_HOG(group, func) \ + PIN_MAP_MUX_GROUP_HOG_DEFAULT("pinctrl-ab8505.0", group, func) +#define AB8505_PIN_HOG(pin, conf) \ + PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-ab8505.0", pin, abx500_##conf) + +#define AB8505_MUX_STATE(group, func, dev, state) \ + PIN_MAP_MUX_GROUP(dev, state, "pinctrl-ab8505.0", group, func) +#define AB8505_PIN_STATE(pin, conf, dev, state) \ + PIN_MAP_CONFIGS_PIN(dev, state, "pinctrl-ab8505.0", pin, abx500_##conf) + +static struct pinctrl_map __initdata ab8500_pinmap[] = { + /* Sysclkreq2 */ + AB8500_MUX_STATE("sysclkreq2_d_1", "sysclkreq", "regulator.35", PINCTRL_STATE_DEFAULT), + AB8500_PIN_STATE("GPIO1_T10", in_nopull, "regulator.35", PINCTRL_STATE_DEFAULT), + /* sysclkreq2 disable, mux in gpio configured in input pulldown */ + AB8500_MUX_STATE("gpio1_a_1", "gpio", "regulator.35", PINCTRL_STATE_SLEEP), + AB8500_PIN_STATE("GPIO1_T10", in_pd, "regulator.35", PINCTRL_STATE_SLEEP), + + /* pins 2 is muxed in GPIO, configured in INPUT PULL DOWN */ + AB8500_MUX_HOG("gpio2_a_1", "gpio"), + AB8500_PIN_HOG("GPIO2_T9", in_pd), + + /* Sysclkreq4 */ + AB8500_MUX_STATE("sysclkreq4_d_1", "sysclkreq", "regulator.36", PINCTRL_STATE_DEFAULT), + AB8500_PIN_STATE("GPIO3_U9", in_nopull, "regulator.36", PINCTRL_STATE_DEFAULT), + /* sysclkreq4 disable, mux in gpio configured in input pulldown */ + AB8500_MUX_STATE("gpio3_a_1", "gpio", "regulator.36", PINCTRL_STATE_SLEEP), + AB8500_PIN_STATE("GPIO3_U9", in_pd, "regulator.36", PINCTRL_STATE_SLEEP), + + /* pins 4 is muxed in GPIO, configured in INPUT PULL DOWN */ + AB8500_MUX_HOG("gpio4_a_1", "gpio"), + AB8500_PIN_HOG("GPIO4_W2", in_pd), + + /* + * pins 6,7,8 and 9 are muxed in YCBCR0123 + * configured in INPUT PULL UP + */ + AB8500_MUX_HOG("ycbcr0123_d_1", "ycbcr"), + AB8500_PIN_HOG("GPIO6_Y18", in_nopull), + AB8500_PIN_HOG("GPIO7_AA20", in_nopull), + AB8500_PIN_HOG("GPIO8_W18", in_nopull), + AB8500_PIN_HOG("GPIO9_AA19", in_nopull), + + /* + * pins 10,11,12 and 13 are muxed in GPIO + * configured in INPUT PULL DOWN + */ + AB8500_MUX_HOG("gpio10_d_1", "gpio"), + AB8500_PIN_HOG("GPIO10_U17", in_pd), + + AB8500_MUX_HOG("gpio11_d_1", "gpio"), + AB8500_PIN_HOG("GPIO11_AA18", in_pd), + + AB8500_MUX_HOG("gpio12_d_1", "gpio"), + AB8500_PIN_HOG("GPIO12_U16", in_pd), + + AB8500_MUX_HOG("gpio13_d_1", "gpio"), + AB8500_PIN_HOG("GPIO13_W17", in_pd), + + /* + * pins 14,15 are muxed in PWM1 and PWM2 + * configured in INPUT PULL DOWN + */ + AB8500_MUX_HOG("pwmout1_d_1", "pwmout"), + AB8500_PIN_HOG("GPIO14_F14", in_pd), + + AB8500_MUX_HOG("pwmout2_d_1", "pwmout"), + AB8500_PIN_HOG("GPIO15_B17", in_pd), + + /* + * pins 16 is muxed in GPIO + * configured in INPUT PULL DOWN + */ + AB8500_MUX_HOG("gpio16_a_1", "gpio"), + AB8500_PIN_HOG("GPIO14_F14", in_pd), + + /* + * pins 17,18,19 and 20 are muxed in AUDIO interface 1 + * configured in INPUT PULL DOWN + */ + AB8500_MUX_HOG("adi1_d_1", "adi1"), + AB8500_PIN_HOG("GPIO17_P5", in_pd), + AB8500_PIN_HOG("GPIO18_R5", in_pd), + AB8500_PIN_HOG("GPIO19_U5", in_pd), + AB8500_PIN_HOG("GPIO20_T5", in_pd), + + /* + * pins 21,22 and 23 are muxed in USB UICC + * configured in INPUT PULL DOWN + */ + AB8500_MUX_HOG("usbuicc_d_1", "usbuicc"), + AB8500_PIN_HOG("GPIO21_H19", in_pd), + AB8500_PIN_HOG("GPIO22_G20", in_pd), + AB8500_PIN_HOG("GPIO23_G19", in_pd), + + /* + * pins 24,25 are muxed in GPIO + * configured in INPUT PULL DOWN + */ + AB8500_MUX_HOG("gpio24_a_1", "gpio"), + AB8500_PIN_HOG("GPIO24_T14", in_pd), + + AB8500_MUX_HOG("gpio25_a_1", "gpio"), + AB8500_PIN_HOG("GPIO25_R16", in_pd), + + /* + * pins 26 is muxed in GPIO + * configured in OUTPUT LOW + */ + AB8500_MUX_HOG("gpio26_d_1", "gpio"), + AB8500_PIN_HOG("GPIO26_M16", out_lo), + + /* + * pins 27,28 are muxed in DMIC12 + * configured in INPUT PULL DOWN + */ + AB8500_MUX_HOG("dmic12_d_1", "dmic"), + AB8500_PIN_HOG("GPIO27_J6", in_pd), + AB8500_PIN_HOG("GPIO28_K6", in_pd), + + /* + * pins 29,30 are muxed in DMIC34 + * configured in INPUT PULL DOWN + */ + AB8500_MUX_HOG("dmic34_d_1", "dmic"), + AB8500_PIN_HOG("GPIO29_G6", in_pd), + AB8500_PIN_HOG("GPIO30_H6", in_pd), + + /* + * pins 31,32 are muxed in DMIC56 + * configured in INPUT PULL DOWN + */ + AB8500_MUX_HOG("dmic56_d_1", "dmic"), + AB8500_PIN_HOG("GPIO31_F5", in_pd), + AB8500_PIN_HOG("GPIO32_G5", in_pd), + + /* + * pins 34 is muxed in EXTCPENA + * configured INPUT PULL DOWN + */ + AB8500_MUX_HOG("extcpena_d_1", "extcpena"), + AB8500_PIN_HOG("GPIO34_R17", in_pd), + + /* + * pins 35 is muxed in GPIO + * configured in OUTPUT LOW + */ + AB8500_MUX_HOG("gpio35_d_1", "gpio"), + AB8500_PIN_HOG("GPIO35_W15", in_pd), + + /* + * pins 36,37,38 and 39 are muxed in GPIO + * configured in INPUT PULL DOWN + */ + AB8500_MUX_HOG("gpio36_a_1", "gpio"), + AB8500_PIN_HOG("GPIO36_A17", in_pd), + + AB8500_MUX_HOG("gpio37_a_1", "gpio"), + AB8500_PIN_HOG("GPIO37_E15", in_pd), + + AB8500_MUX_HOG("gpio38_a_1", "gpio"), + AB8500_PIN_HOG("GPIO38_C17", in_pd), + + AB8500_MUX_HOG("gpio39_a_1", "gpio"), + AB8500_PIN_HOG("GPIO39_E16", in_pd), + + /* + * pins 40 and 41 are muxed in MODCSLSDA + * configured INPUT PULL DOWN + */ + AB8500_MUX_HOG("modsclsda_d_1", "modsclsda"), + AB8500_PIN_HOG("GPIO40_T19", in_pd), + AB8500_PIN_HOG("GPIO41_U19", in_pd), + + /* + * pins 42 is muxed in GPIO + * configured INPUT PULL DOWN + */ + AB8500_MUX_HOG("gpio42_a_1", "gpio"), + AB8500_PIN_HOG("GPIO42_U2", in_pd), +}; + +static struct pinctrl_map __initdata ab8505_pinmap[] = { + /* Sysclkreq2 */ + AB8505_MUX_STATE("sysclkreq2_d_1", "sysclkreq", "regulator.36", PINCTRL_STATE_DEFAULT), + AB8505_PIN_STATE("GPIO1_N4", in_nopull, "regulator.36", PINCTRL_STATE_DEFAULT), + /* sysclkreq2 disable, mux in gpio configured in input pulldown */ + AB8505_MUX_STATE("gpio1_a_1", "gpio", "regulator.36", PINCTRL_STATE_SLEEP), + AB8505_PIN_STATE("GPIO1_N4", in_pd, "regulator.36", PINCTRL_STATE_SLEEP), + + /* pins 2 is muxed in GPIO, configured in INPUT PULL DOWN */ + AB8505_MUX_HOG("gpio2_a_1", "gpio"), + AB8505_PIN_HOG("GPIO2_R5", in_pd), + + /* Sysclkreq4 */ + AB8505_MUX_STATE("sysclkreq4_d_1", "sysclkreq", "regulator.37", PINCTRL_STATE_DEFAULT), + AB8505_PIN_STATE("GPIO3_P5", in_nopull, "regulator.37", PINCTRL_STATE_DEFAULT), + /* sysclkreq4 disable, mux in gpio configured in input pulldown */ + AB8505_MUX_STATE("gpio3_a_1", "gpio", "regulator.37", PINCTRL_STATE_SLEEP), + AB8505_PIN_STATE("GPIO3_P5", in_pd, "regulator.37", PINCTRL_STATE_SLEEP), + + AB8505_MUX_HOG("gpio10_d_1", "gpio"), + AB8505_PIN_HOG("GPIO10_B16", in_pd), + + AB8505_MUX_HOG("gpio11_d_1", "gpio"), + AB8505_PIN_HOG("GPIO11_B17", in_pd), + + AB8505_MUX_HOG("gpio13_d_1", "gpio"), + AB8505_PIN_HOG("GPIO13_D17", in_nopull), + + AB8505_MUX_HOG("pwmout1_d_1", "pwmout"), + AB8505_PIN_HOG("GPIO14_C16", in_pd), + + AB8505_MUX_HOG("adi2_d_1", "adi2"), + AB8505_PIN_HOG("GPIO17_P2", in_pd), + AB8505_PIN_HOG("GPIO18_N3", in_pd), + AB8505_PIN_HOG("GPIO19_T1", in_pd), + AB8505_PIN_HOG("GPIO20_P3", in_pd), + + AB8505_MUX_HOG("gpio34_a_1", "gpio"), + AB8505_PIN_HOG("GPIO34_H14", in_pd), + + AB8505_MUX_HOG("modsclsda_d_1", "modsclsda"), + AB8505_PIN_HOG("GPIO40_J15", in_pd), + AB8505_PIN_HOG("GPIO41_J14", in_pd), + + AB8505_MUX_HOG("gpio50_d_1", "gpio"), + AB8505_PIN_HOG("GPIO50_L4", in_nopull), + + AB8505_MUX_HOG("resethw_d_1", "resethw"), + AB8505_PIN_HOG("GPIO52_D16", in_pd), + + AB8505_MUX_HOG("service_d_1", "service"), + AB8505_PIN_HOG("GPIO53_D15", in_pd), +}; + /* Pin control settings */ static struct pinctrl_map __initdata mop500_family_pinmap[] = { /* @@ -816,6 +1068,12 @@ void __init mop500_pinmaps_init(void) pinctrl_register_mappings(mop500_pinmap, ARRAY_SIZE(mop500_pinmap)); mop500_href_family_pinmaps_init(); + if (machine_is_u8520()) + pinctrl_register_mappings(ab8505_pinmap, + ARRAY_SIZE(ab8505_pinmap)); + else + pinctrl_register_mappings(ab8500_pinmap, + ARRAY_SIZE(ab8500_pinmap)); } void __init snowball_pinmaps_init(void) @@ -826,6 +1084,8 @@ void __init snowball_pinmaps_init(void) ARRAY_SIZE(snowball_pinmap)); pinctrl_register_mappings(u8500_pinmap, ARRAY_SIZE(u8500_pinmap)); + pinctrl_register_mappings(ab8500_pinmap, + ARRAY_SIZE(ab8500_pinmap)); } void __init hrefv60_pinmaps_init(void) @@ -835,4 +1095,6 @@ void __init hrefv60_pinmaps_init(void) pinctrl_register_mappings(hrefv60_pinmap, ARRAY_SIZE(hrefv60_pinmap)); mop500_href_family_pinmaps_init(); + pinctrl_register_mappings(ab8500_pinmap, + ARRAY_SIZE(ab8500_pinmap)); } -- cgit v0.10.2 From 080e0435e54298992dfc03dc04ca53cfe3de36ba Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 31 May 2013 22:47:04 +0200 Subject: ARM: ux500: avoid warning in ux500_read_asicid phys_addr_t may be 64 bit, which causes this harmless warning in ux500_read_asicid: arch/arm/mach-ux500/id.c: In function 'ux500_read_asicid': arch/arm/include/asm/io.h:159:19: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IOMEM(x) ((void __force __iomem *)(x)) ^ arch/arm/mach-ux500/id.c:40:9: note: in expansion of macro 'readl' return readl(IOMEM(UX500_VIRT_ROM + (addr & 0xfff))); We can solve this in a nicer way by making UX500_VIRT_ROM have a proper type to start with and calculating the address using pointer arithmetic. Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij diff --git a/arch/arm/mach-ux500/db8500-regs.h b/arch/arm/mach-ux500/db8500-regs.h index 1055c54..2739955 100644 --- a/arch/arm/mach-ux500/db8500-regs.h +++ b/arch/arm/mach-ux500/db8500-regs.h @@ -183,7 +183,7 @@ #define U8500_IO_VIRTUAL 0xf0000000 #define U8500_IO_PHYSICAL 0xa0000000 /* This is where we map in the ROM to check ASIC IDs */ -#define UX500_VIRT_ROM 0xf0000000 +#define UX500_VIRT_ROM IOMEM(0xf0000000) /* This macro is used in assembly, so no cast */ #define IO_ADDRESS(x) \ diff --git a/arch/arm/mach-ux500/id.c b/arch/arm/mach-ux500/id.c index 0d33d1a..392f2fd 100644 --- a/arch/arm/mach-ux500/id.c +++ b/arch/arm/mach-ux500/id.c @@ -21,11 +21,11 @@ struct dbx500_asic_id dbx500_id; -static unsigned int ux500_read_asicid(phys_addr_t addr) +static unsigned int __init ux500_read_asicid(phys_addr_t addr) { phys_addr_t base = addr & ~0xfff; struct map_desc desc = { - .virtual = UX500_VIRT_ROM, + .virtual = (unsigned long)UX500_VIRT_ROM, .pfn = __phys_to_pfn(base), .length = SZ_16K, .type = MT_DEVICE, @@ -37,7 +37,7 @@ static unsigned int ux500_read_asicid(phys_addr_t addr) local_flush_tlb_all(); flush_cache_all(); - return readl(IOMEM(UX500_VIRT_ROM + (addr & 0xfff))); + return readl(UX500_VIRT_ROM + (addr & 0xfff)); } static void ux500_print_soc_info(unsigned int asicid) -- cgit v0.10.2 From 03e40cecc21c9b24d3911896755fde933fc52887 Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Mon, 15 Apr 2013 13:44:52 +0900 Subject: ARM: shmobile: armadillo800eva: Fix maximum number of SCIF The r8a77740 has 9ch SCIF. It is not 8ch. Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Simon Horman diff --git a/arch/arm/configs/armadillo800eva_defconfig b/arch/arm/configs/armadillo800eva_defconfig index 0f2d80d..fae939d 100644 --- a/arch/arm/configs/armadillo800eva_defconfig +++ b/arch/arm/configs/armadillo800eva_defconfig @@ -86,7 +86,7 @@ CONFIG_TOUCHSCREEN_ST1232=y # CONFIG_SERIO is not set # CONFIG_LEGACY_PTYS is not set CONFIG_SERIAL_SH_SCI=y -CONFIG_SERIAL_SH_SCI_NR_UARTS=8 +CONFIG_SERIAL_SH_SCI_NR_UARTS=9 CONFIG_SERIAL_SH_SCI_CONSOLE=y # CONFIG_HW_RANDOM is not set CONFIG_I2C=y -- cgit v0.10.2 From f4b4ce8ed235d40240e1d446e612d96ab188b856 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 16 Apr 2013 22:18:11 -0700 Subject: ARM: shmobile: bockw: enable SDHI on defconfig Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman diff --git a/arch/arm/configs/bockw_defconfig b/arch/arm/configs/bockw_defconfig index 6524cdf..b74a4d4 100644 --- a/arch/arm/configs/bockw_defconfig +++ b/arch/arm/configs/bockw_defconfig @@ -72,6 +72,8 @@ CONFIG_SERIAL_SH_SCI_CONSOLE=y # CONFIG_HW_RANDOM is not set # CONFIG_HWMON is not set # CONFIG_USB_SUPPORT is not set +CONFIG_MMC=y +CONFIG_MMC_SDHI=y CONFIG_UIO=y CONFIG_UIO_PDRV_GENIRQ=y # CONFIG_IOMMU_SUPPORT is not set -- cgit v0.10.2 From 5de156bbc79d3048561f6c117ea14e96e3b75cd0 Mon Sep 17 00:00:00 2001 From: Vladimir Barinov Date: Wed, 17 Apr 2013 22:47:27 +0400 Subject: ARM: shmobile: bockw: enable I2C in defconfig Enable I2C driver in 'bockw_defconfig'. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Acked-by: Kuninori Morimoto [ horms+renesas@verge.net.au: resolved trivial conflicts ] Signed-off-by: Simon Horman diff --git a/arch/arm/configs/bockw_defconfig b/arch/arm/configs/bockw_defconfig index b74a4d4..2c3f34e 100644 --- a/arch/arm/configs/bockw_defconfig +++ b/arch/arm/configs/bockw_defconfig @@ -71,6 +71,8 @@ CONFIG_SERIAL_SH_SCI_NR_UARTS=6 CONFIG_SERIAL_SH_SCI_CONSOLE=y # CONFIG_HW_RANDOM is not set # CONFIG_HWMON is not set +CONFIG_I2C=y +CONFIG_I2C_RCAR=y # CONFIG_USB_SUPPORT is not set CONFIG_MMC=y CONFIG_MMC_SDHI=y -- cgit v0.10.2 From 3308f0e7c9723f01a21cd727bd2e46d5f2af6358 Mon Sep 17 00:00:00 2001 From: Vladimir Barinov Date: Wed, 17 Apr 2013 03:03:45 +0400 Subject: ARM: shmobile: bockw: enable CONFIG_PM_RUNTIME in defconfig Enable CONFIG_PM_RUNTIME in 'bockw_defconfig' -- it's already used by TMU, SCI, I2C, and Ether drivers to control the clocks... Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman diff --git a/arch/arm/configs/bockw_defconfig b/arch/arm/configs/bockw_defconfig index 2c3f34e..a4bc76d 100644 --- a/arch/arm/configs/bockw_defconfig +++ b/arch/arm/configs/bockw_defconfig @@ -31,6 +31,7 @@ CONFIG_CMDLINE="console=ttySC0,115200 ignore_loglevel root=/dev/nfs ip=dhcp" CONFIG_CMDLINE_FORCE=y # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set # CONFIG_SUSPEND is not set +CONFIG_PM_RUNTIME=y CONFIG_NET=y CONFIG_UNIX=y CONFIG_INET=y -- cgit v0.10.2 From fadc6e3ba1d2e79e25918da73093038c19297f30 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Wed, 17 Apr 2013 01:35:09 +0400 Subject: ARM: shmobile: bockw: enable USB in defconfig Enable USB platform EHCI/OHCI and common PHY drivers in 'bockw_defconfig'. Enable USB storage driver and SCSI disk driver that it needs as well... Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman diff --git a/arch/arm/configs/bockw_defconfig b/arch/arm/configs/bockw_defconfig index a4bc76d..d662608 100644 --- a/arch/arm/configs/bockw_defconfig +++ b/arch/arm/configs/bockw_defconfig @@ -49,6 +49,8 @@ CONFIG_DEVTMPFS_MOUNT=y # CONFIG_STANDALONE is not set # CONFIG_PREVENT_FIRMWARE_BUILD is not set # CONFIG_FW_LOADER is not set +CONFIG_SCSI=y +CONFIG_BLK_DEV_SD=y CONFIG_NETDEVICES=y # CONFIG_NET_CADENCE is not set # CONFIG_NET_VENDOR_BROADCOM is not set @@ -74,7 +76,14 @@ CONFIG_SERIAL_SH_SCI_CONSOLE=y # CONFIG_HWMON is not set CONFIG_I2C=y CONFIG_I2C_RCAR=y -# CONFIG_USB_SUPPORT is not set +CONFIG_USB=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_OHCI_HCD_PLATFORM=y +CONFIG_USB_EHCI_HCD_PLATFORM=y +CONFIG_USB_STORAGE=y +CONFIG_USB_RCAR_PHY=y CONFIG_MMC=y CONFIG_MMC_SDHI=y CONFIG_UIO=y -- cgit v0.10.2 From 76d415dfa7d53a2f92550484d766ae475a427daf Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Wed, 3 Apr 2013 17:53:54 +0200 Subject: ARM: shmobile: kzm9g: enable AS3711 PMIC in defconfig An AS3711 PMIC is used on kzm9g to supply CPU power and LCD backlight. This patch enables it in board defconfig. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Simon Horman diff --git a/arch/arm/configs/kzm9g_defconfig b/arch/arm/configs/kzm9g_defconfig index f6e585b..1ad0280 100644 --- a/arch/arm/configs/kzm9g_defconfig +++ b/arch/arm/configs/kzm9g_defconfig @@ -84,9 +84,12 @@ CONFIG_I2C_CHARDEV=y CONFIG_I2C_SH_MOBILE=y CONFIG_GPIO_PCF857X=y # CONFIG_HWMON is not set +CONFIG_MFD_AS3711=y CONFIG_REGULATOR=y +CONFIG_REGULATOR_AS3711=y CONFIG_FB=y CONFIG_FB_SH_MOBILE_LCDC=y +CONFIG_BACKLIGHT_AS3711=y CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_LOGO=y CONFIG_FB_SH_MOBILE_MERAM=y -- cgit v0.10.2 From b8568a0483a3363eda73d629536c8a019256a0bf Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 4 Apr 2013 21:24:27 -0700 Subject: ARM: shmobile: ape6evm: MP clock parent become EXTAL2 The orignal commit 3263e09d287fbaa8a9424b5e69396599a3bbd518 (ARM: shmobile: Initial r8a73a4 SoC support V3) put MP clock parent as EXTAL2, but its code was removed on DIV6 clock support commit. This patch makes it consistent. Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c index 55b8c9f..5eb0caa 100644 --- a/arch/arm/mach-shmobile/board-ape6evm.c +++ b/arch/arm/mach-shmobile/board-ape6evm.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -65,7 +66,21 @@ static const struct pinctrl_map ape6evm_pinctrl_map[] = { static void __init ape6evm_add_standard_devices(void) { + + struct clk *parent; + struct clk *mp; + r8a73a4_clock_init(); + + /* MP clock parent = extal2 */ + parent = clk_get(NULL, "extal2"); + mp = clk_get(NULL, "mp"); + BUG_ON(IS_ERR(parent) || IS_ERR(mp)); + + clk_set_parent(mp, parent); + clk_put(parent); + clk_put(mp); + pinctrl_register_mappings(ape6evm_pinctrl_map, ARRAY_SIZE(ape6evm_pinctrl_map)); r8a73a4_pinmux_init(); -- cgit v0.10.2 From 44bfe6847a088c6207a4a21974e5cfe8517d3e4f Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 16 Apr 2013 22:17:42 -0700 Subject: ARM: shmobile: bockw: define FPGA address and rename iomem variable Bock-W board will needs more board specific ioremap() method. This patch tidyup current FPGA specific settings Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index dac4365..badde08 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c @@ -46,10 +46,11 @@ static const struct pinctrl_map bockw_pinctrl_map[] = { "scif0_ctrl", "scif0"), }; +#define FPGA 0x18200000 #define IRQ0MR 0x30 static void __init bockw_init(void) { - void __iomem *fpga; + void __iomem *base; r8a7778_clock_init(); r8a7778_init_irq_extpin(1); @@ -59,8 +60,8 @@ static void __init bockw_init(void) ARRAY_SIZE(bockw_pinctrl_map)); r8a7778_pinmux_init(); - fpga = ioremap_nocache(0x18200000, SZ_1M); - if (fpga) { + base = ioremap_nocache(FPGA, SZ_1M); + if (base) { /* * CAUTION * @@ -68,10 +69,10 @@ static void __init bockw_init(void) * it should be cared in the future * Now, it is assuming IRQ0 was used only from SMSC. */ - u16 val = ioread16(fpga + IRQ0MR); + u16 val = ioread16(base + IRQ0MR); val &= ~(1 << 4); /* enable SMSC911x */ - iowrite16(val, fpga + IRQ0MR); - iounmap(fpga); + iowrite16(val, base + IRQ0MR); + iounmap(base); platform_device_register_resndata( &platform_bus, "smsc911x", -1, -- cgit v0.10.2 From df53721a60022263017c5d72e17a7780d0e5dc4c Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Thu, 4 Apr 2013 11:20:33 +0900 Subject: ARM: shmobile: kzm9d: resigser smsc911x platform device with id -1 As the kzm9d only has one smsc911x device it may be registered as a platform device with id -1. This allows the kzm9d board to access the smsc911x device when CONFIG_REGULATOR (and CONFIG_REGULATOR_FIXED_VOLTAGE) are set. The motivation for which is twofold: using regulators seems to be generally a good thing; it will move the kzm9d defconfig one step closer to being able to be consolidated with other shmobile defconfigs. An alternate but so far untested approach would be to update the definition of dummy_supplies in board-kzm9d.c to use "smsc911x.0" instead of "smsc911x". Signed-off-by: Simon Horman diff --git a/arch/arm/mach-shmobile/board-kzm9d.c b/arch/arm/mach-shmobile/board-kzm9d.c index c016ccd..4368000 100644 --- a/arch/arm/mach-shmobile/board-kzm9d.c +++ b/arch/arm/mach-shmobile/board-kzm9d.c @@ -56,7 +56,7 @@ static struct smsc911x_platform_config smsc911x_platdata = { static struct platform_device smsc91x_device = { .name = "smsc911x", - .id = 0, + .id = -1, .dev = { .platform_data = &smsc911x_platdata, }, -- cgit v0.10.2 From 28307e0a7c3841f2d54876639235c07ebe3d2999 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Tue, 12 Feb 2013 17:15:31 +0000 Subject: ARM: shmobile: kzm9g: add AS3711 PMIC platform data KZM9G uses an AS3711 PMIC to supply power to the CPU and the LCD backlight. The PMIC on the board is pre-programmed to supply correct voltages to the CPU, power supply to the backlight has to be turned on at run-time. The latter is currently performed by a hard-coded I2C command sequence in the board file. This patch removes the backlight hack and instead adds an I2C device to instantiate the AS3711 MFD driver, which will add a regulator device to dynamically adjust CPU voltages and a backlight device. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Simon Horman diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c index 1fdf05c..165483c 100644 --- a/arch/arm/mach-shmobile/board-kzm9g.c +++ b/arch/arm/mach-shmobile/board-kzm9g.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -606,6 +607,140 @@ static struct platform_device fsi_ak4648_device = { }; /* I2C */ + +/* StepDown1 is used to supply 1.315V to the CPU */ +static struct regulator_init_data as3711_sd1 = { + .constraints = { + .name = "1.315V CPU", + .boot_on = 1, + .always_on = 1, + .min_uV = 1315000, + .max_uV = 1335000, + }, +}; + +/* StepDown2 is used to supply 1.8V to the CPU and to the board */ +static struct regulator_init_data as3711_sd2 = { + .constraints = { + .name = "1.8V", + .boot_on = 1, + .always_on = 1, + .min_uV = 1800000, + .max_uV = 1800000, + }, +}; + +/* + * StepDown3 is switched in parallel with StepDown2, seems to be off, + * according to read-back pre-set register values + */ + +/* StepDown4 is used to supply 1.215V to the CPU and to the board */ +static struct regulator_init_data as3711_sd4 = { + .constraints = { + .name = "1.215V", + .boot_on = 1, + .always_on = 1, + .min_uV = 1215000, + .max_uV = 1235000, + }, +}; + +/* LDO1 is unused and unconnected */ + +/* LDO2 is used to supply 2.8V to the CPU */ +static struct regulator_init_data as3711_ldo2 = { + .constraints = { + .name = "2.8V CPU", + .boot_on = 1, + .always_on = 1, + .min_uV = 2800000, + .max_uV = 2800000, + }, +}; + +/* LDO3 is used to supply 3.0V to the CPU */ +static struct regulator_init_data as3711_ldo3 = { + .constraints = { + .name = "3.0V CPU", + .boot_on = 1, + .always_on = 1, + .min_uV = 3000000, + .max_uV = 3000000, + }, +}; + +/* LDO4 is used to supply 2.8V to the board */ +static struct regulator_init_data as3711_ldo4 = { + .constraints = { + .name = "2.8V", + .boot_on = 1, + .always_on = 1, + .min_uV = 2800000, + .max_uV = 2800000, + }, +}; + +/* LDO5 is switched parallel to LDO4, also set to 2.8V */ +static struct regulator_init_data as3711_ldo5 = { + .constraints = { + .name = "2.8V #2", + .boot_on = 1, + .always_on = 1, + .min_uV = 2800000, + .max_uV = 2800000, + }, +}; + +/* LDO6 is unused and unconnected */ + +/* LDO7 is used to supply 1.15V to the CPU */ +static struct regulator_init_data as3711_ldo7 = { + .constraints = { + .name = "1.15V CPU", + .boot_on = 1, + .always_on = 1, + .min_uV = 1150000, + .max_uV = 1150000, + }, +}; + +/* LDO8 is switched parallel to LDO7, also set to 1.15V */ +static struct regulator_init_data as3711_ldo8 = { + .constraints = { + .name = "1.15V CPU #2", + .boot_on = 1, + .always_on = 1, + .min_uV = 1150000, + .max_uV = 1150000, + }, +}; + +static struct as3711_platform_data as3711_pdata = { + .regulator = { + .init_data = { + [AS3711_REGULATOR_SD_1] = &as3711_sd1, + [AS3711_REGULATOR_SD_2] = &as3711_sd2, + [AS3711_REGULATOR_SD_4] = &as3711_sd4, + [AS3711_REGULATOR_LDO_2] = &as3711_ldo2, + [AS3711_REGULATOR_LDO_3] = &as3711_ldo3, + [AS3711_REGULATOR_LDO_4] = &as3711_ldo4, + [AS3711_REGULATOR_LDO_5] = &as3711_ldo5, + [AS3711_REGULATOR_LDO_7] = &as3711_ldo7, + [AS3711_REGULATOR_LDO_8] = &as3711_ldo8, + }, + }, + .backlight = { + .su2_fb = "sh_mobile_lcdc_fb.0", + .su2_max_uA = 36000, + .su2_feedback = AS3711_SU2_CURR_AUTO, + .su2_fbprot = AS3711_SU2_GPIO4, + .su2_auto_curr1 = true, + .su2_auto_curr2 = true, + .su2_auto_curr3 = true, + }, +}; + static struct pcf857x_platform_data pcf8575_pdata = { .gpio_base = GPIO_PCF8575_BASE, }; @@ -625,6 +760,11 @@ static struct i2c_board_info i2c0_devices[] = { I2C_BOARD_INFO("adxl34x", 0x1d), .irq = irq_pin(26), /* IRQ26 */ }, + { + I2C_BOARD_INFO("as3711", 0x40), + .irq = intcs_evt2irq(0x3300), /* IRQ24 */ + .platform_data = &as3711_pdata, + }, }; static struct i2c_board_info i2c1_devices[] = { @@ -715,59 +855,6 @@ static const struct pinctrl_map kzm_pinctrl_map[] = { "usb_vbus", "usb"), }; -/* - * FIXME - * - * This is quick hack for enabling LCDC backlight - */ -static int __init as3711_enable_lcdc_backlight(void) -{ - struct i2c_adapter *a = i2c_get_adapter(0); - struct i2c_msg msg; - int i, ret; - __u8 magic[] = { - 0x40, 0x2a, - 0x43, 0x3c, - 0x44, 0x3c, - 0x45, 0x3c, - 0x54, 0x03, - 0x51, 0x00, - 0x51, 0x01, - 0xff, 0x00, /* wait */ - 0x43, 0xf0, - 0x44, 0xf0, - 0x45, 0xf0, - }; - - if (!of_machine_is_compatible("renesas,kzm9g")) - return 0; - - if (!a) - return 0; - - msg.addr = 0x40; - msg.len = 2; - msg.flags = 0; - - for (i = 0; i < ARRAY_SIZE(magic); i += 2) { - msg.buf = magic + i; - - if (0xff == msg.buf[0]) { - udelay(500); - continue; - } - - ret = i2c_transfer(a, &msg, 1); - if (ret < 0) { - pr_err("i2c transfer fail\n"); - break; - } - } - - return 0; -} -device_initcall(as3711_enable_lcdc_backlight); - static void __init kzm_init(void) { regulator_register_always_on(2, "fixed-1.8V", fixed1v8_power_consumers, -- cgit v0.10.2 From d998cef3fc7ccd52c0ea2c849453dfcde38c8a56 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Apr 2013 23:54:16 -0700 Subject: ARM: shmobile: bockw: add CN9 SCIF/RCAN selection dipswitch explanation Debug serial (= SCIF0) is connected to CN9 upper side, and it is shared by RCAN. This patch adds SCIF/RCAN dipswitch explanation on comment area for developers. Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index badde08..3ce020a 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c @@ -26,6 +26,14 @@ #include #include +/* + * CN9(Upper side) SCIF/RCAN selection + * + * 1,4 3,6 + * SW40 SCIF RCAN + * SW41 SCIF RCAN + */ + static struct smsc911x_platform_config smsc911x_data = { .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, -- cgit v0.10.2 From 741440e868f5f08f747292097620ebad43cc5ef0 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 9 Apr 2013 02:37:15 -0700 Subject: ARM: shmobile: bockw: add dummy regulators for SMSC SMSC driver will try to get regulator if .config had CONFIG_REGULATOR, and, shmobile_defconfig has it. SMSC driver on Bock-W board will be failed if it doens't have dummy regulator settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index 3ce020a..4d65715 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c @@ -20,6 +20,8 @@ #include #include +#include +#include #include #include #include @@ -34,6 +36,12 @@ * SW41 SCIF RCAN */ +/* Dummy supplies, where voltage doesn't matter */ +static struct regulator_consumer_supply dummy_supplies[] = { + REGULATOR_SUPPLY("vddvario", "smsc911x"), + REGULATOR_SUPPLY("vdd33a", "smsc911x"), +}; + static struct smsc911x_platform_config smsc911x_data = { .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, @@ -82,6 +90,9 @@ static void __init bockw_init(void) iowrite16(val, base + IRQ0MR); iounmap(base); + regulator_register_fixed(0, dummy_supplies, + ARRAY_SIZE(dummy_supplies)); + platform_device_register_resndata( &platform_bus, "smsc911x", -1, smsc911x_resources, ARRAY_SIZE(smsc911x_resources), -- cgit v0.10.2 From 1034f4ee3f07b7d525c490d702b3dcbee3b56b54 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Tue, 23 Apr 2013 02:37:05 +0000 Subject: ARM: shmobile: lager: Add GPIO LEDs The board has 3 LEDs connected to GPIOs. Add a led-gpio device to support them. Based on "ARM: shmobile: marzen: Add GPIO LEDs" by Laurent Pinchart. Cc: Laurent Pinchart Signed-off-by: Simon Horman diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index 6114edd..6a1ba38 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c @@ -21,13 +21,37 @@ #include #include #include +#include #include +#include #include #include #include #include #include +/* LEDS */ +static struct gpio_led lager_leds[] = { + { + .name = "led8", + .gpio = RCAR_GP_PIN(5, 17), + .default_state = LEDS_GPIO_DEFSTATE_ON, + }, { + .name = "led7", + .gpio = RCAR_GP_PIN(4, 23), + .default_state = LEDS_GPIO_DEFSTATE_ON, + }, { + .name = "led6", + .gpio = RCAR_GP_PIN(4, 22), + .default_state = LEDS_GPIO_DEFSTATE_ON, + }, +}; + +static struct gpio_led_platform_data lager_leds_pdata = { + .leds = lager_leds, + .num_leds = ARRAY_SIZE(lager_leds), +}; + static const struct pinctrl_map lager_pinctrl_map[] = { /* SCIF0 (CN19: DEBUG SERIAL0) */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790", @@ -46,6 +70,9 @@ static void __init lager_add_standard_devices(void) r8a7790_pinmux_init(); r8a7790_add_standard_devices(); + platform_device_register_data(&platform_bus, "leds-gpio", -1, + &lager_leds_pdata, + sizeof(lager_leds_pdata)); } static const char *lager_boards_compat_dt[] __initdata = { -- cgit v0.10.2 From c3842e4fcbb7664276443b79187b7808c2e80a35 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Mon, 13 May 2013 16:04:31 +0900 Subject: ARM: shmobile: lager: support GPIO switches The lager board has pins 1 - 4 of SW2 wired up to GPIO pins. This patch allows access to those pins as KEYS 1 - 4 using gpio-keys. Signed-off-by: Simon Horman diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index 6a1ba38..d73e21d 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c @@ -18,6 +18,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include +#include +#include #include #include #include @@ -47,11 +50,27 @@ static struct gpio_led lager_leds[] = { }, }; -static struct gpio_led_platform_data lager_leds_pdata = { +static __initdata struct gpio_led_platform_data lager_leds_pdata = { .leds = lager_leds, .num_leds = ARRAY_SIZE(lager_leds), }; +/* GPIO KEY */ +#define GPIO_KEY(c, g, d, ...) \ + { .code = c, .gpio = g, .desc = d, .active_low = 1 } + +static __initdata struct gpio_keys_button gpio_buttons[] = { + GPIO_KEY(KEY_4, RCAR_GP_PIN(1, 28), "SW2-pin4"), + GPIO_KEY(KEY_3, RCAR_GP_PIN(1, 26), "SW2-pin3"), + GPIO_KEY(KEY_2, RCAR_GP_PIN(1, 24), "SW2-pin2"), + GPIO_KEY(KEY_1, RCAR_GP_PIN(1, 14), "SW2-pin1"), +}; + +static __initdata struct gpio_keys_platform_data lager_keys_pdata = { + .buttons = gpio_buttons, + .nbuttons = ARRAY_SIZE(gpio_buttons), +}; + static const struct pinctrl_map lager_pinctrl_map[] = { /* SCIF0 (CN19: DEBUG SERIAL0) */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790", @@ -73,6 +92,9 @@ static void __init lager_add_standard_devices(void) platform_device_register_data(&platform_bus, "leds-gpio", -1, &lager_leds_pdata, sizeof(lager_leds_pdata)); + platform_device_register_data(&platform_bus, "gpio-keys", -1, + &lager_keys_pdata, + sizeof(lager_keys_pdata)); } static const char *lager_boards_compat_dt[] __initdata = { -- cgit v0.10.2 From 6e267030252ab5309e074c3a19c92ceb7a01fc8b Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Thu, 18 Apr 2013 21:21:09 +0900 Subject: ARM: shmobile: marzen: Use INTC External IRQ pin driver for SMSC Update the marzen board to use the INTC External IRQ pin driver for SMSC. This code was originally posted by Magnus Damm as part of "ARM: shmobile: INTC External IRQ pin driver on r8a7779" but somehow omitted when I applied that patch. Cc: Magnus Damm Signed-off-by: Simon Horman diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c index fac9e0f..71f174e 100644 --- a/arch/arm/mach-shmobile/board-marzen.c +++ b/arch/arm/mach-shmobile/board-marzen.c @@ -69,7 +69,7 @@ static struct resource smsc911x_resources[] = { .flags = IORESOURCE_MEM, }, [1] = { - .start = gic_iid(0x3c), /* IRQ 1 */ + .start = irq_pin(1), /* IRQ 1 */ .flags = IORESOURCE_IRQ, }, }; @@ -405,6 +405,7 @@ static void __init marzen_init(void) pinctrl_register_mappings(marzen_pinctrl_map, ARRAY_SIZE(marzen_pinctrl_map)); r8a7779_pinmux_init(); + r8a7779_init_irq_extpin(1); /* IRQ1 as individual interrupt */ r8a7779_add_standard_devices(); platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); -- cgit v0.10.2 From ca7bb309485e4ec89a9addd47beaa1d079841b7d Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Wed, 17 Apr 2013 05:17:56 +0000 Subject: ARM: shmobile: bockw: add SDHI0 support This patch is directly accessing to PUPR4 register which can control SDHI0 CD/WP pin pull-up setting. It should be replaced in the future. Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index 4d65715..2b6103e 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c @@ -18,6 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include +#include #include #include #include @@ -54,16 +56,28 @@ static struct resource smsc911x_resources[] = { DEFINE_RES_IRQ(irq_pin(0)), /* IRQ 0 */ }; +/* SDHI */ +static struct sh_mobile_sdhi_info sdhi0_info = { + .tmio_caps = MMC_CAP_SD_HIGHSPEED, + .tmio_ocr_mask = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34, + .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT, +}; + static const struct pinctrl_map bockw_pinctrl_map[] = { /* SCIF0 */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778", "scif0_data_a", "scif0"), PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778", "scif0_ctrl", "scif0"), + /* SDHI0 */ + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778", + "sdhi0", "sdhi0"), }; #define FPGA 0x18200000 #define IRQ0MR 0x30 +#define PFC 0xfffc0000 +#define PUPR4 0x110 static void __init bockw_init(void) { void __iomem *base; @@ -76,6 +90,7 @@ static void __init bockw_init(void) ARRAY_SIZE(bockw_pinctrl_map)); r8a7778_pinmux_init(); + /* for SMSC */ base = ioremap_nocache(FPGA, SZ_1M); if (base) { /* @@ -98,6 +113,20 @@ static void __init bockw_init(void) smsc911x_resources, ARRAY_SIZE(smsc911x_resources), &smsc911x_data, sizeof(smsc911x_data)); } + + /* for SDHI */ + base = ioremap_nocache(PFC, 0x200); + if (base) { + /* + * FIXME + * + * SDHI CD/WP pin needs pull-up + */ + iowrite32(ioread32(base + PUPR4) | (3 << 26), base + PUPR4); + iounmap(base); + + r8a7778_sdhi_init(0, &sdhi0_info); + } } static const char *bockw_boards_compat_dt[] __initdata = { -- cgit v0.10.2 From f3031ff3f2e14f0ced4d45150316df2607b70a27 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Wed, 17 Apr 2013 23:33:47 -0700 Subject: ARM: shmobile: marzen: keep local function as static marzen_init_late() should be static Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c index 71f174e..9b5ed7e 100644 --- a/arch/arm/mach-shmobile/board-marzen.c +++ b/arch/arm/mach-shmobile/board-marzen.c @@ -350,7 +350,7 @@ static struct platform_device *marzen_late_devices[] __initdata = { &ohci1_device, }; -void __init marzen_init_late(void) +static void __init marzen_init_late(void) { /* get usb phy */ phy = usb_get_phy(USB_PHY_TYPE_USB2); -- cgit v0.10.2 From 76563bf4ba08beec91102e3790cb5d93fe23f484 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 11 Jun 2013 19:14:53 -0700 Subject: ARM: shmobile: bockw defconfig: add RTC RX8581 support Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman diff --git a/arch/arm/configs/bockw_defconfig b/arch/arm/configs/bockw_defconfig index d662608..cb7638d 100644 --- a/arch/arm/configs/bockw_defconfig +++ b/arch/arm/configs/bockw_defconfig @@ -86,6 +86,8 @@ CONFIG_USB_STORAGE=y CONFIG_USB_RCAR_PHY=y CONFIG_MMC=y CONFIG_MMC_SDHI=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_RX8581=y CONFIG_UIO=y CONFIG_UIO_PDRV_GENIRQ=y # CONFIG_IOMMU_SUPPORT is not set -- cgit v0.10.2 From 206c0e7a1d15774cb4965e0e7a6a592063085240 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 11 Jun 2013 19:16:38 -0700 Subject: ARM: shmobile: bockw defconfig: add M25P80 support Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman diff --git a/arch/arm/configs/bockw_defconfig b/arch/arm/configs/bockw_defconfig index cb7638d..55e00ff 100644 --- a/arch/arm/configs/bockw_defconfig +++ b/arch/arm/configs/bockw_defconfig @@ -49,6 +49,12 @@ CONFIG_DEVTMPFS_MOUNT=y # CONFIG_STANDALONE is not set # CONFIG_PREVENT_FIRMWARE_BUILD is not set # CONFIG_FW_LOADER is not set +CONFIG_MTD=y +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_CFI=y +CONFIG_MTD_CFI_AMDSTD=y +CONFIG_MTD_M25P80=y CONFIG_SCSI=y CONFIG_BLK_DEV_SD=y CONFIG_NETDEVICES=y @@ -76,6 +82,8 @@ CONFIG_SERIAL_SH_SCI_CONSOLE=y # CONFIG_HWMON is not set CONFIG_I2C=y CONFIG_I2C_RCAR=y +CONFIG_SPI=y +CONFIG_SPI_SH_HSPI=y CONFIG_USB=y CONFIG_USB_ANNOUNCE_NEW_DEVICES=y CONFIG_USB_EHCI_HCD=y -- cgit v0.10.2 From d69626d8913ceeacaa2cd369a2487c85f818fef1 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 11 Jun 2013 19:16:58 -0700 Subject: ARM: shmobile: bockw defconfig: add MMCIF support Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman diff --git a/arch/arm/configs/bockw_defconfig b/arch/arm/configs/bockw_defconfig index 55e00ff..845f5cd 100644 --- a/arch/arm/configs/bockw_defconfig +++ b/arch/arm/configs/bockw_defconfig @@ -94,6 +94,7 @@ CONFIG_USB_STORAGE=y CONFIG_USB_RCAR_PHY=y CONFIG_MMC=y CONFIG_MMC_SDHI=y +CONFIG_MMC_SH_MMCIF=y CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_RX8581=y CONFIG_UIO=y -- cgit v0.10.2 From 16a4b5ae32cf31e64b481ab3e2aa0ae964872123 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Wed, 10 Apr 2013 01:48:02 +0000 Subject: ARM: tegra: defconfig updates Enable some new features: * The Tegra114 SPI controller, for Dalmore's SPI flash. * Set all the GPIO leds triggers to their "if you don't know, say X" value, so there are some useful triggers for the gpio-leds support. * TPS65090 charger, for Dalmore. * ASoC RT5640 machine driver, for audio on Beaver and Dalmore. Also, rebuild tegra_defconfig on top of linux-next. This should make it easier to create future defconfig patches, without extraneous diffs. This should introduce no changes; simply moving entries around due to Kconfig ordering changes. The apparent exceptions are: * AUTO_ZRELADDR: Selected by ARM multi-platform support. * MTD_CHAR: Removed in Kconfig. Signed-off-by: Laxman Dewangan [swarren, squashed various patches] Signed-off-by: Stephen Warren diff --git a/arch/arm/configs/tegra_defconfig b/arch/arm/configs/tegra_defconfig index f7ba3161..1effb43 100644 --- a/arch/arm/configs/tegra_defconfig +++ b/arch/arm/configs/tegra_defconfig @@ -21,8 +21,8 @@ CONFIG_MODULE_FORCE_UNLOAD=y CONFIG_PARTITION_ADVANCED=y # CONFIG_IOSCHED_DEADLINE is not set # CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_TEGRA=y CONFIG_GPIO_PCA953X=y +CONFIG_ARCH_TEGRA=y CONFIG_ARCH_TEGRA_2x_SOC=y CONFIG_ARCH_TEGRA_3x_SOC=y CONFIG_ARCH_TEGRA_114_SOC=y @@ -36,7 +36,6 @@ CONFIG_HIGHMEM=y CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_KEXEC=y -CONFIG_AUTO_ZRELADDR=y CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y CONFIG_CPU_IDLE=y @@ -81,7 +80,6 @@ CONFIG_DEVTMPFS_MOUNT=y # CONFIG_FIRMWARE_IN_KERNEL is not set CONFIG_CMA=y CONFIG_MTD=y -CONFIG_MTD_CHAR=y CONFIG_MTD_M25P80=y CONFIG_PROC_DEVICETREE=y CONFIG_BLK_DEV_LOOP=y @@ -105,8 +103,8 @@ CONFIG_BRCMFMAC=m CONFIG_RT2X00=y CONFIG_RT2800USB=m CONFIG_INPUT_EVDEV=y -CONFIG_KEYBOARD_TEGRA=y CONFIG_KEYBOARD_GPIO=y +CONFIG_KEYBOARD_TEGRA=y CONFIG_INPUT_MISC=y CONFIG_INPUT_MPU3050=y # CONFIG_LEGACY_PTYS is not set @@ -121,6 +119,7 @@ CONFIG_I2C_MUX=y CONFIG_I2C_MUX_PINCTRL=y CONFIG_I2C_TEGRA=y CONFIG_SPI=y +CONFIG_SPI_TEGRA114=y CONFIG_SPI_TEGRA20_SFLASH=y CONFIG_SPI_TEGRA20_SLINK=y CONFIG_GPIO_PCA953X_IRQ=y @@ -129,14 +128,15 @@ CONFIG_GPIO_TPS6586X=y CONFIG_GPIO_TPS65910=y CONFIG_POWER_SUPPLY=y CONFIG_BATTERY_SBS=y +CONFIG_CHARGER_TPS65090=y CONFIG_POWER_RESET=y CONFIG_POWER_RESET_GPIO=y CONFIG_SENSORS_LM90=y -CONFIG_MFD_TPS6586X=y -CONFIG_MFD_TPS65910=y CONFIG_MFD_MAX8907=y -CONFIG_MFD_TPS65090=y CONFIG_MFD_PALMAS=y +CONFIG_MFD_TPS65090=y +CONFIG_MFD_TPS6586X=y +CONFIG_MFD_TPS65910=y CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED_VOLTAGE=y CONFIG_REGULATOR_VIRTUAL_CONSUMER=y @@ -171,6 +171,7 @@ CONFIG_SND=y # CONFIG_SND_USB is not set CONFIG_SND_SOC=y CONFIG_SND_SOC_TEGRA=y +CONFIG_SND_SOC_TEGRA_RT5640=y CONFIG_SND_SOC_TEGRA_WM8753=y CONFIG_SND_SOC_TEGRA_WM8903=y CONFIG_SND_SOC_TEGRA_TRIMSLICE=y @@ -190,7 +191,13 @@ CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y CONFIG_LEDS_GPIO=y CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_LEDS_TRIGGER_TRANSIENT=y +CONFIG_LEDS_TRIGGER_CAMERA=y CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_MAX8907=y CONFIG_RTC_DRV_PALMAS=y @@ -203,7 +210,6 @@ CONFIG_TEGRA20_APB_DMA=y CONFIG_STAGING=y CONFIG_SENSORS_ISL29018=y CONFIG_SENSORS_ISL29028=y -CONFIG_AK8975=y CONFIG_MFD_NVEC=y CONFIG_KEYBOARD_NVEC=y CONFIG_SERIO_NVEC_PS2=y @@ -213,6 +219,7 @@ CONFIG_TEGRA_IOMMU_GART=y CONFIG_TEGRA_IOMMU_SMMU=y CONFIG_MEMORY=y CONFIG_IIO=y +CONFIG_AK8975=y CONFIG_PWM=y CONFIG_PWM_TEGRA=y CONFIG_EXT2_FS=y -- cgit v0.10.2 From 9aa3853a6f6652901f7ae42ed6bfd85a11bdc795 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Sun, 2 Jun 2013 02:40:55 +0400 Subject: ARM: shmobile: BOCK-W: add Ether support Register Ether device from bockw_init(), passing the platform data to it, adding only the RMII pin group to bockw_pinctrl_map[]. Although the LINK signal exists on the board, it's connected to the link/activity LED output of the PHY, thus the link disappears and reappears after each packet. We'd be better off ignoring such signal and getting the link state from the PHY indirectly. Signed-off-by: Sergei Shtylyov [horms+renesas@verge.net.au: manually applied] Signed-off-by: Simon Horman diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index 2b6103e..bfe8f67 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c @@ -63,7 +63,24 @@ static struct sh_mobile_sdhi_info sdhi0_info = { .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT, }; +static struct sh_eth_plat_data ether_platform_data __initdata = { + .phy = 0x01, + .edmac_endian = EDMAC_LITTLE_ENDIAN, + .register_type = SH_ETH_REG_FAST_RCAR, + .phy_interface = PHY_INTERFACE_MODE_RMII, + /* + * Although the LINK signal is available on the board, it's connected to + * the link/activity LED output of the PHY, thus the link disappears and + * reappears after each packet. We'd be better off ignoring such signal + * and getting the link state from the PHY indirectly. + */ + .no_ether_link = 1, +}; + static const struct pinctrl_map bockw_pinctrl_map[] = { + /* Ether */ + PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7778", + "ether_rmii", "ether"), /* SCIF0 */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778", "scif0_data_a", "scif0"), @@ -85,6 +102,7 @@ static void __init bockw_init(void) r8a7778_clock_init(); r8a7778_init_irq_extpin(1); r8a7778_add_standard_devices(); + r8a7778_add_ether_device(ðer_platform_data); pinctrl_register_mappings(bockw_pinctrl_map, ARRAY_SIZE(bockw_pinctrl_map)); -- cgit v0.10.2 From ed17be92c00fde00b2431b31828736f8572d7ba7 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 11 Jun 2013 19:11:17 -0700 Subject: ARM: shmobile: bockw: add I2C device support This patch enables rx8581 on I2C0 Signed-off-by: Yusuke Goda Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index bfe8f67..a4251cc 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c @@ -77,6 +77,13 @@ static struct sh_eth_plat_data ether_platform_data __initdata = { .no_ether_link = 1, }; +/* I2C */ +static struct i2c_board_info i2c0_devices[] = { + { + I2C_BOARD_INFO("rx8581", 0x51), + }, +}; + static const struct pinctrl_map bockw_pinctrl_map[] = { /* Ether */ PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7778", @@ -103,7 +110,10 @@ static void __init bockw_init(void) r8a7778_init_irq_extpin(1); r8a7778_add_standard_devices(); r8a7778_add_ether_device(ðer_platform_data); + r8a7778_add_i2c_device(0); + i2c_register_board_info(0, i2c0_devices, + ARRAY_SIZE(i2c0_devices)); pinctrl_register_mappings(bockw_pinctrl_map, ARRAY_SIZE(bockw_pinctrl_map)); r8a7778_pinmux_init(); -- cgit v0.10.2 From c06a164ce2f0f8791ac566a44eaf1d227a5b6b5b Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 11 Jun 2013 19:11:41 -0700 Subject: ARM: shmobile: bockw: add SPI FLASH support This patch enables Spansion S25FL008K chip on HSPI0 Signed-off-by: Yusuke Goda Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index a4251cc..7d42f12 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c @@ -20,11 +20,14 @@ #include #include +#include #include #include #include #include #include +#include +#include #include #include #include @@ -84,10 +87,40 @@ static struct i2c_board_info i2c0_devices[] = { }, }; +/* HSPI*/ +static struct mtd_partition m25p80_spi_flash_partitions[] = { + { + .name = "data(spi)", + .size = 0x0100000, + .offset = 0, + }, +}; + +static struct flash_platform_data spi_flash_data = { + .name = "m25p80", + .type = "s25fl008k", + .parts = m25p80_spi_flash_partitions, + .nr_parts = ARRAY_SIZE(m25p80_spi_flash_partitions), +}; + +static struct spi_board_info spi_board_info[] __initdata = { + { + .modalias = "m25p80", + .max_speed_hz = 104000000, + .chip_select = 0, + .bus_num = 0, + .mode = SPI_MODE_0, + .platform_data = &spi_flash_data, + }, +}; + static const struct pinctrl_map bockw_pinctrl_map[] = { /* Ether */ PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7778", "ether_rmii", "ether"), + /* HSPI0 */ + PIN_MAP_MUX_GROUP_DEFAULT("sh-hspi.0", "pfc-r8a7778", + "hspi0_a", "hspi0"), /* SCIF0 */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778", "scif0_data_a", "scif0"), @@ -111,9 +144,12 @@ static void __init bockw_init(void) r8a7778_add_standard_devices(); r8a7778_add_ether_device(ðer_platform_data); r8a7778_add_i2c_device(0); + r8a7778_add_hspi_device(0); i2c_register_board_info(0, i2c0_devices, ARRAY_SIZE(i2c0_devices)); + spi_register_board_info(spi_board_info, + ARRAY_SIZE(spi_board_info)); pinctrl_register_mappings(bockw_pinctrl_map, ARRAY_SIZE(bockw_pinctrl_map)); r8a7778_pinmux_init(); -- cgit v0.10.2 From 1e0edb76e925927d396be60e22f9c5ab815f2ab0 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 11 Jun 2013 19:12:06 -0700 Subject: ARM: shmobile: bockw: add MMCIF support This patch enables CN26 MMCIF Signed-off-by: Yusuke Goda Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index 7d42f12..7d48461 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c @@ -41,6 +41,23 @@ * SW41 SCIF RCAN */ +/* + * MMC (CN26) pin + * + * SW6 (D2) 3 pin + * SW7 (D5) ON + * SW8 (D3) 3 pin + * SW10 (D4) 1 pin + * SW12 (CLK) 1 pin + * SW13 (D6) 3 pin + * SW14 (CMD) ON + * SW15 (D6) 1 pin + * SW16 (D0) ON + * SW17 (D1) ON + * SW18 (D7) 3 pin + * SW19 (MMC) 1 pin + */ + /* Dummy supplies, where voltage doesn't matter */ static struct regulator_consumer_supply dummy_supplies[] = { REGULATOR_SUPPLY("vddvario", "smsc911x"), @@ -114,6 +131,15 @@ static struct spi_board_info spi_board_info[] __initdata = { }, }; +/* MMC */ +static struct sh_mmcif_plat_data sh_mmcif_plat = { + .sup_pclk = 0, + .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34, + .caps = MMC_CAP_4_BIT_DATA | + MMC_CAP_8_BIT_DATA | + MMC_CAP_NEEDS_POLL, +}; + static const struct pinctrl_map bockw_pinctrl_map[] = { /* Ether */ PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7778", @@ -121,6 +147,11 @@ static const struct pinctrl_map bockw_pinctrl_map[] = { /* HSPI0 */ PIN_MAP_MUX_GROUP_DEFAULT("sh-hspi.0", "pfc-r8a7778", "hspi0_a", "hspi0"), + /* MMC */ + PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif", "pfc-r8a7778", + "mmc_data8", "mmc"), + PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif", "pfc-r8a7778", + "mmc_ctrl", "mmc"), /* SCIF0 */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778", "scif0_data_a", "scif0"), @@ -145,6 +176,7 @@ static void __init bockw_init(void) r8a7778_add_ether_device(ðer_platform_data); r8a7778_add_i2c_device(0); r8a7778_add_hspi_device(0); + r8a7778_add_mmc_device(&sh_mmcif_plat); i2c_register_board_info(0, i2c0_devices, ARRAY_SIZE(i2c0_devices)); -- cgit v0.10.2 From e1e16a4e7696add0c444a1f8766f6269d219a72b Mon Sep 17 00:00:00 2001 From: Olof Johansson Date: Fri, 14 Jun 2013 17:15:12 -0700 Subject: ARM: ux500: board-mop500: remove unused pin modes Removes the following warnings: arch/arm/mach-ux500/board-mop500-pins.c:51:6: warning: 'slpm_in_nopull_wkup' defined but not used [-Wunused-variable] arch/arm/mach-ux500/board-mop500-pins.c:63:6: warning: 'slpm_out_lo_wkup' defined but not used [-Wunused-variable] Signed-off-by: Olof Johansson Cc: Linus Walleij diff --git a/arch/arm/mach-ux500/board-mop500-pins.c b/arch/arm/mach-ux500/board-mop500-pins.c index 6086062..7936d40 100644 --- a/arch/arm/mach-ux500/board-mop500-pins.c +++ b/arch/arm/mach-ux500/board-mop500-pins.c @@ -48,8 +48,6 @@ BIAS(gpio_in_pd_slpm_gpio_nopull, PIN_INPUT_PULLDOWN|PIN_GPIOMODE_ENABLED|PIN_SL BIAS(gpio_out_hi, PIN_OUTPUT_HIGH|PIN_GPIOMODE_ENABLED); BIAS(gpio_out_lo, PIN_OUTPUT_LOW|PIN_GPIOMODE_ENABLED); /* Sleep modes */ -BIAS(slpm_in_nopull_wkup, PIN_SLEEPMODE_ENABLED| - PIN_SLPM_DIR_INPUT|PIN_SLPM_PULL_NONE|PIN_SLPM_WAKEUP_ENABLE); BIAS(slpm_in_wkup_pdis, PIN_SLEEPMODE_ENABLED| PIN_SLPM_DIR_INPUT|PIN_SLPM_WAKEUP_ENABLE|PIN_SLPM_PDIS_DISABLED); BIAS(slpm_in_wkup_pdis_en, PIN_SLEEPMODE_ENABLED| @@ -60,8 +58,6 @@ BIAS(slpm_wkup_pdis_en, PIN_SLEEPMODE_ENABLED| PIN_SLPM_WAKEUP_ENABLE|PIN_SLPM_PDIS_ENABLED); BIAS(slpm_out_lo_pdis, PIN_SLEEPMODE_ENABLED| PIN_SLPM_OUTPUT_LOW|PIN_SLPM_WAKEUP_DISABLE|PIN_SLPM_PDIS_DISABLED); -BIAS(slpm_out_lo_wkup, PIN_SLEEPMODE_ENABLED| - PIN_SLPM_OUTPUT_LOW|PIN_SLPM_WAKEUP_ENABLE); BIAS(slpm_out_lo_wkup_pdis, PIN_SLEEPMODE_ENABLED| PIN_SLPM_OUTPUT_LOW|PIN_SLPM_WAKEUP_ENABLE|PIN_SLPM_PDIS_DISABLED); BIAS(slpm_out_hi_wkup_pdis, PIN_SLEEPMODE_ENABLED|PIN_SLPM_OUTPUT_HIGH| -- cgit v0.10.2 From 2c83322ce820bcf2d5e8265de831489076ee211e Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Mon, 17 Jun 2013 23:39:44 +0400 Subject: ARM: shmobile: BOCK-W: change Ether device name When changing the name of Ether platform device in the commit c02f846938fe (ARM: shmobile: r8a7778: fix Ether device name), I completely forgot that there's also platform device name used in bockw_pinctrl_map[], so the commit "ARM: shmobile: BOCK-W: add Ether support" went in with the old "sh-eth" device name. Now change it to "r8a777x-ether" in accordance with the commits that are now in the 'net- next.git' repository, otherwise BOCK-W Ether support won't work in 3.11. Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index 7d48461..ce56381 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c @@ -142,7 +142,7 @@ static struct sh_mmcif_plat_data sh_mmcif_plat = { static const struct pinctrl_map bockw_pinctrl_map[] = { /* Ether */ - PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7778", + PIN_MAP_MUX_GROUP_DEFAULT("r8a777x-ether", "pfc-r8a7778", "ether_rmii", "ether"), /* HSPI0 */ PIN_MAP_MUX_GROUP_DEFAULT("sh-hspi.0", "pfc-r8a7778", -- cgit v0.10.2 From 863c9638f451085dd223a307d7b7ce16457fe31b Mon Sep 17 00:00:00 2001 From: Florian Vaussard Date: Tue, 21 May 2013 15:47:51 +0200 Subject: arm: omap: board-overo: reset GPIO for SMSC911x The reset GPIO should be set for the SMSC911x, otherwise the controller will not work and probing will fail. In the case of the tobi-duo expansion board, the second controller shares the same GPIO, thus no more changes are required (not tested). Signed-off-by: Florian Vaussard Signed-off-by: Tony Lindgren diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index 4ca6b68..5748b5d 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c @@ -68,6 +68,7 @@ #define OVERO_SMSC911X_CS 5 #define OVERO_SMSC911X_GPIO 176 +#define OVERO_SMSC911X_NRESET 64 #define OVERO_SMSC911X2_CS 4 #define OVERO_SMSC911X2_GPIO 65 @@ -122,7 +123,7 @@ static struct omap_smsc911x_platform_data smsc911x_cfg = { .id = 0, .cs = OVERO_SMSC911X_CS, .gpio_irq = OVERO_SMSC911X_GPIO, - .gpio_reset = -EINVAL, + .gpio_reset = OVERO_SMSC911X_NRESET, .flags = SMSC911X_USE_32BIT, }; -- cgit v0.10.2 From 8fb61e8d84e673eebf31e564a83bb71a50b1ed48 Mon Sep 17 00:00:00 2001 From: Lokesh Vutla Date: Thu, 13 Jun 2013 16:23:58 +0530 Subject: ARM: OMAP3EVM: Marking omap3_evm_display_init() with CONFIG_BROKEN On 37xx EVM non-dt boot fails with current mainline, because of broken GPIO numbering in the board file that uses hardcoded GPIOs. So marking omap3_evm_display_init() with CONFIG_BROKEN for now as suggested by Tony as per the below link: http://www.mail-archive.com/linux-omap@vger.kernel.org/msg90399.html Signed-off-by: Lokesh Vutla Tested-by: Paul Walmsley Signed-off-by: Tony Lindgren diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index f76d0de..8c02626 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c @@ -174,6 +174,7 @@ static struct panel_sharp_ls037v7dw01_data omap3_evm_lcd_data = { .ud_gpio = OMAP3EVM_LCD_PANEL_UD, }; +#ifdef CONFIG_BROKEN static void __init omap3_evm_display_init(void) { int r; @@ -193,6 +194,7 @@ static void __init omap3_evm_display_init(void) else gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1); } +#endif static struct omap_dss_device omap3_evm_lcd_device = { .name = "lcd", @@ -715,7 +717,9 @@ static void __init omap3_evm_init(void) omap_ads7846_init(1, OMAP3_EVM_TS_GPIO, 310, NULL); omap3evm_init_smsc911x(); +#ifdef CONFIG_BROKEN omap3_evm_display_init(); +#endif omap3_evm_wl12xx_init(); omap_twl4030_audio_init("omap3evm", NULL); } -- cgit v0.10.2 From a4b13a3b26e4ef7a5e50b95480eb396336095525 Mon Sep 17 00:00:00 2001 From: Aaro Koskinen Date: Sun, 16 Jun 2013 16:35:12 +0300 Subject: ARM: OMAP1: nokia770: enable Tahvo Add platform data for Tahvo. Signed-off-by: Aaro Koskinen [tony@atomide.com: left out extcon to remove dependency to USB patches] Signed-off-by: Tony Lindgren diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c index 62a15e2..91449c5 100644 --- a/arch/arm/mach-omap1/board-nokia770.c +++ b/arch/arm/mach-omap1/board-nokia770.c @@ -234,16 +234,26 @@ static struct i2c_board_info nokia770_i2c_board_info_2[] __initdata = { { I2C_BOARD_INFO("retu-mfd", 0x01), }, + { + I2C_BOARD_INFO("tahvo-mfd", 0x02), + }, }; static void __init nokia770_cbus_init(void) { const int retu_irq_gpio = 62; + const int tahvo_irq_gpio = 40; if (gpio_request_one(retu_irq_gpio, GPIOF_IN, "Retu IRQ")) return; + if (gpio_request_one(tahvo_irq_gpio, GPIOF_IN, "Tahvo IRQ")) { + gpio_free(retu_irq_gpio); + return; + } irq_set_irq_type(gpio_to_irq(retu_irq_gpio), IRQ_TYPE_EDGE_RISING); + irq_set_irq_type(gpio_to_irq(tahvo_irq_gpio), IRQ_TYPE_EDGE_RISING); nokia770_i2c_board_info_2[0].irq = gpio_to_irq(retu_irq_gpio); + nokia770_i2c_board_info_2[1].irq = gpio_to_irq(tahvo_irq_gpio); i2c_register_board_info(2, nokia770_i2c_board_info_2, ARRAY_SIZE(nokia770_i2c_board_info_2)); platform_device_register(&nokia770_cbus_device); -- cgit v0.10.2 From 45853507c9362b0bd606b37e8c7c7e7551caa78b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Verg=C3=A9?= Date: Tue, 28 May 2013 14:29:09 -0400 Subject: ARM: omap2plus_defconfig: enable USB_PHY and NOP_USB_XCEIV MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On OMAP2+ platforms, USB support needs physical layer signalling and the NOP USB Transceiver driver since v3.10. This patch enables USB_PHY and NOP_USB_XCEIV in omap2plus_defconfig. These two are harmless to the kernel stability, and useful since they are required for USB and Ethernet (over USB) support. We do not enable USB_EHCI_HCD here because all features aren't fully supported yet. This patch applies to Linux 3.10-rc3. Cc: Roger Quadros Cc: Arnd Bergmann Cc: Felipe Balbi Signed-off-by: Adrien VergĂ© Signed-off-by: Tony Lindgren diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig index abbe319..2ac0ffb 100644 --- a/arch/arm/configs/omap2plus_defconfig +++ b/arch/arm/configs/omap2plus_defconfig @@ -210,6 +210,8 @@ CONFIG_USB_WDM=y CONFIG_USB_STORAGE=y CONFIG_USB_LIBUSUAL=y CONFIG_USB_TEST=y +CONFIG_USB_PHY=y +CONFIG_NOP_USB_XCEIV=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DEBUG=y CONFIG_USB_GADGET_DEBUG_FILES=y -- cgit v0.10.2 From 90de827b9c238f8d8209bc7adc70190575514315 Mon Sep 17 00:00:00 2001 From: Soren Brinkmann Date: Wed, 19 Jun 2013 10:53:03 -0700 Subject: arm: multi_v7_defconfig: Enable Zynq UART driver Signed-off-by: Soren Brinkmann Signed-off-by: Michal Simek diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 2e67a27..bc1c4d7 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -46,6 +46,8 @@ CONFIG_SERIAL_SIRFSOC=y CONFIG_SERIAL_SIRFSOC_CONSOLE=y CONFIG_SERIAL_VT8500=y CONFIG_SERIAL_VT8500_CONSOLE=y +CONFIG_SERIAL_XILINX_PS_UART=y +CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y CONFIG_IPMI_HANDLER=y CONFIG_IPMI_SI=y CONFIG_I2C=y -- cgit v0.10.2 From c12d82b84353784f8233c28ee43cec0ac9fbd7d2 Mon Sep 17 00:00:00 2001 From: Soren Brinkmann Date: Wed, 19 Jun 2013 10:53:04 -0700 Subject: arm: multi_v7_defconfig: Enable initrd/initramfs support Add CONFIG_BLK_DEV_INITRD to the defconfig to support initramfs and initrd. Signed-off-by: Soren Brinkmann Signed-off-by: Michal Simek diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index bc1c4d7..f3b97be 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -1,6 +1,7 @@ CONFIG_EXPERIMENTAL=y CONFIG_NO_HZ=y CONFIG_HIGH_RES_TIMERS=y +CONFIG_BLK_DEV_INITRD=y CONFIG_ARCH_MVEBU=y CONFIG_MACH_ARMADA_370=y CONFIG_ARCH_SIRF=y -- cgit v0.10.2