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


Groups > linux.kernel > #1360738 > unrolled thread

[PATCH v5 2/4] Documentation: Bindings: Add STM32 DWMAC glue

Started byAlexandre TORGUE <alexandre.torgue@gmail.com>
First post2016-03-18 16:40 +0100
Last post2016-03-22 17:20 +0100
Articles 10 — 6 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v5 2/4] Documentation: Bindings: Add STM32 DWMAC glue Alexandre TORGUE <alexandre.torgue@gmail.com> - 2016-03-18 16:40 +0100
    Re: [PATCH v5 2/4] Documentation: Bindings: Add STM32 DWMAC glue Chen-Yu Tsai <wens@csie.org> - 2016-03-18 17:10 +0100
      Re: [PATCH v5 2/4] Documentation: Bindings: Add STM32 DWMAC glue Alexandre Torgue <alexandre.torgue@gmail.com> - 2016-03-21 11:50 +0100
        Re: [PATCH v5 2/4] Documentation: Bindings: Add STM32 DWMAC glue Chen-Yu Tsai <wens@csie.org> - 2016-03-21 12:10 +0100
          Re: [PATCH v5 2/4] Documentation: Bindings: Add STM32 DWMAC glue Joachim Eastwood <manabian@gmail.com> - 2016-03-21 13:20 +0100
        Re: [PATCH v5 2/4] Documentation: Bindings: Add STM32 DWMAC glue Giuseppe CAVALLARO <peppe.cavallaro@st.com> - 2016-03-21 15:10 +0100
          Re: [PATCH v5 2/4] Documentation: Bindings: Add STM32 DWMAC glue Chen-Yu Tsai <wens@csie.org> - 2016-03-22 17:30 +0100
      Re: [PATCH v5 2/4] Documentation: Bindings: Add STM32 DWMAC glue Rob Herring <robh@kernel.org> - 2016-03-21 13:50 +0100
        Re: [PATCH v5 2/4] Documentation: Bindings: Add STM32 DWMAC glue Joachim Eastwood <manabian@gmail.com> - 2016-03-21 16:40 +0100
          Re: [PATCH v5 2/4] Documentation: Bindings: Add STM32 DWMAC glue Alexandre Torgue <alexandre.torgue@gmail.com> - 2016-03-22 17:20 +0100

#1360738 — [PATCH v5 2/4] Documentation: Bindings: Add STM32 DWMAC glue

FromAlexandre TORGUE <alexandre.torgue@gmail.com>
Date2016-03-18 16:40 +0100
Subject[PATCH v5 2/4] Documentation: Bindings: Add STM32 DWMAC glue
Message-ID<re4Fj-pn-13@gated-at.bofh.it>
Signed-off-by: Alexandre TORGUE <alexandre.torgue@gmail.com>

diff --git a/Documentation/devicetree/bindings/net/stm32-dwmac.txt b/Documentation/devicetree/bindings/net/stm32-dwmac.txt
new file mode 100644
index 0000000..ada2aa4
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/stm32-dwmac.txt
@@ -0,0 +1,32 @@
+STMicroelectronics STM32 / MCU DWMAC glue layer controller
+
+This file documents platform glue layer for stmmac.
+Please see stmmac.txt for the other unchanged properties.
+
+The device node has following properties.
+
+Required properties:
+- compatible:  Should be "st,stm32-dwmac" to select glue, and
+	       "snps,dwmac-3.50a" to select IP vesrion.
+- clocks: Must contain a phandle for each entry in clock-names.
+- clock-names: Should be "stmmaceth" for the host clock.
+	       Should be "tx-clk" for the MAC TX clock.
+	       Should be "rx-clk" for the MAC RX clock.
+- st,syscon : Should be phandle/offset pair. The phandle to the syscon node which
+	      encompases the glue register, and the offset of the control register.
+Example:
+
+		ethernet0: dwmac@40028000 {
+			compatible = "st,stm32-dwmac", "snps,dwmac-3.50a";
+			status = "disabled";
+			reg = <0x40028000 0x8000>;
+			reg-names = "stmmaceth";
+			interrupts = <0 61 0>, <0 62 0>;
+			interrupt-names = "macirq", "eth_wake_irq";
+			clock-names = "stmmaceth", "tx-clk", "rx-clk";
+			clocks = <&rcc 0 25>, <&rcc 0 26>, <&rcc 0 27>;
+			st,syscon = <&syscfg 0x4>;
+			snps,pbl = <8>;
+			snps,mixed-burst;
+			dma-ranges;
+		};
-- 
1.9.1

