linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH v3 0/2] Add i2c dt-binding and device node for Mediatek MT2701 Soc
@ 2017-03-09  3:13 Jun Gao
  2017-03-09  3:13 ` [RESEND PATCH v3 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding Jun Gao
  2017-03-09  3:13 ` [RESEND PATCH v3 2/2] arm: dts: Add Mediatek MT2701 i2c device node Jun Gao
  0 siblings, 2 replies; 10+ messages in thread
From: Jun Gao @ 2017-03-09  3:13 UTC (permalink / raw)
  To: Wolfram Sang, Matthias Brugger
  Cc: srv_heupstream, devicetree, linux-i2c, linux-arm-kernel,
	linux-kernel, linux-mediatek

This patch series based on v4.11-rc1, include MT2701 i2c dt-binding
and device node.

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.7.9.5

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [RESEND PATCH v3 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding
  2017-03-09  3:13 [RESEND PATCH v3 0/2] Add i2c dt-binding and device node for Mediatek MT2701 Soc Jun Gao
@ 2017-03-09  3:13 ` Jun Gao
  2017-03-15 20:26   ` Rob Herring
  2017-03-22  9:05   ` Wolfram Sang
  2017-03-09  3:13 ` [RESEND PATCH v3 2/2] arm: dts: Add Mediatek MT2701 i2c device node Jun Gao
  1 sibling, 2 replies; 10+ messages in thread
From: Jun Gao @ 2017-03-09  3:13 UTC (permalink / raw)
  To: Wolfram Sang, Matthias Brugger
  Cc: srv_heupstream, devicetree, linux-i2c, linux-arm-kernel,
	linux-kernel, linux-mediatek, Jun Gao

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>
---
 .../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..27dbbf9 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"
+	"mediatek,mt6589-i2c"
+	"mediatek,mt8127-i2c"
+	"mediatek,mt8135-i2c"
+	"mediatek,mt8173-i2c"
   - reg: physical base address of the controller and dma base, length of memory
     mapped region.
   - interrupts: interrupt number to the cpu.
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [RESEND PATCH v3 2/2] arm: dts: Add Mediatek MT2701 i2c device node
  2017-03-09  3:13 [RESEND PATCH v3 0/2] Add i2c dt-binding and device node for Mediatek MT2701 Soc Jun Gao
  2017-03-09  3:13 ` [RESEND PATCH v3 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding Jun Gao
@ 2017-03-09  3:13 ` Jun Gao
  1 sibling, 0 replies; 10+ messages in thread
From: Jun Gao @ 2017-03-09  3:13 UTC (permalink / raw)
  To: Wolfram Sang, Matthias Brugger
  Cc: srv_heupstream, devicetree, linux-i2c, linux-arm-kernel,
	linux-kernel, linux-mediatek, Jun Gao

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.7.9.5

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [RESEND PATCH v3 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding
  2017-03-09  3:13 ` [RESEND PATCH v3 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding Jun Gao
@ 2017-03-15 20:26   ` Rob Herring
  2017-03-22  9:05   ` Wolfram Sang
  1 sibling, 0 replies; 10+ messages in thread
From: Rob Herring @ 2017-03-15 20:26 UTC (permalink / raw)
  To: Jun Gao
  Cc: Wolfram Sang, Matthias Brugger, srv_heupstream, devicetree,
	linux-i2c, linux-arm-kernel, linux-kernel, linux-mediatek

On Thu, Mar 09, 2017 at 11:13:04AM +0800, 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>
> ---
>  .../devicetree/bindings/i2c/i2c-mt6577.txt         |   11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RESEND PATCH v3 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding
  2017-03-09  3:13 ` [RESEND PATCH v3 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding Jun Gao
  2017-03-15 20:26   ` Rob Herring
@ 2017-03-22  9:05   ` Wolfram Sang
  2017-03-28  9:50     ` Jun Gao
  1 sibling, 1 reply; 10+ messages in thread
From: Wolfram Sang @ 2017-03-22  9:05 UTC (permalink / raw)
  To: Jun Gao
  Cc: Matthias Brugger, srv_heupstream, devicetree, linux-i2c,
	linux-arm-kernel, linux-kernel, linux-mediatek

[-- Attachment #1: Type: text/plain, Size: 1680 bytes --]

On Thu, Mar 09, 2017 at 11:13:04AM +0800, 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>

There is still the issue which Matthias Brugger pointed out on January,
24th: you need to describe the fallback compatibles.

> ---
>  .../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..27dbbf9 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"
> +	"mediatek,mt6589-i2c"
> +	"mediatek,mt8127-i2c"
> +	"mediatek,mt8135-i2c"
> +	"mediatek,mt8173-i2c"
>    - reg: physical base address of the controller and dma base, length of memory
>      mapped region.
>    - interrupts: interrupt number to the cpu.
> -- 
> 1.7.9.5
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RESEND PATCH v3 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding
  2017-03-22  9:05   ` Wolfram Sang
@ 2017-03-28  9:50     ` Jun Gao
  2017-03-28 19:22       ` Wolfram Sang
  0 siblings, 1 reply; 10+ messages in thread
From: Jun Gao @ 2017-03-28  9:50 UTC (permalink / raw)
  To: Wolfram Sang, Matthias Brugger, robh
  Cc: Matthias Brugger, srv_heupstream, devicetree, linux-i2c,
	linux-arm-kernel, linux-kernel, linux-mediatek, yingjoe.chen

On Wed, 2017-03-22 at 10:05 +0100, Wolfram Sang wrote:
> On Thu, Mar 09, 2017 at 11:13:04AM +0800, 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>
> 
> There is still the issue which Matthias Brugger pointed out on January,
> 24th: you need to describe the fallback compatibles.
> 

IMHO the value under compatible are just inputs which can be accepted.
It's little strange to add fallback information in binding. Some other
bindings do not describe so detailedly.
Is it OK to make binding as minimum standard?
If we describe it very detailedly, we will have to modify binding if
there are some changes for mt2701.

Rob, could you give some suggestions?  Thanks!

> > ---
> >  .../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..27dbbf9 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"
> > +	"mediatek,mt6589-i2c"
> > +	"mediatek,mt8127-i2c"
> > +	"mediatek,mt8135-i2c"
> > +	"mediatek,mt8173-i2c"
> >    - reg: physical base address of the controller and dma base, length of memory
> >      mapped region.
> >    - interrupts: interrupt number to the cpu.
> > -- 
> > 1.7.9.5
> > 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RESEND PATCH v3 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding
  2017-03-28  9:50     ` Jun Gao
@ 2017-03-28 19:22       ` Wolfram Sang
  2017-05-10 10:35         ` Matthias Brugger
  0 siblings, 1 reply; 10+ messages in thread
From: Wolfram Sang @ 2017-03-28 19:22 UTC (permalink / raw)
  To: Jun Gao
  Cc: Matthias Brugger, robh, srv_heupstream, devicetree, linux-i2c,
	linux-arm-kernel, linux-kernel, linux-mediatek, yingjoe.chen

[-- Attachment #1: Type: text/plain, Size: 2655 bytes --]

On Tue, Mar 28, 2017 at 05:50:12PM +0800, Jun Gao wrote:
> On Wed, 2017-03-22 at 10:05 +0100, Wolfram Sang wrote:
> > On Thu, Mar 09, 2017 at 11:13:04AM +0800, 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>
> > 
> > There is still the issue which Matthias Brugger pointed out on January,
> > 24th: you need to describe the fallback compatibles.
> > 
> 
> IMHO the value under compatible are just inputs which can be accepted.
> It's little strange to add fallback information in binding. Some other
> bindings do not describe so detailedly.
> Is it OK to make binding as minimum standard?
> If we describe it very detailedly, we will have to modify binding if
> there are some changes for mt2701.

My reading of the below is that I could simply use "mediatek,mt2701-i2c"
as compatible and things will work. But it won't, we don't have that in
the driver IIRC. So, we need a fallback for that to work.

> Rob, could you give some suggestions?  Thanks!

Would be welcome, yes. I lost track what the preferred solution is.

> 
> > > ---
> > >  .../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..27dbbf9 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"
> > > +	"mediatek,mt6589-i2c"
> > > +	"mediatek,mt8127-i2c"
> > > +	"mediatek,mt8135-i2c"
> > > +	"mediatek,mt8173-i2c"
> > >    - reg: physical base address of the controller and dma base, length of memory
> > >      mapped region.
> > >    - interrupts: interrupt number to the cpu.
> > > -- 
> > > 1.7.9.5
> > > 
> 
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RESEND PATCH v3 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding
  2017-03-28 19:22       ` Wolfram Sang
@ 2017-05-10 10:35         ` Matthias Brugger
  2017-05-23  3:34           ` Jun Gao
  0 siblings, 1 reply; 10+ messages in thread
From: Matthias Brugger @ 2017-05-10 10:35 UTC (permalink / raw)
  To: Wolfram Sang, Jun Gao
  Cc: robh, srv_heupstream, devicetree, linux-i2c, linux-arm-kernel,
	linux-kernel, linux-mediatek, yingjoe.chen



On 28/03/17 21:22, Wolfram Sang wrote:
> On Tue, Mar 28, 2017 at 05:50:12PM +0800, Jun Gao wrote:
>> On Wed, 2017-03-22 at 10:05 +0100, Wolfram Sang wrote:
>>> On Thu, Mar 09, 2017 at 11:13:04AM +0800, 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>
>>>
>>> There is still the issue which Matthias Brugger pointed out on January,
>>> 24th: you need to describe the fallback compatibles.
>>>
>>
>> IMHO the value under compatible are just inputs which can be accepted.
>> It's little strange to add fallback information in binding. Some other
>> bindings do not describe so detailedly.
>> Is it OK to make binding as minimum standard?
>> If we describe it very detailedly, we will have to modify binding if
>> there are some changes for mt2701.
> 
> My reading of the below is that I could simply use "mediatek,mt2701-i2c"
> as compatible and things will work. But it won't, we don't have that in
> the driver IIRC. So, we need a fallback for that to work.
> 
>> Rob, could you give some suggestions?  Thanks!
> 
> Would be welcome, yes. I lost track what the preferred solution is.
> 

We will need to define the fallback binding for each SoC.
As example take the rockchip mmc:
http://elixir.free-electrons.com/linux/latest/source/Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.txt

Regards,
Matthias

>>
>>>> ---
>>>>   .../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..27dbbf9 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"
>>>> +	"mediatek,mt6589-i2c"
>>>> +	"mediatek,mt8127-i2c"
>>>> +	"mediatek,mt8135-i2c"
>>>> +	"mediatek,mt8173-i2c"
>>>>     - reg: physical base address of the controller and dma base, length of memory
>>>>       mapped region.
>>>>     - interrupts: interrupt number to the cpu.
>>>> -- 
>>>> 1.7.9.5
>>>>
>>
>>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RESEND PATCH v3 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding
  2017-05-10 10:35         ` Matthias Brugger
@ 2017-05-23  3:34           ` Jun Gao
  2017-05-23  6:31             ` Matthias Brugger
  0 siblings, 1 reply; 10+ messages in thread
From: Jun Gao @ 2017-05-23  3:34 UTC (permalink / raw)
  To: robh
  Cc: Matthias Brugger, Wolfram Sang, robh, srv_heupstream, devicetree,
	linux-i2c, linux-arm-kernel, linux-kernel, linux-mediatek,
	yingjoe.chen

On Wed, 2017-05-10 at 12:35 +0200, Matthias Brugger wrote:
> 
> On 28/03/17 21:22, Wolfram Sang wrote:
> > On Tue, Mar 28, 2017 at 05:50:12PM +0800, Jun Gao wrote:
> >> On Wed, 2017-03-22 at 10:05 +0100, Wolfram Sang wrote:
> >>> On Thu, Mar 09, 2017 at 11:13:04AM +0800, 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>
> >>>
> >>> There is still the issue which Matthias Brugger pointed out on January,
> >>> 24th: you need to describe the fallback compatibles.
> >>>
> >>
> >> IMHO the value under compatible are just inputs which can be accepted.
> >> It's little strange to add fallback information in binding. Some other
> >> bindings do not describe so detailedly.
> >> Is it OK to make binding as minimum standard?
> >> If we describe it very detailedly, we will have to modify binding if
> >> there are some changes for mt2701.
> > 
> > My reading of the below is that I could simply use "mediatek,mt2701-i2c"
> > as compatible and things will work. But it won't, we don't have that in
> > the driver IIRC. So, we need a fallback for that to work.
> > 
> >> Rob, could you give some suggestions?  Thanks!
> > 
> > Would be welcome, yes. I lost track what the preferred solution is.
> > 
> 
> We will need to define the fallback binding for each SoC.
> As example take the rockchip mmc:
> http://elixir.free-electrons.com/linux/latest/source/Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.txt
> 
> Regards,
> Matthias
> 

Hi Rob,

There is no such requirement for other components.
Could you give us some suggestions? 
Thanks!


> >>
> >>>> ---
> >>>>   .../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..27dbbf9 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"
> >>>> +	"mediatek,mt6589-i2c"
> >>>> +	"mediatek,mt8127-i2c"
> >>>> +	"mediatek,mt8135-i2c"
> >>>> +	"mediatek,mt8173-i2c"
> >>>>     - reg: physical base address of the controller and dma base, length of memory
> >>>>       mapped region.
> >>>>     - interrupts: interrupt number to the cpu.
> >>>> -- 
> >>>> 1.7.9.5
> >>>>
> >>
> >>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RESEND PATCH v3 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding
  2017-05-23  3:34           ` Jun Gao
@ 2017-05-23  6:31             ` Matthias Brugger
  0 siblings, 0 replies; 10+ messages in thread
From: Matthias Brugger @ 2017-05-23  6:31 UTC (permalink / raw)
  To: Jun Gao, robh
  Cc: Wolfram Sang, srv_heupstream, devicetree, linux-i2c,
	linux-arm-kernel, linux-kernel, linux-mediatek, yingjoe.chen



On 23/05/17 05:34, Jun Gao wrote:
> On Wed, 2017-05-10 at 12:35 +0200, Matthias Brugger wrote:
>>
>> On 28/03/17 21:22, Wolfram Sang wrote:
>>> On Tue, Mar 28, 2017 at 05:50:12PM +0800, Jun Gao wrote:
>>>> On Wed, 2017-03-22 at 10:05 +0100, Wolfram Sang wrote:
>>>>> On Thu, Mar 09, 2017 at 11:13:04AM +0800, 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>
>>>>>
>>>>> There is still the issue which Matthias Brugger pointed out on January,
>>>>> 24th: you need to describe the fallback compatibles.
>>>>>
>>>>
>>>> IMHO the value under compatible are just inputs which can be accepted.
>>>> It's little strange to add fallback information in binding. Some other
>>>> bindings do not describe so detailedly.
>>>> Is it OK to make binding as minimum standard?
>>>> If we describe it very detailedly, we will have to modify binding if
>>>> there are some changes for mt2701.
>>>
>>> My reading of the below is that I could simply use "mediatek,mt2701-i2c"
>>> as compatible and things will work. But it won't, we don't have that in
>>> the driver IIRC. So, we need a fallback for that to work.
>>>
>>>> Rob, could you give some suggestions?  Thanks!
>>>
>>> Would be welcome, yes. I lost track what the preferred solution is.
>>>
>>
>> We will need to define the fallback binding for each SoC.
>> As example take the rockchip mmc:
>> http://elixir.free-electrons.com/linux/latest/source/Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.txt
>>
>> Regards,
>> Matthias
>>
> 
> Hi Rob,
> 
> There is no such requirement for other components.

The requirement is that the binding description reflects a compatible 
the driver is able to consume. Right now if you pass 
"mediatek,mt2701-i2c" the driver won't recognize this, therefor you need 
the fallback compatible. Which point isn't clear to you?

Regards,
Matthias

> Could you give us some suggestions?
> Thanks!
> 
> 
>>>>
>>>>>> ---
>>>>>>    .../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..27dbbf9 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"
>>>>>> +	"mediatek,mt6589-i2c"
>>>>>> +	"mediatek,mt8127-i2c"
>>>>>> +	"mediatek,mt8135-i2c"
>>>>>> +	"mediatek,mt8173-i2c"
>>>>>>      - reg: physical base address of the controller and dma base, length of memory
>>>>>>        mapped region.
>>>>>>      - interrupts: interrupt number to the cpu.
>>>>>> -- 
>>>>>> 1.7.9.5
>>>>>>
>>>>
>>>>
> 
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-05-23  6:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-09  3:13 [RESEND PATCH v3 0/2] Add i2c dt-binding and device node for Mediatek MT2701 Soc Jun Gao
2017-03-09  3:13 ` [RESEND PATCH v3 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding Jun Gao
2017-03-15 20:26   ` Rob Herring
2017-03-22  9:05   ` Wolfram Sang
2017-03-28  9:50     ` Jun Gao
2017-03-28 19:22       ` Wolfram Sang
2017-05-10 10:35         ` Matthias Brugger
2017-05-23  3:34           ` Jun Gao
2017-05-23  6:31             ` Matthias Brugger
2017-03-09  3:13 ` [RESEND PATCH v3 2/2] arm: dts: Add Mediatek MT2701 i2c device node Jun Gao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).