From: Matthias Brugger Subject: Re: [PATCH] arm64: dts: mt8183: add I2C nodes Date: Thu, 22 Aug 2019 15:21:10 +0200 Message-ID: <055f05c3-e7c3-4f4d-ad5c-bfaea4f2a376@gmail.com> References: <1566477316-13245-1-git-send-email-qii.wang@mediatek.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1566477316-13245-1-git-send-email-qii.wang@mediatek.com> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: qii.wang@mediatek.com, robh+dt@kernel.org Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, srv_heupstream@mediatek.com, leilk.liu@mediatek.com List-Id: devicetree@vger.kernel.org On 22/08/2019 14:35, qii.wang@mediatek.com wrote: > From: Qii Wang > > Add i2c nodes to mt8183 and mt8183-evb. > > Signed-off-by: Qii Wang Applied, thanks > --- > arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 96 ++++++++++++++ > arch/arm64/boot/dts/mediatek/mt8183.dtsi | 189 ++++++++++++++++++++++++++++ > 2 files changed, 285 insertions(+) > > diff --git a/arch/arm64/boot/dts/mediatek/mt8183-evb.dts b/arch/arm64/boot/dts/mediatek/mt8183-evb.dts > index d8e555c..1fb195c 100644 > --- a/arch/arm64/boot/dts/mediatek/mt8183-evb.dts > +++ b/arch/arm64/boot/dts/mediatek/mt8183-evb.dts > @@ -30,7 +30,103 @@ > status = "okay"; > }; > > +&i2c0 { > + pinctrl-names = "default"; > + pinctrl-0 = <&i2c_pins_0>; > + status = "okay"; > + clock-frequency = <100000>; > +}; > + > +&i2c1 { > + pinctrl-names = "default"; > + pinctrl-0 = <&i2c_pins_1>; > + status = "okay"; > + clock-frequency = <100000>; > +}; > + > +&i2c2 { > + pinctrl-names = "default"; > + pinctrl-0 = <&i2c_pins_2>; > + status = "okay"; > + clock-frequency = <100000>; > +}; > + > +&i2c3 { > + pinctrl-names = "default"; > + pinctrl-0 = <&i2c_pins_3>; > + status = "okay"; > + clock-frequency = <100000>; > +}; > + > +&i2c4 { > + pinctrl-names = "default"; > + pinctrl-0 = <&i2c_pins_4>; > + status = "okay"; > + clock-frequency = <1000000>; > +}; > + > +&i2c5 { > + pinctrl-names = "default"; > + pinctrl-0 = <&i2c_pins_5>; > + status = "okay"; > + clock-frequency = <1000000>; > +}; > + > &pio { > + i2c_pins_0: i2c0{ > + pins_i2c{ > + pinmux = , > + ; > + mediatek,pull-up-adv = <3>; > + mediatek,drive-strength-adv = <00>; > + }; > + }; > + > + i2c_pins_1: i2c1{ > + pins_i2c{ > + pinmux = , > + ; > + mediatek,pull-up-adv = <3>; > + mediatek,drive-strength-adv = <00>; > + }; > + }; > + > + i2c_pins_2: i2c2{ > + pins_i2c{ > + pinmux = , > + ; > + mediatek,pull-up-adv = <3>; > + mediatek,drive-strength-adv = <00>; > + }; > + }; > + > + i2c_pins_3: i2c3{ > + pins_i2c{ > + pinmux = , > + ; > + mediatek,pull-up-adv = <3>; > + mediatek,drive-strength-adv = <00>; > + }; > + }; > + > + i2c_pins_4: i2c4{ > + pins_i2c{ > + pinmux = , > + ; > + mediatek,pull-up-adv = <3>; > + mediatek,drive-strength-adv = <00>; > + }; > + }; > + > + i2c_pins_5: i2c5{ > + pins_i2c{ > + pinmux = , > + ; > + mediatek,pull-up-adv = <3>; > + mediatek,drive-strength-adv = <00>; > + }; > + }; > + > spi_pins_0: spi0{ > pins_spi{ > pinmux = , > diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi > index c2749c4..ab71291 100644 > --- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi > +++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi > @@ -16,6 +16,21 @@ > #address-cells = <2>; > #size-cells = <2>; > > + aliases { > + i2c0 = &i2c0; > + i2c1 = &i2c1; > + i2c2 = &i2c2; > + i2c3 = &i2c3; > + i2c4 = &i2c4; > + i2c5 = &i2c5; > + i2c6 = &i2c6; > + i2c7 = &i2c7; > + i2c8 = &i2c8; > + i2c9 = &i2c9; > + i2c10 = &i2c10; > + i2c11 = &i2c11; > + }; > + > cpus { > #address-cells = <1>; > #size-cells = <0>; > @@ -294,6 +309,64 @@ > status = "disabled"; > }; > > + i2c6: i2c@11005000 { > + compatible = "mediatek,mt8183-i2c"; > + reg = <0 0x11005000 0 0x1000>, > + <0 0x11000600 0 0x80>; > + interrupts = ; > + clocks = <&infracfg CLK_INFRA_I2C6>, > + <&infracfg CLK_INFRA_AP_DMA>; > + clock-names = "main", "dma"; > + clock-div = <1>; > + #address-cells = <1>; > + #size-cells = <0>; > + status = "disabled"; > + }; > + > + i2c0: i2c@11007000 { > + compatible = "mediatek,mt8183-i2c"; > + reg = <0 0x11007000 0 0x1000>, > + <0 0x11000080 0 0x80>; > + interrupts = ; > + clocks = <&infracfg CLK_INFRA_I2C0>, > + <&infracfg CLK_INFRA_AP_DMA>; > + clock-names = "main", "dma"; > + clock-div = <1>; > + #address-cells = <1>; > + #size-cells = <0>; > + status = "disabled"; > + }; > + > + i2c4: i2c@11008000 { > + compatible = "mediatek,mt8183-i2c"; > + reg = <0 0x11008000 0 0x1000>, > + <0 0x11000100 0 0x80>; > + interrupts = ; > + clocks = <&infracfg CLK_INFRA_I2C1>, > + <&infracfg CLK_INFRA_AP_DMA>, > + <&infracfg CLK_INFRA_I2C1_ARBITER>; > + clock-names = "main", "dma","arb"; > + clock-div = <1>; > + #address-cells = <1>; > + #size-cells = <0>; > + status = "disabled"; > + }; > + > + i2c2: i2c@11009000 { > + compatible = "mediatek,mt8183-i2c"; > + reg = <0 0x11009000 0 0x1000>, > + <0 0x11000280 0 0x80>; > + interrupts = ; > + clocks = <&infracfg CLK_INFRA_I2C2>, > + <&infracfg CLK_INFRA_AP_DMA>, > + <&infracfg CLK_INFRA_I2C2_ARBITER>; > + clock-names = "main", "dma", "arb"; > + clock-div = <1>; > + #address-cells = <1>; > + #size-cells = <0>; > + status = "disabled"; > + }; > + > spi0: spi@1100a000 { > compatible = "mediatek,mt8183-spi"; > #address-cells = <1>; > @@ -307,6 +380,20 @@ > status = "disabled"; > }; > > + i2c3: i2c@1100f000 { > + compatible = "mediatek,mt8183-i2c"; > + reg = <0 0x1100f000 0 0x1000>, > + <0 0x11000400 0 0x80>; > + interrupts = ; > + clocks = <&infracfg CLK_INFRA_I2C3>, > + <&infracfg CLK_INFRA_AP_DMA>; > + clock-names = "main", "dma"; > + clock-div = <1>; > + #address-cells = <1>; > + #size-cells = <0>; > + status = "disabled"; > + }; > + > spi1: spi@11010000 { > compatible = "mediatek,mt8183-spi"; > #address-cells = <1>; > @@ -320,6 +407,20 @@ > status = "disabled"; > }; > > + i2c1: i2c@11011000 { > + compatible = "mediatek,mt8183-i2c"; > + reg = <0 0x11011000 0 0x1000>, > + <0 0x11000480 0 0x80>; > + interrupts = ; > + clocks = <&infracfg CLK_INFRA_I2C4>, > + <&infracfg CLK_INFRA_AP_DMA>; > + clock-names = "main", "dma"; > + clock-div = <1>; > + #address-cells = <1>; > + #size-cells = <0>; > + status = "disabled"; > + }; > + > spi2: spi@11012000 { > compatible = "mediatek,mt8183-spi"; > #address-cells = <1>; > @@ -346,6 +447,66 @@ > status = "disabled"; > }; > > + i2c9: i2c@11014000 { > + compatible = "mediatek,mt8183-i2c"; > + reg = <0 0x11014000 0 0x1000>, > + <0 0x11000180 0 0x80>; > + interrupts = ; > + clocks = <&infracfg CLK_INFRA_I2C1_IMM>, > + <&infracfg CLK_INFRA_AP_DMA>, > + <&infracfg CLK_INFRA_I2C1_ARBITER>; > + clock-names = "main", "dma", "arb"; > + clock-div = <1>; > + #address-cells = <1>; > + #size-cells = <0>; > + status = "disabled"; > + }; > + > + i2c10: i2c@11015000 { > + compatible = "mediatek,mt8183-i2c"; > + reg = <0 0x11015000 0 0x1000>, > + <0 0x11000300 0 0x80>; > + interrupts = ; > + clocks = <&infracfg CLK_INFRA_I2C2_IMM>, > + <&infracfg CLK_INFRA_AP_DMA>, > + <&infracfg CLK_INFRA_I2C2_ARBITER>; > + clock-names = "main", "dma", "arb"; > + clock-div = <1>; > + #address-cells = <1>; > + #size-cells = <0>; > + status = "disabled"; > + }; > + > + i2c5: i2c@11016000 { > + compatible = "mediatek,mt8183-i2c"; > + reg = <0 0x11016000 0 0x1000>, > + <0 0x11000500 0 0x80>; > + interrupts = ; > + clocks = <&infracfg CLK_INFRA_I2C5>, > + <&infracfg CLK_INFRA_AP_DMA>, > + <&infracfg CLK_INFRA_I2C5_ARBITER>; > + clock-names = "main", "dma", "arb"; > + clock-div = <1>; > + #address-cells = <1>; > + #size-cells = <0>; > + status = "disabled"; > + }; > + > + i2c11: i2c@11017000 { > + compatible = "mediatek,mt8183-i2c"; > + reg = <0 0x11017000 0 0x1000>, > + <0 0x11000580 0 0x80>; > + interrupts = ; > + clocks = <&infracfg CLK_INFRA_I2C5_IMM>, > + <&infracfg CLK_INFRA_AP_DMA>, > + <&infracfg CLK_INFRA_I2C5_ARBITER>; > + clock-names = "main", "dma", "arb"; > + clock-div = <1>; > + #address-cells = <1>; > + #size-cells = <0>; > + status = "disabled"; > + }; > + > spi4: spi@11018000 { > compatible = "mediatek,mt8183-spi"; > #address-cells = <1>; > @@ -372,6 +533,34 @@ > status = "disabled"; > }; > > + i2c7: i2c@1101a000 { > + compatible = "mediatek,mt8183-i2c"; > + reg = <0 0x1101a000 0 0x1000>, > + <0 0x11000680 0 0x80>; > + interrupts = ; > + clocks = <&infracfg CLK_INFRA_I2C7>, > + <&infracfg CLK_INFRA_AP_DMA>; > + clock-names = "main", "dma"; > + clock-div = <1>; > + #address-cells = <1>; > + #size-cells = <0>; > + status = "disabled"; > + }; > + > + i2c8: i2c@1101b000 { > + compatible = "mediatek,mt8183-i2c"; > + reg = <0 0x1101b000 0 0x1000>, > + <0 0x11000700 0 0x80>; > + interrupts = ; > + clocks = <&infracfg CLK_INFRA_I2C8>, > + <&infracfg CLK_INFRA_AP_DMA>; > + clock-names = "main", "dma"; > + clock-div = <1>; > + #address-cells = <1>; > + #size-cells = <0>; > + status = "disabled"; > + }; > + > audiosys: syscon@11220000 { > compatible = "mediatek,mt8183-audiosys", "syscon"; > reg = <0 0x11220000 0 0x1000>; >