2019-06-04 11:11:33 +03:00
// SPDX-License-Identifier: GPL-2.0-only
2017-12-13 14:58:21 +03:00
/*
2021-06-02 19:33:00 +03:00
* Copyright ( C ) 2017 - 2021 NVIDIA CORPORATION . All rights reserved .
2017-12-13 14:58:21 +03:00
*/
# include <linux/io.h>
2021-06-03 19:46:24 +03:00
# include <linux/iommu.h>
2017-12-13 14:58:21 +03:00
# include <linux/module.h>
2018-06-20 08:47:28 +03:00
# include <linux/mod_devicetable.h>
2019-12-22 17:10:27 +03:00
# include <linux/of_device.h>
2017-12-13 14:58:21 +03:00
# include <linux/platform_device.h>
2021-06-02 19:32:52 +03:00
# include <soc/tegra/mc.h>
2019-12-22 17:10:31 +03:00
# if defined(CONFIG_ARCH_TEGRA_186_SOC)
2017-12-13 14:58:21 +03:00
# include <dt-bindings/memory/tegra186-mc.h>
2019-12-22 17:10:31 +03:00
# endif
2017-12-13 14:58:21 +03:00
2021-06-03 19:46:24 +03:00
# define MC_SID_STREAMID_OVERRIDE_MASK GENMASK(7, 0)
# define MC_SID_STREAMID_SECURITY_WRITE_ACCESS_DISABLED BIT(16)
# define MC_SID_STREAMID_SECURITY_OVERRIDE BIT(8)
2021-06-02 19:32:52 +03:00
static void tegra186_mc_program_sid ( struct tegra_mc * mc )
2019-12-22 17:10:28 +03:00
{
unsigned int i ;
for ( i = 0 ; i < mc - > soc - > num_clients ; i + + ) {
2021-06-02 19:32:52 +03:00
const struct tegra_mc_client * client = & mc - > soc - > clients [ i ] ;
2019-12-22 17:10:28 +03:00
u32 override , security ;
2021-06-02 19:32:52 +03:00
override = readl ( mc - > regs + client - > regs . sid . override ) ;
security = readl ( mc - > regs + client - > regs . sid . security ) ;
2019-12-22 17:10:28 +03:00
dev_dbg ( mc - > dev , " client %s: override: %x security: %x \n " ,
client - > name , override , security ) ;
dev_dbg ( mc - > dev , " setting SID %u for %s \n " , client - > sid ,
client - > name ) ;
2021-06-02 19:32:52 +03:00
writel ( client - > sid , mc - > regs + client - > regs . sid . override ) ;
2019-12-22 17:10:28 +03:00
2021-06-02 19:32:52 +03:00
override = readl ( mc - > regs + client - > regs . sid . override ) ;
security = readl ( mc - > regs + client - > regs . sid . security ) ;
2019-12-22 17:10:28 +03:00
dev_dbg ( mc - > dev , " client %s: override: %x security: %x \n " ,
client - > name , override , security ) ;
}
}
2021-06-02 19:33:00 +03:00
static int tegra186_mc_probe ( struct tegra_mc * mc )
{
int err ;
err = of_platform_populate ( mc - > dev - > of_node , NULL , NULL , mc - > dev ) ;
if ( err < 0 )
return err ;
tegra186_mc_program_sid ( mc ) ;
return 0 ;
}
static void tegra186_mc_remove ( struct tegra_mc * mc )
{
of_platform_depopulate ( mc - > dev ) ;
}
2021-06-02 19:32:54 +03:00
static int tegra186_mc_resume ( struct tegra_mc * mc )
{
tegra186_mc_program_sid ( mc ) ;
return 0 ;
}
2021-06-03 19:46:24 +03:00
static void tegra186_mc_client_sid_override ( struct tegra_mc * mc ,
const struct tegra_mc_client * client ,
unsigned int sid )
{
u32 value , old ;
value = readl ( mc - > regs + client - > regs . sid . security ) ;
if ( ( value & MC_SID_STREAMID_SECURITY_OVERRIDE ) = = 0 ) {
/*
* If the secure firmware has locked this down the override
* for this memory client , there ' s nothing we can do here .
*/
if ( value & MC_SID_STREAMID_SECURITY_WRITE_ACCESS_DISABLED )
return ;
/*
* Otherwise , try to set the override itself . Typically the
* secure firmware will never have set this configuration .
* Instead , it will either have disabled write access to
* this field , or it will already have set an explicit
* override itself .
*/
WARN_ON ( ( value & MC_SID_STREAMID_SECURITY_OVERRIDE ) = = 0 ) ;
value | = MC_SID_STREAMID_SECURITY_OVERRIDE ;
writel ( value , mc - > regs + client - > regs . sid . security ) ;
}
value = readl ( mc - > regs + client - > regs . sid . override ) ;
old = value & MC_SID_STREAMID_OVERRIDE_MASK ;
if ( old ! = sid ) {
dev_dbg ( mc - > dev , " overriding SID %x for %s with %x \n " , old ,
client - > name , sid ) ;
writel ( sid , mc - > regs + client - > regs . sid . override ) ;
}
}
static int tegra186_mc_probe_device ( struct tegra_mc * mc , struct device * dev )
{
# if IS_ENABLED(CONFIG_IOMMU_API)
struct iommu_fwspec * fwspec = dev_iommu_fwspec_get ( dev ) ;
struct of_phandle_args args ;
unsigned int i , index = 0 ;
while ( ! of_parse_phandle_with_args ( dev - > of_node , " interconnects " , " #interconnect-cells " ,
index , & args ) ) {
if ( args . np = = mc - > dev - > of_node & & args . args_count ! = 0 ) {
for ( i = 0 ; i < mc - > soc - > num_clients ; i + + ) {
const struct tegra_mc_client * client = & mc - > soc - > clients [ i ] ;
if ( client - > id = = args . args [ 0 ] ) {
u32 sid = fwspec - > ids [ 0 ] & MC_SID_STREAMID_OVERRIDE_MASK ;
tegra186_mc_client_sid_override ( mc , client , sid ) ;
}
}
}
index + + ;
}
# endif
return 0 ;
}
2021-06-02 19:33:02 +03:00
const struct tegra_mc_ops tegra186_mc_ops = {
2021-06-02 19:33:00 +03:00
. probe = tegra186_mc_probe ,
. remove = tegra186_mc_remove ,
2021-06-02 19:32:54 +03:00
. resume = tegra186_mc_resume ,
2021-06-03 19:46:24 +03:00
. probe_device = tegra186_mc_probe_device ,
2021-06-02 19:32:54 +03:00
} ;
2019-12-22 17:10:31 +03:00
# if defined(CONFIG_ARCH_TEGRA_186_SOC)
2021-06-02 19:32:52 +03:00
static const struct tegra_mc_client tegra186_mc_clients [ ] = {
2017-12-13 14:58:21 +03:00
{
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_PTCR ,
2017-12-13 14:58:21 +03:00
. name = " ptcr " ,
. sid = TEGRA186_SID_PASSTHROUGH ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x000 ,
. security = 0x004 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_AFIR ,
2017-12-13 14:58:21 +03:00
. name = " afir " ,
. sid = TEGRA186_SID_AFI ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x070 ,
. security = 0x074 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_HDAR ,
2017-12-13 14:58:21 +03:00
. name = " hdar " ,
. sid = TEGRA186_SID_HDA ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x0a8 ,
. security = 0x0ac ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_HOST1XDMAR ,
2017-12-13 14:58:21 +03:00
. name = " host1xdmar " ,
. sid = TEGRA186_SID_HOST1X ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x0b0 ,
. security = 0x0b4 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_NVENCSRD ,
2017-12-13 14:58:21 +03:00
. name = " nvencsrd " ,
. sid = TEGRA186_SID_NVENC ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x0e0 ,
. security = 0x0e4 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_SATAR ,
2017-12-13 14:58:21 +03:00
. name = " satar " ,
. sid = TEGRA186_SID_SATA ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x0f8 ,
. security = 0x0fc ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_MPCORER ,
2017-12-13 14:58:21 +03:00
. name = " mpcorer " ,
. sid = TEGRA186_SID_PASSTHROUGH ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x138 ,
. security = 0x13c ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_NVENCSWR ,
2017-12-13 14:58:21 +03:00
. name = " nvencswr " ,
. sid = TEGRA186_SID_NVENC ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x158 ,
. security = 0x15c ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_AFIW ,
2017-12-13 14:58:21 +03:00
. name = " afiw " ,
. sid = TEGRA186_SID_AFI ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x188 ,
. security = 0x18c ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_HDAW ,
2017-12-13 14:58:21 +03:00
. name = " hdaw " ,
. sid = TEGRA186_SID_HDA ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x1a8 ,
. security = 0x1ac ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_MPCOREW ,
2017-12-13 14:58:21 +03:00
. name = " mpcorew " ,
. sid = TEGRA186_SID_PASSTHROUGH ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x1c8 ,
. security = 0x1cc ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_SATAW ,
2017-12-13 14:58:21 +03:00
. name = " sataw " ,
. sid = TEGRA186_SID_SATA ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x1e8 ,
. security = 0x1ec ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_ISPRA ,
2017-12-13 14:58:21 +03:00
. name = " ispra " ,
. sid = TEGRA186_SID_ISP ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x220 ,
. security = 0x224 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_ISPWA ,
2017-12-13 14:58:21 +03:00
. name = " ispwa " ,
. sid = TEGRA186_SID_ISP ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x230 ,
. security = 0x234 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_ISPWB ,
2017-12-13 14:58:21 +03:00
. name = " ispwb " ,
. sid = TEGRA186_SID_ISP ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x238 ,
. security = 0x23c ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_XUSB_HOSTR ,
2017-12-13 14:58:21 +03:00
. name = " xusb_hostr " ,
. sid = TEGRA186_SID_XUSB_HOST ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x250 ,
. security = 0x254 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_XUSB_HOSTW ,
2017-12-13 14:58:21 +03:00
. name = " xusb_hostw " ,
. sid = TEGRA186_SID_XUSB_HOST ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x258 ,
. security = 0x25c ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_XUSB_DEVR ,
2017-12-13 14:58:21 +03:00
. name = " xusb_devr " ,
. sid = TEGRA186_SID_XUSB_DEV ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x260 ,
. security = 0x264 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_XUSB_DEVW ,
2017-12-13 14:58:21 +03:00
. name = " xusb_devw " ,
. sid = TEGRA186_SID_XUSB_DEV ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x268 ,
. security = 0x26c ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_TSECSRD ,
2017-12-13 14:58:21 +03:00
. name = " tsecsrd " ,
. sid = TEGRA186_SID_TSEC ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x2a0 ,
. security = 0x2a4 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_TSECSWR ,
2017-12-13 14:58:21 +03:00
. name = " tsecswr " ,
. sid = TEGRA186_SID_TSEC ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x2a8 ,
. security = 0x2ac ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_GPUSRD ,
2017-12-13 14:58:21 +03:00
. name = " gpusrd " ,
. sid = TEGRA186_SID_GPU ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x2c0 ,
. security = 0x2c4 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_GPUSWR ,
2017-12-13 14:58:21 +03:00
. name = " gpuswr " ,
. sid = TEGRA186_SID_GPU ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x2c8 ,
. security = 0x2cc ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_SDMMCRA ,
2017-12-13 14:58:21 +03:00
. name = " sdmmcra " ,
. sid = TEGRA186_SID_SDMMC1 ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x300 ,
. security = 0x304 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_SDMMCRAA ,
2017-12-13 14:58:21 +03:00
. name = " sdmmcraa " ,
. sid = TEGRA186_SID_SDMMC2 ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x308 ,
. security = 0x30c ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_SDMMCR ,
2017-12-13 14:58:21 +03:00
. name = " sdmmcr " ,
. sid = TEGRA186_SID_SDMMC3 ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x310 ,
. security = 0x314 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_SDMMCRAB ,
2017-12-13 14:58:21 +03:00
. name = " sdmmcrab " ,
. sid = TEGRA186_SID_SDMMC4 ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x318 ,
. security = 0x31c ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_SDMMCWA ,
2017-12-13 14:58:21 +03:00
. name = " sdmmcwa " ,
. sid = TEGRA186_SID_SDMMC1 ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x320 ,
. security = 0x324 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_SDMMCWAA ,
2017-12-13 14:58:21 +03:00
. name = " sdmmcwaa " ,
. sid = TEGRA186_SID_SDMMC2 ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x328 ,
. security = 0x32c ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_SDMMCW ,
2017-12-13 14:58:21 +03:00
. name = " sdmmcw " ,
. sid = TEGRA186_SID_SDMMC3 ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x330 ,
. security = 0x334 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_SDMMCWAB ,
2017-12-13 14:58:21 +03:00
. name = " sdmmcwab " ,
. sid = TEGRA186_SID_SDMMC4 ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x338 ,
. security = 0x33c ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_VICSRD ,
2017-12-13 14:58:21 +03:00
. name = " vicsrd " ,
. sid = TEGRA186_SID_VIC ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x360 ,
. security = 0x364 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_VICSWR ,
2017-12-13 14:58:21 +03:00
. name = " vicswr " ,
. sid = TEGRA186_SID_VIC ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x368 ,
. security = 0x36c ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_VIW ,
2017-12-13 14:58:21 +03:00
. name = " viw " ,
. sid = TEGRA186_SID_VI ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x390 ,
. security = 0x394 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_NVDECSRD ,
2017-12-13 14:58:21 +03:00
. name = " nvdecsrd " ,
. sid = TEGRA186_SID_NVDEC ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x3c0 ,
. security = 0x3c4 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_NVDECSWR ,
2017-12-13 14:58:21 +03:00
. name = " nvdecswr " ,
. sid = TEGRA186_SID_NVDEC ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x3c8 ,
. security = 0x3cc ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_APER ,
2017-12-13 14:58:21 +03:00
. name = " aper " ,
. sid = TEGRA186_SID_APE ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x3d0 ,
. security = 0x3d4 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_APEW ,
2017-12-13 14:58:21 +03:00
. name = " apew " ,
. sid = TEGRA186_SID_APE ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x3d8 ,
. security = 0x3dc ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_NVJPGSRD ,
2017-12-13 14:58:21 +03:00
. name = " nvjpgsrd " ,
. sid = TEGRA186_SID_NVJPG ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x3f0 ,
. security = 0x3f4 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_NVJPGSWR ,
2017-12-13 14:58:21 +03:00
. name = " nvjpgswr " ,
. sid = TEGRA186_SID_NVJPG ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x3f8 ,
. security = 0x3fc ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_SESRD ,
2017-12-13 14:58:21 +03:00
. name = " sesrd " ,
. sid = TEGRA186_SID_SE ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x400 ,
. security = 0x404 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_SESWR ,
2017-12-13 14:58:21 +03:00
. name = " seswr " ,
. sid = TEGRA186_SID_SE ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x408 ,
. security = 0x40c ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_ETRR ,
2017-12-13 14:58:21 +03:00
. name = " etrr " ,
. sid = TEGRA186_SID_ETR ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x420 ,
. security = 0x424 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_ETRW ,
2017-12-13 14:58:21 +03:00
. name = " etrw " ,
. sid = TEGRA186_SID_ETR ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x428 ,
. security = 0x42c ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_TSECSRDB ,
2017-12-13 14:58:21 +03:00
. name = " tsecsrdb " ,
. sid = TEGRA186_SID_TSECB ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x430 ,
. security = 0x434 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_TSECSWRB ,
2017-12-13 14:58:21 +03:00
. name = " tsecswrb " ,
. sid = TEGRA186_SID_TSECB ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x438 ,
. security = 0x43c ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_GPUSRD2 ,
2017-12-13 14:58:21 +03:00
. name = " gpusrd2 " ,
. sid = TEGRA186_SID_GPU ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x440 ,
. security = 0x444 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_GPUSWR2 ,
2017-12-13 14:58:21 +03:00
. name = " gpuswr2 " ,
. sid = TEGRA186_SID_GPU ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x448 ,
. security = 0x44c ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_AXISR ,
2017-12-13 14:58:21 +03:00
. name = " axisr " ,
. sid = TEGRA186_SID_GPCDMA_0 ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x460 ,
. security = 0x464 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_AXISW ,
2017-12-13 14:58:21 +03:00
. name = " axisw " ,
. sid = TEGRA186_SID_GPCDMA_0 ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x468 ,
. security = 0x46c ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_EQOSR ,
2017-12-13 14:58:21 +03:00
. name = " eqosr " ,
. sid = TEGRA186_SID_EQOS ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x470 ,
. security = 0x474 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_EQOSW ,
2017-12-13 14:58:21 +03:00
. name = " eqosw " ,
. sid = TEGRA186_SID_EQOS ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x478 ,
. security = 0x47c ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_UFSHCR ,
2017-12-13 14:58:21 +03:00
. name = " ufshcr " ,
. sid = TEGRA186_SID_UFSHC ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x480 ,
. security = 0x484 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_UFSHCW ,
2017-12-13 14:58:21 +03:00
. name = " ufshcw " ,
. sid = TEGRA186_SID_UFSHC ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x488 ,
. security = 0x48c ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_NVDISPLAYR ,
2017-12-13 14:58:21 +03:00
. name = " nvdisplayr " ,
. sid = TEGRA186_SID_NVDISPLAY ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x490 ,
. security = 0x494 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_BPMPR ,
2017-12-13 14:58:21 +03:00
. name = " bpmpr " ,
. sid = TEGRA186_SID_BPMP ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x498 ,
. security = 0x49c ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_BPMPW ,
2017-12-13 14:58:21 +03:00
. name = " bpmpw " ,
. sid = TEGRA186_SID_BPMP ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x4a0 ,
. security = 0x4a4 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_BPMPDMAR ,
2017-12-13 14:58:21 +03:00
. name = " bpmpdmar " ,
. sid = TEGRA186_SID_BPMP ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x4a8 ,
. security = 0x4ac ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_BPMPDMAW ,
2017-12-13 14:58:21 +03:00
. name = " bpmpdmaw " ,
. sid = TEGRA186_SID_BPMP ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x4b0 ,
. security = 0x4b4 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_AONR ,
2017-12-13 14:58:21 +03:00
. name = " aonr " ,
. sid = TEGRA186_SID_AON ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x4b8 ,
. security = 0x4bc ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_AONW ,
2017-12-13 14:58:21 +03:00
. name = " aonw " ,
. sid = TEGRA186_SID_AON ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x4c0 ,
. security = 0x4c4 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_AONDMAR ,
2017-12-13 14:58:21 +03:00
. name = " aondmar " ,
. sid = TEGRA186_SID_AON ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x4c8 ,
. security = 0x4cc ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_AONDMAW ,
2017-12-13 14:58:21 +03:00
. name = " aondmaw " ,
. sid = TEGRA186_SID_AON ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x4d0 ,
. security = 0x4d4 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_SCER ,
2017-12-13 14:58:21 +03:00
. name = " scer " ,
. sid = TEGRA186_SID_SCE ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x4d8 ,
. security = 0x4dc ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_SCEW ,
2017-12-13 14:58:21 +03:00
. name = " scew " ,
. sid = TEGRA186_SID_SCE ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x4e0 ,
. security = 0x4e4 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_SCEDMAR ,
2017-12-13 14:58:21 +03:00
. name = " scedmar " ,
. sid = TEGRA186_SID_SCE ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x4e8 ,
. security = 0x4ec ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_SCEDMAW ,
2017-12-13 14:58:21 +03:00
. name = " scedmaw " ,
. sid = TEGRA186_SID_SCE ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x4f0 ,
. security = 0x4f4 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_APEDMAR ,
2017-12-13 14:58:21 +03:00
. name = " apedmar " ,
. sid = TEGRA186_SID_APE ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x4f8 ,
. security = 0x4fc ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_APEDMAW ,
2017-12-13 14:58:21 +03:00
. name = " apedmaw " ,
. sid = TEGRA186_SID_APE ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x500 ,
. security = 0x504 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_NVDISPLAYR1 ,
2017-12-13 14:58:21 +03:00
. name = " nvdisplayr1 " ,
. sid = TEGRA186_SID_NVDISPLAY ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x508 ,
. security = 0x50c ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_VICSRD1 ,
2017-12-13 14:58:21 +03:00
. name = " vicsrd1 " ,
. sid = TEGRA186_SID_VIC ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x510 ,
. security = 0x514 ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} , {
2021-06-02 19:33:01 +03:00
. id = TEGRA186_MEMORY_CLIENT_NVDECSRD1 ,
2017-12-13 14:58:21 +03:00
. name = " nvdecsrd1 " ,
. sid = TEGRA186_SID_NVDEC ,
. regs = {
2021-06-02 19:32:52 +03:00
. sid = {
. override = 0x518 ,
. security = 0x51c ,
} ,
2017-12-13 14:58:21 +03:00
} ,
} ,
} ;
2021-06-02 19:33:00 +03:00
const struct tegra_mc_soc tegra186_mc_soc = {
2019-12-22 17:10:27 +03:00
. num_clients = ARRAY_SIZE ( tegra186_mc_clients ) ,
. clients = tegra186_mc_clients ,
2021-06-02 19:33:00 +03:00
. num_address_bits = 40 ,
2021-06-02 19:32:54 +03:00
. ops = & tegra186_mc_ops ,
2019-12-22 17:10:27 +03:00
} ;
2019-12-22 17:10:31 +03:00
# endif