All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Cc: Maxime Ripard <mripard@kernel.org>,
	devicetree@vger.kernel.org,
	Alexandre Torgue <alexandre.torgue@st.com>,
	Joao Pinto <jpinto@synopsys.com>,
	netdev@vger.kernel.org,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-kernel@vger.kernel.org,
	Serge Semin <fancer.lancer@gmail.com>,
	Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>,
	Rob Herring <robh+dt@kernel.org>,
	Jose Abreu <joabreu@synopsys.com>,
	Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Lars Persson <larper@axis.com>, Jakub Kicinski <kuba@kernel.org>,
	Johan Hovold <johan@kernel.org>,
	Vyacheslav Mitrofanov
	<Vyacheslav.Mitrofanov@baikalelectronics.ru>,
	"David S. Miller" <davem@davemloft.net>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 05/25] dt-bindings: net: dwmac: Elaborate stmmaceth/pclk description
Date: Tue, 15 Dec 2020 11:30:39 -0600	[thread overview]
Message-ID: <20201215173039.GA4072051@robh.at.kernel.org> (raw)
In-Reply-To: <20201214091616.13545-6-Sergey.Semin@baikalelectronics.ru>

On Mon, 14 Dec 2020 12:15:55 +0300, Serge Semin wrote:
> Current clocks description doesn't provide a comprehensive notion about
> what "stmmaceth" and "pclk" actually represent from the IP-core manual
> point of view. The bindings file states:
> stmmaceth - "GMAC main clock",
> apb - "Peripheral registers interface clock".
> It isn't that easy to understand what they actually mean especially seeing
> the DW *MAC manual operates with clock definitions like Application,
> System, Host, CSR, Transmit, Receive, etc clocks. Moreover the clocks
> usage in the driver doesn't shade a full light on their essence. What
> inferred from there is that the "stmmaceth" name has been assigned to the
> common clock, which feeds both system and CSR interfaces. But what about
> "apb"? The bindings defines it as the clock for "peripheral registers
> interface". So it's close to the CSR clock in the IP-core manual notation.
> If so then when "apb" clock is specified aside with the "stmmaceth", it
> represents a case when the DW *MAC is synthesized with CSR_SLV_CLK=y
> (separate system and CSR clocks). But even though the "apb" clock is
> requested in the MAC driver, the driver doesn't actually use it as a
> separate CSR clock where the IP-core manual requires. All of that makes me
> thinking that the case of separate system and CSR clocks isn't correctly
> implemented in the driver.
> 
> Let's start with elaborating the clocks description so anyone reading
> the DW *MAC bindings file would understand that "stmmaceth" is the
> system clock and "pclk" is actually the CSR clock. Indeed in accordance
> with sheets depicted in [1]:
> system/application clock can be either of: hclk_i, aclk_i, clk_app_i;
> CSR clock can be either of: hclk_i, aclk_i, clk_app_i, clk_csr_i.
> (Most likely the similar definitions present in the others IP-core
> manuals.) So the CSR clock can be tied to the application clock
> considering the later as the main clock, but not the other way around. In
> case if there is only "stmmaceth" clock specified in a DT node, then it
> will be considered as a source of clocks for both application and CSR. But
> if "pclk" is also specified in the list of the device clocks, then it will
> be perceived as the separate CSR clock.
> 
> [1] DesignWare Cores Ethernet MAC Universal Databook, Revision 3.73a,
>     October 2013, p. 564.
> 
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> ---
>  .../devicetree/bindings/net/snps,dwmac.yaml          | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Cc: Jakub Kicinski <kuba@kernel.org>,
	Alexandre Torgue <alexandre.torgue@st.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Serge Semin <fancer.lancer@gmail.com>,
	Lars Persson <larper@axis.com>,
	Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	devicetree@vger.kernel.org,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	linux-arm-kernel@lists.infradead.org,
	Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>,
	Jose Abreu <joabreu@synopsys.com>,
	"David S. Miller" <davem@davemloft.net>,
	Johan Hovold <johan@kernel.org>,
	Maxime Ripard <mripard@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Joao Pinto <jpinto@synopsys.com>,
	Vyacheslav Mitrofanov 
	<Vyacheslav.Mitrofanov@baikalelectronics.ru>,
	linux-stm32@st-md-mailman.stormreply.com
Subject: Re: [PATCH 05/25] dt-bindings: net: dwmac: Elaborate stmmaceth/pclk description
Date: Tue, 15 Dec 2020 11:30:39 -0600	[thread overview]
Message-ID: <20201215173039.GA4072051@robh.at.kernel.org> (raw)
In-Reply-To: <20201214091616.13545-6-Sergey.Semin@baikalelectronics.ru>

