linux/include/linux/usb/r8a66597.h

// SPDX-License-Identifier: GPL-2.0
/*
 * R8A66597 driver platform data
 *
 * Copyright (C) 2009  Renesas Solutions Corp.
 *
 * Author : Yoshihiro Shimoda <[email protected]>
 */

#ifndef __LINUX_USB_R8A66597_H
#define __LINUX_USB_R8A66597_H

#define R8A66597_PLATDATA_XTAL_12MHZ
#define R8A66597_PLATDATA_XTAL_24MHZ
#define R8A66597_PLATDATA_XTAL_48MHZ

struct r8a66597_platdata {};

/* Register definitions */
#define SYSCFG0
#define SYSCFG1
#define SYSSTS0
#define SYSSTS1
#define DVSTCTR0
#define DVSTCTR1
#define TESTMODE
#define PINCFG
#define DMA0CFG
#define DMA1CFG
#define CFIFO
#define D0FIFO
#define D1FIFO
#define CFIFOSEL
#define CFIFOCTR
#define CFIFOSIE
#define D0FIFOSEL
#define D0FIFOCTR
#define D1FIFOSEL
#define D1FIFOCTR
#define INTENB0
#define INTENB1
#define INTENB2
#define BRDYENB
#define NRDYENB
#define BEMPENB
#define SOFCFG
#define INTSTS0
#define INTSTS1
#define INTSTS2
#define BRDYSTS
#define NRDYSTS
#define BEMPSTS
#define FRMNUM
#define UFRMNUM
#define USBADDR
#define USBREQ
#define USBVAL
#define USBINDX
#define USBLENG
#define DCPCFG
#define DCPMAXP
#define DCPCTR
#define PIPESEL
#define PIPECFG
#define PIPEBUF
#define PIPEMAXP
#define PIPEPERI
#define PIPE1CTR
#define PIPE2CTR
#define PIPE3CTR
#define PIPE4CTR
#define PIPE5CTR
#define PIPE6CTR
#define PIPE7CTR
#define PIPE8CTR
#define PIPE9CTR
#define PIPE1TRE
#define PIPE1TRN
#define PIPE2TRE
#define PIPE2TRN
#define PIPE3TRE
#define PIPE3TRN
#define PIPE4TRE
#define PIPE4TRN
#define PIPE5TRE
#define PIPE5TRN
#define DEVADD0
#define DEVADD1
#define DEVADD2
#define DEVADD3
#define DEVADD4
#define DEVADD5
#define DEVADD6
#define DEVADD7
#define DEVADD8
#define DEVADD9
#define DEVADDA

/* System Configuration Control Register */
#define XTAL
#define XTAL48
#define XTAL24
#define XTAL12
#define XCKE
#define PLLC
#define SCKE
#define PCSDIS
#define LPSME
#define HSE
#define DCFM
#define DRPD
#define DPRPU
#define USBE

/* System Configuration Status Register */
#define OVCBIT
#define OVCMON
#define SOFEA
#define IDMON
#define LNST
#define SE1
#define FS_KSTS
#define FS_JSTS
#define LS_JSTS
#define LS_KSTS
#define SE0

/* Device State Control Register */
#define EXTLP0
#define VBOUT
#define WKUP
#define RWUPE
#define USBRST
#define RESUME
#define UACT
#define RHST
#define HSPROC
#define HSMODE
#define FSMODE
#define LSMODE
#define UNDECID

/* Test Mode Register */
#define UTST
#define H_TST_PACKET
#define H_TST_SE0_NAK
#define H_TST_K
#define H_TST_J
#define H_TST_NORMAL
#define P_TST_PACKET
#define P_TST_SE0_NAK
#define P_TST_K
#define P_TST_J
#define P_TST_NORMAL

/* Data Pin Configuration Register */
#define LDRV
#define VIF1
#define VIF3
#define INTA

/* DMAx Pin Configuration Register */
#define DREQA
#define BURST
#define DACKA
#define DFORM
#define CPU_ADR_RD_WR
#define CPU_DACK_RD_WR
#define CPU_DACK_ONLY
#define SPLIT_DACK_ONLY
#define DENDA
#define PKTM
#define DENDE
#define OBUS

/* CFIFO/DxFIFO Port Select Register */
#define RCNT
#define REW
#define DCLRM
#define DREQE
#define MBW_8
#define MBW_16
#define MBW_32
#define BIGEND
#define BYTE_LITTLE
#define BYTE_BIG
#define ISEL
#define CURPIPE

/* CFIFO/DxFIFO Port Control Register */
#define BVAL
#define BCLR
#define FRDY
#define DTLN

/* Interrupt Enable Register 0 */
#define VBSE
#define RSME
#define SOFE
#define DVSE
#define CTRE
#define BEMPE
#define NRDYE
#define BRDYE

/* Interrupt Enable Register 1 */
#define OVRCRE
#define BCHGE
#define DTCHE
#define ATTCHE
#define EOFERRE
#define SIGNE
#define SACKE

