[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231023085750.8537-1-ante.knezic@helmholz.de>
Date: Mon, 23 Oct 2023 10:57:50 +0200
From: Ante Knezic <ante.knezic@...mholz.de>
To: <o.rempel@...gutronix.de>
CC: <UNGLinuxDriver@...rochip.com>, <andrew@...n.ch>,
<ante.knezic@...mholz.de>, <conor+dt@...nel.org>, <davem@...emloft.net>,
<devicetree@...r.kernel.org>, <edumazet@...gle.com>, <f.fainelli@...il.com>,
<krzysztof.kozlowski+dt@...aro.org>, <kuba@...nel.org>,
<linux-kernel@...r.kernel.org>, <marex@...x.de>, <netdev@...r.kernel.org>,
<olteanv@...il.com>, <pabeni@...hat.com>, <robh+dt@...nel.org>,
<woojung.huh@...rochip.com>
Subject: Re: [PATCH net-next v4 2/2] net:dsa:microchip: add property to select
On Mon, 23 Oct 2023 10:41:50 +0200, Oleksij Rempel wrote:
> Here is KSZ8873 as initial reference:
> https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/DataSheets/00002348A.pdf
> 3.3.9 RMII INTERFACE OPERATION:
> "When EN_REFCLKO_3 is high, KSZ8873RLL will output a 50 MHz in REFCLKO_3.
> Register 198 bit[3] is used to select internal or external reference
> clock. Internal reference clock means that the clock for the RMII of
> KSZ8873RLL will be provided by the KSZ8873RLL internally and the
> REFCLKI_3 pin is unconnected. For the external reference clock, the
> clock will provide to KSZ8873RLL via REFCLKI_3."
>
> KSZ9897:
> http://ww1.microchip.com/downloads/en/DeviceDoc/00002330B.pdf
> 4.11.2 REDUCED MEDIA INDEPENDENT INTERFACE (RMII)
The upper paragraph refers to the case when switch is acting as a clock
provider (regardless whether its set as internal or external reference
clock). You can see this if you look at the next paragraph:
"If KSZ8863RLL does not provide the reference clock, this 50 MHz reference
clock with divide-by-2 (25 MHz) has to be used in X1 pin instead of the
25 MHz crystal, since the ..."
So rmii-clk-internal property does not select whether switch is acting
as a clock provider or clock consumer which is what you are refering to
I believe? The clock provider/consumer is set via strapping pins.
Real case scenario: I have a board where switch is acting as a clock
provider, generating output to REFCLKO pin and feeding it to uC.
This board does not have externally routed copper track from REFCLKO
to REFCLKI, thus making the RMII interface not operable, unless the
rmii-clk-internal bit is set.
If this bit is not set, only way to make it running is to solder a
jumper wire from REFCLKO to REFCLKI.
Powered by blists - more mailing lists