From f18bfba41ea0c2f3af82df2a6fc519af87004355 Mon Sep 17 00:00:00 2001 From: Gregory CLEMENT Date: Wed, 12 Dec 2012 10:06:26 +0100 Subject: arm: mvebu: Update defconfig with Marvell RTC support The RTC class driver is already part of the mvebu_defconfig but the Marvell internal RTC not yet. Now that its support is added for mvebu let's update the config file. Signed-off-by: Gregory CLEMENT Tested-by: Florian Fainelli Acked-by: Arnd Bergmann Signed-off-by: Jason Cooper --- arch/arm/configs/mvebu_defconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm') diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig index cbd91bc..9d3922bf 100644 --- a/arch/arm/configs/mvebu_defconfig +++ b/arch/arm/configs/mvebu_defconfig @@ -41,6 +41,7 @@ CONFIG_GPIO_SYSFS=y # CONFIG_USB_SUPPORT is not set CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_S35390A=y +CONFIG_RTC_DRV_MV=y CONFIG_DMADEVICES=y CONFIG_MV_XOR=y # CONFIG_IOMMU_SUPPORT is not set -- cgit v1.1 From 71e2a396234d5b044c50145ec9d05648a618c0d1 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Fri, 21 Dec 2012 15:49:17 +0100 Subject: arm: mvebu: enable SDIO support in mvebu_defconfig Now that the mvsdio driver has gained Device Tree support and the necessary Device Tree informations has been added for Armada 370 and Armada XP platforms, we enable the MMC subsystem and the mvsdio driver in mvebu_defconfig. Signed-off-by: Thomas Petazzoni Signed-off-by: Jason Cooper --- arch/arm/configs/mvebu_defconfig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig index 9d3922bf..f69a715 100644 --- a/arch/arm/configs/mvebu_defconfig +++ b/arch/arm/configs/mvebu_defconfig @@ -39,6 +39,8 @@ CONFIG_SERIAL_8250_DW=y CONFIG_GPIOLIB=y CONFIG_GPIO_SYSFS=y # CONFIG_USB_SUPPORT is not set +CONFIG_MMC=y +CONFIG_MMC_MVSDIO=y CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_S35390A=y CONFIG_RTC_DRV_MV=y -- cgit v1.1 From 0c8cb1d4ae7d1a96be6a0bef18e7f44d88a18fdf Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Fri, 21 Dec 2012 15:49:18 +0100 Subject: arm: mvebu: enable mwifiex driver in mvebu_defconfig The Globalscale Mirabox platform, based on the Armada 370 from Marvell, has a SD8787 Wireless chip connected on the SDIO interface. Now that the mvsdio has a Device Tree binding, and the necessary Device Tree informations have been added at the SoC and board level, let's enable the mwifiex driver for the Wireless part of the SD8787 chip. For now, the driver gets probed correctly, detects a device and shows the network interfaces. However, scanning Wifi networks doesn't work for now, with a 'CMD_RESP: cmd 0x6 error, result=0x1' message. This will have to be investigated separately. Signed-off-by: Thomas Petazzoni Signed-off-by: Jason Cooper --- arch/arm/configs/mvebu_defconfig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig index f69a715..6243175 100644 --- a/arch/arm/configs/mvebu_defconfig +++ b/arch/arm/configs/mvebu_defconfig @@ -24,6 +24,7 @@ CONFIG_ARM_APPENDED_DTB=y CONFIG_VFP=y CONFIG_NET=y CONFIG_INET=y +CONFIG_CFG80211=y CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_BLK_DEV_SD=y CONFIG_ATA=y @@ -31,6 +32,8 @@ CONFIG_SATA_MV=y CONFIG_NETDEVICES=y CONFIG_MVNETA=y CONFIG_MARVELL_PHY=y +CONFIG_MWIFIEX=y +CONFIG_MWIFIEX_SDIO=y CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y CONFIG_I2C=y -- cgit v1.1 From c9b7a72d988d3474f3127cd39084d18bcc2df3df Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Fri, 21 Dec 2012 15:49:19 +0100 Subject: arm: mvebu: enable btmrvl driver in mvebu_defconfig The Globalscale Mirabox platform, based on the Armada 370 from Marvell, has a SD8787 Wireless/Bluetooth chip connected on the SDIO interface. Now that the mvsdio has a Device Tree binding, and the necessary Device Tree informations have been added at the SoC and board level, let's enable the btmrvl driver for the Bluetooth part of the SD8787 chip. For now, the driver gets probed correctly, detects the device but apparently fails to push the firmware to the device: Bluetooth: vendor=0x2df, device=0x911a, class=255, fn=2 Bluetooth: FW failed to be active in time! Bluetooth: Downloading firmware failed! Bluetooth: vendor=0x2df, device=0x911b, class=255, fn=3 Bluetooth: FW failed to be active in time! Bluetooth: Downloading firmware failed! This will have to be investigated separately. Signed-off-by: Thomas Petazzoni Signed-off-by: Jason Cooper --- arch/arm/configs/mvebu_defconfig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig index 6243175..02adb5d 100644 --- a/arch/arm/configs/mvebu_defconfig +++ b/arch/arm/configs/mvebu_defconfig @@ -24,6 +24,9 @@ CONFIG_ARM_APPENDED_DTB=y CONFIG_VFP=y CONFIG_NET=y CONFIG_INET=y +CONFIG_BT=y +CONFIG_BT_MRVL=y +CONFIG_BT_MRVL_SDIO=y CONFIG_CFG80211=y CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_BLK_DEV_SD=y -- cgit v1.1 From 572aab7a2b8d0001d98f84a03b4a55f8dadf3146 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 7 Jan 2013 17:27:14 +0100 Subject: arm: mvebu: add LEDs support to defconfig file The OpenBlocks AX3-4 platform has several LEDs, so it sounds wise to enable LED support in mvebu_defconfig. We anticipate that more platforms using Marvell EBU SoCs will have LEDs in the future. Signed-off-by: Thomas Petazzoni Signed-off-by: Jason Cooper --- arch/arm/configs/mvebu_defconfig | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig index 02adb5d..4e6f0ce 100644 --- a/arch/arm/configs/mvebu_defconfig +++ b/arch/arm/configs/mvebu_defconfig @@ -47,6 +47,11 @@ CONFIG_GPIO_SYSFS=y # CONFIG_USB_SUPPORT is not set CONFIG_MMC=y CONFIG_MMC_MVSDIO=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=m +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_S35390A=y CONFIG_RTC_DRV_MV=y -- cgit v1.1 From 25026d0d21faefe59aa316bf9ae29b56755e4e05 Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Thu, 10 Jan 2013 22:01:08 +0100 Subject: ARM: Kirkwood: Remove redundent USB clock alias Now that USB is instantiated via DT, and the USB DT node has a clocks property, we no longer need a C coded clock alias. Remove it. Signed-off-by: Andrew Lunn Signed-off-by: Jason Cooper --- arch/arm/mach-kirkwood/board-dt.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index 95cc04d..2c884fe 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c @@ -55,10 +55,6 @@ static void __init kirkwood_legacy_clk_init(void) orion_clkdev_add("0", "pcie", of_clk_get_from_provider(&clkspec)); - clkspec.args[0] = CGC_BIT_USB0; - orion_clkdev_add(NULL, "orion-ehci.0", - of_clk_get_from_provider(&clkspec)); - clkspec.args[0] = CGC_BIT_PEX1; orion_clkdev_add("1", "pcie", of_clk_get_from_provider(&clkspec)); -- cgit v1.1 From 970a43c76ffb85fbb3d215e5c2b91074f5e33768 Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Thu, 10 Jan 2013 22:01:09 +0100 Subject: ARM: Kirkwood: Remove redundent SDIO clock alias Now that SDIO is instantiated via DT, and the SDIO DT node has a clocks property, we no longer need a C coded clock alias. Remove it. Signed-off-by: Andrew Lunn Signed-off-by: Jason Cooper --- arch/arm/mach-kirkwood/board-dt.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index 2c884fe..8eac548 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c @@ -62,11 +62,6 @@ static void __init kirkwood_legacy_clk_init(void) clkspec.args[0] = CGC_BIT_GE1; orion_clkdev_add(NULL, "mv643xx_eth_port.1", of_clk_get_from_provider(&clkspec)); - - clkspec.args[0] = CGC_BIT_SDIO; - orion_clkdev_add(NULL, "mvsdio", - of_clk_get_from_provider(&clkspec)); - } static void __init kirkwood_of_clk_init(void) -- cgit v1.1 From 9f86f2761117f9031c349c1c1e80d9f64820e6f6 Mon Sep 17 00:00:00 2001 From: Olof Johansson Date: Sun, 13 Jan 2013 09:54:07 -0800 Subject: ARM: dove: update dove_defconfig with a few useful options This refreshes the dove_defconfig, and adds: PRINTK_TIME DEVTMPFS EXT4 They're quite useful, and allows booting a cubox ubuntu rootfs on SD card, since that by default uses ext4. The rest of the churn is due to options and defaults moving around, no functional difference. Signed-off-by: Olof Johansson Cc: Sebastian Hesselbarth Signed-off-by: Jason Cooper --- arch/arm/configs/dove_defconfig | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/configs/dove_defconfig b/arch/arm/configs/dove_defconfig index 0b7ee92..3fe8dae 100644 --- a/arch/arm/configs/dove_defconfig +++ b/arch/arm/configs/dove_defconfig @@ -1,26 +1,24 @@ CONFIG_EXPERIMENTAL=y CONFIG_SYSVIPC=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y CONFIG_LOG_BUF_SHIFT=14 CONFIG_EXPERT=y CONFIG_SLAB=y CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y # CONFIG_BLK_DEV_BSG is not set +CONFIG_PARTITION_ADVANCED=y CONFIG_ARCH_DOVE=y CONFIG_MACH_DOVE_DB=y CONFIG_MACH_CM_A510=y CONFIG_MACH_DOVE_DT=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y CONFIG_AEABI=y +CONFIG_HIGHMEM=y CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_HIGHMEM=y -CONFIG_USE_OF=y -CONFIG_ATAGS=y CONFIG_ARM_APPENDED_DTB=y CONFIG_ARM_ATAG_DTB_COMPAT=y -CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y CONFIG_VFP=y CONFIG_NET=y CONFIG_PACKET=y @@ -32,8 +30,9 @@ CONFIG_IP_PNP_DHCP=y CONFIG_IP_PNP_BOOTP=y # CONFIG_IPV6 is not set CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_CHAR=y CONFIG_MTD_BLOCK=y @@ -57,7 +56,6 @@ CONFIG_ATA=y CONFIG_SATA_MV=y CONFIG_NETDEVICES=y CONFIG_MV643XX_ETH=y -# CONFIG_NETDEV_10000 is not set CONFIG_INPUT_POLLDEV=y # CONFIG_INPUT_MOUSEDEV is not set CONFIG_INPUT_EVDEV=y @@ -68,10 +66,7 @@ CONFIG_LEGACY_PTY_COUNT=16 # CONFIG_DEVKMEM is not set CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_PCI is not set CONFIG_SERIAL_8250_RUNTIME_UARTS=2 -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_OF_PLATFORM=y # CONFIG_HW_RANDOM is not set CONFIG_I2C=y @@ -81,13 +76,11 @@ CONFIG_SPI=y CONFIG_SPI_ORION=y # CONFIG_HWMON is not set CONFIG_USB=y -CONFIG_USB_DEVICEFS=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_ROOT_HUB_TT=y CONFIG_USB_STORAGE=y CONFIG_MMC=y CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_IO_ACCESSORS=y CONFIG_MMC_SDHCI_PLTFM=y CONFIG_MMC_SDHCI_DOVE=y CONFIG_NEW_LEDS=y @@ -104,6 +97,7 @@ 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=y CONFIG_JOLIET=y CONFIG_UDF_FS=m @@ -112,24 +106,20 @@ CONFIG_VFAT_FS=y CONFIG_TMPFS=y CONFIG_JFFS2_FS=y CONFIG_NFS_FS=y -CONFIG_NFS_V3=y CONFIG_ROOT_NFS=y -CONFIG_PARTITION_ADVANCED=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_PRINTK_TIME=y CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_FS=y -CONFIG_DEBUG_KERNEL=y # CONFIG_SCHED_DEBUG is not set CONFIG_TIMER_STATS=y # CONFIG_DEBUG_BUGVERBOSE is not set CONFIG_DEBUG_INFO=y -CONFIG_SYSCTL_SYSCALL_CHECK=y CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y CONFIG_CRYPTO_NULL=y CONFIG_CRYPTO_ECB=m CONFIG_CRYPTO_PCBC=m @@ -138,7 +128,6 @@ CONFIG_CRYPTO_MD4=y CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA256=y CONFIG_CRYPTO_SHA512=y -CONFIG_CRYPTO_AES=y CONFIG_CRYPTO_BLOWFISH=y CONFIG_CRYPTO_TEA=y CONFIG_CRYPTO_TWOFISH=y @@ -147,5 +136,4 @@ CONFIG_CRYPTO_LZO=y # CONFIG_CRYPTO_ANSI_CPRNG is not set CONFIG_CRYPTO_DEV_MV_CESA=y CONFIG_CRC_CCITT=y -CONFIG_CRC16=y CONFIG_LIBCRC32C=y -- cgit v1.1 From 48be9ac930086f7605fb4959936f568e865b2cff Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 28 Feb 2013 18:19:16 +0100 Subject: ARM: Dove: split legacy and DT setup In the beginning of DT for Dove it was reasonable to have it close to non-DT code. With improved DT support, it became more and more difficult to not break non-DT while changing DT code. This patch splits up DT board setup and introduces a DOVE_LEGACY config to allow to remove legacy code for DT-only kernels. Signed-off-by: Sebastian Hesselbarth Signed-off-by: Jason Cooper --- arch/arm/mach-dove/Kconfig | 5 +++ arch/arm/mach-dove/Makefile | 4 +- arch/arm/mach-dove/board-dt.c | 102 ++++++++++++++++++++++++++++++++++++++++++ arch/arm/mach-dove/common.c | 85 ----------------------------------- 4 files changed, 110 insertions(+), 86 deletions(-) create mode 100644 arch/arm/mach-dove/board-dt.c (limited to 'arch/arm') diff --git a/arch/arm/mach-dove/Kconfig b/arch/arm/mach-dove/Kconfig index 603c5fd..aedd0ba 100644 --- a/arch/arm/mach-dove/Kconfig +++ b/arch/arm/mach-dove/Kconfig @@ -2,8 +2,12 @@ if ARCH_DOVE menu "Marvell Dove Implementations" +config DOVE_LEGACY + bool + config MACH_DOVE_DB bool "Marvell DB-MV88AP510 Development Board" + select DOVE_LEGACY select I2C_BOARDINFO help Say 'Y' here if you want your kernel to support the @@ -11,6 +15,7 @@ config MACH_DOVE_DB config MACH_CM_A510 bool "CompuLab CM-A510 Board" + select DOVE_LEGACY help Say 'Y' here if you want your kernel to support the CompuLab CM-A510 Board. diff --git a/arch/arm/mach-dove/Makefile b/arch/arm/mach-dove/Makefile index 5e683ba..3f0a858 100644 --- a/arch/arm/mach-dove/Makefile +++ b/arch/arm/mach-dove/Makefile @@ -1,4 +1,6 @@ -obj-y += common.o addr-map.o irq.o mpp.o +obj-y += common.o addr-map.o irq.o +obj-$(CONFIG_DOVE_LEGACY) += mpp.o obj-$(CONFIG_PCI) += pcie.o obj-$(CONFIG_MACH_DOVE_DB) += dove-db-setup.o +obj-$(CONFIG_MACH_DOVE_DT) += board-dt.o obj-$(CONFIG_MACH_CM_A510) += cm-a510.o diff --git a/arch/arm/mach-dove/board-dt.c b/arch/arm/mach-dove/board-dt.c new file mode 100644 index 0000000..61c2b59 --- /dev/null +++ b/arch/arm/mach-dove/board-dt.c @@ -0,0 +1,102 @@ +/* + * arch/arm/mach-dove/board-dt.c + * + * Marvell Dove 88AP510 System On Chip FDT Board + * + * 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 +#include +#include +#include +#include +#include +#include +#include +#include "common.h" + +/* + * There are still devices that doesn't even know about DT, + * get clock gates here and add a clock lookup. + */ +static void __init dove_legacy_clk_init(void) +{ + struct device_node *np = of_find_compatible_node(NULL, NULL, + "marvell,dove-gating-clock"); + struct of_phandle_args clkspec; + + clkspec.np = np; + clkspec.args_count = 1; + + clkspec.args[0] = CLOCK_GATING_BIT_USB0; + orion_clkdev_add(NULL, "orion-ehci.0", + of_clk_get_from_provider(&clkspec)); + + clkspec.args[0] = CLOCK_GATING_BIT_USB1; + orion_clkdev_add(NULL, "orion-ehci.1", + of_clk_get_from_provider(&clkspec)); + + clkspec.args[0] = CLOCK_GATING_BIT_GBE; + orion_clkdev_add(NULL, "mv643xx_eth_port.0", + of_clk_get_from_provider(&clkspec)); + + clkspec.args[0] = CLOCK_GATING_BIT_PCIE0; + orion_clkdev_add("0", "pcie", + of_clk_get_from_provider(&clkspec)); + + clkspec.args[0] = CLOCK_GATING_BIT_PCIE1; + orion_clkdev_add("1", "pcie", + of_clk_get_from_provider(&clkspec)); +} + +static void __init dove_of_clk_init(void) +{ + mvebu_clocks_init(); + dove_legacy_clk_init(); +} + +static struct mv643xx_eth_platform_data dove_dt_ge00_data = { + .phy_addr = MV643XX_ETH_PHY_ADDR_DEFAULT, +}; + +static void __init dove_dt_init(void) +{ + pr_info("Dove 88AP510 SoC\n"); + +#ifdef CONFIG_CACHE_TAUROS2 + tauros2_init(0); +#endif + dove_setup_cpu_mbus(); + + /* Setup root of clk tree */ + dove_of_clk_init(); + + /* Internal devices not ported to DT yet */ + dove_ge00_init(&dove_dt_ge00_data); + dove_ehci0_init(); + dove_ehci1_init(); + dove_pcie_init(1, 1); + + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); +} + +static const char * const dove_dt_board_compat[] = { + "marvell,dove", + NULL +}; + +DT_MACHINE_START(DOVE_DT, "Marvell Dove (Flattened Device Tree)") + .map_io = dove_map_io, + .init_early = dove_init_early, + .init_irq = orion_dt_init_irq, + .init_time = dove_timer_init, + .init_machine = dove_dt_init, + .restart = dove_restart, + .dt_compat = dove_dt_board_compat, +MACHINE_END diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c index ea84c535..c6b3b2b 100644 --- a/arch/arm/mach-dove/common.c +++ b/arch/arm/mach-dove/common.c @@ -360,88 +360,3 @@ void dove_restart(char mode, const char *cmd) while (1) ; } - -#if defined(CONFIG_MACH_DOVE_DT) -/* - * There are still devices that doesn't even know about DT, - * get clock gates here and add a clock lookup. - */ -static void __init dove_legacy_clk_init(void) -{ - struct device_node *np = of_find_compatible_node(NULL, NULL, - "marvell,dove-gating-clock"); - struct of_phandle_args clkspec; - - clkspec.np = np; - clkspec.args_count = 1; - - clkspec.args[0] = CLOCK_GATING_BIT_USB0; - orion_clkdev_add(NULL, "orion-ehci.0", - of_clk_get_from_provider(&clkspec)); - - clkspec.args[0] = CLOCK_GATING_BIT_USB1; - orion_clkdev_add(NULL, "orion-ehci.1", - of_clk_get_from_provider(&clkspec)); - - clkspec.args[0] = CLOCK_GATING_BIT_GBE; - orion_clkdev_add(NULL, "mv643xx_eth_port.0", - of_clk_get_from_provider(&clkspec)); - - clkspec.args[0] = CLOCK_GATING_BIT_PCIE0; - orion_clkdev_add("0", "pcie", - of_clk_get_from_provider(&clkspec)); - - clkspec.args[0] = CLOCK_GATING_BIT_PCIE1; - orion_clkdev_add("1", "pcie", - of_clk_get_from_provider(&clkspec)); -} - -static void __init dove_of_clk_init(void) -{ - mvebu_clocks_init(); - dove_legacy_clk_init(); -} - -static struct mv643xx_eth_platform_data dove_dt_ge00_data = { - .phy_addr = MV643XX_ETH_PHY_ADDR_DEFAULT, -}; - -static void __init dove_dt_init(void) -{ - pr_info("Dove 88AP510 SoC, TCLK = %d MHz.\n", - (dove_tclk + 499999) / 1000000); - -#ifdef CONFIG_CACHE_TAUROS2 - tauros2_init(0); -#endif - dove_setup_cpu_mbus(); - - /* Setup root of clk tree */ - dove_of_clk_init(); - - /* Internal devices not ported to DT yet */ - dove_rtc_init(); - - dove_ge00_init(&dove_dt_ge00_data); - dove_ehci0_init(); - dove_ehci1_init(); - dove_pcie_init(1, 1); - - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); -} - -static const char * const dove_dt_board_compat[] = { - "marvell,dove", - NULL -}; - -DT_MACHINE_START(DOVE_DT, "Marvell Dove (Flattened Device Tree)") - .map_io = dove_map_io, - .init_early = dove_init_early, - .init_irq = orion_dt_init_irq, - .init_time = dove_timer_init, - .init_machine = dove_dt_init, - .restart = dove_restart, - .dt_compat = dove_dt_board_compat, -MACHINE_END -#endif -- cgit v1.1 From 3202bf0157ccbf8f1f89051d60ba9ca3aa4d424f Mon Sep 17 00:00:00 2001 From: Gregory CLEMENT Date: Wed, 5 Dec 2012 21:43:23 +0100 Subject: arm: mvebu: Improve the SMP support of the interrupt controller This patch makes the interrupt controller driver more SMP aware for the Armada XP SoCs. It adds the support for the per-CPU irq. It also adds the implementation for the set_affinity hook. Patch initialy wrote by Yehuda Yitschak and reworked by Gregory CLEMENT. Signed-off-by: Yehuda Yitschak Signed-off-by: Gregory CLEMENT Signed-off-by: Jason Cooper --- arch/arm/boot/dts/armada-xp.dtsi | 2 +- arch/arm/mach-mvebu/irq-armada-370-xp.c | 72 +++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+), 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi index 2e37ef1..390ba98 100644 --- a/arch/arm/boot/dts/armada-xp.dtsi +++ b/arch/arm/boot/dts/armada-xp.dtsi @@ -30,7 +30,7 @@ }; mpic: interrupt-controller@d0020000 { - reg = <0xd0020a00 0x1d0>, + reg = <0xd0020a00 0x2d0>, <0xd0021070 0x58>; }; diff --git a/arch/arm/mach-mvebu/irq-armada-370-xp.c b/arch/arm/mach-mvebu/irq-armada-370-xp.c index 8e3fb08..f99a4a2 100644 --- a/arch/arm/mach-mvebu/irq-armada-370-xp.c +++ b/arch/arm/mach-mvebu/irq-armada-370-xp.c @@ -34,6 +34,7 @@ #define ARMADA_370_XP_INT_CONTROL (0x00) #define ARMADA_370_XP_INT_SET_ENABLE_OFFS (0x30) #define ARMADA_370_XP_INT_CLEAR_ENABLE_OFFS (0x34) +#define ARMADA_370_XP_INT_SOURCE_CTL(irq) (0x100 + irq*4) #define ARMADA_370_XP_CPU_INTACK_OFFS (0x44) @@ -41,28 +42,90 @@ #define ARMADA_370_XP_IN_DRBEL_MSK_OFFS (0xc) #define ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS (0x8) +#define ARMADA_370_XP_MAX_PER_CPU_IRQS (28) + #define ACTIVE_DOORBELLS (8) +static DEFINE_RAW_SPINLOCK(irq_controller_lock); + static void __iomem *per_cpu_int_base; static void __iomem *main_int_base; static struct irq_domain *armada_370_xp_mpic_domain; +/* + * In SMP mode: + * For shared global interrupts, mask/unmask global enable bit + * For CPU interrtups, mask/unmask the calling CPU's bit + */ static void armada_370_xp_irq_mask(struct irq_data *d) { +#ifdef CONFIG_SMP + irq_hw_number_t hwirq = irqd_to_hwirq(d); + + if (hwirq > ARMADA_370_XP_MAX_PER_CPU_IRQS) + writel(hwirq, main_int_base + + ARMADA_370_XP_INT_CLEAR_ENABLE_OFFS); + else + writel(hwirq, per_cpu_int_base + + ARMADA_370_XP_INT_SET_MASK_OFFS); +#else writel(irqd_to_hwirq(d), per_cpu_int_base + ARMADA_370_XP_INT_SET_MASK_OFFS); +#endif } static void armada_370_xp_irq_unmask(struct irq_data *d) { +#ifdef CONFIG_SMP + irq_hw_number_t hwirq = irqd_to_hwirq(d); + + if (hwirq > ARMADA_370_XP_MAX_PER_CPU_IRQS) + writel(hwirq, main_int_base + + ARMADA_370_XP_INT_SET_ENABLE_OFFS); + else + writel(hwirq, per_cpu_int_base + + ARMADA_370_XP_INT_CLEAR_MASK_OFFS); +#else writel(irqd_to_hwirq(d), per_cpu_int_base + ARMADA_370_XP_INT_CLEAR_MASK_OFFS); +#endif } #ifdef CONFIG_SMP static int armada_xp_set_affinity(struct irq_data *d, const struct cpumask *mask_val, bool force) { + unsigned long reg; + unsigned long new_mask = 0; + unsigned long online_mask = 0; + unsigned long count = 0; + irq_hw_number_t hwirq = irqd_to_hwirq(d); + int cpu; + + for_each_cpu(cpu, mask_val) { + new_mask |= 1 << cpu_logical_map(cpu); + count++; + } + + /* + * Forbid mutlicore interrupt affinity + * This is required since the MPIC HW doesn't limit + * several CPUs from acknowledging the same interrupt. + */ + if (count > 1) + return -EINVAL; + + for_each_cpu(cpu, cpu_online_mask) + online_mask |= 1 << cpu_logical_map(cpu); + + raw_spin_lock(&irq_controller_lock); + + reg = readl(main_int_base + ARMADA_370_XP_INT_SOURCE_CTL(hwirq)); + reg = (reg & (~online_mask)) | new_mask; + writel(reg, main_int_base + ARMADA_370_XP_INT_SOURCE_CTL(hwirq)); + + raw_spin_unlock(&irq_controller_lock); + return 0; } #endif @@ -155,6 +218,15 @@ static int __init armada_370_xp_mpic_of_init(struct device_node *node, #ifdef CONFIG_SMP armada_xp_mpic_smp_cpu_init(); + + /* + * Set the default affinity from all CPUs to the boot cpu. + * This is required since the MPIC doesn't limit several CPUs + * from acknowledging the same interrupt. + */ + cpumask_clear(irq_default_affinity); + cpumask_set_cpu(smp_processor_id(), irq_default_affinity); + #endif return 0; -- cgit v1.1 From 491221451b9998cf182770f2b5f8b3a8b141dd81 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Wed, 9 Jan 2013 20:56:07 +0100 Subject: arm: mvebu: add DTS file for Marvell RD-A370-A1 board This patch adds the DTS file to support the Marvell RD-A370-A1 (Reference Design board) also known as RD-88F6710 board. It is almost entirely similar to the DB-A370 board except that the first Ethernet PHY is SGMII-wired and the second is a switch which is RGMII-wired. Signed-off-by: Florian Fainelli Signed-off-by: Jason Cooper --- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/armada-370-rd.dts | 61 +++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 arch/arm/boot/dts/armada-370-rd.dts (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 5ebb44f..ed256e2 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -77,6 +77,7 @@ dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \ msm8960-cdp.dtb dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \ armada-370-mirabox.dtb \ + armada-370-rd.dtb \ armada-xp-db.dtb \ armada-xp-openblocks-ax3-4.dtb dtb-$(CONFIG_ARCH_MXC) += imx51-babbage.dtb \ diff --git a/arch/arm/boot/dts/armada-370-rd.dts b/arch/arm/boot/dts/armada-370-rd.dts new file mode 100644 index 0000000..d62dfac --- /dev/null +++ b/arch/arm/boot/dts/armada-370-rd.dts @@ -0,0 +1,61 @@ +/* + * Device Tree file for Marvell Armada 370 Reference Design board + * (RD-88F6710-A1) + * + * Copied from arch/arm/boot/dts/armada-370-db.dts + * + * Copyright (C) 2013 Florian Fainelli + * + * 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. + */ + +/dts-v1/; +/include/ "armada-370.dtsi" + +/ { + model = "Marvell Armada 370 Reference Design"; + compatible = "marvell,a370-rd", "marvell,armada370", "marvell,armada-370-xp"; + + chosen { + bootargs = "console=ttyS0,115200 earlyprintk"; + }; + + memory { + device_type = "memory"; + reg = <0x00000000 0x20000000>; /* 512 MB */ + }; + + soc { + serial@d0012000 { + clock-frequency = <200000000>; + status = "okay"; + }; + sata@d00a0000 { + nr-ports = <2>; + status = "okay"; + }; + + mdio { + phy0: ethernet-phy@0 { + reg = <0>; + }; + + phy1: ethernet-phy@1 { + reg = <1>; + }; + }; + + ethernet@d0070000 { + status = "okay"; + phy = <&phy0>; + phy-mode = "sgmii"; + }; + ethernet@d0074000 { + status = "okay"; + phy = <&phy1>; + phy-mode = "rgmii-id"; + }; + }; +}; -- cgit v1.1 From 9b47a4fb7760fabfbbc33b7d7703454684f36782 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 9 Dec 2012 19:40:04 +0100 Subject: ARM: kirkwood: convert Guruplug Server Plus to use the device tree Add a device tree entry for the Guruplug Server Plus board. This port was based both on the work done on the dreamplug and the dockstar. It builds, boots and works on my Guruplug Server Plus. Signed-off-by: Willy Tarreau Signed-off-by: Jason Cooper --- arch/arm/boot/dts/Makefile | 1 + .../arm/boot/dts/kirkwood-guruplug-server-plus.dts | 94 ++++++++++++++++++++++ arch/arm/mach-kirkwood/Kconfig | 7 ++ arch/arm/mach-kirkwood/Makefile | 1 + arch/arm/mach-kirkwood/board-dt.c | 4 + arch/arm/mach-kirkwood/board-guruplug.c | 39 +++++++++ arch/arm/mach-kirkwood/common.h | 5 ++ 7 files changed, 151 insertions(+) create mode 100644 arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts create mode 100644 arch/arm/mach-kirkwood/board-guruplug.c (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index ed256e2..ebba972 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -56,6 +56,7 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \ kirkwood-dockstar.dtb \ kirkwood-dreamplug.dtb \ kirkwood-goflexnet.dtb \ + kirkwood-guruplug-server-plus.dtb \ kirkwood-ib62x0.dtb \ kirkwood-iconnect.dtb \ kirkwood-iomega_ix2_200.dtb \ diff --git a/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts b/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts new file mode 100644 index 0000000..9555a86 --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts @@ -0,0 +1,94 @@ +/dts-v1/; + +/include/ "kirkwood.dtsi" +/include/ "kirkwood-6281.dtsi" + +/ { + model = "Globalscale Technologies Guruplug Server Plus"; + compatible = "globalscale,guruplug-server-plus", "globalscale,guruplug", "marvell,kirkwood-88f6281", "marvell,kirkwood"; + + memory { + device_type = "memory"; + reg = <0x00000000 0x20000000>; + }; + + chosen { + bootargs = "console=ttyS0,115200n8 earlyprintk"; + }; + + ocp@f1000000 { + pinctrl: pinctrl@10000 { + + pinctrl-0 = < &pmx_led_health_r &pmx_led_health_g + &pmx_led_wmode_r &pmx_led_wmode_g >; + pinctrl-names = "default"; + + pmx_led_health_r: pmx-led-health-r { + marvell,pins = "mpp46"; + marvell,function = "gpio"; + }; + pmx_led_health_g: pmx-led-health-g { + marvell,pins = "mpp47"; + marvell,function = "gpio"; + }; + pmx_led_wmode_r: pmx-led-wmode-r { + marvell,pins = "mpp48"; + marvell,function = "gpio"; + }; + pmx_led_wmode_g: pmx-led-wmode-g { + marvell,pins = "mpp49"; + marvell,function = "gpio"; + }; + }; + serial@12000 { + clock-frequency = <200000000>; + status = "ok"; + }; + + nand@3000000 { + status = "okay"; + + partition@0 { + label = "u-boot"; + reg = <0x00000000 0x00100000>; + read-only; + }; + + partition@100000 { + label = "uImage"; + reg = <0x00100000 0x00400000>; + }; + + partition@500000 { + label = "data"; + reg = <0x00500000 0x1fb00000>; + }; + }; + + sata@80000 { + status = "okay"; + nr-ports = <1>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + health-r { + label = "guruplug:red:health"; + gpios = <&gpio1 14 1>; + }; + health-g { + label = "guruplug:green:health"; + gpios = <&gpio1 15 1>; + }; + wmode-r { + label = "guruplug:red:wmode"; + gpios = <&gpio1 16 1>; + }; + wmode-g { + label = "guruplug:green:wmode"; + gpios = <&gpio1 17 1>; + }; + }; +}; diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig index f91cdff..7b6a64b 100644 --- a/arch/arm/mach-kirkwood/Kconfig +++ b/arch/arm/mach-kirkwood/Kconfig @@ -58,6 +58,13 @@ config ARCH_KIRKWOOD_DT Say 'Y' here if you want your kernel to support the Marvell Kirkwood using flattened device tree. +config MACH_GURUPLUG_DT + bool "Marvell GuruPlug Reference Board (Flattened Device Tree)" + select ARCH_KIRKWOOD_DT + help + Say 'Y' here if you want your kernel to support the + Marvell GuruPlug Reference Board (Flattened Device Tree). + config MACH_DREAMPLUG_DT bool "Marvell DreamPlug (Flattened Device Tree)" select ARCH_KIRKWOOD_DT diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile index d665309..4cc4bee 100644 --- a/arch/arm/mach-kirkwood/Makefile +++ b/arch/arm/mach-kirkwood/Makefile @@ -21,6 +21,7 @@ obj-$(CONFIG_MACH_T5325) += t5325-setup.o obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o obj-$(CONFIG_MACH_DREAMPLUG_DT) += board-dreamplug.o +obj-$(CONFIG_MACH_GURUPLUG_DT) += board-guruplug.o obj-$(CONFIG_MACH_ICONNECT_DT) += board-iconnect.o obj-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += board-dnskw.o obj-$(CONFIG_MACH_IB62X0_DT) += board-ib62x0.o diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index 8eac548..05b3b7e 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c @@ -98,6 +98,9 @@ static void __init kirkwood_dt_init(void) if (of_machine_is_compatible("globalscale,dreamplug")) dreamplug_init(); + if (of_machine_is_compatible("globalscale,guruplug")) + guruplug_dt_init(); + if (of_machine_is_compatible("dlink,dns-kirkwood")) dnskw_init(); @@ -149,6 +152,7 @@ static void __init kirkwood_dt_init(void) static const char * const kirkwood_dt_board_compat[] = { "globalscale,dreamplug", + "globalscale,guruplug", "dlink,dns-320", "dlink,dns-325", "iom,iconnect", diff --git a/arch/arm/mach-kirkwood/board-guruplug.c b/arch/arm/mach-kirkwood/board-guruplug.c new file mode 100644 index 0000000..0a0df45 --- /dev/null +++ b/arch/arm/mach-kirkwood/board-guruplug.c @@ -0,0 +1,39 @@ +/* + * arch/arm/mach-kirkwood/board-guruplug.c + * + * Marvell Guruplug 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 +#include +#include "common.h" + +static struct mv643xx_eth_platform_data guruplug_ge00_data = { + .phy_addr = MV643XX_ETH_PHY_ADDR(0), +}; + +static struct mv643xx_eth_platform_data guruplug_ge01_data = { + .phy_addr = MV643XX_ETH_PHY_ADDR(1), +}; + +static struct mvsdio_platform_data guruplug_mvsdio_data = { + /* unfortunately the CD signal has not been connected */ +}; + +void __init guruplug_dt_init(void) +{ + /* + * Basic setup. Needs to be called early. + */ + kirkwood_ge00_init(&guruplug_ge00_data); + kirkwood_ge01_init(&guruplug_ge01_data); + kirkwood_sdio_init(&guruplug_mvsdio_data); +} diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h index e956d02..537bdf8 100644 --- a/arch/arm/mach-kirkwood/common.h +++ b/arch/arm/mach-kirkwood/common.h @@ -60,6 +60,11 @@ void dreamplug_init(void); #else static inline void dreamplug_init(void) {}; #endif +#ifdef CONFIG_MACH_GURUPLUG_DT +void guruplug_dt_init(void); +#else +static inline void guruplug_dt_init(void) {}; +#endif #ifdef CONFIG_MACH_TS219_DT void qnap_dt_ts219_init(void); #else -- cgit v1.1 From 9b75ac0cbf11199c4d125e68c3b86ae7d0ee941f Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Wed, 23 Jan 2013 12:26:32 -0300 Subject: arm: mvebu: Update defconfig to select USB support Cc: Lior Amsalem Cc: Thomas Petazzoni Cc: Gregory CLEMENT Tested-by: Nobuhiro Iwamatsu Tested-by: Florian Fainelli Signed-off-by: Ezequiel Garcia Signed-off-by: Jason Cooper --- arch/arm/configs/mvebu_defconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig index 4e6f0ce..28e3332 100644 --- a/arch/arm/configs/mvebu_defconfig +++ b/arch/arm/configs/mvebu_defconfig @@ -44,7 +44,10 @@ CONFIG_I2C_MV64XXX=y CONFIG_SERIAL_8250_DW=y CONFIG_GPIOLIB=y CONFIG_GPIO_SYSFS=y -# CONFIG_USB_SUPPORT is not set +CONFIG_USB_SUPPORT=y +CONFIG_USB=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y CONFIG_MMC=y CONFIG_MMC_MVSDIO=y CONFIG_NEW_LEDS=y -- cgit v1.1 From 3a6f08a3708f6faf6aba4abbdeaa9da29393f696 Mon Sep 17 00:00:00 2001 From: Gregory CLEMENT Date: Fri, 25 Jan 2013 18:32:41 +0100 Subject: arm: mvebu: Add support for local interrupt MPIC allows the use of private interrupt for each CPUs. The 28th first interrupts are per-cpu. This patch adds support to use them. Signed-off-by: Gregory CLEMENT Signed-off-by: Jason Cooper --- arch/arm/mach-mvebu/irq-armada-370-xp.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-mvebu/irq-armada-370-xp.c b/arch/arm/mach-mvebu/irq-armada-370-xp.c index f99a4a2..274ff58 100644 --- a/arch/arm/mach-mvebu/irq-armada-370-xp.c +++ b/arch/arm/mach-mvebu/irq-armada-370-xp.c @@ -145,10 +145,17 @@ static int armada_370_xp_mpic_irq_map(struct irq_domain *h, { armada_370_xp_irq_mask(irq_get_irq_data(virq)); writel(hw, main_int_base + ARMADA_370_XP_INT_SET_ENABLE_OFFS); - - irq_set_chip_and_handler(virq, &armada_370_xp_irq_chip, - handle_level_irq); irq_set_status_flags(virq, IRQ_LEVEL); + + if (hw < ARMADA_370_XP_MAX_PER_CPU_IRQS) { + irq_set_percpu_devid(virq); + irq_set_chip_and_handler(virq, &armada_370_xp_irq_chip, + handle_percpu_devid_irq); + + } else { + irq_set_chip_and_handler(virq, &armada_370_xp_irq_chip, + handle_level_irq); + } set_irq_flags(virq, IRQF_VALID | IRQF_PROBE); return 0; @@ -245,7 +252,7 @@ asmlinkage void __exception_irq_entry armada_370_xp_handle_irq(struct pt_regs if (irqnr > 1022) break; - if (irqnr >= 8) { + if (irqnr > 0) { irqnr = irq_find_mapping(armada_370_xp_mpic_domain, irqnr); handle_IRQ(irqnr, regs); -- cgit v1.1 From cecf42c5d7a864509ee5cc6630d2414676f0b8a9 Mon Sep 17 00:00:00 2001 From: Gregory CLEMENT Date: Fri, 25 Jan 2013 18:32:43 +0100 Subject: arm: mvebu: update defconfig with local timer support Now that we have support for local timers, enable it by default Signed-off-by: Gregory CLEMENT Signed-off-by: Jason Cooper --- arch/arm/configs/mvebu_defconfig | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig index 28e3332..4476a30 100644 --- a/arch/arm/configs/mvebu_defconfig +++ b/arch/arm/configs/mvebu_defconfig @@ -14,7 +14,6 @@ CONFIG_MACH_ARMADA_XP=y # CONFIG_CACHE_L2X0 is not set # CONFIG_SWP_EMULATE is not set CONFIG_SMP=y -# CONFIG_LOCAL_TIMERS is not set CONFIG_AEABI=y CONFIG_HIGHMEM=y # CONFIG_COMPACTION is not set -- cgit v1.1 From 568fc0a321a7f3ae1c3626a4f471d49ff005779c Mon Sep 17 00:00:00 2001 From: Gregory CLEMENT Date: Thu, 31 Jan 2013 15:50:12 +0100 Subject: arm: mvebu: support for the new Armada XP development board(DB-MV784MP-GP) This is the new Armada XP evaluation board from Marvell. It comes with a RS232 port over USB, a SATA link, an internal SSD, 4 Ethernet Gigabit links. Support for USB (Host and device), SDIO, PCIe will be added as drivers when they become available for Armada XP in mainline. Tested-by: Simon Guinot Tested-by: Florian Fainelli Signed-off-by: Gregory CLEMENT Tested-by: Ezequiel Garcia Signed-off-by: Jason Cooper --- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/armada-xp-gp.dts | 101 +++++++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+) create mode 100644 arch/arm/boot/dts/armada-xp-gp.dts (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index ebba972..157fbeb 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -80,6 +80,7 @@ dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \ armada-370-mirabox.dtb \ armada-370-rd.dtb \ armada-xp-db.dtb \ + armada-xp-gp.dtb \ armada-xp-openblocks-ax3-4.dtb dtb-$(CONFIG_ARCH_MXC) += imx51-babbage.dtb \ imx53-ard.dtb \ diff --git a/arch/arm/boot/dts/armada-xp-gp.dts b/arch/arm/boot/dts/armada-xp-gp.dts new file mode 100644 index 0000000..3eea531 --- /dev/null +++ b/arch/arm/boot/dts/armada-xp-gp.dts @@ -0,0 +1,101 @@ +/* + * Device Tree file for Marvell Armada XP development board + * (DB-MV784MP-GP) + * + * Copyright (C) 2013 Marvell + * + * Lior Amsalem + * Gregory CLEMENT + * Thomas Petazzoni + * + * 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. + */ + +/dts-v1/; +/include/ "armada-xp-mv78460.dtsi" + +/ { + model = "Marvell Armada XP Development Board DB-MV784MP-GP"; + compatible = "marvell,axp-gp", "marvell,armadaxp-mv78460", "marvell,armadaxp", "marvell,armada-370-xp"; + + chosen { + bootargs = "console=ttyS0,115200 earlyprintk"; + }; + + memory { + device_type = "memory"; + + /* + * 4 GB of plug-in RAM modules by default but only 3GB + * are visible, the amount of memory available can be + * changed by the bootloader according the size of the + * module actually plugged + */ + reg = <0x00000000 0xC0000000>; + }; + + soc { + serial@d0012000 { + clock-frequency = <250000000>; + status = "okay"; + }; + serial@d0012100 { + clock-frequency = <250000000>; + status = "okay"; + }; + serial@d0012200 { + clock-frequency = <250000000>; + status = "okay"; + }; + serial@d0012300 { + clock-frequency = <250000000>; + status = "okay"; + }; + + sata@d00a0000 { + nr-ports = <2>; + status = "okay"; + }; + + mdio { + phy0: ethernet-phy@0 { + reg = <16>; + }; + + phy1: ethernet-phy@1 { + reg = <17>; + }; + + phy2: ethernet-phy@2 { + reg = <18>; + }; + + phy3: ethernet-phy@3 { + reg = <19>; + }; + }; + + ethernet@d0070000 { + status = "okay"; + phy = <&phy0>; + phy-mode = "rgmii-id"; + }; + ethernet@d0074000 { + status = "okay"; + phy = <&phy1>; + phy-mode = "rgmii-id"; + }; + ethernet@d0030000 { + status = "okay"; + phy = <&phy2>; + phy-mode = "rgmii-id"; + }; + ethernet@d0034000 { + status = "okay"; + phy = <&phy3>; + phy-mode = "rgmii-id"; + }; + }; +}; -- cgit v1.1 From d2d1ef4f021d8a56f787af60a0b44ee758ef5013 Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Wed, 6 Feb 2013 10:06:22 -0300 Subject: ARM: mvebu: Update defconfig to select SPI support Cc: Thomas Petazzoni Cc: Lior Amsalem Acked-by: Gregory Clement Signed-off-by: Ezequiel Garcia Signed-off-by: Jason Cooper --- arch/arm/configs/mvebu_defconfig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig index 4476a30..12da323 100644 --- a/arch/arm/configs/mvebu_defconfig +++ b/arch/arm/configs/mvebu_defconfig @@ -39,6 +39,8 @@ CONFIG_MWIFIEX_SDIO=y CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y CONFIG_I2C=y +CONFIG_SPI=y +CONFIG_SPI_ORION=y CONFIG_I2C_MV64XXX=y CONFIG_SERIAL_8250_DW=y CONFIG_GPIOLIB=y -- cgit v1.1 From d0b8a49c4bddca6e9d55fc2eb1e151a7403a8093 Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Wed, 6 Feb 2013 10:06:24 -0300 Subject: ARM: mvebu: Update defconfig to select SPI flash and MTD support The Armada XP DB-MV784MP-GP board has an SPI flash device. These options allow to access that device over MTD. Signed-off-by: Ezequiel Garcia Signed-off-by: Jason Cooper --- arch/arm/configs/mvebu_defconfig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig index 12da323..da6ad6b 100644 --- a/arch/arm/configs/mvebu_defconfig +++ b/arch/arm/configs/mvebu_defconfig @@ -42,6 +42,9 @@ CONFIG_I2C=y CONFIG_SPI=y CONFIG_SPI_ORION=y CONFIG_I2C_MV64XXX=y +CONFIG_MTD=y +CONFIG_MTD_CHAR=y +CONFIG_MTD_M25P80=y CONFIG_SERIAL_8250_DW=y CONFIG_GPIOLIB=y CONFIG_GPIO_SYSFS=y -- cgit v1.1 From d57c3590f5136a125e4684a1c1ab24f1b5dd2cfd Mon Sep 17 00:00:00 2001 From: Gregory CLEMENT Date: Mon, 4 Feb 2013 18:21:07 +0100 Subject: arm: mvebu: update defconfig with ATAG support when using DT Some of the mvebu boards (mainly the development board) come with plug-in RAM modules. This patch allows to let the bootloaders which have no support for DTS to give the real amount of memory available on the board. Signed-off-by: Gregory CLEMENT Signed-off-by: Jason Cooper --- arch/arm/configs/mvebu_defconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm') diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig index da6ad6b..2ec8119 100644 --- a/arch/arm/configs/mvebu_defconfig +++ b/arch/arm/configs/mvebu_defconfig @@ -20,6 +20,7 @@ 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_VFP=y CONFIG_NET=y CONFIG_INET=y -- cgit v1.1 From 0db98549bdb4837bd63becc9c0f70929ca8b88f7 Mon Sep 17 00:00:00 2001 From: Gregory CLEMENT Date: Wed, 12 Dec 2012 10:06:24 +0100 Subject: arm: mvebu: Add RTC support for Armada 370 and Armada XP The Armada 370 and Armada XP Socs have the same controller that the one used in the orion platforms. This patch updates the device tree for these SoCs. Signed-off-by: Gregory CLEMENT Acked-by: Andrew Lunn Tested-by: Florian Fainelli Acked-by: Arnd Bergmann Signed-off-by: Jason Cooper --- arch/arm/boot/dts/armada-370-xp.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi index 4c0abe8..5b29225 100644 --- a/arch/arm/boot/dts/armada-370-xp.dtsi +++ b/arch/arm/boot/dts/armada-370-xp.dtsi @@ -131,6 +131,12 @@ clocks = <&coreclk 0>; status = "disabled"; }; + + rtc@10300 { + compatible = "marvell,orion-rtc"; + reg = <0xd0010300 0x20>; + interrupts = <50>; + }; }; }; -- cgit v1.1 From 42bb531671d5f32af2d0afe4ea7a9eb54992ed21 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Fri, 21 Dec 2012 15:49:04 +0100 Subject: arm: mvebu: add DT information for the SDIO interface of Armada 370/XP Now that the mvsdio MMC driver has a Device Tree binding, we add the Device Tree informations to describe the SDIO interface available in the Armada 370/XP SoCs. Signed-off-by: Thomas Petazzoni Signed-off-by: Jason Cooper --- arch/arm/boot/dts/armada-370-xp.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi index 5b29225..28276fe 100644 --- a/arch/arm/boot/dts/armada-370-xp.dtsi +++ b/arch/arm/boot/dts/armada-370-xp.dtsi @@ -137,6 +137,14 @@ reg = <0xd0010300 0x20>; interrupts = <50>; }; + + mvsdio@d00d4000 { + compatible = "marvell,orion-sdio"; + reg = <0xd00d4000 0x200>; + interrupts = <54>; + clocks = <&gateclk 17>; + status = "disabled"; + }; }; }; -- cgit v1.1 From fa1b21d13538d52639ee19eea2aa6148a6c3ba47 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Fri, 21 Dec 2012 15:49:05 +0100 Subject: arm: mvebu: add pin muxing options for the SDIO interface on Armada 370 The SDIO interface is available either on pins MPP9/11/12/13/14/15 or MPP47/48/49/50/51/52 on the Armada 370. Even though all combinations are potentially possible, those two muxing options are the most probable ones, so we provide those at the SoC level .dtsi file. In practice, in turns out the Armada 370 DB board uses the former, while the Armada 370 Mirabox uses the latter. Signed-off-by: Thomas Petazzoni Signed-off-by: Jason Cooper --- arch/arm/boot/dts/armada-370.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/armada-370.dtsi b/arch/arm/boot/dts/armada-370.dtsi index 636cf7d..88f9bab 100644 --- a/arch/arm/boot/dts/armada-370.dtsi +++ b/arch/arm/boot/dts/armada-370.dtsi @@ -47,6 +47,18 @@ pinctrl { compatible = "marvell,mv88f6710-pinctrl"; reg = <0xd0018000 0x38>; + + sdio_pins1: sdio-pins1 { + marvell,pins = "mpp9", "mpp11", "mpp12", + "mpp13", "mpp14", "mpp15"; + marvell,function = "sd0"; + }; + + sdio_pins2: sdio-pins2 { + marvell,pins = "mpp47", "mpp48", "mpp49", + "mpp50", "mpp51", "mpp52"; + marvell,function = "sd0"; + }; }; gpio0: gpio@d0018100 { -- cgit v1.1 From 6d36e8e08fd9eafd2fe9776f52d2dcddf3d984f5 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Fri, 21 Dec 2012 15:49:06 +0100 Subject: arm: mvebu: add pin muxing options for the SDIO interface on Armada XP The SDIO interface is only available on pins MPP30/31/32/33/34/35 on the various Armada XP variants, so we provide a pin muxing option for this in the Armada XP .dtsi files. Even though those muxing options are the same for MV78230, MV78260 and MV78460, we keep them in each .dtsi file, because the number of pins, and therefore the declaration of the pinctrl node, is different for each SoC variant. Signed-off-by: Thomas Petazzoni Signed-off-by: Jason Cooper --- arch/arm/boot/dts/armada-xp-mv78230.dtsi | 6 ++++++ arch/arm/boot/dts/armada-xp-mv78260.dtsi | 6 ++++++ arch/arm/boot/dts/armada-xp-mv78460.dtsi | 6 ++++++ 3 files changed, 18 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/armada-xp-mv78230.dtsi b/arch/arm/boot/dts/armada-xp-mv78230.dtsi index e041f42..f56c405 100644 --- a/arch/arm/boot/dts/armada-xp-mv78230.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78230.dtsi @@ -47,6 +47,12 @@ pinctrl { compatible = "marvell,mv78230-pinctrl"; reg = <0xd0018000 0x38>; + + sdio_pins: sdio-pins { + marvell,pins = "mpp30", "mpp31", "mpp32", + "mpp33", "mpp34", "mpp35"; + marvell,function = "sd0"; + }; }; gpio0: gpio@d0018100 { diff --git a/arch/arm/boot/dts/armada-xp-mv78260.dtsi b/arch/arm/boot/dts/armada-xp-mv78260.dtsi index 9e23bd8..f8f2b78 100644 --- a/arch/arm/boot/dts/armada-xp-mv78260.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi @@ -48,6 +48,12 @@ pinctrl { compatible = "marvell,mv78260-pinctrl"; reg = <0xd0018000 0x38>; + + sdio_pins: sdio-pins { + marvell,pins = "mpp30", "mpp31", "mpp32", + "mpp33", "mpp34", "mpp35"; + marvell,function = "sd0"; + }; }; gpio0: gpio@d0018100 { diff --git a/arch/arm/boot/dts/armada-xp-mv78460.dtsi b/arch/arm/boot/dts/armada-xp-mv78460.dtsi index 9659661..936c25d 100644 --- a/arch/arm/boot/dts/armada-xp-mv78460.dtsi +++ b/arch/arm/boot/dts/armada-xp-mv78460.dtsi @@ -63,6 +63,12 @@ pinctrl { compatible = "marvell,mv78460-pinctrl"; reg = <0xd0018000 0x38>; + + sdio_pins: sdio-pins { + marvell,pins = "mpp30", "mpp31", "mpp32", + "mpp33", "mpp34", "mpp35"; + marvell,function = "sd0"; + }; }; gpio0: gpio@d0018100 { -- cgit v1.1 From d64c129b44d90fd7075dc7cf4b0f30ef70c316f7 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Fri, 21 Dec 2012 15:49:07 +0100 Subject: arm: mvebu: enable the SD card slot on Armada XP DB board The Armada XP DB evaluation board has one SD card slot, directly connected to the SDIO IP of the SoC, so we enable this IP. Unfortunately, there are no GPIOs for card-detect and write-protect. Signed-off-by: Thomas Petazzoni Signed-off-by: Jason Cooper --- arch/arm/boot/dts/armada-xp-db.dts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/armada-xp-db.dts b/arch/arm/boot/dts/armada-xp-db.dts index 8e53b25..c7035c5 100644 --- a/arch/arm/boot/dts/armada-xp-db.dts +++ b/arch/arm/boot/dts/armada-xp-db.dts @@ -90,5 +90,12 @@ phy = <&phy3>; phy-mode = "sgmii"; }; + + mvsdio@d00d4000 { + pinctrl-0 = <&sdio_pins>; + pinctrl-names = "default"; + status = "okay"; + /* No CD or WP GPIOs */ + }; }; }; -- cgit v1.1 From b6150c710658faed9ebe80f989f622175eaf0e14 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Fri, 21 Dec 2012 15:49:08 +0100 Subject: arm: mvebu: enable the SD card slot on Armada 370 DB board The Armada XP DB evaluation board has one SD card slot, directly connected to the SDIO IP of the SoC, so we add a device tree description for it. However, in the default configuration of the board, the SD card slot is not usable: the connector plugged into CON40 must be changed against a different one, provided with the board by the manufacturer. Since such a manual modification of the hardware is needed, we did not enable the SDIO interface by default, and left it to the board user to modify the Device Tree if needed. Since this board is really only an evaluation board for developers and not a final product, it is not too bad. Signed-off-by: Thomas Petazzoni Signed-off-by: Jason Cooper --- arch/arm/boot/dts/armada-370-db.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/armada-370-db.dts b/arch/arm/boot/dts/armada-370-db.dts index 9b82fac..8e66a7c 100644 --- a/arch/arm/boot/dts/armada-370-db.dts +++ b/arch/arm/boot/dts/armada-370-db.dts @@ -59,5 +59,20 @@ phy = <&phy1>; phy-mode = "rgmii-id"; }; + + mvsdio@d00d4000 { + pinctrl-0 = <&sdio_pins1>; + pinctrl-names = "default"; + /* + * This device is disabled by default, because + * using the SD card connector requires + * changing the default CON40 connector + * "DB-88F6710_MPP_2xRGMII_DEVICE_Jumper" to a + * different connector + * "DB-88F6710_MPP_RGMII_SD_Jumper". + */ + status = "disabled"; + /* No CD or WP GPIOs */ + }; }; }; -- cgit v1.1 From 5f6d11c398e67c9009e526b2fb1268e87b0e6ba0 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Fri, 21 Dec 2012 15:49:09 +0100 Subject: arm: mvebu: enable the SDIO interface on the Globalscale Mirabox The Globalscale Mirabox uses the SDIO interface of the Armada 370 to connect to a Wifi/Bluetooth SD8787 chip, so we enable the SDIO interface of this board in its Device Tree file. Signed-off-by: Thomas Petazzoni Signed-off-by: Jason Cooper --- arch/arm/boot/dts/armada-370-mirabox.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/armada-370-mirabox.dts b/arch/arm/boot/dts/armada-370-mirabox.dts index 3b40713..1864820 100644 --- a/arch/arm/boot/dts/armada-370-mirabox.dts +++ b/arch/arm/boot/dts/armada-370-mirabox.dts @@ -52,5 +52,15 @@ phy = <&phy1>; phy-mode = "rgmii-id"; }; + + mvsdio@d00d4000 { + pinctrl-0 = <&sdio_pins2>; + pinctrl-names = "default"; + status = "okay"; + /* + * No CD or WP GPIOs: SDIO interface used for + * Wifi/Bluetooth chip + */ + }; }; }; -- cgit v1.1 From ec05fcf679fe97994b5355ebf1d7d8cb0020eacf Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Fri, 21 Dec 2012 15:49:10 +0100 Subject: arm: kirkwood: add Device Tree informations for the SDIO controller Now that the SDIO controller has a Device Tree binding, let's use it in kirkwood.dtsi. Signed-off-by: Thomas Petazzoni Signed-off-by: Jason Cooper --- arch/arm/boot/dts/kirkwood.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi index d6ab442..2c738d9 100644 --- a/arch/arm/boot/dts/kirkwood.dtsi +++ b/arch/arm/boot/dts/kirkwood.dtsi @@ -193,5 +193,13 @@ clocks = <&gate_clk 17>; status = "okay"; }; + + mvsdio@90000 { + compatible = "marvell,orion-sdio"; + reg = <0x90000 0x200>; + interrupts = <28>; + clocks = <&gate_clk 4>; + status = "disabled"; + }; }; }; -- cgit v1.1 From a49da46c5274228334393083a6635d04eee04363 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Fri, 21 Dec 2012 15:49:11 +0100 Subject: arm: kirkwood: dreamplug: use Device Tree to probe SDIO Now that the mvsdio driver has a Device Tree binding, and the SDIO controller is declared in kirkwood.dtsi, migrate the dreamplug board to use the Device Tree to probe the SDIO controller and to mux this interface properly. Signed-off-by: Thomas Petazzoni Cc: Jason Cooper Signed-off-by: Jason Cooper --- arch/arm/boot/dts/kirkwood-dreamplug.dts | 7 +++++++ arch/arm/mach-kirkwood/board-dreamplug.c | 6 ------ 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/kirkwood-dreamplug.dts b/arch/arm/boot/dts/kirkwood-dreamplug.dts index f2d386c..ef2d8c7 100644 --- a/arch/arm/boot/dts/kirkwood-dreamplug.dts +++ b/arch/arm/boot/dts/kirkwood-dreamplug.dts @@ -74,6 +74,13 @@ status = "okay"; nr-ports = <1>; }; + + mvsdio@90000 { + pinctrl-0 = <&pmx_sdio>; + pinctrl-names = "default"; + status = "okay"; + /* No CD or WP GPIOs */ + }; }; gpio-leds { diff --git a/arch/arm/mach-kirkwood/board-dreamplug.c b/arch/arm/mach-kirkwood/board-dreamplug.c index 08248e2..0903242 100644 --- a/arch/arm/mach-kirkwood/board-dreamplug.c +++ b/arch/arm/mach-kirkwood/board-dreamplug.c @@ -15,7 +15,6 @@ #include #include #include -#include #include "common.h" static struct mv643xx_eth_platform_data dreamplug_ge00_data = { @@ -26,10 +25,6 @@ static struct mv643xx_eth_platform_data dreamplug_ge01_data = { .phy_addr = MV643XX_ETH_PHY_ADDR(1), }; -static struct mvsdio_platform_data dreamplug_mvsdio_data = { - /* unfortunately the CD signal has not been connected */ -}; - void __init dreamplug_init(void) { /* @@ -37,5 +32,4 @@ void __init dreamplug_init(void) */ kirkwood_ge00_init(&dreamplug_ge00_data); kirkwood_ge01_init(&dreamplug_ge01_data); - kirkwood_sdio_init(&dreamplug_mvsdio_data); } -- cgit v1.1 From 5dd8a01003355da95e23e3609e98a968001c3ee8 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Fri, 21 Dec 2012 15:49:12 +0100 Subject: arm: kirkwood: mplcec4: use Device Tree to probe SDIO Now that the mvsdio driver has a Device Tree binding, and the SDIO controller is declared in kirkwood.dtsi, migrate the mplcec4 board to use the Device Tree to probe the SDIO controller and to mux the pins of the SDIO interface correctly. This patch has not been tested, it remains to be tested by a person having access to the hardware. Signed-off-by: Thomas Petazzoni Cc: Stefan Peter Signed-off-by: Jason Cooper --- arch/arm/boot/dts/kirkwood-mplcec4.dts | 11 +++++++++-- arch/arm/mach-kirkwood/board-mplcec4.c | 7 ------- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/kirkwood-mplcec4.dts b/arch/arm/boot/dts/kirkwood-mplcec4.dts index 262c654..662dfd8 100644 --- a/arch/arm/boot/dts/kirkwood-mplcec4.dts +++ b/arch/arm/boot/dts/kirkwood-mplcec4.dts @@ -20,12 +20,11 @@ pinctrl: pinctrl@10000 { pinctrl-0 = < &pmx_nand &pmx_uart0 - &pmx_led_health &pmx_sdio + &pmx_led_health &pmx_sata0 &pmx_sata1 &pmx_led_user1o &pmx_led_user1g &pmx_led_user0o &pmx_led_user0g &pmx_led_misc - &pmx_sdio_cd >; pinctrl-names = "default"; @@ -133,6 +132,14 @@ status = "okay"; }; + + mvsdio@90000 { + pinctrl-0 = <&pmx_sdio &pmx_sdio_cd>; + pinctrl-names = "default"; + status = "okay"; + cd-gpios = <&gpio1 15 0>; + /* No WP GPIO */ + }; }; gpio-leds { diff --git a/arch/arm/mach-kirkwood/board-mplcec4.c b/arch/arm/mach-kirkwood/board-mplcec4.c index 3264925..7d6dc66 100644 --- a/arch/arm/mach-kirkwood/board-mplcec4.c +++ b/arch/arm/mach-kirkwood/board-mplcec4.c @@ -12,7 +12,6 @@ #include #include #include -#include #include "common.h" static struct mv643xx_eth_platform_data mplcec4_ge00_data = { @@ -23,11 +22,6 @@ static struct mv643xx_eth_platform_data mplcec4_ge01_data = { .phy_addr = MV643XX_ETH_PHY_ADDR(2), }; -static struct mvsdio_platform_data mplcec4_mvsdio_data = { - .gpio_card_detect = 47, /* MPP47 used as SD card detect */ -}; - - void __init mplcec4_init(void) { /* @@ -35,7 +29,6 @@ void __init mplcec4_init(void) */ kirkwood_ge00_init(&mplcec4_ge00_data); kirkwood_ge01_init(&mplcec4_ge01_data); - kirkwood_sdio_init(&mplcec4_mvsdio_data); kirkwood_pcie_init(KW_PCIE0); } -- cgit v1.1 From 8059fc1de2f574db6daec76c0818b31ff840a29d Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Fri, 21 Dec 2012 15:49:13 +0100 Subject: arm: kirkwood: add pinmux option for the SDIO interface on 88F6282 This commit adds a pinmux option, pmx_sdio, to enable the muxing of the SDIO interface on the 88F6282 SoC from Marvell. Signed-off-by: Thomas Petazzoni Signed-off-by: Jason Cooper --- arch/arm/boot/dts/kirkwood-6282.dtsi | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/kirkwood-6282.dtsi b/arch/arm/boot/dts/kirkwood-6282.dtsi index 4ccea21..ff00dbb 100644 --- a/arch/arm/boot/dts/kirkwood-6282.dtsi +++ b/arch/arm/boot/dts/kirkwood-6282.dtsi @@ -30,6 +30,11 @@ marvell,pins = "mpp13", "mpp14"; marvell,function = "uart1"; }; + pmx_sdio: pmx-sdio { + marvell,pins = "mpp12", "mpp13", "mpp14", + "mpp15", "mpp16", "mpp17"; + marvell,function = "sdio"; + }; }; i2c@11100 { -- cgit v1.1 From 00211e96507a1f061d38519e2e7e385c74962c5c Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Sun, 23 Dec 2012 11:34:34 +0900 Subject: ARM: Kirkwood: Add pinctrl of TWSI1 to 88f6282 The 88f6282 has one more TWSI(TWSI1). This add the information to enable pinctl of TWSI1. Signed-off-by: Nobuhiro Iwamatsu Acked-by: Andrew Lunn Signed-off-by: Jason Cooper --- arch/arm/boot/dts/kirkwood-6282.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/kirkwood-6282.dtsi b/arch/arm/boot/dts/kirkwood-6282.dtsi index ff00dbb..64b9374 100644 --- a/arch/arm/boot/dts/kirkwood-6282.dtsi +++ b/arch/arm/boot/dts/kirkwood-6282.dtsi @@ -21,6 +21,12 @@ marvell,pins = "mpp8", "mpp9"; marvell,function = "twsi0"; }; + + pmx_twsi1: pmx-twsi1 { + marvell,pins = "mpp36", "mpp37"; + marvell,function = "twsi1"; + }; + pmx_uart0: pmx-uart0 { marvell,pins = "mpp10", "mpp11"; marvell,function = "uart0"; -- cgit v1.1 From 92904699173d237c8e907ef7e4ef20a3dff577a4 Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Sun, 23 Dec 2012 11:34:36 +0900 Subject: ARM: Kirkwood: Add pinctrl of NAND to 88f6282 Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Jason Cooper --- arch/arm/boot/dts/kirkwood-6282.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/kirkwood-6282.dtsi b/arch/arm/boot/dts/kirkwood-6282.dtsi index 64b9374..192cf76 100644 --- a/arch/arm/boot/dts/kirkwood-6282.dtsi +++ b/arch/arm/boot/dts/kirkwood-6282.dtsi @@ -5,6 +5,12 @@ compatible = "marvell,88f6282-pinctrl"; reg = <0x10000 0x20>; + pmx_nand: pmx-nand { + marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3", + "mpp4", "mpp5", "mpp18", "mpp19"; + marvell,function = "nand"; + }; + pmx_sata0: pmx-sata0 { marvell,pins = "mpp5", "mpp21", "mpp23"; marvell,function = "sata0"; -- cgit v1.1 From 50ab9554861a8e1473a16ca80cf481fa2ee0e8c9 Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Sun, 23 Dec 2012 11:34:37 +0900 Subject: ARM: Kirkwood: Convert openblocks A6 board to pinctrl Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Jason Cooper --- arch/arm/boot/dts/kirkwood-openblocks_a6.dts | 116 +++++++++++++++++++++++++++ arch/arm/mach-kirkwood/board-openblocks_a6.c | 44 ---------- 2 files changed, 116 insertions(+), 44 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/kirkwood-openblocks_a6.dts b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts index 49d3d74..ede7fe0d 100644 --- a/arch/arm/boot/dts/kirkwood-openblocks_a6.dts +++ b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts @@ -75,6 +75,122 @@ reg = <0x30>; }; }; + + pinctrl: pinctrl@10000 { + pinctrl-0 = < &pmx_nand &pmx_uart0 + &pmx_uart1 &pmx_twsi1 + &pmx_dip_sw0 &pmx_dip_sw1 + &pmx_dip_sw2 &pmx_dip_sw3 + &pmx_gpio_0 &pmx_gpio_1 + &pmx_gpio_2 &pmx_gpio_3 + &pmx_gpio_4 &pmx_gpio_5 + &pmx_gpio_6 &pmx_gpio_7 + &pmx_led_red &pmx_led_green + &pmx_led_yellow >; + pinctrl-names = "default"; + + pmx_uart0: pmx-uart0 { + marvell,pins = "mpp10", "mpp11", "mpp15", + "mpp16"; + marvell,function = "uart0"; + }; + + pmx_uart1: pmx-uart1 { + marvell,pins = "mpp13", "mpp14", "mpp8", + "mpp9"; + marvell,function = "uart1"; + }; + + pmx_sysrst: pmx-sysrst { + marvell,pins = "mpp6"; + marvell,function = "sysrst"; + }; + + pmx_dip_sw0: pmx-dip-sw0 { + marvell,pins = "mpp20"; + marvell,function = "gpio"; + }; + + pmx_dip_sw1: pmx-dip-sw1 { + marvell,pins = "mpp21"; + marvell,function = "gpio"; + }; + + pmx_dip_sw2: pmx-dip-sw2 { + marvell,pins = "mpp22"; + marvell,function = "gpio"; + }; + + pmx_dip_sw3: pmx-dip-sw3 { + marvell,pins = "mpp23"; + marvell,function = "gpio"; + }; + + pmx_gpio_0: pmx-gpio-0 { + marvell,pins = "mpp24"; + marvell,function = "gpio"; + }; + + pmx_gpio_1: pmx-gpio-1 { + marvell,pins = "mpp25"; + marvell,function = "gpio"; + }; + + pmx_gpio_2: pmx-gpio-2 { + marvell,pins = "mpp26"; + marvell,function = "gpio"; + }; + + pmx_gpio_3: pmx-gpio-3 { + marvell,pins = "mpp27"; + marvell,function = "gpio"; + }; + + pmx_gpio_4: pmx-gpio-4 { + marvell,pins = "mpp28"; + marvell,function = "gpio"; + }; + + pmx_gpio_5: pmx-gpio-5 { + marvell,pins = "mpp29"; + marvell,function = "gpio"; + }; + + pmx_gpio_6: pmx-gpio-6 { + marvell,pins = "mpp30"; + marvell,function = "gpio"; + }; + + pmx_gpio_7: pmx-gpio-7 { + marvell,pins = "mpp31"; + marvell,function = "gpio"; + }; + + pmx_gpio_init: pmx-init { + marvell,pins = "mpp38"; + marvell,function = "gpio"; + }; + + pmx_usb_oc: pmx-usb-oc { + marvell,pins = "mpp39"; + marvell,function = "gpio"; + }; + + pmx_led_red: pmx-led-red { + marvell,pins = "mpp41"; + marvell,function = "gpio"; + }; + + pmx_led_green: pmx-led-green { + marvell,pins = "mpp42"; + marvell,function = "gpio"; + }; + + pmx_led_yellow: pmx-led-yellow { + marvell,pins = "mpp43"; + marvell,function = "gpio"; + }; + }; }; gpio-leds { diff --git a/arch/arm/mach-kirkwood/board-openblocks_a6.c b/arch/arm/mach-kirkwood/board-openblocks_a6.c index 815fc64..b11d8fd 100644 --- a/arch/arm/mach-kirkwood/board-openblocks_a6.c +++ b/arch/arm/mach-kirkwood/board-openblocks_a6.c @@ -11,60 +11,16 @@ #include #include #include -#include -#include #include "common.h" -#include "mpp.h" static struct mv643xx_eth_platform_data openblocks_ge00_data = { .phy_addr = MV643XX_ETH_PHY_ADDR(0), }; -static unsigned int openblocks_a6_mpp_config[] __initdata = { - MPP0_NF_IO2, - MPP1_NF_IO3, - MPP2_NF_IO4, - MPP3_NF_IO5, - MPP4_NF_IO6, - MPP5_NF_IO7, - MPP6_SYSRST_OUTn, - MPP8_UART1_RTS, - MPP9_UART1_CTS, - MPP10_UART0_TXD, - MPP11_UART0_RXD, - MPP13_UART1_TXD, - MPP14_UART1_RXD, - MPP15_UART0_RTS, - MPP16_UART0_CTS, - MPP18_NF_IO0, - MPP19_NF_IO1, - MPP20_GPIO, /* DIP SW0 */ - MPP21_GPIO, /* DIP SW1 */ - MPP22_GPIO, /* DIP SW2 */ - MPP23_GPIO, /* DIP SW3 */ - MPP24_GPIO, /* GPIO 0 */ - MPP25_GPIO, /* GPIO 1 */ - MPP26_GPIO, /* GPIO 2 */ - MPP27_GPIO, /* GPIO 3 */ - MPP28_GPIO, /* GPIO 4 */ - MPP29_GPIO, /* GPIO 5 */ - MPP30_GPIO, /* GPIO 6 */ - MPP31_GPIO, /* GPIO 7 */ - MPP36_TW1_SDA, - MPP37_TW1_SCK, - MPP38_GPIO, /* INIT */ - MPP39_GPIO, /* USB OC */ - MPP41_GPIO, /* LED: Red */ - MPP42_GPIO, /* LED: Green */ - MPP43_GPIO, /* LED: Yellow */ - 0, -}; - void __init openblocks_a6_init(void) { /* * Basic setup. Needs to be called early. */ - kirkwood_mpp_conf(openblocks_a6_mpp_config); kirkwood_ge00_init(&openblocks_ge00_data); } -- cgit v1.1 From e35e40cd553f7950c0bcb60f1d8f9672bd69d6a2 Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Thu, 27 Dec 2012 23:21:10 +0100 Subject: ARM: Dove: move CuBox led pinctrl to gpio-leds node gpio-leds has support for pinctrl allocation, make use of it. Signed-off-by: Sebastian Hesselbarth Signed-off-by: Jason Cooper --- arch/arm/boot/dts/dove-cubox.dts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/dove-cubox.dts b/arch/arm/boot/dts/dove-cubox.dts index cdee96f..bed5b62 100644 --- a/arch/arm/boot/dts/dove-cubox.dts +++ b/arch/arm/boot/dts/dove-cubox.dts @@ -17,6 +17,9 @@ leds { compatible = "gpio-leds"; + pinctrl-0 = <&pmx_gpio_18>; + pinctrl-names = "default"; + power { label = "Power"; gpios = <&gpio0 18 1>; @@ -47,7 +50,7 @@ }; &pinctrl { - pinctrl-0 = <&pmx_gpio_12 &pmx_gpio_18>; + pinctrl-0 = <&pmx_gpio_12>; pinctrl-names = "default"; pmx_gpio_12: pmx-gpio-12 { -- cgit v1.1 From 41e364bb2494afe21803aff43bd8cb89ce6fc097 Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Thu, 27 Dec 2012 23:21:59 +0100 Subject: ARM: Dove: add fixed regulator for CuBox USB power CuBox needs to enable USB power on a gpio pin. Add a fixed regulator to always enable usb power on boot. Signed-off-by: Sebastian Hesselbarth Signed-off-by: Jason Cooper --- arch/arm/boot/dts/dove-cubox.dts | 25 ++++++++++++++++++++++++- arch/arm/mach-dove/Kconfig | 2 ++ 2 files changed, 26 insertions(+), 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/dove-cubox.dts b/arch/arm/boot/dts/dove-cubox.dts index bed5b62..7e3065a 100644 --- a/arch/arm/boot/dts/dove-cubox.dts +++ b/arch/arm/boot/dts/dove-cubox.dts @@ -26,6 +26,24 @@ linux,default-trigger = "default-on"; }; }; + + regulators { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <0>; + + usb_power: regulator@1 { + compatible = "regulator-fixed"; + reg = <1>; + regulator-name = "USB Power"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + regulator-always-on; + regulator-boot-on; + gpio = <&gpio0 1 0>; + }; + }; }; &uart0 { status = "okay"; }; @@ -50,9 +68,14 @@ }; &pinctrl { - pinctrl-0 = <&pmx_gpio_12>; + pinctrl-0 = <&pmx_gpio_1 &pmx_gpio_12>; pinctrl-names = "default"; + pmx_gpio_1: pmx-gpio-1 { + marvell,pins = "mpp1"; + marvell,function = "gpio"; + }; + pmx_gpio_12: pmx-gpio-12 { marvell,pins = "mpp12"; marvell,function = "gpio"; diff --git a/arch/arm/mach-dove/Kconfig b/arch/arm/mach-dove/Kconfig index aedd0ba..36469d8 100644 --- a/arch/arm/mach-dove/Kconfig +++ b/arch/arm/mach-dove/Kconfig @@ -24,6 +24,8 @@ config MACH_DOVE_DT bool "Marvell Dove Flattened Device Tree" select MVEBU_CLK_CORE select MVEBU_CLK_GATING + select REGULATOR + select REGULATOR_FIXED_VOLTAGE select USE_OF help Say 'Y' here if you want your kernel to support the -- cgit v1.1 From 12131b5424577b2eb1bef5a41220d310594e42dc Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Fri, 28 Dec 2012 15:08:48 +0100 Subject: ARM: Kirkwood: Convert NSA310 to DT based regulators. Signed-off-by: Andrew Lunn Signed-off-by: Jason Cooper --- arch/arm/boot/dts/kirkwood-nsa310.dts | 17 +++++++++++++++++ arch/arm/mach-kirkwood/board-nsa310.c | 4 ---- 2 files changed, 17 insertions(+), 4 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/kirkwood-nsa310.dts b/arch/arm/boot/dts/kirkwood-nsa310.dts index 5509f96..2dc1d09 100644 --- a/arch/arm/boot/dts/kirkwood-nsa310.dts +++ b/arch/arm/boot/dts/kirkwood-nsa310.dts @@ -141,4 +141,21 @@ gpios = <&gpio1 8 0>; }; }; + + regulators { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <0>; + + usb0_power_off: regulator@1 { + compatible = "regulator-fixed"; + reg = <1>; + regulator-name = "USB Power Off"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + regulator-boot-on; + gpio = <&gpio0 21 0>; + }; + }; }; diff --git a/arch/arm/mach-kirkwood/board-nsa310.c b/arch/arm/mach-kirkwood/board-nsa310.c index 2fa7140..891322b 100644 --- a/arch/arm/mach-kirkwood/board-nsa310.c +++ b/arch/arm/mach-kirkwood/board-nsa310.c @@ -17,7 +17,6 @@ #include "common.h" #include "mpp.h" -#define NSA310_GPIO_USB_POWER_OFF 21 #define NSA310_GPIO_POWER_OFF 48 static unsigned int nsa310_mpp_config[] __initdata = { @@ -70,9 +69,6 @@ static void __init nsa310_gpio_init(void) "Power Off"); if (!err) pm_power_off = nsa310_power_off; - - nsa310_gpio_request(NSA310_GPIO_USB_POWER_OFF, GPIOF_OUT_INIT_LOW, - "USB Power Off"); } void __init nsa310_init(void) -- cgit v1.1 From 7dcc628349de9a878c43ef4b30e6c8ccbe1d207a Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Fri, 28 Dec 2012 15:08:49 +0100 Subject: ARM: Kirkwood: Convert NSA310 to use gpio-poweroff driver Remove the C code and add a Device Tree node for gpio-poweroff. Signed-off-by: Andrew Lunn Signed-off-by: Jason Cooper --- arch/arm/boot/dts/kirkwood-nsa310.dts | 5 +++++ arch/arm/mach-kirkwood/board-nsa310.c | 33 --------------------------------- 2 files changed, 5 insertions(+), 33 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/kirkwood-nsa310.dts b/arch/arm/boot/dts/kirkwood-nsa310.dts index 2dc1d09..85cce36 100644 --- a/arch/arm/boot/dts/kirkwood-nsa310.dts +++ b/arch/arm/boot/dts/kirkwood-nsa310.dts @@ -142,6 +142,11 @@ }; }; + gpio_poweroff { + compatible = "gpio-poweroff"; + gpios = <&gpio1 16 0>; + }; + regulators { compatible = "simple-bus"; #address-cells = <1>; diff --git a/arch/arm/mach-kirkwood/board-nsa310.c b/arch/arm/mach-kirkwood/board-nsa310.c index 891322b..cf2c78c 100644 --- a/arch/arm/mach-kirkwood/board-nsa310.c +++ b/arch/arm/mach-kirkwood/board-nsa310.c @@ -11,14 +11,11 @@ #include #include #include -#include #include #include #include "common.h" #include "mpp.h" -#define NSA310_GPIO_POWER_OFF 48 - static unsigned int nsa310_mpp_config[] __initdata = { MPP12_GPIO, /* led esata green */ MPP13_GPIO, /* led esata red */ @@ -43,40 +40,10 @@ static struct i2c_board_info __initdata nsa310_i2c_info[] = { { I2C_BOARD_INFO("adt7476", 0x2e) }, }; -static void nsa310_power_off(void) -{ - gpio_set_value(NSA310_GPIO_POWER_OFF, 1); -} - -static int __init nsa310_gpio_request(unsigned int gpio, unsigned long flags, - const char *label) -{ - int err; - - err = gpio_request_one(gpio, flags, label); - if (err) - pr_err("NSA-310: can't setup GPIO%u (%s), err=%d\n", - gpio, label, err); - - return err; -} - -static void __init nsa310_gpio_init(void) -{ - int err; - - err = nsa310_gpio_request(NSA310_GPIO_POWER_OFF, GPIOF_OUT_INIT_LOW, - "Power Off"); - if (!err) - pm_power_off = nsa310_power_off; -} - void __init nsa310_init(void) { kirkwood_mpp_conf(nsa310_mpp_config); - nsa310_gpio_init(); - i2c_register_board_info(0, ARRAY_AND_SIZE(nsa310_i2c_info)); } -- cgit v1.1 From b4d2a24fa522afd3891c9718443686cab71df24f Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Fri, 28 Dec 2012 15:08:50 +0100 Subject: ARM: Kirkwood: Convert NSA310 I2C to device tree Add a sub-node into the I2C node to represent the adt7476 device. Signed-off-by: Andrew Lunn Signed-off-by: Jason Cooper --- arch/arm/boot/dts/kirkwood-nsa310.dts | 5 +++++ arch/arm/mach-kirkwood/board-nsa310.c | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/kirkwood-nsa310.dts b/arch/arm/boot/dts/kirkwood-nsa310.dts index 85cce36..dbb3551 100644 --- a/arch/arm/boot/dts/kirkwood-nsa310.dts +++ b/arch/arm/boot/dts/kirkwood-nsa310.dts @@ -29,6 +29,11 @@ i2c@11000 { status = "okay"; + + adt7476: adt7476a@2e { + compatible = "adt7476"; + reg = <0x2e>; + }; }; nand@3000000 { diff --git a/arch/arm/mach-kirkwood/board-nsa310.c b/arch/arm/mach-kirkwood/board-nsa310.c index cf2c78c..6966c86 100644 --- a/arch/arm/mach-kirkwood/board-nsa310.c +++ b/arch/arm/mach-kirkwood/board-nsa310.c @@ -36,15 +36,9 @@ static unsigned int nsa310_mpp_config[] __initdata = { 0 }; -static struct i2c_board_info __initdata nsa310_i2c_info[] = { - { I2C_BOARD_INFO("adt7476", 0x2e) }, -}; - void __init nsa310_init(void) { kirkwood_mpp_conf(nsa310_mpp_config); - - i2c_register_board_info(0, ARRAY_AND_SIZE(nsa310_i2c_info)); } static int __init nsa310_pci_init(void) -- cgit v1.1 From 102c9543ff368709980c6d68b7a75f840edda6b5 Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Fri, 28 Dec 2012 15:14:10 +0100 Subject: ARM: Kirkwood: Convert NS2 to gpio-poweroff. Remove C code and add a Device Tree node in its place. Signed-off-by: Andrew Lunn Tested-by: Simon Guinot Signed-off-by: Jason Cooper --- arch/arm/boot/dts/kirkwood-ns2-common.dtsi | 6 ++++++ arch/arm/mach-kirkwood/board-ns2.c | 14 -------------- 2 files changed, 6 insertions(+), 14 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi index 77d21ab..e8e7ece 100644 --- a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi +++ b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi @@ -76,4 +76,10 @@ gpios = <&gpio0 12 0>; }; }; + + gpio_poweroff { + compatible = "gpio-poweroff"; + gpios = <&gpio0 31 0>; + }; + }; diff --git a/arch/arm/mach-kirkwood/board-ns2.c b/arch/arm/mach-kirkwood/board-ns2.c index f4632a8..f2ea3b7 100644 --- a/arch/arm/mach-kirkwood/board-ns2.c +++ b/arch/arm/mach-kirkwood/board-ns2.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include "common.h" @@ -23,13 +22,6 @@ static struct mv643xx_eth_platform_data ns2_ge00_data = { .phy_addr = MV643XX_ETH_PHY_ADDR(8), }; -#define NS2_GPIO_POWER_OFF 31 - -static void ns2_power_off(void) -{ - gpio_set_value(NS2_GPIO_POWER_OFF, 1); -} - void __init ns2_init(void) { /* @@ -39,10 +31,4 @@ void __init ns2_init(void) of_machine_is_compatible("lacie,netspace_mini_v2")) ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); kirkwood_ge00_init(&ns2_ge00_data); - - if (gpio_request(NS2_GPIO_POWER_OFF, "power-off") == 0 && - gpio_direction_output(NS2_GPIO_POWER_OFF, 0) == 0) - pm_power_off = ns2_power_off; - else - pr_err("ns2: failed to configure power-off GPIO\n"); } -- cgit v1.1 From 4ca73962a15caccd310093266783be89a81d571f Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 7 Jan 2013 17:29:58 +0100 Subject: arm: mvebu: add button for OpenBlocks AX3-4 The OpenBlocks AX3-4 board has one software-controlled button on the front side, labeled "INIT", so we add minimal support for this button in the kernel. Signed-off-by: Thomas Petazzoni Signed-off-by: Jason Cooper --- arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts index b42652f..ec36864 100644 --- a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts +++ b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts @@ -66,6 +66,18 @@ }; }; + gpio_keys { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + + button@1 { + label = "Init Button"; + linux,code = <116>; + gpios = <&gpio1 28 0>; + }; + }; + mdio { phy0: ethernet-phy@0 { reg = <0>; -- cgit v1.1 From b2bb806f553f57459b8052fc5b8e2489e21ddf24 Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Wed, 23 Jan 2013 12:26:30 -0300 Subject: arm: mvebu: Add support for USB host controllers in Armada 370/XP The Armada 370 and Armada XP SoC has an Orion EHCI USB controller. This patch adds support for this controller in Armada 370 and Armada XP SoC common device tree files. Cc: Lior Amsalem Cc: Thomas Petazzoni Tested-by: Nobuhiro Iwamatsu Tested-by: Florian Fainelli Signed-off-by: Gregory CLEMENT Signed-off-by: Ezequiel Garcia Signed-off-by: Jason Cooper --- arch/arm/boot/dts/armada-370-xp.dtsi | 15 +++++++++++++++ arch/arm/boot/dts/armada-370.dtsi | 9 +++++++++ arch/arm/boot/dts/armada-xp.dtsi | 17 +++++++++++++++++ 3 files changed, 41 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi index 28276fe..fa025c4 100644 --- a/arch/arm/boot/dts/armada-370-xp.dtsi +++ b/arch/arm/boot/dts/armada-370-xp.dtsi @@ -145,6 +145,21 @@ clocks = <&gateclk 17>; status = "disabled"; }; + + usb@d0050000 { + compatible = "marvell,orion-ehci"; + reg = <0xd0050000 0x500>; + interrupts = <45>; + status = "disabled"; + }; + + usb@d0051000 { + compatible = "marvell,orion-ehci"; + reg = <0xd0051000 0x500>; + interrupts = <46>; + status = "disabled"; + }; + }; }; diff --git a/arch/arm/boot/dts/armada-370.dtsi b/arch/arm/boot/dts/armada-370.dtsi index 88f9bab..8188d13 100644 --- a/arch/arm/boot/dts/armada-370.dtsi +++ b/arch/arm/boot/dts/armada-370.dtsi @@ -144,5 +144,14 @@ dmacap,memset; }; }; + + usb@d0050000 { + clocks = <&coreclk 0>; + }; + + usb@d0051000 { + clocks = <&coreclk 0>; + }; + }; }; diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi index 390ba98..1443949 100644 --- a/arch/arm/boot/dts/armada-xp.dtsi +++ b/arch/arm/boot/dts/armada-xp.dtsi @@ -134,5 +134,22 @@ dmacap,memset; }; }; + + usb@d0050000 { + clocks = <&gateclk 18>; + }; + + usb@d0051000 { + clocks = <&gateclk 19>; + }; + + usb@d0052000 { + compatible = "marvell,orion-ehci"; + reg = <0xd0052000 0x500>; + interrupts = <47>; + clocks = <&gateclk 20>; + status = "disabled"; + }; + }; }; -- cgit v1.1 From 200506b1b616f1b3ccef41b19446e4e8ea0f9b68 Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Wed, 23 Jan 2013 12:26:31 -0300 Subject: arm: mvebu: Enable USB controllers on Armada 370/XP boards This patch activates every USB port provided by each SoC. Except for Armada XP Openblocks AX3-4 board, where we enable only the first two USB ports until we have more information on the third one usage. Cc: Lior Amsalem Cc: Thomas Petazzoni Cc: Gregory CLEMENT Tested-by: Nobuhiro Iwamatsu Tested-by: Florian Fainelli Signed-off-by: Ezequiel Garcia Signed-off-by: Jason Cooper --- arch/arm/boot/dts/armada-370-db.dts | 8 ++++++++ arch/arm/boot/dts/armada-370-mirabox.dts | 8 ++++++++ arch/arm/boot/dts/armada-xp-db.dts | 12 ++++++++++++ arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 6 ++++++ 4 files changed, 34 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/armada-370-db.dts b/arch/arm/boot/dts/armada-370-db.dts index 8e66a7c..3d93902 100644 --- a/arch/arm/boot/dts/armada-370-db.dts +++ b/arch/arm/boot/dts/armada-370-db.dts @@ -74,5 +74,13 @@ status = "disabled"; /* No CD or WP GPIOs */ }; + + usb@d0050000 { + status = "okay"; + }; + + usb@d0051000 { + status = "okay"; + }; }; }; diff --git a/arch/arm/boot/dts/armada-370-mirabox.dts b/arch/arm/boot/dts/armada-370-mirabox.dts index 1864820..dd0c57d 100644 --- a/arch/arm/boot/dts/armada-370-mirabox.dts +++ b/arch/arm/boot/dts/armada-370-mirabox.dts @@ -62,5 +62,13 @@ * Wifi/Bluetooth chip */ }; + + usb@d0050000 { + status = "okay"; + }; + + usb@d0051000 { + status = "okay"; + }; }; }; diff --git a/arch/arm/boot/dts/armada-xp-db.dts b/arch/arm/boot/dts/armada-xp-db.dts index c7035c5..c84e1fe 100644 --- a/arch/arm/boot/dts/armada-xp-db.dts +++ b/arch/arm/boot/dts/armada-xp-db.dts @@ -97,5 +97,17 @@ status = "okay"; /* No CD or WP GPIOs */ }; + + usb@d0050000 { + status = "okay"; + }; + + usb@d0051000 { + status = "okay"; + }; + + usb@d0052000 { + status = "okay"; + }; }; }; diff --git a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts index ec36864..3818a82 100644 --- a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts +++ b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts @@ -133,5 +133,11 @@ nr-ports = <2>; status = "okay"; }; + usb@d0050000 { + status = "okay"; + }; + usb@d0051000 { + status = "okay"; + }; }; }; -- cgit v1.1 From a1abcd7c2339088a6628381fa13239d89d639961 Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Mon, 28 Jan 2013 16:54:08 +0100 Subject: ARM: Dove: convert usb host controller to DT With DT support for orion-ehci also convert Dove to it and remove the legacy calls and clock aliases. This patch is based on "ARM: Dove: split legacy and DT setup" applied to mvebu/boards recently. Signed-off-by: Sebastian Hesselbarth Signed-off-by: Jason Cooper --- arch/arm/boot/dts/dove.dtsi | 16 ++++++++++++++++ arch/arm/mach-dove/board-dt.c | 10 ---------- 2 files changed, 16 insertions(+), 10 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi index 740630f..c072203 100644 --- a/arch/arm/boot/dts/dove.dtsi +++ b/arch/arm/boot/dts/dove.dtsi @@ -156,6 +156,22 @@ status = "disabled"; }; + ehci0: usb-host@50000 { + compatible = "marvell,orion-ehci"; + reg = <0x50000 0x1000>; + interrupts = <24>; + clocks = <&gate_clk 0>; + status = "okay"; + }; + + ehci1: usb-host@51000 { + compatible = "marvell,orion-ehci"; + reg = <0x51000 0x1000>; + interrupts = <25>; + clocks = <&gate_clk 1>; + status = "okay"; + }; + sdio0: sdio@92000 { compatible = "marvell,dove-sdhci"; reg = <0x92000 0x100>; diff --git a/arch/arm/mach-dove/board-dt.c b/arch/arm/mach-dove/board-dt.c index 61c2b59..fbde1dd 100644 --- a/arch/arm/mach-dove/board-dt.c +++ b/arch/arm/mach-dove/board-dt.c @@ -34,14 +34,6 @@ static void __init dove_legacy_clk_init(void) clkspec.np = np; clkspec.args_count = 1; - clkspec.args[0] = CLOCK_GATING_BIT_USB0; - orion_clkdev_add(NULL, "orion-ehci.0", - of_clk_get_from_provider(&clkspec)); - - clkspec.args[0] = CLOCK_GATING_BIT_USB1; - orion_clkdev_add(NULL, "orion-ehci.1", - of_clk_get_from_provider(&clkspec)); - clkspec.args[0] = CLOCK_GATING_BIT_GBE; orion_clkdev_add(NULL, "mv643xx_eth_port.0", of_clk_get_from_provider(&clkspec)); @@ -79,8 +71,6 @@ static void __init dove_dt_init(void) /* Internal devices not ported to DT yet */ dove_ge00_init(&dove_dt_ge00_data); - dove_ehci0_init(); - dove_ehci1_init(); dove_pcie_init(1, 1); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); -- cgit v1.1 From e1dd464901080ecf7ebd3fd27dfc5735719055f4 Mon Sep 17 00:00:00 2001 From: Gregory CLEMENT Date: Fri, 25 Jan 2013 18:32:44 +0100 Subject: arm: mvebu: update DT to support local timers Now that the time-armada-370-xp support local timers, updated the device tree to take it into account. Signed-off-by: Gregory CLEMENT Signed-off-by: Jason Cooper --- arch/arm/boot/dts/armada-370-xp.dtsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi index fa025c4..cb434b2 100644 --- a/arch/arm/boot/dts/armada-370-xp.dtsi +++ b/arch/arm/boot/dts/armada-370-xp.dtsi @@ -68,8 +68,9 @@ timer@d0020300 { compatible = "marvell,armada-370-xp-timer"; - reg = <0xd0020300 0x30>; - interrupts = <37>, <38>, <39>, <40>; + reg = <0xd0020300 0x30>, + <0xd0021040 0x30>; + interrupts = <37>, <38>, <39>, <40>, <5>, <6>; clocks = <&coreclk 2>; }; -- cgit v1.1 From d5dc035eaa967cded8a295d4b07b7eb944c9044a Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Wed, 6 Feb 2013 10:06:21 -0300 Subject: arm: mvebu: Add support for SPI controller in Armada 370/XP The Armada 370 and Armada XP SoC has an SPI controller. This patch adds support for this controller in Armada 370 and Armada XP SoC common device tree files. Note that the Armada XP SPI register length is 0x50 bytes, while Armada 370 SPI register length is 0x28 bytes, so we choose the smaller of the two. Cc: Thomas Petazzoni Cc: Lior Amsalem Acked-by: Gregory Clement Signed-off-by: Ezequiel Garcia Signed-off-by: Jason Cooper --- arch/arm/boot/dts/armada-370-xp.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi index cb434b2..6f1acc7 100644 --- a/arch/arm/boot/dts/armada-370-xp.dtsi +++ b/arch/arm/boot/dts/armada-370-xp.dtsi @@ -161,6 +161,27 @@ status = "disabled"; }; + spi0: spi@d0010600 { + compatible = "marvell,orion-spi"; + reg = <0xd0010600 0x28>; + #address-cells = <1>; + #size-cells = <0>; + cell-index = <0>; + interrupts = <30>; + clocks = <&coreclk 0>; + status = "disabled"; + }; + + spi1: spi@d0010680 { + compatible = "marvell,orion-spi"; + reg = <0xd0010680 0x28>; + #address-cells = <1>; + #size-cells = <0>; + cell-index = <1>; + interrupts = <92>; + clocks = <&coreclk 0>; + status = "disabled"; + }; }; }; -- cgit v1.1 From 9dc3e34687b2af14d5b8e95b27d06b6cdfc87479 Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Wed, 6 Feb 2013 10:06:23 -0300 Subject: arm: mvebu: Add SPI flash on Armada XP-GP board This patch adds an SPI master device node for Armada XP-GP board. This master node is an SPI flash controller 'n25q128a13'. Since there is no 'partitions' node declared, one full sized partition named as the device will be created. Cc: Thomas Petazzoni Cc: Lior Amsalem Tested-by: Gregory Clement Signed-off-by: Ezequiel Garcia Acked-by: Gregory Clement Signed-off-by: Jason Cooper --- arch/arm/boot/dts/armada-xp-gp.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/armada-xp-gp.dts b/arch/arm/boot/dts/armada-xp-gp.dts index 3eea531..1c8afe2 100644 --- a/arch/arm/boot/dts/armada-xp-gp.dts +++ b/arch/arm/boot/dts/armada-xp-gp.dts @@ -97,5 +97,17 @@ phy = <&phy3>; phy-mode = "rgmii-id"; }; + + spi0: spi@d0010600 { + status = "okay"; + + spi-flash@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "n25q128a13"; + reg = <0>; /* Chip select 0 */ + spi-max-frequency = <108000000>; + }; + }; }; }; -- cgit v1.1 From 1f24a21f8e8acd6e85b3629f41e2eafbcd86d85c Mon Sep 17 00:00:00 2001 From: Gregory CLEMENT Date: Tue, 5 Feb 2013 21:54:54 +0100 Subject: arm: mvebu: Add SPI flash on Armada XP-DB board This patch add support for the SPI flash M25P64 which is present on the Armada XP DB board. This flash stores the bootloader and its environment. Signed-off-by: Gregory CLEMENT Signed-off-by: Jason Cooper --- arch/arm/boot/dts/armada-xp-db.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/armada-xp-db.dts b/arch/arm/boot/dts/armada-xp-db.dts index c84e1fe..e83505e 100644 --- a/arch/arm/boot/dts/armada-xp-db.dts +++ b/arch/arm/boot/dts/armada-xp-db.dts @@ -109,5 +109,17 @@ usb@d0052000 { status = "okay"; }; + + spi0: spi@d0010600 { + status = "okay"; + + spi-flash@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "m25p64"; + reg = <0>; /* Chip select 0 */ + spi-max-frequency = <20000000>; + }; + }; }; }; -- cgit v1.1 From 04e09b72731f4a49f8f0c2f882fe838a865c847c Mon Sep 17 00:00:00 2001 From: Gregory CLEMENT Date: Tue, 5 Feb 2013 21:54:55 +0100 Subject: arm: mvebu: Add SPI flash on Armada 370 DB board This patch add support for the SPI flash MX25l25635E which is present on the Armada 370 DB board. This flash stores the bootloader and its environment. Signed-off-by: Gregory CLEMENT Signed-off-by: Jason Cooper --- arch/arm/boot/dts/armada-370-db.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/armada-370-db.dts b/arch/arm/boot/dts/armada-370-db.dts index 3d93902..e34b280 100644 --- a/arch/arm/boot/dts/armada-370-db.dts +++ b/arch/arm/boot/dts/armada-370-db.dts @@ -82,5 +82,17 @@ usb@d0051000 { status = "okay"; }; + + spi0: spi@d0010600 { + status = "okay"; + + spi-flash@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "mx25l25635e"; + reg = <0>; /* Chip select 0 */ + spi-max-frequency = <50000000>; + }; + }; }; }; -- cgit v1.1 From 8be7a962e86ac47b5ee2b339e08cca1e5c063c15 Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Tue, 29 Jan 2013 21:59:46 +0100 Subject: ARM: dove: convert serial DT nodes to clocks property of_serial now has support for using clocks property and we have a DT clock provider. This patch replaces the hard coded clock-frequency property with a clocks phandle to tclk. Signed-off-by: Sebastian Hesselbarth Signed-off-by: Jason Cooper --- arch/arm/boot/dts/dove.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi index c072203..67dbe20 100644 --- a/arch/arm/boot/dts/dove.dtsi +++ b/arch/arm/boot/dts/dove.dtsi @@ -55,7 +55,7 @@ reg = <0x12000 0x100>; reg-shift = <2>; interrupts = <7>; - clock-frequency = <166666667>; + clocks = <&core_clk 0>; status = "disabled"; }; @@ -64,7 +64,7 @@ reg = <0x12100 0x100>; reg-shift = <2>; interrupts = <8>; - clock-frequency = <166666667>; + clocks = <&core_clk 0>; status = "disabled"; }; @@ -73,7 +73,7 @@ reg = <0x12000 0x100>; reg-shift = <2>; interrupts = <9>; - clock-frequency = <166666667>; + clocks = <&core_clk 0>; status = "disabled"; }; @@ -82,7 +82,7 @@ reg = <0x12100 0x100>; reg-shift = <2>; interrupts = <10>; - clock-frequency = <166666667>; + clocks = <&core_clk 0>; status = "disabled"; }; -- cgit v1.1 From 15989543d45505ed32e70505c2fce0907e5af161 Mon Sep 17 00:00:00 2001 From: Jason Cooper Date: Sat, 26 Jan 2013 20:50:11 +0000 Subject: ARM: kirkwood: topkick: convert to pinctrl Signed-off-by: Jason Cooper --- arch/arm/boot/dts/kirkwood-topkick.dts | 90 ++++++++++++++++++++++++++++++ arch/arm/mach-kirkwood/board-usi_topkick.c | 42 -------------- 2 files changed, 90 insertions(+), 42 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/kirkwood-topkick.dts b/arch/arm/boot/dts/kirkwood-topkick.dts index cd15452..bb1d4df 100644 --- a/arch/arm/boot/dts/kirkwood-topkick.dts +++ b/arch/arm/boot/dts/kirkwood-topkick.dts @@ -1,6 +1,7 @@ /dts-v1/; /include/ "kirkwood.dtsi" +/include/ "kirkwood-6282.dtsi" / { model = "Univeral Scientific Industrial Co. Topkick-1281P2"; @@ -16,6 +17,95 @@ }; ocp@f1000000 { + pinctrl: pinctrl@10000 { + /* + * GPIO LED layout + * + * /-SYS_LED(2) + * | + * | /-DISK_LED + * | | + * | | /-WLAN_LED(2) + * | | | + * [SW] [*] [*] [*] + */ + + /* + * Switch positions + * + * /-SW_LEFT(2) + * | + * | /-SW_IDLE + * | | + * | | /-SW_RIGHT + * | | | + * PS [L] [I] [R] LEDS + */ + pinctrl-0 = < &pmx_led_disk_yellow + &pmx_sata0_pwr_enable + &pmx_led_sys_red + &pmx_led_sys_blue + &pmx_led_wifi_green + &pmx_sw_left + &pmx_sw_right + &pmx_sw_idle + &pmx_sw_left2 + &pmx_led_wifi_yellow + &pmx_uart0 + &pmx_nand >; + pinctrl-names = "default"; + + pmx_led_disk_yellow: pmx-led-disk-yellow { + marvell,pins = "mpp21"; + marvell,function = "gpio"; + }; + + pmx_sata0_pwr_enable: pmx-sata0-pwr-enable { + marvell,pins = "mpp36"; + marvell,function = "gpio"; + }; + + pmx_led_sys_red: pmx-led-sys-red { + marvell,pins = "mpp37"; + marvell,function = "gpio"; + }; + + pmx_led_sys_blue: pmx-led-sys-blue { + marvell,pins = "mpp38"; + marvell,function = "gpio"; + }; + + pmx_led_wifi_green: pmx-led-wifi-green { + marvell,pins = "mpp39"; + marvell,function = "gpio"; + }; + + pmx_sw_left: pmx-sw-left { + marvell,pins = "mpp43"; + marvell,function = "gpio"; + }; + + pmx_sw_right: pmx-sw-right { + marvell,pins = "mpp44"; + marvell,function = "gpio"; + }; + + pmx_sw_idle: pmx-sw-idle { + marvell,pins = "mpp45"; + marvell,function = "gpio"; + }; + + pmx_sw_left2: pmx-sw-left2 { + marvell,pins = "mpp46"; + marvell,function = "gpio"; + }; + + pmx_led_wifi_yellow: pmx-led-wifi-yellow { + marvell,pins = "mpp48"; + marvell,function = "gpio"; + }; + }; + serial@12000 { clock-frequency = <200000000>; status = "ok"; diff --git a/arch/arm/mach-kirkwood/board-usi_topkick.c b/arch/arm/mach-kirkwood/board-usi_topkick.c index 23d2dd1..3fce1d0 100644 --- a/arch/arm/mach-kirkwood/board-usi_topkick.c +++ b/arch/arm/mach-kirkwood/board-usi_topkick.c @@ -16,7 +16,6 @@ #include #include #include "common.h" -#include "mpp.h" static struct mv643xx_eth_platform_data topkick_ge00_data = { .phy_addr = MV643XX_ETH_PHY_ADDR(0), @@ -26,52 +25,11 @@ static struct mvsdio_platform_data topkick_mvsdio_data = { /* unfortunately the CD signal has not been connected */ }; -/* - * GPIO LED layout - * - * /-SYS_LED(2) - * | - * | /-DISK_LED - * | | - * | | /-WLAN_LED(2) - * | | | - * [SW] [*] [*] [*] - */ - -/* - * Switch positions - * - * /-SW_LEFT - * | - * | /-SW_IDLE - * | | - * | | /-SW_RIGHT - * | | | - * PS [L] [I] [R] LEDS - */ - -static unsigned int topkick_mpp_config[] __initdata = { - MPP21_GPIO, /* DISK_LED (low active) - yellow */ - MPP36_GPIO, /* SATA0 power enable (high active) */ - MPP37_GPIO, /* SYS_LED2 (low active) - red */ - MPP38_GPIO, /* SYS_LED (low active) - blue */ - MPP39_GPIO, /* WLAN_LED (low active) - green */ - MPP43_GPIO, /* SW_LEFT (low active) */ - MPP44_GPIO, /* SW_RIGHT (low active) */ - MPP45_GPIO, /* SW_IDLE (low active) */ - MPP46_GPIO, /* SW_LEFT (low active) */ - MPP48_GPIO, /* WLAN_LED2 (low active) - yellow */ - 0 -}; - void __init usi_topkick_init(void) { /* * Basic setup. Needs to be called early. */ - kirkwood_mpp_conf(topkick_mpp_config); - - kirkwood_ge00_init(&topkick_ge00_data); kirkwood_sdio_init(&topkick_mvsdio_data); } -- cgit v1.1 From 44d032e7940131fd991a01a948630747d91fe983 Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Sat, 26 Jan 2013 20:50:12 +0000 Subject: ARM: Kirkwood: topkick: Enable i2c bus. Add a DT node for I2C and pinctrl hog for the pins. There appears to be an i2c bus on topkick with a device on it: i2cdetect 0 WARNING! This program can confuse your I2C bus, cause data loss and worse! I will probe file /dev/i2c-0. I will probe address range 0x03-0x77. Continue? [Y/n] y 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- 64 -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- Signed-off-by: Andrew Lunn Signed-off-by: Jason Cooper --- arch/arm/boot/dts/kirkwood-topkick.dts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/kirkwood-topkick.dts b/arch/arm/boot/dts/kirkwood-topkick.dts index bb1d4df..754f7ef 100644 --- a/arch/arm/boot/dts/kirkwood-topkick.dts +++ b/arch/arm/boot/dts/kirkwood-topkick.dts @@ -52,7 +52,8 @@ &pmx_sw_left2 &pmx_led_wifi_yellow &pmx_uart0 - &pmx_nand >; + &pmx_nand + &pmx_twsi0 >; pinctrl-names = "default"; pmx_led_disk_yellow: pmx-led-disk-yellow { @@ -144,6 +145,10 @@ status = "okay"; nr-ports = <1>; }; + + i2c@11000 { + status = "ok"; + }; }; gpio-leds { -- cgit v1.1 From 4ded65751c262e4897dbaf8c11d11d85332eecf3 Mon Sep 17 00:00:00 2001 From: Jason Cooper Date: Sat, 26 Jan 2013 20:50:14 +0000 Subject: ARM: kirkwood: nsa310: convert to pinctrl Signed-off-by: Jason Cooper --- arch/arm/boot/dts/kirkwood-nsa310.dts | 99 +++++++++++++++++++++++++++++++++++ arch/arm/mach-kirkwood/board-dt.c | 3 -- arch/arm/mach-kirkwood/board-nsa310.c | 26 --------- arch/arm/mach-kirkwood/common.h | 6 --- 4 files changed, 99 insertions(+), 35 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/kirkwood-nsa310.dts b/arch/arm/boot/dts/kirkwood-nsa310.dts index dbb3551..3a178cf 100644 --- a/arch/arm/boot/dts/kirkwood-nsa310.dts +++ b/arch/arm/boot/dts/kirkwood-nsa310.dts @@ -16,6 +16,105 @@ }; ocp@f1000000 { + pinctrl: pinctrl@10000 { + pinctrl-0 = < &pmx_led_esata_green + &pmx_led_esata_red + &pmx_led_usb_green + &pmx_led_usb_red + &pmx_usb_power_off + &pmx_led_sys_green + &pmx_led_sys_red + &pmx_btn_reset + &pmx_btn_copy + &pmx_led_copy_green + &pmx_led_copy_red + &pmx_led_hdd_green + &pmx_led_hdd_red + &pmx_unknown + &pmx_btn_power + &pmx_pwr_off >; + pinctrl-names = "default"; + + pmx_led_esata_green: pmx-led-esata-green { + marvell,pins = "mpp12"; + marvell,function = "gpio"; + }; + + pmx_led_esata_red: pmx-led-esata-red { + marvell,pins = "mpp13"; + marvell,function = "gpio"; + }; + + pmx_led_usb_green: pmx-led-usb-green { + marvell,pins = "mpp15"; + marvell,function = "gpio"; + }; + + pmx_led_usb_red: pmx-led-usb-red { + marvell,pins = "mpp16"; + marvell,function = "gpio"; + }; + + pmx_usb_power_off: pmx-usb-power-off { + marvell,pins = "mpp21"; + marvell,function = "gpio"; + }; + + pmx_led_sys_green: pmx-led-sys-green { + marvell,pins = "mpp28"; + marvell,function = "gpio"; + }; + + pmx_led_sys_red: pmx-led-sys-red { + marvell,pins = "mpp29"; + marvell,function = "gpio"; + }; + + pmx_btn_reset: pmx-btn-reset { + marvell,pins = "mpp36"; + marvell,function = "gpio"; + }; + + pmx_btn_copy: pmx-btn-copy { + marvell,pins = "mpp37"; + marvell,function = "gpio"; + }; + + pmx_led_copy_green: pmx-led-copy-green { + marvell,pins = "mpp39"; + marvell,function = "gpio"; + }; + + pmx_led_copy_red: pmx-led-copy-red { + marvell,pins = "mpp40"; + marvell,function = "gpio"; + }; + + pmx_led_hdd_green: pmx-led-hdd-green { + marvell,pins = "mpp41"; + marvell,function = "gpio"; + }; + + pmx_led_hdd_red: pmx-led-hdd-red { + marvell,pins = "mpp42"; + marvell,function = "gpio"; + }; + + pmx_unknown: pmx-unknown { + marvell,pins = "mpp44"; + marvell,function = "gpio"; + }; + + pmx_btn_power: pmx-btn-power { + marvell,pins = "mpp46"; + marvell,function = "gpio"; + }; + + pmx_pwr_off: pmx-pwr-off { + marvell,pins = "mpp48"; + marvell,function = "gpio"; + }; + }; serial@12000 { clock-frequency = <200000000>; diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index 05b3b7e..2e73e9d 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c @@ -144,9 +144,6 @@ static void __init kirkwood_dt_init(void) if (of_machine_is_compatible("usi,topkick")) usi_topkick_init(); - if (of_machine_is_compatible("zyxel,nsa310")) - nsa310_init(); - of_platform_populate(NULL, kirkwood_dt_match_table, NULL, NULL); } diff --git a/arch/arm/mach-kirkwood/board-nsa310.c b/arch/arm/mach-kirkwood/board-nsa310.c index 6966c86..544f83a 100644 --- a/arch/arm/mach-kirkwood/board-nsa310.c +++ b/arch/arm/mach-kirkwood/board-nsa310.c @@ -14,32 +14,6 @@ #include #include #include "common.h" -#include "mpp.h" - -static unsigned int nsa310_mpp_config[] __initdata = { - MPP12_GPIO, /* led esata green */ - MPP13_GPIO, /* led esata red */ - MPP15_GPIO, /* led usb green */ - MPP16_GPIO, /* led usb red */ - MPP21_GPIO, /* control usb power off */ - MPP28_GPIO, /* led sys green */ - MPP29_GPIO, /* led sys red */ - MPP36_GPIO, /* key reset */ - MPP37_GPIO, /* key copy */ - MPP39_GPIO, /* led copy green */ - MPP40_GPIO, /* led copy red */ - MPP41_GPIO, /* led hdd green */ - MPP42_GPIO, /* led hdd red */ - MPP44_GPIO, /* ?? */ - MPP46_GPIO, /* key power */ - MPP48_GPIO, /* control power off */ - 0 -}; - -void __init nsa310_init(void) -{ - kirkwood_mpp_conf(nsa310_mpp_config); -} static int __init nsa310_pci_init(void) { diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h index 537bdf8..5ed7056 100644 --- a/arch/arm/mach-kirkwood/common.h +++ b/arch/arm/mach-kirkwood/common.h @@ -135,12 +135,6 @@ void ns2_init(void); static inline void ns2_init(void) {}; #endif -#ifdef CONFIG_MACH_NSA310_DT -void nsa310_init(void); -#else -static inline void nsa310_init(void) {}; -#endif - #ifdef CONFIG_MACH_OPENBLOCKS_A6_DT void openblocks_a6_init(void); #else -- cgit v1.1 From 0dbe6ce0373394ff79744684b78e37bc4430daac Mon Sep 17 00:00:00 2001 From: Jason Cooper Date: Sat, 26 Jan 2013 20:50:10 +0000 Subject: ARM: kirkwood: topkick: init mvsdio via DT Signed-off-by: Jason Cooper Tested-by: Andrew Lunn --- arch/arm/boot/dts/kirkwood-topkick.dts | 7 +++++++ arch/arm/mach-kirkwood/board-usi_topkick.c | 6 ------ 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/kirkwood-topkick.dts b/arch/arm/boot/dts/kirkwood-topkick.dts index 754f7ef..842ff95 100644 --- a/arch/arm/boot/dts/kirkwood-topkick.dts +++ b/arch/arm/boot/dts/kirkwood-topkick.dts @@ -149,6 +149,13 @@ i2c@11000 { status = "ok"; }; + + mvsdio@90000 { + pinctrl-0 = <&pmx_sdio>; + pinctrl-names = "default"; + status = "okay"; + /* No CD or WP GPIOs */ + }; }; gpio-leds { diff --git a/arch/arm/mach-kirkwood/board-usi_topkick.c b/arch/arm/mach-kirkwood/board-usi_topkick.c index 3fce1d0..1cc04ec 100644 --- a/arch/arm/mach-kirkwood/board-usi_topkick.c +++ b/arch/arm/mach-kirkwood/board-usi_topkick.c @@ -14,22 +14,16 @@ #include #include #include -#include #include "common.h" static struct mv643xx_eth_platform_data topkick_ge00_data = { .phy_addr = MV643XX_ETH_PHY_ADDR(0), }; -static struct mvsdio_platform_data topkick_mvsdio_data = { - /* unfortunately the CD signal has not been connected */ -}; - void __init usi_topkick_init(void) { /* * Basic setup. Needs to be called early. */ kirkwood_ge00_init(&topkick_ge00_data); - kirkwood_sdio_init(&topkick_mvsdio_data); } -- cgit v1.1 From 564991205956d869db0e45dfabe23a31b596fa15 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Fri, 1 Feb 2013 11:38:28 +0100 Subject: arm: mvebu: enable the SD card slot on Armada 370 Reference Design board The Armada 370 Reference Design board has one SD card slot, directly connected to the SDIO IP of the SoC, so we enable this IP. there are no GPIOs for card-detect and write-protect so we do not specify any. Signed-off-by: Florian Fainelli Signed-off-by: Jason Cooper --- arch/arm/boot/dts/armada-370-rd.dts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/armada-370-rd.dts b/arch/arm/boot/dts/armada-370-rd.dts index d62dfac..f8e4855 100644 --- a/arch/arm/boot/dts/armada-370-rd.dts +++ b/arch/arm/boot/dts/armada-370-rd.dts @@ -57,5 +57,12 @@ phy = <&phy1>; phy-mode = "rgmii-id"; }; + + mvsdio@d00d4000 { + pinctrl-0 = <&sdio_pins1>; + pinctrl-names = "default"; + status = "okay"; + /* No CD or WP GPIOs */ + }; }; }; -- cgit v1.1