boards: silabs: Add I2C node

Add i2c pincntrl to silabs boards that supports pinctrl api.

Signed-off-by: Arunmani Alagarsamy <arunmani.a@capgemini.com>
This commit is contained in:
Arunmani Alagarsamy 2024-03-01 12:43:45 +05:30 committed by Anas Nashif
parent 0810180135
commit 78150c8e1b
15 changed files with 159 additions and 24 deletions

View file

@ -16,4 +16,22 @@
<GECKO_LOC(UART_RX, 6)>;
};
};
i2c0_default: i2c0_default {
group1 {
psels = <GECKO_PSEL(I2C_SDA, C, 0)>,
<GECKO_PSEL(I2C_SCL, C, 1)>,
<GECKO_LOC(I2C_SDA, 4)>,
<GECKO_LOC(I2C_SCL, 4)>;
};
};
i2c1_default: i2c1_default {
group1 {
psels = <GECKO_PSEL(I2C_SDA, C, 4)>,
<GECKO_PSEL(I2C_SCL, C, 5)>,
<GECKO_LOC(I2C_SDA, 0)>,
<GECKO_LOC(I2C_SCL, 0)>;
};
};
};

View file

@ -78,14 +78,14 @@
};
&i2c0 {
location-sda = <GECKO_LOCATION(4) GECKO_PORT_C GECKO_PIN(0)>;
location-scl = <GECKO_LOCATION(4) GECKO_PORT_C GECKO_PIN(1)>;
pinctrl-0 = <&i2c0_default>;
pinctrl-names = "default";
status = "okay";
};
&i2c1 {
location-sda = <GECKO_LOCATION(0) GECKO_PORT_C GECKO_PIN(4)>;
location-scl = <GECKO_LOCATION(0) GECKO_PORT_C GECKO_PIN(5)>;
pinctrl-0 = <&i2c1_default>;
pinctrl-names = "default";
status = "okay";
};

View file

@ -16,4 +16,22 @@
<GECKO_LOC(UART_RX, 0)>;
};
};
i2c0_default: i2c0_default {
group1 {
psels = <GECKO_PSEL(I2C_SDA, A, 0)>,
<GECKO_PSEL(I2C_SCL, A, 1)>,
<GECKO_LOC(I2C_SDA, 4)>,
<GECKO_LOC(I2C_SCL, 4)>;
};
};
i2c1_default: i2c1_default {
group1 {
psels = <GECKO_PSEL(I2C_SDA, B, 11)>,
<GECKO_PSEL(I2C_SCL, B, 12)>,
<GECKO_LOC(I2C_SDA, 1)>,
<GECKO_LOC(I2C_SCL, 1)>;
};
};
};

View file

@ -72,15 +72,15 @@
* to work properly.
*/
&i2c0 {
location-sda = <GECKO_LOCATION(4) GECKO_PORT_A GECKO_PIN(0)>;
location-scl = <GECKO_LOCATION(4) GECKO_PORT_A GECKO_PIN(1)>;
pinctrl-0 = <&i2c0_default>;
pinctrl-names = "default";
status = "okay";
};
/* Connected to Si7021 sensor on WSTK */
&i2c1 {
location-sda = <GECKO_LOCATION(1) GECKO_PORT_B GECKO_PIN(11)>;
location-scl = <GECKO_LOCATION(1) GECKO_PORT_B GECKO_PIN(12)>;
pinctrl-0 = <&i2c1_default>;
pinctrl-names = "default";
status = "okay";
};

View file

@ -25,4 +25,22 @@
<GECKO_LOC(UART_RX, 4)>;
};
};
i2c0_default: i2c0_default {
group1 {
psels = <GECKO_PSEL(I2C_SDA, C, 0)>,
<GECKO_PSEL(I2C_SCL, C, 1)>,
<GECKO_LOC(I2C_SDA, 4)>,
<GECKO_LOC(I2C_SCL, 4)>;
};
};
i2c1_default: i2c1_default {
group1 {
psels = <GECKO_PSEL(I2C_SDA, C, 4)>,
<GECKO_PSEL(I2C_SCL, C, 5)>,
<GECKO_LOC(I2C_SDA, 0)>,
<GECKO_LOC(I2C_SCL, 0)>;
};
};
};

View file

@ -81,14 +81,14 @@
};
&i2c0 {
location-sda = <GECKO_LOCATION(4) GECKO_PORT_C GECKO_PIN(0)>;
location-scl = <GECKO_LOCATION(4) GECKO_PORT_C GECKO_PIN(1)>;
pinctrl-0 = <&i2c0_default>;
pinctrl-names = "default";
status = "okay";
};
&i2c1 {
location-sda = <GECKO_LOCATION(0) GECKO_PORT_C GECKO_PIN(4)>;
location-scl = <GECKO_LOCATION(0) GECKO_PORT_C GECKO_PIN(5)>;
pinctrl-0 = <&i2c1_default>;
pinctrl-names = "default";
status = "okay";
};

View file

@ -16,4 +16,13 @@
<GECKO_LOC(UART_RX, 1)>;
};
};
i2c0_default: i2c0_default {
group1 {
psels = <GECKO_PSEL(I2C_SDA, C, 10)>,
<GECKO_PSEL(I2C_SCL, C, 11)>,
<GECKO_LOC(I2C_SDA, 15)>,
<GECKO_LOC(I2C_SCL, 15)>;
};
};
};

