1*877bfe37SValentin Longchamp /* 2*877bfe37SValentin Longchamp * (C) Copyright 2013 Keymile AG 3*877bfe37SValentin Longchamp * Valentin Longchamp <valentin.longchamp@keymile.com> 4*877bfe37SValentin Longchamp * 5*877bfe37SValentin Longchamp * SPDX-License-Identifier: GPL-2.0+ 6*877bfe37SValentin Longchamp */ 7*877bfe37SValentin Longchamp 8*877bfe37SValentin Longchamp #ifndef __CONFIG_H 9*877bfe37SValentin Longchamp #define __CONFIG_H 10*877bfe37SValentin Longchamp 11*877bfe37SValentin Longchamp /* KMLION1 */ 12*877bfe37SValentin Longchamp #if defined(CONFIG_KMLION1) 13*877bfe37SValentin Longchamp #define CONFIG_HOSTNAME kmlion1 14*877bfe37SValentin Longchamp #define CONFIG_KM_BOARD_NAME "kmlion1" 15*877bfe37SValentin Longchamp 16*877bfe37SValentin Longchamp #else 17*877bfe37SValentin Longchamp #error ("Board not supported") 18*877bfe37SValentin Longchamp #endif 19*877bfe37SValentin Longchamp 20*877bfe37SValentin Longchamp #define CONFIG_KMP204X 21*877bfe37SValentin Longchamp 22*877bfe37SValentin Longchamp #include "km/kmp204x-common.h" 23*877bfe37SValentin Longchamp 24*877bfe37SValentin Longchamp #if defined(CONFIG_KMLION1) 25*877bfe37SValentin Longchamp /* App1 Local bus */ 26*877bfe37SValentin Longchamp #define CONFIG_SYS_LBAPP1_BASE 0xD0000000 27*877bfe37SValentin Longchamp #define CONFIG_SYS_LBAPP1_BASE_PHYS 0xFD0000000ull 28*877bfe37SValentin Longchamp 29*877bfe37SValentin Longchamp #define CONFIG_SYS_LBAPP1_BR_PRELIM (BR_PHYS_ADDR(CONFIG_SYS_LBAPP1_BASE_PHYS) \ 30*877bfe37SValentin Longchamp | BR_PS_8 /* Port Size 8 bits */ \ 31*877bfe37SValentin Longchamp | BR_DECC_OFF /* no error corr */ \ 32*877bfe37SValentin Longchamp | BR_MS_GPCM /* MSEL = GPCM */ \ 33*877bfe37SValentin Longchamp | BR_V) /* valid */ 34*877bfe37SValentin Longchamp 35*877bfe37SValentin Longchamp #define CONFIG_SYS_LBAPP1_OR_PRELIM (OR_AM_256MB /* length 256MB */ \ 36*877bfe37SValentin Longchamp | OR_GPCM_ACS_DIV2 /* LCS 1/2 clk after */ \ 37*877bfe37SValentin Longchamp | OR_GPCM_CSNT /* LCS 1/4 clk before */ \ 38*877bfe37SValentin Longchamp | OR_GPCM_SCY_2 /* 2 clk wait cycles */ \ 39*877bfe37SValentin Longchamp | OR_GPCM_TRLX /* relaxed tmgs */ \ 40*877bfe37SValentin Longchamp | OR_GPCM_EAD) /* extra bus clk cycles */ 41*877bfe37SValentin Longchamp /* Local bus app1 Base Address */ 42*877bfe37SValentin Longchamp #define CONFIG_SYS_BR2_PRELIM CONFIG_SYS_LBAPP1_BR_PRELIM 43*877bfe37SValentin Longchamp /* Local bus app1 Options */ 44*877bfe37SValentin Longchamp #define CONFIG_SYS_OR2_PRELIM CONFIG_SYS_LBAPP1_OR_PRELIM 45*877bfe37SValentin Longchamp 46*877bfe37SValentin Longchamp /* App2 Local bus */ 47*877bfe37SValentin Longchamp #define CONFIG_SYS_LBAPP2_BASE 0xE0000000 48*877bfe37SValentin Longchamp #define CONFIG_SYS_LBAPP2_BASE_PHYS 0xFE0000000ull 49*877bfe37SValentin Longchamp 50*877bfe37SValentin Longchamp #define CONFIG_SYS_LBAPP2_BR_PRELIM (BR_PHYS_ADDR(CONFIG_SYS_LBAPP2_BASE_PHYS) \ 51*877bfe37SValentin Longchamp | BR_PS_8 /* Port Size 8 bits */ \ 52*877bfe37SValentin Longchamp | BR_DECC_OFF /* no error corr */ \ 53*877bfe37SValentin Longchamp | BR_MS_GPCM /* MSEL = GPCM */ \ 54*877bfe37SValentin Longchamp | BR_V) /* valid */ 55*877bfe37SValentin Longchamp 56*877bfe37SValentin Longchamp #define CONFIG_SYS_LBAPP2_OR_PRELIM (OR_AM_256MB /* length 256MB */ \ 57*877bfe37SValentin Longchamp | OR_GPCM_ACS_DIV2 /* LCS 1/2 clk after */ \ 58*877bfe37SValentin Longchamp | OR_GPCM_CSNT /* LCS 1/4 clk before */ \ 59*877bfe37SValentin Longchamp | OR_GPCM_SCY_2 /* 2 clk wait cycles */ \ 60*877bfe37SValentin Longchamp | OR_GPCM_TRLX /* relaxed tmgs */ \ 61*877bfe37SValentin Longchamp | OR_GPCM_EAD) /* extra bus clk cycles */ 62*877bfe37SValentin Longchamp /* Local bus app2 Base Address */ 63*877bfe37SValentin Longchamp #define CONFIG_SYS_BR3_PRELIM CONFIG_SYS_LBAPP2_BR_PRELIM 64*877bfe37SValentin Longchamp /* Local bus app2 Options */ 65*877bfe37SValentin Longchamp #define CONFIG_SYS_OR3_PRELIM CONFIG_SYS_LBAPP2_OR_PRELIM 66*877bfe37SValentin Longchamp #endif 67*877bfe37SValentin Longchamp 68*877bfe37SValentin Longchamp #endif /* __CONFIG_H */ 69