diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2012-04-06 04:28:59 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-05-12 16:33:03 -0400 |
commit | 4d22e564ca7bb5c7340c782aedd93bed99f3fb41 (patch) | |
tree | d4e136a6eedff091a5af1d9de333554608e4068d | |
parent | c8241085e8606a14ef48e6d99556133c48aaddaf (diff) |
ARM: mach-shmobile: add armadillo800eva board support.
This adds very basic armadillo800eva board (R-Mobile A1) support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Simon Horman <horms@verge.net.au>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
-rw-r--r-- | arch/arm/mach-shmobile/Kconfig | 11 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-armadillo800eva.c | 154 |
3 files changed, 164 insertions, 2 deletions
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 34560cab45d9..7828a7a5f8d6 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig | |||
@@ -93,6 +93,11 @@ config MACH_BONITO | |||
93 | select ARCH_REQUIRE_GPIOLIB | 93 | select ARCH_REQUIRE_GPIOLIB |
94 | depends on ARCH_R8A7740 | 94 | depends on ARCH_R8A7740 |
95 | 95 | ||
96 | config MACH_ARMADILLO800EVA | ||
97 | bool "Armadillo-800 EVA board" | ||
98 | depends on ARCH_R8A7740 | ||
99 | select ARCH_REQUIRE_GPIOLIB | ||
100 | |||
96 | config MACH_MARZEN | 101 | config MACH_MARZEN |
97 | bool "MARZEN board" | 102 | bool "MARZEN board" |
98 | depends on ARCH_R8A7779 | 103 | depends on ARCH_R8A7779 |
@@ -110,7 +115,8 @@ config MEMORY_START | |||
110 | hex "Physical memory start address" | 115 | hex "Physical memory start address" |
111 | default "0x50000000" if MACH_G3EVM | 116 | default "0x50000000" if MACH_G3EVM |
112 | default "0x40000000" if MACH_G4EVM || MACH_AP4EVB || MACH_AG5EVM || \ | 117 | default "0x40000000" if MACH_G4EVM || MACH_AP4EVB || MACH_AG5EVM || \ |
113 | MACH_MACKEREL || MACH_BONITO | 118 | MACH_MACKEREL || MACH_BONITO || \ |
119 | MACH_ARMADILLO800EVA | ||
114 | default "0x41000000" if MACH_KOTA2 | 120 | default "0x41000000" if MACH_KOTA2 |
115 | default "0x00000000" | 121 | default "0x00000000" |
116 | ---help--- | 122 | ---help--- |
@@ -122,7 +128,8 @@ config MEMORY_SIZE | |||
122 | hex "Physical memory size" | 128 | hex "Physical memory size" |
123 | default "0x08000000" if MACH_G3EVM | 129 | default "0x08000000" if MACH_G3EVM |
124 | default "0x08000000" if MACH_G4EVM | 130 | default "0x08000000" if MACH_G4EVM |
125 | default "0x20000000" if MACH_AG5EVM || MACH_BONITO | 131 | default "0x20000000" if MACH_AG5EVM || MACH_BONITO || \ |
132 | MACH_ARMADILLO800EVA | ||
126 | default "0x1e000000" if MACH_KOTA2 | 133 | default "0x1e000000" if MACH_KOTA2 |
127 | default "0x10000000" if MACH_AP4EVB || MACH_MACKEREL | 134 | default "0x10000000" if MACH_AP4EVB || MACH_MACKEREL |
128 | default "0x04000000" | 135 | default "0x04000000" |
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile index e7c2590b75d9..6125c2b4d523 100644 --- a/arch/arm/mach-shmobile/Makefile +++ b/arch/arm/mach-shmobile/Makefile | |||
@@ -49,6 +49,7 @@ obj-$(CONFIG_MACH_MACKEREL) += board-mackerel.o | |||
49 | obj-$(CONFIG_MACH_KOTA2) += board-kota2.o | 49 | obj-$(CONFIG_MACH_KOTA2) += board-kota2.o |
50 | obj-$(CONFIG_MACH_BONITO) += board-bonito.o | 50 | obj-$(CONFIG_MACH_BONITO) += board-bonito.o |
51 | obj-$(CONFIG_MACH_MARZEN) += board-marzen.o | 51 | obj-$(CONFIG_MACH_MARZEN) += board-marzen.o |
52 | obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o | ||
52 | 53 | ||
53 | # Framework support | 54 | # Framework support |
54 | obj-$(CONFIG_SMP) += $(smp-y) | 55 | obj-$(CONFIG_SMP) += $(smp-y) |
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c new file mode 100644 index 000000000000..28bc259c50df --- /dev/null +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c | |||
@@ -0,0 +1,154 @@ | |||
1 | /* | ||
2 | * armadillo 800 eva board support | ||
3 | * | ||
4 | * Copyright (C) 2012 Renesas Solutions Corp. | ||
5 | * Copyright (C) 2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; version 2 of the License. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
19 | * | ||
20 | */ | ||
21 | |||
22 | #include <linux/clk.h> | ||
23 | #include <linux/err.h> | ||
24 | #include <linux/kernel.h> | ||
25 | #include <linux/platform_device.h> | ||
26 | #include <linux/gpio.h> | ||
27 | #include <mach/common.h> | ||
28 | #include <mach/irqs.h> | ||
29 | #include <asm/page.h> | ||
30 | #include <asm/mach-types.h> | ||
31 | #include <asm/mach/arch.h> | ||
32 | #include <asm/mach/map.h> | ||
33 | #include <asm/mach/time.h> | ||
34 | #include <asm/hardware/cache-l2x0.h> | ||
35 | #include <mach/r8a7740.h> | ||
36 | |||
37 | /* | ||
38 | * CON1 Camera Module | ||
39 | * CON2 Extension Bus | ||
40 | * CON3 HDMI Output | ||
41 | * CON4 Composite Video Output | ||
42 | * CON5 H-UDI JTAG | ||
43 | * CON6 ARM JTAG | ||
44 | * CON7 SD1 | ||
45 | * CON8 SD2 | ||
46 | * CON9 RTC BackUp | ||
47 | * CON10 Monaural Mic Input | ||
48 | * CON11 Stereo Headphone Output | ||
49 | * CON12 Audio Line Output(L) | ||
50 | * CON13 Audio Line Output(R) | ||
51 | * CON14 AWL13 Module | ||
52 | * CON15 Extension | ||
53 | * CON16 LCD1 | ||
54 | * CON17 LCD2 | ||
55 | * CON19 Power Input | ||
56 | * CON20 USB1 | ||
57 | * CON21 USB2 | ||
58 | * CON22 Serial | ||
59 | * CON23 LAN | ||
60 | * CON24 USB3 | ||
61 | * LED1 Camera LED(Yellow) | ||
62 | * LED2 Power LED (Green) | ||
63 | * ED3-LED6 User LED(Yellow) | ||
64 | * LED7 LAN link LED(Green) | ||
65 | * LED8 LAN activity LED(Yellow) | ||
66 | */ | ||
67 | |||
68 | /* | ||
69 | * DipSwitch | ||
70 | * | ||
71 | * SW1 | ||
72 | * | ||
73 | * -12345678-+---------------+---------------------------- | ||
74 | * 1 | boot | hermit | ||
75 | * 0 | boot | OS auto boot | ||
76 | * -12345678-+---------------+---------------------------- | ||
77 | * 00 | boot device | eMMC | ||
78 | * 10 | boot device | SDHI0 (CON7) | ||
79 | * 01 | boot device | - | ||
80 | * 11 | boot device | Extension Buss (CS0) | ||
81 | * -12345678-+---------------+---------------------------- | ||
82 | * 0 | Extension Bus | D8-D15 disable, eMMC enable | ||
83 | * 1 | Extension Bus | D8-D15 enable, eMMC disable | ||
84 | * -12345678-+---------------+---------------------------- | ||
85 | * 0 | SDHI1 | COM8 enable, COM14 disable | ||
86 | * 1 | SDHI1 | COM8 enable, COM14 disable | ||
87 | * -12345678-+---------------+---------------------------- | ||
88 | * 00 | JTAG | SH-X2 | ||
89 | * 10 | JTAG | ARM | ||
90 | * 01 | JTAG | - | ||
91 | * 11 | JTAG | Boundary Scan | ||
92 | *-----------+---------------+---------------------------- | ||
93 | */ | ||
94 | |||
95 | /* | ||
96 | * board devices | ||
97 | */ | ||
98 | static struct platform_device *eva_devices[] __initdata = { | ||
99 | }; | ||
100 | |||
101 | /* | ||
102 | * board init | ||
103 | */ | ||
104 | static void __init eva_init(void) | ||
105 | { | ||
106 | r8a7740_pinmux_init(); | ||
107 | |||
108 | /* SCIFA1 */ | ||
109 | gpio_request(GPIO_FN_SCIFA1_RXD, NULL); | ||
110 | gpio_request(GPIO_FN_SCIFA1_TXD, NULL); | ||
111 | |||
112 | #ifdef CONFIG_CACHE_L2X0 | ||
113 | /* Early BRESP enable, Shared attribute override enable, 32K*8way */ | ||
114 | l2x0_init(__io(0xf0002000), 0x40440000, 0x82000fff); | ||
115 | #endif | ||
116 | |||
117 | r8a7740_add_standard_devices(); | ||
118 | |||
119 | platform_add_devices(eva_devices, | ||
120 | ARRAY_SIZE(eva_devices)); | ||
121 | } | ||
122 | |||
123 | static void __init eva_earlytimer_init(void) | ||
124 | { | ||
125 | struct clk *xtal1; | ||
126 | |||
127 | r8a7740_clock_init(MD_CK0 | MD_CK2); | ||
128 | |||
129 | xtal1 = clk_get(NULL, "extal1"); | ||
130 | if (!IS_ERR(xtal1)) { | ||
131 | /* armadillo 800 eva extal1 is 24MHz */ | ||
132 | clk_set_rate(xtal1, 24000000); | ||
133 | clk_put(xtal1); | ||
134 | } | ||
135 | |||
136 | shmobile_earlytimer_init(); | ||
137 | } | ||
138 | |||
139 | static void __init eva_add_early_devices(void) | ||
140 | { | ||
141 | r8a7740_add_early_devices(); | ||
142 | |||
143 | /* override timer setup with board-specific code */ | ||
144 | shmobile_timer.init = eva_earlytimer_init; | ||
145 | } | ||
146 | |||
147 | MACHINE_START(ARMADILLO800EVA, "armadillo800eva") | ||
148 | .map_io = r8a7740_map_io, | ||
149 | .init_early = eva_add_early_devices, | ||
150 | .init_irq = r8a7740_init_irq, | ||
151 | .handle_irq = shmobile_handle_irq_intc, | ||
152 | .init_machine = eva_init, | ||
153 | .timer = &shmobile_timer, | ||
154 | MACHINE_END | ||