Merge tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Linus Torvalds [Wed, 12 Dec 2012 20:14:06 +0000 (12:14 -0800)]
Pull ARM SoC board updates from Olof Johansson:
 "This branch contains a set of various board updates for ARM platforms.

  A few shmobile platforms that are stale have been removed, some
  defconfig updates for various boards selecting new features such as
  pinctrl subsystem support, and various updates enabling peripherals,
  etc."

Fix up conflicts mostly as per Olof.

* tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (58 commits)
  ARM: S3C64XX: Add dummy supplies for Glenfarclas LDOs
  ARM: S3C64XX: Add registration of WM2200 Bells device on Cragganmore
  ARM: kirkwood: Add Plat'Home OpenBlocks A6 support
  ARM: Dove: update defconfig
  ARM: Kirkwood: update defconfig for new boards
  arm: orion5x: add DT related options in defconfig
  arm: orion5x: convert 'LaCie Ethernet Disk mini v2' to Device Tree
  arm: orion5x: basic Device Tree support
  arm: orion5x: mechanical defconfig update
  ARM: kirkwood: Add support for the MPL CEC4
  arm: kirkwood: add support for ZyXEL NSA310
  ARM: Kirkwood: new board USI Topkick
  ARM: kirkwood: use gpio-fan DT binding on lsxl
  ARM: Kirkwood: add Netspace boards to defconfig
  ARM: kirkwood: DT board setup for Network Space Mini v2
  ARM: kirkwood: DT board setup for Network Space Lite v2
  ARM: kirkwood: DT board setup for Network Space v2 and parents
  leds: leds-ns2: add device tree binding
  ARM: Kirkwood: Enable the second I2C bus
  ARM: mmp: select pinctrl driver
  ...

86 files changed:
Documentation/devicetree/bindings/arm/davinci.txt [new file with mode: 0644]
Documentation/devicetree/bindings/gpio/leds-ns2.txt [new file with mode: 0644]
arch/arm/Kconfig
arch/arm/boot/dts/Makefile
arch/arm/boot/dts/da850-enbw-cmc.dts [new file with mode: 0644]
arch/arm/boot/dts/da850-evm.dts [new file with mode: 0644]
arch/arm/boot/dts/da850.dtsi [new file with mode: 0644]
arch/arm/boot/dts/kirkwood-is2.dts [new file with mode: 0644]
arch/arm/boot/dts/kirkwood-lsxl.dtsi
arch/arm/boot/dts/kirkwood-mplcec4.dts [new file with mode: 0644]
arch/arm/boot/dts/kirkwood-ns2-common.dtsi [new file with mode: 0644]
arch/arm/boot/dts/kirkwood-ns2.dts [new file with mode: 0644]
arch/arm/boot/dts/kirkwood-ns2lite.dts [new file with mode: 0644]
arch/arm/boot/dts/kirkwood-ns2max.dts [new file with mode: 0644]
arch/arm/boot/dts/kirkwood-ns2mini.dts [new file with mode: 0644]
arch/arm/boot/dts/kirkwood-nsa310.dts [new file with mode: 0644]
arch/arm/boot/dts/kirkwood-openblocks_a6.dts [new file with mode: 0644]
arch/arm/boot/dts/kirkwood-topkick.dts [new file with mode: 0644]
arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts [new file with mode: 0644]
arch/arm/boot/dts/orion5x.dtsi [new file with mode: 0644]
arch/arm/boot/dts/sh7372-mackerel.dts [new file with mode: 0644]
arch/arm/configs/ap4evb_defconfig
arch/arm/configs/armadillo800eva_defconfig
arch/arm/configs/da8xx_omapl_defconfig
arch/arm/configs/dove_defconfig
arch/arm/configs/g3evm_defconfig [deleted file]
arch/arm/configs/g4evm_defconfig [deleted file]
arch/arm/configs/imx_v4_v5_defconfig
arch/arm/configs/imx_v6_v7_defconfig
arch/arm/configs/kirkwood_defconfig
arch/arm/configs/kota2_defconfig
arch/arm/configs/kzm9g_defconfig
arch/arm/configs/mackerel_defconfig
arch/arm/configs/marzen_defconfig
arch/arm/configs/orion5x_defconfig
arch/arm/mach-davinci/Kconfig
arch/arm/mach-davinci/Makefile
arch/arm/mach-davinci/Makefile.boot
arch/arm/mach-davinci/board-da850-evm.c
arch/arm/mach-davinci/da8xx-dt.c [new file with mode: 0644]
arch/arm/mach-exynos/mach-origen.c
arch/arm/mach-imx/mach-imx27_visstrim_m10.c
arch/arm/mach-kirkwood/Kconfig
arch/arm/mach-kirkwood/Makefile
arch/arm/mach-kirkwood/board-dt.c
arch/arm/mach-kirkwood/board-lsxl.c
arch/arm/mach-kirkwood/board-mplcec4.c [new file with mode: 0644]
arch/arm/mach-kirkwood/board-ns2.c [new file with mode: 0644]
arch/arm/mach-kirkwood/board-nsa310.c [new file with mode: 0644]
arch/arm/mach-kirkwood/board-openblocks_a6.c [new file with mode: 0644]
arch/arm/mach-kirkwood/board-usi_topkick.c [new file with mode: 0644]
arch/arm/mach-kirkwood/common.c
arch/arm/mach-kirkwood/common.h
arch/arm/mach-mmp/Kconfig
arch/arm/mach-omap1/board-fsample.c
arch/arm/mach-omap1/board-h2.c
arch/arm/mach-omap1/board-h3.c
arch/arm/mach-omap1/board-perseus2.c
arch/arm/mach-omap2/Kconfig
arch/arm/mach-omap2/Makefile
arch/arm/mach-omap2/board-4430sdp.c
arch/arm/mach-omap2/board-generic.c
arch/arm/mach-omap2/board-omap4panda.c
arch/arm/mach-omap2/board-rm680.c
arch/arm/mach-omap2/board-rx51.c
arch/arm/mach-omap2/dss-common.c [new file with mode: 0644]
arch/arm/mach-omap2/dss-common.h [new file with mode: 0644]
arch/arm/mach-orion5x/Kconfig
arch/arm/mach-orion5x/Makefile
arch/arm/mach-orion5x/board-dt.c [new file with mode: 0644]
arch/arm/mach-orion5x/common.c
arch/arm/mach-orion5x/common.h
arch/arm/mach-orion5x/edmini_v2-setup.c
arch/arm/mach-s3c64xx/Kconfig
arch/arm/mach-s3c64xx/mach-crag6410-module.c
arch/arm/mach-s3c64xx/mach-crag6410.c
arch/arm/mach-shmobile/Kconfig
arch/arm/mach-shmobile/Makefile
arch/arm/mach-shmobile/board-armadillo800eva.c
arch/arm/mach-shmobile/board-g3evm.c [deleted file]
arch/arm/mach-shmobile/board-g4evm.c [deleted file]
arch/arm/mach-shmobile/board-kzm9g.c
arch/arm/mach-shmobile/board-mackerel.c
arch/arm/mach-shmobile/board-marzen.c
drivers/leds/Kconfig
drivers/leds/leds-ns2.c

diff --git a/Documentation/devicetree/bindings/arm/davinci.txt b/Documentation/devicetree/bindings/arm/davinci.txt
new file mode 100644 (file)
index 0000000..cfaeda4
--- /dev/null
@@ -0,0 +1,17 @@
+Texas Instruments DaVinci Platforms Device Tree Bindings
+--------------------------------------------------------
+
+DA850/OMAP-L138/AM18x Evaluation Module (EVM) board
+Required root node properties:
+    - compatible = "ti,da850-evm", "ti,da850";
+
+EnBW AM1808 based CMC board
+Required root node properties:
+    - compatible = "enbw,cmc", "ti,da850;
+
+Generic DaVinci Boards
+----------------------
+
+DA850/OMAP-L138/AM18x generic board
+Required root node properties:
+    - compatible = "ti,da850";
diff --git a/Documentation/devicetree/bindings/gpio/leds-ns2.txt b/Documentation/devicetree/bindings/gpio/leds-ns2.txt
new file mode 100644 (file)
index 0000000..aef3aca
--- /dev/null
@@ -0,0 +1,26 @@
+Binding for dual-GPIO LED found on Network Space v2 (and parents).
+
+Required properties:
+- compatible: "lacie,ns2-leds".
+
+Each LED is represented as a sub-node of the ns2-leds device.
+
+Required sub-node properties:
+- cmd-gpio: Command LED GPIO. See OF device-tree GPIO specification.
+- slow-gpio: Slow LED GPIO. See OF device-tree GPIO specification.
+
+Optional sub-node properties:
+- label: Name for this LED. If omitted, the label is taken from the node name.
+- linux,default-trigger: Trigger assigned to the LED.
+
+Example:
+
+ns2-leds {
+       compatible = "lacie,ns2-leds";
+
+       blue-sata {
+               label = "ns2:blue:sata";
+               slow-gpio = <&gpio0 29 0>;
+               cmd-gpio = <&gpio0 30 0>;
+       };
+};
index 29b85e6..d7d7c2f 100644 (file)
@@ -926,6 +926,7 @@ config ARCH_DAVINCI
        select GENERIC_IRQ_CHIP
        select HAVE_IDE
        select NEED_MACH_GPIO_H
+       select USE_OF
        select ZONE_DMA
        help
          Support for TI's DaVinci platform.
index 4291786..f3f2f80 100644 (file)
@@ -55,11 +55,20 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \
        kirkwood-ib62x0.dtb \
        kirkwood-iconnect.dtb \
        kirkwood-iomega_ix2_200.dtb \
+       kirkwood-is2.dtb \
        kirkwood-km_kirkwood.dtb \
        kirkwood-lschlv2.dtb \
        kirkwood-lsxhl.dtb \
+       kirkwood-mplcec4.dtb \
+       kirkwood-ns2.dtb \
+       kirkwood-ns2lite.dtb \
+       kirkwood-ns2max.dtb \
+       kirkwood-ns2mini.dtb \
+       kirkwood-nsa310.dtb \
+       kirkwood-topkick.dtb \
        kirkwood-ts219-6281.dtb \
-       kirkwood-ts219-6282.dtb
+       kirkwood-ts219-6282.dtb \
+       kirkwood-openblocks_a6.dtb
 dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \
        msm8960-cdp.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
@@ -94,11 +103,13 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
        am335x-evm.dtb \
        am335x-evmsk.dtb \
        am335x-bone.dtb
+dtb-$(CONFIG_ARCH_ORION5X) += orion5x-lacie-ethernet-disk-mini-v2.dtb
 dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb
 dtb-$(CONFIG_ARCH_U8500) += snowball.dtb
 dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \
        r8a7740-armadillo800eva.dtb \
-       sh73a0-kzm9g.dtb
+       sh73a0-kzm9g.dtb \
+       sh7372-mackerel.dtb
 dtb-$(CONFIG_ARCH_SPEAR13XX) += spear1310-evb.dtb \
        spear1340-evb.dtb
 dtb-$(CONFIG_ARCH_SPEAR3XX)+= spear300-evb.dtb \
