mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-15 09:27:35 +00:00
3b95902d47
Add support for clocks needed by MACs to ast2500 clock driver. The clocks are D2-PLL, which is used by both MACs and PCLK_MAC1 and PCLK_MAC2 for MAC1 and MAC2 respectively. The rate of D2-PLL is hardcoded to 250MHz -- the value used in Aspeed SDK. It is not entirely clear from the datasheet how this clock is used by MACs, so not clear if the rate would ever need to be different. So, for now, hardcoding it is probably safer. The rate of PCLK_MAC{1,2} is chosen based on MAC speed selected through hardware strapping. So, the network driver would only need to enable these clocks, no need to configure the rate. Signed-off-by: Maxim Sloyko <maxims@google.com> Reviewed-by: Simon Glass <sjg@chromium.org>
31 lines
555 B
C
31 lines
555 B
C
/*
|
|
* Copyright 2016 Google Inc.
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
/* Core Clocks */
|
|
#define PLL_HPLL 1
|
|
#define PLL_DPLL 2
|
|
#define PLL_D2PLL 3
|
|
#define PLL_MPLL 4
|
|
#define ARMCLK 5
|
|
|
|
|
|
/* Bus Clocks, derived from core clocks */
|
|
#define BCLK_PCLK 101
|
|
#define BCLK_LHCLK 102
|
|
#define BCLK_MACCLK 103
|
|
#define BCLK_SDCLK 104
|
|
#define BCLK_ARMCLK 105
|
|
|
|
#define MCLK_DDR 201
|
|
|
|
/* Special clocks */
|
|
#define PCLK_UART1 501
|
|
#define PCLK_UART2 502
|
|
#define PCLK_UART3 503
|
|
#define PCLK_UART4 504
|
|
#define PCLK_UART5 505
|
|
#define PCLK_MAC1 506
|
|
#define PCLK_MAC2 507
|