[toc] | [next] | [standalone]


#1360759

FromChen-Yu Tsai <wens@csie.org>
Date2016-03-18 17:10 +0100
Message-ID<re58m-1fM-7@gated-at.bofh.it>
In reply to#1360738
Hi,

On Fri, Mar 18, 2016 at 11:37 PM, Alexandre TORGUE
<alexandre.torgue@gmail.com> wrote:
> Signed-off-by: Alexandre TORGUE <alexandre.torgue@gmail.com>
>
> diff --git a/Documentation/devicetree/bindings/net/stm32-dwmac.txt b/Documentation/devicetree/bindings/net/stm32-dwmac.txt
> new file mode 100644
> index 0000000..ada2aa4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/stm32-dwmac.txt
> @@ -0,0 +1,32 @@
> +STMicroelectronics STM32 / MCU DWMAC glue layer controller
> +
> +This file documents platform glue layer for stmmac.
> +Please see stmmac.txt for the other unchanged properties.
> +
> +The device node has following properties.
> +
> +Required properties:
> +- compatible:  Should be "st,stm32-dwmac" to select glue, and
> +              "snps,dwmac-3.50a" to select IP vesrion.

If you need have sort of hardware glue, then it is not compatible.

ChenYu

> +- clocks: Must contain a phandle for each entry in clock-names.
> +- clock-names: Should be "stmmaceth" for the host clock.
> +              Should be "tx-clk" for the MAC TX clock.
> +              Should be "rx-clk" for the MAC RX clock.
> +- st,syscon : Should be phandle/offset pair. The phandle to the syscon node which
> +             encompases the glue register, and the offset of the control register.
> +Example:
> +
> +               ethernet0: dwmac@40028000 {
> +                       compatible = "st,stm32-dwmac", "snps,dwmac-3.50a";
> +                       status = "disabled";
> +                       reg = <0x40028000 0x8000>;
> +                       reg-names = "stmmaceth";
> +                       interrupts = <0 61 0>, <0 62 0>;
> +                       interrupt-names = "macirq", "eth_wake_irq";
> +                       clock-names = "stmmaceth", "tx-clk", "rx-clk";
> +                       clocks = <&rcc 0 25>, <&rcc 0 26>, <&rcc 0 27>;
> +                       st,syscon = <&syscfg 0x4>;
> +                       snps,pbl = <8>;
> +                       snps,mixed-burst;
> +                       dma-ranges;
> +               };
> --
> 1.9.1
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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


#1361693

FromAlexandre Torgue <alexandre.torgue@gmail.com>
Date2016-03-21 11:50 +0100
Message-ID<rf5zk-4lU-7@gated-at.bofh.it>
In reply to#1360759
Hi,

2016-03-18 17:00 GMT+01:00 Chen-Yu Tsai <wens@csie.org>:
> Hi,
>
> On Fri, Mar 18, 2016 at 11:37 PM, Alexandre TORGUE
> <alexandre.torgue@gmail.com> wrote:
>> Signed-off-by: Alexandre TORGUE <alexandre.torgue@gmail.com>
>>
>> diff --git a/Documentation/devicetree/bindings/net/stm32-dwmac.txt b/Documentation/devicetree/bindings/net/stm32-dwmac.txt
>> new file mode 100644
>> index 0000000..ada2aa4
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/net/stm32-dwmac.txt
>> @@ -0,0 +1,32 @@
>> +STMicroelectronics STM32 / MCU DWMAC glue layer controller
>> +
>> +This file documents platform glue layer for stmmac.
>> +Please see stmmac.txt for the other unchanged properties.
>> +
>> +The device node has following properties.
>> +
>> +Required properties:
>> +- compatible:  Should be "st,stm32-dwmac" to select glue, and
>> +              "snps,dwmac-3.50a" to select IP vesrion.
>
> If you need have sort of hardware glue, then it is not compatible.
>

