162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci *
362306a36Sopenharmony_ci * include/asm-sh/cpu-sh4/freq.h
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Copyright (C) 2002, 2003 Paul Mundt
662306a36Sopenharmony_ci */
762306a36Sopenharmony_ci#ifndef __ASM_CPU_SH4_FREQ_H
862306a36Sopenharmony_ci#define __ASM_CPU_SH4_FREQ_H
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci#if defined(CONFIG_CPU_SUBTYPE_SH7722) || \
1162306a36Sopenharmony_ci    defined(CONFIG_CPU_SUBTYPE_SH7723) || \
1262306a36Sopenharmony_ci    defined(CONFIG_CPU_SUBTYPE_SH7343) || \
1362306a36Sopenharmony_ci    defined(CONFIG_CPU_SUBTYPE_SH7366)
1462306a36Sopenharmony_ci#define FRQCR		        0xa4150000
1562306a36Sopenharmony_ci#define VCLKCR			0xa4150004
1662306a36Sopenharmony_ci#define SCLKACR			0xa4150008
1762306a36Sopenharmony_ci#define SCLKBCR			0xa415000c
1862306a36Sopenharmony_ci#define IrDACLKCR		0xa4150010
1962306a36Sopenharmony_ci#define MSTPCR0			0xa4150030
2062306a36Sopenharmony_ci#define MSTPCR1			0xa4150034
2162306a36Sopenharmony_ci#define MSTPCR2			0xa4150038
2262306a36Sopenharmony_ci#elif defined(CONFIG_CPU_SUBTYPE_SH7757)
2362306a36Sopenharmony_ci#define	FRQCR			0xffc80000
2462306a36Sopenharmony_ci#define	OSCCR			0xffc80018
2562306a36Sopenharmony_ci#define	PLLCR			0xffc80024
2662306a36Sopenharmony_ci#elif defined(CONFIG_CPU_SUBTYPE_SH7763) || \
2762306a36Sopenharmony_ci      defined(CONFIG_CPU_SUBTYPE_SH7780)
2862306a36Sopenharmony_ci#define	FRQCR			0xffc80000
2962306a36Sopenharmony_ci#elif defined(CONFIG_CPU_SUBTYPE_SH7724)
3062306a36Sopenharmony_ci#define FRQCRA			0xa4150000
3162306a36Sopenharmony_ci#define FRQCRB			0xa4150004
3262306a36Sopenharmony_ci#define VCLKCR			0xa4150048
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ci#define FCLKACR			0xa4150008
3562306a36Sopenharmony_ci#define FCLKBCR			0xa415000c
3662306a36Sopenharmony_ci#define FRQCR			FRQCRA
3762306a36Sopenharmony_ci#define SCLKACR			FCLKACR
3862306a36Sopenharmony_ci#define SCLKBCR			FCLKBCR
3962306a36Sopenharmony_ci#define FCLKACR			0xa4150008
4062306a36Sopenharmony_ci#define FCLKBCR			0xa415000c
4162306a36Sopenharmony_ci#define IrDACLKCR		0xa4150018
4262306a36Sopenharmony_ci
4362306a36Sopenharmony_ci#define MSTPCR0			0xa4150030
4462306a36Sopenharmony_ci#define MSTPCR1			0xa4150034
4562306a36Sopenharmony_ci#define MSTPCR2			0xa4150038
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_ci#elif defined(CONFIG_CPU_SUBTYPE_SH7734)
4862306a36Sopenharmony_ci#define FRQCR0			0xffc80000
4962306a36Sopenharmony_ci#define FRQCR2			0xffc80008
5062306a36Sopenharmony_ci#define FRQMR1			0xffc80014
5162306a36Sopenharmony_ci#define FRQMR2			0xffc80018
5262306a36Sopenharmony_ci#elif defined(CONFIG_CPU_SUBTYPE_SH7785)
5362306a36Sopenharmony_ci#define FRQCR0			0xffc80000
5462306a36Sopenharmony_ci#define FRQCR1			0xffc80004
5562306a36Sopenharmony_ci#define FRQMR1			0xffc80014
5662306a36Sopenharmony_ci#elif defined(CONFIG_CPU_SUBTYPE_SH7786)
5762306a36Sopenharmony_ci#define FRQCR0			0xffc40000
5862306a36Sopenharmony_ci#define FRQCR1			0xffc40004
5962306a36Sopenharmony_ci#define FRQMR1			0xffc40014
6062306a36Sopenharmony_ci#elif defined(CONFIG_CPU_SUBTYPE_SHX3)
6162306a36Sopenharmony_ci#define FRQCR0			0xffc00000
6262306a36Sopenharmony_ci#define FRQCR1			0xffc00004
6362306a36Sopenharmony_ci#define FRQMR1			0xffc00014
6462306a36Sopenharmony_ci#else
6562306a36Sopenharmony_ci#define FRQCR			0xffc00000
6662306a36Sopenharmony_ci#define FRQCR_PSTBY		0x0200
6762306a36Sopenharmony_ci#define FRQCR_PLLEN		0x0400
6862306a36Sopenharmony_ci#define FRQCR_CKOEN		0x0800
6962306a36Sopenharmony_ci#endif
7062306a36Sopenharmony_ci#define MIN_DIVISOR_NR		0
7162306a36Sopenharmony_ci#define MAX_DIVISOR_NR		3
7262306a36Sopenharmony_ci
7362306a36Sopenharmony_ci#endif /* __ASM_CPU_SH4_FREQ_H */
7462306a36Sopenharmony_ci
75