diff options
Diffstat (limited to 'board')
-rw-r--r-- | board/BuR/brppt1/board.c | 5 | ||||
-rw-r--r-- | board/BuR/brxre1/board.c | 2 | ||||
-rw-r--r-- | board/BuR/common/bur_common.h | 2 | ||||
-rw-r--r-- | board/BuR/common/common.c | 7 | ||||
-rw-r--r-- | board/broadcom/bcm963158/Kconfig | 17 | ||||
-rw-r--r-- | board/broadcom/bcm963158/MAINTAINERS | 6 | ||||
-rw-r--r-- | board/broadcom/bcm963158/Makefile | 3 | ||||
-rw-r--r-- | board/broadcom/bcm963158/bcm963158.c | 61 | ||||
-rw-r--r-- | board/broadcom/bcm968580xref/MAINTAINERS | 4 | ||||
-rw-r--r-- | board/samsung/common/board.c | 52 | ||||
-rw-r--r-- | board/samsung/common/exynos5-dt.c | 29 |
11 files changed, 103 insertions, 85 deletions
diff --git a/board/BuR/brppt1/board.c b/board/BuR/brppt1/board.c index d2e7c72242..b8ab19c0e7 100644 --- a/board/BuR/brppt1/board.c +++ b/board/BuR/brppt1/board.c @@ -106,9 +106,8 @@ void am33xx_spl_board_init(void) /* setup I2C */ enable_i2c_pin_mux(); - i2c_set_bus_num(0); - i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE); - pmicsetup(0); + + pmicsetup(0, 0); /* peripheral reset */ rc = gpio_request(64 + 29, "GPMC_WAIT1"); diff --git a/board/BuR/brxre1/board.c b/board/BuR/brxre1/board.c index 41ed28b4bc..82c53d5bc2 100644 --- a/board/BuR/brxre1/board.c +++ b/board/BuR/brxre1/board.c @@ -132,7 +132,7 @@ void am33xx_spl_board_init(void) puts("ERROR: i2c_set_bus_speed failed! (turn on PWR_nEN)\n"); } - pmicsetup(0); + pmicsetup(0, 0); } const struct dpll_params *get_dpll_ddr_params(void) diff --git a/board/BuR/common/bur_common.h b/board/BuR/common/bur_common.h index 5f2d0d055f..f743194c34 100644 --- a/board/BuR/common/bur_common.h +++ b/board/BuR/common/bur_common.h @@ -15,7 +15,7 @@ int load_lcdtiming(struct am335x_lcdpanel *panel); void br_summaryscreen(void); -void pmicsetup(u32 mpupll); +void pmicsetup(u32 mpupll, unsigned int bus); void enable_uart0_pin_mux(void); void enable_i2c_pin_mux(void); void enable_board_pin_mux(void); diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c index f3eae5cbc1..a1f7c44abf 100644 --- a/board/BuR/common/common.c +++ b/board/BuR/common/common.c @@ -269,13 +269,14 @@ int ft_board_setup(void *blob, bd_t *bd) static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE; -void pmicsetup(u32 mpupll) +void pmicsetup(u32 mpupll, unsigned int bus) { int mpu_vdd; int usb_cur_lim; - if (i2c_probe(TPS65217_CHIP_PM)) { - puts("PMIC (0x24) not found! skip further initalization.\n"); + if (power_tps65217_init(bus)) { + printf("WARN: cannot setup PMIC 0x24 @ bus #%d, not found!.\n", + bus); return; } diff --git a/board/broadcom/bcm963158/Kconfig b/board/broadcom/bcm963158/Kconfig new file mode 100644 index 0000000000..41b6adbb80 --- /dev/null +++ b/board/broadcom/bcm963158/Kconfig @@ -0,0 +1,17 @@ +if ARCH_BCM63158 + +config SYS_VENDOR + default "broadcom" + +config SYS_BOARD + default "bcm963158" + +config SYS_CONFIG_NAME + default "broadcom_bcm963158" + +endif + +config TARGET_BCM963158 + bool "Support Broadcom bcm963158" + depends on ARCH_BCM63158 + select ARM64 diff --git a/board/broadcom/bcm963158/MAINTAINERS b/board/broadcom/bcm963158/MAINTAINERS new file mode 100644 index 0000000000..d28d971f9d --- /dev/null +++ b/board/broadcom/bcm963158/MAINTAINERS @@ -0,0 +1,6 @@ +BROADCOM BCM963158 +M: Philippe Reynes <philippe.reynes@softathome.com> +S: Maintained +F: board/broadcom/bcm963158/ +F: include/configs/broadcom_bcm963158.h +F: configs/bcm963158_ram_defconfig diff --git a/board/broadcom/bcm963158/Makefile b/board/broadcom/bcm963158/Makefile new file mode 100644 index 0000000000..0a902c9cf6 --- /dev/null +++ b/board/broadcom/bcm963158/Makefile @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0+ + +obj-y += bcm963158.o diff --git a/board/broadcom/bcm963158/bcm963158.c b/board/broadcom/bcm963158/bcm963158.c new file mode 100644 index 0000000000..db82cd570d --- /dev/null +++ b/board/broadcom/bcm963158/bcm963158.c @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019 Philippe Reynes <philippe.reynes@softathome.com> + */ + +#include <common.h> +#include <fdtdec.h> +#include <linux/io.h> + +#ifdef CONFIG_ARM64 +#include <asm/armv8/mmu.h> + +static struct mm_region broadcom_bcm963158_mem_map[] = { + { + /* RAM */ + .virt = 0x00000000UL, + .phys = 0x00000000UL, + .size = 8UL * SZ_1G, + .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | + PTE_BLOCK_INNER_SHARE + }, { + /* SoC */ + .virt = 0x80000000UL, + .phys = 0x80000000UL, + .size = 0xff80000000UL, + .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | + PTE_BLOCK_NON_SHARE | + PTE_BLOCK_PXN | PTE_BLOCK_UXN + }, { + /* List terminator */ + 0, + } +}; + +struct mm_region *mem_map = broadcom_bcm963158_mem_map; +#endif + +int board_init(void) +{ + return 0; +} + +int dram_init(void) +{ + if (fdtdec_setup_mem_size_base() != 0) + printf("fdtdec_setup_mem_size_base() has failed\n"); + + return 0; +} + +int dram_init_banksize(void) +{ + fdtdec_setup_memory_banksize(); + + return 0; +} + +int print_cpuinfo(void) +{ + return 0; +} diff --git a/board/broadcom/bcm968580xref/MAINTAINERS b/board/broadcom/bcm968580xref/MAINTAINERS index 1ecdfbc0bb..5ee0c4dd4e 100644 --- a/board/broadcom/bcm968580xref/MAINTAINERS +++ b/board/broadcom/bcm968580xref/MAINTAINERS @@ -1,6 +1,6 @@ -BROADCOM BCM968580XREF +BCM968580XREF BOARD M: Philippe Reynes <philippe.reynes@softathome.com> S: Maintained F: board/broadcom/bcm968580xref/ F: include/configs/broadcom_bcm968580xref.h -F: configs/bcm968580_ram_defconfig +F: configs/bcm968580xref_ram_defconfig diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c index 6fd26a3a91..96228a86a1 100644 --- a/board/samsung/common/board.c +++ b/board/samsung/common/board.c @@ -249,56 +249,16 @@ int board_eth_init(bd_t *bis) return 0; } -#ifdef CONFIG_MMC -static int init_mmc(void) -{ -#ifdef CONFIG_MMC_SDHCI - return exynos_mmc_init(gd->fdt_blob); -#else - return 0; -#endif -} - -static int init_dwmmc(void) -{ -#ifdef CONFIG_MMC_DW - return exynos_dwmmc_init(gd->fdt_blob); -#else - return 0; -#endif -} - -int board_mmc_init(bd_t *bis) -{ - int ret; - - if (get_boot_mode() == BOOT_MODE_SD) { - ret = init_mmc(); - ret |= init_dwmmc(); - } else { - ret = init_dwmmc(); - ret |= init_mmc(); - } - - if (ret) - debug("mmc init failed\n"); - - return ret; -} -#endif - #ifdef CONFIG_DISPLAY_BOARDINFO int checkboard(void) { - const char *board_info; + if (IS_ENABLED(CONFIG_BOARD_TYPES)) { + const char *board_info = get_board_type(); + + if (board_info) + printf("Type: %s\n", board_info); + } - board_info = fdt_getprop(gd->fdt_blob, 0, "model", NULL); - printf("Board: %s\n", board_info ? board_info : "unknown"); -#ifdef CONFIG_BOARD_TYPES - board_info = get_board_type(); - if (board_info) - printf("Type: %s\n", board_info); -#endif return 0; } #endif diff --git a/board/samsung/common/exynos5-dt.c b/board/samsung/common/exynos5-dt.c index c183965b92..87eb381345 100644 --- a/board/samsung/common/exynos5-dt.c +++ b/board/samsung/common/exynos5-dt.c @@ -34,37 +34,8 @@ DECLARE_GLOBAL_DATA_PTR; -static void board_enable_audio_codec(void) -{ - int node, ret; - struct gpio_desc en_gpio; - - node = fdtdec_next_compatible(gd->fdt_blob, 0, - COMPAT_SAMSUNG_EXYNOS5_SOUND); - if (node <= 0) - return; - - ret = gpio_request_by_name_nodev(offset_to_ofnode(node), - "codec-enable-gpio", 0, &en_gpio, - GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE); - if (ret == -FDT_ERR_NOTFOUND) - return; - - /* Turn on the GPIO which connects to the codec's "enable" line. */ - gpio_set_pull(gpio_get_number(&en_gpio), S5P_GPIO_PULL_NONE); - -#ifdef CONFIG_SOUND_MAX98095 - /* Enable MAX98095 Codec */ - gpio_request(EXYNOS5_GPIO_X17, "max98095_enable"); - gpio_direction_output(EXYNOS5_GPIO_X17, 1); - gpio_set_pull(EXYNOS5_GPIO_X17, S5P_GPIO_PULL_NONE); -#endif -} - int exynos_init(void) { - board_enable_audio_codec(); - return 0; } |