We could have the case where the glue is set by a bootloader.
In this case, we will select IP version in compatible and we will use
generic dwmac glue to probe stmmac driver.

Regards

Alex.

> ChenYu
>
>> +- clocks: Must contain a phandle for each entry in clock-names.
>> +- clock-names: Should be "stmmaceth" for the host clock.
>> +              Should be "tx-clk" for the MAC TX clock.
>> +              Should be "rx-clk" for the MAC RX clock.
>> +- st,syscon : Should be phandle/offset pair. The phandle to the syscon node which
>> +             encompases the glue register, and the offset of the control register.
>> +Example:
>> +
>> +               ethernet0: dwmac@40028000 {
>> +                       compatible = "st,stm32-dwmac", "snps,dwmac-3.50a";
>> +                       status = "disabled";
>> +                       reg = <0x40028000 0x8000>;
>> +                       reg-names = "stmmaceth";
>> +                       interrupts = <0 61 0>, <0 62 0>;
>> +                       interrupt-names = "macirq", "eth_wake_irq";
>> +                       clock-names = "stmmaceth", "tx-clk", "rx-clk";
>> +                       clocks = <&rcc 0 25>, <&rcc 0 26>, <&rcc 0 27>;
>> +                       st,syscon = <&syscfg 0x4>;
>> +                       snps,pbl = <8>;
>> +                       snps,mixed-burst;
>> +                       dma-ranges;
>> +               };
>> --
>> 1.9.1
>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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


#1361710

FromChen-Yu Tsai <wens@csie.org>
Date2016-03-21 12:10 +0100
Message-ID<rf5SG-4J7-7@gated-at.bofh.it>
In reply to#1361693
On Mon, Mar 21, 2016 at 6:45 PM, Alexandre Torgue
<alexandre.torgue@gmail.com> wrote:
> Hi,
>
> 2016-03-18 17:00 GMT+01:00 Chen-Yu Tsai <wens@csie.org>:
>> Hi,
>>
>> On Fri, Mar 18, 2016 at 11:37 PM, Alexandre TORGUE
>> <alexandre.torgue@gmail.com> wrote:
>>> Signed-off-by: Alexandre TORGUE <alexandre.torgue@gmail.com>
>>>
>>> diff --git a/Documentation/devicetree/bindings/net/stm32-dwmac.txt b/Documentation/devicetree/bindings/net/stm32-dwmac.txt
>>> new file mode 100644
>>> index 0000000..ada2aa4
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/net/stm32-dwmac.txt
>>> @@ -0,0 +1,32 @@
>>> +STMicroelectronics STM32 / MCU DWMAC glue layer controller
>>> +
>>> +This file documents platform glue layer for stmmac.
>>> +Please see stmmac.txt for the other unchanged properties.
>>> +
>>> +The device node has following properties.
>>> +
>>> +Required properties:
>>> +- compatible:  Should be "st,stm32-dwmac" to select glue, and
>>> +              "snps,dwmac-3.50a" to select IP vesrion.
>>
>> If you need have sort of hardware glue, then it is not compatible.
>>
>
> We could have the case where the glue is set by a bootloader.
> In this case, we will select IP version in compatible and we will use
> generic dwmac glue to probe stmmac driver.

It seems most platforms using DWMAC follow this design set by
the original stmmac bindings. I'm arguing that the requirement
of setting up the glue makes them incompatible.

What happens when the bootloader didn't setup the glue? And one
forgets to build the STM32 driver, only the generic one? The
generic driver even matches to some, but not all, version
strings.

