Commit 94082f35882b7da6256c9609e17fa1047d9477c7
1 parent
0987862149
Exists in
master
arm:omap:am335x - Add support for UART 2
Support for UART 2 is added. UART 2 is tested for working in Profile 3 by passing kernel boot args from u-boot as setenv bootargs 'console=ttyO2,115200n8......' Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Showing 3 changed files with 30 additions and 5 deletions Inline Diff
arch/arm/mach-omap2/board-am335xevm.c
1 | /* | 1 | /* |
2 | * Code for AM335X EVM. | 2 | * Code for AM335X EVM. |
3 | * | 3 | * |
4 | * Copyright (C) 2011 Texas Instruments, Inc. - http://www.ti.com/ | 4 | * Copyright (C) 2011 Texas Instruments, Inc. - http://www.ti.com/ |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or | 6 | * This program is free software; you can redistribute it and/or |
7 | * modify it under the terms of the GNU General Public License as | 7 | * modify it under the terms of the GNU General Public License as |
8 | * published by the Free Software Foundation version 2. | 8 | * published by the Free Software Foundation version 2. |
9 | * | 9 | * |
10 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | 10 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any |
11 | * kind, whether express or implied; without even the implied warranty | 11 | * kind, whether express or implied; without even the implied warranty |
12 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | * GNU General Public License for more details. | 13 | * GNU General Public License for more details. |
14 | */ | 14 | */ |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/i2c.h> | 17 | #include <linux/i2c.h> |
18 | #include <linux/i2c/at24.h> | 18 | #include <linux/i2c/at24.h> |
19 | #include <linux/phy.h> | 19 | #include <linux/phy.h> |
20 | #include <linux/gpio.h> | 20 | #include <linux/gpio.h> |
21 | #include <linux/spi/spi.h> | 21 | #include <linux/spi/spi.h> |
22 | #include <linux/spi/flash.h> | 22 | #include <linux/spi/flash.h> |
23 | #include <linux/input.h> | 23 | #include <linux/input.h> |
24 | #include <linux/gpio_keys.h> | 24 | #include <linux/gpio_keys.h> |
25 | #include <linux/input/matrix_keypad.h> | 25 | #include <linux/input/matrix_keypad.h> |
26 | #include <linux/mtd/mtd.h> | 26 | #include <linux/mtd/mtd.h> |
27 | #include <linux/mtd/nand.h> | 27 | #include <linux/mtd/nand.h> |
28 | #include <linux/mtd/partitions.h> | 28 | #include <linux/mtd/partitions.h> |
29 | #include <linux/platform_device.h> | 29 | #include <linux/platform_device.h> |
30 | #include <linux/clk.h> | 30 | #include <linux/clk.h> |
31 | #include <linux/err.h> | 31 | #include <linux/err.h> |
32 | #include <linux/wl12xx.h> | 32 | #include <linux/wl12xx.h> |
33 | #include <linux/ethtool.h> | 33 | #include <linux/ethtool.h> |
34 | #include <linux/mfd/tps65910.h> | 34 | #include <linux/mfd/tps65910.h> |
35 | 35 | ||
36 | /* LCD controller is similar to DA850 */ | 36 | /* LCD controller is similar to DA850 */ |
37 | #include <video/da8xx-fb.h> | 37 | #include <video/da8xx-fb.h> |
38 | 38 | ||
39 | #include <mach/hardware.h> | 39 | #include <mach/hardware.h> |
40 | #include <mach/board-am335xevm.h> | 40 | #include <mach/board-am335xevm.h> |
41 | 41 | ||
42 | #include <asm/mach-types.h> | 42 | #include <asm/mach-types.h> |
43 | #include <asm/mach/arch.h> | 43 | #include <asm/mach/arch.h> |
44 | #include <asm/mach/map.h> | 44 | #include <asm/mach/map.h> |
45 | #include <asm/hardware/asp.h> | 45 | #include <asm/hardware/asp.h> |
46 | 46 | ||
47 | #include <plat/irqs.h> | 47 | #include <plat/irqs.h> |
48 | #include <plat/board.h> | 48 | #include <plat/board.h> |
49 | #include <plat/common.h> | 49 | #include <plat/common.h> |
50 | #include <plat/lcdc.h> | 50 | #include <plat/lcdc.h> |
51 | #include <plat/usb.h> | 51 | #include <plat/usb.h> |
52 | #include <plat/mmc.h> | 52 | #include <plat/mmc.h> |
53 | 53 | ||
54 | #include "board-flash.h" | 54 | #include "board-flash.h" |
55 | #include "cpuidle33xx.h" | 55 | #include "cpuidle33xx.h" |
56 | #include "mux.h" | 56 | #include "mux.h" |
57 | #include "devices.h" | 57 | #include "devices.h" |
58 | #include "hsmmc.h" | 58 | #include "hsmmc.h" |
59 | 59 | ||
60 | /* TLK PHY IDs */ | 60 | /* TLK PHY IDs */ |
61 | #define TLK110_PHY_ID 0x2000A201 | 61 | #define TLK110_PHY_ID 0x2000A201 |
62 | #define TLK110_PHY_MASK 0xfffffff0 | 62 | #define TLK110_PHY_MASK 0xfffffff0 |
63 | 63 | ||
64 | /* BBB PHY IDs */ | 64 | /* BBB PHY IDs */ |
65 | #define BBB_PHY_ID 0x7c0f1 | 65 | #define BBB_PHY_ID 0x7c0f1 |
66 | #define BBB_PHY_MASK 0xfffffffe | 66 | #define BBB_PHY_MASK 0xfffffffe |
67 | 67 | ||
68 | /* TLK110 PHY register offsets */ | 68 | /* TLK110 PHY register offsets */ |
69 | #define TLK110_COARSEGAIN_REG 0x00A3 | 69 | #define TLK110_COARSEGAIN_REG 0x00A3 |
70 | #define TLK110_LPFHPF_REG 0x00AC | 70 | #define TLK110_LPFHPF_REG 0x00AC |
71 | #define TLK110_SPAREANALOG_REG 0x00B9 | 71 | #define TLK110_SPAREANALOG_REG 0x00B9 |
72 | #define TLK110_VRCR_REG 0x00D0 | 72 | #define TLK110_VRCR_REG 0x00D0 |
73 | #define TLK110_SETFFE_REG 0x0107 | 73 | #define TLK110_SETFFE_REG 0x0107 |
74 | #define TLK110_FTSP_REG 0x0154 | 74 | #define TLK110_FTSP_REG 0x0154 |
75 | #define TLK110_ALFATPIDL_REG 0x002A | 75 | #define TLK110_ALFATPIDL_REG 0x002A |
76 | #define TLK110_PSCOEF21_REG 0x0096 | 76 | #define TLK110_PSCOEF21_REG 0x0096 |
77 | #define TLK110_PSCOEF3_REG 0x0097 | 77 | #define TLK110_PSCOEF3_REG 0x0097 |
78 | #define TLK110_ALFAFACTOR1_REG 0x002C | 78 | #define TLK110_ALFAFACTOR1_REG 0x002C |
79 | #define TLK110_ALFAFACTOR2_REG 0x0023 | 79 | #define TLK110_ALFAFACTOR2_REG 0x0023 |
80 | #define TLK110_CFGPS_REG 0x0095 | 80 | #define TLK110_CFGPS_REG 0x0095 |
81 | #define TLK110_FTSPTXGAIN_REG 0x0150 | 81 | #define TLK110_FTSPTXGAIN_REG 0x0150 |
82 | #define TLK110_SWSCR3_REG 0x000B | 82 | #define TLK110_SWSCR3_REG 0x000B |
83 | #define TLK110_SCFALLBACK_REG 0x0040 | 83 | #define TLK110_SCFALLBACK_REG 0x0040 |
84 | #define TLK110_PHYRCR_REG 0x001F | 84 | #define TLK110_PHYRCR_REG 0x001F |
85 | 85 | ||
86 | /* TLK110 register writes values */ | 86 | /* TLK110 register writes values */ |
87 | #define TLK110_COARSEGAIN_VAL 0x0000 | 87 | #define TLK110_COARSEGAIN_VAL 0x0000 |
88 | #define TLK110_LPFHPF_VAL 0x8000 | 88 | #define TLK110_LPFHPF_VAL 0x8000 |
89 | #define TLK110_SPANALOG_VAL 0x0000 | 89 | #define TLK110_SPANALOG_VAL 0x0000 |
90 | #define TLK110_VRCR_VAL 0x0008 | 90 | #define TLK110_VRCR_VAL 0x0008 |
91 | #define TLK110_SETFFE_VAL 0x0605 | 91 | #define TLK110_SETFFE_VAL 0x0605 |
92 | #define TLK110_FTSP_VAL 0x0255 | 92 | #define TLK110_FTSP_VAL 0x0255 |
93 | #define TLK110_ALFATPIDL_VAL 0x7998 | 93 | #define TLK110_ALFATPIDL_VAL 0x7998 |
94 | #define TLK110_PSCOEF21_VAL 0x3A20 | 94 | #define TLK110_PSCOEF21_VAL 0x3A20 |
95 | #define TLK110_PSCOEF3_VAL 0x003F | 95 | #define TLK110_PSCOEF3_VAL 0x003F |
96 | #define TLK110_ALFACTOR1_VAL 0xFF80 | 96 | #define TLK110_ALFACTOR1_VAL 0xFF80 |
97 | #define TLK110_ALFACTOR2_VAL 0x021C | 97 | #define TLK110_ALFACTOR2_VAL 0x021C |
98 | #define TLK110_CFGPS_VAL 0x0000 | 98 | #define TLK110_CFGPS_VAL 0x0000 |
99 | #define TLK110_FTSPTXGAIN_VAL 0x6A88 | 99 | #define TLK110_FTSPTXGAIN_VAL 0x6A88 |
100 | #define TLK110_SWSCR3_VAL 0x0000 | 100 | #define TLK110_SWSCR3_VAL 0x0000 |
101 | #define TLK110_SCFALLBACK_VAL 0xC11D | 101 | #define TLK110_SCFALLBACK_VAL 0xC11D |
102 | #define TLK110_PHYRCR_VAL 0x4000 | 102 | #define TLK110_PHYRCR_VAL 0x4000 |
103 | 103 | ||
104 | #ifdef CONFIG_TLK110_WORKAROUND | 104 | #ifdef CONFIG_TLK110_WORKAROUND |
105 | #define am335x_tlk110_phy_init()\ | 105 | #define am335x_tlk110_phy_init()\ |
106 | do { \ | 106 | do { \ |
107 | phy_register_fixup_for_uid(TLK110_PHY_ID,\ | 107 | phy_register_fixup_for_uid(TLK110_PHY_ID,\ |
108 | TLK110_PHY_MASK,\ | 108 | TLK110_PHY_MASK,\ |
109 | am335x_tlk110_phy_fixup);\ | 109 | am335x_tlk110_phy_fixup);\ |
110 | } while (0); | 110 | } while (0); |
111 | #else | 111 | #else |
112 | #define am335x_tlk110_phy_init() do { } while (0); | 112 | #define am335x_tlk110_phy_init() do { } while (0); |
113 | #endif | 113 | #endif |
114 | 114 | ||
115 | /* Convert GPIO signal to GPIO pin number */ | 115 | /* Convert GPIO signal to GPIO pin number */ |
116 | #define GPIO_TO_PIN(bank, gpio) (32 * (bank) + (gpio)) | 116 | #define GPIO_TO_PIN(bank, gpio) (32 * (bank) + (gpio)) |
117 | 117 | ||
118 | static const struct display_panel disp_panel = { | 118 | static const struct display_panel disp_panel = { |
119 | WVGA, | 119 | WVGA, |
120 | 32, | 120 | 32, |
121 | 32, | 121 | 32, |
122 | COLOR_ACTIVE, | 122 | COLOR_ACTIVE, |
123 | }; | 123 | }; |
124 | 124 | ||
125 | static struct lcd_ctrl_config lcd_cfg = { | 125 | static struct lcd_ctrl_config lcd_cfg = { |
126 | &disp_panel, | 126 | &disp_panel, |
127 | .ac_bias = 255, | 127 | .ac_bias = 255, |
128 | .ac_bias_intrpt = 0, | 128 | .ac_bias_intrpt = 0, |
129 | .dma_burst_sz = 16, | 129 | .dma_burst_sz = 16, |
130 | .bpp = 32, | 130 | .bpp = 32, |
131 | .fdd = 0x80, | 131 | .fdd = 0x80, |
132 | .tft_alt_mode = 0, | 132 | .tft_alt_mode = 0, |
133 | .stn_565_mode = 0, | 133 | .stn_565_mode = 0, |
134 | .mono_8bit_mode = 0, | 134 | .mono_8bit_mode = 0, |
135 | .invert_line_clock = 1, | 135 | .invert_line_clock = 1, |
136 | .invert_frm_clock = 1, | 136 | .invert_frm_clock = 1, |
137 | .sync_edge = 0, | 137 | .sync_edge = 0, |
138 | .sync_ctrl = 1, | 138 | .sync_ctrl = 1, |
139 | .raster_order = 0, | 139 | .raster_order = 0, |
140 | }; | 140 | }; |
141 | 141 | ||
142 | struct da8xx_lcdc_platform_data TFC_S9700RTWV35TR_01B_pdata = { | 142 | struct da8xx_lcdc_platform_data TFC_S9700RTWV35TR_01B_pdata = { |
143 | .manu_name = "ThreeFive", | 143 | .manu_name = "ThreeFive", |
144 | .controller_data = &lcd_cfg, | 144 | .controller_data = &lcd_cfg, |
145 | .type = "TFC_S9700RTWV35TR_01B", | 145 | .type = "TFC_S9700RTWV35TR_01B", |
146 | }; | 146 | }; |
147 | 147 | ||
148 | /* TSc controller */ | 148 | /* TSc controller */ |
149 | #include <linux/input/ti_tscadc.h> | 149 | #include <linux/input/ti_tscadc.h> |
150 | #include <linux/lis3lv02d.h> | 150 | #include <linux/lis3lv02d.h> |
151 | 151 | ||
152 | static struct resource tsc_resources[] = { | 152 | static struct resource tsc_resources[] = { |
153 | [0] = { | 153 | [0] = { |
154 | .start = AM33XX_TSC_BASE, | 154 | .start = AM33XX_TSC_BASE, |
155 | .end = AM33XX_TSC_BASE + SZ_8K - 1, | 155 | .end = AM33XX_TSC_BASE + SZ_8K - 1, |
156 | .flags = IORESOURCE_MEM, | 156 | .flags = IORESOURCE_MEM, |
157 | }, | 157 | }, |
158 | [1] = { | 158 | [1] = { |
159 | .start = AM33XX_IRQ_ADC_GEN, | 159 | .start = AM33XX_IRQ_ADC_GEN, |
160 | .end = AM33XX_IRQ_ADC_GEN, | 160 | .end = AM33XX_IRQ_ADC_GEN, |
161 | .flags = IORESOURCE_IRQ, | 161 | .flags = IORESOURCE_IRQ, |
162 | }, | 162 | }, |
163 | }; | 163 | }; |
164 | 164 | ||
165 | static struct tsc_data am335x_touchscreen_data = { | 165 | static struct tsc_data am335x_touchscreen_data = { |
166 | .wires = 4, | 166 | .wires = 4, |
167 | .x_plate_resistance = 200, | 167 | .x_plate_resistance = 200, |
168 | }; | 168 | }; |
169 | 169 | ||
170 | static struct platform_device tsc_device = { | 170 | static struct platform_device tsc_device = { |
171 | .name = "tsc", | 171 | .name = "tsc", |
172 | .id = -1, | 172 | .id = -1, |
173 | .dev = { | 173 | .dev = { |
174 | .platform_data = &am335x_touchscreen_data, | 174 | .platform_data = &am335x_touchscreen_data, |
175 | }, | 175 | }, |
176 | .num_resources = ARRAY_SIZE(tsc_resources), | 176 | .num_resources = ARRAY_SIZE(tsc_resources), |
177 | .resource = tsc_resources, | 177 | .resource = tsc_resources, |
178 | }; | 178 | }; |
179 | 179 | ||
180 | static u8 am335x_iis_serializer_direction1[] = { | 180 | static u8 am335x_iis_serializer_direction1[] = { |
181 | INACTIVE_MODE, INACTIVE_MODE, TX_MODE, RX_MODE, | 181 | INACTIVE_MODE, INACTIVE_MODE, TX_MODE, RX_MODE, |
182 | INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, | 182 | INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, |
183 | INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, | 183 | INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, |
184 | INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, | 184 | INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, |
185 | }; | 185 | }; |
186 | 186 | ||
187 | static struct snd_platform_data am335x_evm_snd_data1 = { | 187 | static struct snd_platform_data am335x_evm_snd_data1 = { |
188 | .tx_dma_offset = 0x46400000, /* McASP1 */ | 188 | .tx_dma_offset = 0x46400000, /* McASP1 */ |
189 | .rx_dma_offset = 0x46400000, | 189 | .rx_dma_offset = 0x46400000, |
190 | .op_mode = DAVINCI_MCASP_IIS_MODE, | 190 | .op_mode = DAVINCI_MCASP_IIS_MODE, |
191 | .num_serializer = ARRAY_SIZE(am335x_iis_serializer_direction1), | 191 | .num_serializer = ARRAY_SIZE(am335x_iis_serializer_direction1), |
192 | .tdm_slots = 2, | 192 | .tdm_slots = 2, |
193 | .serial_dir = am335x_iis_serializer_direction1, | 193 | .serial_dir = am335x_iis_serializer_direction1, |
194 | .asp_chan_q = EVENTQ_2, | 194 | .asp_chan_q = EVENTQ_2, |
195 | .version = MCASP_VERSION_3, | 195 | .version = MCASP_VERSION_3, |
196 | .txnumevt = 1, | 196 | .txnumevt = 1, |
197 | .rxnumevt = 1, | 197 | .rxnumevt = 1, |
198 | }; | 198 | }; |
199 | 199 | ||
200 | static struct omap2_hsmmc_info am335x_mmc[] __initdata = { | 200 | static struct omap2_hsmmc_info am335x_mmc[] __initdata = { |
201 | { | 201 | { |
202 | .mmc = 1, | 202 | .mmc = 1, |
203 | .caps = MMC_CAP_4_BIT_DATA, | 203 | .caps = MMC_CAP_4_BIT_DATA, |
204 | .gpio_cd = GPIO_TO_PIN(0, 6), | 204 | .gpio_cd = GPIO_TO_PIN(0, 6), |
205 | .gpio_wp = GPIO_TO_PIN(3, 18), | 205 | .gpio_wp = GPIO_TO_PIN(3, 18), |
206 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, /* 3V3 */ | 206 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, /* 3V3 */ |
207 | }, | 207 | }, |
208 | { | 208 | { |
209 | .mmc = 0, /* will be set at runtime */ | 209 | .mmc = 0, /* will be set at runtime */ |
210 | }, | 210 | }, |
211 | { | 211 | { |
212 | .mmc = 0, /* will be set at runtime */ | 212 | .mmc = 0, /* will be set at runtime */ |
213 | }, | 213 | }, |
214 | {} /* Terminator */ | 214 | {} /* Terminator */ |
215 | }; | 215 | }; |
216 | 216 | ||
217 | 217 | ||
218 | #ifdef CONFIG_OMAP_MUX | 218 | #ifdef CONFIG_OMAP_MUX |
219 | static struct omap_board_mux board_mux[] __initdata = { | 219 | static struct omap_board_mux board_mux[] __initdata = { |
220 | AM33XX_MUX(I2C0_SDA, OMAP_MUX_MODE0 | AM33XX_SLEWCTRL_SLOW | | 220 | AM33XX_MUX(I2C0_SDA, OMAP_MUX_MODE0 | AM33XX_SLEWCTRL_SLOW | |
221 | AM33XX_INPUT_EN | AM33XX_PIN_OUTPUT), | 221 | AM33XX_INPUT_EN | AM33XX_PIN_OUTPUT), |
222 | AM33XX_MUX(I2C0_SCL, OMAP_MUX_MODE0 | AM33XX_SLEWCTRL_SLOW | | 222 | AM33XX_MUX(I2C0_SCL, OMAP_MUX_MODE0 | AM33XX_SLEWCTRL_SLOW | |
223 | AM33XX_INPUT_EN | AM33XX_PIN_OUTPUT), | 223 | AM33XX_INPUT_EN | AM33XX_PIN_OUTPUT), |
224 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 224 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
225 | }; | 225 | }; |
226 | #else | 226 | #else |
227 | #define board_mux NULL | 227 | #define board_mux NULL |
228 | #endif | 228 | #endif |
229 | 229 | ||
230 | /* module pin mux structure */ | 230 | /* module pin mux structure */ |
231 | struct pinmux_config { | 231 | struct pinmux_config { |
232 | const char *string_name; /* signal name format */ | 232 | const char *string_name; /* signal name format */ |
233 | int val; /* Options for the mux register value */ | 233 | int val; /* Options for the mux register value */ |
234 | }; | 234 | }; |
235 | 235 | ||
236 | struct evm_dev_cfg { | 236 | struct evm_dev_cfg { |
237 | void (*device_init)(int evm_id, int profile); | 237 | void (*device_init)(int evm_id, int profile); |
238 | 238 | ||
239 | /* | 239 | /* |
240 | * If the device is required on both baseboard & daughter board (ex i2c), | 240 | * If the device is required on both baseboard & daughter board (ex i2c), |
241 | * specify DEV_ON_BASEBOARD | 241 | * specify DEV_ON_BASEBOARD |
242 | */ | 242 | */ |
243 | #define DEV_ON_BASEBOARD 0 | 243 | #define DEV_ON_BASEBOARD 0 |
244 | #define DEV_ON_DGHTR_BRD 1 | 244 | #define DEV_ON_DGHTR_BRD 1 |
245 | u32 device_on; | 245 | u32 device_on; |
246 | 246 | ||
247 | u32 profile; /* Profiles (0-7) in which the module is present */ | 247 | u32 profile; /* Profiles (0-7) in which the module is present */ |
248 | }; | 248 | }; |
249 | 249 | ||
250 | /* AM335X - CPLD Register Offsets */ | 250 | /* AM335X - CPLD Register Offsets */ |
251 | #define CPLD_DEVICE_HDR 0x00 /* CPLD Header */ | 251 | #define CPLD_DEVICE_HDR 0x00 /* CPLD Header */ |
252 | #define CPLD_DEVICE_ID 0x04 /* CPLD identification */ | 252 | #define CPLD_DEVICE_ID 0x04 /* CPLD identification */ |
253 | #define CPLD_DEVICE_REV 0x0C /* Revision of the CPLD code */ | 253 | #define CPLD_DEVICE_REV 0x0C /* Revision of the CPLD code */ |
254 | #define CPLD_CFG_REG 0x10 /* Configuration Register */ | 254 | #define CPLD_CFG_REG 0x10 /* Configuration Register */ |
255 | 255 | ||
256 | static struct i2c_client *cpld_client; | 256 | static struct i2c_client *cpld_client; |
257 | 257 | ||
258 | static u32 am335x_evm_id; | 258 | static u32 am335x_evm_id; |
259 | 259 | ||
260 | static struct omap_board_config_kernel am335x_evm_config[] __initdata = { | 260 | static struct omap_board_config_kernel am335x_evm_config[] __initdata = { |
261 | }; | 261 | }; |
262 | 262 | ||
263 | /* | 263 | /* |
264 | * EVM Config held in On-Board eeprom device. | 264 | * EVM Config held in On-Board eeprom device. |
265 | * | 265 | * |
266 | * Header Format | 266 | * Header Format |
267 | * | 267 | * |
268 | * Name Size Contents | 268 | * Name Size Contents |
269 | * (Bytes) | 269 | * (Bytes) |
270 | *------------------------------------------------------------- | 270 | *------------------------------------------------------------- |
271 | * Header 4 0xAA, 0x55, 0x33, 0xEE | 271 | * Header 4 0xAA, 0x55, 0x33, 0xEE |
272 | * | 272 | * |
273 | * Board Name 8 Name for board in ASCII. | 273 | * Board Name 8 Name for board in ASCII. |
274 | * example "A33515BB" = "AM335X | 274 | * example "A33515BB" = "AM335X |
275 | Low Cost EVM board" | 275 | Low Cost EVM board" |
276 | * | 276 | * |
277 | * Version 4 Hardware version code for board in | 277 | * Version 4 Hardware version code for board in |
278 | * in ASCII. "1.0A" = rev.01.0A | 278 | * in ASCII. "1.0A" = rev.01.0A |
279 | * | 279 | * |
280 | * Serial Number 12 Serial number of the board. This is a 12 | 280 | * Serial Number 12 Serial number of the board. This is a 12 |
281 | * character string which is WWYY4P16nnnn, where | 281 | * character string which is WWYY4P16nnnn, where |
282 | * WW = 2 digit week of the year of production | 282 | * WW = 2 digit week of the year of production |
283 | * YY = 2 digit year of production | 283 | * YY = 2 digit year of production |
284 | * nnnn = incrementing board number | 284 | * nnnn = incrementing board number |
285 | * | 285 | * |
286 | * Configuration option 32 Codes(TBD) to show the configuration | 286 | * Configuration option 32 Codes(TBD) to show the configuration |
287 | * setup on this board. | 287 | * setup on this board. |
288 | * | 288 | * |
289 | * Available 32720 Available space for other non-volatile | 289 | * Available 32720 Available space for other non-volatile |
290 | * data. | 290 | * data. |
291 | */ | 291 | */ |
292 | struct am335x_evm_eeprom_config { | 292 | struct am335x_evm_eeprom_config { |
293 | u32 header; | 293 | u32 header; |
294 | u8 name[8]; | 294 | u8 name[8]; |
295 | char version[4]; | 295 | char version[4]; |
296 | u8 serial[12]; | 296 | u8 serial[12]; |
297 | u8 opt[32]; | 297 | u8 opt[32]; |
298 | }; | 298 | }; |
299 | 299 | ||
300 | static struct am335x_evm_eeprom_config config; | 300 | static struct am335x_evm_eeprom_config config; |
301 | static bool daughter_brd_detected; | 301 | static bool daughter_brd_detected; |
302 | 302 | ||
303 | #define GP_EVM_REV_IS_1_0 0x1 | 303 | #define GP_EVM_REV_IS_1_0 0x1 |
304 | #define GP_EVM_REV_IS_1_1A 0x2 | 304 | #define GP_EVM_REV_IS_1_1A 0x2 |
305 | #define GP_EVM_REV_IS_UNKNOWN 0xFF | 305 | #define GP_EVM_REV_IS_UNKNOWN 0xFF |
306 | static unsigned int gp_evm_revision = GP_EVM_REV_IS_UNKNOWN; | 306 | static unsigned int gp_evm_revision = GP_EVM_REV_IS_UNKNOWN; |
307 | unsigned int gigabit_enable = 1; | 307 | unsigned int gigabit_enable = 1; |
308 | 308 | ||
309 | #define EEPROM_MAC_ADDRESS_OFFSET 60 /* 4+8+4+12+32 */ | 309 | #define EEPROM_MAC_ADDRESS_OFFSET 60 /* 4+8+4+12+32 */ |
310 | #define EEPROM_NO_OF_MAC_ADDR 3 | 310 | #define EEPROM_NO_OF_MAC_ADDR 3 |
311 | static char am335x_mac_addr[EEPROM_NO_OF_MAC_ADDR][ETH_ALEN]; | 311 | static char am335x_mac_addr[EEPROM_NO_OF_MAC_ADDR][ETH_ALEN]; |
312 | 312 | ||
313 | #define AM335X_EEPROM_HEADER 0xEE3355AA | 313 | #define AM335X_EEPROM_HEADER 0xEE3355AA |
314 | 314 | ||
315 | /* current profile if exists else PROFILE_0 on error */ | 315 | /* current profile if exists else PROFILE_0 on error */ |
316 | static u32 am335x_get_profile_selection(void) | 316 | static u32 am335x_get_profile_selection(void) |
317 | { | 317 | { |
318 | int val = 0; | 318 | int val = 0; |
319 | 319 | ||
320 | if (!cpld_client) | 320 | if (!cpld_client) |
321 | /* error checking is not done in func's calling this routine. | 321 | /* error checking is not done in func's calling this routine. |
322 | so return profile 0 on error */ | 322 | so return profile 0 on error */ |
323 | return 0; | 323 | return 0; |
324 | 324 | ||
325 | val = i2c_smbus_read_word_data(cpld_client, CPLD_CFG_REG); | 325 | val = i2c_smbus_read_word_data(cpld_client, CPLD_CFG_REG); |
326 | if (val < 0) | 326 | if (val < 0) |
327 | return 0; /* default to Profile 0 on Error */ | 327 | return 0; /* default to Profile 0 on Error */ |
328 | else | 328 | else |
329 | return val & 0x7; | 329 | return val & 0x7; |
330 | } | 330 | } |
331 | 331 | ||
332 | /* Module pin mux for LCDC */ | 332 | /* Module pin mux for LCDC */ |
333 | static struct pinmux_config lcdc_pin_mux[] = { | 333 | static struct pinmux_config lcdc_pin_mux[] = { |
334 | {"lcd_data0.lcd_data0", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | 334 | {"lcd_data0.lcd_data0", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT |
335 | | AM33XX_PULL_DISA}, | 335 | | AM33XX_PULL_DISA}, |
336 | {"lcd_data1.lcd_data1", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | 336 | {"lcd_data1.lcd_data1", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT |
337 | | AM33XX_PULL_DISA}, | 337 | | AM33XX_PULL_DISA}, |
338 | {"lcd_data2.lcd_data2", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | 338 | {"lcd_data2.lcd_data2", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT |
339 | | AM33XX_PULL_DISA}, | 339 | | AM33XX_PULL_DISA}, |
340 | {"lcd_data3.lcd_data3", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | 340 | {"lcd_data3.lcd_data3", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT |
341 | | AM33XX_PULL_DISA}, | 341 | | AM33XX_PULL_DISA}, |
342 | {"lcd_data4.lcd_data4", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | 342 | {"lcd_data4.lcd_data4", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT |
343 | | AM33XX_PULL_DISA}, | 343 | | AM33XX_PULL_DISA}, |
344 | {"lcd_data5.lcd_data5", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | 344 | {"lcd_data5.lcd_data5", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT |
345 | | AM33XX_PULL_DISA}, | 345 | | AM33XX_PULL_DISA}, |
346 | {"lcd_data6.lcd_data6", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | 346 | {"lcd_data6.lcd_data6", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT |
347 | | AM33XX_PULL_DISA}, | 347 | | AM33XX_PULL_DISA}, |
348 | {"lcd_data7.lcd_data7", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | 348 | {"lcd_data7.lcd_data7", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT |
349 | | AM33XX_PULL_DISA}, | 349 | | AM33XX_PULL_DISA}, |
350 | {"lcd_data8.lcd_data8", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | 350 | {"lcd_data8.lcd_data8", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT |
351 | | AM33XX_PULL_DISA}, | 351 | | AM33XX_PULL_DISA}, |
352 | {"lcd_data9.lcd_data9", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | 352 | {"lcd_data9.lcd_data9", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT |
353 | | AM33XX_PULL_DISA}, | 353 | | AM33XX_PULL_DISA}, |
354 | {"lcd_data10.lcd_data10", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | 354 | {"lcd_data10.lcd_data10", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT |
355 | | AM33XX_PULL_DISA}, | 355 | | AM33XX_PULL_DISA}, |
356 | {"lcd_data11.lcd_data11", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | 356 | {"lcd_data11.lcd_data11", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT |
357 | | AM33XX_PULL_DISA}, | 357 | | AM33XX_PULL_DISA}, |
358 | {"lcd_data12.lcd_data12", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | 358 | {"lcd_data12.lcd_data12", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT |
359 | | AM33XX_PULL_DISA}, | 359 | | AM33XX_PULL_DISA}, |
360 | {"lcd_data13.lcd_data13", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | 360 | {"lcd_data13.lcd_data13", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT |
361 | | AM33XX_PULL_DISA}, | 361 | | AM33XX_PULL_DISA}, |
362 | {"lcd_data14.lcd_data14", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | 362 | {"lcd_data14.lcd_data14", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT |
363 | | AM33XX_PULL_DISA}, | 363 | | AM33XX_PULL_DISA}, |
364 | {"lcd_data15.lcd_data15", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | 364 | {"lcd_data15.lcd_data15", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT |
365 | | AM33XX_PULL_DISA}, | 365 | | AM33XX_PULL_DISA}, |
366 | {"gpmc_ad8.lcd_data16", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, | 366 | {"gpmc_ad8.lcd_data16", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, |
367 | {"gpmc_ad9.lcd_data17", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, | 367 | {"gpmc_ad9.lcd_data17", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, |
368 | {"gpmc_ad10.lcd_data18", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, | 368 | {"gpmc_ad10.lcd_data18", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, |
369 | {"gpmc_ad11.lcd_data19", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, | 369 | {"gpmc_ad11.lcd_data19", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, |
370 | {"gpmc_ad12.lcd_data20", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, | 370 | {"gpmc_ad12.lcd_data20", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, |
371 | {"gpmc_ad13.lcd_data21", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, | 371 | {"gpmc_ad13.lcd_data21", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, |
372 | {"gpmc_ad14.lcd_data22", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, | 372 | {"gpmc_ad14.lcd_data22", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, |
373 | {"gpmc_ad15.lcd_data23", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, | 373 | {"gpmc_ad15.lcd_data23", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, |
374 | {"lcd_vsync.lcd_vsync", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT}, | 374 | {"lcd_vsync.lcd_vsync", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT}, |
375 | {"lcd_hsync.lcd_hsync", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT}, | 375 | {"lcd_hsync.lcd_hsync", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT}, |
376 | {"lcd_pclk.lcd_pclk", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT}, | 376 | {"lcd_pclk.lcd_pclk", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT}, |
377 | {"lcd_ac_bias_en.lcd_ac_bias_en", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT}, | 377 | {"lcd_ac_bias_en.lcd_ac_bias_en", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT}, |
378 | {NULL, 0}, | 378 | {NULL, 0}, |
379 | }; | 379 | }; |
380 | 380 | ||
381 | static struct pinmux_config tsc_pin_mux[] = { | 381 | static struct pinmux_config tsc_pin_mux[] = { |
382 | {"ain0.ain0", OMAP_MUX_MODE0 | AM33XX_INPUT_EN}, | 382 | {"ain0.ain0", OMAP_MUX_MODE0 | AM33XX_INPUT_EN}, |
383 | {"ain1.ain1", OMAP_MUX_MODE0 | AM33XX_INPUT_EN}, | 383 | {"ain1.ain1", OMAP_MUX_MODE0 | AM33XX_INPUT_EN}, |
384 | {"ain2.ain2", OMAP_MUX_MODE0 | AM33XX_INPUT_EN}, | 384 | {"ain2.ain2", OMAP_MUX_MODE0 | AM33XX_INPUT_EN}, |
385 | {"ain3.ain3", OMAP_MUX_MODE0 | AM33XX_INPUT_EN}, | 385 | {"ain3.ain3", OMAP_MUX_MODE0 | AM33XX_INPUT_EN}, |
386 | {"vrefp.vrefp", OMAP_MUX_MODE0 | AM33XX_INPUT_EN}, | 386 | {"vrefp.vrefp", OMAP_MUX_MODE0 | AM33XX_INPUT_EN}, |
387 | {"vrefn.vrefn", OMAP_MUX_MODE0 | AM33XX_INPUT_EN}, | 387 | {"vrefn.vrefn", OMAP_MUX_MODE0 | AM33XX_INPUT_EN}, |
388 | {NULL, 0}, | 388 | {NULL, 0}, |
389 | }; | 389 | }; |
390 | 390 | ||
391 | /* Pin mux for nand flash module */ | 391 | /* Pin mux for nand flash module */ |
392 | static struct pinmux_config nand_pin_mux[] = { | 392 | static struct pinmux_config nand_pin_mux[] = { |
393 | {"gpmc_ad0.gpmc_ad0", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, | 393 | {"gpmc_ad0.gpmc_ad0", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, |
394 | {"gpmc_ad1.gpmc_ad1", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, | 394 | {"gpmc_ad1.gpmc_ad1", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, |
395 | {"gpmc_ad2.gpmc_ad2", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, | 395 | {"gpmc_ad2.gpmc_ad2", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, |
396 | {"gpmc_ad3.gpmc_ad3", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, | 396 | {"gpmc_ad3.gpmc_ad3", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, |
397 | {"gpmc_ad4.gpmc_ad4", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, | 397 | {"gpmc_ad4.gpmc_ad4", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, |
398 | {"gpmc_ad5.gpmc_ad5", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, | 398 | {"gpmc_ad5.gpmc_ad5", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, |
399 | {"gpmc_ad6.gpmc_ad6", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, | 399 | {"gpmc_ad6.gpmc_ad6", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, |
400 | {"gpmc_ad7.gpmc_ad7", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, | 400 | {"gpmc_ad7.gpmc_ad7", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, |
401 | {"gpmc_wait0.gpmc_wait0", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, | 401 | {"gpmc_wait0.gpmc_wait0", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, |
402 | {"gpmc_wpn.gpmc_wpn", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT_PULLUP}, | 402 | {"gpmc_wpn.gpmc_wpn", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT_PULLUP}, |
403 | {"gpmc_csn0.gpmc_csn0", OMAP_MUX_MODE0 | AM33XX_PULL_DISA}, | 403 | {"gpmc_csn0.gpmc_csn0", OMAP_MUX_MODE0 | AM33XX_PULL_DISA}, |
404 | {"gpmc_advn_ale.gpmc_advn_ale", OMAP_MUX_MODE0 | AM33XX_PULL_DISA}, | 404 | {"gpmc_advn_ale.gpmc_advn_ale", OMAP_MUX_MODE0 | AM33XX_PULL_DISA}, |
405 | {"gpmc_oen_ren.gpmc_oen_ren", OMAP_MUX_MODE0 | AM33XX_PULL_DISA}, | 405 | {"gpmc_oen_ren.gpmc_oen_ren", OMAP_MUX_MODE0 | AM33XX_PULL_DISA}, |
406 | {"gpmc_wen.gpmc_wen", OMAP_MUX_MODE0 | AM33XX_PULL_DISA}, | 406 | {"gpmc_wen.gpmc_wen", OMAP_MUX_MODE0 | AM33XX_PULL_DISA}, |
407 | {"gpmc_ben0_cle.gpmc_ben0_cle", OMAP_MUX_MODE0 | AM33XX_PULL_DISA}, | 407 | {"gpmc_ben0_cle.gpmc_ben0_cle", OMAP_MUX_MODE0 | AM33XX_PULL_DISA}, |
408 | {NULL, 0}, | 408 | {NULL, 0}, |
409 | }; | 409 | }; |
410 | 410 | ||
411 | /* Module pin mux for SPI fash */ | 411 | /* Module pin mux for SPI fash */ |
412 | static struct pinmux_config spi0_pin_mux[] = { | 412 | static struct pinmux_config spi0_pin_mux[] = { |
413 | {"spi0_sclk.spi0_sclk", OMAP_MUX_MODE0 | AM33XX_PULL_ENBL | 413 | {"spi0_sclk.spi0_sclk", OMAP_MUX_MODE0 | AM33XX_PULL_ENBL |
414 | | AM33XX_INPUT_EN}, | 414 | | AM33XX_INPUT_EN}, |
415 | {"spi0_d0.spi0_d0", OMAP_MUX_MODE0 | AM33XX_PULL_ENBL | AM33XX_PULL_UP | 415 | {"spi0_d0.spi0_d0", OMAP_MUX_MODE0 | AM33XX_PULL_ENBL | AM33XX_PULL_UP |
416 | | AM33XX_INPUT_EN}, | 416 | | AM33XX_INPUT_EN}, |
417 | {"spi0_d1.spi0_d1", OMAP_MUX_MODE0 | AM33XX_PULL_ENBL | 417 | {"spi0_d1.spi0_d1", OMAP_MUX_MODE0 | AM33XX_PULL_ENBL |
418 | | AM33XX_INPUT_EN}, | 418 | | AM33XX_INPUT_EN}, |
419 | {"spi0_cs0.spi0_cs0", OMAP_MUX_MODE0 | AM33XX_PULL_ENBL | AM33XX_PULL_UP | 419 | {"spi0_cs0.spi0_cs0", OMAP_MUX_MODE0 | AM33XX_PULL_ENBL | AM33XX_PULL_UP |
420 | | AM33XX_INPUT_EN}, | 420 | | AM33XX_INPUT_EN}, |
421 | {NULL, 0}, | 421 | {NULL, 0}, |
422 | }; | 422 | }; |
423 | 423 | ||
424 | /* Module pin mux for SPI flash */ | 424 | /* Module pin mux for SPI flash */ |
425 | static struct pinmux_config spi1_pin_mux[] = { | 425 | static struct pinmux_config spi1_pin_mux[] = { |
426 | {"mcasp0_aclkx.spi1_sclk", OMAP_MUX_MODE3 | AM33XX_PULL_ENBL | 426 | {"mcasp0_aclkx.spi1_sclk", OMAP_MUX_MODE3 | AM33XX_PULL_ENBL |
427 | | AM33XX_INPUT_EN}, | 427 | | AM33XX_INPUT_EN}, |
428 | {"mcasp0_fsx.spi1_d0", OMAP_MUX_MODE3 | AM33XX_PULL_ENBL | 428 | {"mcasp0_fsx.spi1_d0", OMAP_MUX_MODE3 | AM33XX_PULL_ENBL |
429 | | AM33XX_PULL_UP | AM33XX_INPUT_EN}, | 429 | | AM33XX_PULL_UP | AM33XX_INPUT_EN}, |
430 | {"mcasp0_axr0.spi1_d1", OMAP_MUX_MODE3 | AM33XX_PULL_ENBL | 430 | {"mcasp0_axr0.spi1_d1", OMAP_MUX_MODE3 | AM33XX_PULL_ENBL |
431 | | AM33XX_INPUT_EN}, | 431 | | AM33XX_INPUT_EN}, |
432 | {"mcasp0_ahclkr.spi1_cs0", OMAP_MUX_MODE3 | AM33XX_PULL_ENBL | 432 | {"mcasp0_ahclkr.spi1_cs0", OMAP_MUX_MODE3 | AM33XX_PULL_ENBL |
433 | | AM33XX_PULL_UP | AM33XX_INPUT_EN}, | 433 | | AM33XX_PULL_UP | AM33XX_INPUT_EN}, |
434 | {NULL, 0}, | 434 | {NULL, 0}, |
435 | }; | 435 | }; |
436 | 436 | ||
437 | /* Module pin mux for rgmii1 */ | 437 | /* Module pin mux for rgmii1 */ |
438 | static struct pinmux_config rgmii1_pin_mux[] = { | 438 | static struct pinmux_config rgmii1_pin_mux[] = { |
439 | {"mii1_txen.rgmii1_tctl", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT}, | 439 | {"mii1_txen.rgmii1_tctl", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT}, |
440 | {"mii1_rxdv.rgmii1_rctl", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN}, | 440 | {"mii1_rxdv.rgmii1_rctl", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN}, |
441 | {"mii1_txd3.rgmii1_td3", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT}, | 441 | {"mii1_txd3.rgmii1_td3", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT}, |
442 | {"mii1_txd2.rgmii1_td2", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT}, | 442 | {"mii1_txd2.rgmii1_td2", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT}, |
443 | {"mii1_txd1.rgmii1_td1", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT}, | 443 | {"mii1_txd1.rgmii1_td1", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT}, |
444 | {"mii1_txd0.rgmii1_td0", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT}, | 444 | {"mii1_txd0.rgmii1_td0", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT}, |
445 | {"mii1_txclk.rgmii1_tclk", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT}, | 445 | {"mii1_txclk.rgmii1_tclk", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT}, |
446 | {"mii1_rxclk.rgmii1_rclk", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN}, | 446 | {"mii1_rxclk.rgmii1_rclk", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN}, |
447 | {"mii1_rxd3.rgmii1_rd3", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN}, | 447 | {"mii1_rxd3.rgmii1_rd3", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN}, |
448 | {"mii1_rxd2.rgmii1_rd2", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN}, | 448 | {"mii1_rxd2.rgmii1_rd2", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN}, |
449 | {"mii1_rxd1.rgmii1_rd1", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN}, | 449 | {"mii1_rxd1.rgmii1_rd1", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN}, |
450 | {"mii1_rxd0.rgmii1_rd0", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN}, | 450 | {"mii1_rxd0.rgmii1_rd0", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN}, |
451 | {"mdio_data.mdio_data", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, | 451 | {"mdio_data.mdio_data", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, |
452 | {"mdio_clk.mdio_clk", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT_PULLUP}, | 452 | {"mdio_clk.mdio_clk", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT_PULLUP}, |
453 | {NULL, 0}, | 453 | {NULL, 0}, |
454 | }; | 454 | }; |
455 | 455 | ||
456 | /* Module pin mux for rgmii2 */ | 456 | /* Module pin mux for rgmii2 */ |
457 | static struct pinmux_config rgmii2_pin_mux[] = { | 457 | static struct pinmux_config rgmii2_pin_mux[] = { |
458 | {"gpmc_a0.rgmii2_tctl", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT}, | 458 | {"gpmc_a0.rgmii2_tctl", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT}, |
459 | {"gpmc_a1.rgmii2_rctl", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN}, | 459 | {"gpmc_a1.rgmii2_rctl", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN}, |
460 | {"gpmc_a2.rgmii2_td3", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT}, | 460 | {"gpmc_a2.rgmii2_td3", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT}, |
461 | {"gpmc_a3.rgmii2_td2", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT}, | 461 | {"gpmc_a3.rgmii2_td2", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT}, |
462 | {"gpmc_a4.rgmii2_td1", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT}, | 462 | {"gpmc_a4.rgmii2_td1", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT}, |
463 | {"gpmc_a5.rgmii2_td0", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT}, | 463 | {"gpmc_a5.rgmii2_td0", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT}, |
464 | {"gpmc_a6.rgmii2_tclk", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT}, | 464 | {"gpmc_a6.rgmii2_tclk", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT}, |
465 | {"gpmc_a7.rgmii2_rclk", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN}, | 465 | {"gpmc_a7.rgmii2_rclk", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN}, |
466 | {"gpmc_a8.rgmii2_rd3", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN}, | 466 | {"gpmc_a8.rgmii2_rd3", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN}, |
467 | {"gpmc_a9.rgmii2_rd2", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN}, | 467 | {"gpmc_a9.rgmii2_rd2", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN}, |
468 | {"gpmc_a10.rgmii2_rd1", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN}, | 468 | {"gpmc_a10.rgmii2_rd1", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN}, |
469 | {"gpmc_a11.rgmii2_rd0", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN}, | 469 | {"gpmc_a11.rgmii2_rd0", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN}, |
470 | {"mdio_data.mdio_data", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, | 470 | {"mdio_data.mdio_data", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, |
471 | {"mdio_clk.mdio_clk", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT_PULLUP}, | 471 | {"mdio_clk.mdio_clk", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT_PULLUP}, |
472 | {NULL, 0}, | 472 | {NULL, 0}, |
473 | }; | 473 | }; |
474 | 474 | ||
475 | /* Module pin mux for mii1 */ | 475 | /* Module pin mux for mii1 */ |
476 | static struct pinmux_config mii1_pin_mux[] = { | 476 | static struct pinmux_config mii1_pin_mux[] = { |
477 | {"mii1_rxerr.mii1_rxerr", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLDOWN}, | 477 | {"mii1_rxerr.mii1_rxerr", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLDOWN}, |
478 | {"mii1_txen.mii1_txen", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT}, | 478 | {"mii1_txen.mii1_txen", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT}, |
479 | {"mii1_rxdv.mii1_rxdv", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLDOWN}, | 479 | {"mii1_rxdv.mii1_rxdv", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLDOWN}, |
480 | {"mii1_txd3.mii1_txd3", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT}, | 480 | {"mii1_txd3.mii1_txd3", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT}, |
481 | {"mii1_txd2.mii1_txd2", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT}, | 481 | {"mii1_txd2.mii1_txd2", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT}, |
482 | {"mii1_txd1.mii1_txd1", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT}, | 482 | {"mii1_txd1.mii1_txd1", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT}, |
483 | {"mii1_txd0.mii1_txd0", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT}, | 483 | {"mii1_txd0.mii1_txd0", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT}, |
484 | {"mii1_txclk.mii1_txclk", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLDOWN}, | 484 | {"mii1_txclk.mii1_txclk", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLDOWN}, |
485 | {"mii1_rxclk.mii1_rxclk", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLDOWN}, | 485 | {"mii1_rxclk.mii1_rxclk", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLDOWN}, |
486 | {"mii1_rxd3.mii1_rxd3", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLDOWN}, | 486 | {"mii1_rxd3.mii1_rxd3", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLDOWN}, |
487 | {"mii1_rxd2.mii1_rxd2", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLDOWN}, | 487 | {"mii1_rxd2.mii1_rxd2", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLDOWN}, |
488 | {"mii1_rxd1.mii1_rxd1", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLDOWN}, | 488 | {"mii1_rxd1.mii1_rxd1", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLDOWN}, |
489 | {"mii1_rxd0.mii1_rxd0", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLDOWN}, | 489 | {"mii1_rxd0.mii1_rxd0", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLDOWN}, |
490 | {"mdio_data.mdio_data", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, | 490 | {"mdio_data.mdio_data", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, |
491 | {"mdio_clk.mdio_clk", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT_PULLUP}, | 491 | {"mdio_clk.mdio_clk", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT_PULLUP}, |
492 | {NULL, 0}, | 492 | {NULL, 0}, |
493 | }; | 493 | }; |
494 | 494 | ||
495 | /* Module pin mux for rmii1 */ | 495 | /* Module pin mux for rmii1 */ |
496 | static struct pinmux_config rmii1_pin_mux[] = { | 496 | static struct pinmux_config rmii1_pin_mux[] = { |
497 | {"mii1_crs.rmii1_crs_dv", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLDOWN}, | 497 | {"mii1_crs.rmii1_crs_dv", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLDOWN}, |
498 | {"mii1_rxerr.mii1_rxerr", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLDOWN}, | 498 | {"mii1_rxerr.mii1_rxerr", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLDOWN}, |
499 | {"mii1_txen.mii1_txen", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, | 499 | {"mii1_txen.mii1_txen", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, |
500 | {"mii1_txd1.mii1_txd1", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, | 500 | {"mii1_txd1.mii1_txd1", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, |
501 | {"mii1_txd0.mii1_txd0", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, | 501 | {"mii1_txd0.mii1_txd0", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT}, |
502 | {"mii1_rxd1.mii1_rxd1", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLDOWN}, | 502 | {"mii1_rxd1.mii1_rxd1", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLDOWN}, |
503 | {"mii1_rxd0.mii1_rxd0", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLDOWN}, | 503 | {"mii1_rxd0.mii1_rxd0", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLDOWN}, |
504 | {"rmii1_refclk.rmii1_refclk", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLDOWN}, | 504 | {"rmii1_refclk.rmii1_refclk", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLDOWN}, |
505 | {"mdio_data.mdio_data", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, | 505 | {"mdio_data.mdio_data", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, |
506 | {"mdio_clk.mdio_clk", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT_PULLUP}, | 506 | {"mdio_clk.mdio_clk", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT_PULLUP}, |
507 | {NULL, 0}, | 507 | {NULL, 0}, |
508 | }; | 508 | }; |
509 | 509 | ||
510 | static struct pinmux_config i2c1_pin_mux[] = { | 510 | static struct pinmux_config i2c1_pin_mux[] = { |
511 | {"spi0_d1.i2c1_sda", OMAP_MUX_MODE2 | AM33XX_SLEWCTRL_SLOW | | 511 | {"spi0_d1.i2c1_sda", OMAP_MUX_MODE2 | AM33XX_SLEWCTRL_SLOW | |
512 | AM33XX_PULL_ENBL | AM33XX_INPUT_EN}, | 512 | AM33XX_PULL_ENBL | AM33XX_INPUT_EN}, |
513 | {"spi0_cs0.i2c1_scl", OMAP_MUX_MODE2 | AM33XX_SLEWCTRL_SLOW | | 513 | {"spi0_cs0.i2c1_scl", OMAP_MUX_MODE2 | AM33XX_SLEWCTRL_SLOW | |
514 | AM33XX_PULL_ENBL | AM33XX_INPUT_EN}, | 514 | AM33XX_PULL_ENBL | AM33XX_INPUT_EN}, |
515 | {NULL, 0}, | 515 | {NULL, 0}, |
516 | }; | 516 | }; |
517 | 517 | ||
518 | /* Module pin mux for mcasp1 */ | 518 | /* Module pin mux for mcasp1 */ |
519 | static struct pinmux_config mcasp1_pin_mux[] = { | 519 | static struct pinmux_config mcasp1_pin_mux[] = { |
520 | {"mii1_crs.mcasp1_aclkx", OMAP_MUX_MODE4 | AM33XX_PIN_INPUT_PULLDOWN}, | 520 | {"mii1_crs.mcasp1_aclkx", OMAP_MUX_MODE4 | AM33XX_PIN_INPUT_PULLDOWN}, |
521 | {"mii1_rxerr.mcasp1_fsx", OMAP_MUX_MODE4 | AM33XX_PIN_INPUT_PULLDOWN}, | 521 | {"mii1_rxerr.mcasp1_fsx", OMAP_MUX_MODE4 | AM33XX_PIN_INPUT_PULLDOWN}, |
522 | {"mii1_col.mcasp1_axr2", OMAP_MUX_MODE4 | AM33XX_PIN_INPUT_PULLDOWN}, | 522 | {"mii1_col.mcasp1_axr2", OMAP_MUX_MODE4 | AM33XX_PIN_INPUT_PULLDOWN}, |
523 | {"rmii1_refclk.mcasp1_axr3", OMAP_MUX_MODE4 | | 523 | {"rmii1_refclk.mcasp1_axr3", OMAP_MUX_MODE4 | |
524 | AM33XX_PIN_INPUT_PULLDOWN}, | 524 | AM33XX_PIN_INPUT_PULLDOWN}, |
525 | {NULL, 0}, | 525 | {NULL, 0}, |
526 | }; | 526 | }; |
527 | 527 | ||
528 | 528 | ||
529 | /* Module pin mux for mmc0 */ | 529 | /* Module pin mux for mmc0 */ |
530 | static struct pinmux_config mmc0_pin_mux[] = { | 530 | static struct pinmux_config mmc0_pin_mux[] = { |
531 | {"mmc0_dat3.mmc0_dat3", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, | 531 | {"mmc0_dat3.mmc0_dat3", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, |
532 | {"mmc0_dat2.mmc0_dat2", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, | 532 | {"mmc0_dat2.mmc0_dat2", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, |
533 | {"mmc0_dat1.mmc0_dat1", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, | 533 | {"mmc0_dat1.mmc0_dat1", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, |
534 | {"mmc0_dat0.mmc0_dat0", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, | 534 | {"mmc0_dat0.mmc0_dat0", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, |
535 | {"mmc0_clk.mmc0_clk", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, | 535 | {"mmc0_clk.mmc0_clk", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, |
536 | {"mmc0_cmd.mmc0_cmd", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, | 536 | {"mmc0_cmd.mmc0_cmd", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, |
537 | {"mcasp0_aclkr.mmc0_sdwp", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT_PULLUP}, | 537 | {"mcasp0_aclkr.mmc0_sdwp", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT_PULLUP}, |
538 | {"spi0_cs1.mmc0_sdcd", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT_PULLUP}, | 538 | {"spi0_cs1.mmc0_sdcd", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT_PULLUP}, |
539 | {NULL, 0}, | 539 | {NULL, 0}, |
540 | }; | 540 | }; |
541 | 541 | ||
542 | static struct pinmux_config mmc0_no_cd_pin_mux[] = { | 542 | static struct pinmux_config mmc0_no_cd_pin_mux[] = { |
543 | {"mmc0_dat3.mmc0_dat3", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, | 543 | {"mmc0_dat3.mmc0_dat3", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, |
544 | {"mmc0_dat2.mmc0_dat2", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, | 544 | {"mmc0_dat2.mmc0_dat2", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, |
545 | {"mmc0_dat1.mmc0_dat1", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, | 545 | {"mmc0_dat1.mmc0_dat1", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, |
546 | {"mmc0_dat0.mmc0_dat0", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, | 546 | {"mmc0_dat0.mmc0_dat0", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, |
547 | {"mmc0_clk.mmc0_clk", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, | 547 | {"mmc0_clk.mmc0_clk", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, |
548 | {"mmc0_cmd.mmc0_cmd", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, | 548 | {"mmc0_cmd.mmc0_cmd", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, |
549 | {"mcasp0_aclkr.mmc0_sdwp", OMAP_MUX_MODE4 | AM33XX_PIN_INPUT_PULLDOWN}, | 549 | {"mcasp0_aclkr.mmc0_sdwp", OMAP_MUX_MODE4 | AM33XX_PIN_INPUT_PULLDOWN}, |
550 | {NULL, 0}, | 550 | {NULL, 0}, |
551 | }; | 551 | }; |
552 | 552 | ||
553 | /* Module pin mux for mmc1 */ | 553 | /* Module pin mux for mmc1 */ |
554 | static struct pinmux_config mmc1_pin_mux[] = { | 554 | static struct pinmux_config mmc1_pin_mux[] = { |
555 | {"gpmc_ad7.mmc1_dat7", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, | 555 | {"gpmc_ad7.mmc1_dat7", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, |
556 | {"gpmc_ad6.mmc1_dat6", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, | 556 | {"gpmc_ad6.mmc1_dat6", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, |
557 | {"gpmc_ad5.mmc1_dat5", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, | 557 | {"gpmc_ad5.mmc1_dat5", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, |
558 | {"gpmc_ad4.mmc1_dat4", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, | 558 | {"gpmc_ad4.mmc1_dat4", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, |
559 | {"gpmc_ad3.mmc1_dat3", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, | 559 | {"gpmc_ad3.mmc1_dat3", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, |
560 | {"gpmc_ad2.mmc1_dat2", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, | 560 | {"gpmc_ad2.mmc1_dat2", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, |
561 | {"gpmc_ad1.mmc1_dat1", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, | 561 | {"gpmc_ad1.mmc1_dat1", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, |
562 | {"gpmc_ad0.mmc1_dat0", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, | 562 | {"gpmc_ad0.mmc1_dat0", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, |
563 | {"gpmc_csn1.mmc1_clk", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLUP}, | 563 | {"gpmc_csn1.mmc1_clk", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLUP}, |
564 | {"gpmc_csn2.mmc1_cmd", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLUP}, | 564 | {"gpmc_csn2.mmc1_cmd", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLUP}, |
565 | {"gpmc_csn0.mmc1_sdwp", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT_PULLUP}, | 565 | {"gpmc_csn0.mmc1_sdwp", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT_PULLUP}, |
566 | {"gpmc_advn_ale.mmc1_sdcd", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT_PULLUP}, | 566 | {"gpmc_advn_ale.mmc1_sdcd", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT_PULLUP}, |
567 | {NULL, 0}, | 567 | {NULL, 0}, |
568 | }; | 568 | }; |
569 | 569 | ||
570 | /* Module pin mux for uart3 */ | 570 | /* Module pin mux for uart3 */ |
571 | static struct pinmux_config uart3_pin_mux[] = { | 571 | static struct pinmux_config uart3_pin_mux[] = { |
572 | {"spi0_cs1.uart3_rxd", AM33XX_PIN_INPUT_PULLUP}, | 572 | {"spi0_cs1.uart3_rxd", AM33XX_PIN_INPUT_PULLUP}, |
573 | {"ecap0_in_pwm0_out.uart3_txd", AM33XX_PULL_ENBL}, | 573 | {"ecap0_in_pwm0_out.uart3_txd", AM33XX_PULL_ENBL}, |
574 | {NULL, 0}, | 574 | {NULL, 0}, |
575 | }; | 575 | }; |
576 | 576 | ||
577 | static struct pinmux_config d_can_gp_pin_mux[] = { | 577 | static struct pinmux_config d_can_gp_pin_mux[] = { |
578 | {"uart0_ctsn.d_can1_tx", OMAP_MUX_MODE2 | AM33XX_PULL_ENBL}, | 578 | {"uart0_ctsn.d_can1_tx", OMAP_MUX_MODE2 | AM33XX_PULL_ENBL}, |
579 | {"uart0_rtsn.d_can1_rx", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLUP}, | 579 | {"uart0_rtsn.d_can1_rx", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLUP}, |
580 | {NULL, 0}, | 580 | {NULL, 0}, |
581 | }; | 581 | }; |
582 | 582 | ||
583 | static struct pinmux_config d_can_ia_pin_mux[] = { | 583 | static struct pinmux_config d_can_ia_pin_mux[] = { |
584 | {"uart0_rxd.d_can0_tx", OMAP_MUX_MODE2 | AM33XX_PULL_ENBL}, | 584 | {"uart0_rxd.d_can0_tx", OMAP_MUX_MODE2 | AM33XX_PULL_ENBL}, |
585 | {"uart0_txd.d_can0_rx", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLUP}, | 585 | {"uart0_txd.d_can0_rx", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLUP}, |
586 | {NULL, 0}, | 586 | {NULL, 0}, |
587 | }; | 587 | }; |
588 | 588 | ||
589 | /* Module pin mux for uart2 */ | ||
590 | static struct pinmux_config uart2_pin_mux[] = { | ||
591 | {"spi0_sclk.uart2_rxd", OMAP_MUX_MODE1 | AM33XX_SLEWCTRL_SLOW | | ||
592 | AM33XX_PIN_INPUT_PULLUP}, | ||
593 | {"spi0_d0.uart2_txd", OMAP_MUX_MODE1 | AM33XX_PULL_UP | | ||
594 | AM33XX_PULL_DISA | | ||
595 | AM33XX_SLEWCTRL_SLOW}, | ||
596 | {NULL, 0}, | ||
597 | }; | ||
598 | |||
599 | |||
589 | /* | 600 | /* |
590 | * @pin_mux - single module pin-mux structure which defines pin-mux | 601 | * @pin_mux - single module pin-mux structure which defines pin-mux |
591 | * details for all its pins. | 602 | * details for all its pins. |
592 | */ | 603 | */ |
593 | static void setup_pin_mux(struct pinmux_config *pin_mux) | 604 | static void setup_pin_mux(struct pinmux_config *pin_mux) |
594 | { | 605 | { |
595 | int i; | 606 | int i; |
596 | 607 | ||
597 | for (i = 0; pin_mux->string_name != NULL; pin_mux++) | 608 | for (i = 0; pin_mux->string_name != NULL; pin_mux++) |
598 | omap_mux_init_signal(pin_mux->string_name, pin_mux->val); | 609 | omap_mux_init_signal(pin_mux->string_name, pin_mux->val); |
599 | 610 | ||
600 | } | 611 | } |
601 | 612 | ||
602 | /* Matrix GPIO Keypad Support for profile-0 only: TODO */ | 613 | /* Matrix GPIO Keypad Support for profile-0 only: TODO */ |
603 | 614 | ||
604 | /* pinmux for keypad device */ | 615 | /* pinmux for keypad device */ |
605 | static struct pinmux_config matrix_keypad_pin_mux[] = { | 616 | static struct pinmux_config matrix_keypad_pin_mux[] = { |
606 | {"gpmc_a5.gpio1_21", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, | 617 | {"gpmc_a5.gpio1_21", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, |
607 | {"gpmc_a6.gpio1_22", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, | 618 | {"gpmc_a6.gpio1_22", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, |
608 | {"gpmc_a9.gpio1_25", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT}, | 619 | {"gpmc_a9.gpio1_25", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT}, |
609 | {"gpmc_a10.gpio1_26", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT}, | 620 | {"gpmc_a10.gpio1_26", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT}, |
610 | {"gpmc_a11.gpio1_27", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT}, | 621 | {"gpmc_a11.gpio1_27", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT}, |
611 | {NULL, 0}, | 622 | {NULL, 0}, |
612 | }; | 623 | }; |
613 | 624 | ||
614 | /* Keys mapping */ | 625 | /* Keys mapping */ |
615 | static const uint32_t am335x_evm_matrix_keys[] = { | 626 | static const uint32_t am335x_evm_matrix_keys[] = { |
616 | KEY(0, 0, KEY_MENU), | 627 | KEY(0, 0, KEY_MENU), |
617 | KEY(1, 0, KEY_BACK), | 628 | KEY(1, 0, KEY_BACK), |
618 | KEY(2, 0, KEY_LEFT), | 629 | KEY(2, 0, KEY_LEFT), |
619 | 630 | ||
620 | KEY(0, 1, KEY_RIGHT), | 631 | KEY(0, 1, KEY_RIGHT), |
621 | KEY(1, 1, KEY_ENTER), | 632 | KEY(1, 1, KEY_ENTER), |
622 | KEY(2, 1, KEY_DOWN), | 633 | KEY(2, 1, KEY_DOWN), |
623 | }; | 634 | }; |
624 | 635 | ||
625 | const struct matrix_keymap_data am335x_evm_keymap_data = { | 636 | const struct matrix_keymap_data am335x_evm_keymap_data = { |
626 | .keymap = am335x_evm_matrix_keys, | 637 | .keymap = am335x_evm_matrix_keys, |
627 | .keymap_size = ARRAY_SIZE(am335x_evm_matrix_keys), | 638 | .keymap_size = ARRAY_SIZE(am335x_evm_matrix_keys), |
628 | }; | 639 | }; |
629 | 640 | ||
630 | static const unsigned int am335x_evm_keypad_row_gpios[] = { | 641 | static const unsigned int am335x_evm_keypad_row_gpios[] = { |
631 | GPIO_TO_PIN(1, 25), GPIO_TO_PIN(1, 26), GPIO_TO_PIN(1, 27) | 642 | GPIO_TO_PIN(1, 25), GPIO_TO_PIN(1, 26), GPIO_TO_PIN(1, 27) |
632 | }; | 643 | }; |
633 | 644 | ||
634 | static const unsigned int am335x_evm_keypad_col_gpios[] = { | 645 | static const unsigned int am335x_evm_keypad_col_gpios[] = { |
635 | GPIO_TO_PIN(1, 21), GPIO_TO_PIN(1, 22) | 646 | GPIO_TO_PIN(1, 21), GPIO_TO_PIN(1, 22) |
636 | }; | 647 | }; |
637 | 648 | ||
638 | static struct matrix_keypad_platform_data am335x_evm_keypad_platform_data = { | 649 | static struct matrix_keypad_platform_data am335x_evm_keypad_platform_data = { |
639 | .keymap_data = &am335x_evm_keymap_data, | 650 | .keymap_data = &am335x_evm_keymap_data, |
640 | .row_gpios = am335x_evm_keypad_row_gpios, | 651 | .row_gpios = am335x_evm_keypad_row_gpios, |
641 | .num_row_gpios = ARRAY_SIZE(am335x_evm_keypad_row_gpios), | 652 | .num_row_gpios = ARRAY_SIZE(am335x_evm_keypad_row_gpios), |
642 | .col_gpios = am335x_evm_keypad_col_gpios, | 653 | .col_gpios = am335x_evm_keypad_col_gpios, |
643 | .num_col_gpios = ARRAY_SIZE(am335x_evm_keypad_col_gpios), | 654 | .num_col_gpios = ARRAY_SIZE(am335x_evm_keypad_col_gpios), |
644 | .active_low = false, | 655 | .active_low = false, |
645 | .debounce_ms = 5, | 656 | .debounce_ms = 5, |
646 | .col_scan_delay_us = 2, | 657 | .col_scan_delay_us = 2, |
647 | }; | 658 | }; |
648 | 659 | ||
649 | static struct platform_device am335x_evm_keyboard = { | 660 | static struct platform_device am335x_evm_keyboard = { |
650 | .name = "matrix-keypad", | 661 | .name = "matrix-keypad", |
651 | .id = -1, | 662 | .id = -1, |
652 | .dev = { | 663 | .dev = { |
653 | .platform_data = &am335x_evm_keypad_platform_data, | 664 | .platform_data = &am335x_evm_keypad_platform_data, |
654 | }, | 665 | }, |
655 | }; | 666 | }; |
656 | 667 | ||
657 | static void matrix_keypad_init(int evm_id, int profile) | 668 | static void matrix_keypad_init(int evm_id, int profile) |
658 | { | 669 | { |
659 | int err; | 670 | int err; |
660 | 671 | ||
661 | setup_pin_mux(matrix_keypad_pin_mux); | 672 | setup_pin_mux(matrix_keypad_pin_mux); |
662 | err = platform_device_register(&am335x_evm_keyboard); | 673 | err = platform_device_register(&am335x_evm_keyboard); |
663 | if (err) { | 674 | if (err) { |
664 | pr_err("failed to register matrix keypad (2x3) device\n"); | 675 | pr_err("failed to register matrix keypad (2x3) device\n"); |
665 | } | 676 | } |
666 | } | 677 | } |
667 | 678 | ||
668 | /* pinmux for keypad device */ | 679 | /* pinmux for keypad device */ |
669 | static struct pinmux_config volume_keys_pin_mux[] = { | 680 | static struct pinmux_config volume_keys_pin_mux[] = { |
670 | {"spi0_sclk.gpio0_2", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT}, | 681 | {"spi0_sclk.gpio0_2", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT}, |
671 | {"spi0_d0.gpio0_3", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT}, | 682 | {"spi0_d0.gpio0_3", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT}, |
672 | {NULL, 0}, | 683 | {NULL, 0}, |
673 | }; | 684 | }; |
674 | 685 | ||
675 | /* Configure GPIOs for Volume Keys */ | 686 | /* Configure GPIOs for Volume Keys */ |
676 | static struct gpio_keys_button am335x_evm_volume_gpio_buttons[] = { | 687 | static struct gpio_keys_button am335x_evm_volume_gpio_buttons[] = { |
677 | { | 688 | { |
678 | .code = KEY_VOLUMEUP, | 689 | .code = KEY_VOLUMEUP, |
679 | .gpio = GPIO_TO_PIN(0, 2), | 690 | .gpio = GPIO_TO_PIN(0, 2), |
680 | .active_low = true, | 691 | .active_low = true, |
681 | .desc = "volume-up", | 692 | .desc = "volume-up", |
682 | .type = EV_KEY, | 693 | .type = EV_KEY, |
683 | .wakeup = 1, | 694 | .wakeup = 1, |
684 | }, | 695 | }, |
685 | { | 696 | { |
686 | .code = KEY_VOLUMEDOWN, | 697 | .code = KEY_VOLUMEDOWN, |
687 | .gpio = GPIO_TO_PIN(0, 3), | 698 | .gpio = GPIO_TO_PIN(0, 3), |
688 | .active_low = true, | 699 | .active_low = true, |
689 | .desc = "volume-down", | 700 | .desc = "volume-down", |
690 | .type = EV_KEY, | 701 | .type = EV_KEY, |
691 | .wakeup = 1, | 702 | .wakeup = 1, |
692 | }, | 703 | }, |
693 | }; | 704 | }; |
694 | 705 | ||
695 | static struct gpio_keys_platform_data am335x_evm_volume_gpio_key_info = { | 706 | static struct gpio_keys_platform_data am335x_evm_volume_gpio_key_info = { |
696 | .buttons = am335x_evm_volume_gpio_buttons, | 707 | .buttons = am335x_evm_volume_gpio_buttons, |
697 | .nbuttons = ARRAY_SIZE(am335x_evm_volume_gpio_buttons), | 708 | .nbuttons = ARRAY_SIZE(am335x_evm_volume_gpio_buttons), |
698 | }; | 709 | }; |
699 | 710 | ||
700 | static struct platform_device am335x_evm_volume_keys = { | 711 | static struct platform_device am335x_evm_volume_keys = { |
701 | .name = "gpio-keys", | 712 | .name = "gpio-keys", |
702 | .id = -1, | 713 | .id = -1, |
703 | .dev = { | 714 | .dev = { |
704 | .platform_data = &am335x_evm_volume_gpio_key_info, | 715 | .platform_data = &am335x_evm_volume_gpio_key_info, |
705 | }, | 716 | }, |
706 | }; | 717 | }; |
707 | 718 | ||
708 | static void volume_keys_init(int evm_id, int profile) | 719 | static void volume_keys_init(int evm_id, int profile) |
709 | { | 720 | { |
710 | int err; | 721 | int err; |
711 | 722 | ||
712 | setup_pin_mux(volume_keys_pin_mux); | 723 | setup_pin_mux(volume_keys_pin_mux); |
713 | err = platform_device_register(&am335x_evm_volume_keys); | 724 | err = platform_device_register(&am335x_evm_volume_keys); |
714 | if (err) | 725 | if (err) |
715 | pr_err("failed to register matrix keypad (2x3) device\n"); | 726 | pr_err("failed to register matrix keypad (2x3) device\n"); |
716 | } | 727 | } |
717 | 728 | ||
718 | /* | 729 | /* |
719 | * @evm_id - evm id which needs to be configured | 730 | * @evm_id - evm id which needs to be configured |
720 | * @dev_cfg - single evm structure which includes | 731 | * @dev_cfg - single evm structure which includes |
721 | * all module inits, pin-mux defines | 732 | * all module inits, pin-mux defines |
722 | * @profile - if present, else PROFILE_NONE | 733 | * @profile - if present, else PROFILE_NONE |
723 | * @dghtr_brd_flg - Whether Daughter board is present or not | 734 | * @dghtr_brd_flg - Whether Daughter board is present or not |
724 | */ | 735 | */ |
725 | static void _configure_device(int evm_id, struct evm_dev_cfg *dev_cfg, | 736 | static void _configure_device(int evm_id, struct evm_dev_cfg *dev_cfg, |
726 | int profile) | 737 | int profile) |
727 | { | 738 | { |
728 | int i; | 739 | int i; |
729 | 740 | ||
730 | /* | 741 | /* |
731 | * Only General Purpose & Industrial Auto Motro Control | 742 | * Only General Purpose & Industrial Auto Motro Control |
732 | * EVM has profiles. So check if this evm has profile. | 743 | * EVM has profiles. So check if this evm has profile. |
733 | * If not, ignore the profile comparison | 744 | * If not, ignore the profile comparison |
734 | */ | 745 | */ |
735 | 746 | ||
736 | /* | 747 | /* |
737 | * If the device is on baseboard, directly configure it. Else (device on | 748 | * If the device is on baseboard, directly configure it. Else (device on |
738 | * Daughter board), check if the daughter card is detected. | 749 | * Daughter board), check if the daughter card is detected. |
739 | */ | 750 | */ |
740 | if (profile == PROFILE_NONE) { | 751 | if (profile == PROFILE_NONE) { |
741 | for (i = 0; dev_cfg->device_init != NULL; dev_cfg++) { | 752 | for (i = 0; dev_cfg->device_init != NULL; dev_cfg++) { |
742 | if (dev_cfg->device_on == DEV_ON_BASEBOARD) | 753 | if (dev_cfg->device_on == DEV_ON_BASEBOARD) |
743 | dev_cfg->device_init(evm_id, profile); | 754 | dev_cfg->device_init(evm_id, profile); |
744 | else if (daughter_brd_detected == true) | 755 | else if (daughter_brd_detected == true) |
745 | dev_cfg->device_init(evm_id, profile); | 756 | dev_cfg->device_init(evm_id, profile); |
746 | } | 757 | } |
747 | } else { | 758 | } else { |
748 | for (i = 0; dev_cfg->device_init != NULL; dev_cfg++) { | 759 | for (i = 0; dev_cfg->device_init != NULL; dev_cfg++) { |
749 | if (dev_cfg->profile & profile) { | 760 | if (dev_cfg->profile & profile) { |
750 | if (dev_cfg->device_on == DEV_ON_BASEBOARD) | 761 | if (dev_cfg->device_on == DEV_ON_BASEBOARD) |
751 | dev_cfg->device_init(evm_id, profile); | 762 | dev_cfg->device_init(evm_id, profile); |
752 | else if (daughter_brd_detected == true) | 763 | else if (daughter_brd_detected == true) |
753 | dev_cfg->device_init(evm_id, profile); | 764 | dev_cfg->device_init(evm_id, profile); |
754 | } | 765 | } |
755 | } | 766 | } |
756 | } | 767 | } |
757 | } | 768 | } |
758 | 769 | ||
759 | #define AM335X_LCD_BL_PIN GPIO_TO_PIN(0, 7) | 770 | #define AM335X_LCD_BL_PIN GPIO_TO_PIN(0, 7) |
760 | 771 | ||
761 | /* pinmux for usb0 drvvbus */ | 772 | /* pinmux for usb0 drvvbus */ |
762 | static struct pinmux_config usb0_pin_mux[] = { | 773 | static struct pinmux_config usb0_pin_mux[] = { |
763 | {"usb0_drvvbus.usb0_drvvbus", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT}, | 774 | {"usb0_drvvbus.usb0_drvvbus", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT}, |
764 | {NULL, 0}, | 775 | {NULL, 0}, |
765 | }; | 776 | }; |
766 | 777 | ||
767 | /* pinmux for usb1 drvvbus */ | 778 | /* pinmux for usb1 drvvbus */ |
768 | static struct pinmux_config usb1_pin_mux[] = { | 779 | static struct pinmux_config usb1_pin_mux[] = { |
769 | {"usb1_drvvbus.usb1_drvvbus", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT}, | 780 | {"usb1_drvvbus.usb1_drvvbus", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT}, |
770 | {NULL, 0}, | 781 | {NULL, 0}, |
771 | }; | 782 | }; |
772 | 783 | ||
773 | /* pinmux for profibus */ | 784 | /* pinmux for profibus */ |
774 | static struct pinmux_config profibus_pin_mux[] = { | 785 | static struct pinmux_config profibus_pin_mux[] = { |
775 | {"uart1_rxd.pr1_uart0_rxd_mux1", OMAP_MUX_MODE5 | AM33XX_PIN_INPUT}, | 786 | {"uart1_rxd.pr1_uart0_rxd_mux1", OMAP_MUX_MODE5 | AM33XX_PIN_INPUT}, |
776 | {"uart1_txd.pr1_uart0_txd_mux1", OMAP_MUX_MODE5 | AM33XX_PIN_OUTPUT}, | 787 | {"uart1_txd.pr1_uart0_txd_mux1", OMAP_MUX_MODE5 | AM33XX_PIN_OUTPUT}, |
777 | {"mcasp0_fsr.pr1_pru0_pru_r30_5", OMAP_MUX_MODE5 | AM33XX_PIN_OUTPUT}, | 788 | {"mcasp0_fsr.pr1_pru0_pru_r30_5", OMAP_MUX_MODE5 | AM33XX_PIN_OUTPUT}, |
778 | {NULL, 0}, | 789 | {NULL, 0}, |
779 | }; | 790 | }; |
780 | 791 | ||
781 | /* Module pin mux for eCAP0 */ | 792 | /* Module pin mux for eCAP0 */ |
782 | static struct pinmux_config ecap0_pin_mux[] = { | 793 | static struct pinmux_config ecap0_pin_mux[] = { |
783 | {"ecap0_in_pwm0_out.gpio0_7", AM33XX_PIN_OUTPUT}, | 794 | {"ecap0_in_pwm0_out.gpio0_7", AM33XX_PIN_OUTPUT}, |
784 | {NULL, 0}, | 795 | {NULL, 0}, |
785 | }; | 796 | }; |
786 | 797 | ||
787 | #define AM335XEVM_WLAN_IRQ_GPIO GPIO_TO_PIN(3, 17) | 798 | #define AM335XEVM_WLAN_IRQ_GPIO GPIO_TO_PIN(3, 17) |
788 | 799 | ||
789 | struct wl12xx_platform_data am335xevm_wlan_data = { | 800 | struct wl12xx_platform_data am335xevm_wlan_data = { |
790 | .irq = OMAP_GPIO_IRQ(AM335XEVM_WLAN_IRQ_GPIO), | 801 | .irq = OMAP_GPIO_IRQ(AM335XEVM_WLAN_IRQ_GPIO), |
791 | .board_ref_clock = WL12XX_REFCLOCK_38_XTAL, /* 38.4Mhz */ | 802 | .board_ref_clock = WL12XX_REFCLOCK_38_XTAL, /* 38.4Mhz */ |
792 | }; | 803 | }; |
793 | 804 | ||
794 | /* Module pin mux for wlan and bluetooth */ | 805 | /* Module pin mux for wlan and bluetooth */ |
795 | static struct pinmux_config mmc2_wl12xx_pin_mux[] = { | 806 | static struct pinmux_config mmc2_wl12xx_pin_mux[] = { |
796 | {"gpmc_a1.mmc2_dat0", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP}, | 807 | {"gpmc_a1.mmc2_dat0", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP}, |
797 | {"gpmc_a2.mmc2_dat1", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP}, | 808 | {"gpmc_a2.mmc2_dat1", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP}, |
798 | {"gpmc_a3.mmc2_dat2", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP}, | 809 | {"gpmc_a3.mmc2_dat2", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP}, |
799 | {"gpmc_ben1.mmc2_dat3", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP}, | 810 | {"gpmc_ben1.mmc2_dat3", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP}, |
800 | {"gpmc_csn3.mmc2_cmd", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP}, | 811 | {"gpmc_csn3.mmc2_cmd", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP}, |
801 | {"gpmc_clk.mmc2_clk", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP}, | 812 | {"gpmc_clk.mmc2_clk", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP}, |
802 | {NULL, 0}, | 813 | {NULL, 0}, |
803 | }; | 814 | }; |
804 | 815 | ||
805 | static struct pinmux_config uart1_wl12xx_pin_mux[] = { | 816 | static struct pinmux_config uart1_wl12xx_pin_mux[] = { |
806 | {"uart1_ctsn.uart1_ctsn", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT}, | 817 | {"uart1_ctsn.uart1_ctsn", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT}, |
807 | {"uart1_rtsn.uart1_rtsn", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT}, | 818 | {"uart1_rtsn.uart1_rtsn", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT}, |
808 | {"uart1_rxd.uart1_rxd", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, | 819 | {"uart1_rxd.uart1_rxd", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, |
809 | {"uart1_txd.uart1_txd", OMAP_MUX_MODE0 | AM33XX_PULL_ENBL}, | 820 | {"uart1_txd.uart1_txd", OMAP_MUX_MODE0 | AM33XX_PULL_ENBL}, |
810 | {NULL, 0}, | 821 | {NULL, 0}, |
811 | }; | 822 | }; |
812 | 823 | ||
813 | static struct pinmux_config wl12xx_pin_mux_evm_rev1_1a[] = { | 824 | static struct pinmux_config wl12xx_pin_mux_evm_rev1_1a[] = { |
814 | {"gpmc_a0.gpio1_16", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, | 825 | {"gpmc_a0.gpio1_16", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, |
815 | {"mcasp0_ahclkr.gpio3_17", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT}, | 826 | {"mcasp0_ahclkr.gpio3_17", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT}, |
816 | {"mcasp0_ahclkx.gpio3_21", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, | 827 | {"mcasp0_ahclkx.gpio3_21", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, |
817 | {NULL, 0}, | 828 | {NULL, 0}, |
818 | }; | 829 | }; |
819 | 830 | ||
820 | static struct pinmux_config wl12xx_pin_mux_evm_rev1_0[] = { | 831 | static struct pinmux_config wl12xx_pin_mux_evm_rev1_0[] = { |
821 | {"gpmc_csn1.gpio1_30", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, | 832 | {"gpmc_csn1.gpio1_30", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, |
822 | {"mcasp0_ahclkr.gpio3_17", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT}, | 833 | {"mcasp0_ahclkr.gpio3_17", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT}, |
823 | {"gpmc_csn2.gpio1_31", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, | 834 | {"gpmc_csn2.gpio1_31", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, |
824 | {NULL, 0}, | 835 | {NULL, 0}, |
825 | }; | 836 | }; |
826 | 837 | ||
827 | static int backlight_enable = false; | 838 | static int backlight_enable = false; |
828 | 839 | ||
829 | static void enable_ecap0(int evm_id, int profile) | 840 | static void enable_ecap0(int evm_id, int profile) |
830 | { | 841 | { |
831 | backlight_enable = true; | 842 | backlight_enable = true; |
832 | } | 843 | } |
833 | 844 | ||
834 | static int __init ecap0_init(void) | 845 | static int __init ecap0_init(void) |
835 | { | 846 | { |
836 | int status = 0; | 847 | int status = 0; |
837 | 848 | ||
838 | if (backlight_enable) { | 849 | if (backlight_enable) { |
839 | setup_pin_mux(ecap0_pin_mux); | 850 | setup_pin_mux(ecap0_pin_mux); |
840 | 851 | ||
841 | status = gpio_request(AM335X_LCD_BL_PIN, "lcd bl\n"); | 852 | status = gpio_request(AM335X_LCD_BL_PIN, "lcd bl\n"); |
842 | if (status < 0) | 853 | if (status < 0) |
843 | pr_warn("Failed to request gpio for LCD backlight\n"); | 854 | pr_warn("Failed to request gpio for LCD backlight\n"); |
844 | 855 | ||
845 | gpio_direction_output(AM335X_LCD_BL_PIN, 1); | 856 | gpio_direction_output(AM335X_LCD_BL_PIN, 1); |
846 | } | 857 | } |
847 | return status; | 858 | return status; |
848 | } | 859 | } |
849 | late_initcall(ecap0_init); | 860 | late_initcall(ecap0_init); |
850 | 861 | ||
851 | static int __init conf_disp_pll(int rate) | 862 | static int __init conf_disp_pll(int rate) |
852 | { | 863 | { |
853 | struct clk *disp_pll; | 864 | struct clk *disp_pll; |
854 | int ret = -EINVAL; | 865 | int ret = -EINVAL; |
855 | 866 | ||
856 | disp_pll = clk_get(NULL, "dpll_disp_ck"); | 867 | disp_pll = clk_get(NULL, "dpll_disp_ck"); |
857 | if (IS_ERR(disp_pll)) { | 868 | if (IS_ERR(disp_pll)) { |
858 | pr_err("Cannot clk_get disp_pll\n"); | 869 | pr_err("Cannot clk_get disp_pll\n"); |
859 | goto out; | 870 | goto out; |
860 | } | 871 | } |
861 | 872 | ||
862 | ret = clk_set_rate(disp_pll, rate); | 873 | ret = clk_set_rate(disp_pll, rate); |
863 | clk_put(disp_pll); | 874 | clk_put(disp_pll); |
864 | out: | 875 | out: |
865 | return ret; | 876 | return ret; |
866 | } | 877 | } |
867 | 878 | ||
868 | static void lcdc_init(int evm_id, int profile) | 879 | static void lcdc_init(int evm_id, int profile) |
869 | { | 880 | { |
870 | 881 | ||
871 | setup_pin_mux(lcdc_pin_mux); | 882 | setup_pin_mux(lcdc_pin_mux); |
872 | 883 | ||
873 | if (conf_disp_pll(300000000)) { | 884 | if (conf_disp_pll(300000000)) { |
874 | pr_info("Failed configure display PLL, not attempting to" | 885 | pr_info("Failed configure display PLL, not attempting to" |
875 | "register LCDC\n"); | 886 | "register LCDC\n"); |
876 | return; | 887 | return; |
877 | } | 888 | } |
878 | 889 | ||
879 | if (am33xx_register_lcdc(&TFC_S9700RTWV35TR_01B_pdata)) | 890 | if (am33xx_register_lcdc(&TFC_S9700RTWV35TR_01B_pdata)) |
880 | pr_info("Failed to register LCDC device\n"); | 891 | pr_info("Failed to register LCDC device\n"); |
881 | return; | 892 | return; |
882 | } | 893 | } |
883 | 894 | ||
884 | static void tsc_init(int evm_id, int profile) | 895 | static void tsc_init(int evm_id, int profile) |
885 | { | 896 | { |
886 | int err; | 897 | int err; |
887 | 898 | ||
888 | if (gp_evm_revision == GP_EVM_REV_IS_1_1A) { | 899 | if (gp_evm_revision == GP_EVM_REV_IS_1_1A) { |
889 | am335x_touchscreen_data.analog_input = 1; | 900 | am335x_touchscreen_data.analog_input = 1; |
890 | pr_info("TSC connected to beta GP EVM\n"); | 901 | pr_info("TSC connected to beta GP EVM\n"); |
891 | } else { | 902 | } else { |
892 | am335x_touchscreen_data.analog_input = 0; | 903 | am335x_touchscreen_data.analog_input = 0; |
893 | pr_info("TSC connected to alpha GP EVM\n"); | 904 | pr_info("TSC connected to alpha GP EVM\n"); |
894 | } | 905 | } |
895 | setup_pin_mux(tsc_pin_mux); | 906 | setup_pin_mux(tsc_pin_mux); |
896 | err = platform_device_register(&tsc_device); | 907 | err = platform_device_register(&tsc_device); |
897 | if (err) | 908 | if (err) |
898 | pr_err("failed to register touchscreen device\n"); | 909 | pr_err("failed to register touchscreen device\n"); |
899 | } | 910 | } |
900 | 911 | ||
901 | static void rgmii1_init(int evm_id, int profile) | 912 | static void rgmii1_init(int evm_id, int profile) |
902 | { | 913 | { |
903 | setup_pin_mux(rgmii1_pin_mux); | 914 | setup_pin_mux(rgmii1_pin_mux); |
904 | return; | 915 | return; |
905 | } | 916 | } |
906 | 917 | ||
907 | static void rgmii2_init(int evm_id, int profile) | 918 | static void rgmii2_init(int evm_id, int profile) |
908 | { | 919 | { |
909 | setup_pin_mux(rgmii2_pin_mux); | 920 | setup_pin_mux(rgmii2_pin_mux); |
910 | return; | 921 | return; |
911 | } | 922 | } |
912 | 923 | ||
913 | static void mii1_init(int evm_id, int profile) | 924 | static void mii1_init(int evm_id, int profile) |
914 | { | 925 | { |
915 | setup_pin_mux(mii1_pin_mux); | 926 | setup_pin_mux(mii1_pin_mux); |
916 | return; | 927 | return; |
917 | } | 928 | } |
918 | 929 | ||
919 | static void rmii1_init(int evm_id, int profile) | 930 | static void rmii1_init(int evm_id, int profile) |
920 | { | 931 | { |
921 | setup_pin_mux(rmii1_pin_mux); | 932 | setup_pin_mux(rmii1_pin_mux); |
922 | return; | 933 | return; |
923 | } | 934 | } |
924 | 935 | ||
925 | static void usb0_init(int evm_id, int profile) | 936 | static void usb0_init(int evm_id, int profile) |
926 | { | 937 | { |
927 | setup_pin_mux(usb0_pin_mux); | 938 | setup_pin_mux(usb0_pin_mux); |
928 | return; | 939 | return; |
929 | } | 940 | } |
930 | 941 | ||
931 | static void usb1_init(int evm_id, int profile) | 942 | static void usb1_init(int evm_id, int profile) |
932 | { | 943 | { |
933 | setup_pin_mux(usb1_pin_mux); | 944 | setup_pin_mux(usb1_pin_mux); |
934 | return; | 945 | return; |
935 | } | 946 | } |
936 | 947 | ||
937 | /* setup uart3 */ | 948 | /* setup uart3 */ |
938 | static void uart3_init(int evm_id, int profile) | 949 | static void uart3_init(int evm_id, int profile) |
939 | { | 950 | { |
940 | setup_pin_mux(uart3_pin_mux); | 951 | setup_pin_mux(uart3_pin_mux); |
941 | return; | 952 | return; |
942 | } | 953 | } |
943 | 954 | ||
955 | /* setup uart2 */ | ||
956 | static void uart2_init(int evm_id, int profile) | ||
957 | { | ||
958 | setup_pin_mux(uart2_pin_mux); | ||
959 | return; | ||
960 | } | ||
961 | |||
944 | /* NAND partition information */ | 962 | /* NAND partition information */ |
945 | static struct mtd_partition am335x_nand_partitions[] = { | 963 | static struct mtd_partition am335x_nand_partitions[] = { |
946 | /* All the partition sizes are listed in terms of NAND block size */ | 964 | /* All the partition sizes are listed in terms of NAND block size */ |
947 | { | 965 | { |
948 | .name = "SPL", | 966 | .name = "SPL", |
949 | .offset = 0, /* Offset = 0x0 */ | 967 | .offset = 0, /* Offset = 0x0 */ |
950 | .size = SZ_128K, | 968 | .size = SZ_128K, |
951 | }, | 969 | }, |
952 | { | 970 | { |
953 | .name = "SPL.backup1", | 971 | .name = "SPL.backup1", |
954 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x20000 */ | 972 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x20000 */ |
955 | .size = SZ_128K, | 973 | .size = SZ_128K, |
956 | }, | 974 | }, |
957 | { | 975 | { |
958 | .name = "SPL.backup2", | 976 | .name = "SPL.backup2", |
959 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x40000 */ | 977 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x40000 */ |
960 | .size = SZ_128K, | 978 | .size = SZ_128K, |
961 | }, | 979 | }, |
962 | { | 980 | { |
963 | .name = "SPL.backup3", | 981 | .name = "SPL.backup3", |
964 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x60000 */ | 982 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x60000 */ |
965 | .size = SZ_128K, | 983 | .size = SZ_128K, |
966 | }, | 984 | }, |
967 | { | 985 | { |
968 | .name = "U-Boot", | 986 | .name = "U-Boot", |
969 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */ | 987 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */ |
970 | .size = 15 * SZ_128K, | 988 | .size = 15 * SZ_128K, |
971 | }, | 989 | }, |
972 | { | 990 | { |
973 | .name = "U-Boot Env", | 991 | .name = "U-Boot Env", |
974 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x260000 */ | 992 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x260000 */ |
975 | .size = 1 * SZ_128K, | 993 | .size = 1 * SZ_128K, |
976 | }, | 994 | }, |
977 | { | 995 | { |
978 | .name = "Kernel", | 996 | .name = "Kernel", |
979 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */ | 997 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */ |
980 | .size = 40 * SZ_128K, | 998 | .size = 40 * SZ_128K, |
981 | }, | 999 | }, |
982 | { | 1000 | { |
983 | .name = "File System", | 1001 | .name = "File System", |
984 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x780000 */ | 1002 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x780000 */ |
985 | .size = MTDPART_SIZ_FULL, | 1003 | .size = MTDPART_SIZ_FULL, |
986 | }, | 1004 | }, |
987 | }; | 1005 | }; |
988 | 1006 | ||
989 | /* SPI 0/1 Platform Data */ | 1007 | /* SPI 0/1 Platform Data */ |
990 | /* SPI flash information */ | 1008 | /* SPI flash information */ |
991 | static struct mtd_partition am335x_spi_partitions[] = { | 1009 | static struct mtd_partition am335x_spi_partitions[] = { |
992 | /* All the partition sizes are listed in terms of erase size */ | 1010 | /* All the partition sizes are listed in terms of erase size */ |
993 | { | 1011 | { |
994 | .name = "U-Boot-min", | 1012 | .name = "U-Boot-min", |
995 | .offset = 0, | 1013 | .offset = 0, |
996 | .size = SZ_128K, | 1014 | .size = SZ_128K, |
997 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | 1015 | .mask_flags = MTD_WRITEABLE, /* force read-only */ |
998 | }, | 1016 | }, |
999 | { | 1017 | { |
1000 | .name = "U-Boot", | 1018 | .name = "U-Boot", |
1001 | .offset = MTDPART_OFS_APPEND, | 1019 | .offset = MTDPART_OFS_APPEND, |
1002 | .size = 2 * SZ_128K, | 1020 | .size = 2 * SZ_128K, |
1003 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | 1021 | .mask_flags = MTD_WRITEABLE, /* force read-only */ |
1004 | }, | 1022 | }, |
1005 | { | 1023 | { |
1006 | .name = "U-Boot Env", | 1024 | .name = "U-Boot Env", |
1007 | .offset = MTDPART_OFS_APPEND, | 1025 | .offset = MTDPART_OFS_APPEND, |
1008 | .size = 2 * SZ_4K, | 1026 | .size = 2 * SZ_4K, |
1009 | }, | 1027 | }, |
1010 | { | 1028 | { |
1011 | .name = "Kernel", | 1029 | .name = "Kernel", |
1012 | .offset = MTDPART_OFS_APPEND, | 1030 | .offset = MTDPART_OFS_APPEND, |
1013 | .size = 28 * SZ_128K, | 1031 | .size = 28 * SZ_128K, |
1014 | }, | 1032 | }, |
1015 | { | 1033 | { |
1016 | .name = "File System", | 1034 | .name = "File System", |
1017 | .offset = MTDPART_OFS_APPEND, | 1035 | .offset = MTDPART_OFS_APPEND, |
1018 | .size = MTDPART_SIZ_FULL, /* size ~= 1.1 MiB */ | 1036 | .size = MTDPART_SIZ_FULL, /* size ~= 1.1 MiB */ |
1019 | } | 1037 | } |
1020 | }; | 1038 | }; |
1021 | 1039 | ||
1022 | static const struct flash_platform_data am335x_spi_flash = { | 1040 | static const struct flash_platform_data am335x_spi_flash = { |
1023 | .type = "w25q64", | 1041 | .type = "w25q64", |
1024 | .name = "spi_flash", | 1042 | .name = "spi_flash", |
1025 | .parts = am335x_spi_partitions, | 1043 | .parts = am335x_spi_partitions, |
1026 | .nr_parts = ARRAY_SIZE(am335x_spi_partitions), | 1044 | .nr_parts = ARRAY_SIZE(am335x_spi_partitions), |
1027 | }; | 1045 | }; |
1028 | 1046 | ||
1029 | /* | 1047 | /* |
1030 | * SPI Flash works at 80Mhz however SPI Controller works at 48MHz. | 1048 | * SPI Flash works at 80Mhz however SPI Controller works at 48MHz. |
1031 | * So setup Max speed to be less than that of Controller speed | 1049 | * So setup Max speed to be less than that of Controller speed |
1032 | */ | 1050 | */ |
1033 | static struct spi_board_info am335x_spi0_slave_info[] = { | 1051 | static struct spi_board_info am335x_spi0_slave_info[] = { |
1034 | { | 1052 | { |
1035 | .modalias = "m25p80", | 1053 | .modalias = "m25p80", |
1036 | .platform_data = &am335x_spi_flash, | 1054 | .platform_data = &am335x_spi_flash, |
1037 | .irq = -1, | 1055 | .irq = -1, |
1038 | .max_speed_hz = 24000000, | 1056 | .max_speed_hz = 24000000, |
1039 | .bus_num = 1, | 1057 | .bus_num = 1, |
1040 | .chip_select = 0, | 1058 | .chip_select = 0, |
1041 | }, | 1059 | }, |
1042 | }; | 1060 | }; |
1043 | 1061 | ||
1044 | static struct spi_board_info am335x_spi1_slave_info[] = { | 1062 | static struct spi_board_info am335x_spi1_slave_info[] = { |
1045 | { | 1063 | { |
1046 | .modalias = "m25p80", | 1064 | .modalias = "m25p80", |
1047 | .platform_data = &am335x_spi_flash, | 1065 | .platform_data = &am335x_spi_flash, |
1048 | .irq = -1, | 1066 | .irq = -1, |
1049 | .max_speed_hz = 12000000, | 1067 | .max_speed_hz = 12000000, |
1050 | .bus_num = 2, | 1068 | .bus_num = 2, |
1051 | .chip_select = 0, | 1069 | .chip_select = 0, |
1052 | }, | 1070 | }, |
1053 | }; | 1071 | }; |
1054 | 1072 | ||
1055 | static void evm_nand_init(int evm_id, int profile) | 1073 | static void evm_nand_init(int evm_id, int profile) |
1056 | { | 1074 | { |
1057 | setup_pin_mux(nand_pin_mux); | 1075 | setup_pin_mux(nand_pin_mux); |
1058 | board_nand_init(am335x_nand_partitions, | 1076 | board_nand_init(am335x_nand_partitions, |
1059 | ARRAY_SIZE(am335x_nand_partitions), 0, 0); | 1077 | ARRAY_SIZE(am335x_nand_partitions), 0, 0); |
1060 | } | 1078 | } |
1061 | 1079 | ||
1062 | static struct lis3lv02d_platform_data lis331dlh_pdata = { | 1080 | static struct lis3lv02d_platform_data lis331dlh_pdata = { |
1063 | .click_flags = LIS3_CLICK_SINGLE_X | | 1081 | .click_flags = LIS3_CLICK_SINGLE_X | |
1064 | LIS3_CLICK_SINGLE_Y | | 1082 | LIS3_CLICK_SINGLE_Y | |
1065 | LIS3_CLICK_SINGLE_Z, | 1083 | LIS3_CLICK_SINGLE_Z, |
1066 | .wakeup_flags = LIS3_WAKEUP_X_LO | LIS3_WAKEUP_X_HI | | 1084 | .wakeup_flags = LIS3_WAKEUP_X_LO | LIS3_WAKEUP_X_HI | |
1067 | LIS3_WAKEUP_Y_LO | LIS3_WAKEUP_Y_HI | | 1085 | LIS3_WAKEUP_Y_LO | LIS3_WAKEUP_Y_HI | |
1068 | LIS3_WAKEUP_Z_LO | LIS3_WAKEUP_Z_HI, | 1086 | LIS3_WAKEUP_Z_LO | LIS3_WAKEUP_Z_HI, |
1069 | .irq_cfg = LIS3_IRQ1_CLICK | LIS3_IRQ2_CLICK, | 1087 | .irq_cfg = LIS3_IRQ1_CLICK | LIS3_IRQ2_CLICK, |
1070 | .wakeup_thresh = 10, | 1088 | .wakeup_thresh = 10, |
1071 | .click_thresh_x = 10, | 1089 | .click_thresh_x = 10, |
1072 | .click_thresh_y = 10, | 1090 | .click_thresh_y = 10, |
1073 | .click_thresh_z = 10, | 1091 | .click_thresh_z = 10, |
1074 | .g_range = 2, | 1092 | .g_range = 2, |
1075 | .st_min_limits[0] = 120, | 1093 | .st_min_limits[0] = 120, |
1076 | .st_min_limits[1] = 120, | 1094 | .st_min_limits[1] = 120, |
1077 | .st_min_limits[2] = 140, | 1095 | .st_min_limits[2] = 140, |
1078 | .st_max_limits[0] = 550, | 1096 | .st_max_limits[0] = 550, |
1079 | .st_max_limits[1] = 550, | 1097 | .st_max_limits[1] = 550, |
1080 | .st_max_limits[2] = 750, | 1098 | .st_max_limits[2] = 750, |
1081 | }; | 1099 | }; |
1082 | 1100 | ||
1083 | static struct i2c_board_info am335x_i2c_boardinfo1[] = { | 1101 | static struct i2c_board_info am335x_i2c_boardinfo1[] = { |
1084 | { | 1102 | { |
1085 | I2C_BOARD_INFO("tlv320aic3x", 0x1b), | 1103 | I2C_BOARD_INFO("tlv320aic3x", 0x1b), |
1086 | }, | 1104 | }, |
1087 | { | 1105 | { |
1088 | I2C_BOARD_INFO("lis331dlh", 0x18), | 1106 | I2C_BOARD_INFO("lis331dlh", 0x18), |
1089 | .platform_data = &lis331dlh_pdata, | 1107 | .platform_data = &lis331dlh_pdata, |
1090 | }, | 1108 | }, |
1091 | { | 1109 | { |
1092 | I2C_BOARD_INFO("tsl2550", 0x39), | 1110 | I2C_BOARD_INFO("tsl2550", 0x39), |
1093 | }, | 1111 | }, |
1094 | { | 1112 | { |
1095 | I2C_BOARD_INFO("tmp275", 0x48), | 1113 | I2C_BOARD_INFO("tmp275", 0x48), |
1096 | }, | 1114 | }, |
1097 | }; | 1115 | }; |
1098 | 1116 | ||
1099 | static void i2c1_init(int evm_id, int profile) | 1117 | static void i2c1_init(int evm_id, int profile) |
1100 | { | 1118 | { |
1101 | setup_pin_mux(i2c1_pin_mux); | 1119 | setup_pin_mux(i2c1_pin_mux); |
1102 | omap_register_i2c_bus(2, 100, am335x_i2c_boardinfo1, | 1120 | omap_register_i2c_bus(2, 100, am335x_i2c_boardinfo1, |
1103 | ARRAY_SIZE(am335x_i2c_boardinfo1)); | 1121 | ARRAY_SIZE(am335x_i2c_boardinfo1)); |
1104 | return; | 1122 | return; |
1105 | } | 1123 | } |
1106 | 1124 | ||
1107 | /* Setup McASP 1 */ | 1125 | /* Setup McASP 1 */ |
1108 | static void mcasp1_init(int evm_id, int profile) | 1126 | static void mcasp1_init(int evm_id, int profile) |
1109 | { | 1127 | { |
1110 | /* Configure McASP */ | 1128 | /* Configure McASP */ |
1111 | setup_pin_mux(mcasp1_pin_mux); | 1129 | setup_pin_mux(mcasp1_pin_mux); |
1112 | am335x_register_mcasp1(&am335x_evm_snd_data1); | 1130 | am335x_register_mcasp1(&am335x_evm_snd_data1); |
1113 | return; | 1131 | return; |
1114 | } | 1132 | } |
1115 | 1133 | ||
1116 | static void mmc1_init(int evm_id, int profile) | 1134 | static void mmc1_init(int evm_id, int profile) |
1117 | { | 1135 | { |
1118 | setup_pin_mux(mmc1_pin_mux); | 1136 | setup_pin_mux(mmc1_pin_mux); |
1119 | 1137 | ||
1120 | am335x_mmc[1].mmc = 2; | 1138 | am335x_mmc[1].mmc = 2; |
1121 | am335x_mmc[1].caps = MMC_CAP_4_BIT_DATA; | 1139 | am335x_mmc[1].caps = MMC_CAP_4_BIT_DATA; |
1122 | am335x_mmc[1].gpio_cd = GPIO_TO_PIN(2, 2); | 1140 | am335x_mmc[1].gpio_cd = GPIO_TO_PIN(2, 2); |
1123 | am335x_mmc[1].gpio_wp = GPIO_TO_PIN(1, 29); | 1141 | am335x_mmc[1].gpio_wp = GPIO_TO_PIN(1, 29); |
1124 | am335x_mmc[1].ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34; /* 3V3 */ | 1142 | am335x_mmc[1].ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34; /* 3V3 */ |
1125 | 1143 | ||
1126 | /* mmc will be initialized when mmc0_init is called */ | 1144 | /* mmc will be initialized when mmc0_init is called */ |
1127 | return; | 1145 | return; |
1128 | } | 1146 | } |
1129 | 1147 | ||
1130 | static void mmc2_wl12xx_init(int evm_id, int profile) | 1148 | static void mmc2_wl12xx_init(int evm_id, int profile) |
1131 | { | 1149 | { |
1132 | setup_pin_mux(mmc2_wl12xx_pin_mux); | 1150 | setup_pin_mux(mmc2_wl12xx_pin_mux); |
1133 | 1151 | ||
1134 | am335x_mmc[1].mmc = 3; | 1152 | am335x_mmc[1].mmc = 3; |
1135 | am335x_mmc[1].name = "wl1271"; | 1153 | am335x_mmc[1].name = "wl1271"; |
1136 | am335x_mmc[1].caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD | 1154 | am335x_mmc[1].caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD |
1137 | | MMC_PM_KEEP_POWER; | 1155 | | MMC_PM_KEEP_POWER; |
1138 | am335x_mmc[1].nonremovable = true; | 1156 | am335x_mmc[1].nonremovable = true; |
1139 | am335x_mmc[1].gpio_cd = -EINVAL; | 1157 | am335x_mmc[1].gpio_cd = -EINVAL; |
1140 | am335x_mmc[1].gpio_wp = -EINVAL; | 1158 | am335x_mmc[1].gpio_wp = -EINVAL; |
1141 | am335x_mmc[1].ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34; /* 3V3 */ | 1159 | am335x_mmc[1].ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34; /* 3V3 */ |
1142 | 1160 | ||
1143 | /* mmc will be initialized when mmc0_init is called */ | 1161 | /* mmc will be initialized when mmc0_init is called */ |
1144 | return; | 1162 | return; |
1145 | } | 1163 | } |
1146 | 1164 | ||
1147 | static void uart1_wl12xx_init(int evm_id, int profile) | 1165 | static void uart1_wl12xx_init(int evm_id, int profile) |
1148 | { | 1166 | { |
1149 | setup_pin_mux(uart1_wl12xx_pin_mux); | 1167 | setup_pin_mux(uart1_wl12xx_pin_mux); |
1150 | } | 1168 | } |
1151 | 1169 | ||
1152 | static void wl12xx_bluetooth_enable(void) | 1170 | static void wl12xx_bluetooth_enable(void) |
1153 | { | 1171 | { |
1154 | int status = gpio_request(am335xevm_wlan_data.bt_enable_gpio, | 1172 | int status = gpio_request(am335xevm_wlan_data.bt_enable_gpio, |
1155 | "bt_en\n"); | 1173 | "bt_en\n"); |
1156 | if (status < 0) | 1174 | if (status < 0) |
1157 | pr_err("Failed to request gpio for bt_enable"); | 1175 | pr_err("Failed to request gpio for bt_enable"); |
1158 | 1176 | ||
1159 | pr_info("Configure Bluetooth Enable pin...\n"); | 1177 | pr_info("Configure Bluetooth Enable pin...\n"); |
1160 | gpio_direction_output(am335xevm_wlan_data.bt_enable_gpio, 0); | 1178 | gpio_direction_output(am335xevm_wlan_data.bt_enable_gpio, 0); |
1161 | } | 1179 | } |
1162 | 1180 | ||
1163 | static int wl12xx_set_power(struct device *dev, int slot, int on, int vdd) | 1181 | static int wl12xx_set_power(struct device *dev, int slot, int on, int vdd) |
1164 | { | 1182 | { |
1165 | if (on) { | 1183 | if (on) { |
1166 | gpio_set_value(am335xevm_wlan_data.wlan_enable_gpio, 1); | 1184 | gpio_set_value(am335xevm_wlan_data.wlan_enable_gpio, 1); |
1167 | mdelay(70); | 1185 | mdelay(70); |
1168 | } | 1186 | } |
1169 | else | 1187 | else |
1170 | gpio_set_value(am335xevm_wlan_data.wlan_enable_gpio, 0); | 1188 | gpio_set_value(am335xevm_wlan_data.wlan_enable_gpio, 0); |
1171 | 1189 | ||
1172 | return 0; | 1190 | return 0; |
1173 | } | 1191 | } |
1174 | 1192 | ||
1175 | static void wl12xx_init(int evm_id, int profile) | 1193 | static void wl12xx_init(int evm_id, int profile) |
1176 | { | 1194 | { |
1177 | struct device *dev; | 1195 | struct device *dev; |
1178 | struct omap_mmc_platform_data *pdata; | 1196 | struct omap_mmc_platform_data *pdata; |
1179 | int ret; | 1197 | int ret; |
1180 | 1198 | ||
1181 | /* Register WLAN and BT enable pins based on the evm board revision */ | 1199 | /* Register WLAN and BT enable pins based on the evm board revision */ |
1182 | if (gp_evm_revision == GP_EVM_REV_IS_1_1A) { | 1200 | if (gp_evm_revision == GP_EVM_REV_IS_1_1A) { |
1183 | am335xevm_wlan_data.wlan_enable_gpio = GPIO_TO_PIN(1, 16); | 1201 | am335xevm_wlan_data.wlan_enable_gpio = GPIO_TO_PIN(1, 16); |
1184 | am335xevm_wlan_data.bt_enable_gpio = GPIO_TO_PIN(3, 21); | 1202 | am335xevm_wlan_data.bt_enable_gpio = GPIO_TO_PIN(3, 21); |
1185 | } | 1203 | } |
1186 | else { | 1204 | else { |
1187 | am335xevm_wlan_data.wlan_enable_gpio = GPIO_TO_PIN(1, 30); | 1205 | am335xevm_wlan_data.wlan_enable_gpio = GPIO_TO_PIN(1, 30); |
1188 | am335xevm_wlan_data.bt_enable_gpio = GPIO_TO_PIN(1, 31); | 1206 | am335xevm_wlan_data.bt_enable_gpio = GPIO_TO_PIN(1, 31); |
1189 | } | 1207 | } |
1190 | 1208 | ||
1191 | wl12xx_bluetooth_enable(); | 1209 | wl12xx_bluetooth_enable(); |
1192 | 1210 | ||
1193 | if (wl12xx_set_platform_data(&am335xevm_wlan_data)) | 1211 | if (wl12xx_set_platform_data(&am335xevm_wlan_data)) |
1194 | pr_err("error setting wl12xx data\n"); | 1212 | pr_err("error setting wl12xx data\n"); |
1195 | 1213 | ||
1196 | dev = am335x_mmc[1].dev; | 1214 | dev = am335x_mmc[1].dev; |
1197 | if (!dev) { | 1215 | if (!dev) { |
1198 | pr_err("wl12xx mmc device initialization failed\n"); | 1216 | pr_err("wl12xx mmc device initialization failed\n"); |
1199 | goto out; | 1217 | goto out; |
1200 | } | 1218 | } |
1201 | 1219 | ||
1202 | pdata = dev->platform_data; | 1220 | pdata = dev->platform_data; |
1203 | if (!pdata) { | 1221 | if (!pdata) { |
1204 | pr_err("Platfrom data of wl12xx device not set\n"); | 1222 | pr_err("Platfrom data of wl12xx device not set\n"); |
1205 | goto out; | 1223 | goto out; |
1206 | } | 1224 | } |
1207 | 1225 | ||
1208 | ret = gpio_request_one(am335xevm_wlan_data.wlan_enable_gpio, | 1226 | ret = gpio_request_one(am335xevm_wlan_data.wlan_enable_gpio, |
1209 | GPIOF_OUT_INIT_LOW, "wlan_en"); | 1227 | GPIOF_OUT_INIT_LOW, "wlan_en"); |
1210 | if (ret) { | 1228 | if (ret) { |
1211 | pr_err("Error requesting wlan enable gpio: %d\n", ret); | 1229 | pr_err("Error requesting wlan enable gpio: %d\n", ret); |
1212 | goto out; | 1230 | goto out; |
1213 | } | 1231 | } |
1214 | 1232 | ||
1215 | if (gp_evm_revision == GP_EVM_REV_IS_1_1A) | 1233 | if (gp_evm_revision == GP_EVM_REV_IS_1_1A) |
1216 | setup_pin_mux(wl12xx_pin_mux_evm_rev1_1a); | 1234 | setup_pin_mux(wl12xx_pin_mux_evm_rev1_1a); |
1217 | else | 1235 | else |
1218 | setup_pin_mux(wl12xx_pin_mux_evm_rev1_0); | 1236 | setup_pin_mux(wl12xx_pin_mux_evm_rev1_0); |
1219 | 1237 | ||
1220 | pdata->slots[0].set_power = wl12xx_set_power; | 1238 | pdata->slots[0].set_power = wl12xx_set_power; |
1221 | out: | 1239 | out: |
1222 | return; | 1240 | return; |
1223 | } | 1241 | } |
1224 | 1242 | ||
1225 | static void d_can_init(int evm_id, int profile) | 1243 | static void d_can_init(int evm_id, int profile) |
1226 | { | 1244 | { |
1227 | switch (evm_id) { | 1245 | switch (evm_id) { |
1228 | case IND_AUT_MTR_EVM: | 1246 | case IND_AUT_MTR_EVM: |
1229 | if ((profile == PROFILE_0) || (profile == PROFILE_1)) { | 1247 | if ((profile == PROFILE_0) || (profile == PROFILE_1)) { |
1230 | setup_pin_mux(d_can_ia_pin_mux); | 1248 | setup_pin_mux(d_can_ia_pin_mux); |
1231 | /* Instance Zero */ | 1249 | /* Instance Zero */ |
1232 | am33xx_d_can_init(0); | 1250 | am33xx_d_can_init(0); |
1233 | } | 1251 | } |
1234 | break; | 1252 | break; |
1235 | case GEN_PURP_EVM: | 1253 | case GEN_PURP_EVM: |
1236 | if (profile == PROFILE_1) { | 1254 | if (profile == PROFILE_1) { |
1237 | setup_pin_mux(d_can_gp_pin_mux); | 1255 | setup_pin_mux(d_can_gp_pin_mux); |
1238 | /* Instance One */ | 1256 | /* Instance One */ |
1239 | am33xx_d_can_init(1); | 1257 | am33xx_d_can_init(1); |
1240 | } | 1258 | } |
1241 | break; | 1259 | break; |
1242 | default: | 1260 | default: |
1243 | break; | 1261 | break; |
1244 | } | 1262 | } |
1245 | } | 1263 | } |
1246 | 1264 | ||
1247 | static void mmc0_init(int evm_id, int profile) | 1265 | static void mmc0_init(int evm_id, int profile) |
1248 | { | 1266 | { |
1249 | setup_pin_mux(mmc0_pin_mux); | 1267 | setup_pin_mux(mmc0_pin_mux); |
1250 | 1268 | ||
1251 | omap2_hsmmc_init(am335x_mmc); | 1269 | omap2_hsmmc_init(am335x_mmc); |
1252 | return; | 1270 | return; |
1253 | } | 1271 | } |
1254 | 1272 | ||
1255 | static void mmc0_no_cd_init(int evm_id, int profile) | 1273 | static void mmc0_no_cd_init(int evm_id, int profile) |
1256 | { | 1274 | { |
1257 | setup_pin_mux(mmc0_no_cd_pin_mux); | 1275 | setup_pin_mux(mmc0_no_cd_pin_mux); |
1258 | 1276 | ||
1259 | omap2_hsmmc_init(am335x_mmc); | 1277 | omap2_hsmmc_init(am335x_mmc); |
1260 | return; | 1278 | return; |
1261 | } | 1279 | } |
1262 | 1280 | ||
1263 | 1281 | ||
1264 | /* setup spi0 */ | 1282 | /* setup spi0 */ |
1265 | static void spi0_init(int evm_id, int profile) | 1283 | static void spi0_init(int evm_id, int profile) |
1266 | { | 1284 | { |
1267 | setup_pin_mux(spi0_pin_mux); | 1285 | setup_pin_mux(spi0_pin_mux); |
1268 | spi_register_board_info(am335x_spi0_slave_info, | 1286 | spi_register_board_info(am335x_spi0_slave_info, |
1269 | ARRAY_SIZE(am335x_spi0_slave_info)); | 1287 | ARRAY_SIZE(am335x_spi0_slave_info)); |
1270 | return; | 1288 | return; |
1271 | } | 1289 | } |
1272 | 1290 | ||
1273 | /* setup spi1 */ | 1291 | /* setup spi1 */ |
1274 | static void spi1_init(int evm_id, int profile) | 1292 | static void spi1_init(int evm_id, int profile) |
1275 | { | 1293 | { |
1276 | setup_pin_mux(spi1_pin_mux); | 1294 | setup_pin_mux(spi1_pin_mux); |
1277 | spi_register_board_info(am335x_spi1_slave_info, | 1295 | spi_register_board_info(am335x_spi1_slave_info, |
1278 | ARRAY_SIZE(am335x_spi1_slave_info)); | 1296 | ARRAY_SIZE(am335x_spi1_slave_info)); |
1279 | return; | 1297 | return; |
1280 | } | 1298 | } |
1281 | 1299 | ||
1282 | 1300 | ||
1283 | static int beaglebone_phy_fixup(struct phy_device *phydev) | 1301 | static int beaglebone_phy_fixup(struct phy_device *phydev) |
1284 | { | 1302 | { |
1285 | phydev->supported &= ~(SUPPORTED_100baseT_Half | | 1303 | phydev->supported &= ~(SUPPORTED_100baseT_Half | |
1286 | SUPPORTED_100baseT_Full); | 1304 | SUPPORTED_100baseT_Full); |
1287 | 1305 | ||
1288 | return 0; | 1306 | return 0; |
1289 | } | 1307 | } |
1290 | 1308 | ||
1291 | #ifdef CONFIG_TLK110_WORKAROUND | 1309 | #ifdef CONFIG_TLK110_WORKAROUND |
1292 | static int am335x_tlk110_phy_fixup(struct phy_device *phydev) | 1310 | static int am335x_tlk110_phy_fixup(struct phy_device *phydev) |
1293 | { | 1311 | { |
1294 | unsigned int val; | 1312 | unsigned int val; |
1295 | 1313 | ||
1296 | /* This is done as a workaround to support TLK110 rev1.0 phy */ | 1314 | /* This is done as a workaround to support TLK110 rev1.0 phy */ |
1297 | val = phy_read(phydev, TLK110_COARSEGAIN_REG); | 1315 | val = phy_read(phydev, TLK110_COARSEGAIN_REG); |
1298 | phy_write(phydev, TLK110_COARSEGAIN_REG, (val | TLK110_COARSEGAIN_VAL)); | 1316 | phy_write(phydev, TLK110_COARSEGAIN_REG, (val | TLK110_COARSEGAIN_VAL)); |
1299 | 1317 | ||
1300 | val = phy_read(phydev, TLK110_LPFHPF_REG); | 1318 | val = phy_read(phydev, TLK110_LPFHPF_REG); |
1301 | phy_write(phydev, TLK110_LPFHPF_REG, (val | TLK110_LPFHPF_VAL)); | 1319 | phy_write(phydev, TLK110_LPFHPF_REG, (val | TLK110_LPFHPF_VAL)); |
1302 | 1320 | ||
1303 | val = phy_read(phydev, TLK110_SPAREANALOG_REG); | 1321 | val = phy_read(phydev, TLK110_SPAREANALOG_REG); |
1304 | phy_write(phydev, TLK110_SPAREANALOG_REG, (val | TLK110_SPANALOG_VAL)); | 1322 | phy_write(phydev, TLK110_SPAREANALOG_REG, (val | TLK110_SPANALOG_VAL)); |
1305 | 1323 | ||
1306 | val = phy_read(phydev, TLK110_VRCR_REG); | 1324 | val = phy_read(phydev, TLK110_VRCR_REG); |
1307 | phy_write(phydev, TLK110_VRCR_REG, (val | TLK110_VRCR_VAL)); | 1325 | phy_write(phydev, TLK110_VRCR_REG, (val | TLK110_VRCR_VAL)); |
1308 | 1326 | ||
1309 | val = phy_read(phydev, TLK110_SETFFE_REG); | 1327 | val = phy_read(phydev, TLK110_SETFFE_REG); |
1310 | phy_write(phydev, TLK110_SETFFE_REG, (val | TLK110_SETFFE_VAL)); | 1328 | phy_write(phydev, TLK110_SETFFE_REG, (val | TLK110_SETFFE_VAL)); |
1311 | 1329 | ||
1312 | val = phy_read(phydev, TLK110_FTSP_REG); | 1330 | val = phy_read(phydev, TLK110_FTSP_REG); |
1313 | phy_write(phydev, TLK110_FTSP_REG, (val | TLK110_FTSP_VAL)); | 1331 | phy_write(phydev, TLK110_FTSP_REG, (val | TLK110_FTSP_VAL)); |
1314 | 1332 | ||
1315 | val = phy_read(phydev, TLK110_ALFATPIDL_REG); | 1333 | val = phy_read(phydev, TLK110_ALFATPIDL_REG); |
1316 | phy_write(phydev, TLK110_ALFATPIDL_REG, (val | TLK110_ALFATPIDL_VAL)); | 1334 | phy_write(phydev, TLK110_ALFATPIDL_REG, (val | TLK110_ALFATPIDL_VAL)); |
1317 | 1335 | ||
1318 | val = phy_read(phydev, TLK110_PSCOEF21_REG); | 1336 | val = phy_read(phydev, TLK110_PSCOEF21_REG); |
1319 | phy_write(phydev, TLK110_PSCOEF21_REG, (val | TLK110_PSCOEF21_VAL)); | 1337 | phy_write(phydev, TLK110_PSCOEF21_REG, (val | TLK110_PSCOEF21_VAL)); |
1320 | 1338 | ||
1321 | val = phy_read(phydev, TLK110_PSCOEF3_REG); | 1339 | val = phy_read(phydev, TLK110_PSCOEF3_REG); |
1322 | phy_write(phydev, TLK110_PSCOEF3_REG, (val | TLK110_PSCOEF3_VAL)); | 1340 | phy_write(phydev, TLK110_PSCOEF3_REG, (val | TLK110_PSCOEF3_VAL)); |
1323 | 1341 | ||
1324 | val = phy_read(phydev, TLK110_ALFAFACTOR1_REG); | 1342 | val = phy_read(phydev, TLK110_ALFAFACTOR1_REG); |
1325 | phy_write(phydev, TLK110_ALFAFACTOR1_REG, (val | TLK110_ALFACTOR1_VAL)); | 1343 | phy_write(phydev, TLK110_ALFAFACTOR1_REG, (val | TLK110_ALFACTOR1_VAL)); |
1326 | 1344 | ||
1327 | val = phy_read(phydev, TLK110_ALFAFACTOR2_REG); | 1345 | val = phy_read(phydev, TLK110_ALFAFACTOR2_REG); |
1328 | phy_write(phydev, TLK110_ALFAFACTOR2_REG, (val | TLK110_ALFACTOR2_VAL)); | 1346 | phy_write(phydev, TLK110_ALFAFACTOR2_REG, (val | TLK110_ALFACTOR2_VAL)); |
1329 | 1347 | ||
1330 | val = phy_read(phydev, TLK110_CFGPS_REG); | 1348 | val = phy_read(phydev, TLK110_CFGPS_REG); |
1331 | phy_write(phydev, TLK110_CFGPS_REG, (val | TLK110_CFGPS_VAL)); | 1349 | phy_write(phydev, TLK110_CFGPS_REG, (val | TLK110_CFGPS_VAL)); |
1332 | 1350 | ||
1333 | val = phy_read(phydev, TLK110_FTSPTXGAIN_REG); | 1351 | val = phy_read(phydev, TLK110_FTSPTXGAIN_REG); |
1334 | phy_write(phydev, TLK110_FTSPTXGAIN_REG, (val | TLK110_FTSPTXGAIN_VAL)); | 1352 | phy_write(phydev, TLK110_FTSPTXGAIN_REG, (val | TLK110_FTSPTXGAIN_VAL)); |
1335 | 1353 | ||
1336 | val = phy_read(phydev, TLK110_SWSCR3_REG); | 1354 | val = phy_read(phydev, TLK110_SWSCR3_REG); |
1337 | phy_write(phydev, TLK110_SWSCR3_REG, (val | TLK110_SWSCR3_VAL)); | 1355 | phy_write(phydev, TLK110_SWSCR3_REG, (val | TLK110_SWSCR3_VAL)); |
1338 | 1356 | ||
1339 | val = phy_read(phydev, TLK110_SCFALLBACK_REG); | 1357 | val = phy_read(phydev, TLK110_SCFALLBACK_REG); |
1340 | phy_write(phydev, TLK110_SCFALLBACK_REG, (val | TLK110_SCFALLBACK_VAL)); | 1358 | phy_write(phydev, TLK110_SCFALLBACK_REG, (val | TLK110_SCFALLBACK_VAL)); |
1341 | 1359 | ||
1342 | val = phy_read(phydev, TLK110_PHYRCR_REG); | 1360 | val = phy_read(phydev, TLK110_PHYRCR_REG); |
1343 | phy_write(phydev, TLK110_PHYRCR_REG, (val | TLK110_PHYRCR_VAL)); | 1361 | phy_write(phydev, TLK110_PHYRCR_REG, (val | TLK110_PHYRCR_VAL)); |
1344 | 1362 | ||
1345 | return 0; | 1363 | return 0; |
1346 | } | 1364 | } |
1347 | #endif | 1365 | #endif |
1348 | 1366 | ||
1349 | static void profibus_init(int evm_id, int profile) | 1367 | static void profibus_init(int evm_id, int profile) |
1350 | { | 1368 | { |
1351 | setup_pin_mux(profibus_pin_mux); | 1369 | setup_pin_mux(profibus_pin_mux); |
1352 | return; | 1370 | return; |
1353 | } | 1371 | } |
1354 | 1372 | ||
1355 | /* Low-Cost EVM */ | 1373 | /* Low-Cost EVM */ |
1356 | static struct evm_dev_cfg low_cost_evm_dev_cfg[] = { | 1374 | static struct evm_dev_cfg low_cost_evm_dev_cfg[] = { |
1357 | {rgmii1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, | 1375 | {rgmii1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, |
1358 | {usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, | 1376 | {usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, |
1359 | {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, | 1377 | {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, |
1360 | {evm_nand_init, DEV_ON_BASEBOARD, PROFILE_NONE}, | 1378 | {evm_nand_init, DEV_ON_BASEBOARD, PROFILE_NONE}, |
1361 | {NULL, 0, 0}, | 1379 | {NULL, 0, 0}, |
1362 | }; | 1380 | }; |
1363 | 1381 | ||
1364 | /* General Purpose EVM */ | 1382 | /* General Purpose EVM */ |
1365 | static struct evm_dev_cfg gen_purp_evm_dev_cfg[] = { | 1383 | static struct evm_dev_cfg gen_purp_evm_dev_cfg[] = { |
1366 | {enable_ecap0, DEV_ON_DGHTR_BRD, (PROFILE_0 | PROFILE_1 | | 1384 | {enable_ecap0, DEV_ON_DGHTR_BRD, (PROFILE_0 | PROFILE_1 | |
1367 | PROFILE_2 | PROFILE_7) }, | 1385 | PROFILE_2 | PROFILE_7) }, |
1368 | {lcdc_init, DEV_ON_DGHTR_BRD, (PROFILE_0 | PROFILE_1 | | 1386 | {lcdc_init, DEV_ON_DGHTR_BRD, (PROFILE_0 | PROFILE_1 | |
1369 | PROFILE_2 | PROFILE_7) }, | 1387 | PROFILE_2 | PROFILE_7) }, |
1370 | {tsc_init, DEV_ON_DGHTR_BRD, (PROFILE_0 | PROFILE_1 | | 1388 | {tsc_init, DEV_ON_DGHTR_BRD, (PROFILE_0 | PROFILE_1 | |
1371 | PROFILE_2 | PROFILE_7) }, | 1389 | PROFILE_2 | PROFILE_7) }, |
1372 | {rgmii1_init, DEV_ON_BASEBOARD, PROFILE_ALL}, | 1390 | {rgmii1_init, DEV_ON_BASEBOARD, PROFILE_ALL}, |
1373 | {rgmii2_init, DEV_ON_DGHTR_BRD, (PROFILE_1 | PROFILE_2 | | 1391 | {rgmii2_init, DEV_ON_DGHTR_BRD, (PROFILE_1 | PROFILE_2 | |
1374 | PROFILE_4 | PROFILE_6) }, | 1392 | PROFILE_4 | PROFILE_6) }, |
1375 | {usb0_init, DEV_ON_BASEBOARD, PROFILE_ALL}, | 1393 | {usb0_init, DEV_ON_BASEBOARD, PROFILE_ALL}, |
1376 | {usb1_init, DEV_ON_BASEBOARD, PROFILE_ALL}, | 1394 | {usb1_init, DEV_ON_BASEBOARD, PROFILE_ALL}, |
1377 | {evm_nand_init, DEV_ON_DGHTR_BRD, | 1395 | {evm_nand_init, DEV_ON_DGHTR_BRD, |
1378 | (PROFILE_ALL & ~PROFILE_2 & ~PROFILE_3)}, | 1396 | (PROFILE_ALL & ~PROFILE_2 & ~PROFILE_3)}, |
1379 | {i2c1_init, DEV_ON_DGHTR_BRD, (PROFILE_ALL & ~PROFILE_2)}, | 1397 | {i2c1_init, DEV_ON_DGHTR_BRD, (PROFILE_ALL & ~PROFILE_2)}, |
1380 | {mcasp1_init, DEV_ON_DGHTR_BRD, (PROFILE_0 | PROFILE_3 | PROFILE_7) }, | 1398 | {mcasp1_init, DEV_ON_DGHTR_BRD, (PROFILE_0 | PROFILE_3 | PROFILE_7) }, |
1381 | {mmc1_init, DEV_ON_DGHTR_BRD, PROFILE_2}, | 1399 | {mmc1_init, DEV_ON_DGHTR_BRD, PROFILE_2}, |
1382 | {mmc2_wl12xx_init, DEV_ON_BASEBOARD, (PROFILE_0 | PROFILE_3 | | 1400 | {mmc2_wl12xx_init, DEV_ON_BASEBOARD, (PROFILE_0 | PROFILE_3 | |
1383 | PROFILE_5)}, | 1401 | PROFILE_5)}, |
1384 | {mmc0_init, DEV_ON_BASEBOARD, (PROFILE_ALL & ~PROFILE_5)}, | 1402 | {mmc0_init, DEV_ON_BASEBOARD, (PROFILE_ALL & ~PROFILE_5)}, |
1385 | {mmc0_no_cd_init, DEV_ON_BASEBOARD, PROFILE_5}, | 1403 | {mmc0_no_cd_init, DEV_ON_BASEBOARD, PROFILE_5}, |
1386 | {spi0_init, DEV_ON_DGHTR_BRD, PROFILE_2}, | 1404 | {spi0_init, DEV_ON_DGHTR_BRD, PROFILE_2}, |
1387 | {uart1_wl12xx_init, DEV_ON_BASEBOARD, (PROFILE_0 | PROFILE_3 | | 1405 | {uart1_wl12xx_init, DEV_ON_BASEBOARD, (PROFILE_0 | PROFILE_3 | |
1388 | PROFILE_5)}, | 1406 | PROFILE_5)}, |
1389 | {wl12xx_init, DEV_ON_BASEBOARD, (PROFILE_0 | PROFILE_3 | PROFILE_5)}, | 1407 | {wl12xx_init, DEV_ON_BASEBOARD, (PROFILE_0 | PROFILE_3 | PROFILE_5)}, |
1390 | {d_can_init, DEV_ON_DGHTR_BRD, PROFILE_1}, | 1408 | {d_can_init, DEV_ON_DGHTR_BRD, PROFILE_1}, |
1391 | {matrix_keypad_init, DEV_ON_DGHTR_BRD, PROFILE_0}, | 1409 | {matrix_keypad_init, DEV_ON_DGHTR_BRD, PROFILE_0}, |
1392 | {volume_keys_init, DEV_ON_DGHTR_BRD, PROFILE_0}, | 1410 | {volume_keys_init, DEV_ON_DGHTR_BRD, PROFILE_0}, |
1411 | {uart2_init, DEV_ON_DGHTR_BRD, PROFILE_3}, | ||
1393 | {NULL, 0, 0}, | 1412 | {NULL, 0, 0}, |
1394 | }; | 1413 | }; |
1395 | 1414 | ||
1396 | /* Industrial Auto Motor Control EVM */ | 1415 | /* Industrial Auto Motor Control EVM */ |
1397 | static struct evm_dev_cfg ind_auto_mtrl_evm_dev_cfg[] = { | 1416 | static struct evm_dev_cfg ind_auto_mtrl_evm_dev_cfg[] = { |
1398 | {mii1_init, DEV_ON_DGHTR_BRD, PROFILE_ALL}, | 1417 | {mii1_init, DEV_ON_DGHTR_BRD, PROFILE_ALL}, |
1399 | {usb0_init, DEV_ON_BASEBOARD, PROFILE_ALL}, | 1418 | {usb0_init, DEV_ON_BASEBOARD, PROFILE_ALL}, |
1400 | {usb1_init, DEV_ON_BASEBOARD, PROFILE_ALL}, | 1419 | {usb1_init, DEV_ON_BASEBOARD, PROFILE_ALL}, |
1401 | {profibus_init, DEV_ON_DGHTR_BRD, PROFILE_ALL}, | 1420 | {profibus_init, DEV_ON_DGHTR_BRD, PROFILE_ALL}, |
1402 | {evm_nand_init, DEV_ON_DGHTR_BRD, PROFILE_ALL}, | 1421 | {evm_nand_init, DEV_ON_DGHTR_BRD, PROFILE_ALL}, |
1403 | {spi1_init, DEV_ON_DGHTR_BRD, PROFILE_ALL}, | 1422 | {spi1_init, DEV_ON_DGHTR_BRD, PROFILE_ALL}, |
1404 | {uart3_init, DEV_ON_DGHTR_BRD, PROFILE_ALL}, | 1423 | {uart3_init, DEV_ON_DGHTR_BRD, PROFILE_ALL}, |
1405 | {i2c1_init, DEV_ON_BASEBOARD, PROFILE_ALL}, | 1424 | {i2c1_init, DEV_ON_BASEBOARD, PROFILE_ALL}, |
1406 | {mmc0_no_cd_init, DEV_ON_BASEBOARD, PROFILE_ALL}, | 1425 | {mmc0_no_cd_init, DEV_ON_BASEBOARD, PROFILE_ALL}, |
1407 | {NULL, 0, 0}, | 1426 | {NULL, 0, 0}, |
1408 | }; | 1427 | }; |
1409 | 1428 | ||
1410 | /* IP-Phone EVM */ | 1429 | /* IP-Phone EVM */ |
1411 | static struct evm_dev_cfg ip_phn_evm_dev_cfg[] = { | 1430 | static struct evm_dev_cfg ip_phn_evm_dev_cfg[] = { |
1412 | {enable_ecap0, DEV_ON_DGHTR_BRD, PROFILE_NONE}, | 1431 | {enable_ecap0, DEV_ON_DGHTR_BRD, PROFILE_NONE}, |
1413 | {lcdc_init, DEV_ON_DGHTR_BRD, PROFILE_NONE}, | 1432 | {lcdc_init, DEV_ON_DGHTR_BRD, PROFILE_NONE}, |
1414 | {tsc_init, DEV_ON_DGHTR_BRD, PROFILE_NONE}, | 1433 | {tsc_init, DEV_ON_DGHTR_BRD, PROFILE_NONE}, |
1415 | {rgmii1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, | 1434 | {rgmii1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, |
1416 | {rgmii2_init, DEV_ON_DGHTR_BRD, PROFILE_NONE}, | 1435 | {rgmii2_init, DEV_ON_DGHTR_BRD, PROFILE_NONE}, |
1417 | {usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, | 1436 | {usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, |
1418 | {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, | 1437 | {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, |
1419 | {evm_nand_init, DEV_ON_DGHTR_BRD, PROFILE_NONE}, | 1438 | {evm_nand_init, DEV_ON_DGHTR_BRD, PROFILE_NONE}, |
1420 | {i2c1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, | 1439 | {i2c1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, |
1421 | {mcasp1_init, DEV_ON_DGHTR_BRD, PROFILE_NONE}, | 1440 | {mcasp1_init, DEV_ON_DGHTR_BRD, PROFILE_NONE}, |
1422 | {mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, | 1441 | {mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, |
1423 | {NULL, 0, 0}, | 1442 | {NULL, 0, 0}, |
1424 | }; | 1443 | }; |
1425 | 1444 | ||
1426 | /* Beaglebone < Rev A3 */ | 1445 | /* Beaglebone < Rev A3 */ |
1427 | static struct evm_dev_cfg beaglebone_old_dev_cfg[] = { | 1446 | static struct evm_dev_cfg beaglebone_old_dev_cfg[] = { |
1428 | {rmii1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, | 1447 | {rmii1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, |
1429 | {usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, | 1448 | {usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, |
1430 | {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, | 1449 | {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, |
1431 | {mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, | 1450 | {mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, |
1432 | {NULL, 0, 0}, | 1451 | {NULL, 0, 0}, |
1433 | }; | 1452 | }; |
1434 | 1453 | ||
1435 | /* Beaglebone Rev A3 and after */ | 1454 | /* Beaglebone Rev A3 and after */ |
1436 | static struct evm_dev_cfg beaglebone_dev_cfg[] = { | 1455 | static struct evm_dev_cfg beaglebone_dev_cfg[] = { |
1437 | {mii1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, | 1456 | {mii1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, |
1438 | {usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, | 1457 | {usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, |
1439 | {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, | 1458 | {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, |
1440 | {mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, | 1459 | {mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, |
1441 | {NULL, 0, 0}, | 1460 | {NULL, 0, 0}, |
1442 | }; | 1461 | }; |
1443 | 1462 | ||
1444 | static void setup_low_cost_evm(void) | 1463 | static void setup_low_cost_evm(void) |
1445 | { | 1464 | { |
1446 | pr_info("The board is a AM335x Low Cost EVM.\n"); | 1465 | pr_info("The board is a AM335x Low Cost EVM.\n"); |
1447 | 1466 | ||
1448 | _configure_device(LOW_COST_EVM, low_cost_evm_dev_cfg, PROFILE_NONE); | 1467 | _configure_device(LOW_COST_EVM, low_cost_evm_dev_cfg, PROFILE_NONE); |
1449 | } | 1468 | } |
1450 | 1469 | ||
1451 | static void setup_general_purpose_evm(void) | 1470 | static void setup_general_purpose_evm(void) |
1452 | { | 1471 | { |
1453 | u32 prof_sel = am335x_get_profile_selection(); | 1472 | u32 prof_sel = am335x_get_profile_selection(); |
1454 | pr_info("The board is general purpose EVM in profile %d\n", prof_sel); | 1473 | pr_info("The board is general purpose EVM in profile %d\n", prof_sel); |
1455 | 1474 | ||
1456 | if (!strncmp("1.1A", config.version, 4)) { | 1475 | if (!strncmp("1.1A", config.version, 4)) { |
1457 | gp_evm_revision = GP_EVM_REV_IS_1_1A; | 1476 | gp_evm_revision = GP_EVM_REV_IS_1_1A; |
1458 | } else if (!strncmp("1.0", config.version, 3)) { | 1477 | } else if (!strncmp("1.0", config.version, 3)) { |
1459 | gp_evm_revision = GP_EVM_REV_IS_1_0; | 1478 | gp_evm_revision = GP_EVM_REV_IS_1_0; |
1460 | } else { | 1479 | } else { |
1461 | pr_err("Found invalid GP EVM revision, falling back to Rev1.1A"); | 1480 | pr_err("Found invalid GP EVM revision, falling back to Rev1.1A"); |
1462 | gp_evm_revision = GP_EVM_REV_IS_1_1A; | 1481 | gp_evm_revision = GP_EVM_REV_IS_1_1A; |
1463 | } | 1482 | } |
1464 | 1483 | ||
1465 | if (gp_evm_revision == GP_EVM_REV_IS_1_0) | 1484 | if (gp_evm_revision == GP_EVM_REV_IS_1_0) |
1466 | gigabit_enable = 0; | 1485 | gigabit_enable = 0; |
1467 | else if (gp_evm_revision == GP_EVM_REV_IS_1_1A) | 1486 | else if (gp_evm_revision == GP_EVM_REV_IS_1_1A) |
1468 | gigabit_enable = 1; | 1487 | gigabit_enable = 1; |
1469 | 1488 | ||
1470 | _configure_device(GEN_PURP_EVM, gen_purp_evm_dev_cfg, (1L << prof_sel)); | 1489 | _configure_device(GEN_PURP_EVM, gen_purp_evm_dev_cfg, (1L << prof_sel)); |
1471 | } | 1490 | } |
1472 | 1491 | ||
1473 | static void setup_ind_auto_motor_ctrl_evm(void) | 1492 | static void setup_ind_auto_motor_ctrl_evm(void) |
1474 | { | 1493 | { |
1475 | u32 prof_sel = am335x_get_profile_selection(); | 1494 | u32 prof_sel = am335x_get_profile_selection(); |
1476 | 1495 | ||
1477 | pr_info("The board is an industrial automation EVM in profile %d\n", | 1496 | pr_info("The board is an industrial automation EVM in profile %d\n", |
1478 | prof_sel); | 1497 | prof_sel); |
1479 | 1498 | ||
1480 | /* Only Profile 0 is supported */ | 1499 | /* Only Profile 0 is supported */ |
1481 | if ((1L << prof_sel) != PROFILE_0) { | 1500 | if ((1L << prof_sel) != PROFILE_0) { |
1482 | pr_err("AM335X: Only Profile 0 is supported\n"); | 1501 | pr_err("AM335X: Only Profile 0 is supported\n"); |
1483 | pr_err("Assuming profile 0 & continuing\n"); | 1502 | pr_err("Assuming profile 0 & continuing\n"); |
1484 | prof_sel = PROFILE_0; | 1503 | prof_sel = PROFILE_0; |
1485 | } | 1504 | } |
1486 | 1505 | ||
1487 | _configure_device(IND_AUT_MTR_EVM, ind_auto_mtrl_evm_dev_cfg, | 1506 | _configure_device(IND_AUT_MTR_EVM, ind_auto_mtrl_evm_dev_cfg, |
1488 | PROFILE_0); | 1507 | PROFILE_0); |
1489 | 1508 | ||
1490 | /* Fillup global evmid */ | 1509 | /* Fillup global evmid */ |
1491 | am33xx_evmid_fillup(IND_AUT_MTR_EVM); | 1510 | am33xx_evmid_fillup(IND_AUT_MTR_EVM); |
1492 | 1511 | ||
1493 | /* Initialize TLK110 PHY registers for phy version 1.0 */ | 1512 | /* Initialize TLK110 PHY registers for phy version 1.0 */ |
1494 | am335x_tlk110_phy_init(); | 1513 | am335x_tlk110_phy_init(); |
1495 | 1514 | ||
1496 | 1515 | ||
1497 | } | 1516 | } |
1498 | 1517 | ||
1499 | static void setup_ip_phone_evm(void) | 1518 | static void setup_ip_phone_evm(void) |
1500 | { | 1519 | { |
1501 | pr_info("The board is an IP phone EVM\n"); | 1520 | pr_info("The board is an IP phone EVM\n"); |
1502 | 1521 | ||
1503 | _configure_device(IP_PHN_EVM, ip_phn_evm_dev_cfg, PROFILE_NONE); | 1522 | _configure_device(IP_PHN_EVM, ip_phn_evm_dev_cfg, PROFILE_NONE); |
1504 | } | 1523 | } |
1505 | 1524 | ||
1506 | /* BeagleBone < Rev A3 */ | 1525 | /* BeagleBone < Rev A3 */ |
1507 | static void setup_beaglebone_old(void) | 1526 | static void setup_beaglebone_old(void) |
1508 | { | 1527 | { |
1509 | pr_info("The board is a AM335x Beaglebone < Rev A3.\n"); | 1528 | pr_info("The board is a AM335x Beaglebone < Rev A3.\n"); |
1510 | 1529 | ||
1511 | /* Beagle Bone has Micro-SD slot which doesn't have Write Protect pin */ | 1530 | /* Beagle Bone has Micro-SD slot which doesn't have Write Protect pin */ |
1512 | am335x_mmc[0].gpio_wp = -EINVAL; | 1531 | am335x_mmc[0].gpio_wp = -EINVAL; |
1513 | 1532 | ||
1514 | _configure_device(LOW_COST_EVM, beaglebone_old_dev_cfg, PROFILE_NONE); | 1533 | _configure_device(LOW_COST_EVM, beaglebone_old_dev_cfg, PROFILE_NONE); |
1515 | 1534 | ||
1516 | phy_register_fixup_for_uid(BBB_PHY_ID, BBB_PHY_MASK, | 1535 | phy_register_fixup_for_uid(BBB_PHY_ID, BBB_PHY_MASK, |
1517 | beaglebone_phy_fixup); | 1536 | beaglebone_phy_fixup); |
1518 | } | 1537 | } |
1519 | 1538 | ||
1520 | /* BeagleBone after Rev A3 */ | 1539 | /* BeagleBone after Rev A3 */ |
1521 | static void setup_beaglebone(void) | 1540 | static void setup_beaglebone(void) |
1522 | { | 1541 | { |
1523 | pr_info("The board is a AM335x Beaglebone.\n"); | 1542 | pr_info("The board is a AM335x Beaglebone.\n"); |
1524 | 1543 | ||
1525 | /* Beagle Bone has Micro-SD slot which doesn't have Write Protect pin */ | 1544 | /* Beagle Bone has Micro-SD slot which doesn't have Write Protect pin */ |
1526 | am335x_mmc[0].gpio_wp = -EINVAL; | 1545 | am335x_mmc[0].gpio_wp = -EINVAL; |
1527 | 1546 | ||
1528 | _configure_device(LOW_COST_EVM, beaglebone_dev_cfg, PROFILE_NONE); | 1547 | _configure_device(LOW_COST_EVM, beaglebone_dev_cfg, PROFILE_NONE); |
1529 | } | 1548 | } |
1530 | 1549 | ||
1531 | 1550 | ||
1532 | static void am335x_setup_daughter_board(struct memory_accessor *m, void *c) | 1551 | static void am335x_setup_daughter_board(struct memory_accessor *m, void *c) |
1533 | { | 1552 | { |
1534 | u8 tmp; | 1553 | u8 tmp; |
1535 | int ret; | 1554 | int ret; |
1536 | 1555 | ||
1537 | /* | 1556 | /* |
1538 | * try reading a byte from the EEPROM to see if it is | 1557 | * try reading a byte from the EEPROM to see if it is |
1539 | * present. We could read a lot more, but that would | 1558 | * present. We could read a lot more, but that would |
1540 | * just slow the boot process and we have all the information | 1559 | * just slow the boot process and we have all the information |
1541 | * we need from the EEPROM on the base board anyway. | 1560 | * we need from the EEPROM on the base board anyway. |
1542 | */ | 1561 | */ |
1543 | ret = m->read(m, &tmp, 0, sizeof(u8)); | 1562 | ret = m->read(m, &tmp, 0, sizeof(u8)); |
1544 | if (ret == sizeof(u8)) { | 1563 | if (ret == sizeof(u8)) { |
1545 | pr_info("Detected a daughter card on AM335x EVM.."); | 1564 | pr_info("Detected a daughter card on AM335x EVM.."); |
1546 | daughter_brd_detected = true; | 1565 | daughter_brd_detected = true; |
1547 | } else { | 1566 | } else { |
1548 | pr_info("No daughter card found\n"); | 1567 | pr_info("No daughter card found\n"); |
1549 | daughter_brd_detected = false; | 1568 | daughter_brd_detected = false; |
1550 | } | 1569 | } |
1551 | } | 1570 | } |
1552 | 1571 | ||
1553 | static void am335x_evm_setup(struct memory_accessor *mem_acc, void *context) | 1572 | static void am335x_evm_setup(struct memory_accessor *mem_acc, void *context) |
1554 | { | 1573 | { |
1555 | int ret; | 1574 | int ret; |
1556 | char tmp[10]; | 1575 | char tmp[10]; |
1557 | 1576 | ||
1558 | /* 1st get the MAC address from EEPROM */ | 1577 | /* 1st get the MAC address from EEPROM */ |
1559 | ret = mem_acc->read(mem_acc, (char *)&am335x_mac_addr, | 1578 | ret = mem_acc->read(mem_acc, (char *)&am335x_mac_addr, |
1560 | EEPROM_MAC_ADDRESS_OFFSET, sizeof(am335x_mac_addr)); | 1579 | EEPROM_MAC_ADDRESS_OFFSET, sizeof(am335x_mac_addr)); |
1561 | 1580 | ||
1562 | if (ret != sizeof(am335x_mac_addr)) { | 1581 | if (ret != sizeof(am335x_mac_addr)) { |
1563 | pr_warning("AM335X: EVM Config read fail: %d\n", ret); | 1582 | pr_warning("AM335X: EVM Config read fail: %d\n", ret); |
1564 | return; | 1583 | return; |
1565 | } | 1584 | } |
1566 | 1585 | ||
1567 | /* Fillup global mac id */ | 1586 | /* Fillup global mac id */ |
1568 | am33xx_cpsw_macidfillup(&am335x_mac_addr[0][0], | 1587 | am33xx_cpsw_macidfillup(&am335x_mac_addr[0][0], |
1569 | &am335x_mac_addr[1][0]); | 1588 | &am335x_mac_addr[1][0]); |
1570 | 1589 | ||
1571 | /* get board specific data */ | 1590 | /* get board specific data */ |
1572 | ret = mem_acc->read(mem_acc, (char *)&config, 0, sizeof(config)); | 1591 | ret = mem_acc->read(mem_acc, (char *)&config, 0, sizeof(config)); |
1573 | if (ret != sizeof(config)) { | 1592 | if (ret != sizeof(config)) { |
1574 | pr_warning("AM335X EVM config read fail, read %d bytes\n", ret); | 1593 | pr_warning("AM335X EVM config read fail, read %d bytes\n", ret); |
1575 | return; | 1594 | return; |
1576 | } | 1595 | } |
1577 | 1596 | ||
1578 | if (config.header != AM335X_EEPROM_HEADER) { | 1597 | if (config.header != AM335X_EEPROM_HEADER) { |
1579 | pr_warning("AM335X: wrong header 0x%x, expected 0x%x\n", | 1598 | pr_warning("AM335X: wrong header 0x%x, expected 0x%x\n", |
1580 | config.header, AM335X_EEPROM_HEADER); | 1599 | config.header, AM335X_EEPROM_HEADER); |
1581 | goto out; | 1600 | goto out; |
1582 | } | 1601 | } |
1583 | 1602 | ||
1584 | if (strncmp("A335", config.name, 4)) { | 1603 | if (strncmp("A335", config.name, 4)) { |
1585 | pr_err("Board %s doesn't look like an AM335x board\n", | 1604 | pr_err("Board %s doesn't look like an AM335x board\n", |
1586 | config.name); | 1605 | config.name); |
1587 | goto out; | 1606 | goto out; |
1588 | } | 1607 | } |
1589 | 1608 | ||
1590 | snprintf(tmp, sizeof(config.name) + 1, "%s", config.name); | 1609 | snprintf(tmp, sizeof(config.name) + 1, "%s", config.name); |
1591 | pr_info("Board name: %s\n", tmp); | 1610 | pr_info("Board name: %s\n", tmp); |
1592 | snprintf(tmp, sizeof(config.version) + 1, "%s", config.version); | 1611 | snprintf(tmp, sizeof(config.version) + 1, "%s", config.version); |
1593 | pr_info("Board version: %s\n", tmp); | 1612 | pr_info("Board version: %s\n", tmp); |
1594 | 1613 | ||
1595 | if (!strncmp("A335BONE", config.name, 8)) { | 1614 | if (!strncmp("A335BONE", config.name, 8)) { |
1596 | daughter_brd_detected = false; | 1615 | daughter_brd_detected = false; |
1597 | if(!strncmp("00A1", config.version, 4) || | 1616 | if(!strncmp("00A1", config.version, 4) || |
1598 | !strncmp("00A2", config.version, 4)) | 1617 | !strncmp("00A2", config.version, 4)) |
1599 | setup_beaglebone_old(); | 1618 | setup_beaglebone_old(); |
1600 | else | 1619 | else |
1601 | setup_beaglebone(); | 1620 | setup_beaglebone(); |
1602 | } else { | 1621 | } else { |
1603 | /* only 6 characters of options string used for now */ | 1622 | /* only 6 characters of options string used for now */ |
1604 | snprintf(tmp, 7, "%s", config.opt); | 1623 | snprintf(tmp, 7, "%s", config.opt); |
1605 | pr_info("SKU: %s\n", tmp); | 1624 | pr_info("SKU: %s\n", tmp); |
1606 | 1625 | ||
1607 | if (!strncmp("SKU#00", config.opt, 6)) | 1626 | if (!strncmp("SKU#00", config.opt, 6)) |
1608 | setup_low_cost_evm(); | 1627 | setup_low_cost_evm(); |
1609 | else if (!strncmp("SKU#01", config.opt, 6)) | 1628 | else if (!strncmp("SKU#01", config.opt, 6)) |
1610 | setup_general_purpose_evm(); | 1629 | setup_general_purpose_evm(); |
1611 | else if (!strncmp("SKU#02", config.opt, 6)) | 1630 | else if (!strncmp("SKU#02", config.opt, 6)) |
1612 | setup_ind_auto_motor_ctrl_evm(); | 1631 | setup_ind_auto_motor_ctrl_evm(); |
1613 | else if (!strncmp("SKU#03", config.opt, 6)) | 1632 | else if (!strncmp("SKU#03", config.opt, 6)) |
1614 | setup_ip_phone_evm(); | 1633 | setup_ip_phone_evm(); |
1615 | else | 1634 | else |
1616 | goto out; | 1635 | goto out; |
1617 | } | 1636 | } |
1618 | /* Initialize cpsw after board detection is completed as board | 1637 | /* Initialize cpsw after board detection is completed as board |
1619 | * information is required for configuring phy address and hence | 1638 | * information is required for configuring phy address and hence |
1620 | * should be call only after board detection | 1639 | * should be call only after board detection |
1621 | */ | 1640 | */ |
1622 | am33xx_cpsw_init(gigabit_enable); | 1641 | am33xx_cpsw_init(gigabit_enable); |
1623 | 1642 | ||
1624 | return; | 1643 | return; |
1625 | out: | 1644 | out: |
1626 | /* | 1645 | /* |
1627 | * If the EEPROM hasn't been programed or an incorrect header | 1646 | * If the EEPROM hasn't been programed or an incorrect header |
1628 | * or board name are read, assume this is an old beaglebone board | 1647 | * or board name are read, assume this is an old beaglebone board |
1629 | * (< Rev A3) | 1648 | * (< Rev A3) |
1630 | */ | 1649 | */ |
1631 | pr_err("Could not detect any board, falling back to: " | 1650 | pr_err("Could not detect any board, falling back to: " |
1632 | "Beaglebone (< Rev A3) with no daughter card connected\n"); | 1651 | "Beaglebone (< Rev A3) with no daughter card connected\n"); |
1633 | daughter_brd_detected = false; | 1652 | daughter_brd_detected = false; |
1634 | setup_beaglebone_old(); | 1653 | setup_beaglebone_old(); |
1635 | 1654 | ||
1636 | /* Initialize cpsw after board detection is completed as board | 1655 | /* Initialize cpsw after board detection is completed as board |
1637 | * information is required for configuring phy address and hence | 1656 | * information is required for configuring phy address and hence |
1638 | * should be call only after board detection | 1657 | * should be call only after board detection |
1639 | */ | 1658 | */ |
1640 | 1659 | ||
1641 | am33xx_cpsw_init(gigabit_enable); | 1660 | am33xx_cpsw_init(gigabit_enable); |
1642 | } | 1661 | } |
1643 | 1662 | ||
1644 | static struct at24_platform_data am335x_daughter_board_eeprom_info = { | 1663 | static struct at24_platform_data am335x_daughter_board_eeprom_info = { |
1645 | .byte_len = (256*1024) / 8, | 1664 | .byte_len = (256*1024) / 8, |
1646 | .page_size = 64, | 1665 | .page_size = 64, |
1647 | .flags = AT24_FLAG_ADDR16, | 1666 | .flags = AT24_FLAG_ADDR16, |
1648 | .setup = am335x_setup_daughter_board, | 1667 | .setup = am335x_setup_daughter_board, |
1649 | .context = (void *)NULL, | 1668 | .context = (void *)NULL, |
1650 | }; | 1669 | }; |
1651 | 1670 | ||
1652 | static struct at24_platform_data am335x_baseboard_eeprom_info = { | 1671 | static struct at24_platform_data am335x_baseboard_eeprom_info = { |
1653 | .byte_len = (256*1024) / 8, | 1672 | .byte_len = (256*1024) / 8, |
1654 | .page_size = 64, | 1673 | .page_size = 64, |
1655 | .flags = AT24_FLAG_ADDR16, | 1674 | .flags = AT24_FLAG_ADDR16, |
1656 | .setup = am335x_evm_setup, | 1675 | .setup = am335x_evm_setup, |
1657 | .context = (void *)NULL, | 1676 | .context = (void *)NULL, |
1658 | }; | 1677 | }; |
1659 | 1678 | ||
1660 | static struct regulator_init_data am335x_dummy; | 1679 | static struct regulator_init_data am335x_dummy; |
1661 | 1680 | ||
1662 | static struct regulator_consumer_supply am335x_vdd1_supply[] = { | 1681 | static struct regulator_consumer_supply am335x_vdd1_supply[] = { |
1663 | REGULATOR_SUPPLY("mpu", "mpu.0"), | 1682 | REGULATOR_SUPPLY("mpu", "mpu.0"), |
1664 | }; | 1683 | }; |
1665 | 1684 | ||
1666 | static struct regulator_init_data am335x_vdd1 = { | 1685 | static struct regulator_init_data am335x_vdd1 = { |
1667 | .constraints = { | 1686 | .constraints = { |
1668 | .min_uV = 600000, | 1687 | .min_uV = 600000, |
1669 | .max_uV = 1500000, | 1688 | .max_uV = 1500000, |
1670 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | 1689 | .valid_modes_mask = REGULATOR_MODE_NORMAL, |
1671 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, | 1690 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, |
1672 | .always_on = 1, | 1691 | .always_on = 1, |
1673 | }, | 1692 | }, |
1674 | .num_consumer_supplies = ARRAY_SIZE(am335x_vdd1_supply), | 1693 | .num_consumer_supplies = ARRAY_SIZE(am335x_vdd1_supply), |
1675 | .consumer_supplies = am335x_vdd1_supply, | 1694 | .consumer_supplies = am335x_vdd1_supply, |
1676 | }; | 1695 | }; |
1677 | 1696 | ||
1678 | static struct tps65910_board am335x_tps65910_info = { | 1697 | static struct tps65910_board am335x_tps65910_info = { |
1679 | .tps65910_pmic_init_data[TPS65910_REG_VRTC] = &am335x_dummy, | 1698 | .tps65910_pmic_init_data[TPS65910_REG_VRTC] = &am335x_dummy, |
1680 | .tps65910_pmic_init_data[TPS65910_REG_VIO] = &am335x_dummy, | 1699 | .tps65910_pmic_init_data[TPS65910_REG_VIO] = &am335x_dummy, |
1681 | .tps65910_pmic_init_data[TPS65910_REG_VDD1] = &am335x_vdd1, | 1700 | .tps65910_pmic_init_data[TPS65910_REG_VDD1] = &am335x_vdd1, |
1682 | .tps65910_pmic_init_data[TPS65910_REG_VDD2] = &am335x_dummy, | 1701 | .tps65910_pmic_init_data[TPS65910_REG_VDD2] = &am335x_dummy, |
1683 | .tps65910_pmic_init_data[TPS65910_REG_VDD3] = &am335x_dummy, | 1702 | .tps65910_pmic_init_data[TPS65910_REG_VDD3] = &am335x_dummy, |
1684 | .tps65910_pmic_init_data[TPS65910_REG_VDIG1] = &am335x_dummy, | 1703 | .tps65910_pmic_init_data[TPS65910_REG_VDIG1] = &am335x_dummy, |
1685 | .tps65910_pmic_init_data[TPS65910_REG_VDIG2] = &am335x_dummy, | 1704 | .tps65910_pmic_init_data[TPS65910_REG_VDIG2] = &am335x_dummy, |
1686 | .tps65910_pmic_init_data[TPS65910_REG_VPLL] = &am335x_dummy, | 1705 | .tps65910_pmic_init_data[TPS65910_REG_VPLL] = &am335x_dummy, |
1687 | .tps65910_pmic_init_data[TPS65910_REG_VDAC] = &am335x_dummy, | 1706 | .tps65910_pmic_init_data[TPS65910_REG_VDAC] = &am335x_dummy, |
1688 | .tps65910_pmic_init_data[TPS65910_REG_VAUX1] = &am335x_dummy, | 1707 | .tps65910_pmic_init_data[TPS65910_REG_VAUX1] = &am335x_dummy, |
1689 | .tps65910_pmic_init_data[TPS65910_REG_VAUX2] = &am335x_dummy, | 1708 | .tps65910_pmic_init_data[TPS65910_REG_VAUX2] = &am335x_dummy, |
1690 | .tps65910_pmic_init_data[TPS65910_REG_VAUX33] = &am335x_dummy, | 1709 | .tps65910_pmic_init_data[TPS65910_REG_VAUX33] = &am335x_dummy, |
1691 | .tps65910_pmic_init_data[TPS65910_REG_VMMC] = &am335x_dummy, | 1710 | .tps65910_pmic_init_data[TPS65910_REG_VMMC] = &am335x_dummy, |
1692 | }; | 1711 | }; |
1693 | 1712 | ||
1694 | /* | 1713 | /* |
1695 | * Daughter board Detection. | 1714 | * Daughter board Detection. |
1696 | * Every board has a ID memory (EEPROM) on board. We probe these devices at | 1715 | * Every board has a ID memory (EEPROM) on board. We probe these devices at |
1697 | * machine init, starting from daughter board and ending with baseboard. | 1716 | * machine init, starting from daughter board and ending with baseboard. |
1698 | * Assumptions : | 1717 | * Assumptions : |
1699 | * 1. probe for i2c devices are called in the order they are included in | 1718 | * 1. probe for i2c devices are called in the order they are included in |
1700 | * the below struct. Daughter boards eeprom are probed 1st. Baseboard | 1719 | * the below struct. Daughter boards eeprom are probed 1st. Baseboard |
1701 | * eeprom probe is called last. | 1720 | * eeprom probe is called last. |
1702 | */ | 1721 | */ |
1703 | static struct i2c_board_info __initdata am335x_i2c_boardinfo[] = { | 1722 | static struct i2c_board_info __initdata am335x_i2c_boardinfo[] = { |
1704 | { | 1723 | { |
1705 | /* Daughter Board EEPROM */ | 1724 | /* Daughter Board EEPROM */ |
1706 | I2C_BOARD_INFO("24c256", DAUG_BOARD_I2C_ADDR), | 1725 | I2C_BOARD_INFO("24c256", DAUG_BOARD_I2C_ADDR), |
1707 | .platform_data = &am335x_daughter_board_eeprom_info, | 1726 | .platform_data = &am335x_daughter_board_eeprom_info, |
1708 | }, | 1727 | }, |
1709 | { | 1728 | { |
1710 | /* Baseboard board EEPROM */ | 1729 | /* Baseboard board EEPROM */ |
1711 | I2C_BOARD_INFO("24c256", BASEBOARD_I2C_ADDR), | 1730 | I2C_BOARD_INFO("24c256", BASEBOARD_I2C_ADDR), |
1712 | .platform_data = &am335x_baseboard_eeprom_info, | 1731 | .platform_data = &am335x_baseboard_eeprom_info, |
1713 | }, | 1732 | }, |
1714 | { | 1733 | { |
1715 | I2C_BOARD_INFO("cpld_reg", 0x35), | 1734 | I2C_BOARD_INFO("cpld_reg", 0x35), |
1716 | }, | 1735 | }, |
1717 | { | 1736 | { |
1718 | I2C_BOARD_INFO("tlc59108", 0x40), | 1737 | I2C_BOARD_INFO("tlc59108", 0x40), |
1719 | }, | 1738 | }, |
1720 | { | 1739 | { |
1721 | I2C_BOARD_INFO("tps65910", TPS65910_I2C_ID1), | 1740 | I2C_BOARD_INFO("tps65910", TPS65910_I2C_ID1), |
1722 | .platform_data = &am335x_tps65910_info, | 1741 | .platform_data = &am335x_tps65910_info, |
1723 | }, | 1742 | }, |
1724 | 1743 | ||
1725 | }; | 1744 | }; |
1726 | 1745 | ||
1727 | static struct omap_musb_board_data musb_board_data = { | 1746 | static struct omap_musb_board_data musb_board_data = { |
1728 | .interface_type = MUSB_INTERFACE_ULPI, | 1747 | .interface_type = MUSB_INTERFACE_ULPI, |
1729 | .mode = MUSB_OTG, | 1748 | .mode = MUSB_OTG, |
1730 | .power = 500, | 1749 | .power = 500, |
1731 | .instances = 1, | 1750 | .instances = 1, |
1732 | }; | 1751 | }; |
1733 | 1752 | ||
1734 | static int cpld_reg_probe(struct i2c_client *client, | 1753 | static int cpld_reg_probe(struct i2c_client *client, |
1735 | const struct i2c_device_id *id) | 1754 | const struct i2c_device_id *id) |
1736 | { | 1755 | { |
1737 | cpld_client = client; | 1756 | cpld_client = client; |
1738 | return 0; | 1757 | return 0; |
1739 | } | 1758 | } |
1740 | 1759 | ||
1741 | static int __devexit cpld_reg_remove(struct i2c_client *client) | 1760 | static int __devexit cpld_reg_remove(struct i2c_client *client) |
1742 | { | 1761 | { |
1743 | cpld_client = NULL; | 1762 | cpld_client = NULL; |
1744 | return 0; | 1763 | return 0; |
1745 | } | 1764 | } |
1746 | 1765 | ||
1747 | static const struct i2c_device_id cpld_reg_id[] = { | 1766 | static const struct i2c_device_id cpld_reg_id[] = { |
1748 | { "cpld_reg", 0 }, | 1767 | { "cpld_reg", 0 }, |
1749 | { } | 1768 | { } |
1750 | }; | 1769 | }; |
1751 | 1770 | ||
1752 | static struct i2c_driver cpld_reg_driver = { | 1771 | static struct i2c_driver cpld_reg_driver = { |
1753 | .driver = { | 1772 | .driver = { |
1754 | .name = "cpld_reg", | 1773 | .name = "cpld_reg", |
1755 | }, | 1774 | }, |
1756 | .probe = cpld_reg_probe, | 1775 | .probe = cpld_reg_probe, |
1757 | .remove = cpld_reg_remove, | 1776 | .remove = cpld_reg_remove, |
1758 | .id_table = cpld_reg_id, | 1777 | .id_table = cpld_reg_id, |
1759 | }; | 1778 | }; |
1760 | 1779 | ||
1761 | static void evm_init_cpld(void) | 1780 | static void evm_init_cpld(void) |
1762 | { | 1781 | { |
1763 | i2c_add_driver(&cpld_reg_driver); | 1782 | i2c_add_driver(&cpld_reg_driver); |
1764 | } | 1783 | } |
1765 | 1784 | ||
1766 | static void __init am335x_evm_i2c_init(void) | 1785 | static void __init am335x_evm_i2c_init(void) |
1767 | { | 1786 | { |
1768 | /* Initially assume Low Cost EVM Config */ | 1787 | /* Initially assume Low Cost EVM Config */ |
1769 | am335x_evm_id = LOW_COST_EVM; | 1788 | am335x_evm_id = LOW_COST_EVM; |
1770 | 1789 | ||
1771 | evm_init_cpld(); | 1790 | evm_init_cpld(); |
1772 | 1791 | ||
1773 | omap_register_i2c_bus(1, 100, am335x_i2c_boardinfo, | 1792 | omap_register_i2c_bus(1, 100, am335x_i2c_boardinfo, |
1774 | ARRAY_SIZE(am335x_i2c_boardinfo)); | 1793 | ARRAY_SIZE(am335x_i2c_boardinfo)); |
1775 | } | 1794 | } |
1776 | 1795 | ||
1777 | static struct resource am335x_rtc_resources[] = { | 1796 | static struct resource am335x_rtc_resources[] = { |
1778 | { | 1797 | { |
1779 | .start = AM33XX_RTC_BASE, | 1798 | .start = AM33XX_RTC_BASE, |
1780 | .end = AM33XX_RTC_BASE + SZ_4K - 1, | 1799 | .end = AM33XX_RTC_BASE + SZ_4K - 1, |
1781 | .flags = IORESOURCE_MEM, | 1800 | .flags = IORESOURCE_MEM, |
1782 | }, | 1801 | }, |
1783 | { /* timer irq */ | 1802 | { /* timer irq */ |
1784 | .start = AM33XX_IRQ_RTC_TIMER, | 1803 | .start = AM33XX_IRQ_RTC_TIMER, |
1785 | .end = AM33XX_IRQ_RTC_TIMER, | 1804 | .end = AM33XX_IRQ_RTC_TIMER, |
1786 | .flags = IORESOURCE_IRQ, | 1805 | .flags = IORESOURCE_IRQ, |
1787 | }, | 1806 | }, |
1788 | { /* alarm irq */ | 1807 | { /* alarm irq */ |
1789 | .start = AM33XX_IRQ_RTC_ALARM, | 1808 | .start = AM33XX_IRQ_RTC_ALARM, |
1790 | .end = AM33XX_IRQ_RTC_ALARM, | 1809 | .end = AM33XX_IRQ_RTC_ALARM, |
1791 | .flags = IORESOURCE_IRQ, | 1810 | .flags = IORESOURCE_IRQ, |
1792 | }, | 1811 | }, |
1793 | }; | 1812 | }; |
1794 | 1813 | ||
1795 | static struct platform_device am335x_rtc_device = { | 1814 | static struct platform_device am335x_rtc_device = { |
1796 | .name = "omap_rtc", | 1815 | .name = "omap_rtc", |
1797 | .id = -1, | 1816 | .id = -1, |
1798 | .num_resources = ARRAY_SIZE(am335x_rtc_resources), | 1817 | .num_resources = ARRAY_SIZE(am335x_rtc_resources), |
1799 | .resource = am335x_rtc_resources, | 1818 | .resource = am335x_rtc_resources, |
1800 | }; | 1819 | }; |
1801 | 1820 | ||
1802 | static int am335x_rtc_init(void) | 1821 | static int am335x_rtc_init(void) |
1803 | { | 1822 | { |
1804 | void __iomem *base; | 1823 | void __iomem *base; |
1805 | struct clk *clk; | 1824 | struct clk *clk; |
1806 | 1825 | ||
1807 | clk = clk_get(NULL, "rtc_fck"); | 1826 | clk = clk_get(NULL, "rtc_fck"); |
1808 | if (IS_ERR(clk)) { | 1827 | if (IS_ERR(clk)) { |
1809 | pr_err("rtc : Failed to get RTC clock\n"); | 1828 | pr_err("rtc : Failed to get RTC clock\n"); |
1810 | return -1; | 1829 | return -1; |
1811 | } | 1830 | } |
1812 | 1831 | ||
1813 | if (clk_enable(clk)) { | 1832 | if (clk_enable(clk)) { |
1814 | pr_err("rtc: Clock Enable Failed\n"); | 1833 | pr_err("rtc: Clock Enable Failed\n"); |
1815 | return -1; | 1834 | return -1; |
1816 | } | 1835 | } |
1817 | 1836 | ||
1818 | base = ioremap(AM33XX_RTC_BASE, SZ_4K); | 1837 | base = ioremap(AM33XX_RTC_BASE, SZ_4K); |
1819 | 1838 | ||
1820 | if (WARN_ON(!base)) | 1839 | if (WARN_ON(!base)) |
1821 | return -ENOMEM; | 1840 | return -ENOMEM; |
1822 | 1841 | ||
1823 | /* Unlock the rtc's registers */ | 1842 | /* Unlock the rtc's registers */ |
1824 | __raw_writel(0x83e70b13, base + 0x6c); | 1843 | __raw_writel(0x83e70b13, base + 0x6c); |
1825 | __raw_writel(0x95a4f1e0, base + 0x70); | 1844 | __raw_writel(0x95a4f1e0, base + 0x70); |
1826 | 1845 | ||
1827 | /* | 1846 | /* |
1828 | * Enable the 32K OSc | 1847 | * Enable the 32K OSc |
1829 | * TODO: Need a better way to handle this | 1848 | * TODO: Need a better way to handle this |
1830 | * Since we want the clock to be running before mmc init | 1849 | * Since we want the clock to be running before mmc init |
1831 | * we need to do it before the rtc probe happens | 1850 | * we need to do it before the rtc probe happens |
1832 | */ | 1851 | */ |
1833 | __raw_writel(0x48, base + 0x54); | 1852 | __raw_writel(0x48, base + 0x54); |
1834 | 1853 | ||
1835 | iounmap(base); | 1854 | iounmap(base); |
1836 | 1855 | ||
1837 | return platform_device_register(&am335x_rtc_device); | 1856 | return platform_device_register(&am335x_rtc_device); |
1838 | } | 1857 | } |
1839 | 1858 | ||
1840 | /* Enable clkout2 */ | 1859 | /* Enable clkout2 */ |
1841 | static struct pinmux_config clkout2_pin_mux[] = { | 1860 | static struct pinmux_config clkout2_pin_mux[] = { |
1842 | {"xdma_event_intr1.clkout2", OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT}, | 1861 | {"xdma_event_intr1.clkout2", OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT}, |
1843 | {NULL, 0}, | 1862 | {NULL, 0}, |
1844 | }; | 1863 | }; |
1845 | 1864 | ||
1846 | static void __init clkout2_enable(void) | 1865 | static void __init clkout2_enable(void) |
1847 | { | 1866 | { |
1848 | struct clk *ck_32; | 1867 | struct clk *ck_32; |
1849 | 1868 | ||
1850 | ck_32 = clk_get(NULL, "clkout2_ck"); | 1869 | ck_32 = clk_get(NULL, "clkout2_ck"); |
1851 | if (IS_ERR(ck_32)) { | 1870 | if (IS_ERR(ck_32)) { |
1852 | pr_err("Cannot clk_get ck_32\n"); | 1871 | pr_err("Cannot clk_get ck_32\n"); |
1853 | return; | 1872 | return; |
1854 | } | 1873 | } |
1855 | 1874 | ||
1856 | clk_enable(ck_32); | 1875 | clk_enable(ck_32); |
1857 | 1876 | ||
1858 | setup_pin_mux(clkout2_pin_mux); | 1877 | setup_pin_mux(clkout2_pin_mux); |
1859 | } | 1878 | } |
1860 | 1879 | ||
1861 | void __iomem * __init am33xx_get_mem_ctlr(void) | 1880 | void __iomem * __init am33xx_get_mem_ctlr(void) |
1862 | { | 1881 | { |
1863 | void __iomem *am33xx_emif_base; | 1882 | void __iomem *am33xx_emif_base; |
1864 | 1883 | ||
1865 | am33xx_emif_base = ioremap(AM33XX_EMIF0_BASE, SZ_32K); | 1884 | am33xx_emif_base = ioremap(AM33XX_EMIF0_BASE, SZ_32K); |
1866 | 1885 | ||
1867 | if (!am33xx_emif_base) | 1886 | if (!am33xx_emif_base) |
1868 | pr_warning("%s: Unable to map DDR2 controller", __func__); | 1887 | pr_warning("%s: Unable to map DDR2 controller", __func__); |
1869 | 1888 | ||
1870 | return am33xx_emif_base; | 1889 | return am33xx_emif_base; |
1871 | } | 1890 | } |
1872 | 1891 | ||
1873 | static struct resource am33xx_cpuidle_resources[] = { | 1892 | static struct resource am33xx_cpuidle_resources[] = { |
1874 | { | 1893 | { |
1875 | .start = AM33XX_EMIF0_BASE, | 1894 | .start = AM33XX_EMIF0_BASE, |
1876 | .end = AM33XX_EMIF0_BASE + SZ_32K - 1, | 1895 | .end = AM33XX_EMIF0_BASE + SZ_32K - 1, |
1877 | .flags = IORESOURCE_MEM, | 1896 | .flags = IORESOURCE_MEM, |
1878 | }, | 1897 | }, |
1879 | }; | 1898 | }; |
1880 | 1899 | ||
1881 | /* AM33XX devices support DDR2 power down */ | 1900 | /* AM33XX devices support DDR2 power down */ |
1882 | static struct am33xx_cpuidle_config am33xx_cpuidle_pdata = { | 1901 | static struct am33xx_cpuidle_config am33xx_cpuidle_pdata = { |
1883 | .ddr2_pdown = 1, | 1902 | .ddr2_pdown = 1, |
1884 | }; | 1903 | }; |
1885 | 1904 | ||
1886 | static struct platform_device am33xx_cpuidle_device = { | 1905 | static struct platform_device am33xx_cpuidle_device = { |
1887 | .name = "cpuidle-am33xx", | 1906 | .name = "cpuidle-am33xx", |
1888 | .num_resources = ARRAY_SIZE(am33xx_cpuidle_resources), | 1907 | .num_resources = ARRAY_SIZE(am33xx_cpuidle_resources), |
1889 | .resource = am33xx_cpuidle_resources, | 1908 | .resource = am33xx_cpuidle_resources, |
1890 | .dev = { | 1909 | .dev = { |
1891 | .platform_data = &am33xx_cpuidle_pdata, | 1910 | .platform_data = &am33xx_cpuidle_pdata, |
1892 | }, | 1911 | }, |
1893 | }; | 1912 | }; |
1894 | 1913 | ||
1895 | static void __init am33xx_cpuidle_init(void) | 1914 | static void __init am33xx_cpuidle_init(void) |
1896 | { | 1915 | { |
1897 | int ret; | 1916 | int ret; |
1898 | 1917 | ||
1899 | am33xx_cpuidle_pdata.emif_base = am33xx_get_mem_ctlr(); | 1918 | am33xx_cpuidle_pdata.emif_base = am33xx_get_mem_ctlr(); |
1900 | 1919 | ||
1901 | ret = platform_device_register(&am33xx_cpuidle_device); | 1920 | ret = platform_device_register(&am33xx_cpuidle_device); |
1902 | 1921 | ||
1903 | if (ret) | 1922 | if (ret) |
1904 | pr_warning("AM33XX cpuidle registration failed\n"); | 1923 | pr_warning("AM33XX cpuidle registration failed\n"); |
1905 | 1924 | ||
1906 | } | 1925 | } |
1907 | 1926 | ||
1908 | static void __init am335x_evm_init(void) | 1927 | static void __init am335x_evm_init(void) |
1909 | { | 1928 | { |
1910 | am33xx_cpuidle_init(); | 1929 | am33xx_cpuidle_init(); |
1911 | am33xx_mux_init(board_mux); | 1930 | am33xx_mux_init(board_mux); |
1912 | omap_serial_init(); | 1931 | omap_serial_init(); |
1913 | am335x_rtc_init(); | 1932 | am335x_rtc_init(); |
1914 | clkout2_enable(); | 1933 | clkout2_enable(); |
1915 | am335x_evm_i2c_init(); | 1934 | am335x_evm_i2c_init(); |
1916 | omap_sdrc_init(NULL, NULL); | 1935 | omap_sdrc_init(NULL, NULL); |
1917 | usb_musb_init(&musb_board_data); | 1936 | usb_musb_init(&musb_board_data); |
1918 | omap_board_config = am335x_evm_config; | 1937 | omap_board_config = am335x_evm_config; |
1919 | omap_board_config_size = ARRAY_SIZE(am335x_evm_config); | 1938 | omap_board_config_size = ARRAY_SIZE(am335x_evm_config); |
1920 | /* Create an alias for icss clock */ | 1939 | /* Create an alias for icss clock */ |
1921 | if (clk_add_alias("pruss", NULL, "icss_uart_gclk", NULL)) | 1940 | if (clk_add_alias("pruss", NULL, "icss_uart_gclk", NULL)) |
1922 | pr_err("failed to create an alias: icss_uart_gclk --> pruss\n"); | 1941 | pr_err("failed to create an alias: icss_uart_gclk --> pruss\n"); |
1923 | /* Create an alias for gfx/sgx clock */ | 1942 | /* Create an alias for gfx/sgx clock */ |
1924 | if (clk_add_alias("sgx_ck", NULL, "gfx_fclk", NULL)) | 1943 | if (clk_add_alias("sgx_ck", NULL, "gfx_fclk", NULL)) |
1925 | pr_err("failed to create an alias: gfx_fclk --> sgx_ck\n"); | 1944 | pr_err("failed to create an alias: gfx_fclk --> sgx_ck\n"); |
1926 | } | 1945 | } |
1927 | 1946 | ||
1928 | static void __init am335x_evm_map_io(void) | 1947 | static void __init am335x_evm_map_io(void) |
1929 | { | 1948 | { |
1930 | omap2_set_globals_am33xx(); | 1949 | omap2_set_globals_am33xx(); |
1931 | omapam33xx_map_common_io(); | 1950 | omapam33xx_map_common_io(); |
1932 | } | 1951 | } |
1933 | 1952 | ||
1934 | MACHINE_START(AM335XEVM, "am335xevm") | 1953 | MACHINE_START(AM335XEVM, "am335xevm") |
1935 | /* Maintainer: Texas Instruments */ | 1954 | /* Maintainer: Texas Instruments */ |
1936 | .atag_offset = 0x100, | 1955 | .atag_offset = 0x100, |
1937 | .map_io = am335x_evm_map_io, | 1956 | .map_io = am335x_evm_map_io, |
1938 | .init_irq = ti816x_init_irq, | 1957 | .init_irq = ti816x_init_irq, |
1939 | .init_early = am335x_init_early, | 1958 | .init_early = am335x_init_early, |
1940 | .timer = &omap3_am33xx_timer, | 1959 | .timer = &omap3_am33xx_timer, |
1941 | .init_machine = am335x_evm_init, | 1960 | .init_machine = am335x_evm_init, |
1942 | MACHINE_END | 1961 | MACHINE_END |
1943 | 1962 | ||
1944 | MACHINE_START(AM335XIAEVM, "am335xiaevm") | 1963 | MACHINE_START(AM335XIAEVM, "am335xiaevm") |
1945 | /* Maintainer: Texas Instruments */ | 1964 | /* Maintainer: Texas Instruments */ |
1946 | .atag_offset = 0x100, | 1965 | .atag_offset = 0x100, |
1947 | .map_io = am335x_evm_map_io, | 1966 | .map_io = am335x_evm_map_io, |
1948 | .init_irq = ti816x_init_irq, | 1967 | .init_irq = ti816x_init_irq, |
1949 | .init_early = am335x_init_early, | 1968 | .init_early = am335x_init_early, |
1950 | .timer = &omap3_am33xx_timer, | 1969 | .timer = &omap3_am33xx_timer, |
1951 | .init_machine = am335x_evm_init, | 1970 | .init_machine = am335x_evm_init, |
1952 | MACHINE_END | 1971 | MACHINE_END |
1953 | 1972 |
arch/arm/mach-omap2/mux33xx.c
1 | /* | 1 | /* |
2 | * AM33XX mux data | 2 | * AM33XX mux data |
3 | * | 3 | * |
4 | * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ | 4 | * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ |
5 | * | 5 | * |
6 | * Derived from: arch/arm/mach-omap2/mux34xx.c Original copyright follows: | 6 | * Derived from: arch/arm/mach-omap2/mux34xx.c Original copyright follows: |
7 | * | 7 | * |
8 | * Copyright (C) 2009 Nokia | 8 | * Copyright (C) 2009 Nokia |
9 | * Copyright (C) 2009 Texas Instruments | 9 | * Copyright (C) 2009 Texas Instruments |
10 | * | 10 | * |
11 | * This program is free software; you can redistribute it and/or modify | 11 | * This program is free software; you can redistribute it and/or modify |
12 | * it under the terms of the GNU General Public License version 2 as | 12 | * it under the terms of the GNU General Public License version 2 as |
13 | * published by the Free Software Foundation. | 13 | * published by the Free Software Foundation. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | 18 | ||
19 | #include "mux.h" | 19 | #include "mux.h" |
20 | 20 | ||
21 | #ifdef CONFIG_OMAP_MUX | 21 | #ifdef CONFIG_OMAP_MUX |
22 | 22 | ||
23 | #define _AM33XX_MUXENTRY(M0, g, m0, m1, m2, m3, m4, m5, m6, m7) \ | 23 | #define _AM33XX_MUXENTRY(M0, g, m0, m1, m2, m3, m4, m5, m6, m7) \ |
24 | { \ | 24 | { \ |
25 | .reg_offset = (AM33XX_CONTROL_PADCONF_##M0##_OFFSET), \ | 25 | .reg_offset = (AM33XX_CONTROL_PADCONF_##M0##_OFFSET), \ |
26 | .gpio = (g), \ | 26 | .gpio = (g), \ |
27 | .muxnames = { m0, m1, m2, m3, m4, m5, m6, m7 }, \ | 27 | .muxnames = { m0, m1, m2, m3, m4, m5, m6, m7 }, \ |
28 | } | 28 | } |
29 | 29 | ||
30 | /* AM33XX pin mux super set */ | 30 | /* AM33XX pin mux super set */ |
31 | static struct omap_mux __initdata am33xx_muxmodes[] = { | 31 | static struct omap_mux __initdata am33xx_muxmodes[] = { |
32 | _AM33XX_MUXENTRY(GPMC_AD0, 0, | 32 | _AM33XX_MUXENTRY(GPMC_AD0, 0, |
33 | "gpmc_ad0", "mmc1_dat0", NULL, NULL, | 33 | "gpmc_ad0", "mmc1_dat0", NULL, NULL, |
34 | NULL, NULL, NULL, NULL), | 34 | NULL, NULL, NULL, NULL), |
35 | _AM33XX_MUXENTRY(GPMC_AD1, 0, | 35 | _AM33XX_MUXENTRY(GPMC_AD1, 0, |
36 | "gpmc_ad1", "mmc1_dat1", NULL, NULL, | 36 | "gpmc_ad1", "mmc1_dat1", NULL, NULL, |
37 | NULL, NULL, NULL, NULL), | 37 | NULL, NULL, NULL, NULL), |
38 | _AM33XX_MUXENTRY(GPMC_AD2, 0, | 38 | _AM33XX_MUXENTRY(GPMC_AD2, 0, |
39 | "gpmc_ad2", "mmc1_dat2", NULL, NULL, | 39 | "gpmc_ad2", "mmc1_dat2", NULL, NULL, |
40 | NULL, NULL, NULL, NULL), | 40 | NULL, NULL, NULL, NULL), |
41 | _AM33XX_MUXENTRY(GPMC_AD3, 0, | 41 | _AM33XX_MUXENTRY(GPMC_AD3, 0, |
42 | "gpmc_ad3", "mmc1_dat3", NULL, NULL, | 42 | "gpmc_ad3", "mmc1_dat3", NULL, NULL, |
43 | NULL, NULL, NULL, NULL), | 43 | NULL, NULL, NULL, NULL), |
44 | _AM33XX_MUXENTRY(GPMC_AD4, 0, | 44 | _AM33XX_MUXENTRY(GPMC_AD4, 0, |
45 | "gpmc_ad4", "mmc1_dat4", NULL, NULL, | 45 | "gpmc_ad4", "mmc1_dat4", NULL, NULL, |
46 | NULL, NULL, NULL, NULL), | 46 | NULL, NULL, NULL, NULL), |
47 | _AM33XX_MUXENTRY(GPMC_AD5, 0, | 47 | _AM33XX_MUXENTRY(GPMC_AD5, 0, |
48 | "gpmc_ad5", "mmc1_dat5", NULL, NULL, | 48 | "gpmc_ad5", "mmc1_dat5", NULL, NULL, |
49 | NULL, NULL, NULL, NULL), | 49 | NULL, NULL, NULL, NULL), |
50 | _AM33XX_MUXENTRY(GPMC_AD6, 0, | 50 | _AM33XX_MUXENTRY(GPMC_AD6, 0, |
51 | "gpmc_ad6", "mmc1_dat6", NULL, NULL, | 51 | "gpmc_ad6", "mmc1_dat6", NULL, NULL, |
52 | NULL, NULL, NULL, NULL), | 52 | NULL, NULL, NULL, NULL), |
53 | _AM33XX_MUXENTRY(GPMC_AD7, 0, | 53 | _AM33XX_MUXENTRY(GPMC_AD7, 0, |
54 | "gpmc_ad7", "mmc1_dat7", NULL, NULL, | 54 | "gpmc_ad7", "mmc1_dat7", NULL, NULL, |
55 | NULL, NULL, NULL, NULL), | 55 | NULL, NULL, NULL, NULL), |
56 | _AM33XX_MUXENTRY(GPMC_AD8, 0, | 56 | _AM33XX_MUXENTRY(GPMC_AD8, 0, |
57 | "gpmc_ad8", "lcd_data16", "mmc1_dat0", "mmc2_dat4", | 57 | "gpmc_ad8", "lcd_data16", "mmc1_dat0", "mmc2_dat4", |
58 | NULL, NULL, NULL, NULL), | 58 | NULL, NULL, NULL, NULL), |
59 | _AM33XX_MUXENTRY(GPMC_AD9, 0, | 59 | _AM33XX_MUXENTRY(GPMC_AD9, 0, |
60 | "gpmc_ad9", "lcd_data17", "mmc1_dat1", "mmc2_dat5", | 60 | "gpmc_ad9", "lcd_data17", "mmc1_dat1", "mmc2_dat5", |
61 | NULL, NULL, NULL, NULL), | 61 | NULL, NULL, NULL, NULL), |
62 | _AM33XX_MUXENTRY(GPMC_AD10, 0, | 62 | _AM33XX_MUXENTRY(GPMC_AD10, 0, |
63 | "gpmc_ad10", "lcd_data18", "mmc1_dat2", "mmc2_dat6", | 63 | "gpmc_ad10", "lcd_data18", "mmc1_dat2", "mmc2_dat6", |
64 | NULL, NULL, NULL, NULL), | 64 | NULL, NULL, NULL, NULL), |
65 | _AM33XX_MUXENTRY(GPMC_AD11, 0, | 65 | _AM33XX_MUXENTRY(GPMC_AD11, 0, |
66 | "gpmc_ad11", "lcd_data19", "mmc1_dat3", "mmc2_dat7", | 66 | "gpmc_ad11", "lcd_data19", "mmc1_dat3", "mmc2_dat7", |
67 | NULL, NULL, NULL, NULL), | 67 | NULL, NULL, NULL, NULL), |
68 | _AM33XX_MUXENTRY(GPMC_AD12, 0, | 68 | _AM33XX_MUXENTRY(GPMC_AD12, 0, |
69 | "gpmc_ad12", "lcd_data20", "mmc1_dat4", "mmc2_dat0", | 69 | "gpmc_ad12", "lcd_data20", "mmc1_dat4", "mmc2_dat0", |
70 | NULL, NULL, NULL, NULL), | 70 | NULL, NULL, NULL, NULL), |
71 | _AM33XX_MUXENTRY(GPMC_AD13, 0, | 71 | _AM33XX_MUXENTRY(GPMC_AD13, 0, |
72 | "gpmc_ad13", "lcd_data21", "mmc1_dat5", "mmc2_dat1", | 72 | "gpmc_ad13", "lcd_data21", "mmc1_dat5", "mmc2_dat1", |
73 | NULL, NULL, NULL, NULL), | 73 | NULL, NULL, NULL, NULL), |
74 | _AM33XX_MUXENTRY(GPMC_AD14, 0, | 74 | _AM33XX_MUXENTRY(GPMC_AD14, 0, |
75 | "gpmc_ad14", "lcd_data22", "mmc1_dat6", "mmc2_dat2", | 75 | "gpmc_ad14", "lcd_data22", "mmc1_dat6", "mmc2_dat2", |
76 | NULL, NULL, NULL, NULL), | 76 | NULL, NULL, NULL, NULL), |
77 | _AM33XX_MUXENTRY(GPMC_AD15, 0, | 77 | _AM33XX_MUXENTRY(GPMC_AD15, 0, |
78 | "gpmc_ad15", "lcd_data23", "mmc1_dat7", "mmc2_dat3", | 78 | "gpmc_ad15", "lcd_data23", "mmc1_dat7", "mmc2_dat3", |
79 | NULL, NULL, NULL, NULL), | 79 | NULL, NULL, NULL, NULL), |
80 | _AM33XX_MUXENTRY(GPMC_A0, 0, | 80 | _AM33XX_MUXENTRY(GPMC_A0, 0, |
81 | "gpmc_a0", "mii2_txen", "rgmii2_tctl", "rmii2_txen", | 81 | "gpmc_a0", "mii2_txen", "rgmii2_tctl", "rmii2_txen", |
82 | NULL, NULL, NULL, "gpio1_16"), | 82 | NULL, NULL, NULL, "gpio1_16"), |
83 | _AM33XX_MUXENTRY(GPMC_A1, 0, | 83 | _AM33XX_MUXENTRY(GPMC_A1, 0, |
84 | "gpmc_a1", "mii2_rxdv", "rgmii2_rctl", "mmc2_dat0", | 84 | "gpmc_a1", "mii2_rxdv", "rgmii2_rctl", "mmc2_dat0", |
85 | NULL, NULL, NULL, NULL), | 85 | NULL, NULL, NULL, NULL), |
86 | _AM33XX_MUXENTRY(GPMC_A2, 0, | 86 | _AM33XX_MUXENTRY(GPMC_A2, 0, |
87 | "gpmc_a2", "mii2_txd3", "rgmii2_td3", "mmc2_dat1", | 87 | "gpmc_a2", "mii2_txd3", "rgmii2_td3", "mmc2_dat1", |
88 | NULL, NULL, NULL, NULL), | 88 | NULL, NULL, NULL, NULL), |
89 | _AM33XX_MUXENTRY(GPMC_A3, 0, | 89 | _AM33XX_MUXENTRY(GPMC_A3, 0, |
90 | "gpmc_a3", "mii2_txd2", "rgmii2_td2", "mmc2_dat2", | 90 | "gpmc_a3", "mii2_txd2", "rgmii2_td2", "mmc2_dat2", |
91 | NULL, NULL, NULL, NULL), | 91 | NULL, NULL, NULL, NULL), |
92 | _AM33XX_MUXENTRY(GPMC_A4, 0, | 92 | _AM33XX_MUXENTRY(GPMC_A4, 0, |
93 | "gpmc_a4", "mii2_txd1", "rgmii2_td1", "rmii2_txd1", | 93 | "gpmc_a4", "mii2_txd1", "rgmii2_td1", "rmii2_txd1", |
94 | "gpmc_a20", NULL, NULL, NULL), | 94 | "gpmc_a20", NULL, NULL, NULL), |
95 | _AM33XX_MUXENTRY(GPMC_A5, 0, | 95 | _AM33XX_MUXENTRY(GPMC_A5, 0, |
96 | "gpmc_a5", "mii2_txd0", "rgmii2_td0", "rmii2_txd0", | 96 | "gpmc_a5", "mii2_txd0", "rgmii2_td0", "rmii2_txd0", |
97 | "gpmc_a21", NULL, NULL, "gpio1_21"), | 97 | "gpmc_a21", NULL, NULL, "gpio1_21"), |
98 | _AM33XX_MUXENTRY(GPMC_A6, 0, | 98 | _AM33XX_MUXENTRY(GPMC_A6, 0, |
99 | "gpmc_a6", "mii2_txclk", "rgmii2_tclk", "mmc2_dat4", | 99 | "gpmc_a6", "mii2_txclk", "rgmii2_tclk", "mmc2_dat4", |
100 | "gpmc_a22", NULL, NULL, "gpio1_22"), | 100 | "gpmc_a22", NULL, NULL, "gpio1_22"), |
101 | _AM33XX_MUXENTRY(GPMC_A7, 0, | 101 | _AM33XX_MUXENTRY(GPMC_A7, 0, |
102 | "gpmc_a7", "mii2_rxclk", "rgmii2_rclk", "mmc2_dat5", | 102 | "gpmc_a7", "mii2_rxclk", "rgmii2_rclk", "mmc2_dat5", |
103 | NULL, NULL, NULL, NULL), | 103 | NULL, NULL, NULL, NULL), |
104 | _AM33XX_MUXENTRY(GPMC_A8, 0, | 104 | _AM33XX_MUXENTRY(GPMC_A8, 0, |
105 | "gpmc_a8", "mii2_rxd3", "rgmii2_rd3", "mmc2_dat6", | 105 | "gpmc_a8", "mii2_rxd3", "rgmii2_rd3", "mmc2_dat6", |
106 | NULL, NULL, "mcasp0_aclkx", "gpio1_24"), | 106 | NULL, NULL, "mcasp0_aclkx", "gpio1_24"), |
107 | _AM33XX_MUXENTRY(GPMC_A9, 0, | 107 | _AM33XX_MUXENTRY(GPMC_A9, 0, |
108 | "gpmc_a9", "mii2_rxd2", "rgmii2_rd2", "mmc2_dat7", | 108 | "gpmc_a9", "mii2_rxd2", "rgmii2_rd2", "mmc2_dat7", |
109 | NULL, NULL, "mcasp0_fsx", "gpio1_25"), | 109 | NULL, NULL, "mcasp0_fsx", "gpio1_25"), |
110 | _AM33XX_MUXENTRY(GPMC_A10, 0, | 110 | _AM33XX_MUXENTRY(GPMC_A10, 0, |
111 | "gpmc_a10", "mii2_rxd1", "rgmii2_rd1", "rmii2_rxd1", | 111 | "gpmc_a10", "mii2_rxd1", "rgmii2_rd1", "rmii2_rxd1", |
112 | NULL, NULL, "mcasp0_axr0", "gpio1_26"), | 112 | NULL, NULL, "mcasp0_axr0", "gpio1_26"), |
113 | _AM33XX_MUXENTRY(GPMC_A11, 0, | 113 | _AM33XX_MUXENTRY(GPMC_A11, 0, |
114 | "gpmc_a11", "mii2_rxd0", "rgmii2_rd0", "rmii2_rxd0", | 114 | "gpmc_a11", "mii2_rxd0", "rgmii2_rd0", "rmii2_rxd0", |
115 | NULL, NULL, "mcasp0_axr1", "gpio1_27"), | 115 | NULL, NULL, "mcasp0_axr1", "gpio1_27"), |
116 | _AM33XX_MUXENTRY(GPMC_WAIT0, 0, | 116 | _AM33XX_MUXENTRY(GPMC_WAIT0, 0, |
117 | "gpmc_wait0", "mii2_crs", NULL, "rmii2_crs_dv", | 117 | "gpmc_wait0", "mii2_crs", NULL, "rmii2_crs_dv", |
118 | "mmc1_sdcd", NULL, NULL, NULL), | 118 | "mmc1_sdcd", NULL, NULL, NULL), |
119 | _AM33XX_MUXENTRY(GPMC_WPN, 0, | 119 | _AM33XX_MUXENTRY(GPMC_WPN, 0, |
120 | "gpmc_wpn", "mii2_rxerr", NULL, "rmii2_rxerr", | 120 | "gpmc_wpn", "mii2_rxerr", NULL, "rmii2_rxerr", |
121 | "mmc2_sdcd", NULL, NULL, NULL), | 121 | "mmc2_sdcd", NULL, NULL, NULL), |
122 | _AM33XX_MUXENTRY(GPMC_BEN1, 0, | 122 | _AM33XX_MUXENTRY(GPMC_BEN1, 0, |
123 | "gpmc_ben1", "mii2_col", NULL, "mmc2_dat3", | 123 | "gpmc_ben1", "mii2_col", NULL, "mmc2_dat3", |
124 | NULL, NULL, "mcasp0_aclkr", NULL), | 124 | NULL, NULL, "mcasp0_aclkr", NULL), |
125 | _AM33XX_MUXENTRY(GPMC_CSN0, 0, | 125 | _AM33XX_MUXENTRY(GPMC_CSN0, 0, |
126 | "gpmc_csn0", NULL, NULL, NULL, | 126 | "gpmc_csn0", NULL, NULL, NULL, |
127 | NULL, NULL, NULL, "mmc1_sdwp"), | 127 | NULL, NULL, NULL, "mmc1_sdwp"), |
128 | _AM33XX_MUXENTRY(GPMC_CSN1, 0, | 128 | _AM33XX_MUXENTRY(GPMC_CSN1, 0, |
129 | "gpmc_csn1", NULL, "mmc1_clk", NULL, | 129 | "gpmc_csn1", NULL, "mmc1_clk", NULL, |
130 | NULL, NULL, NULL, "gpio1_30"), | 130 | NULL, NULL, NULL, "gpio1_30"), |
131 | _AM33XX_MUXENTRY(GPMC_CSN2, 0, | 131 | _AM33XX_MUXENTRY(GPMC_CSN2, 0, |
132 | "gpmc_csn2", NULL, "mmc1_cmd", NULL, | 132 | "gpmc_csn2", NULL, "mmc1_cmd", NULL, |
133 | NULL, NULL, NULL, "gpio1_31"), | 133 | NULL, NULL, NULL, "gpio1_31"), |
134 | _AM33XX_MUXENTRY(GPMC_CSN3, 0, | 134 | _AM33XX_MUXENTRY(GPMC_CSN3, 0, |
135 | "gpmc_csn3", NULL, NULL, "mmc2_cmd", | 135 | "gpmc_csn3", NULL, NULL, "mmc2_cmd", |
136 | NULL, NULL, NULL, NULL), | 136 | NULL, NULL, NULL, NULL), |
137 | _AM33XX_MUXENTRY(GPMC_CLK, 0, | 137 | _AM33XX_MUXENTRY(GPMC_CLK, 0, |
138 | "gpmc_clk", NULL, NULL, "mmc2_clk", | 138 | "gpmc_clk", NULL, NULL, "mmc2_clk", |
139 | NULL, NULL, "mcasp0_fsr", NULL), | 139 | NULL, NULL, "mcasp0_fsr", NULL), |
140 | _AM33XX_MUXENTRY(GPMC_ADVN_ALE, 0, | 140 | _AM33XX_MUXENTRY(GPMC_ADVN_ALE, 0, |
141 | "gpmc_advn_ale", NULL, NULL, NULL, | 141 | "gpmc_advn_ale", NULL, NULL, NULL, |
142 | NULL, NULL, NULL, "mmc1_sdcd"), | 142 | NULL, NULL, NULL, "mmc1_sdcd"), |
143 | _AM33XX_MUXENTRY(GPMC_OEN_REN, 0, | 143 | _AM33XX_MUXENTRY(GPMC_OEN_REN, 0, |
144 | "gpmc_oen_ren", NULL, NULL, NULL, | 144 | "gpmc_oen_ren", NULL, NULL, NULL, |
145 | NULL, NULL, NULL, NULL), | 145 | NULL, NULL, NULL, NULL), |
146 | _AM33XX_MUXENTRY(GPMC_WEN, 0, | 146 | _AM33XX_MUXENTRY(GPMC_WEN, 0, |
147 | "gpmc_wen", NULL, NULL, NULL, | 147 | "gpmc_wen", NULL, NULL, NULL, |
148 | NULL, NULL, NULL, NULL), | 148 | NULL, NULL, NULL, NULL), |
149 | _AM33XX_MUXENTRY(GPMC_BEN0_CLE, 0, | 149 | _AM33XX_MUXENTRY(GPMC_BEN0_CLE, 0, |
150 | "gpmc_ben0_cle", NULL, NULL, NULL, | 150 | "gpmc_ben0_cle", NULL, NULL, NULL, |
151 | NULL, NULL, NULL, NULL), | 151 | NULL, NULL, NULL, NULL), |
152 | _AM33XX_MUXENTRY(LCD_DATA0, 0, | 152 | _AM33XX_MUXENTRY(LCD_DATA0, 0, |
153 | "lcd_data0", "gpmc_a0", NULL, NULL, | 153 | "lcd_data0", "gpmc_a0", NULL, NULL, |
154 | NULL, NULL, NULL, NULL), | 154 | NULL, NULL, NULL, NULL), |
155 | _AM33XX_MUXENTRY(LCD_DATA1, 0, | 155 | _AM33XX_MUXENTRY(LCD_DATA1, 0, |
156 | "lcd_data1", "gpmc_a1", NULL, NULL, | 156 | "lcd_data1", "gpmc_a1", NULL, NULL, |
157 | NULL, NULL, NULL, NULL), | 157 | NULL, NULL, NULL, NULL), |
158 | _AM33XX_MUXENTRY(LCD_DATA2, 0, | 158 | _AM33XX_MUXENTRY(LCD_DATA2, 0, |
159 | "lcd_data2", "gpmc_a2", NULL, NULL, | 159 | "lcd_data2", "gpmc_a2", NULL, NULL, |
160 | NULL, NULL, NULL, NULL), | 160 | NULL, NULL, NULL, NULL), |
161 | _AM33XX_MUXENTRY(LCD_DATA3, 0, | 161 | _AM33XX_MUXENTRY(LCD_DATA3, 0, |
162 | "lcd_data3", "gpmc_a3", NULL, NULL, | 162 | "lcd_data3", "gpmc_a3", NULL, NULL, |
163 | NULL, NULL, NULL, NULL), | 163 | NULL, NULL, NULL, NULL), |
164 | _AM33XX_MUXENTRY(LCD_DATA4, 0, | 164 | _AM33XX_MUXENTRY(LCD_DATA4, 0, |
165 | "lcd_data4", "gpmc_a4", NULL, NULL, | 165 | "lcd_data4", "gpmc_a4", NULL, NULL, |
166 | NULL, NULL, NULL, NULL), | 166 | NULL, NULL, NULL, NULL), |
167 | _AM33XX_MUXENTRY(LCD_DATA5, 0, | 167 | _AM33XX_MUXENTRY(LCD_DATA5, 0, |
168 | "lcd_data5", "gpmc_a5", NULL, NULL, | 168 | "lcd_data5", "gpmc_a5", NULL, NULL, |
169 | NULL, NULL, NULL, NULL), | 169 | NULL, NULL, NULL, NULL), |
170 | _AM33XX_MUXENTRY(LCD_DATA6, 0, | 170 | _AM33XX_MUXENTRY(LCD_DATA6, 0, |
171 | "lcd_data6", "gpmc_a6", NULL, NULL, | 171 | "lcd_data6", "gpmc_a6", NULL, NULL, |
172 | NULL, NULL, NULL, NULL), | 172 | NULL, NULL, NULL, NULL), |
173 | _AM33XX_MUXENTRY(LCD_DATA7, 0, | 173 | _AM33XX_MUXENTRY(LCD_DATA7, 0, |
174 | "lcd_data7", "gpmc_a7", NULL, NULL, | 174 | "lcd_data7", "gpmc_a7", NULL, NULL, |
175 | NULL, NULL, NULL, NULL), | 175 | NULL, NULL, NULL, NULL), |
176 | _AM33XX_MUXENTRY(LCD_DATA8, 0, | 176 | _AM33XX_MUXENTRY(LCD_DATA8, 0, |
177 | "lcd_data8", "gpmc_a12", NULL, "mcasp0_aclkx", | 177 | "lcd_data8", "gpmc_a12", NULL, "mcasp0_aclkx", |
178 | NULL, NULL, NULL, NULL), | 178 | NULL, NULL, "uart2_ctsn", NULL), |
179 | _AM33XX_MUXENTRY(LCD_DATA9, 0, | 179 | _AM33XX_MUXENTRY(LCD_DATA9, 0, |
180 | "lcd_data9", "gpmc_a13", NULL, "mcasp0_fsx", | 180 | "lcd_data9", "gpmc_a13", NULL, "mcasp0_fsx", |
181 | NULL, NULL, NULL, NULL), | 181 | NULL, NULL, "uart2_rtsn", NULL), |
182 | _AM33XX_MUXENTRY(LCD_DATA10, 0, | 182 | _AM33XX_MUXENTRY(LCD_DATA10, 0, |
183 | "lcd_data10", "gpmc_a14", NULL, "mcasp0_axr0", | 183 | "lcd_data10", "gpmc_a14", NULL, "mcasp0_axr0", |
184 | NULL, NULL, NULL, NULL), | 184 | NULL, NULL, NULL, NULL), |
185 | _AM33XX_MUXENTRY(LCD_DATA11, 0, | 185 | _AM33XX_MUXENTRY(LCD_DATA11, 0, |
186 | "lcd_data11", "gpmc_a15", NULL, "mcasp0_ahclkr", | 186 | "lcd_data11", "gpmc_a15", NULL, "mcasp0_ahclkr", |
187 | "mcasp0_axr2", NULL, NULL, NULL), | 187 | "mcasp0_axr2", NULL, NULL, NULL), |
188 | _AM33XX_MUXENTRY(LCD_DATA12, 0, | 188 | _AM33XX_MUXENTRY(LCD_DATA12, 0, |
189 | "lcd_data12", "gpmc_a16", NULL, "mcasp0_aclkr", | 189 | "lcd_data12", "gpmc_a16", NULL, "mcasp0_aclkr", |
190 | "mcasp0_axr2", NULL, NULL, NULL), | 190 | "mcasp0_axr2", NULL, NULL, NULL), |
191 | _AM33XX_MUXENTRY(LCD_DATA13, 0, | 191 | _AM33XX_MUXENTRY(LCD_DATA13, 0, |
192 | "lcd_data13", "gpmc_a17", NULL, "mcasp0_fsr", | 192 | "lcd_data13", "gpmc_a17", NULL, "mcasp0_fsr", |
193 | "mcasp0_axr3", NULL, NULL, NULL), | 193 | "mcasp0_axr3", NULL, NULL, NULL), |
194 | _AM33XX_MUXENTRY(LCD_DATA14, 0, | 194 | _AM33XX_MUXENTRY(LCD_DATA14, 0, |
195 | "lcd_data14", "gpmc_a18", NULL, "mcasp0_axr1", | 195 | "lcd_data14", "gpmc_a18", NULL, "mcasp0_axr1", |
196 | NULL, NULL, NULL, NULL), | 196 | NULL, NULL, NULL, NULL), |
197 | _AM33XX_MUXENTRY(LCD_DATA15, 0, | 197 | _AM33XX_MUXENTRY(LCD_DATA15, 0, |
198 | "lcd_data15", "gpmc_a19", NULL, "mcasp0_ahclkx", | 198 | "lcd_data15", "gpmc_a19", NULL, "mcasp0_ahclkx", |
199 | "mcasp0_axr3", NULL, NULL, NULL), | 199 | "mcasp0_axr3", NULL, NULL, NULL), |
200 | _AM33XX_MUXENTRY(LCD_VSYNC, 0, | 200 | _AM33XX_MUXENTRY(LCD_VSYNC, 0, |
201 | "lcd_vsync", NULL, NULL, NULL, | 201 | "lcd_vsync", NULL, NULL, NULL, |
202 | NULL, NULL, NULL, NULL), | 202 | NULL, NULL, NULL, NULL), |
203 | _AM33XX_MUXENTRY(LCD_HSYNC, 0, | 203 | _AM33XX_MUXENTRY(LCD_HSYNC, 0, |
204 | "lcd_hsync", NULL, NULL, NULL, | 204 | "lcd_hsync", NULL, NULL, NULL, |
205 | NULL, NULL, NULL, NULL), | 205 | NULL, NULL, NULL, NULL), |
206 | _AM33XX_MUXENTRY(LCD_PCLK, 0, | 206 | _AM33XX_MUXENTRY(LCD_PCLK, 0, |
207 | "lcd_pclk", NULL, NULL, NULL, | 207 | "lcd_pclk", NULL, NULL, NULL, |
208 | NULL, NULL, NULL, NULL), | 208 | NULL, NULL, NULL, NULL), |
209 | _AM33XX_MUXENTRY(LCD_AC_BIAS_EN, 0, | 209 | _AM33XX_MUXENTRY(LCD_AC_BIAS_EN, 0, |
210 | "lcd_ac_bias_en", NULL, NULL, NULL, | 210 | "lcd_ac_bias_en", NULL, NULL, NULL, |
211 | NULL, NULL, NULL, "gpio2_25"), | 211 | NULL, NULL, NULL, "gpio2_25"), |
212 | _AM33XX_MUXENTRY(GPMC_CLK, 0, | 212 | _AM33XX_MUXENTRY(GPMC_CLK, 0, |
213 | "gpmc_clk", "lcd_memory_clk_mux", NULL, NULL, | 213 | "gpmc_clk", "lcd_memory_clk_mux", NULL, NULL, |
214 | NULL, NULL, NULL, NULL), | 214 | NULL, NULL, NULL, NULL), |
215 | _AM33XX_MUXENTRY(MMC0_DAT3, 0, | 215 | _AM33XX_MUXENTRY(MMC0_DAT3, 0, |
216 | "mmc0_dat3", NULL, NULL, NULL, | 216 | "mmc0_dat3", NULL, NULL, NULL, |
217 | NULL, NULL, NULL, NULL), | 217 | NULL, NULL, NULL, NULL), |
218 | _AM33XX_MUXENTRY(MMC0_DAT2, 0, | 218 | _AM33XX_MUXENTRY(MMC0_DAT2, 0, |
219 | "mmc0_dat2", NULL, NULL, NULL, | 219 | "mmc0_dat2", NULL, NULL, NULL, |
220 | NULL, NULL, NULL, NULL), | 220 | NULL, NULL, NULL, NULL), |
221 | _AM33XX_MUXENTRY(MMC0_DAT1, 0, | 221 | _AM33XX_MUXENTRY(MMC0_DAT1, 0, |
222 | "mmc0_dat1", NULL, NULL, NULL, | 222 | "mmc0_dat1", NULL, NULL, NULL, |
223 | NULL, NULL, NULL, NULL), | 223 | NULL, NULL, NULL, NULL), |
224 | _AM33XX_MUXENTRY(MMC0_DAT0, 0, | 224 | _AM33XX_MUXENTRY(MMC0_DAT0, 0, |
225 | "mmc0_dat0", NULL, NULL, NULL, | 225 | "mmc0_dat0", NULL, NULL, NULL, |
226 | NULL, NULL, NULL, NULL), | 226 | NULL, NULL, NULL, NULL), |
227 | _AM33XX_MUXENTRY(MMC0_CLK, 0, | 227 | _AM33XX_MUXENTRY(MMC0_CLK, 0, |
228 | "mmc0_clk", NULL, NULL, NULL, | 228 | "mmc0_clk", NULL, NULL, NULL, |
229 | NULL, NULL, NULL, NULL), | 229 | NULL, NULL, NULL, NULL), |
230 | _AM33XX_MUXENTRY(MMC0_CMD, 0, | 230 | _AM33XX_MUXENTRY(MMC0_CMD, 0, |
231 | "mmc0_cmd", NULL, NULL, NULL, | 231 | "mmc0_cmd", NULL, NULL, NULL, |
232 | NULL, NULL, NULL, NULL), | 232 | NULL, NULL, NULL, NULL), |
233 | _AM33XX_MUXENTRY(MII1_COL, 0, | 233 | _AM33XX_MUXENTRY(MII1_COL, 0, |
234 | "mii1_col", "rmii2_refclk", "spi1_sclk", NULL, | 234 | "mii1_col", "rmii2_refclk", "spi1_sclk", NULL, |
235 | "mcasp1_axr2", "mmc2_dat3", "mcasp0_axr2", NULL), | 235 | "mcasp1_axr2", "mmc2_dat3", "mcasp0_axr2", NULL), |
236 | _AM33XX_MUXENTRY(MII1_CRS, 0, | 236 | _AM33XX_MUXENTRY(MII1_CRS, 0, |
237 | "mii1_crs", "rmii1_crs_dv", "spi1_d0", NULL, | 237 | "mii1_crs", "rmii1_crs_dv", "spi1_d0", NULL, |
238 | "mcasp1_aclkx", NULL, NULL, NULL), | 238 | "mcasp1_aclkx", NULL, NULL, NULL), |
239 | _AM33XX_MUXENTRY(MII1_RXERR, 0, | 239 | _AM33XX_MUXENTRY(MII1_RXERR, 0, |
240 | "mii1_rxerr", "rmii1_rxerr", "spi1_d1", NULL, | 240 | "mii1_rxerr", "rmii1_rxerr", "spi1_d1", NULL, |
241 | "mcasp1_fsx", NULL, NULL, NULL), | 241 | "mcasp1_fsx", NULL, NULL, NULL), |
242 | _AM33XX_MUXENTRY(MII1_TXEN, 0, | 242 | _AM33XX_MUXENTRY(MII1_TXEN, 0, |
243 | "mii1_txen", "rmii1_txen", "rgmii1_tctl", NULL, | 243 | "mii1_txen", "rmii1_txen", "rgmii1_tctl", NULL, |
244 | "mcasp1_axr0", NULL, "mmc2_cmd", NULL), | 244 | "mcasp1_axr0", NULL, "mmc2_cmd", NULL), |
245 | _AM33XX_MUXENTRY(MII1_RXDV, 0, | 245 | _AM33XX_MUXENTRY(MII1_RXDV, 0, |
246 | "mii1_rxdv", NULL, "rgmii1_rctl", NULL, | 246 | "mii1_rxdv", NULL, "rgmii1_rctl", NULL, |
247 | "mcasp1_aclx", "mmc2_dat0", "mcasp0_aclkr", NULL), | 247 | "mcasp1_aclx", "mmc2_dat0", "mcasp0_aclkr", NULL), |
248 | _AM33XX_MUXENTRY(MII1_TXD3, 0, | 248 | _AM33XX_MUXENTRY(MII1_TXD3, 0, |
249 | "mii1_txd3", NULL, "rgmii1_td3", NULL, | 249 | "mii1_txd3", NULL, "rgmii1_td3", NULL, |
250 | "mcasp1_fsx", "mmc2_dat1", "mcasp0_fsr", NULL), | 250 | "mcasp1_fsx", "mmc2_dat1", "mcasp0_fsr", NULL), |
251 | _AM33XX_MUXENTRY(MII1_TXD2, 0, | 251 | _AM33XX_MUXENTRY(MII1_TXD2, 0, |
252 | "mii1_txd2", NULL, "rgmii1_td2", NULL, | 252 | "mii1_txd2", NULL, "rgmii1_td2", NULL, |
253 | "mcasp1_axr0", "mmc2_dat2", "mcasp0_ahclkx", NULL), | 253 | "mcasp1_axr0", "mmc2_dat2", "mcasp0_ahclkx", NULL), |
254 | _AM33XX_MUXENTRY(MII1_TXD1, 0, | 254 | _AM33XX_MUXENTRY(MII1_TXD1, 0, |
255 | "mii1_txd1", "rmii1_txd1", "rgmii1_td1", "mcasp1_fsr", | 255 | "mii1_txd1", "rmii1_txd1", "rgmii1_td1", "mcasp1_fsr", |
256 | "mcasp1_axr1", NULL, "mmc1_cmd", NULL), | 256 | "mcasp1_axr1", NULL, "mmc1_cmd", NULL), |
257 | _AM33XX_MUXENTRY(MII1_TXD0, 0, | 257 | _AM33XX_MUXENTRY(MII1_TXD0, 0, |
258 | "mii1_txd0", "rmii1_txd0", "rgmii1_td0", "mcasp1_axr2", | 258 | "mii1_txd0", "rmii1_txd0", "rgmii1_td0", "mcasp1_axr2", |
259 | "mcasp1_aclkr", NULL, "mmc1_clk", NULL), | 259 | "mcasp1_aclkr", NULL, "mmc1_clk", NULL), |
260 | _AM33XX_MUXENTRY(MII1_TXCLK, 0, | 260 | _AM33XX_MUXENTRY(MII1_TXCLK, 0, |
261 | "mii1_txclk", NULL, "rgmii1_tclk", "mmc0_dat7", | 261 | "mii1_txclk", NULL, "rgmii1_tclk", "mmc0_dat7", |
262 | "mmc1_dat0", NULL, "mcasp0_aclkx", NULL), | 262 | "mmc1_dat0", NULL, "mcasp0_aclkx", NULL), |
263 | _AM33XX_MUXENTRY(MII1_RXCLK, 0, | 263 | _AM33XX_MUXENTRY(MII1_RXCLK, 0, |
264 | "mii1_rxclk", NULL, "rgmii1_rclk", "mmc0_dat6", | 264 | "mii1_rxclk", NULL, "rgmii1_rclk", "mmc0_dat6", |
265 | "mmc1_dat1", NULL, "mcasp0_fsx", NULL), | 265 | "mmc1_dat1", NULL, "mcasp0_fsx", NULL), |
266 | _AM33XX_MUXENTRY(MII1_RXD3, 0, | 266 | _AM33XX_MUXENTRY(MII1_RXD3, 0, |
267 | "mii1_rxd3", NULL, "rgmii1_rd3", "mmc0_dat5", | 267 | "mii1_rxd3", NULL, "rgmii1_rd3", "mmc0_dat5", |
268 | "mmc1_dat2", NULL, "mcasp0_axr0", NULL), | 268 | "mmc1_dat2", NULL, "mcasp0_axr0", NULL), |
269 | _AM33XX_MUXENTRY(MII1_RXD2, 0, | 269 | _AM33XX_MUXENTRY(MII1_RXD2, 0, |
270 | "mii1_rxd2", NULL, "rgmii1_rd2", "mmc0_dat4", | 270 | "mii1_rxd2", NULL, "rgmii1_rd2", "mmc0_dat4", |
271 | "mmc1_dat3", NULL, "mcasp0_axr1", NULL), | 271 | "mmc1_dat3", NULL, "mcasp0_axr1", NULL), |
272 | _AM33XX_MUXENTRY(MII1_RXD1, 0, | 272 | _AM33XX_MUXENTRY(MII1_RXD1, 0, |
273 | "mii1_rxd1", "rmii1_rxd1", "rgmii1_rd1", "mcasp1_axr3", | 273 | "mii1_rxd1", "rmii1_rxd1", "rgmii1_rd1", "mcasp1_axr3", |
274 | "mcasp1_fsr", NULL, "mmc2_clk", NULL), | 274 | "mcasp1_fsr", NULL, "mmc2_clk", NULL), |
275 | _AM33XX_MUXENTRY(MII1_RXD0, 0, | 275 | _AM33XX_MUXENTRY(MII1_RXD0, 0, |
276 | "mii1_rxd0", "rmii1_rxd0", "rgmii1_rd0", "mcasp1_ahclkx", | 276 | "mii1_rxd0", "rmii1_rxd0", "rgmii1_rd0", "mcasp1_ahclkx", |
277 | "mcasp1_ahclkr", "mcasp1_aclkr", "mcasp0_axr3", NULL), | 277 | "mcasp1_ahclkr", "mcasp1_aclkr", "mcasp0_axr3", NULL), |
278 | _AM33XX_MUXENTRY(MII1_REFCLK, 0, | 278 | _AM33XX_MUXENTRY(MII1_REFCLK, 0, |
279 | "rmii1_refclk", NULL, "spi1_cs0", NULL, | 279 | "rmii1_refclk", NULL, "spi1_cs0", NULL, |
280 | "mcasp1_axr3", "mmc0_pow", "mcasp1_ahclkx", NULL), | 280 | "mcasp1_axr3", "mmc0_pow", "mcasp1_ahclkx", NULL), |
281 | _AM33XX_MUXENTRY(MDIO_DATA, 0, | 281 | _AM33XX_MUXENTRY(MDIO_DATA, 0, |
282 | "mdio_data", NULL, NULL, NULL, | 282 | "mdio_data", NULL, NULL, NULL, |
283 | "mmc0_sdcd", "mmc1_cmd", "mmc2_cmd", NULL), | 283 | "mmc0_sdcd", "mmc1_cmd", "mmc2_cmd", NULL), |
284 | _AM33XX_MUXENTRY(MDIO_CLK, 0, | 284 | _AM33XX_MUXENTRY(MDIO_CLK, 0, |
285 | "mdio_clk", NULL, NULL, NULL, | 285 | "mdio_clk", NULL, NULL, NULL, |
286 | "mmc0_sdwp", "mmc1_clk", "mmc2_clk", NULL), | 286 | "mmc0_sdwp", "mmc1_clk", "mmc2_clk", NULL), |
287 | _AM33XX_MUXENTRY(SPI0_SCLK, 0, | 287 | _AM33XX_MUXENTRY(SPI0_SCLK, 0, |
288 | "spi0_sclk", NULL, NULL, NULL, | 288 | "spi0_sclk", "uart2_rxd", NULL, NULL, |
289 | NULL, NULL, NULL, "gpio0_2"), | 289 | NULL, NULL, NULL, "gpio0_2"), |
290 | _AM33XX_MUXENTRY(SPI0_D0, 0, | 290 | _AM33XX_MUXENTRY(SPI0_D0, 0, |
291 | "spi0_d0", NULL, NULL, NULL, | 291 | "spi0_d0", "uart2_txd", NULL, NULL, |
292 | NULL, NULL, NULL, "gpio0_3"), | 292 | NULL, NULL, NULL, "gpio0_3"), |
293 | _AM33XX_MUXENTRY(SPI0_D1, 0, | 293 | _AM33XX_MUXENTRY(SPI0_D1, 0, |
294 | "spi0_d1", "mmc1_sdwp", "i2c1_sda", NULL, | 294 | "spi0_d1", "mmc1_sdwp", "i2c1_sda", NULL, |
295 | NULL, NULL, NULL, NULL), | 295 | NULL, NULL, NULL, NULL), |
296 | _AM33XX_MUXENTRY(SPI0_CS0, 0, | 296 | _AM33XX_MUXENTRY(SPI0_CS0, 0, |
297 | "spi0_cs0", "mmc2_sdwp", "i2c1_scl", NULL, | 297 | "spi0_cs0", "mmc2_sdwp", "i2c1_scl", NULL, |
298 | NULL, NULL, NULL, NULL), | 298 | NULL, NULL, NULL, NULL), |
299 | _AM33XX_MUXENTRY(SPI0_CS1, 0, | 299 | _AM33XX_MUXENTRY(SPI0_CS1, 0, |
300 | "spi0_cs1", "uart3_rxd", NULL, "mmc0_pow", | 300 | "spi0_cs1", "uart3_rxd", NULL, "mmc0_pow", |
301 | NULL, "mmc0_sdcd", NULL, NULL), | 301 | NULL, "mmc0_sdcd", NULL, NULL), |
302 | _AM33XX_MUXENTRY(ECAP0_IN_PWM0_OUT, 0, | 302 | _AM33XX_MUXENTRY(ECAP0_IN_PWM0_OUT, 0, |
303 | "ecap0_in_pwm0_out", "uart3_txd", "spi1_cs1", NULL, | 303 | "ecap0_in_pwm0_out", "uart3_txd", "spi1_cs1", NULL, |
304 | "spi1_sclk", "mmc0_sdwp", NULL, "gpio0_7"), | 304 | "spi1_sclk", "mmc0_sdwp", NULL, "gpio0_7"), |
305 | _AM33XX_MUXENTRY(UART0_CTSN, 0, | 305 | _AM33XX_MUXENTRY(UART0_CTSN, 0, |
306 | "uart0_ctsn", NULL, "d_can1_tx", NULL, | 306 | "uart0_ctsn", NULL, "d_can1_tx", NULL, |
307 | "spi1_d0", NULL, NULL, NULL), | 307 | "spi1_d0", NULL, NULL, NULL), |
308 | _AM33XX_MUXENTRY(UART0_RTSN, 0, | 308 | _AM33XX_MUXENTRY(UART0_RTSN, 0, |
309 | "uart0_rtsn", NULL, "d_can1_rx", NULL, | 309 | "uart0_rtsn", NULL, "d_can1_rx", NULL, |
310 | "spi1_d1", "spi1_cs0", NULL, NULL), | 310 | "spi1_d1", "spi1_cs0", NULL, NULL), |
311 | _AM33XX_MUXENTRY(UART0_RXD, 0, | 311 | _AM33XX_MUXENTRY(UART0_RXD, 0, |
312 | "uart0_rxd", "spi1_cs0", "d_can0_tx", NULL, | 312 | "uart0_rxd", "spi1_cs0", "d_can0_tx", NULL, |
313 | NULL, NULL, NULL, NULL), | 313 | NULL, NULL, NULL, NULL), |
314 | _AM33XX_MUXENTRY(UART0_TXD, 0, | 314 | _AM33XX_MUXENTRY(UART0_TXD, 0, |
315 | "uart0_txd", "spi1_cs1", "d_can0_rx", NULL, | 315 | "uart0_txd", "spi1_cs1", "d_can0_rx", NULL, |
316 | NULL, NULL, NULL, NULL), | 316 | NULL, NULL, NULL, NULL), |
317 | _AM33XX_MUXENTRY(UART1_CTSN, 0, | 317 | _AM33XX_MUXENTRY(UART1_CTSN, 0, |
318 | "uart1_ctsn", NULL, NULL, NULL, | 318 | "uart1_ctsn", NULL, NULL, NULL, |
319 | "spi1_cs0", NULL, NULL, NULL), | 319 | "spi1_cs0", NULL, NULL, NULL), |
320 | _AM33XX_MUXENTRY(UART1_RTSN, 0, | 320 | _AM33XX_MUXENTRY(UART1_RTSN, 0, |
321 | "uart1_rtsn", NULL, NULL, NULL, | 321 | "uart1_rtsn", NULL, NULL, NULL, |
322 | "spi1_cs1", NULL, NULL, NULL), | 322 | "spi1_cs1", NULL, NULL, NULL), |
323 | _AM33XX_MUXENTRY(UART1_RXD, 0, | 323 | _AM33XX_MUXENTRY(UART1_RXD, 0, |
324 | "uart1_rxd", "mmc1_sdwp", NULL, NULL, | 324 | "uart1_rxd", "mmc1_sdwp", NULL, NULL, |
325 | NULL, "pr1_uart0_rxd_mux1", NULL, NULL), | 325 | NULL, "pr1_uart0_rxd_mux1", NULL, NULL), |
326 | _AM33XX_MUXENTRY(UART1_TXD, 0, | 326 | _AM33XX_MUXENTRY(UART1_TXD, 0, |
327 | "uart1_txd", "mmc2_sdwp", NULL, NULL, | 327 | "uart1_txd", "mmc2_sdwp", NULL, NULL, |
328 | NULL, "pr1_uart0_txd_mux1", NULL, NULL), | 328 | NULL, "pr1_uart0_txd_mux1", NULL, NULL), |
329 | _AM33XX_MUXENTRY(I2C0_SDA, 0, | 329 | _AM33XX_MUXENTRY(I2C0_SDA, 0, |
330 | "i2c0_sda", NULL, NULL, NULL, | 330 | "i2c0_sda", NULL, NULL, NULL, |
331 | NULL, NULL, NULL, NULL), | 331 | NULL, NULL, NULL, NULL), |
332 | _AM33XX_MUXENTRY(I2C0_SCL, 0, | 332 | _AM33XX_MUXENTRY(I2C0_SCL, 0, |
333 | "i2c0_scl", NULL, NULL, NULL, | 333 | "i2c0_scl", NULL, NULL, NULL, |
334 | NULL, NULL, NULL, NULL), | 334 | NULL, NULL, NULL, NULL), |
335 | _AM33XX_MUXENTRY(MCASP0_ACLKX, 0, | 335 | _AM33XX_MUXENTRY(MCASP0_ACLKX, 0, |
336 | "mcasp0_aclkx", NULL, NULL, "spi1_sclk", | 336 | "mcasp0_aclkx", NULL, NULL, "spi1_sclk", |
337 | "mmc0_sdcd", NULL, NULL, NULL), | 337 | "mmc0_sdcd", NULL, NULL, NULL), |
338 | _AM33XX_MUXENTRY(MCASP0_FSX, 0, | 338 | _AM33XX_MUXENTRY(MCASP0_FSX, 0, |
339 | "mcasp0_fsx", NULL, NULL, "spi1_d0", | 339 | "mcasp0_fsx", NULL, NULL, "spi1_d0", |
340 | "mmc1_sdcd", NULL, NULL, NULL), | 340 | "mmc1_sdcd", NULL, NULL, NULL), |
341 | _AM33XX_MUXENTRY(MCASP0_AXR0, 0, | 341 | _AM33XX_MUXENTRY(MCASP0_AXR0, 0, |
342 | "mcasp0_axr0", NULL, NULL, "spi1_d1", | 342 | "mcasp0_axr0", NULL, NULL, "spi1_d1", |
343 | "mmc2_sdcd", NULL, NULL, NULL), | 343 | "mmc2_sdcd", NULL, NULL, NULL), |
344 | _AM33XX_MUXENTRY(MCASP0_AHCLKR, 0, | 344 | _AM33XX_MUXENTRY(MCASP0_AHCLKR, 0, |
345 | "mcasp0_ahclkr", NULL, "mcasp0_axr2", "spi1_cs0", | 345 | "mcasp0_ahclkr", NULL, "mcasp0_axr2", "spi1_cs0", |
346 | NULL, NULL, NULL, "gpio3_17"), | 346 | NULL, NULL, NULL, "gpio3_17"), |
347 | _AM33XX_MUXENTRY(MCASP0_ACLKR, 0, | 347 | _AM33XX_MUXENTRY(MCASP0_ACLKR, 0, |
348 | "mcasp0_aclkr", NULL, "mcasp0_axr2", "mcasp1_aclkx", | 348 | "mcasp0_aclkr", NULL, "mcasp0_axr2", "mcasp1_aclkx", |
349 | "mmc0_sdwp", NULL, NULL, NULL), | 349 | "mmc0_sdwp", NULL, NULL, NULL), |
350 | _AM33XX_MUXENTRY(MCASP0_FSR, 0, | 350 | _AM33XX_MUXENTRY(MCASP0_FSR, 0, |
351 | "mcasp0_fsr", NULL, "mcasp0_axr3", "mcasp1_fsx", | 351 | "mcasp0_fsr", NULL, "mcasp0_axr3", "mcasp1_fsx", |
352 | NULL, "pr1_pru0_pru_r30_5", NULL, NULL), | 352 | NULL, "pr1_pru0_pru_r30_5", NULL, NULL), |
353 | _AM33XX_MUXENTRY(MCASP0_AXR1, 0, | 353 | _AM33XX_MUXENTRY(MCASP0_AXR1, 0, |
354 | "mcasp0_axr1", NULL, NULL, "mcasp1_axr0", | 354 | "mcasp0_axr1", NULL, NULL, "mcasp1_axr0", |
355 | NULL, NULL, NULL, NULL), | 355 | NULL, NULL, NULL, NULL), |
356 | _AM33XX_MUXENTRY(MCASP0_AHCLKX, 0, | 356 | _AM33XX_MUXENTRY(MCASP0_AHCLKX, 0, |
357 | "mcasp0_ahclkx", "mcasp0_axr3", NULL, "mcasp1_axr1", | 357 | "mcasp0_ahclkx", "mcasp0_axr3", NULL, "mcasp1_axr1", |
358 | NULL, NULL, NULL, "gpio3_21"), | 358 | NULL, NULL, NULL, "gpio3_21"), |
359 | _AM33XX_MUXENTRY(XDMA_EVENT_INTR0, 0, | 359 | _AM33XX_MUXENTRY(XDMA_EVENT_INTR0, 0, |
360 | "xdma_event_intr0", NULL, NULL, NULL, | 360 | "xdma_event_intr0", NULL, NULL, NULL, |
361 | "spi1_cs1", NULL, NULL, NULL), | 361 | "spi1_cs1", NULL, NULL, NULL), |
362 | _AM33XX_MUXENTRY(XDMA_EVENT_INTR1, 0, | 362 | _AM33XX_MUXENTRY(XDMA_EVENT_INTR1, 0, |
363 | "xdma_event_intr1", NULL, NULL, "clkout2", | 363 | "xdma_event_intr1", NULL, NULL, "clkout2", |
364 | NULL, NULL, NULL, NULL), | 364 | NULL, NULL, NULL, NULL), |
365 | _AM33XX_MUXENTRY(WARMRSTN, 0, | 365 | _AM33XX_MUXENTRY(WARMRSTN, 0, |
366 | NULL, NULL, NULL, NULL, | 366 | NULL, NULL, NULL, NULL, |
367 | NULL, NULL, NULL, NULL), | 367 | NULL, NULL, NULL, NULL), |
368 | _AM33XX_MUXENTRY(PWRONRSTN, 0, | 368 | _AM33XX_MUXENTRY(PWRONRSTN, 0, |
369 | NULL, NULL, NULL, NULL, | 369 | NULL, NULL, NULL, NULL, |
370 | NULL, NULL, NULL, NULL), | 370 | NULL, NULL, NULL, NULL), |
371 | _AM33XX_MUXENTRY(NMIN, 0, | 371 | _AM33XX_MUXENTRY(NMIN, 0, |
372 | NULL, NULL, NULL, NULL, | 372 | NULL, NULL, NULL, NULL, |
373 | NULL, NULL, NULL, NULL), | 373 | NULL, NULL, NULL, NULL), |
374 | _AM33XX_MUXENTRY(XTALIN, 0, | 374 | _AM33XX_MUXENTRY(XTALIN, 0, |
375 | NULL, NULL, NULL, NULL, | 375 | NULL, NULL, NULL, NULL, |
376 | NULL, NULL, NULL, NULL), | 376 | NULL, NULL, NULL, NULL), |
377 | _AM33XX_MUXENTRY(XTALOUT, 0, | 377 | _AM33XX_MUXENTRY(XTALOUT, 0, |
378 | NULL, NULL, NULL, NULL, | 378 | NULL, NULL, NULL, NULL, |
379 | NULL, NULL, NULL, NULL), | 379 | NULL, NULL, NULL, NULL), |
380 | _AM33XX_MUXENTRY(TMS, 0, | 380 | _AM33XX_MUXENTRY(TMS, 0, |
381 | NULL, NULL, NULL, NULL, | 381 | NULL, NULL, NULL, NULL, |
382 | NULL, NULL, NULL, NULL), | 382 | NULL, NULL, NULL, NULL), |
383 | _AM33XX_MUXENTRY(TDI, 0, | 383 | _AM33XX_MUXENTRY(TDI, 0, |
384 | NULL, NULL, NULL, NULL, | 384 | NULL, NULL, NULL, NULL, |
385 | NULL, NULL, NULL, NULL), | 385 | NULL, NULL, NULL, NULL), |
386 | _AM33XX_MUXENTRY(TDO, 0, | 386 | _AM33XX_MUXENTRY(TDO, 0, |
387 | NULL, NULL, NULL, NULL, | 387 | NULL, NULL, NULL, NULL, |
388 | NULL, NULL, NULL, NULL), | 388 | NULL, NULL, NULL, NULL), |
389 | _AM33XX_MUXENTRY(TCK, 0, | 389 | _AM33XX_MUXENTRY(TCK, 0, |
390 | NULL, NULL, NULL, NULL, | 390 | NULL, NULL, NULL, NULL, |
391 | NULL, NULL, NULL, NULL), | 391 | NULL, NULL, NULL, NULL), |
392 | _AM33XX_MUXENTRY(TRSTN, 0, | 392 | _AM33XX_MUXENTRY(TRSTN, 0, |
393 | NULL, NULL, NULL, NULL, | 393 | NULL, NULL, NULL, NULL, |
394 | NULL, NULL, NULL, NULL), | 394 | NULL, NULL, NULL, NULL), |
395 | _AM33XX_MUXENTRY(EMU0, 0, | 395 | _AM33XX_MUXENTRY(EMU0, 0, |
396 | NULL, NULL, NULL, NULL, | 396 | NULL, NULL, NULL, NULL, |
397 | NULL, NULL, NULL, NULL), | 397 | NULL, NULL, NULL, NULL), |
398 | _AM33XX_MUXENTRY(EMU1, 0, | 398 | _AM33XX_MUXENTRY(EMU1, 0, |
399 | NULL, NULL, NULL, NULL, | 399 | NULL, NULL, NULL, NULL, |
400 | NULL, NULL, NULL, NULL), | 400 | NULL, NULL, NULL, NULL), |
401 | _AM33XX_MUXENTRY(RTC_XTALIN, 0, | 401 | _AM33XX_MUXENTRY(RTC_XTALIN, 0, |
402 | NULL, NULL, NULL, NULL, | 402 | NULL, NULL, NULL, NULL, |
403 | NULL, NULL, NULL, NULL), | 403 | NULL, NULL, NULL, NULL), |
404 | _AM33XX_MUXENTRY(RTC_XTALOUT, 0, | 404 | _AM33XX_MUXENTRY(RTC_XTALOUT, 0, |
405 | NULL, NULL, NULL, NULL, | 405 | NULL, NULL, NULL, NULL, |
406 | NULL, NULL, NULL, NULL), | 406 | NULL, NULL, NULL, NULL), |
407 | _AM33XX_MUXENTRY(RTC_PWRONRSTN, 0, | 407 | _AM33XX_MUXENTRY(RTC_PWRONRSTN, 0, |
408 | NULL, NULL, NULL, NULL, | 408 | NULL, NULL, NULL, NULL, |
409 | NULL, NULL, NULL, NULL), | 409 | NULL, NULL, NULL, NULL), |
410 | _AM33XX_MUXENTRY(PMIC_POWER_EN, 0, | 410 | _AM33XX_MUXENTRY(PMIC_POWER_EN, 0, |
411 | NULL, NULL, NULL, NULL, | 411 | NULL, NULL, NULL, NULL, |
412 | NULL, NULL, NULL, NULL), | 412 | NULL, NULL, NULL, NULL), |
413 | _AM33XX_MUXENTRY(EXT_WAKEUP, 0, | 413 | _AM33XX_MUXENTRY(EXT_WAKEUP, 0, |
414 | NULL, NULL, NULL, NULL, | 414 | NULL, NULL, NULL, NULL, |
415 | NULL, NULL, NULL, NULL), | 415 | NULL, NULL, NULL, NULL), |
416 | _AM33XX_MUXENTRY(USB0_DRVVBUS, 0, | 416 | _AM33XX_MUXENTRY(USB0_DRVVBUS, 0, |
417 | "usb0_drvvbus", NULL, NULL, NULL, | 417 | "usb0_drvvbus", NULL, NULL, NULL, |
418 | NULL, NULL, NULL, NULL), | 418 | NULL, NULL, NULL, NULL), |
419 | _AM33XX_MUXENTRY(USB1_DRVVBUS, 0, | 419 | _AM33XX_MUXENTRY(USB1_DRVVBUS, 0, |
420 | "usb1_drvvbus", NULL, NULL, NULL, | 420 | "usb1_drvvbus", NULL, NULL, NULL, |
421 | NULL, NULL, NULL, NULL), | 421 | NULL, NULL, NULL, NULL), |
422 | _AM33XX_MUXENTRY(DDR_RESETN, 0, | 422 | _AM33XX_MUXENTRY(DDR_RESETN, 0, |
423 | NULL, NULL, NULL, NULL, | 423 | NULL, NULL, NULL, NULL, |
424 | NULL, NULL, NULL, NULL), | 424 | NULL, NULL, NULL, NULL), |
425 | _AM33XX_MUXENTRY(DDR_CSN0, 0, | 425 | _AM33XX_MUXENTRY(DDR_CSN0, 0, |
426 | NULL, NULL, NULL, NULL, | 426 | NULL, NULL, NULL, NULL, |
427 | NULL, NULL, NULL, NULL), | 427 | NULL, NULL, NULL, NULL), |
428 | _AM33XX_MUXENTRY(DDR_CKE, 0, | 428 | _AM33XX_MUXENTRY(DDR_CKE, 0, |
429 | NULL, NULL, NULL, NULL, | 429 | NULL, NULL, NULL, NULL, |
430 | NULL, NULL, NULL, NULL), | 430 | NULL, NULL, NULL, NULL), |
431 | _AM33XX_MUXENTRY(DDR_CK, 0, | 431 | _AM33XX_MUXENTRY(DDR_CK, 0, |
432 | NULL, NULL, NULL, NULL, | 432 | NULL, NULL, NULL, NULL, |
433 | NULL, NULL, NULL, NULL), | 433 | NULL, NULL, NULL, NULL), |
434 | _AM33XX_MUXENTRY(DDR_CKN, 0, | 434 | _AM33XX_MUXENTRY(DDR_CKN, 0, |
435 | NULL, NULL, NULL, NULL, | 435 | NULL, NULL, NULL, NULL, |
436 | NULL, NULL, NULL, NULL), | 436 | NULL, NULL, NULL, NULL), |
437 | _AM33XX_MUXENTRY(DDR_CASN, 0, | 437 | _AM33XX_MUXENTRY(DDR_CASN, 0, |
438 | NULL, NULL, NULL, NULL, | 438 | NULL, NULL, NULL, NULL, |
439 | NULL, NULL, NULL, NULL), | 439 | NULL, NULL, NULL, NULL), |
440 | _AM33XX_MUXENTRY(DDR_RASN, 0, | 440 | _AM33XX_MUXENTRY(DDR_RASN, 0, |
441 | NULL, NULL, NULL, NULL, | 441 | NULL, NULL, NULL, NULL, |
442 | NULL, NULL, NULL, NULL), | 442 | NULL, NULL, NULL, NULL), |
443 | _AM33XX_MUXENTRY(DDR_WEN, 0, | 443 | _AM33XX_MUXENTRY(DDR_WEN, 0, |
444 | NULL, NULL, NULL, NULL, | 444 | NULL, NULL, NULL, NULL, |
445 | NULL, NULL, NULL, NULL), | 445 | NULL, NULL, NULL, NULL), |
446 | _AM33XX_MUXENTRY(DDR_BA0, 0, | 446 | _AM33XX_MUXENTRY(DDR_BA0, 0, |
447 | NULL, NULL, NULL, NULL, | 447 | NULL, NULL, NULL, NULL, |
448 | NULL, NULL, NULL, NULL), | 448 | NULL, NULL, NULL, NULL), |
449 | _AM33XX_MUXENTRY(DDR_BA1, 0, | 449 | _AM33XX_MUXENTRY(DDR_BA1, 0, |
450 | NULL, NULL, NULL, NULL, | 450 | NULL, NULL, NULL, NULL, |
451 | NULL, NULL, NULL, NULL), | 451 | NULL, NULL, NULL, NULL), |
452 | _AM33XX_MUXENTRY(DDR_BA2, 0, | 452 | _AM33XX_MUXENTRY(DDR_BA2, 0, |
453 | NULL, NULL, NULL, NULL, | 453 | NULL, NULL, NULL, NULL, |
454 | NULL, NULL, NULL, NULL), | 454 | NULL, NULL, NULL, NULL), |
455 | _AM33XX_MUXENTRY(DDR_A0, 0, | 455 | _AM33XX_MUXENTRY(DDR_A0, 0, |
456 | NULL, NULL, NULL, NULL, | 456 | NULL, NULL, NULL, NULL, |
457 | NULL, NULL, NULL, NULL), | 457 | NULL, NULL, NULL, NULL), |
458 | _AM33XX_MUXENTRY(DDR_A1, 0, | 458 | _AM33XX_MUXENTRY(DDR_A1, 0, |
459 | NULL, NULL, NULL, NULL, | 459 | NULL, NULL, NULL, NULL, |
460 | NULL, NULL, NULL, NULL), | 460 | NULL, NULL, NULL, NULL), |
461 | _AM33XX_MUXENTRY(DDR_A2, 0, | 461 | _AM33XX_MUXENTRY(DDR_A2, 0, |
462 | NULL, NULL, NULL, NULL, | 462 | NULL, NULL, NULL, NULL, |
463 | NULL, NULL, NULL, NULL), | 463 | NULL, NULL, NULL, NULL), |
464 | _AM33XX_MUXENTRY(DDR_A3, 0, | 464 | _AM33XX_MUXENTRY(DDR_A3, 0, |
465 | NULL, NULL, NULL, NULL, | 465 | NULL, NULL, NULL, NULL, |
466 | NULL, NULL, NULL, NULL), | 466 | NULL, NULL, NULL, NULL), |
467 | _AM33XX_MUXENTRY(DDR_A4, 0, | 467 | _AM33XX_MUXENTRY(DDR_A4, 0, |
468 | NULL, NULL, NULL, NULL, | 468 | NULL, NULL, NULL, NULL, |
469 | NULL, NULL, NULL, NULL), | 469 | NULL, NULL, NULL, NULL), |
470 | _AM33XX_MUXENTRY(DDR_A5, 0, | 470 | _AM33XX_MUXENTRY(DDR_A5, 0, |
471 | NULL, NULL, NULL, NULL, | 471 | NULL, NULL, NULL, NULL, |
472 | NULL, NULL, NULL, NULL), | 472 | NULL, NULL, NULL, NULL), |
473 | _AM33XX_MUXENTRY(DDR_A6, 0, | 473 | _AM33XX_MUXENTRY(DDR_A6, 0, |
474 | NULL, NULL, NULL, NULL, | 474 | NULL, NULL, NULL, NULL, |
475 | NULL, NULL, NULL, NULL), | 475 | NULL, NULL, NULL, NULL), |
476 | _AM33XX_MUXENTRY(DDR_A7, 0, | 476 | _AM33XX_MUXENTRY(DDR_A7, 0, |
477 | NULL, NULL, NULL, NULL, | 477 | NULL, NULL, NULL, NULL, |
478 | NULL, NULL, NULL, NULL), | 478 | NULL, NULL, NULL, NULL), |
479 | _AM33XX_MUXENTRY(DDR_A8, 0, | 479 | _AM33XX_MUXENTRY(DDR_A8, 0, |
480 | NULL, NULL, NULL, NULL, | 480 | NULL, NULL, NULL, NULL, |
481 | NULL, NULL, NULL, NULL), | 481 | NULL, NULL, NULL, NULL), |
482 | _AM33XX_MUXENTRY(DDR_A9, 0, | 482 | _AM33XX_MUXENTRY(DDR_A9, 0, |
483 | NULL, NULL, NULL, NULL, | 483 | NULL, NULL, NULL, NULL, |
484 | NULL, NULL, NULL, NULL), | 484 | NULL, NULL, NULL, NULL), |
485 | _AM33XX_MUXENTRY(DDR_A10, 0, | 485 | _AM33XX_MUXENTRY(DDR_A10, 0, |
486 | NULL, NULL, NULL, NULL, | 486 | NULL, NULL, NULL, NULL, |
487 | NULL, NULL, NULL, NULL), | 487 | NULL, NULL, NULL, NULL), |
488 | _AM33XX_MUXENTRY(DDR_A11, 0, | 488 | _AM33XX_MUXENTRY(DDR_A11, 0, |
489 | NULL, NULL, NULL, NULL, | 489 | NULL, NULL, NULL, NULL, |
490 | NULL, NULL, NULL, NULL), | 490 | NULL, NULL, NULL, NULL), |
491 | _AM33XX_MUXENTRY(DDR_A12, 0, | 491 | _AM33XX_MUXENTRY(DDR_A12, 0, |
492 | NULL, NULL, NULL, NULL, | 492 | NULL, NULL, NULL, NULL, |
493 | NULL, NULL, NULL, NULL), | 493 | NULL, NULL, NULL, NULL), |
494 | _AM33XX_MUXENTRY(DDR_A13, 0, | 494 | _AM33XX_MUXENTRY(DDR_A13, 0, |
495 | NULL, NULL, NULL, NULL, | 495 | NULL, NULL, NULL, NULL, |
496 | NULL, NULL, NULL, NULL), | 496 | NULL, NULL, NULL, NULL), |
497 | _AM33XX_MUXENTRY(DDR_A14, 0, | 497 | _AM33XX_MUXENTRY(DDR_A14, 0, |
498 | NULL, NULL, NULL, NULL, | 498 | NULL, NULL, NULL, NULL, |
499 | NULL, NULL, NULL, NULL), | 499 | NULL, NULL, NULL, NULL), |
500 | _AM33XX_MUXENTRY(DDR_A15, 0, | 500 | _AM33XX_MUXENTRY(DDR_A15, 0, |
501 | NULL, NULL, NULL, NULL, | 501 | NULL, NULL, NULL, NULL, |
502 | NULL, NULL, NULL, NULL), | 502 | NULL, NULL, NULL, NULL), |
503 | _AM33XX_MUXENTRY(DDR_ODT, 0, | 503 | _AM33XX_MUXENTRY(DDR_ODT, 0, |
504 | NULL, NULL, NULL, NULL, | 504 | NULL, NULL, NULL, NULL, |
505 | NULL, NULL, NULL, NULL), | 505 | NULL, NULL, NULL, NULL), |
506 | _AM33XX_MUXENTRY(DDR_D0, 0, | 506 | _AM33XX_MUXENTRY(DDR_D0, 0, |
507 | NULL, NULL, NULL, NULL, | 507 | NULL, NULL, NULL, NULL, |
508 | NULL, NULL, NULL, NULL), | 508 | NULL, NULL, NULL, NULL), |
509 | _AM33XX_MUXENTRY(DDR_D1, 0, | 509 | _AM33XX_MUXENTRY(DDR_D1, 0, |
510 | NULL, NULL, NULL, NULL, | 510 | NULL, NULL, NULL, NULL, |
511 | NULL, NULL, NULL, NULL), | 511 | NULL, NULL, NULL, NULL), |
512 | _AM33XX_MUXENTRY(DDR_D2, 0, | 512 | _AM33XX_MUXENTRY(DDR_D2, 0, |
513 | NULL, NULL, NULL, NULL, | 513 | NULL, NULL, NULL, NULL, |
514 | NULL, NULL, NULL, NULL), | 514 | NULL, NULL, NULL, NULL), |
515 | _AM33XX_MUXENTRY(DDR_D3, 0, | 515 | _AM33XX_MUXENTRY(DDR_D3, 0, |
516 | NULL, NULL, NULL, NULL, | 516 | NULL, NULL, NULL, NULL, |
517 | NULL, NULL, NULL, NULL), | 517 | NULL, NULL, NULL, NULL), |
518 | _AM33XX_MUXENTRY(DDR_D4, 0, | 518 | _AM33XX_MUXENTRY(DDR_D4, 0, |
519 | NULL, NULL, NULL, NULL, | 519 | NULL, NULL, NULL, NULL, |
520 | NULL, NULL, NULL, NULL), | 520 | NULL, NULL, NULL, NULL), |
521 | _AM33XX_MUXENTRY(DDR_D5, 0, | 521 | _AM33XX_MUXENTRY(DDR_D5, 0, |
522 | NULL, NULL, NULL, NULL, | 522 | NULL, NULL, NULL, NULL, |
523 | NULL, NULL, NULL, NULL), | 523 | NULL, NULL, NULL, NULL), |
524 | _AM33XX_MUXENTRY(DDR_D6, 0, | 524 | _AM33XX_MUXENTRY(DDR_D6, 0, |
525 | NULL, NULL, NULL, NULL, | 525 | NULL, NULL, NULL, NULL, |
526 | NULL, NULL, NULL, NULL), | 526 | NULL, NULL, NULL, NULL), |
527 | _AM33XX_MUXENTRY(DDR_D7, 0, | 527 | _AM33XX_MUXENTRY(DDR_D7, 0, |
528 | NULL, NULL, NULL, NULL, | 528 | NULL, NULL, NULL, NULL, |
529 | NULL, NULL, NULL, NULL), | 529 | NULL, NULL, NULL, NULL), |
530 | _AM33XX_MUXENTRY(DDR_D8, 0, | 530 | _AM33XX_MUXENTRY(DDR_D8, 0, |
531 | NULL, NULL, NULL, NULL, | 531 | NULL, NULL, NULL, NULL, |
532 | NULL, NULL, NULL, NULL), | 532 | NULL, NULL, NULL, NULL), |
533 | _AM33XX_MUXENTRY(DDR_D9, 0, | 533 | _AM33XX_MUXENTRY(DDR_D9, 0, |
534 | NULL, NULL, NULL, NULL, | 534 | NULL, NULL, NULL, NULL, |
535 | NULL, NULL, NULL, NULL), | 535 | NULL, NULL, NULL, NULL), |
536 | _AM33XX_MUXENTRY(DDR_D10, 0, | 536 | _AM33XX_MUXENTRY(DDR_D10, 0, |
537 | NULL, NULL, NULL, NULL, | 537 | NULL, NULL, NULL, NULL, |
538 | NULL, NULL, NULL, NULL), | 538 | NULL, NULL, NULL, NULL), |
539 | _AM33XX_MUXENTRY(DDR_D11, 0, | 539 | _AM33XX_MUXENTRY(DDR_D11, 0, |
540 | NULL, NULL, NULL, NULL, | 540 | NULL, NULL, NULL, NULL, |
541 | NULL, NULL, NULL, NULL), | 541 | NULL, NULL, NULL, NULL), |
542 | _AM33XX_MUXENTRY(DDR_D12, 0, | 542 | _AM33XX_MUXENTRY(DDR_D12, 0, |
543 | NULL, NULL, NULL, NULL, | 543 | NULL, NULL, NULL, NULL, |
544 | NULL, NULL, NULL, NULL), | 544 | NULL, NULL, NULL, NULL), |
545 | _AM33XX_MUXENTRY(DDR_D13, 0, | 545 | _AM33XX_MUXENTRY(DDR_D13, 0, |
546 | NULL, NULL, NULL, NULL, | 546 | NULL, NULL, NULL, NULL, |
547 | NULL, NULL, NULL, NULL), | 547 | NULL, NULL, NULL, NULL), |
548 | _AM33XX_MUXENTRY(DDR_D14, 0, | 548 | _AM33XX_MUXENTRY(DDR_D14, 0, |
549 | NULL, NULL, NULL, NULL, | 549 | NULL, NULL, NULL, NULL, |
550 | NULL, NULL, NULL, NULL), | 550 | NULL, NULL, NULL, NULL), |
551 | _AM33XX_MUXENTRY(DDR_D15, 0, | 551 | _AM33XX_MUXENTRY(DDR_D15, 0, |
552 | NULL, NULL, NULL, NULL, | 552 | NULL, NULL, NULL, NULL, |
553 | NULL, NULL, NULL, NULL), | 553 | NULL, NULL, NULL, NULL), |
554 | _AM33XX_MUXENTRY(DDR_DQM0, 0, | 554 | _AM33XX_MUXENTRY(DDR_DQM0, 0, |
555 | NULL, NULL, NULL, NULL, | 555 | NULL, NULL, NULL, NULL, |
556 | NULL, NULL, NULL, NULL), | 556 | NULL, NULL, NULL, NULL), |
557 | _AM33XX_MUXENTRY(DDR_DQM1, 0, | 557 | _AM33XX_MUXENTRY(DDR_DQM1, 0, |
558 | NULL, NULL, NULL, NULL, | 558 | NULL, NULL, NULL, NULL, |
559 | NULL, NULL, NULL, NULL), | 559 | NULL, NULL, NULL, NULL), |
560 | _AM33XX_MUXENTRY(DDR_DQS0, 0, | 560 | _AM33XX_MUXENTRY(DDR_DQS0, 0, |
561 | NULL, NULL, NULL, NULL, | 561 | NULL, NULL, NULL, NULL, |
562 | NULL, NULL, NULL, NULL), | 562 | NULL, NULL, NULL, NULL), |
563 | _AM33XX_MUXENTRY(DDR_DQSN0, 0, | 563 | _AM33XX_MUXENTRY(DDR_DQSN0, 0, |
564 | NULL, NULL, NULL, NULL, | 564 | NULL, NULL, NULL, NULL, |
565 | NULL, NULL, NULL, NULL), | 565 | NULL, NULL, NULL, NULL), |
566 | _AM33XX_MUXENTRY(DDR_DQS1, 0, | 566 | _AM33XX_MUXENTRY(DDR_DQS1, 0, |
567 | NULL, NULL, NULL, NULL, | 567 | NULL, NULL, NULL, NULL, |
568 | NULL, NULL, NULL, NULL), | 568 | NULL, NULL, NULL, NULL), |
569 | _AM33XX_MUXENTRY(DDR_DQSN1, 0, | 569 | _AM33XX_MUXENTRY(DDR_DQSN1, 0, |
570 | NULL, NULL, NULL, NULL, | 570 | NULL, NULL, NULL, NULL, |
571 | NULL, NULL, NULL, NULL), | 571 | NULL, NULL, NULL, NULL), |
572 | _AM33XX_MUXENTRY(DDR_VREF, 0, | 572 | _AM33XX_MUXENTRY(DDR_VREF, 0, |
573 | NULL, NULL, NULL, NULL, | 573 | NULL, NULL, NULL, NULL, |
574 | NULL, NULL, NULL, NULL), | 574 | NULL, NULL, NULL, NULL), |
575 | _AM33XX_MUXENTRY(DDR_VTP, 0, | 575 | _AM33XX_MUXENTRY(DDR_VTP, 0, |
576 | NULL, NULL, NULL, NULL, | 576 | NULL, NULL, NULL, NULL, |
577 | NULL, NULL, NULL, NULL), | 577 | NULL, NULL, NULL, NULL), |
578 | _AM33XX_MUXENTRY(AIN0, 0, | 578 | _AM33XX_MUXENTRY(AIN0, 0, |
579 | "ain0", NULL, NULL, NULL, | 579 | "ain0", NULL, NULL, NULL, |
580 | NULL, NULL, NULL, NULL), | 580 | NULL, NULL, NULL, NULL), |
581 | _AM33XX_MUXENTRY(AIN1, 0, | 581 | _AM33XX_MUXENTRY(AIN1, 0, |
582 | "ain1", NULL, NULL, NULL, | 582 | "ain1", NULL, NULL, NULL, |
583 | NULL, NULL, NULL, NULL), | 583 | NULL, NULL, NULL, NULL), |
584 | _AM33XX_MUXENTRY(AIN2, 0, | 584 | _AM33XX_MUXENTRY(AIN2, 0, |
585 | "ain2", NULL, NULL, NULL, | 585 | "ain2", NULL, NULL, NULL, |
586 | NULL, NULL, NULL, NULL), | 586 | NULL, NULL, NULL, NULL), |
587 | _AM33XX_MUXENTRY(AIN3, 0, | 587 | _AM33XX_MUXENTRY(AIN3, 0, |
588 | "ain3", NULL, NULL, NULL, | 588 | "ain3", NULL, NULL, NULL, |
589 | NULL, NULL, NULL, NULL), | 589 | NULL, NULL, NULL, NULL), |
590 | _AM33XX_MUXENTRY(VREFP, 0, | 590 | _AM33XX_MUXENTRY(VREFP, 0, |
591 | "vrefp", NULL, NULL, NULL, | 591 | "vrefp", NULL, NULL, NULL, |
592 | NULL, NULL, NULL, NULL), | 592 | NULL, NULL, NULL, NULL), |
593 | _AM33XX_MUXENTRY(VREFN, 0, | 593 | _AM33XX_MUXENTRY(VREFN, 0, |
594 | "vrefn", NULL, NULL, NULL, | 594 | "vrefn", NULL, NULL, NULL, |
595 | NULL, NULL, NULL, NULL), | 595 | NULL, NULL, NULL, NULL), |
596 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 596 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
597 | }; | 597 | }; |
598 | 598 | ||
599 | int __init am33xx_mux_init(struct omap_board_mux *board_subset) | 599 | int __init am33xx_mux_init(struct omap_board_mux *board_subset) |
600 | { | 600 | { |
601 | return omap_mux_init("core", 0, AM33XX_CONTROL_PADCONF_MUX_PBASE, | 601 | return omap_mux_init("core", 0, AM33XX_CONTROL_PADCONF_MUX_PBASE, |
602 | AM33XX_CONTROL_PADCONF_MUX_SIZE, am33xx_muxmodes, | 602 | AM33XX_CONTROL_PADCONF_MUX_SIZE, am33xx_muxmodes, |
603 | NULL, board_subset, NULL); | 603 | NULL, board_subset, NULL); |
604 | } | 604 | } |
605 | #else | 605 | #else |
606 | int __init am33xx_mux_init(struct omap_board_mux *board_subset) | 606 | int __init am33xx_mux_init(struct omap_board_mux *board_subset) |
607 | { | 607 | { |
608 | return 0; | 608 | return 0; |
609 | } | 609 | } |
610 | #endif | 610 | #endif |
611 | 611 |
arch/arm/mach-omap2/omap_hwmod_33xx_data.c
1 | /* | 1 | /* |
2 | * Hardware modules present on the AM33XX chips | 2 | * Hardware modules present on the AM33XX chips |
3 | * | 3 | * |
4 | * Copyright (C) {2011} Texas Instruments Incorporated - http://www.ti.com/ | 4 | * Copyright (C) {2011} Texas Instruments Incorporated - http://www.ti.com/ |
5 | * | 5 | * |
6 | * This file is automatically generated from the AM33XX hardware databases. | 6 | * This file is automatically generated from the AM33XX hardware databases. |
7 | * This program is free software; you can redistribute it and/or | 7 | * This program is free software; you can redistribute it and/or |
8 | * modify it under the terms of the GNU General Public License as | 8 | * modify it under the terms of the GNU General Public License as |
9 | * published by the Free Software Foundation version 2. | 9 | * published by the Free Software Foundation version 2. |
10 | * | 10 | * |
11 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | 11 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any |
12 | * kind, whether express or implied; without even the implied warranty | 12 | * kind, whether express or implied; without even the implied warranty |
13 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | 18 | ||
19 | #include <plat/omap_hwmod.h> | 19 | #include <plat/omap_hwmod.h> |
20 | #include <plat/cpu.h> | 20 | #include <plat/cpu.h> |
21 | #include <plat/gpio.h> | 21 | #include <plat/gpio.h> |
22 | #include <plat/dma.h> | 22 | #include <plat/dma.h> |
23 | #include <plat/mmc.h> | 23 | #include <plat/mmc.h> |
24 | #include <plat/mcspi.h> | 24 | #include <plat/mcspi.h> |
25 | 25 | ||
26 | #include "omap_hwmod_common_data.h" | 26 | #include "omap_hwmod_common_data.h" |
27 | #include "control.h" | 27 | #include "control.h" |
28 | #include "cm33xx.h" | 28 | #include "cm33xx.h" |
29 | 29 | ||
30 | /* Backward references (IPs with Bus Master capability) */ | 30 | /* Backward references (IPs with Bus Master capability) */ |
31 | static struct omap_hwmod am33xx_mpu_hwmod; | 31 | static struct omap_hwmod am33xx_mpu_hwmod; |
32 | static struct omap_hwmod am33xx_l3slow_hwmod; | 32 | static struct omap_hwmod am33xx_l3slow_hwmod; |
33 | static struct omap_hwmod am33xx_l4wkup_hwmod; | 33 | static struct omap_hwmod am33xx_l4wkup_hwmod; |
34 | static struct omap_hwmod am33xx_l4per_hwmod; | 34 | static struct omap_hwmod am33xx_l4per_hwmod; |
35 | static struct omap_hwmod am33xx_uart1_hwmod; | 35 | static struct omap_hwmod am33xx_uart1_hwmod; |
36 | static struct omap_hwmod am33xx_uart2_hwmod; | 36 | static struct omap_hwmod am33xx_uart2_hwmod; |
37 | static struct omap_hwmod am33xx_uart3_hwmod; | 37 | static struct omap_hwmod am33xx_uart3_hwmod; |
38 | static struct omap_hwmod am33xx_uart4_hwmod; | 38 | static struct omap_hwmod am33xx_uart4_hwmod; |
39 | static struct omap_hwmod am33xx_uart5_hwmod; | 39 | static struct omap_hwmod am33xx_uart5_hwmod; |
40 | static struct omap_hwmod am33xx_uart6_hwmod; | 40 | static struct omap_hwmod am33xx_uart6_hwmod; |
41 | static struct omap_hwmod am33xx_timer0_hwmod; | 41 | static struct omap_hwmod am33xx_timer0_hwmod; |
42 | static struct omap_hwmod am33xx_timer1_hwmod; | 42 | static struct omap_hwmod am33xx_timer1_hwmod; |
43 | static struct omap_hwmod am33xx_timer2_hwmod; | 43 | static struct omap_hwmod am33xx_timer2_hwmod; |
44 | static struct omap_hwmod am33xx_timer3_hwmod; | 44 | static struct omap_hwmod am33xx_timer3_hwmod; |
45 | static struct omap_hwmod am33xx_timer4_hwmod; | 45 | static struct omap_hwmod am33xx_timer4_hwmod; |
46 | static struct omap_hwmod am33xx_timer5_hwmod; | 46 | static struct omap_hwmod am33xx_timer5_hwmod; |
47 | static struct omap_hwmod am33xx_timer6_hwmod; | 47 | static struct omap_hwmod am33xx_timer6_hwmod; |
48 | static struct omap_hwmod am33xx_timer7_hwmod; | 48 | static struct omap_hwmod am33xx_timer7_hwmod; |
49 | static struct omap_hwmod am33xx_wd_timer1_hwmod; | 49 | static struct omap_hwmod am33xx_wd_timer1_hwmod; |
50 | static struct omap_hwmod am33xx_cpgmac0_hwmod; | 50 | static struct omap_hwmod am33xx_cpgmac0_hwmod; |
51 | static struct omap_hwmod am33xx_icss_hwmod; | 51 | static struct omap_hwmod am33xx_icss_hwmod; |
52 | static struct omap_hwmod am33xx_ieee5000_hwmod; | 52 | static struct omap_hwmod am33xx_ieee5000_hwmod; |
53 | static struct omap_hwmod am33xx_tptc0_hwmod; | 53 | static struct omap_hwmod am33xx_tptc0_hwmod; |
54 | static struct omap_hwmod am33xx_tptc1_hwmod; | 54 | static struct omap_hwmod am33xx_tptc1_hwmod; |
55 | static struct omap_hwmod am33xx_tptc2_hwmod; | 55 | static struct omap_hwmod am33xx_tptc2_hwmod; |
56 | static struct omap_hwmod am33xx_gpio0_hwmod; | 56 | static struct omap_hwmod am33xx_gpio0_hwmod; |
57 | static struct omap_hwmod am33xx_gpio1_hwmod; | 57 | static struct omap_hwmod am33xx_gpio1_hwmod; |
58 | static struct omap_hwmod am33xx_gpio2_hwmod; | 58 | static struct omap_hwmod am33xx_gpio2_hwmod; |
59 | static struct omap_hwmod am33xx_gpio3_hwmod; | 59 | static struct omap_hwmod am33xx_gpio3_hwmod; |
60 | static struct omap_hwmod am33xx_i2c1_hwmod; | 60 | static struct omap_hwmod am33xx_i2c1_hwmod; |
61 | static struct omap_hwmod am33xx_i2c2_hwmod; | 61 | static struct omap_hwmod am33xx_i2c2_hwmod; |
62 | static struct omap_hwmod am33xx_usbss_hwmod; | 62 | static struct omap_hwmod am33xx_usbss_hwmod; |
63 | static struct omap_hwmod am33xx_mmc0_hwmod; | 63 | static struct omap_hwmod am33xx_mmc0_hwmod; |
64 | static struct omap_hwmod am33xx_mmc1_hwmod; | 64 | static struct omap_hwmod am33xx_mmc1_hwmod; |
65 | static struct omap_hwmod am33xx_mmc2_hwmod; | 65 | static struct omap_hwmod am33xx_mmc2_hwmod; |
66 | static struct omap_hwmod am33xx_spi0_hwmod; | 66 | static struct omap_hwmod am33xx_spi0_hwmod; |
67 | static struct omap_hwmod am33xx_spi1_hwmod; | 67 | static struct omap_hwmod am33xx_spi1_hwmod; |
68 | static struct omap_hwmod am33xx_elm_hwmod; | 68 | static struct omap_hwmod am33xx_elm_hwmod; |
69 | 69 | ||
70 | /* | 70 | /* |
71 | * Interconnects hwmod structures | 71 | * Interconnects hwmod structures |
72 | * hwmods that compose the global AM33XX OCP interconnect | 72 | * hwmods that compose the global AM33XX OCP interconnect |
73 | */ | 73 | */ |
74 | 74 | ||
75 | /* MPU -> L3_SLOW Peripheral interface */ | 75 | /* MPU -> L3_SLOW Peripheral interface */ |
76 | static struct omap_hwmod_ocp_if am33xx_mpu__l3_slow = { | 76 | static struct omap_hwmod_ocp_if am33xx_mpu__l3_slow = { |
77 | .master = &am33xx_mpu_hwmod, | 77 | .master = &am33xx_mpu_hwmod, |
78 | .slave = &am33xx_l3slow_hwmod, | 78 | .slave = &am33xx_l3slow_hwmod, |
79 | .user = OCP_USER_MPU, | 79 | .user = OCP_USER_MPU, |
80 | }; | 80 | }; |
81 | 81 | ||
82 | /* L3 SLOW -> L4_PER Peripheral interface */ | 82 | /* L3 SLOW -> L4_PER Peripheral interface */ |
83 | static struct omap_hwmod_ocp_if am33xx_l3_slow__l4_per = { | 83 | static struct omap_hwmod_ocp_if am33xx_l3_slow__l4_per = { |
84 | .master = &am33xx_l3slow_hwmod, | 84 | .master = &am33xx_l3slow_hwmod, |
85 | .slave = &am33xx_l4per_hwmod, | 85 | .slave = &am33xx_l4per_hwmod, |
86 | .user = OCP_USER_MPU, | 86 | .user = OCP_USER_MPU, |
87 | }; | 87 | }; |
88 | 88 | ||
89 | /* L3 SLOW -> L4_WKUP Peripheral interface */ | 89 | /* L3 SLOW -> L4_WKUP Peripheral interface */ |
90 | static struct omap_hwmod_ocp_if am33xx_l3_slow__l4_wkup = { | 90 | static struct omap_hwmod_ocp_if am33xx_l3_slow__l4_wkup = { |
91 | .master = &am33xx_l3slow_hwmod, | 91 | .master = &am33xx_l3slow_hwmod, |
92 | .slave = &am33xx_l4wkup_hwmod, | 92 | .slave = &am33xx_l4wkup_hwmod, |
93 | .user = OCP_USER_MPU, | 93 | .user = OCP_USER_MPU, |
94 | }; | 94 | }; |
95 | 95 | ||
96 | /* Master interfaces on the L4_WKUP interconnect */ | 96 | /* Master interfaces on the L4_WKUP interconnect */ |
97 | static struct omap_hwmod_ocp_if *am33xx_l3_slow_masters[] = { | 97 | static struct omap_hwmod_ocp_if *am33xx_l3_slow_masters[] = { |
98 | &am33xx_l3_slow__l4_per, | 98 | &am33xx_l3_slow__l4_per, |
99 | &am33xx_l3_slow__l4_wkup, | 99 | &am33xx_l3_slow__l4_wkup, |
100 | }; | 100 | }; |
101 | 101 | ||
102 | /* Slave interfaces on the L3_SLOW interconnect */ | 102 | /* Slave interfaces on the L3_SLOW interconnect */ |
103 | static struct omap_hwmod_ocp_if *am33xx_l3_slow_slaves[] = { | 103 | static struct omap_hwmod_ocp_if *am33xx_l3_slow_slaves[] = { |
104 | &am33xx_mpu__l3_slow, | 104 | &am33xx_mpu__l3_slow, |
105 | }; | 105 | }; |
106 | 106 | ||
107 | static struct omap_hwmod am33xx_l3slow_hwmod = { | 107 | static struct omap_hwmod am33xx_l3slow_hwmod = { |
108 | .name = "l3_slow", | 108 | .name = "l3_slow", |
109 | .class = &l3_hwmod_class, | 109 | .class = &l3_hwmod_class, |
110 | .clkdm_name = "l3s_clkdm", | 110 | .clkdm_name = "l3s_clkdm", |
111 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), | 111 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), |
112 | .masters = am33xx_l3_slow_masters, | 112 | .masters = am33xx_l3_slow_masters, |
113 | .masters_cnt = ARRAY_SIZE(am33xx_l3_slow_masters), | 113 | .masters_cnt = ARRAY_SIZE(am33xx_l3_slow_masters), |
114 | .slaves = am33xx_l3_slow_slaves, | 114 | .slaves = am33xx_l3_slow_slaves, |
115 | .slaves_cnt = ARRAY_SIZE(am33xx_l3_slow_slaves), | 115 | .slaves_cnt = ARRAY_SIZE(am33xx_l3_slow_slaves), |
116 | }; | 116 | }; |
117 | 117 | ||
118 | /* L4 PER -> GPIO2 */ | 118 | /* L4 PER -> GPIO2 */ |
119 | static struct omap_hwmod_addr_space am33xx_gpio1_addrs[] = { | 119 | static struct omap_hwmod_addr_space am33xx_gpio1_addrs[] = { |
120 | { | 120 | { |
121 | .pa_start = AM33XX_GPIO1_BASE, | 121 | .pa_start = AM33XX_GPIO1_BASE, |
122 | .pa_end = AM33XX_GPIO1_BASE + SZ_4K - 1, | 122 | .pa_end = AM33XX_GPIO1_BASE + SZ_4K - 1, |
123 | .flags = ADDR_TYPE_RT | 123 | .flags = ADDR_TYPE_RT |
124 | }, | 124 | }, |
125 | { } | 125 | { } |
126 | }; | 126 | }; |
127 | 127 | ||
128 | static struct omap_hwmod_ocp_if am33xx_l4_per__gpio1 = { | 128 | static struct omap_hwmod_ocp_if am33xx_l4_per__gpio1 = { |
129 | .master = &am33xx_l4per_hwmod, | 129 | .master = &am33xx_l4per_hwmod, |
130 | .slave = &am33xx_gpio1_hwmod, | 130 | .slave = &am33xx_gpio1_hwmod, |
131 | .clk = "l4ls_gclk", | 131 | .clk = "l4ls_gclk", |
132 | .addr = am33xx_gpio1_addrs, | 132 | .addr = am33xx_gpio1_addrs, |
133 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 133 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
134 | }; | 134 | }; |
135 | 135 | ||
136 | /* L4 PER -> GPIO3 */ | 136 | /* L4 PER -> GPIO3 */ |
137 | static struct omap_hwmod_addr_space am33xx_gpio2_addrs[] = { | 137 | static struct omap_hwmod_addr_space am33xx_gpio2_addrs[] = { |
138 | { | 138 | { |
139 | .pa_start = AM33XX_GPIO2_BASE, | 139 | .pa_start = AM33XX_GPIO2_BASE, |
140 | .pa_end = AM33XX_GPIO2_BASE + SZ_4K - 1, | 140 | .pa_end = AM33XX_GPIO2_BASE + SZ_4K - 1, |
141 | .flags = ADDR_TYPE_RT | 141 | .flags = ADDR_TYPE_RT |
142 | }, | 142 | }, |
143 | { } | 143 | { } |
144 | }; | 144 | }; |
145 | 145 | ||
146 | static struct omap_hwmod_ocp_if am33xx_l4_per__gpio2 = { | 146 | static struct omap_hwmod_ocp_if am33xx_l4_per__gpio2 = { |
147 | .master = &am33xx_l4per_hwmod, | 147 | .master = &am33xx_l4per_hwmod, |
148 | .slave = &am33xx_gpio2_hwmod, | 148 | .slave = &am33xx_gpio2_hwmod, |
149 | .clk = "l4ls_gclk", | 149 | .clk = "l4ls_gclk", |
150 | .addr = am33xx_gpio2_addrs, | 150 | .addr = am33xx_gpio2_addrs, |
151 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 151 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
152 | }; | 152 | }; |
153 | 153 | ||
154 | /* L4 PER -> GPIO4 */ | 154 | /* L4 PER -> GPIO4 */ |
155 | static struct omap_hwmod_addr_space am33xx_gpio3_addrs[] = { | 155 | static struct omap_hwmod_addr_space am33xx_gpio3_addrs[] = { |
156 | { | 156 | { |
157 | .pa_start = AM33XX_GPIO3_BASE, | 157 | .pa_start = AM33XX_GPIO3_BASE, |
158 | .pa_end = AM33XX_GPIO3_BASE + SZ_4K - 1, | 158 | .pa_end = AM33XX_GPIO3_BASE + SZ_4K - 1, |
159 | .flags = ADDR_TYPE_RT | 159 | .flags = ADDR_TYPE_RT |
160 | }, | 160 | }, |
161 | { } | 161 | { } |
162 | }; | 162 | }; |
163 | 163 | ||
164 | static struct omap_hwmod_ocp_if am33xx_l4_per__gpio3 = { | 164 | static struct omap_hwmod_ocp_if am33xx_l4_per__gpio3 = { |
165 | .master = &am33xx_l4per_hwmod, | 165 | .master = &am33xx_l4per_hwmod, |
166 | .slave = &am33xx_gpio3_hwmod, | 166 | .slave = &am33xx_gpio3_hwmod, |
167 | .clk = "l4ls_gclk", | 167 | .clk = "l4ls_gclk", |
168 | .addr = am33xx_gpio3_addrs, | 168 | .addr = am33xx_gpio3_addrs, |
169 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 169 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
170 | }; | 170 | }; |
171 | 171 | ||
172 | /* Master interfaces on the L4_PER interconnect */ | 172 | /* Master interfaces on the L4_PER interconnect */ |
173 | static struct omap_hwmod_ocp_if *am33xx_l4_per_masters[] = { | 173 | static struct omap_hwmod_ocp_if *am33xx_l4_per_masters[] = { |
174 | &am33xx_l4_per__gpio1, | 174 | &am33xx_l4_per__gpio1, |
175 | &am33xx_l4_per__gpio2, | 175 | &am33xx_l4_per__gpio2, |
176 | &am33xx_l4_per__gpio3, | 176 | &am33xx_l4_per__gpio3, |
177 | }; | 177 | }; |
178 | /* Slave interfaces on the L4_PER interconnect */ | 178 | /* Slave interfaces on the L4_PER interconnect */ |
179 | static struct omap_hwmod_ocp_if *am33xx_l4_per_slaves[] = { | 179 | static struct omap_hwmod_ocp_if *am33xx_l4_per_slaves[] = { |
180 | &am33xx_l3_slow__l4_per, | 180 | &am33xx_l3_slow__l4_per, |
181 | }; | 181 | }; |
182 | 182 | ||
183 | static struct omap_hwmod am33xx_l4per_hwmod = { | 183 | static struct omap_hwmod am33xx_l4per_hwmod = { |
184 | .name = "l4_per", | 184 | .name = "l4_per", |
185 | .class = &l4_hwmod_class, | 185 | .class = &l4_hwmod_class, |
186 | .clkdm_name = "l4ls_clkdm", | 186 | .clkdm_name = "l4ls_clkdm", |
187 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), | 187 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), |
188 | .masters = am33xx_l4_per_masters, | 188 | .masters = am33xx_l4_per_masters, |
189 | .masters_cnt = ARRAY_SIZE(am33xx_l4_per_masters), | 189 | .masters_cnt = ARRAY_SIZE(am33xx_l4_per_masters), |
190 | .slaves = am33xx_l4_per_slaves, | 190 | .slaves = am33xx_l4_per_slaves, |
191 | .slaves_cnt = ARRAY_SIZE(am33xx_l4_per_slaves), | 191 | .slaves_cnt = ARRAY_SIZE(am33xx_l4_per_slaves), |
192 | }; | 192 | }; |
193 | 193 | ||
194 | /* L4 WKUP -> I2C1 */ | 194 | /* L4 WKUP -> I2C1 */ |
195 | static struct omap_hwmod_addr_space am33xx_i2c1_addr_space[] = { | 195 | static struct omap_hwmod_addr_space am33xx_i2c1_addr_space[] = { |
196 | { | 196 | { |
197 | .pa_start = AM33XX_I2C0_BASE, | 197 | .pa_start = AM33XX_I2C0_BASE, |
198 | .pa_end = AM33XX_I2C0_BASE + SZ_4K - 1, | 198 | .pa_end = AM33XX_I2C0_BASE + SZ_4K - 1, |
199 | .flags = ADDR_TYPE_RT | 199 | .flags = ADDR_TYPE_RT |
200 | }, | 200 | }, |
201 | { } | 201 | { } |
202 | }; | 202 | }; |
203 | 203 | ||
204 | static struct omap_hwmod_ocp_if am33xx_l4_wkup_i2c1 = { | 204 | static struct omap_hwmod_ocp_if am33xx_l4_wkup_i2c1 = { |
205 | .master = &am33xx_l4wkup_hwmod, | 205 | .master = &am33xx_l4wkup_hwmod, |
206 | .slave = &am33xx_i2c1_hwmod, | 206 | .slave = &am33xx_i2c1_hwmod, |
207 | .addr = am33xx_i2c1_addr_space, | 207 | .addr = am33xx_i2c1_addr_space, |
208 | .user = OCP_USER_MPU, | 208 | .user = OCP_USER_MPU, |
209 | }; | 209 | }; |
210 | 210 | ||
211 | /* L4 WKUP -> GPIO1 */ | 211 | /* L4 WKUP -> GPIO1 */ |
212 | static struct omap_hwmod_addr_space am33xx_gpio0_addrs[] = { | 212 | static struct omap_hwmod_addr_space am33xx_gpio0_addrs[] = { |
213 | { | 213 | { |
214 | .pa_start = AM33XX_GPIO0_BASE, | 214 | .pa_start = AM33XX_GPIO0_BASE, |
215 | .pa_end = AM33XX_GPIO0_BASE + SZ_4K - 1, | 215 | .pa_end = AM33XX_GPIO0_BASE + SZ_4K - 1, |
216 | .flags = ADDR_TYPE_RT | 216 | .flags = ADDR_TYPE_RT |
217 | }, | 217 | }, |
218 | { } | 218 | { } |
219 | }; | 219 | }; |
220 | 220 | ||
221 | static struct omap_hwmod_ocp_if am33xx_l4_wkup__gpio0 = { | 221 | static struct omap_hwmod_ocp_if am33xx_l4_wkup__gpio0 = { |
222 | .master = &am33xx_l4wkup_hwmod, | 222 | .master = &am33xx_l4wkup_hwmod, |
223 | .slave = &am33xx_gpio0_hwmod, | 223 | .slave = &am33xx_gpio0_hwmod, |
224 | .clk = "l4ls_gclk", | 224 | .clk = "l4ls_gclk", |
225 | .addr = am33xx_gpio0_addrs, | 225 | .addr = am33xx_gpio0_addrs, |
226 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 226 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
227 | }; | 227 | }; |
228 | 228 | ||
229 | /* Master interfaces on the L4_WKUP interconnect */ | 229 | /* Master interfaces on the L4_WKUP interconnect */ |
230 | static struct omap_hwmod_ocp_if *am33xx_l4_wkup_masters[] = { | 230 | static struct omap_hwmod_ocp_if *am33xx_l4_wkup_masters[] = { |
231 | &am33xx_l4_wkup__gpio0, | 231 | &am33xx_l4_wkup__gpio0, |
232 | }; | 232 | }; |
233 | /* Slave interfaces on the L4_WKUP interconnect */ | 233 | /* Slave interfaces on the L4_WKUP interconnect */ |
234 | static struct omap_hwmod_ocp_if *am33xx_l4_wkup_slaves[] = { | 234 | static struct omap_hwmod_ocp_if *am33xx_l4_wkup_slaves[] = { |
235 | &am33xx_l3_slow__l4_wkup, | 235 | &am33xx_l3_slow__l4_wkup, |
236 | }; | 236 | }; |
237 | 237 | ||
238 | static struct omap_hwmod am33xx_l4wkup_hwmod = { | 238 | static struct omap_hwmod am33xx_l4wkup_hwmod = { |
239 | .name = "l4_wkup", | 239 | .name = "l4_wkup", |
240 | .class = &l4_hwmod_class, | 240 | .class = &l4_hwmod_class, |
241 | .clkdm_name = "l4_wkup_clkdm", | 241 | .clkdm_name = "l4_wkup_clkdm", |
242 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), | 242 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), |
243 | .masters = am33xx_l4_wkup_masters, | 243 | .masters = am33xx_l4_wkup_masters, |
244 | .masters_cnt = ARRAY_SIZE(am33xx_l4_wkup_masters), | 244 | .masters_cnt = ARRAY_SIZE(am33xx_l4_wkup_masters), |
245 | .slaves = am33xx_l4_wkup_slaves, | 245 | .slaves = am33xx_l4_wkup_slaves, |
246 | .slaves_cnt = ARRAY_SIZE(am33xx_l4_wkup_slaves), | 246 | .slaves_cnt = ARRAY_SIZE(am33xx_l4_wkup_slaves), |
247 | }; | 247 | }; |
248 | 248 | ||
249 | /* 'adc_tsc' class */ | 249 | /* 'adc_tsc' class */ |
250 | static struct omap_hwmod_class am33xx_adc_tsc_hwmod_class = { | 250 | static struct omap_hwmod_class am33xx_adc_tsc_hwmod_class = { |
251 | .name = "adc_tsc", | 251 | .name = "adc_tsc", |
252 | }; | 252 | }; |
253 | 253 | ||
254 | /* adc_tsc */ | 254 | /* adc_tsc */ |
255 | static struct omap_hwmod_irq_info am33xx_adc_tsc_irqs[] = { | 255 | static struct omap_hwmod_irq_info am33xx_adc_tsc_irqs[] = { |
256 | { .irq = AM33XX_IRQ_TSC }, | 256 | { .irq = AM33XX_IRQ_TSC }, |
257 | { .irq = -1 } | 257 | { .irq = -1 } |
258 | }; | 258 | }; |
259 | 259 | ||
260 | static struct omap_hwmod am33xx_adc_tsc_hwmod = { | 260 | static struct omap_hwmod am33xx_adc_tsc_hwmod = { |
261 | .name = "adc_tsc", | 261 | .name = "adc_tsc", |
262 | .class = &am33xx_adc_tsc_hwmod_class, | 262 | .class = &am33xx_adc_tsc_hwmod_class, |
263 | .mpu_irqs = am33xx_adc_tsc_irqs, | 263 | .mpu_irqs = am33xx_adc_tsc_irqs, |
264 | .main_clk = "adc_tsc_fck", | 264 | .main_clk = "adc_tsc_fck", |
265 | .clkdm_name = "l4_wkup_clkdm", | 265 | .clkdm_name = "l4_wkup_clkdm", |
266 | .prcm = { | 266 | .prcm = { |
267 | .omap4 = { | 267 | .omap4 = { |
268 | .clkctrl_offs = AM33XX_CM_WKUP_ADC_TSC_CLKCTRL_OFFSET, | 268 | .clkctrl_offs = AM33XX_CM_WKUP_ADC_TSC_CLKCTRL_OFFSET, |
269 | .modulemode = MODULEMODE_SWCTRL, | 269 | .modulemode = MODULEMODE_SWCTRL, |
270 | }, | 270 | }, |
271 | }, | 271 | }, |
272 | }; | 272 | }; |
273 | 273 | ||
274 | /* 'aes' class */ | 274 | /* 'aes' class */ |
275 | static struct omap_hwmod_class am33xx_aes_hwmod_class = { | 275 | static struct omap_hwmod_class am33xx_aes_hwmod_class = { |
276 | .name = "aes", | 276 | .name = "aes", |
277 | }; | 277 | }; |
278 | 278 | ||
279 | /* aes0 */ | 279 | /* aes0 */ |
280 | static struct omap_hwmod_irq_info am33xx_aes0_irqs[] = { | 280 | static struct omap_hwmod_irq_info am33xx_aes0_irqs[] = { |
281 | { .irq = AM33XX_IRQ_AESEIP36t0_S }, | 281 | { .irq = AM33XX_IRQ_AESEIP36t0_S }, |
282 | { .irq = -1 } | 282 | { .irq = -1 } |
283 | }; | 283 | }; |
284 | 284 | ||
285 | static struct omap_hwmod am33xx_aes0_hwmod = { | 285 | static struct omap_hwmod am33xx_aes0_hwmod = { |
286 | .name = "aes0", | 286 | .name = "aes0", |
287 | .class = &am33xx_aes_hwmod_class, | 287 | .class = &am33xx_aes_hwmod_class, |
288 | .mpu_irqs = am33xx_aes0_irqs, | 288 | .mpu_irqs = am33xx_aes0_irqs, |
289 | .main_clk = "aes0_fck", | 289 | .main_clk = "aes0_fck", |
290 | .clkdm_name = "l3_clkdm", | 290 | .clkdm_name = "l3_clkdm", |
291 | .prcm = { | 291 | .prcm = { |
292 | .omap4 = { | 292 | .omap4 = { |
293 | .clkctrl_offs = AM33XX_CM_PER_AES0_CLKCTRL_OFFSET, | 293 | .clkctrl_offs = AM33XX_CM_PER_AES0_CLKCTRL_OFFSET, |
294 | .modulemode = MODULEMODE_SWCTRL, | 294 | .modulemode = MODULEMODE_SWCTRL, |
295 | }, | 295 | }, |
296 | }, | 296 | }, |
297 | }; | 297 | }; |
298 | 298 | ||
299 | /* 'cefuse' class */ | 299 | /* 'cefuse' class */ |
300 | static struct omap_hwmod_class am33xx_cefuse_hwmod_class = { | 300 | static struct omap_hwmod_class am33xx_cefuse_hwmod_class = { |
301 | .name = "cefuse", | 301 | .name = "cefuse", |
302 | }; | 302 | }; |
303 | 303 | ||
304 | /* cefuse */ | 304 | /* cefuse */ |
305 | static struct omap_hwmod am33xx_cefuse_hwmod = { | 305 | static struct omap_hwmod am33xx_cefuse_hwmod = { |
306 | .name = "cefuse", | 306 | .name = "cefuse", |
307 | .class = &am33xx_cefuse_hwmod_class, | 307 | .class = &am33xx_cefuse_hwmod_class, |
308 | .main_clk = "cefuse_fck", | 308 | .main_clk = "cefuse_fck", |
309 | .clkdm_name = "l4_cefuse_clkdm", | 309 | .clkdm_name = "l4_cefuse_clkdm", |
310 | .prcm = { | 310 | .prcm = { |
311 | .omap4 = { | 311 | .omap4 = { |
312 | .clkctrl_offs = AM33XX_CM_CEFUSE_CEFUSE_CLKCTRL_OFFSET, | 312 | .clkctrl_offs = AM33XX_CM_CEFUSE_CEFUSE_CLKCTRL_OFFSET, |
313 | .modulemode = MODULEMODE_SWCTRL, | 313 | .modulemode = MODULEMODE_SWCTRL, |
314 | }, | 314 | }, |
315 | }, | 315 | }, |
316 | }; | 316 | }; |
317 | 317 | ||
318 | /* 'clkdiv32k' class */ | 318 | /* 'clkdiv32k' class */ |
319 | static struct omap_hwmod_class am33xx_clkdiv32k_hwmod_class = { | 319 | static struct omap_hwmod_class am33xx_clkdiv32k_hwmod_class = { |
320 | .name = "clkdiv32k", | 320 | .name = "clkdiv32k", |
321 | }; | 321 | }; |
322 | 322 | ||
323 | /* clkdiv32k */ | 323 | /* clkdiv32k */ |
324 | static struct omap_hwmod am33xx_clkdiv32k_hwmod = { | 324 | static struct omap_hwmod am33xx_clkdiv32k_hwmod = { |
325 | .name = "clkdiv32k", | 325 | .name = "clkdiv32k", |
326 | .class = &am33xx_clkdiv32k_hwmod_class, | 326 | .class = &am33xx_clkdiv32k_hwmod_class, |
327 | .main_clk = "clkdiv32k_ick", | 327 | .main_clk = "clkdiv32k_ick", |
328 | .clkdm_name = "clk_24mhz_clkdm", | 328 | .clkdm_name = "clk_24mhz_clkdm", |
329 | .prcm = { | 329 | .prcm = { |
330 | .omap4 = { | 330 | .omap4 = { |
331 | .clkctrl_offs = AM33XX_CM_PER_CLKDIV32K_CLKCTRL_OFFSET, | 331 | .clkctrl_offs = AM33XX_CM_PER_CLKDIV32K_CLKCTRL_OFFSET, |
332 | .modulemode = MODULEMODE_SWCTRL, | 332 | .modulemode = MODULEMODE_SWCTRL, |
333 | }, | 333 | }, |
334 | }, | 334 | }, |
335 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), | 335 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), |
336 | }; | 336 | }; |
337 | 337 | ||
338 | /* 'control' class */ | 338 | /* 'control' class */ |
339 | static struct omap_hwmod_class am33xx_control_hwmod_class = { | 339 | static struct omap_hwmod_class am33xx_control_hwmod_class = { |
340 | .name = "control", | 340 | .name = "control", |
341 | }; | 341 | }; |
342 | 342 | ||
343 | /* control */ | 343 | /* control */ |
344 | static struct omap_hwmod_irq_info am33xx_control_irqs[] = { | 344 | static struct omap_hwmod_irq_info am33xx_control_irqs[] = { |
345 | { .irq = AM33XX_IRQ_CONTROL_PLATFORM }, | 345 | { .irq = AM33XX_IRQ_CONTROL_PLATFORM }, |
346 | { .irq = -1 } | 346 | { .irq = -1 } |
347 | }; | 347 | }; |
348 | 348 | ||
349 | static struct omap_hwmod am33xx_control_hwmod = { | 349 | static struct omap_hwmod am33xx_control_hwmod = { |
350 | .name = "control", | 350 | .name = "control", |
351 | .class = &am33xx_control_hwmod_class, | 351 | .class = &am33xx_control_hwmod_class, |
352 | .mpu_irqs = am33xx_control_irqs, | 352 | .mpu_irqs = am33xx_control_irqs, |
353 | .main_clk = "control_fck", | 353 | .main_clk = "control_fck", |
354 | .clkdm_name = "l4_wkup_clkdm", | 354 | .clkdm_name = "l4_wkup_clkdm", |
355 | .prcm = { | 355 | .prcm = { |
356 | .omap4 = { | 356 | .omap4 = { |
357 | .clkctrl_offs = AM33XX_CM_WKUP_CONTROL_CLKCTRL_OFFSET, | 357 | .clkctrl_offs = AM33XX_CM_WKUP_CONTROL_CLKCTRL_OFFSET, |
358 | .modulemode = MODULEMODE_SWCTRL, | 358 | .modulemode = MODULEMODE_SWCTRL, |
359 | }, | 359 | }, |
360 | }, | 360 | }, |
361 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), | 361 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), |
362 | }; | 362 | }; |
363 | 363 | ||
364 | /* 'cpgmac0' class */ | 364 | /* 'cpgmac0' class */ |
365 | static struct omap_hwmod_class am33xx_cpgmac0_hwmod_class = { | 365 | static struct omap_hwmod_class am33xx_cpgmac0_hwmod_class = { |
366 | .name = "cpgmac0", | 366 | .name = "cpgmac0", |
367 | }; | 367 | }; |
368 | 368 | ||
369 | /* cpgmac0 */ | 369 | /* cpgmac0 */ |
370 | static struct omap_hwmod am33xx_cpgmac0_hwmod = { | 370 | static struct omap_hwmod am33xx_cpgmac0_hwmod = { |
371 | .name = "cpgmac0", | 371 | .name = "cpgmac0", |
372 | .class = &am33xx_cpgmac0_hwmod_class, | 372 | .class = &am33xx_cpgmac0_hwmod_class, |
373 | .main_clk = "cpgmac0_ick", | 373 | .main_clk = "cpgmac0_ick", |
374 | .clkdm_name = "cpsw_125mhz_clkdm", | 374 | .clkdm_name = "cpsw_125mhz_clkdm", |
375 | .prcm = { | 375 | .prcm = { |
376 | .omap4 = { | 376 | .omap4 = { |
377 | .clkctrl_offs = AM33XX_CM_PER_CPGMAC0_CLKCTRL_OFFSET, | 377 | .clkctrl_offs = AM33XX_CM_PER_CPGMAC0_CLKCTRL_OFFSET, |
378 | .modulemode = MODULEMODE_SWCTRL, | 378 | .modulemode = MODULEMODE_SWCTRL, |
379 | }, | 379 | }, |
380 | }, | 380 | }, |
381 | }; | 381 | }; |
382 | 382 | ||
383 | /* 'dcan' class */ | 383 | /* 'dcan' class */ |
384 | static struct omap_hwmod_class am33xx_dcan_hwmod_class = { | 384 | static struct omap_hwmod_class am33xx_dcan_hwmod_class = { |
385 | .name = "dcan", | 385 | .name = "dcan", |
386 | }; | 386 | }; |
387 | 387 | ||
388 | /* dcan0 */ | 388 | /* dcan0 */ |
389 | static struct omap_hwmod_irq_info am33xx_dcan0_irqs[] = { | 389 | static struct omap_hwmod_irq_info am33xx_dcan0_irqs[] = { |
390 | { .irq = AM33XX_IRQ_DCAN0_0 }, | 390 | { .irq = AM33XX_IRQ_DCAN0_0 }, |
391 | { .irq = -1 } | 391 | { .irq = -1 } |
392 | }; | 392 | }; |
393 | 393 | ||
394 | static struct omap_hwmod am33xx_dcan0_hwmod = { | 394 | static struct omap_hwmod am33xx_dcan0_hwmod = { |
395 | .name = "dcan0", | 395 | .name = "dcan0", |
396 | .class = &am33xx_dcan_hwmod_class, | 396 | .class = &am33xx_dcan_hwmod_class, |
397 | .mpu_irqs = am33xx_dcan0_irqs, | 397 | .mpu_irqs = am33xx_dcan0_irqs, |
398 | .main_clk = "dcan0_fck", | 398 | .main_clk = "dcan0_fck", |
399 | .clkdm_name = "l4ls_clkdm", | 399 | .clkdm_name = "l4ls_clkdm", |
400 | .prcm = { | 400 | .prcm = { |
401 | .omap4 = { | 401 | .omap4 = { |
402 | .clkctrl_offs = AM33XX_CM_PER_DCAN0_CLKCTRL_OFFSET, | 402 | .clkctrl_offs = AM33XX_CM_PER_DCAN0_CLKCTRL_OFFSET, |
403 | .modulemode = MODULEMODE_SWCTRL, | 403 | .modulemode = MODULEMODE_SWCTRL, |
404 | }, | 404 | }, |
405 | }, | 405 | }, |
406 | }; | 406 | }; |
407 | 407 | ||
408 | /* dcan1 */ | 408 | /* dcan1 */ |
409 | static struct omap_hwmod_irq_info am33xx_dcan1_irqs[] = { | 409 | static struct omap_hwmod_irq_info am33xx_dcan1_irqs[] = { |
410 | { .irq = AM33XX_IRQ_DCAN1_0 }, | 410 | { .irq = AM33XX_IRQ_DCAN1_0 }, |
411 | { .irq = -1 } | 411 | { .irq = -1 } |
412 | }; | 412 | }; |
413 | static struct omap_hwmod am33xx_dcan1_hwmod = { | 413 | static struct omap_hwmod am33xx_dcan1_hwmod = { |
414 | .name = "dcan1", | 414 | .name = "dcan1", |
415 | .class = &am33xx_dcan_hwmod_class, | 415 | .class = &am33xx_dcan_hwmod_class, |
416 | .mpu_irqs = am33xx_dcan1_irqs, | 416 | .mpu_irqs = am33xx_dcan1_irqs, |
417 | .main_clk = "dcan1_fck", | 417 | .main_clk = "dcan1_fck", |
418 | .clkdm_name = "l4ls_clkdm", | 418 | .clkdm_name = "l4ls_clkdm", |
419 | .prcm = { | 419 | .prcm = { |
420 | .omap4 = { | 420 | .omap4 = { |
421 | .clkctrl_offs = AM33XX_CM_PER_DCAN1_CLKCTRL_OFFSET, | 421 | .clkctrl_offs = AM33XX_CM_PER_DCAN1_CLKCTRL_OFFSET, |
422 | .modulemode = MODULEMODE_SWCTRL, | 422 | .modulemode = MODULEMODE_SWCTRL, |
423 | }, | 423 | }, |
424 | }, | 424 | }, |
425 | }; | 425 | }; |
426 | 426 | ||
427 | /* 'debugss' class */ | 427 | /* 'debugss' class */ |
428 | static struct omap_hwmod_class am33xx_debugss_hwmod_class = { | 428 | static struct omap_hwmod_class am33xx_debugss_hwmod_class = { |
429 | .name = "debugss", | 429 | .name = "debugss", |
430 | }; | 430 | }; |
431 | 431 | ||
432 | /* debugss */ | 432 | /* debugss */ |
433 | static struct omap_hwmod am33xx_debugss_hwmod = { | 433 | static struct omap_hwmod am33xx_debugss_hwmod = { |
434 | .name = "debugss", | 434 | .name = "debugss", |
435 | .class = &am33xx_debugss_hwmod_class, | 435 | .class = &am33xx_debugss_hwmod_class, |
436 | .main_clk = "debugss_ick", | 436 | .main_clk = "debugss_ick", |
437 | .clkdm_name = "l3_aon_clkdm", | 437 | .clkdm_name = "l3_aon_clkdm", |
438 | .prcm = { | 438 | .prcm = { |
439 | .omap4 = { | 439 | .omap4 = { |
440 | .clkctrl_offs = AM33XX_CM_WKUP_DEBUGSS_CLKCTRL_OFFSET, | 440 | .clkctrl_offs = AM33XX_CM_WKUP_DEBUGSS_CLKCTRL_OFFSET, |
441 | .modulemode = MODULEMODE_SWCTRL, | 441 | .modulemode = MODULEMODE_SWCTRL, |
442 | }, | 442 | }, |
443 | }, | 443 | }, |
444 | #ifdef CONFIG_DEBUG_JTAG_ENABLE | 444 | #ifdef CONFIG_DEBUG_JTAG_ENABLE |
445 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), | 445 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), |
446 | #endif | 446 | #endif |
447 | }; | 447 | }; |
448 | 448 | ||
449 | static struct omap_hwmod_class_sysconfig am33xx_elm_sysc = { | 449 | static struct omap_hwmod_class_sysconfig am33xx_elm_sysc = { |
450 | .rev_offs = 0x0000, | 450 | .rev_offs = 0x0000, |
451 | .sysc_offs = 0x0010, | 451 | .sysc_offs = 0x0010, |
452 | .syss_offs = 0x0014, | 452 | .syss_offs = 0x0014, |
453 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | 453 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | |
454 | SYSC_HAS_SOFTRESET | | 454 | SYSC_HAS_SOFTRESET | |
455 | SYSS_HAS_RESET_STATUS), | 455 | SYSS_HAS_RESET_STATUS), |
456 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | 456 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
457 | .sysc_fields = &omap_hwmod_sysc_type1, | 457 | .sysc_fields = &omap_hwmod_sysc_type1, |
458 | }; | 458 | }; |
459 | /* 'elm' class */ | 459 | /* 'elm' class */ |
460 | static struct omap_hwmod_class am33xx_elm_hwmod_class = { | 460 | static struct omap_hwmod_class am33xx_elm_hwmod_class = { |
461 | .name = "elm", | 461 | .name = "elm", |
462 | .sysc = &am33xx_elm_sysc, | 462 | .sysc = &am33xx_elm_sysc, |
463 | }; | 463 | }; |
464 | 464 | ||
465 | static struct omap_hwmod_irq_info am33xx_elm_irqs[] = { | 465 | static struct omap_hwmod_irq_info am33xx_elm_irqs[] = { |
466 | { .irq = AM33XX_IRQ_ELM }, | 466 | { .irq = AM33XX_IRQ_ELM }, |
467 | { .irq = -1 } | 467 | { .irq = -1 } |
468 | }; | 468 | }; |
469 | 469 | ||
470 | struct omap_hwmod_addr_space am33xx_elm_addr_space[] = { | 470 | struct omap_hwmod_addr_space am33xx_elm_addr_space[] = { |
471 | { | 471 | { |
472 | .pa_start = AM33XX_ELM_BASE, | 472 | .pa_start = AM33XX_ELM_BASE, |
473 | .pa_end = AM33XX_ELM_BASE + SZ_8K - 1, | 473 | .pa_end = AM33XX_ELM_BASE + SZ_8K - 1, |
474 | .flags = ADDR_TYPE_RT | 474 | .flags = ADDR_TYPE_RT |
475 | }, | 475 | }, |
476 | { } | 476 | { } |
477 | }; | 477 | }; |
478 | 478 | ||
479 | struct omap_hwmod_ocp_if am33xx_l4_core__elm = { | 479 | struct omap_hwmod_ocp_if am33xx_l4_core__elm = { |
480 | .master = &am33xx_l4per_hwmod, | 480 | .master = &am33xx_l4per_hwmod, |
481 | .slave = &am33xx_elm_hwmod, | 481 | .slave = &am33xx_elm_hwmod, |
482 | .addr = am33xx_elm_addr_space, | 482 | .addr = am33xx_elm_addr_space, |
483 | .user = OCP_USER_MPU, | 483 | .user = OCP_USER_MPU, |
484 | }; | 484 | }; |
485 | 485 | ||
486 | static struct omap_hwmod_ocp_if *am33xx_elm_slaves[] = { | 486 | static struct omap_hwmod_ocp_if *am33xx_elm_slaves[] = { |
487 | &am33xx_l4_core__elm, | 487 | &am33xx_l4_core__elm, |
488 | }; | 488 | }; |
489 | 489 | ||
490 | /* elm */ | 490 | /* elm */ |
491 | static struct omap_hwmod am33xx_elm_hwmod = { | 491 | static struct omap_hwmod am33xx_elm_hwmod = { |
492 | .name = "elm", | 492 | .name = "elm", |
493 | .class = &am33xx_elm_hwmod_class, | 493 | .class = &am33xx_elm_hwmod_class, |
494 | .mpu_irqs = am33xx_elm_irqs, | 494 | .mpu_irqs = am33xx_elm_irqs, |
495 | .main_clk = "elm_fck", | 495 | .main_clk = "elm_fck", |
496 | .clkdm_name = "l4ls_clkdm", | 496 | .clkdm_name = "l4ls_clkdm", |
497 | .slaves = am33xx_elm_slaves, | 497 | .slaves = am33xx_elm_slaves, |
498 | .slaves_cnt = ARRAY_SIZE(am33xx_elm_slaves), | 498 | .slaves_cnt = ARRAY_SIZE(am33xx_elm_slaves), |
499 | .prcm = { | 499 | .prcm = { |
500 | .omap4 = { | 500 | .omap4 = { |
501 | .clkctrl_offs = AM33XX_CM_PER_ELM_CLKCTRL_OFFSET, | 501 | .clkctrl_offs = AM33XX_CM_PER_ELM_CLKCTRL_OFFSET, |
502 | .modulemode = MODULEMODE_SWCTRL, | 502 | .modulemode = MODULEMODE_SWCTRL, |
503 | }, | 503 | }, |
504 | }, | 504 | }, |
505 | }; | 505 | }; |
506 | 506 | ||
507 | /* 'emif_fw' class */ | 507 | /* 'emif_fw' class */ |
508 | static struct omap_hwmod_class am33xx_emif_fw_hwmod_class = { | 508 | static struct omap_hwmod_class am33xx_emif_fw_hwmod_class = { |
509 | .name = "emif_fw", | 509 | .name = "emif_fw", |
510 | }; | 510 | }; |
511 | 511 | ||
512 | /* emif_fw */ | 512 | /* emif_fw */ |
513 | static struct omap_hwmod am33xx_emif_fw_hwmod = { | 513 | static struct omap_hwmod am33xx_emif_fw_hwmod = { |
514 | .name = "emif_fw", | 514 | .name = "emif_fw", |
515 | .class = &am33xx_emif_fw_hwmod_class, | 515 | .class = &am33xx_emif_fw_hwmod_class, |
516 | .main_clk = "emif_fw_fck", | 516 | .main_clk = "emif_fw_fck", |
517 | .clkdm_name = "l4fw_clkdm", | 517 | .clkdm_name = "l4fw_clkdm", |
518 | .prcm = { | 518 | .prcm = { |
519 | .omap4 = { | 519 | .omap4 = { |
520 | .clkctrl_offs = AM33XX_CM_PER_EMIF_FW_CLKCTRL_OFFSET, | 520 | .clkctrl_offs = AM33XX_CM_PER_EMIF_FW_CLKCTRL_OFFSET, |
521 | .modulemode = MODULEMODE_SWCTRL, | 521 | .modulemode = MODULEMODE_SWCTRL, |
522 | }, | 522 | }, |
523 | }, | 523 | }, |
524 | .flags = HWMOD_INIT_NO_RESET | HWMOD_INIT_NO_IDLE, | 524 | .flags = HWMOD_INIT_NO_RESET | HWMOD_INIT_NO_IDLE, |
525 | }; | 525 | }; |
526 | 526 | ||
527 | /* 'epwmss' class */ | 527 | /* 'epwmss' class */ |
528 | static struct omap_hwmod_class am33xx_epwmss_hwmod_class = { | 528 | static struct omap_hwmod_class am33xx_epwmss_hwmod_class = { |
529 | .name = "epwmss", | 529 | .name = "epwmss", |
530 | }; | 530 | }; |
531 | 531 | ||
532 | /* epwmss0 */ | 532 | /* epwmss0 */ |
533 | static struct omap_hwmod am33xx_epwmss0_hwmod = { | 533 | static struct omap_hwmod am33xx_epwmss0_hwmod = { |
534 | .name = "epwmss0", | 534 | .name = "epwmss0", |
535 | .class = &am33xx_epwmss_hwmod_class, | 535 | .class = &am33xx_epwmss_hwmod_class, |
536 | .main_clk = "epwmss0_fck", | 536 | .main_clk = "epwmss0_fck", |
537 | .clkdm_name = "l4ls_clkdm", | 537 | .clkdm_name = "l4ls_clkdm", |
538 | .prcm = { | 538 | .prcm = { |
539 | .omap4 = { | 539 | .omap4 = { |
540 | .clkctrl_offs = AM33XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET, | 540 | .clkctrl_offs = AM33XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET, |
541 | .modulemode = MODULEMODE_SWCTRL, | 541 | .modulemode = MODULEMODE_SWCTRL, |
542 | }, | 542 | }, |
543 | }, | 543 | }, |
544 | }; | 544 | }; |
545 | 545 | ||
546 | /* epwmss1 */ | 546 | /* epwmss1 */ |
547 | static struct omap_hwmod am33xx_epwmss1_hwmod = { | 547 | static struct omap_hwmod am33xx_epwmss1_hwmod = { |
548 | .name = "epwmss1", | 548 | .name = "epwmss1", |
549 | .class = &am33xx_epwmss_hwmod_class, | 549 | .class = &am33xx_epwmss_hwmod_class, |
550 | .main_clk = "epwmss1_fck", | 550 | .main_clk = "epwmss1_fck", |
551 | .clkdm_name = "l4ls_clkdm", | 551 | .clkdm_name = "l4ls_clkdm", |
552 | .prcm = { | 552 | .prcm = { |
553 | .omap4 = { | 553 | .omap4 = { |
554 | .clkctrl_offs = AM33XX_CM_PER_EPWMSS1_CLKCTRL_OFFSET, | 554 | .clkctrl_offs = AM33XX_CM_PER_EPWMSS1_CLKCTRL_OFFSET, |
555 | .modulemode = MODULEMODE_SWCTRL, | 555 | .modulemode = MODULEMODE_SWCTRL, |
556 | }, | 556 | }, |
557 | }, | 557 | }, |
558 | }; | 558 | }; |
559 | 559 | ||
560 | /* epwmss2 */ | 560 | /* epwmss2 */ |
561 | static struct omap_hwmod am33xx_epwmss2_hwmod = { | 561 | static struct omap_hwmod am33xx_epwmss2_hwmod = { |
562 | .name = "epwmss2", | 562 | .name = "epwmss2", |
563 | .class = &am33xx_epwmss_hwmod_class, | 563 | .class = &am33xx_epwmss_hwmod_class, |
564 | .main_clk = "epwmss2_fck", | 564 | .main_clk = "epwmss2_fck", |
565 | .clkdm_name = "l4ls_clkdm", | 565 | .clkdm_name = "l4ls_clkdm", |
566 | .prcm = { | 566 | .prcm = { |
567 | .omap4 = { | 567 | .omap4 = { |
568 | .clkctrl_offs = AM33XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET, | 568 | .clkctrl_offs = AM33XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET, |
569 | .modulemode = MODULEMODE_SWCTRL, | 569 | .modulemode = MODULEMODE_SWCTRL, |
570 | }, | 570 | }, |
571 | }, | 571 | }, |
572 | }; | 572 | }; |
573 | 573 | ||
574 | static struct omap_hwmod_class_sysconfig am33xx_gpio_sysc = { | 574 | static struct omap_hwmod_class_sysconfig am33xx_gpio_sysc = { |
575 | .rev_offs = 0x0000, | 575 | .rev_offs = 0x0000, |
576 | .sysc_offs = 0x0010, | 576 | .sysc_offs = 0x0010, |
577 | .syss_offs = 0x0114, | 577 | .syss_offs = 0x0114, |
578 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP | | 578 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP | |
579 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | | 579 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | |
580 | SYSS_HAS_RESET_STATUS), | 580 | SYSS_HAS_RESET_STATUS), |
581 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | 581 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | |
582 | SIDLE_SMART_WKUP), | 582 | SIDLE_SMART_WKUP), |
583 | .sysc_fields = &omap_hwmod_sysc_type1, | 583 | .sysc_fields = &omap_hwmod_sysc_type1, |
584 | }; | 584 | }; |
585 | 585 | ||
586 | /* 'gpio' class */ | 586 | /* 'gpio' class */ |
587 | static struct omap_hwmod_class am33xx_gpio_hwmod_class = { | 587 | static struct omap_hwmod_class am33xx_gpio_hwmod_class = { |
588 | .name = "gpio", | 588 | .name = "gpio", |
589 | .sysc = &am33xx_gpio_sysc, | 589 | .sysc = &am33xx_gpio_sysc, |
590 | .rev = 2, | 590 | .rev = 2, |
591 | }; | 591 | }; |
592 | 592 | ||
593 | /* gpio dev_attr */ | 593 | /* gpio dev_attr */ |
594 | static struct omap_gpio_dev_attr gpio_dev_attr = { | 594 | static struct omap_gpio_dev_attr gpio_dev_attr = { |
595 | .bank_width = 32, | 595 | .bank_width = 32, |
596 | .dbck_flag = true, | 596 | .dbck_flag = true, |
597 | }; | 597 | }; |
598 | 598 | ||
599 | /* gpio0 */ | 599 | /* gpio0 */ |
600 | static struct omap_hwmod_irq_info am33xx_gpio0_irqs[] = { | 600 | static struct omap_hwmod_irq_info am33xx_gpio0_irqs[] = { |
601 | { .irq = AM33XX_IRQ_GPIO0_1 }, | 601 | { .irq = AM33XX_IRQ_GPIO0_1 }, |
602 | { .irq = -1 } | 602 | { .irq = -1 } |
603 | }; | 603 | }; |
604 | 604 | ||
605 | /* gpio0 slave ports */ | 605 | /* gpio0 slave ports */ |
606 | static struct omap_hwmod_ocp_if *am33xx_gpio0_slaves[] = { | 606 | static struct omap_hwmod_ocp_if *am33xx_gpio0_slaves[] = { |
607 | &am33xx_l4_wkup__gpio0, | 607 | &am33xx_l4_wkup__gpio0, |
608 | }; | 608 | }; |
609 | 609 | ||
610 | static struct omap_hwmod_opt_clk gpio0_opt_clks[] = { | 610 | static struct omap_hwmod_opt_clk gpio0_opt_clks[] = { |
611 | { .role = "dbclk", .clk = "gpio0_dbclk" }, | 611 | { .role = "dbclk", .clk = "gpio0_dbclk" }, |
612 | }; | 612 | }; |
613 | 613 | ||
614 | /* gpio0 */ | 614 | /* gpio0 */ |
615 | static struct omap_hwmod am33xx_gpio0_hwmod = { | 615 | static struct omap_hwmod am33xx_gpio0_hwmod = { |
616 | .name = "gpio1", | 616 | .name = "gpio1", |
617 | .class = &am33xx_gpio_hwmod_class, | 617 | .class = &am33xx_gpio_hwmod_class, |
618 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 618 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
619 | .mpu_irqs = am33xx_gpio0_irqs, | 619 | .mpu_irqs = am33xx_gpio0_irqs, |
620 | .main_clk = "gpio0_ick", | 620 | .main_clk = "gpio0_ick", |
621 | .clkdm_name = "l4_wkup_clkdm", | 621 | .clkdm_name = "l4_wkup_clkdm", |
622 | .prcm = { | 622 | .prcm = { |
623 | .omap4 = { | 623 | .omap4 = { |
624 | .clkctrl_offs = AM33XX_CM_WKUP_GPIO0_CLKCTRL_OFFSET, | 624 | .clkctrl_offs = AM33XX_CM_WKUP_GPIO0_CLKCTRL_OFFSET, |
625 | .modulemode = MODULEMODE_SWCTRL, | 625 | .modulemode = MODULEMODE_SWCTRL, |
626 | }, | 626 | }, |
627 | }, | 627 | }, |
628 | .opt_clks = gpio0_opt_clks, | 628 | .opt_clks = gpio0_opt_clks, |
629 | .opt_clks_cnt = ARRAY_SIZE(gpio0_opt_clks), | 629 | .opt_clks_cnt = ARRAY_SIZE(gpio0_opt_clks), |
630 | .dev_attr = &gpio_dev_attr, | 630 | .dev_attr = &gpio_dev_attr, |
631 | .slaves = am33xx_gpio0_slaves, | 631 | .slaves = am33xx_gpio0_slaves, |
632 | .slaves_cnt = ARRAY_SIZE(am33xx_gpio0_slaves), | 632 | .slaves_cnt = ARRAY_SIZE(am33xx_gpio0_slaves), |
633 | }; | 633 | }; |
634 | 634 | ||
635 | /* gpio1 */ | 635 | /* gpio1 */ |
636 | static struct omap_hwmod_irq_info am33xx_gpio1_irqs[] = { | 636 | static struct omap_hwmod_irq_info am33xx_gpio1_irqs[] = { |
637 | { .irq = AM33XX_IRQ_GPIO1_1 }, | 637 | { .irq = AM33XX_IRQ_GPIO1_1 }, |
638 | { .irq = -1 } | 638 | { .irq = -1 } |
639 | }; | 639 | }; |
640 | 640 | ||
641 | /* gpio1 slave ports */ | 641 | /* gpio1 slave ports */ |
642 | static struct omap_hwmod_ocp_if *am33xx_gpio1_slaves[] = { | 642 | static struct omap_hwmod_ocp_if *am33xx_gpio1_slaves[] = { |
643 | &am33xx_l4_per__gpio1, | 643 | &am33xx_l4_per__gpio1, |
644 | }; | 644 | }; |
645 | 645 | ||
646 | static struct omap_hwmod_opt_clk gpio1_opt_clks[] = { | 646 | static struct omap_hwmod_opt_clk gpio1_opt_clks[] = { |
647 | { .role = "dbclk", .clk = "gpio1_dbclk" }, | 647 | { .role = "dbclk", .clk = "gpio1_dbclk" }, |
648 | }; | 648 | }; |
649 | 649 | ||
650 | static struct omap_hwmod am33xx_gpio1_hwmod = { | 650 | static struct omap_hwmod am33xx_gpio1_hwmod = { |
651 | .name = "gpio2", | 651 | .name = "gpio2", |
652 | .class = &am33xx_gpio_hwmod_class, | 652 | .class = &am33xx_gpio_hwmod_class, |
653 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 653 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
654 | .mpu_irqs = am33xx_gpio1_irqs, | 654 | .mpu_irqs = am33xx_gpio1_irqs, |
655 | .main_clk = "gpio1_ick", | 655 | .main_clk = "gpio1_ick", |
656 | .clkdm_name = "l4ls_clkdm", | 656 | .clkdm_name = "l4ls_clkdm", |
657 | .prcm = { | 657 | .prcm = { |
658 | .omap4 = { | 658 | .omap4 = { |
659 | .clkctrl_offs = AM33XX_CM_PER_GPIO1_CLKCTRL_OFFSET, | 659 | .clkctrl_offs = AM33XX_CM_PER_GPIO1_CLKCTRL_OFFSET, |
660 | .modulemode = MODULEMODE_SWCTRL, | 660 | .modulemode = MODULEMODE_SWCTRL, |
661 | }, | 661 | }, |
662 | }, | 662 | }, |
663 | .opt_clks = gpio1_opt_clks, | 663 | .opt_clks = gpio1_opt_clks, |
664 | .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks), | 664 | .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks), |
665 | .dev_attr = &gpio_dev_attr, | 665 | .dev_attr = &gpio_dev_attr, |
666 | .slaves = am33xx_gpio1_slaves, | 666 | .slaves = am33xx_gpio1_slaves, |
667 | .slaves_cnt = ARRAY_SIZE(am33xx_gpio1_slaves), | 667 | .slaves_cnt = ARRAY_SIZE(am33xx_gpio1_slaves), |
668 | }; | 668 | }; |
669 | 669 | ||
670 | /* gpio2 */ | 670 | /* gpio2 */ |
671 | static struct omap_hwmod_irq_info am33xx_gpio2_irqs[] = { | 671 | static struct omap_hwmod_irq_info am33xx_gpio2_irqs[] = { |
672 | { .irq = AM33XX_IRQ_GPIO2_1 }, | 672 | { .irq = AM33XX_IRQ_GPIO2_1 }, |
673 | { .irq = -1 } | 673 | { .irq = -1 } |
674 | }; | 674 | }; |
675 | 675 | ||
676 | /* gpio2 slave ports */ | 676 | /* gpio2 slave ports */ |
677 | static struct omap_hwmod_ocp_if *am33xx_gpio2_slaves[] = { | 677 | static struct omap_hwmod_ocp_if *am33xx_gpio2_slaves[] = { |
678 | &am33xx_l4_per__gpio2, | 678 | &am33xx_l4_per__gpio2, |
679 | }; | 679 | }; |
680 | 680 | ||
681 | static struct omap_hwmod_opt_clk gpio2_opt_clks[] = { | 681 | static struct omap_hwmod_opt_clk gpio2_opt_clks[] = { |
682 | { .role = "dbclk", .clk = "gpio2_dbclk" }, | 682 | { .role = "dbclk", .clk = "gpio2_dbclk" }, |
683 | }; | 683 | }; |
684 | 684 | ||
685 | /* gpio2 */ | 685 | /* gpio2 */ |
686 | static struct omap_hwmod am33xx_gpio2_hwmod = { | 686 | static struct omap_hwmod am33xx_gpio2_hwmod = { |
687 | .name = "gpio3", | 687 | .name = "gpio3", |
688 | .class = &am33xx_gpio_hwmod_class, | 688 | .class = &am33xx_gpio_hwmod_class, |
689 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 689 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
690 | .mpu_irqs = am33xx_gpio2_irqs, | 690 | .mpu_irqs = am33xx_gpio2_irqs, |
691 | .main_clk = "gpio2_ick", | 691 | .main_clk = "gpio2_ick", |
692 | .clkdm_name = "l4ls_clkdm", | 692 | .clkdm_name = "l4ls_clkdm", |
693 | .prcm = { | 693 | .prcm = { |
694 | .omap4 = { | 694 | .omap4 = { |
695 | .clkctrl_offs = AM33XX_CM_PER_GPIO1_CLKCTRL_OFFSET, | 695 | .clkctrl_offs = AM33XX_CM_PER_GPIO1_CLKCTRL_OFFSET, |
696 | .modulemode = MODULEMODE_SWCTRL, | 696 | .modulemode = MODULEMODE_SWCTRL, |
697 | }, | 697 | }, |
698 | }, | 698 | }, |
699 | .opt_clks = gpio2_opt_clks, | 699 | .opt_clks = gpio2_opt_clks, |
700 | .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks), | 700 | .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks), |
701 | .dev_attr = &gpio_dev_attr, | 701 | .dev_attr = &gpio_dev_attr, |
702 | .slaves = am33xx_gpio2_slaves, | 702 | .slaves = am33xx_gpio2_slaves, |
703 | .slaves_cnt = ARRAY_SIZE(am33xx_gpio2_slaves), | 703 | .slaves_cnt = ARRAY_SIZE(am33xx_gpio2_slaves), |
704 | }; | 704 | }; |
705 | 705 | ||
706 | /* gpio3 */ | 706 | /* gpio3 */ |
707 | static struct omap_hwmod_irq_info am33xx_gpio3_irqs[] = { | 707 | static struct omap_hwmod_irq_info am33xx_gpio3_irqs[] = { |
708 | { .irq = AM33XX_IRQ_GPIO3_1 }, | 708 | { .irq = AM33XX_IRQ_GPIO3_1 }, |
709 | { .irq = -1 } | 709 | { .irq = -1 } |
710 | }; | 710 | }; |
711 | 711 | ||
712 | /* gpio3 slave ports */ | 712 | /* gpio3 slave ports */ |
713 | static struct omap_hwmod_ocp_if *am33xx_gpio3_slaves[] = { | 713 | static struct omap_hwmod_ocp_if *am33xx_gpio3_slaves[] = { |
714 | &am33xx_l4_per__gpio3, | 714 | &am33xx_l4_per__gpio3, |
715 | }; | 715 | }; |
716 | 716 | ||
717 | static struct omap_hwmod_opt_clk gpio3_opt_clks[] = { | 717 | static struct omap_hwmod_opt_clk gpio3_opt_clks[] = { |
718 | { .role = "dbclk", .clk = "gpio3_dbclk" }, | 718 | { .role = "dbclk", .clk = "gpio3_dbclk" }, |
719 | }; | 719 | }; |
720 | 720 | ||
721 | /* gpio3 */ | 721 | /* gpio3 */ |
722 | static struct omap_hwmod am33xx_gpio3_hwmod = { | 722 | static struct omap_hwmod am33xx_gpio3_hwmod = { |
723 | .name = "gpio4", | 723 | .name = "gpio4", |
724 | .class = &am33xx_gpio_hwmod_class, | 724 | .class = &am33xx_gpio_hwmod_class, |
725 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 725 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
726 | .mpu_irqs = am33xx_gpio3_irqs, | 726 | .mpu_irqs = am33xx_gpio3_irqs, |
727 | .main_clk = "gpio3_ick", | 727 | .main_clk = "gpio3_ick", |
728 | .clkdm_name = "l4ls_clkdm", | 728 | .clkdm_name = "l4ls_clkdm", |
729 | .prcm = { | 729 | .prcm = { |
730 | .omap4 = { | 730 | .omap4 = { |
731 | .clkctrl_offs = AM33XX_CM_PER_GPIO1_CLKCTRL_OFFSET, | 731 | .clkctrl_offs = AM33XX_CM_PER_GPIO1_CLKCTRL_OFFSET, |
732 | .modulemode = MODULEMODE_SWCTRL, | 732 | .modulemode = MODULEMODE_SWCTRL, |
733 | }, | 733 | }, |
734 | }, | 734 | }, |
735 | .opt_clks = gpio3_opt_clks, | 735 | .opt_clks = gpio3_opt_clks, |
736 | .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks), | 736 | .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks), |
737 | .dev_attr = &gpio_dev_attr, | 737 | .dev_attr = &gpio_dev_attr, |
738 | .slaves = am33xx_gpio3_slaves, | 738 | .slaves = am33xx_gpio3_slaves, |
739 | .slaves_cnt = ARRAY_SIZE(am33xx_gpio3_slaves), | 739 | .slaves_cnt = ARRAY_SIZE(am33xx_gpio3_slaves), |
740 | }; | 740 | }; |
741 | 741 | ||
742 | /* 'gpmc' class */ | 742 | /* 'gpmc' class */ |
743 | 743 | ||
744 | static struct omap_hwmod_class am33xx_gpmc_hwmod_class = { | 744 | static struct omap_hwmod_class am33xx_gpmc_hwmod_class = { |
745 | .name = "gpmc", | 745 | .name = "gpmc", |
746 | }; | 746 | }; |
747 | 747 | ||
748 | /* gpmc */ | 748 | /* gpmc */ |
749 | static struct omap_hwmod am33xx_gpmc_hwmod = { | 749 | static struct omap_hwmod am33xx_gpmc_hwmod = { |
750 | .name = "gpmc", | 750 | .name = "gpmc", |
751 | .class = &am33xx_gpmc_hwmod_class, | 751 | .class = &am33xx_gpmc_hwmod_class, |
752 | .main_clk = "gpmc_fck", | 752 | .main_clk = "gpmc_fck", |
753 | .clkdm_name = "l3s_clkdm", | 753 | .clkdm_name = "l3s_clkdm", |
754 | .prcm = { | 754 | .prcm = { |
755 | .omap4 = { | 755 | .omap4 = { |
756 | .clkctrl_offs = AM33XX_CM_PER_GPMC_CLKCTRL_OFFSET, | 756 | .clkctrl_offs = AM33XX_CM_PER_GPMC_CLKCTRL_OFFSET, |
757 | .modulemode = MODULEMODE_SWCTRL, | 757 | .modulemode = MODULEMODE_SWCTRL, |
758 | }, | 758 | }, |
759 | }, | 759 | }, |
760 | }; | 760 | }; |
761 | 761 | ||
762 | /* 'i2c' class */ | 762 | /* 'i2c' class */ |
763 | 763 | ||
764 | static struct omap_hwmod_class_sysconfig am33xx_i2c_sysc = { | 764 | static struct omap_hwmod_class_sysconfig am33xx_i2c_sysc = { |
765 | .sysc_offs = 0x0010, | 765 | .sysc_offs = 0x0010, |
766 | .syss_offs = 0x0090, | 766 | .syss_offs = 0x0090, |
767 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY | | 767 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY | |
768 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE | | 768 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE | |
769 | SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), | 769 | SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), |
770 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | 770 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | |
771 | SIDLE_SMART_WKUP), | 771 | SIDLE_SMART_WKUP), |
772 | .sysc_fields = &omap_hwmod_sysc_type1, | 772 | .sysc_fields = &omap_hwmod_sysc_type1, |
773 | }; | 773 | }; |
774 | 774 | ||
775 | static struct omap_i2c_dev_attr i2c_dev_attr = { | 775 | static struct omap_i2c_dev_attr i2c_dev_attr = { |
776 | .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE, | 776 | .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE, |
777 | }; | 777 | }; |
778 | 778 | ||
779 | static struct omap_hwmod_class i2c_class = { | 779 | static struct omap_hwmod_class i2c_class = { |
780 | .name = "i2c", | 780 | .name = "i2c", |
781 | .sysc = &am33xx_i2c_sysc, | 781 | .sysc = &am33xx_i2c_sysc, |
782 | .rev = OMAP_I2C_IP_VERSION_2, | 782 | .rev = OMAP_I2C_IP_VERSION_2, |
783 | .reset = &omap_i2c_reset, | 783 | .reset = &omap_i2c_reset, |
784 | }; | 784 | }; |
785 | 785 | ||
786 | /* I2C1 */ | 786 | /* I2C1 */ |
787 | static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = { | 787 | static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = { |
788 | { .irq = AM33XX_IRQ_MSHSI2COCP0 }, | 788 | { .irq = AM33XX_IRQ_MSHSI2COCP0 }, |
789 | { .irq = -1 } | 789 | { .irq = -1 } |
790 | }; | 790 | }; |
791 | 791 | ||
792 | static struct omap_hwmod_dma_info i2c1_edma_reqs[] = { | 792 | static struct omap_hwmod_dma_info i2c1_edma_reqs[] = { |
793 | { .name = "tx", .dma_req = 0, }, | 793 | { .name = "tx", .dma_req = 0, }, |
794 | { .name = "rx", .dma_req = 0, }, | 794 | { .name = "rx", .dma_req = 0, }, |
795 | { .dma_req = -1 } | 795 | { .dma_req = -1 } |
796 | }; | 796 | }; |
797 | 797 | ||
798 | static struct omap_hwmod_ocp_if *am33xx_i2c1_slaves[] = { | 798 | static struct omap_hwmod_ocp_if *am33xx_i2c1_slaves[] = { |
799 | &am33xx_l4_wkup_i2c1, | 799 | &am33xx_l4_wkup_i2c1, |
800 | }; | 800 | }; |
801 | 801 | ||
802 | static struct omap_hwmod am33xx_i2c1_hwmod = { | 802 | static struct omap_hwmod am33xx_i2c1_hwmod = { |
803 | .name = "i2c1", | 803 | .name = "i2c1", |
804 | .mpu_irqs = i2c1_mpu_irqs, | 804 | .mpu_irqs = i2c1_mpu_irqs, |
805 | .sdma_reqs = i2c1_edma_reqs, | 805 | .sdma_reqs = i2c1_edma_reqs, |
806 | .main_clk = "i2c1_fck", | 806 | .main_clk = "i2c1_fck", |
807 | .clkdm_name = "l4_wkup_clkdm", | 807 | .clkdm_name = "l4_wkup_clkdm", |
808 | .prcm = { | 808 | .prcm = { |
809 | .omap4 = { | 809 | .omap4 = { |
810 | .clkctrl_offs = AM33XX_CM_WKUP_I2C0_CLKCTRL_OFFSET, | 810 | .clkctrl_offs = AM33XX_CM_WKUP_I2C0_CLKCTRL_OFFSET, |
811 | .modulemode = MODULEMODE_SWCTRL, | 811 | .modulemode = MODULEMODE_SWCTRL, |
812 | }, | 812 | }, |
813 | }, | 813 | }, |
814 | .flags = HWMOD_16BIT_REG, | 814 | .flags = HWMOD_16BIT_REG, |
815 | .dev_attr = &i2c_dev_attr, | 815 | .dev_attr = &i2c_dev_attr, |
816 | .slaves = am33xx_i2c1_slaves, | 816 | .slaves = am33xx_i2c1_slaves, |
817 | .slaves_cnt = ARRAY_SIZE(am33xx_i2c1_slaves), | 817 | .slaves_cnt = ARRAY_SIZE(am33xx_i2c1_slaves), |
818 | .class = &i2c_class, | 818 | .class = &i2c_class, |
819 | }; | 819 | }; |
820 | 820 | ||
821 | /* i2c2 */ | 821 | /* i2c2 */ |
822 | /* l4 per -> i2c2 */ | 822 | /* l4 per -> i2c2 */ |
823 | static struct omap_hwmod_addr_space am33xx_i2c2_addr_space[] = { | 823 | static struct omap_hwmod_addr_space am33xx_i2c2_addr_space[] = { |
824 | { | 824 | { |
825 | .pa_start = AM33XX_I2C1_BASE, | 825 | .pa_start = AM33XX_I2C1_BASE, |
826 | .pa_end = AM33XX_I2C1_BASE + SZ_4K - 1, | 826 | .pa_end = AM33XX_I2C1_BASE + SZ_4K - 1, |
827 | .flags = ADDR_TYPE_RT | 827 | .flags = ADDR_TYPE_RT |
828 | }, | 828 | }, |
829 | { } | 829 | { } |
830 | }; | 830 | }; |
831 | 831 | ||
832 | static struct omap_hwmod_ocp_if am335_l4_per_i2c2 = { | 832 | static struct omap_hwmod_ocp_if am335_l4_per_i2c2 = { |
833 | .master = &am33xx_l4per_hwmod, | 833 | .master = &am33xx_l4per_hwmod, |
834 | .slave = &am33xx_i2c2_hwmod, | 834 | .slave = &am33xx_i2c2_hwmod, |
835 | .addr = am33xx_i2c2_addr_space, | 835 | .addr = am33xx_i2c2_addr_space, |
836 | .user = OCP_USER_MPU, | 836 | .user = OCP_USER_MPU, |
837 | }; | 837 | }; |
838 | 838 | ||
839 | static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = { | 839 | static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = { |
840 | { .irq = AM33XX_IRQ_MSHSI2COCP1 }, | 840 | { .irq = AM33XX_IRQ_MSHSI2COCP1 }, |
841 | { .irq = -1 } | 841 | { .irq = -1 } |
842 | }; | 842 | }; |
843 | 843 | ||
844 | static struct omap_hwmod_dma_info i2c2_edma_reqs[] = { | 844 | static struct omap_hwmod_dma_info i2c2_edma_reqs[] = { |
845 | { .name = "tx", .dma_req = 0, }, | 845 | { .name = "tx", .dma_req = 0, }, |
846 | { .name = "rx", .dma_req = 0, }, | 846 | { .name = "rx", .dma_req = 0, }, |
847 | { .dma_req = -1 } | 847 | { .dma_req = -1 } |
848 | }; | 848 | }; |
849 | 849 | ||
850 | static struct omap_hwmod_ocp_if *am33xx_i2c2_slaves[] = { | 850 | static struct omap_hwmod_ocp_if *am33xx_i2c2_slaves[] = { |
851 | &am335_l4_per_i2c2, | 851 | &am335_l4_per_i2c2, |
852 | }; | 852 | }; |
853 | 853 | ||
854 | static struct omap_hwmod am33xx_i2c2_hwmod = { | 854 | static struct omap_hwmod am33xx_i2c2_hwmod = { |
855 | .name = "i2c2", | 855 | .name = "i2c2", |
856 | .mpu_irqs = i2c2_mpu_irqs, | 856 | .mpu_irqs = i2c2_mpu_irqs, |
857 | .sdma_reqs = i2c2_edma_reqs, | 857 | .sdma_reqs = i2c2_edma_reqs, |
858 | .main_clk = "i2c2_fck", | 858 | .main_clk = "i2c2_fck", |
859 | .clkdm_name = "l4ls_clkdm", | 859 | .clkdm_name = "l4ls_clkdm", |
860 | .prcm = { | 860 | .prcm = { |
861 | .omap4 = { | 861 | .omap4 = { |
862 | .clkctrl_offs = AM33XX_CM_PER_I2C1_CLKCTRL_OFFSET, | 862 | .clkctrl_offs = AM33XX_CM_PER_I2C1_CLKCTRL_OFFSET, |
863 | .modulemode = MODULEMODE_SWCTRL, | 863 | .modulemode = MODULEMODE_SWCTRL, |
864 | }, | 864 | }, |
865 | }, | 865 | }, |
866 | .flags = HWMOD_16BIT_REG, | 866 | .flags = HWMOD_16BIT_REG, |
867 | .dev_attr = &i2c_dev_attr, | 867 | .dev_attr = &i2c_dev_attr, |
868 | .slaves = am33xx_i2c2_slaves, | 868 | .slaves = am33xx_i2c2_slaves, |
869 | .slaves_cnt = ARRAY_SIZE(am33xx_i2c2_slaves), | 869 | .slaves_cnt = ARRAY_SIZE(am33xx_i2c2_slaves), |
870 | .class = &i2c_class, | 870 | .class = &i2c_class, |
871 | }; | 871 | }; |
872 | 872 | ||
873 | /* 'icss' class */ | 873 | /* 'icss' class */ |
874 | static struct omap_hwmod_class am33xx_icss_hwmod_class = { | 874 | static struct omap_hwmod_class am33xx_icss_hwmod_class = { |
875 | .name = "icss", | 875 | .name = "icss", |
876 | }; | 876 | }; |
877 | 877 | ||
878 | /* icss */ | 878 | /* icss */ |
879 | static struct omap_hwmod am33xx_icss_hwmod = { | 879 | static struct omap_hwmod am33xx_icss_hwmod = { |
880 | .name = "icss", | 880 | .name = "icss", |
881 | .class = &am33xx_icss_hwmod_class, | 881 | .class = &am33xx_icss_hwmod_class, |
882 | .main_clk = "icss_uart_gclk", | 882 | .main_clk = "icss_uart_gclk", |
883 | .clkdm_name = "icss_ocp_clkdm", | 883 | .clkdm_name = "icss_ocp_clkdm", |
884 | .prcm = { | 884 | .prcm = { |
885 | .omap4 = { | 885 | .omap4 = { |
886 | .clkctrl_offs = AM33XX_CM_PER_ICSS_CLKCTRL_OFFSET, | 886 | .clkctrl_offs = AM33XX_CM_PER_ICSS_CLKCTRL_OFFSET, |
887 | .modulemode = MODULEMODE_SWCTRL, | 887 | .modulemode = MODULEMODE_SWCTRL, |
888 | }, | 888 | }, |
889 | }, | 889 | }, |
890 | }; | 890 | }; |
891 | 891 | ||
892 | /* 'ieee5000' class */ | 892 | /* 'ieee5000' class */ |
893 | static struct omap_hwmod_class am33xx_ieee5000_hwmod_class = { | 893 | static struct omap_hwmod_class am33xx_ieee5000_hwmod_class = { |
894 | .name = "ieee5000", | 894 | .name = "ieee5000", |
895 | }; | 895 | }; |
896 | 896 | ||
897 | /* ieee5000 */ | 897 | /* ieee5000 */ |
898 | static struct omap_hwmod am33xx_ieee5000_hwmod = { | 898 | static struct omap_hwmod am33xx_ieee5000_hwmod = { |
899 | .name = "ieee5000", | 899 | .name = "ieee5000", |
900 | .class = &am33xx_ieee5000_hwmod_class, | 900 | .class = &am33xx_ieee5000_hwmod_class, |
901 | .main_clk = "ieee5000_fck", | 901 | .main_clk = "ieee5000_fck", |
902 | .clkdm_name = "l3s_clkdm", | 902 | .clkdm_name = "l3s_clkdm", |
903 | .prcm = { | 903 | .prcm = { |
904 | .omap4 = { | 904 | .omap4 = { |
905 | .clkctrl_offs = AM33XX_CM_PER_IEEE5000_CLKCTRL_OFFSET, | 905 | .clkctrl_offs = AM33XX_CM_PER_IEEE5000_CLKCTRL_OFFSET, |
906 | .modulemode = MODULEMODE_SWCTRL, | 906 | .modulemode = MODULEMODE_SWCTRL, |
907 | }, | 907 | }, |
908 | }, | 908 | }, |
909 | }; | 909 | }; |
910 | 910 | ||
911 | 911 | ||
912 | /* 'l3' class */ | 912 | /* 'l3' class */ |
913 | static struct omap_hwmod_class am33xx_l3_hwmod_class = { | 913 | static struct omap_hwmod_class am33xx_l3_hwmod_class = { |
914 | .name = "l3", | 914 | .name = "l3", |
915 | }; | 915 | }; |
916 | 916 | ||
917 | /* l4_hs */ | 917 | /* l4_hs */ |
918 | static struct omap_hwmod am33xx_l4_hs_hwmod = { | 918 | static struct omap_hwmod am33xx_l4_hs_hwmod = { |
919 | .name = "l4_hs", | 919 | .name = "l4_hs", |
920 | .class = &am33xx_l3_hwmod_class, | 920 | .class = &am33xx_l3_hwmod_class, |
921 | .clkdm_name = "l4hs_clkdm", | 921 | .clkdm_name = "l4hs_clkdm", |
922 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), | 922 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), |
923 | .prcm = { | 923 | .prcm = { |
924 | .omap4 = { | 924 | .omap4 = { |
925 | .clkctrl_offs = AM33XX_CM_PER_L4HS_CLKCTRL_OFFSET, | 925 | .clkctrl_offs = AM33XX_CM_PER_L4HS_CLKCTRL_OFFSET, |
926 | .modulemode = MODULEMODE_SWCTRL, | 926 | .modulemode = MODULEMODE_SWCTRL, |
927 | }, | 927 | }, |
928 | }, | 928 | }, |
929 | }; | 929 | }; |
930 | 930 | ||
931 | /* l3_instr */ | 931 | /* l3_instr */ |
932 | static struct omap_hwmod am33xx_l3_instr_hwmod = { | 932 | static struct omap_hwmod am33xx_l3_instr_hwmod = { |
933 | .name = "l3_instr", | 933 | .name = "l3_instr", |
934 | .class = &am33xx_l3_hwmod_class, | 934 | .class = &am33xx_l3_hwmod_class, |
935 | .clkdm_name = "l3_clkdm", | 935 | .clkdm_name = "l3_clkdm", |
936 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), | 936 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), |
937 | .prcm = { | 937 | .prcm = { |
938 | .omap4 = { | 938 | .omap4 = { |
939 | .clkctrl_offs = AM33XX_CM_PER_L3_INSTR_CLKCTRL_OFFSET, | 939 | .clkctrl_offs = AM33XX_CM_PER_L3_INSTR_CLKCTRL_OFFSET, |
940 | .modulemode = MODULEMODE_SWCTRL, | 940 | .modulemode = MODULEMODE_SWCTRL, |
941 | }, | 941 | }, |
942 | }, | 942 | }, |
943 | }; | 943 | }; |
944 | 944 | ||
945 | /* l3_main */ | 945 | /* l3_main */ |
946 | static struct omap_hwmod am33xx_l3_main_hwmod = { | 946 | static struct omap_hwmod am33xx_l3_main_hwmod = { |
947 | .name = "l3_main", | 947 | .name = "l3_main", |
948 | .class = &am33xx_l3_hwmod_class, | 948 | .class = &am33xx_l3_hwmod_class, |
949 | .clkdm_name = "l3_clkdm", | 949 | .clkdm_name = "l3_clkdm", |
950 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), | 950 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), |
951 | .prcm = { | 951 | .prcm = { |
952 | .omap4 = { | 952 | .omap4 = { |
953 | .clkctrl_offs = AM33XX_CM_PER_L3_CLKCTRL_OFFSET, | 953 | .clkctrl_offs = AM33XX_CM_PER_L3_CLKCTRL_OFFSET, |
954 | .modulemode = MODULEMODE_SWCTRL, | 954 | .modulemode = MODULEMODE_SWCTRL, |
955 | }, | 955 | }, |
956 | }, | 956 | }, |
957 | }; | 957 | }; |
958 | 958 | ||
959 | /* 'l4fw' class */ | 959 | /* 'l4fw' class */ |
960 | static struct omap_hwmod_class am33xx_l4fw_hwmod_class = { | 960 | static struct omap_hwmod_class am33xx_l4fw_hwmod_class = { |
961 | .name = "l4fw", | 961 | .name = "l4fw", |
962 | }; | 962 | }; |
963 | 963 | ||
964 | /* l4fw */ | 964 | /* l4fw */ |
965 | static struct omap_hwmod am33xx_l4fw_hwmod = { | 965 | static struct omap_hwmod am33xx_l4fw_hwmod = { |
966 | .name = "l4fw", | 966 | .name = "l4fw", |
967 | .class = &am33xx_l4fw_hwmod_class, | 967 | .class = &am33xx_l4fw_hwmod_class, |
968 | .clkdm_name = "l4fw_clkdm", | 968 | .clkdm_name = "l4fw_clkdm", |
969 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), | 969 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), |
970 | .prcm = { | 970 | .prcm = { |
971 | .omap4 = { | 971 | .omap4 = { |
972 | .clkctrl_offs = AM33XX_CM_PER_L4FW_CLKCTRL_OFFSET, | 972 | .clkctrl_offs = AM33XX_CM_PER_L4FW_CLKCTRL_OFFSET, |
973 | .modulemode = MODULEMODE_SWCTRL, | 973 | .modulemode = MODULEMODE_SWCTRL, |
974 | }, | 974 | }, |
975 | }, | 975 | }, |
976 | }; | 976 | }; |
977 | 977 | ||
978 | /* 'l4ls' class */ | 978 | /* 'l4ls' class */ |
979 | static struct omap_hwmod_class am33xx_l4ls_hwmod_class = { | 979 | static struct omap_hwmod_class am33xx_l4ls_hwmod_class = { |
980 | .name = "l4ls", | 980 | .name = "l4ls", |
981 | }; | 981 | }; |
982 | 982 | ||
983 | /* l4ls */ | 983 | /* l4ls */ |
984 | static struct omap_hwmod am33xx_l4ls_hwmod = { | 984 | static struct omap_hwmod am33xx_l4ls_hwmod = { |
985 | .name = "l4ls", | 985 | .name = "l4ls", |
986 | .class = &am33xx_l4ls_hwmod_class, | 986 | .class = &am33xx_l4ls_hwmod_class, |
987 | .main_clk = "l4ls_gclk", | 987 | .main_clk = "l4ls_gclk", |
988 | .clkdm_name = "l4ls_clkdm", | 988 | .clkdm_name = "l4ls_clkdm", |
989 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), | 989 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), |
990 | .prcm = { | 990 | .prcm = { |
991 | .omap4 = { | 991 | .omap4 = { |
992 | .clkctrl_offs = AM33XX_CM_PER_L4LS_CLKCTRL_OFFSET, | 992 | .clkctrl_offs = AM33XX_CM_PER_L4LS_CLKCTRL_OFFSET, |
993 | .modulemode = MODULEMODE_SWCTRL, | 993 | .modulemode = MODULEMODE_SWCTRL, |
994 | }, | 994 | }, |
995 | }, | 995 | }, |
996 | }; | 996 | }; |
997 | 997 | ||
998 | /* 'lcdc' class */ | 998 | /* 'lcdc' class */ |
999 | static struct omap_hwmod_class am33xx_lcdc_hwmod_class = { | 999 | static struct omap_hwmod_class am33xx_lcdc_hwmod_class = { |
1000 | .name = "lcdc", | 1000 | .name = "lcdc", |
1001 | }; | 1001 | }; |
1002 | 1002 | ||
1003 | /* lcdc */ | 1003 | /* lcdc */ |
1004 | static struct omap_hwmod_irq_info am33xx_lcdc_irqs[] = { | 1004 | static struct omap_hwmod_irq_info am33xx_lcdc_irqs[] = { |
1005 | { .irq = AM33XX_IRQ_LCD }, | 1005 | { .irq = AM33XX_IRQ_LCD }, |
1006 | { .irq = -1 } | 1006 | { .irq = -1 } |
1007 | }; | 1007 | }; |
1008 | 1008 | ||
1009 | static struct omap_hwmod am33xx_lcdc_hwmod = { | 1009 | static struct omap_hwmod am33xx_lcdc_hwmod = { |
1010 | .name = "lcdc", | 1010 | .name = "lcdc", |
1011 | .class = &am33xx_lcdc_hwmod_class, | 1011 | .class = &am33xx_lcdc_hwmod_class, |
1012 | .mpu_irqs = am33xx_lcdc_irqs, | 1012 | .mpu_irqs = am33xx_lcdc_irqs, |
1013 | .main_clk = "lcdc_fck", | 1013 | .main_clk = "lcdc_fck", |
1014 | .clkdm_name = "lcdc_clkdm", | 1014 | .clkdm_name = "lcdc_clkdm", |
1015 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), | 1015 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), |
1016 | .prcm = { | 1016 | .prcm = { |
1017 | .omap4 = { | 1017 | .omap4 = { |
1018 | .clkctrl_offs = AM33XX_CM_PER_LCDC_CLKCTRL_OFFSET, | 1018 | .clkctrl_offs = AM33XX_CM_PER_LCDC_CLKCTRL_OFFSET, |
1019 | .modulemode = MODULEMODE_SWCTRL, | 1019 | .modulemode = MODULEMODE_SWCTRL, |
1020 | }, | 1020 | }, |
1021 | }, | 1021 | }, |
1022 | }; | 1022 | }; |
1023 | 1023 | ||
1024 | /* 'mcasp' class */ | 1024 | /* 'mcasp' class */ |
1025 | static struct omap_hwmod_class am33xx_mcasp_hwmod_class = { | 1025 | static struct omap_hwmod_class am33xx_mcasp_hwmod_class = { |
1026 | .name = "mcasp", | 1026 | .name = "mcasp", |
1027 | }; | 1027 | }; |
1028 | 1028 | ||
1029 | /* mcasp0 */ | 1029 | /* mcasp0 */ |
1030 | static struct omap_hwmod_irq_info am33xx_mcasp0_irqs[] = { | 1030 | static struct omap_hwmod_irq_info am33xx_mcasp0_irqs[] = { |
1031 | { .irq = 80 }, | 1031 | { .irq = 80 }, |
1032 | { .irq = -1 } | 1032 | { .irq = -1 } |
1033 | }; | 1033 | }; |
1034 | 1034 | ||
1035 | static struct omap_hwmod am33xx_mcasp0_hwmod = { | 1035 | static struct omap_hwmod am33xx_mcasp0_hwmod = { |
1036 | .name = "mcasp0", | 1036 | .name = "mcasp0", |
1037 | .class = &am33xx_mcasp_hwmod_class, | 1037 | .class = &am33xx_mcasp_hwmod_class, |
1038 | .mpu_irqs = am33xx_mcasp0_irqs, | 1038 | .mpu_irqs = am33xx_mcasp0_irqs, |
1039 | .main_clk = "mcasp0_fck", | 1039 | .main_clk = "mcasp0_fck", |
1040 | .clkdm_name = "l3s_clkdm", | 1040 | .clkdm_name = "l3s_clkdm", |
1041 | .prcm = { | 1041 | .prcm = { |
1042 | .omap4 = { | 1042 | .omap4 = { |
1043 | .clkctrl_offs = AM33XX_CM_PER_MCASP0_CLKCTRL_OFFSET, | 1043 | .clkctrl_offs = AM33XX_CM_PER_MCASP0_CLKCTRL_OFFSET, |
1044 | .modulemode = MODULEMODE_SWCTRL, | 1044 | .modulemode = MODULEMODE_SWCTRL, |
1045 | }, | 1045 | }, |
1046 | }, | 1046 | }, |
1047 | }; | 1047 | }; |
1048 | 1048 | ||
1049 | /* 'mmc' class */ | 1049 | /* 'mmc' class */ |
1050 | 1050 | ||
1051 | static struct omap_hwmod_class_sysconfig am33xx_mmc_sysc = { | 1051 | static struct omap_hwmod_class_sysconfig am33xx_mmc_sysc = { |
1052 | .rev_offs = 0x1fc, | 1052 | .rev_offs = 0x1fc, |
1053 | .sysc_offs = 0x10, | 1053 | .sysc_offs = 0x10, |
1054 | .syss_offs = 0x14, | 1054 | .syss_offs = 0x14, |
1055 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | 1055 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | |
1056 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | 1056 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | |
1057 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), | 1057 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), |
1058 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | 1058 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
1059 | .sysc_fields = &omap_hwmod_sysc_type1, | 1059 | .sysc_fields = &omap_hwmod_sysc_type1, |
1060 | }; | 1060 | }; |
1061 | 1061 | ||
1062 | static struct omap_hwmod_class am33xx_mmc_hwmod_class = { | 1062 | static struct omap_hwmod_class am33xx_mmc_hwmod_class = { |
1063 | .name = "mmc", | 1063 | .name = "mmc", |
1064 | .sysc = &am33xx_mmc_sysc, | 1064 | .sysc = &am33xx_mmc_sysc, |
1065 | }; | 1065 | }; |
1066 | 1066 | ||
1067 | /* mmc0 */ | 1067 | /* mmc0 */ |
1068 | static struct omap_hwmod_irq_info am33xx_mmc0_irqs[] = { | 1068 | static struct omap_hwmod_irq_info am33xx_mmc0_irqs[] = { |
1069 | { .irq = AM33XX_IRQ_MMCHS0 }, | 1069 | { .irq = AM33XX_IRQ_MMCHS0 }, |
1070 | { .irq = -1 } | 1070 | { .irq = -1 } |
1071 | }; | 1071 | }; |
1072 | 1072 | ||
1073 | static struct omap_hwmod_dma_info am33xx_mmc0_edma_reqs[] = { | 1073 | static struct omap_hwmod_dma_info am33xx_mmc0_edma_reqs[] = { |
1074 | { .name = "tx", .dma_req = AM33XX_DMA_MMCHS0_W, }, | 1074 | { .name = "tx", .dma_req = AM33XX_DMA_MMCHS0_W, }, |
1075 | { .name = "rx", .dma_req = AM33XX_DMA_MMCHS0_R, }, | 1075 | { .name = "rx", .dma_req = AM33XX_DMA_MMCHS0_R, }, |
1076 | { .dma_req = -1 } | 1076 | { .dma_req = -1 } |
1077 | }; | 1077 | }; |
1078 | 1078 | ||
1079 | static struct omap_hwmod_addr_space am33xx_mmc0_addr_space[] = { | 1079 | static struct omap_hwmod_addr_space am33xx_mmc0_addr_space[] = { |
1080 | { | 1080 | { |
1081 | .pa_start = AM33XX_MMC0_BASE, | 1081 | .pa_start = AM33XX_MMC0_BASE, |
1082 | .pa_end = AM33XX_MMC0_BASE + SZ_4K - 1, | 1082 | .pa_end = AM33XX_MMC0_BASE + SZ_4K - 1, |
1083 | .flags = ADDR_TYPE_RT | 1083 | .flags = ADDR_TYPE_RT |
1084 | }, | 1084 | }, |
1085 | { } | 1085 | { } |
1086 | }; | 1086 | }; |
1087 | 1087 | ||
1088 | static struct omap_hwmod_ocp_if am33xx_l4ls__mmc0 = { | 1088 | static struct omap_hwmod_ocp_if am33xx_l4ls__mmc0 = { |
1089 | .master = &am33xx_l4ls_hwmod, | 1089 | .master = &am33xx_l4ls_hwmod, |
1090 | .slave = &am33xx_mmc0_hwmod, | 1090 | .slave = &am33xx_mmc0_hwmod, |
1091 | .clk = "mmc0_ick", | 1091 | .clk = "mmc0_ick", |
1092 | .addr = am33xx_mmc0_addr_space, | 1092 | .addr = am33xx_mmc0_addr_space, |
1093 | .user = OCP_USER_MPU, | 1093 | .user = OCP_USER_MPU, |
1094 | }; | 1094 | }; |
1095 | 1095 | ||
1096 | static struct omap_hwmod_ocp_if *am33xx_mmc0_slaves[] = { | 1096 | static struct omap_hwmod_ocp_if *am33xx_mmc0_slaves[] = { |
1097 | &am33xx_l4ls__mmc0, | 1097 | &am33xx_l4ls__mmc0, |
1098 | }; | 1098 | }; |
1099 | 1099 | ||
1100 | static struct omap_mmc_dev_attr am33xx_mmc0_dev_attr = { | 1100 | static struct omap_mmc_dev_attr am33xx_mmc0_dev_attr = { |
1101 | .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, | 1101 | .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, |
1102 | }; | 1102 | }; |
1103 | 1103 | ||
1104 | static struct omap_hwmod am33xx_mmc0_hwmod = { | 1104 | static struct omap_hwmod am33xx_mmc0_hwmod = { |
1105 | .name = "mmc1", | 1105 | .name = "mmc1", |
1106 | .class = &am33xx_mmc_hwmod_class, | 1106 | .class = &am33xx_mmc_hwmod_class, |
1107 | .mpu_irqs = am33xx_mmc0_irqs, | 1107 | .mpu_irqs = am33xx_mmc0_irqs, |
1108 | .sdma_reqs = am33xx_mmc0_edma_reqs, | 1108 | .sdma_reqs = am33xx_mmc0_edma_reqs, |
1109 | .main_clk = "mmc0_fck", | 1109 | .main_clk = "mmc0_fck", |
1110 | .clkdm_name = "l4ls_clkdm", | 1110 | .clkdm_name = "l4ls_clkdm", |
1111 | .prcm = { | 1111 | .prcm = { |
1112 | .omap4 = { | 1112 | .omap4 = { |
1113 | .clkctrl_offs = AM33XX_CM_PER_MMC0_CLKCTRL_OFFSET, | 1113 | .clkctrl_offs = AM33XX_CM_PER_MMC0_CLKCTRL_OFFSET, |
1114 | .modulemode = MODULEMODE_SWCTRL, | 1114 | .modulemode = MODULEMODE_SWCTRL, |
1115 | }, | 1115 | }, |
1116 | }, | 1116 | }, |
1117 | .dev_attr = &am33xx_mmc0_dev_attr, | 1117 | .dev_attr = &am33xx_mmc0_dev_attr, |
1118 | .slaves = am33xx_mmc0_slaves, | 1118 | .slaves = am33xx_mmc0_slaves, |
1119 | .slaves_cnt = ARRAY_SIZE(am33xx_mmc0_slaves), | 1119 | .slaves_cnt = ARRAY_SIZE(am33xx_mmc0_slaves), |
1120 | }; | 1120 | }; |
1121 | 1121 | ||
1122 | /* mmc1 */ | 1122 | /* mmc1 */ |
1123 | static struct omap_hwmod_irq_info am33xx_mmc1_irqs[] = { | 1123 | static struct omap_hwmod_irq_info am33xx_mmc1_irqs[] = { |
1124 | { .irq = AM33XX_IRQ_MMCHS1 }, | 1124 | { .irq = AM33XX_IRQ_MMCHS1 }, |
1125 | { .irq = -1 } | 1125 | { .irq = -1 } |
1126 | }; | 1126 | }; |
1127 | 1127 | ||
1128 | static struct omap_hwmod_dma_info am33xx_mmc1_edma_reqs[] = { | 1128 | static struct omap_hwmod_dma_info am33xx_mmc1_edma_reqs[] = { |
1129 | { .name = "tx", .dma_req = AM33XX_DMA_MMCHS1_W, }, | 1129 | { .name = "tx", .dma_req = AM33XX_DMA_MMCHS1_W, }, |
1130 | { .name = "rx", .dma_req = AM33XX_DMA_MMCHS1_R, }, | 1130 | { .name = "rx", .dma_req = AM33XX_DMA_MMCHS1_R, }, |
1131 | { .dma_req = -1 } | 1131 | { .dma_req = -1 } |
1132 | }; | 1132 | }; |
1133 | 1133 | ||
1134 | static struct omap_hwmod_addr_space am33xx_mmc1_addr_space[] = { | 1134 | static struct omap_hwmod_addr_space am33xx_mmc1_addr_space[] = { |
1135 | { | 1135 | { |
1136 | .pa_start = AM33XX_MMC1_BASE, | 1136 | .pa_start = AM33XX_MMC1_BASE, |
1137 | .pa_end = AM33XX_MMC1_BASE + SZ_4K - 1, | 1137 | .pa_end = AM33XX_MMC1_BASE + SZ_4K - 1, |
1138 | .flags = ADDR_TYPE_RT | 1138 | .flags = ADDR_TYPE_RT |
1139 | }, | 1139 | }, |
1140 | { } | 1140 | { } |
1141 | }; | 1141 | }; |
1142 | 1142 | ||
1143 | static struct omap_hwmod_ocp_if am33xx_l4ls__mmc1 = { | 1143 | static struct omap_hwmod_ocp_if am33xx_l4ls__mmc1 = { |
1144 | .master = &am33xx_l4ls_hwmod, | 1144 | .master = &am33xx_l4ls_hwmod, |
1145 | .slave = &am33xx_mmc1_hwmod, | 1145 | .slave = &am33xx_mmc1_hwmod, |
1146 | .clk = "mmc1_ick", | 1146 | .clk = "mmc1_ick", |
1147 | .addr = am33xx_mmc1_addr_space, | 1147 | .addr = am33xx_mmc1_addr_space, |
1148 | .user = OCP_USER_MPU, | 1148 | .user = OCP_USER_MPU, |
1149 | }; | 1149 | }; |
1150 | 1150 | ||
1151 | static struct omap_hwmod_ocp_if *am33xx_mmc1_slaves[] = { | 1151 | static struct omap_hwmod_ocp_if *am33xx_mmc1_slaves[] = { |
1152 | &am33xx_l4ls__mmc1, | 1152 | &am33xx_l4ls__mmc1, |
1153 | }; | 1153 | }; |
1154 | 1154 | ||
1155 | static struct omap_mmc_dev_attr am33xx_mmc1_dev_attr = { | 1155 | static struct omap_mmc_dev_attr am33xx_mmc1_dev_attr = { |
1156 | .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, | 1156 | .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, |
1157 | }; | 1157 | }; |
1158 | 1158 | ||
1159 | static struct omap_hwmod am33xx_mmc1_hwmod = { | 1159 | static struct omap_hwmod am33xx_mmc1_hwmod = { |
1160 | .name = "mmc2", | 1160 | .name = "mmc2", |
1161 | .class = &am33xx_mmc_hwmod_class, | 1161 | .class = &am33xx_mmc_hwmod_class, |
1162 | .mpu_irqs = am33xx_mmc1_irqs, | 1162 | .mpu_irqs = am33xx_mmc1_irqs, |
1163 | .sdma_reqs = am33xx_mmc1_edma_reqs, | 1163 | .sdma_reqs = am33xx_mmc1_edma_reqs, |
1164 | .main_clk = "mmc1_fck", | 1164 | .main_clk = "mmc1_fck", |
1165 | .clkdm_name = "l4ls_clkdm", | 1165 | .clkdm_name = "l4ls_clkdm", |
1166 | .prcm = { | 1166 | .prcm = { |
1167 | .omap4 = { | 1167 | .omap4 = { |
1168 | .clkctrl_offs = AM33XX_CM_PER_MMC1_CLKCTRL_OFFSET, | 1168 | .clkctrl_offs = AM33XX_CM_PER_MMC1_CLKCTRL_OFFSET, |
1169 | .modulemode = MODULEMODE_SWCTRL, | 1169 | .modulemode = MODULEMODE_SWCTRL, |
1170 | }, | 1170 | }, |
1171 | }, | 1171 | }, |
1172 | .dev_attr = &am33xx_mmc1_dev_attr, | 1172 | .dev_attr = &am33xx_mmc1_dev_attr, |
1173 | .slaves = am33xx_mmc1_slaves, | 1173 | .slaves = am33xx_mmc1_slaves, |
1174 | .slaves_cnt = ARRAY_SIZE(am33xx_mmc1_slaves), | 1174 | .slaves_cnt = ARRAY_SIZE(am33xx_mmc1_slaves), |
1175 | }; | 1175 | }; |
1176 | 1176 | ||
1177 | /* mmc2 */ | 1177 | /* mmc2 */ |
1178 | static struct omap_hwmod_irq_info am33xx_mmc2_irqs[] = { | 1178 | static struct omap_hwmod_irq_info am33xx_mmc2_irqs[] = { |
1179 | { .irq = AM33XX_IRQ_MMCHS2 }, | 1179 | { .irq = AM33XX_IRQ_MMCHS2 }, |
1180 | { .irq = -1 } | 1180 | { .irq = -1 } |
1181 | }; | 1181 | }; |
1182 | 1182 | ||
1183 | static struct omap_hwmod_dma_info am33xx_mmc2_edma_reqs[] = { | 1183 | static struct omap_hwmod_dma_info am33xx_mmc2_edma_reqs[] = { |
1184 | { .name = "tx", .dma_req = AM33XX_DMA_MMCHS2_W, }, | 1184 | { .name = "tx", .dma_req = AM33XX_DMA_MMCHS2_W, }, |
1185 | { .name = "rx", .dma_req = AM33XX_DMA_MMCHS2_R, }, | 1185 | { .name = "rx", .dma_req = AM33XX_DMA_MMCHS2_R, }, |
1186 | { .dma_req = -1 } | 1186 | { .dma_req = -1 } |
1187 | }; | 1187 | }; |
1188 | 1188 | ||
1189 | static struct omap_hwmod_addr_space am33xx_mmc2_addr_space[] = { | 1189 | static struct omap_hwmod_addr_space am33xx_mmc2_addr_space[] = { |
1190 | { | 1190 | { |
1191 | .pa_start = AM33XX_MMC2_BASE, | 1191 | .pa_start = AM33XX_MMC2_BASE, |
1192 | .pa_end = AM33XX_MMC2_BASE + SZ_64K - 1, | 1192 | .pa_end = AM33XX_MMC2_BASE + SZ_64K - 1, |
1193 | .flags = ADDR_TYPE_RT | 1193 | .flags = ADDR_TYPE_RT |
1194 | }, | 1194 | }, |
1195 | { } | 1195 | { } |
1196 | }; | 1196 | }; |
1197 | 1197 | ||
1198 | static struct omap_hwmod_ocp_if am33xx_l3_main__mmc2 = { | 1198 | static struct omap_hwmod_ocp_if am33xx_l3_main__mmc2 = { |
1199 | .master = &am33xx_l3_main_hwmod, | 1199 | .master = &am33xx_l3_main_hwmod, |
1200 | .slave = &am33xx_mmc2_hwmod, | 1200 | .slave = &am33xx_mmc2_hwmod, |
1201 | .clk = "mmc2_ick", | 1201 | .clk = "mmc2_ick", |
1202 | .addr = am33xx_mmc2_addr_space, | 1202 | .addr = am33xx_mmc2_addr_space, |
1203 | .user = OCP_USER_MPU, | 1203 | .user = OCP_USER_MPU, |
1204 | }; | 1204 | }; |
1205 | 1205 | ||
1206 | static struct omap_hwmod_ocp_if *am33xx_mmc2_slaves[] = { | 1206 | static struct omap_hwmod_ocp_if *am33xx_mmc2_slaves[] = { |
1207 | &am33xx_l3_main__mmc2, | 1207 | &am33xx_l3_main__mmc2, |
1208 | }; | 1208 | }; |
1209 | 1209 | ||
1210 | static struct omap_mmc_dev_attr am33xx_mmc2_dev_attr = { | 1210 | static struct omap_mmc_dev_attr am33xx_mmc2_dev_attr = { |
1211 | .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, | 1211 | .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, |
1212 | }; | 1212 | }; |
1213 | static struct omap_hwmod am33xx_mmc2_hwmod = { | 1213 | static struct omap_hwmod am33xx_mmc2_hwmod = { |
1214 | .name = "mmc3", | 1214 | .name = "mmc3", |
1215 | .class = &am33xx_mmc_hwmod_class, | 1215 | .class = &am33xx_mmc_hwmod_class, |
1216 | .mpu_irqs = am33xx_mmc2_irqs, | 1216 | .mpu_irqs = am33xx_mmc2_irqs, |
1217 | .sdma_reqs = am33xx_mmc2_edma_reqs, | 1217 | .sdma_reqs = am33xx_mmc2_edma_reqs, |
1218 | .main_clk = "mmc2_fck", | 1218 | .main_clk = "mmc2_fck", |
1219 | .clkdm_name = "l3s_clkdm", | 1219 | .clkdm_name = "l3s_clkdm", |
1220 | .prcm = { | 1220 | .prcm = { |
1221 | .omap4 = { | 1221 | .omap4 = { |
1222 | .clkctrl_offs = AM33XX_CM_PER_MMC2_CLKCTRL_OFFSET, | 1222 | .clkctrl_offs = AM33XX_CM_PER_MMC2_CLKCTRL_OFFSET, |
1223 | .modulemode = MODULEMODE_SWCTRL, | 1223 | .modulemode = MODULEMODE_SWCTRL, |
1224 | }, | 1224 | }, |
1225 | }, | 1225 | }, |
1226 | .dev_attr = &am33xx_mmc2_dev_attr, | 1226 | .dev_attr = &am33xx_mmc2_dev_attr, |
1227 | .slaves = am33xx_mmc2_slaves, | 1227 | .slaves = am33xx_mmc2_slaves, |
1228 | .slaves_cnt = ARRAY_SIZE(am33xx_mmc2_slaves), | 1228 | .slaves_cnt = ARRAY_SIZE(am33xx_mmc2_slaves), |
1229 | }; | 1229 | }; |
1230 | 1230 | ||
1231 | /* Master interfaces on the MPU interconnect */ | 1231 | /* Master interfaces on the MPU interconnect */ |
1232 | static struct omap_hwmod_ocp_if *am33xx_l3_mpu_masters[] = { | 1232 | static struct omap_hwmod_ocp_if *am33xx_l3_mpu_masters[] = { |
1233 | &am33xx_mpu__l3_slow, | 1233 | &am33xx_mpu__l3_slow, |
1234 | }; | 1234 | }; |
1235 | 1235 | ||
1236 | /* mpu */ | 1236 | /* mpu */ |
1237 | static struct omap_hwmod am33xx_mpu_hwmod = { | 1237 | static struct omap_hwmod am33xx_mpu_hwmod = { |
1238 | .name = "mpu", | 1238 | .name = "mpu", |
1239 | .class = &mpu_hwmod_class, | 1239 | .class = &mpu_hwmod_class, |
1240 | .masters = am33xx_l3_mpu_masters, | 1240 | .masters = am33xx_l3_mpu_masters, |
1241 | .masters_cnt = ARRAY_SIZE(am33xx_l3_mpu_masters), | 1241 | .masters_cnt = ARRAY_SIZE(am33xx_l3_mpu_masters), |
1242 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), | 1242 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), |
1243 | .main_clk = "mpu_fck", | 1243 | .main_clk = "mpu_fck", |
1244 | .clkdm_name = "mpu_clkdm", | 1244 | .clkdm_name = "mpu_clkdm", |
1245 | .prcm = { | 1245 | .prcm = { |
1246 | .omap4 = { | 1246 | .omap4 = { |
1247 | .clkctrl_offs = AM33XX_CM_MPU_MPU_CLKCTRL_OFFSET, | 1247 | .clkctrl_offs = AM33XX_CM_MPU_MPU_CLKCTRL_OFFSET, |
1248 | .modulemode = MODULEMODE_SWCTRL, | 1248 | .modulemode = MODULEMODE_SWCTRL, |
1249 | }, | 1249 | }, |
1250 | }, | 1250 | }, |
1251 | }; | 1251 | }; |
1252 | 1252 | ||
1253 | /* 'ocmcram' class */ | 1253 | /* 'ocmcram' class */ |
1254 | static struct omap_hwmod_class am33xx_ocmcram_hwmod_class = { | 1254 | static struct omap_hwmod_class am33xx_ocmcram_hwmod_class = { |
1255 | .name = "ocmcram", | 1255 | .name = "ocmcram", |
1256 | }; | 1256 | }; |
1257 | 1257 | ||
1258 | /* ocmcram */ | 1258 | /* ocmcram */ |
1259 | static struct omap_hwmod am33xx_ocmcram_hwmod = { | 1259 | static struct omap_hwmod am33xx_ocmcram_hwmod = { |
1260 | .name = "ocmcram", | 1260 | .name = "ocmcram", |
1261 | .class = &am33xx_ocmcram_hwmod_class, | 1261 | .class = &am33xx_ocmcram_hwmod_class, |
1262 | .main_clk = "ocmcram_ick", | 1262 | .main_clk = "ocmcram_ick", |
1263 | .clkdm_name = "l3_clkdm", | 1263 | .clkdm_name = "l3_clkdm", |
1264 | .prcm = { | 1264 | .prcm = { |
1265 | .omap4 = { | 1265 | .omap4 = { |
1266 | .clkctrl_offs = AM33XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET, | 1266 | .clkctrl_offs = AM33XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET, |
1267 | .modulemode = MODULEMODE_SWCTRL, | 1267 | .modulemode = MODULEMODE_SWCTRL, |
1268 | }, | 1268 | }, |
1269 | }, | 1269 | }, |
1270 | }; | 1270 | }; |
1271 | 1271 | ||
1272 | /* 'ocpwp' class */ | 1272 | /* 'ocpwp' class */ |
1273 | static struct omap_hwmod_class am33xx_ocpwp_hwmod_class = { | 1273 | static struct omap_hwmod_class am33xx_ocpwp_hwmod_class = { |
1274 | .name = "ocpwp", | 1274 | .name = "ocpwp", |
1275 | }; | 1275 | }; |
1276 | 1276 | ||
1277 | /* ocpwp */ | 1277 | /* ocpwp */ |
1278 | static struct omap_hwmod am33xx_ocpwp_hwmod = { | 1278 | static struct omap_hwmod am33xx_ocpwp_hwmod = { |
1279 | .name = "ocpwp", | 1279 | .name = "ocpwp", |
1280 | .class = &am33xx_ocpwp_hwmod_class, | 1280 | .class = &am33xx_ocpwp_hwmod_class, |
1281 | .main_clk = "ocpwp_fck", | 1281 | .main_clk = "ocpwp_fck", |
1282 | .clkdm_name = "l4ls_clkdm", | 1282 | .clkdm_name = "l4ls_clkdm", |
1283 | .prcm = { | 1283 | .prcm = { |
1284 | .omap4 = { | 1284 | .omap4 = { |
1285 | .clkctrl_offs = AM33XX_CM_PER_OCPWP_CLKCTRL_OFFSET, | 1285 | .clkctrl_offs = AM33XX_CM_PER_OCPWP_CLKCTRL_OFFSET, |
1286 | .modulemode = MODULEMODE_SWCTRL, | 1286 | .modulemode = MODULEMODE_SWCTRL, |
1287 | }, | 1287 | }, |
1288 | }, | 1288 | }, |
1289 | }; | 1289 | }; |
1290 | 1290 | ||
1291 | /* 'rtc' class */ | 1291 | /* 'rtc' class */ |
1292 | static struct omap_hwmod_class am33xx_rtc_hwmod_class = { | 1292 | static struct omap_hwmod_class am33xx_rtc_hwmod_class = { |
1293 | .name = "rtc", | 1293 | .name = "rtc", |
1294 | }; | 1294 | }; |
1295 | 1295 | ||
1296 | /* rtc */ | 1296 | /* rtc */ |
1297 | static struct omap_hwmod_irq_info am33xx_rtc_irqs[] = { | 1297 | static struct omap_hwmod_irq_info am33xx_rtc_irqs[] = { |
1298 | { .irq = AM33XX_IRQ_RTC_TIMER }, | 1298 | { .irq = AM33XX_IRQ_RTC_TIMER }, |
1299 | { .irq = -1 } | 1299 | { .irq = -1 } |
1300 | }; | 1300 | }; |
1301 | 1301 | ||
1302 | static struct omap_hwmod am33xx_rtc_hwmod = { | 1302 | static struct omap_hwmod am33xx_rtc_hwmod = { |
1303 | .name = "rtc", | 1303 | .name = "rtc", |
1304 | .class = &am33xx_rtc_hwmod_class, | 1304 | .class = &am33xx_rtc_hwmod_class, |
1305 | .mpu_irqs = am33xx_rtc_irqs, | 1305 | .mpu_irqs = am33xx_rtc_irqs, |
1306 | .main_clk = "rtc_fck", | 1306 | .main_clk = "rtc_fck", |
1307 | .clkdm_name = "l4_rtc_clkdm", | 1307 | .clkdm_name = "l4_rtc_clkdm", |
1308 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), | 1308 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), |
1309 | .prcm = { | 1309 | .prcm = { |
1310 | .omap4 = { | 1310 | .omap4 = { |
1311 | .clkctrl_offs = AM33XX_CM_RTC_RTC_CLKCTRL_OFFSET, | 1311 | .clkctrl_offs = AM33XX_CM_RTC_RTC_CLKCTRL_OFFSET, |
1312 | .modulemode = MODULEMODE_SWCTRL, | 1312 | .modulemode = MODULEMODE_SWCTRL, |
1313 | }, | 1313 | }, |
1314 | }, | 1314 | }, |
1315 | }; | 1315 | }; |
1316 | 1316 | ||
1317 | /* 'sha0' class */ | 1317 | /* 'sha0' class */ |
1318 | static struct omap_hwmod_class am33xx_sha0_hwmod_class = { | 1318 | static struct omap_hwmod_class am33xx_sha0_hwmod_class = { |
1319 | .name = "sha0", | 1319 | .name = "sha0", |
1320 | }; | 1320 | }; |
1321 | 1321 | ||
1322 | /* sha0 */ | 1322 | /* sha0 */ |
1323 | static struct omap_hwmod_irq_info am33xx_sha0_irqs[] = { | 1323 | static struct omap_hwmod_irq_info am33xx_sha0_irqs[] = { |
1324 | { .irq = AM33XX_IRQ_SHAEIP57t0_S }, | 1324 | { .irq = AM33XX_IRQ_SHAEIP57t0_S }, |
1325 | { .irq = -1 } | 1325 | { .irq = -1 } |
1326 | }; | 1326 | }; |
1327 | 1327 | ||
1328 | static struct omap_hwmod am33xx_sha0_hwmod = { | 1328 | static struct omap_hwmod am33xx_sha0_hwmod = { |
1329 | .name = "sha0", | 1329 | .name = "sha0", |
1330 | .class = &am33xx_sha0_hwmod_class, | 1330 | .class = &am33xx_sha0_hwmod_class, |
1331 | .mpu_irqs = am33xx_sha0_irqs, | 1331 | .mpu_irqs = am33xx_sha0_irqs, |
1332 | .main_clk = "sha0_fck", | 1332 | .main_clk = "sha0_fck", |
1333 | .clkdm_name = "l3_clkdm", | 1333 | .clkdm_name = "l3_clkdm", |
1334 | .prcm = { | 1334 | .prcm = { |
1335 | .omap4 = { | 1335 | .omap4 = { |
1336 | .clkctrl_offs = AM33XX_CM_PER_SHA0_CLKCTRL_OFFSET, | 1336 | .clkctrl_offs = AM33XX_CM_PER_SHA0_CLKCTRL_OFFSET, |
1337 | .modulemode = MODULEMODE_SWCTRL, | 1337 | .modulemode = MODULEMODE_SWCTRL, |
1338 | }, | 1338 | }, |
1339 | }, | 1339 | }, |
1340 | }; | 1340 | }; |
1341 | 1341 | ||
1342 | /* 'smartreflex' class */ | 1342 | /* 'smartreflex' class */ |
1343 | static struct omap_hwmod_class am33xx_smartreflex_hwmod_class = { | 1343 | static struct omap_hwmod_class am33xx_smartreflex_hwmod_class = { |
1344 | .name = "smartreflex", | 1344 | .name = "smartreflex", |
1345 | }; | 1345 | }; |
1346 | 1346 | ||
1347 | /* smartreflex0 */ | 1347 | /* smartreflex0 */ |
1348 | static struct omap_hwmod_irq_info am33xx_smartreflex0_irqs[] = { | 1348 | static struct omap_hwmod_irq_info am33xx_smartreflex0_irqs[] = { |
1349 | { .irq = AM33XX_IRQ_SMARTREFLEX0 }, | 1349 | { .irq = AM33XX_IRQ_SMARTREFLEX0 }, |
1350 | { .irq = -1 } | 1350 | { .irq = -1 } |
1351 | }; | 1351 | }; |
1352 | 1352 | ||
1353 | static struct omap_hwmod am33xx_smartreflex0_hwmod = { | 1353 | static struct omap_hwmod am33xx_smartreflex0_hwmod = { |
1354 | .name = "smartreflex0", | 1354 | .name = "smartreflex0", |
1355 | .class = &am33xx_smartreflex_hwmod_class, | 1355 | .class = &am33xx_smartreflex_hwmod_class, |
1356 | .mpu_irqs = am33xx_smartreflex0_irqs, | 1356 | .mpu_irqs = am33xx_smartreflex0_irqs, |
1357 | .main_clk = "smartreflex0_fck", | 1357 | .main_clk = "smartreflex0_fck", |
1358 | .clkdm_name = "l4_wkup_clkdm", | 1358 | .clkdm_name = "l4_wkup_clkdm", |
1359 | .prcm = { | 1359 | .prcm = { |
1360 | .omap4 = { | 1360 | .omap4 = { |
1361 | .clkctrl_offs = AM33XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET, | 1361 | .clkctrl_offs = AM33XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET, |
1362 | .modulemode = MODULEMODE_SWCTRL, | 1362 | .modulemode = MODULEMODE_SWCTRL, |
1363 | }, | 1363 | }, |
1364 | }, | 1364 | }, |
1365 | }; | 1365 | }; |
1366 | 1366 | ||
1367 | /* smartreflex1 */ | 1367 | /* smartreflex1 */ |
1368 | static struct omap_hwmod_irq_info am33xx_smartreflex1_irqs[] = { | 1368 | static struct omap_hwmod_irq_info am33xx_smartreflex1_irqs[] = { |
1369 | { .irq = AM33XX_IRQ_SMARTREFLEX1 }, | 1369 | { .irq = AM33XX_IRQ_SMARTREFLEX1 }, |
1370 | { .irq = -1 } | 1370 | { .irq = -1 } |
1371 | }; | 1371 | }; |
1372 | 1372 | ||
1373 | static struct omap_hwmod am33xx_smartreflex1_hwmod = { | 1373 | static struct omap_hwmod am33xx_smartreflex1_hwmod = { |
1374 | .name = "smartreflex1", | 1374 | .name = "smartreflex1", |
1375 | .class = &am33xx_smartreflex_hwmod_class, | 1375 | .class = &am33xx_smartreflex_hwmod_class, |
1376 | .mpu_irqs = am33xx_smartreflex1_irqs, | 1376 | .mpu_irqs = am33xx_smartreflex1_irqs, |
1377 | .main_clk = "smartreflex1_fck", | 1377 | .main_clk = "smartreflex1_fck", |
1378 | .clkdm_name = "l4_wkup_clkdm", | 1378 | .clkdm_name = "l4_wkup_clkdm", |
1379 | .prcm = { | 1379 | .prcm = { |
1380 | .omap4 = { | 1380 | .omap4 = { |
1381 | .clkctrl_offs = AM33XX_CM_WKUP_SMARTREFLEX1_CLKCTRL_OFFSET, | 1381 | .clkctrl_offs = AM33XX_CM_WKUP_SMARTREFLEX1_CLKCTRL_OFFSET, |
1382 | .modulemode = MODULEMODE_SWCTRL, | 1382 | .modulemode = MODULEMODE_SWCTRL, |
1383 | }, | 1383 | }, |
1384 | }, | 1384 | }, |
1385 | }; | 1385 | }; |
1386 | 1386 | ||
1387 | /* 'spi' class */ | 1387 | /* 'spi' class */ |
1388 | 1388 | ||
1389 | static struct omap_hwmod_class_sysconfig am33xx_mcspi_sysc = { | 1389 | static struct omap_hwmod_class_sysconfig am33xx_mcspi_sysc = { |
1390 | .rev_offs = 0x0000, | 1390 | .rev_offs = 0x0000, |
1391 | .sysc_offs = 0x0110, | 1391 | .sysc_offs = 0x0110, |
1392 | .syss_offs = 0x0114, | 1392 | .syss_offs = 0x0114, |
1393 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | 1393 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | |
1394 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE | | 1394 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE | |
1395 | SYSS_HAS_RESET_STATUS), | 1395 | SYSS_HAS_RESET_STATUS), |
1396 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | 1396 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
1397 | .sysc_fields = &omap_hwmod_sysc_type1, | 1397 | .sysc_fields = &omap_hwmod_sysc_type1, |
1398 | }; | 1398 | }; |
1399 | 1399 | ||
1400 | static struct omap_hwmod_class am33xx_spi_hwmod_class = { | 1400 | static struct omap_hwmod_class am33xx_spi_hwmod_class = { |
1401 | .name = "mcspi", | 1401 | .name = "mcspi", |
1402 | .sysc = &am33xx_mcspi_sysc, | 1402 | .sysc = &am33xx_mcspi_sysc, |
1403 | .rev = OMAP4_MCSPI_REV, | 1403 | .rev = OMAP4_MCSPI_REV, |
1404 | }; | 1404 | }; |
1405 | 1405 | ||
1406 | /* spi0 */ | 1406 | /* spi0 */ |
1407 | static struct omap_hwmod_irq_info am33xx_spi0_irqs[] = { | 1407 | static struct omap_hwmod_irq_info am33xx_spi0_irqs[] = { |
1408 | { .irq = AM33XX_IRQ_MCSPIOCP0 }, | 1408 | { .irq = AM33XX_IRQ_MCSPIOCP0 }, |
1409 | { .irq = -1 } | 1409 | { .irq = -1 } |
1410 | }; | 1410 | }; |
1411 | 1411 | ||
1412 | struct omap_hwmod_dma_info am33xx_mcspi0_sdma_reqs[] = { | 1412 | struct omap_hwmod_dma_info am33xx_mcspi0_sdma_reqs[] = { |
1413 | { .name = "rx0", .dma_req = AM33XX_DMA_SPIOCP0_CH0R }, | 1413 | { .name = "rx0", .dma_req = AM33XX_DMA_SPIOCP0_CH0R }, |
1414 | { .name = "tx0", .dma_req = AM33XX_DMA_SPIOCP0_CH0W }, | 1414 | { .name = "tx0", .dma_req = AM33XX_DMA_SPIOCP0_CH0W }, |
1415 | { .name = "rx1", .dma_req = AM33XX_DMA_SPIOCP0_CH1R }, | 1415 | { .name = "rx1", .dma_req = AM33XX_DMA_SPIOCP0_CH1R }, |
1416 | { .name = "tx1", .dma_req = AM33XX_DMA_SPIOCP0_CH1W }, | 1416 | { .name = "tx1", .dma_req = AM33XX_DMA_SPIOCP0_CH1W }, |
1417 | { .dma_req = -1 } | 1417 | { .dma_req = -1 } |
1418 | }; | 1418 | }; |
1419 | 1419 | ||
1420 | struct omap_hwmod_addr_space am33xx_mcspi0_addr_space[] = { | 1420 | struct omap_hwmod_addr_space am33xx_mcspi0_addr_space[] = { |
1421 | { | 1421 | { |
1422 | .pa_start = AM33XX_SPI0_BASE, | 1422 | .pa_start = AM33XX_SPI0_BASE, |
1423 | .pa_end = AM33XX_SPI0_BASE + SZ_1K - 1, | 1423 | .pa_end = AM33XX_SPI0_BASE + SZ_1K - 1, |
1424 | .flags = ADDR_TYPE_RT | 1424 | .flags = ADDR_TYPE_RT |
1425 | }, | 1425 | }, |
1426 | { } | 1426 | { } |
1427 | }; | 1427 | }; |
1428 | 1428 | ||
1429 | struct omap_hwmod_ocp_if am33xx_l4_core__mcspi0 = { | 1429 | struct omap_hwmod_ocp_if am33xx_l4_core__mcspi0 = { |
1430 | .master = &am33xx_l4per_hwmod, | 1430 | .master = &am33xx_l4per_hwmod, |
1431 | .slave = &am33xx_spi0_hwmod, | 1431 | .slave = &am33xx_spi0_hwmod, |
1432 | .clk = "spi0_ick", | 1432 | .clk = "spi0_ick", |
1433 | .addr = am33xx_mcspi0_addr_space, | 1433 | .addr = am33xx_mcspi0_addr_space, |
1434 | .user = OCP_USER_MPU, | 1434 | .user = OCP_USER_MPU, |
1435 | }; | 1435 | }; |
1436 | 1436 | ||
1437 | static struct omap_hwmod_ocp_if *am33xx_mcspi0_slaves[] = { | 1437 | static struct omap_hwmod_ocp_if *am33xx_mcspi0_slaves[] = { |
1438 | &am33xx_l4_core__mcspi0, | 1438 | &am33xx_l4_core__mcspi0, |
1439 | }; | 1439 | }; |
1440 | 1440 | ||
1441 | struct omap2_mcspi_dev_attr mcspi_attrib = { | 1441 | struct omap2_mcspi_dev_attr mcspi_attrib = { |
1442 | .num_chipselect = 2, | 1442 | .num_chipselect = 2, |
1443 | }; | 1443 | }; |
1444 | static struct omap_hwmod am33xx_spi0_hwmod = { | 1444 | static struct omap_hwmod am33xx_spi0_hwmod = { |
1445 | .name = "spi0", | 1445 | .name = "spi0", |
1446 | .class = &am33xx_spi_hwmod_class, | 1446 | .class = &am33xx_spi_hwmod_class, |
1447 | .mpu_irqs = am33xx_spi0_irqs, | 1447 | .mpu_irqs = am33xx_spi0_irqs, |
1448 | .sdma_reqs = am33xx_mcspi0_sdma_reqs, | 1448 | .sdma_reqs = am33xx_mcspi0_sdma_reqs, |
1449 | .main_clk = "spi0_fck", | 1449 | .main_clk = "spi0_fck", |
1450 | .clkdm_name = "l4ls_clkdm", | 1450 | .clkdm_name = "l4ls_clkdm", |
1451 | .prcm = { | 1451 | .prcm = { |
1452 | .omap4 = { | 1452 | .omap4 = { |
1453 | .clkctrl_offs = AM33XX_CM_PER_SPI0_CLKCTRL_OFFSET, | 1453 | .clkctrl_offs = AM33XX_CM_PER_SPI0_CLKCTRL_OFFSET, |
1454 | .modulemode = MODULEMODE_SWCTRL, | 1454 | .modulemode = MODULEMODE_SWCTRL, |
1455 | }, | 1455 | }, |
1456 | }, | 1456 | }, |
1457 | .dev_attr = &mcspi_attrib, | 1457 | .dev_attr = &mcspi_attrib, |
1458 | .slaves = am33xx_mcspi0_slaves, | 1458 | .slaves = am33xx_mcspi0_slaves, |
1459 | .slaves_cnt = ARRAY_SIZE(am33xx_mcspi0_slaves), | 1459 | .slaves_cnt = ARRAY_SIZE(am33xx_mcspi0_slaves), |
1460 | }; | 1460 | }; |
1461 | 1461 | ||
1462 | /* spi1 */ | 1462 | /* spi1 */ |
1463 | static struct omap_hwmod_irq_info am33xx_spi1_irqs[] = { | 1463 | static struct omap_hwmod_irq_info am33xx_spi1_irqs[] = { |
1464 | { .irq = AM33XX_IRQ_SPI1 }, | 1464 | { .irq = AM33XX_IRQ_SPI1 }, |
1465 | { .irq = -1 } | 1465 | { .irq = -1 } |
1466 | }; | 1466 | }; |
1467 | 1467 | ||
1468 | struct omap_hwmod_dma_info am33xx_mcspi1_sdma_reqs[] = { | 1468 | struct omap_hwmod_dma_info am33xx_mcspi1_sdma_reqs[] = { |
1469 | { .name = "rx0", .dma_req = AM33XX_DMA_SPIOCP1_CH0R }, | 1469 | { .name = "rx0", .dma_req = AM33XX_DMA_SPIOCP1_CH0R }, |
1470 | { .name = "tx0", .dma_req = AM33XX_DMA_SPIOCP1_CH0W }, | 1470 | { .name = "tx0", .dma_req = AM33XX_DMA_SPIOCP1_CH0W }, |
1471 | { .name = "rx1", .dma_req = AM33XX_DMA_SPIOCP1_CH1R }, | 1471 | { .name = "rx1", .dma_req = AM33XX_DMA_SPIOCP1_CH1R }, |
1472 | { .name = "tx1", .dma_req = AM33XX_DMA_SPIOCP1_CH1W }, | 1472 | { .name = "tx1", .dma_req = AM33XX_DMA_SPIOCP1_CH1W }, |
1473 | { .dma_req = -1 } | 1473 | { .dma_req = -1 } |
1474 | }; | 1474 | }; |
1475 | 1475 | ||
1476 | struct omap_hwmod_addr_space am33xx_mcspi1_addr_space[] = { | 1476 | struct omap_hwmod_addr_space am33xx_mcspi1_addr_space[] = { |
1477 | { | 1477 | { |
1478 | .pa_start = AM33XX_SPI1_BASE, | 1478 | .pa_start = AM33XX_SPI1_BASE, |
1479 | .pa_end = AM33XX_SPI1_BASE + SZ_1K - 1, | 1479 | .pa_end = AM33XX_SPI1_BASE + SZ_1K - 1, |
1480 | .flags = ADDR_TYPE_RT | 1480 | .flags = ADDR_TYPE_RT |
1481 | }, | 1481 | }, |
1482 | { } | 1482 | { } |
1483 | }; | 1483 | }; |
1484 | 1484 | ||
1485 | struct omap_hwmod_ocp_if am33xx_l4_core__mcspi1 = { | 1485 | struct omap_hwmod_ocp_if am33xx_l4_core__mcspi1 = { |
1486 | .master = &am33xx_l4per_hwmod, | 1486 | .master = &am33xx_l4per_hwmod, |
1487 | .slave = &am33xx_spi1_hwmod, | 1487 | .slave = &am33xx_spi1_hwmod, |
1488 | .clk = "spi1_ick", | 1488 | .clk = "spi1_ick", |
1489 | .addr = am33xx_mcspi1_addr_space, | 1489 | .addr = am33xx_mcspi1_addr_space, |
1490 | .user = OCP_USER_MPU, | 1490 | .user = OCP_USER_MPU, |
1491 | }; | 1491 | }; |
1492 | 1492 | ||
1493 | static struct omap_hwmod_ocp_if *am33xx_mcspi1_slaves[] = { | 1493 | static struct omap_hwmod_ocp_if *am33xx_mcspi1_slaves[] = { |
1494 | &am33xx_l4_core__mcspi1, | 1494 | &am33xx_l4_core__mcspi1, |
1495 | }; | 1495 | }; |
1496 | static struct omap_hwmod am33xx_spi1_hwmod = { | 1496 | static struct omap_hwmod am33xx_spi1_hwmod = { |
1497 | .name = "spi1", | 1497 | .name = "spi1", |
1498 | .class = &am33xx_spi_hwmod_class, | 1498 | .class = &am33xx_spi_hwmod_class, |
1499 | .mpu_irqs = am33xx_spi1_irqs, | 1499 | .mpu_irqs = am33xx_spi1_irqs, |
1500 | .sdma_reqs = am33xx_mcspi1_sdma_reqs, | 1500 | .sdma_reqs = am33xx_mcspi1_sdma_reqs, |
1501 | .main_clk = "spi1_fck", | 1501 | .main_clk = "spi1_fck", |
1502 | .clkdm_name = "l4ls_clkdm", | 1502 | .clkdm_name = "l4ls_clkdm", |
1503 | .prcm = { | 1503 | .prcm = { |
1504 | .omap4 = { | 1504 | .omap4 = { |
1505 | .clkctrl_offs = AM33XX_CM_PER_SPI1_CLKCTRL_OFFSET, | 1505 | .clkctrl_offs = AM33XX_CM_PER_SPI1_CLKCTRL_OFFSET, |
1506 | .modulemode = MODULEMODE_SWCTRL, | 1506 | .modulemode = MODULEMODE_SWCTRL, |
1507 | }, | 1507 | }, |
1508 | }, | 1508 | }, |
1509 | .dev_attr = &mcspi_attrib, | 1509 | .dev_attr = &mcspi_attrib, |
1510 | .slaves = am33xx_mcspi1_slaves, | 1510 | .slaves = am33xx_mcspi1_slaves, |
1511 | .slaves_cnt = ARRAY_SIZE(am33xx_mcspi1_slaves), | 1511 | .slaves_cnt = ARRAY_SIZE(am33xx_mcspi1_slaves), |
1512 | }; | 1512 | }; |
1513 | 1513 | ||
1514 | /* 'spinlock' class */ | 1514 | /* 'spinlock' class */ |
1515 | static struct omap_hwmod_class am33xx_spinlock_hwmod_class = { | 1515 | static struct omap_hwmod_class am33xx_spinlock_hwmod_class = { |
1516 | .name = "spinlock", | 1516 | .name = "spinlock", |
1517 | }; | 1517 | }; |
1518 | 1518 | ||
1519 | /* spinlock */ | 1519 | /* spinlock */ |
1520 | static struct omap_hwmod am33xx_spinlock_hwmod = { | 1520 | static struct omap_hwmod am33xx_spinlock_hwmod = { |
1521 | .name = "spinlock", | 1521 | .name = "spinlock", |
1522 | .class = &am33xx_spinlock_hwmod_class, | 1522 | .class = &am33xx_spinlock_hwmod_class, |
1523 | .main_clk = "spinlock_fck", | 1523 | .main_clk = "spinlock_fck", |
1524 | .clkdm_name = "l4ls_clkdm", | 1524 | .clkdm_name = "l4ls_clkdm", |
1525 | .prcm = { | 1525 | .prcm = { |
1526 | .omap4 = { | 1526 | .omap4 = { |
1527 | .clkctrl_offs = AM33XX_CM_PER_SPINLOCK_CLKCTRL_OFFSET, | 1527 | .clkctrl_offs = AM33XX_CM_PER_SPINLOCK_CLKCTRL_OFFSET, |
1528 | .modulemode = MODULEMODE_SWCTRL, | 1528 | .modulemode = MODULEMODE_SWCTRL, |
1529 | }, | 1529 | }, |
1530 | }, | 1530 | }, |
1531 | }; | 1531 | }; |
1532 | 1532 | ||
1533 | /* 'timer 0 & 2-7' class */ | 1533 | /* 'timer 0 & 2-7' class */ |
1534 | static struct omap_hwmod_class_sysconfig am33xx_timer_sysc = { | 1534 | static struct omap_hwmod_class_sysconfig am33xx_timer_sysc = { |
1535 | .rev_offs = 0x0000, | 1535 | .rev_offs = 0x0000, |
1536 | .sysc_offs = 0x0010, | 1536 | .sysc_offs = 0x0010, |
1537 | .syss_offs = 0x0014, | 1537 | .syss_offs = 0x0014, |
1538 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), | 1538 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), |
1539 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | 1539 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | |
1540 | SIDLE_SMART_WKUP), | 1540 | SIDLE_SMART_WKUP), |
1541 | .sysc_fields = &omap_hwmod_sysc_type2, | 1541 | .sysc_fields = &omap_hwmod_sysc_type2, |
1542 | }; | 1542 | }; |
1543 | 1543 | ||
1544 | static struct omap_hwmod_class am33xx_timer_hwmod_class = { | 1544 | static struct omap_hwmod_class am33xx_timer_hwmod_class = { |
1545 | .name = "timer", | 1545 | .name = "timer", |
1546 | .sysc = &am33xx_timer_sysc, | 1546 | .sysc = &am33xx_timer_sysc, |
1547 | }; | 1547 | }; |
1548 | 1548 | ||
1549 | /* timer0 */ | 1549 | /* timer0 */ |
1550 | /* l4 wkup -> timer0 interface */ | 1550 | /* l4 wkup -> timer0 interface */ |
1551 | static struct omap_hwmod_addr_space am33xx_timer0_addr_space[] = { | 1551 | static struct omap_hwmod_addr_space am33xx_timer0_addr_space[] = { |
1552 | { | 1552 | { |
1553 | .pa_start = AM33XX_TIMER0_BASE, | 1553 | .pa_start = AM33XX_TIMER0_BASE, |
1554 | .pa_end = AM33XX_TIMER0_BASE + SZ_1K - 1, | 1554 | .pa_end = AM33XX_TIMER0_BASE + SZ_1K - 1, |
1555 | .flags = ADDR_TYPE_RT | 1555 | .flags = ADDR_TYPE_RT |
1556 | }, | 1556 | }, |
1557 | { } | 1557 | { } |
1558 | }; | 1558 | }; |
1559 | 1559 | ||
1560 | static struct omap_hwmod_ocp_if am33xx_l4wkup__timer0 = { | 1560 | static struct omap_hwmod_ocp_if am33xx_l4wkup__timer0 = { |
1561 | .master = &am33xx_l4wkup_hwmod, | 1561 | .master = &am33xx_l4wkup_hwmod, |
1562 | .slave = &am33xx_timer0_hwmod, | 1562 | .slave = &am33xx_timer0_hwmod, |
1563 | .clk = "timer0_ick", | 1563 | .clk = "timer0_ick", |
1564 | .addr = am33xx_timer0_addr_space, | 1564 | .addr = am33xx_timer0_addr_space, |
1565 | .user = OCP_USER_MPU, | 1565 | .user = OCP_USER_MPU, |
1566 | }; | 1566 | }; |
1567 | 1567 | ||
1568 | static struct omap_hwmod_ocp_if *am33xx_timer0_slaves[] = { | 1568 | static struct omap_hwmod_ocp_if *am33xx_timer0_slaves[] = { |
1569 | &am33xx_l4wkup__timer0, | 1569 | &am33xx_l4wkup__timer0, |
1570 | }; | 1570 | }; |
1571 | 1571 | ||
1572 | static struct omap_hwmod_irq_info am33xx_timer0_irqs[] = { | 1572 | static struct omap_hwmod_irq_info am33xx_timer0_irqs[] = { |
1573 | { .irq = AM33XX_IRQ_DMTIMER0 }, | 1573 | { .irq = AM33XX_IRQ_DMTIMER0 }, |
1574 | { .irq = -1 } | 1574 | { .irq = -1 } |
1575 | }; | 1575 | }; |
1576 | 1576 | ||
1577 | static struct omap_hwmod am33xx_timer0_hwmod = { | 1577 | static struct omap_hwmod am33xx_timer0_hwmod = { |
1578 | .name = "timer0", | 1578 | .name = "timer0", |
1579 | .class = &am33xx_timer_hwmod_class, | 1579 | .class = &am33xx_timer_hwmod_class, |
1580 | .mpu_irqs = am33xx_timer0_irqs, | 1580 | .mpu_irqs = am33xx_timer0_irqs, |
1581 | .main_clk = "timer0_fck", | 1581 | .main_clk = "timer0_fck", |
1582 | .clkdm_name = "l4_wkup_clkdm", | 1582 | .clkdm_name = "l4_wkup_clkdm", |
1583 | .prcm = { | 1583 | .prcm = { |
1584 | .omap4 = { | 1584 | .omap4 = { |
1585 | .clkctrl_offs = AM33XX_CM_WKUP_TIMER0_CLKCTRL_OFFSET, | 1585 | .clkctrl_offs = AM33XX_CM_WKUP_TIMER0_CLKCTRL_OFFSET, |
1586 | .modulemode = MODULEMODE_SWCTRL, | 1586 | .modulemode = MODULEMODE_SWCTRL, |
1587 | }, | 1587 | }, |
1588 | }, | 1588 | }, |
1589 | .slaves = am33xx_timer0_slaves, | 1589 | .slaves = am33xx_timer0_slaves, |
1590 | .slaves_cnt = ARRAY_SIZE(am33xx_timer0_slaves), | 1590 | .slaves_cnt = ARRAY_SIZE(am33xx_timer0_slaves), |
1591 | }; | 1591 | }; |
1592 | 1592 | ||
1593 | /* timer1 1ms */ | 1593 | /* timer1 1ms */ |
1594 | static struct omap_hwmod_class_sysconfig am33xx_timer1ms_sysc = { | 1594 | static struct omap_hwmod_class_sysconfig am33xx_timer1ms_sysc = { |
1595 | .rev_offs = 0x0000, | 1595 | .rev_offs = 0x0000, |
1596 | .sysc_offs = 0x0010, | 1596 | .sysc_offs = 0x0010, |
1597 | .syss_offs = 0x0014, | 1597 | .syss_offs = 0x0014, |
1598 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | 1598 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | |
1599 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE | | 1599 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE | |
1600 | SYSS_HAS_RESET_STATUS), | 1600 | SYSS_HAS_RESET_STATUS), |
1601 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | 1601 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
1602 | .sysc_fields = &omap_hwmod_sysc_type1, | 1602 | .sysc_fields = &omap_hwmod_sysc_type1, |
1603 | }; | 1603 | }; |
1604 | 1604 | ||
1605 | static struct omap_hwmod_class am33xx_timer1ms_hwmod_class = { | 1605 | static struct omap_hwmod_class am33xx_timer1ms_hwmod_class = { |
1606 | .name = "timer", | 1606 | .name = "timer", |
1607 | .sysc = &am33xx_timer1ms_sysc, | 1607 | .sysc = &am33xx_timer1ms_sysc, |
1608 | }; | 1608 | }; |
1609 | 1609 | ||
1610 | /* l4 wkup -> timer1 interface */ | 1610 | /* l4 wkup -> timer1 interface */ |
1611 | static struct omap_hwmod_addr_space am33xx_timer1_addr_space[] = { | 1611 | static struct omap_hwmod_addr_space am33xx_timer1_addr_space[] = { |
1612 | { | 1612 | { |
1613 | .pa_start = AM33XX_TIMER1_BASE, | 1613 | .pa_start = AM33XX_TIMER1_BASE, |
1614 | .pa_end = AM33XX_TIMER1_BASE + SZ_1K - 1, | 1614 | .pa_end = AM33XX_TIMER1_BASE + SZ_1K - 1, |
1615 | .flags = ADDR_TYPE_RT | 1615 | .flags = ADDR_TYPE_RT |
1616 | }, | 1616 | }, |
1617 | { } | 1617 | { } |
1618 | }; | 1618 | }; |
1619 | 1619 | ||
1620 | static struct omap_hwmod_ocp_if am33xx_l4wkup__timer1 = { | 1620 | static struct omap_hwmod_ocp_if am33xx_l4wkup__timer1 = { |
1621 | .master = &am33xx_l4wkup_hwmod, | 1621 | .master = &am33xx_l4wkup_hwmod, |
1622 | .slave = &am33xx_timer1_hwmod, | 1622 | .slave = &am33xx_timer1_hwmod, |
1623 | .clk = "timer1_ick", | 1623 | .clk = "timer1_ick", |
1624 | .addr = am33xx_timer1_addr_space, | 1624 | .addr = am33xx_timer1_addr_space, |
1625 | .user = OCP_USER_MPU, | 1625 | .user = OCP_USER_MPU, |
1626 | }; | 1626 | }; |
1627 | 1627 | ||
1628 | static struct omap_hwmod_ocp_if *am33xx_timer1_slaves[] = { | 1628 | static struct omap_hwmod_ocp_if *am33xx_timer1_slaves[] = { |
1629 | &am33xx_l4wkup__timer1, | 1629 | &am33xx_l4wkup__timer1, |
1630 | }; | 1630 | }; |
1631 | 1631 | ||
1632 | static struct omap_hwmod_irq_info am33xx_timer1_irqs[] = { | 1632 | static struct omap_hwmod_irq_info am33xx_timer1_irqs[] = { |
1633 | { .irq = AM33XX_IRQ_DMTIMER1 }, | 1633 | { .irq = AM33XX_IRQ_DMTIMER1 }, |
1634 | { .irq = -1 } | 1634 | { .irq = -1 } |
1635 | }; | 1635 | }; |
1636 | 1636 | ||
1637 | static struct omap_hwmod am33xx_timer1_hwmod = { | 1637 | static struct omap_hwmod am33xx_timer1_hwmod = { |
1638 | .name = "timer1", | 1638 | .name = "timer1", |
1639 | .class = &am33xx_timer1ms_hwmod_class, | 1639 | .class = &am33xx_timer1ms_hwmod_class, |
1640 | .mpu_irqs = am33xx_timer1_irqs, | 1640 | .mpu_irqs = am33xx_timer1_irqs, |
1641 | .main_clk = "timer1_fck", | 1641 | .main_clk = "timer1_fck", |
1642 | .clkdm_name = "l4_wkup_clkdm", | 1642 | .clkdm_name = "l4_wkup_clkdm", |
1643 | .prcm = { | 1643 | .prcm = { |
1644 | .omap4 = { | 1644 | .omap4 = { |
1645 | .clkctrl_offs = AM33XX_CM_WKUP_TIMER1_CLKCTRL_OFFSET, | 1645 | .clkctrl_offs = AM33XX_CM_WKUP_TIMER1_CLKCTRL_OFFSET, |
1646 | .modulemode = MODULEMODE_SWCTRL, | 1646 | .modulemode = MODULEMODE_SWCTRL, |
1647 | }, | 1647 | }, |
1648 | }, | 1648 | }, |
1649 | .slaves = am33xx_timer1_slaves, | 1649 | .slaves = am33xx_timer1_slaves, |
1650 | .slaves_cnt = ARRAY_SIZE(am33xx_timer1_slaves), | 1650 | .slaves_cnt = ARRAY_SIZE(am33xx_timer1_slaves), |
1651 | }; | 1651 | }; |
1652 | 1652 | ||
1653 | /* timer2 */ | 1653 | /* timer2 */ |
1654 | /* l4 per -> timer2 interface */ | 1654 | /* l4 per -> timer2 interface */ |
1655 | static struct omap_hwmod_addr_space am33xx_timer2_addr_space[] = { | 1655 | static struct omap_hwmod_addr_space am33xx_timer2_addr_space[] = { |
1656 | { | 1656 | { |
1657 | .pa_start = AM33XX_TIMER2_BASE, | 1657 | .pa_start = AM33XX_TIMER2_BASE, |
1658 | .pa_end = AM33XX_TIMER2_BASE + SZ_1K - 1, | 1658 | .pa_end = AM33XX_TIMER2_BASE + SZ_1K - 1, |
1659 | .flags = ADDR_TYPE_RT | 1659 | .flags = ADDR_TYPE_RT |
1660 | }, | 1660 | }, |
1661 | { } | 1661 | { } |
1662 | }; | 1662 | }; |
1663 | 1663 | ||
1664 | static struct omap_hwmod_ocp_if am33xx_l4per__timer2 = { | 1664 | static struct omap_hwmod_ocp_if am33xx_l4per__timer2 = { |
1665 | .master = &am33xx_l4per_hwmod, | 1665 | .master = &am33xx_l4per_hwmod, |
1666 | .slave = &am33xx_timer2_hwmod, | 1666 | .slave = &am33xx_timer2_hwmod, |
1667 | .clk = "timer2_ick", | 1667 | .clk = "timer2_ick", |
1668 | .addr = am33xx_timer2_addr_space, | 1668 | .addr = am33xx_timer2_addr_space, |
1669 | .user = OCP_USER_MPU, | 1669 | .user = OCP_USER_MPU, |
1670 | }; | 1670 | }; |
1671 | 1671 | ||
1672 | static struct omap_hwmod_ocp_if *am33xx_timer2_slaves[] = { | 1672 | static struct omap_hwmod_ocp_if *am33xx_timer2_slaves[] = { |
1673 | &am33xx_l4per__timer2, | 1673 | &am33xx_l4per__timer2, |
1674 | }; | 1674 | }; |
1675 | 1675 | ||
1676 | static struct omap_hwmod_irq_info am33xx_timer2_irqs[] = { | 1676 | static struct omap_hwmod_irq_info am33xx_timer2_irqs[] = { |
1677 | { .irq = AM33XX_IRQ_DMTIMER2 }, | 1677 | { .irq = AM33XX_IRQ_DMTIMER2 }, |
1678 | { .irq = -1 } | 1678 | { .irq = -1 } |
1679 | }; | 1679 | }; |
1680 | 1680 | ||
1681 | static struct omap_hwmod am33xx_timer2_hwmod = { | 1681 | static struct omap_hwmod am33xx_timer2_hwmod = { |
1682 | .name = "timer2", | 1682 | .name = "timer2", |
1683 | .class = &am33xx_timer_hwmod_class, | 1683 | .class = &am33xx_timer_hwmod_class, |
1684 | .mpu_irqs = am33xx_timer2_irqs, | 1684 | .mpu_irqs = am33xx_timer2_irqs, |
1685 | .main_clk = "timer2_fck", | 1685 | .main_clk = "timer2_fck", |
1686 | .prcm = { | 1686 | .prcm = { |
1687 | .omap4 = { | 1687 | .omap4 = { |
1688 | .clkctrl_offs = AM33XX_CM_PER_TIMER2_CLKCTRL_OFFSET, | 1688 | .clkctrl_offs = AM33XX_CM_PER_TIMER2_CLKCTRL_OFFSET, |
1689 | .modulemode = MODULEMODE_SWCTRL, | 1689 | .modulemode = MODULEMODE_SWCTRL, |
1690 | }, | 1690 | }, |
1691 | }, | 1691 | }, |
1692 | .slaves = am33xx_timer2_slaves, | 1692 | .slaves = am33xx_timer2_slaves, |
1693 | .slaves_cnt = ARRAY_SIZE(am33xx_timer2_slaves), | 1693 | .slaves_cnt = ARRAY_SIZE(am33xx_timer2_slaves), |
1694 | .clkdm_name = "l4ls_clkdm", | 1694 | .clkdm_name = "l4ls_clkdm", |
1695 | }; | 1695 | }; |
1696 | 1696 | ||
1697 | /* timer3 */ | 1697 | /* timer3 */ |
1698 | /* l4 per -> timer3 interface */ | 1698 | /* l4 per -> timer3 interface */ |
1699 | static struct omap_hwmod_addr_space am33xx_timer3_addr_space[] = { | 1699 | static struct omap_hwmod_addr_space am33xx_timer3_addr_space[] = { |
1700 | { | 1700 | { |
1701 | .pa_start = AM33XX_TIMER3_BASE, | 1701 | .pa_start = AM33XX_TIMER3_BASE, |
1702 | .pa_end = AM33XX_TIMER3_BASE + SZ_1K - 1, | 1702 | .pa_end = AM33XX_TIMER3_BASE + SZ_1K - 1, |
1703 | .flags = ADDR_TYPE_RT | 1703 | .flags = ADDR_TYPE_RT |
1704 | }, | 1704 | }, |
1705 | { } | 1705 | { } |
1706 | }; | 1706 | }; |
1707 | 1707 | ||
1708 | static struct omap_hwmod_ocp_if am33xx_l4per__timer3 = { | 1708 | static struct omap_hwmod_ocp_if am33xx_l4per__timer3 = { |
1709 | .master = &am33xx_l4per_hwmod, | 1709 | .master = &am33xx_l4per_hwmod, |
1710 | .slave = &am33xx_timer3_hwmod, | 1710 | .slave = &am33xx_timer3_hwmod, |
1711 | .clk = "timer3_ick", | 1711 | .clk = "timer3_ick", |
1712 | .addr = am33xx_timer3_addr_space, | 1712 | .addr = am33xx_timer3_addr_space, |
1713 | .user = OCP_USER_MPU, | 1713 | .user = OCP_USER_MPU, |
1714 | }; | 1714 | }; |
1715 | 1715 | ||
1716 | static struct omap_hwmod_ocp_if *am33xx_timer3_slaves[] = { | 1716 | static struct omap_hwmod_ocp_if *am33xx_timer3_slaves[] = { |
1717 | &am33xx_l4per__timer3, | 1717 | &am33xx_l4per__timer3, |
1718 | }; | 1718 | }; |
1719 | 1719 | ||
1720 | static struct omap_hwmod_irq_info am33xx_timer3_irqs[] = { | 1720 | static struct omap_hwmod_irq_info am33xx_timer3_irqs[] = { |
1721 | { .irq = AM33XX_IRQ_DMTIMER3 }, | 1721 | { .irq = AM33XX_IRQ_DMTIMER3 }, |
1722 | { .irq = -1 } | 1722 | { .irq = -1 } |
1723 | }; | 1723 | }; |
1724 | 1724 | ||
1725 | static struct omap_hwmod am33xx_timer3_hwmod = { | 1725 | static struct omap_hwmod am33xx_timer3_hwmod = { |
1726 | .name = "timer3", | 1726 | .name = "timer3", |
1727 | .class = &am33xx_timer_hwmod_class, | 1727 | .class = &am33xx_timer_hwmod_class, |
1728 | .mpu_irqs = am33xx_timer3_irqs, | 1728 | .mpu_irqs = am33xx_timer3_irqs, |
1729 | .main_clk = "timer3_fck", | 1729 | .main_clk = "timer3_fck", |
1730 | .clkdm_name = "l4ls_clkdm", | 1730 | .clkdm_name = "l4ls_clkdm", |
1731 | .prcm = { | 1731 | .prcm = { |
1732 | .omap4 = { | 1732 | .omap4 = { |
1733 | .clkctrl_offs = AM33XX_CM_PER_TIMER3_CLKCTRL_OFFSET, | 1733 | .clkctrl_offs = AM33XX_CM_PER_TIMER3_CLKCTRL_OFFSET, |
1734 | .modulemode = MODULEMODE_SWCTRL, | 1734 | .modulemode = MODULEMODE_SWCTRL, |
1735 | }, | 1735 | }, |
1736 | }, | 1736 | }, |
1737 | .slaves = am33xx_timer3_slaves, | 1737 | .slaves = am33xx_timer3_slaves, |
1738 | .slaves_cnt = ARRAY_SIZE(am33xx_timer3_slaves), | 1738 | .slaves_cnt = ARRAY_SIZE(am33xx_timer3_slaves), |
1739 | }; | 1739 | }; |
1740 | 1740 | ||
1741 | /* timer4 */ | 1741 | /* timer4 */ |
1742 | /* l4 per -> timer4 interface */ | 1742 | /* l4 per -> timer4 interface */ |
1743 | static struct omap_hwmod_addr_space am33xx_timer4_addr_space[] = { | 1743 | static struct omap_hwmod_addr_space am33xx_timer4_addr_space[] = { |
1744 | { | 1744 | { |
1745 | .pa_start = AM33XX_TIMER4_BASE, | 1745 | .pa_start = AM33XX_TIMER4_BASE, |
1746 | .pa_end = AM33XX_TIMER4_BASE + SZ_1K - 1, | 1746 | .pa_end = AM33XX_TIMER4_BASE + SZ_1K - 1, |
1747 | .flags = ADDR_TYPE_RT | 1747 | .flags = ADDR_TYPE_RT |
1748 | }, | 1748 | }, |
1749 | { } | 1749 | { } |
1750 | }; | 1750 | }; |
1751 | 1751 | ||
1752 | static struct omap_hwmod_ocp_if am33xx_l4per__timer4 = { | 1752 | static struct omap_hwmod_ocp_if am33xx_l4per__timer4 = { |
1753 | .master = &am33xx_l4per_hwmod, | 1753 | .master = &am33xx_l4per_hwmod, |
1754 | .slave = &am33xx_timer4_hwmod, | 1754 | .slave = &am33xx_timer4_hwmod, |
1755 | .clk = "timer4_ick", | 1755 | .clk = "timer4_ick", |
1756 | .addr = am33xx_timer4_addr_space, | 1756 | .addr = am33xx_timer4_addr_space, |
1757 | .user = OCP_USER_MPU, | 1757 | .user = OCP_USER_MPU, |
1758 | }; | 1758 | }; |
1759 | 1759 | ||
1760 | static struct omap_hwmod_ocp_if *am33xx_timer4_slaves[] = { | 1760 | static struct omap_hwmod_ocp_if *am33xx_timer4_slaves[] = { |
1761 | &am33xx_l4per__timer4, | 1761 | &am33xx_l4per__timer4, |
1762 | }; | 1762 | }; |
1763 | 1763 | ||
1764 | static struct omap_hwmod_irq_info am33xx_timer4_irqs[] = { | 1764 | static struct omap_hwmod_irq_info am33xx_timer4_irqs[] = { |
1765 | { .irq = AM33XX_IRQ_DMTIMER4 }, | 1765 | { .irq = AM33XX_IRQ_DMTIMER4 }, |
1766 | { .irq = -1 } | 1766 | { .irq = -1 } |
1767 | }; | 1767 | }; |
1768 | 1768 | ||
1769 | static struct omap_hwmod am33xx_timer4_hwmod = { | 1769 | static struct omap_hwmod am33xx_timer4_hwmod = { |
1770 | .name = "timer4", | 1770 | .name = "timer4", |
1771 | .class = &am33xx_timer_hwmod_class, | 1771 | .class = &am33xx_timer_hwmod_class, |
1772 | .mpu_irqs = am33xx_timer4_irqs, | 1772 | .mpu_irqs = am33xx_timer4_irqs, |
1773 | .main_clk = "timer4_fck", | 1773 | .main_clk = "timer4_fck", |
1774 | .prcm = { | 1774 | .prcm = { |
1775 | .omap4 = { | 1775 | .omap4 = { |
1776 | .clkctrl_offs = AM33XX_CM_PER_TIMER4_CLKCTRL_OFFSET, | 1776 | .clkctrl_offs = AM33XX_CM_PER_TIMER4_CLKCTRL_OFFSET, |
1777 | .modulemode = MODULEMODE_SWCTRL, | 1777 | .modulemode = MODULEMODE_SWCTRL, |
1778 | }, | 1778 | }, |
1779 | }, | 1779 | }, |
1780 | .slaves = am33xx_timer4_slaves, | 1780 | .slaves = am33xx_timer4_slaves, |
1781 | .slaves_cnt = ARRAY_SIZE(am33xx_timer4_slaves), | 1781 | .slaves_cnt = ARRAY_SIZE(am33xx_timer4_slaves), |
1782 | .clkdm_name = "l4ls_clkdm", | 1782 | .clkdm_name = "l4ls_clkdm", |
1783 | }; | 1783 | }; |
1784 | 1784 | ||
1785 | 1785 | ||
1786 | /* timer5 */ | 1786 | /* timer5 */ |
1787 | /* l4 per -> timer5 interface */ | 1787 | /* l4 per -> timer5 interface */ |
1788 | static struct omap_hwmod_addr_space am33xx_timer5_addr_space[] = { | 1788 | static struct omap_hwmod_addr_space am33xx_timer5_addr_space[] = { |
1789 | { | 1789 | { |
1790 | .pa_start = AM33XX_TIMER5_BASE, | 1790 | .pa_start = AM33XX_TIMER5_BASE, |
1791 | .pa_end = AM33XX_TIMER5_BASE + SZ_1K - 1, | 1791 | .pa_end = AM33XX_TIMER5_BASE + SZ_1K - 1, |
1792 | .flags = ADDR_TYPE_RT | 1792 | .flags = ADDR_TYPE_RT |
1793 | }, | 1793 | }, |
1794 | { } | 1794 | { } |
1795 | }; | 1795 | }; |
1796 | 1796 | ||
1797 | static struct omap_hwmod_ocp_if am33xx_l4per__timer5 = { | 1797 | static struct omap_hwmod_ocp_if am33xx_l4per__timer5 = { |
1798 | .master = &am33xx_l4per_hwmod, | 1798 | .master = &am33xx_l4per_hwmod, |
1799 | .slave = &am33xx_timer5_hwmod, | 1799 | .slave = &am33xx_timer5_hwmod, |
1800 | .clk = "timer5_ick", | 1800 | .clk = "timer5_ick", |
1801 | .addr = am33xx_timer5_addr_space, | 1801 | .addr = am33xx_timer5_addr_space, |
1802 | .user = OCP_USER_MPU, | 1802 | .user = OCP_USER_MPU, |
1803 | }; | 1803 | }; |
1804 | 1804 | ||
1805 | static struct omap_hwmod_ocp_if *am33xx_timer5_slaves[] = { | 1805 | static struct omap_hwmod_ocp_if *am33xx_timer5_slaves[] = { |
1806 | &am33xx_l4per__timer5, | 1806 | &am33xx_l4per__timer5, |
1807 | }; | 1807 | }; |
1808 | 1808 | ||
1809 | static struct omap_hwmod_irq_info am33xx_timer5_irqs[] = { | 1809 | static struct omap_hwmod_irq_info am33xx_timer5_irqs[] = { |
1810 | { .irq = AM33XX_IRQ_DMTIMER5 }, | 1810 | { .irq = AM33XX_IRQ_DMTIMER5 }, |
1811 | { .irq = -1 } | 1811 | { .irq = -1 } |
1812 | }; | 1812 | }; |
1813 | 1813 | ||
1814 | static struct omap_hwmod am33xx_timer5_hwmod = { | 1814 | static struct omap_hwmod am33xx_timer5_hwmod = { |
1815 | .name = "timer5", | 1815 | .name = "timer5", |
1816 | .class = &am33xx_timer_hwmod_class, | 1816 | .class = &am33xx_timer_hwmod_class, |
1817 | .mpu_irqs = am33xx_timer5_irqs, | 1817 | .mpu_irqs = am33xx_timer5_irqs, |
1818 | .main_clk = "timer5_fck", | 1818 | .main_clk = "timer5_fck", |
1819 | .prcm = { | 1819 | .prcm = { |
1820 | .omap4 = { | 1820 | .omap4 = { |
1821 | .clkctrl_offs = AM33XX_CM_PER_TIMER5_CLKCTRL_OFFSET, | 1821 | .clkctrl_offs = AM33XX_CM_PER_TIMER5_CLKCTRL_OFFSET, |
1822 | .modulemode = MODULEMODE_SWCTRL, | 1822 | .modulemode = MODULEMODE_SWCTRL, |
1823 | }, | 1823 | }, |
1824 | }, | 1824 | }, |
1825 | .slaves = am33xx_timer5_slaves, | 1825 | .slaves = am33xx_timer5_slaves, |
1826 | .slaves_cnt = ARRAY_SIZE(am33xx_timer5_slaves), | 1826 | .slaves_cnt = ARRAY_SIZE(am33xx_timer5_slaves), |
1827 | .clkdm_name = "l4ls_clkdm", | 1827 | .clkdm_name = "l4ls_clkdm", |
1828 | }; | 1828 | }; |
1829 | 1829 | ||
1830 | /* timer6 */ | 1830 | /* timer6 */ |
1831 | /* l4 per -> timer6 interface */ | 1831 | /* l4 per -> timer6 interface */ |
1832 | static struct omap_hwmod_addr_space am33xx_timer6_addr_space[] = { | 1832 | static struct omap_hwmod_addr_space am33xx_timer6_addr_space[] = { |
1833 | { | 1833 | { |
1834 | .pa_start = AM33XX_TIMER6_BASE, | 1834 | .pa_start = AM33XX_TIMER6_BASE, |
1835 | .pa_end = AM33XX_TIMER6_BASE + SZ_1K - 1, | 1835 | .pa_end = AM33XX_TIMER6_BASE + SZ_1K - 1, |
1836 | .flags = ADDR_TYPE_RT | 1836 | .flags = ADDR_TYPE_RT |
1837 | }, | 1837 | }, |
1838 | { } | 1838 | { } |
1839 | }; | 1839 | }; |
1840 | 1840 | ||
1841 | static struct omap_hwmod_ocp_if am33xx_l4per__timer6 = { | 1841 | static struct omap_hwmod_ocp_if am33xx_l4per__timer6 = { |
1842 | .master = &am33xx_l4per_hwmod, | 1842 | .master = &am33xx_l4per_hwmod, |
1843 | .slave = &am33xx_timer6_hwmod, | 1843 | .slave = &am33xx_timer6_hwmod, |
1844 | .clk = "timer6_ick", | 1844 | .clk = "timer6_ick", |
1845 | .addr = am33xx_timer6_addr_space, | 1845 | .addr = am33xx_timer6_addr_space, |
1846 | .user = OCP_USER_MPU, | 1846 | .user = OCP_USER_MPU, |
1847 | }; | 1847 | }; |
1848 | 1848 | ||
1849 | static struct omap_hwmod_ocp_if *am33xx_timer6_slaves[] = { | 1849 | static struct omap_hwmod_ocp_if *am33xx_timer6_slaves[] = { |
1850 | &am33xx_l4per__timer6, | 1850 | &am33xx_l4per__timer6, |
1851 | }; | 1851 | }; |
1852 | 1852 | ||
1853 | static struct omap_hwmod_irq_info am33xx_timer6_irqs[] = { | 1853 | static struct omap_hwmod_irq_info am33xx_timer6_irqs[] = { |
1854 | { .irq = AM33XX_IRQ_DMTIMER6 }, | 1854 | { .irq = AM33XX_IRQ_DMTIMER6 }, |
1855 | { .irq = -1 } | 1855 | { .irq = -1 } |
1856 | }; | 1856 | }; |
1857 | 1857 | ||
1858 | static struct omap_hwmod am33xx_timer6_hwmod = { | 1858 | static struct omap_hwmod am33xx_timer6_hwmod = { |
1859 | .name = "timer6", | 1859 | .name = "timer6", |
1860 | .class = &am33xx_timer_hwmod_class, | 1860 | .class = &am33xx_timer_hwmod_class, |
1861 | .mpu_irqs = am33xx_timer6_irqs, | 1861 | .mpu_irqs = am33xx_timer6_irqs, |
1862 | .main_clk = "timer6_fck", | 1862 | .main_clk = "timer6_fck", |
1863 | .prcm = { | 1863 | .prcm = { |
1864 | .omap4 = { | 1864 | .omap4 = { |
1865 | .clkctrl_offs = AM33XX_CM_PER_TIMER6_CLKCTRL_OFFSET, | 1865 | .clkctrl_offs = AM33XX_CM_PER_TIMER6_CLKCTRL_OFFSET, |
1866 | .modulemode = MODULEMODE_SWCTRL, | 1866 | .modulemode = MODULEMODE_SWCTRL, |
1867 | }, | 1867 | }, |
1868 | }, | 1868 | }, |
1869 | .slaves = am33xx_timer6_slaves, | 1869 | .slaves = am33xx_timer6_slaves, |
1870 | .slaves_cnt = ARRAY_SIZE(am33xx_timer6_slaves), | 1870 | .slaves_cnt = ARRAY_SIZE(am33xx_timer6_slaves), |
1871 | .clkdm_name = "l4ls_clkdm", | 1871 | .clkdm_name = "l4ls_clkdm", |
1872 | }; | 1872 | }; |
1873 | 1873 | ||
1874 | /* timer7 */ | 1874 | /* timer7 */ |
1875 | /* l4 per -> timer7 interface */ | 1875 | /* l4 per -> timer7 interface */ |
1876 | static struct omap_hwmod_addr_space am33xx_timer7_addr_space[] = { | 1876 | static struct omap_hwmod_addr_space am33xx_timer7_addr_space[] = { |
1877 | { | 1877 | { |
1878 | .pa_start = AM33XX_TIMER7_BASE, | 1878 | .pa_start = AM33XX_TIMER7_BASE, |
1879 | .pa_end = AM33XX_TIMER7_BASE + SZ_1K - 1, | 1879 | .pa_end = AM33XX_TIMER7_BASE + SZ_1K - 1, |
1880 | .flags = ADDR_TYPE_RT | 1880 | .flags = ADDR_TYPE_RT |
1881 | }, | 1881 | }, |
1882 | { } | 1882 | { } |
1883 | }; | 1883 | }; |
1884 | 1884 | ||
1885 | static struct omap_hwmod_ocp_if am33xx_l4per__timer7 = { | 1885 | static struct omap_hwmod_ocp_if am33xx_l4per__timer7 = { |
1886 | .master = &am33xx_l4per_hwmod, | 1886 | .master = &am33xx_l4per_hwmod, |
1887 | .slave = &am33xx_timer7_hwmod, | 1887 | .slave = &am33xx_timer7_hwmod, |
1888 | .clk = "timer7_ick", | 1888 | .clk = "timer7_ick", |
1889 | .addr = am33xx_timer7_addr_space, | 1889 | .addr = am33xx_timer7_addr_space, |
1890 | .user = OCP_USER_MPU, | 1890 | .user = OCP_USER_MPU, |
1891 | }; | 1891 | }; |
1892 | 1892 | ||
1893 | static struct omap_hwmod_ocp_if *am33xx_timer7_slaves[] = { | 1893 | static struct omap_hwmod_ocp_if *am33xx_timer7_slaves[] = { |
1894 | &am33xx_l4per__timer7, | 1894 | &am33xx_l4per__timer7, |
1895 | }; | 1895 | }; |
1896 | 1896 | ||
1897 | static struct omap_hwmod_irq_info am33xx_timer7_irqs[] = { | 1897 | static struct omap_hwmod_irq_info am33xx_timer7_irqs[] = { |
1898 | { .irq = AM33XX_IRQ_DMTIMER7 }, | 1898 | { .irq = AM33XX_IRQ_DMTIMER7 }, |
1899 | { .irq = -1 } | 1899 | { .irq = -1 } |
1900 | }; | 1900 | }; |
1901 | 1901 | ||
1902 | static struct omap_hwmod am33xx_timer7_hwmod = { | 1902 | static struct omap_hwmod am33xx_timer7_hwmod = { |
1903 | .name = "timer7", | 1903 | .name = "timer7", |
1904 | .class = &am33xx_timer_hwmod_class, | 1904 | .class = &am33xx_timer_hwmod_class, |
1905 | .mpu_irqs = am33xx_timer7_irqs, | 1905 | .mpu_irqs = am33xx_timer7_irqs, |
1906 | .main_clk = "timer7_fck", | 1906 | .main_clk = "timer7_fck", |
1907 | .prcm = { | 1907 | .prcm = { |
1908 | .omap4 = { | 1908 | .omap4 = { |
1909 | .clkctrl_offs = AM33XX_CM_PER_TIMER7_CLKCTRL_OFFSET, | 1909 | .clkctrl_offs = AM33XX_CM_PER_TIMER7_CLKCTRL_OFFSET, |
1910 | .modulemode = MODULEMODE_SWCTRL, | 1910 | .modulemode = MODULEMODE_SWCTRL, |
1911 | }, | 1911 | }, |
1912 | }, | 1912 | }, |
1913 | .slaves = am33xx_timer7_slaves, | 1913 | .slaves = am33xx_timer7_slaves, |
1914 | .slaves_cnt = ARRAY_SIZE(am33xx_timer7_slaves), | 1914 | .slaves_cnt = ARRAY_SIZE(am33xx_timer7_slaves), |
1915 | .clkdm_name = "l4ls_clkdm", | 1915 | .clkdm_name = "l4ls_clkdm", |
1916 | }; | 1916 | }; |
1917 | 1917 | ||
1918 | /* 'tpcc' class */ | 1918 | /* 'tpcc' class */ |
1919 | static struct omap_hwmod_class am33xx_tpcc_hwmod_class = { | 1919 | static struct omap_hwmod_class am33xx_tpcc_hwmod_class = { |
1920 | .name = "tpcc", | 1920 | .name = "tpcc", |
1921 | }; | 1921 | }; |
1922 | 1922 | ||
1923 | /* tpcc */ | 1923 | /* tpcc */ |
1924 | static struct omap_hwmod_irq_info am33xx_tpcc_irqs[] = { | 1924 | static struct omap_hwmod_irq_info am33xx_tpcc_irqs[] = { |
1925 | { .irq = AM33XX_IRQ_TPCC0_INT_PO0 }, | 1925 | { .irq = AM33XX_IRQ_TPCC0_INT_PO0 }, |
1926 | { .irq = -1 }, | 1926 | { .irq = -1 }, |
1927 | }; | 1927 | }; |
1928 | 1928 | ||
1929 | static struct omap_hwmod am33xx_tpcc_hwmod = { | 1929 | static struct omap_hwmod am33xx_tpcc_hwmod = { |
1930 | .name = "tpcc", | 1930 | .name = "tpcc", |
1931 | .class = &am33xx_tpcc_hwmod_class, | 1931 | .class = &am33xx_tpcc_hwmod_class, |
1932 | .mpu_irqs = am33xx_tpcc_irqs, | 1932 | .mpu_irqs = am33xx_tpcc_irqs, |
1933 | .main_clk = "tpcc_ick", | 1933 | .main_clk = "tpcc_ick", |
1934 | .clkdm_name = "l3_clkdm", | 1934 | .clkdm_name = "l3_clkdm", |
1935 | .prcm = { | 1935 | .prcm = { |
1936 | .omap4 = { | 1936 | .omap4 = { |
1937 | .clkctrl_offs = AM33XX_CM_PER_TPCC_CLKCTRL_OFFSET, | 1937 | .clkctrl_offs = AM33XX_CM_PER_TPCC_CLKCTRL_OFFSET, |
1938 | .modulemode = MODULEMODE_SWCTRL, | 1938 | .modulemode = MODULEMODE_SWCTRL, |
1939 | }, | 1939 | }, |
1940 | }, | 1940 | }, |
1941 | }; | 1941 | }; |
1942 | 1942 | ||
1943 | /* 'tptc' class */ | 1943 | /* 'tptc' class */ |
1944 | static struct omap_hwmod_class am33xx_tptc_hwmod_class = { | 1944 | static struct omap_hwmod_class am33xx_tptc_hwmod_class = { |
1945 | .name = "tptc", | 1945 | .name = "tptc", |
1946 | }; | 1946 | }; |
1947 | 1947 | ||
1948 | /* tptc0 */ | 1948 | /* tptc0 */ |
1949 | static struct omap_hwmod_irq_info am33xx_tptc0_irqs[] = { | 1949 | static struct omap_hwmod_irq_info am33xx_tptc0_irqs[] = { |
1950 | { .irq = AM33XX_IRQ_TPTC0 }, | 1950 | { .irq = AM33XX_IRQ_TPTC0 }, |
1951 | { .irq = -1 } | 1951 | { .irq = -1 } |
1952 | }; | 1952 | }; |
1953 | 1953 | ||
1954 | static struct omap_hwmod am33xx_tptc0_hwmod = { | 1954 | static struct omap_hwmod am33xx_tptc0_hwmod = { |
1955 | .name = "tptc0", | 1955 | .name = "tptc0", |
1956 | .class = &am33xx_tptc_hwmod_class, | 1956 | .class = &am33xx_tptc_hwmod_class, |
1957 | .mpu_irqs = am33xx_tptc0_irqs, | 1957 | .mpu_irqs = am33xx_tptc0_irqs, |
1958 | .main_clk = "tptc0_ick", | 1958 | .main_clk = "tptc0_ick", |
1959 | .clkdm_name = "l3_clkdm", | 1959 | .clkdm_name = "l3_clkdm", |
1960 | .prcm = { | 1960 | .prcm = { |
1961 | .omap4 = { | 1961 | .omap4 = { |
1962 | .clkctrl_offs = AM33XX_CM_PER_TPTC0_CLKCTRL_OFFSET, | 1962 | .clkctrl_offs = AM33XX_CM_PER_TPTC0_CLKCTRL_OFFSET, |
1963 | .modulemode = MODULEMODE_SWCTRL, | 1963 | .modulemode = MODULEMODE_SWCTRL, |
1964 | }, | 1964 | }, |
1965 | }, | 1965 | }, |
1966 | }; | 1966 | }; |
1967 | 1967 | ||
1968 | /* tptc1 */ | 1968 | /* tptc1 */ |
1969 | static struct omap_hwmod_irq_info am33xx_tptc1_irqs[] = { | 1969 | static struct omap_hwmod_irq_info am33xx_tptc1_irqs[] = { |
1970 | { .irq = AM33XX_IRQ_TPTC1 }, | 1970 | { .irq = AM33XX_IRQ_TPTC1 }, |
1971 | { .irq = -1 } | 1971 | { .irq = -1 } |
1972 | }; | 1972 | }; |
1973 | 1973 | ||
1974 | static struct omap_hwmod am33xx_tptc1_hwmod = { | 1974 | static struct omap_hwmod am33xx_tptc1_hwmod = { |
1975 | .name = "tptc1", | 1975 | .name = "tptc1", |
1976 | .class = &am33xx_tptc_hwmod_class, | 1976 | .class = &am33xx_tptc_hwmod_class, |
1977 | .mpu_irqs = am33xx_tptc1_irqs, | 1977 | .mpu_irqs = am33xx_tptc1_irqs, |
1978 | .main_clk = "tptc1_ick", | 1978 | .main_clk = "tptc1_ick", |
1979 | .clkdm_name = "l3_clkdm", | 1979 | .clkdm_name = "l3_clkdm", |
1980 | .prcm = { | 1980 | .prcm = { |
1981 | .omap4 = { | 1981 | .omap4 = { |
1982 | .clkctrl_offs = AM33XX_CM_PER_TPTC1_CLKCTRL_OFFSET, | 1982 | .clkctrl_offs = AM33XX_CM_PER_TPTC1_CLKCTRL_OFFSET, |
1983 | .modulemode = MODULEMODE_SWCTRL, | 1983 | .modulemode = MODULEMODE_SWCTRL, |
1984 | }, | 1984 | }, |
1985 | }, | 1985 | }, |
1986 | }; | 1986 | }; |
1987 | 1987 | ||
1988 | /* tptc2 */ | 1988 | /* tptc2 */ |
1989 | static struct omap_hwmod_irq_info am33xx_tptc2_irqs[] = { | 1989 | static struct omap_hwmod_irq_info am33xx_tptc2_irqs[] = { |
1990 | { .irq = AM33XX_IRQ_TPTC2 }, | 1990 | { .irq = AM33XX_IRQ_TPTC2 }, |
1991 | { .irq = -1 } | 1991 | { .irq = -1 } |
1992 | }; | 1992 | }; |
1993 | 1993 | ||
1994 | static struct omap_hwmod am33xx_tptc2_hwmod = { | 1994 | static struct omap_hwmod am33xx_tptc2_hwmod = { |
1995 | .name = "tptc2", | 1995 | .name = "tptc2", |
1996 | .class = &am33xx_tptc_hwmod_class, | 1996 | .class = &am33xx_tptc_hwmod_class, |
1997 | .mpu_irqs = am33xx_tptc2_irqs, | 1997 | .mpu_irqs = am33xx_tptc2_irqs, |
1998 | .main_clk = "tptc2_ick", | 1998 | .main_clk = "tptc2_ick", |
1999 | .clkdm_name = "l3_clkdm", | 1999 | .clkdm_name = "l3_clkdm", |
2000 | .prcm = { | 2000 | .prcm = { |
2001 | .omap4 = { | 2001 | .omap4 = { |
2002 | .clkctrl_offs = AM33XX_CM_PER_TPTC2_CLKCTRL_OFFSET, | 2002 | .clkctrl_offs = AM33XX_CM_PER_TPTC2_CLKCTRL_OFFSET, |
2003 | .modulemode = MODULEMODE_SWCTRL, | 2003 | .modulemode = MODULEMODE_SWCTRL, |
2004 | }, | 2004 | }, |
2005 | }, | 2005 | }, |
2006 | }; | 2006 | }; |
2007 | 2007 | ||
2008 | /* 'uart' class */ | 2008 | /* 'uart' class */ |
2009 | static struct omap_hwmod_class_sysconfig uart_sysc = { | 2009 | static struct omap_hwmod_class_sysconfig uart_sysc = { |
2010 | .rev_offs = 0x50, | 2010 | .rev_offs = 0x50, |
2011 | .sysc_offs = 0x54, | 2011 | .sysc_offs = 0x54, |
2012 | .syss_offs = 0x58, | 2012 | .syss_offs = 0x58, |
2013 | .sysc_flags = (SYSC_HAS_SIDLEMODE | | 2013 | .sysc_flags = (SYSC_HAS_SIDLEMODE | |
2014 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | 2014 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | |
2015 | SYSC_HAS_AUTOIDLE), | 2015 | SYSC_HAS_AUTOIDLE), |
2016 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | 2016 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
2017 | .sysc_fields = &omap_hwmod_sysc_type1, | 2017 | .sysc_fields = &omap_hwmod_sysc_type1, |
2018 | }; | 2018 | }; |
2019 | 2019 | ||
2020 | static struct omap_hwmod_class uart_class = { | 2020 | static struct omap_hwmod_class uart_class = { |
2021 | .name = "uart", | 2021 | .name = "uart", |
2022 | .sysc = &uart_sysc, | 2022 | .sysc = &uart_sysc, |
2023 | }; | 2023 | }; |
2024 | 2024 | ||
2025 | /* uart1 */ | 2025 | /* uart1 */ |
2026 | static struct omap_hwmod_dma_info uart1_edma_reqs[] = { | 2026 | static struct omap_hwmod_dma_info uart1_edma_reqs[] = { |
2027 | { .name = "tx", .dma_req = 26, }, | 2027 | { .name = "tx", .dma_req = 26, }, |
2028 | { .name = "rx", .dma_req = 27, }, | 2028 | { .name = "rx", .dma_req = 27, }, |
2029 | { .dma_req = -1 } | 2029 | { .dma_req = -1 } |
2030 | }; | 2030 | }; |
2031 | 2031 | ||
2032 | static struct omap_hwmod_addr_space am33xx_uart1_addr_space[] = { | 2032 | static struct omap_hwmod_addr_space am33xx_uart1_addr_space[] = { |
2033 | { | 2033 | { |
2034 | .pa_start = AM33XX_UART1_BASE, | 2034 | .pa_start = AM33XX_UART1_BASE, |
2035 | .pa_end = AM33XX_UART1_BASE + SZ_8K - 1, | 2035 | .pa_end = AM33XX_UART1_BASE + SZ_8K - 1, |
2036 | .flags = ADDR_TYPE_RT | 2036 | .flags = ADDR_TYPE_RT |
2037 | }, | 2037 | }, |
2038 | { } | 2038 | { } |
2039 | }; | 2039 | }; |
2040 | 2040 | ||
2041 | static struct omap_hwmod_ocp_if am33xx_l4_wkup__uart1 = { | 2041 | static struct omap_hwmod_ocp_if am33xx_l4_wkup__uart1 = { |
2042 | .master = &am33xx_l4wkup_hwmod, | 2042 | .master = &am33xx_l4wkup_hwmod, |
2043 | .slave = &am33xx_uart1_hwmod, | 2043 | .slave = &am33xx_uart1_hwmod, |
2044 | .clk = "uart1_ick", | 2044 | .clk = "uart1_ick", |
2045 | .addr = am33xx_uart1_addr_space, | 2045 | .addr = am33xx_uart1_addr_space, |
2046 | .user = OCP_USER_MPU, | 2046 | .user = OCP_USER_MPU, |
2047 | }; | 2047 | }; |
2048 | 2048 | ||
2049 | static struct omap_hwmod_irq_info am33xx_uart1_irqs[] = { | 2049 | static struct omap_hwmod_irq_info am33xx_uart1_irqs[] = { |
2050 | { .irq = AM33XX_IRQ_UART0 }, | 2050 | { .irq = AM33XX_IRQ_UART0 }, |
2051 | { .irq = -1 } | 2051 | { .irq = -1 } |
2052 | }; | 2052 | }; |
2053 | 2053 | ||
2054 | static struct omap_hwmod_ocp_if *am33xx_uart1_slaves[] = { | 2054 | static struct omap_hwmod_ocp_if *am33xx_uart1_slaves[] = { |
2055 | &am33xx_l4_wkup__uart1, | 2055 | &am33xx_l4_wkup__uart1, |
2056 | }; | 2056 | }; |
2057 | 2057 | ||
2058 | static struct omap_hwmod am33xx_uart1_hwmod = { | 2058 | static struct omap_hwmod am33xx_uart1_hwmod = { |
2059 | .name = "uart1", | 2059 | .name = "uart1", |
2060 | .class = &uart_class, | 2060 | .class = &uart_class, |
2061 | .mpu_irqs = am33xx_uart1_irqs, | 2061 | .mpu_irqs = am33xx_uart1_irqs, |
2062 | .sdma_reqs = uart1_edma_reqs, | 2062 | .sdma_reqs = uart1_edma_reqs, |
2063 | .main_clk = "uart1_fck", | 2063 | .main_clk = "uart1_fck", |
2064 | .clkdm_name = "l4_wkup_clkdm", | 2064 | .clkdm_name = "l4_wkup_clkdm", |
2065 | .prcm = { | 2065 | .prcm = { |
2066 | .omap4 = { | 2066 | .omap4 = { |
2067 | .clkctrl_offs = AM33XX_CM_WKUP_UART0_CLKCTRL_OFFSET, | 2067 | .clkctrl_offs = AM33XX_CM_WKUP_UART0_CLKCTRL_OFFSET, |
2068 | .modulemode = MODULEMODE_SWCTRL, | 2068 | .modulemode = MODULEMODE_SWCTRL, |
2069 | }, | 2069 | }, |
2070 | }, | 2070 | }, |
2071 | .slaves = am33xx_uart1_slaves, | 2071 | .slaves = am33xx_uart1_slaves, |
2072 | .slaves_cnt = ARRAY_SIZE(am33xx_uart1_slaves), | 2072 | .slaves_cnt = ARRAY_SIZE(am33xx_uart1_slaves), |
2073 | }; | 2073 | }; |
2074 | 2074 | ||
2075 | /* uart2 */ | 2075 | /* uart2 */ |
2076 | static struct omap_hwmod_addr_space am33xx_uart2_addr_space[] = { | 2076 | static struct omap_hwmod_addr_space am33xx_uart2_addr_space[] = { |
2077 | { | 2077 | { |
2078 | .pa_start = AM33XX_UART2_BASE, | 2078 | .pa_start = AM33XX_UART2_BASE, |
2079 | .pa_end = AM33XX_UART2_BASE + SZ_8K - 1, | 2079 | .pa_end = AM33XX_UART2_BASE + SZ_8K - 1, |
2080 | .flags = ADDR_TYPE_RT | 2080 | .flags = ADDR_TYPE_RT |
2081 | }, | 2081 | }, |
2082 | { } | 2082 | { } |
2083 | }; | 2083 | }; |
2084 | 2084 | ||
2085 | static struct omap_hwmod_ocp_if am33xx_l4_ls__uart2 = { | 2085 | static struct omap_hwmod_ocp_if am33xx_l4_ls__uart2 = { |
2086 | .slave = &am33xx_uart2_hwmod, | 2086 | .slave = &am33xx_uart2_hwmod, |
2087 | .clk = "uart2_ick", | 2087 | .clk = "uart2_ick", |
2088 | .addr = am33xx_uart2_addr_space, | 2088 | .addr = am33xx_uart2_addr_space, |
2089 | .user = OCP_USER_MPU, | 2089 | .user = OCP_USER_MPU, |
2090 | }; | 2090 | }; |
2091 | 2091 | ||
2092 | static struct omap_hwmod_irq_info am33xx_uart2_irqs[] = { | 2092 | static struct omap_hwmod_irq_info am33xx_uart2_irqs[] = { |
2093 | { .irq = AM33XX_IRQ_UART1 }, | 2093 | { .irq = AM33XX_IRQ_UART1 }, |
2094 | { .irq = -1 } | 2094 | { .irq = -1 } |
2095 | }; | 2095 | }; |
2096 | 2096 | ||
2097 | static struct omap_hwmod_ocp_if *am33xx_uart2_slaves[] = { | 2097 | static struct omap_hwmod_ocp_if *am33xx_uart2_slaves[] = { |
2098 | &am33xx_l4_ls__uart2, | 2098 | &am33xx_l4_ls__uart2, |
2099 | }; | 2099 | }; |
2100 | 2100 | ||
2101 | static struct omap_hwmod am33xx_uart2_hwmod = { | 2101 | static struct omap_hwmod am33xx_uart2_hwmod = { |
2102 | .name = "uart2", | 2102 | .name = "uart2", |
2103 | .class = &uart_class, | 2103 | .class = &uart_class, |
2104 | .mpu_irqs = am33xx_uart2_irqs, | 2104 | .mpu_irqs = am33xx_uart2_irqs, |
2105 | .main_clk = "uart2_fck", | 2105 | .main_clk = "uart2_fck", |
2106 | .clkdm_name = "l4ls_clkdm", | 2106 | .clkdm_name = "l4ls_clkdm", |
2107 | .sdma_reqs = uart1_edma_reqs, | 2107 | .sdma_reqs = uart1_edma_reqs, |
2108 | .prcm = { | 2108 | .prcm = { |
2109 | .omap4 = { | 2109 | .omap4 = { |
2110 | .clkctrl_offs = AM33XX_CM_PER_UART1_CLKCTRL_OFFSET, | 2110 | .clkctrl_offs = AM33XX_CM_PER_UART1_CLKCTRL_OFFSET, |
2111 | .modulemode = MODULEMODE_SWCTRL, | 2111 | .modulemode = MODULEMODE_SWCTRL, |
2112 | }, | 2112 | }, |
2113 | }, | 2113 | }, |
2114 | .slaves = am33xx_uart2_slaves, | 2114 | .slaves = am33xx_uart2_slaves, |
2115 | .slaves_cnt = ARRAY_SIZE(am33xx_uart2_slaves), | 2115 | .slaves_cnt = ARRAY_SIZE(am33xx_uart2_slaves), |
2116 | }; | 2116 | }; |
2117 | 2117 | ||
2118 | /* uart3 */ | 2118 | /* uart3 */ |
2119 | static struct omap_hwmod_dma_info uart3_edma_reqs[] = { | ||
2120 | { .name = "tx", .dma_req = 30, }, | ||
2121 | { .name = "rx", .dma_req = 31, }, | ||
2122 | { .dma_req = -1 } | ||
2123 | }; | ||
2124 | |||
2119 | static struct omap_hwmod_addr_space am33xx_uart3_addr_space[] = { | 2125 | static struct omap_hwmod_addr_space am33xx_uart3_addr_space[] = { |
2120 | { | 2126 | { |
2121 | .pa_start = AM33XX_UART3_BASE, | 2127 | .pa_start = AM33XX_UART3_BASE, |
2122 | .pa_end = AM33XX_UART3_BASE + SZ_8K - 1, | 2128 | .pa_end = AM33XX_UART3_BASE + SZ_8K - 1, |
2123 | .flags = ADDR_TYPE_RT | 2129 | .flags = ADDR_TYPE_RT |
2124 | }, | 2130 | }, |
2125 | { } | 2131 | { } |
2126 | }; | 2132 | }; |
2127 | 2133 | ||
2128 | static struct omap_hwmod_ocp_if am33xx_l4_ls__uart3 = { | 2134 | static struct omap_hwmod_ocp_if am33xx_l4_ls__uart3 = { |
2129 | .slave = &am33xx_uart3_hwmod, | 2135 | .slave = &am33xx_uart3_hwmod, |
2130 | .clk = "uart3_ick", | 2136 | .clk = "uart3_ick", |
2131 | .addr = am33xx_uart3_addr_space, | 2137 | .addr = am33xx_uart3_addr_space, |
2132 | .user = OCP_USER_MPU, | 2138 | .user = OCP_USER_MPU, |
2133 | }; | 2139 | }; |
2134 | 2140 | ||
2135 | static struct omap_hwmod_irq_info am33xx_uart3_irqs[] = { | 2141 | static struct omap_hwmod_irq_info am33xx_uart3_irqs[] = { |
2136 | { .irq = AM33XX_IRQ_UART2 }, | 2142 | { .irq = AM33XX_IRQ_UART2 }, |
2137 | { .irq = -1 } | 2143 | { .irq = -1 } |
2138 | }; | 2144 | }; |
2139 | 2145 | ||
2140 | static struct omap_hwmod_ocp_if *am33xx_uart3_slaves[] = { | 2146 | static struct omap_hwmod_ocp_if *am33xx_uart3_slaves[] = { |
2141 | &am33xx_l4_ls__uart3, | 2147 | &am33xx_l4_ls__uart3, |
2142 | }; | 2148 | }; |
2143 | 2149 | ||
2144 | static struct omap_hwmod am33xx_uart3_hwmod = { | 2150 | static struct omap_hwmod am33xx_uart3_hwmod = { |
2145 | .name = "uart3", | 2151 | .name = "uart3", |
2146 | .class = &uart_class, | 2152 | .class = &uart_class, |
2147 | .mpu_irqs = am33xx_uart3_irqs, | 2153 | .mpu_irqs = am33xx_uart3_irqs, |
2148 | .main_clk = "uart3_fck", | 2154 | .main_clk = "uart3_fck", |
2149 | .clkdm_name = "l4ls_clkdm", | 2155 | .clkdm_name = "l4ls_clkdm", |
2150 | .sdma_reqs = uart1_edma_reqs, | 2156 | .sdma_reqs = uart3_edma_reqs, |
2151 | .prcm = { | 2157 | .prcm = { |
2152 | .omap4 = { | 2158 | .omap4 = { |
2153 | .clkctrl_offs = AM33XX_CM_PER_UART2_CLKCTRL_OFFSET, | 2159 | .clkctrl_offs = AM33XX_CM_PER_UART2_CLKCTRL_OFFSET, |
2154 | .modulemode = MODULEMODE_SWCTRL, | 2160 | .modulemode = MODULEMODE_SWCTRL, |
2155 | }, | 2161 | }, |
2156 | }, | 2162 | }, |
2157 | .slaves = am33xx_uart3_slaves, | 2163 | .slaves = am33xx_uart3_slaves, |
2158 | .slaves_cnt = ARRAY_SIZE(am33xx_uart3_slaves), | 2164 | .slaves_cnt = ARRAY_SIZE(am33xx_uart3_slaves), |
2159 | }; | 2165 | }; |
2160 | 2166 | ||
2161 | /* uart4 */ | 2167 | /* uart4 */ |
2162 | static struct omap_hwmod_addr_space am33xx_uart4_addr_space[] = { | 2168 | static struct omap_hwmod_addr_space am33xx_uart4_addr_space[] = { |
2163 | { | 2169 | { |
2164 | .pa_start = AM33XX_UART4_BASE, | 2170 | .pa_start = AM33XX_UART4_BASE, |
2165 | .pa_end = AM33XX_UART4_BASE + SZ_8K - 1, | 2171 | .pa_end = AM33XX_UART4_BASE + SZ_8K - 1, |
2166 | .flags = ADDR_TYPE_RT | 2172 | .flags = ADDR_TYPE_RT |
2167 | }, | 2173 | }, |
2168 | { } | 2174 | { } |
2169 | }; | 2175 | }; |
2170 | 2176 | ||
2171 | static struct omap_hwmod_ocp_if am33xx_l4_ls__uart4 = { | 2177 | static struct omap_hwmod_ocp_if am33xx_l4_ls__uart4 = { |
2172 | .slave = &am33xx_uart4_hwmod, | 2178 | .slave = &am33xx_uart4_hwmod, |
2173 | .clk = "uart4_ick", | 2179 | .clk = "uart4_ick", |
2174 | .addr = am33xx_uart4_addr_space, | 2180 | .addr = am33xx_uart4_addr_space, |
2175 | .user = OCP_USER_MPU, | 2181 | .user = OCP_USER_MPU, |
2176 | }; | 2182 | }; |
2177 | 2183 | ||
2178 | static struct omap_hwmod_irq_info am33xx_uart4_irqs[] = { | 2184 | static struct omap_hwmod_irq_info am33xx_uart4_irqs[] = { |
2179 | { .irq = AM33XX_IRQ_UART3 }, | 2185 | { .irq = AM33XX_IRQ_UART3 }, |
2180 | { .irq = -1 } | 2186 | { .irq = -1 } |
2181 | }; | 2187 | }; |
2182 | 2188 | ||
2183 | static struct omap_hwmod_ocp_if *am33xx_uart4_slaves[] = { | 2189 | static struct omap_hwmod_ocp_if *am33xx_uart4_slaves[] = { |
2184 | &am33xx_l4_ls__uart4, | 2190 | &am33xx_l4_ls__uart4, |
2185 | }; | 2191 | }; |
2186 | 2192 | ||
2187 | static struct omap_hwmod am33xx_uart4_hwmod = { | 2193 | static struct omap_hwmod am33xx_uart4_hwmod = { |
2188 | .name = "uart4", | 2194 | .name = "uart4", |
2189 | .class = &uart_class, | 2195 | .class = &uart_class, |
2190 | .mpu_irqs = am33xx_uart4_irqs, | 2196 | .mpu_irqs = am33xx_uart4_irqs, |
2191 | .main_clk = "uart4_fck", | 2197 | .main_clk = "uart4_fck", |
2192 | .clkdm_name = "l4ls_clkdm", | 2198 | .clkdm_name = "l4ls_clkdm", |
2193 | .sdma_reqs = uart1_edma_reqs, | 2199 | .sdma_reqs = uart1_edma_reqs, |
2194 | .prcm = { | 2200 | .prcm = { |
2195 | .omap4 = { | 2201 | .omap4 = { |
2196 | .clkctrl_offs = AM33XX_CM_PER_UART3_CLKCTRL_OFFSET, | 2202 | .clkctrl_offs = AM33XX_CM_PER_UART3_CLKCTRL_OFFSET, |
2197 | .modulemode = MODULEMODE_SWCTRL, | 2203 | .modulemode = MODULEMODE_SWCTRL, |
2198 | }, | 2204 | }, |
2199 | }, | 2205 | }, |
2200 | .slaves = am33xx_uart4_slaves, | 2206 | .slaves = am33xx_uart4_slaves, |
2201 | .slaves_cnt = ARRAY_SIZE(am33xx_uart4_slaves), | 2207 | .slaves_cnt = ARRAY_SIZE(am33xx_uart4_slaves), |
2202 | }; | 2208 | }; |
2203 | 2209 | ||
2204 | /* uart5 */ | 2210 | /* uart5 */ |
2205 | static struct omap_hwmod_addr_space am33xx_uart5_addr_space[] = { | 2211 | static struct omap_hwmod_addr_space am33xx_uart5_addr_space[] = { |
2206 | { | 2212 | { |
2207 | .pa_start = AM33XX_UART5_BASE, | 2213 | .pa_start = AM33XX_UART5_BASE, |
2208 | .pa_end = AM33XX_UART5_BASE + SZ_8K - 1, | 2214 | .pa_end = AM33XX_UART5_BASE + SZ_8K - 1, |
2209 | .flags = ADDR_TYPE_RT | 2215 | .flags = ADDR_TYPE_RT |
2210 | }, | 2216 | }, |
2211 | { } | 2217 | { } |
2212 | }; | 2218 | }; |
2213 | 2219 | ||
2214 | static struct omap_hwmod_ocp_if am33xx_l4_ls__uart5 = { | 2220 | static struct omap_hwmod_ocp_if am33xx_l4_ls__uart5 = { |
2215 | .slave = &am33xx_uart5_hwmod, | 2221 | .slave = &am33xx_uart5_hwmod, |
2216 | .clk = "uart5_ick", | 2222 | .clk = "uart5_ick", |
2217 | .addr = am33xx_uart5_addr_space, | 2223 | .addr = am33xx_uart5_addr_space, |
2218 | .user = OCP_USER_MPU, | 2224 | .user = OCP_USER_MPU, |
2219 | }; | 2225 | }; |
2220 | 2226 | ||
2221 | static struct omap_hwmod_irq_info am33xx_uart5_irqs[] = { | 2227 | static struct omap_hwmod_irq_info am33xx_uart5_irqs[] = { |
2222 | { .irq = AM33XX_IRQ_UART4 }, | 2228 | { .irq = AM33XX_IRQ_UART4 }, |
2223 | { .irq = -1 } | 2229 | { .irq = -1 } |
2224 | }; | 2230 | }; |
2225 | 2231 | ||
2226 | static struct omap_hwmod_ocp_if *am33xx_uart5_slaves[] = { | 2232 | static struct omap_hwmod_ocp_if *am33xx_uart5_slaves[] = { |
2227 | &am33xx_l4_ls__uart5, | 2233 | &am33xx_l4_ls__uart5, |
2228 | }; | 2234 | }; |
2229 | 2235 | ||
2230 | static struct omap_hwmod am33xx_uart5_hwmod = { | 2236 | static struct omap_hwmod am33xx_uart5_hwmod = { |
2231 | .name = "uart5", | 2237 | .name = "uart5", |
2232 | .class = &uart_class, | 2238 | .class = &uart_class, |
2233 | .mpu_irqs = am33xx_uart5_irqs, | 2239 | .mpu_irqs = am33xx_uart5_irqs, |
2234 | .main_clk = "uart5_fck", | 2240 | .main_clk = "uart5_fck", |
2235 | .clkdm_name = "l4ls_clkdm", | 2241 | .clkdm_name = "l4ls_clkdm", |
2236 | .sdma_reqs = uart1_edma_reqs, | 2242 | .sdma_reqs = uart1_edma_reqs, |
2237 | .prcm = { | 2243 | .prcm = { |
2238 | .omap4 = { | 2244 | .omap4 = { |
2239 | .clkctrl_offs = AM33XX_CM_PER_UART4_CLKCTRL_OFFSET, | 2245 | .clkctrl_offs = AM33XX_CM_PER_UART4_CLKCTRL_OFFSET, |
2240 | .modulemode = MODULEMODE_SWCTRL, | 2246 | .modulemode = MODULEMODE_SWCTRL, |
2241 | }, | 2247 | }, |
2242 | }, | 2248 | }, |
2243 | .slaves = am33xx_uart5_slaves, | 2249 | .slaves = am33xx_uart5_slaves, |
2244 | .slaves_cnt = ARRAY_SIZE(am33xx_uart5_slaves), | 2250 | .slaves_cnt = ARRAY_SIZE(am33xx_uart5_slaves), |
2245 | }; | 2251 | }; |
2246 | 2252 | ||
2247 | /* uart6 */ | 2253 | /* uart6 */ |
2248 | static struct omap_hwmod_addr_space am33xx_uart6_addr_space[] = { | 2254 | static struct omap_hwmod_addr_space am33xx_uart6_addr_space[] = { |
2249 | { | 2255 | { |
2250 | .pa_start = AM33XX_UART6_BASE, | 2256 | .pa_start = AM33XX_UART6_BASE, |
2251 | .pa_end = AM33XX_UART6_BASE + SZ_8K - 1, | 2257 | .pa_end = AM33XX_UART6_BASE + SZ_8K - 1, |
2252 | .flags = ADDR_TYPE_RT | 2258 | .flags = ADDR_TYPE_RT |
2253 | }, | 2259 | }, |
2254 | { } | 2260 | { } |
2255 | }; | 2261 | }; |
2256 | 2262 | ||
2257 | static struct omap_hwmod_ocp_if am33xx_l4_ls__uart6 = { | 2263 | static struct omap_hwmod_ocp_if am33xx_l4_ls__uart6 = { |
2258 | .slave = &am33xx_uart6_hwmod, | 2264 | .slave = &am33xx_uart6_hwmod, |
2259 | .clk = "uart6_ick", | 2265 | .clk = "uart6_ick", |
2260 | .addr = am33xx_uart6_addr_space, | 2266 | .addr = am33xx_uart6_addr_space, |
2261 | .user = OCP_USER_MPU, | 2267 | .user = OCP_USER_MPU, |
2262 | }; | 2268 | }; |
2263 | 2269 | ||
2264 | static struct omap_hwmod_irq_info am33xx_uart6_irqs[] = { | 2270 | static struct omap_hwmod_irq_info am33xx_uart6_irqs[] = { |
2265 | { .irq = AM33XX_IRQ_UART5 }, | 2271 | { .irq = AM33XX_IRQ_UART5 }, |
2266 | { .irq = -1 } | 2272 | { .irq = -1 } |
2267 | }; | 2273 | }; |
2268 | 2274 | ||
2269 | static struct omap_hwmod_ocp_if *am33xx_uart6_slaves[] = { | 2275 | static struct omap_hwmod_ocp_if *am33xx_uart6_slaves[] = { |
2270 | &am33xx_l4_ls__uart6, | 2276 | &am33xx_l4_ls__uart6, |
2271 | }; | 2277 | }; |
2272 | 2278 | ||
2273 | static struct omap_hwmod am33xx_uart6_hwmod = { | 2279 | static struct omap_hwmod am33xx_uart6_hwmod = { |
2274 | .name = "uart6", | 2280 | .name = "uart6", |
2275 | .class = &uart_class, | 2281 | .class = &uart_class, |
2276 | .mpu_irqs = am33xx_uart6_irqs, | 2282 | .mpu_irqs = am33xx_uart6_irqs, |
2277 | .main_clk = "uart6_fck", | 2283 | .main_clk = "uart6_fck", |
2278 | .clkdm_name = "l4ls_clkdm", | 2284 | .clkdm_name = "l4ls_clkdm", |
2279 | .sdma_reqs = uart1_edma_reqs, | 2285 | .sdma_reqs = uart1_edma_reqs, |
2280 | .prcm = { | 2286 | .prcm = { |
2281 | .omap4 = { | 2287 | .omap4 = { |
2282 | .clkctrl_offs = AM33XX_CM_PER_UART5_CLKCTRL_OFFSET, | 2288 | .clkctrl_offs = AM33XX_CM_PER_UART5_CLKCTRL_OFFSET, |
2283 | .modulemode = MODULEMODE_SWCTRL, | 2289 | .modulemode = MODULEMODE_SWCTRL, |
2284 | }, | 2290 | }, |
2285 | }, | 2291 | }, |
2286 | .slaves = am33xx_uart6_slaves, | 2292 | .slaves = am33xx_uart6_slaves, |
2287 | .slaves_cnt = ARRAY_SIZE(am33xx_uart6_slaves), | 2293 | .slaves_cnt = ARRAY_SIZE(am33xx_uart6_slaves), |
2288 | }; | 2294 | }; |
2289 | 2295 | ||
2290 | /* 'wd_timer' class */ | 2296 | /* 'wd_timer' class */ |
2291 | static struct omap_hwmod_class am33xx_wd_timer_hwmod_class = { | 2297 | static struct omap_hwmod_class am33xx_wd_timer_hwmod_class = { |
2292 | .name = "wd_timer", | 2298 | .name = "wd_timer", |
2293 | }; | 2299 | }; |
2294 | 2300 | ||
2295 | static struct omap_hwmod_addr_space am33xx_wd_timer1_addrs[] = { | 2301 | static struct omap_hwmod_addr_space am33xx_wd_timer1_addrs[] = { |
2296 | { | 2302 | { |
2297 | .pa_start = AM33XX_WDT1_BASE, | 2303 | .pa_start = AM33XX_WDT1_BASE, |
2298 | .pa_end = AM33XX_WDT1_BASE + SZ_4K - 1, | 2304 | .pa_end = AM33XX_WDT1_BASE + SZ_4K - 1, |
2299 | .flags = ADDR_TYPE_RT | 2305 | .flags = ADDR_TYPE_RT |
2300 | }, | 2306 | }, |
2301 | { } | 2307 | { } |
2302 | }; | 2308 | }; |
2303 | 2309 | ||
2304 | /* l4_wkup -> wd_timer1 */ | 2310 | /* l4_wkup -> wd_timer1 */ |
2305 | static struct omap_hwmod_ocp_if am33xx_l4wkup__wd_timer1 = { | 2311 | static struct omap_hwmod_ocp_if am33xx_l4wkup__wd_timer1 = { |
2306 | .master = &am33xx_l4wkup_hwmod, | 2312 | .master = &am33xx_l4wkup_hwmod, |
2307 | .slave = &am33xx_wd_timer1_hwmod, | 2313 | .slave = &am33xx_wd_timer1_hwmod, |
2308 | .addr = am33xx_wd_timer1_addrs, | 2314 | .addr = am33xx_wd_timer1_addrs, |
2309 | .user = OCP_USER_MPU, | 2315 | .user = OCP_USER_MPU, |
2310 | }; | 2316 | }; |
2311 | 2317 | ||
2312 | /* wd_timer1 slave ports */ | 2318 | /* wd_timer1 slave ports */ |
2313 | static struct omap_hwmod_ocp_if *am33xx_wd_timer1_slaves[] = { | 2319 | static struct omap_hwmod_ocp_if *am33xx_wd_timer1_slaves[] = { |
2314 | &am33xx_l4wkup__wd_timer1, | 2320 | &am33xx_l4wkup__wd_timer1, |
2315 | }; | 2321 | }; |
2316 | 2322 | ||
2317 | /* wd_timer1 */ | 2323 | /* wd_timer1 */ |
2318 | /* | 2324 | /* |
2319 | * TODO: device.c file uses hardcoded name for watchdog | 2325 | * TODO: device.c file uses hardcoded name for watchdog |
2320 | timer driver "wd_timer2, so we are also using | 2326 | timer driver "wd_timer2, so we are also using |
2321 | same name as of now... | 2327 | same name as of now... |
2322 | */ | 2328 | */ |
2323 | static struct omap_hwmod am33xx_wd_timer1_hwmod = { | 2329 | static struct omap_hwmod am33xx_wd_timer1_hwmod = { |
2324 | .name = "wd_timer2", | 2330 | .name = "wd_timer2", |
2325 | .class = &am33xx_wd_timer_hwmod_class, | 2331 | .class = &am33xx_wd_timer_hwmod_class, |
2326 | .main_clk = "wdt1_fck", | 2332 | .main_clk = "wdt1_fck", |
2327 | .clkdm_name = "l4_wkup_clkdm", | 2333 | .clkdm_name = "l4_wkup_clkdm", |
2328 | .prcm = { | 2334 | .prcm = { |
2329 | .omap4 = { | 2335 | .omap4 = { |
2330 | .clkctrl_offs = AM33XX_CM_WKUP_WDT1_CLKCTRL_OFFSET, | 2336 | .clkctrl_offs = AM33XX_CM_WKUP_WDT1_CLKCTRL_OFFSET, |
2331 | .modulemode = MODULEMODE_SWCTRL, | 2337 | .modulemode = MODULEMODE_SWCTRL, |
2332 | }, | 2338 | }, |
2333 | }, | 2339 | }, |
2334 | .slaves = am33xx_wd_timer1_slaves, | 2340 | .slaves = am33xx_wd_timer1_slaves, |
2335 | .slaves_cnt = ARRAY_SIZE(am33xx_wd_timer1_slaves), | 2341 | .slaves_cnt = ARRAY_SIZE(am33xx_wd_timer1_slaves), |
2336 | }; | 2342 | }; |
2337 | 2343 | ||
2338 | /* 'wkup_m3' class */ | 2344 | /* 'wkup_m3' class */ |
2339 | static struct omap_hwmod_class am33xx_wkup_m3_hwmod_class = { | 2345 | static struct omap_hwmod_class am33xx_wkup_m3_hwmod_class = { |
2340 | .name = "wkup_m3", | 2346 | .name = "wkup_m3", |
2341 | }; | 2347 | }; |
2342 | 2348 | ||
2343 | /* wkup_m3 */ | 2349 | /* wkup_m3 */ |
2344 | static struct omap_hwmod am33xx_wkup_m3_hwmod = { | 2350 | static struct omap_hwmod am33xx_wkup_m3_hwmod = { |
2345 | .name = "wkup_m3", | 2351 | .name = "wkup_m3", |
2346 | .class = &am33xx_wkup_m3_hwmod_class, | 2352 | .class = &am33xx_wkup_m3_hwmod_class, |
2347 | .clkdm_name = "l4_wkup_aon_clkdm", | 2353 | .clkdm_name = "l4_wkup_aon_clkdm", |
2348 | .main_clk = "wkup_m3_fck", | 2354 | .main_clk = "wkup_m3_fck", |
2349 | .prcm = { | 2355 | .prcm = { |
2350 | .omap4 = { | 2356 | .omap4 = { |
2351 | .clkctrl_offs = AM33XX_CM_WKUP_WKUP_M3_CLKCTRL_OFFSET, | 2357 | .clkctrl_offs = AM33XX_CM_WKUP_WKUP_M3_CLKCTRL_OFFSET, |
2352 | .modulemode = MODULEMODE_SWCTRL, | 2358 | .modulemode = MODULEMODE_SWCTRL, |
2353 | }, | 2359 | }, |
2354 | }, | 2360 | }, |
2355 | }; | 2361 | }; |
2356 | 2362 | ||
2357 | /* L3 SLOW -> USBSS interface */ | 2363 | /* L3 SLOW -> USBSS interface */ |
2358 | static struct omap_hwmod_addr_space am33xx_usbss_addr_space[] = { | 2364 | static struct omap_hwmod_addr_space am33xx_usbss_addr_space[] = { |
2359 | { | 2365 | { |
2360 | .name = "usbss", | 2366 | .name = "usbss", |
2361 | .pa_start = AM33XX_USBSS_BASE, | 2367 | .pa_start = AM33XX_USBSS_BASE, |
2362 | .pa_end = AM33XX_USBSS_BASE + SZ_4K - 1, | 2368 | .pa_end = AM33XX_USBSS_BASE + SZ_4K - 1, |
2363 | .flags = ADDR_TYPE_RT | 2369 | .flags = ADDR_TYPE_RT |
2364 | }, | 2370 | }, |
2365 | { | 2371 | { |
2366 | .name = "musb0", | 2372 | .name = "musb0", |
2367 | .pa_start = AM33XX_USB0_BASE, | 2373 | .pa_start = AM33XX_USB0_BASE, |
2368 | .pa_end = AM33XX_USB0_BASE + SZ_2K - 1, | 2374 | .pa_end = AM33XX_USB0_BASE + SZ_2K - 1, |
2369 | .flags = ADDR_TYPE_RT | 2375 | .flags = ADDR_TYPE_RT |
2370 | }, | 2376 | }, |
2371 | { | 2377 | { |
2372 | .name = "musb1", | 2378 | .name = "musb1", |
2373 | .pa_start = AM33XX_USB1_BASE, | 2379 | .pa_start = AM33XX_USB1_BASE, |
2374 | .pa_end = AM33XX_USB1_BASE + SZ_2K - 1, | 2380 | .pa_end = AM33XX_USB1_BASE + SZ_2K - 1, |
2375 | .flags = ADDR_TYPE_RT | 2381 | .flags = ADDR_TYPE_RT |
2376 | }, | 2382 | }, |
2377 | { } | 2383 | { } |
2378 | }; | 2384 | }; |
2379 | 2385 | ||
2380 | static struct omap_hwmod_class_sysconfig am33xx_usbhsotg_sysc = { | 2386 | static struct omap_hwmod_class_sysconfig am33xx_usbhsotg_sysc = { |
2381 | .rev_offs = 0x0, | 2387 | .rev_offs = 0x0, |
2382 | .sysc_offs = 0x10, | 2388 | .sysc_offs = 0x10, |
2383 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), | 2389 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), |
2384 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | 2390 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
2385 | .sysc_fields = &omap_hwmod_sysc_type2, | 2391 | .sysc_fields = &omap_hwmod_sysc_type2, |
2386 | }; | 2392 | }; |
2387 | 2393 | ||
2388 | static struct omap_hwmod_class am33xx_usbotg_class = { | 2394 | static struct omap_hwmod_class am33xx_usbotg_class = { |
2389 | .name = "usbotg", | 2395 | .name = "usbotg", |
2390 | .sysc = &am33xx_usbhsotg_sysc, | 2396 | .sysc = &am33xx_usbhsotg_sysc, |
2391 | }; | 2397 | }; |
2392 | 2398 | ||
2393 | static struct omap_hwmod_irq_info am33xx_usbss_mpu_irqs[] = { | 2399 | static struct omap_hwmod_irq_info am33xx_usbss_mpu_irqs[] = { |
2394 | { .name = "usbss-irq", .irq = AM33XX_IRQ_USBSS, }, | 2400 | { .name = "usbss-irq", .irq = AM33XX_IRQ_USBSS, }, |
2395 | { .name = "musb0-irq", .irq = AM33XX_IRQ_USB0, }, | 2401 | { .name = "musb0-irq", .irq = AM33XX_IRQ_USB0, }, |
2396 | { .name = "musb1-irq", .irq = AM33XX_IRQ_USB1, }, | 2402 | { .name = "musb1-irq", .irq = AM33XX_IRQ_USB1, }, |
2397 | { .irq = -1, }, | 2403 | { .irq = -1, }, |
2398 | }; | 2404 | }; |
2399 | 2405 | ||
2400 | static struct omap_hwmod_ocp_if am33xx_l3_slow__usbss = { | 2406 | static struct omap_hwmod_ocp_if am33xx_l3_slow__usbss = { |
2401 | .master = &am33xx_l3slow_hwmod, | 2407 | .master = &am33xx_l3slow_hwmod, |
2402 | .slave = &am33xx_usbss_hwmod, | 2408 | .slave = &am33xx_usbss_hwmod, |
2403 | .addr = am33xx_usbss_addr_space, | 2409 | .addr = am33xx_usbss_addr_space, |
2404 | .user = OCP_USER_MPU, | 2410 | .user = OCP_USER_MPU, |
2405 | .flags = OCPIF_SWSUP_IDLE, | 2411 | .flags = OCPIF_SWSUP_IDLE, |
2406 | }; | 2412 | }; |
2407 | 2413 | ||
2408 | static struct omap_hwmod_ocp_if *am33xx_usbss_slaves[] = { | 2414 | static struct omap_hwmod_ocp_if *am33xx_usbss_slaves[] = { |
2409 | &am33xx_l3_slow__usbss, | 2415 | &am33xx_l3_slow__usbss, |
2410 | }; | 2416 | }; |
2411 | 2417 | ||
2412 | static struct omap_hwmod_opt_clk usbss_opt_clks[] = { | 2418 | static struct omap_hwmod_opt_clk usbss_opt_clks[] = { |
2413 | { .role = "clkdcoldo", .clk = "usbotg_fck" }, | 2419 | { .role = "clkdcoldo", .clk = "usbotg_fck" }, |
2414 | }; | 2420 | }; |
2415 | 2421 | ||
2416 | static struct omap_hwmod am33xx_usbss_hwmod = { | 2422 | static struct omap_hwmod am33xx_usbss_hwmod = { |
2417 | .name = "usb_otg_hs", | 2423 | .name = "usb_otg_hs", |
2418 | .mpu_irqs = am33xx_usbss_mpu_irqs, | 2424 | .mpu_irqs = am33xx_usbss_mpu_irqs, |
2419 | .main_clk = "usbotg_ick", | 2425 | .main_clk = "usbotg_ick", |
2420 | .clkdm_name = "l4ls_clkdm", | 2426 | .clkdm_name = "l4ls_clkdm", |
2421 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 2427 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
2422 | .prcm = { | 2428 | .prcm = { |
2423 | .omap4 = { | 2429 | .omap4 = { |
2424 | .clkctrl_offs = AM33XX_CM_PER_USB0_CLKCTRL_OFFSET, | 2430 | .clkctrl_offs = AM33XX_CM_PER_USB0_CLKCTRL_OFFSET, |
2425 | .modulemode = MODULEMODE_SWCTRL, | 2431 | .modulemode = MODULEMODE_SWCTRL, |
2426 | }, | 2432 | }, |
2427 | }, | 2433 | }, |
2428 | .opt_clks = usbss_opt_clks, | 2434 | .opt_clks = usbss_opt_clks, |
2429 | .opt_clks_cnt = ARRAY_SIZE(usbss_opt_clks), | 2435 | .opt_clks_cnt = ARRAY_SIZE(usbss_opt_clks), |
2430 | .slaves = am33xx_usbss_slaves, | 2436 | .slaves = am33xx_usbss_slaves, |
2431 | .slaves_cnt = ARRAY_SIZE(am33xx_usbss_slaves), | 2437 | .slaves_cnt = ARRAY_SIZE(am33xx_usbss_slaves), |
2432 | .class = &am33xx_usbotg_class, | 2438 | .class = &am33xx_usbotg_class, |
2433 | }; | 2439 | }; |
2434 | 2440 | ||
2435 | /* sgx/gfx */ | 2441 | /* sgx/gfx */ |
2436 | /* Pseudo hwmod for reset control purpose only */ | 2442 | /* Pseudo hwmod for reset control purpose only */ |
2437 | static struct omap_hwmod_class am33xx_gfx_hwmod_class = { | 2443 | static struct omap_hwmod_class am33xx_gfx_hwmod_class = { |
2438 | .name = "gfx", | 2444 | .name = "gfx", |
2439 | }; | 2445 | }; |
2440 | 2446 | ||
2441 | static struct omap_hwmod_rst_info am33xx_gfx_resets[] = { | 2447 | static struct omap_hwmod_rst_info am33xx_gfx_resets[] = { |
2442 | { .name = "gfx", .rst_shift = 0, .st_shift = 0 }, | 2448 | { .name = "gfx", .rst_shift = 0, .st_shift = 0 }, |
2443 | }; | 2449 | }; |
2444 | 2450 | ||
2445 | static struct omap_hwmod am33xx_gfx_hwmod = { | 2451 | static struct omap_hwmod am33xx_gfx_hwmod = { |
2446 | .name = "gfx", | 2452 | .name = "gfx", |
2447 | .class = &am33xx_gfx_hwmod_class, | 2453 | .class = &am33xx_gfx_hwmod_class, |
2448 | .clkdm_name = "gfx_l3_clkdm", | 2454 | .clkdm_name = "gfx_l3_clkdm", |
2449 | .rst_lines = am33xx_gfx_resets, | 2455 | .rst_lines = am33xx_gfx_resets, |
2450 | .rst_lines_cnt = ARRAY_SIZE(am33xx_gfx_resets), | 2456 | .rst_lines_cnt = ARRAY_SIZE(am33xx_gfx_resets), |
2451 | }; | 2457 | }; |
2452 | 2458 | ||
2453 | /* PRUSS/ICSS */ | 2459 | /* PRUSS/ICSS */ |
2454 | /* Pseudo hwmod for reset control purpose only */ | 2460 | /* Pseudo hwmod for reset control purpose only */ |
2455 | static struct omap_hwmod_class am33xx_pruss_hwmod_class = { | 2461 | static struct omap_hwmod_class am33xx_pruss_hwmod_class = { |
2456 | .name = "pruss", | 2462 | .name = "pruss", |
2457 | }; | 2463 | }; |
2458 | 2464 | ||
2459 | static struct omap_hwmod_rst_info am33xx_pruss_resets[] = { | 2465 | static struct omap_hwmod_rst_info am33xx_pruss_resets[] = { |
2460 | { .name = "pruss", .rst_shift = 1, .st_shift = 1 }, | 2466 | { .name = "pruss", .rst_shift = 1, .st_shift = 1 }, |
2461 | }; | 2467 | }; |
2462 | 2468 | ||
2463 | static struct omap_hwmod am33xx_pruss_hwmod = { | 2469 | static struct omap_hwmod am33xx_pruss_hwmod = { |
2464 | .name = "pruss", | 2470 | .name = "pruss", |
2465 | .class = &am33xx_pruss_hwmod_class, | 2471 | .class = &am33xx_pruss_hwmod_class, |
2466 | .clkdm_name = "icss_ocp_clkdm", | 2472 | .clkdm_name = "icss_ocp_clkdm", |
2467 | .rst_lines = am33xx_pruss_resets, | 2473 | .rst_lines = am33xx_pruss_resets, |
2468 | .rst_lines_cnt = ARRAY_SIZE(am33xx_pruss_resets), | 2474 | .rst_lines_cnt = ARRAY_SIZE(am33xx_pruss_resets), |
2469 | }; | 2475 | }; |
2470 | 2476 | ||
2471 | static __initdata struct omap_hwmod *am33xx_hwmods[] = { | 2477 | static __initdata struct omap_hwmod *am33xx_hwmods[] = { |
2472 | /* l3 class */ | 2478 | /* l3 class */ |
2473 | &am33xx_l3_instr_hwmod, | 2479 | &am33xx_l3_instr_hwmod, |
2474 | &am33xx_l3_main_hwmod, | 2480 | &am33xx_l3_main_hwmod, |
2475 | /* l3s class */ | 2481 | /* l3s class */ |
2476 | &am33xx_l3slow_hwmod, | 2482 | &am33xx_l3slow_hwmod, |
2477 | /* l4hs class */ | 2483 | /* l4hs class */ |
2478 | &am33xx_l4_hs_hwmod, | 2484 | &am33xx_l4_hs_hwmod, |
2479 | /* l4fw class */ | 2485 | /* l4fw class */ |
2480 | &am33xx_l4fw_hwmod, | 2486 | &am33xx_l4fw_hwmod, |
2481 | /* l4ls class */ | 2487 | /* l4ls class */ |
2482 | &am33xx_l4ls_hwmod, | 2488 | &am33xx_l4ls_hwmod, |
2483 | /* l4per class */ | 2489 | /* l4per class */ |
2484 | &am33xx_l4per_hwmod, | 2490 | &am33xx_l4per_hwmod, |
2485 | /* l4wkup class */ | 2491 | /* l4wkup class */ |
2486 | &am33xx_l4wkup_hwmod, | 2492 | &am33xx_l4wkup_hwmod, |
2487 | 2493 | ||
2488 | /* clkdiv32k class */ | 2494 | /* clkdiv32k class */ |
2489 | &am33xx_clkdiv32k_hwmod, | 2495 | &am33xx_clkdiv32k_hwmod, |
2490 | /* mpu class */ | 2496 | /* mpu class */ |
2491 | &am33xx_mpu_hwmod, | 2497 | &am33xx_mpu_hwmod, |
2492 | /* adc_tsc class */ | 2498 | /* adc_tsc class */ |
2493 | &am33xx_adc_tsc_hwmod, | 2499 | &am33xx_adc_tsc_hwmod, |
2494 | /* aes class */ | 2500 | /* aes class */ |
2495 | &am33xx_aes0_hwmod, | 2501 | &am33xx_aes0_hwmod, |
2496 | /* cefuse class */ | 2502 | /* cefuse class */ |
2497 | &am33xx_cefuse_hwmod, | 2503 | &am33xx_cefuse_hwmod, |
2498 | /* control class */ | 2504 | /* control class */ |
2499 | &am33xx_control_hwmod, | 2505 | &am33xx_control_hwmod, |
2500 | /* dcan class */ | 2506 | /* dcan class */ |
2501 | &am33xx_dcan0_hwmod, | 2507 | &am33xx_dcan0_hwmod, |
2502 | &am33xx_dcan1_hwmod, | 2508 | &am33xx_dcan1_hwmod, |
2503 | /* debugss class */ | 2509 | /* debugss class */ |
2504 | &am33xx_debugss_hwmod, | 2510 | &am33xx_debugss_hwmod, |
2505 | /* elm class */ | 2511 | /* elm class */ |
2506 | &am33xx_elm_hwmod, | 2512 | &am33xx_elm_hwmod, |
2507 | /* emif_fw class */ | 2513 | /* emif_fw class */ |
2508 | &am33xx_emif_fw_hwmod, | 2514 | &am33xx_emif_fw_hwmod, |
2509 | /* epwmss class */ | 2515 | /* epwmss class */ |
2510 | &am33xx_epwmss0_hwmod, | 2516 | &am33xx_epwmss0_hwmod, |
2511 | &am33xx_epwmss1_hwmod, | 2517 | &am33xx_epwmss1_hwmod, |
2512 | &am33xx_epwmss2_hwmod, | 2518 | &am33xx_epwmss2_hwmod, |
2513 | /* gpio class */ | 2519 | /* gpio class */ |
2514 | &am33xx_gpio0_hwmod, | 2520 | &am33xx_gpio0_hwmod, |
2515 | &am33xx_gpio1_hwmod, | 2521 | &am33xx_gpio1_hwmod, |
2516 | &am33xx_gpio2_hwmod, | 2522 | &am33xx_gpio2_hwmod, |
2517 | &am33xx_gpio3_hwmod, | 2523 | &am33xx_gpio3_hwmod, |
2518 | /* gpmc class */ | 2524 | /* gpmc class */ |
2519 | &am33xx_gpmc_hwmod, | 2525 | &am33xx_gpmc_hwmod, |
2520 | /* i2c class */ | 2526 | /* i2c class */ |
2521 | &am33xx_i2c1_hwmod, | 2527 | &am33xx_i2c1_hwmod, |
2522 | &am33xx_i2c2_hwmod, | 2528 | &am33xx_i2c2_hwmod, |
2523 | /* icss class */ | 2529 | /* icss class */ |
2524 | &am33xx_icss_hwmod, | 2530 | &am33xx_icss_hwmod, |
2525 | /* ieee5000 class */ | 2531 | /* ieee5000 class */ |
2526 | &am33xx_ieee5000_hwmod, | 2532 | &am33xx_ieee5000_hwmod, |
2527 | /* mcasp class */ | 2533 | /* mcasp class */ |
2528 | &am33xx_mcasp0_hwmod, | 2534 | &am33xx_mcasp0_hwmod, |
2529 | /* mmc class */ | 2535 | /* mmc class */ |
2530 | &am33xx_mmc0_hwmod, | 2536 | &am33xx_mmc0_hwmod, |
2531 | &am33xx_mmc1_hwmod, | 2537 | &am33xx_mmc1_hwmod, |
2532 | &am33xx_mmc2_hwmod, | 2538 | &am33xx_mmc2_hwmod, |
2533 | /* ocmcram class */ | 2539 | /* ocmcram class */ |
2534 | &am33xx_ocmcram_hwmod, | 2540 | &am33xx_ocmcram_hwmod, |
2535 | /* ocpwp class */ | 2541 | /* ocpwp class */ |
2536 | &am33xx_ocpwp_hwmod, | 2542 | &am33xx_ocpwp_hwmod, |
2537 | /* sha0 class */ | 2543 | /* sha0 class */ |
2538 | &am33xx_sha0_hwmod, | 2544 | &am33xx_sha0_hwmod, |
2539 | /* smartreflex class */ | 2545 | /* smartreflex class */ |
2540 | &am33xx_smartreflex0_hwmod, | 2546 | &am33xx_smartreflex0_hwmod, |
2541 | &am33xx_smartreflex1_hwmod, | 2547 | &am33xx_smartreflex1_hwmod, |
2542 | /* spi class */ | 2548 | /* spi class */ |
2543 | &am33xx_spi0_hwmod, | 2549 | &am33xx_spi0_hwmod, |
2544 | &am33xx_spi1_hwmod, | 2550 | &am33xx_spi1_hwmod, |
2545 | /* spinlock class */ | 2551 | /* spinlock class */ |
2546 | &am33xx_spinlock_hwmod, | 2552 | &am33xx_spinlock_hwmod, |
2547 | /* uart class */ | 2553 | /* uart class */ |
2548 | &am33xx_uart1_hwmod, | 2554 | &am33xx_uart1_hwmod, |
2549 | &am33xx_uart2_hwmod, | 2555 | &am33xx_uart2_hwmod, |
2550 | &am33xx_uart3_hwmod, | 2556 | &am33xx_uart3_hwmod, |
2551 | &am33xx_uart4_hwmod, | 2557 | &am33xx_uart4_hwmod, |
2552 | &am33xx_uart5_hwmod, | 2558 | &am33xx_uart5_hwmod, |
2553 | &am33xx_uart6_hwmod, | 2559 | &am33xx_uart6_hwmod, |
2554 | /* timer class */ | 2560 | /* timer class */ |
2555 | &am33xx_timer0_hwmod, | 2561 | &am33xx_timer0_hwmod, |
2556 | &am33xx_timer1_hwmod, | 2562 | &am33xx_timer1_hwmod, |
2557 | &am33xx_timer2_hwmod, | 2563 | &am33xx_timer2_hwmod, |
2558 | &am33xx_timer3_hwmod, | 2564 | &am33xx_timer3_hwmod, |
2559 | &am33xx_timer4_hwmod, | 2565 | &am33xx_timer4_hwmod, |
2560 | &am33xx_timer5_hwmod, | 2566 | &am33xx_timer5_hwmod, |
2561 | &am33xx_timer6_hwmod, | 2567 | &am33xx_timer6_hwmod, |
2562 | &am33xx_timer7_hwmod, | 2568 | &am33xx_timer7_hwmod, |
2563 | /* wkup_m3 class */ | 2569 | /* wkup_m3 class */ |
2564 | &am33xx_wkup_m3_hwmod, | 2570 | &am33xx_wkup_m3_hwmod, |
2565 | /* wd_timer class */ | 2571 | /* wd_timer class */ |
2566 | &am33xx_wd_timer1_hwmod, | 2572 | &am33xx_wd_timer1_hwmod, |
2567 | /* usbss hwmod */ | 2573 | /* usbss hwmod */ |
2568 | &am33xx_usbss_hwmod, | 2574 | &am33xx_usbss_hwmod, |
2569 | /* cpgmac0 class */ | 2575 | /* cpgmac0 class */ |
2570 | &am33xx_cpgmac0_hwmod, | 2576 | &am33xx_cpgmac0_hwmod, |
2571 | /* tptc class */ | 2577 | /* tptc class */ |
2572 | &am33xx_tptc0_hwmod, | 2578 | &am33xx_tptc0_hwmod, |
2573 | &am33xx_tptc1_hwmod, | 2579 | &am33xx_tptc1_hwmod, |
2574 | &am33xx_tptc2_hwmod, | 2580 | &am33xx_tptc2_hwmod, |
2575 | /* tpcc class */ | 2581 | /* tpcc class */ |
2576 | &am33xx_tpcc_hwmod, | 2582 | &am33xx_tpcc_hwmod, |
2577 | /* LCDC class */ | 2583 | /* LCDC class */ |
2578 | &am33xx_lcdc_hwmod, | 2584 | &am33xx_lcdc_hwmod, |
2579 | /* gfx/sgx */ | 2585 | /* gfx/sgx */ |
2580 | &am33xx_gfx_hwmod, | 2586 | &am33xx_gfx_hwmod, |
2581 | /* pruss/icss */ | 2587 | /* pruss/icss */ |
2582 | &am33xx_pruss_hwmod, | 2588 | &am33xx_pruss_hwmod, |
2583 | /* rtc */ | 2589 | /* rtc */ |
2584 | &am33xx_rtc_hwmod, | 2590 | &am33xx_rtc_hwmod, |
2585 | NULL, | 2591 | NULL, |
2586 | }; | 2592 | }; |
2587 | 2593 | ||
2588 | int __init am33xx_hwmod_init(void) | 2594 | int __init am33xx_hwmod_init(void) |
2589 | { | 2595 | { |
2590 | return omap_hwmod_register(am33xx_hwmods); | 2596 | return omap_hwmod_register(am33xx_hwmods); |
2591 | } | 2597 | } |
2592 | 2598 |