diff --git a/arch/arm/boot/dts/da850-enbw-cmc.dts b/arch/arm/boot/dts/da850-enbw-cmc.dts
new file mode 100644 (file)
index 0000000..422fdb3
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Device Tree for AM1808 EnBW CMC board
+ *
+ * Copyright 2012 DENX Software Engineering GmbH
+ * Heiko Schocher <hs@denx.de>
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+/dts-v1/;
+/include/ "da850.dtsi"
+
+/ {
+       compatible = "enbw,cmc", "ti,da850";
+       model = "EnBW CMC";
+
+       soc {
+               serial0: serial@1c42000 {
+                       status = "okay";
+               };
+               serial1: serial@1d0c000 {
+                       status = "okay";
+               };
+               serial2: serial@1d0d000 {
+                       status = "okay";
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
new file mode 100644 (file)
index 0000000..37dc5a3
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Device Tree for DA850 EVM board
+ *
+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation, version 2.
+ */
+/dts-v1/;
+/include/ "da850.dtsi"
+
+/ {
+       compatible = "ti,da850-evm", "ti,da850";
+       model = "DA850/AM1808/OMAP-L138 EVM";
+
+       soc {
+               serial0: serial@1c42000 {
+                       status = "okay";
+               };
+               serial1: serial@1d0c000 {
+                       status = "okay";
+               };
+               serial2: serial@1d0d000 {
+                       status = "okay";
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
new file mode 100644 (file)
index 0000000..640ab75
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2012 DENX Software Engineering GmbH
+ * Heiko Schocher <hs@denx.de>
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+/include/ "skeleton.dtsi"
+
+/ {
+       arm {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               intc: interrupt-controller {
+                       compatible = "ti,cp-intc";
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+                       ti,intc-size = <100>;
+                       reg = <0xfffee000 0x2000>;
+               };
+       };
+       soc {
+               compatible = "simple-bus";
+               model = "da850";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges = <0x0 0x01c00000 0x400000>;
+
+               serial0: serial@1c42000 {
+                       compatible = "ns16550a";
+                       reg = <0x42000 0x100>;
+                       clock-frequency = <150000000>;
+                       reg-shift = <2>;
+                       interrupts = <25>;
+                       interrupt-parent = <&intc>;
+                       status = "disabled";
+               };
+               serial1: serial@1d0c000 {
+                       compatible = "ns16550a";
+                       reg = <0x10c000 0x100>;
+                       clock-frequency = <150000000>;
+                       reg-shift = <2>;
+                       interrupts = <53>;
+                       interrupt-parent = <&intc>;
+                       status = "disabled";
+               };
+               serial2: serial@1d0d000 {
+                       compatible = "ns16550a";
+                       reg = <0x10d000 0x100>;
+                       clock-frequency = <150000000>;
+                       reg-shift = <2>;
+                       interrupts = <61>;
+                       interrupt-parent = <&intc>;
+                       status = "disabled";
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/kirkwood-is2.dts b/arch/arm/boot/dts/kirkwood-is2.dts
new file mode 100644 (file)
index 0000000..0bdce0a
--- /dev/null
@@ -0,0 +1,30 @@
+/dts-v1/;
+
+/include/ "kirkwood-ns2-common.dtsi"
+
+/ {
+       model = "LaCie Internet Space v2";
+       compatible = "lacie,inetspace_v2", "marvell,kirkwood-88f6281", "marvell,kirkwood";
+
+       memory {
+               device_type = "memory";
+               reg = <0x00000000 0x8000000>;
+       };
+
+       ocp@f1000000 {
+               sata@80000 {
+                       status = "okay";
+                       nr-ports = <1>;
+               };
+       };
+
+       ns2-leds {
+               compatible = "lacie,ns2-leds";
+
+               blue-sata {
+                       label = "ns2:blue:sata";
+                       slow-gpio = <&gpio0 29 0>;
+                       cmd-gpio = <&gpio0 30 0>;
+               };
+       };
+};
index 8fea375..798e60e 100644 (file)
                        gpios = <&gpio1 16 1>;
                };
        };
+
+       gpio_fan {
+               compatible = "gpio-fan";
+               gpios = <&gpio0 19 1
+                        &gpio0 18 1>;
+               gpio-fan,speed-map = <0    3
+                                     1500 2
+                                     3250 1
+                                     5000 0>;
+               alarm-gpios = <&gpio1 8 0>;
+       };
 };
diff --git a/arch/arm/boot/dts/kirkwood-mplcec4.dts b/arch/arm/boot/dts/kirkwood-mplcec4.dts
new file mode 100644 (file)
index 0000000..ac3c080
--- /dev/null
@@ -0,0 +1,119 @@
+/dts-v1/;
+
+/include/ "kirkwood.dtsi"
+
+/ {
+       model = "MPL CEC4";
+       compatible = "mpl,cec4-10", "mpl,cec4", "marvell,kirkwood-88f6281", "marvell,kirkwood";
+
+        memory {
+                device_type = "memory";
+                reg = <0x00000000 0x20000000>;
+        };
+
+        chosen {
+                bootargs = "console=ttyS0,115200n8 earlyprintk";
+        };
+
+       ocp@f1000000 {
+                i2c@11000 {
+                        status = "okay";
+
+                       rtc@51 {
+                               compatible = "nxp,pcf8563";
+                               reg = <0x51>;
+                       };
+
+                       eeprom@57 {
+                               compatible = "atmel,24c02";
+                               reg = <0x57>;
+                       };
+
+                };
+
+                serial@12000 {
+                        clock-frequency = <200000000>;
+                        status = "ok";
+                };
+
+                nand@3000000 {
+                        status = "okay";
+
+                        partition@0 {
+                                label = "uboot";
+                                reg = <0x0000000 0x100000>;
+                        };
+
+                        partition@100000 {
+                                label = "env";
+                                reg = <0x100000 0x80000>;
+                        };
+
+                        partition@180000 {
+                                label = "fdt";
+                                reg = <0x180000 0x80000>;
+                        };
+
+                        partition@200000 {
+                                label = "kernel";
+                                reg = <0x200000 0x400000>;
+                        };
+
+                        partition@600000 {
+                                label = "rootfs";
+                                reg = <0x600000 0x1fa00000>;
+                        };
+                };
+
+               rtc@10300 {
+                       status = "disabled";
+               };
+
+               sata@80000 {
+                       nr-ports = <2>;
+                       status = "okay";
+
+               };
+       };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+
+               health {
+                       label = "status:green:health";
+                       gpios = <&gpio0 7 1>;
+               };
+
+               user1o {
+                       label = "user1:orange";
+                       gpios = <&gpio1 8 1>;
+                       default-state = "on";
+               };
+
+               user1g {
+                       label = "user1:green";
+                       gpios = <&gpio1 9 1>;
+                       default-state = "on";
+               };
+
+               user0o {
+                       label = "user0:orange";
+                       gpios = <&gpio1 12 1>;
+                       default-state = "on";
+               };
+
+               user0g {
+                       label = "user0:green";
+                       gpios = <&gpio1 13 1>;
+                       default-state = "on";
+               };
+
+               misc {
+                       label = "status:orange:misc";
+                       gpios = <&gpio1 14 1>;
+                       default-state = "on";
+               };
+
+       };
+};
+
diff --git a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi
new file mode 100644 (file)
index 0000000..9bc6785
--- /dev/null
@@ -0,0 +1,63 @@
+/include/ "kirkwood.dtsi"
+
+/ {
+       chosen {
+               bootargs = "console=ttyS0,115200n8";
+       };
+
+       ocp@f1000000 {
+               serial@12000 {
+                       clock-frequency = <166666667>;
+                       status = "okay";
+               };
+
+               spi@10600 {
+                       status = "okay";
+
+                       flash@0 {
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               compatible = "mx25l4005a";
+                               reg = <0>;
+                               spi-max-frequency = <20000000>;
+                               mode = <0>;
+
+                               partition@0 {
+                                       reg = <0x0 0x80000>;
+                                       label = "u-boot";
+                               };
+                       };
+               };
+
+               i2c@11000 {
+                       status = "okay";
+
+                       eeprom@50 {
+                               compatible = "at,24c04";
+                               pagesize = <16>;
+                               reg = <0x50>;
+                       };
+               };
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               button@1 {
+                       label = "Power push button";
+                       linux,code = <116>;
+                       gpios = <&gpio1 0 0>;
+               };
+       };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+
+               red-fail {
+                       label = "ns2:red:fail";
+                       gpios = <&gpio0 12 0>;
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/kirkwood-ns2.dts b/arch/arm/boot/dts/kirkwood-ns2.dts
new file mode 100644 (file)
index 0000000..f2d36ec
--- /dev/null
@@ -0,0 +1,30 @@
+/dts-v1/;
+
+/include/ "kirkwood-ns2-common.dtsi"
+
+/ {
+       model = "LaCie Network Space v2";
+       compatible = "lacie,netspace_v2", "marvell,kirkwood-88f6281", "marvell,kirkwood";
+
+       memory {
+               device_type = "memory";
+               reg = <0x00000000 0x10000000>;
+       };
+
+       ocp@f1000000 {
+               sata@80000 {
+                       status = "okay";
+                       nr-ports = <1>;
+               };
+       };
+
+       ns2-leds {
+               compatible = "lacie,ns2-leds";
+
+               blue-sata {
+                       label = "ns2:blue:sata";
+                       slow-gpio = <&gpio0 29 0>;
+                       cmd-gpio = <&gpio0 30 0>;
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/kirkwood-ns2lite.dts b/arch/arm/boot/dts/kirkwood-ns2lite.dts
new file mode 100644 (file)
index 0000000..b02eb4e
--- /dev/null
@@ -0,0 +1,30 @@
+/dts-v1/;
+
+/include/ "kirkwood-ns2-common.dtsi"
+
+/ {
+       model = "LaCie Network Space Lite v2";
+       compatible = "lacie,netspace_lite_v2", "marvell,kirkwood-88f6192", "marvell,kirkwood";
+
+       memory {
+               device_type = "memory";
+               reg = <0x00000000 0x8000000>;
+       };
+
+       ocp@f1000000 {
+               sata@80000 {
+                       status = "okay";
+                       nr-ports = <1>;
+               };
+       };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+
+               blue-sata {
+                       label = "ns2:blue:sata";
+                       gpios = <&gpio0 30 1>;
+                       linux,default-trigger = "default-on";
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/kirkwood-ns2max.dts b/arch/arm/boot/dts/kirkwood-ns2max.dts
new file mode 100644 (file)
index 0000000..bcec4d6
--- /dev/null
@@ -0,0 +1,49 @@
+/dts-v1/;
+
+/include/ "kirkwood-ns2-common.dtsi"
+
+/ {
+       model = "LaCie Network Space Max v2";
+       compatible = "lacie,netspace_max_v2", "marvell,kirkwood-88f6281", "marvell,kirkwood";
+
+       memory {
+               device_type = "memory";
+               reg = <0x00000000 0x10000000>;
+       };
+
+       ocp@f1000000 {
+               sata@80000 {
+                       status = "okay";
+                       nr-ports = <2>;
+               };
+       };
+
+       gpio_fan {
+               compatible = "gpio-fan";
+               gpios = <&gpio0 22 1
+                        &gpio0  7 1
+                        &gpio1  1 1
+                        &gpio0 23 1>;
+               gpio-fan,speed-map =
+                       <   0  0
+                        1500 15
+                        1700 14
+                        1800 13
+                        2100 12
+                        3100 11
+                        3300 10
+                        4300  9
+                        5500  8>;
+               alarm-gpios = <&gpio0 25 1>;
+       };
+
+       ns2-leds {
+               compatible = "lacie,ns2-leds";
+
+               blue-sata {
+                       label = "ns2:blue:sata";
+                       slow-gpio = <&gpio0 29 0>;
+                       cmd-gpio = <&gpio0 30 0>;
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/kirkwood-ns2mini.dts b/arch/arm/boot/dts/kirkwood-ns2mini.dts
new file mode 100644 (file)
index 0000000..b79f5eb
--- /dev/null
@@ -0,0 +1,49 @@
+/dts-v1/;
+
+/include/ "kirkwood-ns2-common.dtsi"
+
+/ {
+       model = "LaCie Network Space Mini v2";
+       compatible = "lacie,netspace_mini_v2", "marvell,kirkwood-88f6192", "marvell,kirkwood";
+
+       memory {
+               device_type = "memory";
+               reg = <0x00000000 0x8000000>;
+       };
+
+       ocp@f1000000 {
+               sata@80000 {
+                       status = "okay";
+                       nr-ports = <1>;
+               };
+       };
+
+       gpio_fan {
+               compatible = "gpio-fan";
+               gpios = <&gpio0 22 1
+                        &gpio0  7 1
+                        &gpio1  1 1
+                        &gpio0 23 1>;
+               gpio-fan,speed-map =
+                       <   0  0
+                        3000 15
+                        3180 14
+                        4140 13
+                        4570 12
+                        6760 11
+                        7140 10
+                        7980  9
+                        9200  8>;
+               alarm-gpios = <&gpio0 25 1>;
+       };
+
+       ns2-leds {
+               compatible = "lacie,ns2-leds";
+
+               blue-sata {
+                       label = "ns2:blue:sata";
+                       slow-gpio = <&gpio0 29 0>;
+                       cmd-gpio = <&gpio0 30 0>;
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/kirkwood-nsa310.dts b/arch/arm/boot/dts/kirkwood-nsa310.dts
new file mode 100644 (file)
index 0000000..5509f96
--- /dev/null
@@ -0,0 +1,144 @@
+/dts-v1/;
+
+/include/ "kirkwood.dtsi"
+
+/ {
+       model = "ZyXEL NSA310";
+       compatible = "zyxel,nsa310", "marvell,kirkwood-88f6281", "marvell,kirkwood";
+
+       memory {
+               device_type = "memory";
+               reg = <0x00000000 0x10000000>;
+       };
+
+       chosen {
+               bootargs = "console=ttyS0,115200";
+       };
+
+       ocp@f1000000 {
+
+               serial@12000 {
+                       clock-frequency = <200000000>;
+                       status = "ok";
+               };
+
+               sata@80000 {
+                       status = "okay";
+                       nr-ports = <2>;
+               };
+
+               i2c@11000 {
+                       status = "okay";
+               };
+
+               nand@3000000 {
+                       status = "okay";
+                       chip-delay = <35>;
+
+                       partition@0 {
+                               label = "uboot";
+                               reg = <0x0000000 0x0100000>;
+                               read-only;
+                       };
+                       partition@100000 {
+                               label = "uboot_env";
+                               reg = <0x0100000 0x0080000>;
+                       };
+                       partition@180000 {
+                               label = "key_store";
+                               reg = <0x0180000 0x0080000>;
+                       };
+                       partition@200000 {
+                               label = "info";
+                               reg = <0x0200000 0x0080000>;
+                       };
+                       partition@280000 {
+                               label = "etc";
+                               reg = <0x0280000 0x0a00000>;
+                       };
+                       partition@c80000 {
+                               label = "kernel_1";
+                               reg = <0x0c80000 0x0a00000>;
+                       };
+                       partition@1680000 {
+                               label = "rootfs1";
+                               reg = <0x1680000 0x2fc0000>;
+                       };
+                       partition@4640000 {
+                               label = "kernel_2";
+                               reg = <0x4640000 0x0a00000>;
+                       };
+                       partition@5040000 {
+                               label = "rootfs2";
+                               reg = <0x5040000 0x2fc0000>;
+                       };
+               };
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               button@1 {
+                       label = "Power Button";
+                       linux,code = <116>;
+                       gpios = <&gpio1 14 0>;
+               };
+               button@2 {
+                       label = "Copy Button";
+                       linux,code = <133>;
+                       gpios = <&gpio1 5 1>;
+               };
+               button@3 {
+                       label = "Reset Button";
+                       linux,code = <0x198>;
+                       gpios = <&gpio1 4 1>;
+               };
+       };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+
+               green-sys {
+                       label = "nsa310:green:sys";
+                       gpios = <&gpio0 28 0>;
+               };
+               red-sys {
+                       label = "nsa310:red:sys";
+                       gpios = <&gpio0 29 0>;
+               };
+               green-hdd {
+                       label = "nsa310:green:hdd";
+                       gpios = <&gpio1 9 0>;
+               };
+               red-hdd {
+                       label = "nsa310:red:hdd";
+                       gpios = <&gpio1 10 0>;
+               };
+               green-esata {
+                       label = "nsa310:green:esata";
+                       gpios = <&gpio0 12 0>;
+               };
+               red-esata {
+                       label = "nsa310:red:esata";
+                       gpios = <&gpio0 13 0>;
+               };
+               green-usb {
+                       label = "nsa310:green:usb";
+                       gpios = <&gpio0 15 0>;
+               };
+               red-usb {
+                       label = "nsa310:red:usb";
+                       gpios = <&gpio0 16 0>;
+               };
+               green-copy {
+                       label = "nsa310:green:copy";
+                       gpios = <&gpio1 7 0>;
+               };
+               red-copy {
+                       label = "nsa310:red:copy";
+                       gpios = <&gpio1 8 0>;
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/kirkwood-openblocks_a6.dts b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts
new file mode 100644 (file)
index 0000000..9a2606c
--- /dev/null
@@ -0,0 +1,39 @@
+/dts-v1/;
+
+/include/ "kirkwood.dtsi"
+
+/ {
+       model = "Plat'Home OpenBlocksA6";
+       compatible = "plathome,openblocks-a6", "marvell,kirkwood-88f6283", "marvell,kirkwood";
+
+       memory {
+               device_type = "memory";
+               reg = <0x00000000 0x20000000>;
+       };
+
+       chosen {
+               bootargs = "console=ttyS0,115200n8 earlyprintk";
+       };
+
+       ocp@f1000000 {
+               serial@12000 {
+                       clock-frequency = <200000000>;
+                       status = "ok";
+               };
+
+               serial@12100 {
+                       clock-frequency = <200000000>;
+                       status = "ok";
+               };
+
+               nand@3000000 {
+                       chip-delay = <25>;
+                       status = "okay";
+               };
+
+               sata@80000 {
+                       nr-ports = <1>;
+                       status = "okay";
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/kirkwood-topkick.dts b/arch/arm/boot/dts/kirkwood-topkick.dts
new file mode 100644 (file)
index 0000000..c0de5a7
--- /dev/null
@@ -0,0 +1,85 @@
+/dts-v1/;
+
+/include/ "kirkwood.dtsi"
+
+/ {
+       model = "Univeral Scientific Industrial Co. Topkick-1281P2";
+       compatible = "usi,topkick-1281P2", "usi,topkick", "marvell,kirkwood-88f6282", "marvell,kirkwood";
+
+       memory {
+               device_type = "memory";
+               reg = <0x00000000 0x10000000>;
+       };
+
+       chosen {
+               bootargs = "console=ttyS0,115200n8 earlyprintk";
+       };
+
+       ocp@f1000000 {
+               serial@12000 {
+                       clock-frequency = <200000000>;
+                       status = "ok";
+               };
+
+               nand@3000000 {
+                       status = "okay";
+
+                       partition@0 {
+                               label = "u-boot";
+                               reg = <0x0000000 0x180000>;
+                       };
+
+                       partition@180000 {
+                               label = "u-boot env";
+                               reg = <0x0180000 0x20000>;
+                       };
+
+                       partition@200000 {
+                               label = "uImage";
+                               reg = <0x0200000 0x600000>;
+                       };
+
+                       partition@800000 {
+                               label = "uInitrd";
+                               reg = <0x0800000 0x1000000>;
+                       };
+
+                       partition@1800000 {
+                               label = "rootfs";
+                               reg = <0x1800000 0xe800000>;
+                       };
+               };
+
+               sata@80000 {
+                       status = "okay";
+                       nr-ports = <1>;
+               };
+       };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+
+               disk {
+                       label = "topkick:yellow:disk";
+                       gpios = <&gpio0 21 1>;
+                       linux,default-trigger = "ide-disk";
+               };
+               system2 {
+                       label = "topkick:red:system";
+                       gpios = <&gpio1 5 1>;
+               };
+               system {
+                       label = "topkick:blue:system";
+                       gpios = <&gpio1 6 1>;
+                       default-state = "on";
+               };
+               wifi {
+                       label = "topkick:green:wifi";
+                       gpios = <&gpio1 7 1>;
+               };
+               wifi2 {
+                       label = "topkick:yellow:wifi";
+                       gpios = <&gpio1 16 1>;
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts b/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts
new file mode 100644 (file)
index 0000000..5a3a58b
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2012 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+ *
+ * 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/ "orion5x.dtsi"
+
+/ {
+       model = "LaCie Ethernet Disk mini V2";
+       compatible = "lacie,ethernet-disk-mini-v2", "marvell-orion5x-88f5182", "marvell,orion5x";
+
+       memory {
+               reg = <0x00000000 0x4000000>; /* 64 MB */
+       };
+
+       chosen {
+               bootargs = "console=ttyS0,115200n8 earlyprintk";
+       };
+
+       ocp@f1000000 {
+               serial@12000 {
+                       clock-frequency = <166666667>;
+                       status = "okay";
+               };
+
+               sata@80000 {
+                       status = "okay";
+                       nr-ports = <2>;
+               };
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               button@1 {
+                       label = "Power-on Switch";
+                       linux,code = <116>; /* KEY_POWER */
+                       gpios = <&gpio0 18 0>;
+               };
+       };
+
+       gpio_leds {
+               compatible = "gpio-leds";
+
+               led@1 {
+                       label = "power:blue";
+                       gpios = <&gpio0 16 1>;
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/orion5x.dtsi b/arch/arm/boot/dts/orion5x.dtsi
new file mode 100644 (file)
index 0000000..8aad00f
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2012 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+ *
+ * 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/ "skeleton.dtsi"
+
+/ {
+       model = "Marvell Orion5x SoC";
+       compatible = "marvell,orion5x";
+       interrupt-parent = <&intc>;
+
+       intc: interrupt-controller {
+               compatible = "marvell,orion-intc", "marvell,intc";
+               interrupt-controller;
+               #interrupt-cells = <1>;
+               reg = <0xf1020204 0x04>;
+       };
+
+       ocp@f1000000 {
+               compatible = "simple-bus";
+               ranges = <0x00000000 0xf1000000 0x4000000
+                         0xf2200000 0xf2200000 0x0000800>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               gpio0: gpio@10100 {
+                       compatible = "marvell,orion-gpio";
+                       #gpio-cells = <2>;
+                       gpio-controller;
+                       reg = <0x10100 0x40>;
+                       ngpio = <32>;
+                       interrupts = <6>, <7>, <8>, <9>;
+               };
+
+               serial@12000 {
+                       compatible = "ns16550a";
+                       reg = <0x12000 0x100>;
+                       reg-shift = <2>;
+                       interrupts = <3>;
+                       /* set clock-frequency in board dts */
+                       status = "disabled";
+               };
+
+               serial@12100 {
+                       compatible = "ns16550a";
+                       reg = <0x12100 0x100>;
+                       reg-shift = <2>;
+                       interrupts = <4>;
+                       /* set clock-frequency in board dts */
+                       status = "disabled";
+               };
+
+               spi@10600 {
+                       compatible = "marvell,orion-spi";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       cell-index = <0>;
+                       reg = <0x10600 0x28>;
+                       status = "disabled";
+               };
+
+               wdt@20300 {
+                       compatible = "marvell,orion-wdt";
+                       reg = <0x20300 0x28>;
+                       status = "okay";
+               };
+
+               sata@80000 {
+                       compatible = "marvell,orion-sata";
+                       reg = <0x80000 0x5000>;
+                       interrupts = <29>;
+                       status = "disabled";
+               };
+
+               i2c@11000 {
+                       compatible = "marvell,mv64xxx-i2c";
+                       reg = <0x11000 0x20>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <5>;
+                       clock-frequency = <100000>;
+                       status = "disabled";
+               };
+
+               crypto@90000 {
+                       compatible = "marvell,orion-crypto";
+                       reg = <0x90000 0x10000>,
+                             <0xf2200000 0x800>;
+                       reg-names = "regs", "sram";
+                       interrupts = <22>;
+                       status = "okay";
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/sh7372-mackerel.dts b/arch/arm/boot/dts/sh7372-mackerel.dts
new file mode 100644 (file)
index 0000000..286f0ca
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Device Tree Source for the mackerel board
+ *
+ * Copyright (C) 2012 Renesas Solutions Corp.
+ *
+ * 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/ "skeleton.dtsi"
+
+/ {
+       model = "Mackerel (AP4 EVM 2nd)";
+       compatible = "renesas,mackerel";
+
+       memory {
+               device_type = "memory";
+               reg = <0x40000000 0x10000000>;
+       };
+};
index 2eef85e..66894f7 100644 (file)
@@ -46,7 +46,6 @@ CONFIG_SERIAL_SH_SCI_CONSOLE=y
 # CONFIG_HID_SUPPORT is not set
 # CONFIG_USB_SUPPORT is not set
 # CONFIG_DNOTIFY is not set
-# CONFIG_INOTIFY_USER is not set
 CONFIG_TMPFS=y
 # CONFIG_MISC_FILESYSTEMS is not set
 CONFIG_MAGIC_SYSRQ=y
index 3d76407..2e1a825 100644 (file)
@@ -21,7 +21,7 @@ CONFIG_MACH_ARMADILLO800EVA=y
 # CONFIG_SH_TIMER_TMU is not set
 CONFIG_ARM_THUMB=y
 CONFIG_CPU_BPREDICT_DISABLE=y
-# CONFIG_CACHE_L2X0 is not set
+CONFIG_CACHE_L2X0=y
 CONFIG_ARM_ERRATA_430973=y
 CONFIG_ARM_ERRATA_458693=y
 CONFIG_ARM_ERRATA_460075=y
index 88ccde0..f292239 100644 (file)
@@ -17,6 +17,7 @@ CONFIG_MODVERSIONS=y
 CONFIG_ARCH_DAVINCI=y
 CONFIG_ARCH_DAVINCI_DA830=y
 CONFIG_ARCH_DAVINCI_DA850=y
+CONFIG_MACH_DA8XX_DT=y
 CONFIG_MACH_MITYOMAPL138=y
 CONFIG_MACH_OMAPL138_HAWKBOARD=y
 CONFIG_DAVINCI_RESET_CLOCKS=y
@@ -26,6 +27,7 @@ CONFIG_PREEMPT=y
 CONFIG_AEABI=y
 # CONFIG_OABI_COMPAT is not set
 CONFIG_LEDS=y
+CONFIG_USE_OF=y
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_CPU_FREQ=y
@@ -75,6 +77,7 @@ CONFIG_SERIO_LIBPS2=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_8250_NR_UARTS=3
+CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_I2C=y
 CONFIG_I2C_CHARDEV=y
 CONFIG_I2C_DAVINCI=y
index 40db34c..0b7ee92 100644 (file)
@@ -8,11 +8,19 @@ CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
 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_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
@@ -62,6 +70,9 @@ 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
 CONFIG_I2C_CHARDEV=y
@@ -74,6 +85,18 @@ 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
+CONFIG_LEDS_CLASS=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_MV=y
 CONFIG_DMADEVICES=y
@@ -122,6 +145,7 @@ CONFIG_CRYPTO_TWOFISH=y
 CONFIG_CRYPTO_DEFLATE=y
 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
diff --git a/arch/arm/configs/g3evm_defconfig b/arch/arm/configs/g3evm_defconfig
deleted file mode 100644 (file)
index 4a336ab..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-CONFIG_EXPERIMENTAL=y
-CONFIG_SYSVIPC=y
-CONFIG_IKCONFIG=y
-CONFIG_IKCONFIG_PROC=y
-CONFIG_LOG_BUF_SHIFT=16
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_SLAB=y
-# CONFIG_BLK_DEV_BSG is not set
-# CONFIG_IOSCHED_DEADLINE is not set
-# CONFIG_IOSCHED_CFQ is not set
-CONFIG_ARCH_SHMOBILE=y
-CONFIG_ARCH_SH7367=y
-CONFIG_MACH_G3EVM=y
-CONFIG_AEABI=y
-# CONFIG_OABI_COMPAT is not set
-CONFIG_ZBOOT_ROM_TEXT=0x0
-CONFIG_ZBOOT_ROM_BSS=0x0
-CONFIG_CMDLINE="console=ttySC1,115200 earlyprintk=sh-sci.1,115200"
-CONFIG_KEXEC=y
-CONFIG_PM=y
-# CONFIG_SUSPEND is not set
-CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-# CONFIG_FIRMWARE_IN_KERNEL is not set
-CONFIG_MTD=y
-CONFIG_MTD_CONCAT=y
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_CHAR=y
-CONFIG_MTD_BLOCK=y
-CONFIG_MTD_CFI=y
-CONFIG_MTD_CFI_INTELEXT=y
-CONFIG_MTD_PHYSMAP=y
-CONFIG_MTD_NAND=y
-# CONFIG_BLK_DEV is not set
-# CONFIG_MISC_DEVICES is not set
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-# CONFIG_INPUT_KEYBOARD is not set
-# CONFIG_INPUT_MOUSE is not set
-# CONFIG_SERIO is not set
-CONFIG_SERIAL_SH_SCI=y
-CONFIG_SERIAL_SH_SCI_NR_UARTS=8
-CONFIG_SERIAL_SH_SCI_CONSOLE=y
-# CONFIG_LEGACY_PTYS is not set
-# CONFIG_HW_RANDOM is not set
-# CONFIG_HWMON is not set
-# CONFIG_VGA_CONSOLE is not set
-# CONFIG_HID_SUPPORT is not set
-# CONFIG_USB_SUPPORT is not set
-# CONFIG_DNOTIFY is not set
-# CONFIG_INOTIFY_USER is not set
-CONFIG_TMPFS=y
-# CONFIG_MISC_FILESYSTEMS is not set
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_DEBUG_KERNEL=y
-# CONFIG_DETECT_SOFTLOCKUP is not set
-# CONFIG_RCU_CPU_STALL_DETECTOR is not set
-# CONFIG_FTRACE is not set
-# CONFIG_CRC32 is not set
diff --git a/arch/arm/configs/g4evm_defconfig b/arch/arm/configs/g4evm_defconfig
deleted file mode 100644 (file)
index 21c6d03..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-CONFIG_EXPERIMENTAL=y
-CONFIG_SYSVIPC=y
-CONFIG_IKCONFIG=y
-CONFIG_IKCONFIG_PROC=y
-CONFIG_LOG_BUF_SHIFT=16
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_SLAB=y
-# CONFIG_BLK_DEV_BSG is not set
-# CONFIG_IOSCHED_DEADLINE is not set
-# CONFIG_IOSCHED_CFQ is not set
-CONFIG_ARCH_SHMOBILE=y
-CONFIG_ARCH_SH7377=y
-CONFIG_MACH_G4EVM=y
-CONFIG_AEABI=y
-# CONFIG_OABI_COMPAT is not set
-CONFIG_ZBOOT_ROM_TEXT=0x0
-CONFIG_ZBOOT_ROM_BSS=0x0
-CONFIG_CMDLINE="console=ttySC4,115200 earlyprintk=sh-sci.4,115200"
-CONFIG_KEXEC=y
-CONFIG_PM=y
-# CONFIG_SUSPEND is not set
-CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-# CONFIG_FIRMWARE_IN_KERNEL is not set
-CONFIG_MTD=y
-CONFIG_MTD_CONCAT=y
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_CHAR=y
-CONFIG_MTD_BLOCK=y
-CONFIG_MTD_CFI=y
-CONFIG_MTD_CFI_INTELEXT=y
-CONFIG_MTD_PHYSMAP=y
-CONFIG_MTD_NAND=y
-# CONFIG_BLK_DEV is not set
-# CONFIG_MISC_DEVICES is not set
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-# CONFIG_INPUT_KEYBOARD is not set
-# CONFIG_INPUT_MOUSE is not set
-# CONFIG_SERIO is not set
-CONFIG_SERIAL_SH_SCI=y
-CONFIG_SERIAL_SH_SCI_NR_UARTS=8
-CONFIG_SERIAL_SH_SCI_CONSOLE=y
-# CONFIG_LEGACY_PTYS is not set
-# CONFIG_HW_RANDOM is not set
-# CONFIG_HWMON is not set
-# CONFIG_VGA_CONSOLE is not set
-# CONFIG_HID_SUPPORT is not set
-# CONFIG_USB_SUPPORT is not set
-# CONFIG_DNOTIFY is not set
-# CONFIG_INOTIFY_USER is not set
-CONFIG_TMPFS=y
-# CONFIG_MISC_FILESYSTEMS is not set
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_DEBUG_KERNEL=y
-# CONFIG_DETECT_SOFTLOCKUP is not set
-# CONFIG_RCU_CPU_STALL_DETECTOR is not set
-# CONFIG_FTRACE is not set
-# CONFIG_CRC32 is not set
index f71302c..ebbfb27 100644 (file)
@@ -123,6 +123,7 @@ CONFIG_REGULATOR_MC13892=y
 CONFIG_MEDIA_SUPPORT=y
 CONFIG_VIDEO_DEV=y
 CONFIG_V4L_PLATFORM_DRIVERS=y
+CONFIG_MEDIA_CAMERA_SUPPORT=y
 CONFIG_SOC_CAMERA=y
 CONFIG_SOC_CAMERA_OV2640=y
 CONFIG_VIDEO_MX2=y
index 44f117a..6966713 100644 (file)
@@ -145,15 +145,18 @@ CONFIG_GPIO_MC9S08DZ60=y
 # CONFIG_HWMON is not set
 CONFIG_WATCHDOG=y
 CONFIG_IMX2_WDT=y
+CONFIG_MFD_DA9052_I2C=y
 CONFIG_MFD_MC13XXX_SPI=y
 CONFIG_MFD_MC13XXX_I2C=y
 CONFIG_REGULATOR=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
+CONFIG_REGULATOR_DA9052=y
 CONFIG_REGULATOR_MC13783=y
 CONFIG_REGULATOR_MC13892=y
 CONFIG_MEDIA_SUPPORT=y
 CONFIG_VIDEO_DEV=y
 CONFIG_V4L_PLATFORM_DRIVERS=y
+CONFIG_MEDIA_CAMERA_SUPPORT=y
 CONFIG_SOC_CAMERA=y
 CONFIG_SOC_CAMERA_OV2640=y
 CONFIG_VIDEO_MX3=y
index 74eee0c..93f3794 100644 (file)
@@ -27,6 +27,14 @@ CONFIG_MACH_GOFLEXNET_DT=y
 CONFIG_MACH_LSXL_DT=y
 CONFIG_MACH_IOMEGA_IX2_200_DT=y
 CONFIG_MACH_KM_KIRKWOOD_DT=y
+CONFIG_MACH_INETSPACE_V2_DT=y
+CONFIG_MACH_MPLCEC4_DT=y
+CONFIG_MACH_NETSPACE_V2_DT=y
+CONFIG_MACH_NETSPACE_MAX_V2_DT=y
+CONFIG_MACH_NETSPACE_LITE_V2_DT=y
+CONFIG_MACH_NETSPACE_MINI_V2_DT=y
+CONFIG_MACH_OPENBLOCKS_A6_DT=y
+CONFIG_MACH_TOPKICK_DT=y
 CONFIG_MACH_TS219=y
 CONFIG_MACH_TS41X=y
 CONFIG_MACH_DOCKSTAR=y
@@ -40,6 +48,7 @@ CONFIG_MACH_D2NET_V2=y
 CONFIG_MACH_NET2BIG_V2=y
 CONFIG_MACH_NET5BIG_V2=y
 CONFIG_MACH_T5325=y
+CONFIG_MACH_NSA310_DT=y
 # CONFIG_CPU_FEROCEON_OLD_ID is not set
 CONFIG_PREEMPT=y
 CONFIG_AEABI=y
index b7735d6..fa83db1 100644 (file)
@@ -112,7 +112,6 @@ CONFIG_LEDS_GPIO=y
 CONFIG_LEDS_RENESAS_TPU=y
 CONFIG_LEDS_TRIGGERS=y
 # CONFIG_DNOTIFY is not set
-# CONFIG_INOTIFY_USER is not set
 CONFIG_TMPFS=y
 # CONFIG_MISC_FILESYSTEMS is not set
 CONFIG_MAGIC_SYSRQ=y
index c88b578..afbae28 100644 (file)
@@ -74,6 +74,8 @@ CONFIG_KEYBOARD_GPIO=y
 # CONFIG_INPUT_MOUSE is not set
 CONFIG_INPUT_TOUCHSCREEN=y
 CONFIG_TOUCHSCREEN_ST1232=y
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_ADXL34X=y
 # CONFIG_LEGACY_PTYS is not set
 CONFIG_SERIAL_SH_SCI=y
 CONFIG_SERIAL_SH_SCI_NR_UARTS=9
@@ -119,8 +121,9 @@ CONFIG_DMADEVICES=y
 CONFIG_SH_DMAE=y
 CONFIG_ASYNC_TX_DMA=y
 CONFIG_STAGING=y
+CONFIG_SENSORS_AK8975=y
+CONFIG_IIO=y
 # CONFIG_DNOTIFY is not set
-CONFIG_INOTIFY_USER=y
 CONFIG_VFAT_FS=y
 CONFIG_TMPFS=y
 # CONFIG_MISC_FILESYSTEMS is not set
index 306a2e2..2098ce1 100644 (file)
@@ -70,17 +70,31 @@ CONFIG_SERIAL_SH_SCI_NR_UARTS=8
 CONFIG_SERIAL_SH_SCI_CONSOLE=y
 # CONFIG_LEGACY_PTYS is not set
 # CONFIG_HW_RANDOM is not set
+CONFIG_I2C=y
+CONFIG_I2C_SH_MOBILE=y
 # CONFIG_HWMON is not set
 # CONFIG_MFD_SUPPORT is not set
 CONFIG_FB=y
 CONFIG_FB_MODE_HELPERS=y
 CONFIG_FB_SH_MOBILE_LCDC=y
+CONFIG_FB_SH_MOBILE_HDMI=y
 CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_LOGO=y
 # CONFIG_LOGO_LINUX_MONO is not set
 # CONFIG_LOGO_LINUX_CLUT224 is not set
-# CONFIG_HID_SUPPORT is not set
-# CONFIG_USB_SUPPORT is not set
+# CONFIG_SND_SUPPORT_OLD_API is not set
+# CONFIG_SND_VERBOSE_PROCFS is not set
+# CONFIG_SND_DRIVERS is not set
+# CONFIG_SND_ARM is not set
+CONFIG_SND_SOC_SH4_FSI=y
+CONFIG_USB=y
+CONFIG_USB_RENESAS_USBHS_HCD=y
+CONFIG_USB_RENESAS_USBHS=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_RENESAS_USBHS_UDC=y
+CONFIG_DMADEVICES=y
+CONFIG_SH_DMAE=y
 CONFIG_EXT2_FS=y
 CONFIG_EXT2_FS_XATTR=y
 CONFIG_EXT2_FS_POSIX_ACL=y
@@ -91,7 +105,6 @@ CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_POSIX_ACL=y
 CONFIG_EXT3_FS_SECURITY=y
 # CONFIG_DNOTIFY is not set
-# CONFIG_INOTIFY_USER is not set
 CONFIG_MSDOS_FS=y
 CONFIG_VFAT_FS=y
 CONFIG_TMPFS=y
index f79b55c..5b8215f 100644 (file)
@@ -71,6 +71,8 @@ CONFIG_SERIAL_SH_SCI_CONSOLE=y
 # CONFIG_HW_RANDOM is not set
 CONFIG_I2C=y
 CONFIG_I2C_RCAR=y
+CONFIG_SPI=y
+CONFIG_SPI_SH_HSPI=y
 CONFIG_GPIO_SYSFS=y
 # CONFIG_HWMON is not set
 CONFIG_THERMAL=y
index cd5e6ba..952430d 100644 (file)
@@ -1,7 +1,8 @@
 CONFIG_EXPERIMENTAL=y
 CONFIG_SYSVIPC=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
 CONFIG_LOG_BUF_SHIFT=14
-CONFIG_SYSFS_DEPRECATED_V2=y
 CONFIG_EXPERT=y
 # CONFIG_SLUB_DEBUG is not set
 CONFIG_PROFILING=y
@@ -10,6 +11,8 @@ CONFIG_KPROBES=y
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
+CONFIG_PARTITION_ADVANCED=y
+CONFIG_BSD_DISKLABEL=y
 CONFIG_ARCH_ORION5X=y
 CONFIG_MACH_DB88F5281=y
 CONFIG_MACH_RD88F5182=y
@@ -24,7 +27,7 @@ CONFIG_MACH_TS409=y
 CONFIG_MACH_WRT350N_V2=y
 CONFIG_MACH_TS78XX=y
 CONFIG_MACH_MV2120=y
-CONFIG_MACH_EDMINI_V2=y
+CONFIG_MACH_EDMINI_V2_DT=y
 CONFIG_MACH_D2NET=y
 CONFIG_MACH_BIGDISK=y
 CONFIG_MACH_NET2BIG=y
@@ -33,17 +36,13 @@ CONFIG_MACH_WNR854T=y
 CONFIG_MACH_RD88F5181L_GE=y
 CONFIG_MACH_RD88F5181L_FXO=y
 CONFIG_MACH_RD88F6183AP_GE=y
-CONFIG_NO_HZ=y
-CONFIG_HIGH_RES_TIMERS=y
 CONFIG_PREEMPT=y
 CONFIG_AEABI=y
-CONFIG_LEDS=y
-CONFIG_LEDS_CPU=y
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_ARM_APPENDED_DTB=y
 CONFIG_FPE_NWFPE=y
 CONFIG_VFP=y
-# CONFIG_SUSPEND is not set
 CONFIG_NET=y
 CONFIG_PACKET=y
 CONFIG_UNIX=y
@@ -54,13 +53,10 @@ CONFIG_IP_PNP_DHCP=y
 CONFIG_IP_PNP_BOOTP=y
 # CONFIG_IPV6 is not set
 CONFIG_NET_DSA=y
-CONFIG_NET_DSA_MV88E6131=y
-CONFIG_NET_DSA_MV88E6123_61_65=y
 CONFIG_NET_PKTGEN=m
 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 # CONFIG_FIRMWARE_IN_KERNEL is not set
 CONFIG_MTD=y
-CONFIG_MTD_PARTITIONS=y
 CONFIG_MTD_CMDLINE_PARTS=y
 CONFIG_MTD_CHAR=y
 CONFIG_MTD_BLOCK=y
@@ -82,12 +78,11 @@ CONFIG_CHR_DEV_SG=m
 CONFIG_ATA=y
 CONFIG_SATA_MV=y
 CONFIG_NETDEVICES=y
-CONFIG_MARVELL_PHY=y
-CONFIG_NET_ETHERNET=y
 CONFIG_MII=y
-CONFIG_NET_PCI=y
+CONFIG_NET_DSA_MV88E6131=y
+CONFIG_NET_DSA_MV88E6123_61_65=y
 CONFIG_MV643XX_ETH=y
-# CONFIG_NETDEV_10000 is not set
+CONFIG_MARVELL_PHY=y
 # CONFIG_INPUT_MOUSEDEV is not set
 CONFIG_INPUT_EVDEV=y
 # CONFIG_KEYBOARD_ATKBD is not set
@@ -95,11 +90,12 @@ CONFIG_KEYBOARD_GPIO=y
 # CONFIG_INPUT_MOUSE is not set
 # CONFIG_SERIO is not set
 # CONFIG_VT is not set
+CONFIG_LEGACY_PTY_COUNT=16
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 # CONFIG_SERIAL_8250_PCI is not set
 CONFIG_SERIAL_8250_RUNTIME_UARTS=2
-CONFIG_LEGACY_PTY_COUNT=16
+CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_HW_RANDOM_TIMERIOMEM=m
 CONFIG_I2C=y
 # CONFIG_I2C_COMPAT is not set
@@ -109,10 +105,8 @@ CONFIG_GPIO_SYSFS=y
 CONFIG_SENSORS_LM75=y
 # CONFIG_VGA_ARB is not set
 CONFIG_USB=y
-CONFIG_USB_DEVICEFS=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_EHCI_TT_NEWSCHED=y
 CONFIG_USB_PRINTER=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_STORAGE_DATAFAB=y
@@ -140,7 +134,6 @@ CONFIG_EXT2_FS=y
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_FS_XATTR is not set
 CONFIG_EXT4_FS=m
-CONFIG_INOTIFY=y
 CONFIG_ISO9660_FS=m
 CONFIG_JOLIET=y
 CONFIG_UDF_FS=m
@@ -150,25 +143,18 @@ CONFIG_TMPFS=y
 CONFIG_JFFS2_FS=y
 CONFIG_CRAMFS=y
 CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
 CONFIG_ROOT_NFS=y
-CONFIG_PARTITION_ADVANCED=y
-CONFIG_BSD_DISKLABEL=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_CODEPAGE_850=y
 CONFIG_NLS_ISO8859_1=y
 CONFIG_NLS_ISO8859_2=y
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_FS=y
-CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_BUGVERBOSE is not set
 CONFIG_DEBUG_INFO=y
-# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 CONFIG_LATENCYTOP=y
-CONFIG_SYSCTL_SYSCALL_CHECK=y
 # CONFIG_FTRACE is not set
 CONFIG_DEBUG_USER=y
-CONFIG_DEBUG_ERRORS=y
 CONFIG_DEBUG_LL=y
 CONFIG_CRYPTO_CBC=m
 CONFIG_CRYPTO_ECB=m
index f8eecb9..0153950 100644 (file)
@@ -58,6 +58,14 @@ config ARCH_DAVINCI_TNETV107X
 
 comment "DaVinci Board Type"
 
+config MACH_DA8XX_DT
+       bool "Support DA8XX platforms using device tree"
+       default y
+       depends on ARCH_DAVINCI_DA8XX
+       help
+         Say y here to include support for TI DaVinci DA850 based using
+         Flattened Device Tree. More information at Documentation/devicetree
+
 config MACH_DAVINCI_EVM
        bool "TI DM644x EVM"
        default ARCH_DAVINCI_DM644x
index 2227eff..fb5c1aa 100644 (file)
@@ -22,6 +22,7 @@ obj-$(CONFIG_AINTC)                   += irq.o
 obj-$(CONFIG_CP_INTC)                  += cp_intc.o
 
 # Board specific
+obj-$(CONFIG_MACH_DA8XX_DT)            += da8xx-dt.o
 obj-$(CONFIG_MACH_DAVINCI_EVM)         += board-dm644x-evm.o
 obj-$(CONFIG_MACH_SFFSDR)              += board-sffsdr.o
 obj-$(CONFIG_MACH_NEUROS_OSD2)         += board-neuros-osd2.o
index 04a6c4e..5c5a95a 100644 (file)
@@ -11,3 +11,5 @@ else
 params_phys-y  := 0x80000100
 initrd_phys-y  := 0x80800000
 endif
+
+dtb-$(CONFIG_MACH_DA8XX_DT)    += da850-enbw-cmc.dtb da850-evm.dtb
index 32ee3f8..d4f4dbf 100644 (file)
  * is licensed "as is" without any warranty of any kind, whether express
  * or implied.
  */
-#include <linux/kernel.h>
-#include <linux/init.h>
 #include <linux/console.h>
+#include <linux/delay.h>
+#include <linux/gpio.h>
+#include <linux/gpio_keys.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
 #include <linux/i2c.h>
 #include <linux/i2c/at24.h>
 #include <linux/i2c/pca953x.h>
 #include <linux/input.h>
+#include <linux/input/tps6507x-ts.h>
 #include <linux/mfd/tps6507x.h>
-#include <linux/gpio.h>
-#include <linux/gpio_keys.h>
-#include <linux/platform_device.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/nand.h>
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
+#include <linux/platform_device.h>
+#include <linux/platform_data/mtd-davinci.h>
+#include <linux/platform_data/mtd-davinci-aemif.h>
+#include <linux/platform_data/spi-davinci.h>
+#include <linux/platform_data/uio_pruss.h>
 #include <linux/regulator/machine.h>
 #include <linux/regulator/tps6507x.h>
-#include <linux/input/tps6507x-ts.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/flash.h>
-#include <linux/delay.h>
 #include <linux/wl12xx.h>
 
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-#include <asm/system_info.h>
-
 #include <mach/cp_intc.h>
 #include <mach/da8xx.h>
-#include <linux/platform_data/mtd-davinci.h>
 #include <mach/mux.h>
-#include <linux/platform_data/mtd-davinci-aemif.h>
-#include <linux/platform_data/spi-davinci.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/system_info.h>
 
 #include <media/tvp514x.h>
 #include <media/adv7343.h>
@@ -1516,6 +1517,11 @@ static __init void da850_evm_init(void)
                pr_warning("da850_evm_init: lcdcntl mux setup failed: %d\n",
                                ret);
 
+       ret = da8xx_register_uio_pruss();
+       if (ret)
+               pr_warn("da850_evm_init: pruss initialization failed: %d\n",
+                               ret);
+
        /* Handle board specific muxing for LCD here */
        ret = davinci_cfg_reg_list(da850_evm_lcdc_pins);
        if (ret)
diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
new file mode 100644 (file)
index 0000000..37c27af
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * Modified from mach-omap/omap2/board-generic.c
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/io.h>
+#include <linux/of_irq.h>
+#include <linux/of_platform.h>
+#include <linux/irqdomain.h>
+
+#include <asm/mach/arch.h>
+
+#include <mach/common.h>
+#include <mach/cp_intc.h>
+#include <mach/da8xx.h>
+
+#define DA8XX_NUM_UARTS        3
+
+void __init da8xx_uart_clk_enable(void)
+{
+       int i;
+       for (i = 0; i < DA8XX_NUM_UARTS; i++)
+               davinci_serial_setup_clk(i, NULL);
+}
+
+static struct of_device_id da8xx_irq_match[] __initdata = {
+       { .compatible = "ti,cp-intc", .data = cp_intc_of_init, },
+       { }
+};
+
+static void __init da8xx_init_irq(void)
+{
+       of_irq_init(da8xx_irq_match);
+}
+
+#ifdef CONFIG_ARCH_DAVINCI_DA850
+
+static void __init da850_init_machine(void)
+{
+       of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+
+       da8xx_uart_clk_enable();
+}
+
+static const char *da850_boards_compat[] __initdata = {
+       "enbw,cmc",
+       "ti,da850-evm",
+       "ti,da850",
+       NULL,
+};
+
+DT_MACHINE_START(DA850_DT, "Generic DA850/OMAP-L138/AM18x")
+       .map_io         = da850_init,
+       .init_irq       = da8xx_init_irq,
+       .timer          = &davinci_timer,
+       .init_machine   = da850_init_machine,
+       .dt_compat      = da850_boards_compat,
+       .init_late      = davinci_init_late,
+       .restart        = da8xx_restart,
+MACHINE_END
+
+#endif
index 485ce6c..c606080 100644 (file)
@@ -100,6 +100,7 @@ static struct regulator_consumer_supply __initdata ldo3_consumer[] = {
        REGULATOR_SUPPLY("vddcore", "s5p-mipi-csis.0"), /* MIPI */
        REGULATOR_SUPPLY("vdd", "exynos4-hdmi"), /* HDMI */
        REGULATOR_SUPPLY("vdd_pll", "exynos4-hdmi"), /* HDMI */
+       REGULATOR_SUPPLY("vusb_a", "s3c-hsotg"), /* OTG */
 };
 static struct regulator_consumer_supply __initdata ldo6_consumer[] = {
        REGULATOR_SUPPLY("vddio", "s5p-mipi-csis.0"), /* MIPI */
@@ -110,6 +111,7 @@ static struct regulator_consumer_supply __initdata ldo7_consumer[] = {
 static struct regulator_consumer_supply __initdata ldo8_consumer[] = {
        REGULATOR_SUPPLY("vdd", "s5p-adc"), /* ADC */
        REGULATOR_SUPPLY("vdd_osc", "exynos4-hdmi"), /* HDMI */
+       REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"), /* OTG */
 };
 static struct regulator_consumer_supply __initdata ldo9_consumer[] = {
        REGULATOR_SUPPLY("dvdd", "swb-a31"), /* AR6003 WLAN & CSR 8810 BT */
index b744226..318bd8d 100644 (file)
 #define OTG_PHY_CS_GPIO (GPIO_PORTF + 17)
 #define SDHC1_IRQ_GPIO IMX_GPIO_NR(2, 25)
 
+#define VERSION_MASK           0x7
+#define MOTHERBOARD_SHIFT      4
+#define EXPBOARD_SHIFT         0
+
 #define MOTHERBOARD_BIT2       (GPIO_PORTD + 31)
 #define MOTHERBOARD_BIT1       (GPIO_PORTD + 30)
 #define MOTHERBOARD_BIT0       (GPIO_PORTD + 29)
@@ -237,7 +241,7 @@ static struct mx2_camera_platform_data visstrim_camera = {
 static phys_addr_t mx2_camera_base __initdata;
 #define MX2_CAMERA_BUF_SIZE SZ_8M
 
-static void __init visstrim_camera_init(void)
+static void __init visstrim_analog_camera_init(void)
 {
        struct platform_device *pdev;
        int dma;
@@ -474,6 +478,27 @@ static void __init visstrim_deinterlace_init(void)
                return;
 }
 
+/* Emma-PrP for format conversion */
+static void __init visstrim_emmaprp_init(void)
+{
+       struct platform_device *pdev;
+       int dma;
+
+       pdev = imx27_add_mx2_emmaprp();
+       if (IS_ERR(pdev))
+               return;
+
+       /*
+        * Use the same memory area as the analog camera since both
+        * devices are, by nature, exclusive.
+        */
+       dma = dma_declare_coherent_memory(&pdev->dev,
+                               mx2_camera_base, mx2_camera_base,
+                               MX2_CAMERA_BUF_SIZE,
+                               DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE);
+       if (!(dma & DMA_MEMORY_MAP))
+               pr_err("Failed to declare memory for emmaprp\n");
+}
 
 /* Audio */
 static const struct snd_mx27vis_platform_data snd_mx27vis_pdata __initconst = {
@@ -507,13 +532,14 @@ static void __init visstrim_m10_revision(void)
        mo_version |= !gpio_get_value(MOTHERBOARD_BIT0);
 
        system_rev = 0x27000;
-       system_rev |= (mo_version << 4);
-       system_rev |= exp_version;
+       system_rev |= (mo_version << MOTHERBOARD_SHIFT);
+       system_rev |= (exp_version << EXPBOARD_SHIFT);
 }
 
 static void __init visstrim_m10_board_init(void)
 {
        int ret;
+       int mo_version;
 
        imx27_soc_init();
        visstrim_m10_revision();
@@ -546,8 +572,24 @@ static void __init visstrim_m10_board_init(void)
        platform_device_register_resndata(NULL, "soc-camera-pdrv", 0, NULL, 0,
                                      &iclink_tvp5150, sizeof(iclink_tvp5150));
        gpio_led_register_device(0, &visstrim_m10_led_data);
-       visstrim_deinterlace_init();
-       visstrim_camera_init();
+
+       /* Use mother board version to decide what video devices we shall use */
+       mo_version = (system_rev >> MOTHERBOARD_SHIFT) & VERSION_MASK;
+       if (mo_version & 0x1) {
+               visstrim_emmaprp_init();
+
+               /*
+                * Despite not being used, tvp5150 must be
+                * powered on to avoid I2C problems. To minimize
+                * power consupmtion keep reset enabled.
+                */
+               gpio_set_value(TVP5150_PWDN, 1);
+               ndelay(1);
+               gpio_set_value(TVP5150_RSTN, 0);
+       } else {
+               visstrim_deinterlace_init();
+               visstrim_analog_camera_init();
+       }
        visstrim_coda_init();
 }
 
index 50bca50..d018ad4 100644 (file)
@@ -130,6 +130,63 @@ config MACH_KM_KIRKWOOD_DT
          Say 'Y' here if you want your kernel to support the
          Keymile Kirkwood Reference Desgin, using Flattened Device Tree.
 
+config MACH_INETSPACE_V2_DT
+       bool "LaCie Internet Space v2 NAS (Flattened Device Tree)"
+       select ARCH_KIRKWOOD_DT
+       help
+         Say 'Y' here if you want your kernel to support the LaCie
+         Internet Space v2 NAS, using Flattened Device Tree.
+
+config MACH_MPLCEC4_DT
+       bool "MPL CEC4 (Flattened Device Tree)"
+       select ARCH_KIRKWOOD_DT
+       help
+         Say 'Y' here if you want your kernel to support the
+         MPL CEC4 (Flattened Device Tree).
+
+config MACH_NETSPACE_V2_DT
+       bool "LaCie Network Space v2 NAS (Flattened Device Tree)"
+       select ARCH_KIRKWOOD_DT
+       help
+         Say 'Y' here if you want your kernel to support the LaCie
+         Network Space v2 NAS, using Flattened Device Tree.
+
+config MACH_NETSPACE_MAX_V2_DT
+       bool "LaCie Network Space Max v2 NAS (Flattened Device Tree)"
+       select ARCH_KIRKWOOD_DT
+       help
+         Say 'Y' here if you want your kernel to support the LaCie
+         Network Space Max v2 NAS, using Flattened Device Tree.
+
+config MACH_NETSPACE_LITE_V2_DT
+       bool "LaCie Network Space Lite v2 NAS (Flattened Device Tree)"
+       select ARCH_KIRKWOOD_DT
+       help
+         Say 'Y' here if you want your kernel to support the LaCie
+         Network Space Lite v2 NAS, using Flattened Device Tree.
+
+config MACH_NETSPACE_MINI_V2_DT
+       bool "LaCie Network Space Mini v2 NAS (Flattened Device Tree)"
+       select ARCH_KIRKWOOD_DT
+       help
+         Say 'Y' here if you want your kernel to support the LaCie
+         Network Space Mini v2 NAS (aka SafeBox), using Flattened
+         Device Tree.
+
+config MACH_OPENBLOCKS_A6_DT
+       bool "Plat'Home OpenBlocks A6 (Flattened Device Tree)"
+       select ARCH_KIRKWOOD_DT
+       help
+         Say 'Y' here if you want your kernel to support the
+         Plat'Home OpenBlocks A6 (Flattened Device Tree).
+
+config MACH_TOPKICK_DT
+       bool "USI Topkick (Flattened Device Tree)"
+       select ARCH_KIRKWOOD_DT
+       help
+         Say 'Y' here if you want your kernel to support the
+         USI Topkick, using Flattened Device Tree
+
 config MACH_TS219
        bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS"
        help
@@ -216,6 +273,14 @@ config MACH_T5325
          Say 'Y' here if you want your kernel to support the
          HP t5325 Thin Client.
 
+config MACH_NSA310_DT
+       bool "ZyXEL NSA-310 (Flattened Device Tree)"
+       select ARCH_KIRKWOOD_DT
+       select ARM_ATAG_DTB_COMPAT
+       help
+         Say 'Y' here if you want your kernel to support the
+         ZyXEL NSA-310 board (Flattened Device Tree).
+
 endmenu
 
 endif
index 294779f..8d2e5a9 100644 (file)
@@ -31,3 +31,12 @@ obj-$(CONFIG_MACH_GOFLEXNET_DT)              += board-goflexnet.o
 obj-$(CONFIG_MACH_LSXL_DT)             += board-lsxl.o
 obj-$(CONFIG_MACH_IOMEGA_IX2_200_DT)   += board-iomega_ix2_200.o
 obj-$(CONFIG_MACH_KM_KIRKWOOD_DT)      += board-km_kirkwood.o
+obj-$(CONFIG_MACH_INETSPACE_V2_DT)     += board-ns2.o
+obj-$(CONFIG_MACH_MPLCEC4_DT)          += board-mplcec4.o
+obj-$(CONFIG_MACH_NETSPACE_V2_DT)      += board-ns2.o
+obj-$(CONFIG_MACH_NETSPACE_MAX_V2_DT)  += board-ns2.o
+obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT) += board-ns2.o
+obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT) += board-ns2.o
+obj-$(CONFIG_MACH_NSA310_DT)           += board-nsa310.o
+obj-$(CONFIG_MACH_OPENBLOCKS_A6_DT)    += board-openblocks_a6.o
+obj-$(CONFIG_MACH_TOPKICK_DT)          += board-usi_topkick.o
index e75fbdb..375f7d8 100644 (file)
@@ -30,6 +30,8 @@ static struct of_dev_auxdata kirkwood_auxdata_lookup[] __initdata = {
        OF_DEV_AUXDATA("marvell,orion-spi", 0xf1010600, "orion_spi.0", NULL),
        OF_DEV_AUXDATA("marvell,mv64xxx-i2c", 0xf1011000, "mv64xxx_i2c.0",
                       NULL),
+       OF_DEV_AUXDATA("marvell,mv64xxx-i2c", 0xf1011100, "mv64xxx_i2c.1",
+                      NULL),
        OF_DEV_AUXDATA("marvell,orion-wdt", 0xf1020300, "orion_wdt", NULL),
        OF_DEV_AUXDATA("marvell,orion-sata", 0xf1080000, "sata_mv.0", NULL),
        OF_DEV_AUXDATA("marvell,orion-nand", 0xf4000000, "orion_nand", NULL),
@@ -94,6 +96,25 @@ static void __init kirkwood_dt_init(void)
        if (of_machine_is_compatible("keymile,km_kirkwood"))
                km_kirkwood_init();
 
+       if (of_machine_is_compatible("lacie,inetspace_v2") ||
+           of_machine_is_compatible("lacie,netspace_v2") ||
+           of_machine_is_compatible("lacie,netspace_max_v2") ||
+           of_machine_is_compatible("lacie,netspace_lite_v2") ||
+           of_machine_is_compatible("lacie,netspace_mini_v2"))
+               ns2_init();
+
+       if (of_machine_is_compatible("mpl,cec4"))
+               mplcec4_init();
+
+       if (of_machine_is_compatible("plathome,openblocks-a6"))
+               openblocks_a6_init();
+
+       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,
                             kirkwood_auxdata_lookup, NULL);
 }
@@ -110,6 +131,15 @@ static const char * const kirkwood_dt_board_compat[] = {
        "buffalo,lsxl",
        "iom,ix2-200",
        "keymile,km_kirkwood",
+       "lacie,inetspace_v2",
+       "lacie,netspace_max_v2",
+       "lacie,netspace_v2",
+       "lacie,netspace_lite_v2",
+       "lacie,netspace_mini_v2",
+       "mpl,cec4",
+       "plathome,openblocks-a6",
+       "usi,topkick",
+       "zyxel,nsa310",
        NULL
 };
 
index 64e5cc6..7e18cad 100644 (file)
@@ -16,7 +16,6 @@
 #include <linux/platform_device.h>
 #include <linux/mv643xx_eth.h>
 #include <linux/gpio.h>
-#include <linux/gpio-fan.h>
 #include "common.h"
 #include "mpp.h"
 
@@ -45,51 +44,6 @@ static unsigned int lsxl_mpp_config[] __initdata = {
        0
 };
 
-#define LSXL_GPIO_FAN_HIGH     18
-#define LSXL_GPIO_FAN_LOW      19
-#define LSXL_GPIO_FAN_LOCK     40
-
-static struct gpio_fan_alarm lsxl_alarm = {
-       .gpio = LSXL_GPIO_FAN_LOCK,
-};
-
-static struct gpio_fan_speed lsxl_speeds[] = {
-       {
-               .rpm = 0,
-               .ctrl_val = 3,
-       }, {
-               .rpm = 1500,
-               .ctrl_val = 1,
-       }, {
-               .rpm = 3250,
-               .ctrl_val = 2,
-       }, {
-               .rpm = 5000,
-               .ctrl_val = 0,
-       }
-};
-
-static int lsxl_gpio_list[] = {
-       LSXL_GPIO_FAN_HIGH, LSXL_GPIO_FAN_LOW,
-};
-
-static struct gpio_fan_platform_data lsxl_fan_data = {
-       .num_ctrl = ARRAY_SIZE(lsxl_gpio_list),
-       .ctrl = lsxl_gpio_list,
-       .alarm = &lsxl_alarm,
-       .num_speed = ARRAY_SIZE(lsxl_speeds),
-       .speed = lsxl_speeds,
-};
-
-static struct platform_device lsxl_fan_device = {
-       .name = "gpio-fan",
-       .id = -1,
-       .num_resources = 0,
-       .dev = {
-               .platform_data = &lsxl_fan_data,
-       },
-};
-
 /*
  * On the LS-XHL/LS-CHLv2, the shutdown process is following:
  * - Userland monitors key events until the power switch goes to off position
@@ -120,7 +74,6 @@ void __init lsxl_init(void)
        kirkwood_ehci_init();
        kirkwood_ge00_init(&lsxl_ge00_data);
        kirkwood_ge01_init(&lsxl_ge01_data);
-       platform_device_register(&lsxl_fan_device);
 
        /* register power-off method */
        pm_power_off = lsxl_power_off;
diff --git a/arch/arm/mach-kirkwood/board-mplcec4.c b/arch/arm/mach-kirkwood/board-mplcec4.c
new file mode 100644 (file)
index 0000000..e78a227
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2012 MPL AG, Switzerland
+ * Stefan Peter <s.peter@mpl.ch>
+ *
+ * arch/arm/mach-kirkwood/board-mplcec4.c
+ *
+ * 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 <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/mv643xx_eth.h>
+#include <linux/platform_data/mmc-mvsdio.h>
+#include "common.h"
+#include "mpp.h"
+
+static struct mv643xx_eth_platform_data mplcec4_ge00_data = {
+       .phy_addr       = MV643XX_ETH_PHY_ADDR(1),
+};
+
+static struct mv643xx_eth_platform_data mplcec4_ge01_data = {
+       .phy_addr       = MV643XX_ETH_PHY_ADDR(2),
+};
+
+static unsigned int mplcec4_mpp_config[] __initdata = {
+       MPP0_NF_IO2,
+       MPP1_NF_IO3,
+       MPP2_NF_IO4,
+       MPP3_NF_IO5,
+       MPP4_NF_IO6,
+       MPP5_NF_IO7,
+       MPP6_SYSRST_OUTn,
+       MPP7_GPO,       /* Status LED Green High Active */
+       MPP10_UART0_TXD,
+       MPP11_UART0_RXD,
+       MPP12_SD_CLK,
+       MPP13_SD_CMD,   /* Alt UART1_TXD */
+       MPP14_SD_D0,    /* Alt UART1_RXD */
+       MPP15_SD_D1,
+       MPP16_SD_D2,
+       MPP17_SD_D3,
+       MPP18_NF_IO0,
+       MPP19_NF_IO1,
+       MPP28_GPIO,     /* Input SYS_POR_DET (active High) */
+       MPP29_GPIO,     /* Input SYS_RTC_INT (active High) */
+       MPP34_SATA1_ACTn,
+       MPP35_SATA0_ACTn,
+       MPP40_GPIO,     /* LED User1 orange */
+       MPP41_GPIO,     /* LED User1 green */
+       MPP44_GPIO,     /* LED User0 orange */
+       MPP45_GPIO,     /* LED User0 green */
+       MPP46_GPIO,     /* Status LED Yellow High Active */
+       MPP47_GPIO,     /* SD_CD# (in/IRQ)*/
+       0
+};
+
+
+static struct mvsdio_platform_data mplcec4_mvsdio_data = {
+       .gpio_card_detect = 47, /* MPP47 used as SD card detect */
+};
+
+
+
+void __init mplcec4_init(void)
+{
+       /*
+        * Basic setup. Needs to be called early.
+        */
+       kirkwood_mpp_conf(mplcec4_mpp_config);
+       kirkwood_ehci_init();
+       kirkwood_ge00_init(&mplcec4_ge00_data);
+       kirkwood_ge01_init(&mplcec4_ge01_data);
+       kirkwood_sdio_init(&mplcec4_mvsdio_data);
+       kirkwood_pcie_init(KW_PCIE0);
+}
+
+
+
diff --git a/arch/arm/mach-kirkwood/board-ns2.c b/arch/arm/mach-kirkwood/board-ns2.c
new file mode 100644 (file)
index 0000000..78596c4
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2012 (C), Simon Guinot <simon.guinot@sequanux.org>
+ *
+ * arch/arm/mach-kirkwood/board-ns2.c
+ *
+ * LaCie Network Space v2 board (and parents) initialization 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 <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/mv643xx_eth.h>
+#include <linux/gpio.h>
+#include <linux/of.h>
+#include "common.h"
+#include "mpp.h"
+
+static struct mv643xx_eth_platform_data ns2_ge00_data = {
+       .phy_addr       = MV643XX_ETH_PHY_ADDR(8),
+};
+
+static unsigned int ns2_mpp_config[] __initdata = {
+       MPP0_SPI_SCn,
+       MPP1_SPI_MOSI,
+       MPP2_SPI_SCK,
+       MPP3_SPI_MISO,
+       MPP4_NF_IO6,
+       MPP5_NF_IO7,
+       MPP6_SYSRST_OUTn,
+       MPP7_GPO,               /* Fan speed (bit 1) */
+       MPP8_TW0_SDA,
+       MPP9_TW0_SCK,
+       MPP10_UART0_TXD,
+       MPP11_UART0_RXD,
+       MPP12_GPO,              /* Red led */
+       MPP14_GPIO,             /* USB fuse */
+       MPP16_GPIO,             /* SATA 0 power */
+       MPP17_GPIO,             /* SATA 1 power */
+       MPP18_NF_IO0,
+       MPP19_NF_IO1,
+       MPP20_SATA1_ACTn,
+       MPP21_SATA0_ACTn,
+       MPP22_GPIO,             /* Fan speed (bit 0) */
+       MPP23_GPIO,             /* Fan power */
+       MPP24_GPIO,             /* USB mode select */
+       MPP25_GPIO,             /* Fan rotation fail */
+       MPP26_GPIO,             /* USB device vbus */
+       MPP28_GPIO,             /* USB enable host vbus */
+       MPP29_GPIO,             /* Blue led (slow register) */
+       MPP30_GPIO,             /* Blue led (command register) */
+       MPP31_GPIO,             /* Board power off */
+       MPP32_GPIO,             /* Power button (0 = Released, 1 = Pushed) */
+       MPP33_GPO,              /* Fan speed (bit 2) */
+       0
+};
+
+#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)
+{
+       /*
+        * Basic setup. Needs to be called early.
+        */
+       kirkwood_mpp_conf(ns2_mpp_config);
+
+       kirkwood_ehci_init();
+       if (of_machine_is_compatible("lacie,netspace_lite_v2") ||
+           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");
+}
diff --git a/arch/arm/mach-kirkwood/board-nsa310.c b/arch/arm/mach-kirkwood/board-nsa310.c
new file mode 100644 (file)
index 0000000..027ce83
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ * arch/arm/mach-kirkwood/nsa-310-setup.c
+ *
+ * ZyXEL NSA-310 Setup
+ *
+ * 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 <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/i2c.h>
+#include <linux/gpio.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <mach/kirkwood.h>
+#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 = {
+       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
+};
+
+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;
+
+       nsa310_gpio_request(NSA310_GPIO_USB_POWER_OFF, GPIOF_OUT_INIT_LOW,
+                           "USB Power Off");
+}
+
+void __init nsa310_init(void)
+{
+       u32 dev, rev;
+
+       kirkwood_mpp_conf(nsa310_mpp_config);
+
+       nsa310_gpio_init();
+
+       /* this can be removed once the mainline kirkwood.dtsi gets
+        * the ehci configuration by default */
+       kirkwood_ehci_init();
+
+       kirkwood_pcie_id(&dev, &rev);
+
+       i2c_register_board_info(0, ARRAY_AND_SIZE(nsa310_i2c_info));
+}
+
+static int __init nsa310_pci_init(void)
+{
+       if (of_machine_is_compatible("zyxel,nsa310"))
+               kirkwood_pcie_init(KW_PCIE0);
+
+       return 0;
+}
+
+subsys_initcall(nsa310_pci_init);
diff --git a/arch/arm/mach-kirkwood/board-openblocks_a6.c b/arch/arm/mach-kirkwood/board-openblocks_a6.c
new file mode 100644 (file)
index 0000000..e807e8c
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2012 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
+ *
+ * arch/arm/mach-kirkwood/board-openblocks_a6.c
+ *
+ * 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 <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/mv643xx_eth.h>
+#include <linux/clk.h>
+#include <linux/clk-private.h>
+#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: Yellow */
+       MPP43_GPIO, /* LED: Green */
+       0,
+};
+
+void __init openblocks_a6_init(void)
+{
+       /*
+        * Basic setup. Needs to be called early.
+        */
+       kirkwood_mpp_conf(openblocks_a6_mpp_config);
+       kirkwood_ehci_init();
+       kirkwood_ge00_init(&openblocks_ge00_data);
+}
diff --git a/arch/arm/mach-kirkwood/board-usi_topkick.c b/arch/arm/mach-kirkwood/board-usi_topkick.c
new file mode 100644 (file)
index 0000000..e2ec9d8
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net>
+ *
+ * arch/arm/mach-kirkwood/board-usi_topkick.c
+ *
+ * USI Topkick 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 <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/mv643xx_eth.h>
+#include <linux/gpio.h>
+#include <linux/platform_data/mmc-mvsdio.h>
+#include "common.h"
+#include "mpp.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 */
+};
+
+/*
+ * 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
+};
+
+#define TOPKICK_SATA0_PWR_ENABLE 36
+
+void __init usi_topkick_init(void)
+{
+       /*
+        * Basic setup. Needs to be called early.
+        */
+       kirkwood_mpp_conf(topkick_mpp_config);
+
+       /* SATA0 power enable */
+       gpio_set_value(TOPKICK_SATA0_PWR_ENABLE, 1);
+
+       kirkwood_ehci_init();
+       kirkwood_ge00_init(&topkick_ge00_data);
+       kirkwood_sdio_init(&topkick_mvsdio_data);
+}
index f0fc25b..5303be6 100644 (file)
@@ -266,6 +266,7 @@ void __init kirkwood_clk_init(void)
        orion_clkdev_add("1", "pcie", pex1);
        orion_clkdev_add(NULL, "kirkwood-i2s", audio);
        orion_clkdev_add(NULL, MV64XXX_I2C_CTLR_NAME ".0", runit);
+       orion_clkdev_add(NULL, MV64XXX_I2C_CTLR_NAME ".1", runit);
 
        /* Marvell says runit is used by SPI, UART, NAND, TWSI, ...,
         * so should never be gated.
index 6088e92..5ffa57f 100644 (file)
@@ -113,6 +113,40 @@ void km_kirkwood_init(void);
 static inline void km_kirkwood_init(void) {};
 #endif
 
+#ifdef CONFIG_MACH_MPLCEC4_DT
+void mplcec4_init(void);
+#else
+static inline void mplcec4_init(void) {};
+#endif
+
+#if defined(CONFIG_MACH_INETSPACE_V2_DT) || \
+       defined(CONFIG_MACH_NETSPACE_V2_DT) || \
+       defined(CONFIG_MACH_NETSPACE_MAX_V2_DT) || \
+       defined(CONFIG_MACH_NETSPACE_LITE_V2_DT) || \
+       defined(CONFIG_MACH_NETSPACE_MINI_V2_DT)
+void ns2_init(void);
+#else
+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
+static inline void openblocks_a6_init(void) {};
+#endif
+
+#ifdef CONFIG_MACH_TOPKICK_DT
+void usi_topkick_init(void);
+#else
+static inline void usi_topkick_init(void) {};
+#endif
+
 /* early init functions not converted to fdt yet */
 char *kirkwood_id(void);
 void kirkwood_l2_init(void);
index 178d4da..ebdda83 100644 (file)
@@ -89,6 +89,8 @@ config MACH_MMP_DT
        select CPU_PXA168
        select CPU_PXA910
        select USE_OF
+       select PINCTRL
+       select PINCTRL_SINGLE
        help
          Include support for Marvell MMP2 based platforms using
          the device tree. Needn't select any other machine while
@@ -99,6 +101,8 @@ config MACH_MMP2_DT
        depends on !CPU_MOHAWK
        select CPU_MMP2
        select USE_OF
+       select PINCTRL
+       select PINCTRL_SINGLE
        help
          Include support for Marvell MMP2 based platforms using
          the device tree.
index e067f22..560a7dc 100644 (file)
@@ -307,8 +307,7 @@ static void __init omap_fsample_init(void)
 
        fsample_init_smc91x();
 
-       if (gpio_request(FSAMPLE_NAND_RB_GPIO_PIN, "NAND ready") < 0)
-               BUG();
+       BUG_ON(gpio_request(FSAMPLE_NAND_RB_GPIO_PIN, "NAND ready") < 0);
        gpio_direction_input(FSAMPLE_NAND_RB_GPIO_PIN);
 
        omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
index 9134b64..4953cf7 100644 (file)
@@ -412,8 +412,7 @@ static void __init h2_init(void)
 
        h2_nand_resource.end = h2_nand_resource.start = OMAP_CS2B_PHYS;
        h2_nand_resource.end += SZ_4K - 1;
-       if (gpio_request(H2_NAND_RB_GPIO_PIN, "NAND ready") < 0)
-               BUG();
+       BUG_ON(gpio_request(H2_NAND_RB_GPIO_PIN, "NAND ready") < 0);
        gpio_direction_input(H2_NAND_RB_GPIO_PIN);
 
        omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
index bf213d1..563ba16 100644 (file)
@@ -406,8 +406,7 @@ static void __init h3_init(void)
 
        nand_resource.end = nand_resource.start = OMAP_CS2B_PHYS;
        nand_resource.end += SZ_4K - 1;
-       if (gpio_request(H3_NAND_RB_GPIO_PIN, "NAND ready") < 0)
-               BUG();
+       BUG_ON(gpio_request(H3_NAND_RB_GPIO_PIN, "NAND ready") < 0);
        gpio_direction_input(H3_NAND_RB_GPIO_PIN);
 
        /* GPIO10 Func_MUX_CTRL reg bit 29:27, Configure V2 to mode1 as GPIO */
index 9a7e483..27f8d12 100644 (file)
@@ -275,8 +275,7 @@ static void __init omap_perseus2_init(void)
 
        perseus2_init_smc91x();
 
-       if (gpio_request(P2_NAND_RB_GPIO_PIN, "NAND ready") < 0)
-               BUG();
+       BUG_ON(gpio_request(P2_NAND_RB_GPIO_PIN, "NAND ready") < 0);
        gpio_direction_input(P2_NAND_RB_GPIO_PIN);
 
        omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
index d669e22..2265e58 100644 (file)
@@ -270,14 +270,14 @@ config MACH_NOKIA_N8X0
        select OMAP_PACKAGE_ZAC
 
 config MACH_NOKIA_RM680
-       bool "Nokia RM-680/696 board"
+       bool "Nokia N950 (RM-680) / N9 (RM-696) phones"
        depends on ARCH_OMAP3
        default y
        select MACH_NOKIA_RM696
        select OMAP_PACKAGE_CBB
 
 config MACH_NOKIA_RX51
-       bool "Nokia RX-51 board"
+       bool "Nokia N900 (RX-51) phone"
        depends on ARCH_OMAP3
        default y
        select OMAP_PACKAGE_CBB
index 11c57af..b455ffc 100644 (file)
@@ -295,4 +295,4 @@ endif
 emac-$(CONFIG_TI_DAVINCI_EMAC)         := am35xx-emac.o
 obj-y                                  += $(emac-m) $(emac-y)
 
-obj-y                                  += common-board-devices.o twl-common.o
+obj-y                                  += common-board-devices.o twl-common.o dss-common.o
index 85dfa71..1cc6696 100644 (file)
@@ -36,9 +36,6 @@
 
 #include "common.h"
 #include "omap4-keypad.h"
-#include <video/omapdss.h>
-#include <video/omap-panel-nokia-dsi.h>
-#include <video/omap-panel-picodlp.h>
 #include <linux/wl12xx.h>
 #include <linux/platform_data/omap-abe-twl6040.h>
 
 #include "hsmmc.h"
 #include "control.h"
 #include "common-board-devices.h"
+#include "dss-common.h"
 
 #define ETH_KS8851_IRQ                 34
 #define ETH_KS8851_POWER_ON            48
 #define ETH_KS8851_QUART               138
 #define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO       184
 #define OMAP4_SFH7741_ENABLE_GPIO              188
-#define HDMI_GPIO_CT_CP_HPD 60 /* HPD mode enable/disable */
-#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
-#define HDMI_GPIO_HPD  63 /* Hotplug detect */
-#define DISPLAY_SEL_GPIO       59      /* LCD2/PicoDLP switch */
-#define DLP_POWER_ON_GPIO      40
 
 #define GPIO_WIFI_PMENA                54
 #define GPIO_WIFI_IRQ          53
@@ -607,154 +600,6 @@ static void __init omap_sfh7741prox_init(void)
                        __func__, OMAP4_SFH7741_ENABLE_GPIO, error);
 }
 
-static struct nokia_dsi_panel_data dsi1_panel = {
-               .name           = "taal",
-               .reset_gpio     = 102,
-               .use_ext_te     = false,
-               .ext_te_gpio    = 101,
-               .esd_interval   = 0,
-               .pin_config = {
-                       .num_pins       = 6,
-                       .pins           = { 0, 1, 2, 3, 4, 5 },
-               },
-};
-
-static struct omap_dss_device sdp4430_lcd_device = {
-       .name                   = "lcd",
-       .driver_name            = "taal",
-       .type                   = OMAP_DISPLAY_TYPE_DSI,
-       .data                   = &dsi1_panel,
-       .phy.dsi                = {
-               .module         = 0,
-       },
-       .channel                = OMAP_DSS_CHANNEL_LCD,
-};
-
-static struct nokia_dsi_panel_data dsi2_panel = {
-               .name           = "taal",
-               .reset_gpio     = 104,
-               .use_ext_te     = false,
-               .ext_te_gpio    = 103,
-               .esd_interval   = 0,
-               .pin_config = {
-                       .num_pins       = 6,
-                       .pins           = { 0, 1, 2, 3, 4, 5 },
-               },
-};
-
-static struct omap_dss_device sdp4430_lcd2_device = {
-       .name                   = "lcd2",
-       .driver_name            = "taal",
-       .type                   = OMAP_DISPLAY_TYPE_DSI,
-       .data                   = &dsi2_panel,
-       .phy.dsi                = {
-
-               .module         = 1,
-       },
-       .channel                = OMAP_DSS_CHANNEL_LCD2,
-};
-
-static struct omap_dss_hdmi_data sdp4430_hdmi_data = {
-       .ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD,
-       .ls_oe_gpio = HDMI_GPIO_LS_OE,
-       .hpd_gpio = HDMI_GPIO_HPD,
-};
-
-static struct omap_dss_device sdp4430_hdmi_device = {
-       .name = "hdmi",
-       .driver_name = "hdmi_panel",
-       .type = OMAP_DISPLAY_TYPE_HDMI,
-       .channel = OMAP_DSS_CHANNEL_DIGIT,
-       .data = &sdp4430_hdmi_data,
-};
-
-static struct picodlp_panel_data sdp4430_picodlp_pdata = {
-       .picodlp_adapter_id     = 2,
-       .emu_done_gpio          = 44,
-       .pwrgood_gpio           = 45,
-};
-
-static void sdp4430_picodlp_init(void)
-{
-       int r;
-       const struct gpio picodlp_gpios[] = {
-               {DLP_POWER_ON_GPIO, GPIOF_OUT_INIT_LOW,
-                       "DLP POWER ON"},
-               {sdp4430_picodlp_pdata.emu_done_gpio, GPIOF_IN,
-                       "DLP EMU DONE"},
-               {sdp4430_picodlp_pdata.pwrgood_gpio, GPIOF_OUT_INIT_LOW,
-                       "DLP PWRGOOD"},
-       };
-
-       r = gpio_request_array(picodlp_gpios, ARRAY_SIZE(picodlp_gpios));
-       if (r)
-               pr_err("Cannot request PicoDLP GPIOs, error %d\n", r);
-}
-
-static int sdp4430_panel_enable_picodlp(struct omap_dss_device *dssdev)
-{
-       gpio_set_value(DISPLAY_SEL_GPIO, 0);
-       gpio_set_value(DLP_POWER_ON_GPIO, 1);
-
-       return 0;
-}
-
-static void sdp4430_panel_disable_picodlp(struct omap_dss_device *dssdev)
-{
-       gpio_set_value(DLP_POWER_ON_GPIO, 0);
-       gpio_set_value(DISPLAY_SEL_GPIO, 1);
-}
-
-static struct omap_dss_device sdp4430_picodlp_device = {
-       .name                   = "picodlp",
-       .driver_name            = "picodlp_panel",
-       .type                   = OMAP_DISPLAY_TYPE_DPI,
-       .phy.dpi.data_lines     = 24,
-       .channel                = OMAP_DSS_CHANNEL_LCD2,
-       .platform_enable        = sdp4430_panel_enable_picodlp,
-       .platform_disable       = sdp4430_panel_disable_picodlp,
-       .data                   = &sdp4430_picodlp_pdata,
-};
-
-static struct omap_dss_device *sdp4430_dss_devices[] = {
-       &sdp4430_lcd_device,
-       &sdp4430_lcd2_device,
-       &sdp4430_hdmi_device,
-       &sdp4430_picodlp_device,
-};
-
-static struct omap_dss_board_info sdp4430_dss_data = {
-       .num_devices    = ARRAY_SIZE(sdp4430_dss_devices),
-       .devices        = sdp4430_dss_devices,
-       .default_device = &sdp4430_lcd_device,
-};
-
-static void __init omap_4430sdp_display_init(void)
-{
-       int r;
-
-       /* Enable LCD2 by default (instead of Pico DLP) */
-       r = gpio_request_one(DISPLAY_SEL_GPIO, GPIOF_OUT_INIT_HIGH,
-                       "display_sel");
-       if (r)
-               pr_err("%s: Could not get display_sel GPIO\n", __func__);
-
-       sdp4430_picodlp_init();
-       omap_display_init(&sdp4430_dss_data);
-       /*
-        * OMAP4460SDP/Blaze and OMAP4430 ES2.3 SDP/Blaze boards and
-        * later have external pull up on the HDMI I2C lines
-        */
-       if (cpu_is_omap446x() || omap_rev() > OMAP4430_REV_ES2_2)
-               omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP);
-       else
-               omap_hdmi_init(0);
-
-       omap_mux_init_gpio(HDMI_GPIO_LS_OE, OMAP_PIN_OUTPUT);
-       omap_mux_init_gpio(HDMI_GPIO_CT_CP_HPD, OMAP_PIN_OUTPUT);
-       omap_mux_init_gpio(HDMI_GPIO_HPD, OMAP_PIN_INPUT_PULLDOWN);
-}
-
 #ifdef CONFIG_OMAP_MUX
 static struct omap_board_mux board_mux[] __initdata = {
        OMAP4_MUX(USBB2_ULPITLL_CLK, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
index f0715a3..53cb380 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "common.h"
 #include "common-board-devices.h"
+#include "dss-common.h"
 
 #if !(defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3))
 #define intc_of_init   NULL
@@ -40,6 +41,15 @@ static void __init omap_generic_init(void)
        omap_sdrc_init(NULL, NULL);
 
        of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
+
+       /*
+        * HACK: call display setup code for selected boards to enable omapdss.
+        * This will be removed when omapdss supports DT.
+        */
+       if (of_machine_is_compatible("ti,omap4-panda"))
+               omap4_panda_display_init_of();
+       else if (of_machine_is_compatible("ti,omap4-sdp"))
+               omap_4430sdp_display_init_of();
 }
 
 #ifdef CONFIG_SOC_OMAP2420
index 12a3a24..5c8e9ce 100644 (file)
@@ -37,9 +37,6 @@
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
-#include <video/omapdss.h>
-
-#include <video/omap-panel-tfp410.h>
 
 #include "common.h"
 #include "soc.h"
 #include "control.h"
 #include "mux.h"
 #include "common-board-devices.h"
+#include "dss-common.h"
 
 #define GPIO_HUB_POWER         1
 #define GPIO_HUB_NRESET                62
 #define GPIO_WIFI_PMENA                43
 #define GPIO_WIFI_IRQ          53
-#define HDMI_GPIO_CT_CP_HPD 60 /* HPD mode enable/disable */
-#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
-#define HDMI_GPIO_HPD  63 /* Hotplug detect */
 
 /* wl127x BT, FM, GPS connectivity chip */
 static struct ti_st_plat_data wilink_platform_data = {
@@ -409,68 +404,6 @@ static struct omap_board_mux board_mux[] __initdata = {
 #define board_mux      NULL
 #endif
 
-/* Display DVI */
-#define PANDA_DVI_TFP410_POWER_DOWN_GPIO       0
-
-/* Using generic display panel */
-static struct tfp410_platform_data omap4_dvi_panel = {
-       .i2c_bus_num            = 3,
-       .power_down_gpio        = PANDA_DVI_TFP410_POWER_DOWN_GPIO,
-};
-
-static struct omap_dss_device omap4_panda_dvi_device = {
-       .type                   = OMAP_DISPLAY_TYPE_DPI,
-       .name                   = "dvi",
-       .driver_name            = "tfp410",
-       .data                   = &omap4_dvi_panel,
-       .phy.dpi.data_lines     = 24,
-       .reset_gpio             = PANDA_DVI_TFP410_POWER_DOWN_GPIO,
-       .channel                = OMAP_DSS_CHANNEL_LCD2,
-};
-
-static struct omap_dss_hdmi_data omap4_panda_hdmi_data = {
-       .ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD,
-       .ls_oe_gpio = HDMI_GPIO_LS_OE,
-       .hpd_gpio = HDMI_GPIO_HPD,
-};
-
-static struct omap_dss_device  omap4_panda_hdmi_device = {
-       .name = "hdmi",
-       .driver_name = "hdmi_panel",
-       .type = OMAP_DISPLAY_TYPE_HDMI,
-       .channel = OMAP_DSS_CHANNEL_DIGIT,
-       .data = &omap4_panda_hdmi_data,
-};
-
-static struct omap_dss_device *omap4_panda_dss_devices[] = {
-       &omap4_panda_dvi_device,
-       &omap4_panda_hdmi_device,
-};
-
-static struct omap_dss_board_info omap4_panda_dss_data = {
-       .num_devices    = ARRAY_SIZE(omap4_panda_dss_devices),
-       .devices        = omap4_panda_dss_devices,
-       .default_device = &omap4_panda_dvi_device,
-};
-
-static void __init omap4_panda_display_init(void)
-{
-
-       omap_display_init(&omap4_panda_dss_data);
-
-       /*
-        * OMAP4460SDP/Blaze and OMAP4430 ES2.3 SDP/Blaze boards and
-        * later have external pull up on the HDMI I2C lines
-        */
-       if (cpu_is_omap446x() || omap_rev() > OMAP4430_REV_ES2_2)
-               omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP);
-       else
-               omap_hdmi_init(0);
-
-       omap_mux_init_gpio(HDMI_GPIO_LS_OE, OMAP_PIN_OUTPUT);
-       omap_mux_init_gpio(HDMI_GPIO_CT_CP_HPD, OMAP_PIN_OUTPUT);
-       omap_mux_init_gpio(HDMI_GPIO_HPD, OMAP_PIN_INPUT_PULLDOWN);
-}
 
 static void omap4_panda_init_rev(void)
 {
index cbcb1b2..0c777b7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Board support file for Nokia RM-680/696.
+ * Board support file for Nokia N950 (RM-680) / N9 (RM-696).
  *
  * Copyright (C) 2010 Nokia
  *
index bf8f74b..b67fe11 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * linux/arch/arm/mach-omap2/board-rx51.c
+ * Board support file for Nokia N900 (aka RX-51).
  *
  * Copyright (C) 2007, 2008 Nokia
  *
diff --git a/arch/arm/mach-omap2/dss-common.c b/arch/arm/mach-omap2/dss-common.c
new file mode 100644 (file)
index 0000000..679a047
--- /dev/null
@@ -0,0 +1,276 @@
+/*
+ * Copyright (C) 2012 Texas Instruments, Inc..
+ * Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/*
+ * NOTE: this is a transitional file to help with DT adaptation.
+ * This file will be removed when DSS supports DT.
+ */
+
+#include <linux/kernel.h>
+#include <linux/gpio.h>
+
+#include <video/omapdss.h>
+#include <video/omap-panel-tfp410.h>
+#include <video/omap-panel-nokia-dsi.h>
+#include <video/omap-panel-picodlp.h>
+
+#include <plat/cpu.h>
+
+#include "dss-common.h"
+#include "mux.h"
+
+#define HDMI_GPIO_CT_CP_HPD 60 /* HPD mode enable/disable */
+#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
+#define HDMI_GPIO_HPD  63 /* Hotplug detect */
+
+/* Display DVI */
+#define PANDA_DVI_TFP410_POWER_DOWN_GPIO       0
+
+/* Using generic display panel */
+static struct tfp410_platform_data omap4_dvi_panel = {
+       .i2c_bus_num            = 3,
+       .power_down_gpio        = PANDA_DVI_TFP410_POWER_DOWN_GPIO,
+};
+
+static struct omap_dss_device omap4_panda_dvi_device = {
+       .type                   = OMAP_DISPLAY_TYPE_DPI,
+       .name                   = "dvi",
+       .driver_name            = "tfp410",
+       .data                   = &omap4_dvi_panel,
+       .phy.dpi.data_lines     = 24,
+       .reset_gpio             = PANDA_DVI_TFP410_POWER_DOWN_GPIO,
+       .channel                = OMAP_DSS_CHANNEL_LCD2,
+};
+
+static struct omap_dss_hdmi_data omap4_panda_hdmi_data = {
+       .ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD,
+       .ls_oe_gpio = HDMI_GPIO_LS_OE,
+       .hpd_gpio = HDMI_GPIO_HPD,
+};
+
+static struct omap_dss_device  omap4_panda_hdmi_device = {
+       .name = "hdmi",
+       .driver_name = "hdmi_panel",
+       .type = OMAP_DISPLAY_TYPE_HDMI,
+       .channel = OMAP_DSS_CHANNEL_DIGIT,
+       .data = &omap4_panda_hdmi_data,
+};
+
+static struct omap_dss_device *omap4_panda_dss_devices[] = {
+       &omap4_panda_dvi_device,
+       &omap4_panda_hdmi_device,
+};
+
+static struct omap_dss_board_info omap4_panda_dss_data = {
+       .num_devices    = ARRAY_SIZE(omap4_panda_dss_devices),
+       .devices        = omap4_panda_dss_devices,
+       .default_device = &omap4_panda_dvi_device,
+};
+
+void __init omap4_panda_display_init(void)
+{
+       omap_display_init(&omap4_panda_dss_data);
+
+       /*
+        * OMAP4460SDP/Blaze and OMAP4430 ES2.3 SDP/Blaze boards and
+        * later have external pull up on the HDMI I2C lines
+        */
+       if (cpu_is_omap446x() || omap_rev() > OMAP4430_REV_ES2_2)
+               omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP);
+       else
+               omap_hdmi_init(0);
+
+       omap_mux_init_gpio(HDMI_GPIO_LS_OE, OMAP_PIN_OUTPUT);
+       omap_mux_init_gpio(HDMI_GPIO_CT_CP_HPD, OMAP_PIN_OUTPUT);
+       omap_mux_init_gpio(HDMI_GPIO_HPD, OMAP_PIN_INPUT_PULLDOWN);
+}
+
+void __init omap4_panda_display_init_of(void)
+{
+       omap_display_init(&omap4_panda_dss_data);
+}
+
+
+/* OMAP4 Blaze display data */
+
+#define DISPLAY_SEL_GPIO       59      /* LCD2/PicoDLP switch */
+#define DLP_POWER_ON_GPIO      40
+
+static struct nokia_dsi_panel_data dsi1_panel = {
+               .name           = "taal",
+               .reset_gpio     = 102,
+               .use_ext_te     = false,
+               .ext_te_gpio    = 101,
+               .esd_interval   = 0,
+               .pin_config = {
+                       .num_pins       = 6,
+                       .pins           = { 0, 1, 2, 3, 4, 5 },
+               },
+};
+
+static struct omap_dss_device sdp4430_lcd_device = {
+       .name                   = "lcd",
+       .driver_name            = "taal",
+       .type                   = OMAP_DISPLAY_TYPE_DSI,
+       .data                   = &dsi1_panel,
+       .phy.dsi                = {
+               .module         = 0,
+       },
+       .channel                = OMAP_DSS_CHANNEL_LCD,
+};
+
+static struct nokia_dsi_panel_data dsi2_panel = {
+               .name           = "taal",
+               .reset_gpio     = 104,
+               .use_ext_te     = false,
+               .ext_te_gpio    = 103,
+               .esd_interval   = 0,
+               .pin_config = {
+                       .num_pins       = 6,
+                       .pins           = { 0, 1, 2, 3, 4, 5 },
+               },
+};
+
+static struct omap_dss_device sdp4430_lcd2_device = {
+       .name                   = "lcd2",
+       .driver_name            = "taal",
+       .type                   = OMAP_DISPLAY_TYPE_DSI,
+       .data                   = &dsi2_panel,
+       .phy.dsi                = {
+
+               .module         = 1,
+       },
+       .channel                = OMAP_DSS_CHANNEL_LCD2,
+};
+
+static struct omap_dss_hdmi_data sdp4430_hdmi_data = {
+       .ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD,
+       .ls_oe_gpio = HDMI_GPIO_LS_OE,
+       .hpd_gpio = HDMI_GPIO_HPD,
+};
+
+static struct omap_dss_device sdp4430_hdmi_device = {
+       .name = "hdmi",
+       .driver_name = "hdmi_panel",
+       .type = OMAP_DISPLAY_TYPE_HDMI,
+       .channel = OMAP_DSS_CHANNEL_DIGIT,
+       .data = &sdp4430_hdmi_data,
+};
+
+static struct picodlp_panel_data sdp4430_picodlp_pdata = {
+       .picodlp_adapter_id     = 2,
+       .emu_done_gpio          = 44,
+       .pwrgood_gpio           = 45,
+};
+
+static void sdp4430_picodlp_init(void)
+{
+       int r;
+       const struct gpio picodlp_gpios[] = {
+               {DLP_POWER_ON_GPIO, GPIOF_OUT_INIT_LOW,
+                       "DLP POWER ON"},
+               {sdp4430_picodlp_pdata.emu_done_gpio, GPIOF_IN,
+                       "DLP EMU DONE"},
+               {sdp4430_picodlp_pdata.pwrgood_gpio, GPIOF_OUT_INIT_LOW,
+                       "DLP PWRGOOD"},
+       };
+
+       r = gpio_request_array(picodlp_gpios, ARRAY_SIZE(picodlp_gpios));
+       if (r)
+               pr_err("Cannot request PicoDLP GPIOs, error %d\n", r);
+}
+
+static int sdp4430_panel_enable_picodlp(struct omap_dss_device *dssdev)
+{
+       gpio_set_value(DISPLAY_SEL_GPIO, 0);
+       gpio_set_value(DLP_POWER_ON_GPIO, 1);
+
+       return 0;
+}
+
+static void sdp4430_panel_disable_picodlp(struct omap_dss_device *dssdev)
+{
+       gpio_set_value(DLP_POWER_ON_GPIO, 0);
+       gpio_set_value(DISPLAY_SEL_GPIO, 1);
+}
+
+static struct omap_dss_device sdp4430_picodlp_device = {
+       .name                   = "picodlp",
+       .driver_name            = "picodlp_panel",
+       .type                   = OMAP_DISPLAY_TYPE_DPI,
+       .phy.dpi.data_lines     = 24,
+       .channel                = OMAP_DSS_CHANNEL_LCD2,
+       .platform_enable        = sdp4430_panel_enable_picodlp,
+       .platform_disable       = sdp4430_panel_disable_picodlp,
+       .data                   = &sdp4430_picodlp_pdata,
+};
+
+static struct omap_dss_device *sdp4430_dss_devices[] = {
+       &sdp4430_lcd_device,
+       &sdp4430_lcd2_device,
+       &sdp4430_hdmi_device,
+       &sdp4430_picodlp_device,
+};
+
+static struct omap_dss_board_info sdp4430_dss_data = {
+       .num_devices    = ARRAY_SIZE(sdp4430_dss_devices),
+       .devices        = sdp4430_dss_devices,
+       .default_device = &sdp4430_lcd_device,
+};
+
+void __init omap_4430sdp_display_init(void)
+{
+       int r;
+
+       /* Enable LCD2 by default (instead of Pico DLP) */
+       r = gpio_request_one(DISPLAY_SEL_GPIO, GPIOF_OUT_INIT_HIGH,
+                       "display_sel");
+       if (r)
+               pr_err("%s: Could not get display_sel GPIO\n", __func__);
+
+       sdp4430_picodlp_init();
+       omap_display_init(&sdp4430_dss_data);
+       /*
+        * OMAP4460SDP/Blaze and OMAP4430 ES2.3 SDP/Blaze boards and
+        * later have external pull up on the HDMI I2C lines
+        */
+       if (cpu_is_omap446x() || omap_rev() > OMAP4430_REV_ES2_2)
+               omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP);
+       else
+               omap_hdmi_init(0);
+
+       omap_mux_init_gpio(HDMI_GPIO_LS_OE, OMAP_PIN_OUTPUT);
+       omap_mux_init_gpio(HDMI_GPIO_CT_CP_HPD, OMAP_PIN_OUTPUT);
+       omap_mux_init_gpio(HDMI_GPIO_HPD, OMAP_PIN_INPUT_PULLDOWN);
+}
+
+void __init omap_4430sdp_display_init_of(void)
+{
+       int r;
+
+       /* Enable LCD2 by default (instead of Pico DLP) */
+       r = gpio_request_one(DISPLAY_SEL_GPIO, GPIOF_OUT_INIT_HIGH,
+                       "display_sel");
+       if (r)
+               pr_err("%s: Could not get display_sel GPIO\n", __func__);
+
+       sdp4430_picodlp_init();
+       omap_display_init(&sdp4430_dss_data);
+}
diff --git a/arch/arm/mach-omap2/dss-common.h b/arch/arm/mach-omap2/dss-common.h
new file mode 100644 (file)
index 0000000..915f6ff
--- /dev/null
@@ -0,0 +1,14 @@
+#ifndef __OMAP_DSS_COMMON__
+#define __OMAP_DSS_COMMON__
+
+/*
+ * NOTE: this is a transitional file to help with DT adaptation.
+ * This file will be removed when DSS supports DT.
+ */
+
+void __init omap4_panda_display_init(void);
+void __init omap4_panda_display_init_of(void);
+void __init omap_4430sdp_display_init(void);
+void __init omap_4430sdp_display_init_of(void);
+
+#endif
index 0673f0c..2cb2f06 100644 (file)
@@ -2,6 +2,13 @@ if ARCH_ORION5X
 
 menu "Orion Implementations"
 
+config ARCH_ORION5X_DT
+       bool "Marvell Orion5x Flattened Device Tree"
+       select USE_OF
+       help
+         Say 'Y' here if you want your kernel to support the
+         Marvell Orion5x using flattened device tree.
+
 config MACH_DB88F5281
        bool "Marvell Orion-2 Development Board"
        select I2C_BOARDINFO
@@ -96,12 +103,13 @@ config MACH_MV2120
          Say 'Y' here if you want your kernel to support the
          HP Media Vault mv2120 or mv5100.
 
-config MACH_EDMINI_V2
-       bool "LaCie Ethernet Disk mini V2"
+config MACH_EDMINI_V2_DT
+       bool "LaCie Ethernet Disk mini V2 (Flattened Device Tree)"
        select I2C_BOARDINFO
+       select ARCH_ORION5X_DT
        help
          Say 'Y' here if you want your kernel to support the
-         LaCie Ethernet Disk mini V2.
+         LaCie Ethernet Disk mini V2 (Flattened Device Tree).
 
 config MACH_D2NET
        bool "LaCie d2 Network"
index 7f18cda..9e809a7 100644 (file)
@@ -12,7 +12,6 @@ obj-$(CONFIG_MACH_TS409)      += ts409-setup.o tsx09-common.o
 obj-$(CONFIG_MACH_WRT350N_V2)  += wrt350n-v2-setup.o
 obj-$(CONFIG_MACH_TS78XX)      += ts78xx-setup.o
 obj-$(CONFIG_MACH_MV2120)      += mv2120-setup.o
-obj-$(CONFIG_MACH_EDMINI_V2)   += edmini_v2-setup.o
 obj-$(CONFIG_MACH_D2NET)       += d2net-setup.o
 obj-$(CONFIG_MACH_BIGDISK)     += d2net-setup.o
 obj-$(CONFIG_MACH_NET2BIG)     += net2big-setup.o
@@ -22,3 +21,6 @@ obj-$(CONFIG_MACH_RD88F5181L_GE)      += rd88f5181l-ge-setup.o
 obj-$(CONFIG_MACH_RD88F5181L_FXO)      += rd88f5181l-fxo-setup.o
 obj-$(CONFIG_MACH_RD88F6183AP_GE)      += rd88f6183ap-ge-setup.o
 obj-$(CONFIG_MACH_LINKSTATION_LSCHL)   += ls-chl-setup.o
+
+obj-$(CONFIG_ARCH_ORION5X_DT)          += board-dt.o
+obj-$(CONFIG_MACH_EDMINI_V2_DT)        += edmini_v2-setup.o
diff --git a/arch/arm/mach-orion5x/board-dt.c b/arch/arm/mach-orion5x/board-dt.c
new file mode 100644 (file)
index 0000000..32e5c21
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2012 (C), Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+ *
+ * arch/arm/mach-orion5x/board-dt.c
+ *
+ * Flattened Device Tree board initialization
+ *
+ * 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 <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/of.h>
+#include <linux/of_platform.h>
+#include <asm/system_misc.h>
+#include <asm/mach/arch.h>
+#include <mach/orion5x.h>
+#include <plat/irq.h>
+#include "common.h"
+
+struct of_dev_auxdata orion5x_auxdata_lookup[] __initdata = {
+       OF_DEV_AUXDATA("marvell,orion-spi", 0xf1010600, "orion_spi.0", NULL),
+       OF_DEV_AUXDATA("marvell,mv64xxx-i2c", 0xf1011000, "mv64xxx_i2c.0",
+                      NULL),
+       OF_DEV_AUXDATA("marvell,orion-wdt", 0xf1020300, "orion_wdt", NULL),
+       OF_DEV_AUXDATA("marvell,orion-sata", 0xf1080000, "sata_mv.0", NULL),
+       OF_DEV_AUXDATA("marvell,orion-crypto", 0xf1090000, "mv_crypto", NULL),
+       {},
+};
+
+static void __init orion5x_dt_init(void)
+{
+       char *dev_name;
+       u32 dev, rev;
+
+       orion5x_id(&dev, &rev, &dev_name);
+       printk(KERN_INFO "Orion ID: %s. TCLK=%d.\n", dev_name, orion5x_tclk);
+
+       /*
+        * Setup Orion address map
+        */
+       orion5x_setup_cpu_mbus_bridge();
+
+       /* Setup root of clk tree */
+       clk_init();
+
+       /*
+        * Don't issue "Wait for Interrupt" instruction if we are
+        * running on D0 5281 silicon.
+        */
+       if (dev == MV88F5281_DEV_ID && rev == MV88F5281_REV_D0) {
+               printk(KERN_INFO "Orion: Applying 5281 D0 WFI workaround.\n");
+               disable_hlt();
+       }
+
+       if (of_machine_is_compatible("lacie,ethernet-disk-mini-v2"))
+               edmini_v2_init();
+
+       of_platform_populate(NULL, of_default_bus_match_table,
+                            orion5x_auxdata_lookup, NULL);
+}
+
+static const char *orion5x_dt_compat[] = {
+       "marvell,orion5x",
+       NULL,
+};
+
+DT_MACHINE_START(ORION5X_DT, "Marvell Orion5x (Flattened Device Tree)")
+       /* Maintainer: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> */
+       .map_io         = orion5x_map_io,
+       .init_early     = orion5x_init_early,
+       .init_irq       = orion_dt_init_irq,
+       .timer          = &orion5x_timer,
+       .init_machine   = orion5x_dt_init,
+       .restart        = orion5x_restart,
+       .dt_compat      = orion5x_dt_compat,
+MACHINE_END
index b3eb3da..550f923 100644 (file)
@@ -65,7 +65,7 @@ void __init orion5x_map_io(void)
  ****************************************************************************/
 static struct clk *tclk;
 
-static void __init clk_init(void)
+void __init clk_init(void)
 {
        tclk = clk_register_fixed_rate(NULL, "tclk", NULL, CLK_IS_ROOT,
                                       orion5x_tclk);
@@ -236,7 +236,7 @@ struct sys_timer orion5x_timer = {
 /*
  * Identify device ID and rev from PCIe configuration header space '0'.
  */
-static void __init orion5x_id(u32 *dev, u32 *rev, char **dev_name)
+void __init orion5x_id(u32 *dev, u32 *rev, char **dev_name)
 {
        orion5x_pcie_id(dev, rev);
 
index 31bab92..7db5cdd 100644 (file)
@@ -12,6 +12,8 @@ void orion5x_map_io(void);
 void orion5x_init_early(void);
 void orion5x_init_irq(void);
 void orion5x_init(void);
+void orion5x_id(u32 *dev, u32 *rev, char **dev_name);
+void clk_init(void);
 extern int orion5x_tclk;
 extern struct sys_timer orion5x_timer;
 
@@ -54,6 +56,13 @@ int orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys);
 struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys);
 int orion5x_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin);
 
+/* board init functions for boards not fully converted to fdt */
+#ifdef CONFIG_MACH_EDMINI_V2_DT
+void edmini_v2_init(void);
+#else
+static inline void edmini_v2_init(void) {};
+#endif
+
 struct meminfo;
 struct tag;
 extern void __init tag_fixup_mem32(struct tag *, char **, struct meminfo *);
index 355e962..d675e72 100644 (file)
@@ -115,69 +115,6 @@ static struct i2c_board_info __initdata edmini_v2_i2c_rtc = {
 };
 
 /*****************************************************************************
- * Sata
- ****************************************************************************/
-
-static struct mv_sata_platform_data edmini_v2_sata_data = {
-       .n_ports        = 2,
-};
-
-/*****************************************************************************
- * GPIO LED (simple - doesn't use hardware blinking support)
- ****************************************************************************/
-
-#define EDMINI_V2_GPIO_LED_POWER       16
-
-static struct gpio_led edmini_v2_leds[] = {
-       {
-               .name = "power:blue",
-               .gpio = EDMINI_V2_GPIO_LED_POWER,
-               .active_low = 1,
-       },
-};
-
-static struct gpio_led_platform_data edmini_v2_led_data = {
-       .num_leds = ARRAY_SIZE(edmini_v2_leds),
-       .leds = edmini_v2_leds,
-};
-
-static struct platform_device edmini_v2_gpio_leds = {
-       .name           = "leds-gpio",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = &edmini_v2_led_data,
-       },
-};
-
-/****************************************************************************
- * GPIO key
- ****************************************************************************/
-
-#define EDMINI_V2_GPIO_KEY_POWER       18
-
-static struct gpio_keys_button edmini_v2_buttons[] = {
-       {
-               .code           = KEY_POWER,
-               .gpio           = EDMINI_V2_GPIO_KEY_POWER,
-               .desc           = "Power Button",
-               .active_low     = 0,
-       },
-};
-
-static struct gpio_keys_platform_data edmini_v2_button_data = {
-       .buttons        = edmini_v2_buttons,
-       .nbuttons       = ARRAY_SIZE(edmini_v2_buttons),
-};
-
-static struct platform_device edmini_v2_gpio_buttons = {
-       .name           = "gpio-keys",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = &edmini_v2_button_data,
-       },
-};
-
-/*****************************************************************************
  * General Setup
  ****************************************************************************/
 static unsigned int edminiv2_mpp_modes[] __initdata = {
@@ -207,13 +144,8 @@ static unsigned int edminiv2_mpp_modes[] __initdata = {
        0,
 };
 
-static void __init edmini_v2_init(void)
+void __init edmini_v2_init(void)
 {
-       /*
-        * Setup basic Orion functions. Need to be called early.
-        */
-       orion5x_init();
-
        orion5x_mpp_conf(edminiv2_mpp_modes);
 
        /*
@@ -221,15 +153,10 @@ static void __init edmini_v2_init(void)
         */
        orion5x_ehci0_init();
        orion5x_eth_init(&edmini_v2_eth_data);
-       orion5x_i2c_init();
-       orion5x_sata_init(&edmini_v2_sata_data);
-       orion5x_uart0_init();
 
        orion5x_setup_dev_boot_win(EDMINI_V2_NOR_BOOT_BASE,
                                EDMINI_V2_NOR_BOOT_SIZE);
        platform_device_register(&edmini_v2_nor_flash);
-       platform_device_register(&edmini_v2_gpio_leds);
-       platform_device_register(&edmini_v2_gpio_buttons);
 
        pr_notice("edmini_v2: USB device port, flash write and power-off "
                  "are not yet supported.\n");
@@ -247,16 +174,3 @@ static void __init edmini_v2_init(void)
 
        i2c_register_board_info(0, &edmini_v2_i2c_rtc, 1);
 }
-
-/* Warning: LaCie use a wrong mach-type (0x20e=526) in their bootloader. */
-MACHINE_START(EDMINI_V2, "LaCie Ethernet Disk mini V2")
-       /* Maintainer: Christopher Moore <moore@free.fr> */
-       .atag_offset    = 0x100,
-       .init_machine   = edmini_v2_init,
-       .map_io         = orion5x_map_io,
-       .init_early     = orion5x_init_early,
-       .init_irq       = orion5x_init_irq,
-       .timer          = &orion5x_timer,
-       .fixup          = tag_fixup_mem32,
-       .restart        = orion5x_restart,
-MACHINE_END
index 63e7ae3..131c862 100644 (file)
@@ -294,6 +294,7 @@ config MACH_WLF_CRAGG_6410
        select S3C64XX_SETUP_SDHCI
        select S3C64XX_SETUP_SPI
        select S3C64XX_SETUP_USB_PHY
+       select S3C_DEV_FB
        select S3C_DEV_HSMMC
        select S3C_DEV_HSMMC1
        select S3C_DEV_HSMMC2
@@ -304,6 +305,7 @@ config MACH_WLF_CRAGG_6410
        select S3C_DEV_WDT
        select SAMSUNG_DEV_ADC
        select SAMSUNG_DEV_KEYPAD
+       select SAMSUNG_DEV_PWM
        select SAMSUNG_GPIO_EXTRA128
        help
          Machine support for the Wolfson Cragganmore S3C6410 variant.
index 4e3fe57..c6d8dba 100644 (file)
@@ -20,6 +20,8 @@
 
 #include <linux/regulator/machine.h>
 
+#include <sound/wm0010.h>
+#include <sound/wm2200.h>
 #include <sound/wm5100.h>
 #include <sound/wm8996.h>
 #include <sound/wm8962.h>
@@ -33,14 +35,34 @@ static struct s3c64xx_spi_csinfo wm0010_spi_csinfo = {
        .line = S3C64XX_GPC(3),
 };
 
+static struct wm0010_pdata wm0010_pdata = {
+       .gpio_reset = S3C64XX_GPN(6),
+       .reset_active_high = 1, /* Active high for Glenfarclas Rev 2 */
+};
+
 static struct spi_board_info wm1253_devs[] = {
        [0] = {
                .modalias       = "wm0010",
+               .max_speed_hz   = 26 * 1000 * 1000,
                .bus_num        = 0,
                .chip_select    = 0,
                .mode           = SPI_MODE_0,
                .irq            = S3C_EINT(5),
                .controller_data = &wm0010_spi_csinfo,
+               .platform_data = &wm0010_pdata,
+       },
+};
+
+static struct spi_board_info balblair_devs[] = {
+       [0] = {
+               .modalias       = "wm0010",
+               .max_speed_hz   = 26 * 1000 * 1000,
+               .bus_num        = 0,
+               .chip_select    = 0,
+               .mode           = SPI_MODE_0,
+               .irq            = S3C_EINT(4),
+               .controller_data = &wm0010_spi_csinfo,
+               .platform_data = &wm0010_pdata,
        },
 };
 
@@ -166,12 +188,13 @@ static struct regulator_init_data wm8994_ldo2 = {
 
 static struct wm8994_pdata wm8994_pdata = {
        .gpio_base = CODEC_GPIO_BASE,
+       .micb2_delay = 150,
        .gpio_defaults = {
                0x3,          /* IRQ out, active high, CMOS */
        },
        .ldo = {
-                { .init_data = &wm8994_ldo1, },
-                { .init_data = &wm8994_ldo2, },
+                { .enable = S3C64XX_GPN(6), .init_data = &wm8994_ldo1, },
+                { .enable = S3C64XX_GPN(4), .init_data = &wm8994_ldo2, },
        },
 };
 
@@ -182,7 +205,7 @@ static const struct i2c_board_info wm1277_devs[] = {
        },
 };
 
-static struct arizona_pdata wm5102_pdata = {
+static struct arizona_pdata wm5102_reva_pdata = {
        .ldoena = S3C64XX_GPN(7),
        .gpio_base = CODEC_GPIO_BASE,
        .irq_active_high = true,
@@ -193,64 +216,131 @@ static struct arizona_pdata wm5102_pdata = {
        },
 };
 
-static struct s3c64xx_spi_csinfo wm5102_spi_csinfo = {
+static struct s3c64xx_spi_csinfo codec_spi_csinfo = {
        .line = S3C64XX_GPN(5),
 };
 
+static struct spi_board_info wm5102_reva_spi_devs[] = {
+       [0] = {
+               .modalias       = "wm5102",
+               .max_speed_hz   = 10 * 1000 * 1000,
+               .bus_num        = 0,
+               .chip_select    = 1,
+               .mode           = SPI_MODE_0,
+               .irq            = GLENFARCLAS_PMIC_IRQ_BASE +
+                                 WM831X_IRQ_GPIO_2,
+               .controller_data = &codec_spi_csinfo,
+               .platform_data = &wm5102_reva_pdata,
+       },
+};
+
+static struct arizona_pdata wm5102_pdata = {
+       .ldoena = S3C64XX_GPN(7),
+       .gpio_base = CODEC_GPIO_BASE,
+       .irq_active_high = true,
+       .micd_pol_gpio = CODEC_GPIO_BASE + 2,
+       .gpio_defaults = {
+               [2] = 0x10000, /* AIF3TXLRCLK */
+               [3] = 0x4,     /* OPCLK */
+       },
+};
+
 static struct spi_board_info wm5102_spi_devs[] = {
        [0] = {
                .modalias       = "wm5102",
                .max_speed_hz   = 10 * 1000 * 1000,
                .bus_num        = 0,
-               .chip_select    = 0,
+               .chip_select    = 1,
                .mode           = SPI_MODE_0,
                .irq            = GLENFARCLAS_PMIC_IRQ_BASE +
                                  WM831X_IRQ_GPIO_2,
-               .controller_data = &wm5102_spi_csinfo,
+               .controller_data = &codec_spi_csinfo,
                .platform_data = &wm5102_pdata,
        },
 };
 
+static struct spi_board_info wm5110_spi_devs[] = {
+       [0] = {
+               .modalias       = "wm5110",
+               .max_speed_hz   = 10 * 1000 * 1000,
+               .bus_num        = 0,
+               .chip_select    = 1,
+               .mode           = SPI_MODE_0,
+               .irq            = GLENFARCLAS_PMIC_IRQ_BASE +
+                                 WM831X_IRQ_GPIO_2,
+               .controller_data = &codec_spi_csinfo,
+               .platform_data = &wm5102_reva_pdata,
+       },
+};
+
 static const struct i2c_board_info wm6230_i2c_devs[] = {
        { I2C_BOARD_INFO("wm9081", 0x6c),
          .platform_data = &wm9081_pdata, },
 };
 
+static struct wm2200_pdata wm2200_pdata = {
+       .ldo_ena = S3C64XX_GPN(7),
+       .gpio_defaults = {
+               [2] = 0x0005,  /* GPIO3 24.576MHz output clock */
+       },
+};
+
+static const struct i2c_board_info wm2200_i2c[] = {
+       { I2C_BOARD_INFO("wm2200", 0x3a),
+         .platform_data = &wm2200_pdata, },
+};
+
 static __devinitdata const struct {
        u8 id;
+       u8 rev;
        const char *name;
        const struct i2c_board_info *i2c_devs;
        int num_i2c_devs;
        const struct spi_board_info *spi_devs;
        int num_spi_devs;
 } gf_mods[] = {
-       { .id = 0x01, .name = "1250-EV1 Springbank" },
-       { .id = 0x02, .name = "1251-EV1 Jura" },
-       { .id = 0x03, .name = "1252-EV1 Glenlivet" },
-       { .id = 0x11, .name = "6249-EV2 Glenfarclas", },
-       { .id = 0x14, .name = "6271-EV1 Lochnagar" },
-       { .id = 0x15, .name = "6320-EV1 Bells",
+       { .id = 0x01, .rev = 0xff, .name = "1250-EV1 Springbank" },
+       { .id = 0x02, .rev = 0xff, .name = "1251-EV1 Jura" },
+       { .id = 0x03, .rev = 0xff, .name = "1252-EV1 Glenlivet" },
+       { .id = 0x06, .rev = 0xff, .name = "WM8997-6721-CS96-EV1 Lapraoig" },
+       { .id = 0x07, .rev = 0xff, .name = "WM5110-6271 Deanston",
+         .spi_devs = wm5110_spi_devs,
+         .num_spi_devs = ARRAY_SIZE(wm5110_spi_devs) },
+       { .id = 0x08, .rev = 0xff, .name = "WM8903-6102 Tamdhu" },
+       { .id = 0x09, .rev = 0xff, .name = "WM1811A-6305 Adelphi" },
+       { .id = 0x0a, .rev = 0xff, .name = "WM8996-6272 Blackadder" },
+       { .id = 0x0b, .rev = 0xff, .name = "WM8994-6235 Benromach" },
+       { .id = 0x11, .rev = 0xff, .name = "6249-EV2 Glenfarclas", },
+       { .id = 0x14, .rev = 0xff, .name = "6271-EV1 Lochnagar" },
+       { .id = 0x15, .rev = 0xff, .name = "6320-EV1 Bells",
          .i2c_devs = wm6230_i2c_devs,
          .num_i2c_devs = ARRAY_SIZE(wm6230_i2c_devs) },
-       { .id = 0x21, .name = "1275-EV1 Mortlach" },
-       { .id = 0x25, .name = "1274-EV1 Glencadam" },
-       { .id = 0x31, .name = "1253-EV1 Tomatin",
+       { .id = 0x21, .rev = 0xff, .name = "1275-EV1 Mortlach" },
+       { .id = 0x25, .rev = 0xff, .name = "1274-EV1 Glencadam" },
+       { .id = 0x31, .rev = 0xff, .name = "1253-EV1 Tomatin",
          .spi_devs = wm1253_devs, .num_spi_devs = ARRAY_SIZE(wm1253_devs) },
-       { .id = 0x32, .name = "XXXX-EV1 Caol Illa" },
-       { .id = 0x33, .name = "XXXX-EV1 Oban" },
-       { .id = 0x34, .name = "WM0010-6320-CS42 Balblair" },
-       { .id = 0x39, .name = "1254-EV1 Dallas Dhu",
+       { .id = 0x32, .rev = 0xff, .name = "XXXX-EV1 Caol Illa" },
+       { .id = 0x33, .rev = 0xff, .name = "XXXX-EV1 Oban" },
+       { .id = 0x34, .rev = 0xff, .name = "WM0010-6320-CS42 Balblair",
+         .spi_devs = balblair_devs,
+         .num_spi_devs = ARRAY_SIZE(balblair_devs) },
+       { .id = 0x39, .rev = 0xff, .name = "1254-EV1 Dallas Dhu",
          .i2c_devs = wm1254_devs, .num_i2c_devs = ARRAY_SIZE(wm1254_devs) },
-       { .id = 0x3a, .name = "1259-EV1 Tobermory",
+       { .id = 0x3a, .rev = 0xff, .name = "1259-EV1 Tobermory",
          .i2c_devs = wm1259_devs, .num_i2c_devs = ARRAY_SIZE(wm1259_devs) },
-       { .id = 0x3b, .name = "1255-EV1 Kilchoman",
+       { .id = 0x3b, .rev = 0xff, .name = "1255-EV1 Kilchoman",
          .i2c_devs = wm1255_devs, .num_i2c_devs = ARRAY_SIZE(wm1255_devs) },
-       { .id = 0x3c, .name = "1273-EV1 Longmorn" },
-       { .id = 0x3d, .name = "1277-EV1 Littlemill",
+       { .id = 0x3c, .rev = 0xff, .name = "1273-EV1 Longmorn" },
+       { .id = 0x3d, .rev = 0xff, .name = "1277-EV1 Littlemill",
          .i2c_devs = wm1277_devs, .num_i2c_devs = ARRAY_SIZE(wm1277_devs) },
-       { .id = 0x3e, .name = "WM5102-6271-EV1-CS127 Amrut",
+       { .id = 0x3e, .rev = 0, .name = "WM5102-6271-EV1-CS127 Amrut",
+         .spi_devs = wm5102_reva_spi_devs,
+         .num_spi_devs = ARRAY_SIZE(wm5102_reva_spi_devs) },
+       { .id = 0x3e, .rev = -1, .name = "WM5102-6271-EV1-CS127 Amrut",
          .spi_devs = wm5102_spi_devs,
          .num_spi_devs = ARRAY_SIZE(wm5102_spi_devs) },
+       { .id = 0x3f, .rev = -1, .name = "WM2200-6271-CS90-M-REV1",
+         .i2c_devs = wm2200_i2c, .num_i2c_devs = ARRAY_SIZE(wm2200_i2c) },
 };
 
 static __devinit int wlf_gf_module_probe(struct i2c_client *i2c,
@@ -267,7 +357,8 @@ static __devinit int wlf_gf_module_probe(struct i2c_client *i2c,
        id = (ret & 0xfe) >> 2;
        rev = ret & 0x3;
        for (i = 0; i < ARRAY_SIZE(gf_mods); i++)
-               if (id == gf_mods[i].id)
+               if (id == gf_mods[i].id && (gf_mods[i].rev == 0xff ||
+                                           rev == gf_mods[i].rev))
                        break;
 
        if (i < ARRAY_SIZE(gf_mods)) {
index 13b7eaa..701f421 100644 (file)
@@ -287,16 +287,21 @@ static struct platform_device littlemill_device = {
        .id             = -1,
 };
 
-static struct platform_device bells_wm5102_device = {
+static struct platform_device bells_wm2200_device = {
        .name           = "bells",
        .id             = 0,
 };
 
-static struct platform_device bells_wm5110_device = {
+static struct platform_device bells_wm5102_device = {
        .name           = "bells",
        .id             = 1,
 };
 
+static struct platform_device bells_wm5110_device = {
+       .name           = "bells",
+       .id             = 2,
+};
+
 static struct regulator_consumer_supply wallvdd_consumers[] = {
        REGULATOR_SUPPLY("SPKVDD", "1-001a"),
        REGULATOR_SUPPLY("SPKVDD1", "1-001a"),
@@ -304,6 +309,13 @@ static struct regulator_consumer_supply wallvdd_consumers[] = {
        REGULATOR_SUPPLY("SPKVDDL", "1-001a"),
        REGULATOR_SUPPLY("SPKVDDR", "1-001a"),
 
+       REGULATOR_SUPPLY("SPKVDDL", "spi0.1"),
+       REGULATOR_SUPPLY("SPKVDDR", "spi0.1"),
+       REGULATOR_SUPPLY("SPKVDDL", "wm5102-codec"),
+       REGULATOR_SUPPLY("SPKVDDR", "wm5102-codec"),
+       REGULATOR_SUPPLY("SPKVDDL", "wm5110-codec"),
+       REGULATOR_SUPPLY("SPKVDDR", "wm5110-codec"),
+
        REGULATOR_SUPPLY("DC1VDD", "0-0034"),
        REGULATOR_SUPPLY("DC2VDD", "0-0034"),
        REGULATOR_SUPPLY("DC3VDD", "0-0034"),
@@ -321,6 +333,16 @@ static struct regulator_consumer_supply wallvdd_consumers[] = {
        REGULATOR_SUPPLY("DC1VDD", "1-0034"),
        REGULATOR_SUPPLY("DC2VDD", "1-0034"),
        REGULATOR_SUPPLY("DC3VDD", "1-0034"),
+       REGULATOR_SUPPLY("LDO1VDD", "1-0034"),
+       REGULATOR_SUPPLY("LDO2VDD", "1-0034"),
+       REGULATOR_SUPPLY("LDO4VDD", "1-0034"),
+       REGULATOR_SUPPLY("LDO5VDD", "1-0034"),
+       REGULATOR_SUPPLY("LDO6VDD", "1-0034"),
+       REGULATOR_SUPPLY("LDO7VDD", "1-0034"),
+       REGULATOR_SUPPLY("LDO8VDD", "1-0034"),
+       REGULATOR_SUPPLY("LDO9VDD", "1-0034"),
+       REGULATOR_SUPPLY("LDO10VDD", "1-0034"),
+       REGULATOR_SUPPLY("LDO11VDD", "1-0034"),
 };
 
 static struct regulator_init_data wallvdd_data = {
@@ -369,6 +391,7 @@ static struct platform_device *crag6410_devices[] __initdata = {
        &tobermory_device,
        &littlemill_device,
        &lowland_device,
+       &bells_wm2200_device,
        &bells_wm5102_device,
        &bells_wm5110_device,
        &wallvdd_device,
@@ -597,6 +620,7 @@ static struct s3c2410_platform_i2c i2c0_pdata = {
 static struct regulator_consumer_supply pvdd_1v2_consumers[] __devinitdata = {
        REGULATOR_SUPPLY("DCVDD", "spi0.0"),
        REGULATOR_SUPPLY("AVDD", "spi0.0"),
+       REGULATOR_SUPPLY("AVDD", "spi0.1"),
 };
 
 static struct regulator_init_data pvdd_1v2 __devinitdata = {
@@ -621,6 +645,24 @@ static struct regulator_consumer_supply pvdd_1v8_consumers[] __devinitdata = {
        REGULATOR_SUPPLY("DCVDD", "1-001a"),
        REGULATOR_SUPPLY("AVDD", "1-001a"),
        REGULATOR_SUPPLY("DBVDD", "spi0.0"),
+
+       REGULATOR_SUPPLY("DBVDD", "1-003a"),
+       REGULATOR_SUPPLY("LDOVDD", "1-003a"),
+       REGULATOR_SUPPLY("CPVDD", "1-003a"),
+       REGULATOR_SUPPLY("AVDD", "1-003a"),
+       REGULATOR_SUPPLY("DBVDD1", "spi0.1"),
+       REGULATOR_SUPPLY("DBVDD2", "spi0.1"),
+       REGULATOR_SUPPLY("DBVDD3", "spi0.1"),
+       REGULATOR_SUPPLY("LDOVDD", "spi0.1"),
+       REGULATOR_SUPPLY("CPVDD", "spi0.1"),
+
+       REGULATOR_SUPPLY("DBVDD2", "wm5102-codec"),
+       REGULATOR_SUPPLY("DBVDD3", "wm5102-codec"),
+       REGULATOR_SUPPLY("CPVDD", "wm5102-codec"),
+
+       REGULATOR_SUPPLY("DBVDD2", "wm5110-codec"),
+       REGULATOR_SUPPLY("DBVDD3", "wm5110-codec"),
+       REGULATOR_SUPPLY("CPVDD", "wm5110-codec"),
 };
 
 static struct regulator_init_data pvdd_1v8 __devinitdata = {
@@ -685,6 +727,7 @@ static struct i2c_board_info i2c_devs1[] __devinitdata = {
          .irq = S3C_EINT(0),
          .platform_data = &glenfarclas_pmic_pdata },
 
+       { I2C_BOARD_INFO("wlf-gf-module", 0x20) },
        { I2C_BOARD_INFO("wlf-gf-module", 0x22) },
        { I2C_BOARD_INFO("wlf-gf-module", 0x24) },
        { I2C_BOARD_INFO("wlf-gf-module", 0x25) },
@@ -810,7 +853,7 @@ static void __init crag6410_machine_init(void)
        i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1));
 
        samsung_keypad_set_platdata(&crag6410_keypad_data);
-       s3c64xx_spi0_set_platdata(NULL, 0, 1);
+       s3c64xx_spi0_set_platdata(NULL, 0, 2);
 
        platform_add_devices(crag6410_devices, ARRAY_SIZE(crag6410_devices));
 
index 546e40a..4eddca1 100644 (file)
@@ -38,17 +38,6 @@ config ARCH_EMEV2
 
 comment "SH-Mobile Board Type"
 
-config MACH_G3EVM
-       bool "G3EVM board"
-       depends on ARCH_SH7367
-       select ARCH_REQUIRE_GPIOLIB
-
-config MACH_G4EVM
-       bool "G4EVM board"
-       depends on ARCH_SH7377
-       select ARCH_REQUIRE_GPIOLIB
-       select REGULATOR_FIXED_VOLTAGE if REGULATOR
-
 config MACH_AP4EVB
        bool "AP4EVB board"
        depends on ARCH_SH7372
@@ -83,6 +72,7 @@ config MACH_MACKEREL
        select ARCH_REQUIRE_GPIOLIB
        select REGULATOR_FIXED_VOLTAGE if REGULATOR
        select SND_SOC_AK4642 if SND_SIMPLE_CARD
+       select USE_OF
 
 config MACH_KOTA2
        bool "KOTA2 board"
@@ -134,8 +124,7 @@ menu "Memory configuration"
 
 config MEMORY_START
        hex "Physical memory start address"
-       default "0x50000000" if MACH_G3EVM
-       default "0x40000000" if MACH_G4EVM || MACH_AP4EVB || MACH_AG5EVM || \
+       default "0x40000000" if MACH_AP4EVB || MACH_AG5EVM || \
                                MACH_MACKEREL || MACH_BONITO || \
                                MACH_ARMADILLO800EVA
        default "0x41000000" if MACH_KOTA2
@@ -147,8 +136,6 @@ config MEMORY_START
 
 config MEMORY_SIZE
        hex "Physical memory size"
-       default "0x08000000" if MACH_G3EVM
-       default "0x08000000" if MACH_G4EVM
        default "0x20000000" if MACH_AG5EVM || MACH_BONITO || \
                                MACH_ARMADILLO800EVA
        default "0x1e000000" if MACH_KOTA2
index f4fd247..0b71479 100644 (file)
@@ -39,8 +39,6 @@ obj-$(CONFIG_ARCH_R8A7740)    += pm-r8a7740.o
 obj-$(CONFIG_ARCH_R8A7779)     += pm-r8a7779.o
 
 # Board objects
-obj-$(CONFIG_MACH_G3EVM)       += board-g3evm.o
-obj-$(CONFIG_MACH_G4EVM)       += board-g4evm.o
 obj-$(CONFIG_MACH_AP4EVB)      += board-ap4evb.o
 obj-$(CONFIG_MACH_AG5EVM)      += board-ag5evm.o
 obj-$(CONFIG_MACH_MACKEREL)    += board-mackerel.o
index 3cc8b1c..499e6e3 100644 (file)
@@ -1229,6 +1229,13 @@ static void __init eva_add_early_devices(void)
        shmobile_timer.init = eva_earlytimer_init;
 }
 
+#define RESCNT2 IOMEM(0xe6188020)
+static void eva_restart(char mode, const char *cmd)
+{
+       /* Do soft power on reset */
+       writel((1 << 31), RESCNT2);
+}
+
 static const char *eva_boards_compat_dt[] __initdata = {
        "renesas,armadillo800eva",
        NULL,
@@ -1243,4 +1250,5 @@ DT_MACHINE_START(ARMADILLO800EVA_DT, "armadillo800eva")
        .init_late      = shmobile_init_late,
        .timer          = &shmobile_timer,
        .dt_compat      = eva_boards_compat_dt,
+       .restart        = eva_restart,
 MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-g3evm.c b/arch/arm/mach-shmobile/board-g3evm.c
deleted file mode 100644 (file)
index b179d4c..0000000
+++ /dev/null
@@ -1,343 +0,0 @@
-/*
- * G3EVM board support
- *
- * Copyright (C) 2010  Magnus Damm
- * Copyright (C) 2008  Yoshihiro Shimoda
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/irq.h>
-#include <linux/platform_device.h>
-#include <linux/delay.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
-#include <linux/mtd/sh_flctl.h>
-#include <linux/usb/r8a66597.h>
-#include <linux/io.h>
-#include <linux/gpio.h>
-#include <linux/input.h>
-#include <linux/input/sh_keysc.h>
-#include <linux/dma-mapping.h>
-#include <mach/irqs.h>
-#include <mach/sh7367.h>
-#include <mach/common.h>
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-
-/*
- * IrDA
- *
- * S67: 5bit : ON  power
- *    : 6bit : ON  remote control
- *             OFF IrDA
- */
-
-static struct mtd_partition nor_flash_partitions[] = {
-       {
-               .name           = "loader",
-               .offset         = 0x00000000,
-               .size           = 512 * 1024,
-       },
-       {
-               .name           = "bootenv",
-               .offset         = MTDPART_OFS_APPEND,
-               .size           = 512 * 1024,
-       },
-       {
-               .name           = "kernel_ro",
-               .offset         = MTDPART_OFS_APPEND,
-               .size           = 8 * 1024 * 1024,
-               .mask_flags     = MTD_WRITEABLE,
-       },
-       {
-               .name           = "kernel",
-               .offset         = MTDPART_OFS_APPEND,
-               .size           = 8 * 1024 * 1024,
-       },
-       {
-               .name           = "data",
-               .offset         = MTDPART_OFS_APPEND,
-               .size           = MTDPART_SIZ_FULL,
-       },
-};
-
-static struct physmap_flash_data nor_flash_data = {
-       .width          = 2,
-       .parts          = nor_flash_partitions,
-       .nr_parts       = ARRAY_SIZE(nor_flash_partitions),
-};
-
-static struct resource nor_flash_resources[] = {
-       [0]     = {
-               .start  = 0x00000000,
-               .end    = 0x08000000 - 1,
-               .flags  = IORESOURCE_MEM,
-       }
-};
-
-static struct platform_device nor_flash_device = {
-       .name           = "physmap-flash",
-       .dev            = {
-               .platform_data  = &nor_flash_data,
-       },
-       .num_resources  = ARRAY_SIZE(nor_flash_resources),
-       .resource       = nor_flash_resources,
-};
-
-/* USBHS */
-static void usb_host_port_power(int port, int power)
-{
-       if (!power) /* only power-on supported for now */
-               return;
-
-       /* set VBOUT/PWEN and EXTLP0 in DVSTCTR */
-       __raw_writew(__raw_readw(IOMEM(0xe6890008)) | 0x600, IOMEM(0xe6890008));
-}
-
-static struct r8a66597_platdata usb_host_data = {
-       .on_chip = 1,
-       .port_power = usb_host_port_power,
-};
-
-static struct resource usb_host_resources[] = {
-       [0] = {
-               .name   = "USBHS",
-               .start  = 0xe6890000,
-               .end    = 0xe68900e5,
-               .flags  = IORESOURCE_MEM,
-       },
-       [1] = {
-               .start  = evt2irq(0xa20), /* USBHS_USHI0 */
-               .flags  = IORESOURCE_IRQ,
-       },
-};
-
-static struct platform_device usb_host_device = {
-       .name           = "r8a66597_hcd",
-       .id             = 0,
-       .dev = {
-               .platform_data          = &usb_host_data,
-               .dma_mask               = NULL,
-               .coherent_dma_mask      = 0xffffffff,
-       },
-       .num_resources  = ARRAY_SIZE(usb_host_resources),
-       .resource       = usb_host_resources,
-};
-
-/* KEYSC */
-static struct sh_keysc_info keysc_info = {
-       .mode           = SH_KEYSC_MODE_5,
-       .scan_timing    = 3,
-       .delay          = 100,
-       .keycodes = {
-               KEY_A, KEY_B, KEY_C, KEY_D, KEY_E, KEY_F, KEY_G,
-               KEY_H, KEY_I, KEY_J, KEY_K, KEY_L, KEY_M, KEY_N,
-               KEY_O, KEY_P, KEY_Q, KEY_R, KEY_S, KEY_T, KEY_U,
-               KEY_V, KEY_W, KEY_X, KEY_Y, KEY_Z, KEY_HOME, KEY_SLEEP,
-               KEY_WAKEUP, KEY_COFFEE, KEY_0, KEY_1, KEY_2, KEY_3, KEY_4,
-               KEY_5, KEY_6, KEY_7, KEY_8, KEY_9, KEY_STOP, KEY_COMPUTER,
-       },
-};
-
-static struct resource keysc_resources[] = {
-       [0] = {
-               .name   = "KEYSC",
-               .start  = 0xe61b0000,
-               .end    = 0xe61b000f,
-               .flags  = IORESOURCE_MEM,
-       },
-       [1] = {
-               .start  = evt2irq(0xbe0), /* KEYSC_KEY */
-               .flags  = IORESOURCE_IRQ,
-       },
-};
-
-static struct platform_device keysc_device = {
-       .name           = "sh_keysc",
-       .num_resources  = ARRAY_SIZE(keysc_resources),
-       .resource       = keysc_resources,
-       .dev    = {
-               .platform_data  = &keysc_info,
-       },
-};
-
-static struct mtd_partition nand_partition_info[] = {
-       {
-               .name   = "system",
-               .offset = 0,
-               .size   = 64 * 1024 * 1024,
-       },
-       {
-               .name   = "userdata",
-               .offset = MTDPART_OFS_APPEND,
-               .size   = 128 * 1024 * 1024,
-       },
-       {
-               .name   = "cache",
-               .offset = MTDPART_OFS_APPEND,
-               .size   = 64 * 1024 * 1024,
-       },
-};
-
-static struct resource nand_flash_resources[] = {
-       [0] = {
-               .start  = 0xe6a30000,
-               .end    = 0xe6a3009b,
-               .flags  = IORESOURCE_MEM,
-       }
-};
-
-static struct sh_flctl_platform_data nand_flash_data = {
-       .parts          = nand_partition_info,
-       .nr_parts       = ARRAY_SIZE(nand_partition_info),
-       .flcmncr_val    = QTSEL_E | FCKSEL_E | TYPESEL_SET | NANWF_E
-                       | SHBUSSEL | SEL_16BIT,
-};
-
-static struct platform_device nand_flash_device = {
-       .name           = "sh_flctl",
-       .resource       = nand_flash_resources,
-       .num_resources  = ARRAY_SIZE(nand_flash_resources),
-       .dev            = {
-               .platform_data = &nand_flash_data,
-       },
-};
-
-static struct resource irda_resources[] = {
-       [0] = {
-               .start  = 0xE6D00000,
-               .end    = 0xE6D01FD4 - 1,
-               .flags  = IORESOURCE_MEM,
-       },
-       [1] = {
-               .start  = evt2irq(0x480), /* IRDA */
-               .flags  = IORESOURCE_IRQ,
-       },
-};
-
-static struct platform_device irda_device = {
-       .name           = "sh_irda",
-       .id             = -1,
-       .resource       = irda_resources,
-       .num_resources  = ARRAY_SIZE(irda_resources),
-};
-
-static struct platform_device *g3evm_devices[] __initdata = {
-       &nor_flash_device,
-       &usb_host_device,
-       &keysc_device,
-       &nand_flash_device,
-       &irda_device,
-};
-
-static void __init g3evm_init(void)
-{
-       sh7367_pinmux_init();
-
-       /* Lit DS4 LED */
-       gpio_request(GPIO_PORT22, NULL);
-       gpio_direction_output(GPIO_PORT22, 1);
-       gpio_export(GPIO_PORT22, 0);
-
-       /* Lit DS8 LED */
-       gpio_request(GPIO_PORT23, NULL);
-       gpio_direction_output(GPIO_PORT23, 1);
-       gpio_export(GPIO_PORT23, 0);
-
-       /* Lit DS3 LED */
-       gpio_request(GPIO_PORT24, NULL);
-       gpio_direction_output(GPIO_PORT24, 1);
-       gpio_export(GPIO_PORT24, 0);
-
-       /* SCIFA1 */
-       gpio_request(GPIO_FN_SCIFA1_TXD, NULL);
-       gpio_request(GPIO_FN_SCIFA1_RXD, NULL);
-       gpio_request(GPIO_FN_SCIFA1_CTS, NULL);
-       gpio_request(GPIO_FN_SCIFA1_RTS, NULL);
-
-       /* USBHS */
-       gpio_request(GPIO_FN_VBUS0, NULL);
-       gpio_request(GPIO_FN_PWEN, NULL);
-       gpio_request(GPIO_FN_OVCN, NULL);
-       gpio_request(GPIO_FN_OVCN2, NULL);
-       gpio_request(GPIO_FN_EXTLP, NULL);
-       gpio_request(GPIO_FN_IDIN, NULL);
-
-       /* setup USB phy */
-       __raw_writew(0x0300, IOMEM(0xe605810a));        /* USBCR1 */
-       __raw_writew(0x00e0, IOMEM(0xe60581c0));        /* CPFCH */
-       __raw_writew(0x6010, IOMEM(0xe60581c6));        /* CGPOSR */
-       __raw_writew(0x8a0a, IOMEM(0xe605810c));        /* USBCR2 */
-
-       /* KEYSC @ CN7 */
-       gpio_request(GPIO_FN_PORT42_KEYOUT0, NULL);
-       gpio_request(GPIO_FN_PORT43_KEYOUT1, NULL);
-       gpio_request(GPIO_FN_PORT44_KEYOUT2, NULL);
-       gpio_request(GPIO_FN_PORT45_KEYOUT3, NULL);
-       gpio_request(GPIO_FN_PORT46_KEYOUT4, NULL);
-       gpio_request(GPIO_FN_PORT47_KEYOUT5, NULL);
-       gpio_request(GPIO_FN_PORT48_KEYIN0_PU, NULL);
-       gpio_request(GPIO_FN_PORT49_KEYIN1_PU, NULL);
-       gpio_request(GPIO_FN_PORT50_KEYIN2_PU, NULL);
-       gpio_request(GPIO_FN_PORT55_KEYIN3_PU, NULL);
-       gpio_request(GPIO_FN_PORT56_KEYIN4_PU, NULL);
-       gpio_request(GPIO_FN_PORT57_KEYIN5_PU, NULL);
-       gpio_request(GPIO_FN_PORT58_KEYIN6_PU, NULL);
-
-       /* FLCTL */
-       gpio_request(GPIO_FN_FCE0, NULL);
-       gpio_request(GPIO_FN_D0_ED0_NAF0, NULL);
-       gpio_request(GPIO_FN_D1_ED1_NAF1, NULL);
-       gpio_request(GPIO_FN_D2_ED2_NAF2, NULL);
-       gpio_request(GPIO_FN_D3_ED3_NAF3, NULL);
-       gpio_request(GPIO_FN_D4_ED4_NAF4, NULL);
-       gpio_request(GPIO_FN_D5_ED5_NAF5, NULL);
-       gpio_request(GPIO_FN_D6_ED6_NAF6, NULL);
-       gpio_request(GPIO_FN_D7_ED7_NAF7, NULL);
-       gpio_request(GPIO_FN_D8_ED8_NAF8, NULL);
-       gpio_request(GPIO_FN_D9_ED9_NAF9, NULL);
-       gpio_request(GPIO_FN_D10_ED10_NAF10, NULL);
-       gpio_request(GPIO_FN_D11_ED11_NAF11, NULL);
-       gpio_request(GPIO_FN_D12_ED12_NAF12, NULL);
-       gpio_request(GPIO_FN_D13_ED13_NAF13, NULL);
-       gpio_request(GPIO_FN_D14_ED14_NAF14, NULL);
-       gpio_request(GPIO_FN_D15_ED15_NAF15, NULL);
-       gpio_request(GPIO_FN_WE0_XWR0_FWE, NULL);
-       gpio_request(GPIO_FN_FRB, NULL);
-       /* FOE, FCDE, FSC on dedicated pins */
-       __raw_writel(__raw_readl(IOMEM(0xe6158048)) & ~(1 << 15), IOMEM(0xe6158048));
-
-       /* IrDA */
-       gpio_request(GPIO_FN_IRDA_OUT, NULL);
-       gpio_request(GPIO_FN_IRDA_IN, NULL);
-       gpio_request(GPIO_FN_IRDA_FIRSEL, NULL);
-
-       sh7367_add_standard_devices();
-
-       platform_add_devices(g3evm_devices, ARRAY_SIZE(g3evm_devices));
-}
-
-MACHINE_START(G3EVM, "g3evm")
-       .map_io         = sh7367_map_io,
-       .init_early     = sh7367_add_early_devices,
-       .init_irq       = sh7367_init_irq,
-       .handle_irq     = shmobile_handle_irq_intc,
-       .init_machine   = g3evm_init,
-       .init_late      = shmobile_init_late,
-       .timer          = &shmobile_timer,
-MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-g4evm.c b/arch/arm/mach-shmobile/board-g4evm.c
deleted file mode 100644 (file)
index 35c126c..0000000
+++ /dev/null
@@ -1,384 +0,0 @@
-/*
- * G4EVM board support
- *
- * Copyright (C) 2010  Magnus Damm
- * Copyright (C) 2008  Yoshihiro Shimoda
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/irq.h>
-#include <linux/platform_device.h>
-#include <linux/delay.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
-#include <linux/regulator/fixed.h>
-#include <linux/regulator/machine.h>
-#include <linux/usb/r8a66597.h>
-#include <linux/io.h>
-#include <linux/input.h>
-#include <linux/input/sh_keysc.h>
-#include <linux/mmc/host.h>
-#include <linux/mmc/sh_mobile_sdhi.h>
-#include <linux/gpio.h>
-#include <linux/dma-mapping.h>
-#include <mach/irqs.h>
-#include <mach/sh7377.h>
-#include <mach/common.h>
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-
-#include "sh-gpio.h"
-
-/*
- * SDHI
- *
- * SDHI0 : card detection is possible
- * SDHI1 : card detection is impossible
- *
- * [G4-MAIN-BOARD]
- * JP74 : short                # DBG_2V8A    for SDHI0
- * JP75 : NC           # DBG_3V3A    for SDHI0
- * JP76 : NC           # DBG_3V3A_SD for SDHI0
- * JP77 : NC           # 3V3A_SDIO   for SDHI1
- * JP78 : short                # DBG_2V8A    for SDHI1
- * JP79 : NC           # DBG_3V3A    for SDHI1
- * JP80 : NC           # DBG_3V3A_SD for SDHI1
- *
- * [G4-CORE-BOARD]
- * S32 : all off       # to dissever from G3-CORE_DBG board
- * S33 : all off       # to dissever from G3-CORE_DBG board
- *
- * [G3-CORE_DBG-BOARD]
- * S1  : all off       # to dissever from G3-CORE_DBG board
- * S3  : all off       # to dissever from G3-CORE_DBG board
- * S4  : all off       # to dissever from G3-CORE_DBG board
- */
-
-static struct mtd_partition nor_flash_partitions[] = {
-       {
-               .name           = "loader",
-               .offset         = 0x00000000,
-               .size           = 512 * 1024,
-       },
-       {
-               .name           = "bootenv",
-               .offset         = MTDPART_OFS_APPEND,
-               .size           = 512 * 1024,
-       },
-       {
-               .name           = "kernel_ro",
-               .offset         = MTDPART_OFS_APPEND,
-               .size           = 8 * 1024 * 1024,
-               .mask_flags     = MTD_WRITEABLE,
-       },
-       {
-               .name           = "kernel",
-               .offset         = MTDPART_OFS_APPEND,
-               .size           = 8 * 1024 * 1024,
-       },
-       {
-               .name           = "data",
-               .offset         = MTDPART_OFS_APPEND,
-               .size           = MTDPART_SIZ_FULL,
-       },
-};
-
-static struct physmap_flash_data nor_flash_data = {
-       .width          = 2,
-       .parts          = nor_flash_partitions,
-       .nr_parts       = ARRAY_SIZE(nor_flash_partitions),
-};
-
-static struct resource nor_flash_resources[] = {
-       [0]     = {
-               .start  = 0x00000000,
-               .end    = 0x08000000 - 1,
-               .flags  = IORESOURCE_MEM,
-       }
-};
-
-static struct platform_device nor_flash_device = {
-       .name           = "physmap-flash",
-       .dev            = {
-               .platform_data  = &nor_flash_data,
-       },
-       .num_resources  = ARRAY_SIZE(nor_flash_resources),
-       .resource       = nor_flash_resources,
-};
-
-/* USBHS */
-static void usb_host_port_power(int port, int power)
-{
-       if (!power) /* only power-on supported for now */
-               return;
-
-       /* set VBOUT/PWEN and EXTLP0 in DVSTCTR */
-       __raw_writew(__raw_readw(IOMEM(0xe6890008)) | 0x600, IOMEM(0xe6890008));
-}
-
-static struct r8a66597_platdata usb_host_data = {
-       .on_chip = 1,
-       .port_power = usb_host_port_power,
-};
-
-static struct resource usb_host_resources[] = {
-       [0] = {
-               .name   = "USBHS",
-               .start  = 0xe6890000,
-               .end    = 0xe68900e5,
-               .flags  = IORESOURCE_MEM,
-       },
-       [1] = {
-               .start  = evt2irq(0x0a20), /* USBHS_USHI0 */
-               .flags  = IORESOURCE_IRQ,
-       },
-};
-
-static struct platform_device usb_host_device = {
-       .name           = "r8a66597_hcd",
-       .id             = 0,
-       .dev = {
-               .platform_data          = &usb_host_data,
-               .dma_mask               = NULL,
-               .coherent_dma_mask      = 0xffffffff,
-       },
-       .num_resources  = ARRAY_SIZE(usb_host_resources),
-       .resource       = usb_host_resources,
-};
-
-/* KEYSC */
-static struct sh_keysc_info keysc_info = {
-       .mode           = SH_KEYSC_MODE_5,
-       .scan_timing    = 3,
-       .delay          = 100,
-       .keycodes = {
-               KEY_A, KEY_B, KEY_C, KEY_D, KEY_E, KEY_F,
-               KEY_G, KEY_H, KEY_I, KEY_J, KEY_K, KEY_L,
-               KEY_M, KEY_N, KEY_U, KEY_P, KEY_Q, KEY_R,
-               KEY_S, KEY_T, KEY_U, KEY_V, KEY_W, KEY_X,
-               KEY_Y, KEY_Z, KEY_HOME, KEY_SLEEP, KEY_WAKEUP, KEY_COFFEE,
-               KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5,
-               KEY_6, KEY_7, KEY_8, KEY_9, KEY_STOP, KEY_COMPUTER,
-       },
-};
-
-static struct resource keysc_resources[] = {
-       [0] = {
-               .name   = "KEYSC",
-               .start  = 0xe61b0000,
-               .end    = 0xe61b000f,
-               .flags  = IORESOURCE_MEM,
-       },
-       [1] = {
-               .start  = evt2irq(0x0be0), /* KEYSC_KEY */
-               .flags  = IORESOURCE_IRQ,
-       },
-};
-
-static struct platform_device keysc_device = {
-       .name           = "sh_keysc",
-       .id             = 0, /* keysc0 clock */
-       .num_resources  = ARRAY_SIZE(keysc_resources),
-       .resource       = keysc_resources,
-       .dev    = {
-               .platform_data  = &keysc_info,
-       },
-};
-
-/* Fixed 3.3V regulator to be used by SDHI0 and SDHI1 */
-static struct regulator_consumer_supply fixed3v3_power_consumers[] =
-{
-       REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
-       REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"),
-       REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"),
-       REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.1"),
-};
-
-/* SDHI */
-static struct sh_mobile_sdhi_info sdhi0_info = {
-       .tmio_caps      = MMC_CAP_SDIO_IRQ,
-};
-
-static struct resource sdhi0_resources[] = {
-       [0] = {
-               .name   = "SDHI0",
-               .start  = 0xe6d50000,
-               .end    = 0xe6d500ff,
-               .flags  = IORESOURCE_MEM,
-       },
-       [1] = {
-               .start  = evt2irq(0x0e00), /* SDHI0 */
-               .flags  = IORESOURCE_IRQ,
-       },
-};
-
-static struct platform_device sdhi0_device = {
-       .name           = "sh_mobile_sdhi",
-       .num_resources  = ARRAY_SIZE(sdhi0_resources),
-       .resource       = sdhi0_resources,
-       .id             = 0,
-       .dev    = {
-               .platform_data  = &sdhi0_info,
-       },
-};
-
-static struct sh_mobile_sdhi_info sdhi1_info = {
-       .tmio_caps      = MMC_CAP_NONREMOVABLE | MMC_CAP_SDIO_IRQ,
-};
-
-static struct resource sdhi1_resources[] = {
-       [0] = {
-               .name   = "SDHI1",
-               .start  = 0xe6d60000,
-               .end    = 0xe6d600ff,
-               .flags  = IORESOURCE_MEM,
-       },
-       [1] = {
-               .start  = evt2irq(0x0e80), /* SDHI1 */
-               .flags  = IORESOURCE_IRQ,
-       },
-};
-
-static struct platform_device sdhi1_device = {
-       .name           = "sh_mobile_sdhi",
-       .num_resources  = ARRAY_SIZE(sdhi1_resources),
-       .resource       = sdhi1_resources,
-       .id             = 1,
-       .dev    = {
-               .platform_data  = &sdhi1_info,
-       },
-};
-
-static struct platform_device *g4evm_devices[] __initdata = {
-       &nor_flash_device,
-       &usb_host_device,
-       &keysc_device,
-       &sdhi0_device,
-       &sdhi1_device,
-};
-
-#define GPIO_SDHID0_D0 IOMEM(0xe60520fc)
-#define GPIO_SDHID0_D1 IOMEM(0xe60520fd)
-#define GPIO_SDHID0_D2 IOMEM(0xe60520fe)
-#define GPIO_SDHID0_D3 IOMEM(0xe60520ff)
-#define GPIO_SDHICMD0  IOMEM(0xe6052100)
-
-#define GPIO_SDHID1_D0 IOMEM(0xe6052103)
-#define GPIO_SDHID1_D1 IOMEM(0xe6052104)
-#define GPIO_SDHID1_D2 IOMEM(0xe6052105)
-#define GPIO_SDHID1_D3 IOMEM(0xe6052106)
-#define GPIO_SDHICMD1  IOMEM(0xe6052107)
-
-static void __init g4evm_init(void)
-{
-       regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers,
-                                    ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
-
-       sh7377_pinmux_init();
-
-       /* Lit DS14 LED */
-       gpio_request(GPIO_PORT109, NULL);
-       gpio_direction_output(GPIO_PORT109, 1);
-       gpio_export(GPIO_PORT109, 1);
-
-       /* Lit DS15 LED */
-       gpio_request(GPIO_PORT110, NULL);
-       gpio_direction_output(GPIO_PORT110, 1);
-       gpio_export(GPIO_PORT110, 1);
-
-       /* Lit DS16 LED */
-       gpio_request(GPIO_PORT112, NULL);
-       gpio_direction_output(GPIO_PORT112, 1);
-       gpio_export(GPIO_PORT112, 1);
-
-       /* Lit DS17 LED */
-       gpio_request(GPIO_PORT113, NULL);
-       gpio_direction_output(GPIO_PORT113, 1);
-       gpio_export(GPIO_PORT113, 1);
-
-       /* USBHS */
-       gpio_request(GPIO_FN_VBUS_0, NULL);
-       gpio_request(GPIO_FN_PWEN, NULL);
-       gpio_request(GPIO_FN_OVCN, NULL);
-       gpio_request(GPIO_FN_OVCN2, NULL);
-       gpio_request(GPIO_FN_EXTLP, NULL);
-       gpio_request(GPIO_FN_IDIN, NULL);
-
-       /* setup USB phy */
-       __raw_writew(0x0200, IOMEM(0xe605810a));       /* USBCR1 */
-       __raw_writew(0x00e0, IOMEM(0xe60581c0));       /* CPFCH */
-       __raw_writew(0x6010, IOMEM(0xe60581c6));       /* CGPOSR */
-       __raw_writew(0x8a0a, IOMEM(0xe605810c));       /* USBCR2 */
-
-       /* KEYSC @ CN31 */
-       gpio_request(GPIO_FN_PORT60_KEYOUT5, NULL);
-       gpio_request(GPIO_FN_PORT61_KEYOUT4, NULL);
-       gpio_request(GPIO_FN_PORT62_KEYOUT3, NULL);
-       gpio_request(GPIO_FN_PORT63_KEYOUT2, NULL);
-       gpio_request(GPIO_FN_PORT64_KEYOUT1, NULL);
-       gpio_request(GPIO_FN_PORT65_KEYOUT0, NULL);
-       gpio_request(GPIO_FN_PORT66_KEYIN0_PU, NULL);
-       gpio_request(GPIO_FN_PORT67_KEYIN1_PU, NULL);
-       gpio_request(GPIO_FN_PORT68_KEYIN2_PU, NULL);
-       gpio_request(GPIO_FN_PORT69_KEYIN3_PU, NULL);
-       gpio_request(GPIO_FN_PORT70_KEYIN4_PU, NULL);
-       gpio_request(GPIO_FN_PORT71_KEYIN5_PU, NULL);
-       gpio_request(GPIO_FN_PORT72_KEYIN6_PU, NULL);
-
-       /* SDHI0 */
-       gpio_request(GPIO_FN_SDHICLK0, NULL);
-       gpio_request(GPIO_FN_SDHICD0, NULL);
-       gpio_request(GPIO_FN_SDHID0_0, NULL);
-       gpio_request(GPIO_FN_SDHID0_1, NULL);
-       gpio_request(GPIO_FN_SDHID0_2, NULL);
-       gpio_request(GPIO_FN_SDHID0_3, NULL);
-       gpio_request(GPIO_FN_SDHICMD0, NULL);
-       gpio_request(GPIO_FN_SDHIWP0, NULL);
-       gpio_request_pullup(GPIO_SDHID0_D0);
-       gpio_request_pullup(GPIO_SDHID0_D1);
-       gpio_request_pullup(GPIO_SDHID0_D2);
-       gpio_request_pullup(GPIO_SDHID0_D3);
-       gpio_request_pullup(GPIO_SDHICMD0);
-
-       /* SDHI1 */
-       gpio_request(GPIO_FN_SDHICLK1, NULL);
-       gpio_request(GPIO_FN_SDHID1_0, NULL);
-       gpio_request(GPIO_FN_SDHID1_1, NULL);
-       gpio_request(GPIO_FN_SDHID1_2, NULL);
-       gpio_request(GPIO_FN_SDHID1_3, NULL);
-       gpio_request(GPIO_FN_SDHICMD1, NULL);
-       gpio_request_pullup(GPIO_SDHID1_D0);
-       gpio_request_pullup(GPIO_SDHID1_D1);
-       gpio_request_pullup(GPIO_SDHID1_D2);
-       gpio_request_pullup(GPIO_SDHID1_D3);
-       gpio_request_pullup(GPIO_SDHICMD1);
-
-       sh7377_add_standard_devices();
-
-       platform_add_devices(g4evm_devices, ARRAY_SIZE(g4evm_devices));
-}
-
-MACHINE_START(G4EVM, "g4evm")
-       .map_io         = sh7377_map_io,
-       .init_early     = sh7377_add_early_devices,
-       .init_irq       = sh7377_init_irq,
-       .handle_irq     = shmobile_handle_irq_intc,
-       .init_machine   = g4evm_init,
-       .init_late      = shmobile_init_late,
-       .timer          = &shmobile_timer,
-MACHINE_END
index 7a05de7..c02448d 100644 (file)
@@ -384,6 +384,8 @@ static struct regulator_consumer_supply fixed2v8_power_consumers[] =
 
 /* SDHI */
 static struct sh_mobile_sdhi_info sdhi0_info = {
+       .dma_slave_tx   = SHDMA_SLAVE_SDHI0_TX,
+       .dma_slave_rx   = SHDMA_SLAVE_SDHI0_RX,
        .tmio_flags     = TMIO_MMC_HAS_IDLE_WAIT,
        .tmio_caps      = MMC_CAP_SD_HIGHSPEED,
        .tmio_ocr_mask  = MMC_VDD_27_28 | MMC_VDD_28_29,
@@ -424,6 +426,8 @@ static struct platform_device sdhi0_device = {
 
 /* Micro SD */
 static struct sh_mobile_sdhi_info sdhi2_info = {
+       .dma_slave_tx   = SHDMA_SLAVE_SDHI2_TX,
+       .dma_slave_rx   = SHDMA_SLAVE_SDHI2_RX,
        .tmio_flags     = TMIO_MMC_HAS_IDLE_WAIT |
                          TMIO_MMC_USE_GPIO_CD |
                          TMIO_MMC_WRPROTECT_DISABLE,
@@ -556,7 +560,15 @@ static struct i2c_board_info i2c0_devices[] = {
        },
        {
                I2C_BOARD_INFO("r2025sd", 0x32),
-       }
+       },
+       {
+               I2C_BOARD_INFO("ak8975", 0x0c),
+               .irq = intcs_evt2irq(0x3380), /* IRQ28 */
+       },
+       {
+               I2C_BOARD_INFO("adxl34x", 0x1d),
+               .irq = intcs_evt2irq(0x3340), /* IRQ26 */
+       },
 };
 
 static struct i2c_board_info i2c1_devices[] = {
index c826d77..f274252 100644 (file)
@@ -1651,7 +1651,12 @@ static void __init mackerel_init(void)
        pm_clk_add(&hdmi_lcdc_device.dev, "hdmi");
 }
 
-MACHINE_START(MACKEREL, "mackerel")
+static const char *mackerel_boards_compat_dt[] __initdata = {
+       "renesas,mackerel",
+       NULL,
+};
+
+DT_MACHINE_START(MACKEREL_DT, "mackerel")
        .map_io         = sh7372_map_io,
        .init_early     = sh7372_add_early_devices,
        .init_irq       = sh7372_init_irq,
@@ -1659,4 +1664,5 @@ MACHINE_START(MACKEREL, "mackerel")
        .init_machine   = mackerel_init,
        .init_late      = sh7372_pm_init_late,
        .timer          = &shmobile_timer,
+       .dt_compat  = mackerel_boards_compat_dt,
 MACHINE_END
index b8a7525..69f7f46 100644 (file)
@@ -30,6 +30,8 @@
 #include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
 #include <linux/smsc911x.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/sh_hspi.h>
 #include <linux/mmc/sh_mobile_sdhi.h>
 #include <linux/mfd/tmio.h>
 #include <mach/hardware.h>
@@ -126,10 +128,27 @@ static struct platform_device thermal_device = {
        .num_resources  = ARRAY_SIZE(thermal_resources),
 };
 
+/* HSPI */
+static struct resource hspi_resources[] = {
+       [0] = {
+               .start          = 0xFFFC7000,
+               .end            = 0xFFFC7018 - 1,
+               .flags          = IORESOURCE_MEM,
+       },
+};
+
+static struct platform_device hspi_device = {
+       .name   = "sh-hspi",
+       .id     = 0,
+       .resource       = hspi_resources,
+       .num_resources  = ARRAY_SIZE(hspi_resources),
+};
+
 static struct platform_device *marzen_devices[] __initdata = {
        &eth_device,
        &sdhi0_device,
        &thermal_device,
+       &hspi_device,
 };
 
 static void __init marzen_init(void)
@@ -163,6 +182,12 @@ static void __init marzen_init(void)
        gpio_request(GPIO_FN_SD0_CD, NULL);
        gpio_request(GPIO_FN_SD0_WP, NULL);
 
+       /* HSPI 0 */
+       gpio_request(GPIO_FN_HSPI_CLK0, NULL);
+       gpio_request(GPIO_FN_HSPI_CS0,  NULL);
+       gpio_request(GPIO_FN_HSPI_TX0,  NULL);
+       gpio_request(GPIO_FN_HSPI_RX0,  NULL);
+
        r8a7779_add_standard_devices();
        platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices));
 }
index f508def..b58bc8a 100644 (file)
@@ -379,7 +379,9 @@ config LEDS_NS2
        tristate "LED support for Network Space v2 GPIO LEDs"
        depends on LEDS_CLASS
        depends on MACH_NETSPACE_V2 || MACH_INETSPACE_V2 || \
-                  MACH_NETSPACE_MAX_V2 || MACH_D2NET_V2
+                  MACH_NETSPACE_MAX_V2 || MACH_D2NET_V2 || \
+                  MACH_NETSPACE_V2_DT || MACH_INETSPACE_V2_DT || \
+                  MACH_NETSPACE_MAX_V2_DT || MACH_NETSPACE_MINI_V2_DT
        default y
        help
          This option enable support for the dual-GPIO LED found on the
index 6315e88..7b75aff 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/leds.h>
 #include <linux/module.h>
 #include <linux/platform_data/leds-kirkwood-ns2.h>
+#include <linux/of_gpio.h>
 
 /*
  * The Network Space v2 dual-GPIO LED is wired to a CPLD and can blink in
@@ -263,6 +264,62 @@ static void delete_ns2_led(struct ns2_led_data *led_dat)
        gpio_free(led_dat->slow);
 }
 
+#ifdef CONFIG_OF_GPIO
+/*
+ * Translate OpenFirmware node properties into platform_data.
+ */
+static int
+ns2_leds_get_of_pdata(struct device *dev, struct ns2_led_platform_data *pdata)
+{
+       struct device_node *np = dev->of_node;
+       struct device_node *child;
+       struct ns2_led *leds;
+       int num_leds = 0;
+       int i = 0;
+
+       num_leds = of_get_child_count(np);
+       if (!num_leds)
+               return -ENODEV;
+
+       leds = devm_kzalloc(dev, num_leds * sizeof(struct ns2_led),
+                           GFP_KERNEL);
+       if (!leds)
+               return -ENOMEM;
+
+       for_each_child_of_node(np, child) {
+               const char *string;
+               int ret;
+
+               ret = of_get_named_gpio(child, "cmd-gpio", 0);
+               if (ret < 0)
+                       return ret;
+               leds[i].cmd = ret;
+               ret = of_get_named_gpio(child, "slow-gpio", 0);
+               if (ret < 0)
+                       return ret;
+               leds[i].slow = ret;
+               ret = of_property_read_string(child, "label", &string);
+               leds[i].name = (ret == 0) ? string : child->name;
+               ret = of_property_read_string(child, "linux,default-trigger",
+                                             &string);
+               if (ret == 0)
+                       leds[i].default_trigger = string;
+
+               i++;
+       }
+
+       pdata->leds = leds;
+       pdata->num_leds = num_leds;
+
+       return 0;
+}
+
+static const struct of_device_id of_ns2_leds_match[] = {
+       { .compatible = "lacie,ns2-leds", },
+       {},
+};
+#endif /* CONFIG_OF_GPIO */
+
 static int ns2_led_probe(struct platform_device *pdev)
 {
        struct ns2_led_platform_data *pdata = pdev->dev.platform_data;
@@ -270,11 +327,25 @@ static int ns2_led_probe(struct platform_device *pdev)
        int i;
        int ret;
 
+#ifdef CONFIG_OF_GPIO
+       if (!pdata) {
+               pdata = devm_kzalloc(&pdev->dev,
+                                    sizeof(struct ns2_led_platform_data),
+                                    GFP_KERNEL);
+               if (!pdata)
+                       return -ENOMEM;
+
+               ret = ns2_leds_get_of_pdata(&pdev->dev, pdata);
+               if (ret)
+                       return ret;
+       }
+#else
        if (!pdata)
                return -EINVAL;
+#endif /* CONFIG_OF_GPIO */
 
        leds_data = devm_kzalloc(&pdev->dev, sizeof(struct ns2_led_data) *
-                           pdata->num_leds, GFP_KERNEL);
+                                pdata->num_leds, GFP_KERNEL);
        if (!leds_data)
                return -ENOMEM;
 
@@ -312,8 +383,9 @@ static struct platform_driver ns2_led_driver = {
        .probe          = ns2_led_probe,
        .remove         = ns2_led_remove,
        .driver         = {
-               .name   = "leds-ns2",
-               .owner  = THIS_MODULE,
+               .name           = "leds-ns2",
+               .owner          = THIS_MODULE,
+               .of_match_table = of_match_ptr(of_ns2_leds_match),
        },
 };