Maybe it would've been better if the versioned strings were
only used to indicate functionality, and not used to bind
the drivers. But the bindings were set some time ago.


Regards
ChenYu


> Regards
>
> Alex.
>
>> ChenYu
>>
>>> +- clocks: Must contain a phandle for each entry in clock-names.
>>> +- clock-names: Should be "stmmaceth" for the host clock.
>>> +              Should be "tx-clk" for the MAC TX clock.
>>> +              Should be "rx-clk" for the MAC RX clock.
>>> +- st,syscon : Should be phandle/offset pair. The phandle to the syscon node which
>>> +             encompases the glue register, and the offset of the control register.
>>> +Example:
>>> +
>>> +               ethernet0: dwmac@40028000 {
>>> +                       compatible = "st,stm32-dwmac", "snps,dwmac-3.50a";
>>> +                       status = "disabled";
>>> +                       reg = <0x40028000 0x8000>;
>>> +                       reg-names = "stmmaceth";
>>> +                       interrupts = <0 61 0>, <0 62 0>;
>>> +                       interrupt-names = "macirq", "eth_wake_irq";
>>> +                       clock-names = "stmmaceth", "tx-clk", "rx-clk";
>>> +                       clocks = <&rcc 0 25>, <&rcc 0 26>, <&rcc 0 27>;
>>> +                       st,syscon = <&syscfg 0x4>;
>>> +                       snps,pbl = <8>;
>>> +                       snps,mixed-burst;
>>> +                       dma-ranges;
>>> +               };
>>> --
>>> 1.9.1
>>>
>>>
>>> _______________________________________________
>>> linux-arm-kernel mailing list
>>> linux-arm-kernel@lists.infradead.org
>>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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


#1361756

FromJoachim Eastwood <manabian@gmail.com>
Date2016-03-21 13:20 +0100
Message-ID<rf6Yp-5tY-5@gated-at.bofh.it>
In reply to#1361710
Hi Chen-Yu,

On 21 March 2016 at 12:08, Chen-Yu Tsai <wens@csie.org> wrote:
> On Mon, Mar 21, 2016 at 6:45 PM, Alexandre Torgue
> <alexandre.torgue@gmail.com> wrote:
>> Hi,
>>
>> 2016-03-18 17:00 GMT+01:00 Chen-Yu Tsai <wens@csie.org>:
>>> Hi,
>>>
>>> On Fri, Mar 18, 2016 at 11:37 PM, Alexandre TORGUE
>>> <alexandre.torgue@gmail.com> wrote:
>>>> Signed-off-by: Alexandre TORGUE <alexandre.torgue@gmail.com>
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/net/stm32-dwmac.txt b/Documentation/devicetree/bindings/net/stm32-dwmac.txt
>>>> new file mode 100644
>>>> index 0000000..ada2aa4
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/net/stm32-dwmac.txt
>>>> @@ -0,0 +1,32 @@
>>>> +STMicroelectronics STM32 / MCU DWMAC glue layer controller
>>>> +
>>>> +This file documents platform glue layer for stmmac.
>>>> +Please see stmmac.txt for the other unchanged properties.
>>>> +
>>>> +The device node has following properties.
>>>> +
>>>> +Required properties:
>>>> +- compatible:  Should be "st,stm32-dwmac" to select glue, and
>>>> +              "snps,dwmac-3.50a" to select IP vesrion.

s/vesrion/version

>>>
>>> If you need have sort of hardware glue, then it is not compatible.
>>>
>>
>> We could have the case where the glue is set by a bootloader.
>> In this case, we will select IP version in compatible and we will use
>> generic dwmac glue to probe stmmac driver.
>
> It seems most platforms using DWMAC follow this design set by
> the original stmmac bindings. I'm arguing that the requirement
> of setting up the glue makes them incompatible.
>
> What happens when the bootloader didn't setup the glue? And one
> forgets to build the STM32 driver, only the generic one? The
> generic driver even matches to some, but not all, version
> strings.
>
> Maybe it would've been better if the versioned strings were
> only used to indicate functionality, and not used to bind
> the drivers. But the bindings were set some time ago.

