Skip to content

Commit 4fbf028

Browse files
bogdanovsnashif
authored andcommitted
boards: ti: lp_em_cc2340r5: Add I2C support
Enable I2C for TI lp_em_cc2340r5. Signed-off-by: Stoyan Bogdanov <[email protected]>
1 parent 82e1baa commit 4fbf028

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

boards/ti/lp_em_cc2340r5/lp_em_cc2340r5-pinctrl.dtsi

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,18 @@
142142
pinmux = <23 DIO23_T3_C2N>;
143143
bias-disable;
144144
};
145+
146+
/* I2C0 */
147+
i2c0_scl_default: i2c0_scl_default {
148+
pinmux = <24 DIO24_I2C0_SCL>;
149+
bias-pull-up;
150+
drive-open-drain;
151+
input-enable;
152+
};
153+
i2c0_sda_default: i2c0_sda_default {
154+
pinmux = <0 DIO0_I2C0_SDA>;
155+
bias-pull-up;
156+
drive-open-drain;
157+
input-enable;
158+
};
145159
};

boards/ti/lp_em_cc2340r5/lp_em_cc2340r5.dts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,11 @@
145145
pinctrl-names = "default";
146146
status = "okay";
147147
};
148+
149+
&i2c0 {
150+
status = "okay";
151+
pinctrl-0 = <&i2c0_scl_default
152+
&i2c0_sda_default>;
153+
clock-frequency = <100000>;
154+
pinctrl-names = "default";
155+
};

0 commit comments

Comments
 (0)