summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiulio Moro <giuliomoro@yahoo.it>2020-08-05 15:45:40 +0000
committerRobert Nelson <robertcnelson@gmail.com>2020-08-05 12:23:33 -0500
commit22b853247816179dbf8505891d22e7243a8d39fa (patch)
tree285a653356d142e40bba2a4b917b7e531d2577c8
parent6ba194ac52b0e6e23c1daa0181a4ae4659ca0b6f (diff)
EEPROM overlay
-rw-r--r--src/arm/EEPROM.dts31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/arm/EEPROM.dts b/src/arm/EEPROM.dts
new file mode 100644
index 0000000..064ac92
--- /dev/null
+++ b/src/arm/EEPROM.dts
@@ -0,0 +1,31 @@
+/*
+ * Use an EEPROM via the i2c bus.
+ *
+ * This sets up a 24c04 EEPROM on bus i2c2 at address 0x50. It does not take
+ * care of pin muxing.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+/dts-v1/;
+/plugin/;
+
+/ {
+ fragment@0 {
+ target = <&i2c2>;
+ __overlay__ {
+ status = "okay";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clock-frequency = <400000>;
+ eeprom: eeprom@50 {
+ compatible = "24c04";
+ reg = <0x50>;
+ pagesize = <16>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ };
+ };
+ };
+};