1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
27639a454SPaul Mundt #ifndef __ASM_SH_RENESAS_R7780RP_H
37639a454SPaul Mundt #define __ASM_SH_RENESAS_R7780RP_H
47639a454SPaul Mundt 
57639a454SPaul Mundt /* Box specific addresses.  */
615ba400eSNobuhiro Iwamatsu #define PA_NORFLASH_ADDR	0x00000000
715ba400eSNobuhiro Iwamatsu #define PA_NORFLASH_SIZE	0x04000000
815ba400eSNobuhiro Iwamatsu 
97639a454SPaul Mundt #if defined(CONFIG_SH_R7780MP)
107639a454SPaul Mundt #define PA_BCR          0xa4000000      /* FPGA */
117639a454SPaul Mundt #define PA_SDPOW	(-1)
127639a454SPaul Mundt 
137639a454SPaul Mundt #define PA_IRLMSK       (PA_BCR+0x0000) /* Interrupt Mask control */
147639a454SPaul Mundt #define PA_IRLMON       (PA_BCR+0x0002) /* Interrupt Status control */
157639a454SPaul Mundt #define PA_IRLPRI1      (PA_BCR+0x0004) /* Interrupt Priorty 1 */
167639a454SPaul Mundt #define PA_IRLPRI2      (PA_BCR+0x0006) /* Interrupt Priorty 2 */
177639a454SPaul Mundt #define PA_IRLPRI3      (PA_BCR+0x0008) /* Interrupt Priorty 3 */
187639a454SPaul Mundt #define PA_IRLPRI4      (PA_BCR+0x000a) /* Interrupt Priorty 4 */
197639a454SPaul Mundt #define PA_RSTCTL       (PA_BCR+0x000c) /* Reset Control */
207639a454SPaul Mundt #define PA_PCIBD        (PA_BCR+0x000e) /* PCI Board detect control */
21b6db0a74SGeert Uytterhoeven #define PA_PCICD        (PA_BCR+0x0010) /* PCI Connector detect control */
227639a454SPaul Mundt #define PA_EXTGIO       (PA_BCR+0x0016) /* Extension GPIO Control */
237639a454SPaul Mundt #define PA_IVDRMON      (PA_BCR+0x0018) /* iVDR Moniter control */
247639a454SPaul Mundt #define PA_IVDRCTL      (PA_BCR+0x001a) /* iVDR control */
257639a454SPaul Mundt #define PA_OBLED        (PA_BCR+0x001c) /* On Board LED control */
267639a454SPaul Mundt #define PA_OBSW         (PA_BCR+0x001e) /* On Board Switch control */
277639a454SPaul Mundt #define PA_AUDIOSEL     (PA_BCR+0x0020) /* Sound Interface Select control */
2825985edcSLucas De Marchi #define PA_EXTPLR       (PA_BCR+0x001e) /* Extension Pin Polarity control */
297639a454SPaul Mundt #define PA_TPCTL        (PA_BCR+0x0100) /* Touch Panel Access control */
307639a454SPaul Mundt #define PA_TPDCKCTL     (PA_BCR+0x0102) /* Touch Panel Access data control */
317639a454SPaul Mundt #define PA_TPCTLCLR     (PA_BCR+0x0104) /* Touch Panel Access control */
327639a454SPaul Mundt #define PA_TPXPOS       (PA_BCR+0x0106) /* Touch Panel X position control */
337639a454SPaul Mundt #define PA_TPYPOS       (PA_BCR+0x0108) /* Touch Panel Y position control */
347639a454SPaul Mundt #define PA_DBSW         (PA_BCR+0x0200) /* Debug Board Switch control */
357639a454SPaul Mundt #define PA_CFCTL        (PA_BCR+0x0300) /* CF Timing control */
367639a454SPaul Mundt #define PA_CFPOW        (PA_BCR+0x0302) /* CF Power control */
377639a454SPaul Mundt #define PA_CFCDINTCLR   (PA_BCR+0x0304) /* CF Insert Interrupt clear */
387639a454SPaul Mundt #define PA_SCSMR0       (PA_BCR+0x0400) /* SCIF0 Serial mode control */
397639a454SPaul Mundt #define PA_SCBRR0       (PA_BCR+0x0404) /* SCIF0 Bit rate control */
407639a454SPaul Mundt #define PA_SCSCR0       (PA_BCR+0x0408) /* SCIF0 Serial control */
417639a454SPaul Mundt #define PA_SCFTDR0      (PA_BCR+0x040c) /* SCIF0 Send FIFO control */
427639a454SPaul Mundt #define PA_SCFSR0       (PA_BCR+0x0410) /* SCIF0 Serial status control */
437639a454SPaul Mundt #define PA_SCFRDR0      (PA_BCR+0x0414) /* SCIF0 Receive FIFO control */
447639a454SPaul Mundt #define PA_SCFCR0       (PA_BCR+0x0418) /* SCIF0 FIFO control */
457639a454SPaul Mundt #define PA_SCTFDR0      (PA_BCR+0x041c) /* SCIF0 Send FIFO data control */
467639a454SPaul Mundt #define PA_SCRFDR0      (PA_BCR+0x0420) /* SCIF0 Receive FIFO data control */
477639a454SPaul Mundt #define PA_SCSPTR0      (PA_BCR+0x0424) /* SCIF0 Serial Port control */
487639a454SPaul Mundt #define PA_SCLSR0       (PA_BCR+0x0428) /* SCIF0 Line Status control */
497639a454SPaul Mundt #define PA_SCRER0       (PA_BCR+0x042c) /* SCIF0 Serial Error control */
507639a454SPaul Mundt #define PA_SCSMR1       (PA_BCR+0x0500) /* SCIF1 Serial mode control */
517639a454SPaul Mundt #define PA_SCBRR1       (PA_BCR+0x0504) /* SCIF1 Bit rate control */
527639a454SPaul Mundt #define PA_SCSCR1       (PA_BCR+0x0508) /* SCIF1 Serial control */
537639a454SPaul Mundt #define PA_SCFTDR1      (PA_BCR+0x050c) /* SCIF1 Send FIFO control */
547639a454SPaul Mundt #define PA_SCFSR1       (PA_BCR+0x0510) /* SCIF1 Serial status control */
557639a454SPaul Mundt #define PA_SCFRDR1      (PA_BCR+0x0514) /* SCIF1 Receive FIFO control */
567639a454SPaul Mundt #define PA_SCFCR1       (PA_BCR+0x0518) /* SCIF1 FIFO control */
577639a454SPaul Mundt #define PA_SCTFDR1      (PA_BCR+0x051c) /* SCIF1 Send FIFO data control */
587639a454SPaul Mundt #define PA_SCRFDR1      (PA_BCR+0x0520) /* SCIF1 Receive FIFO data control */
597639a454SPaul Mundt #define PA_SCSPTR1      (PA_BCR+0x0524) /* SCIF1 Serial Port control */
607639a454SPaul Mundt #define PA_SCLSR1       (PA_BCR+0x0528) /* SCIF1 Line Status control */
617639a454SPaul Mundt #define PA_SCRER1       (PA_BCR+0x052c) /* SCIF1 Serial Error control */
627639a454SPaul Mundt #define PA_SMCR         (PA_BCR+0x0600) /* 2-wire Serial control */
637639a454SPaul Mundt #define PA_SMSMADR      (PA_BCR+0x0602) /* 2-wire Serial Slave control */
647639a454SPaul Mundt #define PA_SMMR         (PA_BCR+0x0604) /* 2-wire Serial Mode control */
657639a454SPaul Mundt #define PA_SMSADR1      (PA_BCR+0x0606) /* 2-wire Serial Address1 control */
667639a454SPaul Mundt #define PA_SMTRDR1      (PA_BCR+0x0646) /* 2-wire Serial Data1 control */
677639a454SPaul Mundt #define PA_VERREG       (PA_BCR+0x0700) /* FPGA Version Register */
687639a454SPaul Mundt #define PA_POFF         (PA_BCR+0x0800) /* System Power Off control */
697639a454SPaul Mundt #define PA_PMR          (PA_BCR+0x0900) /*  */
707639a454SPaul Mundt 
717639a454SPaul Mundt #define IRLCNTR1        (PA_BCR + 0)    /* Interrupt Control Register1 */
727639a454SPaul Mundt #define IVDR_CK_ON	8		/* iVDR Clock ON */
737639a454SPaul Mundt 
747639a454SPaul Mundt #elif defined(CONFIG_SH_R7780RP)
757639a454SPaul Mundt #define PA_POFF		(-1)
767639a454SPaul Mundt 
777639a454SPaul Mundt #define PA_BCR		0xa5000000	/* FPGA */
787639a454SPaul Mundt #define	PA_IRLMSK	(PA_BCR+0x0000)	/* Interrupt Mask control */
797639a454SPaul Mundt #define PA_IRLMON	(PA_BCR+0x0002)	/* Interrupt Status control */
807639a454SPaul Mundt #define	PA_SDPOW	(PA_BCR+0x0004)	/* SD Power control */
817639a454SPaul Mundt #define	PA_RSTCTL	(PA_BCR+0x0006)	/* Device Reset control */
827639a454SPaul Mundt #define	PA_PCIBD	(PA_BCR+0x0008)	/* PCI Board detect control */
83b6db0a74SGeert Uytterhoeven #define	PA_PCICD	(PA_BCR+0x000a)	/* PCI Connector detect control */
847639a454SPaul Mundt #define	PA_ZIGIO1	(PA_BCR+0x000c)	/* Zigbee IO control 1 */
857639a454SPaul Mundt #define	PA_ZIGIO2	(PA_BCR+0x000e)	/* Zigbee IO control 2 */
867639a454SPaul Mundt #define	PA_ZIGIO3	(PA_BCR+0x0010)	/* Zigbee IO control 3 */
877639a454SPaul Mundt #define	PA_ZIGIO4	(PA_BCR+0x0012)	/* Zigbee IO control 4 */
887639a454SPaul Mundt #define	PA_IVDRMON	(PA_BCR+0x0014)	/* iVDR Moniter control */
897639a454SPaul Mundt #define	PA_IVDRCTL	(PA_BCR+0x0016)	/* iVDR control */
907639a454SPaul Mundt #define PA_OBLED	(PA_BCR+0x0018)	/* On Board LED control */
917639a454SPaul Mundt #define PA_OBSW		(PA_BCR+0x001a)	/* On Board Switch control */
927639a454SPaul Mundt #define PA_AUDIOSEL	(PA_BCR+0x001c)	/* Sound Interface Select control */
9325985edcSLucas De Marchi #define PA_EXTPLR	(PA_BCR+0x001e)	/* Extension Pin Polarity control */
947639a454SPaul Mundt #define PA_TPCTL	(PA_BCR+0x0100)	/* Touch Panel Access control */
957639a454SPaul Mundt #define PA_TPDCKCTL	(PA_BCR+0x0102)	/* Touch Panel Access data control */
967639a454SPaul Mundt #define PA_TPCTLCLR	(PA_BCR+0x0104)	/* Touch Panel Access control */
977639a454SPaul Mundt #define PA_TPXPOS	(PA_BCR+0x0106)	/* Touch Panel X position control */
987639a454SPaul Mundt #define PA_TPYPOS	(PA_BCR+0x0108)	/* Touch Panel Y position control */
997639a454SPaul Mundt #define PA_DBDET	(PA_BCR+0x0200)	/* Debug Board detect control */
1007639a454SPaul Mundt #define PA_DBDISPCTL	(PA_BCR+0x0202)	/* Debug Board Dot timing control */
1017639a454SPaul Mundt #define PA_DBSW		(PA_BCR+0x0204)	/* Debug Board Switch control */
1027639a454SPaul Mundt #define PA_CFCTL	(PA_BCR+0x0300)	/* CF Timing control */
1037639a454SPaul Mundt #define PA_CFPOW	(PA_BCR+0x0302)	/* CF Power control */
1047639a454SPaul Mundt #define PA_CFCDINTCLR	(PA_BCR+0x0304)	/* CF Insert Interrupt clear */
1057639a454SPaul Mundt #define PA_SCSMR	(PA_BCR+0x0400)	/* SCIF Serial mode control */
1067639a454SPaul Mundt #define PA_SCBRR	(PA_BCR+0x0402)	/* SCIF Bit rate control */
1077639a454SPaul Mundt #define PA_SCSCR	(PA_BCR+0x0404)	/* SCIF Serial control */
1087639a454SPaul Mundt #define PA_SCFDTR	(PA_BCR+0x0406)	/* SCIF Send FIFO control */
1097639a454SPaul Mundt #define PA_SCFSR	(PA_BCR+0x0408)	/* SCIF Serial status control */
1107639a454SPaul Mundt #define PA_SCFRDR	(PA_BCR+0x040a)	/* SCIF Receive FIFO control */
1117639a454SPaul Mundt #define PA_SCFCR	(PA_BCR+0x040c)	/* SCIF FIFO control */
1127639a454SPaul Mundt #define PA_SCFDR	(PA_BCR+0x040e)	/* SCIF FIFO data control */
1137639a454SPaul Mundt #define PA_SCLSR	(PA_BCR+0x0412)	/* SCIF Line Status control */
1147639a454SPaul Mundt #define PA_SMCR		(PA_BCR+0x0500)	/* 2-wire Serial control */
1157639a454SPaul Mundt #define PA_SMSMADR	(PA_BCR+0x0502)	/* 2-wire Serial Slave control */
1167639a454SPaul Mundt #define PA_SMMR		(PA_BCR+0x0504)	/* 2-wire Serial Mode control */
1177639a454SPaul Mundt #define PA_SMSADR1	(PA_BCR+0x0506)	/* 2-wire Serial Address1 control */
1187639a454SPaul Mundt #define PA_SMTRDR1	(PA_BCR+0x0546)	/* 2-wire Serial Data1 control */
1197639a454SPaul Mundt #define PA_VERREG	(PA_BCR+0x0600)	/* FPGA Version Register */
1207639a454SPaul Mundt 
1217639a454SPaul Mundt #define PA_AX88796L	0xa5800400	/* AX88796L Area */
1227639a454SPaul Mundt #define PA_SC1602BSLB	0xa6000000	/* SC1602BSLB Area */
1237639a454SPaul Mundt #define PA_IDE_OFFSET	0x1f0		/* CF IDE Offset */
1247639a454SPaul Mundt #define AX88796L_IO_BASE	0x1000	/* AX88796L IO Base Address */
1257639a454SPaul Mundt 
1267639a454SPaul Mundt #define IRLCNTR1	(PA_BCR + 0)	/* Interrupt Control Register1 */
1277639a454SPaul Mundt 
1287639a454SPaul Mundt #define IVDR_CK_ON	8		/* iVDR Clock ON */
1297639a454SPaul Mundt 
1307639a454SPaul Mundt #elif defined(CONFIG_SH_R7785RP)
1317639a454SPaul Mundt #define PA_BCR		0xa4000000	/* FPGA */
1327639a454SPaul Mundt #define PA_SDPOW	(-1)
1337639a454SPaul Mundt 
1347639a454SPaul Mundt #define	PA_PCISCR	(PA_BCR+0x0000)
1357639a454SPaul Mundt #define PA_IRLPRA	(PA_BCR+0x0002)
1367639a454SPaul Mundt #define	PA_IRLPRB	(PA_BCR+0x0004)
1377639a454SPaul Mundt #define	PA_IRLPRC	(PA_BCR+0x0006)
1387639a454SPaul Mundt #define	PA_IRLPRD	(PA_BCR+0x0008)
1397639a454SPaul Mundt #define IRLCNTR1	(PA_BCR+0x0010)
1407639a454SPaul Mundt #define	PA_IRLPRE	(PA_BCR+0x000a)
1417639a454SPaul Mundt #define	PA_IRLPRF	(PA_BCR+0x000c)
1427639a454SPaul Mundt #define	PA_EXIRLCR	(PA_BCR+0x000e)
1437639a454SPaul Mundt #define	PA_IRLMCR1	(PA_BCR+0x0010)
1447639a454SPaul Mundt #define	PA_IRLMCR2	(PA_BCR+0x0012)
1457639a454SPaul Mundt #define	PA_IRLSSR1	(PA_BCR+0x0014)
1467639a454SPaul Mundt #define	PA_IRLSSR2	(PA_BCR+0x0016)
1477639a454SPaul Mundt #define PA_CFTCR	(PA_BCR+0x0100)
1487639a454SPaul Mundt #define PA_CFPCR	(PA_BCR+0x0102)
1497639a454SPaul Mundt #define PA_PCICR	(PA_BCR+0x0110)
1507639a454SPaul Mundt #define PA_IVDRCTL	(PA_BCR+0x0112)
1517639a454SPaul Mundt #define PA_IVDRSR	(PA_BCR+0x0114)
1527639a454SPaul Mundt #define PA_PDRSTCR	(PA_BCR+0x0116)
1537639a454SPaul Mundt #define PA_POFF		(PA_BCR+0x0120)
1547639a454SPaul Mundt #define PA_LCDCR	(PA_BCR+0x0130)
1557639a454SPaul Mundt #define PA_TPCR		(PA_BCR+0x0140)
1567639a454SPaul Mundt #define PA_TPCKCR	(PA_BCR+0x0142)
1577639a454SPaul Mundt #define PA_TPRSTR	(PA_BCR+0x0144)
1587639a454SPaul Mundt #define PA_TPXPDR	(PA_BCR+0x0146)
1597639a454SPaul Mundt #define PA_TPYPDR	(PA_BCR+0x0148)
1607639a454SPaul Mundt #define PA_GPIOPFR	(PA_BCR+0x0150)
1617639a454SPaul Mundt #define PA_GPIODR	(PA_BCR+0x0152)
1627639a454SPaul Mundt #define PA_OBLED	(PA_BCR+0x0154)
1637639a454SPaul Mundt #define PA_SWSR		(PA_BCR+0x0156)
1647639a454SPaul Mundt #define PA_VERREG	(PA_BCR+0x0158)
1657639a454SPaul Mundt #define PA_SMCR		(PA_BCR+0x0200)
1667639a454SPaul Mundt #define PA_SMSMADR	(PA_BCR+0x0202)
1677639a454SPaul Mundt #define PA_SMMR		(PA_BCR+0x0204)
1687639a454SPaul Mundt #define PA_SMSADR1	(PA_BCR+0x0206)
1697639a454SPaul Mundt #define PA_SMSADR32	(PA_BCR+0x0244)
1707639a454SPaul Mundt #define PA_SMTRDR1	(PA_BCR+0x0246)
1717639a454SPaul Mundt #define PA_SMTRDR16	(PA_BCR+0x0264)
1727639a454SPaul Mundt #define PA_CU3MDR	(PA_BCR+0x0300)
1737639a454SPaul Mundt #define PA_CU5MDR	(PA_BCR+0x0302)
1747639a454SPaul Mundt #define PA_MMSR		(PA_BCR+0x0400)
1757639a454SPaul Mundt 
1767639a454SPaul Mundt #define IVDR_CK_ON	4		/* iVDR Clock ON */
1777639a454SPaul Mundt #endif
1787639a454SPaul Mundt 
179*a8ac2961SSergey Shtylyov #define HL_FPGA_IRQ_BASE	(200 + 16)
1807639a454SPaul Mundt #define HL_NR_IRL		15
1817639a454SPaul Mundt 
1827639a454SPaul Mundt #define IRQ_AX88796		(HL_FPGA_IRQ_BASE + 0)
1837639a454SPaul Mundt #define IRQ_CF			(HL_FPGA_IRQ_BASE + 1)
1847639a454SPaul Mundt #define IRQ_PSW			(HL_FPGA_IRQ_BASE + 2)
1857639a454SPaul Mundt #define IRQ_EXT0		(HL_FPGA_IRQ_BASE + 3)
1867639a454SPaul Mundt #define IRQ_EXT1		(HL_FPGA_IRQ_BASE + 4)
1877639a454SPaul Mundt #define IRQ_EXT2		(HL_FPGA_IRQ_BASE + 5)
1887639a454SPaul Mundt #define IRQ_EXT3		(HL_FPGA_IRQ_BASE + 6)
1897639a454SPaul Mundt #define IRQ_EXT4		(HL_FPGA_IRQ_BASE + 7)
1907639a454SPaul Mundt #define IRQ_EXT5		(HL_FPGA_IRQ_BASE + 8)
1917639a454SPaul Mundt #define IRQ_EXT6		(HL_FPGA_IRQ_BASE + 9)
1927639a454SPaul Mundt #define IRQ_EXT7		(HL_FPGA_IRQ_BASE + 10)
1937639a454SPaul Mundt #define IRQ_SMBUS		(HL_FPGA_IRQ_BASE + 11)
1947639a454SPaul Mundt #define IRQ_TP			(HL_FPGA_IRQ_BASE + 12)
1957639a454SPaul Mundt #define IRQ_RTC			(HL_FPGA_IRQ_BASE + 13)
1967639a454SPaul Mundt #define IRQ_TH_ALERT		(HL_FPGA_IRQ_BASE + 14)
1977639a454SPaul Mundt #define IRQ_SCIF0		(HL_FPGA_IRQ_BASE + 15)
1987639a454SPaul Mundt #define IRQ_SCIF1		(HL_FPGA_IRQ_BASE + 16)
1997639a454SPaul Mundt 
2007639a454SPaul Mundt unsigned char *highlander_plat_irq_setup(void);
2017639a454SPaul Mundt 
20261dc6eaeSPaul Mundt #ifdef CONFIG_SH_R7785RP
20361dc6eaeSPaul Mundt void highlander_plat_pinmux_setup(void);
20461dc6eaeSPaul Mundt #else
20561dc6eaeSPaul Mundt #define highlander_plat_pinmux_setup()	do { } while (0)
20661dc6eaeSPaul Mundt #endif
20761dc6eaeSPaul Mundt 
2087639a454SPaul Mundt #endif  /* __ASM_SH_RENESAS_R7780RP */
209