2 * Copyright (c) 2013 Qualcomm Atheros, Inc.
\r
3 * All rights reserved.
\r
5 * Redistribution and use in source and binary forms, with or without
\r
6 * modification, are permitted (subject to the limitations in the
\r
7 * disclaimer below) provided that the following conditions are met:
\r
9 * * Redistributions of source code must retain the above copyright
\r
10 * notice, this list of conditions and the following disclaimer.
\r
12 * * Redistributions in binary form must reproduce the above copyright
\r
13 * notice, this list of conditions and the following disclaimer in the
\r
14 * documentation and/or other materials provided with the
\r
17 * * Neither the name of Qualcomm Atheros nor the names of its
\r
18 * contributors may be used to endorse or promote products derived
\r
19 * from this software without specific prior written permission.
\r
21 * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
\r
22 * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
\r
23 * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
\r
24 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
\r
25 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
\r
26 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
\r
27 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
\r
28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
\r
29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
\r
30 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
\r
31 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
\r
32 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
\r
33 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\r
35 /*************************************************************************/
\r
36 /* Copyright (c) 2006 Atheros Communications, Inc., All Rights Reserved */
\r
38 /* Module Name : reg_defs.h */
\r
41 /* This file contains the register addr and marco definition. */
\r
46 /*************************************************************************/
\r
47 #ifndef _REG_DEFS_H_
\r
48 #define _REG_DEFS_H_
\r
50 #include "dt_defs.h"
\r
52 #define BIT_SET(bit) (1<<bit)
\r
53 #define BIT_CLR(bit) (0<<bit)
\r
55 #define HAL_WORD_REG_WRITE(addr, val) \
\r
57 (*((volatile uint32_t *)(addr&0xfffffffc))) = (uint32_t)(val); \
\r
60 #define HAL_WORD_REG_READ(addr) (*((volatile uint32_t *)(addr&0xfffffffc)))
\r
63 #define HAL_HALF_WORD_REG_WRITE(addr, val) \
\r
65 (*((volatile uint16_t *)(addr&0xfffffffe))) = (uint16_t)(val); \
\r
68 #define HAL_HALF_WORD_REG_READ(addr) (*((volatile uint16_t *)(addr&0xfffffffe)))
\r
71 #define HAL_BYTE_REG_WRITE(addr, val) \
\r
73 (*((volatile uint8_t *)(addr))) = (uint8_t)(val); \
\r
76 #define HAL_BYTE_REG_READ(addr) (*((volatile uint8_t *)(addr)))
\r
78 /***** REGISTER BASE ADDRESS DEFINITION *****/
\r
79 #define RESET_VECTOR_ADDRESS 0x8e0000
\r
80 /********************************************/
\r
82 /***** REGISTER BASE ADDRESS DEFINITION *****/
\r
83 #define USB_CTRL_BASE_ADDRESS 0x00010000
\r
84 //#define PCIE_BASE_ADDRESS 0x00020000
\r
85 #define RST_BASE_ADDRESS 0x00050000
\r
86 #define UART_BASE_ADDRESS 0x00051000
\r
87 #define GPIO_BASE_ADDRESS 0x00052000
\r
88 #define HOST_DMA_BASE_ADDRESS 0x00053000
\r
89 #define GMAC_BASE_ADDRESS 0x00054000
\r
90 #define USB_DMA_BASE_ADDRESS 0x00055000
\r
91 #define CPU_PLL_BASE_ADDRESS 0x00056000
\r
92 #define SPI_REG_BASE_ADDRESS 0x0005B000
\r
93 #define EEPROM_BASE_ADDRESS 0x1f000000
\r
94 #define WLAN_BASE_ADDRESS 0x10ff0000
\r
95 /*******************************************************************************/
\r
97 #define MAGPEI_REG_RST_BASE_ADDR RST_BASE_ADDRESS
\r
99 #define REG_GENERAL_TIMER_OFFSET 0x0
\r
100 #define REG_GENERAL_TIMER_RELOAD_OFFSET 0x4
\r
101 #define REG_WATCHDOG_TIMER_CONTROL_OFFSET 0x8
\r
102 #define REG_WATCHDOG_TIMER_OFFSET 0xC
\r
103 #define REG_RESET_OFFSET 0x10
\r
104 #define REG_BOOTSTRAP 0x14
\r
105 #define REG_AHB_ARB 0x18
\r
106 #define REG_REVISION_ID 0x90
\r
109 #define MAGPEI_REG_RST_GENERAL_TIMER_ADDR (RST_BASE_ADDRESS+REG_GENERAL_TIMER_OFFSET)
\r
110 #define MAGPIE_REG_RST_GENERAL_TIMER_RLD_ADDR (RST_BASE_ADDRESS+REG_GENERAL_TIMER_RELOAD_OFFSET)
\r
111 #define MAGPIE_REG_RST_WDT_TIMER_CTRL_ADDR (RST_BASE_ADDRESS+REG_WATCHDOG_TIMER_CONTROL_OFFSET)
\r
112 #define MAGPIE_REG_RST_WDT_TIMER_ADDR (RST_BASE_ADDRESS+REG_WATCHDOG_TIMER_OFFSET)
\r
113 #define MAGPIE_REG_RST_RESET_ADDR (RST_BASE_ADDRESS+REG_RESET_OFFSET)
\r
114 #define MAGPIE_REG_RST_BOOTSTRAP_ADDR (RST_BASE_ADDRESS+REG_BOOTSTRAP)
\r
115 #define MAGPIE_REG_AHB_ARB_ADDR (RST_BASE_ADDRESS+REG_AHB_ARB)
\r
116 #define MAGPIE_REG_REVISION_ID_ADDR (RST_BASE_ADDRESS+REG_REVISION_ID)
\r
118 #define MAGPEI_REG_RST_GENERAL_TIMER (*((volatile u32_t*)(MAGPEI_REG_RST_GENERAL_TIMER_ADDR)))
\r
119 #define MAGPIE_REG_RST_GENERAL_TIMER_RLD (*((volatile u32_t*)(MAGPIE_REG_RST_GENERAL_TIMER_RLD_ADDR)))
\r
120 #define MAGPIE_REG_RST_WDT_TIMER_CTRL (*((volatile u32_t*)(MAGPIE_REG_RST_WDT_TIMER_CTRL_ADDR)))
\r
121 #define MAGPIE_REG_RST_WDT_TIMER (*((volatile u32_t*)(MAGPIE_REG_RST_WDT_TIMER_ADDR)))
\r
122 #define MAGPIE_REG_RST_RESET (*((volatile u32_t*)(MAGPIE_REG_RST_RESET_ADDR)))
\r
123 #define MAGPIE_REG_RST_BOOTSTRAP (*((volatile u32_t*)(MAGPIE_REG_RST_BOOTSTRAP_ADDR)))
\r
124 #define MAGPIE_REG_AHB_ARB (*((volatile u32_t*)(MAGPIE_REG_AHB_ARB_ADDR)))
\r
125 #define MAGPIE_REG_REVISION_ID (*((volatile u32_t*)(MAGPIE_REG_REVISION_ID_ADDR)))
\r
128 /*******************************************************************************/
\r
129 /* USB DMA Register*/
\r
131 #define MAGPIE_REG_USB_INTERRUPT_ADDR USB_DMA_BASE_ADDRESS
\r
132 #define MAGPIE_REG_USB_INTERRUPT_MASK_ADDR (USB_DMA_BASE_ADDRESS + 0x4)
\r
134 #define MAGPIE_REG_USB_RX0_DESC_START_ADDR (USB_DMA_BASE_ADDRESS + 0x800)
\r
135 #define MAGPIE_REG_USB_RX0_DMA_START_ADDR (USB_DMA_BASE_ADDRESS + 0x804)
\r
136 #define MAGPIE_REG_USB_RX0_BURST_SIZE_ADDR (USB_DMA_BASE_ADDRESS + 0x808)
\r
137 #define MAGPIE_REG_USB_RX0_STATE_ADDR (USB_DMA_BASE_ADDRESS + 0x814)
\r
138 #define MAGPIE_REG_USB_RX0_CUR_TRACE_ADDR (USB_DMA_BASE_ADDRESS + 0x818)
\r
139 #define MAGPIE_REG_USB_RX0_SWAP_DATA_ADDR (USB_DMA_BASE_ADDRESS + 0x81C)
\r
141 #define MAGPIE_REG_USB_RX1_DESC_START_ADDR (USB_DMA_BASE_ADDRESS + 0x900)
\r
142 #define MAGPIE_REG_USB_RX1_DMA_START_ADDR (USB_DMA_BASE_ADDRESS + 0x904)
\r
143 #define MAGPIE_REG_USB_RX1_BURST_SIZE_ADDR (USB_DMA_BASE_ADDRESS + 0x908)
\r
144 #define MAGPIE_REG_USB_RX1_STATE_ADDR (USB_DMA_BASE_ADDRESS + 0x914)
\r
145 #define MAGPIE_REG_USB_RX1_CUR_TRACE_ADDR (USB_DMA_BASE_ADDRESS + 0x918)
\r
146 #define MAGPIE_REG_USB_RX1_SWAP_DATA_ADDR (USB_DMA_BASE_ADDRESS + 0x91C)
\r
148 #define MAGPIE_REG_USB_RX2_DESC_START_ADDR (USB_DMA_BASE_ADDRESS + 0xa00)
\r
149 #define MAGPIE_REG_USB_RX2_DMA_START_ADDR (USB_DMA_BASE_ADDRESS + 0xa04)
\r
150 #define MAGPIE_REG_USB_RX2_BURST_SIZE_ADDR (USB_DMA_BASE_ADDRESS + 0xa08)
\r
151 #define MAGPIE_REG_USB_RX2_STATE_ADDR (USB_DMA_BASE_ADDRESS + 0xa14)
\r
152 #define MAGPIE_REG_USB_RX2_CUR_TRACE_ADDR (USB_DMA_BASE_ADDRESS + 0xa18)
\r
153 #define MAGPIE_REG_USB_RX2_SWAP_DATA_ADDR (USB_DMA_BASE_ADDRESS + 0xa1C)
\r
155 #define MAGPIE_REG_USB_TX0_DESC_START_ADDR (USB_DMA_BASE_ADDRESS + 0xC00)
\r
156 #define MAGPIE_REG_USB_TX0_DMA_START_ADDR (USB_DMA_BASE_ADDRESS + 0xC04)
\r
157 #define MAGPIE_REG_USB_TX0_BURST_SIZE_ADDR (USB_DMA_BASE_ADDRESS + 0xC08)
\r
158 #define MAGPIE_REG_USB_TX0_STATE_ADDR (USB_DMA_BASE_ADDRESS + 0xC10)
\r
159 #define MAGPIE_REG_USB_TX0_CUR_TRACE_ADDR (USB_DMA_BASE_ADDRESS + 0xC14)
\r
160 #define MAGPIE_REG_USB_TX0_SWAP_DATA_ADDR (USB_DMA_BASE_ADDRESS + 0xC18)
\r
162 #define MAGPIE_REG_USB_INTERRUPT_TX0_END (1<<24) //0x1000000
\r
163 #define MAGPIE_REG_USB_INTERRUPT_TX0_COMPL (1<<16) //0x10000
\r
164 #define MAGPIE_REG_USB_INTERRUPT_RX2_END (1<<10) //0x00400
\r
165 #define MAGPIE_REG_USB_INTERRUPT_RX1_END (1<<9) //0x00200
\r
166 #define MAGPIE_REG_USB_INTERRUPT_RX0_END (1<<8) //0x0100
\r
167 #define MAGPIE_REG_USB_INTERRUPT_RX2_COMPL (1<<2) //0x00004
\r
169 #define MAGPIE_REG_USB_INTERRUPT_RX1_COMPL (1<<1) //0x00002
\r
170 #define MAGPIE_REG_USB_INTERRUPT_RX0_COMPL (1<<0) //0x00001
\r
173 #define MAGPIE_REG_USB_INTERRUPT (*((volatile u32_t*)(MAGPIE_REG_USB_INTERRUPT_ADDR)))
\r
174 #define MAGPIE_REG_USB_INTERRUPT_MASK (*((volatile u32_t*)(MAGPIE_REG_USB_INTERRUPT_MASK_ADDR)))
\r
176 #define MAGPIE_REG_USB_RX0_DESC_START (*((volatile u32_t*)(MAGPIE_REG_USB_RX0_DESC_START_ADDR)))
\r
177 #define MAGPIE_REG_USB_RX0_DMA_START (*((volatile u32_t*)(MAGPIE_REG_USB_RX0_DMA_START_ADDR)))
\r
178 #define MAGPIE_REG_USB_RX0_BURST_SIZE (*((volatile u32_t*)(MAGPIE_REG_USB_RX0_BURST_SIZE_ADDR)))
\r
179 #define MAGPIE_REG_USB_RX0_STATE (*((volatile u32_t*)(MAGPIE_REG_USB_RX0_STATE_ADDR)))
\r
180 #define MAGPIE_REG_USB_RX0_CUR_TRACE (*((volatile u32_t*)(MAGPIE_REG_USB_RX0_CUR_TRACE_ADDR)))
\r
181 #define MAGPIE_REG_USB_RX0_SWAP_DATA (*((volatile u32_t*)(MAGPIE_REG_USB_RX0_SWAP_DATA_ADDR)))
\r
184 #define MAGPIE_REG_USB_RX1_DESC_START (*((volatile u32_t*)(MAGPIE_REG_USB_RX1_DESC_START_ADDR)))
\r
185 #define MAGPIE_REG_USB_RX1_DMA_START (*((volatile u32_t*)(MAGPIE_REG_USB_RX1_DMA_START_ADDR)))
\r
186 #define MAGPIE_REG_USB_RX1_BURST_SIZE (*((volatile u32_t*)(MAGPIE_REG_USB_RX1_BURST_SIZE_ADDR)))
\r
187 #define MAGPIE_REG_USB_RX1_STATE (*((volatile u32_t*)(MAGPIE_REG_USB_RX1_STATE_ADDR)))
\r
188 #define MAGPIE_REG_USB_RX1_CUR_TRACE (*((volatile u32_t*)(MAGPIE_REG_USB_RX1_CUR_TRACE_ADDR)))
\r
189 #define MAGPIE_REG_USB_RX1_SWAP_DATA (*((volatile u32_t*)(MAGPIE_REG_USB_RX1_SWAP_DATA_ADDR)))
\r
191 #define MAGPIE_REG_USB_RX2_DESC_START (*((volatile u32_t*)(MAGPIE_REG_USB_RX2_DESC_START_ADDR)))
\r
192 #define MAGPIE_REG_USB_RX2_DMA_START (*((volatile u32_t*)(MAGPIE_REG_USB_RX2_DMA_START_ADDR)))
\r
193 #define MAGPIE_REG_USB_RX2_BURST_SIZE (*((volatile u32_t*)(MAGPIE_REG_USB_RX2_BURST_SIZE_ADDR)))
\r
194 #define MAGPIE_REG_USB_RX2_STATE (*((volatile u32_t*)(MAGPIE_REG_USB_RX2_STATE_ADDR)))
\r
195 #define MAGPIE_REG_USB_RX2_CUR_TRACE (*((volatile u32_t*)(MAGPIE_REG_USB_RX2_CUR_TRACE_ADDR)))
\r
196 #define MAGPIE_REG_USB_RX2_SWAP_DATA (*((volatile u32_t*)(MAGPIE_REG_USB_RX2_SWAP_DATA_ADDR)))
\r
199 #define MAGPIE_REG_USB_TX0_DESC_START (*((volatile u32_t*)(MAGPIE_REG_USB_TX0_DESC_START_ADDR)))
\r
200 #define MAGPIE_REG_USB_TX0_DMA_START (*((volatile u32_t*)(MAGPIE_REG_USB_TX0_DMA_START_ADDR)))
\r
201 #define MAGPIE_REG_USB_TX0_BURST_SIZE (*((volatile u32_t*)(MAGPIE_REG_USB_TX0_BURST_SIZE_ADDR)))
\r
202 #define MAGPIE_REG_USB_TX0_STATE (*((volatile u32_t*)(MAGPIE_REG_USB_TX0_STATE_ADDR)))
\r
203 #define MAGPIE_REG_USB_TX0_CUR_TRACE (*((volatile u32_t*)(MAGPIE_REG_USB_TX0_CUR_TRACE_ADDR)))
\r
204 #define MAGPIE_REG_USB_TX0_SWAP_DATA (*((volatile u32_t*)(MAGPIE_REG_USB_TX0_SWAP_DATA_ADDR)))
\r
208 /*******************************************************************************/
\r
209 /* CPU PLL Register*/
\r
211 #define REG_CPU_PLL_OFFSET 0x0
\r
212 #define REG_CPU_PLL_BYPASS_OFFSET 0x4
\r
213 #define REG_USB_DIVIDE_OFFSET 0x8
\r
214 #define REG_ETH_PLL_OFFSET 0xC
\r
215 #define REG_ETH_PLL_BYPASS_OFFSET 0x10
\r
216 #define REG_ETH_TXRX_DIVIDE_OFFSET 0x14
\r
217 #define REG_ETH_XTAL_DIVIDE_OFFSET 0x18
\r
218 #define REG_PCIE_PLL_CONFIG_OFFSET 0x1C
\r
219 #define REG_PCIE_DITHER_DIV_MAX_OFFSET 0x20
\r
220 #define REG_PCIE_PLL_DITHER_DIV_MIN_OFFSET 0x24
\r
221 #define REG_PCIE_PLL_DITHER_STEP_OFFSET 0x28
\r
222 #define REG_CURRENT_PCIE_PLL_DITHER_OFFSET 0x2c
\r
223 #define REG_USB_SUSPEND_ENABLE_OFFSET 0x30
\r
226 #define MAGPIE_REG_CPU_PLL_ADDR (CPU_PLL_BASE_ADDRESS + REG_CPU_PLL_OFFSET)
\r
227 #define MAGPIE_REG_CPU_PLL_BYPASS_ADDR (CPU_PLL_BASE_ADDRESS + REG_CPU_PLL_BYPASS_OFFSET)
\r
228 #define MAGPIE_REG_USB_DIVIDE_ADDR (CPU_PLL_BASE_ADDRESS + REG_USB_DIVIDE_OFFSET)
\r
229 #define MAGPIE_REG_ETH_PLL_ADDR (CPU_PLL_BASE_ADDRESS + REG_ETH_PLL_OFFSET)
\r
230 #define MAGPIE_REG_ETH_PLL_BYPASS_ADDR (CPU_PLL_BASE_ADDRESS + REG_ETH_PLL_BYPASS_OFFSET)
\r
231 #define MAGPIE_REG_ETH_TXRX_DIVIDE_ADDR (CPU_PLL_BASE_ADDRESS + REG_ETH_TXRX_DIVIDE_OFFSET)
\r
232 #define MAGPIE_REG_ETH_XTAL_DIVIDE_ADDR (CPU_PLL_BASE_ADDRESS + REG_ETH_XTAL_DIVIDE_OFFSET)
\r
233 #define MAGPIE_REG_PCIE_PLL_CONFIG_ADDR (CPU_PLL_BASE_ADDRESS + REG_PCIE_PLL_CONFIG_OFFSET)
\r
234 #define MAGPIE_REG_PCIE_DITHER_DIV_MAX_ADDR (CPU_PLL_BASE_ADDRESS + REG_PCIE_DITHER_DIV_MAX_OFFSET)
\r
235 #define MAGPIE_REG_PCIE_PLL_DITHER_DIV_MIN_ADDR (CPU_PLL_BASE_ADDRESS + REG_PCIE_PLL_DITHER_DIV_MIN_OFFSET)
\r
236 #define MAGPIE_REG_PCIE_PLL_DITHER_STEP_ADDR (CPU_PLL_BASE_ADDRESS + REG_PCIE_PLL_DITHER_STEP_OFFSET)
\r
237 #define MAGPIE_REG_CURRENT_PCIE_PLL_DITHER_ADDR (CPU_PLL_BASE_ADDRESS + REG_CURRENT_PCIE_PLL_DITHER_OFFSET)
\r
238 #define MAGPIE_REG_SUSPEND_ENABLE_ADDR (CPU_PLL_BASE_ADDRESS + REG_USB_SUSPEND_ENABLE_OFFSET)
\r
241 /*******************************************************************************/
\r
244 #define REG_GPIO_OE 0x0
\r
245 #define REG_GPIO_IN 0x4
\r
246 #define REG_GPIO_OUT 0x8
\r
247 #define REG_GPIO_SET 0xC
\r
248 #define REG_GPIO_CLEAR 0x10
\r
249 #define REG_GPIO_INT 0x14
\r
250 #define REG_GPIO_INT_TYPE 0x18
\r
251 #define REG_GPIO_INT_POLARITY 0x1C
\r
252 #define REG_GPIO_PENDING 0x20
\r
253 #define REG_GPIO_INT_MASK 0x24
\r
254 #define REG_GPIO_FUNCTION 0x28
\r
257 #define MAGPIE_REG_GPIO_OE (GPIO_BASE_ADDRESS + REG_GPIO_OE)
\r
258 #define MAGPIE_REG_GPIO_IN (GPIO_BASE_ADDRESS + REG_GPIO_IN)
\r
259 #define MAGPIE_REG_GPIO_OUT (GPIO_BASE_ADDRESS + REG_GPIO_OUT)
\r
260 #define MAGPIE_REG_GPIO_SET (GPIO_BASE_ADDRESS + REG_GPIO_SET)
\r
261 #define MAGPIE_REG_GPIO_CLEAR (GPIO_BASE_ADDRESS + REG_GPIO_CLEAR)
\r
262 #define MAGPIE_REG_GPIO_INT (GPIO_BASE_ADDRESS + REG_GPIO_INT)
\r
263 #define MAGPIE_REG_GPIO_INT_TYPE (GPIO_BASE_ADDRESS + REG_GPIO_INT_TYPE)
\r
264 #define MAGPIE_REG_GPIO_INT_POLARITY (GPIO_BASE_ADDRESS + REG_GPIO_INT_POLARITY)
\r
265 #define MAGPIE_REG_GPIO_PENDING (GPIO_BASE_ADDRESS + REG_GPIO_PENDING)
\r
266 #define MAGPIE_REG_GPIO_INT_MASK (GPIO_BASE_ADDRESS + REG_GPIO_INT_MASK)
\r
267 #define MAGPIE_REG_GPIO_FUNCTION (GPIO_BASE_ADDRESS + REG_GPIO_FUNCTION)
\r
270 /*******************************************************************************/
\r
271 /* SPI Flash Register*/
\r
272 #define MAGPEI_REG_SPI_BASE_ADDR SPI_REG_BASE_ADDRESS
\r
274 #define REG_SPI_CS_OFFSET 0x0
\r
275 #define REG_SPI_AO_OFFSET 0x4
\r
276 #define REG_SPI_D_OFFSET 0x8
\r
277 #define REG_SPI_CLKDIV_OFFSET 0x1C
\r
279 #define MAGPIE_REG_SPI_CS_ADDR (MAGPEI_REG_SPI_BASE_ADDR + REG_SPI_CS_OFFSET)
\r
280 #define MAGPIE_REG_SPI_AO_ADDR (MAGPEI_REG_SPI_BASE_ADDR + REG_SPI_AO_OFFSET)
\r
281 #define MAGPIE_REG_SPI_D_ADDR (MAGPEI_REG_SPI_BASE_ADDR + REG_SPI_D_OFFSET)
\r
282 #define MAGPIE_REG_SPI_CLKDIV_ADDR (MAGPEI_REG_SPI_BASE_ADDR + REG_SPI_CLKDIV_OFFSET)
\r