Skip to content

Commit a08305b

Browse files
author
Phil Elwell
committed
overlays: Add baudrate parameter to i2c3-i2c6
The overlays for enabling the new BCM2711 I2C interfaces were lacking the means to configure the baud/clock rate. Also explictly set the default pins, rather than relying on the values in the base DTB. Signed-off-by: Phil Elwell <[email protected]>
1 parent 41c722d commit a08305b

File tree

5 files changed

+56
-12
lines changed

5 files changed

+56
-12
lines changed

arch/arm/boot/dts/overlays/README

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,27 +1221,35 @@ Info: Enable the i2c3 bus
12211221
Load: dtoverlay=i2c3,<param>
12221222
Params: pins_2_3 Use GPIOs 2 and 3
12231223
pins_4_5 Use GPIOs 4 and 5 (default)
1224+
baudrate Set the baudrate for the interface (default
1225+
"100000")
12241226

12251227

12261228
Name: i2c4
12271229
Info: Enable the i2c4 bus
12281230
Load: dtoverlay=i2c4,<param>
12291231
Params: pins_6_7 Use GPIOs 6 and 7
12301232
pins_8_9 Use GPIOs 8 and 9 (default)
1233+
baudrate Set the baudrate for the interface (default
1234+
"100000")
12311235

12321236

12331237
Name: i2c5
12341238
Info: Enable the i2c5 bus
12351239
Load: dtoverlay=i2c5,<param>
12361240
Params: pins_10_11 Use GPIOs 10 and 11
12371241
pins_12_13 Use GPIOs 12 and 13 (default)
1242+
baudrate Set the baudrate for the interface (default
1243+
"100000")
12381244

12391245

12401246
Name: i2c6
12411247
Info: Enable the i2c6 bus
12421248
Load: dtoverlay=i2c6,<param>
12431249
Params: pins_0_1 Use GPIOs 0 and 1
12441250
pins_22_23 Use GPIOs 22 and 23 (default)
1251+
baudrate Set the baudrate for the interface (default
1252+
"100000")
12451253

12461254

12471255
Name: i2s-gpio28-31

arch/arm/boot/dts/overlays/i2c3-overlay.dts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66

77
fragment@0 {
88
target = <&i2c3>;
9-
__overlay__ {
9+
frag0: __overlay__ {
1010
status = "okay";
1111
pinctrl-names = "default";
1212
pinctrl-0 = <&i2c3_pins>;
13+
clock-frequency = <100000>;
1314
};
1415
};
1516

@@ -20,8 +21,16 @@
2021
};
2122
};
2223

24+
fragment@2 {
25+
target = <&i2c3_pins>;
26+
__overlay__ {
27+
brcm,pins = <4 5>;
28+
};
29+
};
30+
2331
__overrides__ {
24-
pins_2_3 = <0>,"=1";
25-
pins_4_5 = <0>,"!1";
32+
pins_2_3 = <0>,"=1!2";
33+
pins_4_5 = <0>,"!1=2";
34+
baudrate = <&frag0>, "clock-frequency:0";
2635
};
2736
};

arch/arm/boot/dts/overlays/i2c4-overlay.dts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66

77
fragment@0 {
88
target = <&i2c4>;
9-
__overlay__ {
9+
frag0: __overlay__ {
1010
status = "okay";
1111
pinctrl-names = "default";
1212
pinctrl-0 = <&i2c4_pins>;
13+
clock-frequency = <100000>;
1314
};
1415
};
1516

@@ -20,8 +21,16 @@
2021
};
2122
};
2223

24+
fragment@2 {
25+
target = <&i2c4_pins>;
26+
__overlay__ {
27+
brcm,pins = <8 9>;
28+
};
29+
};
30+
2331
__overrides__ {
24-
pins_6_7 = <0>,"=1";
25-
pins_8_9 = <0>,"!1";
32+
pins_6_7 = <0>,"=1!2";
33+
pins_8_9 = <0>,"!1=2";
34+
baudrate = <&frag0>, "clock-frequency:0";
2635
};
2736
};

arch/arm/boot/dts/overlays/i2c5-overlay.dts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66

77
fragment@0 {
88
target = <&i2c5>;
9-
__overlay__ {
9+
frag0: __overlay__ {
1010
status = "okay";
1111
pinctrl-names = "default";
1212
pinctrl-0 = <&i2c5_pins>;
13+
clock-frequency = <100000>;
1314
};
1415
};
1516

@@ -20,8 +21,16 @@
2021
};
2122
};
2223

24+
fragment@2 {
25+
target = <&i2c5_pins>;
26+
__overlay__ {
27+
brcm,pins = <12 13>;
28+
};
29+
};
30+
2331
__overrides__ {
24-
pins_10_11 = <0>,"=1";
25-
pins_12_13 = <0>,"!1";
32+
pins_10_11 = <0>,"=1!2";
33+
pins_12_13 = <0>,"!1=2";
34+
baudrate = <&frag0>, "clock-frequency:0";
2635
};
2736
};

arch/arm/boot/dts/overlays/i2c6-overlay.dts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66

77
fragment@0 {
88
target = <&i2c6>;
9-
__overlay__ {
9+
frag0: __overlay__ {
1010
status = "okay";
1111
pinctrl-names = "default";
1212
pinctrl-0 = <&i2c6_pins>;
13+
clock-frequency = <100000>;
1314
};
1415
};
1516

@@ -20,8 +21,16 @@
2021
};
2122
};
2223

24+
fragment@2 {
25+
target = <&i2c6_pins>;
26+
__overlay__ {
27+
brcm,pins = <22 23>;
28+
};
29+
};
30+
2331
__overrides__ {
24-
pins_0_1 = <0>,"=1";
25-
pins_22_23 = <0>,"!1";
32+
pins_0_1 = <0>,"=1!2";
33+
pins_22_23 = <0>,"!1=2";
34+
baudrate = <&frag0>, "clock-frequency:0";
2635
};
2736
};

0 commit comments

Comments
 (0)