162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci#ifndef __ASM_ARCH_EP93XX_REGS_H
362306a36Sopenharmony_ci#define __ASM_ARCH_EP93XX_REGS_H
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci/*
662306a36Sopenharmony_ci * EP93xx linux memory map:
762306a36Sopenharmony_ci *
862306a36Sopenharmony_ci * virt		phys		size
962306a36Sopenharmony_ci * fe800000			5M		per-platform mappings
1062306a36Sopenharmony_ci * fed00000	80800000	2M		APB
1162306a36Sopenharmony_ci * fef00000	80000000	1M		AHB
1262306a36Sopenharmony_ci */
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ci#define EP93XX_AHB_PHYS_BASE		0x80000000
1562306a36Sopenharmony_ci#define EP93XX_AHB_VIRT_BASE		0xfef00000
1662306a36Sopenharmony_ci#define EP93XX_AHB_SIZE			0x00100000
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ci#define EP93XX_AHB_PHYS(x)		(EP93XX_AHB_PHYS_BASE + (x))
1962306a36Sopenharmony_ci#define EP93XX_AHB_IOMEM(x)		IOMEM(EP93XX_AHB_VIRT_BASE + (x))
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ci#define EP93XX_APB_PHYS_BASE		0x80800000
2262306a36Sopenharmony_ci#define EP93XX_APB_VIRT_BASE		0xfed00000
2362306a36Sopenharmony_ci#define EP93XX_APB_SIZE			0x00200000
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci#define EP93XX_APB_PHYS(x)		(EP93XX_APB_PHYS_BASE + (x))
2662306a36Sopenharmony_ci#define EP93XX_APB_IOMEM(x)		IOMEM(EP93XX_APB_VIRT_BASE + (x))
2762306a36Sopenharmony_ci
2862306a36Sopenharmony_ci/* APB UARTs */
2962306a36Sopenharmony_ci#define EP93XX_UART1_PHYS_BASE		EP93XX_APB_PHYS(0x000c0000)
3062306a36Sopenharmony_ci#define EP93XX_UART1_BASE		EP93XX_APB_IOMEM(0x000c0000)
3162306a36Sopenharmony_ci
3262306a36Sopenharmony_ci#define EP93XX_UART2_PHYS_BASE		EP93XX_APB_PHYS(0x000d0000)
3362306a36Sopenharmony_ci#define EP93XX_UART2_BASE		EP93XX_APB_IOMEM(0x000d0000)
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_ci#define EP93XX_UART3_PHYS_BASE		EP93XX_APB_PHYS(0x000e0000)
3662306a36Sopenharmony_ci#define EP93XX_UART3_BASE		EP93XX_APB_IOMEM(0x000e0000)
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ci#endif
39