1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 26c08d5dcSPrafulla Wadaskar /* 36c08d5dcSPrafulla Wadaskar * (C) Copyright 2010 46c08d5dcSPrafulla Wadaskar * Marvell Semiconductor <www.marvell.com> 56c08d5dcSPrafulla Wadaskar * Written-by: Prafulla Wadaskar <prafulla@marvell.com>, Contributor: Mahavir Jain <mjain@marvell.com> 66c08d5dcSPrafulla Wadaskar */ 76c08d5dcSPrafulla Wadaskar 86c08d5dcSPrafulla Wadaskar #ifndef _ARMADA100CPU_H 96c08d5dcSPrafulla Wadaskar #define _ARMADA100CPU_H 106c08d5dcSPrafulla Wadaskar 116c08d5dcSPrafulla Wadaskar #include <asm/io.h> 126c08d5dcSPrafulla Wadaskar #include <asm/system.h> 136c08d5dcSPrafulla Wadaskar 146c08d5dcSPrafulla Wadaskar /* 15ab1b9552SLei Wen * Main Power Management (MPMU) Registers 16ab1b9552SLei Wen * Refer Datasheet Appendix A.8 17ab1b9552SLei Wen */ 18ab1b9552SLei Wen struct armd1mpmu_registers { 19ab1b9552SLei Wen u8 pad0[0x08 - 0x00]; 20ab1b9552SLei Wen u32 fccr; /*0x0008*/ 21ab1b9552SLei Wen u32 pocr; /*0x000c*/ 22ab1b9552SLei Wen u32 posr; /*0x0010*/ 23ab1b9552SLei Wen u32 succr; /*0x0014*/ 24ab1b9552SLei Wen u8 pad1[0x030 - 0x014 - 4]; 25ab1b9552SLei Wen u32 gpcr; /*0x0030*/ 26ab1b9552SLei Wen u8 pad2[0x200 - 0x030 - 4]; 27ab1b9552SLei Wen u32 wdtpcr; /*0x0200*/ 28ab1b9552SLei Wen u8 pad3[0x1000 - 0x200 - 4]; 29ab1b9552SLei Wen u32 apcr; /*0x1000*/ 30ab1b9552SLei Wen u32 apsr; /*0x1004*/ 31ab1b9552SLei Wen u8 pad4[0x1020 - 0x1004 - 4]; 32ab1b9552SLei Wen u32 aprr; /*0x1020*/ 33ab1b9552SLei Wen u32 acgr; /*0x1024*/ 34ab1b9552SLei Wen u32 arsr; /*0x1028*/ 35ab1b9552SLei Wen }; 36ab1b9552SLei Wen 37ab1b9552SLei Wen /* 38ab1b9552SLei Wen * Application Subsystem Power Management 39ab1b9552SLei Wen * Refer Datasheet Appendix A.9 40ab1b9552SLei Wen */ 41ab1b9552SLei Wen struct armd1apmu_registers { 42ab1b9552SLei Wen u32 pcr; /* 0x000 */ 43ab1b9552SLei Wen u32 ccr; /* 0x004 */ 44ab1b9552SLei Wen u32 pad1; 45ab1b9552SLei Wen u32 ccsr; /* 0x00C */ 46ab1b9552SLei Wen u32 fc_timer; /* 0x010 */ 47ab1b9552SLei Wen u32 pad2; 48ab1b9552SLei Wen u32 ideal_cfg; /* 0x018 */ 49ab1b9552SLei Wen u8 pad3[0x04C - 0x018 - 4]; 50ab1b9552SLei Wen u32 lcdcrc; /* 0x04C */ 51ab1b9552SLei Wen u32 cciccrc; /* 0x050 */ 52ab1b9552SLei Wen u32 sd1crc; /* 0x054 */ 53ab1b9552SLei Wen u32 sd2crc; /* 0x058 */ 54ab1b9552SLei Wen u32 usbcrc; /* 0x05C */ 55ab1b9552SLei Wen u32 nfccrc; /* 0x060 */ 56ab1b9552SLei Wen u32 dmacrc; /* 0x064 */ 57ab1b9552SLei Wen u32 pad4; 58ab1b9552SLei Wen u32 buscrc; /* 0x06C */ 59ab1b9552SLei Wen u8 pad5[0x07C - 0x06C - 4]; 60ab1b9552SLei Wen u32 wake_clr; /* 0x07C */ 61ab1b9552SLei Wen u8 pad6[0x090 - 0x07C - 4]; 62ab1b9552SLei Wen u32 core_status; /* 0x090 */ 63ab1b9552SLei Wen u32 rfsc; /* 0x094 */ 64ab1b9552SLei Wen u32 imr; /* 0x098 */ 65ab1b9552SLei Wen u32 irwc; /* 0x09C */ 66ab1b9552SLei Wen u32 isr; /* 0x0A0 */ 67ab1b9552SLei Wen u8 pad7[0x0B0 - 0x0A0 - 4]; 68ab1b9552SLei Wen u32 mhst; /* 0x0B0 */ 69ab1b9552SLei Wen u32 msr; /* 0x0B4 */ 70ab1b9552SLei Wen u8 pad8[0x0C0 - 0x0B4 - 4]; 71ab1b9552SLei Wen u32 msst; /* 0x0C0 */ 72ab1b9552SLei Wen u32 pllss; /* 0x0C4 */ 73ab1b9552SLei Wen u32 smb; /* 0x0C8 */ 74ab1b9552SLei Wen u32 gccrc; /* 0x0CC */ 75ab1b9552SLei Wen u8 pad9[0x0D4 - 0x0CC - 4]; 76ab1b9552SLei Wen u32 smccrc; /* 0x0D4 */ 77ab1b9552SLei Wen u32 pad10; 78ab1b9552SLei Wen u32 xdcrc; /* 0x0DC */ 79ab1b9552SLei Wen u32 sd3crc; /* 0x0E0 */ 80ab1b9552SLei Wen u32 sd4crc; /* 0x0E4 */ 81ab1b9552SLei Wen u8 pad11[0x0F0 - 0x0E4 - 4]; 82ab1b9552SLei Wen u32 cfcrc; /* 0x0F0 */ 83ab1b9552SLei Wen u32 mspcrc; /* 0x0F4 */ 84ab1b9552SLei Wen u32 cmucrc; /* 0x0F8 */ 85ab1b9552SLei Wen u32 fecrc; /* 0x0FC */ 86ab1b9552SLei Wen u32 pciecrc; /* 0x100 */ 87ab1b9552SLei Wen u32 epdcrc; /* 0x104 */ 88ab1b9552SLei Wen }; 89ab1b9552SLei Wen 90ab1b9552SLei Wen /* 91ab1b9552SLei Wen * APB1 Clock Reset/Control Registers 92ab1b9552SLei Wen * Refer Datasheet Appendix A.10 93ab1b9552SLei Wen */ 94ab1b9552SLei Wen struct armd1apb1_registers { 95ab1b9552SLei Wen u32 uart1; /*0x000*/ 96ab1b9552SLei Wen u32 uart2; /*0x004*/ 97ab1b9552SLei Wen u32 gpio; /*0x008*/ 98ab1b9552SLei Wen u32 pwm1; /*0x00c*/ 99ab1b9552SLei Wen u32 pwm2; /*0x010*/ 100ab1b9552SLei Wen u32 pwm3; /*0x014*/ 101ab1b9552SLei Wen u32 pwm4; /*0x018*/ 102ab1b9552SLei Wen u8 pad0[0x028 - 0x018 - 4]; 103ab1b9552SLei Wen u32 rtc; /*0x028*/ 104ab1b9552SLei Wen u32 twsi0; /*0x02c*/ 105ab1b9552SLei Wen u32 kpc; /*0x030*/ 106ab1b9552SLei Wen u32 timers; /*0x034*/ 107ab1b9552SLei Wen u8 pad1[0x03c - 0x034 - 4]; 108ab1b9552SLei Wen u32 aib; /*0x03c*/ 109ab1b9552SLei Wen u32 sw_jtag; /*0x040*/ 110ab1b9552SLei Wen u32 timer1; /*0x044*/ 111ab1b9552SLei Wen u32 onewire; /*0x048*/ 112ab1b9552SLei Wen u8 pad2[0x050 - 0x048 - 4]; 113ab1b9552SLei Wen u32 asfar; /*0x050 AIB Secure First Access Reg*/ 114ab1b9552SLei Wen u32 assar; /*0x054 AIB Secure Second Access Reg*/ 115ab1b9552SLei Wen u8 pad3[0x06c - 0x054 - 4]; 116ab1b9552SLei Wen u32 twsi1; /*0x06c*/ 117ab1b9552SLei Wen u32 uart3; /*0x070*/ 118ab1b9552SLei Wen u8 pad4[0x07c - 0x070 - 4]; 119ab1b9552SLei Wen u32 timer2; /*0x07C*/ 120ab1b9552SLei Wen u8 pad5[0x084 - 0x07c - 4]; 121ab1b9552SLei Wen u32 ac97; /*0x084*/ 122ab1b9552SLei Wen }; 123ab1b9552SLei Wen 124ab1b9552SLei Wen /* 125ab1b9552SLei Wen * APB2 Clock Reset/Control Registers 126ab1b9552SLei Wen * Refer Datasheet Appendix A.11 127ab1b9552SLei Wen */ 128ab1b9552SLei Wen struct armd1apb2_registers { 129ab1b9552SLei Wen u32 pad1[0x01C - 0x000]; 130ab1b9552SLei Wen u32 ssp1_clkrst; /* 0x01C */ 131ab1b9552SLei Wen u32 ssp2_clkrst; /* 0x020 */ 132ab1b9552SLei Wen u32 pad2[0x04C - 0x020 - 4]; 133ab1b9552SLei Wen u32 ssp3_clkrst; /* 0x04C */ 134ab1b9552SLei Wen u32 pad3[0x058 - 0x04C - 4]; 135ab1b9552SLei Wen u32 ssp4_clkrst; /* 0x058 */ 136ab1b9552SLei Wen u32 ssp5_clkrst; /* 0x05C */ 137ab1b9552SLei Wen }; 138ab1b9552SLei Wen 139ab1b9552SLei Wen /* 1406c08d5dcSPrafulla Wadaskar * CPU Interface Registers 1416c08d5dcSPrafulla Wadaskar * Refer Datasheet Appendix A.2 1426c08d5dcSPrafulla Wadaskar */ 1436c08d5dcSPrafulla Wadaskar struct armd1cpu_registers { 1446c08d5dcSPrafulla Wadaskar u32 chip_id; /* Chip Id Reg */ 1456c08d5dcSPrafulla Wadaskar u32 pad; 1466c08d5dcSPrafulla Wadaskar u32 cpu_conf; /* CPU Conf Reg */ 1476c08d5dcSPrafulla Wadaskar u32 pad1; 1486c08d5dcSPrafulla Wadaskar u32 cpu_sram_spd; /* CPU SRAM Speed Reg */ 1496c08d5dcSPrafulla Wadaskar u32 pad2; 1506c08d5dcSPrafulla Wadaskar u32 cpu_l2c_spd; /* CPU L2cache Speed Conf */ 1516c08d5dcSPrafulla Wadaskar u32 mcb_conf; /* MCB Conf Reg */ 1526c08d5dcSPrafulla Wadaskar u32 sys_boot_ctl; /* Sytem Boot Control */ 1536c08d5dcSPrafulla Wadaskar }; 1546c08d5dcSPrafulla Wadaskar 1556c08d5dcSPrafulla Wadaskar /* 1566c08d5dcSPrafulla Wadaskar * Functions 1576c08d5dcSPrafulla Wadaskar */ 1586c08d5dcSPrafulla Wadaskar u32 armd1_sdram_base(int); 1596c08d5dcSPrafulla Wadaskar u32 armd1_sdram_size(int); 1606c08d5dcSPrafulla Wadaskar 1616c08d5dcSPrafulla Wadaskar #endif /* _ARMADA100CPU_H */ 162