blob: b0587686d73f1cc54e34f4401a98be9134a1fb62 [file] [log] [blame]
Nathan Barrett-Morrisona215cfc2024-04-24 20:04:00 -04001// 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 0x3108B980
16#define REG_PADS0_PCFG0 0x31004404
17#define REG_SPU0_SECUREP_START 0x3108BA00
18#define REG_SPU0_SECUREP_END 0x3108BD24
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}