162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * arch/arm/mach-omap2/control.h 362306a36Sopenharmony_ci * 462306a36Sopenharmony_ci * OMAP2/3/4 System Control Module definitions 562306a36Sopenharmony_ci * 662306a36Sopenharmony_ci * Copyright (C) 2007-2010 Texas Instruments, Inc. 762306a36Sopenharmony_ci * Copyright (C) 2007-2008, 2010 Nokia Corporation 862306a36Sopenharmony_ci * 962306a36Sopenharmony_ci * Written by Paul Walmsley 1062306a36Sopenharmony_ci * 1162306a36Sopenharmony_ci * This program is free software; you can redistribute it and/or modify 1262306a36Sopenharmony_ci * it under the terms of the GNU General Public License as published by 1362306a36Sopenharmony_ci * the Free Software Foundation. 1462306a36Sopenharmony_ci */ 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci#ifndef __ARCH_ARM_MACH_OMAP2_CONTROL_H 1762306a36Sopenharmony_ci#define __ARCH_ARM_MACH_OMAP2_CONTROL_H 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ci#include "am33xx.h" 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ci#ifndef __ASSEMBLY__ 2262306a36Sopenharmony_ci#define OMAP242X_CTRL_REGADDR(reg) \ 2362306a36Sopenharmony_ci OMAP2_L4_IO_ADDRESS(OMAP242X_CTRL_BASE + (reg)) 2462306a36Sopenharmony_ci#define OMAP243X_CTRL_REGADDR(reg) \ 2562306a36Sopenharmony_ci OMAP2_L4_IO_ADDRESS(OMAP243X_CTRL_BASE + (reg)) 2662306a36Sopenharmony_ci#define OMAP343X_CTRL_REGADDR(reg) \ 2762306a36Sopenharmony_ci OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE + (reg)) 2862306a36Sopenharmony_ci#define AM33XX_CTRL_REGADDR(reg) \ 2962306a36Sopenharmony_ci AM33XX_L4_WK_IO_ADDRESS(AM33XX_SCM_BASE + (reg)) 3062306a36Sopenharmony_ci#else 3162306a36Sopenharmony_ci#define OMAP242X_CTRL_REGADDR(reg) \ 3262306a36Sopenharmony_ci OMAP2_L4_IO_ADDRESS(OMAP242X_CTRL_BASE + (reg)) 3362306a36Sopenharmony_ci#define OMAP243X_CTRL_REGADDR(reg) \ 3462306a36Sopenharmony_ci OMAP2_L4_IO_ADDRESS(OMAP243X_CTRL_BASE + (reg)) 3562306a36Sopenharmony_ci#define OMAP343X_CTRL_REGADDR(reg) \ 3662306a36Sopenharmony_ci OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE + (reg)) 3762306a36Sopenharmony_ci#define AM33XX_CTRL_REGADDR(reg) \ 3862306a36Sopenharmony_ci AM33XX_L4_WK_IO_ADDRESS(AM33XX_SCM_BASE + (reg)) 3962306a36Sopenharmony_ci#endif /* __ASSEMBLY__ */ 4062306a36Sopenharmony_ci 4162306a36Sopenharmony_ci/* 4262306a36Sopenharmony_ci * As elsewhere, the "OMAP2_" prefix indicates that the macro is valid for 4362306a36Sopenharmony_ci * OMAP24XX and OMAP34XX. 4462306a36Sopenharmony_ci */ 4562306a36Sopenharmony_ci 4662306a36Sopenharmony_ci/* Control submodule offsets */ 4762306a36Sopenharmony_ci 4862306a36Sopenharmony_ci#define OMAP2_CONTROL_INTERFACE 0x000 4962306a36Sopenharmony_ci#define OMAP2_CONTROL_PADCONFS 0x030 5062306a36Sopenharmony_ci#define OMAP2_CONTROL_GENERAL 0x270 5162306a36Sopenharmony_ci#define OMAP343X_CONTROL_MEM_WKUP 0x600 5262306a36Sopenharmony_ci#define OMAP343X_CONTROL_PADCONFS_WKUP 0xa00 5362306a36Sopenharmony_ci#define OMAP343X_CONTROL_GENERAL_WKUP 0xa60 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_ci/* TI81XX spefic control submodules */ 5662306a36Sopenharmony_ci#define TI81XX_CONTROL_DEVBOOT 0x040 5762306a36Sopenharmony_ci#define TI81XX_CONTROL_DEVCONF 0x600 5862306a36Sopenharmony_ci 5962306a36Sopenharmony_ci/* Control register offsets - read/write with omap_ctrl_{read,write}{bwl}() */ 6062306a36Sopenharmony_ci 6162306a36Sopenharmony_ci#define OMAP2_CONTROL_SYSCONFIG (OMAP2_CONTROL_INTERFACE + 0x10) 6262306a36Sopenharmony_ci 6362306a36Sopenharmony_ci/* CONTROL_GENERAL register offsets common to OMAP2 & 3 */ 6462306a36Sopenharmony_ci#define OMAP2_CONTROL_DEVCONF0 (OMAP2_CONTROL_GENERAL + 0x0004) 6562306a36Sopenharmony_ci#define OMAP2_CONTROL_MSUSPENDMUX_0 (OMAP2_CONTROL_GENERAL + 0x0020) 6662306a36Sopenharmony_ci#define OMAP2_CONTROL_MSUSPENDMUX_1 (OMAP2_CONTROL_GENERAL + 0x0024) 6762306a36Sopenharmony_ci#define OMAP2_CONTROL_MSUSPENDMUX_2 (OMAP2_CONTROL_GENERAL + 0x0028) 6862306a36Sopenharmony_ci#define OMAP2_CONTROL_MSUSPENDMUX_3 (OMAP2_CONTROL_GENERAL + 0x002c) 6962306a36Sopenharmony_ci#define OMAP2_CONTROL_MSUSPENDMUX_4 (OMAP2_CONTROL_GENERAL + 0x0030) 7062306a36Sopenharmony_ci#define OMAP2_CONTROL_MSUSPENDMUX_5 (OMAP2_CONTROL_GENERAL + 0x0034) 7162306a36Sopenharmony_ci#define OMAP2_CONTROL_SEC_CTRL (OMAP2_CONTROL_GENERAL + 0x0040) 7262306a36Sopenharmony_ci#define OMAP2_CONTROL_RPUB_KEY_H_0 (OMAP2_CONTROL_GENERAL + 0x0090) 7362306a36Sopenharmony_ci#define OMAP2_CONTROL_RPUB_KEY_H_1 (OMAP2_CONTROL_GENERAL + 0x0094) 7462306a36Sopenharmony_ci#define OMAP2_CONTROL_RPUB_KEY_H_2 (OMAP2_CONTROL_GENERAL + 0x0098) 7562306a36Sopenharmony_ci#define OMAP2_CONTROL_RPUB_KEY_H_3 (OMAP2_CONTROL_GENERAL + 0x009c) 7662306a36Sopenharmony_ci 7762306a36Sopenharmony_ci/* 242x-only CONTROL_GENERAL register offsets */ 7862306a36Sopenharmony_ci#define OMAP242X_CONTROL_DEVCONF OMAP2_CONTROL_DEVCONF0 /* match TRM */ 7962306a36Sopenharmony_ci#define OMAP242X_CONTROL_OCM_RAM_PERM (OMAP2_CONTROL_GENERAL + 0x0068) 8062306a36Sopenharmony_ci 8162306a36Sopenharmony_ci/* 243x-only CONTROL_GENERAL register offsets */ 8262306a36Sopenharmony_ci/* CONTROL_IVA2_BOOT{ADDR,MOD} are at the same place on 343x - noted below */ 8362306a36Sopenharmony_ci#define OMAP243X_CONTROL_DEVCONF1 (OMAP2_CONTROL_GENERAL + 0x0078) 8462306a36Sopenharmony_ci#define OMAP243X_CONTROL_CSIRXFE (OMAP2_CONTROL_GENERAL + 0x007c) 8562306a36Sopenharmony_ci#define OMAP243X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190) 8662306a36Sopenharmony_ci#define OMAP243X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194) 8762306a36Sopenharmony_ci#define OMAP243X_CONTROL_IVA2_GEMCFG (OMAP2_CONTROL_GENERAL + 0x0198) 8862306a36Sopenharmony_ci#define OMAP243X_CONTROL_PBIAS_LITE (OMAP2_CONTROL_GENERAL + 0x0230) 8962306a36Sopenharmony_ci 9062306a36Sopenharmony_ci/* 24xx-only CONTROL_GENERAL register offsets */ 9162306a36Sopenharmony_ci#define OMAP24XX_CONTROL_DEBOBS (OMAP2_CONTROL_GENERAL + 0x0000) 9262306a36Sopenharmony_ci#define OMAP24XX_CONTROL_EMU_SUPPORT (OMAP2_CONTROL_GENERAL + 0x0008) 9362306a36Sopenharmony_ci#define OMAP24XX_CONTROL_SEC_TEST (OMAP2_CONTROL_GENERAL + 0x0044) 9462306a36Sopenharmony_ci#define OMAP24XX_CONTROL_PSA_CTRL (OMAP2_CONTROL_GENERAL + 0x0048) 9562306a36Sopenharmony_ci#define OMAP24XX_CONTROL_PSA_CMD (OMAP2_CONTROL_GENERAL + 0x004c) 9662306a36Sopenharmony_ci#define OMAP24XX_CONTROL_PSA_VALUE (OMAP2_CONTROL_GENERAL + 0x0050) 9762306a36Sopenharmony_ci#define OMAP24XX_CONTROL_SEC_EMU (OMAP2_CONTROL_GENERAL + 0x0060) 9862306a36Sopenharmony_ci#define OMAP24XX_CONTROL_SEC_TAP (OMAP2_CONTROL_GENERAL + 0x0064) 9962306a36Sopenharmony_ci#define OMAP24XX_CONTROL_OCM_PUB_RAM_ADD (OMAP2_CONTROL_GENERAL + 0x006c) 10062306a36Sopenharmony_ci#define OMAP24XX_CONTROL_EXT_SEC_RAM_START_ADD (OMAP2_CONTROL_GENERAL + 0x0070) 10162306a36Sopenharmony_ci#define OMAP24XX_CONTROL_EXT_SEC_RAM_STOP_ADD (OMAP2_CONTROL_GENERAL + 0x0074) 10262306a36Sopenharmony_ci#define OMAP24XX_CONTROL_SEC_STATUS (OMAP2_CONTROL_GENERAL + 0x0080) 10362306a36Sopenharmony_ci#define OMAP24XX_CONTROL_SEC_ERR_STATUS (OMAP2_CONTROL_GENERAL + 0x0084) 10462306a36Sopenharmony_ci#define OMAP24XX_CONTROL_STATUS (OMAP2_CONTROL_GENERAL + 0x0088) 10562306a36Sopenharmony_ci#define OMAP24XX_CONTROL_GENERAL_PURPOSE_STATUS (OMAP2_CONTROL_GENERAL + 0x008c) 10662306a36Sopenharmony_ci#define OMAP24XX_CONTROL_RAND_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00a0) 10762306a36Sopenharmony_ci#define OMAP24XX_CONTROL_RAND_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00a4) 10862306a36Sopenharmony_ci#define OMAP24XX_CONTROL_RAND_KEY_2 (OMAP2_CONTROL_GENERAL + 0x00a8) 10962306a36Sopenharmony_ci#define OMAP24XX_CONTROL_RAND_KEY_3 (OMAP2_CONTROL_GENERAL + 0x00ac) 11062306a36Sopenharmony_ci#define OMAP24XX_CONTROL_CUST_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00b0) 11162306a36Sopenharmony_ci#define OMAP24XX_CONTROL_CUST_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00b4) 11262306a36Sopenharmony_ci#define OMAP24XX_CONTROL_TEST_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00c0) 11362306a36Sopenharmony_ci#define OMAP24XX_CONTROL_TEST_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00c4) 11462306a36Sopenharmony_ci#define OMAP24XX_CONTROL_TEST_KEY_2 (OMAP2_CONTROL_GENERAL + 0x00c8) 11562306a36Sopenharmony_ci#define OMAP24XX_CONTROL_TEST_KEY_3 (OMAP2_CONTROL_GENERAL + 0x00cc) 11662306a36Sopenharmony_ci#define OMAP24XX_CONTROL_TEST_KEY_4 (OMAP2_CONTROL_GENERAL + 0x00d0) 11762306a36Sopenharmony_ci#define OMAP24XX_CONTROL_TEST_KEY_5 (OMAP2_CONTROL_GENERAL + 0x00d4) 11862306a36Sopenharmony_ci#define OMAP24XX_CONTROL_TEST_KEY_6 (OMAP2_CONTROL_GENERAL + 0x00d8) 11962306a36Sopenharmony_ci#define OMAP24XX_CONTROL_TEST_KEY_7 (OMAP2_CONTROL_GENERAL + 0x00dc) 12062306a36Sopenharmony_ci#define OMAP24XX_CONTROL_TEST_KEY_8 (OMAP2_CONTROL_GENERAL + 0x00e0) 12162306a36Sopenharmony_ci#define OMAP24XX_CONTROL_TEST_KEY_9 (OMAP2_CONTROL_GENERAL + 0x00e4) 12262306a36Sopenharmony_ci 12362306a36Sopenharmony_ci#define OMAP343X_CONTROL_PADCONF_SYSNIRQ (OMAP2_CONTROL_INTERFACE + 0x01b0) 12462306a36Sopenharmony_ci 12562306a36Sopenharmony_ci/* 34xx-only CONTROL_GENERAL register offsets */ 12662306a36Sopenharmony_ci#define OMAP343X_CONTROL_PADCONF_OFF (OMAP2_CONTROL_GENERAL + 0x0000) 12762306a36Sopenharmony_ci#define OMAP343X_CONTROL_MEM_DFTRW0 (OMAP2_CONTROL_GENERAL + 0x0008) 12862306a36Sopenharmony_ci#define OMAP343X_CONTROL_MEM_DFTRW1 (OMAP2_CONTROL_GENERAL + 0x000c) 12962306a36Sopenharmony_ci#define OMAP343X_CONTROL_DEVCONF1 (OMAP2_CONTROL_GENERAL + 0x0068) 13062306a36Sopenharmony_ci#define OMAP343X_CONTROL_CSIRXFE (OMAP2_CONTROL_GENERAL + 0x006c) 13162306a36Sopenharmony_ci#define OMAP343X_CONTROL_SEC_STATUS (OMAP2_CONTROL_GENERAL + 0x0070) 13262306a36Sopenharmony_ci#define OMAP343X_CONTROL_SEC_ERR_STATUS (OMAP2_CONTROL_GENERAL + 0x0074) 13362306a36Sopenharmony_ci#define OMAP343X_CONTROL_SEC_ERR_STATUS_DEBUG (OMAP2_CONTROL_GENERAL + 0x0078) 13462306a36Sopenharmony_ci#define OMAP343X_CONTROL_STATUS (OMAP2_CONTROL_GENERAL + 0x0080) 13562306a36Sopenharmony_ci#define OMAP343X_CONTROL_GENERAL_PURPOSE_STATUS (OMAP2_CONTROL_GENERAL + 0x0084) 13662306a36Sopenharmony_ci#define OMAP343X_CONTROL_RPUB_KEY_H_4 (OMAP2_CONTROL_GENERAL + 0x00a0) 13762306a36Sopenharmony_ci#define OMAP343X_CONTROL_RAND_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00a8) 13862306a36Sopenharmony_ci#define OMAP343X_CONTROL_RAND_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00ac) 13962306a36Sopenharmony_ci#define OMAP343X_CONTROL_RAND_KEY_2 (OMAP2_CONTROL_GENERAL + 0x00b0) 14062306a36Sopenharmony_ci#define OMAP343X_CONTROL_RAND_KEY_3 (OMAP2_CONTROL_GENERAL + 0x00b4) 14162306a36Sopenharmony_ci#define OMAP343X_CONTROL_TEST_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00c8) 14262306a36Sopenharmony_ci#define OMAP343X_CONTROL_TEST_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00cc) 14362306a36Sopenharmony_ci#define OMAP343X_CONTROL_TEST_KEY_2 (OMAP2_CONTROL_GENERAL + 0x00d0) 14462306a36Sopenharmony_ci#define OMAP343X_CONTROL_TEST_KEY_3 (OMAP2_CONTROL_GENERAL + 0x00d4) 14562306a36Sopenharmony_ci#define OMAP343X_CONTROL_TEST_KEY_4 (OMAP2_CONTROL_GENERAL + 0x00d8) 14662306a36Sopenharmony_ci#define OMAP343X_CONTROL_TEST_KEY_5 (OMAP2_CONTROL_GENERAL + 0x00dc) 14762306a36Sopenharmony_ci#define OMAP343X_CONTROL_TEST_KEY_6 (OMAP2_CONTROL_GENERAL + 0x00e0) 14862306a36Sopenharmony_ci#define OMAP343X_CONTROL_TEST_KEY_7 (OMAP2_CONTROL_GENERAL + 0x00e4) 14962306a36Sopenharmony_ci#define OMAP343X_CONTROL_TEST_KEY_8 (OMAP2_CONTROL_GENERAL + 0x00e8) 15062306a36Sopenharmony_ci#define OMAP343X_CONTROL_TEST_KEY_9 (OMAP2_CONTROL_GENERAL + 0x00ec) 15162306a36Sopenharmony_ci#define OMAP343X_CONTROL_TEST_KEY_10 (OMAP2_CONTROL_GENERAL + 0x00f0) 15262306a36Sopenharmony_ci#define OMAP343X_CONTROL_TEST_KEY_11 (OMAP2_CONTROL_GENERAL + 0x00f4) 15362306a36Sopenharmony_ci#define OMAP343X_CONTROL_TEST_KEY_12 (OMAP2_CONTROL_GENERAL + 0x00f8) 15462306a36Sopenharmony_ci#define OMAP343X_CONTROL_TEST_KEY_13 (OMAP2_CONTROL_GENERAL + 0x00fc) 15562306a36Sopenharmony_ci#define OMAP343X_CONTROL_FUSE_OPP1_VDD1 (OMAP2_CONTROL_GENERAL + 0x0110) 15662306a36Sopenharmony_ci#define OMAP343X_CONTROL_FUSE_OPP2_VDD1 (OMAP2_CONTROL_GENERAL + 0x0114) 15762306a36Sopenharmony_ci#define OMAP343X_CONTROL_FUSE_OPP3_VDD1 (OMAP2_CONTROL_GENERAL + 0x0118) 15862306a36Sopenharmony_ci#define OMAP343X_CONTROL_FUSE_OPP4_VDD1 (OMAP2_CONTROL_GENERAL + 0x011c) 15962306a36Sopenharmony_ci#define OMAP343X_CONTROL_FUSE_OPP5_VDD1 (OMAP2_CONTROL_GENERAL + 0x0120) 16062306a36Sopenharmony_ci#define OMAP343X_CONTROL_FUSE_OPP1_VDD2 (OMAP2_CONTROL_GENERAL + 0x0124) 16162306a36Sopenharmony_ci#define OMAP343X_CONTROL_FUSE_OPP2_VDD2 (OMAP2_CONTROL_GENERAL + 0x0128) 16262306a36Sopenharmony_ci#define OMAP343X_CONTROL_FUSE_OPP3_VDD2 (OMAP2_CONTROL_GENERAL + 0x012c) 16362306a36Sopenharmony_ci#define OMAP343X_CONTROL_FUSE_SR (OMAP2_CONTROL_GENERAL + 0x0130) 16462306a36Sopenharmony_ci#define OMAP343X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190) 16562306a36Sopenharmony_ci#define OMAP343X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194) 16662306a36Sopenharmony_ci#define OMAP343X_CONTROL_DEBOBS(i) (OMAP2_CONTROL_GENERAL + 0x01B0 \ 16762306a36Sopenharmony_ci + ((i) >> 1) * 4 + (!((i) & 1)) * 2) 16862306a36Sopenharmony_ci#define OMAP343X_CONTROL_PROG_IO0 (OMAP2_CONTROL_GENERAL + 0x01D4) 16962306a36Sopenharmony_ci#define OMAP343X_CONTROL_PROG_IO1 (OMAP2_CONTROL_GENERAL + 0x01D8) 17062306a36Sopenharmony_ci#define OMAP343X_CONTROL_DSS_DPLL_SPREADING (OMAP2_CONTROL_GENERAL + 0x01E0) 17162306a36Sopenharmony_ci#define OMAP343X_CONTROL_CORE_DPLL_SPREADING (OMAP2_CONTROL_GENERAL + 0x01E4) 17262306a36Sopenharmony_ci#define OMAP343X_CONTROL_PER_DPLL_SPREADING (OMAP2_CONTROL_GENERAL + 0x01E8) 17362306a36Sopenharmony_ci#define OMAP343X_CONTROL_USBHOST_DPLL_SPREADING (OMAP2_CONTROL_GENERAL + 0x01EC) 17462306a36Sopenharmony_ci#define OMAP343X_CONTROL_PBIAS_LITE (OMAP2_CONTROL_GENERAL + 0x02B0) 17562306a36Sopenharmony_ci#define OMAP343X_CONTROL_TEMP_SENSOR (OMAP2_CONTROL_GENERAL + 0x02B4) 17662306a36Sopenharmony_ci#define OMAP343X_CONTROL_SRAMLDO4 (OMAP2_CONTROL_GENERAL + 0x02B8) 17762306a36Sopenharmony_ci#define OMAP343X_CONTROL_SRAMLDO5 (OMAP2_CONTROL_GENERAL + 0x02C0) 17862306a36Sopenharmony_ci#define OMAP343X_CONTROL_CSI (OMAP2_CONTROL_GENERAL + 0x02C4) 17962306a36Sopenharmony_ci 18062306a36Sopenharmony_ci/* OMAP3630 only CONTROL_GENERAL register offsets */ 18162306a36Sopenharmony_ci#define OMAP3630_CONTROL_FUSE_OPP1G_VDD1 (OMAP2_CONTROL_GENERAL + 0x0110) 18262306a36Sopenharmony_ci#define OMAP3630_CONTROL_FUSE_OPP50_VDD1 (OMAP2_CONTROL_GENERAL + 0x0114) 18362306a36Sopenharmony_ci#define OMAP3630_CONTROL_FUSE_OPP100_VDD1 (OMAP2_CONTROL_GENERAL + 0x0118) 18462306a36Sopenharmony_ci#define OMAP3630_CONTROL_FUSE_OPP120_VDD1 (OMAP2_CONTROL_GENERAL + 0x0120) 18562306a36Sopenharmony_ci#define OMAP3630_CONTROL_FUSE_OPP50_VDD2 (OMAP2_CONTROL_GENERAL + 0x0128) 18662306a36Sopenharmony_ci#define OMAP3630_CONTROL_FUSE_OPP100_VDD2 (OMAP2_CONTROL_GENERAL + 0x012C) 18762306a36Sopenharmony_ci#define OMAP3630_CONTROL_CAMERA_PHY_CTRL (OMAP2_CONTROL_GENERAL + 0x02f0) 18862306a36Sopenharmony_ci 18962306a36Sopenharmony_ci/* OMAP44xx control efuse offsets */ 19062306a36Sopenharmony_ci#define OMAP44XX_CONTROL_FUSE_IVA_OPP50 0x22C 19162306a36Sopenharmony_ci#define OMAP44XX_CONTROL_FUSE_IVA_OPP100 0x22F 19262306a36Sopenharmony_ci#define OMAP44XX_CONTROL_FUSE_IVA_OPPTURBO 0x232 19362306a36Sopenharmony_ci#define OMAP44XX_CONTROL_FUSE_IVA_OPPNITRO 0x235 19462306a36Sopenharmony_ci#define OMAP44XX_CONTROL_FUSE_MPU_OPP50 0x240 19562306a36Sopenharmony_ci#define OMAP44XX_CONTROL_FUSE_MPU_OPP100 0x243 19662306a36Sopenharmony_ci#define OMAP44XX_CONTROL_FUSE_MPU_OPPTURBO 0x246 19762306a36Sopenharmony_ci#define OMAP44XX_CONTROL_FUSE_MPU_OPPNITRO 0x249 19862306a36Sopenharmony_ci#define OMAP44XX_CONTROL_FUSE_MPU_OPPNITROSB 0x24C 19962306a36Sopenharmony_ci#define OMAP44XX_CONTROL_FUSE_CORE_OPP50 0x254 20062306a36Sopenharmony_ci#define OMAP44XX_CONTROL_FUSE_CORE_OPP100 0x257 20162306a36Sopenharmony_ci#define OMAP44XX_CONTROL_FUSE_CORE_OPP100OV 0x25A 20262306a36Sopenharmony_ci 20362306a36Sopenharmony_ci/* AM35XX only CONTROL_GENERAL register offsets */ 20462306a36Sopenharmony_ci#define AM35XX_CONTROL_MSUSPENDMUX_6 (OMAP2_CONTROL_GENERAL + 0x0038) 20562306a36Sopenharmony_ci#define AM35XX_CONTROL_DEVCONF2 (OMAP2_CONTROL_GENERAL + 0x0310) 20662306a36Sopenharmony_ci#define AM35XX_CONTROL_DEVCONF3 (OMAP2_CONTROL_GENERAL + 0x0314) 20762306a36Sopenharmony_ci#define AM35XX_CONTROL_CBA_PRIORITY (OMAP2_CONTROL_GENERAL + 0x0320) 20862306a36Sopenharmony_ci#define AM35XX_CONTROL_LVL_INTR_CLEAR (OMAP2_CONTROL_GENERAL + 0x0324) 20962306a36Sopenharmony_ci#define AM35XX_CONTROL_IP_SW_RESET (OMAP2_CONTROL_GENERAL + 0x0328) 21062306a36Sopenharmony_ci#define AM35XX_CONTROL_IPSS_CLK_CTRL (OMAP2_CONTROL_GENERAL + 0x032C) 21162306a36Sopenharmony_ci 21262306a36Sopenharmony_ci/* 34xx PADCONF register offsets */ 21362306a36Sopenharmony_ci#define OMAP343X_PADCONF_ETK(i) (OMAP2_CONTROL_PADCONFS + 0x5a8 + \ 21462306a36Sopenharmony_ci (i)*2) 21562306a36Sopenharmony_ci#define OMAP343X_PADCONF_ETK_CLK OMAP343X_PADCONF_ETK(0) 21662306a36Sopenharmony_ci#define OMAP343X_PADCONF_ETK_CTL OMAP343X_PADCONF_ETK(1) 21762306a36Sopenharmony_ci#define OMAP343X_PADCONF_ETK_D0 OMAP343X_PADCONF_ETK(2) 21862306a36Sopenharmony_ci#define OMAP343X_PADCONF_ETK_D1 OMAP343X_PADCONF_ETK(3) 21962306a36Sopenharmony_ci#define OMAP343X_PADCONF_ETK_D2 OMAP343X_PADCONF_ETK(4) 22062306a36Sopenharmony_ci#define OMAP343X_PADCONF_ETK_D3 OMAP343X_PADCONF_ETK(5) 22162306a36Sopenharmony_ci#define OMAP343X_PADCONF_ETK_D4 OMAP343X_PADCONF_ETK(6) 22262306a36Sopenharmony_ci#define OMAP343X_PADCONF_ETK_D5 OMAP343X_PADCONF_ETK(7) 22362306a36Sopenharmony_ci#define OMAP343X_PADCONF_ETK_D6 OMAP343X_PADCONF_ETK(8) 22462306a36Sopenharmony_ci#define OMAP343X_PADCONF_ETK_D7 OMAP343X_PADCONF_ETK(9) 22562306a36Sopenharmony_ci#define OMAP343X_PADCONF_ETK_D8 OMAP343X_PADCONF_ETK(10) 22662306a36Sopenharmony_ci#define OMAP343X_PADCONF_ETK_D9 OMAP343X_PADCONF_ETK(11) 22762306a36Sopenharmony_ci#define OMAP343X_PADCONF_ETK_D10 OMAP343X_PADCONF_ETK(12) 22862306a36Sopenharmony_ci#define OMAP343X_PADCONF_ETK_D11 OMAP343X_PADCONF_ETK(13) 22962306a36Sopenharmony_ci#define OMAP343X_PADCONF_ETK_D12 OMAP343X_PADCONF_ETK(14) 23062306a36Sopenharmony_ci#define OMAP343X_PADCONF_ETK_D13 OMAP343X_PADCONF_ETK(15) 23162306a36Sopenharmony_ci#define OMAP343X_PADCONF_ETK_D14 OMAP343X_PADCONF_ETK(16) 23262306a36Sopenharmony_ci#define OMAP343X_PADCONF_ETK_D15 OMAP343X_PADCONF_ETK(17) 23362306a36Sopenharmony_ci 23462306a36Sopenharmony_ci/* 34xx GENERAL_WKUP register offsets */ 23562306a36Sopenharmony_ci#define OMAP34XX_CONTROL_WKUP_CTRL (OMAP343X_CONTROL_GENERAL_WKUP - 0x4) 23662306a36Sopenharmony_ci#define OMAP36XX_GPIO_IO_PWRDNZ BIT(6) 23762306a36Sopenharmony_ci 23862306a36Sopenharmony_ci#define OMAP343X_CONTROL_WKUP_DEBOBSMUX(i) (OMAP343X_CONTROL_GENERAL_WKUP + \ 23962306a36Sopenharmony_ci 0x008 + (i)) 24062306a36Sopenharmony_ci#define OMAP343X_CONTROL_WKUP_DEBOBS0 (OMAP343X_CONTROL_GENERAL_WKUP + 0x008) 24162306a36Sopenharmony_ci#define OMAP343X_CONTROL_WKUP_DEBOBS1 (OMAP343X_CONTROL_GENERAL_WKUP + 0x00C) 24262306a36Sopenharmony_ci#define OMAP343X_CONTROL_WKUP_DEBOBS2 (OMAP343X_CONTROL_GENERAL_WKUP + 0x010) 24362306a36Sopenharmony_ci#define OMAP343X_CONTROL_WKUP_DEBOBS3 (OMAP343X_CONTROL_GENERAL_WKUP + 0x014) 24462306a36Sopenharmony_ci#define OMAP343X_CONTROL_WKUP_DEBOBS4 (OMAP343X_CONTROL_GENERAL_WKUP + 0x018) 24562306a36Sopenharmony_ci 24662306a36Sopenharmony_ci/* 36xx-only RTA - Retention till Access control registers and bits */ 24762306a36Sopenharmony_ci#define OMAP36XX_CONTROL_MEM_RTA_CTRL 0x40C 24862306a36Sopenharmony_ci#define OMAP36XX_RTA_DISABLE 0x0 24962306a36Sopenharmony_ci 25062306a36Sopenharmony_ci/* 34xx D2D idle-related pins, handled by PM core */ 25162306a36Sopenharmony_ci#define OMAP3_PADCONF_SAD2D_MSTANDBY 0x250 25262306a36Sopenharmony_ci#define OMAP3_PADCONF_SAD2D_IDLEACK 0x254 25362306a36Sopenharmony_ci 25462306a36Sopenharmony_ci/* TI81XX CONTROL_DEVBOOT register offsets */ 25562306a36Sopenharmony_ci#define TI81XX_CONTROL_STATUS (TI81XX_CONTROL_DEVBOOT + 0x000) 25662306a36Sopenharmony_ci 25762306a36Sopenharmony_ci/* TI81XX CONTROL_DEVCONF register offsets */ 25862306a36Sopenharmony_ci#define TI81XX_CONTROL_DEVICE_ID (TI81XX_CONTROL_DEVCONF + 0x000) 25962306a36Sopenharmony_ci 26062306a36Sopenharmony_ci/* OMAP4 CONTROL MODULE */ 26162306a36Sopenharmony_ci#define OMAP4_CTRL_MODULE_PAD_WKUP 0x4a31e000 26262306a36Sopenharmony_ci#define OMAP4_CTRL_MODULE_PAD_WKUP_CONTROL_I2C_2 0x0604 26362306a36Sopenharmony_ci#define OMAP4_CTRL_MODULE_CORE_STATUS 0x02c4 26462306a36Sopenharmony_ci#define OMAP4_CTRL_MODULE_CORE_STD_FUSE_PROD_ID_1 0x0218 26562306a36Sopenharmony_ci#define OMAP4_CTRL_MODULE_CORE_DSP_BOOTADDR 0x0304 26662306a36Sopenharmony_ci#define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY 0x0618 26762306a36Sopenharmony_ci#define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_CAMERA_RX 0x0608 26862306a36Sopenharmony_ci 26962306a36Sopenharmony_ci/* OMAP4 CONTROL_DSIPHY */ 27062306a36Sopenharmony_ci#define OMAP4_DSI2_LANEENABLE_SHIFT 29 27162306a36Sopenharmony_ci#define OMAP4_DSI2_LANEENABLE_MASK (0x7 << 29) 27262306a36Sopenharmony_ci#define OMAP4_DSI1_LANEENABLE_SHIFT 24 27362306a36Sopenharmony_ci#define OMAP4_DSI1_LANEENABLE_MASK (0x1f << 24) 27462306a36Sopenharmony_ci#define OMAP4_DSI1_PIPD_SHIFT 19 27562306a36Sopenharmony_ci#define OMAP4_DSI1_PIPD_MASK (0x1f << 19) 27662306a36Sopenharmony_ci#define OMAP4_DSI2_PIPD_SHIFT 14 27762306a36Sopenharmony_ci#define OMAP4_DSI2_PIPD_MASK (0x1f << 14) 27862306a36Sopenharmony_ci 27962306a36Sopenharmony_ci/* OMAP4 CONTROL_CAMERA_RX */ 28062306a36Sopenharmony_ci#define OMAP4_CAMERARX_CSI21_LANEENABLE_SHIFT 24 28162306a36Sopenharmony_ci#define OMAP4_CAMERARX_CSI21_LANEENABLE_MASK (0x1f << 24) 28262306a36Sopenharmony_ci#define OMAP4_CAMERARX_CSI22_LANEENABLE_SHIFT 29 28362306a36Sopenharmony_ci#define OMAP4_CAMERARX_CSI22_LANEENABLE_MASK (0x3 << 29) 28462306a36Sopenharmony_ci#define OMAP4_CAMERARX_CSI22_CTRLCLKEN_SHIFT 21 28562306a36Sopenharmony_ci#define OMAP4_CAMERARX_CSI22_CTRLCLKEN_MASK (1 << 21) 28662306a36Sopenharmony_ci#define OMAP4_CAMERARX_CSI22_CAMMODE_SHIFT 19 28762306a36Sopenharmony_ci#define OMAP4_CAMERARX_CSI22_CAMMODE_MASK (0x3 << 19) 28862306a36Sopenharmony_ci#define OMAP4_CAMERARX_CSI21_CTRLCLKEN_SHIFT 18 28962306a36Sopenharmony_ci#define OMAP4_CAMERARX_CSI21_CTRLCLKEN_MASK (1 << 18) 29062306a36Sopenharmony_ci#define OMAP4_CAMERARX_CSI21_CAMMODE_SHIFT 16 29162306a36Sopenharmony_ci#define OMAP4_CAMERARX_CSI21_CAMMODE_MASK (0x3 << 16) 29262306a36Sopenharmony_ci 29362306a36Sopenharmony_ci/* OMAP54XX CONTROL STATUS register */ 29462306a36Sopenharmony_ci#define OMAP5XXX_CONTROL_STATUS 0x134 29562306a36Sopenharmony_ci#define OMAP5_DEVICETYPE_MASK (0x7 << 6) 29662306a36Sopenharmony_ci 29762306a36Sopenharmony_ci/* DRA7XX CONTROL CORE BOOTSTRAP */ 29862306a36Sopenharmony_ci#define DRA7_CTRL_CORE_BOOTSTRAP 0x6c4 29962306a36Sopenharmony_ci#define DRA7_SPEEDSELECT_MASK (0x3 << 8) 30062306a36Sopenharmony_ci 30162306a36Sopenharmony_ci/* 30262306a36Sopenharmony_ci * REVISIT: This list of registers is not comprehensive - there are more 30362306a36Sopenharmony_ci * that should be added. 30462306a36Sopenharmony_ci */ 30562306a36Sopenharmony_ci 30662306a36Sopenharmony_ci/* 30762306a36Sopenharmony_ci * Control module register bit defines - these should eventually go into 30862306a36Sopenharmony_ci * their own regbits file. Some of these will be complicated, depending 30962306a36Sopenharmony_ci * on the device type (general-purpose, emulator, test, secure, bad, other) 31062306a36Sopenharmony_ci * and the security mode (secure, non-secure, don't care) 31162306a36Sopenharmony_ci */ 31262306a36Sopenharmony_ci/* CONTROL_DEVCONF0 bits */ 31362306a36Sopenharmony_ci#define OMAP2_MMCSDIO1ADPCLKISEL (1 << 24) /* MMC1 loop back clock */ 31462306a36Sopenharmony_ci#define OMAP24XX_USBSTANDBYCTRL (1 << 15) 31562306a36Sopenharmony_ci#define OMAP2_MCBSP2_CLKS_MASK (1 << 6) 31662306a36Sopenharmony_ci#define OMAP2_MCBSP1_FSR_MASK (1 << 4) 31762306a36Sopenharmony_ci#define OMAP2_MCBSP1_CLKR_MASK (1 << 3) 31862306a36Sopenharmony_ci#define OMAP2_MCBSP1_CLKS_MASK (1 << 2) 31962306a36Sopenharmony_ci 32062306a36Sopenharmony_ci/* CONTROL_DEVCONF1 bits */ 32162306a36Sopenharmony_ci#define OMAP243X_MMC1_ACTIVE_OVERWRITE (1 << 31) 32262306a36Sopenharmony_ci#define OMAP2_MMCSDIO2ADPCLKISEL (1 << 6) /* MMC2 loop back clock */ 32362306a36Sopenharmony_ci#define OMAP2_MCBSP5_CLKS_MASK (1 << 4) /* > 242x */ 32462306a36Sopenharmony_ci#define OMAP2_MCBSP4_CLKS_MASK (1 << 2) /* > 242x */ 32562306a36Sopenharmony_ci#define OMAP2_MCBSP3_CLKS_MASK (1 << 0) /* > 242x */ 32662306a36Sopenharmony_ci 32762306a36Sopenharmony_ci/* CONTROL_STATUS bits */ 32862306a36Sopenharmony_ci#define OMAP2_DEVICETYPE_MASK (0x7 << 8) 32962306a36Sopenharmony_ci#define OMAP2_SYSBOOT_5_MASK (1 << 5) 33062306a36Sopenharmony_ci#define OMAP2_SYSBOOT_4_MASK (1 << 4) 33162306a36Sopenharmony_ci#define OMAP2_SYSBOOT_3_MASK (1 << 3) 33262306a36Sopenharmony_ci#define OMAP2_SYSBOOT_2_MASK (1 << 2) 33362306a36Sopenharmony_ci#define OMAP2_SYSBOOT_1_MASK (1 << 1) 33462306a36Sopenharmony_ci#define OMAP2_SYSBOOT_0_MASK (1 << 0) 33562306a36Sopenharmony_ci 33662306a36Sopenharmony_ci/* CONTROL_PBIAS_LITE bits */ 33762306a36Sopenharmony_ci#define OMAP343X_PBIASLITESUPPLY_HIGH1 (1 << 15) 33862306a36Sopenharmony_ci#define OMAP343X_PBIASLITEVMODEERROR1 (1 << 11) 33962306a36Sopenharmony_ci#define OMAP343X_PBIASSPEEDCTRL1 (1 << 10) 34062306a36Sopenharmony_ci#define OMAP343X_PBIASLITEPWRDNZ1 (1 << 9) 34162306a36Sopenharmony_ci#define OMAP343X_PBIASLITEVMODE1 (1 << 8) 34262306a36Sopenharmony_ci#define OMAP343X_PBIASLITESUPPLY_HIGH0 (1 << 7) 34362306a36Sopenharmony_ci#define OMAP343X_PBIASLITEVMODEERROR0 (1 << 3) 34462306a36Sopenharmony_ci#define OMAP2_PBIASSPEEDCTRL0 (1 << 2) 34562306a36Sopenharmony_ci#define OMAP2_PBIASLITEPWRDNZ0 (1 << 1) 34662306a36Sopenharmony_ci#define OMAP2_PBIASLITEVMODE0 (1 << 0) 34762306a36Sopenharmony_ci 34862306a36Sopenharmony_ci/* CONTROL_PROG_IO1 bits */ 34962306a36Sopenharmony_ci#define OMAP3630_PRG_SDMMC1_SPEEDCTRL (1 << 20) 35062306a36Sopenharmony_ci 35162306a36Sopenharmony_ci/* CONTROL_IVA2_BOOTMOD bits */ 35262306a36Sopenharmony_ci#define OMAP3_IVA2_BOOTMOD_SHIFT 0 35362306a36Sopenharmony_ci#define OMAP3_IVA2_BOOTMOD_MASK (0xf << 0) 35462306a36Sopenharmony_ci#define OMAP3_IVA2_BOOTMOD_IDLE (0x1 << 0) 35562306a36Sopenharmony_ci 35662306a36Sopenharmony_ci/* CONTROL_PADCONF_X bits */ 35762306a36Sopenharmony_ci#define OMAP3_PADCONF_WAKEUPEVENT0 (1 << 15) 35862306a36Sopenharmony_ci#define OMAP3_PADCONF_WAKEUPENABLE0 (1 << 14) 35962306a36Sopenharmony_ci 36062306a36Sopenharmony_ci#define OMAP343X_SCRATCHPAD_ROM (OMAP343X_CTRL_BASE + 0x860) 36162306a36Sopenharmony_ci#define OMAP343X_SCRATCHPAD (OMAP343X_CTRL_BASE + 0x910) 36262306a36Sopenharmony_ci#define OMAP343X_SCRATCHPAD_ROM_OFFSET 0x19C 36362306a36Sopenharmony_ci#define OMAP343X_SCRATCHPAD_REGADDR(reg) OMAP2_L4_IO_ADDRESS(\ 36462306a36Sopenharmony_ci OMAP343X_SCRATCHPAD + reg) 36562306a36Sopenharmony_ci 36662306a36Sopenharmony_ci/* AM35XX_CONTROL_IPSS_CLK_CTRL bits */ 36762306a36Sopenharmony_ci#define AM35XX_USBOTG_VBUSP_CLK_SHIFT 0 36862306a36Sopenharmony_ci#define AM35XX_CPGMAC_VBUSP_CLK_SHIFT 1 36962306a36Sopenharmony_ci#define AM35XX_VPFE_VBUSP_CLK_SHIFT 2 37062306a36Sopenharmony_ci#define AM35XX_HECC_VBUSP_CLK_SHIFT 3 37162306a36Sopenharmony_ci#define AM35XX_USBOTG_FCLK_SHIFT 8 37262306a36Sopenharmony_ci#define AM35XX_CPGMAC_FCLK_SHIFT 9 37362306a36Sopenharmony_ci#define AM35XX_VPFE_FCLK_SHIFT 10 37462306a36Sopenharmony_ci 37562306a36Sopenharmony_ci/* AM35XX CONTROL_LVL_INTR_CLEAR bits */ 37662306a36Sopenharmony_ci#define AM35XX_CPGMAC_C0_MISC_PULSE_CLR BIT(0) 37762306a36Sopenharmony_ci#define AM35XX_CPGMAC_C0_RX_PULSE_CLR BIT(1) 37862306a36Sopenharmony_ci#define AM35XX_CPGMAC_C0_RX_THRESH_CLR BIT(2) 37962306a36Sopenharmony_ci#define AM35XX_CPGMAC_C0_TX_PULSE_CLR BIT(3) 38062306a36Sopenharmony_ci#define AM35XX_USBOTGSS_INT_CLR BIT(4) 38162306a36Sopenharmony_ci#define AM35XX_VPFE_CCDC_VD0_INT_CLR BIT(5) 38262306a36Sopenharmony_ci#define AM35XX_VPFE_CCDC_VD1_INT_CLR BIT(6) 38362306a36Sopenharmony_ci#define AM35XX_VPFE_CCDC_VD2_INT_CLR BIT(7) 38462306a36Sopenharmony_ci 38562306a36Sopenharmony_ci/* AM35XX CONTROL_IP_SW_RESET bits */ 38662306a36Sopenharmony_ci#define AM35XX_USBOTGSS_SW_RST BIT(0) 38762306a36Sopenharmony_ci#define AM35XX_CPGMACSS_SW_RST BIT(1) 38862306a36Sopenharmony_ci#define AM35XX_VPFE_VBUSP_SW_RST BIT(2) 38962306a36Sopenharmony_ci#define AM35XX_HECC_SW_RST BIT(3) 39062306a36Sopenharmony_ci#define AM35XX_VPFE_PCLK_SW_RST BIT(4) 39162306a36Sopenharmony_ci 39262306a36Sopenharmony_ci/* AM33XX CONTROL_STATUS register */ 39362306a36Sopenharmony_ci#define AM33XX_CONTROL_STATUS 0x040 39462306a36Sopenharmony_ci#define AM33XX_CONTROL_SEC_CLK_CTRL 0x1bc 39562306a36Sopenharmony_ci 39662306a36Sopenharmony_ci/* AM33XX CONTROL_STATUS bitfields (partial) */ 39762306a36Sopenharmony_ci#define AM33XX_CONTROL_STATUS_SYSBOOT1_SHIFT 22 39862306a36Sopenharmony_ci#define AM33XX_CONTROL_STATUS_SYSBOOT1_WIDTH 0x2 39962306a36Sopenharmony_ci#define AM33XX_CONTROL_STATUS_SYSBOOT1_MASK (0x3 << 22) 40062306a36Sopenharmony_ci 40162306a36Sopenharmony_ci/* AM33XX PWMSS Control register */ 40262306a36Sopenharmony_ci#define AM33XX_PWMSS_TBCLK_CLKCTRL 0x664 40362306a36Sopenharmony_ci 40462306a36Sopenharmony_ci/* AM33XX PWMSS Control bitfields */ 40562306a36Sopenharmony_ci#define AM33XX_PWMSS0_TBCLKEN_SHIFT 0 40662306a36Sopenharmony_ci#define AM33XX_PWMSS1_TBCLKEN_SHIFT 1 40762306a36Sopenharmony_ci#define AM33XX_PWMSS2_TBCLKEN_SHIFT 2 40862306a36Sopenharmony_ci 40962306a36Sopenharmony_ci/* DEV Feature register to identify AM33XX features */ 41062306a36Sopenharmony_ci#define AM33XX_DEV_FEATURE 0x604 41162306a36Sopenharmony_ci#define AM33XX_SGX_MASK BIT(29) 41262306a36Sopenharmony_ci 41362306a36Sopenharmony_ci/* Additional AM33XX/AM43XX CONTROL registers */ 41462306a36Sopenharmony_ci#define AM33XX_CONTROL_SYSCONFIG_OFFSET 0x0010 41562306a36Sopenharmony_ci#define AM33XX_CONTROL_STATUS_OFFSET 0x0040 41662306a36Sopenharmony_ci#define AM43XX_CONTROL_MPU_L2_CTRL_OFFSET 0x01e0 41762306a36Sopenharmony_ci#define AM33XX_CONTROL_CORTEX_VBBLDO_CTRL_OFFSET 0x041c 41862306a36Sopenharmony_ci#define AM33XX_CONTROL_CORE_SLDO_CTRL_OFFSET 0x0428 41962306a36Sopenharmony_ci#define AM33XX_CONTROL_MPU_SLDO_CTRL_OFFSET 0x042c 42062306a36Sopenharmony_ci#define AM33XX_CONTROL_CLK32KDIVRATIO_CTRL_OFFSET 0x0444 42162306a36Sopenharmony_ci#define AM33XX_CONTROL_BANDGAP_CTRL_OFFSET 0x0448 42262306a36Sopenharmony_ci#define AM33XX_CONTROL_BANDGAP_TRIM_OFFSET 0x044c 42362306a36Sopenharmony_ci#define AM33XX_CONTROL_PLL_CLKINPULOW_CTRL_OFFSET 0x0458 42462306a36Sopenharmony_ci#define AM33XX_CONTROL_MOSC_CTRL_OFFSET 0x0468 42562306a36Sopenharmony_ci#define AM33XX_CONTROL_RCOSC_CTRL_OFFSET 0x046c 42662306a36Sopenharmony_ci#define AM33XX_CONTROL_DEEPSLEEP_CTRL_OFFSET 0x0470 42762306a36Sopenharmony_ci#define AM43XX_CONTROL_DISPLAY_PLL_SEL_OFFSET 0x0534 42862306a36Sopenharmony_ci#define AM33XX_CONTROL_INIT_PRIORITY_0_OFFSET 0x0608 42962306a36Sopenharmony_ci#define AM33XX_CONTROL_INIT_PRIORITY_1_OFFSET 0x060c 43062306a36Sopenharmony_ci#define AM33XX_CONTROL_MMU_CFG_OFFSET 0x0610 43162306a36Sopenharmony_ci#define AM33XX_CONTROL_TPTC_CFG_OFFSET 0x0614 43262306a36Sopenharmony_ci#define AM33XX_CONTROL_USB_CTRL0_OFFSET 0x0620 43362306a36Sopenharmony_ci#define AM33XX_CONTROL_USB_CTRL1_OFFSET 0x0628 43462306a36Sopenharmony_ci#define AM33XX_CONTROL_USB_WKUP_CTRL_OFFSET 0x0648 43562306a36Sopenharmony_ci#define AM43XX_CONTROL_USB_CTRL2_OFFSET 0x064c 43662306a36Sopenharmony_ci#define AM43XX_CONTROL_GMII_SEL_OFFSET 0x0650 43762306a36Sopenharmony_ci#define AM43XX_CONTROL_MPUSS_CTRL_OFFSET 0x0654 43862306a36Sopenharmony_ci#define AM43XX_CONTROL_TIMER_CASCADE_CTRL_OFFSET 0x0658 43962306a36Sopenharmony_ci#define AM43XX_CONTROL_PWMSS_CTRL_OFFSET 0x0664 44062306a36Sopenharmony_ci#define AM33XX_CONTROL_MREQPRIO_0_OFFSET 0x0670 44162306a36Sopenharmony_ci#define AM33XX_CONTROL_MREQPRIO_1_OFFSET 0x0674 44262306a36Sopenharmony_ci#define AM33XX_CONTROL_HW_EVENT_SEL_GRP1_OFFSET 0x0690 44362306a36Sopenharmony_ci#define AM33XX_CONTROL_HW_EVENT_SEL_GRP2_OFFSET 0x0694 44462306a36Sopenharmony_ci#define AM33XX_CONTROL_HW_EVENT_SEL_GRP3_OFFSET 0x0698 44562306a36Sopenharmony_ci#define AM33XX_CONTROL_HW_EVENT_SEL_GRP4_OFFSET 0x069c 44662306a36Sopenharmony_ci#define AM33XX_CONTROL_SMRT_CTRL_OFFSET 0x06a0 44762306a36Sopenharmony_ci#define AM33XX_CONTROL_MPUSS_HW_DEBUG_SEL_OFFSET 0x06a4 44862306a36Sopenharmony_ci#define AM43XX_CONTROL_CQDETECT_STS_OFFSET 0x0e00 44962306a36Sopenharmony_ci#define AM43XX_CONTROL_CQDETECT_STS2_OFFSET 0x0e08 45062306a36Sopenharmony_ci#define AM43XX_CONTROL_VTP_CTRL_OFFSET 0x0e0c 45162306a36Sopenharmony_ci#define AM33XX_CONTROL_VREF_CTRL_OFFSET 0x0e14 45262306a36Sopenharmony_ci#define AM33XX_CONTROL_TPCC_EVT_MUX_0_3_OFFSET 0x0f90 45362306a36Sopenharmony_ci#define AM33XX_CONTROL_TPCC_EVT_MUX_4_7_OFFSET 0x0f94 45462306a36Sopenharmony_ci#define AM33XX_CONTROL_TPCC_EVT_MUX_8_11_OFFSET 0x0f98 45562306a36Sopenharmony_ci#define AM33XX_CONTROL_TPCC_EVT_MUX_12_15_OFFSET 0x0f9c 45662306a36Sopenharmony_ci#define AM33XX_CONTROL_TPCC_EVT_MUX_16_19_OFFSET 0x0fa0 45762306a36Sopenharmony_ci#define AM33XX_CONTROL_TPCC_EVT_MUX_20_23_OFFSET 0x0fa4 45862306a36Sopenharmony_ci#define AM33XX_CONTROL_TPCC_EVT_MUX_24_27_OFFSET 0x0fa8 45962306a36Sopenharmony_ci#define AM33XX_CONTROL_TPCC_EVT_MUX_28_31_OFFSET 0x0fac 46062306a36Sopenharmony_ci#define AM33XX_CONTROL_TPCC_EVT_MUX_32_35_OFFSET 0x0fb0 46162306a36Sopenharmony_ci#define AM33XX_CONTROL_TPCC_EVT_MUX_36_39_OFFSET 0x0fb4 46262306a36Sopenharmony_ci#define AM33XX_CONTROL_TPCC_EVT_MUX_40_43_OFFSET 0x0fb8 46362306a36Sopenharmony_ci#define AM33XX_CONTROL_TPCC_EVT_MUX_44_47_OFFSET 0x0fbc 46462306a36Sopenharmony_ci#define AM33XX_CONTROL_TPCC_EVT_MUX_48_51_OFFSET 0x0fc0 46562306a36Sopenharmony_ci#define AM33XX_CONTROL_TPCC_EVT_MUX_52_55_OFFSET 0x0fc4 46662306a36Sopenharmony_ci#define AM33XX_CONTROL_TPCC_EVT_MUX_56_59_OFFSET 0x0fc8 46762306a36Sopenharmony_ci#define AM33XX_CONTROL_TPCC_EVT_MUX_60_63_OFFSET 0x0fcc 46862306a36Sopenharmony_ci#define AM33XX_CONTROL_TIMER_EVT_CAPT_OFFSET 0x0fd0 46962306a36Sopenharmony_ci#define AM33XX_CONTROL_ECAP_EVT_CAPT_OFFSET 0x0fd4 47062306a36Sopenharmony_ci#define AM33XX_CONTROL_ADC_EVT_CAPT_OFFSET 0x0fd8 47162306a36Sopenharmony_ci#define AM43XX_CONTROL_ADC1_EVT_CAPT_OFFSET 0x0fdc 47262306a36Sopenharmony_ci#define AM33XX_CONTROL_RESET_ISO_OFFSET 0x1000 47362306a36Sopenharmony_ci 47462306a36Sopenharmony_ci/* CONTROL OMAP STATUS register to identify OMAP3 features */ 47562306a36Sopenharmony_ci#define OMAP3_CONTROL_OMAP_STATUS 0x044c 47662306a36Sopenharmony_ci 47762306a36Sopenharmony_ci#define OMAP3_SGX_SHIFT 13 47862306a36Sopenharmony_ci#define OMAP3_SGX_MASK (3 << OMAP3_SGX_SHIFT) 47962306a36Sopenharmony_ci#define FEAT_SGX_FULL 0 48062306a36Sopenharmony_ci#define FEAT_SGX_HALF 1 48162306a36Sopenharmony_ci#define FEAT_SGX_NONE 2 48262306a36Sopenharmony_ci 48362306a36Sopenharmony_ci#define OMAP3_IVA_SHIFT 12 48462306a36Sopenharmony_ci#define OMAP3_IVA_MASK (1 << OMAP3_IVA_SHIFT) 48562306a36Sopenharmony_ci#define FEAT_IVA 0 48662306a36Sopenharmony_ci#define FEAT_IVA_NONE 1 48762306a36Sopenharmony_ci 48862306a36Sopenharmony_ci#define OMAP3_L2CACHE_SHIFT 10 48962306a36Sopenharmony_ci#define OMAP3_L2CACHE_MASK (3 << OMAP3_L2CACHE_SHIFT) 49062306a36Sopenharmony_ci#define FEAT_L2CACHE_NONE 0 49162306a36Sopenharmony_ci#define FEAT_L2CACHE_64KB 1 49262306a36Sopenharmony_ci#define FEAT_L2CACHE_128KB 2 49362306a36Sopenharmony_ci#define FEAT_L2CACHE_256KB 3 49462306a36Sopenharmony_ci 49562306a36Sopenharmony_ci#define OMAP3_ISP_SHIFT 5 49662306a36Sopenharmony_ci#define OMAP3_ISP_MASK (1 << OMAP3_ISP_SHIFT) 49762306a36Sopenharmony_ci#define FEAT_ISP 0 49862306a36Sopenharmony_ci#define FEAT_ISP_NONE 1 49962306a36Sopenharmony_ci 50062306a36Sopenharmony_ci#define OMAP3_NEON_SHIFT 4 50162306a36Sopenharmony_ci#define OMAP3_NEON_MASK (1 << OMAP3_NEON_SHIFT) 50262306a36Sopenharmony_ci#define FEAT_NEON 0 50362306a36Sopenharmony_ci#define FEAT_NEON_NONE 1 50462306a36Sopenharmony_ci 50562306a36Sopenharmony_ci 50662306a36Sopenharmony_ci#ifndef __ASSEMBLY__ 50762306a36Sopenharmony_ci#ifdef CONFIG_ARCH_OMAP2PLUS 50862306a36Sopenharmony_ciextern u8 omap_ctrl_readb(u16 offset); 50962306a36Sopenharmony_ciextern u16 omap_ctrl_readw(u16 offset); 51062306a36Sopenharmony_ciextern u32 omap_ctrl_readl(u16 offset); 51162306a36Sopenharmony_ciextern void omap_ctrl_writeb(u8 val, u16 offset); 51262306a36Sopenharmony_ciextern void omap_ctrl_writew(u16 val, u16 offset); 51362306a36Sopenharmony_ciextern void omap_ctrl_writel(u32 val, u16 offset); 51462306a36Sopenharmony_ci 51562306a36Sopenharmony_ciextern void omap3_restore(void); 51662306a36Sopenharmony_ciextern void omap3_restore_es3(void); 51762306a36Sopenharmony_ciextern void omap3_restore_3630(void); 51862306a36Sopenharmony_ciextern u32 omap3_arm_context[128]; 51962306a36Sopenharmony_ciextern void omap3_control_save_context(void); 52062306a36Sopenharmony_ciextern void omap3_control_restore_context(void); 52162306a36Sopenharmony_ciextern void omap3_ctrl_write_boot_mode(u8 bootmode); 52262306a36Sopenharmony_ciextern void omap3630_ctrl_disable_rta(void); 52362306a36Sopenharmony_ciextern int omap3_ctrl_save_padconf(void); 52462306a36Sopenharmony_civoid omap3_ctrl_init(void); 52562306a36Sopenharmony_ciint omap2_control_base_init(void); 52662306a36Sopenharmony_ciint omap_control_init(void); 52762306a36Sopenharmony_ci#else 52862306a36Sopenharmony_ci#define omap_ctrl_readb(x) 0 52962306a36Sopenharmony_ci#define omap_ctrl_readw(x) 0 53062306a36Sopenharmony_ci#define omap_ctrl_readl(x) 0 53162306a36Sopenharmony_ci#define omap4_ctrl_pad_readl(x) 0 53262306a36Sopenharmony_ci#define omap_ctrl_writeb(x, y) WARN_ON(1) 53362306a36Sopenharmony_ci#define omap_ctrl_writew(x, y) WARN_ON(1) 53462306a36Sopenharmony_ci#define omap_ctrl_writel(x, y) WARN_ON(1) 53562306a36Sopenharmony_ci#define omap4_ctrl_pad_writel(x, y) WARN_ON(1) 53662306a36Sopenharmony_ci#endif 53762306a36Sopenharmony_ci#endif /* __ASSEMBLY__ */ 53862306a36Sopenharmony_ci 53962306a36Sopenharmony_ci#endif /* __ARCH_ARM_MACH_OMAP2_CONTROL_H */ 54062306a36Sopenharmony_ci 541