Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1651131 > unrolled thread

[PATCH v4 0/2] Add i2c dt-binding and device node for Mediatek MT2701 Soc

Started byJun Gao <jun.gao@mediatek.com>
First post2017-05-26 09:40 +0200
Last post2017-05-26 09:40 +0200
Articles 7 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v4 0/2] Add i2c dt-binding and device node for Mediatek MT2701 Soc Jun Gao <jun.gao@mediatek.com> - 2017-05-26 09:40 +0200
    [PATCH v4 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding Jun Gao <jun.gao@mediatek.com> - 2017-05-26 09:40 +0200
      Re: [PATCH v4 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding Matthias Brugger <matthias.bgg@gmail.com> - 2017-05-29 17:40 +0200
        Re: [PATCH v4 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding Rob Herring <robh@kernel.org> - 2017-05-30 23:40 +0200
          Re: [PATCH v4 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding Jun Gao <jun.gao@mediatek.com> - 2017-05-31 04:30 +0200
            Re: [PATCH v4 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding Matthias Brugger <matthias.bgg@gmail.com> - 2017-05-31 14:10 +0200
    [PATCH v4 2/2] arm: dts: Add Mediatek MT2701 i2c device node Jun Gao <jun.gao@mediatek.com> - 2017-05-26 09:40 +0200

#1651131 — [PATCH v4 0/2] Add i2c dt-binding and device node for Mediatek MT2701 Soc

FromJun Gao <jun.gao@mediatek.com>
Date2017-05-26 09:40 +0200
Subject[PATCH v4 0/2] Add i2c dt-binding and device node for Mediatek MT2701 Soc
Message-ID<tLi0O-2Y2-13@gated-at.bofh.it>
This patch series based on v4.12-rc1, include MT2701 i2c dt-binding
and device node.

changes since v3:
- Add fallback compatible to dt-binding

changes since v2:
- Modify commit message
- Revise dt-binding documentation

changes since v1:
- Modify commit message

Dependent on "Add clock and power domain DT nodes for Mediatek MT2701"[1].

[1] http://lists.infradead.org/pipermail/linux-mediatek/2016-December/007637.html

Jun Gao (2):
  dt-bindings: i2c: Add Mediatek MT2701 i2c binding
  arm: dts: Add Mediatek MT2701 i2c device node

 .../devicetree/bindings/i2c/i2c-mt6577.txt         | 11 +++---
 arch/arm/boot/dts/mt2701-evb.dts                   | 42 ++++++++++++++++++++++
 arch/arm/boot/dts/mt2701.dtsi                      | 42 ++++++++++++++++++++++
 3 files changed, 90 insertions(+), 5 deletions(-)

--
1.8.1.1

[toc] | [next] | [standalone]


#1651133 — [PATCH v4 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding

FromJun Gao <jun.gao@mediatek.com>
Date2017-05-26 09:40 +0200
Subject[PATCH v4 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding
Message-ID<tLi0O-2Y2-19@gated-at.bofh.it>
In reply to#1651131
From: Jun Gao <jun.gao@mediatek.com>

Add MT2701 i2c binding to i2c-mt6577.txt and there is no need to
modify i2c driver.

Signed-off-by: Jun Gao <jun.gao@mediatek.com>
---
 Documentation/devicetree/bindings/i2c/i2c-mt6577.txt | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt b/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt
index 0ce6fa3..52f2023 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt
@@ -4,11 +4,12 @@ The Mediatek's I2C controller is used to interface with I2C devices.
 
 Required properties:
   - compatible: value should be either of the following.
-      (a) "mediatek,mt6577-i2c", for i2c compatible with mt6577 i2c.
-      (b) "mediatek,mt6589-i2c", for i2c compatible with mt6589 i2c.
-      (c) "mediatek,mt8127-i2c", for i2c compatible with mt8127 i2c.
-      (d) "mediatek,mt8135-i2c", for i2c compatible with mt8135 i2c.
-      (e) "mediatek,mt8173-i2c", for i2c compatible with mt8173 i2c.
+	"mediatek,mt2701-i2c", "mediatek,mt6577-i2c": for Mediatek MT2701
+	"mediatek,mt6577-i2c": for Mediatek MT6577
+	"mediatek,mt6589-i2c": for Mediatek MT6589
+	"mediatek,mt8127-i2c": for Mediatek MT8127
+	"mediatek,mt8135-i2c": for Mediatek MT8135
+	"mediatek,mt8173-i2c": for Mediatek MT8173
   - reg: physical base address of the controller and dma base, length of memory
     mapped region.
   - interrupts: interrupt number to the cpu.
-- 
1.8.1.1

[toc] | [prev] | [next] | [standalone]


#1652595 — Re: [PATCH v4 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding

FromMatthias Brugger <matthias.bgg@gmail.com>
Date2017-05-29 17:40 +0200
SubjectRe: [PATCH v4 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding
Message-ID<tMuVX-1P8-15@gated-at.bofh.it>
In reply to#1651133

On 26/05/17 09:35, Jun Gao wrote:
> From: Jun Gao <jun.gao@mediatek.com>
> 
> Add MT2701 i2c binding to i2c-mt6577.txt and there is no need to
> modify i2c driver.
> 
> Signed-off-by: Jun Gao <jun.gao@mediatek.com>
> ---
>   Documentation/devicetree/bindings/i2c/i2c-mt6577.txt | 11 ++++++-----
>   1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt b/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt
> index 0ce6fa3..52f2023 100644
> --- a/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt
> +++ b/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt
> @@ -4,11 +4,12 @@ The Mediatek's I2C controller is used to interface with I2C devices.
>   
>   Required properties:
>     - compatible: value should be either of the following.
> -      (a) "mediatek,mt6577-i2c", for i2c compatible with mt6577 i2c.
> -      (b) "mediatek,mt6589-i2c", for i2c compatible with mt6589 i2c.
> -      (c) "mediatek,mt8127-i2c", for i2c compatible with mt8127 i2c.
> -      (d) "mediatek,mt8135-i2c", for i2c compatible with mt8135 i2c.
> -      (e) "mediatek,mt8173-i2c", for i2c compatible with mt8173 i2c.
> +	"mediatek,mt2701-i2c", "mediatek,mt6577-i2c": for Mediatek MT2701

I send a cleanup patch for the file, which fixes all the other SoCs.
I can fold this one into it, a soon as I got a Signed-off from the DT 
maintainers.

Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>

> +	"mediatek,mt6577-i2c": for Mediatek MT6577
> +	"mediatek,mt6589-i2c": for Mediatek MT6589
> +	"mediatek,mt8127-i2c": for Mediatek MT8127
> +	"mediatek,mt8135-i2c": for Mediatek MT8135
> +	"mediatek,mt8173-i2c": for Mediatek MT8173
>     - reg: physical base address of the controller and dma base, length of memory
>       mapped region.
>     - interrupts: interrupt number to the cpu.
> 

[toc] | [prev] | [next] | [standalone]


#1653565 — Re: [PATCH v4 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding

FromRob Herring <robh@kernel.org>
Date2017-05-30 23:40 +0200
SubjectRe: [PATCH v4 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding
Message-ID<tMX1U-4ae-7@gated-at.bofh.it>
In reply to#1652595
On Mon, May 29, 2017 at 05:30:26PM +0200, Matthias Brugger wrote:
g> 
> 
> On 26/05/17 09:35, Jun Gao wrote:
> > From: Jun Gao <jun.gao@mediatek.com>
> > 
> > Add MT2701 i2c binding to i2c-mt6577.txt and there is no need to
> > modify i2c driver.
> > 
> > Signed-off-by: Jun Gao <jun.gao@mediatek.com>
> > ---
> >   Documentation/devicetree/bindings/i2c/i2c-mt6577.txt | 11 ++++++-----
> >   1 file changed, 6 insertions(+), 5 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt b/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt
> > index 0ce6fa3..52f2023 100644
> > --- a/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt
> > +++ b/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt
> > @@ -4,11 +4,12 @@ The Mediatek's I2C controller is used to interface with I2C devices.
> >   Required properties:
> >     - compatible: value should be either of the following.
> > -      (a) "mediatek,mt6577-i2c", for i2c compatible with mt6577 i2c.
> > -      (b) "mediatek,mt6589-i2c", for i2c compatible with mt6589 i2c.
> > -      (c) "mediatek,mt8127-i2c", for i2c compatible with mt8127 i2c.
> > -      (d) "mediatek,mt8135-i2c", for i2c compatible with mt8135 i2c.
> > -      (e) "mediatek,mt8173-i2c", for i2c compatible with mt8173 i2c.
> > +	"mediatek,mt2701-i2c", "mediatek,mt6577-i2c": for Mediatek MT2701
> 
> I send a cleanup patch for the file, which fixes all the other SoCs.
> I can fold this one into it, a soon as I got a Signed-off from the DT
> maintainers.

I already acked it on the prior versions.

Rob

[toc] | [prev] | [next] | [standalone]


#1653788 — Re: [PATCH v4 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding

FromJun Gao <jun.gao@mediatek.com>
Date2017-05-31 04:30 +0200
SubjectRe: [PATCH v4 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding
Message-ID<tN1yx-76t-9@gated-at.bofh.it>
In reply to#1653565
On Tue, 2017-05-30 at 16:38 -0500, Rob Herring wrote:
> On Mon, May 29, 2017 at 05:30:26PM +0200, Matthias Brugger wrote:
> g> 
> > 
> > On 26/05/17 09:35, Jun Gao wrote:
> > > From: Jun Gao <jun.gao@mediatek.com>
> > > 
> > > Add MT2701 i2c binding to i2c-mt6577.txt and there is no need to
> > > modify i2c driver.
> > > 
> > > Signed-off-by: Jun Gao <jun.gao@mediatek.com>
> > > ---
> > >   Documentation/devicetree/bindings/i2c/i2c-mt6577.txt | 11 ++++++-----
> > >   1 file changed, 6 insertions(+), 5 deletions(-)
> > > 
> > > diff --git a/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt b/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt
> > > index 0ce6fa3..52f2023 100644
> > > --- a/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt
> > > +++ b/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt
> > > @@ -4,11 +4,12 @@ The Mediatek's I2C controller is used to interface with I2C devices.
> > >   Required properties:
> > >     - compatible: value should be either of the following.
> > > -      (a) "mediatek,mt6577-i2c", for i2c compatible with mt6577 i2c.
> > > -      (b) "mediatek,mt6589-i2c", for i2c compatible with mt6589 i2c.
> > > -      (c) "mediatek,mt8127-i2c", for i2c compatible with mt8127 i2c.
> > > -      (d) "mediatek,mt8135-i2c", for i2c compatible with mt8135 i2c.
> > > -      (e) "mediatek,mt8173-i2c", for i2c compatible with mt8173 i2c.
> > > +	"mediatek,mt2701-i2c", "mediatek,mt6577-i2c": for Mediatek MT2701
> > 
> > I send a cleanup patch for the file, which fixes all the other SoCs.
> > I can fold this one into it, a soon as I got a Signed-off from the DT
> > maintainers.
> 
> I already acked it on the prior versions.
> 
> Rob

Hi Matthias,

Which patch should I use now? Or you help to modify dt-binding, I only
send dtsi file patch ?  Thanks!

[toc] | [prev] | [next] | [standalone]


#1654167 — Re: [PATCH v4 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding

FromMatthias Brugger <matthias.bgg@gmail.com>
Date2017-05-31 14:10 +0200
SubjectRe: [PATCH v4 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding
Message-ID<tNaBQ-4zj-27@gated-at.bofh.it>
In reply to#1653788

On 31/05/17 04:24, Jun Gao wrote:
> On Tue, 2017-05-30 at 16:38 -0500, Rob Herring wrote:
>> On Mon, May 29, 2017 at 05:30:26PM +0200, Matthias Brugger wrote:
>> g>
>>>
>>> On 26/05/17 09:35, Jun Gao wrote:
>>>> From: Jun Gao <jun.gao@mediatek.com>
>>>>
>>>> Add MT2701 i2c binding to i2c-mt6577.txt and there is no need to
>>>> modify i2c driver.
>>>>
>>>> Signed-off-by: Jun Gao <jun.gao@mediatek.com>
>>>> ---
>>>>    Documentation/devicetree/bindings/i2c/i2c-mt6577.txt | 11 ++++++-----
>>>>    1 file changed, 6 insertions(+), 5 deletions(-)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt b/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt
>>>> index 0ce6fa3..52f2023 100644
>>>> --- a/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt
>>>> +++ b/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt
>>>> @@ -4,11 +4,12 @@ The Mediatek's I2C controller is used to interface with I2C devices.
>>>>    Required properties:
>>>>      - compatible: value should be either of the following.
>>>> -      (a) "mediatek,mt6577-i2c", for i2c compatible with mt6577 i2c.
>>>> -      (b) "mediatek,mt6589-i2c", for i2c compatible with mt6589 i2c.
>>>> -      (c) "mediatek,mt8127-i2c", for i2c compatible with mt8127 i2c.
>>>> -      (d) "mediatek,mt8135-i2c", for i2c compatible with mt8135 i2c.
>>>> -      (e) "mediatek,mt8173-i2c", for i2c compatible with mt8173 i2c.
>>>> +	"mediatek,mt2701-i2c", "mediatek,mt6577-i2c": for Mediatek MT2701
>>>
>>> I send a cleanup patch for the file, which fixes all the other SoCs.
>>> I can fold this one into it, a soon as I got a Signed-off from the DT
>>> maintainers.
>>
>> I already acked it on the prior versions.
>>
>> Rob
> 
> Hi Matthias,
> 
> Which patch should I use now? Or you help to modify dt-binding, I only
> send dtsi file patch ?  Thanks!
> 

Don't worry, I fixed the commit and took both of them.

[toc] | [prev] | [next] | [standalone]


#1651134 — [PATCH v4 2/2] arm: dts: Add Mediatek MT2701 i2c device node

FromJun Gao <jun.gao@mediatek.com>
Date2017-05-26 09:40 +0200
Subject[PATCH v4 2/2] arm: dts: Add Mediatek MT2701 i2c device node
Message-ID<tLi0O-2Y2-17@gated-at.bofh.it>
In reply to#1651131
From: Jun Gao <jun.gao@mediatek.com>

Add MT2701 i2c device node.

Signed-off-by: Jun Gao <jun.gao@mediatek.com>
---
 arch/arm/boot/dts/mt2701-evb.dts | 42 ++++++++++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/mt2701.dtsi    | 42 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 84 insertions(+)

diff --git a/arch/arm/boot/dts/mt2701-evb.dts b/arch/arm/boot/dts/mt2701-evb.dts
index a483798..3f5a96c 100644
--- a/arch/arm/boot/dts/mt2701-evb.dts
+++ b/arch/arm/boot/dts/mt2701-evb.dts
@@ -28,7 +28,49 @@
 	status = "okay";
 };
 
+&i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_pins_a>;
+	status = "okay";
+};
+
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pins_a>;
+	status = "okay";
+};
+
+&i2c2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c2_pins_a>;
+	status = "okay";
+};
+
 &pio {
+	i2c0_pins_a: i2c0@0 {
+		pins1 {
+			pinmux = <MT2701_PIN_75_SDA0__FUNC_SDA0>,
+				 <MT2701_PIN_76_SCL0__FUNC_SCL0>;
+			bias-disable;
+		};
+	};
+
+	i2c1_pins_a: i2c1@0 {
+		pins1 {
+			pinmux = <MT2701_PIN_57_SDA1__FUNC_SDA1>,
+				 <MT2701_PIN_58_SCL1__FUNC_SCL1>;
+			bias-disable;
+		};
+	};
+
+	i2c2_pins_a: i2c2@0 {
+		pins1 {
+			pinmux = <MT2701_PIN_77_SDA2__FUNC_SDA2>,
+				 <MT2701_PIN_78_SCL2__FUNC_SCL2>;
+			bias-disable;
+		};
+	};
+
 	spi_pins_a: spi0@0 {
 		pins_spi {
 			pinmux = <MT2701_PIN_53_SPI0_CSN__FUNC_SPI0_CS>,
diff --git a/arch/arm/boot/dts/mt2701.dtsi b/arch/arm/boot/dts/mt2701.dtsi
index 8037210..1b6157e 100644
--- a/arch/arm/boot/dts/mt2701.dtsi
+++ b/arch/arm/boot/dts/mt2701.dtsi
@@ -286,6 +286,48 @@
 		status = "disabled";
 	};
 
+	i2c0: i2c@11007000 {
+		compatible = "mediatek,mt2701-i2c",
+			     "mediatek,mt6577-i2c";
+		reg = <0 0x11007000 0 0x70>,
+		      <0 0x11000200 0 0x80>;
+		interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_LOW>;
+		clock-div = <16>;
+		clocks = <&pericfg CLK_PERI_I2C0>, <&pericfg CLK_PERI_AP_DMA>;
+		clock-names = "main", "dma";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		status = "disabled";
+	};
+
+	i2c1: i2c@11008000 {
+		compatible = "mediatek,mt2701-i2c",
+			     "mediatek,mt6577-i2c";
+		reg = <0 0x11008000 0 0x70>,
+		      <0 0x11000280 0 0x80>;
+		interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_LOW>;
+		clock-div = <16>;
+		clocks = <&pericfg CLK_PERI_I2C1>, <&pericfg CLK_PERI_AP_DMA>;
+		clock-names = "main", "dma";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		status = "disabled";
+	};
+
+	i2c2: i2c@11009000 {
+		compatible = "mediatek,mt2701-i2c",
+			     "mediatek,mt6577-i2c";
+		reg = <0 0x11009000 0 0x70>,
+		      <0 0x11000300 0 0x80>;
+		interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_LOW>;
+		clock-div = <16>;
+		clocks = <&pericfg CLK_PERI_I2C2>, <&pericfg CLK_PERI_AP_DMA>;
+		clock-names = "main", "dma";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		status = "disabled";
+	};
+
 	spi0: spi@1100a000 {
 		compatible = "mediatek,mt2701-spi";
 		#address-cells = <1>;
-- 
1.8.1.1

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web