Re: [PATCH v5 2/4] Documentation: Bindings: Add STM32 DWMAC glue
On 3/22/2016 5:11 PM, Alexandre Torgue wrote: 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: On 21 March 2016 at 13:40, Rob Herring 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 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? Currently we keep the "host" and "csr" " ptp "clock from common bindings because directly connected to the either MAC core or optional internals modules. Indeed, also clk_tx_i and clk_rx_i could be treated in the same way. but... (my personal view). Many platforms, also inside STi, have different clock routing schema, so we could relax them giving each glue the way to internally manage all (as done nowadays). So these clocks can stay inside the glue and documented inside each binding doc. Maybe, it could be not so easy to have generic schema suitable for all the glues so documenting all inside the same binding text file. We could try to better name these clocks in each glue. For example, for this, although I do not know the clk schema, I can image a single rmii_clk (maybe from internal oscillator) that is connected to clk_tx_i and clk_rx_i. So it could be useless to pass both. Please let me know if I am wrong... In case of (G)MII, we should use something like (g)mii_tx_clk, (g)mii_rx_clk according to the real connections (if from an internal oscillator and not from an ext one connected to the phy). Regards, Peppe Best regards Alex regards, Joachim Eastwood
Re: [PATCH v5 2/4] Documentation: Bindings: Add STM32 DWMAC glue
Hi Rob, 2016-03-22 17:11 GMT+01:00 Alexandre Torgue: > 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 : >> On 21 March 2016 at 13:40, Rob Herring 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 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? A gentle ping. Can you give me your feedback please ? I will send next patchset version according to your answer. Thanks in advance Alex > > Best regards > > Alex > >> >> regards, >> Joachim Eastwood
Re: [PATCH v5 2/4] Documentation: Bindings: Add STM32 DWMAC glue
On Mon, Mar 21, 2016 at 10:02 PM, Giuseppe CAVALLAROwrote: > On 3/21/2016 11:45 AM, Alexandre Torgue wrote: >> >> Hi, >> >> 2016-03-18 17:00 GMT+01:00 Chen-Yu Tsai : >>> >>> Hi, >>> >>> On Fri, Mar 18, 2016 at 11:37 PM, Alexandre TORGUE >>> wrote: Signed-off-by: Alexandre TORGUE diff --git a/Documentation/devicetree/bindings/net/stm32-dwmac.txt b/Documentation/devicetree/bindings/net/stm32-dwmac.txt new file mode 100644 index 000..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 = < 0 25>, < 0 26>, < 0 27>; + st,syscon = < 0x4>; + snps,pbl = <8>; + snps,mixed-burst; + dma-ranges; + }; -- 1.9.1 ___ linux-arm-kernel mailing list linux-arm-ker...@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel >> >> >> >
Re: [PATCH v5 2/4] Documentation: Bindings: Add STM32 DWMAC glue
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: > On 21 March 2016 at 13:40, Rob Herring 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 >>> 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
Re: [PATCH v5 2/4] Documentation: Bindings: Add STM32 DWMAC glue
On 21 March 2016 at 13:40, Rob Herringwrote: > 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 >> 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
Re: [PATCH v5 2/4] Documentation: Bindings: Add STM32 DWMAC glue
On 3/21/2016 11:45 AM, Alexandre Torgue wrote: Hi, 2016-03-18 17:00 GMT+01:00 Chen-Yu Tsai: Hi, On Fri, Mar 18, 2016 at 11:37 PM, Alexandre TORGUE wrote: Signed-off-by: Alexandre TORGUE diff --git a/Documentation/devicetree/bindings/net/stm32-dwmac.txt b/Documentation/devicetree/bindings/net/stm32-dwmac.txt new file mode 100644 index 000..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 = < 0 25>, < 0 26>, < 0 27>; + st,syscon = < 0x4>; + snps,pbl = <8>; + snps,mixed-burst; + dma-ranges; + }; -- 1.9.1 ___ linux-arm-kernel mailing list linux-arm-ker...@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH v5 2/4] Documentation: Bindings: Add STM32 DWMAC glue
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 >wrote: > > Signed-off-by: Alexandre TORGUE > > > > diff --git a/Documentation/devicetree/bindings/net/stm32-dwmac.txt > > b/Documentation/devicetree/bindings/net/stm32-dwmac.txt > > new file mode 100644 > > index 000..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 = < 0 25>, < 0 26>, < 0 27>; > > + st,syscon = < 0x4>; > > + snps,pbl = <8>; > > + snps,mixed-burst; > > + dma-ranges; > > + }; > > -- > > 1.9.1 > > > > > > ___ > > linux-arm-kernel mailing list > > linux-arm-ker...@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 majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v5 2/4] Documentation: Bindings: Add STM32 DWMAC glue
Hi Chen-Yu, On 21 March 2016 at 12:08, Chen-Yu Tsaiwrote: > On Mon, Mar 21, 2016 at 6:45 PM, Alexandre Torgue > wrote: >> Hi, >> >> 2016-03-18 17:00 GMT+01:00 Chen-Yu Tsai : >>> Hi, >>> >>> On Fri, Mar 18, 2016 at 11:37 PM, Alexandre TORGUE >>> wrote: Signed-off-by: Alexandre TORGUE diff --git a/Documentation/devicetree/bindings/net/stm32-dwmac.txt b/Documentation/devicetree/bindings/net/stm32-dwmac.txt new file mode 100644 index 000..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
Re: [PATCH v5 2/4] Documentation: Bindings: Add STM32 DWMAC glue
On Mon, Mar 21, 2016 at 6:45 PM, Alexandre Torguewrote: > Hi, > > 2016-03-18 17:00 GMT+01:00 Chen-Yu Tsai : >> Hi, >> >> On Fri, Mar 18, 2016 at 11:37 PM, Alexandre TORGUE >> wrote: >>> Signed-off-by: Alexandre TORGUE >>> >>> diff --git a/Documentation/devicetree/bindings/net/stm32-dwmac.txt >>> b/Documentation/devicetree/bindings/net/stm32-dwmac.txt >>> new file mode 100644 >>> index 000..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 = < 0 25>, < 0 26>, < 0 27>; >>> + st,syscon = < 0x4>; >>> + snps,pbl = <8>; >>> + snps,mixed-burst; >>> + dma-ranges; >>> + }; >>> -- >>> 1.9.1 >>> >>> >>> ___ >>> linux-arm-kernel mailing list >>> linux-arm-ker...@lists.infradead.org >>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH v5 2/4] Documentation: Bindings: Add STM32 DWMAC glue
Hi, 2016-03-18 17:00 GMT+01:00 Chen-Yu Tsai: > Hi, > > On Fri, Mar 18, 2016 at 11:37 PM, Alexandre TORGUE > wrote: >> Signed-off-by: Alexandre TORGUE >> >> diff --git a/Documentation/devicetree/bindings/net/stm32-dwmac.txt >> b/Documentation/devicetree/bindings/net/stm32-dwmac.txt >> new file mode 100644 >> index 000..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 = < 0 25>, < 0 26>, < 0 27>; >> + st,syscon = < 0x4>; >> + snps,pbl = <8>; >> + snps,mixed-burst; >> + dma-ranges; >> + }; >> -- >> 1.9.1 >> >> >> ___ >> linux-arm-kernel mailing list >> linux-arm-ker...@lists.infradead.org >> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH v5 2/4] Documentation: Bindings: Add STM32 DWMAC glue
Hi, On Fri, Mar 18, 2016 at 11:37 PM, Alexandre TORGUEwrote: > Signed-off-by: Alexandre TORGUE > > diff --git a/Documentation/devicetree/bindings/net/stm32-dwmac.txt > b/Documentation/devicetree/bindings/net/stm32-dwmac.txt > new file mode 100644 > index 000..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 = < 0 25>, < 0 26>, < 0 27>; > + st,syscon = < 0x4>; > + snps,pbl = <8>; > + snps,mixed-burst; > + dma-ranges; > + }; > -- > 1.9.1 > > > ___ > linux-arm-kernel mailing list > linux-arm-ker...@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
[PATCH v5 2/4] Documentation: Bindings: Add STM32 DWMAC glue
Signed-off-by: Alexandre TORGUEdiff --git a/Documentation/devicetree/bindings/net/stm32-dwmac.txt b/Documentation/devicetree/bindings/net/stm32-dwmac.txt new file mode 100644 index 000..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 = < 0 25>, < 0 26>, < 0 27>; + st,syscon = < 0x4>; + snps,pbl = <8>; + snps,mixed-burst; + dma-ranges; + }; -- 1.9.1