forked from u-boot/u-boot
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsc598-som.c
More file actions
43 lines (34 loc) · 847 Bytes
/
sc598-som.c
File metadata and controls
43 lines (34 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* (C) Copyright 2025 - Analog Devices, Inc.
*/
#include <config.h>
#include <phy.h>
#include <asm/u-boot.h>
#include <asm/arch-adi/sc5xx/sc5xx.h>
#include <asm/arch-adi/sc5xx/soc.h>
#include <asm/armv8/mmu.h>
#include <asm/io.h>
#include "../carriers/somcrr.h"
int board_phy_config(struct phy_device *phydev)
{
if (IS_ENABLED(CONFIG_ADI_CARRIER_SOMCRR_EZKIT))
fixup_dp83867_phy(phydev);
return 0;
}
int board_init(void)
{
u32 bmode = (readl(0x3108C004) & 0x00000F00) >> 8;
sc59x_remap_ospi();
if (IS_ENABLED(CONFIG_ADI_CARRIER_SOMCRR_EZKIT) ||
IS_ENABLED(CONFIG_ADI_CARRIER_SOMCRR_EZLITE)) {
adi_somcrr_init_ethernet();
}
sc5xx_enable_rgmii();
if (bmode == 2) {
env_set("bootcmd", "spiboot");
} else if (bmode == 6) {
env_set("bootcmd", "emmcboot");
}
return 0;
}