1/* SPDX-License-Identifier: GPL-2.0+ */ 2/* 3 * Copyright 2020 NXP 4 */ 5 6#ifndef _IMX8ULP_REGS_H_ 7#define _IMX8ULP_REGS_H_ 8#define ARCH_MXC 9 10#include <linux/bitops.h> 11#include <linux/sizes.h> 12 13#define SRAM0_BASE 0x22010000 14#define PBRIDGE0_BASE 0x28000000 15 16#define CMC0_RBASE 0x28025000 17 18#define MU0_B_BASE_ADDR 0x29220000 19#define CMC1_BASE_ADDR 0x29240000 20 21#define SIM1_BASE_ADDR 0x29290000 22 23#define WDG3_RBASE 0x292a0000UL 24 25#define SIM_SEC_BASE_ADDR 0x2802B000 26 27#define CGC1_SOSCDIV_ADDR 0x292C0108 28#define CGC1_FRODIV_ADDR 0x292C0208 29 30#define CFG1_PLL2CSR_ADDR 0x292C0500 31#define CFG1_PLL2CFG_ADDR 0x292C0510 32 33#define PCC_XRDC_MGR_ADDR 0x292d00bc 34 35#define PCC1_RBASE 0x28091000 36#define PCC3_RBASE 0x292d0000 37#define PCC4_RBASE 0x29800000 38#define PCC5_RBASE 0x2da70000 39 40#define IOMUXC_BASE_ADDR 0x298c0000 41 42#define LPUART4_RBASE 0x29390000 43#define LPUART5_RBASE 0x293a0000 44#define LPUART6_RBASE 0x29860000 45#define LPUART7_RBASE 0x29870000 46 47#define LPUART_BASE LPUART5_RBASE 48 49#define FSB_BASE_ADDR 0x27010000 50 51#define USBOTG0_RBASE 0x29900000 52#define USB_PHY0_BASE_ADDR 0x29910000 53#define USBOTG1_RBASE 0x29920000 54#define USB_PHY1_BASE_ADDR 0x29930000 55#define USB_BASE_ADDR USBOTG0_RBASE 56 57#define DDR_CTL_BASE_ADDR 0x2E060000 58#define DDR_PI_BASE_ADDR 0x2E062000 59#define DDR_PHY_BASE_ADDR 0x2E064000 60#define AVD_SIM_BASE_ADDR 0x2DA50000 61#define AVD_SIM_LPDDR_CTRL (AVD_SIM_BASE_ADDR + 0x14) 62#define AVD_SIM_LPDDR_CTRL2 (AVD_SIM_BASE_ADDR + 0x18) 63 64#define FEC_QUIRK_ENET_MAC 65 66#define IMG_CONTAINER_BASE (0x22010000UL) 67 68#if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__)) 69#include <asm/types.h> 70 71struct mu_type { 72 u32 ver; 73 u32 par; 74 u32 cr; 75 u32 sr; 76 u32 reserved0[60]; 77 u32 fcr; 78 u32 fsr; 79 u32 reserved1[2]; 80 u32 gier; 81 u32 gcr; 82 u32 gsr; 83 u32 reserved2; 84 u32 tcr; 85 u32 tsr; 86 u32 rcr; 87 u32 rsr; 88 u32 reserved3[52]; 89 u32 tr[16]; 90 u32 reserved4[16]; 91 u32 rr[16]; 92 u32 reserved5[14]; 93 u32 mu_attr; 94}; 95 96struct usbphy_regs { 97 u32 usbphy_pwd; /* 0x000 */ 98 u32 usbphy_pwd_set; /* 0x004 */ 99 u32 usbphy_pwd_clr; /* 0x008 */ 100 u32 usbphy_pwd_tog; /* 0x00c */ 101 u32 usbphy_tx; /* 0x010 */ 102 u32 usbphy_tx_set; /* 0x014 */ 103 u32 usbphy_tx_clr; /* 0x018 */ 104 u32 usbphy_tx_tog; /* 0x01c */ 105 u32 usbphy_rx; /* 0x020 */ 106 u32 usbphy_rx_set; /* 0x024 */ 107 u32 usbphy_rx_clr; /* 0x028 */ 108 u32 usbphy_rx_tog; /* 0x02c */ 109 u32 usbphy_ctrl; /* 0x030 */ 110 u32 usbphy_ctrl_set; /* 0x034 */ 111 u32 usbphy_ctrl_clr; /* 0x038 */ 112 u32 usbphy_ctrl_tog; /* 0x03c */ 113 u32 usbphy_status; /* 0x040 */ 114 u32 reserved0[3]; 115 u32 usbphy_debug; /* 0x050 */ 116 u32 usbphy_debug_set; /* 0x054 */ 117 u32 usbphy_debug_clr; /* 0x058 */ 118 u32 usbphy_debug_tog; /* 0x05c */ 119 u32 usbphy_debug0_status; /* 0x060 */ 120 u32 reserved1[3]; 121 u32 usbphy_debug1; /* 0x070 */ 122 u32 usbphy_debug1_set; /* 0x074 */ 123 u32 usbphy_debug1_clr; /* 0x078 */ 124 u32 usbphy_debug1_tog; /* 0x07c */ 125 u32 usbphy_version; /* 0x080 */ 126 u32 reserved2[7]; 127 u32 usb1_pll_480_ctrl; /* 0x0a0 */ 128 u32 usb1_pll_480_ctrl_set; /* 0x0a4 */ 129 u32 usb1_pll_480_ctrl_clr; /* 0x0a8 */ 130 u32 usb1_pll_480_ctrl_tog; /* 0x0ac */ 131 u32 reserved3[4]; 132 u32 usb1_vbus_detect; /* 0xc0 */ 133 u32 usb1_vbus_detect_set; /* 0xc4 */ 134 u32 usb1_vbus_detect_clr; /* 0xc8 */ 135 u32 usb1_vbus_detect_tog; /* 0xcc */ 136 u32 usb1_vbus_det_stat; /* 0xd0 */ 137 u32 reserved4[3]; 138 u32 usb1_chrg_detect; /* 0xe0 */ 139 u32 usb1_chrg_detect_set; /* 0xe4 */ 140 u32 usb1_chrg_detect_clr; /* 0xe8 */ 141 u32 usb1_chrg_detect_tog; /* 0xec */ 142 u32 usb1_chrg_det_stat; /* 0xf0 */ 143 u32 reserved5[3]; 144 u32 usbphy_anactrl; /* 0x100 */ 145 u32 usbphy_anactrl_set; /* 0x104 */ 146 u32 usbphy_anactrl_clr; /* 0x108 */ 147 u32 usbphy_anactrl_tog; /* 0x10c */ 148 u32 usb1_loopback; /* 0x110 */ 149 u32 usb1_loopback_set; /* 0x114 */ 150 u32 usb1_loopback_clr; /* 0x118 */ 151 u32 usb1_loopback_tog; /* 0x11c */ 152 u32 usb1_loopback_hsfscnt; /* 0x120 */ 153 u32 usb1_loopback_hsfscnt_set; /* 0x124 */ 154 u32 usb1_loopback_hsfscnt_clr; /* 0x128 */ 155 u32 usb1_loopback_hsfscnt_tog; /* 0x12c */ 156 u32 usphy_trim_override_en; /* 0x130 */ 157 u32 usphy_trim_override_en_set; /* 0x134 */ 158 u32 usphy_trim_override_en_clr; /* 0x138 */ 159 u32 usphy_trim_override_en_tog; /* 0x13c */ 160 u32 usb1_pfda_ctrl1; /* 0x140 */ 161 u32 usb1_pfda_ctrl1_set; /* 0x144 */ 162 u32 usb1_pfda_ctrl1_clr; /* 0x148 */ 163 u32 usb1_pfda_ctrl1_tog; /* 0x14c */ 164}; 165#endif 166 167#endif 168