/**
 * @file  gpio-mst.h
 * @brief set tzpc (mst)
 *
 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
 *
 * This software is proprietary of Samsung Electronics.
 * No part of this software, either material or conceptual may be copied
 * or distributed, transmitted, transcribed, stored in a retrieval system
 * or translated into any human or computer language in any form by any means,
 * electronic, mechanical, manual or otherwise, or disclosed to third parties
 * without the express written permission of Samsung Electronics.
 */

#ifndef __GPIO_MST_H__
#define __GPIO_MST_H__

#if defined (CONFIG_S5E8825)
// TZPC_PERI_1 BASE 0x10040000
// OFFSET 0x2004
// Because of 4KB mapping, TZPC_PERI_1 BASE should be 0x10042000
#define TZPC_PERIC_BASE 0x10042000
#define MST_OFFSET 0x4

#define GPIO_MST_EN     (3 << 2)
#define GPIO_MST_DATA   (3 << 0)

#elif defined (CONFIG_S5E9925)
// TZPC_CMGP_0 BASE 0x14E30000
// OFFSET 0x2000
// Because of 4KB mapping, TZPC_CMGP_0 BASE should be 0x14E32000
#define TZPC_PERIC_BASE 0x14E32000
#define MST_OFFSET 0x0

#define GPIO_MST_EN     (3 << 18)
#define GPIO_MST_DATA   (3 << 16)

#elif defined (CONFIG_EXYNOS2100)
// TZPC_PERIC0_4 BASE 0x10430000
// OFFSET 0x2010
// Because of 4KB mapping, TZPC_PERIC1_1 BASE should be 0x10432000
#define TZPC_PERIC_BASE 0x10432000
#define MST_OFFSET 0x10

#define GPIO_MST_EN     (3 << 2)
#define GPIO_MST_DATA   (3 << 0)

#elif defined (CONFIG_EXYNOS9830)
// TZPC_PERIC1_1 BASE 0x10730000
// OFFSET 0x2004
// Because of 4KB mapping, TZPC_PERIC1_1 BASE should be 0x10732000
#define TZPC_PERIC_BASE 0x10732000                                                                                                                                                
#define MST_OFFSET 0x4

#define GPIO_MST_EN     (3 << 14)
#define GPIO_MST_DATA   (3 << 12)

#elif defined (CONFIG_EXYNOS9820)
// TZPC_PERIC1_0 BASE 0x10830000
// OFFSET 0x2000
// Because of 4KB mapping, TZPC_PERIC1_0 BASE should be 0x10832000
#define TZPC_PERIC_BASE 0x10832000                                                                                                                                                
#define MST_OFFSET 0x0            

#define GPIO_MST_EN     (3 << 10)
#define GPIO_MST_DATA   (3 << 8)

#elif defined (CONFIG_EXYNOS9630)
// TZPC_PERI_1 BASE 0x10040000
// OFFSET 0x2004
// Because of 4KB mapping, TZPC_PERI_1 BASE should be 0x10042000
#define TZPC_PERIC_BASE 0x10042000
#define MST_OFFSET 0x4

#define GPIO_MST_EN     (3 << 2)
#define GPIO_MST_DATA   (3 << 0)

#elif defined (CONFIG_EXYNOS9610)
// TZPC_CMGP_3, BASE 0x11C20000
// OFFSET 0x200C
// Because of 4KB mapping, TZPC_CMGP_3 BASE should be 0x11C20000
#define TZPC_PERIC_BASE 0x11C22000
 
#define MST_OFFSET 0xC

#define GPIO_MST_EN     (1 << 16)
#define GPIO_MST_DATA   (1 << 8)
#endif

/* Common define */
#define TZPC_SECURE	0x0	

/* For TZPC function */
uint32_t set_tzpc_mst_secure(uint32_t mode);

#endif
