blob: 0f892774309730b5ebf22c037cb8d7d0f49f53a6 [file] [log] [blame]
Tom Rinidec7ea02024-05-20 13:35:03 -06001// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * (C) Copyright 2024 - Analog Devices, Inc.
4 *
5 * Written and/or maintained by Timesys Corporation
6 *
7 * Contact: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
8 * Contact: Greg Malysa <greg.malysa@timesys.com>
9 */
10
11#include <asm/io.h>
12#include <asm/arch-adi/sc5xx/sc5xx.h>
13#include <asm/arch-adi/sc5xx/spl.h>
14
15#define REG_SPU0_SECUREC0 0x3108C980
16#define REG_PADS0_PCFG0 0x31004404
17#define REG_SPU0_SECUREP_START 0x3108CA00
18#define REG_SPU0_SECUREP_END 0x3108CCF0
19
20adi_rom_boot_fn adi_rom_boot = (adi_rom_boot_fn)0x000000e1;
21
22void sc5xx_enable_rgmii(void)
23{
24 writel((readl(REG_PADS0_PCFG0) | 0xc), REG_PADS0_PCFG0);
25}
26
27void sc5xx_soc_init(void)
28{
29 sc5xx_enable_ns_sharc_access(REG_SPU0_SECUREC0);
30 sc5xx_disable_spu0(REG_SPU0_SECUREP_START, REG_SPU0_SECUREP_END);
31 sc5xx_enable_pmu();
32}