diff options
author | Nicolas Ferre <nicolas.ferre@atmel.com> | 2015-07-30 13:12:12 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2015-08-05 04:40:21 -0400 |
commit | c268a743103aebba8d81d3365107f7170653099e (patch) | |
tree | 57222dbf105402261ac9a04cf5fd5a897578d11c | |
parent | f15107f41282d5ae9c6c26832dcc485729821ccc (diff) |
ARM: at91/soc: add basic support for new sama5d2 SoC
Add Kconfig entries, header file changes and addition to the documentation.
The early debug infrastructure is also added for easy development.
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
-rw-r--r-- | Documentation/arm/Atmel/README | 5 | ||||
-rw-r--r-- | Documentation/devicetree/bindings/arm/atmel-at91.txt | 2 | ||||
-rw-r--r-- | arch/arm/Kconfig.debug | 6 | ||||
-rw-r--r-- | arch/arm/include/debug/at91.S | 5 | ||||
-rw-r--r-- | arch/arm/mach-at91/Kconfig | 12 | ||||
-rw-r--r-- | arch/arm/mach-at91/sama5.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-at91/soc.h | 3 |
7 files changed, 35 insertions, 1 deletions
diff --git a/Documentation/arm/Atmel/README b/Documentation/arm/Atmel/README index c53a19b4aab2..0931cf7e2e56 100644 --- a/Documentation/arm/Atmel/README +++ b/Documentation/arm/Atmel/README | |||
@@ -90,6 +90,11 @@ the Atmel website: http://www.atmel.com. | |||
90 | + Datasheet | 90 | + Datasheet |
91 | http://www.atmel.com/Images/Atmel-11238-32-bit-Cortex-A5-Microcontroller-SAMA5D4_Datasheet.pdf | 91 | http://www.atmel.com/Images/Atmel-11238-32-bit-Cortex-A5-Microcontroller-SAMA5D4_Datasheet.pdf |
92 | 92 | ||
93 | - sama5d2 family | ||
94 | - sama5d27 | ||
95 | + Datasheet | ||
96 | Coming soon | ||
97 | |||
93 | 98 | ||
94 | Linux kernel information | 99 | Linux kernel information |
95 | ------------------------ | 100 | ------------------------ |
diff --git a/Documentation/devicetree/bindings/arm/atmel-at91.txt b/Documentation/devicetree/bindings/arm/atmel-at91.txt index 424ac8cbfa08..7f04b8ae4ca9 100644 --- a/Documentation/devicetree/bindings/arm/atmel-at91.txt +++ b/Documentation/devicetree/bindings/arm/atmel-at91.txt | |||
@@ -27,6 +27,8 @@ compatible: must be one of: | |||
27 | o "atmel,at91sam9xe" | 27 | o "atmel,at91sam9xe" |
28 | * "atmel,sama5" for SoCs using a Cortex-A5, shall be extended with the specific | 28 | * "atmel,sama5" for SoCs using a Cortex-A5, shall be extended with the specific |
29 | SoC family: | 29 | SoC family: |
30 | o "atmel,sama5d2" shall be extended with the specific SoC compatible: | ||
31 | - "atmel,sama5d27" | ||
30 | o "atmel,sama5d3" shall be extended with the specific SoC compatible: | 32 | o "atmel,sama5d3" shall be extended with the specific SoC compatible: |
31 | - "atmel,sama5d31" | 33 | - "atmel,sama5d31" |
32 | - "atmel,sama5d33" | 34 | - "atmel,sama5d33" |
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index a2e16f940394..946c8c0fa1fb 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug | |||
@@ -141,6 +141,12 @@ choice | |||
141 | depends on ARCH_AT91 | 141 | depends on ARCH_AT91 |
142 | depends on SOC_SAMA5 | 142 | depends on SOC_SAMA5 |
143 | 143 | ||
144 | config AT91_DEBUG_LL_DBGU3 | ||
145 | bool "Kernel low-level debugging on sama5d2" | ||
146 | select DEBUG_AT91_UART | ||
147 | depends on ARCH_AT91 | ||
148 | depends on SOC_SAMA5 | ||
149 | |||
144 | config DEBUG_BCM2835 | 150 | config DEBUG_BCM2835 |
145 | bool "Kernel low-level debugging on BCM2835 PL011 UART" | 151 | bool "Kernel low-level debugging on BCM2835 PL011 UART" |
146 | depends on ARCH_BCM2835 | 152 | depends on ARCH_BCM2835 |
diff --git a/arch/arm/include/debug/at91.S b/arch/arm/include/debug/at91.S index c3c45e628e33..2556a8801c8c 100644 --- a/arch/arm/include/debug/at91.S +++ b/arch/arm/include/debug/at91.S | |||
@@ -13,9 +13,12 @@ | |||
13 | #define AT91_DBGU 0xfffff200 /* AT91_BASE_DBGU0 */ | 13 | #define AT91_DBGU 0xfffff200 /* AT91_BASE_DBGU0 */ |
14 | #elif defined(CONFIG_AT91_DEBUG_LL_DBGU1) | 14 | #elif defined(CONFIG_AT91_DEBUG_LL_DBGU1) |
15 | #define AT91_DBGU 0xffffee00 /* AT91_BASE_DBGU1 */ | 15 | #define AT91_DBGU 0xffffee00 /* AT91_BASE_DBGU1 */ |
16 | #else | 16 | #elif defined(CONFIG_AT91_DEBUG_LL_DBGU2) |
17 | /* On sama5d4, use USART3 as low level serial console */ | 17 | /* On sama5d4, use USART3 as low level serial console */ |
18 | #define AT91_DBGU 0xfc00c000 /* SAMA5D4_BASE_USART3 */ | 18 | #define AT91_DBGU 0xfc00c000 /* SAMA5D4_BASE_USART3 */ |
19 | #else | ||
20 | /* On sama5d2, use UART1 as low level serial console */ | ||
21 | #define AT91_DBGU 0xf8020000 | ||
19 | #endif | 22 | #endif |
20 | 23 | ||
21 | #ifdef CONFIG_MMU | 24 | #ifdef CONFIG_MMU |
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index fd95f34945f4..89a755b90db2 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig | |||
@@ -8,6 +8,18 @@ menuconfig ARCH_AT91 | |||
8 | select SOC_BUS | 8 | select SOC_BUS |
9 | 9 | ||
10 | if ARCH_AT91 | 10 | if ARCH_AT91 |
11 | config SOC_SAMA5D2 | ||
12 | bool "SAMA5D2 family" if ARCH_MULTI_V7 | ||
13 | select SOC_SAMA5 | ||
14 | select CACHE_L2X0 | ||
15 | select HAVE_FB_ATMEL | ||
16 | select HAVE_AT91_UTMI | ||
17 | select HAVE_AT91_USB_CLK | ||
18 | select HAVE_AT91_H32MX | ||
19 | select HAVE_AT91_GENERATED_CLK | ||
20 | help | ||
21 | Select this if ou are using one of Atmel's SAMA5D2 family SoC. | ||
22 | |||
11 | config SOC_SAMA5D3 | 23 | config SOC_SAMA5D3 |
12 | bool "SAMA5D3 family" if ARCH_MULTI_V7 | 24 | bool "SAMA5D3 family" if ARCH_MULTI_V7 |
13 | select SOC_SAMA5 | 25 | select SOC_SAMA5 |
diff --git a/arch/arm/mach-at91/sama5.c b/arch/arm/mach-at91/sama5.c index 41d829d8e7d5..90c3c3051ae7 100644 --- a/arch/arm/mach-at91/sama5.c +++ b/arch/arm/mach-at91/sama5.c | |||
@@ -18,6 +18,8 @@ | |||
18 | #include "soc.h" | 18 | #include "soc.h" |
19 | 19 | ||
20 | static const struct at91_soc sama5_socs[] = { | 20 | static const struct at91_soc sama5_socs[] = { |
21 | AT91_SOC(SAMA5D2_CIDR_MATCH, SAMA5D27_EXID_MATCH, | ||
22 | "sama5d27", "sama5d2"), | ||
21 | AT91_SOC(SAMA5D3_CIDR_MATCH, SAMA5D31_EXID_MATCH, | 23 | AT91_SOC(SAMA5D3_CIDR_MATCH, SAMA5D31_EXID_MATCH, |
22 | "sama5d31", "sama5d3"), | 24 | "sama5d31", "sama5d3"), |
23 | AT91_SOC(SAMA5D3_CIDR_MATCH, SAMA5D33_EXID_MATCH, | 25 | AT91_SOC(SAMA5D3_CIDR_MATCH, SAMA5D33_EXID_MATCH, |
@@ -64,6 +66,7 @@ DT_MACHINE_START(sama5_dt, "Atmel SAMA5") | |||
64 | MACHINE_END | 66 | MACHINE_END |
65 | 67 | ||
66 | static const char *sama5_alt_dt_board_compat[] __initconst = { | 68 | static const char *sama5_alt_dt_board_compat[] __initconst = { |
69 | "atmel,sama5d2", | ||
67 | "atmel,sama5d4", | 70 | "atmel,sama5d4", |
68 | NULL | 71 | NULL |
69 | }; | 72 | }; |
diff --git a/arch/arm/mach-at91/soc.h b/arch/arm/mach-at91/soc.h index be23c400596b..8ede0ef86172 100644 --- a/arch/arm/mach-at91/soc.h +++ b/arch/arm/mach-at91/soc.h | |||
@@ -62,6 +62,9 @@ at91_soc_init(const struct at91_soc *socs); | |||
62 | #define AT91SAM9XE256_CIDR_MATCH 0x329a93a0 | 62 | #define AT91SAM9XE256_CIDR_MATCH 0x329a93a0 |
63 | #define AT91SAM9XE512_CIDR_MATCH 0x329aa3a0 | 63 | #define AT91SAM9XE512_CIDR_MATCH 0x329aa3a0 |
64 | 64 | ||
65 | #define SAMA5D2_CIDR_MATCH 0x0a5c08c0 | ||
66 | #define SAMA5D27_EXID_MATCH 0x00000021 | ||
67 | |||
65 | #define SAMA5D3_CIDR_MATCH 0x0a5c07c0 | 68 | #define SAMA5D3_CIDR_MATCH 0x0a5c07c0 |
66 | #define SAMA5D31_EXID_MATCH 0x00444300 | 69 | #define SAMA5D31_EXID_MATCH 0x00444300 |
67 | #define SAMA5D33_EXID_MATCH 0x00414300 | 70 | #define SAMA5D33_EXID_MATCH 0x00414300 |