diff options
author | Daniel Golle <daniel@makrotopia.org> | 2022-07-12 03:41:30 +0100 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2022-08-28 20:33:15 +0100 |
commit | c09eb08dadae341e7f68d34e9ec3f15afd86e469 (patch) | |
tree | 742836f04e6b1e49f297cfdc7ad3ba627b6cb156 /package/boot/uboot-mediatek/patches/002-0018-arm-dts-mt7622-add-i2c-support.patch | |
parent | a4933cdd121d1689764445441f6e7fcf67dd3beb (diff) | |
download | upstream-c09eb08dadae341e7f68d34e9ec3f15afd86e469.tar.gz upstream-c09eb08dadae341e7f68d34e9ec3f15afd86e469.tar.bz2 upstream-c09eb08dadae341e7f68d34e9ec3f15afd86e469.zip |
uboot-mediatek: add support for MT798x platforms
Import pending patches to support the upcoming Filogic platforms.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package/boot/uboot-mediatek/patches/002-0018-arm-dts-mt7622-add-i2c-support.patch')
-rw-r--r-- | package/boot/uboot-mediatek/patches/002-0018-arm-dts-mt7622-add-i2c-support.patch | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/package/boot/uboot-mediatek/patches/002-0018-arm-dts-mt7622-add-i2c-support.patch b/package/boot/uboot-mediatek/patches/002-0018-arm-dts-mt7622-add-i2c-support.patch new file mode 100644 index 0000000000..415b37ba55 --- /dev/null +++ b/package/boot/uboot-mediatek/patches/002-0018-arm-dts-mt7622-add-i2c-support.patch @@ -0,0 +1,76 @@ +From 9ae337317d5634569bda83dfc5e0658fce34b1e2 Mon Sep 17 00:00:00 2001 +From: Weijie Gao <weijie.gao@mediatek.com> +Date: Mon, 25 Jul 2022 16:30:30 +0800 +Subject: [PATCH 18/31] 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 { +@@ -249,3 +257,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 +@@ -440,4 +440,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"; ++ }; ++ + }; |