Zephyr API Documentation 4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
renesas_rztn_clock.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2025 Renesas Electronics Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_CLOCK_RENESAS_RZTN_CLOCK_H_
8#define ZEPHYR_INCLUDE_DT_BINDINGS_CLOCK_RENESAS_RZTN_CLOCK_H_
9
10/* RZ clock configuration values */
11#define RZ_IP_MASK 0xFF0000UL
12#define RZ_IP_SHIFT 16UL
13#define RZ_IP_CH_MASK 0xFF00UL
14#define RZ_IP_CH_SHIFT 8UL
15#define RZ_CLOCK_MASK 0xFFUL
16#define RZ_CLOCK_SHIFT 0UL
17
18#define RZ_IP_BSC 0UL /* Bus State Controller */
19#define RZ_IP_XSPI 1UL /* Expanded Serial Peripheral Interface */
20#define RZ_IP_SCI 2UL /* Serial Communications Interface */
21#define RZ_IP_IIC 3UL /* I2C Bus Interface */
22#define RZ_IP_SPI 4UL /* Serial Peripheral Interface */
23#define RZ_IP_GPT 5UL /* General PWM Timer */
24#define RZ_IP_ADC12 6UL /* 12-Bit A/D Converter */
25#define RZ_IP_CMT 7UL /* Compare Match Timer */
26#define RZ_IP_CMTW 8UL /* Compare Match Timer W */
27#define RZ_IP_CANFD 9UL /* Controller Area Network with Flexible Data Rate */
28#define RZ_IP_GMAC 10UL /* Ethernet MAC */
29#define RZ_IP_ETHSW 11UL /* Ethernet Switch */
30#define RZ_IP_USBHS 12UL /* USB High Speed */
31#define RZ_IP_RTC 13UL /* Real Time Clock */
32
33#define RZ_CLOCK_CPU0 0UL
34#define RZ_CLOCK_CPU1 1UL
35#define RZ_CLOCK_CA55C0 2UL
36#define RZ_CLOCK_CA55C1 3UL
37#define RZ_CLOCK_CA55C2 4UL
38#define RZ_CLOCK_CA55C3 5UL
39#define RZ_CLOCK_CA55SCLK 6UL
40#define RZ_CLOCK_ICLK 7UL
41#define RZ_CLOCK_PCLKH 8UL
42#define RZ_CLOCK_PCLKM 9UL
43#define RZ_CLOCK_PCLKL 10UL
44#define RZ_CLOCK_PCLKADC 11UL
45#define RZ_CLOCK_PCLKGPTL 12UL
46#define RZ_CLOCK_PCLKENCO 13UL
47#define RZ_CLOCK_PCLKSPI0 14UL
48#define RZ_CLOCK_PCLKSPI1 15UL
49#define RZ_CLOCK_PCLKSPI2 16UL
50#define RZ_CLOCK_PCLKSPI3 17UL
51#define RZ_CLOCK_PCLKSCI0 18UL
52#define RZ_CLOCK_PCLKSCI1 19UL
53#define RZ_CLOCK_PCLKSCI2 20UL
54#define RZ_CLOCK_PCLKSCI3 21UL
55#define RZ_CLOCK_PCLKSCI4 22UL
56#define RZ_CLOCK_PCLKSCI5 23UL
57#define RZ_CLOCK_PCLKSCIE0 24UL
58#define RZ_CLOCK_PCLKSCIE1 25UL
59#define RZ_CLOCK_PCLKSCIE2 26UL
60#define RZ_CLOCK_PCLKSCIE3 27UL
61#define RZ_CLOCK_PCLKSCIE4 28UL
62#define RZ_CLOCK_PCLKSCIE5 29UL
63#define RZ_CLOCK_PCLKSCIE6 30UL
64#define RZ_CLOCK_PCLKSCIE7 31UL
65#define RZ_CLOCK_PCLKSCIE8 32UL
66#define RZ_CLOCK_PCLKSCIE9 33UL
67#define RZ_CLOCK_PCLKSCIE10 34UL
68#define RZ_CLOCK_PCLKSCIE11 35UL
69#define RZ_CLOCK_PCLKCAN 36UL
70#define RZ_CLOCK_CKIO 37UL
71#define RZ_CLOCK_XSPI0_CLK 38UL
72#define RZ_CLOCK_XSPI1_CLK 39UL
73
74#define RZ_CLOCK(IP, ch, clk) \
75 ((IP << RZ_IP_SHIFT) | ((ch) << RZ_IP_CH_SHIFT) | ((clk) << RZ_CLOCK_SHIFT))
76
77#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_CLOCK_RENESAS_RZTN_CLOCK_H_ */