From: Biao Huang <biao.huang@mediatek.com>
To: Rob Herring <robh@kernel.org>
Cc: <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Giuseppe Cavallaro <peppe.cavallaro@st.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Jose Abreu <joabreu@synopsys.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
<netdev@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<srv_heupstream@mediatek.com>, <macpaul.lin@mediatek.com>,
<angelogioacchino.delregno@collabora.com>, <dkirjanov@suse.de>
Subject: Re: [PATCH net-next v8 6/6] net: dt-bindings: dwmac: add support for mt8195
Date: Mon, 13 Dec 2021 09:27:47 +0800 [thread overview]
Message-ID: <5cf063709dad8ff57bdfb3fa742f5f784217f353.camel@mediatek.com> (raw)
In-Reply-To: <YbOh4hZfc+QKA/hO@robh.at.kernel.org>
Dear Rob,
Thanks for your comment~
On Fri, 2021-12-10 at 12:52 -0600, Rob Herring wrote:
> On Fri, Dec 10, 2021 at 09:31:29AM +0800, Biao Huang wrote:
> > Add binding document for the ethernet on mt8195.
> >
> > Signed-off-by: Biao Huang <biao.huang@mediatek.com>
> > ---
> > .../bindings/net/mediatek-dwmac.yaml | 86
> > +++++++++++++++----
> > 1 file changed, 70 insertions(+), 16 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/net/mediatek-
> > dwmac.yaml b/Documentation/devicetree/bindings/net/mediatek-
> > dwmac.yaml
> > index 9207266a6e69..fb04166404d8 100644
> > --- a/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml
> > +++ b/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml
> > @@ -19,11 +19,67 @@ select:
> > contains:
> > enum:
> > - mediatek,mt2712-gmac
> > + - mediatek,mt8195-gmac
> > required:
> > - compatible
> >
> > allOf:
> > - $ref: "snps,dwmac.yaml#"
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + enum:
> > + - mediatek,mt2712-gmac
> > +
> > + then:
> > + properties:
> > + clocks:
> > + minItems: 5
> > + items:
> > + - description: AXI clock
> > + - description: APB clock
> > + - description: MAC Main clock
> > + - description: PTP clock
> > + - description: RMII reference clock provided by MAC
> > +
> > + clock-names:
> > + minItems: 5
> > + items:
> > + - const: axi
> > + - const: apb
> > + - const: mac_main
> > + - const: ptp_ref
> > + - const: rmii_internal
> > +
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + enum:
> > + - mediatek,mt8195-gmac
> > +
> > + then:
> > + properties:
> > + clocks:
> > + minItems: 6
> > + items:
> > + - description: AXI clock
> > + - description: APB clock
> > + - description: MAC clock gate
>
> Add new clocks on to the end of existing clocks. That will simplify
> the
> binding as here you will just need 'minItems: 6'.
The "rmii_internal" clock is a special one we put it to the end on
purpose, and will turn it on/off in driver according to whether
phy_mode is rmii or not.
So the "mac_cg" clock, which is new for mt8195, and not used in mt2712,
can't put it to the end for simplicity.
Can we just keep it this way? or other suggestions?
[v3 reply]
http://lists.infradead.org/pipermail/linux-mediatek/2021-November/031951.html
> > + - description: MAC Main clock
> > + - description: PTP clock
> > + - description: RMII reference clock provided by MAC
> > +
> > + clock-names:
> > + minItems: 6
> > + items:
> > + - const: axi
> > + - const: apb
> > + - const: mac_cg
> > + - const: mac_main
> > + - const: ptp_ref
> > + - const: rmii_internal
> >
> > properties:
> > compatible:
> > @@ -32,22 +88,10 @@ properties:
> > - enum:
> > - mediatek,mt2712-gmac
> > - const: snps,dwmac-4.20a
> > -
> > - clocks:
> > - items:
> > - - description: AXI clock
> > - - description: APB clock
> > - - description: MAC Main clock
> > - - description: PTP clock
> > - - description: RMII reference clock provided by MAC
> > -
> > - clock-names:
> > - items:
> > - - const: axi
> > - - const: apb
> > - - const: mac_main
> > - - const: ptp_ref
> > - - const: rmii_internal
> > + - items:
> > + - enum:
> > + - mediatek,mt8195-gmac
> > + - const: snps,dwmac-5.10a
> >
> > mediatek,pericfg:
> > $ref: /schemas/types.yaml#/definitions/phandle
> > @@ -62,6 +106,8 @@ properties:
> > or will round down. Range 0~31*170.
> > For MT2712 RMII/MII interface, Allowed value need to be a
> > multiple of 550,
> > or will round down. Range 0~31*550.
> > + For MT8195 RGMII/RMII/MII interface, Allowed value need to
> > be a multiple of 290,
> > + or will round down. Range 0~31*290.
> >
> > mediatek,rx-delay-ps:
> > description:
> > @@ -70,6 +116,8 @@ properties:
> > or will round down. Range 0~31*170.
> > For MT2712 RMII/MII interface, Allowed value need to be a
> > multiple of 550,
> > or will round down. Range 0~31*550.
> > + For MT8195 RGMII/RMII/MII interface, Allowed value need to
> > be a multiple
> > + of 290, or will round down. Range 0~31*290.
> >
> > mediatek,rmii-rxc:
> > type: boolean
> > @@ -103,6 +151,12 @@ properties:
> > 3. the inside clock, which be sent to MAC, will be inversed
> > in RMII case when
> > the reference clock is from MAC.
> >
> > + mediatek,mac-wol:
> > + type: boolean
> > + description:
> > + If present, indicates that MAC supports WOL(Wake-On-LAN),
> > and MAC WOL will be enabled.
> > + Otherwise, PHY WOL is perferred.
> > +
> > required:
> > - compatible
> > - reg
> > --
> > 2.25.1
> >
> >
prev parent reply other threads:[~2021-12-13 1:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-10 1:31 [PATCH net-next v8 0/6] MediaTek Ethernet Patches on MT8195 Biao Huang
2021-12-10 1:31 ` [PATCH net-next v8 1/6] stmmac: dwmac-mediatek: add platform level clocks management Biao Huang
2021-12-10 1:31 ` [PATCH net-next v8 2/6] stmmac: dwmac-mediatek: Reuse more common features Biao Huang
2021-12-10 1:31 ` [PATCH net-next v8 3/6] arm64: dts: mt2712: update ethernet device node Biao Huang
2021-12-15 19:20 ` Matthias Brugger
2021-12-16 9:19 ` Biao Huang
2021-12-15 19:22 ` Matthias Brugger
2021-12-16 1:28 ` Biao Huang
2021-12-10 1:31 ` [PATCH net-next v8 4/6] net: dt-bindings: dwmac: Convert mediatek-dwmac to DT schema Biao Huang
2021-12-10 14:02 ` Rob Herring
2021-12-10 18:49 ` Rob Herring
2021-12-13 1:34 ` Biao Huang
2021-12-10 1:31 ` [PATCH net-next v8 5/6] stmmac: dwmac-mediatek: add support for mt8195 Biao Huang
2021-12-10 1:31 ` [PATCH net-next v8 6/6] net: dt-bindings: dwmac: " Biao Huang
2021-12-10 14:02 ` Rob Herring
2021-12-10 18:52 ` Rob Herring
2021-12-13 1:27 ` Biao Huang [this message]
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=5cf063709dad8ff57bdfb3fa742f5f784217f353.camel@mediatek.com \
--to=biao.huang@mediatek.com \
--cc=alexandre.torgue@foss.st.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=dkirjanov@suse.de \
--cc=joabreu@synopsys.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=macpaul.lin@mediatek.com \
--cc=matthias.bgg@gmail.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
--cc=robh@kernel.org \
--cc=srv_heupstream@mediatek.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®