xref: /rk3399_rockchip-uboot/include/configs/bcm28155_ap.h (revision d00bf7812181f53d6027610f35c1aa2018ce9fd3)
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
16aed39f35SSteve Rae #define CONFIG_SYS_GENERIC_BOARD
179ed679aeSDarwin Rambo 
189ed679aeSDarwin Rambo /*
199ed679aeSDarwin Rambo  * Memory configuration
209ed679aeSDarwin Rambo  */
219ed679aeSDarwin Rambo #define CONFIG_SYS_TEXT_BASE		0xae000000
229ed679aeSDarwin Rambo 
239ed679aeSDarwin Rambo #define CONFIG_SYS_SDRAM_BASE		0x80000000
249ed679aeSDarwin Rambo #define CONFIG_SYS_SDRAM_SIZE		0x80000000
259ed679aeSDarwin Rambo #define CONFIG_NR_DRAM_BANKS		1
269ed679aeSDarwin Rambo 
279ed679aeSDarwin Rambo #define CONFIG_SYS_MALLOC_LEN		SZ_4M	/* see armv7/start.S. */
289ed679aeSDarwin Rambo #define CONFIG_STACKSIZE		SZ_256K
299ed679aeSDarwin Rambo 
309ed679aeSDarwin Rambo /* GPIO Driver */
319ed679aeSDarwin Rambo #define CONFIG_KONA_GPIO
329ed679aeSDarwin Rambo 
339ed679aeSDarwin Rambo /* MMC/SD Driver */
349ed679aeSDarwin Rambo #define CONFIG_SDHCI
359ed679aeSDarwin Rambo #define CONFIG_MMC_SDMA
369ed679aeSDarwin Rambo #define CONFIG_KONA_SDHCI
379ed679aeSDarwin Rambo #define CONFIG_MMC
389ed679aeSDarwin Rambo #define CONFIG_GENERIC_MMC
399ed679aeSDarwin Rambo 
409ed679aeSDarwin Rambo #define CONFIG_SYS_SDIO_BASE0 SDIO1_BASE_ADDR
419ed679aeSDarwin Rambo #define CONFIG_SYS_SDIO_BASE1 SDIO2_BASE_ADDR
429ed679aeSDarwin Rambo #define CONFIG_SYS_SDIO_BASE2 SDIO3_BASE_ADDR
439ed679aeSDarwin Rambo #define CONFIG_SYS_SDIO_BASE3 SDIO4_BASE_ADDR
449ed679aeSDarwin Rambo #define CONFIG_SYS_SDIO0_MAX_CLK 48000000
459ed679aeSDarwin Rambo #define CONFIG_SYS_SDIO1_MAX_CLK 48000000
469ed679aeSDarwin Rambo #define CONFIG_SYS_SDIO2_MAX_CLK 48000000
479ed679aeSDarwin Rambo #define CONFIG_SYS_SDIO3_MAX_CLK 48000000
489ed679aeSDarwin Rambo #define CONFIG_SYS_SDIO0 "sdio1"
499ed679aeSDarwin Rambo #define CONFIG_SYS_SDIO1 "sdio2"
509ed679aeSDarwin Rambo #define CONFIG_SYS_SDIO2 "sdio3"
519ed679aeSDarwin Rambo #define CONFIG_SYS_SDIO3 "sdio4"
529ed679aeSDarwin Rambo 
539ed679aeSDarwin Rambo /* I2C Driver */
549ed679aeSDarwin Rambo #define CONFIG_SYS_I2C
559ed679aeSDarwin Rambo #define CONFIG_SYS_I2C_KONA
569ed679aeSDarwin Rambo #define CONFIG_SYS_SPD_BUS_NUM	3	/* Start with PMU bus */
579ed679aeSDarwin Rambo #define CONFIG_SYS_MAX_I2C_BUS	4
589ed679aeSDarwin Rambo #define CONFIG_SYS_I2C_BASE0	BSC1_BASE_ADDR
599ed679aeSDarwin Rambo #define CONFIG_SYS_I2C_BASE1	BSC2_BASE_ADDR
609ed679aeSDarwin Rambo #define CONFIG_SYS_I2C_BASE2	BSC3_BASE_ADDR
619ed679aeSDarwin Rambo #define CONFIG_SYS_I2C_BASE3	PMU_BSC_BASE_ADDR
629ed679aeSDarwin Rambo 
639ed679aeSDarwin Rambo /* Timer Driver */
649ed679aeSDarwin Rambo #define CONFIG_SYS_TIMER_RATE		32000
659ed679aeSDarwin Rambo #define CONFIG_SYS_TIMER_COUNTER	(TIMER_BASE_ADDR + 4) /* STCLO offset */
669ed679aeSDarwin Rambo 
679ed679aeSDarwin Rambo /* Init functions */
689ed679aeSDarwin Rambo #define CONFIG_MISC_INIT_R	/* board's misc_init_r function */
699ed679aeSDarwin Rambo 
709ed679aeSDarwin Rambo /* Some commands use this as the default load address */
719ed679aeSDarwin Rambo #define CONFIG_SYS_LOAD_ADDR		CONFIG_SYS_SDRAM_BASE
729ed679aeSDarwin Rambo 
739ed679aeSDarwin Rambo /* No mtest functions as recommended */
749ed679aeSDarwin Rambo 
759ed679aeSDarwin Rambo /*
769ed679aeSDarwin Rambo  * This is the initial SP which is used only briefly for relocating the u-boot
779ed679aeSDarwin Rambo  * image to the top of SDRAM. After relocation u-boot moves the stack to the
789ed679aeSDarwin Rambo  * proper place.
799ed679aeSDarwin Rambo  */
809ed679aeSDarwin Rambo #define CONFIG_SYS_INIT_SP_ADDR		CONFIG_SYS_TEXT_BASE
819ed679aeSDarwin Rambo 
829ed679aeSDarwin Rambo /* Serial Info */
839ed679aeSDarwin Rambo #define CONFIG_SYS_NS16550
849ed679aeSDarwin Rambo #define CONFIG_SYS_NS16550_SERIAL
859ed679aeSDarwin Rambo /* Post pad 3 bytes after each reg addr */
869ed679aeSDarwin Rambo #define CONFIG_SYS_NS16550_REG_SIZE	(-4)
879ed679aeSDarwin Rambo #define CONFIG_SYS_NS16550_CLK		13000000
889ed679aeSDarwin Rambo #define CONFIG_CONS_INDEX		1
899ed679aeSDarwin Rambo #define CONFIG_SYS_NS16550_COM1		0x3e000000
909ed679aeSDarwin Rambo 
919ed679aeSDarwin Rambo #define CONFIG_BAUDRATE			115200
929ed679aeSDarwin Rambo 
939ed679aeSDarwin Rambo #define CONFIG_ENV_SIZE			0x10000
949ed679aeSDarwin Rambo #define CONFIG_ENV_IS_NOWHERE
959ed679aeSDarwin Rambo 
969ed679aeSDarwin Rambo #define CONFIG_SYS_NO_FLASH	/* Not using NAND/NOR unmanaged flash */
979ed679aeSDarwin Rambo 
989ed679aeSDarwin Rambo /* console configuration */
999ed679aeSDarwin Rambo #define CONFIG_SYS_CBSIZE		1024	/* Console buffer size */
1009ed679aeSDarwin Rambo #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
1019ed679aeSDarwin Rambo 			sizeof(CONFIG_SYS_PROMPT) + 16)	/* Printbuffer size */
1029ed679aeSDarwin Rambo #define CONFIG_SYS_MAXARGS		64
1039ed679aeSDarwin Rambo #define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
1049ed679aeSDarwin Rambo 
1059ed679aeSDarwin Rambo /*
1069ed679aeSDarwin Rambo  * One partition type must be defined for part.c
1079ed679aeSDarwin Rambo  * This is necessary for the fatls command to work on an SD card
1089ed679aeSDarwin Rambo  * for example.
1099ed679aeSDarwin Rambo  */
1109ed679aeSDarwin Rambo #define CONFIG_DOS_PARTITION
111*d00bf781SJiandong Zheng #define CONFIG_EFI_PARTITION
1129ed679aeSDarwin Rambo 
1139ed679aeSDarwin Rambo /* version string, parser, etc */
1149ed679aeSDarwin Rambo #define CONFIG_VERSION_VARIABLE
1159ed679aeSDarwin Rambo #define CONFIG_AUTO_COMPLETE
1169ed679aeSDarwin Rambo #define CONFIG_SYS_HUSH_PARSER
1179ed679aeSDarwin Rambo #define CONFIG_CMDLINE_EDITING
1189ed679aeSDarwin Rambo #define CONFIG_SYS_LONGHELP
1199ed679aeSDarwin Rambo 
1209ed679aeSDarwin Rambo #define CONFIG_CRC32_VERIFY
1219ed679aeSDarwin Rambo #define CONFIG_MX_CYCLIC
1229ed679aeSDarwin Rambo 
1239ed679aeSDarwin Rambo /* Initial upstream - boot to cmd prompt only */
1249ed679aeSDarwin Rambo #define CONFIG_BOOTCOMMAND		""
1259ed679aeSDarwin Rambo 
1269ed679aeSDarwin Rambo /* Commands */
1279ed679aeSDarwin Rambo #define CONFIG_CMD_ASKENV
1289ed679aeSDarwin Rambo #define CONFIG_CMD_CACHE
1299ed679aeSDarwin Rambo #define CONFIG_CMD_FAT
1309ed679aeSDarwin Rambo #define CONFIG_CMD_GPIO
1319ed679aeSDarwin Rambo #define CONFIG_CMD_I2C
1329ed679aeSDarwin Rambo #define CONFIG_CMD_MMC
1339ed679aeSDarwin Rambo #define CONFIG_CMD_BOOTZ
1349ed679aeSDarwin Rambo #define CONFIG_FAT_WRITE
1359ed679aeSDarwin Rambo 
1369ed679aeSDarwin Rambo 
137*d00bf781SJiandong Zheng /* Fastboot and USB OTG */
138*d00bf781SJiandong Zheng #define CONFIG_USB_FUNCTION_FASTBOOT
139*d00bf781SJiandong Zheng #define CONFIG_CMD_FASTBOOT
140*d00bf781SJiandong Zheng #define CONFIG_FASTBOOT_FLASH
141*d00bf781SJiandong Zheng #define CONFIG_FASTBOOT_FLASH_MMC_DEV	0
142*d00bf781SJiandong Zheng #define CONFIG_SYS_CACHELINE_SIZE	64
143*d00bf781SJiandong Zheng #define CONFIG_USB_FASTBOOT_BUF_SIZE	(CONFIG_SYS_SDRAM_SIZE - SZ_1M)
144*d00bf781SJiandong Zheng #define CONFIG_USB_FASTBOOT_BUF_ADDR	CONFIG_SYS_SDRAM_BASE
145*d00bf781SJiandong Zheng #define CONFIG_USB_GADGET
146*d00bf781SJiandong Zheng #define CONFIG_USB_GADGET_DUALSPEED
147*d00bf781SJiandong Zheng #define CONFIG_USB_GADGET_VBUS_DRAW	0
148*d00bf781SJiandong Zheng #define CONFIG_USB_GADGET_S3C_UDC_OTG
149*d00bf781SJiandong Zheng #define CONFIG_USB_GADGET_BCM_UDC_OTG_PHY
150*d00bf781SJiandong Zheng #define CONFIG_USB_GADGET_DOWNLOAD
151*d00bf781SJiandong Zheng #define CONFIG_USBID_ADDR		0x34052c46
152*d00bf781SJiandong Zheng #define CONFIG_G_DNL_VENDOR_NUM		0x18d1	/* google */
153*d00bf781SJiandong Zheng #define CONFIG_G_DNL_PRODUCT_NUM	0x0d02	/* nexus one */
154*d00bf781SJiandong Zheng #define CONFIG_G_DNL_MANUFACTURER	"Broadcom Corporation"
155*d00bf781SJiandong Zheng 
1569ed679aeSDarwin Rambo #endif /* __BCM28155_AP_H */
157