19ed679aeSDarwin Rambo /* 29ed679aeSDarwin Rambo * Copyright 2013 Broadcom Corporation. 39ed679aeSDarwin Rambo * 49ed679aeSDarwin Rambo * SPDX-License-Identifier: GPL-2.0+ 59ed679aeSDarwin Rambo */ 69ed679aeSDarwin Rambo 79ed679aeSDarwin Rambo #ifndef __BCM28155_AP_H 89ed679aeSDarwin Rambo #define __BCM28155_AP_H 99ed679aeSDarwin Rambo 101ace4022SAlexey Brodkin #include <linux/sizes.h> 119ed679aeSDarwin Rambo #include <asm/arch/sysmap.h> 129ed679aeSDarwin Rambo 133fcfe803SMasahiro Yamada /* CPU, chip, mach, etc */ 149ed679aeSDarwin Rambo #define CONFIG_KONA 159ed679aeSDarwin Rambo #define CONFIG_SKIP_LOWLEVEL_INIT 169ed679aeSDarwin Rambo 179ed679aeSDarwin Rambo /* 189ed679aeSDarwin Rambo * Memory configuration 199ed679aeSDarwin Rambo */ 209ed679aeSDarwin Rambo #define CONFIG_SYS_TEXT_BASE 0xae000000 219ed679aeSDarwin Rambo 229ed679aeSDarwin Rambo #define CONFIG_SYS_SDRAM_BASE 0x80000000 239ed679aeSDarwin Rambo #define CONFIG_SYS_SDRAM_SIZE 0x80000000 249ed679aeSDarwin Rambo #define CONFIG_NR_DRAM_BANKS 1 259ed679aeSDarwin Rambo 269ed679aeSDarwin Rambo #define CONFIG_SYS_MALLOC_LEN SZ_4M /* see armv7/start.S. */ 279ed679aeSDarwin Rambo #define CONFIG_STACKSIZE SZ_256K 289ed679aeSDarwin Rambo 299ed679aeSDarwin Rambo /* GPIO Driver */ 309ed679aeSDarwin Rambo #define CONFIG_KONA_GPIO 319ed679aeSDarwin Rambo 329ed679aeSDarwin Rambo /* MMC/SD Driver */ 339ed679aeSDarwin Rambo #define CONFIG_SDHCI 349ed679aeSDarwin Rambo #define CONFIG_MMC_SDMA 359ed679aeSDarwin Rambo #define CONFIG_KONA_SDHCI 369ed679aeSDarwin Rambo #define CONFIG_MMC 379ed679aeSDarwin Rambo #define CONFIG_GENERIC_MMC 389ed679aeSDarwin Rambo 399ed679aeSDarwin Rambo #define CONFIG_SYS_SDIO_BASE0 SDIO1_BASE_ADDR 409ed679aeSDarwin Rambo #define CONFIG_SYS_SDIO_BASE1 SDIO2_BASE_ADDR 419ed679aeSDarwin Rambo #define CONFIG_SYS_SDIO_BASE2 SDIO3_BASE_ADDR 429ed679aeSDarwin Rambo #define CONFIG_SYS_SDIO_BASE3 SDIO4_BASE_ADDR 439ed679aeSDarwin Rambo #define CONFIG_SYS_SDIO0_MAX_CLK 48000000 449ed679aeSDarwin Rambo #define CONFIG_SYS_SDIO1_MAX_CLK 48000000 459ed679aeSDarwin Rambo #define CONFIG_SYS_SDIO2_MAX_CLK 48000000 469ed679aeSDarwin Rambo #define CONFIG_SYS_SDIO3_MAX_CLK 48000000 479ed679aeSDarwin Rambo #define CONFIG_SYS_SDIO0 "sdio1" 489ed679aeSDarwin Rambo #define CONFIG_SYS_SDIO1 "sdio2" 499ed679aeSDarwin Rambo #define CONFIG_SYS_SDIO2 "sdio3" 509ed679aeSDarwin Rambo #define CONFIG_SYS_SDIO3 "sdio4" 519ed679aeSDarwin Rambo 529ed679aeSDarwin Rambo /* I2C Driver */ 539ed679aeSDarwin Rambo #define CONFIG_SYS_I2C 549ed679aeSDarwin Rambo #define CONFIG_SYS_I2C_KONA 559ed679aeSDarwin Rambo #define CONFIG_SYS_SPD_BUS_NUM 3 /* Start with PMU bus */ 569ed679aeSDarwin Rambo #define CONFIG_SYS_MAX_I2C_BUS 4 579ed679aeSDarwin Rambo #define CONFIG_SYS_I2C_BASE0 BSC1_BASE_ADDR 589ed679aeSDarwin Rambo #define CONFIG_SYS_I2C_BASE1 BSC2_BASE_ADDR 599ed679aeSDarwin Rambo #define CONFIG_SYS_I2C_BASE2 BSC3_BASE_ADDR 609ed679aeSDarwin Rambo #define CONFIG_SYS_I2C_BASE3 PMU_BSC_BASE_ADDR 619ed679aeSDarwin Rambo 629ed679aeSDarwin Rambo /* Timer Driver */ 639ed679aeSDarwin Rambo #define CONFIG_SYS_TIMER_RATE 32000 649ed679aeSDarwin Rambo #define CONFIG_SYS_TIMER_COUNTER (TIMER_BASE_ADDR + 4) /* STCLO offset */ 659ed679aeSDarwin Rambo 669ed679aeSDarwin Rambo /* Init functions */ 679ed679aeSDarwin Rambo #define CONFIG_MISC_INIT_R /* board's misc_init_r function */ 689ed679aeSDarwin Rambo 699ed679aeSDarwin Rambo /* Some commands use this as the default load address */ 709ed679aeSDarwin Rambo #define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE 719ed679aeSDarwin Rambo 729ed679aeSDarwin Rambo /* No mtest functions as recommended */ 739ed679aeSDarwin Rambo 749ed679aeSDarwin Rambo /* 759ed679aeSDarwin Rambo * This is the initial SP which is used only briefly for relocating the u-boot 769ed679aeSDarwin Rambo * image to the top of SDRAM. After relocation u-boot moves the stack to the 779ed679aeSDarwin Rambo * proper place. 789ed679aeSDarwin Rambo */ 799ed679aeSDarwin Rambo #define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_TEXT_BASE 809ed679aeSDarwin Rambo 819ed679aeSDarwin Rambo /* Serial Info */ 829ed679aeSDarwin Rambo #define CONFIG_SYS_NS16550_SERIAL 839ed679aeSDarwin Rambo /* Post pad 3 bytes after each reg addr */ 849ed679aeSDarwin Rambo #define CONFIG_SYS_NS16550_REG_SIZE (-4) 859ed679aeSDarwin Rambo #define CONFIG_SYS_NS16550_CLK 13000000 869ed679aeSDarwin Rambo #define CONFIG_CONS_INDEX 1 879ed679aeSDarwin Rambo #define CONFIG_SYS_NS16550_COM1 0x3e000000 889ed679aeSDarwin Rambo 899ed679aeSDarwin Rambo #define CONFIG_BAUDRATE 115200 909ed679aeSDarwin Rambo 919ed679aeSDarwin Rambo #define CONFIG_ENV_SIZE 0x10000 929ed679aeSDarwin Rambo #define CONFIG_ENV_IS_NOWHERE 939ed679aeSDarwin Rambo 949ed679aeSDarwin Rambo #define CONFIG_SYS_NO_FLASH /* Not using NAND/NOR unmanaged flash */ 959ed679aeSDarwin Rambo 969ed679aeSDarwin Rambo /* console configuration */ 979ed679aeSDarwin Rambo #define CONFIG_SYS_CBSIZE 1024 /* Console buffer size */ 989ed679aeSDarwin Rambo #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ 999ed679aeSDarwin Rambo sizeof(CONFIG_SYS_PROMPT) + 16) /* Printbuffer size */ 1009ed679aeSDarwin Rambo #define CONFIG_SYS_MAXARGS 64 1019ed679aeSDarwin Rambo #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE 1029ed679aeSDarwin Rambo 1039ed679aeSDarwin Rambo /* 1049ed679aeSDarwin Rambo * One partition type must be defined for part.c 1059ed679aeSDarwin Rambo * This is necessary for the fatls command to work on an SD card 1069ed679aeSDarwin Rambo * for example. 1079ed679aeSDarwin Rambo */ 1089ed679aeSDarwin Rambo #define CONFIG_DOS_PARTITION 109d00bf781SJiandong Zheng #define CONFIG_EFI_PARTITION 1109ed679aeSDarwin Rambo 1119ed679aeSDarwin Rambo /* version string, parser, etc */ 1129ed679aeSDarwin Rambo #define CONFIG_VERSION_VARIABLE 1139ed679aeSDarwin Rambo #define CONFIG_AUTO_COMPLETE 1149ed679aeSDarwin Rambo #define CONFIG_SYS_HUSH_PARSER 1159ed679aeSDarwin Rambo #define CONFIG_CMDLINE_EDITING 1169ed679aeSDarwin Rambo #define CONFIG_SYS_LONGHELP 1179ed679aeSDarwin Rambo 1189ed679aeSDarwin Rambo #define CONFIG_CRC32_VERIFY 1199ed679aeSDarwin Rambo #define CONFIG_MX_CYCLIC 1209ed679aeSDarwin Rambo 1219ed679aeSDarwin Rambo /* Initial upstream - boot to cmd prompt only */ 1229ed679aeSDarwin Rambo #define CONFIG_BOOTCOMMAND "" 1239ed679aeSDarwin Rambo 1249ed679aeSDarwin Rambo /* Commands */ 1259ed679aeSDarwin Rambo #define CONFIG_CMD_ASKENV 1269ed679aeSDarwin Rambo #define CONFIG_CMD_CACHE 1279ed679aeSDarwin Rambo #define CONFIG_CMD_FAT 1289ed679aeSDarwin Rambo #define CONFIG_CMD_I2C 1299ed679aeSDarwin Rambo #define CONFIG_CMD_MMC 1309ed679aeSDarwin Rambo #define CONFIG_CMD_BOOTZ 1319ed679aeSDarwin Rambo #define CONFIG_FAT_WRITE 1329ed679aeSDarwin Rambo 1339ed679aeSDarwin Rambo 134d00bf781SJiandong Zheng /* Fastboot and USB OTG */ 135d00bf781SJiandong Zheng #define CONFIG_USB_FUNCTION_FASTBOOT 136d00bf781SJiandong Zheng #define CONFIG_CMD_FASTBOOT 137d00bf781SJiandong Zheng #define CONFIG_FASTBOOT_FLASH 138d00bf781SJiandong Zheng #define CONFIG_FASTBOOT_FLASH_MMC_DEV 0 139d00bf781SJiandong Zheng #define CONFIG_SYS_CACHELINE_SIZE 64 140a588d99aSPaul Kocialkowski #define CONFIG_FASTBOOT_BUF_SIZE (CONFIG_SYS_SDRAM_SIZE - SZ_1M) 141a588d99aSPaul Kocialkowski #define CONFIG_FASTBOOT_BUF_ADDR CONFIG_SYS_SDRAM_BASE 142d00bf781SJiandong Zheng #define CONFIG_USB_GADGET 143d00bf781SJiandong Zheng #define CONFIG_USB_GADGET_DUALSPEED 144d00bf781SJiandong Zheng #define CONFIG_USB_GADGET_VBUS_DRAW 0 145*e30824f4SMarek Vasut #define CONFIG_USB_GADGET_DWC2_OTG 146d00bf781SJiandong Zheng #define CONFIG_USB_GADGET_BCM_UDC_OTG_PHY 147d00bf781SJiandong Zheng #define CONFIG_USB_GADGET_DOWNLOAD 148d00bf781SJiandong Zheng #define CONFIG_USBID_ADDR 0x34052c46 149d00bf781SJiandong Zheng #define CONFIG_G_DNL_VENDOR_NUM 0x18d1 /* google */ 150d00bf781SJiandong Zheng #define CONFIG_G_DNL_PRODUCT_NUM 0x0d02 /* nexus one */ 151d00bf781SJiandong Zheng #define CONFIG_G_DNL_MANUFACTURER "Broadcom Corporation" 152d00bf781SJiandong Zheng 1531bf73bdeSJiandong Zheng /* Fastboot and USB OTG */ 1541bf73bdeSJiandong Zheng #define CONFIG_USB_FUNCTION_FASTBOOT 1551bf73bdeSJiandong Zheng #define CONFIG_CMD_FASTBOOT 1561bf73bdeSJiandong Zheng #define CONFIG_FASTBOOT_FLASH 1571bf73bdeSJiandong Zheng #define CONFIG_FASTBOOT_FLASH_MMC_DEV 0 1581bf73bdeSJiandong Zheng #define CONFIG_SYS_CACHELINE_SIZE 64 1591bf73bdeSJiandong Zheng #define CONFIG_USB_FASTBOOT_BUF_SIZE (CONFIG_SYS_SDRAM_SIZE - SZ_1M) 1601bf73bdeSJiandong Zheng #define CONFIG_USB_FASTBOOT_BUF_ADDR CONFIG_SYS_SDRAM_BASE 1611bf73bdeSJiandong Zheng #define CONFIG_USB_GADGET 1621bf73bdeSJiandong Zheng #define CONFIG_USB_GADGET_DUALSPEED 1631bf73bdeSJiandong Zheng #define CONFIG_USB_GADGET_VBUS_DRAW 0 1641bf73bdeSJiandong Zheng #define CONFIG_USB_GADGET_S3C_UDC_OTG 1651bf73bdeSJiandong Zheng #define CONFIG_USB_GADGET_BCM_UDC_OTG_PHY 1661bf73bdeSJiandong Zheng #define CONFIG_USB_GADGET_DOWNLOAD 1671bf73bdeSJiandong Zheng #define CONFIG_USBID_ADDR 0x34052c46 1681bf73bdeSJiandong Zheng #define CONFIG_G_DNL_VENDOR_NUM 0x18d1 /* google */ 1691bf73bdeSJiandong Zheng #define CONFIG_G_DNL_PRODUCT_NUM 0x0d02 /* nexus one */ 1701bf73bdeSJiandong Zheng #define CONFIG_G_DNL_MANUFACTURER "Broadcom Corporation" 1711bf73bdeSJiandong Zheng 1729ed679aeSDarwin Rambo #endif /* __BCM28155_AP_H */ 173