Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update DTS to enable I2C bus hang recovery #52

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions uboot/0001-mangopi-enable-leds-spi-and-i2c0.patch
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
From 20dc2a6c82650cf2ce90f495e79456e188802f06 Mon Sep 17 00:00:00 2001
From 243eedc3475e6d072a9ef99ee0d24b6f378914f3 Mon Sep 17 00:00:00 2001
From: Frank Hunleth <[email protected]>
Date: Mon, 16 Jan 2023 17:06:35 +0000
Subject: [PATCH] mangopi: enable leds, spi and i2c0

---
arch/riscv/dts/sun20i-d1-mangopi-mq-pro.dts | 77 +++++++++++++++++++++
1 file changed, 77 insertions(+)
arch/riscv/dts/sun20i-d1-mangopi-mq-pro.dts | 84 +++++++++++++++++++++
1 file changed, 84 insertions(+)

diff --git a/arch/riscv/dts/sun20i-d1-mangopi-mq-pro.dts b/arch/riscv/dts/sun20i-d1-mangopi-mq-pro.dts
index a7149baf..16b24db7 100644
index a7149baf..3b94ccbd 100644
--- a/arch/riscv/dts/sun20i-d1-mangopi-mq-pro.dts
+++ b/arch/riscv/dts/sun20i-d1-mangopi-mq-pro.dts
@@ -167,3 +167,80 @@
@@ -167,3 +167,87 @@
usb0_vbus-supply = <&reg_vcc>;
status = "okay";
};
Expand Down Expand Up @@ -40,6 +40,11 @@ index a7149baf..16b24db7 100644
+ function = "i2c0";
+ };
+
+ i2c0_pg12_scl_pin: i2c0-pg12-scl-pin {
+ pins = "PG12";
+ function = "gpio_out";
+ };
+
+ spi1_clock_and_data_pd_pins: spi1-clock-and-data-pd-pins {
+ pins = "PD11", "PD12", "PD13";
+ function = "spi1";
Expand Down Expand Up @@ -88,8 +93,10 @@ index a7149baf..16b24db7 100644
+};
+
+&i2c0 {
+ pinctrl-names = "default", "gpio";
+ pinctrl-0 = <&i2c0_pg12_pins>;
+ pinctrl-names = "default";
+ pinctrl-1 = <&i2c0_pg12_scl_pin>;
+ scl-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 I2C0_SCK */
+ status = "okay";
+};
--
Expand Down