On Mon, 14 Dec 2020 12:15:55 +0300, Serge Semin wrote:
> Current clocks description doesn't provide a comprehensive notion about
> what "stmmaceth" and "pclk" actually represent from the IP-core manual
> point of view. The bindings file states:
> stmmaceth - "GMAC main clock",
> apb - "Peripheral registers interface clock".
> It isn't that easy to understand what they actually mean especially seeing
> the DW *MAC manual operates with clock definitions like Application,
> System, Host, CSR, Transmit, Receive, etc clocks. Moreover the clocks
> usage in the driver doesn't shade a full light on their essence. What
> inferred from there is that the "stmmaceth" name has been assigned to the
> common clock, which feeds both system and CSR interfaces. But what about
> "apb"? The bindings defines it as the clock for "peripheral registers
> interface". So it's close to the CSR clock in the IP-core manual notation.
> If so then when "apb" clock is specified aside with the "stmmaceth", it
> represents a case when the DW *MAC is synthesized with CSR_SLV_CLK=y
> (separate system and CSR clocks). But even though the "apb" clock is
> requested in the MAC driver, the driver doesn't actually use it as a
> separate CSR clock where the IP-core manual requires. All of that makes me
> thinking that the case of separate system and CSR clocks isn't correctly
> implemented in the driver.
> 
> Let's start with elaborating the clocks description so anyone reading
> the DW *MAC bindings file would understand that "stmmaceth" is the
> system clock and "pclk" is actually the CSR clock. Indeed in accordance
> with sheets depicted in [1]:
> system/application clock can be either of: hclk_i, aclk_i, clk_app_i;
> CSR clock can be either of: hclk_i, aclk_i, clk_app_i, clk_csr_i.
> (Most likely the similar definitions present in the others IP-core
> manuals.) So the CSR clock can be tied to the application clock
> considering the later as the main clock, but not the other way around. In
> case if there is only "stmmaceth" clock specified in a DT node, then it
> will be considered as a source of clocks for both application and CSR. But
> if "pclk" is also specified in the list of the device clocks, then it will
> be perceived as the separate CSR clock.
> 
> [1] DesignWare Cores Ethernet MAC Universal Databook, Revision 3.73a,
>     October 2013, p. 564.
> 
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> ---
>  .../devicetree/bindings/net/snps,dwmac.yaml          | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 

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

  reply	other threads:[~2020-12-15 17:31 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14  9:15 [PATCH 00/25] net: stmmac: Fix clocks/reset-related procedures Serge Semin
2020-12-14  9:15 ` Serge Semin
2020-12-14  9:15 ` [PATCH 01/25] dt-bindings: net: dwmac: Validate PBL for all IP-cores Serge Semin
2020-12-14  9:15   ` Serge Semin
2020-12-15 17:14   ` Rob Herring
2020-12-15 17:14     ` Rob Herring
2020-12-14  9:15 ` [PATCH 02/25] dt-bindings: net: dwmac: Extend number of PBL values Serge Semin
2020-12-14  9:15   ` Serge Semin
2020-12-15 17:14   ` Rob Herring
2020-12-15 17:14     ` Rob Herring
2020-12-14  9:15 ` [PATCH 03/25] dt-bindings: net: dwmac: Fix the TSO property declaration Serge Semin
2020-12-14  9:15   ` Serge Semin
2020-12-15 17:22   ` Rob Herring
2020-12-15 17:22     ` Rob Herring
2020-12-16  8:59     ` Serge Semin
2020-12-16  8:59       ` Serge Semin
2020-12-14  9:15 ` [PATCH 04/25] dt-bindings: net: dwmac: Refactor snps, *-config properties Serge Semin
2020-12-14  9:15   ` [PATCH 04/25] dt-bindings: net: dwmac: Refactor snps,*-config properties Serge Semin
2020-12-14 14:30   ` Rob Herring
2020-12-14 14:30     ` Rob Herring
2020-12-15  8:54     ` Serge Semin
2020-12-15  8:54       ` Serge Semin
2020-12-15 14:08       ` [PATCH 04/25] dt-bindings: net: dwmac: Refactor snps, *-config properties Rob Herring
2020-12-15 14:08         ` [PATCH 04/25] dt-bindings: net: dwmac: Refactor snps,*-config properties Rob Herring
2020-12-16  6:24         ` Serge Semin
2020-12-16  6:24           ` Serge Semin
2020-12-14  9:15 ` [PATCH 05/25] dt-bindings: net: dwmac: Elaborate stmmaceth/pclk description Serge Semin
2020-12-14  9:15   ` Serge Semin
2020-12-15 17:30   ` Rob Herring [this message]
2020-12-15 17:30     ` Rob Herring
2020-12-14  9:15 ` [PATCH 06/25] dt-bindings: net: dwmac: Add Tx/Rx clock sources Serge Semin
2020-12-14  9:15   ` Serge Semin
2020-12-15 17:32   ` Rob Herring
2020-12-15 17:32     ` Rob Herring
2020-12-16  6:02     ` Serge Semin
2020-12-16  6:02       ` Serge Semin
2020-12-15 17:32   ` Rob Herring
2020-12-15 17:32     ` Rob Herring
2020-12-14  9:15 ` [PATCH 07/25] dt-bindings: net: dwmac: Detach Generic DW MAC bindings Serge Semin
2020-12-14  9:15   ` Serge Semin
2020-12-15 17:50   ` Rob Herring
2020-12-15 17:50     ` Rob Herring
2020-12-16  9:10     ` Serge Semin
2020-12-16  9:10       ` Serge Semin
2020-12-14  9:15 ` [PATCH 08/25] net: stmmac: Add snps,*-config sub-nodes support Serge Semin
2020-12-14  9:15   ` Serge Semin
2020-12-14  9:15 ` [PATCH 09/25] net: stmmac: dwmac-rk: Cleanup STMMAC DT-config in remove cb Serge Semin
2020-12-14  9:15   ` Serge Semin
2020-12-14  9:16 ` [PATCH 10/25] net: stmmac: dwmac-sti: " Serge Semin
2020-12-14  9:16   ` Serge Semin
2020-12-14  9:16 ` [PATCH 11/25] net: stmmac: dwmac-stm32: " Serge Semin
2020-12-14  9:16   ` Serge Semin
2020-12-14  9:16 ` [PATCH 12/25] net: stmmac: Directly call reverse methods in stmmac_probe_config_dt() Serge Semin
2020-12-14  9:16   ` Serge Semin
2020-12-14  9:16 ` [PATCH 13/25] net: stmmac: Fix clocks left enabled on glue-probes failure Serge Semin
2020-12-14  9:16   ` Serge Semin
2020-12-14  9:16 ` [PATCH 14/25] net: stmmac: Use optional clock request method to get stmmaceth Serge Semin
2020-12-14  9:16   ` Serge Semin
2020-12-14  9:16 ` [PATCH 15/25] net: stmmac: Use optional clock request method to get pclk Serge Semin
2020-12-14  9:16   ` Serge Semin
2020-12-14  9:16 ` [PATCH 16/25] net: stmmac: Use optional clock request method to get ptp_clk Serge Semin
2020-12-14  9:16   ` Serge Semin
2020-12-14  9:16 ` [PATCH 17/25] net: stmmac: Use optional reset control API to work with stmmaceth Serge Semin
2020-12-14  9:16   ` Serge Semin
2020-12-14  9:16 ` [PATCH 18/25] net: stmmac: dwc-qos: Cleanup STMMAC platform data clock pointers Serge Semin
2020-12-14  9:16   ` Serge Semin
2020-12-14  9:16 ` [PATCH 19/25] net: stmmac: dwc-qos: Use dev_err_probe() for probe errors handling Serge Semin
2020-12-14  9:16   ` Serge Semin
2020-12-14  9:16 ` [PATCH 20/25] net: stmmac: Add Tx/Rx platform clocks support Serge Semin
2020-12-14  9:16   ` Serge Semin
2020-12-14  9:16 ` [PATCH 21/25] net: stmmac: dwc-qos: Discard Tx/Rx clocks request Serge Semin
2020-12-14  9:16   ` Serge Semin
2020-12-14  9:16 ` [PATCH 22/25] net: stmmac: dwmac-imx: Discard Tx clock request Serge Semin
2020-12-14  9:16   ` Serge Semin
2020-12-14  9:16 ` [PATCH 23/25] net: stmmac: Call stmmaceth clock as system clock in warn-message Serge Semin
2020-12-14  9:16   ` Serge Semin
2020-12-14  9:16 ` [PATCH 24/25] net: stmmac: Use pclk to set MDC clock frequency Serge Semin
2020-12-14  9:16   ` Serge Semin
2020-12-14  9:16 ` [PATCH 25/25] net: stmmac: dwc-qos: Save master/slave clocks in the plat-data Serge Semin
2020-12-14  9:16   ` Serge Semin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201215173039.GA4072051@robh.at.kernel.org \
    --to=robh@kernel.org \
    --cc=Alexey.Malahov@baikalelectronics.ru \
    --cc=Pavel.Parkhomenko@baikalelectronics.ru \
    --cc=Sergey.Semin@baikalelectronics.ru \
    --cc=Vyacheslav.Mitrofanov@baikalelectronics.ru \
    --cc=alexandre.torgue@st.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=fancer.lancer@gmail.com \
    --cc=joabreu@synopsys.com \
    --cc=johan@kernel.org \
    --cc=jpinto@synopsys.com \
    --cc=kuba@kernel.org \
    --cc=larper@axis.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=mripard@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.