blob: 246f1e5da99fbd729f7702b2adac667fffe98eaf [file] [log] [blame]
Thomas Gleixnerd2912cb2019-06-04 10:11:33 +02001// SPDX-License-Identifier: GPL-2.0-only
Thara Gopinath358f0e62010-02-24 12:05:58 -07002/*
3 * omap_hwmod common data structures
4 *
5 * Copyright (C) 2010 Texas Instruments, Inc.
6 * Thara Gopinath <thara@ti.com>
Paul Walmsley43b40992010-02-22 22:09:34 -07007 * BenoƮt Cousson
8 *
9 * Copyright (C) 2010 Nokia Corporation
10 * Paul Walmsley
Thara Gopinath358f0e62010-02-24 12:05:58 -070011 *
Thara Gopinath358f0e62010-02-24 12:05:58 -070012 * This data/structures are to be used while defining OMAP on-chip module
13 * data and their integration with other OMAP modules and Linux.
14 */
15
Tony Lindgren49a0a3d2017-12-15 09:41:05 -080016#include <linux/types.h>
17#include <linux/platform_data/ti-sysc.h>
18
Tony Lindgren2a296c82012-10-02 17:41:35 -070019#include "omap_hwmod.h"
Thara Gopinath358f0e62010-02-24 12:05:58 -070020
Paul Walmsley43b40992010-02-22 22:09:34 -070021#include "omap_hwmod_common_data.h"
22
Thara Gopinath358f0e62010-02-24 12:05:58 -070023/**
24 * struct omap_hwmod_sysc_type1 - TYPE1 sysconfig scheme.
25 *
26 * To be used by hwmod structure to specify the sysconfig offsets
27 * if the device ip is compliant with the original PRCM protocol
28 * defined for OMAP2420.
29 */
Tony Lindgren49a0a3d2017-12-15 09:41:05 -080030struct sysc_regbits omap_hwmod_sysc_type1 = {
Thara Gopinath358f0e62010-02-24 12:05:58 -070031 .midle_shift = SYSC_TYPE1_MIDLEMODE_SHIFT,
32 .clkact_shift = SYSC_TYPE1_CLOCKACTIVITY_SHIFT,
33 .sidle_shift = SYSC_TYPE1_SIDLEMODE_SHIFT,
34 .enwkup_shift = SYSC_TYPE1_ENAWAKEUP_SHIFT,
35 .srst_shift = SYSC_TYPE1_SOFTRESET_SHIFT,
36 .autoidle_shift = SYSC_TYPE1_AUTOIDLE_SHIFT,
37};
38
39/**
40 * struct omap_hwmod_sysc_type2 - TYPE2 sysconfig scheme.
41 *
42 * To be used by hwmod structure to specify the sysconfig offsets if the
43 * device ip is compliant with the new PRCM protocol defined for new
44 * OMAP4 IPs.
45 */
Tony Lindgren49a0a3d2017-12-15 09:41:05 -080046struct sysc_regbits omap_hwmod_sysc_type2 = {
Thara Gopinath358f0e62010-02-24 12:05:58 -070047 .midle_shift = SYSC_TYPE2_MIDLEMODE_SHIFT,
48 .sidle_shift = SYSC_TYPE2_SIDLEMODE_SHIFT,
49 .srst_shift = SYSC_TYPE2_SOFTRESET_SHIFT,
Kishon Vijay Abraham I66685462012-07-04 05:09:21 -060050 .dmadisable_shift = SYSC_TYPE2_DMADISABLE_SHIFT,
Thara Gopinath358f0e62010-02-24 12:05:58 -070051};
Paul Walmsley43b40992010-02-22 22:09:34 -070052
Vaibhav Hiremath248b3b32012-07-04 03:40:59 -060053/**
54 * struct omap_hwmod_sysc_type3 - TYPE3 sysconfig scheme.
55 * Used by some IPs on AM33xx
56 */
Tony Lindgren49a0a3d2017-12-15 09:41:05 -080057struct sysc_regbits omap_hwmod_sysc_type3 = {
Vaibhav Hiremath248b3b32012-07-04 03:40:59 -060058 .midle_shift = SYSC_TYPE3_MIDLEMODE_SHIFT,
59 .sidle_shift = SYSC_TYPE3_SIDLEMODE_SHIFT,
60};
61
Archit Tanejab923d402011-10-06 18:04:08 -060062struct omap_dss_dispc_dev_attr omap2_3_dss_dispc_dev_attr = {
63 .manager_count = 2,
64 .has_framedonetv_irq = 0
65};
Tony Lindgrenbf807052017-12-15 09:41:01 -080066
Tony Lindgren49a0a3d2017-12-15 09:41:05 -080067struct sysc_regbits omap34xx_sr_sysc_fields = {
Tony Lindgrenbf807052017-12-15 09:41:01 -080068 .clkact_shift = 20,
69};
70
Tony Lindgren49a0a3d2017-12-15 09:41:05 -080071struct sysc_regbits omap36xx_sr_sysc_fields = {
Tony Lindgrenbf807052017-12-15 09:41:01 -080072 .sidle_shift = 24,
73 .enwkup_shift = 26,
74};
75
Tony Lindgren49a0a3d2017-12-15 09:41:05 -080076struct sysc_regbits omap3_sham_sysc_fields = {
Tony Lindgrenbf807052017-12-15 09:41:01 -080077 .sidle_shift = 4,
78 .srst_shift = 1,
79 .autoidle_shift = 0,
80};
81
Tony Lindgren49a0a3d2017-12-15 09:41:05 -080082struct sysc_regbits omap3xxx_aes_sysc_fields = {
Tony Lindgrenbf807052017-12-15 09:41:01 -080083 .sidle_shift = 6,
84 .srst_shift = 1,
85 .autoidle_shift = 0,
86};
87
Tony Lindgren49a0a3d2017-12-15 09:41:05 -080088struct sysc_regbits omap_hwmod_sysc_type_mcasp = {
Tony Lindgrenbf807052017-12-15 09:41:01 -080089 .sidle_shift = 0,
90};
91
Tony Lindgren49a0a3d2017-12-15 09:41:05 -080092struct sysc_regbits omap_hwmod_sysc_type_usb_host_fs = {
Tony Lindgrenbf807052017-12-15 09:41:01 -080093 .midle_shift = 4,
94 .sidle_shift = 2,
95 .srst_shift = 1,
96};