diff options
author | Benoit Cousson <b-cousson@ti.com> | 2010-12-07 19:26:57 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-12-07 19:26:57 -0500 |
commit | 9780a9cfa7b1f913d5f7099290e77b381a8b01d5 (patch) | |
tree | d41f26f49b1d652dc58c7d94c39ef5e0bab22654 /arch | |
parent | 70034d38fbfd0f98a49367d36aa72f776a9e663a (diff) |
OMAP4: hwmod data: Add GPIO
Add GPIO hwmod data for OMAP4
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Charulatha V <charu@ti.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 341 |
1 files changed, 341 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index 0d5c6eb7e4c1..d258936410fb 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <plat/omap_hwmod.h> | 23 | #include <plat/omap_hwmod.h> |
24 | #include <plat/cpu.h> | 24 | #include <plat/cpu.h> |
25 | #include <plat/gpio.h> | ||
25 | 26 | ||
26 | #include "omap_hwmod_common_data.h" | 27 | #include "omap_hwmod_common_data.h" |
27 | 28 | ||
@@ -1043,6 +1044,338 @@ static struct omap_hwmod omap44xx_uart4_hwmod = { | |||
1043 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 1044 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
1044 | }; | 1045 | }; |
1045 | 1046 | ||
1047 | /* | ||
1048 | * 'gpio' class | ||
1049 | * general purpose io module | ||
1050 | */ | ||
1051 | |||
1052 | static struct omap_hwmod_class_sysconfig omap44xx_gpio_sysc = { | ||
1053 | .rev_offs = 0x0000, | ||
1054 | .sysc_offs = 0x0010, | ||
1055 | .syss_offs = 0x0114, | ||
1056 | .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE | | ||
1057 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
1058 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
1059 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1060 | }; | ||
1061 | |||
1062 | static struct omap_hwmod_class omap44xx_gpio_hwmod_class = { | ||
1063 | .name = "gpio", | ||
1064 | .sysc = &omap44xx_gpio_sysc, | ||
1065 | .rev = 2, | ||
1066 | }; | ||
1067 | |||
1068 | /* gpio dev_attr */ | ||
1069 | static struct omap_gpio_dev_attr gpio_dev_attr = { | ||
1070 | .bank_width = 32, | ||
1071 | .dbck_flag = true, | ||
1072 | }; | ||
1073 | |||
1074 | /* gpio1 */ | ||
1075 | static struct omap_hwmod omap44xx_gpio1_hwmod; | ||
1076 | static struct omap_hwmod_irq_info omap44xx_gpio1_irqs[] = { | ||
1077 | { .irq = 29 + OMAP44XX_IRQ_GIC_START }, | ||
1078 | }; | ||
1079 | |||
1080 | static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = { | ||
1081 | { | ||
1082 | .pa_start = 0x4a310000, | ||
1083 | .pa_end = 0x4a3101ff, | ||
1084 | .flags = ADDR_TYPE_RT | ||
1085 | }, | ||
1086 | }; | ||
1087 | |||
1088 | /* l4_wkup -> gpio1 */ | ||
1089 | static struct omap_hwmod_ocp_if omap44xx_l4_wkup__gpio1 = { | ||
1090 | .master = &omap44xx_l4_wkup_hwmod, | ||
1091 | .slave = &omap44xx_gpio1_hwmod, | ||
1092 | .addr = omap44xx_gpio1_addrs, | ||
1093 | .addr_cnt = ARRAY_SIZE(omap44xx_gpio1_addrs), | ||
1094 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1095 | }; | ||
1096 | |||
1097 | /* gpio1 slave ports */ | ||
1098 | static struct omap_hwmod_ocp_if *omap44xx_gpio1_slaves[] = { | ||
1099 | &omap44xx_l4_wkup__gpio1, | ||
1100 | }; | ||
1101 | |||
1102 | static struct omap_hwmod_opt_clk gpio1_opt_clks[] = { | ||
1103 | { .role = "dbclk", .clk = "sys_32k_ck" }, | ||
1104 | }; | ||
1105 | |||
1106 | static struct omap_hwmod omap44xx_gpio1_hwmod = { | ||
1107 | .name = "gpio1", | ||
1108 | .class = &omap44xx_gpio_hwmod_class, | ||
1109 | .mpu_irqs = omap44xx_gpio1_irqs, | ||
1110 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio1_irqs), | ||
1111 | .main_clk = "gpio1_ick", | ||
1112 | .prcm = { | ||
1113 | .omap4 = { | ||
1114 | .clkctrl_reg = OMAP4430_CM_WKUP_GPIO1_CLKCTRL, | ||
1115 | }, | ||
1116 | }, | ||
1117 | .opt_clks = gpio1_opt_clks, | ||
1118 | .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks), | ||
1119 | .dev_attr = &gpio_dev_attr, | ||
1120 | .slaves = omap44xx_gpio1_slaves, | ||
1121 | .slaves_cnt = ARRAY_SIZE(omap44xx_gpio1_slaves), | ||
1122 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
1123 | }; | ||
1124 | |||
1125 | /* gpio2 */ | ||
1126 | static struct omap_hwmod omap44xx_gpio2_hwmod; | ||
1127 | static struct omap_hwmod_irq_info omap44xx_gpio2_irqs[] = { | ||
1128 | { .irq = 30 + OMAP44XX_IRQ_GIC_START }, | ||
1129 | }; | ||
1130 | |||
1131 | static struct omap_hwmod_addr_space omap44xx_gpio2_addrs[] = { | ||
1132 | { | ||
1133 | .pa_start = 0x48055000, | ||
1134 | .pa_end = 0x480551ff, | ||
1135 | .flags = ADDR_TYPE_RT | ||
1136 | }, | ||
1137 | }; | ||
1138 | |||
1139 | /* l4_per -> gpio2 */ | ||
1140 | static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio2 = { | ||
1141 | .master = &omap44xx_l4_per_hwmod, | ||
1142 | .slave = &omap44xx_gpio2_hwmod, | ||
1143 | .addr = omap44xx_gpio2_addrs, | ||
1144 | .addr_cnt = ARRAY_SIZE(omap44xx_gpio2_addrs), | ||
1145 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1146 | }; | ||
1147 | |||
1148 | /* gpio2 slave ports */ | ||
1149 | static struct omap_hwmod_ocp_if *omap44xx_gpio2_slaves[] = { | ||
1150 | &omap44xx_l4_per__gpio2, | ||
1151 | }; | ||
1152 | |||
1153 | static struct omap_hwmod_opt_clk gpio2_opt_clks[] = { | ||
1154 | { .role = "dbclk", .clk = "sys_32k_ck" }, | ||
1155 | }; | ||
1156 | |||
1157 | static struct omap_hwmod omap44xx_gpio2_hwmod = { | ||
1158 | .name = "gpio2", | ||
1159 | .class = &omap44xx_gpio_hwmod_class, | ||
1160 | .mpu_irqs = omap44xx_gpio2_irqs, | ||
1161 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio2_irqs), | ||
1162 | .main_clk = "gpio2_ick", | ||
1163 | .prcm = { | ||
1164 | .omap4 = { | ||
1165 | .clkctrl_reg = OMAP4430_CM_L4PER_GPIO2_CLKCTRL, | ||
1166 | }, | ||
1167 | }, | ||
1168 | .opt_clks = gpio2_opt_clks, | ||
1169 | .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks), | ||
1170 | .dev_attr = &gpio_dev_attr, | ||
1171 | .slaves = omap44xx_gpio2_slaves, | ||
1172 | .slaves_cnt = ARRAY_SIZE(omap44xx_gpio2_slaves), | ||
1173 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
1174 | }; | ||
1175 | |||
1176 | /* gpio3 */ | ||
1177 | static struct omap_hwmod omap44xx_gpio3_hwmod; | ||
1178 | static struct omap_hwmod_irq_info omap44xx_gpio3_irqs[] = { | ||
1179 | { .irq = 31 + OMAP44XX_IRQ_GIC_START }, | ||
1180 | }; | ||
1181 | |||
1182 | static struct omap_hwmod_addr_space omap44xx_gpio3_addrs[] = { | ||
1183 | { | ||
1184 | .pa_start = 0x48057000, | ||
1185 | .pa_end = 0x480571ff, | ||
1186 | .flags = ADDR_TYPE_RT | ||
1187 | }, | ||
1188 | }; | ||
1189 | |||
1190 | /* l4_per -> gpio3 */ | ||
1191 | static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio3 = { | ||
1192 | .master = &omap44xx_l4_per_hwmod, | ||
1193 | .slave = &omap44xx_gpio3_hwmod, | ||
1194 | .addr = omap44xx_gpio3_addrs, | ||
1195 | .addr_cnt = ARRAY_SIZE(omap44xx_gpio3_addrs), | ||
1196 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1197 | }; | ||
1198 | |||
1199 | /* gpio3 slave ports */ | ||
1200 | static struct omap_hwmod_ocp_if *omap44xx_gpio3_slaves[] = { | ||
1201 | &omap44xx_l4_per__gpio3, | ||
1202 | }; | ||
1203 | |||
1204 | static struct omap_hwmod_opt_clk gpio3_opt_clks[] = { | ||
1205 | { .role = "dbclk", .clk = "sys_32k_ck" }, | ||
1206 | }; | ||
1207 | |||
1208 | static struct omap_hwmod omap44xx_gpio3_hwmod = { | ||
1209 | .name = "gpio3", | ||
1210 | .class = &omap44xx_gpio_hwmod_class, | ||
1211 | .mpu_irqs = omap44xx_gpio3_irqs, | ||
1212 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio3_irqs), | ||
1213 | .main_clk = "gpio3_ick", | ||
1214 | .prcm = { | ||
1215 | .omap4 = { | ||
1216 | .clkctrl_reg = OMAP4430_CM_L4PER_GPIO3_CLKCTRL, | ||
1217 | }, | ||
1218 | }, | ||
1219 | .opt_clks = gpio3_opt_clks, | ||
1220 | .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks), | ||
1221 | .dev_attr = &gpio_dev_attr, | ||
1222 | .slaves = omap44xx_gpio3_slaves, | ||
1223 | .slaves_cnt = ARRAY_SIZE(omap44xx_gpio3_slaves), | ||
1224 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
1225 | }; | ||
1226 | |||
1227 | /* gpio4 */ | ||
1228 | static struct omap_hwmod omap44xx_gpio4_hwmod; | ||
1229 | static struct omap_hwmod_irq_info omap44xx_gpio4_irqs[] = { | ||
1230 | { .irq = 32 + OMAP44XX_IRQ_GIC_START }, | ||
1231 | }; | ||
1232 | |||
1233 | static struct omap_hwmod_addr_space omap44xx_gpio4_addrs[] = { | ||
1234 | { | ||
1235 | .pa_start = 0x48059000, | ||
1236 | .pa_end = 0x480591ff, | ||
1237 | .flags = ADDR_TYPE_RT | ||
1238 | }, | ||
1239 | }; | ||
1240 | |||
1241 | /* l4_per -> gpio4 */ | ||
1242 | static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio4 = { | ||
1243 | .master = &omap44xx_l4_per_hwmod, | ||
1244 | .slave = &omap44xx_gpio4_hwmod, | ||
1245 | .addr = omap44xx_gpio4_addrs, | ||
1246 | .addr_cnt = ARRAY_SIZE(omap44xx_gpio4_addrs), | ||
1247 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1248 | }; | ||
1249 | |||
1250 | /* gpio4 slave ports */ | ||
1251 | static struct omap_hwmod_ocp_if *omap44xx_gpio4_slaves[] = { | ||
1252 | &omap44xx_l4_per__gpio4, | ||
1253 | }; | ||
1254 | |||
1255 | static struct omap_hwmod_opt_clk gpio4_opt_clks[] = { | ||
1256 | { .role = "dbclk", .clk = "sys_32k_ck" }, | ||
1257 | }; | ||
1258 | |||
1259 | static struct omap_hwmod omap44xx_gpio4_hwmod = { | ||
1260 | .name = "gpio4", | ||
1261 | .class = &omap44xx_gpio_hwmod_class, | ||
1262 | .mpu_irqs = omap44xx_gpio4_irqs, | ||
1263 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio4_irqs), | ||
1264 | .main_clk = "gpio4_ick", | ||
1265 | .prcm = { | ||
1266 | .omap4 = { | ||
1267 | .clkctrl_reg = OMAP4430_CM_L4PER_GPIO4_CLKCTRL, | ||
1268 | }, | ||
1269 | }, | ||
1270 | .opt_clks = gpio4_opt_clks, | ||
1271 | .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks), | ||
1272 | .dev_attr = &gpio_dev_attr, | ||
1273 | .slaves = omap44xx_gpio4_slaves, | ||
1274 | .slaves_cnt = ARRAY_SIZE(omap44xx_gpio4_slaves), | ||
1275 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
1276 | }; | ||
1277 | |||
1278 | /* gpio5 */ | ||
1279 | static struct omap_hwmod omap44xx_gpio5_hwmod; | ||
1280 | static struct omap_hwmod_irq_info omap44xx_gpio5_irqs[] = { | ||
1281 | { .irq = 33 + OMAP44XX_IRQ_GIC_START }, | ||
1282 | }; | ||
1283 | |||
1284 | static struct omap_hwmod_addr_space omap44xx_gpio5_addrs[] = { | ||
1285 | { | ||
1286 | .pa_start = 0x4805b000, | ||
1287 | .pa_end = 0x4805b1ff, | ||
1288 | .flags = ADDR_TYPE_RT | ||
1289 | }, | ||
1290 | }; | ||
1291 | |||
1292 | /* l4_per -> gpio5 */ | ||
1293 | static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio5 = { | ||
1294 | .master = &omap44xx_l4_per_hwmod, | ||
1295 | .slave = &omap44xx_gpio5_hwmod, | ||
1296 | .addr = omap44xx_gpio5_addrs, | ||
1297 | .addr_cnt = ARRAY_SIZE(omap44xx_gpio5_addrs), | ||
1298 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1299 | }; | ||
1300 | |||
1301 | /* gpio5 slave ports */ | ||
1302 | static struct omap_hwmod_ocp_if *omap44xx_gpio5_slaves[] = { | ||
1303 | &omap44xx_l4_per__gpio5, | ||
1304 | }; | ||
1305 | |||
1306 | static struct omap_hwmod_opt_clk gpio5_opt_clks[] = { | ||
1307 | { .role = "dbclk", .clk = "sys_32k_ck" }, | ||
1308 | }; | ||
1309 | |||
1310 | static struct omap_hwmod omap44xx_gpio5_hwmod = { | ||
1311 | .name = "gpio5", | ||
1312 | .class = &omap44xx_gpio_hwmod_class, | ||
1313 | .mpu_irqs = omap44xx_gpio5_irqs, | ||
1314 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio5_irqs), | ||
1315 | .main_clk = "gpio5_ick", | ||
1316 | .prcm = { | ||
1317 | .omap4 = { | ||
1318 | .clkctrl_reg = OMAP4430_CM_L4PER_GPIO5_CLKCTRL, | ||
1319 | }, | ||
1320 | }, | ||
1321 | .opt_clks = gpio5_opt_clks, | ||
1322 | .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks), | ||
1323 | .dev_attr = &gpio_dev_attr, | ||
1324 | .slaves = omap44xx_gpio5_slaves, | ||
1325 | .slaves_cnt = ARRAY_SIZE(omap44xx_gpio5_slaves), | ||
1326 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
1327 | }; | ||
1328 | |||
1329 | /* gpio6 */ | ||
1330 | static struct omap_hwmod omap44xx_gpio6_hwmod; | ||
1331 | static struct omap_hwmod_irq_info omap44xx_gpio6_irqs[] = { | ||
1332 | { .irq = 34 + OMAP44XX_IRQ_GIC_START }, | ||
1333 | }; | ||
1334 | |||
1335 | static struct omap_hwmod_addr_space omap44xx_gpio6_addrs[] = { | ||
1336 | { | ||
1337 | .pa_start = 0x4805d000, | ||
1338 | .pa_end = 0x4805d1ff, | ||
1339 | .flags = ADDR_TYPE_RT | ||
1340 | }, | ||
1341 | }; | ||
1342 | |||
1343 | /* l4_per -> gpio6 */ | ||
1344 | static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio6 = { | ||
1345 | .master = &omap44xx_l4_per_hwmod, | ||
1346 | .slave = &omap44xx_gpio6_hwmod, | ||
1347 | .addr = omap44xx_gpio6_addrs, | ||
1348 | .addr_cnt = ARRAY_SIZE(omap44xx_gpio6_addrs), | ||
1349 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1350 | }; | ||
1351 | |||
1352 | /* gpio6 slave ports */ | ||
1353 | static struct omap_hwmod_ocp_if *omap44xx_gpio6_slaves[] = { | ||
1354 | &omap44xx_l4_per__gpio6, | ||
1355 | }; | ||
1356 | |||
1357 | static struct omap_hwmod_opt_clk gpio6_opt_clks[] = { | ||
1358 | { .role = "dbclk", .clk = "sys_32k_ck" }, | ||
1359 | }; | ||
1360 | |||
1361 | static struct omap_hwmod omap44xx_gpio6_hwmod = { | ||
1362 | .name = "gpio6", | ||
1363 | .class = &omap44xx_gpio_hwmod_class, | ||
1364 | .mpu_irqs = omap44xx_gpio6_irqs, | ||
1365 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio6_irqs), | ||
1366 | .main_clk = "gpio6_ick", | ||
1367 | .prcm = { | ||
1368 | .omap4 = { | ||
1369 | .clkctrl_reg = OMAP4430_CM_L4PER_GPIO6_CLKCTRL, | ||
1370 | }, | ||
1371 | }, | ||
1372 | .opt_clks = gpio6_opt_clks, | ||
1373 | .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks), | ||
1374 | .dev_attr = &gpio_dev_attr, | ||
1375 | .slaves = omap44xx_gpio6_slaves, | ||
1376 | .slaves_cnt = ARRAY_SIZE(omap44xx_gpio6_slaves), | ||
1377 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
1378 | }; | ||
1046 | static __initdata struct omap_hwmod *omap44xx_hwmods[] = { | 1379 | static __initdata struct omap_hwmod *omap44xx_hwmods[] = { |
1047 | /* dmm class */ | 1380 | /* dmm class */ |
1048 | &omap44xx_dmm_hwmod, | 1381 | &omap44xx_dmm_hwmod, |
@@ -1066,6 +1399,14 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = { | |||
1066 | /* mpu_bus class */ | 1399 | /* mpu_bus class */ |
1067 | &omap44xx_mpu_private_hwmod, | 1400 | &omap44xx_mpu_private_hwmod, |
1068 | 1401 | ||
1402 | /* gpio class */ | ||
1403 | &omap44xx_gpio1_hwmod, | ||
1404 | &omap44xx_gpio2_hwmod, | ||
1405 | &omap44xx_gpio3_hwmod, | ||
1406 | &omap44xx_gpio4_hwmod, | ||
1407 | &omap44xx_gpio5_hwmod, | ||
1408 | &omap44xx_gpio6_hwmod, | ||
1409 | |||
1069 | /* mpu class */ | 1410 | /* mpu class */ |
1070 | &omap44xx_mpu_hwmod, | 1411 | &omap44xx_mpu_hwmod, |
1071 | /* wd_timer class */ | 1412 | /* wd_timer class */ |