18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright 2007 Simtec Electronics <linux@simtec.co.uk> 48c2ecf20Sopenharmony_ci * http://armlinux.simtec.co.uk/ 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * S3C2412 IIS register definition 78c2ecf20Sopenharmony_ci */ 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#ifndef __ASM_ARCH_REGS_S3C2412_IIS_H 108c2ecf20Sopenharmony_ci#define __ASM_ARCH_REGS_S3C2412_IIS_H 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#define S3C2412_IISCON (0x00) 138c2ecf20Sopenharmony_ci#define S3C2412_IISMOD (0x04) 148c2ecf20Sopenharmony_ci#define S3C2412_IISFIC (0x08) 158c2ecf20Sopenharmony_ci#define S3C2412_IISPSR (0x0C) 168c2ecf20Sopenharmony_ci#define S3C2412_IISTXD (0x10) 178c2ecf20Sopenharmony_ci#define S3C2412_IISRXD (0x14) 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci#define S5PC1XX_IISFICS 0x18 208c2ecf20Sopenharmony_ci#define S5PC1XX_IISTXDS 0x1C 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci#define S5PC1XX_IISCON_SW_RST (1 << 31) 238c2ecf20Sopenharmony_ci#define S5PC1XX_IISCON_FRXOFSTATUS (1 << 26) 248c2ecf20Sopenharmony_ci#define S5PC1XX_IISCON_FRXORINTEN (1 << 25) 258c2ecf20Sopenharmony_ci#define S5PC1XX_IISCON_FTXSURSTAT (1 << 24) 268c2ecf20Sopenharmony_ci#define S5PC1XX_IISCON_FTXSURINTEN (1 << 23) 278c2ecf20Sopenharmony_ci#define S5PC1XX_IISCON_TXSDMAPAUSE (1 << 20) 288c2ecf20Sopenharmony_ci#define S5PC1XX_IISCON_TXSDMACTIVE (1 << 18) 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci#define S3C64XX_IISCON_FTXURSTATUS (1 << 17) 318c2ecf20Sopenharmony_ci#define S3C64XX_IISCON_FTXURINTEN (1 << 16) 328c2ecf20Sopenharmony_ci#define S3C64XX_IISCON_TXFIFO2_EMPTY (1 << 15) 338c2ecf20Sopenharmony_ci#define S3C64XX_IISCON_TXFIFO1_EMPTY (1 << 14) 348c2ecf20Sopenharmony_ci#define S3C64XX_IISCON_TXFIFO2_FULL (1 << 13) 358c2ecf20Sopenharmony_ci#define S3C64XX_IISCON_TXFIFO1_FULL (1 << 12) 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci#define S3C2412_IISCON_LRINDEX (1 << 11) 388c2ecf20Sopenharmony_ci#define S3C2412_IISCON_TXFIFO_EMPTY (1 << 10) 398c2ecf20Sopenharmony_ci#define S3C2412_IISCON_RXFIFO_EMPTY (1 << 9) 408c2ecf20Sopenharmony_ci#define S3C2412_IISCON_TXFIFO_FULL (1 << 8) 418c2ecf20Sopenharmony_ci#define S3C2412_IISCON_RXFIFO_FULL (1 << 7) 428c2ecf20Sopenharmony_ci#define S3C2412_IISCON_TXDMA_PAUSE (1 << 6) 438c2ecf20Sopenharmony_ci#define S3C2412_IISCON_RXDMA_PAUSE (1 << 5) 448c2ecf20Sopenharmony_ci#define S3C2412_IISCON_TXCH_PAUSE (1 << 4) 458c2ecf20Sopenharmony_ci#define S3C2412_IISCON_RXCH_PAUSE (1 << 3) 468c2ecf20Sopenharmony_ci#define S3C2412_IISCON_TXDMA_ACTIVE (1 << 2) 478c2ecf20Sopenharmony_ci#define S3C2412_IISCON_RXDMA_ACTIVE (1 << 1) 488c2ecf20Sopenharmony_ci#define S3C2412_IISCON_IIS_ACTIVE (1 << 0) 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ci#define S5PC1XX_IISMOD_OPCLK_CDCLK_OUT (0 << 30) 518c2ecf20Sopenharmony_ci#define S5PC1XX_IISMOD_OPCLK_CDCLK_IN (1 << 30) 528c2ecf20Sopenharmony_ci#define S5PC1XX_IISMOD_OPCLK_BCLK_OUT (2 << 30) 538c2ecf20Sopenharmony_ci#define S5PC1XX_IISMOD_OPCLK_PCLK (3 << 30) 548c2ecf20Sopenharmony_ci#define S5PC1XX_IISMOD_OPCLK_MASK (3 << 30) 558c2ecf20Sopenharmony_ci#define S5PC1XX_IISMOD_TXS_IDMA (1 << 28) /* Sec_TXFIFO use I-DMA */ 568c2ecf20Sopenharmony_ci#define S5PC1XX_IISMOD_BLCS_MASK 0x3 578c2ecf20Sopenharmony_ci#define S5PC1XX_IISMOD_BLCS_SHIFT 26 588c2ecf20Sopenharmony_ci#define S5PC1XX_IISMOD_BLCP_MASK 0x3 598c2ecf20Sopenharmony_ci#define S5PC1XX_IISMOD_BLCP_SHIFT 24 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ci#define S3C64XX_IISMOD_C2DD_HHALF (1 << 21) /* Discard Higher-half */ 628c2ecf20Sopenharmony_ci#define S3C64XX_IISMOD_C2DD_LHALF (1 << 20) /* Discard Lower-half */ 638c2ecf20Sopenharmony_ci#define S3C64XX_IISMOD_C1DD_HHALF (1 << 19) 648c2ecf20Sopenharmony_ci#define S3C64XX_IISMOD_C1DD_LHALF (1 << 18) 658c2ecf20Sopenharmony_ci#define S3C64XX_IISMOD_DC2_EN (1 << 17) 668c2ecf20Sopenharmony_ci#define S3C64XX_IISMOD_DC1_EN (1 << 16) 678c2ecf20Sopenharmony_ci#define S3C64XX_IISMOD_BLC_16BIT (0 << 13) 688c2ecf20Sopenharmony_ci#define S3C64XX_IISMOD_BLC_8BIT (1 << 13) 698c2ecf20Sopenharmony_ci#define S3C64XX_IISMOD_BLC_24BIT (2 << 13) 708c2ecf20Sopenharmony_ci#define S3C64XX_IISMOD_BLC_MASK (3 << 13) 718c2ecf20Sopenharmony_ci 728c2ecf20Sopenharmony_ci#define S3C2412_IISMOD_IMS_SYSMUX (1 << 10) 738c2ecf20Sopenharmony_ci#define S3C2412_IISMOD_SLAVE (1 << 11) 748c2ecf20Sopenharmony_ci#define S3C2412_IISMOD_MODE_TXONLY (0 << 8) 758c2ecf20Sopenharmony_ci#define S3C2412_IISMOD_MODE_RXONLY (1 << 8) 768c2ecf20Sopenharmony_ci#define S3C2412_IISMOD_MODE_TXRX (2 << 8) 778c2ecf20Sopenharmony_ci#define S3C2412_IISMOD_MODE_MASK (3 << 8) 788c2ecf20Sopenharmony_ci#define S3C2412_IISMOD_LR_LLOW (0 << 7) 798c2ecf20Sopenharmony_ci#define S3C2412_IISMOD_LR_RLOW (1 << 7) 808c2ecf20Sopenharmony_ci#define S3C2412_IISMOD_SDF_IIS (0 << 5) 818c2ecf20Sopenharmony_ci#define S3C2412_IISMOD_SDF_MSB (1 << 5) 828c2ecf20Sopenharmony_ci#define S3C2412_IISMOD_SDF_LSB (2 << 5) 838c2ecf20Sopenharmony_ci#define S3C2412_IISMOD_SDF_MASK (3 << 5) 848c2ecf20Sopenharmony_ci#define S3C2412_IISMOD_RCLK_256FS (0 << 3) 858c2ecf20Sopenharmony_ci#define S3C2412_IISMOD_RCLK_512FS (1 << 3) 868c2ecf20Sopenharmony_ci#define S3C2412_IISMOD_RCLK_384FS (2 << 3) 878c2ecf20Sopenharmony_ci#define S3C2412_IISMOD_RCLK_768FS (3 << 3) 888c2ecf20Sopenharmony_ci#define S3C2412_IISMOD_RCLK_MASK (3 << 3) 898c2ecf20Sopenharmony_ci#define S3C2412_IISMOD_BCLK_32FS (0 << 1) 908c2ecf20Sopenharmony_ci#define S3C2412_IISMOD_BCLK_48FS (1 << 1) 918c2ecf20Sopenharmony_ci#define S3C2412_IISMOD_BCLK_16FS (2 << 1) 928c2ecf20Sopenharmony_ci#define S3C2412_IISMOD_BCLK_24FS (3 << 1) 938c2ecf20Sopenharmony_ci#define S3C2412_IISMOD_BCLK_MASK (3 << 1) 948c2ecf20Sopenharmony_ci#define S3C2412_IISMOD_8BIT (1 << 0) 958c2ecf20Sopenharmony_ci 968c2ecf20Sopenharmony_ci#define S3C64XX_IISMOD_CDCLKCON (1 << 12) 978c2ecf20Sopenharmony_ci 988c2ecf20Sopenharmony_ci#define S3C2412_IISPSR_PSREN (1 << 15) 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_ci#define S3C64XX_IISFIC_TX2COUNT(x) (((x) >> 24) & 0xf) 1018c2ecf20Sopenharmony_ci#define S3C64XX_IISFIC_TX1COUNT(x) (((x) >> 16) & 0xf) 1028c2ecf20Sopenharmony_ci 1038c2ecf20Sopenharmony_ci#define S3C2412_IISFIC_TXFLUSH (1 << 15) 1048c2ecf20Sopenharmony_ci#define S3C2412_IISFIC_RXFLUSH (1 << 7) 1058c2ecf20Sopenharmony_ci#define S3C2412_IISFIC_TXCOUNT(x) (((x) >> 8) & 0xf) 1068c2ecf20Sopenharmony_ci#define S3C2412_IISFIC_RXCOUNT(x) (((x) >> 0) & 0xf) 1078c2ecf20Sopenharmony_ci 1088c2ecf20Sopenharmony_ci#define S5PC1XX_IISFICS_TXFLUSH (1 << 15) 1098c2ecf20Sopenharmony_ci#define S5PC1XX_IISFICS_TXCOUNT(x) (((x) >> 8) & 0x7f) 1108c2ecf20Sopenharmony_ci 1118c2ecf20Sopenharmony_ci#endif /* __ASM_ARCH_REGS_S3C2412_IIS_H */ 112