18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * QUICC Engine (QE) Internal Memory Map. 48c2ecf20Sopenharmony_ci * The Internal Memory Map for devices with QE on them. This 58c2ecf20Sopenharmony_ci * is the superset of all QE devices (8360, etc.). 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci * Copyright (C) 2006. Freescale Semiconductor, Inc. All rights reserved. 88c2ecf20Sopenharmony_ci * 98c2ecf20Sopenharmony_ci * Authors: Shlomi Gridish <gridish@freescale.com> 108c2ecf20Sopenharmony_ci * Li Yang <leoli@freescale.com> 118c2ecf20Sopenharmony_ci */ 128c2ecf20Sopenharmony_ci#ifndef _ASM_POWERPC_IMMAP_QE_H 138c2ecf20Sopenharmony_ci#define _ASM_POWERPC_IMMAP_QE_H 148c2ecf20Sopenharmony_ci#ifdef __KERNEL__ 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci#include <linux/kernel.h> 178c2ecf20Sopenharmony_ci#include <asm/io.h> 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci#define QE_IMMAP_SIZE (1024 * 1024) /* 1MB from 1MB+IMMR */ 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci/* QE I-RAM */ 228c2ecf20Sopenharmony_cistruct qe_iram { 238c2ecf20Sopenharmony_ci __be32 iadd; /* I-RAM Address Register */ 248c2ecf20Sopenharmony_ci __be32 idata; /* I-RAM Data Register */ 258c2ecf20Sopenharmony_ci u8 res0[0x04]; 268c2ecf20Sopenharmony_ci __be32 iready; /* I-RAM Ready Register */ 278c2ecf20Sopenharmony_ci u8 res1[0x70]; 288c2ecf20Sopenharmony_ci} __attribute__ ((packed)); 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci/* QE Interrupt Controller */ 318c2ecf20Sopenharmony_cistruct qe_ic_regs { 328c2ecf20Sopenharmony_ci __be32 qicr; 338c2ecf20Sopenharmony_ci __be32 qivec; 348c2ecf20Sopenharmony_ci __be32 qripnr; 358c2ecf20Sopenharmony_ci __be32 qipnr; 368c2ecf20Sopenharmony_ci __be32 qipxcc; 378c2ecf20Sopenharmony_ci __be32 qipycc; 388c2ecf20Sopenharmony_ci __be32 qipwcc; 398c2ecf20Sopenharmony_ci __be32 qipzcc; 408c2ecf20Sopenharmony_ci __be32 qimr; 418c2ecf20Sopenharmony_ci __be32 qrimr; 428c2ecf20Sopenharmony_ci __be32 qicnr; 438c2ecf20Sopenharmony_ci u8 res0[0x4]; 448c2ecf20Sopenharmony_ci __be32 qiprta; 458c2ecf20Sopenharmony_ci __be32 qiprtb; 468c2ecf20Sopenharmony_ci u8 res1[0x4]; 478c2ecf20Sopenharmony_ci __be32 qricr; 488c2ecf20Sopenharmony_ci u8 res2[0x20]; 498c2ecf20Sopenharmony_ci __be32 qhivec; 508c2ecf20Sopenharmony_ci u8 res3[0x1C]; 518c2ecf20Sopenharmony_ci} __attribute__ ((packed)); 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci/* Communications Processor */ 548c2ecf20Sopenharmony_cistruct cp_qe { 558c2ecf20Sopenharmony_ci __be32 cecr; /* QE command register */ 568c2ecf20Sopenharmony_ci __be32 ceccr; /* QE controller configuration register */ 578c2ecf20Sopenharmony_ci __be32 cecdr; /* QE command data register */ 588c2ecf20Sopenharmony_ci u8 res0[0xA]; 598c2ecf20Sopenharmony_ci __be16 ceter; /* QE timer event register */ 608c2ecf20Sopenharmony_ci u8 res1[0x2]; 618c2ecf20Sopenharmony_ci __be16 cetmr; /* QE timers mask register */ 628c2ecf20Sopenharmony_ci __be32 cetscr; /* QE time-stamp timer control register */ 638c2ecf20Sopenharmony_ci __be32 cetsr1; /* QE time-stamp register 1 */ 648c2ecf20Sopenharmony_ci __be32 cetsr2; /* QE time-stamp register 2 */ 658c2ecf20Sopenharmony_ci u8 res2[0x8]; 668c2ecf20Sopenharmony_ci __be32 cevter; /* QE virtual tasks event register */ 678c2ecf20Sopenharmony_ci __be32 cevtmr; /* QE virtual tasks mask register */ 688c2ecf20Sopenharmony_ci __be16 cercr; /* QE RAM control register */ 698c2ecf20Sopenharmony_ci u8 res3[0x2]; 708c2ecf20Sopenharmony_ci u8 res4[0x24]; 718c2ecf20Sopenharmony_ci __be16 ceexe1; /* QE external request 1 event register */ 728c2ecf20Sopenharmony_ci u8 res5[0x2]; 738c2ecf20Sopenharmony_ci __be16 ceexm1; /* QE external request 1 mask register */ 748c2ecf20Sopenharmony_ci u8 res6[0x2]; 758c2ecf20Sopenharmony_ci __be16 ceexe2; /* QE external request 2 event register */ 768c2ecf20Sopenharmony_ci u8 res7[0x2]; 778c2ecf20Sopenharmony_ci __be16 ceexm2; /* QE external request 2 mask register */ 788c2ecf20Sopenharmony_ci u8 res8[0x2]; 798c2ecf20Sopenharmony_ci __be16 ceexe3; /* QE external request 3 event register */ 808c2ecf20Sopenharmony_ci u8 res9[0x2]; 818c2ecf20Sopenharmony_ci __be16 ceexm3; /* QE external request 3 mask register */ 828c2ecf20Sopenharmony_ci u8 res10[0x2]; 838c2ecf20Sopenharmony_ci __be16 ceexe4; /* QE external request 4 event register */ 848c2ecf20Sopenharmony_ci u8 res11[0x2]; 858c2ecf20Sopenharmony_ci __be16 ceexm4; /* QE external request 4 mask register */ 868c2ecf20Sopenharmony_ci u8 res12[0x3A]; 878c2ecf20Sopenharmony_ci __be32 ceurnr; /* QE microcode revision number register */ 888c2ecf20Sopenharmony_ci u8 res13[0x244]; 898c2ecf20Sopenharmony_ci} __attribute__ ((packed)); 908c2ecf20Sopenharmony_ci 918c2ecf20Sopenharmony_ci/* QE Multiplexer */ 928c2ecf20Sopenharmony_cistruct qe_mux { 938c2ecf20Sopenharmony_ci __be32 cmxgcr; /* CMX general clock route register */ 948c2ecf20Sopenharmony_ci __be32 cmxsi1cr_l; /* CMX SI1 clock route low register */ 958c2ecf20Sopenharmony_ci __be32 cmxsi1cr_h; /* CMX SI1 clock route high register */ 968c2ecf20Sopenharmony_ci __be32 cmxsi1syr; /* CMX SI1 SYNC route register */ 978c2ecf20Sopenharmony_ci __be32 cmxucr[4]; /* CMX UCCx clock route registers */ 988c2ecf20Sopenharmony_ci __be32 cmxupcr; /* CMX UPC clock route register */ 998c2ecf20Sopenharmony_ci u8 res0[0x1C]; 1008c2ecf20Sopenharmony_ci} __attribute__ ((packed)); 1018c2ecf20Sopenharmony_ci 1028c2ecf20Sopenharmony_ci/* QE Timers */ 1038c2ecf20Sopenharmony_cistruct qe_timers { 1048c2ecf20Sopenharmony_ci u8 gtcfr1; /* Timer 1 and Timer 2 global config register*/ 1058c2ecf20Sopenharmony_ci u8 res0[0x3]; 1068c2ecf20Sopenharmony_ci u8 gtcfr2; /* Timer 3 and timer 4 global config register*/ 1078c2ecf20Sopenharmony_ci u8 res1[0xB]; 1088c2ecf20Sopenharmony_ci __be16 gtmdr1; /* Timer 1 mode register */ 1098c2ecf20Sopenharmony_ci __be16 gtmdr2; /* Timer 2 mode register */ 1108c2ecf20Sopenharmony_ci __be16 gtrfr1; /* Timer 1 reference register */ 1118c2ecf20Sopenharmony_ci __be16 gtrfr2; /* Timer 2 reference register */ 1128c2ecf20Sopenharmony_ci __be16 gtcpr1; /* Timer 1 capture register */ 1138c2ecf20Sopenharmony_ci __be16 gtcpr2; /* Timer 2 capture register */ 1148c2ecf20Sopenharmony_ci __be16 gtcnr1; /* Timer 1 counter */ 1158c2ecf20Sopenharmony_ci __be16 gtcnr2; /* Timer 2 counter */ 1168c2ecf20Sopenharmony_ci __be16 gtmdr3; /* Timer 3 mode register */ 1178c2ecf20Sopenharmony_ci __be16 gtmdr4; /* Timer 4 mode register */ 1188c2ecf20Sopenharmony_ci __be16 gtrfr3; /* Timer 3 reference register */ 1198c2ecf20Sopenharmony_ci __be16 gtrfr4; /* Timer 4 reference register */ 1208c2ecf20Sopenharmony_ci __be16 gtcpr3; /* Timer 3 capture register */ 1218c2ecf20Sopenharmony_ci __be16 gtcpr4; /* Timer 4 capture register */ 1228c2ecf20Sopenharmony_ci __be16 gtcnr3; /* Timer 3 counter */ 1238c2ecf20Sopenharmony_ci __be16 gtcnr4; /* Timer 4 counter */ 1248c2ecf20Sopenharmony_ci __be16 gtevr1; /* Timer 1 event register */ 1258c2ecf20Sopenharmony_ci __be16 gtevr2; /* Timer 2 event register */ 1268c2ecf20Sopenharmony_ci __be16 gtevr3; /* Timer 3 event register */ 1278c2ecf20Sopenharmony_ci __be16 gtevr4; /* Timer 4 event register */ 1288c2ecf20Sopenharmony_ci __be16 gtps; /* Timer 1 prescale register */ 1298c2ecf20Sopenharmony_ci u8 res2[0x46]; 1308c2ecf20Sopenharmony_ci} __attribute__ ((packed)); 1318c2ecf20Sopenharmony_ci 1328c2ecf20Sopenharmony_ci/* BRG */ 1338c2ecf20Sopenharmony_cistruct qe_brg { 1348c2ecf20Sopenharmony_ci __be32 brgc[16]; /* BRG configuration registers */ 1358c2ecf20Sopenharmony_ci u8 res0[0x40]; 1368c2ecf20Sopenharmony_ci} __attribute__ ((packed)); 1378c2ecf20Sopenharmony_ci 1388c2ecf20Sopenharmony_ci/* SPI */ 1398c2ecf20Sopenharmony_cistruct spi { 1408c2ecf20Sopenharmony_ci u8 res0[0x20]; 1418c2ecf20Sopenharmony_ci __be32 spmode; /* SPI mode register */ 1428c2ecf20Sopenharmony_ci u8 res1[0x2]; 1438c2ecf20Sopenharmony_ci u8 spie; /* SPI event register */ 1448c2ecf20Sopenharmony_ci u8 res2[0x1]; 1458c2ecf20Sopenharmony_ci u8 res3[0x2]; 1468c2ecf20Sopenharmony_ci u8 spim; /* SPI mask register */ 1478c2ecf20Sopenharmony_ci u8 res4[0x1]; 1488c2ecf20Sopenharmony_ci u8 res5[0x1]; 1498c2ecf20Sopenharmony_ci u8 spcom; /* SPI command register */ 1508c2ecf20Sopenharmony_ci u8 res6[0x2]; 1518c2ecf20Sopenharmony_ci __be32 spitd; /* SPI transmit data register (cpu mode) */ 1528c2ecf20Sopenharmony_ci __be32 spird; /* SPI receive data register (cpu mode) */ 1538c2ecf20Sopenharmony_ci u8 res7[0x8]; 1548c2ecf20Sopenharmony_ci} __attribute__ ((packed)); 1558c2ecf20Sopenharmony_ci 1568c2ecf20Sopenharmony_ci/* SI */ 1578c2ecf20Sopenharmony_cistruct si1 { 1588c2ecf20Sopenharmony_ci __be16 sixmr1[4]; /* SI1 TDMx (x = A B C D) mode register */ 1598c2ecf20Sopenharmony_ci u8 siglmr1_h; /* SI1 global mode register high */ 1608c2ecf20Sopenharmony_ci u8 res0[0x1]; 1618c2ecf20Sopenharmony_ci u8 sicmdr1_h; /* SI1 command register high */ 1628c2ecf20Sopenharmony_ci u8 res2[0x1]; 1638c2ecf20Sopenharmony_ci u8 sistr1_h; /* SI1 status register high */ 1648c2ecf20Sopenharmony_ci u8 res3[0x1]; 1658c2ecf20Sopenharmony_ci __be16 sirsr1_h; /* SI1 RAM shadow address register high */ 1668c2ecf20Sopenharmony_ci u8 sitarc1; /* SI1 RAM counter Tx TDMA */ 1678c2ecf20Sopenharmony_ci u8 sitbrc1; /* SI1 RAM counter Tx TDMB */ 1688c2ecf20Sopenharmony_ci u8 sitcrc1; /* SI1 RAM counter Tx TDMC */ 1698c2ecf20Sopenharmony_ci u8 sitdrc1; /* SI1 RAM counter Tx TDMD */ 1708c2ecf20Sopenharmony_ci u8 sirarc1; /* SI1 RAM counter Rx TDMA */ 1718c2ecf20Sopenharmony_ci u8 sirbrc1; /* SI1 RAM counter Rx TDMB */ 1728c2ecf20Sopenharmony_ci u8 sircrc1; /* SI1 RAM counter Rx TDMC */ 1738c2ecf20Sopenharmony_ci u8 sirdrc1; /* SI1 RAM counter Rx TDMD */ 1748c2ecf20Sopenharmony_ci u8 res4[0x8]; 1758c2ecf20Sopenharmony_ci __be16 siemr1; /* SI1 TDME mode register 16 bits */ 1768c2ecf20Sopenharmony_ci __be16 sifmr1; /* SI1 TDMF mode register 16 bits */ 1778c2ecf20Sopenharmony_ci __be16 sigmr1; /* SI1 TDMG mode register 16 bits */ 1788c2ecf20Sopenharmony_ci __be16 sihmr1; /* SI1 TDMH mode register 16 bits */ 1798c2ecf20Sopenharmony_ci u8 siglmg1_l; /* SI1 global mode register low 8 bits */ 1808c2ecf20Sopenharmony_ci u8 res5[0x1]; 1818c2ecf20Sopenharmony_ci u8 sicmdr1_l; /* SI1 command register low 8 bits */ 1828c2ecf20Sopenharmony_ci u8 res6[0x1]; 1838c2ecf20Sopenharmony_ci u8 sistr1_l; /* SI1 status register low 8 bits */ 1848c2ecf20Sopenharmony_ci u8 res7[0x1]; 1858c2ecf20Sopenharmony_ci __be16 sirsr1_l; /* SI1 RAM shadow address register low 16 bits*/ 1868c2ecf20Sopenharmony_ci u8 siterc1; /* SI1 RAM counter Tx TDME 8 bits */ 1878c2ecf20Sopenharmony_ci u8 sitfrc1; /* SI1 RAM counter Tx TDMF 8 bits */ 1888c2ecf20Sopenharmony_ci u8 sitgrc1; /* SI1 RAM counter Tx TDMG 8 bits */ 1898c2ecf20Sopenharmony_ci u8 sithrc1; /* SI1 RAM counter Tx TDMH 8 bits */ 1908c2ecf20Sopenharmony_ci u8 sirerc1; /* SI1 RAM counter Rx TDME 8 bits */ 1918c2ecf20Sopenharmony_ci u8 sirfrc1; /* SI1 RAM counter Rx TDMF 8 bits */ 1928c2ecf20Sopenharmony_ci u8 sirgrc1; /* SI1 RAM counter Rx TDMG 8 bits */ 1938c2ecf20Sopenharmony_ci u8 sirhrc1; /* SI1 RAM counter Rx TDMH 8 bits */ 1948c2ecf20Sopenharmony_ci u8 res8[0x8]; 1958c2ecf20Sopenharmony_ci __be32 siml1; /* SI1 multiframe limit register */ 1968c2ecf20Sopenharmony_ci u8 siedm1; /* SI1 extended diagnostic mode register */ 1978c2ecf20Sopenharmony_ci u8 res9[0xBB]; 1988c2ecf20Sopenharmony_ci} __attribute__ ((packed)); 1998c2ecf20Sopenharmony_ci 2008c2ecf20Sopenharmony_ci/* SI Routing Tables */ 2018c2ecf20Sopenharmony_cistruct sir { 2028c2ecf20Sopenharmony_ci u8 tx[0x400]; 2038c2ecf20Sopenharmony_ci u8 rx[0x400]; 2048c2ecf20Sopenharmony_ci u8 res0[0x800]; 2058c2ecf20Sopenharmony_ci} __attribute__ ((packed)); 2068c2ecf20Sopenharmony_ci 2078c2ecf20Sopenharmony_ci/* USB Controller */ 2088c2ecf20Sopenharmony_cistruct qe_usb_ctlr { 2098c2ecf20Sopenharmony_ci u8 usb_usmod; 2108c2ecf20Sopenharmony_ci u8 usb_usadr; 2118c2ecf20Sopenharmony_ci u8 usb_uscom; 2128c2ecf20Sopenharmony_ci u8 res1[1]; 2138c2ecf20Sopenharmony_ci __be16 usb_usep[4]; 2148c2ecf20Sopenharmony_ci u8 res2[4]; 2158c2ecf20Sopenharmony_ci __be16 usb_usber; 2168c2ecf20Sopenharmony_ci u8 res3[2]; 2178c2ecf20Sopenharmony_ci __be16 usb_usbmr; 2188c2ecf20Sopenharmony_ci u8 res4[1]; 2198c2ecf20Sopenharmony_ci u8 usb_usbs; 2208c2ecf20Sopenharmony_ci __be16 usb_ussft; 2218c2ecf20Sopenharmony_ci u8 res5[2]; 2228c2ecf20Sopenharmony_ci __be16 usb_usfrn; 2238c2ecf20Sopenharmony_ci u8 res6[0x22]; 2248c2ecf20Sopenharmony_ci} __attribute__ ((packed)); 2258c2ecf20Sopenharmony_ci 2268c2ecf20Sopenharmony_ci/* MCC */ 2278c2ecf20Sopenharmony_cistruct qe_mcc { 2288c2ecf20Sopenharmony_ci __be32 mcce; /* MCC event register */ 2298c2ecf20Sopenharmony_ci __be32 mccm; /* MCC mask register */ 2308c2ecf20Sopenharmony_ci __be32 mccf; /* MCC configuration register */ 2318c2ecf20Sopenharmony_ci __be32 merl; /* MCC emergency request level register */ 2328c2ecf20Sopenharmony_ci u8 res0[0xF0]; 2338c2ecf20Sopenharmony_ci} __attribute__ ((packed)); 2348c2ecf20Sopenharmony_ci 2358c2ecf20Sopenharmony_ci/* QE UCC Slow */ 2368c2ecf20Sopenharmony_cistruct ucc_slow { 2378c2ecf20Sopenharmony_ci __be32 gumr_l; /* UCCx general mode register (low) */ 2388c2ecf20Sopenharmony_ci __be32 gumr_h; /* UCCx general mode register (high) */ 2398c2ecf20Sopenharmony_ci __be16 upsmr; /* UCCx protocol-specific mode register */ 2408c2ecf20Sopenharmony_ci u8 res0[0x2]; 2418c2ecf20Sopenharmony_ci __be16 utodr; /* UCCx transmit on demand register */ 2428c2ecf20Sopenharmony_ci __be16 udsr; /* UCCx data synchronization register */ 2438c2ecf20Sopenharmony_ci __be16 ucce; /* UCCx event register */ 2448c2ecf20Sopenharmony_ci u8 res1[0x2]; 2458c2ecf20Sopenharmony_ci __be16 uccm; /* UCCx mask register */ 2468c2ecf20Sopenharmony_ci u8 res2[0x1]; 2478c2ecf20Sopenharmony_ci u8 uccs; /* UCCx status register */ 2488c2ecf20Sopenharmony_ci u8 res3[0x24]; 2498c2ecf20Sopenharmony_ci __be16 utpt; 2508c2ecf20Sopenharmony_ci u8 res4[0x52]; 2518c2ecf20Sopenharmony_ci u8 guemr; /* UCC general extended mode register */ 2528c2ecf20Sopenharmony_ci} __attribute__ ((packed)); 2538c2ecf20Sopenharmony_ci 2548c2ecf20Sopenharmony_ci/* QE UCC Fast */ 2558c2ecf20Sopenharmony_cistruct ucc_fast { 2568c2ecf20Sopenharmony_ci __be32 gumr; /* UCCx general mode register */ 2578c2ecf20Sopenharmony_ci __be32 upsmr; /* UCCx protocol-specific mode register */ 2588c2ecf20Sopenharmony_ci __be16 utodr; /* UCCx transmit on demand register */ 2598c2ecf20Sopenharmony_ci u8 res0[0x2]; 2608c2ecf20Sopenharmony_ci __be16 udsr; /* UCCx data synchronization register */ 2618c2ecf20Sopenharmony_ci u8 res1[0x2]; 2628c2ecf20Sopenharmony_ci __be32 ucce; /* UCCx event register */ 2638c2ecf20Sopenharmony_ci __be32 uccm; /* UCCx mask register */ 2648c2ecf20Sopenharmony_ci u8 uccs; /* UCCx status register */ 2658c2ecf20Sopenharmony_ci u8 res2[0x7]; 2668c2ecf20Sopenharmony_ci __be32 urfb; /* UCC receive FIFO base */ 2678c2ecf20Sopenharmony_ci __be16 urfs; /* UCC receive FIFO size */ 2688c2ecf20Sopenharmony_ci u8 res3[0x2]; 2698c2ecf20Sopenharmony_ci __be16 urfet; /* UCC receive FIFO emergency threshold */ 2708c2ecf20Sopenharmony_ci __be16 urfset; /* UCC receive FIFO special emergency 2718c2ecf20Sopenharmony_ci threshold */ 2728c2ecf20Sopenharmony_ci __be32 utfb; /* UCC transmit FIFO base */ 2738c2ecf20Sopenharmony_ci __be16 utfs; /* UCC transmit FIFO size */ 2748c2ecf20Sopenharmony_ci u8 res4[0x2]; 2758c2ecf20Sopenharmony_ci __be16 utfet; /* UCC transmit FIFO emergency threshold */ 2768c2ecf20Sopenharmony_ci u8 res5[0x2]; 2778c2ecf20Sopenharmony_ci __be16 utftt; /* UCC transmit FIFO transmit threshold */ 2788c2ecf20Sopenharmony_ci u8 res6[0x2]; 2798c2ecf20Sopenharmony_ci __be16 utpt; /* UCC transmit polling timer */ 2808c2ecf20Sopenharmony_ci u8 res7[0x2]; 2818c2ecf20Sopenharmony_ci __be32 urtry; /* UCC retry counter register */ 2828c2ecf20Sopenharmony_ci u8 res8[0x4C]; 2838c2ecf20Sopenharmony_ci u8 guemr; /* UCC general extended mode register */ 2848c2ecf20Sopenharmony_ci} __attribute__ ((packed)); 2858c2ecf20Sopenharmony_ci 2868c2ecf20Sopenharmony_cistruct ucc { 2878c2ecf20Sopenharmony_ci union { 2888c2ecf20Sopenharmony_ci struct ucc_slow slow; 2898c2ecf20Sopenharmony_ci struct ucc_fast fast; 2908c2ecf20Sopenharmony_ci u8 res[0x200]; /* UCC blocks are 512 bytes each */ 2918c2ecf20Sopenharmony_ci }; 2928c2ecf20Sopenharmony_ci} __attribute__ ((packed)); 2938c2ecf20Sopenharmony_ci 2948c2ecf20Sopenharmony_ci/* MultiPHY UTOPIA POS Controllers (UPC) */ 2958c2ecf20Sopenharmony_cistruct upc { 2968c2ecf20Sopenharmony_ci __be32 upgcr; /* UTOPIA/POS general configuration register */ 2978c2ecf20Sopenharmony_ci __be32 uplpa; /* UTOPIA/POS last PHY address */ 2988c2ecf20Sopenharmony_ci __be32 uphec; /* ATM HEC register */ 2998c2ecf20Sopenharmony_ci __be32 upuc; /* UTOPIA/POS UCC configuration */ 3008c2ecf20Sopenharmony_ci __be32 updc1; /* UTOPIA/POS device 1 configuration */ 3018c2ecf20Sopenharmony_ci __be32 updc2; /* UTOPIA/POS device 2 configuration */ 3028c2ecf20Sopenharmony_ci __be32 updc3; /* UTOPIA/POS device 3 configuration */ 3038c2ecf20Sopenharmony_ci __be32 updc4; /* UTOPIA/POS device 4 configuration */ 3048c2ecf20Sopenharmony_ci __be32 upstpa; /* UTOPIA/POS STPA threshold */ 3058c2ecf20Sopenharmony_ci u8 res0[0xC]; 3068c2ecf20Sopenharmony_ci __be32 updrs1_h; /* UTOPIA/POS device 1 rate select */ 3078c2ecf20Sopenharmony_ci __be32 updrs1_l; /* UTOPIA/POS device 1 rate select */ 3088c2ecf20Sopenharmony_ci __be32 updrs2_h; /* UTOPIA/POS device 2 rate select */ 3098c2ecf20Sopenharmony_ci __be32 updrs2_l; /* UTOPIA/POS device 2 rate select */ 3108c2ecf20Sopenharmony_ci __be32 updrs3_h; /* UTOPIA/POS device 3 rate select */ 3118c2ecf20Sopenharmony_ci __be32 updrs3_l; /* UTOPIA/POS device 3 rate select */ 3128c2ecf20Sopenharmony_ci __be32 updrs4_h; /* UTOPIA/POS device 4 rate select */ 3138c2ecf20Sopenharmony_ci __be32 updrs4_l; /* UTOPIA/POS device 4 rate select */ 3148c2ecf20Sopenharmony_ci __be32 updrp1; /* UTOPIA/POS device 1 receive priority low */ 3158c2ecf20Sopenharmony_ci __be32 updrp2; /* UTOPIA/POS device 2 receive priority low */ 3168c2ecf20Sopenharmony_ci __be32 updrp3; /* UTOPIA/POS device 3 receive priority low */ 3178c2ecf20Sopenharmony_ci __be32 updrp4; /* UTOPIA/POS device 4 receive priority low */ 3188c2ecf20Sopenharmony_ci __be32 upde1; /* UTOPIA/POS device 1 event */ 3198c2ecf20Sopenharmony_ci __be32 upde2; /* UTOPIA/POS device 2 event */ 3208c2ecf20Sopenharmony_ci __be32 upde3; /* UTOPIA/POS device 3 event */ 3218c2ecf20Sopenharmony_ci __be32 upde4; /* UTOPIA/POS device 4 event */ 3228c2ecf20Sopenharmony_ci __be16 uprp1; 3238c2ecf20Sopenharmony_ci __be16 uprp2; 3248c2ecf20Sopenharmony_ci __be16 uprp3; 3258c2ecf20Sopenharmony_ci __be16 uprp4; 3268c2ecf20Sopenharmony_ci u8 res1[0x8]; 3278c2ecf20Sopenharmony_ci __be16 uptirr1_0; /* Device 1 transmit internal rate 0 */ 3288c2ecf20Sopenharmony_ci __be16 uptirr1_1; /* Device 1 transmit internal rate 1 */ 3298c2ecf20Sopenharmony_ci __be16 uptirr1_2; /* Device 1 transmit internal rate 2 */ 3308c2ecf20Sopenharmony_ci __be16 uptirr1_3; /* Device 1 transmit internal rate 3 */ 3318c2ecf20Sopenharmony_ci __be16 uptirr2_0; /* Device 2 transmit internal rate 0 */ 3328c2ecf20Sopenharmony_ci __be16 uptirr2_1; /* Device 2 transmit internal rate 1 */ 3338c2ecf20Sopenharmony_ci __be16 uptirr2_2; /* Device 2 transmit internal rate 2 */ 3348c2ecf20Sopenharmony_ci __be16 uptirr2_3; /* Device 2 transmit internal rate 3 */ 3358c2ecf20Sopenharmony_ci __be16 uptirr3_0; /* Device 3 transmit internal rate 0 */ 3368c2ecf20Sopenharmony_ci __be16 uptirr3_1; /* Device 3 transmit internal rate 1 */ 3378c2ecf20Sopenharmony_ci __be16 uptirr3_2; /* Device 3 transmit internal rate 2 */ 3388c2ecf20Sopenharmony_ci __be16 uptirr3_3; /* Device 3 transmit internal rate 3 */ 3398c2ecf20Sopenharmony_ci __be16 uptirr4_0; /* Device 4 transmit internal rate 0 */ 3408c2ecf20Sopenharmony_ci __be16 uptirr4_1; /* Device 4 transmit internal rate 1 */ 3418c2ecf20Sopenharmony_ci __be16 uptirr4_2; /* Device 4 transmit internal rate 2 */ 3428c2ecf20Sopenharmony_ci __be16 uptirr4_3; /* Device 4 transmit internal rate 3 */ 3438c2ecf20Sopenharmony_ci __be32 uper1; /* Device 1 port enable register */ 3448c2ecf20Sopenharmony_ci __be32 uper2; /* Device 2 port enable register */ 3458c2ecf20Sopenharmony_ci __be32 uper3; /* Device 3 port enable register */ 3468c2ecf20Sopenharmony_ci __be32 uper4; /* Device 4 port enable register */ 3478c2ecf20Sopenharmony_ci u8 res2[0x150]; 3488c2ecf20Sopenharmony_ci} __attribute__ ((packed)); 3498c2ecf20Sopenharmony_ci 3508c2ecf20Sopenharmony_ci/* SDMA */ 3518c2ecf20Sopenharmony_cistruct sdma { 3528c2ecf20Sopenharmony_ci __be32 sdsr; /* Serial DMA status register */ 3538c2ecf20Sopenharmony_ci __be32 sdmr; /* Serial DMA mode register */ 3548c2ecf20Sopenharmony_ci __be32 sdtr1; /* SDMA system bus threshold register */ 3558c2ecf20Sopenharmony_ci __be32 sdtr2; /* SDMA secondary bus threshold register */ 3568c2ecf20Sopenharmony_ci __be32 sdhy1; /* SDMA system bus hysteresis register */ 3578c2ecf20Sopenharmony_ci __be32 sdhy2; /* SDMA secondary bus hysteresis register */ 3588c2ecf20Sopenharmony_ci __be32 sdta1; /* SDMA system bus address register */ 3598c2ecf20Sopenharmony_ci __be32 sdta2; /* SDMA secondary bus address register */ 3608c2ecf20Sopenharmony_ci __be32 sdtm1; /* SDMA system bus MSNUM register */ 3618c2ecf20Sopenharmony_ci __be32 sdtm2; /* SDMA secondary bus MSNUM register */ 3628c2ecf20Sopenharmony_ci u8 res0[0x10]; 3638c2ecf20Sopenharmony_ci __be32 sdaqr; /* SDMA address bus qualify register */ 3648c2ecf20Sopenharmony_ci __be32 sdaqmr; /* SDMA address bus qualify mask register */ 3658c2ecf20Sopenharmony_ci u8 res1[0x4]; 3668c2ecf20Sopenharmony_ci __be32 sdebcr; /* SDMA CAM entries base register */ 3678c2ecf20Sopenharmony_ci u8 res2[0x38]; 3688c2ecf20Sopenharmony_ci} __attribute__ ((packed)); 3698c2ecf20Sopenharmony_ci 3708c2ecf20Sopenharmony_ci/* Debug Space */ 3718c2ecf20Sopenharmony_cistruct dbg { 3728c2ecf20Sopenharmony_ci __be32 bpdcr; /* Breakpoint debug command register */ 3738c2ecf20Sopenharmony_ci __be32 bpdsr; /* Breakpoint debug status register */ 3748c2ecf20Sopenharmony_ci __be32 bpdmr; /* Breakpoint debug mask register */ 3758c2ecf20Sopenharmony_ci __be32 bprmrr0; /* Breakpoint request mode risc register 0 */ 3768c2ecf20Sopenharmony_ci __be32 bprmrr1; /* Breakpoint request mode risc register 1 */ 3778c2ecf20Sopenharmony_ci u8 res0[0x8]; 3788c2ecf20Sopenharmony_ci __be32 bprmtr0; /* Breakpoint request mode trb register 0 */ 3798c2ecf20Sopenharmony_ci __be32 bprmtr1; /* Breakpoint request mode trb register 1 */ 3808c2ecf20Sopenharmony_ci u8 res1[0x8]; 3818c2ecf20Sopenharmony_ci __be32 bprmir; /* Breakpoint request mode immediate register */ 3828c2ecf20Sopenharmony_ci __be32 bprmsr; /* Breakpoint request mode serial register */ 3838c2ecf20Sopenharmony_ci __be32 bpemr; /* Breakpoint exit mode register */ 3848c2ecf20Sopenharmony_ci u8 res2[0x48]; 3858c2ecf20Sopenharmony_ci} __attribute__ ((packed)); 3868c2ecf20Sopenharmony_ci 3878c2ecf20Sopenharmony_ci/* 3888c2ecf20Sopenharmony_ci * RISC Special Registers (Trap and Breakpoint). These are described in 3898c2ecf20Sopenharmony_ci * the QE Developer's Handbook. 3908c2ecf20Sopenharmony_ci */ 3918c2ecf20Sopenharmony_cistruct rsp { 3928c2ecf20Sopenharmony_ci __be32 tibcr[16]; /* Trap/instruction breakpoint control regs */ 3938c2ecf20Sopenharmony_ci u8 res0[64]; 3948c2ecf20Sopenharmony_ci __be32 ibcr0; 3958c2ecf20Sopenharmony_ci __be32 ibs0; 3968c2ecf20Sopenharmony_ci __be32 ibcnr0; 3978c2ecf20Sopenharmony_ci u8 res1[4]; 3988c2ecf20Sopenharmony_ci __be32 ibcr1; 3998c2ecf20Sopenharmony_ci __be32 ibs1; 4008c2ecf20Sopenharmony_ci __be32 ibcnr1; 4018c2ecf20Sopenharmony_ci __be32 npcr; 4028c2ecf20Sopenharmony_ci __be32 dbcr; 4038c2ecf20Sopenharmony_ci __be32 dbar; 4048c2ecf20Sopenharmony_ci __be32 dbamr; 4058c2ecf20Sopenharmony_ci __be32 dbsr; 4068c2ecf20Sopenharmony_ci __be32 dbcnr; 4078c2ecf20Sopenharmony_ci u8 res2[12]; 4088c2ecf20Sopenharmony_ci __be32 dbdr_h; 4098c2ecf20Sopenharmony_ci __be32 dbdr_l; 4108c2ecf20Sopenharmony_ci __be32 dbdmr_h; 4118c2ecf20Sopenharmony_ci __be32 dbdmr_l; 4128c2ecf20Sopenharmony_ci __be32 bsr; 4138c2ecf20Sopenharmony_ci __be32 bor; 4148c2ecf20Sopenharmony_ci __be32 bior; 4158c2ecf20Sopenharmony_ci u8 res3[4]; 4168c2ecf20Sopenharmony_ci __be32 iatr[4]; 4178c2ecf20Sopenharmony_ci __be32 eccr; /* Exception control configuration register */ 4188c2ecf20Sopenharmony_ci __be32 eicr; 4198c2ecf20Sopenharmony_ci u8 res4[0x100-0xf8]; 4208c2ecf20Sopenharmony_ci} __attribute__ ((packed)); 4218c2ecf20Sopenharmony_ci 4228c2ecf20Sopenharmony_cistruct qe_immap { 4238c2ecf20Sopenharmony_ci struct qe_iram iram; /* I-RAM */ 4248c2ecf20Sopenharmony_ci struct qe_ic_regs ic; /* Interrupt Controller */ 4258c2ecf20Sopenharmony_ci struct cp_qe cp; /* Communications Processor */ 4268c2ecf20Sopenharmony_ci struct qe_mux qmx; /* QE Multiplexer */ 4278c2ecf20Sopenharmony_ci struct qe_timers qet; /* QE Timers */ 4288c2ecf20Sopenharmony_ci struct spi spi[0x2]; /* spi */ 4298c2ecf20Sopenharmony_ci struct qe_mcc mcc; /* mcc */ 4308c2ecf20Sopenharmony_ci struct qe_brg brg; /* brg */ 4318c2ecf20Sopenharmony_ci struct qe_usb_ctlr usb; /* USB */ 4328c2ecf20Sopenharmony_ci struct si1 si1; /* SI */ 4338c2ecf20Sopenharmony_ci u8 res11[0x800]; 4348c2ecf20Sopenharmony_ci struct sir sir; /* SI Routing Tables */ 4358c2ecf20Sopenharmony_ci struct ucc ucc1; /* ucc1 */ 4368c2ecf20Sopenharmony_ci struct ucc ucc3; /* ucc3 */ 4378c2ecf20Sopenharmony_ci struct ucc ucc5; /* ucc5 */ 4388c2ecf20Sopenharmony_ci struct ucc ucc7; /* ucc7 */ 4398c2ecf20Sopenharmony_ci u8 res12[0x600]; 4408c2ecf20Sopenharmony_ci struct upc upc1; /* MultiPHY UTOPIA POS Ctrlr 1*/ 4418c2ecf20Sopenharmony_ci struct ucc ucc2; /* ucc2 */ 4428c2ecf20Sopenharmony_ci struct ucc ucc4; /* ucc4 */ 4438c2ecf20Sopenharmony_ci struct ucc ucc6; /* ucc6 */ 4448c2ecf20Sopenharmony_ci struct ucc ucc8; /* ucc8 */ 4458c2ecf20Sopenharmony_ci u8 res13[0x600]; 4468c2ecf20Sopenharmony_ci struct upc upc2; /* MultiPHY UTOPIA POS Ctrlr 2*/ 4478c2ecf20Sopenharmony_ci struct sdma sdma; /* SDMA */ 4488c2ecf20Sopenharmony_ci struct dbg dbg; /* 0x104080 - 0x1040FF 4498c2ecf20Sopenharmony_ci Debug Space */ 4508c2ecf20Sopenharmony_ci struct rsp rsp[0x2]; /* 0x104100 - 0x1042FF 4518c2ecf20Sopenharmony_ci RISC Special Registers 4528c2ecf20Sopenharmony_ci (Trap and Breakpoint) */ 4538c2ecf20Sopenharmony_ci u8 res14[0x300]; /* 0x104300 - 0x1045FF */ 4548c2ecf20Sopenharmony_ci u8 res15[0x3A00]; /* 0x104600 - 0x107FFF */ 4558c2ecf20Sopenharmony_ci u8 res16[0x8000]; /* 0x108000 - 0x110000 */ 4568c2ecf20Sopenharmony_ci u8 muram[0xC000]; /* 0x110000 - 0x11C000 4578c2ecf20Sopenharmony_ci Multi-user RAM */ 4588c2ecf20Sopenharmony_ci u8 res17[0x24000]; /* 0x11C000 - 0x140000 */ 4598c2ecf20Sopenharmony_ci u8 res18[0xC0000]; /* 0x140000 - 0x200000 */ 4608c2ecf20Sopenharmony_ci} __attribute__ ((packed)); 4618c2ecf20Sopenharmony_ci 4628c2ecf20Sopenharmony_ciextern struct qe_immap __iomem *qe_immr; 4638c2ecf20Sopenharmony_ci 4648c2ecf20Sopenharmony_ci#endif /* __KERNEL__ */ 4658c2ecf20Sopenharmony_ci#endif /* _ASM_POWERPC_IMMAP_QE_H */ 466