Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp999174rdb; Fri, 16 Feb 2024 02:03:07 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUMWt87T0hXFjM1dDfiIF4CLl8qptNtGOnmlzDVwgCNKBwYI4+/7etiddqCv+ZpMV75wEv2msLdLT3dyvwxs3VuOA9FWXAxJHRwEjJyTQ== X-Google-Smtp-Source: AGHT+IGkyYT4Iz702P3vhP7d9DjdIrmGHHkkB/+X3sN/aJtsf0glAIST9xa1sa/N1x79eZ1zur1l X-Received: by 2002:a05:6402:1356:b0:55f:a7d6:fd61 with SMTP id y22-20020a056402135600b0055fa7d6fd61mr2906473edw.26.1708077787762; Fri, 16 Feb 2024 02:03:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708077787; cv=pass; d=google.com; s=arc-20160816; b=ktJDY6vFi4ziIebmrvjR1B/zrmlyOQqBh1EJOoVlxEzYirsJD+YVfxBxEELBat/77H uRZyMiMzHho/sah7Mfk1tb/2J6PiCEXXj68E/HEm9MtHxtgIJX+yZvTTaBy3jfBZkZSg yQILXSv8ed8NuYHdwv6YYPQ0TDxCjZ0WReNUHfPQOmiu9FUBy9k77mQ1pGhINFKrVBM2 1sQPqNoz0MnW+CzHRA5EMOxHz2fQp0es1wstawGu+lgRF6OO/9M1qXcuS3CjgaYgTPzj 2cLcRPkTV1rsvrAeLs8+lEoYvE2bAVqFZSvBsBKfzbsTnjrQHcF7Ae4HWLFGd81zAN1B CWDQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=w2Ka/b4PZl0JnVFWWi3g4U8zXdCaRt204kSjckd38CM=; fh=YUyCOKAW57vGpD9UsAB1Jf96lQXTx0J/i1SlBxoko4U=; b=YBckZN0f/KgPa7BHNVpqQ47PVP4LnATAxsL6A/eRc8XJRa8IWh8Rtbb/85gYh7xRyH 88aY9EGpaipZV5pm7CU7p5iFvBRNA7TBvUKg6qM/QDQ8tB7eVzYsHKxARpuuhqTEdlCn I7PSNb8RIKNoMetiLtGLDk6VbguuYyOQJ8h8xQR8YV5jAdU7uc92xHP9gWReheKecZ8f 5GsheFp1+1C4Xnqc9ZvzlJD+HJrrHdplxP0U5le4xFpm3f4fpCg81HHa3OZ9o1lrNn9L Mg4KostLqtH94aQY7F/D6gb8zHrMO8Sv6UwiXOnXMrBSUj2+S5gEw6obk5VsgZrsgZ85 Hrbg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RU3vdtDB; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-68403-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68403-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id q24-20020a50cc98000000b005617cd89a86si1516693edi.511.2024.02.16.02.03.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 02:03:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68403-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RU3vdtDB; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-68403-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68403-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2E1FC1F2165B for ; Fri, 16 Feb 2024 10:03:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 975881D55C; Fri, 16 Feb 2024 10:02:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RU3vdtDB" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F42E1C69E; Fri, 16 Feb 2024 10:02:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708077722; cv=none; b=s/hbyCDYo/twAS3gicZkF0gzJCiFKf3QLDsIKD4ea1c4dXuNV+GbqBS1K71JEhuaJaT2fxdW5wJFwcbuDLzRC2dGq6dimEZ6iIiumGN5A4Zd2BeRbYzA756aw9WVfowpuZ+qaXntcGOPm/WsSmR76x3W4swpb/6wpqCo8HHhHW0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708077722; c=relaxed/simple; bh=0stQuGcT85v7JeX1LSOyAgNGs9Jh5DtcOA5xYdFk0tQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QqHT6QD+iRD5SVUjdGwOMlOsVpZ059qqECNkqbcIv6ermGnwMEKvkKkdUjG9kLE6LRWme2Wwj5o7ZSp/7iV7Q3EoMW84PWy0+O6gVoi1IXVBvUE31/P3HDLZ1pBa7zuuPdBCUeuqm16/hZhpR8jK6GWsGhDXUCtQ0WSjixZocMk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RU3vdtDB; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 2A239C433A6; Fri, 16 Feb 2024 10:02:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708077722; bh=0stQuGcT85v7JeX1LSOyAgNGs9Jh5DtcOA5xYdFk0tQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=RU3vdtDBSkRXpzqi6XZZaNaaPHMAx4ENgUwU1msCrBgSDIuRLI4EbAwAbyWol5oJ+ JtP1EU1pW+9weuSKv3GFa8UYNvC4jm1KZlclPLNdaO5UO1dgDK1QGMiOr8H1mK7ivy nRyuK64DyVf/kZyzu+m13meMr0a4FQpM4hn3qFM1rxDs9sS2GSZNo+S1OGxfU7PCBm 0rhxM6JWugiC0w+aRdXhlXxX2Ad6IXJUHRcbNV/nhEKjsUyop0keQo9Fv0wcxrRdZ7 y85pS3dABwBrf8mmdGft3QOoWoZ2v1nyQ7WD9JVdv2hSVgswDVZNWK3s8HOL4vQHB7 u6HKsDIvq3pvw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11D71C48BF0; Fri, 16 Feb 2024 10:02:02 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Fri, 16 Feb 2024 18:02:03 +0800 Subject: [PATCH v2 4/6] dt-bindings: net: add hisilicon,hisi-femac Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240216-net-v2-4-89bd4b7065c2@outlook.com> References: <20240216-net-v2-0-89bd4b7065c2@outlook.com> In-Reply-To: <20240216-net-v2-0-89bd4b7065c2@outlook.com> To: Yisen Zhuang , Salil Mehta , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Yang Xiwen , Andrew Lunn , Heiner Kallweit , Russell King Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Yang Xiwen X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708077720; l=3765; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=rxjP6dkuiPPvZpkojXowwmQaRdX/I+kV6qPQIGtUIm8=; b=waJELSdVoE5bPPfyM3G5x7yCB2sI1SQW9/jT76++yg+icDG26+ojnZxCQxVtAJ8y0sNf0ujx4 DdvfXXQT311BYxnjLNMpSLtxs2Mehkkjf7rLrwcRM3oAGDD/KjfjbTE X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=qOD5jhp891/Xzc+H/PZ8LWVSWE3O/XCQnAg+5vdU2IU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20230724 with auth_id=67 X-Original-From: Yang Xiwen Reply-To: From: Yang Xiwen This binding gets rewritten. Compared to previous txt based binding doc, the following changes are made according to the TRM: - No "hisi-femac-v1/2" binding anymore - Remove unmaintained Hi3516 SoC, add Hi3798MV200 - add MDIO subnode - add ahb bus clock, phy clock and reset Signed-off-by: Yang Xiwen --- .../bindings/net/hisilicon,hisi-femac.yaml | 117 +++++++++++++++++++++ 1 file changed, 117 insertions(+) diff --git a/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml b/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml new file mode 100644 index 000000000000..08158118c9c4 --- /dev/null +++ b/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml @@ -0,0 +1,117 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/hisilicon,hisi-femac.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Hisilicon Fast Ethernet MAC controller + +maintainers: + - Yang Xiwen + +allOf: + - $ref: ethernet-controller.yaml + +properties: + compatible: + items: + - enum: + - hisilicon,hi3798mv200-femac + - const: hisilicon,hisi-femac + + reg: + items: + - description: The first region is the MAC core register base and size. + - description: The second region is the global MAC control register. + + ranges: + maxItems: 1 + + '#address-cells': + const: 1 + + '#size-cells': + const: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 3 + + clock-names: + items: + - const: mac + - const: macif + - const: phy + + resets: + maxItems: 2 + + reset-names: + items: + - const: mac + - const: phy + + hisilicon,phy-reset-delays-us: + items: + - description: The 1st cell is reset pre-delay in micro seconds. + - description: The 2nd cell is reset pulse in micro seconds. + - description: The 3rd cell is reset post-delay in micro seconds. + +patternProperties: + '^mdio@[0-9a-f]+$': + $ref: hisilicon,hisi-femac-mdio.yaml# + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - resets + - reset-names + - phy-connection-type + - phy-handle + - hisilicon,phy-reset-delays-us + +unevaluatedProperties: false + +examples: + - | + #include + #include + + ethernet@9c30000 { + compatible = "hisilicon,hi3798mv200-femac", "hisilicon,hisi-femac"; + reg = <0x9c30000 0x1000>, <0x9c31300 0x200>; + ranges = <0x0 0x9c30000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; + interrupts = ; + clocks = <&crg HISTB_ETH0_MAC_CLK>, + <&crg HISTB_ETH0_MACIF_CLK>, + <&crg 62>; + clock-names = "mac", "macif", "phy"; + resets = <&crg 0xd0 3>, <&crg 0x388 4>; + reset-names = "mac", "phy"; + phy-handle = <&fephy>; + phy-connection-type = "mii"; + // To be filled by bootloader + mac-address = [00 00 00 00 00 00]; + hisilicon,phy-reset-delays-us = <10000 10000 500000>; + status = "okay"; + + mdio@1100 { + compatible = "hisilicon,hisi-femac-mdio"; + reg = <0x1100 0x20>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + ethernet-phy@1 { + reg = <1>; + #phy-cells = <0>; + }; + }; + }; -- 2.43.0