Since Alexandre has not added "snps,dwmac-3.50a" to dwmac-generic
doesn't he use it as you suggest here?

Note that we can not remove all the generic compatible strings from
dwmac-generic because there is one platform that depend on one of
them.
(see arch/arm/boot/dts/exynos5440.dtsi:190)

So we can not remove "snps,dwmac-3.70a" from the dwmac-generic driver
if we want to keep backwards compatibility with exynos5440. But I
guess we could remove the others if we want to.


regards,
Joachim Eastwood

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


#1361872

FromGiuseppe CAVALLARO <peppe.cavallaro@st.com>
Date2016-03-21 15:10 +0100
Message-ID<rf8GU-6NS-17@gated-at.bofh.it>
In reply to#1361693
On 3/21/2016 11:45 AM, Alexandre Torgue wrote:
> Hi,
>
> 2016-03-18 17:00 GMT+01:00 Chen-Yu Tsai <wens@csie.org>:
>> Hi,
>>
>> On Fri, Mar 18, 2016 at 11:37 PM, Alexandre TORGUE
>> <alexandre.torgue@gmail.com> wrote:
>>> Signed-off-by: Alexandre TORGUE <alexandre.torgue@gmail.com>
>>>
>>> diff --git a/Documentation/devicetree/bindings/net/stm32-dwmac.txt b/Documentation/devicetree/bindings/net/stm32-dwmac.txt
>>> new file mode 100644
>>> index 0000000..ada2aa4
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/net/stm32-dwmac.txt
>>> @@ -0,0 +1,32 @@
>>> +STMicroelectronics STM32 / MCU DWMAC glue layer controller
>>> +
>>> +This file documents platform glue layer for stmmac.
>>> +Please see stmmac.txt for the other unchanged properties.
>>> +
>>> +The device node has following properties.
>>> +
>>> +Required properties:
>>> +- compatible:  Should be "st,stm32-dwmac" to select glue, and
>>> +              "snps,dwmac-3.50a" to select IP vesrion.

