/* Copyright 2020 The Chromium OS Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef __ZEPHYR_CHROME_I2C_MAP_H
#define __ZEPHYR_CHROME_I2C_MAP_H

#include <devicetree.h>

#include "config.h"

/* We need registers.h to get the chip specific defines for now */
#include "registers.h"

#define I2C_PORT_ACCEL          I2C_PORT_SENSOR
#define I2C_PORT_SENSOR         NPCX_I2C_PORT0_0
#define I2C_PORT_USB_C0		NPCX_I2C_PORT1_0
#define I2C_PORT_USB_C1		NPCX_I2C_PORT2_0
#define I2C_PORT_USB_1_MIX	NPCX_I2C_PORT3_0
#define I2C_PORT_POWER		NPCX_I2C_PORT5_0
#define I2C_PORT_EEPROM		NPCX_I2C_PORT7_0

#define I2C_ADDR_EEPROM_FLAGS	0x50

#endif /* __ZEPHYR_CHROME_I2C_MAP_H */

/* Copyright 2020 The Chromium OS Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef __ZEPHYR_CHROME_I2C_MAP_H
#define __ZEPHYR_CHROME_I2C_MAP_H

#include <devicetree.h>

#include "config.h"

/* We need registers.h to get the chip specific defines for now */
#include "i2c/i2c.h"

#define I2C_PORT_ACCEL          I2C_PORT_SENSOR
#define I2C_PORT_SENSOR         NAMED_I2C(sensor)
#define I2C_PORT_USB_C0		NAMED_I2C(usb_c0)
#define I2C_PORT_USB_C1		NAMED_I2C(usb_c1)
#define I2C_PORT_USB_1_MIX	NAMED_I2C(usb1_mix)
#define I2C_PORT_POWER		NAMED_I2C(power)
#define I2C_PORT_EEPROM		NAMED_I2C(eeprom)

#define I2C_ADDR_EEPROM_FLAGS	0x50

#endif /* __ZEPHYR_CHROME_I2C_MAP_H */

Remove dependency on npcx specific registers
volteer: Remove dependency on npcx specific registers

This change removes the dependency on the npcx specific headers
which are normally included via registers.h. It instead transitions
to relying on i2c/i2c.h which defines various enums and the
NAMED_I2C macro.

BUG=b:175249000
TEST=zmake testall

Cq-Depend: chromium:2582819
Change-Id: I7d8e98cc4228496b0c7603c0794eb92e0f79c01d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/zephyr-chrome/+/2583272
Tested-by: Jack Rosenthal <d3f605bef1867f59845d4ce6e4f83b8dc9e4e0ae@chromium.org>
Reviewed-by: Jack Rosenthal <d3f605bef1867f59845d4ce6e4f83b8dc9e4e0ae@chromium.org>
Commit-Queue: Jack Rosenthal <d3f605bef1867f59845d4ce6e4f83b8dc9e4e0ae@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2630155
Reviewed-by: Simon Glass <c00b0378376498bd9cd974c388df8854c0131d27@chromium.org>
