paul@218 | 1 | /* |
paul@218 | 2 | * Access various peripherals on a board using the X1600. |
paul@218 | 3 | * |
paul@218 | 4 | * Copyright (C) 2023 Paul Boddie <paul@boddie.org.uk> |
paul@218 | 5 | * |
paul@218 | 6 | * This program is free software; you can redistribute it and/or |
paul@218 | 7 | * modify it under the terms of the GNU General Public License as |
paul@218 | 8 | * published by the Free Software Foundation; either version 2 of |
paul@218 | 9 | * the License, or (at your option) any later version. |
paul@218 | 10 | * |
paul@218 | 11 | * This program is distributed in the hope that it will be useful, |
paul@218 | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
paul@218 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
paul@218 | 14 | * GNU General Public License for more details. |
paul@218 | 15 | * |
paul@218 | 16 | * You should have received a copy of the GNU General Public License |
paul@218 | 17 | * along with this program; if not, write to the Free Software |
paul@218 | 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, |
paul@218 | 19 | * Boston, MA 02110-1301, USA |
paul@218 | 20 | */ |
paul@218 | 21 | |
paul@218 | 22 | #include <l4/devices/aic-x1600.h> |
paul@218 | 23 | #include <l4/devices/cpm-x1600.h> |
paul@218 | 24 | #include <l4/devices/dma-x1600.h> |
paul@218 | 25 | #include <l4/devices/gpio-x1600.h> |
paul@218 | 26 | #include <l4/devices/i2c-x1600.h> |
paul@218 | 27 | #include <l4/devices/spi-gpio.h> |
paul@218 | 28 | #include "common.h" |
paul@218 | 29 | |
paul@218 | 30 | |
paul@218 | 31 | |
paul@218 | 32 | /* AIC adapter functions. */ |
paul@218 | 33 | |
paul@218 | 34 | void *aic_init(l4_addr_t aic_start, l4_addr_t start, l4_addr_t end, void *cpm) |
paul@218 | 35 | { |
paul@218 | 36 | return x1600_aic_init(aic_start, start, end, cpm); |
paul@218 | 37 | } |
paul@218 | 38 | |
paul@218 | 39 | void *aic_get_channel(void *aic, int num, void *channel) |
paul@218 | 40 | { |
paul@218 | 41 | return x1600_aic_get_channel(aic, num, channel); |
paul@218 | 42 | } |
paul@218 | 43 | |
paul@221 | 44 | unsigned int aic_transfer(void *channel, l4re_dma_space_dma_addr_t paddr, |
paul@221 | 45 | uint32_t count, uint32_t sample_rate, |
paul@221 | 46 | uint8_t sample_size) |
paul@218 | 47 | { |
paul@221 | 48 | return x1600_aic_transfer(channel, paddr, count, sample_rate, sample_size); |
paul@218 | 49 | } |
paul@218 | 50 | |
paul@218 | 51 | |
paul@218 | 52 | |
paul@218 | 53 | /* CPM adapter functions. */ |
paul@218 | 54 | |
paul@218 | 55 | void *cpm_init(l4_addr_t cpm_base) |
paul@218 | 56 | { |
paul@218 | 57 | return x1600_cpm_init(cpm_base); |
paul@218 | 58 | } |
paul@218 | 59 | |
paul@218 | 60 | const char *cpm_clock_type(void *cpm, enum Clock_identifiers clock) |
paul@218 | 61 | { |
paul@218 | 62 | return x1600_cpm_clock_type(cpm, clock); |
paul@218 | 63 | } |
paul@218 | 64 | |
paul@218 | 65 | int cpm_have_clock(void *cpm, enum Clock_identifiers clock) |
paul@218 | 66 | { |
paul@218 | 67 | return x1600_cpm_have_clock(cpm, clock); |
paul@218 | 68 | } |
paul@218 | 69 | |
paul@218 | 70 | void cpm_start_clock(void *cpm, enum Clock_identifiers clock) |
paul@218 | 71 | { |
paul@218 | 72 | x1600_cpm_start_clock(cpm, clock); |
paul@218 | 73 | } |
paul@218 | 74 | |
paul@218 | 75 | void cpm_stop_clock(void *cpm, enum Clock_identifiers clock) |
paul@218 | 76 | { |
paul@218 | 77 | x1600_cpm_stop_clock(cpm, clock); |
paul@218 | 78 | } |
paul@218 | 79 | |
paul@218 | 80 | int cpm_get_parameters(void *cpm, enum Clock_identifiers clock, |
paul@218 | 81 | uint32_t parameters[]) |
paul@218 | 82 | { |
paul@218 | 83 | return x1600_cpm_get_parameters(cpm, clock, parameters); |
paul@218 | 84 | } |
paul@218 | 85 | |
paul@218 | 86 | int cpm_set_parameters(void *cpm, enum Clock_identifiers clock, |
paul@218 | 87 | int num_parameters, uint32_t parameters[]) |
paul@218 | 88 | { |
paul@218 | 89 | return x1600_cpm_set_parameters(cpm, clock, num_parameters, parameters); |
paul@218 | 90 | } |
paul@218 | 91 | |
paul@218 | 92 | uint8_t cpm_get_source(void *cpm, enum Clock_identifiers clock) |
paul@218 | 93 | { |
paul@218 | 94 | return x1600_cpm_get_source(cpm, clock); |
paul@218 | 95 | } |
paul@218 | 96 | |
paul@218 | 97 | void cpm_set_source(void *cpm, enum Clock_identifiers clock, uint8_t source) |
paul@218 | 98 | { |
paul@218 | 99 | x1600_cpm_set_source(cpm, clock, source); |
paul@218 | 100 | } |
paul@218 | 101 | |
paul@218 | 102 | enum Clock_identifiers cpm_get_source_clock(void *cpm, enum Clock_identifiers clock) |
paul@218 | 103 | { |
paul@218 | 104 | return x1600_cpm_get_source_clock(cpm, clock); |
paul@218 | 105 | } |
paul@218 | 106 | |
paul@218 | 107 | void cpm_set_source_clock(void *cpm, enum Clock_identifiers clock, enum Clock_identifiers source) |
paul@218 | 108 | { |
paul@218 | 109 | x1600_cpm_set_source_clock(cpm, clock, source); |
paul@218 | 110 | } |
paul@218 | 111 | |
paul@218 | 112 | uint64_t cpm_get_source_frequency(void *cpm, enum Clock_identifiers clock) |
paul@218 | 113 | { |
paul@218 | 114 | return x1600_cpm_get_source_frequency(cpm, clock); |
paul@218 | 115 | } |
paul@218 | 116 | |
paul@218 | 117 | uint64_t cpm_get_frequency(void *cpm, enum Clock_identifiers clock) |
paul@218 | 118 | { |
paul@218 | 119 | return x1600_cpm_get_frequency(cpm, clock); |
paul@218 | 120 | } |
paul@218 | 121 | |
paul@218 | 122 | int cpm_set_frequency(void *cpm, enum Clock_identifiers clock, uint64_t frequency) |
paul@218 | 123 | { |
paul@218 | 124 | return x1600_cpm_set_frequency(cpm, clock, frequency); |
paul@218 | 125 | } |
paul@218 | 126 | |
paul@218 | 127 | |
paul@218 | 128 | |
paul@218 | 129 | /* DMA adapter functions. */ |
paul@218 | 130 | |
paul@218 | 131 | void *dma_init(l4_addr_t start, l4_addr_t end, void *cpm) |
paul@218 | 132 | { |
paul@218 | 133 | return x1600_dma_init(start, end, cpm); |
paul@218 | 134 | } |
paul@218 | 135 | |
paul@218 | 136 | void dma_disable(void *dma_chip) |
paul@218 | 137 | { |
paul@218 | 138 | x1600_dma_disable(dma_chip); |
paul@218 | 139 | } |
paul@218 | 140 | |
paul@218 | 141 | void dma_enable(void *dma_chip) |
paul@218 | 142 | { |
paul@218 | 143 | x1600_dma_enable(dma_chip); |
paul@218 | 144 | } |
paul@218 | 145 | |
paul@218 | 146 | void *dma_get_channel(void *dma, uint8_t channel, l4_cap_idx_t irq) |
paul@218 | 147 | { |
paul@218 | 148 | return x1600_dma_get_channel(dma, channel, irq); |
paul@218 | 149 | } |
paul@218 | 150 | |
paul@218 | 151 | unsigned int dma_transfer(void *dma_channel, |
paul@218 | 152 | uint32_t source, uint32_t destination, |
paul@218 | 153 | unsigned int count, |
paul@218 | 154 | int source_increment, int destination_increment, |
paul@218 | 155 | uint8_t source_width, uint8_t destination_width, |
paul@218 | 156 | uint8_t transfer_unit_size, |
paul@218 | 157 | int type) |
paul@218 | 158 | { |
paul@218 | 159 | return x1600_dma_transfer(dma_channel, source, destination, count, |
paul@218 | 160 | source_increment, destination_increment, |
paul@218 | 161 | source_width, destination_width, |
paul@218 | 162 | transfer_unit_size, type); |
paul@218 | 163 | } |
paul@218 | 164 | |
paul@218 | 165 | unsigned int dma_wait(void *dma_channel) |
paul@218 | 166 | { |
paul@218 | 167 | return x1600_dma_wait(dma_channel); |
paul@218 | 168 | } |
paul@218 | 169 | |
paul@218 | 170 | |
paul@218 | 171 | |
paul@218 | 172 | /* GPIO adapter functions. */ |
paul@218 | 173 | |
paul@218 | 174 | void *gpio_init(l4_addr_t start, l4_addr_t end, unsigned pins, |
paul@218 | 175 | l4_uint32_t pull_ups, l4_uint32_t pull_downs) |
paul@218 | 176 | { |
paul@218 | 177 | return x1600_gpio_init(start, end, pins, pull_ups, pull_downs); |
paul@218 | 178 | } |
paul@218 | 179 | |
paul@218 | 180 | void gpio_setup(void *gpio, unsigned pin, unsigned mode, int value) |
paul@218 | 181 | { |
paul@218 | 182 | x1600_gpio_setup(gpio, pin, mode, value); |
paul@218 | 183 | } |
paul@218 | 184 | |
paul@218 | 185 | void gpio_config_pull(void *gpio, unsigned pin, unsigned mode) |
paul@218 | 186 | { |
paul@218 | 187 | x1600_gpio_config_pull(gpio, pin, mode); |
paul@218 | 188 | } |
paul@218 | 189 | |
paul@218 | 190 | void gpio_config_pad(void *gpio, unsigned pin, unsigned func, unsigned value) |
paul@218 | 191 | { |
paul@218 | 192 | x1600_gpio_config_pad(gpio, pin, func, value); |
paul@218 | 193 | } |
paul@218 | 194 | |
paul@218 | 195 | void gpio_config_get(void *gpio, unsigned pin, unsigned reg, unsigned *value) |
paul@218 | 196 | { |
paul@218 | 197 | x1600_gpio_config_get(gpio, pin, reg, value); |
paul@218 | 198 | } |
paul@218 | 199 | |
paul@218 | 200 | void gpio_config_pad_get(void *gpio, unsigned pin, unsigned *func, unsigned *value) |
paul@218 | 201 | { |
paul@218 | 202 | x1600_gpio_config_pad_get(gpio, pin, func, value); |
paul@218 | 203 | } |
paul@218 | 204 | |
paul@218 | 205 | void gpio_multi_setup(void *gpio, Pin_slice const *mask, unsigned mode, unsigned outvalues) |
paul@218 | 206 | { |
paul@218 | 207 | x1600_gpio_multi_setup(gpio, mask, mode, outvalues); |
paul@218 | 208 | } |
paul@218 | 209 | |
paul@218 | 210 | void gpio_multi_config_pad(void *gpio, Pin_slice const *mask, unsigned func, unsigned value) |
paul@218 | 211 | { |
paul@218 | 212 | x1600_gpio_multi_config_pad(gpio, mask, func, value); |
paul@218 | 213 | } |
paul@218 | 214 | |
paul@218 | 215 | void gpio_multi_set(void *gpio, Pin_slice const *mask, unsigned data) |
paul@218 | 216 | { |
paul@218 | 217 | x1600_gpio_multi_set(gpio, mask, data); |
paul@218 | 218 | } |
paul@218 | 219 | |
paul@218 | 220 | unsigned gpio_multi_get(void *gpio, unsigned offset) |
paul@218 | 221 | { |
paul@218 | 222 | return x1600_gpio_multi_get(gpio, offset); |
paul@218 | 223 | } |
paul@218 | 224 | |
paul@218 | 225 | int gpio_get(void *gpio, unsigned pin) |
paul@218 | 226 | { |
paul@218 | 227 | return x1600_gpio_get(gpio, pin); |
paul@218 | 228 | } |
paul@218 | 229 | |
paul@218 | 230 | void gpio_set(void *gpio, unsigned pin, int value) |
paul@218 | 231 | { |
paul@218 | 232 | x1600_gpio_set(gpio, pin, value); |
paul@218 | 233 | } |
paul@218 | 234 | |
paul@218 | 235 | void *gpio_get_irq(void *gpio, unsigned pin) |
paul@218 | 236 | { |
paul@218 | 237 | return x1600_gpio_get_irq(gpio, pin); |
paul@218 | 238 | } |
paul@218 | 239 | |
paul@218 | 240 | bool gpio_irq_set_mode(void *gpio_irq, unsigned mode) |
paul@218 | 241 | { |
paul@218 | 242 | return x1600_gpio_irq_set_mode(gpio_irq, mode); |
paul@218 | 243 | } |
paul@218 | 244 | |
paul@218 | 245 | |
paul@218 | 246 | |
paul@218 | 247 | /* I2C adapter functions. */ |
paul@218 | 248 | |
paul@218 | 249 | void *i2c_init(l4_addr_t start, l4_addr_t end, void *cpm, |
paul@218 | 250 | uint32_t frequency) |
paul@218 | 251 | { |
paul@218 | 252 | return x1600_i2c_init(start, end, cpm, frequency); |
paul@218 | 253 | } |
paul@218 | 254 | |
paul@218 | 255 | void *i2c_get_channel(void *i2c, uint8_t channel) |
paul@218 | 256 | { |
paul@218 | 257 | return x1600_i2c_get_channel(i2c, channel); |
paul@218 | 258 | } |
paul@218 | 259 | |
paul@218 | 260 | uint32_t i2c_get_frequency(void *i2c_channel) |
paul@218 | 261 | { |
paul@218 | 262 | return x1600_i2c_get_frequency(i2c_channel); |
paul@218 | 263 | } |
paul@218 | 264 | |
paul@218 | 265 | void i2c_set_target(void *i2c_channel, uint8_t addr) |
paul@218 | 266 | { |
paul@218 | 267 | return x1600_i2c_set_target(i2c_channel, addr); |
paul@218 | 268 | } |
paul@218 | 269 | |
paul@218 | 270 | void i2c_start_read(void *i2c_channel, uint8_t buf[], unsigned int total, |
paul@218 | 271 | int stop) |
paul@218 | 272 | { |
paul@218 | 273 | x1600_i2c_start_read(i2c_channel, buf, total, stop); |
paul@218 | 274 | } |
paul@218 | 275 | |
paul@218 | 276 | void i2c_read(void *i2c_channel) |
paul@218 | 277 | { |
paul@218 | 278 | x1600_i2c_read(i2c_channel); |
paul@218 | 279 | } |
paul@218 | 280 | |
paul@218 | 281 | void i2c_start_write(void *i2c_channel, uint8_t buf[], unsigned int total, |
paul@218 | 282 | int stop) |
paul@218 | 283 | { |
paul@218 | 284 | x1600_i2c_start_write(i2c_channel, buf, total, stop); |
paul@218 | 285 | } |
paul@218 | 286 | |
paul@218 | 287 | void i2c_write(void *i2c_channel) |
paul@218 | 288 | { |
paul@218 | 289 | x1600_i2c_write(i2c_channel); |
paul@218 | 290 | } |
paul@218 | 291 | |
paul@218 | 292 | int i2c_read_done(void *i2c_channel) |
paul@218 | 293 | { |
paul@218 | 294 | return x1600_i2c_read_done(i2c_channel); |
paul@218 | 295 | } |
paul@218 | 296 | |
paul@218 | 297 | int i2c_write_done(void *i2c_channel) |
paul@218 | 298 | { |
paul@218 | 299 | return x1600_i2c_write_done(i2c_channel); |
paul@218 | 300 | } |
paul@218 | 301 | |
paul@218 | 302 | unsigned int i2c_have_read(void *i2c_channel) |
paul@218 | 303 | { |
paul@218 | 304 | return x1600_i2c_have_read(i2c_channel); |
paul@218 | 305 | } |
paul@218 | 306 | |
paul@218 | 307 | unsigned int i2c_have_written(void *i2c_channel) |
paul@218 | 308 | { |
paul@218 | 309 | return x1600_i2c_have_written(i2c_channel); |
paul@218 | 310 | } |
paul@218 | 311 | |
paul@218 | 312 | int i2c_failed(void *i2c_channel) |
paul@218 | 313 | { |
paul@218 | 314 | return x1600_i2c_failed(i2c_channel); |
paul@218 | 315 | } |
paul@218 | 316 | |
paul@218 | 317 | void i2c_stop(void *i2c_channel) |
paul@218 | 318 | { |
paul@218 | 319 | x1600_i2c_stop(i2c_channel); |
paul@218 | 320 | } |
paul@218 | 321 | |
paul@218 | 322 | |
paul@218 | 323 | |
paul@218 | 324 | /* SPI adapter functions. */ |
paul@218 | 325 | |
paul@221 | 326 | void *spi_init(l4_addr_t spi_start, l4_addr_t start, l4_addr_t end, void *cpm) |
paul@221 | 327 | { |
paul@221 | 328 | (void) spi_start; (void) start; (void) end; (void) cpm; |
paul@221 | 329 | return NULL; |
paul@221 | 330 | } |
paul@221 | 331 | |
paul@221 | 332 | void *spi_get_channel(void *spi, uint8_t num, void *channel, uint64_t frequency) |
paul@221 | 333 | { |
paul@221 | 334 | (void) spi; (void) num; (void) channel; (void) frequency; |
paul@221 | 335 | return NULL; |
paul@221 | 336 | } |
paul@221 | 337 | |
paul@221 | 338 | void *spi_get_channel_gpio(void *clock_chip, int clock_pin, |
paul@221 | 339 | void *data_chip, int data_pin, |
paul@221 | 340 | void *enable_chip, int enable_pin, |
paul@221 | 341 | uint64_t frequency) |
paul@218 | 342 | { |
paul@218 | 343 | return spi_gpio_get_channel(clock_chip, clock_pin, data_chip, data_pin, enable_chip, enable_pin, frequency); |
paul@218 | 344 | } |
paul@218 | 345 | |
paul@221 | 346 | void spi_send(void *channel, int bytes, const uint8_t data[], uint8_t unit_size, |
paul@221 | 347 | uint8_t char_size) |
paul@221 | 348 | { |
paul@221 | 349 | /* NOTE: Not yet supported. */ |
paul@221 | 350 | |
paul@221 | 351 | (void) channel; (void) bytes; (void) data; (void) unit_size; (void) char_size; |
paul@221 | 352 | // x1600_spi_send(channel, bytes, data, unit_size, char_size); |
paul@221 | 353 | } |
paul@221 | 354 | |
paul@221 | 355 | void spi_send_gpio(void *channel, int bytes, const uint8_t data[]) |
paul@218 | 356 | { |
paul@218 | 357 | spi_gpio_send(channel, bytes, data); |
paul@218 | 358 | } |
paul@218 | 359 | |
paul@221 | 360 | uint32_t spi_transfer(void *channel, l4re_dma_space_dma_addr_t paddr, |
paul@221 | 361 | uint32_t count, uint8_t unit_size, uint8_t char_size) |
paul@221 | 362 | { |
paul@221 | 363 | /* NOTE: Not yet supported. */ |
paul@221 | 364 | |
paul@221 | 365 | (void) channel; (void) paddr; (void) count; (void) unit_size; (void) char_size; |
paul@221 | 366 | // return x1600_spi_transfer(channel, paddr, count, unit_size, char_size); |
paul@221 | 367 | return 0; |
paul@221 | 368 | } |
paul@221 | 369 | |
paul@218 | 370 | |
paul@218 | 371 | |
paul@218 | 372 | /* Memory regions. */ |
paul@218 | 373 | |
paul@218 | 374 | const char *memory_regions[] = { |
paul@218 | 375 | [AIC] = "x1600-aic", |
paul@218 | 376 | [CPM] = "x1600-cpm", |
paul@218 | 377 | [DMA] = "x1600-dma", |
paul@218 | 378 | [GPIO] = "x1600-gpio", |
paul@218 | 379 | [I2C] = "x1600-i2c", |
paul@221 | 380 | [SSI] = "x1600-ssi", |
paul@218 | 381 | }; |
paul@218 | 382 | |
paul@218 | 383 | |
paul@218 | 384 | |
paul@218 | 385 | /* AIC definitions. */ |
paul@218 | 386 | |
paul@218 | 387 | void *aic_channels[] = {NULL}; |
paul@218 | 388 | |
paul@218 | 389 | const unsigned int num_aic_channels = 1; |
paul@218 | 390 | |
paul@218 | 391 | l4_cap_idx_t aic_irqs[] = {L4_INVALID_CAP}; |
paul@218 | 392 | |
paul@218 | 393 | |
paul@218 | 394 | |
paul@218 | 395 | /* CPM definitions. */ |
paul@218 | 396 | |
paul@218 | 397 | struct clock_info clocks[] = { |
paul@218 | 398 | {"ext", Clock_external, "External"}, |
paul@218 | 399 | {"plla", Clock_pll_A, "PLL A"}, |
paul@218 | 400 | {"plle", Clock_pll_E, "PLL E"}, |
paul@218 | 401 | {"pllm", Clock_pll_M, "PLL M"}, |
paul@218 | 402 | {"main", Clock_main, "Main"}, |
paul@218 | 403 | {"cpu", Clock_cpu, "CPU"}, |
paul@218 | 404 | {"ahb0", Clock_hclock0, "AHB0"}, |
paul@218 | 405 | {"ahb2", Clock_hclock2, "AHB2"}, |
paul@218 | 406 | {"apb", Clock_pclock, "APB"}, |
paul@218 | 407 | {"aic", Clock_aic, "AIC"}, |
paul@218 | 408 | {"dma", Clock_dma, "DMA"}, |
paul@221 | 409 | {"lcd0", Clock_lcd_pixel0, "LCD pixel"}, |
paul@218 | 410 | {"msc0", Clock_msc0, "MSC0"}, |
paul@218 | 411 | {"msc1", Clock_msc1, "MSC1"}, |
paul@218 | 412 | {"otg", Clock_otg0, "USB OTG"}, |
paul@218 | 413 | {"i2c0", Clock_i2c0, "I2C0"}, |
paul@218 | 414 | {"i2c1", Clock_i2c1, "I2C1"}, |
paul@218 | 415 | {"i2s0", Clock_i2s0, "I2S0"}, |
paul@218 | 416 | {"i2s1", Clock_i2s1, "I2S1"}, |
paul@218 | 417 | {"i2s0r", Clock_i2s0_rx, "I2S0 RX"}, |
paul@218 | 418 | {"i2s0t", Clock_i2s0_tx, "I2S0 TX"}, |
paul@221 | 419 | {"ssi0", Clock_ssi0, "SSI"}, |
paul@218 | 420 | {"uart0", Clock_uart0, "UART0"}, |
paul@218 | 421 | {"uart1", Clock_uart1, "UART1"}, |
paul@218 | 422 | {"uart2", Clock_uart2, "UART2"}, |
paul@218 | 423 | {"uart3", Clock_uart3, "UART3"}, |
paul@218 | 424 | {NULL, Clock_undefined, NULL}, |
paul@218 | 425 | }; |
paul@218 | 426 | |
paul@218 | 427 | |
paul@218 | 428 | |
paul@218 | 429 | /* DMA definitions. */ |
paul@218 | 430 | |
paul@218 | 431 | void *dma_channels[32] = {NULL}; |
paul@218 | 432 | |
paul@218 | 433 | const unsigned int num_dma_channels = 32; |
paul@218 | 434 | |
paul@221 | 435 | struct dma_region dma_regions[8]; |
paul@218 | 436 | |
paul@221 | 437 | const unsigned int num_dma_regions = 8; |
paul@218 | 438 | |
paul@218 | 439 | l4_cap_idx_t dma_irq = L4_INVALID_CAP; |
paul@218 | 440 | |
paul@218 | 441 | |
paul@218 | 442 | |
paul@218 | 443 | /* GPIO definitions. */ |
paul@218 | 444 | |
paul@218 | 445 | struct gpio_port gpio_ports[] = { |
paul@218 | 446 | {0xffffffff, 0x00000000}, |
paul@218 | 447 | {0xdffbf7bf, 0x00000000}, |
paul@218 | 448 | {0x987e0000, 0x07000007}, |
paul@218 | 449 | {0x0000003f, 0x00000000} |
paul@218 | 450 | }; |
paul@218 | 451 | |
paul@218 | 452 | const unsigned int num_gpio_ports = 4; |
paul@218 | 453 | |
paul@218 | 454 | const char gpio_port_labels[] = "ABCD"; |
paul@218 | 455 | |
paul@218 | 456 | |
paul@218 | 457 | |
paul@218 | 458 | /* I2C definitions. */ |
paul@218 | 459 | |
paul@218 | 460 | void *i2c_channels[] = {NULL, NULL}; |
paul@218 | 461 | |
paul@218 | 462 | const unsigned int num_i2c_channels = 2; |
paul@218 | 463 | |
paul@218 | 464 | l4_cap_idx_t i2c_irqs[] = {L4_INVALID_CAP, L4_INVALID_CAP}; |
paul@218 | 465 | |
paul@218 | 466 | |
paul@218 | 467 | |
paul@218 | 468 | /* SPI definitions. */ |
paul@218 | 469 | |
paul@218 | 470 | void *spi_channels[] = {NULL}; |
paul@218 | 471 | |
paul@218 | 472 | const unsigned int num_spi_channels = 1; |