162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci *
462306a36Sopenharmony_ci * Copyright (C) 2015 John Crispin <john@phrozen.org>
562306a36Sopenharmony_ci */
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci#ifndef _MT7621_REGS_H_
862306a36Sopenharmony_ci#define _MT7621_REGS_H_
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci#define IOMEM(x)			((void __iomem *)(KSEG1ADDR(x)))
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ci#define MT7621_PALMBUS_BASE		0x1C000000
1362306a36Sopenharmony_ci#define MT7621_PALMBUS_SIZE		0x03FFFFFF
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci#define MT7621_SYSC_BASE		IOMEM(0x1E000000)
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci#define SYSC_REG_CHIP_NAME0		0x00
1862306a36Sopenharmony_ci#define SYSC_REG_CHIP_NAME1		0x04
1962306a36Sopenharmony_ci#define SYSC_REG_CHIP_REV		0x0c
2062306a36Sopenharmony_ci#define SYSC_REG_SYSTEM_CONFIG0		0x10
2162306a36Sopenharmony_ci#define SYSC_REG_SYSTEM_CONFIG1		0x14
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ci#define CHIP_REV_PKG_MASK		0x1
2462306a36Sopenharmony_ci#define CHIP_REV_PKG_SHIFT		16
2562306a36Sopenharmony_ci#define CHIP_REV_VER_MASK		0xf
2662306a36Sopenharmony_ci#define CHIP_REV_VER_SHIFT		8
2762306a36Sopenharmony_ci#define CHIP_REV_ECO_MASK		0xf
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ci#define MT7621_LOWMEM_BASE		0x0
3062306a36Sopenharmony_ci#define MT7621_LOWMEM_MAX_SIZE		0x1C000000
3162306a36Sopenharmony_ci#define MT7621_HIGHMEM_BASE		0x20000000
3262306a36Sopenharmony_ci#define MT7621_HIGHMEM_SIZE		0x4000000
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ci#define MT7621_CHIP_NAME0		0x3637544D
3562306a36Sopenharmony_ci#define MT7621_CHIP_NAME1		0x20203132
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_ci#endif
38