Commit 2b4a6e52 authored by Bartosz Bilas's avatar Bartosz Bilas Committed by Anas Nashif
Browse files

drivers: i2c: eeprom_target: switch to dedicated driver compatible



Create and use a new `zephyr,i2c-target-eeprom` compatible
within I2C  eeprom target driver that allows to use
that driver along with real atmel at24 EEPROM simultaneously.

Signed-off-by: default avatarBartosz Bilas <b.bilas@grinn-global.com>
parent b84dd9e5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -142,6 +142,8 @@ Drivers and Sensors

* EEPROM

  * Switched from :dtcompatible:`atmel,at24` to dedicated :dtcompatible:`zephyr,i2c-target-eeprom` for I2C EEPROM target driver.

* Entropy

* ESPI
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
 * SPDX-License-Identifier: Apache-2.0
 */

#define DT_DRV_COMPAT atmel_at24
#define DT_DRV_COMPAT zephyr_i2c_target_eeprom

#include <zephyr/sys/util.h>
#include <zephyr/kernel.h>
+7 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: Apache-2.0

description: Zephyr I2C target EEPROM

compatible: "zephyr,i2c-target-eeprom"

include: ["eeprom-base.yaml", i2c-device.yaml]
+2 −8
Original line number Diff line number Diff line
@@ -6,23 +6,17 @@

&i2c_smb_0 {
	eeprom0: eeprom@54 {
		compatible = "atmel,at24";
		compatible = "zephyr,i2c-target-eeprom";
		reg = <0x54>;
		size = <1024>;
		pagesize = <16>;
		address-width = <8>;
		timeout = <5>;
	};
};


&i2c_smb_1 {
	eeprom1: eeprom@56 {
		compatible = "atmel,at24";
		compatible = "zephyr,i2c-target-eeprom";
		reg = <0x56>;
		size = <1024>;
		pagesize = <16>;
		address-width = <8>;
		timeout = <5>;
	};
};
+2 −8
Original line number Diff line number Diff line
@@ -23,12 +23,9 @@
&lpi2c1 {
	status = "okay";
	eeprom0: eeprom@54 {
		compatible = "atmel,at24";
		compatible = "zephyr,i2c-target-eeprom";
		reg = <0x54>;
		size = <1024>;
		pagesize = <16>;
		address-width = <8>;
		timeout = <5>;
	};
};

@@ -37,11 +34,8 @@
	pinctrl-0 = <&pinmux_lpi2c3>;
	pinctrl-names = "default";
	eeprom1: eeprom@56 {
		compatible = "atmel,at24";
		compatible = "zephyr,i2c-target-eeprom";
		reg = <0x56>;
		size = <1024>;
		pagesize = <16>;
		address-width = <8>;
		timeout = <5>;
	};
};
Loading