Peng Fan | b15705a | 2021-08-07 16:00:35 +0800 | [diff] [blame] | 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 | |
Peng Fan | 690eea1 | 2021-08-07 16:00:45 +0800 | [diff] [blame] | 10 | #include <linux/bitops.h> |
Peng Fan | b15705a | 2021-08-07 16:00:35 +0800 | [diff] [blame] | 11 | #include <linux/sizes.h> |
| 12 | |
Ye Li | d5ffe55 | 2023-01-31 16:42:13 +0800 | [diff] [blame^] | 13 | #define SRAM0_BASE 0x22010000 |
Peng Fan | b15705a | 2021-08-07 16:00:35 +0800 | [diff] [blame] | 14 | #define PBRIDGE0_BASE 0x28000000 |
| 15 | |
| 16 | #define CMC0_RBASE 0x28025000 |
| 17 | |
Ye Li | 2e9f15c | 2022-04-06 14:30:08 +0800 | [diff] [blame] | 18 | #define MU0_B_BASE_ADDR 0x29220000 |
Peng Fan | b15705a | 2021-08-07 16:00:35 +0800 | [diff] [blame] | 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 | |
Alice Guo | 23ee0e1 | 2021-10-29 09:46:29 +0800 | [diff] [blame] | 35 | #define PCC1_RBASE 0x28091000 |
Peng Fan | b15705a | 2021-08-07 16:00:35 +0800 | [diff] [blame] | 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 | #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__)) |
| 67 | #include <asm/types.h> |
| 68 | |
Peng Fan | f6928f9 | 2021-08-07 16:01:09 +0800 | [diff] [blame] | 69 | struct mu_type { |
| 70 | u32 ver; |
| 71 | u32 par; |
| 72 | u32 cr; |
| 73 | u32 sr; |
| 74 | u32 reserved0[60]; |
| 75 | u32 fcr; |
| 76 | u32 fsr; |
| 77 | u32 reserved1[2]; |
| 78 | u32 gier; |
| 79 | u32 gcr; |
| 80 | u32 gsr; |
| 81 | u32 reserved2; |
| 82 | u32 tcr; |
| 83 | u32 tsr; |
| 84 | u32 rcr; |
| 85 | u32 rsr; |
| 86 | u32 reserved3[52]; |
| 87 | u32 tr[16]; |
| 88 | u32 reserved4[16]; |
| 89 | u32 rr[16]; |
| 90 | u32 reserved5[14]; |
| 91 | u32 mu_attr; |
| 92 | }; |
| 93 | |
Peng Fan | b15705a | 2021-08-07 16:00:35 +0800 | [diff] [blame] | 94 | struct usbphy_regs { |
| 95 | u32 usbphy_pwd; /* 0x000 */ |
| 96 | u32 usbphy_pwd_set; /* 0x004 */ |
| 97 | u32 usbphy_pwd_clr; /* 0x008 */ |
| 98 | u32 usbphy_pwd_tog; /* 0x00c */ |
| 99 | u32 usbphy_tx; /* 0x010 */ |
| 100 | u32 usbphy_tx_set; /* 0x014 */ |
| 101 | u32 usbphy_tx_clr; /* 0x018 */ |
| 102 | u32 usbphy_tx_tog; /* 0x01c */ |
| 103 | u32 usbphy_rx; /* 0x020 */ |
| 104 | u32 usbphy_rx_set; /* 0x024 */ |
| 105 | u32 usbphy_rx_clr; /* 0x028 */ |
| 106 | u32 usbphy_rx_tog; /* 0x02c */ |
| 107 | u32 usbphy_ctrl; /* 0x030 */ |
| 108 | u32 usbphy_ctrl_set; /* 0x034 */ |
| 109 | u32 usbphy_ctrl_clr; /* 0x038 */ |
| 110 | u32 usbphy_ctrl_tog; /* 0x03c */ |
| 111 | u32 usbphy_status; /* 0x040 */ |
| 112 | u32 reserved0[3]; |
| 113 | u32 usbphy_debug; /* 0x050 */ |
| 114 | u32 usbphy_debug_set; /* 0x054 */ |
| 115 | u32 usbphy_debug_clr; /* 0x058 */ |
| 116 | u32 usbphy_debug_tog; /* 0x05c */ |
| 117 | u32 usbphy_debug0_status; /* 0x060 */ |
| 118 | u32 reserved1[3]; |
| 119 | u32 usbphy_debug1; /* 0x070 */ |
| 120 | u32 usbphy_debug1_set; /* 0x074 */ |
| 121 | u32 usbphy_debug1_clr; /* 0x078 */ |
| 122 | u32 usbphy_debug1_tog; /* 0x07c */ |
| 123 | u32 usbphy_version; /* 0x080 */ |
| 124 | u32 reserved2[7]; |
| 125 | u32 usb1_pll_480_ctrl; /* 0x0a0 */ |
| 126 | u32 usb1_pll_480_ctrl_set; /* 0x0a4 */ |
| 127 | u32 usb1_pll_480_ctrl_clr; /* 0x0a8 */ |
| 128 | u32 usb1_pll_480_ctrl_tog; /* 0x0ac */ |
| 129 | u32 reserved3[4]; |
| 130 | u32 usb1_vbus_detect; /* 0xc0 */ |
| 131 | u32 usb1_vbus_detect_set; /* 0xc4 */ |
| 132 | u32 usb1_vbus_detect_clr; /* 0xc8 */ |
| 133 | u32 usb1_vbus_detect_tog; /* 0xcc */ |
| 134 | u32 usb1_vbus_det_stat; /* 0xd0 */ |
| 135 | u32 reserved4[3]; |
| 136 | u32 usb1_chrg_detect; /* 0xe0 */ |
| 137 | u32 usb1_chrg_detect_set; /* 0xe4 */ |
| 138 | u32 usb1_chrg_detect_clr; /* 0xe8 */ |
| 139 | u32 usb1_chrg_detect_tog; /* 0xec */ |
| 140 | u32 usb1_chrg_det_stat; /* 0xf0 */ |
| 141 | u32 reserved5[3]; |
| 142 | u32 usbphy_anactrl; /* 0x100 */ |
| 143 | u32 usbphy_anactrl_set; /* 0x104 */ |
| 144 | u32 usbphy_anactrl_clr; /* 0x108 */ |
| 145 | u32 usbphy_anactrl_tog; /* 0x10c */ |
| 146 | u32 usb1_loopback; /* 0x110 */ |
| 147 | u32 usb1_loopback_set; /* 0x114 */ |
| 148 | u32 usb1_loopback_clr; /* 0x118 */ |
| 149 | u32 usb1_loopback_tog; /* 0x11c */ |
| 150 | u32 usb1_loopback_hsfscnt; /* 0x120 */ |
| 151 | u32 usb1_loopback_hsfscnt_set; /* 0x124 */ |
| 152 | u32 usb1_loopback_hsfscnt_clr; /* 0x128 */ |
| 153 | u32 usb1_loopback_hsfscnt_tog; /* 0x12c */ |
| 154 | u32 usphy_trim_override_en; /* 0x130 */ |
| 155 | u32 usphy_trim_override_en_set; /* 0x134 */ |
| 156 | u32 usphy_trim_override_en_clr; /* 0x138 */ |
| 157 | u32 usphy_trim_override_en_tog; /* 0x13c */ |
| 158 | u32 usb1_pfda_ctrl1; /* 0x140 */ |
| 159 | u32 usb1_pfda_ctrl1_set; /* 0x144 */ |
| 160 | u32 usb1_pfda_ctrl1_clr; /* 0x148 */ |
| 161 | u32 usb1_pfda_ctrl1_tog; /* 0x14c */ |
| 162 | }; |
| 163 | #endif |
| 164 | |
| 165 | #endif |