From patchwork Thu Feb 22 12:43:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Xiwen via B4 Relay X-Patchwork-Id: 204747 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:aa16:b0:108:e6aa:91d0 with SMTP id by22csp225156dyb; Thu, 22 Feb 2024 04:46:32 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXjeNU63zJa9F7iYcOnMYzi6lL1PqQ8tDKj+ScRj9BtLNbE2YoLoqC+bBni+YDVmVgcGMUp4fOtB0cJsAISDLw0xYw+1g== X-Google-Smtp-Source: AGHT+IH8wPYH7mOWegQNZ6ZFAFBIhuZAFZxVk+uCW7vH6Nyrv25L3REXj4zvsy1DkM7Q0MA/zBB2 X-Received: by 2002:a05:6e02:219b:b0:363:b615:9d92 with SMTP id j27-20020a056e02219b00b00363b6159d92mr26245208ila.26.1708605992613; Thu, 22 Feb 2024 04:46:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708605992; cv=pass; d=google.com; s=arc-20160816; b=CN7RH8DZuumby6DLkIQNfL3vp9i35N7p1+w1o3gQi85LI2CHVQlx6TYjO+6oGdF2ir 0e4znl0XAbbwL+fjiLiUhGzHJ5SH2LXLhns2riVeZr9L+zCMyopw+L4NXnfuijh7MTy/ gOPDR73zN+fWr9Vh117O8yRxIBkIBndD19gd+o37I0tzkI3VnfENNXrcxTb1jFKVwqjl Po3ytAZw0YlTPWGqIQqkbrvV1hbRcfTHwM3kyVVoMh3gTrWT/JjyisIIpE7FJhzZXFXf YHHkcX4J4U5Ixx7fLHk1rwaLFlovrlsvYshZdhW3iOBCWaNH3xzit+TuBddPuN5oDDdo Jo8A== 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=DpBbeiC5eFlNCaE3fvCijyEZPkSMI8GcrGTY8sQQiX4=; fh=xf53zEEwO8UfwqXA8rNDXb86USgBpvamfpvPadu/NTs=; b=Uql3sN8RJUS54VJLd5aePzQRy/oQr2KgoBKsK3lAqw6+9Urq0PXJ+xQwSsqfyktdcX OSFgj73GHfQdaVsKnUwZd2UIidI5BYsUdoo8uogqo5M2MwTS8lRq99dYE1GmhLCzNfxo vBvif5bXmsHu0y34KjvMm78IVfeUwzdxbsDp83V56kWjpa7Yjud4muA+LoFquqnyg+qZ XFy+OdX8k2J3aE5r05Qc6iPeTVFhroOgKxsxVncYiEwLyIco+ozpgKgWovBTGEy2m8RJ +Wgd3jdvcXcjszM4pnLKPo3Pa+UvLlDoKFW8MshL6mmxKYXqqSXs0d8O3p0V8UVPLjqO /s0g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sFy86V0b; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-76527-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76527-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id l123-20020a632581000000b005dc88c4700dsi10010509pgl.31.2024.02.22.04.46.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 04:46:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76527-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sFy86V0b; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-76527-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76527-ouuuleilei=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C9D09283BE2 for ; Thu, 22 Feb 2024 12:45:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3185214601F; Thu, 22 Feb 2024 12:43:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sFy86V0b" 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 3221912DD82; Thu, 22 Feb 2024 12:43:41 +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=1708605822; cv=none; b=AhTndIaOp4F094K8WoI9rd2OnR/zCxo9UGiObPQZVsnMesiPLdGWibrHaZExNdnns6o+FLnASlv0or6F5pgyTySB0DBBZOjChansKQ9GkMT9rDvMj8WfOEUbzwHeXIK451xFAOW8DgllTWaryS4bFUN3aPqLCDrtb9wGHHPb/ac= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708605822; c=relaxed/simple; bh=dU0HjJgUNo33Wr86FpAaPRHjBCYGelpAaLa0iwZ1osU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=IyqPoFUido0G9qRy3PY0TeNqGz1WqH4SQlKLFTbSOXhwH9089Dy1QMNv3A+lVYieF2wplJ5d9hjBEiNLO2NT2+Ftfbcx9wCcG3C9mLvPKEgbGlPPjE6S4oZamPQ8FGddbg21Z+A8UoXL8phbSApXy352Ss6xg76DBG9GDwJOJMo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sFy86V0b; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id C4E7DC433C7; Thu, 22 Feb 2024 12:43:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708605821; bh=dU0HjJgUNo33Wr86FpAaPRHjBCYGelpAaLa0iwZ1osU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=sFy86V0bmpvV1NpzvFQ50N8T2DTKDhx4tka5nj6Usvyfllp4VKsaEBh5q5FP3gLpD UCOJOL2Mi6bYnj1Ahbex1nvB8bpxxEfhNSTiZjQ+zD1QaCTepL9jmPXRTUbe9XV8IP eHXZvsqPyZlkrQXQZN/d+sR3zqxQY0ESg7OTV8K1lAG7JR2ULp51dhcLTKv+pmgDa9 ChqDuPC2EUgaSjONyFYiBHVhZE5ifmMAYTTo5BDfp2gfgnIiCoYTNbkBUPLrc4dtfn TDxSM15MG6687fUXMJNMhnNDYS2XMaccxsw7Hy0zCJ6gb8mE/NypGFFgHYjsy3jCyG Wt9b4uEtrcbFg== 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 AAEBDC48BF8; Thu, 22 Feb 2024 12:43:41 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Thu, 22 Feb 2024 20:43:21 +0800 Subject: [PATCH net-next v4 1/6] dt-bindings: net: hisilicon-femac-mdio: convert to YAML Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240222-net-v4-1-eea68f93f090@outlook.com> References: <20240222-net-v4-0-eea68f93f090@outlook.com> In-Reply-To: <20240222-net-v4-0-eea68f93f090@outlook.com> To: Yisen Zhuang , Salil Mehta , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , 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=1708605802; l=2707; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=kBNRfWKBQ0id01gl7avKkUC4CeGpm5ZtYlqpv6WG6d8=; b=z8h7WVhMvCqDOAxS7nz/ePDZ0zE/t1zWZkPmj4E2Xmaa5JM686ebtGI5YHp2MZY/Y6wJwYvxI ryr+FCIiwAXB029JDU/DsG37u/5iCqz9IFcxqW2YtUSt1vZKTOAYk3U 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: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791603237589716630 X-GMAIL-MSGID: 1791603237589716630 From: Yang Xiwen For some FEMAC cores, MDIO bus is integrated to the MAC controller. So We don't have a dedicated MDIO bus clock. Also due to the PHY reset procedure, it's required to manage all clocks and resets in the MAC controller driver. MAC controller clock can not be shared with MDIO bus node in dts. Mark the clock optional to resolve this problem. Signed-off-by: Yang Xiwen --- .../bindings/net/hisilicon,hisi-femac-mdio.yaml | 43 ++++++++++++++++++++++ .../bindings/net/hisilicon-femac-mdio.txt | 22 ----------- 2 files changed, 43 insertions(+), 22 deletions(-) diff --git a/Documentation/devicetree/bindings/net/hisilicon,hisi-femac-mdio.yaml b/Documentation/devicetree/bindings/net/hisilicon,hisi-femac-mdio.yaml new file mode 100644 index 000000000000..ee8650ad98fc --- /dev/null +++ b/Documentation/devicetree/bindings/net/hisilicon,hisi-femac-mdio.yaml @@ -0,0 +1,43 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/hisilicon,hisi-femac-mdio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: HiSilicon FEMAC MDIO bus + +maintainers: + - Yang Xiwen + +allOf: + - $ref: mdio.yaml# + +properties: + compatible: + const: hisilicon,hisi-femac-mdio + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + mdio@10091100 { + compatible = "hisilicon,hisi-femac-mdio"; + reg = <0x10091100 0x20>; + clocks = <&clk_mdio>; + #address-cells = <1>; + #size-cells = <0>; + + phy@1 { + reg = <1>; + }; + }; diff --git a/Documentation/devicetree/bindings/net/hisilicon-femac-mdio.txt b/Documentation/devicetree/bindings/net/hisilicon-femac-mdio.txt deleted file mode 100644 index 23a39a309d17..000000000000 --- a/Documentation/devicetree/bindings/net/hisilicon-femac-mdio.txt +++ /dev/null @@ -1,22 +0,0 @@ -Hisilicon Fast Ethernet MDIO Controller interface - -Required properties: -- compatible: should be "hisilicon,hisi-femac-mdio". -- reg: address and length of the register set for the device. -- clocks: A phandle to the reference clock for this device. - -- PHY subnode: inherits from phy binding [1] -[1] Documentation/devicetree/bindings/net/phy.txt - -Example: -mdio: mdio@10091100 { - compatible = "hisilicon,hisi-femac-mdio"; - reg = <0x10091100 0x10>; - clocks = <&crg HI3516CV300_MDIO_CLK>; - #address-cells = <1>; - #size-cells = <0>; - - phy0: phy@1 { - reg = <1>; - }; -};