View file

@ -74,8 +74,8 @@
};
&i2c0 {
location-sda = <GECKO_LOCATION(15) GECKO_PORT_C GECKO_PIN(10)>;
location-scl = <GECKO_LOCATION(15) GECKO_PORT_C GECKO_PIN(11)>;
pinctrl-0 = <&i2c0_default>;
pinctrl-names = "default";
status = "okay";
};

View file

@ -16,4 +16,13 @@
<GECKO_LOC(UART_RX, 0)>;
};
};
i2c0_default: i2c0_default {
group1 {
psels = <GECKO_PSEL(I2C_SDA, C, 10)>,
<GECKO_PSEL(I2C_SCL, C, 11)>,
<GECKO_LOC(I2C_SDA, 15)>,
<GECKO_LOC(I2C_SCL, 15)>;
};
};
};

View file

@ -85,8 +85,8 @@
};
&i2c0 {
location-sda = <GECKO_LOCATION(15) GECKO_PORT_C GECKO_PIN(10)>;
location-scl = <GECKO_LOCATION(15) GECKO_PORT_C GECKO_PIN(11)>;
pinctrl-0 = <&i2c0_default>;
pinctrl-names = "default";
status = "okay";
};

View file

@ -62,9 +62,32 @@
};
};
&pinctrl {
i2c0_default: i2c0_default {
group1 {
psels = <GECKO_PSEL(I2C_SDA, C, 11)>,
<GECKO_PSEL(I2C_SCL, C, 10)>,
<GECKO_LOC(I2C_SDA, 16)>,
<GECKO_LOC(I2C_SCL, 14)>;
};
};
};
&usart0 {
current-speed = <115200>;
pinctrl-0 = <&usart0_default>;
pinctrl-names = "default";
status = "okay";
};
&i2c0 {
pinctrl-0 = <&i2c0_default>;
pinctrl-names = "default";
status = "okay";
si7021: si7021@40 {
compatible = "silabs,si7006";
reg = <0x40>;
status = "okay";
};
};

View file

@ -142,9 +142,20 @@
status = "okay";
};
&pinctrl {
i2c0_default: i2c0_default {
group1 {
psels = <GECKO_PSEL(I2C_SDA, D, 2)>,
<GECKO_PSEL(I2C_SCL, D, 3)>,
<GECKO_LOC(I2C_SDA, 3)>,
<GECKO_LOC(I2C_SCL, 3)>;
};
};
};
&i2c0 {
location-sda = <GECKO_LOCATION(3) GECKO_PORT_D GECKO_PIN(2)>;
location-scl = <GECKO_LOCATION(3) GECKO_PORT_D GECKO_PIN(3)>;
pinctrl-0 = <&i2c0_default>;
pinctrl-names = "default";
status = "okay";
si7210@30 {

View file

@ -116,16 +116,36 @@
status = "okay";
};
&pinctrl {
i2c0_default: i2c0_default {
group1 {
psels = <GECKO_PSEL(I2C_SDA, C, 10)>,
<GECKO_PSEL(I2C_SCL, C, 11)>,
<GECKO_LOC(I2C_SDA, 15)>,
<GECKO_LOC(I2C_SCL, 15)>;
};
};
i2c1_default: i2c1_default {
group1 {
psels = <GECKO_PSEL(I2C_SDA, B, 6)>,
<GECKO_PSEL(I2C_SCL, B, 7)>,
<GECKO_LOC(I2C_SDA, 6)>,
<GECKO_LOC(I2C_SCL, 6)>;
};
};
};
&i2c0 {
location-sda = <GECKO_LOCATION(15) GECKO_PORT_C GECKO_PIN(10)>;
location-scl = <GECKO_LOCATION(15) GECKO_PORT_C GECKO_PIN(11)>;
pinctrl-0 = <&i2c0_default>;
pinctrl-names = "default";
status = "okay";
};
&i2c1 {
/* This set selects for CCS811_I2C supporting CCS811 */
location-sda = <GECKO_LOCATION(6) GECKO_PORT_B GECKO_PIN(6)>;
location-scl = <GECKO_LOCATION(6) GECKO_PORT_B GECKO_PIN(7)>;
pinctrl-0 = <&i2c1_default>;
pinctrl-names = "default";
status = "okay";
ccs811: ccs811@5a {

View file

@ -79,8 +79,8 @@
};
&i2c0 {
location-sda = <GECKO_LOCATION(5) GECKO_PORT_C GECKO_PIN(5)>;
location-scl = <GECKO_LOCATION(5) GECKO_PORT_C GECKO_PIN(4)>;
pinctrl-0 = <&i2c0_default>;
pinctrl-names = "default";
status = "okay";
veml6035: veml6035@29 {

View file

@ -16,4 +16,13 @@
<GECKO_LOC(UART, 0)>;
};
};
i2c0_default: i2c0_default {
group1 {
psels = <GECKO_PSEL(I2C_SDA, C, 5)>,
<GECKO_PSEL(I2C_SCL, C, 4)>,
<GECKO_LOC(I2C_SDA, 5)>,
<GECKO_LOC(I2C_SCL, 5)>;
};
};
};