boards: arm: gd32f450i_eval: add i2c0 interface
Add i2c0 interface to gd32f450i_eval board. Signed-off-by: HaiLong Yang <cameledyang@pm.me>
This commit is contained in:
parent
5a7aeb9439
commit
4b386940b8
3 changed files with 31 additions and 0 deletions
|
@ -80,6 +80,12 @@ The board configuration supports the following hardware features:
|
|||
* - DAC
|
||||
- :kconfig:`CONFIG_DAC`
|
||||
- :dtcompatible:`gd,gd32-dac`
|
||||
* - I2C
|
||||
- :kconfig:`CONFIG_I2C`
|
||||
- :dtcompatible:`gd,gd32-i2c`
|
||||
* - EEPROM
|
||||
- :kconfig:`CONFIG_EEPROM`
|
||||
- :dtcompatible:`atmel,at24`
|
||||
|
||||
Serial Port
|
||||
===========
|
||||
|
|
|
@ -23,4 +23,11 @@
|
|||
pinmux = <TIMER1_CH2_PB10>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c0_default: i2c0_default {
|
||||
group1 {
|
||||
pinmux = <I2C0_SCL_PB6>, <I2C0_SDA_PB7>;
|
||||
drive-open-drain;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -65,6 +65,7 @@
|
|||
led1 = &led2;
|
||||
sw0 = &user_key;
|
||||
pwm-led0 = &pwm_led;
|
||||
eeprom-0 = &eeprom0;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -110,3 +111,20 @@
|
|||
pinctrl-names = "default";
|
||||
};
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&i2c0_default>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
eeprom0: eeprom@50 {
|
||||
compatible = "atmel,at24";
|
||||
reg = <0x50>;
|
||||
status = "okay";
|
||||
label = "EEPROM_AT24C02";
|
||||
size = <256>;
|
||||
pagesize = <8>;
|
||||
address-width = <8>;
|
||||
timeout = <5>;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue