Nathan Barrett-Morrison | a215cfc | 2024-04-24 20:04:00 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
| 2 | /* |
| 3 | * (C) Copyright 2022 - 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 | #ifndef ARCH_ADI_SC5XX_SC5XX_H |
| 11 | #define ARCH_ADI_SC5XX_SC5XX_H |
| 12 | |
| 13 | #include <linux/types.h> |
| 14 | |
| 15 | #define TWI0_CLKDIV 0x31001400 // TWI0 SCL Clock Divider Register |
| 16 | #define TWI1_CLKDIV 0x31001500 // TWI1 SCL Clock Divider Register |
| 17 | #define TWI2_CLKDIV 0x31001600 // TWI2 SCL Clock Divider Register |
| 18 | |
| 19 | const char *sc5xx_get_boot_mode(u32 *bmode); |
| 20 | void sc5xx_enable_rgmii(void); |
| 21 | |
| 22 | void sc5xx_enable_ns_sharc_access(uintptr_t securec0_base); |
| 23 | void sc5xx_disable_spu0(uintptr_t spu0_start, uintptr_t spu0_end); |
| 24 | void sc5xx_enable_pmu(void); |
| 25 | |
| 26 | /** |
| 27 | * Per-SoC init function to be used to initialize hw-specific things. Examples: |
| 28 | * enable PMU on armv7, enable coresight timer on armv8, etc. |
| 29 | */ |
| 30 | void sc5xx_soc_init(void); |
| 31 | |
| 32 | /* |
| 33 | * Reconfigure SPI memory map region for OSPI use. The adi-spi3 driver |
| 34 | * does not use the memory map, while the OSPI driver requires it. Only |
| 35 | * available on sc59x and sc59x-64 |
| 36 | */ |
| 37 | void sc59x_remap_ospi(void); |
| 38 | |
| 39 | #endif |