Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88C2CC433EF for ; Fri, 10 Dec 2021 01:31:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235554AbhLJBfW (ORCPT ); Thu, 9 Dec 2021 20:35:22 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:57594 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S235417AbhLJBfP (ORCPT ); Thu, 9 Dec 2021 20:35:15 -0500 X-UUID: 462e05f69d384d0ebb2827ec8467352e-20211210 X-UUID: 462e05f69d384d0ebb2827ec8467352e-20211210 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1063278691; Fri, 10 Dec 2021 09:31:39 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Fri, 10 Dec 2021 09:31:37 +0800 Received: from mhfsdcap04.gcn.mediatek.inc (10.17.3.154) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 10 Dec 2021 09:31:36 +0800 From: Biao Huang To: , Jakub Kicinski , Rob Herring CC: Matthias Brugger , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Biao Huang , , , , , , , , , , Subject: [PATCH net-next v8 6/6] net: dt-bindings: dwmac: add support for mt8195 Date: Fri, 10 Dec 2021 09:31:29 +0800 Message-ID: <20211210013129.811-7-biao.huang@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211210013129.811-1-biao.huang@mediatek.com> References: <20211210013129.811-1-biao.huang@mediatek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add binding document for the ethernet on mt8195. Signed-off-by: Biao Huang --- .../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 + - 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