diff --git a/board/myna-player-odyssey/rootfs_patches/linux/100-i2c1-fix.patch b/board/myna-player-odyssey/rootfs_patches/linux/100-i2c1-fix.patch new file mode 100644 index 0000000..46fa5b0 --- /dev/null +++ b/board/myna-player-odyssey/rootfs_patches/linux/100-i2c1-fix.patch @@ -0,0 +1,27 @@ +From 699deaabfacf831d0e984e8c1f9391b2f7a0c807 Mon Sep 17 00:00:00 2001 +From: Jookia +Date: Wed, 12 Aug 2020 00:17:03 +1000 +Subject: [PATCH 4/7] stm32mp157c-odyssey: Fix i2c1 pinctrl + +--- + arch/arm/boot/dts/stm32mp157c-odyssey.dts | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/boot/dts/stm32mp157c-odyssey.dts b/arch/arm/boot/dts/stm32mp157c-odyssey.dts +index a7ffec8f1516..027aaa441e4f 100644 +--- a/arch/arm/boot/dts/stm32mp157c-odyssey.dts ++++ b/arch/arm/boot/dts/stm32mp157c-odyssey.dts +@@ -50,8 +50,8 @@ + + &i2c1 { + pinctrl-names = "default", "sleep"; +- pinctrl-0 = <&i2c1_pins_a>; +- pinctrl-1 = <&i2c1_sleep_pins_a>; ++ pinctrl-0 = <&i2c1_pins_b>; ++ pinctrl-1 = <&i2c1_sleep_pins_b>; + i2c-scl-rising-time-ns = <100>; + i2c-scl-falling-time-ns = <7>; + status = "okay"; +-- +2.20.1 + diff --git a/board/myna-player-odyssey/rootfs_patches/linux/101-dt-i2c4.patch b/board/myna-player-odyssey/rootfs_patches/linux/101-dt-i2c4.patch new file mode 100644 index 0000000..cfe310d --- /dev/null +++ b/board/myna-player-odyssey/rootfs_patches/linux/101-dt-i2c4.patch @@ -0,0 +1,59 @@ +From 6b74f44ebbf8af3bfe3ebd0db1296d641e51857a Mon Sep 17 00:00:00 2001 +From: Jookia +Date: Wed, 12 Aug 2020 00:19:06 +1000 +Subject: [PATCH 5/7] stm32mp157c-odyssey: Add i2c4 support + +--- + arch/arm/boot/dts/stm32mp15-pinctrl.dtsi | 17 +++++++++++++++++ + arch/arm/boot/dts/stm32mp157c-odyssey.dts | 10 ++++++++++ + 2 files changed, 27 insertions(+) + +diff --git a/arch/arm/boot/dts/stm32mp15-pinctrl.dtsi b/arch/arm/boot/dts/stm32mp15-pinctrl.dtsi +index 2f75b631feac..9828de2900a7 100644 +--- a/arch/arm/boot/dts/stm32mp15-pinctrl.dtsi ++++ b/arch/arm/boot/dts/stm32mp15-pinctrl.dtsi +@@ -432,6 +432,23 @@ + }; + }; + ++ i2c4_pins_s: i2c4-0 { ++ pins { ++ pinmux = , /* I2C4_SCL */ ++ ; /* I2C4_SDA */ ++ bias-disable; ++ drive-open-drain; ++ slew-rate = <0>; ++ }; ++ }; ++ ++ i2c4_pins_sleep_s: i2c4-1 { ++ pins { ++ pinmux = , /* I2C4_SCL */ ++ ; /* I2C4_SDA */ ++ }; ++ }; ++ + i2c5_pins_a: i2c5-0 { + pins { + pinmux = , /* I2C5_SCL */ +diff --git a/arch/arm/boot/dts/stm32mp157c-odyssey.dts b/arch/arm/boot/dts/stm32mp157c-odyssey.dts +index 027aaa441e4f..f9861e8fdb3a 100644 +--- a/arch/arm/boot/dts/stm32mp157c-odyssey.dts ++++ b/arch/arm/boot/dts/stm32mp157c-odyssey.dts +@@ -78,3 +78,13 @@ + status = "okay"; + }; + ++&i2c4 { ++ pinctrl-names = "default", "sleep"; ++ pinctrl-0 = <&i2c4_pins_s>; ++ pinctrl-1 = <&i2c4_pins_sleep_s>; ++ i2c-scl-rising-time-ns = <185>; ++ i2c-scl-falling-time-ns = <20>; ++ status = "okay"; ++ /delete-property/dmas; ++ /delete-property/dma-names; ++}; +-- +2.20.1 + diff --git a/board/myna-player-odyssey/rootfs_patches/linux/102-dt-i2c-order.patch b/board/myna-player-odyssey/rootfs_patches/linux/102-dt-i2c-order.patch new file mode 100644 index 0000000..9da0a70 --- /dev/null +++ b/board/myna-player-odyssey/rootfs_patches/linux/102-dt-i2c-order.patch @@ -0,0 +1,27 @@ +From 7c0334a831aa3812b0e4004836a7d636d89fd9ba Mon Sep 17 00:00:00 2001 +From: Jookia +Date: Fri, 14 Aug 2020 13:15:17 +1000 +Subject: [PATCH 7/7] stm32mp157c-odyssey: Re-order i2c devices for Raspberry + Pi compatibility + +--- + arch/arm/boot/dts/stm32mp157c-odyssey.dts | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/arch/arm/boot/dts/stm32mp157c-odyssey.dts b/arch/arm/boot/dts/stm32mp157c-odyssey.dts +index 787c001fadef..c498d51c72ba 100644 +--- a/arch/arm/boot/dts/stm32mp157c-odyssey.dts ++++ b/arch/arm/boot/dts/stm32mp157c-odyssey.dts +@@ -15,6 +15,9 @@ + aliases { + ethernet0 = ðernet0; + serial0 = &uart4; ++ i2c0 = &i2c2; ++ i2c1 = &i2c4; /* RPi compatible */ ++ i2c2 = &i2c1; + }; + + chosen { +-- +2.20.1 +