162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci#ifndef __ASM_SH_SE7722_H
362306a36Sopenharmony_ci#define __ASM_SH_SE7722_H
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci/*
662306a36Sopenharmony_ci * linux/include/asm-sh/se7722.h
762306a36Sopenharmony_ci *
862306a36Sopenharmony_ci * Copyright (C) 2007  Nobuhiro Iwamatsu
962306a36Sopenharmony_ci *
1062306a36Sopenharmony_ci * Hitachi UL SolutionEngine 7722 Support.
1162306a36Sopenharmony_ci */
1262306a36Sopenharmony_ci#include <linux/sh_intc.h>
1362306a36Sopenharmony_ci#include <asm/addrspace.h>
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci/* Box specific addresses.  */
1662306a36Sopenharmony_ci#define SE_AREA0_WIDTH	4		/* Area0: 32bit */
1762306a36Sopenharmony_ci#define PA_ROM		0xa0000000	/* EPROM */
1862306a36Sopenharmony_ci#define PA_ROM_SIZE	0x00200000	/* EPROM size 2M byte */
1962306a36Sopenharmony_ci#define PA_FROM		0xa1000000	/* Flash-ROM */
2062306a36Sopenharmony_ci#define PA_FROM_SIZE	0x01000000	/* Flash-ROM size 16M byte */
2162306a36Sopenharmony_ci#define PA_EXT1		0xa4000000
2262306a36Sopenharmony_ci#define PA_EXT1_SIZE	0x04000000
2362306a36Sopenharmony_ci#define PA_SDRAM	0xaC000000	/* DDR-SDRAM(Area3) 64MB */
2462306a36Sopenharmony_ci#define PA_SDRAM_SIZE	0x04000000
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_ci#define PA_EXT4		0xb0000000
2762306a36Sopenharmony_ci#define PA_EXT4_SIZE	0x04000000
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ci#define PA_PERIPHERAL	0xB0000000
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ci#define PA_PCIC         PA_PERIPHERAL		/* MR-SHPC-01 PCMCIA */
3262306a36Sopenharmony_ci#define PA_MRSHPC       (PA_PERIPHERAL + 0x003fffe0)    /* MR-SHPC-01 PCMCIA controller */
3362306a36Sopenharmony_ci#define PA_MRSHPC_MW1   (PA_PERIPHERAL + 0x00400000)    /* MR-SHPC-01 memory window base */
3462306a36Sopenharmony_ci#define PA_MRSHPC_MW2   (PA_PERIPHERAL + 0x00500000)    /* MR-SHPC-01 attribute window base */
3562306a36Sopenharmony_ci#define PA_MRSHPC_IO    (PA_PERIPHERAL + 0x00600000)    /* MR-SHPC-01 I/O window base */
3662306a36Sopenharmony_ci#define MRSHPC_OPTION   (PA_MRSHPC + 6)
3762306a36Sopenharmony_ci#define MRSHPC_CSR      (PA_MRSHPC + 8)
3862306a36Sopenharmony_ci#define MRSHPC_ISR      (PA_MRSHPC + 10)
3962306a36Sopenharmony_ci#define MRSHPC_ICR      (PA_MRSHPC + 12)
4062306a36Sopenharmony_ci#define MRSHPC_CPWCR    (PA_MRSHPC + 14)
4162306a36Sopenharmony_ci#define MRSHPC_MW0CR1   (PA_MRSHPC + 16)
4262306a36Sopenharmony_ci#define MRSHPC_MW1CR1   (PA_MRSHPC + 18)
4362306a36Sopenharmony_ci#define MRSHPC_IOWCR1   (PA_MRSHPC + 20)
4462306a36Sopenharmony_ci#define MRSHPC_MW0CR2   (PA_MRSHPC + 22)
4562306a36Sopenharmony_ci#define MRSHPC_MW1CR2   (PA_MRSHPC + 24)
4662306a36Sopenharmony_ci#define MRSHPC_IOWCR2   (PA_MRSHPC + 26)
4762306a36Sopenharmony_ci#define MRSHPC_CDCR     (PA_MRSHPC + 28)
4862306a36Sopenharmony_ci#define MRSHPC_PCIC_INFO (PA_MRSHPC + 30)
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ci#define PA_LED		(PA_PERIPHERAL + 0x00800000)	/* 8bit LED */
5162306a36Sopenharmony_ci#define PA_FPGA		(PA_PERIPHERAL + 0x01800000)	/* FPGA base address */
5262306a36Sopenharmony_ci
5362306a36Sopenharmony_ci#define PA_LAN		(PA_AREA6_IO + 0)		/* SMC LAN91C111 */
5462306a36Sopenharmony_ci/* GPIO */
5562306a36Sopenharmony_ci#define FPGA_IN         0xb1840000UL
5662306a36Sopenharmony_ci#define FPGA_OUT        0xb1840004UL
5762306a36Sopenharmony_ci
5862306a36Sopenharmony_ci#define PORT_PECR       0xA4050108UL
5962306a36Sopenharmony_ci#define PORT_PJCR       0xA4050110UL
6062306a36Sopenharmony_ci#define PORT_PSELD      0xA4050154UL
6162306a36Sopenharmony_ci#define PORT_PSELB      0xA4050150UL
6262306a36Sopenharmony_ci
6362306a36Sopenharmony_ci#define PORT_PSELC      0xA4050152UL
6462306a36Sopenharmony_ci#define PORT_PKCR       0xA4050112UL
6562306a36Sopenharmony_ci#define PORT_PHCR       0xA405010EUL
6662306a36Sopenharmony_ci#define PORT_PLCR       0xA4050114UL
6762306a36Sopenharmony_ci#define PORT_PMCR       0xA4050116UL
6862306a36Sopenharmony_ci#define PORT_PRCR       0xA405011CUL
6962306a36Sopenharmony_ci#define PORT_PXCR       0xA4050148UL
7062306a36Sopenharmony_ci#define PORT_PSELA      0xA405014EUL
7162306a36Sopenharmony_ci#define PORT_PYCR       0xA405014AUL
7262306a36Sopenharmony_ci#define PORT_PZCR       0xA405014CUL
7362306a36Sopenharmony_ci#define PORT_HIZCRA     0xA4050158UL
7462306a36Sopenharmony_ci#define PORT_HIZCRC     0xA405015CUL
7562306a36Sopenharmony_ci
7662306a36Sopenharmony_ci/* IRQ */
7762306a36Sopenharmony_ci#define IRQ0_IRQ        evt2irq(0x600)
7862306a36Sopenharmony_ci#define IRQ1_IRQ        evt2irq(0x620)
7962306a36Sopenharmony_ci
8062306a36Sopenharmony_ci#define SE7722_FPGA_IRQ_USB	0 /* IRQ0 */
8162306a36Sopenharmony_ci#define SE7722_FPGA_IRQ_SMC	1 /* IRQ0 */
8262306a36Sopenharmony_ci#define SE7722_FPGA_IRQ_MRSHPC0	2 /* IRQ1 */
8362306a36Sopenharmony_ci#define SE7722_FPGA_IRQ_MRSHPC1	3 /* IRQ1 */
8462306a36Sopenharmony_ci#define SE7722_FPGA_IRQ_MRSHPC2	4 /* IRQ1 */
8562306a36Sopenharmony_ci#define SE7722_FPGA_IRQ_MRSHPC3	5 /* IRQ1 */
8662306a36Sopenharmony_ci#define SE7722_FPGA_IRQ_NR	6
8762306a36Sopenharmony_ci
8862306a36Sopenharmony_cistruct irq_domain;
8962306a36Sopenharmony_ci
9062306a36Sopenharmony_ci/* arch/sh/boards/se/7722/irq.c */
9162306a36Sopenharmony_ciextern struct irq_domain *se7722_irq_domain;
9262306a36Sopenharmony_ci
9362306a36Sopenharmony_civoid init_se7722_IRQ(void);
9462306a36Sopenharmony_ci
9562306a36Sopenharmony_ci#define __IO_PREFIX		se7722
9662306a36Sopenharmony_ci#include <asm/io_generic.h>
9762306a36Sopenharmony_ci
9862306a36Sopenharmony_ci#endif  /* __ASM_SH_SE7722_H */
99