diff options
Diffstat (limited to 'target/linux/brcm2708/patches-4.19/950-0652-overlays-Add-baudrate-parameter-to-i2c3-i2c6.patch')
-rw-r--r-- | target/linux/brcm2708/patches-4.19/950-0652-overlays-Add-baudrate-parameter-to-i2c3-i2c6.patch | 194 |
1 files changed, 194 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.19/950-0652-overlays-Add-baudrate-parameter-to-i2c3-i2c6.patch b/target/linux/brcm2708/patches-4.19/950-0652-overlays-Add-baudrate-parameter-to-i2c3-i2c6.patch new file mode 100644 index 0000000000..5ec631f7fd --- /dev/null +++ b/target/linux/brcm2708/patches-4.19/950-0652-overlays-Add-baudrate-parameter-to-i2c3-i2c6.patch @@ -0,0 +1,194 @@ +From 114845b6010b6e6a320804f2d86ab4d5dc5a06de Mon Sep 17 00:00:00 2001 +From: Phil Elwell <phil@raspberrypi.org> +Date: Mon, 5 Aug 2019 14:17:14 +0100 +Subject: [PATCH] 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 <phil@raspberrypi.org> +--- + arch/arm/boot/dts/overlays/README | 8 ++++++++ + arch/arm/boot/dts/overlays/i2c3-overlay.dts | 15 ++++++++++++--- + arch/arm/boot/dts/overlays/i2c4-overlay.dts | 15 ++++++++++++--- + arch/arm/boot/dts/overlays/i2c5-overlay.dts | 15 ++++++++++++--- + arch/arm/boot/dts/overlays/i2c6-overlay.dts | 15 ++++++++++++--- + 5 files changed, 56 insertions(+), 12 deletions(-) + +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -1221,6 +1221,8 @@ Info: Enable the i2c3 bus + Load: dtoverlay=i2c3,<param> + Params: pins_2_3 Use GPIOs 2 and 3 + pins_4_5 Use GPIOs 4 and 5 (default) ++ baudrate Set the baudrate for the interface (default ++ "100000") + + + Name: i2c4 +@@ -1228,6 +1230,8 @@ Info: Enable the i2c4 bus + Load: dtoverlay=i2c4,<param> + Params: pins_6_7 Use GPIOs 6 and 7 + pins_8_9 Use GPIOs 8 and 9 (default) ++ baudrate Set the baudrate for the interface (default ++ "100000") + + + Name: i2c5 +@@ -1235,6 +1239,8 @@ Info: Enable the i2c5 bus + Load: dtoverlay=i2c5,<param> + Params: pins_10_11 Use GPIOs 10 and 11 + pins_12_13 Use GPIOs 12 and 13 (default) ++ baudrate Set the baudrate for the interface (default ++ "100000") + + + Name: i2c6 +@@ -1242,6 +1248,8 @@ Info: Enable the i2c6 bus + Load: dtoverlay=i2c6,<param> + Params: pins_0_1 Use GPIOs 0 and 1 + pins_22_23 Use GPIOs 22 and 23 (default) ++ baudrate Set the baudrate for the interface (default ++ "100000") + + + Name: i2s-gpio28-31 +--- a/arch/arm/boot/dts/overlays/i2c3-overlay.dts ++++ b/arch/arm/boot/dts/overlays/i2c3-overlay.dts +@@ -6,10 +6,11 @@ + + fragment@0 { + target = <&i2c3>; +- __overlay__ { ++ frag0: __overlay__ { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c3_pins>; ++ clock-frequency = <100000>; + }; + }; + +@@ -20,8 +21,16 @@ + }; + }; + ++ fragment@2 { ++ target = <&i2c3_pins>; ++ __overlay__ { ++ brcm,pins = <4 5>; ++ }; ++ }; ++ + __overrides__ { +- pins_2_3 = <0>,"=1"; +- pins_4_5 = <0>,"!1"; ++ pins_2_3 = <0>,"=1!2"; ++ pins_4_5 = <0>,"!1=2"; ++ baudrate = <&frag0>, "clock-frequency:0"; + }; + }; +--- a/arch/arm/boot/dts/overlays/i2c4-overlay.dts ++++ b/arch/arm/boot/dts/overlays/i2c4-overlay.dts +@@ -6,10 +6,11 @@ + + fragment@0 { + target = <&i2c4>; +- __overlay__ { ++ frag0: __overlay__ { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c4_pins>; ++ clock-frequency = <100000>; + }; + }; + +@@ -20,8 +21,16 @@ + }; + }; + ++ fragment@2 { ++ target = <&i2c4_pins>; ++ __overlay__ { ++ brcm,pins = <8 9>; ++ }; ++ }; ++ + __overrides__ { +- pins_6_7 = <0>,"=1"; +- pins_8_9 = <0>,"!1"; ++ pins_6_7 = <0>,"=1!2"; ++ pins_8_9 = <0>,"!1=2"; ++ baudrate = <&frag0>, "clock-frequency:0"; + }; + }; +--- a/arch/arm/boot/dts/overlays/i2c5-overlay.dts ++++ b/arch/arm/boot/dts/overlays/i2c5-overlay.dts +@@ -6,10 +6,11 @@ + + fragment@0 { + target = <&i2c5>; +- __overlay__ { ++ frag0: __overlay__ { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c5_pins>; ++ clock-frequency = <100000>; + }; + }; + +@@ -20,8 +21,16 @@ + }; + }; + ++ fragment@2 { ++ target = <&i2c5_pins>; ++ __overlay__ { ++ brcm,pins = <12 13>; ++ }; ++ }; ++ + __overrides__ { +- pins_10_11 = <0>,"=1"; +- pins_12_13 = <0>,"!1"; ++ pins_10_11 = <0>,"=1!2"; ++ pins_12_13 = <0>,"!1=2"; ++ baudrate = <&frag0>, "clock-frequency:0"; + }; + }; +--- a/arch/arm/boot/dts/overlays/i2c6-overlay.dts ++++ b/arch/arm/boot/dts/overlays/i2c6-overlay.dts +@@ -6,10 +6,11 @@ + + fragment@0 { + target = <&i2c6>; +- __overlay__ { ++ frag0: __overlay__ { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c6_pins>; ++ clock-frequency = <100000>; + }; + }; + +@@ -20,8 +21,16 @@ + }; + }; + ++ fragment@2 { ++ target = <&i2c6_pins>; ++ __overlay__ { ++ brcm,pins = <22 23>; ++ }; ++ }; ++ + __overrides__ { +- pins_0_1 = <0>,"=1"; +- pins_22_23 = <0>,"!1"; ++ pins_0_1 = <0>,"=1!2"; ++ pins_22_23 = <0>,"!1=2"; ++ baudrate = <&frag0>, "clock-frequency:0"; + }; + }; |