Almost all the synp gmac chips have the HW capability register that is
used for setting all the parameters at probe time.
This will override fields passed from DT. In theory, it is not
necessary to pass: "snps,dwmac-3.50a" from device tree at least there
is either no HW cap reg or the glue has some w/a for a specific chip
revision.
To be honest, I like to see the "snps,dwmac-3.50a" as compatibility
to also have a better readability (that's my personal view ;-) ).

Peppe

>>
>> If you need have sort of hardware glue, then it is not compatible.
>>
>
> We could have the case where the glue is set by a bootloader.
> In this case, we will select IP version in compatible and we will use
> generic dwmac glue to probe stmmac driver.
>
> Regards
>
> Alex.
>
>> ChenYu
>>
>>> +- clocks: Must contain a phandle for each entry in clock-names.
>>> +- clock-names: Should be "stmmaceth" for the host clock.
>>> +              Should be "tx-clk" for the MAC TX clock.
>>> +              Should be "rx-clk" for the MAC RX clock.
>>> +- st,syscon : Should be phandle/offset pair. The phandle to the syscon node which
>>> +             encompases the glue register, and the offset of the control register.
>>> +Example:
>>> +
>>> +               ethernet0: dwmac@40028000 {
>>> +                       compatible = "st,stm32-dwmac", "snps,dwmac-3.50a";
>>> +                       status = "disabled";
>>> +                       reg = <0x40028000 0x8000>;
>>> +                       reg-names = "stmmaceth";
>>> +                       interrupts = <0 61 0>, <0 62 0>;
>>> +                       interrupt-names = "macirq", "eth_wake_irq";
>>> +                       clock-names = "stmmaceth", "tx-clk", "rx-clk";
>>> +                       clocks = <&rcc 0 25>, <&rcc 0 26>, <&rcc 0 27>;
>>> +                       st,syscon = <&syscfg 0x4>;
>>> +                       snps,pbl = <8>;
>>> +                       snps,mixed-burst;
>>> +                       dma-ranges;
>>> +               };
>>> --
>>> 1.9.1
>>>
>>>
>>> _______________________________________________
>>> linux-arm-kernel mailing list
>>> linux-arm-kernel@lists.infradead.org
>>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
>

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


#1362840

FromChen-Yu Tsai <wens@csie.org>
Date2016-03-22 17:30 +0100
Message-ID<rfxlU-77U-5@gated-at.bofh.it>
In reply to#1361872
On Mon, Mar 21, 2016 at 10:02 PM, Giuseppe CAVALLARO
<peppe.cavallaro@st.com> wrote:
> On 3/21/2016 11:45 AM, Alexandre Torgue wrote:
>>
>> Hi,
>>
>> 2016-03-18 17:00 GMT+01:00 Chen-Yu Tsai <wens@csie.org>:
>>>
>>> Hi,
>>>
>>> On Fri, Mar 18, 2016 at 11:37 PM, Alexandre TORGUE
>>> <alexandre.torgue@gmail.com> wrote:
>>>>
>>>> Signed-off-by: Alexandre TORGUE <alexandre.torgue@gmail.com>
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/net/stm32-dwmac.txt
>>>> b/Documentation/devicetree/bindings/net/stm32-dwmac.txt
>>>> new file mode 100644
>>>> index 0000000..ada2aa4
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/net/stm32-dwmac.txt
>>>> @@ -0,0 +1,32 @@
>>>> +STMicroelectronics STM32 / MCU DWMAC glue layer controller
>>>> +
>>>> +This file documents platform glue layer for stmmac.
>>>> +Please see stmmac.txt for the other unchanged properties.
>>>> +
>>>> +The device node has following properties.
>>>> +
>>>> +Required properties:
>>>> +- compatible:  Should be "st,stm32-dwmac" to select glue, and
>>>> +              "snps,dwmac-3.50a" to select IP vesrion.
>
>
> Almost all the synp gmac chips have the HW capability register that is
> used for setting all the parameters at probe time.
> This will override fields passed from DT. In theory, it is not
> necessary to pass: "snps,dwmac-3.50a" from device tree at least there
> is either no HW cap reg or the glue has some w/a for a specific chip
> revision.
> To be honest, I like to see the "snps,dwmac-3.50a" as compatibility
> to also have a better readability (that's my personal view ;-) ).

I agree having the versioned strings is good for informational purposes,
and to signal hardware capability. It is not so good for directly
binding drivers in the implementation though.

Unfortunately, as Joachim pointed out, exynos5440 uses it so we cannot
change it.

ChenYu

> Peppe
>
>
>>>
>>> If you need have sort of hardware glue, then it is not compatible.
>>>
>>
>> We could have the case where the glue is set by a bootloader.
>> In this case, we will select IP version in compatible and we will use
>> generic dwmac glue to probe stmmac driver.
>>
>> Regards
>>
>> Alex.
>>
>>> ChenYu
>>>
>>>> +- clocks: Must contain a phandle for each entry in clock-names.
>>>> +- clock-names: Should be "stmmaceth" for the host clock.
>>>> +              Should be "tx-clk" for the MAC TX clock.
>>>> +              Should be "rx-clk" for the MAC RX clock.
>>>> +- st,syscon : Should be phandle/offset pair. The phandle to the syscon
>>>> node which
>>>> +             encompases the glue register, and the offset of the
>>>> control register.
>>>> +Example:
>>>> +
>>>> +               ethernet0: dwmac@40028000 {
>>>> +                       compatible = "st,stm32-dwmac",
>>>> "snps,dwmac-3.50a";
>>>> +                       status = "disabled";
>>>> +                       reg = <0x40028000 0x8000>;
>>>> +                       reg-names = "stmmaceth";
>>>> +                       interrupts = <0 61 0>, <0 62 0>;
>>>> +                       interrupt-names = "macirq", "eth_wake_irq";
>>>> +                       clock-names = "stmmaceth", "tx-clk", "rx-clk";
>>>> +                       clocks = <&rcc 0 25>, <&rcc 0 26>, <&rcc 0 27>;
>>>> +                       st,syscon = <&syscfg 0x4>;
>>>> +                       snps,pbl = <8>;
>>>> +                       snps,mixed-burst;
>>>> +                       dma-ranges;
>>>> +               };
>>>> --
>>>> 1.9.1
>>>>
>>>>
>>>> _______________________________________________
>>>> linux-arm-kernel mailing list
>>>> linux-arm-kernel@lists.infradead.org
>>>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>>
>>
>>
>

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


#1361800

FromRob Herring <robh@kernel.org>
Date2016-03-21 13:50 +0100
Message-ID<rf7rs-5J5-23@gated-at.bofh.it>
In reply to#1360759
On Sat, Mar 19, 2016 at 12:00:22AM +0800, Chen-Yu Tsai wrote:
> Hi,
> 
> On Fri, Mar 18, 2016 at 11:37 PM, Alexandre TORGUE
> <alexandre.torgue@gmail.com> wrote:
> > Signed-off-by: Alexandre TORGUE <alexandre.torgue@gmail.com>
> >
> > diff --git a/Documentation/devicetree/bindings/net/stm32-dwmac.txt b/Documentation/devicetree/bindings/net/stm32-dwmac.txt
> > new file mode 100644
> > index 0000000..ada2aa4
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/net/stm32-dwmac.txt
> > @@ -0,0 +1,32 @@
> > +STMicroelectronics STM32 / MCU DWMAC glue layer controller
> > +
> > +This file documents platform glue layer for stmmac.
> > +Please see stmmac.txt for the other unchanged properties.
> > +
> > +The device node has following properties.
> > +
> > +Required properties:
> > +- compatible:  Should be "st,stm32-dwmac" to select glue, and
> > +              "snps,dwmac-3.50a" to select IP vesrion.
> 
> If you need have sort of hardware glue, then it is not compatible.

Hence, the more specific compatible. Having the generic one is still 
useful.

> 
> ChenYu
> 
> > +- clocks: Must contain a phandle for each entry in clock-names.
> > +- clock-names: Should be "stmmaceth" for the host clock.

This doesn't sound like the clock input signal name...

> > +              Should be "tx-clk" for the MAC TX clock.
> > +              Should be "rx-clk" for the MAC RX clock.

How can other DWMAC blocks not have these clocks? The glue can't really 
add these clocks. It could combine them into one or a new version of 
DWMAC could have a different number of clock inputs. So if there is 
variation here, then some of the bindings are probably wrong. I guess 
the only change I'm suggesting is possibly moving these into common 
binding doc.

> > +- st,syscon : Should be phandle/offset pair. The phandle to the syscon node which
> > +             encompases the glue register, and the offset of the control register.
> > +Example:
> > +
> > +               ethernet0: dwmac@40028000 {

ethernet@...

> > +                       compatible = "st,stm32-dwmac", "snps,dwmac-3.50a";
> > +                       status = "disabled";
> > +                       reg = <0x40028000 0x8000>;
> > +                       reg-names = "stmmaceth";
> > +                       interrupts = <0 61 0>, <0 62 0>;
> > +                       interrupt-names = "macirq", "eth_wake_irq";
> > +                       clock-names = "stmmaceth", "tx-clk", "rx-clk";
> > +                       clocks = <&rcc 0 25>, <&rcc 0 26>, <&rcc 0 27>;
> > +                       st,syscon = <&syscfg 0x4>;
> > +                       snps,pbl = <8>;
> > +                       snps,mixed-burst;
> > +                       dma-ranges;
> > +               };
> > --
> > 1.9.1
> >
> >
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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


#1361938

FromJoachim Eastwood <manabian@gmail.com>
Date2016-03-21 16:40 +0100
Message-ID<rfa5X-7FH-1@gated-at.bofh.it>
In reply to#1361800
On 21 March 2016 at 13:40, Rob Herring <robh@kernel.org> wrote:
> On Sat, Mar 19, 2016 at 12:00:22AM +0800, Chen-Yu Tsai wrote:
>> Hi,
>>
>> On Fri, Mar 18, 2016 at 11:37 PM, Alexandre TORGUE
>> <alexandre.torgue@gmail.com> wrote:
>> > +- clocks: Must contain a phandle for each entry in clock-names.
>> > +- clock-names: Should be "stmmaceth" for the host clock.
>
> This doesn't sound like the clock input signal name...
>
>> > +              Should be "tx-clk" for the MAC TX clock.
>> > +              Should be "rx-clk" for the MAC RX clock.
>
> How can other DWMAC blocks not have these clocks? The glue can't really
> add these clocks. It could combine them into one or a new version of
> DWMAC could have a different number of clock inputs. So if there is
> variation here, then some of the bindings are probably wrong. I guess
> the only change I'm suggesting is possibly moving these into common
> binding doc.

The LPC18xx implementation probably have these clocks as well but the
LPC1850 user manual only documents the main clock. Someone with access
to the IP block doc from Synopsys should be able to check which clocks
the MAC really needs.

Rockchip bindings have two clocks named "mac_clk_rx" and "mac_clk_tx".
These are probably the same as stm32 needs so maybe use these names
and move them into the main doc and update the rockchip binding.


regards,
Joachim Eastwood

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


#1362838

FromAlexandre Torgue <alexandre.torgue@gmail.com>
Date2016-03-22 17:20 +0100
Message-ID<rfxce-71P-9@gated-at.bofh.it>
In reply to#1361938
Hi guys,

I will fix typo issues (s/vesrion/version and ethernet @).

Concerning compatible string. For sure "snps,dwmac-3.50a" string is
not used inside glue driver.
I perfere to keep it for information but if you really want that I
remove it I will not block ;)

2016-03-21 16:36 GMT+01:00 Joachim  Eastwood <manabian@gmail.com>:
> On 21 March 2016 at 13:40, Rob Herring <robh@kernel.org> wrote:
>> On Sat, Mar 19, 2016 at 12:00:22AM +0800, Chen-Yu Tsai wrote:
>>> Hi,
>>>
>>> On Fri, Mar 18, 2016 at 11:37 PM, Alexandre TORGUE
>>> <alexandre.torgue@gmail.com> wrote:
>>> > +- clocks: Must contain a phandle for each entry in clock-names.
>>> > +- clock-names: Should be "stmmaceth" for the host clock.
>>
We can remove host clock (stmmac eth) entry here and refer to
stmmac.txt binding for common entry

>> This doesn't sound like the clock input signal name...
>>
>>> > +              Should be "tx-clk" for the MAC TX clock.
>>> > +              Should be "rx-clk" for the MAC RX clock.
>>
>> How can other DWMAC blocks not have these clocks? The glue can't really
>> add these clocks. It could combine them into one or a new version of
>> DWMAC could have a different number of clock inputs. So if there is
>> variation here, then some of the bindings are probably wrong. I guess
>> the only change I'm suggesting is possibly moving these into common
>> binding doc.
>
> The LPC18xx implementation probably have these clocks as well but the
> LPC1850 user manual only documents the main clock. Someone with access
> to the IP block doc from Synopsys should be able to check which clocks
> the MAC really needs.
>
> Rockchip bindings have two clocks named "mac_clk_rx" and "mac_clk_tx".
> These are probably the same as stm32 needs so maybe use these names
> and move them into the main doc and update the rockchip binding.
>
I think we can use same name. But I have a doubt on moving it in a
common bindings (maybe I don't well understood). When you say "common
binding file" is it "stmmac.txt" binding ? If yes does it mean that we
have to control it inside stmmac driver (no more in glue) ? In this
case those clocks will become "required" for stm32 and rockship but
not for others chip. It could create confusion?

Best regards

Alex

>
> regards,
> Joachim Eastwood

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web