Skip to content

Commit 78150c8

Browse files
ArunmaniAlagarsamy2710nashif
authored andcommitted
boards: silabs: Add I2C node
Add i2c pincntrl to silabs boards that supports pinctrl api. Signed-off-by: Arunmani Alagarsamy <[email protected]>
1 parent 0810180 commit 78150c8

File tree

15 files changed

+159
-24
lines changed

15 files changed

+159
-24
lines changed

boards/silabs/efm32gg_sltb009a/efm32gg_sltb009a-pinctrl.dtsi

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,22 @@
1616
<GECKO_LOC(UART_RX, 6)>;
1717
};
1818
};
19+
20+
i2c0_default: i2c0_default {
21+
group1 {
22+
psels = <GECKO_PSEL(I2C_SDA, C, 0)>,
23+
<GECKO_PSEL(I2C_SCL, C, 1)>,
24+
<GECKO_LOC(I2C_SDA, 4)>,
25+
<GECKO_LOC(I2C_SCL, 4)>;
26+
};
27+
};
28+
29+
i2c1_default: i2c1_default {
30+
group1 {
31+
psels = <GECKO_PSEL(I2C_SDA, C, 4)>,
32+
<GECKO_PSEL(I2C_SCL, C, 5)>,
33+
<GECKO_LOC(I2C_SDA, 0)>,
34+
<GECKO_LOC(I2C_SCL, 0)>;
35+
};
36+
};
1937
};

boards/silabs/efm32gg_sltb009a/efm32gg_sltb009a.dts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@
7878
};
7979

8080
&i2c0 {
81-
location-sda = <GECKO_LOCATION(4) GECKO_PORT_C GECKO_PIN(0)>;
82-
location-scl = <GECKO_LOCATION(4) GECKO_PORT_C GECKO_PIN(1)>;
81+
pinctrl-0 = <&i2c0_default>;
82+
pinctrl-names = "default";
8383
status = "okay";
8484
};
8585

8686
&i2c1 {
87-
location-sda = <GECKO_LOCATION(0) GECKO_PORT_C GECKO_PIN(4)>;
88-
location-scl = <GECKO_LOCATION(0) GECKO_PORT_C GECKO_PIN(5)>;
87+
pinctrl-0 = <&i2c1_default>;
88+
pinctrl-names = "default";
8989
status = "okay";
9090
};
9191

boards/silabs/efm32gg_slwstk6121a/efm32gg_slwstk6121a-pinctrl.dtsi

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,22 @@
1616
<GECKO_LOC(UART_RX, 0)>;
1717
};
1818
};
19+
20+
i2c0_default: i2c0_default {
21+
group1 {
22+
psels = <GECKO_PSEL(I2C_SDA, A, 0)>,
23+
<GECKO_PSEL(I2C_SCL, A, 1)>,
24+
<GECKO_LOC(I2C_SDA, 4)>,
25+
<GECKO_LOC(I2C_SCL, 4)>;
26+
};
27+
};
28+
29+
i2c1_default: i2c1_default {
30+
group1 {
31+
psels = <GECKO_PSEL(I2C_SDA, B, 11)>,
32+
<GECKO_PSEL(I2C_SCL, B, 12)>,
33+
<GECKO_LOC(I2C_SDA, 1)>,
34+
<GECKO_LOC(I2C_SCL, 1)>;
35+
};
36+
};
1937
};

boards/silabs/efm32gg_slwstk6121a/efm32gg_slwstk6121a.dts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@
7272
* to work properly.
7373
*/
7474
&i2c0 {
75-
location-sda = <GECKO_LOCATION(4) GECKO_PORT_A GECKO_PIN(0)>;
76-
location-scl = <GECKO_LOCATION(4) GECKO_PORT_A GECKO_PIN(1)>;
75+
pinctrl-0 = <&i2c0_default>;
76+
pinctrl-names = "default";
7777
status = "okay";
7878
};
7979

8080
/* Connected to Si7021 sensor on WSTK */
8181
&i2c1 {
82-
location-sda = <GECKO_LOCATION(1) GECKO_PORT_B GECKO_PIN(11)>;
83-
location-scl = <GECKO_LOCATION(1) GECKO_PORT_B GECKO_PIN(12)>;
82+
pinctrl-0 = <&i2c1_default>;
83+
pinctrl-names = "default";
8484
status = "okay";
8585
};
8686

