Jagan Teki | 4acd6d6 | 2023-01-30 20:27:34 +0530 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * (C) Copyright 2021 Rockchip Electronics Co., Ltd |
| 4 | */ |
| 5 | |
| 6 | #ifndef __SOC_ROCKCHIP_RK3588_GRF_H__ |
| 7 | #define __SOC_ROCKCHIP_RK3588_GRF_H__ |
| 8 | |
| 9 | struct rk3588_pmu1grf { |
| 10 | unsigned int soc_con[12]; |
| 11 | unsigned int reserved0[(0x0050 - 0x002c) / 4 - 1]; |
| 12 | unsigned int biu_con; |
| 13 | unsigned int biu_sts; |
| 14 | unsigned int reserved1[(0x0060 - 0x0054) / 4 - 1]; |
| 15 | unsigned int soc_sts; |
| 16 | unsigned int reserved2[(0x0080 - 0x0060) / 4 - 1]; |
| 17 | unsigned int mem_con[4]; |
| 18 | unsigned int reserved3[(0x0200 - 0x008c) / 4 - 1]; |
| 19 | unsigned int os_reg[8]; |
| 20 | unsigned int reserved4[(0x0230 - 0x021c) / 4 - 1]; |
| 21 | unsigned int rst_sts; |
| 22 | unsigned int rst_clr; |
| 23 | unsigned int reserved5[(0x0380 - 0x0234) / 4 - 1]; |
| 24 | unsigned int sd_detect_con; |
| 25 | unsigned int reserved6[(0x0390 - 0x0380) / 4 - 1]; |
| 26 | unsigned int sd_detect_sts; |
| 27 | unsigned int reserved7[(0x03a0 - 0x0390) / 4 - 1]; |
| 28 | unsigned int sd_detect_clr; |
| 29 | unsigned int reserved8[(0x03b0 - 0x03a0) / 4 - 1]; |
| 30 | unsigned int sd_detect_cnt; |
| 31 | }; |
| 32 | |
| 33 | check_member(rk3588_pmu1grf, sd_detect_cnt, 0x03b0); |
| 34 | |
Quentin Schulz | 95b568f | 2024-03-11 13:01:54 +0100 | [diff] [blame] | 35 | #define SYS_GRF_BASE 0xfd58c000 |
| 36 | |
| 37 | struct rk3588_sysgrf { |
| 38 | unsigned int wdt_con0; |
| 39 | unsigned int reserved0[(0x0010 - 0x0000) / 4 - 1]; |
| 40 | unsigned int uart_con[2]; |
| 41 | unsigned int reserved1[(0x00c0 - 0x0014) / 4 - 1]; |
| 42 | unsigned int gic_con0; |
| 43 | unsigned int reserved2[(0x0200 - 0x00c0) / 4 - 1]; |
| 44 | unsigned int memcfg_con[32]; |
| 45 | unsigned int reserved3[(0x0300 - 0x027c) / 4 - 1]; |
| 46 | /* soc_con0 is reserved */ |
| 47 | unsigned int soc_con[14]; |
| 48 | unsigned int reserved4[(0x0380 - 0x0334) / 4 - 1]; |
| 49 | unsigned int soc_status[4]; |
| 50 | unsigned int reserved5[(0x0500 - 0x038c) / 4 - 1]; |
| 51 | unsigned int otp_key08; |
| 52 | unsigned int otp_key0d; |
| 53 | unsigned int otp_key0e; |
| 54 | unsigned int reserved6[(0x0600 - 0x0508) / 4 - 1]; |
| 55 | unsigned int chip_id; |
| 56 | }; |
| 57 | |
| 58 | check_member(rk3588_sysgrf, chip_id, 0x0600); |
Jagan Teki | 4acd6d6 | 2023-01-30 20:27:34 +0530 | [diff] [blame] | 59 | #endif /*__SOC_ROCKCHIP_RK3588_GRF_H__ */ |