blob: 8829a922cdb7b6e32d4e446205fbf69fcfe4bb5c [file] [log] [blame]
Konstantin Porotchkin73cd8812018-02-26 16:06:35 +02001/*
2 * Copyright (C) 2018 Marvell International Ltd.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 * https://spdx.org/licenses
6 */
Konstantin Porotchkin73cd8812018-02-26 16:06:35 +02007/* This driver provides I2C support for Marvell A8K and compatible SoCs */
8
Andre Przywaraeeeba252018-09-09 01:39:57 +01009#ifndef A8K_I2C_H
10#define A8K_I2C_H
Konstantin Porotchkin73cd8812018-02-26 16:06:35 +020011
12#define CONFIG_SYS_TCLK 250000000
13#define CONFIG_SYS_I2C_SPEED 100000
14#define CONFIG_SYS_I2C_SLAVE 0x0
Konstantin Porotchkin73cd8812018-02-26 16:06:35 +020015
Icenowy Zhengd9cb8952018-07-21 19:06:46 +080016#define I2C_CAN_UNSTUCK
Konstantin Porotchkin73cd8812018-02-26 16:06:35 +020017
Icenowy Zhengd9cb8952018-07-21 19:06:46 +080018struct mentor_i2c_regs {
Konstantin Porotchkin73cd8812018-02-26 16:06:35 +020019 uint32_t slave_address;
20 uint32_t data;
21 uint32_t control;
22 union {
23 uint32_t status; /* when reading */
24 uint32_t baudrate; /* when writing */
Icenowy Zhengd5bdb232018-07-21 18:19:43 +080025 };
Konstantin Porotchkin73cd8812018-02-26 16:06:35 +020026 uint32_t xtnd_slave_addr;
27 uint32_t reserved[2];
28 uint32_t soft_reset;
29 uint8_t reserved2[0xa0 - 0x20];
30 uint32_t unstuck;
31};
32
Andre Przywaraeeeba252018-09-09 01:39:57 +010033#endif