162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
262306a36Sopenharmony_ci#ifndef __CLK_PXA2XX_H
362306a36Sopenharmony_ci#define __CLK_PXA2XX_H
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci#define CCCR		(0x0000)  /* Core Clock Configuration Register */
662306a36Sopenharmony_ci#define CCSR		(0x000C)  /* Core Clock Status Register */
762306a36Sopenharmony_ci#define CKEN		(0x0004)  /* Clock Enable Register */
862306a36Sopenharmony_ci#define OSCC		(0x0008)  /* Oscillator Configuration Register */
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci#define CCCR_N_MASK	0x0380	/* Run Mode Frequency to Turbo Mode Frequency Multiplier */
1162306a36Sopenharmony_ci#define CCCR_M_MASK	0x0060	/* Memory Frequency to Run Mode Frequency Multiplier */
1262306a36Sopenharmony_ci#define CCCR_L_MASK	0x001f	/* Crystal Frequency to Memory Frequency Multiplier */
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ci#define CCCR_CPDIS_BIT	(31)
1562306a36Sopenharmony_ci#define CCCR_PPDIS_BIT	(30)
1662306a36Sopenharmony_ci#define CCCR_LCD_26_BIT	(27)
1762306a36Sopenharmony_ci#define CCCR_A_BIT	(25)
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ci#define CCSR_N2_MASK	CCCR_N_MASK
2062306a36Sopenharmony_ci#define CCSR_M_MASK	CCCR_M_MASK
2162306a36Sopenharmony_ci#define CCSR_L_MASK	CCCR_L_MASK
2262306a36Sopenharmony_ci#define CCSR_N2_SHIFT	7
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ci#define CKEN_AC97CONF   (31)    /* AC97 Controller Configuration */
2562306a36Sopenharmony_ci#define CKEN_CAMERA	(24)	/* Camera Interface Clock Enable */
2662306a36Sopenharmony_ci#define CKEN_SSP1	(23)	/* SSP1 Unit Clock Enable */
2762306a36Sopenharmony_ci#define CKEN_MEMC	(22)	/* Memory Controller Clock Enable */
2862306a36Sopenharmony_ci#define CKEN_MEMSTK	(21)	/* Memory Stick Host Controller */
2962306a36Sopenharmony_ci#define CKEN_IM		(20)	/* Internal Memory Clock Enable */
3062306a36Sopenharmony_ci#define CKEN_KEYPAD	(19)	/* Keypad Interface Clock Enable */
3162306a36Sopenharmony_ci#define CKEN_USIM	(18)	/* USIM Unit Clock Enable */
3262306a36Sopenharmony_ci#define CKEN_MSL	(17)	/* MSL Unit Clock Enable */
3362306a36Sopenharmony_ci#define CKEN_LCD	(16)	/* LCD Unit Clock Enable */
3462306a36Sopenharmony_ci#define CKEN_PWRI2C	(15)	/* PWR I2C Unit Clock Enable */
3562306a36Sopenharmony_ci#define CKEN_I2C	(14)	/* I2C Unit Clock Enable */
3662306a36Sopenharmony_ci#define CKEN_FICP	(13)	/* FICP Unit Clock Enable */
3762306a36Sopenharmony_ci#define CKEN_MMC	(12)	/* MMC Unit Clock Enable */
3862306a36Sopenharmony_ci#define CKEN_USB	(11)	/* USB Unit Clock Enable */
3962306a36Sopenharmony_ci#define CKEN_ASSP	(10)	/* ASSP (SSP3) Clock Enable */
4062306a36Sopenharmony_ci#define CKEN_USBHOST	(10)	/* USB Host Unit Clock Enable */
4162306a36Sopenharmony_ci#define CKEN_OSTIMER	(9)	/* OS Timer Unit Clock Enable */
4262306a36Sopenharmony_ci#define CKEN_NSSP	(9)	/* NSSP (SSP2) Clock Enable */
4362306a36Sopenharmony_ci#define CKEN_I2S	(8)	/* I2S Unit Clock Enable */
4462306a36Sopenharmony_ci#define CKEN_BTUART	(7)	/* BTUART Unit Clock Enable */
4562306a36Sopenharmony_ci#define CKEN_FFUART	(6)	/* FFUART Unit Clock Enable */
4662306a36Sopenharmony_ci#define CKEN_STUART	(5)	/* STUART Unit Clock Enable */
4762306a36Sopenharmony_ci#define CKEN_HWUART	(4)	/* HWUART Unit Clock Enable */
4862306a36Sopenharmony_ci#define CKEN_SSP3	(4)	/* SSP3 Unit Clock Enable */
4962306a36Sopenharmony_ci#define CKEN_SSP	(3)	/* SSP Unit Clock Enable */
5062306a36Sopenharmony_ci#define CKEN_SSP2	(3)	/* SSP2 Unit Clock Enable */
5162306a36Sopenharmony_ci#define CKEN_AC97	(2)	/* AC97 Unit Clock Enable */
5262306a36Sopenharmony_ci#define CKEN_PWM1	(1)	/* PWM1 Clock Enable */
5362306a36Sopenharmony_ci#define CKEN_PWM0	(0)	/* PWM0 Clock Enable */
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_ci#define OSCC_OON	(1 << 1)	/* 32.768kHz OON (write-once only bit) */
5662306a36Sopenharmony_ci#define OSCC_OOK	(1 << 0)	/* 32.768kHz OOK (read-only bit) */
5762306a36Sopenharmony_ci
5862306a36Sopenharmony_ci#endif
59