1 /* SPDX-License-Identifier: GPL-2.0+ */ 2 /* 3 * (C) Copyright 2009 4 * Marvell Semiconductor <www.marvell.com> 5 * Prafulla Wadaskar <prafulla@marvell.com> 6 * 7 * (C) Copyright 2009 8 * Stefan Roese, DENX Software Engineering, sr@denx.de. 9 * 10 * (C) Copyright 2011-2012 11 * Holger Brunck, Keymile GmbH Hannover, holger.brunck@keymile.com 12 * Valentin Longchamp, Keymile AG, valentin.longchamp@keymile.com 13 */ 14 15 /* 16 * for linking errors see 17 * http://lists.denx.de/pipermail/u-boot/2009-July/057350.html 18 */ 19 20 #ifndef _CONFIG_KM_KIRKWOOD_H 21 #define _CONFIG_KM_KIRKWOOD_H 22 23 /* KM_KIRKWOOD */ 24 #if defined(CONFIG_KM_KIRKWOOD) 25 #define CONFIG_HOSTNAME "km_kirkwood" 26 #define CONFIG_KM_DISABLE_PCIE 27 28 /* KM_KIRKWOOD_PCI */ 29 #elif defined(CONFIG_KM_KIRKWOOD_PCI) 30 #define CONFIG_HOSTNAME "km_kirkwood_pci" 31 #define CONFIG_KM_UBI_PART_BOOT_OPTS ",2048" 32 #define CONFIG_SYS_NAND_NO_SUBPAGE_WRITE 33 34 /* KM_KIRKWOOD_128M16 */ 35 #elif defined(CONFIG_KM_KIRKWOOD_128M16) 36 #define CONFIG_HOSTNAME "km_kirkwood_128m16" 37 #undef CONFIG_SYS_KWD_CONFIG 38 #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage_128M16_1.cfg 39 #define CONFIG_KM_DISABLE_PCIE 40 41 /* KM_NUSA */ 42 #elif defined(CONFIG_KM_NUSA) 43 44 #define CONFIG_HOSTNAME "kmnusa" 45 46 #undef CONFIG_SYS_KWD_CONFIG 47 #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage_128M16_1.cfg 48 49 /* KMCOGE5UN */ 50 #elif defined(CONFIG_KM_COGE5UN) 51 #undef CONFIG_SYS_KWD_CONFIG 52 #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage_256M8_1.cfg 53 #define CONFIG_HOSTNAME "kmcoge5un" 54 #define CONFIG_KM_DISABLE_PCIE 55 56 /* KM_SUSE2 */ 57 #elif defined(CONFIG_KM_SUSE2) 58 #define CONFIG_HOSTNAME "kmsuse2" 59 #undef CONFIG_SYS_KWD_CONFIG 60 #define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage_128M16_1.cfg 61 #define CONFIG_KM_UBI_PART_BOOT_OPTS ",2048" 62 #define CONFIG_SYS_NAND_NO_SUBPAGE_WRITE 63 #else 64 #error ("Board unsupported") 65 #endif 66 67 /* include common defines/options for all arm based Keymile boards */ 68 #include "km/km_arm.h" 69 70 #if defined(CONFIG_KM_PIGGY4_88E6352) 71 /* 72 * Some keymile boards like mgcoge5un & nusa1 have their PIGGY4 connected via 73 * an Marvell 88E6352 simple switch. 74 * In this case we have to change the default settings for the etherent mac. 75 * There is NO ethernet phy. The ARM and Switch are conencted directly over 76 * RGMII in MAC-MAC mode 77 * In this case 1GBit full duplex and autoneg off 78 */ 79 #define PORT_SERIAL_CONTROL_VALUE ( \ 80 MVGBE_FORCE_LINK_PASS | \ 81 MVGBE_DIS_AUTO_NEG_FOR_DUPLX | \ 82 MVGBE_DIS_AUTO_NEG_FOR_FLOW_CTRL | \ 83 MVGBE_ADV_NO_FLOW_CTRL | \ 84 MVGBE_FORCE_FC_MODE_NO_PAUSE_DIS_TX | \ 85 MVGBE_FORCE_BP_MODE_NO_JAM | \ 86 (1 << 9) /* Reserved bit has to be 1 */ | \ 87 MVGBE_DO_NOT_FORCE_LINK_FAIL | \ 88 MVGBE_DIS_AUTO_NEG_SPEED_GMII | \ 89 MVGBE_DTE_ADV_0 | \ 90 MVGBE_MIIPHY_MAC_MODE | \ 91 MVGBE_AUTO_NEG_NO_CHANGE | \ 92 MVGBE_MAX_RX_PACKET_1552BYTE | \ 93 MVGBE_CLR_EXT_LOOPBACK | \ 94 MVGBE_SET_FULL_DUPLEX_MODE | \ 95 MVGBE_EN_FLOW_CTRL_TX_RX_IN_FULL_DUPLEX |\ 96 MVGBE_SET_GMII_SPEED_TO_1000 |\ 97 MVGBE_SET_MII_SPEED_TO_100) 98 99 #endif 100 101 #ifdef CONFIG_KM_PIGGY4_88E6061 102 /* 103 * Some keymile boards like mgcoge5un have their PIGGY4 connected via 104 * an Marvell 88E6061 simple switch. 105 * In this case we have to change the default settings for the 106 * ethernet phy connected to the kirkwood. 107 * In this case 100MB full duplex and autoneg off 108 */ 109 #define PORT_SERIAL_CONTROL_VALUE ( \ 110 MVGBE_FORCE_LINK_PASS | \ 111 MVGBE_DIS_AUTO_NEG_FOR_DUPLX | \ 112 MVGBE_DIS_AUTO_NEG_FOR_FLOW_CTRL | \ 113 MVGBE_ADV_NO_FLOW_CTRL | \ 114 MVGBE_FORCE_FC_MODE_NO_PAUSE_DIS_TX | \ 115 MVGBE_FORCE_BP_MODE_NO_JAM | \ 116 (1 << 9) /* Reserved bit has to be 1 */ | \ 117 MVGBE_DO_NOT_FORCE_LINK_FAIL | \ 118 MVGBE_DIS_AUTO_NEG_SPEED_GMII | \ 119 MVGBE_DTE_ADV_0 | \ 120 MVGBE_MIIPHY_MAC_MODE | \ 121 MVGBE_AUTO_NEG_NO_CHANGE | \ 122 MVGBE_MAX_RX_PACKET_1552BYTE | \ 123 MVGBE_CLR_EXT_LOOPBACK | \ 124 MVGBE_SET_FULL_DUPLEX_MODE | \ 125 MVGBE_DIS_FLOW_CTRL_TX_RX_IN_FULL_DUPLEX |\ 126 MVGBE_SET_GMII_SPEED_TO_10_100 |\ 127 MVGBE_SET_MII_SPEED_TO_100) 128 #endif 129 130 #ifdef CONFIG_KM_DISABLE_PCIE 131 #undef CONFIG_KIRKWOOD_PCIE_INIT 132 #endif 133 134 #endif /* _CONFIG_KM_KIRKWOOD */ 135