162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Atmel SFR (Special Function Registers) register offsets and bit definitions.
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Copyright (C) 2016 Atmel
662306a36Sopenharmony_ci *
762306a36Sopenharmony_ci * Author: Ludovic Desroches <ludovic.desroches@atmel.com>
862306a36Sopenharmony_ci */
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci#ifndef _LINUX_MFD_SYSCON_ATMEL_SFR_H
1162306a36Sopenharmony_ci#define _LINUX_MFD_SYSCON_ATMEL_SFR_H
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci#define AT91_SFR_DDRCFG		0x04	/* DDR Configuration Register */
1462306a36Sopenharmony_ci#define AT91_SFR_CCFG_EBICSA	0x04	/* EBI Chip Select Register */
1562306a36Sopenharmony_ci/* 0x08 ~ 0x0c: Reserved */
1662306a36Sopenharmony_ci#define AT91_SFR_OHCIICR	0x10	/* OHCI INT Configuration Register */
1762306a36Sopenharmony_ci#define AT91_SFR_OHCIISR	0x14	/* OHCI INT Status Register */
1862306a36Sopenharmony_ci#define AT91_SFR_UTMICKTRIM	0x30	/* UTMI Clock Trimming Register */
1962306a36Sopenharmony_ci#define AT91_SFR_UTMISWAP	0x3c	/* UTMI DP/DM Pin Swapping Register */
2062306a36Sopenharmony_ci#define AT91_SFR_LS		0x7c	/* Light Sleep Register */
2162306a36Sopenharmony_ci#define AT91_SFR_I2SCLKSEL	0x90	/* I2SC Register */
2262306a36Sopenharmony_ci#define AT91_SFR_WPMR		0xe4	/* Write Protection Mode Register */
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ci/* Field definitions */
2562306a36Sopenharmony_ci#define AT91_SFR_CCFG_EBI_CSA(cs, val)		((val) << (cs))
2662306a36Sopenharmony_ci#define AT91_SFR_CCFG_EBI_DBPUC			BIT(8)
2762306a36Sopenharmony_ci#define AT91_SFR_CCFG_EBI_DBPDC			BIT(9)
2862306a36Sopenharmony_ci#define AT91_SFR_CCFG_EBI_DRIVE			BIT(17)
2962306a36Sopenharmony_ci#define AT91_SFR_CCFG_NFD0_ON_D16		BIT(24)
3062306a36Sopenharmony_ci#define AT91_SFR_CCFG_DDR_MP_EN			BIT(25)
3162306a36Sopenharmony_ci
3262306a36Sopenharmony_ci#define AT91_SFR_OHCIICR_RES(x)			BIT(x)
3362306a36Sopenharmony_ci#define AT91_SFR_OHCIICR_ARIE			BIT(4)
3462306a36Sopenharmony_ci#define AT91_SFR_OHCIICR_APPSTART		BIT(5)
3562306a36Sopenharmony_ci#define AT91_SFR_OHCIICR_USB_SUSP(x)		BIT(8 + (x))
3662306a36Sopenharmony_ci#define AT91_SFR_OHCIICR_UDPPUDIS		BIT(23)
3762306a36Sopenharmony_ci#define AT91_OHCIICR_USB_SUSPEND		GENMASK(10, 8)
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ci#define AT91_SFR_OHCIISR_RIS(x)			BIT(x)
4062306a36Sopenharmony_ci
4162306a36Sopenharmony_ci#define AT91_UTMICKTRIM_FREQ			GENMASK(1, 0)
4262306a36Sopenharmony_ci
4362306a36Sopenharmony_ci#define AT91_SFR_UTMISWAP_PORT(x)		BIT(x)
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ci#define AT91_SFR_LS_VALUE(x)			BIT(x)
4662306a36Sopenharmony_ci#define AT91_SFR_LS_MEM_POWER_GATING_ULP1_EN	BIT(16)
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ci#define AT91_SFR_WPMR_WPEN			BIT(0)
4962306a36Sopenharmony_ci#define AT91_SFR_WPMR_WPKEY_MASK		GENMASK(31, 8)
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ci#endif /* _LINUX_MFD_SYSCON_ATMEL_SFR_H */
52