summaryrefslogtreecommitdiff
path: root/board/kobol
diff options
context:
space:
mode:
authorAditya Prayoga <aditya@kobol.io>2018-12-05 00:57:21 +0800
committerStefan Roese <sr@denx.de>2018-12-08 16:19:41 +0100
commitc209a65e9eed69aebf48938f8a68a1eadcd6b1e5 (patch)
treecacfd7c24156b4c5fd8a8916696094c0f060e6e7 /board/kobol
parenta134d680ea32f3584e82253c68176d645dae62dc (diff)
arm: mvebu: helios4: Enable I2C and IO Expander
Enable Marvell I2C driver and I2C IO expander. Set default bus to external I2C bus. Define I2C aliases in device tree so it can be recognized by the driver. Signed-off-by: Aditya Prayoga <aditya@kobol.io> Reviewed-by: Stefan Roese <sr@denx.de> Tested-By: Dennis Gilmore <dgilmore@redhat.com> Reviewed-By: Dennis Gilmore <dgilmore@redhat.com> Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/kobol')
-rw-r--r--board/kobol/helios4/helios4.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/board/kobol/helios4/helios4.c b/board/kobol/helios4/helios4.c
index 15e78dee94..8c0864bcdd 100644
--- a/board/kobol/helios4/helios4.c
+++ b/board/kobol/helios4/helios4.c
@@ -33,18 +33,6 @@ DECLARE_GLOBAL_DATA_PTR;
#define BOARD_GPP_POL_LOW 0x0
#define BOARD_GPP_POL_MID 0x0
-/* IO expander on Marvell GP board includes e.g. fan enabling */
-struct marvell_io_exp {
- u8 addr;
- u8 val;
-};
-
-static struct marvell_io_exp io_exp[] = {
- {6, 0xf9},
- {2, 0x46}, /* Assert reset signals and enable USB3 current limiter */
- {6, 0xb9}
-};
-
static struct serdes_map board_serdes_map[] = {
{SATA0, SERDES_SPEED_6_GBPS, SERDES_DEFAULT_MODE, 0, 0},
{USB3_HOST0, SERDES_SPEED_5_GBPS, SERDES_DEFAULT_MODE, 0, 0},
@@ -123,29 +111,9 @@ int board_early_init_f(void)
int board_init(void)
{
- int i;
-
/* Address of boot parameters */
gd->bd->bi_boot_params = mvebu_sdram_bar(0) + 0x100;
- /* Init I2C IO expanders */
- for (i = 0; i < ARRAY_SIZE(io_exp); i++) {
- struct udevice *dev;
- int ret;
-
- ret = i2c_get_chip_for_busnum(0, io_exp[i].addr, 1, &dev);
- if (ret) {
- printf("Cannot find I2C: %d\n", ret);
- return 0;
- }
-
- ret = dm_i2c_write(dev, io_exp[i].val, &io_exp[i].val, 1);
- if (ret) {
- printf("Failed to set IO expander via I2C\n");
- return -EIO;
- }
- }
-
return 0;
}