mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 10:08:59 +00:00
0ea329fec4
Weijie Gao has submitted an updated version of the patchset adding support for MT7986 and MT7981 to U-Boot. Use that v2 patchset. Changes of v2: - Add cpu driver for print_cpuinfo() - Fix NULL pointer dereference in mtk_image (was already fixed in OpenWrt) - Fix coding style - Minor changes https://patchwork.ozlabs.org/project/uboot/list/?series=316148 Signed-off-by: Daniel Golle <daniel@makrotopia.org>
77 lines
1.6 KiB
Diff
77 lines
1.6 KiB
Diff
From ceb4b900586299b12e2c8edffecef1d09b57eb30 Mon Sep 17 00:00:00 2001
|
|
From: Weijie Gao <weijie.gao@mediatek.com>
|
|
Date: Wed, 31 Aug 2022 19:04:49 +0800
|
|
Subject: [PATCH 18/32] arm: dts: mt7622: add i2c support
|
|
|
|
Add both hardware and software i2c support for mt7622.
|
|
|
|
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
|
|
---
|
|
arch/arm/dts/mt7622-rfb.dts | 18 ++++++++++++++++++
|
|
arch/arm/dts/mt7622.dtsi | 24 ++++++++++++++++++++++++
|
|
2 files changed, 42 insertions(+)
|
|
|
|
--- a/arch/arm/dts/mt7622-rfb.dts
|
|
+++ b/arch/arm/dts/mt7622-rfb.dts
|
|
@@ -159,6 +159,14 @@
|
|
};
|
|
|
|
};
|
|
+
|
|
+ i2c1_pins_default: i2c1-default {
|
|
+ mux {
|
|
+ function = "i2c";
|
|
+ groups = "i2c1_0";
|
|
+ };
|
|
+ };
|
|
+
|
|
};
|
|
|
|
&snfi {
|
|
@@ -242,3 +250,13 @@
|
|
&u3phy {
|
|
status = "okay";
|
|
};
|
|
+
|
|
+&soft_i2c {
|
|
+ status = "disabled";
|
|
+};
|
|
+
|
|
+&i2c1 {
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&i2c1_pins_default>;
|
|
+ status = "okay";
|
|
+};
|
|
--- a/arch/arm/dts/mt7622.dtsi
|
|
+++ b/arch/arm/dts/mt7622.dtsi
|
|
@@ -424,4 +424,28 @@
|
|
status = "disabled";
|
|
};
|
|
|
|
+ soft_i2c: soft_i2c@0 {
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+ compatible = "i2c-gpio";
|
|
+ gpios = <&gpio 56 GPIO_ACTIVE_HIGH>, /* SDA */
|
|
+ <&gpio 55 GPIO_ACTIVE_HIGH>; /* CLK */
|
|
+ i2c-gpio,delay-us = <5>;
|
|
+ status = "disabled";
|
|
+ };
|
|
+
|
|
+ i2c1: i2c@11008000 {
|
|
+ compatible = "mediatek,mt7622-i2c";
|
|
+ reg = <0x11008000 0x90>,
|
|
+ <0x11000180 0x80>;
|
|
+ interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_LOW>;
|
|
+ clock-div = <16>;
|
|
+ clocks = <&pericfg CLK_PERI_I2C1_PD>,
|
|
+ <&pericfg CLK_PERI_AP_DMA_PD>;
|
|
+ clock-names = "main", "dma";
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+ status = "disabled";
|
|
+ };
|
|
+
|
|
};
|