From: Andrew Lunn <andrew@lunn.ch>
To: Ante Knezic <ante.knezic@helmholz.de>
Cc: netdev@vger.kernel.org, woojung.huh@microchip.com,
f.fainelli@gmail.com, olteanv@gmail.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
conor+dt@kernel.org, marex@denx.de, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, UNGLinuxDriver@microchip.com
Subject: Re: [PATCH net-next v3 2/2] net:dsa:microchip: add property to select internal RMII reference clock
Date: Wed, 18 Oct 2023 15:52:27 +0200 [thread overview]
Message-ID: <92a18413-fa28-4420-88f8-e7dedaa8c45e@lunn.ch> (raw)
In-Reply-To: <893a3ad19b28c6bb1bf5ea18dee2fa5855f0c207.1697620929.git.ante.knezic@helmholz.de>
On Wed, Oct 18, 2023 at 11:24:14AM +0200, Ante Knezic wrote:
> Microchip KSZ8863/KSZ8873 have the ability to select between internal
> and external RMII reference clock. By default, reference clock
> needs to be provided via REFCLKI_3 pin. If required, device can be
> setup to provide RMII clock internally so that REFCLKI_3 pin can be
> left unconnected.
> Add a new "microchip,rmii-clk-internal" property which will set
> RMII clock reference to internal. If property is not set, reference
> clock needs to be provided externally.
>
> Signed-off-by: Ante Knezic <ante.knezic@helmholz.de>
> ---
> drivers/net/dsa/microchip/ksz8795.c | 10 +++++++++-
> drivers/net/dsa/microchip/ksz8795_reg.h | 3 +++
> drivers/net/dsa/microchip/ksz_common.h | 1 +
> 3 files changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/dsa/microchip/ksz8795.c b/drivers/net/dsa/microchip/ksz8795.c
> index 91aba470fb2f..b50ad9552c65 100644
> --- a/drivers/net/dsa/microchip/ksz8795.c
> +++ b/drivers/net/dsa/microchip/ksz8795.c
> @@ -1312,8 +1312,16 @@ void ksz8_port_setup(struct ksz_device *dev, int port, bool cpu_port)
> ksz_port_cfg(dev, port, P_PRIO_CTRL, PORT_802_1P_ENABLE, true);
>
> if (cpu_port) {
> - if (!ksz_is_ksz88x3(dev))
> + if (!ksz_is_ksz88x3(dev)) {
> ksz8795_cpu_interface_select(dev, port);
> + } else {
> + dev->rmii_clk_internal = of_property_read_bool(dev->dev->of_node,
> + "microchip,rmii-clk-internal");
> +
> + ksz_cfg(dev, KSZ88X3_REG_FVID_AND_HOST_MODE,
> + KSZ88X3_PORT3_RMII_CLK_INTERNAL,
> + dev->rmii_clk_internal);
> + }
It looks like this is the only use of dev->rmii_clk_internal? So does
it actually need to be a member of ksz_device?
Andrew
next prev parent reply other threads:[~2023-10-18 13:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-18 9:24 [PATCH net-next v3 0/2] net: dsa: microchip: enable setting rmii reference Ante Knezic
2023-10-18 9:24 ` [PATCH net-next v3 1/2] dt-bindings: net: microchip,ksz: document microchip,rmii-clk-internal Ante Knezic
2023-10-18 9:24 ` [PATCH net-next v3 2/2] net:dsa:microchip: add property to select internal RMII reference clock Ante Knezic
2023-10-18 13:52 ` Andrew Lunn [this message]
2023-10-18 14:06 ` [PATCH net-next v3 2/2] net:dsa:microchip: add property to select Ante Knezic
2023-10-18 14:09 ` Andrew Lunn
2023-10-19 16:54 ` [PATCH net-next v3 2/2] net:dsa:microchip: add property to select internal RMII reference clock Vladimir Oltean
2023-10-20 8:46 ` [PATCH net-next v3 2/2] net:dsa:microchip: add property to select Ante Knezic
2023-10-20 9:27 ` Vladimir Oltean
2023-10-20 10:00 ` Vladimir Oltean
2023-10-20 10:26 ` Vladimir Oltean
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=92a18413-fa28-4420-88f8-e7dedaa8c45e@lunn.ch \
--to=andrew@lunn.ch \
--cc=UNGLinuxDriver@microchip.com \
--cc=ante.knezic@helmholz.de \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marex@denx.de \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=robh+dt@kernel.org \
--cc=woojung.huh@microchip.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®