2 * Copyright (c) 2011 The Chromium OS Authors.
3 * Copyright (c) 2010-2012 NVIDIA Corporation <www.nvidia.com>
5 * SPDX-License-Identifier: GPL-2.0+
8 /* Tegra20 clock PLL tables */
10 #ifndef _CLOCK_TABLES_H_
11 #define _CLOCK_TABLES_H_
13 /* The PLLs supported by the hardware */
16 CLOCK_ID_CGENERAL
= CLOCK_ID_FIRST
,
23 /* now the simple ones */
24 CLOCK_ID_FIRST_SIMPLE
,
25 CLOCK_ID_XCPU
= CLOCK_ID_FIRST_SIMPLE
,
29 /* These are the base clocks (inputs to the Tegra SOC) */
34 CLOCK_ID_COUNT
, /* number of clocks */
38 /* The clocks supported by the hardware */
43 PERIPH_ID_CPU
= PERIPH_ID_FIRST
,
82 /* Middle word: 63:32 */
113 PERIPH_ID_RESERVED56
,
122 /* Upper word 95:64 */
137 PERIPH_ID_RESERVED76
,
138 PERIPH_ID_RESERVED77
,
139 PERIPH_ID_RESERVED78
,
140 PERIPH_ID_RESERVED79
,
143 PERIPH_ID_RESERVED80
,
144 PERIPH_ID_RESERVED81
,
145 PERIPH_ID_RESERVED82
,
146 PERIPH_ID_RESERVED83
,
154 PERIPH_ID_SYNC_CLK_DOUBLER
,
155 PERIPH_ID_CLK_M_DOUBLER
,
156 PERIPH_ID_RESERVED91
,
172 /* Converts a clock number to a clock register: 0=L, 1=H, 2=U */
173 #define PERIPH_REG(id) ((id) >> 5)
175 /* Mask value for a clock (within PERIPH_REG(id)) */
176 #define PERIPH_MASK(id) (1 << ((id) & 0x1f))
178 /* return 1 if a PLL ID is in range, and not a simple PLL */
179 #define clock_id_is_pll(id) ((id) >= CLOCK_ID_FIRST && \
180 (id) < CLOCK_ID_FIRST_SIMPLE)
182 /* return 1 if a peripheral ID is in range */
183 #define clock_periph_id_isvalid(id) ((id) >= PERIPH_ID_FIRST && \
184 (id) < PERIPH_ID_COUNT)
186 #endif /* _CLOCK_TABLES_H_ */