Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2006 Freescale Semiconductor, Inc. |
| 4 | * Dave Liu <daveliu@freescale.com> |
| 5 | * |
| 6 | * Copyright (C) 2007 Logic Product Development, Inc. |
| 7 | * Peter Barada <peterb@logicpd.com> |
| 8 | * |
| 9 | * Copyright (C) 2007 MontaVista Software, Inc. |
| 10 | * Anton Vorontsov <avorontsov@ru.mvista.com> |
| 11 | * |
| 12 | * (C) Copyright 2008 |
| 13 | * Heiko Schocher, DENX Software Engineering, hs@denx.de. |
| 14 | * |
Holger Brunck | 47f5364 | 2013-01-21 03:55:25 +0000 | [diff] [blame] | 15 | * (C) Copyright 2010-2013 |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 16 | * Lukas Roggli, KEYMILE Ltd, lukas.roggli@keymile.com |
Holger Brunck | 5f2a44d | 2011-12-14 16:21:44 +0100 | [diff] [blame] | 17 | * Holger Brunck, Keymile GmbH, holger.bruncl@keymile.com |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 18 | */ |
| 19 | |
| 20 | #ifndef __CONFIG_H |
| 21 | #define __CONFIG_H |
| 22 | |
| 23 | /* |
| 24 | * High Level Configuration Options |
| 25 | */ |
Holger Brunck | 47f5364 | 2013-01-21 03:55:25 +0000 | [diff] [blame] | 26 | #if defined(CONFIG_KMSUPX5) |
Holger Brunck | 7f4bd9a | 2012-03-21 13:42:42 +0100 | [diff] [blame] | 27 | #define CONFIG_KM_BOARD_NAME "kmsupx5" |
Mario Six | 5bc0543 | 2018-03-28 14:38:20 +0200 | [diff] [blame] | 28 | #define CONFIG_HOSTNAME "kmsupx5" |
Holger Brunck | 47f5364 | 2013-01-21 03:55:25 +0000 | [diff] [blame] | 29 | #elif defined(CONFIG_TUGE1) |
Holger Brunck | 7f4bd9a | 2012-03-21 13:42:42 +0100 | [diff] [blame] | 30 | #define CONFIG_KM_BOARD_NAME "tuge1" |
Mario Six | 5bc0543 | 2018-03-28 14:38:20 +0200 | [diff] [blame] | 31 | #define CONFIG_HOSTNAME "tuge1" |
Holger Brunck | 47f5364 | 2013-01-21 03:55:25 +0000 | [diff] [blame] | 32 | #elif defined(CONFIG_TUXX1) /* TUXX1 board (tuxa1/tuda1) specific */ |
Holger Brunck | 7f4bd9a | 2012-03-21 13:42:42 +0100 | [diff] [blame] | 33 | #define CONFIG_KM_BOARD_NAME "tuxx1" |
Mario Six | 5bc0543 | 2018-03-28 14:38:20 +0200 | [diff] [blame] | 34 | #define CONFIG_HOSTNAME "tuxx1" |
Holger Brunck | 4714f8e | 2013-01-21 03:55:26 +0000 | [diff] [blame] | 35 | #elif defined(CONFIG_KMOPTI2) |
| 36 | #define CONFIG_KM_BOARD_NAME "kmopti2" |
Mario Six | 5bc0543 | 2018-03-28 14:38:20 +0200 | [diff] [blame] | 37 | #define CONFIG_HOSTNAME "kmopti2" |
Christoph Dietrich | c1e121e | 2015-11-17 10:53:24 +0100 | [diff] [blame] | 38 | #elif defined(CONFIG_KMTEPR2) |
| 39 | #define CONFIG_KM_BOARD_NAME "kmtepr2" |
Mario Six | 5bc0543 | 2018-03-28 14:38:20 +0200 | [diff] [blame] | 40 | #define CONFIG_HOSTNAME "kmtepr2" |
Holger Brunck | 47f5364 | 2013-01-21 03:55:25 +0000 | [diff] [blame] | 41 | #else |
| 42 | #error ("Board not supported") |
Holger Brunck | f5a474b | 2011-12-14 16:21:45 +0100 | [diff] [blame] | 43 | #endif |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 44 | |
Heiko Schocher | 8ed7434 | 2011-03-08 10:47:39 +0100 | [diff] [blame] | 45 | /* include common defines/options for all 8321 Keymile boards */ |
Valentin Longchamp | 264eaa0 | 2011-05-04 01:47:33 +0000 | [diff] [blame] | 46 | #include "km/km8321-common.h" |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 47 | |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 48 | #define CONFIG_SYS_APP1_BASE 0xA0000000 /* PAXG */ |
| 49 | #define CONFIG_SYS_APP1_SIZE 256 /* Megabytes */ |
Christoph Dietrich | c1e121e | 2015-11-17 10:53:24 +0100 | [diff] [blame] | 50 | #if defined(CONFIG_TUXX1) || defined(CONFIG_KMOPTI2) || defined(CONFIG_KMTEPR2) |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 51 | #define CONFIG_SYS_APP2_BASE 0xB0000000 /* PINC3 */ |
| 52 | #define CONFIG_SYS_APP2_SIZE 256 /* Megabytes */ |
Holger Brunck | f5a474b | 2011-12-14 16:21:45 +0100 | [diff] [blame] | 53 | #endif |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 54 | |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 55 | /* |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 56 | * Init Local Bus Memory Controller: |
Christoph Dietrich | c1e121e | 2015-11-17 10:53:24 +0100 | [diff] [blame] | 57 | * Device on board |
| 58 | * Bank Bus Machine PortSz Size TUDA1 TUXA1 TUGE1 KMSUPX4 KMOPTI2 |
| 59 | * ----------------------------------------------------------------------------- |
| 60 | * 2 Local GPCM 8 bit 256MB PAXG LPXF PAXI LPXF PAXE |
| 61 | * 3 Local GPCM 8 bit 256MB PINC3 PINC2 unused unused OPI2(16 bit) |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 62 | * |
Christoph Dietrich | c1e121e | 2015-11-17 10:53:24 +0100 | [diff] [blame] | 63 | * Device on board (continued) |
| 64 | * Bank Bus Machine PortSz Size KMTEPR2 |
| 65 | * ----------------------------------------------------------------------------- |
| 66 | * 2 Local GPCM 8 bit 256MB NVRAM |
| 67 | * 3 Local GPCM 8 bit 256MB TEP2 (16 bit) |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 68 | */ |
| 69 | |
Christoph Dietrich | c1e121e | 2015-11-17 10:53:24 +0100 | [diff] [blame] | 70 | #if defined(CONFIG_KMTEPRO2) |
| 71 | /* |
| 72 | * Configuration for C2 (NVRAM) on the local bus |
| 73 | */ |
| 74 | #define CONFIG_SYS_LBLAWBAR2_PRELIM CONFIG_SYS_APP1_BASE |
| 75 | #define CONFIG_SYS_LBLAWAR2_PRELIM (LBLAWAR_EN | LBLAWAR_256MB) |
| 76 | #define CONFIG_SYS_BR2_PRELIM (CONFIG_SYS_APP1_BASE | \ |
| 77 | BR_PS_8 | \ |
| 78 | BR_MS_GPCM | \ |
| 79 | BR_V) |
| 80 | #define CONFIG_SYS_OR2_PRELIM (MEG_TO_AM(CONFIG_SYS_APP1_SIZE) | \ |
| 81 | OR_GPCM_CSNT | \ |
| 82 | OR_GPCM_ACS_DIV2 | \ |
| 83 | OR_GPCM_XACS | \ |
| 84 | OR_GPCM_SCY_2 | \ |
| 85 | OR_GPCM_TRLX_SET | \ |
| 86 | OR_GPCM_EHTR_SET | \ |
| 87 | OR_GPCM_EAD) |
| 88 | #else |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 89 | /* |
Holger Brunck | 5f2a44d | 2011-12-14 16:21:44 +0100 | [diff] [blame] | 90 | * Configuration for C2 on the local bus |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 91 | */ |
| 92 | /* Window base at flash base */ |
| 93 | #define CONFIG_SYS_LBLAWBAR2_PRELIM CONFIG_SYS_APP1_BASE |
| 94 | /* Window size: 256 MB */ |
| 95 | #define CONFIG_SYS_LBLAWAR2_PRELIM (LBLAWAR_EN | LBLAWAR_256MB) |
| 96 | |
| 97 | #define CONFIG_SYS_BR2_PRELIM (CONFIG_SYS_APP1_BASE | \ |
| 98 | BR_PS_8 | \ |
| 99 | BR_MS_GPCM | \ |
| 100 | BR_V) |
| 101 | |
| 102 | #define CONFIG_SYS_OR2_PRELIM (MEG_TO_AM(CONFIG_SYS_APP1_SIZE) | \ |
| 103 | OR_GPCM_CSNT | \ |
| 104 | OR_GPCM_ACS_DIV4 | \ |
| 105 | OR_GPCM_SCY_2 | \ |
Joe Hershberger | 7d6a098 | 2011-10-11 23:57:30 -0500 | [diff] [blame] | 106 | OR_GPCM_TRLX_SET | \ |
| 107 | OR_GPCM_EHTR_CLEAR | \ |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 108 | OR_GPCM_EAD) |
Christoph Dietrich | c1e121e | 2015-11-17 10:53:24 +0100 | [diff] [blame] | 109 | #endif |
| 110 | |
Holger Brunck | 47f5364 | 2013-01-21 03:55:25 +0000 | [diff] [blame] | 111 | #if defined(CONFIG_TUXX1) |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 112 | /* |
Holger Brunck | 5f2a44d | 2011-12-14 16:21:44 +0100 | [diff] [blame] | 113 | * Configuration for C3 on the local bus |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 114 | */ |
| 115 | /* Access window base at PINC3 base */ |
| 116 | #define CONFIG_SYS_LBLAWBAR3_PRELIM CONFIG_SYS_APP2_BASE |
| 117 | /* Window size: 256 MB */ |
| 118 | #define CONFIG_SYS_LBLAWAR3_PRELIM (LBLAWAR_EN | LBLAWAR_256MB) |
| 119 | |
| 120 | #define CONFIG_SYS_BR3_PRELIM (CONFIG_SYS_APP2_BASE | \ |
| 121 | BR_PS_8 | \ |
| 122 | BR_MS_GPCM | \ |
| 123 | BR_V) |
| 124 | |
| 125 | #define CONFIG_SYS_OR3_PRELIM (MEG_TO_AM(CONFIG_SYS_APP2_SIZE) | \ |
| 126 | OR_GPCM_CSNT | \ |
Joe Hershberger | 7d6a098 | 2011-10-11 23:57:30 -0500 | [diff] [blame] | 127 | OR_GPCM_ACS_DIV2 | \ |
| 128 | OR_GPCM_SCY_2 | \ |
| 129 | OR_GPCM_TRLX_SET | \ |
| 130 | OR_GPCM_EHTR_CLEAR) |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 131 | |
| 132 | #define CONFIG_SYS_MAMR (MxMR_GPL_x4DIS | \ |
| 133 | 0x0000c000 | \ |
| 134 | MxMR_WLFx_2X) |
Holger Brunck | f5a474b | 2011-12-14 16:21:45 +0100 | [diff] [blame] | 135 | #endif |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 136 | |
Christoph Dietrich | c1e121e | 2015-11-17 10:53:24 +0100 | [diff] [blame] | 137 | #if defined(CONFIG_KMOPTI2) || defined(CONFIG_KMTEPR2) |
Holger Brunck | 4714f8e | 2013-01-21 03:55:26 +0000 | [diff] [blame] | 138 | /* |
| 139 | * Configuration for C3 on the local bus |
| 140 | */ |
| 141 | #define CONFIG_SYS_LBLAWBAR3_PRELIM CONFIG_SYS_APP2_BASE |
| 142 | #define CONFIG_SYS_LBLAWAR3_PRELIM (LBLAWAR_EN | LBLAWAR_256MB) |
| 143 | #define CONFIG_SYS_BR3_PRELIM (CONFIG_SYS_APP2_BASE | \ |
| 144 | BR_PS_16 | \ |
| 145 | BR_MS_GPCM | \ |
| 146 | BR_V) |
| 147 | #define CONFIG_SYS_OR3_PRELIM (MEG_TO_AM(CONFIG_SYS_APP2_SIZE) | \ |
| 148 | OR_GPCM_SCY_4 | \ |
| 149 | OR_GPCM_TRLX_CLEAR | \ |
| 150 | OR_GPCM_EHTR_CLEAR) |
| 151 | #endif |
| 152 | |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 153 | /* |
| 154 | * MMU Setup |
| 155 | */ |
Holger Brunck | 5f2a44d | 2011-12-14 16:21:44 +0100 | [diff] [blame] | 156 | /* APP1: icache cacheable, but dcache-inhibit and guarded */ |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 157 | #define CONFIG_SYS_IBAT5L (CONFIG_SYS_APP1_BASE | \ |
Joe Hershberger | 72cd408 | 2011-10-11 23:57:28 -0500 | [diff] [blame] | 158 | BATL_PP_RW | \ |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 159 | BATL_MEMCOHERENCE) |
| 160 | /* 512M should also include APP2... */ |
| 161 | #define CONFIG_SYS_IBAT5U (CONFIG_SYS_APP1_BASE | \ |
| 162 | BATU_BL_256M | \ |
| 163 | BATU_VS | \ |
| 164 | BATU_VP) |
| 165 | #define CONFIG_SYS_DBAT5L (CONFIG_SYS_APP1_BASE | \ |
Joe Hershberger | 72cd408 | 2011-10-11 23:57:28 -0500 | [diff] [blame] | 166 | BATL_PP_RW | \ |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 167 | BATL_CACHEINHIBIT | \ |
| 168 | BATL_GUARDEDSTORAGE) |
| 169 | #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U |
| 170 | |
Holger Brunck | 47f5364 | 2013-01-21 03:55:25 +0000 | [diff] [blame] | 171 | #if defined(CONFIG_TUGE1) || defined(CONFIG_KMSUPX5) |
Holger Brunck | f5a474b | 2011-12-14 16:21:45 +0100 | [diff] [blame] | 172 | #define CONFIG_SYS_IBAT6L (0) |
| 173 | #define CONFIG_SYS_IBAT6U (0) |
| 174 | #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L |
| 175 | #else |
Holger Brunck | 5f2a44d | 2011-12-14 16:21:44 +0100 | [diff] [blame] | 176 | /* APP2: icache cacheable, but dcache-inhibit and guarded */ |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 177 | #define CONFIG_SYS_IBAT6L (CONFIG_SYS_APP2_BASE | \ |
Joe Hershberger | 72cd408 | 2011-10-11 23:57:28 -0500 | [diff] [blame] | 178 | BATL_PP_RW | \ |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 179 | BATL_MEMCOHERENCE) |
| 180 | #define CONFIG_SYS_IBAT6U (CONFIG_SYS_APP2_BASE | \ |
| 181 | BATU_BL_256M | \ |
| 182 | BATU_VS | \ |
| 183 | BATU_VP) |
| 184 | #define CONFIG_SYS_DBAT6L (CONFIG_SYS_APP2_BASE | \ |
Joe Hershberger | 72cd408 | 2011-10-11 23:57:28 -0500 | [diff] [blame] | 185 | BATL_PP_RW | \ |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 186 | BATL_CACHEINHIBIT | \ |
| 187 | BATL_GUARDEDSTORAGE) |
Holger Brunck | f5a474b | 2011-12-14 16:21:45 +0100 | [diff] [blame] | 188 | #endif |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 189 | #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U |
| 190 | |
| 191 | #define CONFIG_SYS_IBAT7L (0) |
| 192 | #define CONFIG_SYS_IBAT7U (0) |
| 193 | #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L |
| 194 | #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U |
Heiko Schocher | dc6033e | 2010-04-01 12:10:30 +0200 | [diff] [blame] | 195 | |
| 196 | #endif /* __CONFIG_H */ |