18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Hardware modules present on the DRA7xx chips 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (C) 2013 Texas Instruments Incorporated - https://www.ti.com 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * Paul Walmsley 88c2ecf20Sopenharmony_ci * Benoit Cousson 98c2ecf20Sopenharmony_ci * 108c2ecf20Sopenharmony_ci * This file is automatically generated from the OMAP hardware databases. 118c2ecf20Sopenharmony_ci * We respectfully ask that any modifications to this file be coordinated 128c2ecf20Sopenharmony_ci * with the public linux-omap@vger.kernel.org mailing list and the 138c2ecf20Sopenharmony_ci * authors above to ensure that the autogeneration scripts are kept 148c2ecf20Sopenharmony_ci * up-to-date with the file contents. 158c2ecf20Sopenharmony_ci */ 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#include <linux/io.h> 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci#include "omap_hwmod.h" 208c2ecf20Sopenharmony_ci#include "omap_hwmod_common_data.h" 218c2ecf20Sopenharmony_ci#include "cm1_7xx.h" 228c2ecf20Sopenharmony_ci#include "cm2_7xx.h" 238c2ecf20Sopenharmony_ci#include "prm7xx.h" 248c2ecf20Sopenharmony_ci#include "soc.h" 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci/* Base offset for all DRA7XX interrupts external to MPUSS */ 278c2ecf20Sopenharmony_ci#define DRA7XX_IRQ_GIC_START 32 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci/* 308c2ecf20Sopenharmony_ci * IP blocks 318c2ecf20Sopenharmony_ci */ 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci/* 348c2ecf20Sopenharmony_ci * 'dmm' class 358c2ecf20Sopenharmony_ci * instance(s): dmm 368c2ecf20Sopenharmony_ci */ 378c2ecf20Sopenharmony_cistatic struct omap_hwmod_class dra7xx_dmm_hwmod_class = { 388c2ecf20Sopenharmony_ci .name = "dmm", 398c2ecf20Sopenharmony_ci}; 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci/* dmm */ 428c2ecf20Sopenharmony_cistatic struct omap_hwmod dra7xx_dmm_hwmod = { 438c2ecf20Sopenharmony_ci .name = "dmm", 448c2ecf20Sopenharmony_ci .class = &dra7xx_dmm_hwmod_class, 458c2ecf20Sopenharmony_ci .clkdm_name = "emif_clkdm", 468c2ecf20Sopenharmony_ci .prcm = { 478c2ecf20Sopenharmony_ci .omap4 = { 488c2ecf20Sopenharmony_ci .clkctrl_offs = DRA7XX_CM_EMIF_DMM_CLKCTRL_OFFSET, 498c2ecf20Sopenharmony_ci .context_offs = DRA7XX_RM_EMIF_DMM_CONTEXT_OFFSET, 508c2ecf20Sopenharmony_ci }, 518c2ecf20Sopenharmony_ci }, 528c2ecf20Sopenharmony_ci}; 538c2ecf20Sopenharmony_ci 548c2ecf20Sopenharmony_ci/* 558c2ecf20Sopenharmony_ci * 'l3' class 568c2ecf20Sopenharmony_ci * instance(s): l3_instr, l3_main_1, l3_main_2 578c2ecf20Sopenharmony_ci */ 588c2ecf20Sopenharmony_cistatic struct omap_hwmod_class dra7xx_l3_hwmod_class = { 598c2ecf20Sopenharmony_ci .name = "l3", 608c2ecf20Sopenharmony_ci}; 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_ci/* l3_instr */ 638c2ecf20Sopenharmony_cistatic struct omap_hwmod dra7xx_l3_instr_hwmod = { 648c2ecf20Sopenharmony_ci .name = "l3_instr", 658c2ecf20Sopenharmony_ci .class = &dra7xx_l3_hwmod_class, 668c2ecf20Sopenharmony_ci .clkdm_name = "l3instr_clkdm", 678c2ecf20Sopenharmony_ci .prcm = { 688c2ecf20Sopenharmony_ci .omap4 = { 698c2ecf20Sopenharmony_ci .clkctrl_offs = DRA7XX_CM_L3INSTR_L3_INSTR_CLKCTRL_OFFSET, 708c2ecf20Sopenharmony_ci .context_offs = DRA7XX_RM_L3INSTR_L3_INSTR_CONTEXT_OFFSET, 718c2ecf20Sopenharmony_ci .modulemode = MODULEMODE_HWCTRL, 728c2ecf20Sopenharmony_ci }, 738c2ecf20Sopenharmony_ci }, 748c2ecf20Sopenharmony_ci}; 758c2ecf20Sopenharmony_ci 768c2ecf20Sopenharmony_ci/* l3_main_1 */ 778c2ecf20Sopenharmony_cistatic struct omap_hwmod dra7xx_l3_main_1_hwmod = { 788c2ecf20Sopenharmony_ci .name = "l3_main_1", 798c2ecf20Sopenharmony_ci .class = &dra7xx_l3_hwmod_class, 808c2ecf20Sopenharmony_ci .clkdm_name = "l3main1_clkdm", 818c2ecf20Sopenharmony_ci .prcm = { 828c2ecf20Sopenharmony_ci .omap4 = { 838c2ecf20Sopenharmony_ci .clkctrl_offs = DRA7XX_CM_L3MAIN1_L3_MAIN_1_CLKCTRL_OFFSET, 848c2ecf20Sopenharmony_ci .context_offs = DRA7XX_RM_L3MAIN1_L3_MAIN_1_CONTEXT_OFFSET, 858c2ecf20Sopenharmony_ci }, 868c2ecf20Sopenharmony_ci }, 878c2ecf20Sopenharmony_ci}; 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_ci/* l3_main_2 */ 908c2ecf20Sopenharmony_cistatic struct omap_hwmod dra7xx_l3_main_2_hwmod = { 918c2ecf20Sopenharmony_ci .name = "l3_main_2", 928c2ecf20Sopenharmony_ci .class = &dra7xx_l3_hwmod_class, 938c2ecf20Sopenharmony_ci .clkdm_name = "l3instr_clkdm", 948c2ecf20Sopenharmony_ci .prcm = { 958c2ecf20Sopenharmony_ci .omap4 = { 968c2ecf20Sopenharmony_ci .clkctrl_offs = DRA7XX_CM_L3INSTR_L3_MAIN_2_CLKCTRL_OFFSET, 978c2ecf20Sopenharmony_ci .context_offs = DRA7XX_RM_L3INSTR_L3_MAIN_2_CONTEXT_OFFSET, 988c2ecf20Sopenharmony_ci .modulemode = MODULEMODE_HWCTRL, 998c2ecf20Sopenharmony_ci }, 1008c2ecf20Sopenharmony_ci }, 1018c2ecf20Sopenharmony_ci}; 1028c2ecf20Sopenharmony_ci 1038c2ecf20Sopenharmony_ci/* 1048c2ecf20Sopenharmony_ci * 'l4' class 1058c2ecf20Sopenharmony_ci * instance(s): l4_cfg, l4_per1, l4_per2, l4_per3, l4_wkup 1068c2ecf20Sopenharmony_ci */ 1078c2ecf20Sopenharmony_cistatic struct omap_hwmod_class dra7xx_l4_hwmod_class = { 1088c2ecf20Sopenharmony_ci .name = "l4", 1098c2ecf20Sopenharmony_ci}; 1108c2ecf20Sopenharmony_ci 1118c2ecf20Sopenharmony_ci/* l4_cfg */ 1128c2ecf20Sopenharmony_cistatic struct omap_hwmod dra7xx_l4_cfg_hwmod = { 1138c2ecf20Sopenharmony_ci .name = "l4_cfg", 1148c2ecf20Sopenharmony_ci .class = &dra7xx_l4_hwmod_class, 1158c2ecf20Sopenharmony_ci .clkdm_name = "l4cfg_clkdm", 1168c2ecf20Sopenharmony_ci .prcm = { 1178c2ecf20Sopenharmony_ci .omap4 = { 1188c2ecf20Sopenharmony_ci .clkctrl_offs = DRA7XX_CM_L4CFG_L4_CFG_CLKCTRL_OFFSET, 1198c2ecf20Sopenharmony_ci .context_offs = DRA7XX_RM_L4CFG_L4_CFG_CONTEXT_OFFSET, 1208c2ecf20Sopenharmony_ci }, 1218c2ecf20Sopenharmony_ci }, 1228c2ecf20Sopenharmony_ci}; 1238c2ecf20Sopenharmony_ci 1248c2ecf20Sopenharmony_ci/* l4_per1 */ 1258c2ecf20Sopenharmony_cistatic struct omap_hwmod dra7xx_l4_per1_hwmod = { 1268c2ecf20Sopenharmony_ci .name = "l4_per1", 1278c2ecf20Sopenharmony_ci .class = &dra7xx_l4_hwmod_class, 1288c2ecf20Sopenharmony_ci .clkdm_name = "l4per_clkdm", 1298c2ecf20Sopenharmony_ci .prcm = { 1308c2ecf20Sopenharmony_ci .omap4 = { 1318c2ecf20Sopenharmony_ci .clkctrl_offs = DRA7XX_CM_L4PER_L4_PER1_CLKCTRL_OFFSET, 1328c2ecf20Sopenharmony_ci .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, 1338c2ecf20Sopenharmony_ci }, 1348c2ecf20Sopenharmony_ci }, 1358c2ecf20Sopenharmony_ci}; 1368c2ecf20Sopenharmony_ci 1378c2ecf20Sopenharmony_ci/* l4_per2 */ 1388c2ecf20Sopenharmony_cistatic struct omap_hwmod dra7xx_l4_per2_hwmod = { 1398c2ecf20Sopenharmony_ci .name = "l4_per2", 1408c2ecf20Sopenharmony_ci .class = &dra7xx_l4_hwmod_class, 1418c2ecf20Sopenharmony_ci .clkdm_name = "l4per2_clkdm", 1428c2ecf20Sopenharmony_ci .prcm = { 1438c2ecf20Sopenharmony_ci .omap4 = { 1448c2ecf20Sopenharmony_ci .clkctrl_offs = DRA7XX_CM_L4PER2_L4_PER2_CLKCTRL_OFFSET, 1458c2ecf20Sopenharmony_ci .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, 1468c2ecf20Sopenharmony_ci }, 1478c2ecf20Sopenharmony_ci }, 1488c2ecf20Sopenharmony_ci}; 1498c2ecf20Sopenharmony_ci 1508c2ecf20Sopenharmony_ci/* l4_per3 */ 1518c2ecf20Sopenharmony_cistatic struct omap_hwmod dra7xx_l4_per3_hwmod = { 1528c2ecf20Sopenharmony_ci .name = "l4_per3", 1538c2ecf20Sopenharmony_ci .class = &dra7xx_l4_hwmod_class, 1548c2ecf20Sopenharmony_ci .clkdm_name = "l4per3_clkdm", 1558c2ecf20Sopenharmony_ci .prcm = { 1568c2ecf20Sopenharmony_ci .omap4 = { 1578c2ecf20Sopenharmony_ci .clkctrl_offs = DRA7XX_CM_L4PER3_L4_PER3_CLKCTRL_OFFSET, 1588c2ecf20Sopenharmony_ci .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, 1598c2ecf20Sopenharmony_ci }, 1608c2ecf20Sopenharmony_ci }, 1618c2ecf20Sopenharmony_ci}; 1628c2ecf20Sopenharmony_ci 1638c2ecf20Sopenharmony_ci/* l4_wkup */ 1648c2ecf20Sopenharmony_cistatic struct omap_hwmod dra7xx_l4_wkup_hwmod = { 1658c2ecf20Sopenharmony_ci .name = "l4_wkup", 1668c2ecf20Sopenharmony_ci .class = &dra7xx_l4_hwmod_class, 1678c2ecf20Sopenharmony_ci .clkdm_name = "wkupaon_clkdm", 1688c2ecf20Sopenharmony_ci .prcm = { 1698c2ecf20Sopenharmony_ci .omap4 = { 1708c2ecf20Sopenharmony_ci .clkctrl_offs = DRA7XX_CM_WKUPAON_L4_WKUP_CLKCTRL_OFFSET, 1718c2ecf20Sopenharmony_ci .context_offs = DRA7XX_RM_WKUPAON_L4_WKUP_CONTEXT_OFFSET, 1728c2ecf20Sopenharmony_ci }, 1738c2ecf20Sopenharmony_ci }, 1748c2ecf20Sopenharmony_ci}; 1758c2ecf20Sopenharmony_ci 1768c2ecf20Sopenharmony_ci/* 1778c2ecf20Sopenharmony_ci * 'atl' class 1788c2ecf20Sopenharmony_ci * 1798c2ecf20Sopenharmony_ci */ 1808c2ecf20Sopenharmony_ci 1818c2ecf20Sopenharmony_cistatic struct omap_hwmod_class dra7xx_atl_hwmod_class = { 1828c2ecf20Sopenharmony_ci .name = "atl", 1838c2ecf20Sopenharmony_ci}; 1848c2ecf20Sopenharmony_ci 1858c2ecf20Sopenharmony_ci/* atl */ 1868c2ecf20Sopenharmony_cistatic struct omap_hwmod dra7xx_atl_hwmod = { 1878c2ecf20Sopenharmony_ci .name = "atl", 1888c2ecf20Sopenharmony_ci .class = &dra7xx_atl_hwmod_class, 1898c2ecf20Sopenharmony_ci .clkdm_name = "atl_clkdm", 1908c2ecf20Sopenharmony_ci .main_clk = "atl_gfclk_mux", 1918c2ecf20Sopenharmony_ci .prcm = { 1928c2ecf20Sopenharmony_ci .omap4 = { 1938c2ecf20Sopenharmony_ci .clkctrl_offs = DRA7XX_CM_ATL_ATL_CLKCTRL_OFFSET, 1948c2ecf20Sopenharmony_ci .context_offs = DRA7XX_RM_ATL_ATL_CONTEXT_OFFSET, 1958c2ecf20Sopenharmony_ci .modulemode = MODULEMODE_SWCTRL, 1968c2ecf20Sopenharmony_ci }, 1978c2ecf20Sopenharmony_ci }, 1988c2ecf20Sopenharmony_ci}; 1998c2ecf20Sopenharmony_ci 2008c2ecf20Sopenharmony_ci/* 2018c2ecf20Sopenharmony_ci * 'bb2d' class 2028c2ecf20Sopenharmony_ci * 2038c2ecf20Sopenharmony_ci */ 2048c2ecf20Sopenharmony_ci 2058c2ecf20Sopenharmony_cistatic struct omap_hwmod_class dra7xx_bb2d_hwmod_class = { 2068c2ecf20Sopenharmony_ci .name = "bb2d", 2078c2ecf20Sopenharmony_ci}; 2088c2ecf20Sopenharmony_ci 2098c2ecf20Sopenharmony_ci/* bb2d */ 2108c2ecf20Sopenharmony_cistatic struct omap_hwmod dra7xx_bb2d_hwmod = { 2118c2ecf20Sopenharmony_ci .name = "bb2d", 2128c2ecf20Sopenharmony_ci .class = &dra7xx_bb2d_hwmod_class, 2138c2ecf20Sopenharmony_ci .clkdm_name = "dss_clkdm", 2148c2ecf20Sopenharmony_ci .main_clk = "dpll_core_h24x2_ck", 2158c2ecf20Sopenharmony_ci .prcm = { 2168c2ecf20Sopenharmony_ci .omap4 = { 2178c2ecf20Sopenharmony_ci .clkctrl_offs = DRA7XX_CM_DSS_BB2D_CLKCTRL_OFFSET, 2188c2ecf20Sopenharmony_ci .context_offs = DRA7XX_RM_DSS_BB2D_CONTEXT_OFFSET, 2198c2ecf20Sopenharmony_ci .modulemode = MODULEMODE_SWCTRL, 2208c2ecf20Sopenharmony_ci }, 2218c2ecf20Sopenharmony_ci }, 2228c2ecf20Sopenharmony_ci}; 2238c2ecf20Sopenharmony_ci 2248c2ecf20Sopenharmony_ci/* 2258c2ecf20Sopenharmony_ci * 'ctrl_module' class 2268c2ecf20Sopenharmony_ci * 2278c2ecf20Sopenharmony_ci */ 2288c2ecf20Sopenharmony_ci 2298c2ecf20Sopenharmony_cistatic struct omap_hwmod_class dra7xx_ctrl_module_hwmod_class = { 2308c2ecf20Sopenharmony_ci .name = "ctrl_module", 2318c2ecf20Sopenharmony_ci}; 2328c2ecf20Sopenharmony_ci 2338c2ecf20Sopenharmony_ci/* ctrl_module_wkup */ 2348c2ecf20Sopenharmony_cistatic struct omap_hwmod dra7xx_ctrl_module_wkup_hwmod = { 2358c2ecf20Sopenharmony_ci .name = "ctrl_module_wkup", 2368c2ecf20Sopenharmony_ci .class = &dra7xx_ctrl_module_hwmod_class, 2378c2ecf20Sopenharmony_ci .clkdm_name = "wkupaon_clkdm", 2388c2ecf20Sopenharmony_ci .prcm = { 2398c2ecf20Sopenharmony_ci .omap4 = { 2408c2ecf20Sopenharmony_ci .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT, 2418c2ecf20Sopenharmony_ci }, 2428c2ecf20Sopenharmony_ci }, 2438c2ecf20Sopenharmony_ci}; 2448c2ecf20Sopenharmony_ci 2458c2ecf20Sopenharmony_ci/* 2468c2ecf20Sopenharmony_ci * 'gpmc' class 2478c2ecf20Sopenharmony_ci * 2488c2ecf20Sopenharmony_ci */ 2498c2ecf20Sopenharmony_ci 2508c2ecf20Sopenharmony_cistatic struct omap_hwmod_class_sysconfig dra7xx_gpmc_sysc = { 2518c2ecf20Sopenharmony_ci .rev_offs = 0x0000, 2528c2ecf20Sopenharmony_ci .sysc_offs = 0x0010, 2538c2ecf20Sopenharmony_ci .syss_offs = 0x0014, 2548c2ecf20Sopenharmony_ci .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE | 2558c2ecf20Sopenharmony_ci SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), 2568c2ecf20Sopenharmony_ci .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), 2578c2ecf20Sopenharmony_ci .sysc_fields = &omap_hwmod_sysc_type1, 2588c2ecf20Sopenharmony_ci}; 2598c2ecf20Sopenharmony_ci 2608c2ecf20Sopenharmony_cistatic struct omap_hwmod_class dra7xx_gpmc_hwmod_class = { 2618c2ecf20Sopenharmony_ci .name = "gpmc", 2628c2ecf20Sopenharmony_ci .sysc = &dra7xx_gpmc_sysc, 2638c2ecf20Sopenharmony_ci}; 2648c2ecf20Sopenharmony_ci 2658c2ecf20Sopenharmony_ci/* gpmc */ 2668c2ecf20Sopenharmony_ci 2678c2ecf20Sopenharmony_cistatic struct omap_hwmod dra7xx_gpmc_hwmod = { 2688c2ecf20Sopenharmony_ci .name = "gpmc", 2698c2ecf20Sopenharmony_ci .class = &dra7xx_gpmc_hwmod_class, 2708c2ecf20Sopenharmony_ci .clkdm_name = "l3main1_clkdm", 2718c2ecf20Sopenharmony_ci /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */ 2728c2ecf20Sopenharmony_ci .flags = DEBUG_OMAP_GPMC_HWMOD_FLAGS, 2738c2ecf20Sopenharmony_ci .main_clk = "l3_iclk_div", 2748c2ecf20Sopenharmony_ci .prcm = { 2758c2ecf20Sopenharmony_ci .omap4 = { 2768c2ecf20Sopenharmony_ci .clkctrl_offs = DRA7XX_CM_L3MAIN1_GPMC_CLKCTRL_OFFSET, 2778c2ecf20Sopenharmony_ci .context_offs = DRA7XX_RM_L3MAIN1_GPMC_CONTEXT_OFFSET, 2788c2ecf20Sopenharmony_ci .modulemode = MODULEMODE_HWCTRL, 2798c2ecf20Sopenharmony_ci }, 2808c2ecf20Sopenharmony_ci }, 2818c2ecf20Sopenharmony_ci}; 2828c2ecf20Sopenharmony_ci 2838c2ecf20Sopenharmony_ci 2848c2ecf20Sopenharmony_ci 2858c2ecf20Sopenharmony_ci/* 2868c2ecf20Sopenharmony_ci * 'mpu' class 2878c2ecf20Sopenharmony_ci * 2888c2ecf20Sopenharmony_ci */ 2898c2ecf20Sopenharmony_ci 2908c2ecf20Sopenharmony_cistatic struct omap_hwmod_class dra7xx_mpu_hwmod_class = { 2918c2ecf20Sopenharmony_ci .name = "mpu", 2928c2ecf20Sopenharmony_ci}; 2938c2ecf20Sopenharmony_ci 2948c2ecf20Sopenharmony_ci/* mpu */ 2958c2ecf20Sopenharmony_cistatic struct omap_hwmod dra7xx_mpu_hwmod = { 2968c2ecf20Sopenharmony_ci .name = "mpu", 2978c2ecf20Sopenharmony_ci .class = &dra7xx_mpu_hwmod_class, 2988c2ecf20Sopenharmony_ci .clkdm_name = "mpu_clkdm", 2998c2ecf20Sopenharmony_ci .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET, 3008c2ecf20Sopenharmony_ci .main_clk = "dpll_mpu_m2_ck", 3018c2ecf20Sopenharmony_ci .prcm = { 3028c2ecf20Sopenharmony_ci .omap4 = { 3038c2ecf20Sopenharmony_ci .clkctrl_offs = DRA7XX_CM_MPU_MPU_CLKCTRL_OFFSET, 3048c2ecf20Sopenharmony_ci .context_offs = DRA7XX_RM_MPU_MPU_CONTEXT_OFFSET, 3058c2ecf20Sopenharmony_ci }, 3068c2ecf20Sopenharmony_ci }, 3078c2ecf20Sopenharmony_ci}; 3088c2ecf20Sopenharmony_ci 3098c2ecf20Sopenharmony_ci 3108c2ecf20Sopenharmony_ci/* 3118c2ecf20Sopenharmony_ci * 'PCIE' class 3128c2ecf20Sopenharmony_ci * 3138c2ecf20Sopenharmony_ci */ 3148c2ecf20Sopenharmony_ci 3158c2ecf20Sopenharmony_ci/* 3168c2ecf20Sopenharmony_ci * As noted in documentation for _reset() in omap_hwmod.c, the stock reset 3178c2ecf20Sopenharmony_ci * functionality of OMAP HWMOD layer does not deassert the hardreset lines 3188c2ecf20Sopenharmony_ci * associated with an IP automatically leaving the driver to handle that 3198c2ecf20Sopenharmony_ci * by itself. This does not work for PCIeSS which needs the reset lines 3208c2ecf20Sopenharmony_ci * deasserted for the driver to start accessing registers. 3218c2ecf20Sopenharmony_ci * 3228c2ecf20Sopenharmony_ci * We use a PCIeSS HWMOD class specific reset handler to deassert the hardreset 3238c2ecf20Sopenharmony_ci * lines after asserting them. 3248c2ecf20Sopenharmony_ci */ 3258c2ecf20Sopenharmony_ciint dra7xx_pciess_reset(struct omap_hwmod *oh) 3268c2ecf20Sopenharmony_ci{ 3278c2ecf20Sopenharmony_ci int i; 3288c2ecf20Sopenharmony_ci 3298c2ecf20Sopenharmony_ci for (i = 0; i < oh->rst_lines_cnt; i++) { 3308c2ecf20Sopenharmony_ci omap_hwmod_assert_hardreset(oh, oh->rst_lines[i].name); 3318c2ecf20Sopenharmony_ci omap_hwmod_deassert_hardreset(oh, oh->rst_lines[i].name); 3328c2ecf20Sopenharmony_ci } 3338c2ecf20Sopenharmony_ci 3348c2ecf20Sopenharmony_ci return 0; 3358c2ecf20Sopenharmony_ci} 3368c2ecf20Sopenharmony_ci 3378c2ecf20Sopenharmony_cistatic struct omap_hwmod_class dra7xx_pciess_hwmod_class = { 3388c2ecf20Sopenharmony_ci .name = "pcie", 3398c2ecf20Sopenharmony_ci .reset = dra7xx_pciess_reset, 3408c2ecf20Sopenharmony_ci}; 3418c2ecf20Sopenharmony_ci 3428c2ecf20Sopenharmony_ci/* pcie1 */ 3438c2ecf20Sopenharmony_cistatic struct omap_hwmod_rst_info dra7xx_pciess1_resets[] = { 3448c2ecf20Sopenharmony_ci { .name = "pcie", .rst_shift = 0 }, 3458c2ecf20Sopenharmony_ci}; 3468c2ecf20Sopenharmony_ci 3478c2ecf20Sopenharmony_cistatic struct omap_hwmod dra7xx_pciess1_hwmod = { 3488c2ecf20Sopenharmony_ci .name = "pcie1", 3498c2ecf20Sopenharmony_ci .class = &dra7xx_pciess_hwmod_class, 3508c2ecf20Sopenharmony_ci .clkdm_name = "pcie_clkdm", 3518c2ecf20Sopenharmony_ci .rst_lines = dra7xx_pciess1_resets, 3528c2ecf20Sopenharmony_ci .rst_lines_cnt = ARRAY_SIZE(dra7xx_pciess1_resets), 3538c2ecf20Sopenharmony_ci .main_clk = "l4_root_clk_div", 3548c2ecf20Sopenharmony_ci .prcm = { 3558c2ecf20Sopenharmony_ci .omap4 = { 3568c2ecf20Sopenharmony_ci .clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS1_CLKCTRL_OFFSET, 3578c2ecf20Sopenharmony_ci .rstctrl_offs = DRA7XX_RM_L3INIT_PCIESS_RSTCTRL_OFFSET, 3588c2ecf20Sopenharmony_ci .context_offs = DRA7XX_RM_L3INIT_PCIESS1_CONTEXT_OFFSET, 3598c2ecf20Sopenharmony_ci .modulemode = MODULEMODE_SWCTRL, 3608c2ecf20Sopenharmony_ci }, 3618c2ecf20Sopenharmony_ci }, 3628c2ecf20Sopenharmony_ci}; 3638c2ecf20Sopenharmony_ci 3648c2ecf20Sopenharmony_ci/* pcie2 */ 3658c2ecf20Sopenharmony_cistatic struct omap_hwmod_rst_info dra7xx_pciess2_resets[] = { 3668c2ecf20Sopenharmony_ci { .name = "pcie", .rst_shift = 1 }, 3678c2ecf20Sopenharmony_ci}; 3688c2ecf20Sopenharmony_ci 3698c2ecf20Sopenharmony_ci/* pcie2 */ 3708c2ecf20Sopenharmony_cistatic struct omap_hwmod dra7xx_pciess2_hwmod = { 3718c2ecf20Sopenharmony_ci .name = "pcie2", 3728c2ecf20Sopenharmony_ci .class = &dra7xx_pciess_hwmod_class, 3738c2ecf20Sopenharmony_ci .clkdm_name = "pcie_clkdm", 3748c2ecf20Sopenharmony_ci .rst_lines = dra7xx_pciess2_resets, 3758c2ecf20Sopenharmony_ci .rst_lines_cnt = ARRAY_SIZE(dra7xx_pciess2_resets), 3768c2ecf20Sopenharmony_ci .main_clk = "l4_root_clk_div", 3778c2ecf20Sopenharmony_ci .prcm = { 3788c2ecf20Sopenharmony_ci .omap4 = { 3798c2ecf20Sopenharmony_ci .clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS2_CLKCTRL_OFFSET, 3808c2ecf20Sopenharmony_ci .rstctrl_offs = DRA7XX_RM_L3INIT_PCIESS_RSTCTRL_OFFSET, 3818c2ecf20Sopenharmony_ci .context_offs = DRA7XX_RM_L3INIT_PCIESS2_CONTEXT_OFFSET, 3828c2ecf20Sopenharmony_ci .modulemode = MODULEMODE_SWCTRL, 3838c2ecf20Sopenharmony_ci }, 3848c2ecf20Sopenharmony_ci }, 3858c2ecf20Sopenharmony_ci}; 3868c2ecf20Sopenharmony_ci 3878c2ecf20Sopenharmony_ci/* 3888c2ecf20Sopenharmony_ci * 'qspi' class 3898c2ecf20Sopenharmony_ci * 3908c2ecf20Sopenharmony_ci */ 3918c2ecf20Sopenharmony_ci 3928c2ecf20Sopenharmony_cistatic struct omap_hwmod_class_sysconfig dra7xx_qspi_sysc = { 3938c2ecf20Sopenharmony_ci .rev_offs = 0, 3948c2ecf20Sopenharmony_ci .sysc_offs = 0x0010, 3958c2ecf20Sopenharmony_ci .sysc_flags = SYSC_HAS_SIDLEMODE, 3968c2ecf20Sopenharmony_ci .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | 3978c2ecf20Sopenharmony_ci SIDLE_SMART_WKUP), 3988c2ecf20Sopenharmony_ci .sysc_fields = &omap_hwmod_sysc_type2, 3998c2ecf20Sopenharmony_ci}; 4008c2ecf20Sopenharmony_ci 4018c2ecf20Sopenharmony_cistatic struct omap_hwmod_class dra7xx_qspi_hwmod_class = { 4028c2ecf20Sopenharmony_ci .name = "qspi", 4038c2ecf20Sopenharmony_ci .sysc = &dra7xx_qspi_sysc, 4048c2ecf20Sopenharmony_ci}; 4058c2ecf20Sopenharmony_ci 4068c2ecf20Sopenharmony_ci/* qspi */ 4078c2ecf20Sopenharmony_cistatic struct omap_hwmod dra7xx_qspi_hwmod = { 4088c2ecf20Sopenharmony_ci .name = "qspi", 4098c2ecf20Sopenharmony_ci .class = &dra7xx_qspi_hwmod_class, 4108c2ecf20Sopenharmony_ci .clkdm_name = "l4per2_clkdm", 4118c2ecf20Sopenharmony_ci .main_clk = "qspi_gfclk_div", 4128c2ecf20Sopenharmony_ci .prcm = { 4138c2ecf20Sopenharmony_ci .omap4 = { 4148c2ecf20Sopenharmony_ci .clkctrl_offs = DRA7XX_CM_L4PER2_QSPI_CLKCTRL_OFFSET, 4158c2ecf20Sopenharmony_ci .context_offs = DRA7XX_RM_L4PER2_QSPI_CONTEXT_OFFSET, 4168c2ecf20Sopenharmony_ci .modulemode = MODULEMODE_SWCTRL, 4178c2ecf20Sopenharmony_ci }, 4188c2ecf20Sopenharmony_ci }, 4198c2ecf20Sopenharmony_ci}; 4208c2ecf20Sopenharmony_ci 4218c2ecf20Sopenharmony_ci/* 4228c2ecf20Sopenharmony_ci * 'sata' class 4238c2ecf20Sopenharmony_ci * 4248c2ecf20Sopenharmony_ci */ 4258c2ecf20Sopenharmony_ci 4268c2ecf20Sopenharmony_cistatic struct omap_hwmod_class_sysconfig dra7xx_sata_sysc = { 4278c2ecf20Sopenharmony_ci .rev_offs = 0x00fc, 4288c2ecf20Sopenharmony_ci .sysc_offs = 0x0000, 4298c2ecf20Sopenharmony_ci .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE), 4308c2ecf20Sopenharmony_ci .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | 4318c2ecf20Sopenharmony_ci SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | 4328c2ecf20Sopenharmony_ci MSTANDBY_SMART | MSTANDBY_SMART_WKUP), 4338c2ecf20Sopenharmony_ci .sysc_fields = &omap_hwmod_sysc_type2, 4348c2ecf20Sopenharmony_ci}; 4358c2ecf20Sopenharmony_ci 4368c2ecf20Sopenharmony_cistatic struct omap_hwmod_class dra7xx_sata_hwmod_class = { 4378c2ecf20Sopenharmony_ci .name = "sata", 4388c2ecf20Sopenharmony_ci .sysc = &dra7xx_sata_sysc, 4398c2ecf20Sopenharmony_ci}; 4408c2ecf20Sopenharmony_ci 4418c2ecf20Sopenharmony_ci/* sata */ 4428c2ecf20Sopenharmony_ci 4438c2ecf20Sopenharmony_cistatic struct omap_hwmod dra7xx_sata_hwmod = { 4448c2ecf20Sopenharmony_ci .name = "sata", 4458c2ecf20Sopenharmony_ci .class = &dra7xx_sata_hwmod_class, 4468c2ecf20Sopenharmony_ci .clkdm_name = "l3init_clkdm", 4478c2ecf20Sopenharmony_ci .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY, 4488c2ecf20Sopenharmony_ci .main_clk = "func_48m_fclk", 4498c2ecf20Sopenharmony_ci .mpu_rt_idx = 1, 4508c2ecf20Sopenharmony_ci .prcm = { 4518c2ecf20Sopenharmony_ci .omap4 = { 4528c2ecf20Sopenharmony_ci .clkctrl_offs = DRA7XX_CM_L3INIT_SATA_CLKCTRL_OFFSET, 4538c2ecf20Sopenharmony_ci .context_offs = DRA7XX_RM_L3INIT_SATA_CONTEXT_OFFSET, 4548c2ecf20Sopenharmony_ci .modulemode = MODULEMODE_SWCTRL, 4558c2ecf20Sopenharmony_ci }, 4568c2ecf20Sopenharmony_ci }, 4578c2ecf20Sopenharmony_ci}; 4588c2ecf20Sopenharmony_ci 4598c2ecf20Sopenharmony_ci/* 4608c2ecf20Sopenharmony_ci * 'vcp' class 4618c2ecf20Sopenharmony_ci * 4628c2ecf20Sopenharmony_ci */ 4638c2ecf20Sopenharmony_ci 4648c2ecf20Sopenharmony_cistatic struct omap_hwmod_class dra7xx_vcp_hwmod_class = { 4658c2ecf20Sopenharmony_ci .name = "vcp", 4668c2ecf20Sopenharmony_ci}; 4678c2ecf20Sopenharmony_ci 4688c2ecf20Sopenharmony_ci/* vcp1 */ 4698c2ecf20Sopenharmony_cistatic struct omap_hwmod dra7xx_vcp1_hwmod = { 4708c2ecf20Sopenharmony_ci .name = "vcp1", 4718c2ecf20Sopenharmony_ci .class = &dra7xx_vcp_hwmod_class, 4728c2ecf20Sopenharmony_ci .clkdm_name = "l3main1_clkdm", 4738c2ecf20Sopenharmony_ci .main_clk = "l3_iclk_div", 4748c2ecf20Sopenharmony_ci .prcm = { 4758c2ecf20Sopenharmony_ci .omap4 = { 4768c2ecf20Sopenharmony_ci .clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP1_CLKCTRL_OFFSET, 4778c2ecf20Sopenharmony_ci .context_offs = DRA7XX_RM_L3MAIN1_VCP1_CONTEXT_OFFSET, 4788c2ecf20Sopenharmony_ci }, 4798c2ecf20Sopenharmony_ci }, 4808c2ecf20Sopenharmony_ci}; 4818c2ecf20Sopenharmony_ci 4828c2ecf20Sopenharmony_ci/* vcp2 */ 4838c2ecf20Sopenharmony_cistatic struct omap_hwmod dra7xx_vcp2_hwmod = { 4848c2ecf20Sopenharmony_ci .name = "vcp2", 4858c2ecf20Sopenharmony_ci .class = &dra7xx_vcp_hwmod_class, 4868c2ecf20Sopenharmony_ci .clkdm_name = "l3main1_clkdm", 4878c2ecf20Sopenharmony_ci .main_clk = "l3_iclk_div", 4888c2ecf20Sopenharmony_ci .prcm = { 4898c2ecf20Sopenharmony_ci .omap4 = { 4908c2ecf20Sopenharmony_ci .clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP2_CLKCTRL_OFFSET, 4918c2ecf20Sopenharmony_ci .context_offs = DRA7XX_RM_L3MAIN1_VCP2_CONTEXT_OFFSET, 4928c2ecf20Sopenharmony_ci }, 4938c2ecf20Sopenharmony_ci }, 4948c2ecf20Sopenharmony_ci}; 4958c2ecf20Sopenharmony_ci 4968c2ecf20Sopenharmony_ci 4978c2ecf20Sopenharmony_ci 4988c2ecf20Sopenharmony_ci/* 4998c2ecf20Sopenharmony_ci * Interfaces 5008c2ecf20Sopenharmony_ci */ 5018c2ecf20Sopenharmony_ci 5028c2ecf20Sopenharmony_ci/* l3_main_1 -> dmm */ 5038c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if dra7xx_l3_main_1__dmm = { 5048c2ecf20Sopenharmony_ci .master = &dra7xx_l3_main_1_hwmod, 5058c2ecf20Sopenharmony_ci .slave = &dra7xx_dmm_hwmod, 5068c2ecf20Sopenharmony_ci .clk = "l3_iclk_div", 5078c2ecf20Sopenharmony_ci .user = OCP_USER_SDMA, 5088c2ecf20Sopenharmony_ci}; 5098c2ecf20Sopenharmony_ci 5108c2ecf20Sopenharmony_ci/* l3_main_2 -> l3_instr */ 5118c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if dra7xx_l3_main_2__l3_instr = { 5128c2ecf20Sopenharmony_ci .master = &dra7xx_l3_main_2_hwmod, 5138c2ecf20Sopenharmony_ci .slave = &dra7xx_l3_instr_hwmod, 5148c2ecf20Sopenharmony_ci .clk = "l3_iclk_div", 5158c2ecf20Sopenharmony_ci .user = OCP_USER_MPU | OCP_USER_SDMA, 5168c2ecf20Sopenharmony_ci}; 5178c2ecf20Sopenharmony_ci 5188c2ecf20Sopenharmony_ci/* l4_cfg -> l3_main_1 */ 5198c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_1 = { 5208c2ecf20Sopenharmony_ci .master = &dra7xx_l4_cfg_hwmod, 5218c2ecf20Sopenharmony_ci .slave = &dra7xx_l3_main_1_hwmod, 5228c2ecf20Sopenharmony_ci .clk = "l3_iclk_div", 5238c2ecf20Sopenharmony_ci .user = OCP_USER_MPU | OCP_USER_SDMA, 5248c2ecf20Sopenharmony_ci}; 5258c2ecf20Sopenharmony_ci 5268c2ecf20Sopenharmony_ci/* mpu -> l3_main_1 */ 5278c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if dra7xx_mpu__l3_main_1 = { 5288c2ecf20Sopenharmony_ci .master = &dra7xx_mpu_hwmod, 5298c2ecf20Sopenharmony_ci .slave = &dra7xx_l3_main_1_hwmod, 5308c2ecf20Sopenharmony_ci .clk = "l3_iclk_div", 5318c2ecf20Sopenharmony_ci .user = OCP_USER_MPU, 5328c2ecf20Sopenharmony_ci}; 5338c2ecf20Sopenharmony_ci 5348c2ecf20Sopenharmony_ci/* l3_main_1 -> l3_main_2 */ 5358c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if dra7xx_l3_main_1__l3_main_2 = { 5368c2ecf20Sopenharmony_ci .master = &dra7xx_l3_main_1_hwmod, 5378c2ecf20Sopenharmony_ci .slave = &dra7xx_l3_main_2_hwmod, 5388c2ecf20Sopenharmony_ci .clk = "l3_iclk_div", 5398c2ecf20Sopenharmony_ci .user = OCP_USER_MPU, 5408c2ecf20Sopenharmony_ci}; 5418c2ecf20Sopenharmony_ci 5428c2ecf20Sopenharmony_ci/* l4_cfg -> l3_main_2 */ 5438c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_2 = { 5448c2ecf20Sopenharmony_ci .master = &dra7xx_l4_cfg_hwmod, 5458c2ecf20Sopenharmony_ci .slave = &dra7xx_l3_main_2_hwmod, 5468c2ecf20Sopenharmony_ci .clk = "l3_iclk_div", 5478c2ecf20Sopenharmony_ci .user = OCP_USER_MPU | OCP_USER_SDMA, 5488c2ecf20Sopenharmony_ci}; 5498c2ecf20Sopenharmony_ci 5508c2ecf20Sopenharmony_ci/* l3_main_1 -> l4_cfg */ 5518c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_cfg = { 5528c2ecf20Sopenharmony_ci .master = &dra7xx_l3_main_1_hwmod, 5538c2ecf20Sopenharmony_ci .slave = &dra7xx_l4_cfg_hwmod, 5548c2ecf20Sopenharmony_ci .clk = "l3_iclk_div", 5558c2ecf20Sopenharmony_ci .user = OCP_USER_MPU | OCP_USER_SDMA, 5568c2ecf20Sopenharmony_ci}; 5578c2ecf20Sopenharmony_ci 5588c2ecf20Sopenharmony_ci/* l3_main_1 -> l4_per1 */ 5598c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per1 = { 5608c2ecf20Sopenharmony_ci .master = &dra7xx_l3_main_1_hwmod, 5618c2ecf20Sopenharmony_ci .slave = &dra7xx_l4_per1_hwmod, 5628c2ecf20Sopenharmony_ci .clk = "l3_iclk_div", 5638c2ecf20Sopenharmony_ci .user = OCP_USER_MPU | OCP_USER_SDMA, 5648c2ecf20Sopenharmony_ci}; 5658c2ecf20Sopenharmony_ci 5668c2ecf20Sopenharmony_ci/* l3_main_1 -> l4_per2 */ 5678c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per2 = { 5688c2ecf20Sopenharmony_ci .master = &dra7xx_l3_main_1_hwmod, 5698c2ecf20Sopenharmony_ci .slave = &dra7xx_l4_per2_hwmod, 5708c2ecf20Sopenharmony_ci .clk = "l3_iclk_div", 5718c2ecf20Sopenharmony_ci .user = OCP_USER_MPU | OCP_USER_SDMA, 5728c2ecf20Sopenharmony_ci}; 5738c2ecf20Sopenharmony_ci 5748c2ecf20Sopenharmony_ci/* l3_main_1 -> l4_per3 */ 5758c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per3 = { 5768c2ecf20Sopenharmony_ci .master = &dra7xx_l3_main_1_hwmod, 5778c2ecf20Sopenharmony_ci .slave = &dra7xx_l4_per3_hwmod, 5788c2ecf20Sopenharmony_ci .clk = "l3_iclk_div", 5798c2ecf20Sopenharmony_ci .user = OCP_USER_MPU | OCP_USER_SDMA, 5808c2ecf20Sopenharmony_ci}; 5818c2ecf20Sopenharmony_ci 5828c2ecf20Sopenharmony_ci/* l3_main_1 -> l4_wkup */ 5838c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_wkup = { 5848c2ecf20Sopenharmony_ci .master = &dra7xx_l3_main_1_hwmod, 5858c2ecf20Sopenharmony_ci .slave = &dra7xx_l4_wkup_hwmod, 5868c2ecf20Sopenharmony_ci .clk = "wkupaon_iclk_mux", 5878c2ecf20Sopenharmony_ci .user = OCP_USER_MPU | OCP_USER_SDMA, 5888c2ecf20Sopenharmony_ci}; 5898c2ecf20Sopenharmony_ci 5908c2ecf20Sopenharmony_ci/* l4_per2 -> atl */ 5918c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if dra7xx_l4_per2__atl = { 5928c2ecf20Sopenharmony_ci .master = &dra7xx_l4_per2_hwmod, 5938c2ecf20Sopenharmony_ci .slave = &dra7xx_atl_hwmod, 5948c2ecf20Sopenharmony_ci .clk = "l3_iclk_div", 5958c2ecf20Sopenharmony_ci .user = OCP_USER_MPU | OCP_USER_SDMA, 5968c2ecf20Sopenharmony_ci}; 5978c2ecf20Sopenharmony_ci 5988c2ecf20Sopenharmony_ci/* l3_main_1 -> bb2d */ 5998c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if dra7xx_l3_main_1__bb2d = { 6008c2ecf20Sopenharmony_ci .master = &dra7xx_l3_main_1_hwmod, 6018c2ecf20Sopenharmony_ci .slave = &dra7xx_bb2d_hwmod, 6028c2ecf20Sopenharmony_ci .clk = "l3_iclk_div", 6038c2ecf20Sopenharmony_ci .user = OCP_USER_MPU | OCP_USER_SDMA, 6048c2ecf20Sopenharmony_ci}; 6058c2ecf20Sopenharmony_ci 6068c2ecf20Sopenharmony_ci/* l4_wkup -> ctrl_module_wkup */ 6078c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if dra7xx_l4_wkup__ctrl_module_wkup = { 6088c2ecf20Sopenharmony_ci .master = &dra7xx_l4_wkup_hwmod, 6098c2ecf20Sopenharmony_ci .slave = &dra7xx_ctrl_module_wkup_hwmod, 6108c2ecf20Sopenharmony_ci .clk = "wkupaon_iclk_mux", 6118c2ecf20Sopenharmony_ci .user = OCP_USER_MPU | OCP_USER_SDMA, 6128c2ecf20Sopenharmony_ci}; 6138c2ecf20Sopenharmony_ci 6148c2ecf20Sopenharmony_ci/* l3_main_1 -> gpmc */ 6158c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if dra7xx_l3_main_1__gpmc = { 6168c2ecf20Sopenharmony_ci .master = &dra7xx_l3_main_1_hwmod, 6178c2ecf20Sopenharmony_ci .slave = &dra7xx_gpmc_hwmod, 6188c2ecf20Sopenharmony_ci .clk = "l3_iclk_div", 6198c2ecf20Sopenharmony_ci .user = OCP_USER_MPU | OCP_USER_SDMA, 6208c2ecf20Sopenharmony_ci}; 6218c2ecf20Sopenharmony_ci 6228c2ecf20Sopenharmony_ci/* l4_cfg -> mpu */ 6238c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if dra7xx_l4_cfg__mpu = { 6248c2ecf20Sopenharmony_ci .master = &dra7xx_l4_cfg_hwmod, 6258c2ecf20Sopenharmony_ci .slave = &dra7xx_mpu_hwmod, 6268c2ecf20Sopenharmony_ci .clk = "l3_iclk_div", 6278c2ecf20Sopenharmony_ci .user = OCP_USER_MPU | OCP_USER_SDMA, 6288c2ecf20Sopenharmony_ci}; 6298c2ecf20Sopenharmony_ci 6308c2ecf20Sopenharmony_ci/* l3_main_1 -> pciess1 */ 6318c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if dra7xx_l3_main_1__pciess1 = { 6328c2ecf20Sopenharmony_ci .master = &dra7xx_l3_main_1_hwmod, 6338c2ecf20Sopenharmony_ci .slave = &dra7xx_pciess1_hwmod, 6348c2ecf20Sopenharmony_ci .clk = "l3_iclk_div", 6358c2ecf20Sopenharmony_ci .user = OCP_USER_MPU | OCP_USER_SDMA, 6368c2ecf20Sopenharmony_ci}; 6378c2ecf20Sopenharmony_ci 6388c2ecf20Sopenharmony_ci/* l4_cfg -> pciess1 */ 6398c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if dra7xx_l4_cfg__pciess1 = { 6408c2ecf20Sopenharmony_ci .master = &dra7xx_l4_cfg_hwmod, 6418c2ecf20Sopenharmony_ci .slave = &dra7xx_pciess1_hwmod, 6428c2ecf20Sopenharmony_ci .clk = "l4_root_clk_div", 6438c2ecf20Sopenharmony_ci .user = OCP_USER_MPU | OCP_USER_SDMA, 6448c2ecf20Sopenharmony_ci}; 6458c2ecf20Sopenharmony_ci 6468c2ecf20Sopenharmony_ci/* l3_main_1 -> pciess2 */ 6478c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if dra7xx_l3_main_1__pciess2 = { 6488c2ecf20Sopenharmony_ci .master = &dra7xx_l3_main_1_hwmod, 6498c2ecf20Sopenharmony_ci .slave = &dra7xx_pciess2_hwmod, 6508c2ecf20Sopenharmony_ci .clk = "l3_iclk_div", 6518c2ecf20Sopenharmony_ci .user = OCP_USER_MPU | OCP_USER_SDMA, 6528c2ecf20Sopenharmony_ci}; 6538c2ecf20Sopenharmony_ci 6548c2ecf20Sopenharmony_ci/* l4_cfg -> pciess2 */ 6558c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if dra7xx_l4_cfg__pciess2 = { 6568c2ecf20Sopenharmony_ci .master = &dra7xx_l4_cfg_hwmod, 6578c2ecf20Sopenharmony_ci .slave = &dra7xx_pciess2_hwmod, 6588c2ecf20Sopenharmony_ci .clk = "l4_root_clk_div", 6598c2ecf20Sopenharmony_ci .user = OCP_USER_MPU | OCP_USER_SDMA, 6608c2ecf20Sopenharmony_ci}; 6618c2ecf20Sopenharmony_ci 6628c2ecf20Sopenharmony_ci/* l3_main_1 -> qspi */ 6638c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if dra7xx_l3_main_1__qspi = { 6648c2ecf20Sopenharmony_ci .master = &dra7xx_l3_main_1_hwmod, 6658c2ecf20Sopenharmony_ci .slave = &dra7xx_qspi_hwmod, 6668c2ecf20Sopenharmony_ci .clk = "l3_iclk_div", 6678c2ecf20Sopenharmony_ci .user = OCP_USER_MPU | OCP_USER_SDMA, 6688c2ecf20Sopenharmony_ci}; 6698c2ecf20Sopenharmony_ci 6708c2ecf20Sopenharmony_ci/* l4_cfg -> sata */ 6718c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if dra7xx_l4_cfg__sata = { 6728c2ecf20Sopenharmony_ci .master = &dra7xx_l4_cfg_hwmod, 6738c2ecf20Sopenharmony_ci .slave = &dra7xx_sata_hwmod, 6748c2ecf20Sopenharmony_ci .clk = "l3_iclk_div", 6758c2ecf20Sopenharmony_ci .user = OCP_USER_MPU | OCP_USER_SDMA, 6768c2ecf20Sopenharmony_ci}; 6778c2ecf20Sopenharmony_ci 6788c2ecf20Sopenharmony_ci/* l3_main_1 -> vcp1 */ 6798c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp1 = { 6808c2ecf20Sopenharmony_ci .master = &dra7xx_l3_main_1_hwmod, 6818c2ecf20Sopenharmony_ci .slave = &dra7xx_vcp1_hwmod, 6828c2ecf20Sopenharmony_ci .clk = "l3_iclk_div", 6838c2ecf20Sopenharmony_ci .user = OCP_USER_MPU | OCP_USER_SDMA, 6848c2ecf20Sopenharmony_ci}; 6858c2ecf20Sopenharmony_ci 6868c2ecf20Sopenharmony_ci/* l4_per2 -> vcp1 */ 6878c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp1 = { 6888c2ecf20Sopenharmony_ci .master = &dra7xx_l4_per2_hwmod, 6898c2ecf20Sopenharmony_ci .slave = &dra7xx_vcp1_hwmod, 6908c2ecf20Sopenharmony_ci .clk = "l3_iclk_div", 6918c2ecf20Sopenharmony_ci .user = OCP_USER_MPU | OCP_USER_SDMA, 6928c2ecf20Sopenharmony_ci}; 6938c2ecf20Sopenharmony_ci 6948c2ecf20Sopenharmony_ci/* l3_main_1 -> vcp2 */ 6958c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp2 = { 6968c2ecf20Sopenharmony_ci .master = &dra7xx_l3_main_1_hwmod, 6978c2ecf20Sopenharmony_ci .slave = &dra7xx_vcp2_hwmod, 6988c2ecf20Sopenharmony_ci .clk = "l3_iclk_div", 6998c2ecf20Sopenharmony_ci .user = OCP_USER_MPU | OCP_USER_SDMA, 7008c2ecf20Sopenharmony_ci}; 7018c2ecf20Sopenharmony_ci 7028c2ecf20Sopenharmony_ci/* l4_per2 -> vcp2 */ 7038c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp2 = { 7048c2ecf20Sopenharmony_ci .master = &dra7xx_l4_per2_hwmod, 7058c2ecf20Sopenharmony_ci .slave = &dra7xx_vcp2_hwmod, 7068c2ecf20Sopenharmony_ci .clk = "l3_iclk_div", 7078c2ecf20Sopenharmony_ci .user = OCP_USER_MPU | OCP_USER_SDMA, 7088c2ecf20Sopenharmony_ci}; 7098c2ecf20Sopenharmony_ci 7108c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = { 7118c2ecf20Sopenharmony_ci &dra7xx_l3_main_1__dmm, 7128c2ecf20Sopenharmony_ci &dra7xx_l3_main_2__l3_instr, 7138c2ecf20Sopenharmony_ci &dra7xx_l4_cfg__l3_main_1, 7148c2ecf20Sopenharmony_ci &dra7xx_mpu__l3_main_1, 7158c2ecf20Sopenharmony_ci &dra7xx_l3_main_1__l3_main_2, 7168c2ecf20Sopenharmony_ci &dra7xx_l4_cfg__l3_main_2, 7178c2ecf20Sopenharmony_ci &dra7xx_l3_main_1__l4_cfg, 7188c2ecf20Sopenharmony_ci &dra7xx_l3_main_1__l4_per1, 7198c2ecf20Sopenharmony_ci &dra7xx_l3_main_1__l4_per2, 7208c2ecf20Sopenharmony_ci &dra7xx_l3_main_1__l4_per3, 7218c2ecf20Sopenharmony_ci &dra7xx_l3_main_1__l4_wkup, 7228c2ecf20Sopenharmony_ci &dra7xx_l4_per2__atl, 7238c2ecf20Sopenharmony_ci &dra7xx_l3_main_1__bb2d, 7248c2ecf20Sopenharmony_ci &dra7xx_l4_wkup__ctrl_module_wkup, 7258c2ecf20Sopenharmony_ci &dra7xx_l3_main_1__gpmc, 7268c2ecf20Sopenharmony_ci &dra7xx_l4_cfg__mpu, 7278c2ecf20Sopenharmony_ci &dra7xx_l3_main_1__pciess1, 7288c2ecf20Sopenharmony_ci &dra7xx_l4_cfg__pciess1, 7298c2ecf20Sopenharmony_ci &dra7xx_l3_main_1__pciess2, 7308c2ecf20Sopenharmony_ci &dra7xx_l4_cfg__pciess2, 7318c2ecf20Sopenharmony_ci &dra7xx_l3_main_1__qspi, 7328c2ecf20Sopenharmony_ci &dra7xx_l4_cfg__sata, 7338c2ecf20Sopenharmony_ci &dra7xx_l3_main_1__vcp1, 7348c2ecf20Sopenharmony_ci &dra7xx_l4_per2__vcp1, 7358c2ecf20Sopenharmony_ci &dra7xx_l3_main_1__vcp2, 7368c2ecf20Sopenharmony_ci &dra7xx_l4_per2__vcp2, 7378c2ecf20Sopenharmony_ci NULL, 7388c2ecf20Sopenharmony_ci}; 7398c2ecf20Sopenharmony_ci 7408c2ecf20Sopenharmony_ci/* SoC variant specific hwmod links */ 7418c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if *dra72x_hwmod_ocp_ifs[] __initdata = { 7428c2ecf20Sopenharmony_ci NULL, 7438c2ecf20Sopenharmony_ci}; 7448c2ecf20Sopenharmony_ci 7458c2ecf20Sopenharmony_cistatic struct omap_hwmod_ocp_if *rtc_hwmod_ocp_ifs[] __initdata = { 7468c2ecf20Sopenharmony_ci NULL, 7478c2ecf20Sopenharmony_ci}; 7488c2ecf20Sopenharmony_ci 7498c2ecf20Sopenharmony_ciint __init dra7xx_hwmod_init(void) 7508c2ecf20Sopenharmony_ci{ 7518c2ecf20Sopenharmony_ci int ret; 7528c2ecf20Sopenharmony_ci 7538c2ecf20Sopenharmony_ci omap_hwmod_init(); 7548c2ecf20Sopenharmony_ci ret = omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs); 7558c2ecf20Sopenharmony_ci 7568c2ecf20Sopenharmony_ci if (!ret && soc_is_dra74x()) { 7578c2ecf20Sopenharmony_ci ret = omap_hwmod_register_links(rtc_hwmod_ocp_ifs); 7588c2ecf20Sopenharmony_ci } else if (!ret && soc_is_dra72x()) { 7598c2ecf20Sopenharmony_ci ret = omap_hwmod_register_links(dra72x_hwmod_ocp_ifs); 7608c2ecf20Sopenharmony_ci if (!ret && !of_machine_is_compatible("ti,dra718")) 7618c2ecf20Sopenharmony_ci ret = omap_hwmod_register_links(rtc_hwmod_ocp_ifs); 7628c2ecf20Sopenharmony_ci } else if (!ret && soc_is_dra76x()) { 7638c2ecf20Sopenharmony_ci if (!ret && soc_is_dra76x_abz()) 7648c2ecf20Sopenharmony_ci ret = omap_hwmod_register_links(rtc_hwmod_ocp_ifs); 7658c2ecf20Sopenharmony_ci } 7668c2ecf20Sopenharmony_ci 7678c2ecf20Sopenharmony_ci return ret; 7688c2ecf20Sopenharmony_ci} 769