2021-05-01 06:24:13 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2021 Thomas Stranger
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <freq.h>
|
2021-06-09 22:39:06 +08:00
|
|
|
#include <mem.h>
|
2021-05-01 06:24:13 +08:00
|
|
|
|
|
|
|
/ {
|
|
|
|
aliases {
|
|
|
|
eeprom-0 = &eeprom0;
|
|
|
|
eeprom-1 = &eeprom4;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
&arduino_i2c {
|
|
|
|
status = "okay";
|
|
|
|
clock-frequency = <I2C_BITRATE_FAST>;
|
|
|
|
|
|
|
|
eeprom0: eeprom@54 {
|
|
|
|
/* M24C02-FMC6TG aka U1 (2 kbit eeprom in DFN8 package) */
|
|
|
|
compatible = "st,m24xxx", "atmel,at24";
|
|
|
|
reg = <0x54>;
|
|
|
|
size = <256>;
|
|
|
|
pagesize = <16>;
|
|
|
|
address-width = <8>;
|
|
|
|
timeout = <5>;
|
|
|
|
|
|
|
|
/* if solder-bridge closed: arduino A1 pin on CN8 can wp */
|
|
|
|
/* wp-gpios = <&arduino_header 1 GPIO_ACTIVE_LOW>; */
|
|
|
|
};
|
|
|
|
|
|
|
|
eeprom1: eeprom@55 {
|
|
|
|
/* M24256-DFDW6TP aka U2 (256 kbit eeprom in TSSOP package) */
|
|
|
|
compatible = "st,m24xxx", "atmel,at24";
|
|
|
|
reg = <0x55>;
|
|
|
|
size = <DT_SIZE_K(32)>;
|
|
|
|
pagesize = <64>;
|
|
|
|
address-width = <16>;
|
|
|
|
timeout = <5>;
|
|
|
|
|
|
|
|
/* if solder-bridge closed: arduino A1 pin on CN8 can wp */
|
|
|
|
/* wp-gpios = <&arduino_header 1 GPIO_ACTIVE_LOW>; */
|
|
|
|
};
|
|
|
|
|
|
|
|
eeprom2: eeprom@56 {
|
|
|
|
/* M24M01-DFMN6TP aka U3 (1 Mbit eeprom in SO8N package) */
|
|
|
|
compatible = "st,m24xxx", "atmel,at24";
|
|
|
|
reg = <0x56>;
|
|
|
|
size = <DT_SIZE_K(128)>;
|
|
|
|
pagesize = <256>;
|
|
|
|
address-width = <16>;
|
|
|
|
timeout = <5>;
|
|
|
|
|
|
|
|
/* if solder-bridge closed: arduino A1 pin on CN8 can wp */
|
|
|
|
/* wp-gpios = <&arduino_header 1 GPIO_ACTIVE_LOW>; */
|
|
|
|
};
|
|
|
|
|
|
|
|
/* U4: unpopulated SO8N footprint for any I2C M24 EEPROM */
|
|
|
|
};
|
|
|
|
|
|
|
|
&arduino_spi {
|
2022-06-29 18:18:30 +08:00
|
|
|
status = "okay";
|
2021-05-01 06:24:13 +08:00
|
|
|
cs-gpios = <&arduino_header 8 GPIO_ACTIVE_LOW>, /* U5: eeprom4 */
|
|
|
|
<&arduino_header 15 GPIO_ACTIVE_LOW>, /* U6: eeprom5 */
|
|
|
|
<&arduino_header 16 GPIO_ACTIVE_LOW>; /* U7: eeprom6 */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* All chip select pins have an on board 10k pull-up resistor to VCC,
|
|
|
|
* and are connected to their respective arduino pins via a normally
|
2022-02-24 20:00:55 +08:00
|
|
|
* closed solder bridge.
|
2021-05-01 06:24:13 +08:00
|
|
|
*
|
|
|
|
* All hold pins are connected to VCC with a 10k pull-up, and
|
|
|
|
* have a connection to arduino pin A3 on CN8 via an open solder bridge.
|
|
|
|
*
|
|
|
|
* All write-protect pins are connected to J11 with a 10k pull-up
|
|
|
|
* resistor. Where they can either be torn to VCC or GND.
|
|
|
|
* Additionally they are connected to arduino pin A0 on CN8
|
|
|
|
* via an open solder bridge.
|
|
|
|
*/
|
|
|
|
|
|
|
|
eeprom4: eeprom_m95040@0 {
|
|
|
|
/* M95040-RMC6TG aka U5 (4 kbit eeprom in DFN8 package) */
|
|
|
|
compatible = "st,m95xxx", "atmel,at25";
|
|
|
|
reg = <0x00>;
|
|
|
|
size = <512>;
|
|
|
|
pagesize = <16>;
|
|
|
|
address-width = <8>;
|
|
|
|
spi-max-frequency = <DT_FREQ_M(20)>;
|
|
|
|
timeout = <5>;
|
|
|
|
|
|
|
|
/* if solder-bridge closed: arduino A0 pin on CN8 can wp */
|
|
|
|
/* wp-gpios = <&arduino_header 0 GPIO_ACTIVE_LOW>; */
|
|
|
|
};
|
|
|
|
|
|
|
|
eeprom5: eeprom_m95256@1 {
|
|
|
|
/* M95256-DFDW6TP aka U6 (256 kbit eeprom in TSSOP package) */
|
|
|
|
compatible = "st,m95xxx", "atmel,at25";
|
|
|
|
reg = <0x01>;
|
|
|
|
size = <DT_SIZE_K(32)>;
|
|
|
|
pagesize = <64>;
|
|
|
|
address-width = <16>;
|
|
|
|
spi-max-frequency = <DT_FREQ_M(20)>;
|
|
|
|
timeout = <5>;
|
|
|
|
|
|
|
|
/* if solder-bridge closed: arduino A0 pin on CN8 can wp */
|
|
|
|
/* wp-gpios = <&arduino_header 0 GPIO_ACTIVE_LOW>; */
|
|
|
|
};
|
|
|
|
|
|
|
|
eeprom6: eeprom_m95m04@2 {
|
|
|
|
/* M95M04-DRMN6TP aka U7 (4 Mbit eeprom in SON8 package) */
|
|
|
|
compatible = "st,m95xxx", "atmel,at25";
|
|
|
|
reg = <0x02>;
|
|
|
|
size = <DT_SIZE_K(512)>;
|
|
|
|
pagesize = <512>;
|
|
|
|
address-width = <24>;
|
|
|
|
/* max-frequency 10MHz for vcc>=2.5V and 5MHz for vcc>=1.8V */
|
|
|
|
spi-max-frequency = <DT_FREQ_M(10)>;
|
|
|
|
timeout = <5>;
|
|
|
|
|
|
|
|
/* if solder-bridge closed: arduino A0 pin on CN8 can wp */
|
|
|
|
/* wp-gpios = <&arduino_header 0 GPIO_ACTIVE_LOW>; */
|
|
|
|
};
|
|
|
|
|
|
|
|
/* U8: unpopulated SO8N footprint for any M95 SPI EEPROM */
|
|
|
|
};
|