* [PATCH 0/7] net: Add support for Qualcomm ethqos @ 2019-01-02 9:17 Vinod Koul 2019-01-02 9:17 ` [PATCH 1/7] dt-bindings: net: Add Qualcomm ethqos binding Vinod Koul 2019-01-02 9:17 ` [PATCH 3/7] dt-bindings: net: stmmac: Add the bindings documentation for delays Vinod Koul 0 siblings, 2 replies; 8+ messages in thread From: Vinod Koul @ 2019-01-02 9:17 UTC (permalink / raw) To: David S . Miller Cc: netdev, linux-arm-kernel, Niklas Cassel, Bjorn Andersson, Vinod Koul, Rob Herring, Mark Rutland, devicetree, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, Andrew Lunn, Florian Fainelli, Vivien Didelot Some Qualcomm SoCs sport a ethqos controller which use DW ip, so add the glue driver which uses stmmac driver along with DT bindings for this device. This controller supports rgmii mode and doesn't work with existing phy drivers as they do not remove the phy delay delay in this mode, so add a DT property and disable the delay when this property is present, this is done for two phys at803x and qca8k. Vinod Koul (7): dt-bindings: net: Add Qualcomm ethqos binding net: stmmac: Add driver for Qualcomm ethqos dt-bindings: net: stmmac: Add the bindings documentation for delays MAINTAINER: Add entry for Qualcomm ETHQOS ethernet driver net: phy: at803x: Rework at803x_config_init() net: phy: at803x: Add support to disable tx/rx delays net: dsa: qca8k: handle disable tx/rx delay .../devicetree/bindings/net/qcom,dwmac.txt | 129 +++++ .../devicetree/bindings/net/stmmac.txt | 2 + MAINTAINERS | 8 + drivers/net/dsa/qca8k.c | 27 +- drivers/net/ethernet/stmicro/stmmac/Kconfig | 10 + drivers/net/ethernet/stmicro/stmmac/Makefile | 1 + .../stmicro/stmmac/dwmac-qcom-ethqos.c | 545 ++++++++++++++++++ drivers/net/phy/at803x.c | 48 +- 8 files changed, 758 insertions(+), 12 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/qcom,dwmac.txt create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c -- 2.20.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/7] dt-bindings: net: Add Qualcomm ethqos binding 2019-01-02 9:17 [PATCH 0/7] net: Add support for Qualcomm ethqos Vinod Koul @ 2019-01-02 9:17 ` Vinod Koul 2019-01-02 14:07 ` Andrew Lunn 2019-01-02 9:17 ` [PATCH 3/7] dt-bindings: net: stmmac: Add the bindings documentation for delays Vinod Koul 1 sibling, 1 reply; 8+ messages in thread From: Vinod Koul @ 2019-01-02 9:17 UTC (permalink / raw) To: David S . Miller Cc: netdev, linux-arm-kernel, Niklas Cassel, Bjorn Andersson, Vinod Koul, Rob Herring, Mark Rutland, devicetree Add support for Qualcomm ethqos found in some SoCs like QCS404. Signed-off-by: Vinod Koul <vkoul@kernel.org> --- .../devicetree/bindings/net/qcom,dwmac.txt | 129 ++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/qcom,dwmac.txt diff --git a/Documentation/devicetree/bindings/net/qcom,dwmac.txt b/Documentation/devicetree/bindings/net/qcom,dwmac.txt new file mode 100644 index 000000000000..e3a412695afb --- /dev/null +++ b/Documentation/devicetree/bindings/net/qcom,dwmac.txt @@ -0,0 +1,129 @@ +Qualcomm Ethernet ETHQOS device + +This device has following properties: + +Required properties: + +- compatible: Should be qcom,ethqos-qcs404" + +- reg: Address and length of the register set for the device + +- reg-names: Should contain register names "stmmaceth", "rgmii" + +- clocks: Should contain phandle to clocks + +- clock-names: Should contain clock names "stmmaceth", "pclk", + "ptp_ref", "rgmii" + +- interrupts: Should contain phandle to interrupts + +- interrupt-names: Should contain interrupt names "macirq", "eth_lpi" + +Rest of the properties are defined in stmmac.txt file in same directory + + +Example: + +ethernet: ethernet@7a80000 { + compatible = "qcom,ethqos-qcs404"; + reg = <0x07a80000 0x10000>, + <0x07a96000 0x100>; + reg-names = "stmmaceth", "rgmii"; + clock-names = "stmmaceth", "pclk", "ptp_ref", "rgmii"; + clocks = <&gcc GCC_ETH_AXI_CLK>, + <&gcc GCC_ETH_SLAVE_AHB_CLK>, + <&gcc GCC_ETH_PTP_CLK>, + <&gcc GCC_ETH_RGMII_CLK>; + interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "macirq", "eth_lpi"; + snps,reset-gpio = <&tlmm 60 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + snps,axi-config = <&stmmac_axi_setup>; + snps,mtl-rx-config = <&mtl_rx_setup>; + snps,mtl-tx-config = <&mtl_tx_setup>; + + snps,txpbl = <8>; + snps,rxpbl = <2>; + snps,aal; + snps,tso; + + phy-handle = <&phy1>; + phy-mode = "rgmii"; + + stmmac_axi_setup: stmmac-axi-config { + snps,wr_osr_lmt = <15>; + snps,rd_osr_lmt = <15>; + snps,blen = <256 128 64 32 0 0 0>; + }; + + mtl_rx_setup: rx-queues-config { + snps,rx-queues-to-use = <4>; + snps,rx-sched-sp; + queue0 { + snps,dcb-algorithm; + snps,map-to-dma-channel = <0x0>; + snps,priority = <0x0>; + }; + queue1 { + snps,dcb-algorithm; + snps,map-to-dma-channel = <0x1>; + snps,priority = <0x1>; + }; + queue2 { + snps,dcb-algorithm; + snps,map-to-dma-channel = <0x2>; + snps,priority = <0x1>; + }; + queue3 { + snps,dcb-algorithm; + snps,map-to-dma-channel = <0x3>; + snps,priority = <0x1>; + }; + }; + + mtl_tx_setup: tx-queues-config { + snps,tx-queues-to-use = <4>; + snps,tx-sched-wrr; + queue0 { + snps,weight = <0x10>; + snps,dcb-algorithm; + snps,priority = <0x0>; + }; + queue1 { + snps,avb-algorithm; + snps,send_slope = <0x1000>; + snps,idle_slope = <0x1000>; + snps,high_credit = <0x3E800>; + snps,low_credit = <0xFFC18000>; + snps,priority = <0x1>; + }; + queue2 { + snps,avb-algorithm; + snps,send_slope = <0x1000>; + snps,idle_slope = <0x1000>; + snps,high_credit = <0x3E800>; + snps,low_credit = <0xFFC18000>; + snps,priority = <0x1>; + }; + queue3 { + snps,avb-algorithm; + snps,send_slope = <0x1000>; + snps,idle_slope = <0x1000>; + snps,high_credit = <0x3E800>; + snps,low_credit = <0xFFC18000>; + snps,priority = <0x1>; + }; + }; + + mdio { + #address-cells = <0x1>; + #size-cells = <0x0>; + compatible = "snps,dwmac-mdio"; + phy1: phy@1 { + device_type = "ethernet-phy"; + reg = <0x4>; + }; + }; + +}; -- 2.20.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/7] dt-bindings: net: Add Qualcomm ethqos binding 2019-01-02 9:17 ` [PATCH 1/7] dt-bindings: net: Add Qualcomm ethqos binding Vinod Koul @ 2019-01-02 14:07 ` Andrew Lunn 2019-01-02 14:37 ` Vinod Koul 0 siblings, 1 reply; 8+ messages in thread From: Andrew Lunn @ 2019-01-02 14:07 UTC (permalink / raw) To: Vinod Koul Cc: David S . Miller, netdev, linux-arm-kernel, Niklas Cassel, Bjorn Andersson, Rob Herring, Mark Rutland, devicetree > + mdio { > + #address-cells = <0x1>; > + #size-cells = <0x0>; > + compatible = "snps,dwmac-mdio"; > + phy1: phy@1 { phy@4 since reg = 0x4 > + device_type = "ethernet-phy"; > + reg = <0x4>; Thanks, Andrew ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/7] dt-bindings: net: Add Qualcomm ethqos binding 2019-01-02 14:07 ` Andrew Lunn @ 2019-01-02 14:37 ` Vinod Koul 0 siblings, 0 replies; 8+ messages in thread From: Vinod Koul @ 2019-01-02 14:37 UTC (permalink / raw) To: Andrew Lunn Cc: David S . Miller, netdev, linux-arm-kernel, Niklas Cassel, Bjorn Andersson, Rob Herring, Mark Rutland, devicetree On 02-01-19, 15:07, Andrew Lunn wrote: > > + mdio { > > + #address-cells = <0x1>; > > + #size-cells = <0x0>; > > + compatible = "snps,dwmac-mdio"; > > + phy1: phy@1 { > > phy@4 since reg = 0x4 Right, will fix this -- ~Vinod ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/7] dt-bindings: net: stmmac: Add the bindings documentation for delays 2019-01-02 9:17 [PATCH 0/7] net: Add support for Qualcomm ethqos Vinod Koul 2019-01-02 9:17 ` [PATCH 1/7] dt-bindings: net: Add Qualcomm ethqos binding Vinod Koul @ 2019-01-02 9:17 ` Vinod Koul 2019-01-11 15:01 ` Rob Herring 1 sibling, 1 reply; 8+ messages in thread From: Vinod Koul @ 2019-01-02 9:17 UTC (permalink / raw) To: David S . Miller Cc: netdev, linux-arm-kernel, Niklas Cassel, Bjorn Andersson, Vinod Koul, Rob Herring, Mark Rutland, devicetree Some controllers require that phy delay should be disabled. So add optional properties rx-disable-delay and tx-disable-delay for it. Signed-off-by: Vinod Koul <vkoul@kernel.org> --- Documentation/devicetree/bindings/net/stmmac.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/net/stmmac.txt b/Documentation/devicetree/bindings/net/stmmac.txt index cb694062afff..ec18897e22c8 100644 --- a/Documentation/devicetree/bindings/net/stmmac.txt +++ b/Documentation/devicetree/bindings/net/stmmac.txt @@ -74,6 +74,8 @@ Optional properties: - snps,mb: mixed-burst - snps,rb: rebuild INCRx Burst - mdio: with compatible = "snps,dwmac-mdio", create and register mdio bus. +- rx-delay-disable: bool, when present disable the rx delay +- tx-delay-disable: bool, when present disable the tx delay - Multiple RX Queues parameters: below the list of all the parameters to configure the multiple RX queues: - snps,rx-queues-to-use: number of RX queues to be used in the driver -- 2.20.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 3/7] dt-bindings: net: stmmac: Add the bindings documentation for delays 2019-01-02 9:17 ` [PATCH 3/7] dt-bindings: net: stmmac: Add the bindings documentation for delays Vinod Koul @ 2019-01-11 15:01 ` Rob Herring 2019-01-14 15:26 ` Vinod Koul 2019-01-14 23:34 ` Florian Fainelli 0 siblings, 2 replies; 8+ messages in thread From: Rob Herring @ 2019-01-11 15:01 UTC (permalink / raw) To: Vinod Koul Cc: David S . Miller, netdev, linux-arm-kernel, Niklas Cassel, Bjorn Andersson, Mark Rutland, devicetree On Wed, Jan 02, 2019 at 02:47:25PM +0530, Vinod Koul wrote: > Some controllers require that phy delay should be disabled. So add If the MAC requires it, then the compatible string should imply this. If it depends on the PHY, then okay. > optional properties rx-disable-delay and tx-disable-delay for it. > > Signed-off-by: Vinod Koul <vkoul@kernel.org> > --- > Documentation/devicetree/bindings/net/stmmac.txt | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/Documentation/devicetree/bindings/net/stmmac.txt b/Documentation/devicetree/bindings/net/stmmac.txt > index cb694062afff..ec18897e22c8 100644 > --- a/Documentation/devicetree/bindings/net/stmmac.txt > +++ b/Documentation/devicetree/bindings/net/stmmac.txt > @@ -74,6 +74,8 @@ Optional properties: > - snps,mb: mixed-burst > - snps,rb: rebuild INCRx Burst > - mdio: with compatible = "snps,dwmac-mdio", create and register mdio bus. > +- rx-delay-disable: bool, when present disable the rx delay > +- tx-delay-disable: bool, when present disable the tx delay Needs a vendor prefix. > - Multiple RX Queues parameters: below the list of all the parameters to > configure the multiple RX queues: > - snps,rx-queues-to-use: number of RX queues to be used in the driver > -- > 2.20.1 > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/7] dt-bindings: net: stmmac: Add the bindings documentation for delays 2019-01-11 15:01 ` Rob Herring @ 2019-01-14 15:26 ` Vinod Koul 2019-01-14 23:34 ` Florian Fainelli 1 sibling, 0 replies; 8+ messages in thread From: Vinod Koul @ 2019-01-14 15:26 UTC (permalink / raw) To: Rob Herring Cc: David S . Miller, netdev, linux-arm-kernel, Niklas Cassel, Bjorn Andersson, Mark Rutland, devicetree HI Rob, On 11-01-19, 09:01, Rob Herring wrote: > On Wed, Jan 02, 2019 at 02:47:25PM +0530, Vinod Koul wrote: > > Some controllers require that phy delay should be disabled. So add > > If the MAC requires it, then the compatible string should imply this. If > it depends on the PHY, then okay. Thanks for the review, yes this was targeted to PHY. After feedback from Andrew, I have removed this is v2 posted earlier! -- ~Vinod ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/7] dt-bindings: net: stmmac: Add the bindings documentation for delays 2019-01-11 15:01 ` Rob Herring 2019-01-14 15:26 ` Vinod Koul @ 2019-01-14 23:34 ` Florian Fainelli 1 sibling, 0 replies; 8+ messages in thread From: Florian Fainelli @ 2019-01-14 23:34 UTC (permalink / raw) To: Rob Herring, Vinod Koul Cc: Mark Rutland, devicetree, netdev, Bjorn Andersson, Niklas Cassel, David S . Miller, linux-arm-kernel On 1/11/19 7:01 AM, Rob Herring wrote: > On Wed, Jan 02, 2019 at 02:47:25PM +0530, Vinod Koul wrote: >> Some controllers require that phy delay should be disabled. So add > > If the MAC requires it, then the compatible string should imply this. If > it depends on the PHY, then okay. > >> optional properties rx-disable-delay and tx-disable-delay for it. >> >> Signed-off-by: Vinod Koul <vkoul@kernel.org> >> --- >> Documentation/devicetree/bindings/net/stmmac.txt | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/net/stmmac.txt b/Documentation/devicetree/bindings/net/stmmac.txt >> index cb694062afff..ec18897e22c8 100644 >> --- a/Documentation/devicetree/bindings/net/stmmac.txt >> +++ b/Documentation/devicetree/bindings/net/stmmac.txt >> @@ -74,6 +74,8 @@ Optional properties: >> - snps,mb: mixed-burst >> - snps,rb: rebuild INCRx Burst >> - mdio: with compatible = "snps,dwmac-mdio", create and register mdio bus. >> +- rx-delay-disable: bool, when present disable the rx delay >> +- tx-delay-disable: bool, when present disable the tx delay > > Needs a vendor prefix. Indeed, and it would actually be nicer to allow specifying delays directly in ps units, see: Documentation/devicetree/bindings/net/dwmac-sun8i.txt Documentation/devicetree/bindings/net/mediatek-dwmac.txt for examples. -- Florian ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-01-14 23:34 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-01-02 9:17 [PATCH 0/7] net: Add support for Qualcomm ethqos Vinod Koul 2019-01-02 9:17 ` [PATCH 1/7] dt-bindings: net: Add Qualcomm ethqos binding Vinod Koul 2019-01-02 14:07 ` Andrew Lunn 2019-01-02 14:37 ` Vinod Koul 2019-01-02 9:17 ` [PATCH 3/7] dt-bindings: net: stmmac: Add the bindings documentation for delays Vinod Koul 2019-01-11 15:01 ` Rob Herring 2019-01-14 15:26 ` Vinod Koul 2019-01-14 23:34 ` Florian Fainelli
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).