/* BRDY Interrupt Enable/Status Register */
#define BRDY9
#define BRDY8
#define BRDY7
#define BRDY6
#define BRDY5
#define BRDY4
#define BRDY3
#define BRDY2
#define BRDY1
#define BRDY0

/* NRDY Interrupt Enable/Status Register */
#define NRDY9
#define NRDY8
#define NRDY7
#define NRDY6
#define NRDY5
#define NRDY4
#define NRDY3
#define NRDY2
#define NRDY1
#define NRDY0

/* BEMP Interrupt Enable/Status Register */
#define BEMP9
#define BEMP8
#define BEMP7
#define BEMP6
#define BEMP5
#define BEMP4
#define BEMP3
#define BEMP2
#define BEMP1
#define BEMP0

/* SOF Pin Configuration Register */
#define TRNENSEL
#define BRDYM
#define INTL
#define EDGESTS
#define SOFMODE
#define SOF_125US
#define SOF_1MS
#define SOF_DISABLE

/* Interrupt Status Register 0 */
#define VBINT
#define RESM
#define SOFR
#define DVST
#define CTRT
#define BEMP
#define NRDY
#define BRDY
#define VBSTS
#define DVSQ
#define DS_SPD_CNFG
#define DS_SPD_ADDR
#define DS_SPD_DFLT
#define DS_SPD_POWR
#define DS_SUSP
#define DS_CNFG
#define DS_ADDS
#define DS_DFLT
#define DS_POWR
#define DVSQS
#define VALID
#define CTSQ
#define CS_SQER
#define CS_WRND
#define CS_WRSS
#define CS_WRDS
#define CS_RDSS
#define CS_RDDS
#define CS_IDST

/* Interrupt Status Register 1 */
#define OVRCR
#define BCHG
#define DTCH
#define ATTCH
#define EOFERR
#define SIGN
#define SACK

/* Frame Number Register */
#define OVRN
#define CRCE
#define FRNM

/* Micro Frame Number Register */
#define UFRNM

/* Default Control Pipe Maxpacket Size Register */
/* Pipe Maxpacket Size Register */
#define DEVSEL
#define MAXP

/* Default Control Pipe Control Register */
#define BSTS
#define SUREQ
#define CSCLR
#define CSSTS
#define SUREQCLR
#define SQCLR
#define SQSET
#define SQMON
#define PBUSY
#define PINGE
#define CCPL
#define PID
#define PID_STALL11
#define PID_STALL
#define PID_BUF
#define PID_NAK

/* Pipe Window Select Register */
#define PIPENM

/* Pipe Configuration Register */
#define R8A66597_TYP
#define R8A66597_ISO
#define R8A66597_INT
#define R8A66597_BULK
#define R8A66597_BFRE
#define R8A66597_DBLB
#define R8A66597_CNTMD
#define R8A66597_SHTNAK
#define R8A66597_DIR
#define R8A66597_EPNUM

/* Pipe Buffer Configuration Register */
#define BUFSIZE
#define BUFNMB
#define PIPE0BUF
#define PIPExBUF

/* Pipe Maxpacket Size Register */
#define MXPS

/* Pipe Cycle Configuration Register */
#define IFIS
#define IITV

/* Pipex Control Register */
#define BSTS
#define INBUFM
#define CSCLR
#define CSSTS
#define ATREPM
#define ACLRM
#define SQCLR
#define SQSET
#define SQMON
#define PBUSY
#define PID

/* PIPExTRE */
#define TRENB
#define TRCLR

/* PIPExTRN */
#define TRNCNT

/* DEVADDx */
#define UPPHUB
#define HUBPORT
#define USBSPD
#define RTPORT

/* SUDMAC registers */
#define CH0CFG
#define CH1CFG
#define CH0BA
#define CH1BA
#define CH0BBC
#define CH1BBC
#define CH0CA
#define CH1CA
#define CH0CBC
#define CH1CBC
#define CH0DEN
#define CH1DEN
#define DSTSCLR
#define DBUFCTRL
#define DINTCTRL
#define DINTSTS
#define DINTSTSCLR
#define CH0SHCTRL
#define CH1SHCTRL

/* SUDMAC Configuration Registers */
#define SENDBUFM
#define RCVENDM
#define LBA_WAIT

/* DMA Enable Registers */
#define DEN

/* DMA Status Clear Register */
#define CH1STCLR
#define CH0STCLR

/* DMA Buffer Control Register */
#define CH1BUFW
#define CH0BUFW
#define CH1BUFS
#define CH0BUFS

/* DMA Interrupt Control Register */
#define CH1ERRE
#define CH0ERRE
#define CH1ENDE
#define CH0ENDE

/* DMA Interrupt Status Register */
#define CH1ERRS
#define CH0ERRS
#define CH1ENDS
#define CH0ENDS

/* DMA Interrupt Status Clear Register */
#define CH1ERRC
#define CH0ERRC
#define CH1ENDC
#define CH0ENDC

#endif /* __LINUX_USB_R8A66597_H */