1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Copyright (c) 2018 Microsemi Corporation
14 BOARD_TYPE_PCB090 = 0xAABBCD00,
18 void board_debug_uart_init(void)
20 /* too early for the pinctrl driver, so configure the UART pins here */
21 mscc_gpio_set_alternate(30, 1);
22 mscc_gpio_set_alternate(31, 1);
25 int board_early_init_r(void)
27 /* Prepare SPI controller to be used in master mode */
28 writel(0, BASE_CFG + ICPU_SW_MODE);
30 /* Address of boot parameters */
31 gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE;
34 if (IS_ENABLED(CONFIG_LED))
40 int board_phy_config(struct phy_device *phydev)
42 phy_write(phydev, 0, 31, 0x10);
43 phy_write(phydev, 0, 18, 0x80A0);
44 while (phy_read(phydev, 0, 18) & 0x8000)
46 phy_write(phydev, 0, 31, 0);
50 static void do_board_detect(void)
52 u32 chipid = (readl(BASE_DEVCPU_GCB + CHIP_ID) >> 12) & 0xFFFF;
54 if (chipid == 0x7428 || chipid == 0x7424)
55 gd->board_type = BOARD_TYPE_PCB091; // Lu10
57 gd->board_type = BOARD_TYPE_PCB090; // Lu26
60 #if defined(CONFIG_MULTI_DTB_FIT)
61 int board_fit_config_name_match(const char *name)
63 if (gd->board_type == BOARD_TYPE_PCB090 &&
64 strcmp(name, "luton_pcb090") == 0)
67 if (gd->board_type == BOARD_TYPE_PCB091 &&
68 strcmp(name, "luton_pcb091") == 0)
75 #if defined(CONFIG_DTB_RESELECT)
76 int embedded_dtb_select(void)