162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
262306a36Sopenharmony_ci/* Mbus-L to Mbus Bridge Registers */
362306a36Sopenharmony_ci
462306a36Sopenharmony_ci#ifndef __ASM_ARCH_BRIDGE_REGS_H
562306a36Sopenharmony_ci#define __ASM_ARCH_BRIDGE_REGS_H
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci#include "dove.h"
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci#define CPU_CONFIG		(BRIDGE_VIRT_BASE + 0x0000)
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci#define CPU_CONTROL		(BRIDGE_VIRT_BASE + 0x0104)
1262306a36Sopenharmony_ci#define  CPU_CTRL_PCIE0_LINK	0x00000001
1362306a36Sopenharmony_ci#define  CPU_RESET		0x00000002
1462306a36Sopenharmony_ci#define  CPU_CTRL_PCIE1_LINK	0x00000008
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci#define RSTOUTn_MASK		(BRIDGE_VIRT_BASE + 0x0108)
1762306a36Sopenharmony_ci#define RSTOUTn_MASK_PHYS	(BRIDGE_PHYS_BASE + 0x0108)
1862306a36Sopenharmony_ci#define  SOFT_RESET_OUT_EN	0x00000004
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci#define SYSTEM_SOFT_RESET	(BRIDGE_VIRT_BASE + 0x010c)
2162306a36Sopenharmony_ci#define  SOFT_RESET		0x00000001
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ci#define BRIDGE_CAUSE		(BRIDGE_VIRT_BASE + 0x0110)
2462306a36Sopenharmony_ci#define  BRIDGE_INT_TIMER1_CLR	(~0x0004)
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_ci#define IRQ_VIRT_BASE		(BRIDGE_VIRT_BASE + 0x0200)
2762306a36Sopenharmony_ci#define IRQ_CAUSE_LOW_OFF	0x0000
2862306a36Sopenharmony_ci#define IRQ_MASK_LOW_OFF	0x0004
2962306a36Sopenharmony_ci#define FIQ_MASK_LOW_OFF	0x0008
3062306a36Sopenharmony_ci#define ENDPOINT_MASK_LOW_OFF	0x000c
3162306a36Sopenharmony_ci#define IRQ_CAUSE_HIGH_OFF	0x0010
3262306a36Sopenharmony_ci#define IRQ_MASK_HIGH_OFF	0x0014
3362306a36Sopenharmony_ci#define FIQ_MASK_HIGH_OFF	0x0018
3462306a36Sopenharmony_ci#define ENDPOINT_MASK_HIGH_OFF	0x001c
3562306a36Sopenharmony_ci#define PCIE_INTERRUPT_MASK_OFF	0x0020
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_ci#define IRQ_MASK_LOW		(IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF)
3862306a36Sopenharmony_ci#define FIQ_MASK_LOW		(IRQ_VIRT_BASE + FIQ_MASK_LOW_OFF)
3962306a36Sopenharmony_ci#define ENDPOINT_MASK_LOW	(IRQ_VIRT_BASE + ENDPOINT_MASK_LOW_OFF)
4062306a36Sopenharmony_ci#define IRQ_MASK_HIGH		(IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF)
4162306a36Sopenharmony_ci#define FIQ_MASK_HIGH		(IRQ_VIRT_BASE + FIQ_MASK_HIGH_OFF)
4262306a36Sopenharmony_ci#define ENDPOINT_MASK_HIGH	(IRQ_VIRT_BASE + ENDPOINT_MASK_HIGH_OFF)
4362306a36Sopenharmony_ci#define PCIE_INTERRUPT_MASK	(IRQ_VIRT_BASE + PCIE_INTERRUPT_MASK_OFF)
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ci#define POWER_MANAGEMENT	(BRIDGE_VIRT_BASE + 0x011c)
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_ci#define TIMER_VIRT_BASE		(BRIDGE_VIRT_BASE + 0x0300)
4862306a36Sopenharmony_ci#define TIMER_PHYS_BASE         (BRIDGE_PHYS_BASE + 0x0300)
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ci#endif
51