1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */
277b55e8cSThomas Abraham /*
377b55e8cSThomas Abraham  * (C) Copyright 2012 SAMSUNG Electronics
477b55e8cSThomas Abraham  * Jaehoon Chung <jh80.chung@samsung.com>
577b55e8cSThomas Abraham  */
677b55e8cSThomas Abraham 
777b55e8cSThomas Abraham #define DWMCI_CLKSEL		0x09C
877b55e8cSThomas Abraham #define DWMCI_SET_SAMPLE_CLK(x)	(x)
977b55e8cSThomas Abraham #define DWMCI_SET_DRV_CLK(x)	((x) << 16)
1077b55e8cSThomas Abraham #define DWMCI_SET_DIV_RATIO(x)	((x) << 24)
1177b55e8cSThomas Abraham 
1277b55e8cSThomas Abraham #define EMMCP_MPSBEGIN0		0x1200
1377b55e8cSThomas Abraham #define EMMCP_SEND0		0x1204
1477b55e8cSThomas Abraham #define EMMCP_CTRL0		0x120C
1577b55e8cSThomas Abraham 
1677b55e8cSThomas Abraham #define MPSCTRL_SECURE_READ_BIT		(0x1<<7)
1777b55e8cSThomas Abraham #define MPSCTRL_SECURE_WRITE_BIT	(0x1<<6)
1877b55e8cSThomas Abraham #define MPSCTRL_NON_SECURE_READ_BIT	(0x1<<5)
1977b55e8cSThomas Abraham #define MPSCTRL_NON_SECURE_WRITE_BIT	(0x1<<4)
2077b55e8cSThomas Abraham #define MPSCTRL_USE_FUSE_KEY		(0x1<<3)
2177b55e8cSThomas Abraham #define MPSCTRL_ECB_MODE		(0x1<<2)
2277b55e8cSThomas Abraham #define MPSCTRL_ENCRYPTION		(0x1<<1)
2377b55e8cSThomas Abraham #define MPSCTRL_VALID			(0x1<<0)
2477b55e8cSThomas Abraham 
2577b55e8cSThomas Abraham /* CLKSEL Register */
2677b55e8cSThomas Abraham #define DWMCI_DIVRATIO_BIT		24
2777b55e8cSThomas Abraham #define DWMCI_DIVRATIO_MASK		0x7
2877b55e8cSThomas Abraham 
2977b55e8cSThomas Abraham int exynos_dwmmc_init(const void *blob);
30