RTEMS 6.1-rc2
Loading...
Searching...
No Matches
imx6ul_ccmreg.h
1/* SPDX-License-Identifier: BSD-2-Clause */
2
3/*
4 * Copyright (C) 2022 embedded brains GmbH & Co. KG
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 * POSSIBILITY OF SUCH DAMAGE.
26 */
27
28#ifndef IMX6UL_CCMREG_H
29#define IMX6UL_CCMREG_H
30
31#include <bsp/utility.h>
32
33typedef struct {
34 uint32_t ccr;
35 uint32_t ccdr;
36 uint32_t csr;
37 uint32_t ccsr;
38 uint32_t cacrr;
39 uint32_t cbcdr;
40 uint32_t cbcmr;
41 uint32_t cscmr1;
42 uint32_t cscmr2;
43 uint32_t cscdr1;
44 uint32_t cs1cdr;
45 uint32_t cs2cdr;
46 uint32_t cdcdr;
47 uint32_t chsccdr;
48 uint32_t cscdr2;
49 uint32_t cscdr3;
50 uint32_t reserved_40[2];
51 uint32_t cdhipr;
52 uint32_t reserved_4c[2];
53 uint32_t clpcr;
54 uint32_t cisr;
55 uint32_t cimr;
56 uint32_t ccosr;
57 uint32_t cgpr;
58 uint32_t ccgr0;
59 uint32_t ccgr1;
60 uint32_t ccgr2;
61 uint32_t ccgr3;
62 uint32_t ccgr4;
63 uint32_t ccgr5;
64 uint32_t ccgr6;
65 uint32_t reserved_84[1];
66 uint32_t cmeor;
68
69typedef struct {
70 uint32_t pll_arm;
71 uint32_t pll_arm_set;
72 uint32_t pll_arm_clr;
73 uint32_t pll_arm_tog;
74 uint32_t pll_usb1;
75 uint32_t pll_usb1_set;
76 uint32_t pll_usb1_clr;
77 uint32_t pll_usb1_tog;
78 uint32_t pll_usb2;
79 uint32_t pll_usb2_set;
80 uint32_t pll_usb2_clr;
81 uint32_t pll_usb2_tog;
82 uint32_t pll_sys;
83 uint32_t pll_sys_set;
84 uint32_t pll_sys_clr;
85 uint32_t pll_sys_tog;
86 uint32_t pll_sys_ss;
87 uint32_t reserved_44[3];
88 uint32_t pll_sys_num;
89 uint32_t reserved_54[3];
90 uint32_t pll_sys_denom;
91 uint32_t reserved_64[3];
92 uint32_t pll_audio;
93 uint32_t pll_audio_set;
94 uint32_t pll_audio_clr;
95 uint32_t pll_audio_tog;
96 uint32_t pll_audio_num;
97 uint32_t reserved_84[3];
98 uint32_t pll_audio_denom;
99 uint32_t reserved_94[3];
100 uint32_t pll_video;
101 uint32_t pll_video_set;
102 uint32_t pll_video_clr;
103 uint32_t pll_video_tog;
104 uint32_t pll_video_num;
105 uint32_t reserved_b4[3];
106 uint32_t pll_video_denom;
107 uint32_t reserved_c4[7];
108 uint32_t pll_enet;
109#define IMX6UL_CCM_ANALOG_PLL_ENET_LOCK BSP_BIT32(31)
110#define IMX6UL_CCM_ANALOG_PLL_ENET_ENET_25M_REF_EN BSP_BIT32(21)
111#define IMX6UL_CCM_ANALOG_PLL_ENET_ENET2_125M_EN BSP_BIT32(20)
112#define IMX6UL_CCM_ANALOG_PLL_ENET_ENABLE_125M BSP_BIT32(19)
113#define IMX6UL_CCM_ANALOG_PLL_ENET_PFD_OFFSET_EN BSP_BIT32(18)
114#define IMX6UL_CCM_ANALOG_PLL_ENET_BYPASS BSP_BIT32(16)
115#define IMX6UL_CCM_ANALOG_PLL_ENET_BYPASS_CLK_SRC(val) BSP_FLD32(val, 14, 15)
116#define IMX6UL_CCM_ANALOG_PLL_ENET_BYPASS_CLK_SRC_GET(val) BSP_FLD32GET(val, 14, 15)
117#define IMX6UL_CCM_ANALOG_PLL_ENET_BYPASS_CLK_SRC_SET(val) BSP_FLD32SET(val, 14, 15)
118#define IMX6UL_CCM_ANALOG_PLL_ENET_ENET1_125M_EN BSP_BIT32(13)
119#define IMX6UL_CCM_ANALOG_PLL_ENET_POWERDOWN BSP_BIT32(12)
120#define IMX6UL_CCM_ANALOG_PLL_ENET_ENET1_DIV_SELECT(val) BSP_FLD32(val, 3, 2)
121#define IMX6UL_CCM_ANALOG_PLL_ENET_ENET1_DIV_SELECT_GET(val) BSP_FLD32GET(val, 3, 2)
122#define IMX6UL_CCM_ANALOG_PLL_ENET_ENET1_DIV_SELECT_SET(val) BSP_FLD32SET(val, 3, 2)
123#define IMX6UL_CCM_ANALOG_PLL_ENET_ENET0_DIV_SELECT(val) BSP_FLD32(val, 0, 1)
124#define IMX6UL_CCM_ANALOG_PLL_ENET_ENET0_DIV_SELECT_GET(val) BSP_FLD32GET(val, 0, 1)
125#define IMX6UL_CCM_ANALOG_PLL_ENET_ENET0_DIV_SELECT_SET(val) BSP_FLD32SET(val, 0, 1)
126 uint32_t pll_enet_set;
127 uint32_t pll_enet_clr;
128 uint32_t pll_enet_tog;
129 uint32_t pfd_480;
130 uint32_t pfd_480_set;
131 uint32_t pfd_480_clr;
132 uint32_t pfd_480_tog;
133 uint32_t pfd_528;
134 uint32_t pfd_528_set;
135 uint32_t pfd_528_clr;
136 uint32_t pfd_528_tog;
137 uint32_t reserved_110[16];
138 uint32_t misc0;
139 uint32_t misc0_set;
140 uint32_t misc0_clr;
141 uint32_t misc0_tog;
142 uint32_t misc1;
143 uint32_t misc1_set;
144 uint32_t misc1_clr;
145 uint32_t misc1_tog;
146 uint32_t misc2;
147 uint32_t misc2_set;
148 uint32_t misc2_clr;
149 uint32_t misc2_tog;
151
152#endif /* IMX6UL_CCMREG_H */
This header file provides utility macros for BSPs.
Definition: imx6ul_ccmreg.h:69
Definition: imx6ul_ccmreg.h:33