boards/silabs/efm32gg_stk3701a/efm32gg_stk3701a-pinctrl.dtsi

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,22 @@
2525
<GECKO_LOC(UART_RX, 4)>;
2626
};
2727
};
28+
29+
i2c0_default: i2c0_default {
30+
group1 {
31+
psels = <GECKO_PSEL(I2C_SDA, C, 0)>,
32+
<GECKO_PSEL(I2C_SCL, C, 1)>,
33+
<GECKO_LOC(I2C_SDA, 4)>,
34+
<GECKO_LOC(I2C_SCL, 4)>;
35+
};
36+
};
37+
38+
i2c1_default: i2c1_default {
39+
group1 {
40+
psels = <GECKO_PSEL(I2C_SDA, C, 4)>,
41+
<GECKO_PSEL(I2C_SCL, C, 5)>,
42+
<GECKO_LOC(I2C_SDA, 0)>,
43+
<GECKO_LOC(I2C_SCL, 0)>;
44+
};
45+
};
2846
};

boards/silabs/efm32gg_stk3701a/efm32gg_stk3701a.dts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,14 @@
8181
};
8282

8383
&i2c0 {
84-
location-sda = <GECKO_LOCATION(4) GECKO_PORT_C GECKO_PIN(0)>;
85-
location-scl = <GECKO_LOCATION(4) GECKO_PORT_C GECKO_PIN(1)>;
84+
pinctrl-0 = <&i2c0_default>;
85+
pinctrl-names = "default";
8686
status = "okay";
8787
};
8888

8989
&i2c1 {
90-
location-sda = <GECKO_LOCATION(0) GECKO_PORT_C GECKO_PIN(4)>;
91-
location-scl = <GECKO_LOCATION(0) GECKO_PORT_C GECKO_PIN(5)>;
90+
pinctrl-0 = <&i2c1_default>;
91+
pinctrl-names = "default";
9292
status = "okay";
9393
};
9494

boards/silabs/efm32pg_stk3401a/efm32pg_stk3401a-pinctrl.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,13 @@
1616
<GECKO_LOC(UART_RX, 1)>;
1717
};
1818
};
19+
20+
i2c0_default: i2c0_default {
21+
group1 {
22+
psels = <GECKO_PSEL(I2C_SDA, C, 10)>,
23+
<GECKO_PSEL(I2C_SCL, C, 11)>,
24+
<GECKO_LOC(I2C_SDA, 15)>,
25+
<GECKO_LOC(I2C_SCL, 15)>;
26+
};
27+
};
1928
};

boards/silabs/efm32pg_stk3401a/efm32pg_stk3401a_common.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@
7474
};
7575

7676
&i2c0 {
77-
location-sda = <GECKO_LOCATION(15) GECKO_PORT_C GECKO_PIN(10)>;
78-
location-scl = <GECKO_LOCATION(15) GECKO_PORT_C GECKO_PIN(11)>;
77+
pinctrl-0 = <&i2c0_default>;
78+
pinctrl-names = "default";
7979
status = "okay";
8080
};
8181

boards/silabs/efm32pg_stk3402a/efm32pg_stk3402a-pinctrl.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,13 @@
1616
<GECKO_LOC(UART_RX, 0)>;
1717
};
1818
};
19+
20+
i2c0_default: i2c0_default {
21+
group1 {
22+
psels = <GECKO_PSEL(I2C_SDA, C, 10)>,
23+
<GECKO_PSEL(I2C_SCL, C, 11)>,
24+
<GECKO_LOC(I2C_SDA, 15)>,
25+
<GECKO_LOC(I2C_SCL, 15)>;
26+
};
27+
};
1928
};

boards/silabs/efm32pg_stk3402a/efm32pg_stk3402a_common.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@
8585
};
8686

8787
&i2c0 {
88-
location-sda = <GECKO_LOCATION(15) GECKO_PORT_C GECKO_PIN(10)>;
89-
location-scl = <GECKO_LOCATION(15) GECKO_PORT_C GECKO_PIN(11)>;
88+
pinctrl-0 = <&i2c0_default>;
89+
pinctrl-names = "default";
9090
status = "okay";
9191
};
9292

0 commit comments

Comments
 (0)