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>; - }; -}; From patchwork Thu Feb 22 12:43:22 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: 204746 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:aa16:b0:108:e6aa:91d0 with SMTP id by22csp225132dyb; Thu, 22 Feb 2024 04:46:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUFhHcgysQSglPxwuL6+Wobsti+xaCMBogkin7jInrIHG/i28bS2FYbDmBHkx2EknW5bW37nQQryTlyUWkOlvTzcU9tNg== X-Google-Smtp-Source: AGHT+IEuFElv2PXdAcps03GbtkqcbiSjhu82R9d0PgkhqNbPLJLq358ooCJnHS9NpdV9eKcycqsK X-Received: by 2002:a17:90b:1bc6:b0:299:63ff:9c0f with SMTP id oa6-20020a17090b1bc600b0029963ff9c0fmr11030568pjb.21.1708605990379; Thu, 22 Feb 2024 04:46:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708605990; cv=pass; d=google.com; s=arc-20160816; b=t8yCdqIn00MswDlKEq5zo7LASLqIMjEVCVSx+phPv7Wvw0XdX7qeU2npYBhqFy6z+s el0uOO2JLQ/oVr6R9IEoPXuLXHla187bxq9GxJKuAnsZb70E7MxqPcJIPP5IoUR2JF+8 pwj/wdkmeG/wLcy/ijPTV2aFNNRz9b+u5pczlKWRo39QZgQtTVuv3rWvXnFbOs6kEBnX 48zgA9IfjcGs2Dld4CXRLV21fPSfE8jaW9DDD4Rt+PN/omWGigJwZGJJ3cinegj8Czob QzqaH2ewF954J/b/RCbNUsQtUw3Rv2xCz7nIo+dKMNmfwHLWzXQVxbjJD8W5ySsIWA9r cipQ== 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=wZ9zS9nph4jLUuRlfb5y1FcijYDY3O4ndPQcFe2N7eM=; fh=xf53zEEwO8UfwqXA8rNDXb86USgBpvamfpvPadu/NTs=; b=YQYoADa3es2XM5FJnSpj6yrzDopPPR9wRtEe1G8hE8t+h5FIbwir5fSHJdX8PWeUQL vImyR+2sKuaH+8vO7FLUYLTkAX368oBZVndOvU0xiQ4uhAmAuVV1cojsqF9JYDcBSb0L DRhiXAVq73yVPKw/UkE0cPo822g9CWGgIbyik0LC9hCAtwXkzr5NwMwMWRFAJuH09KHl z/MISfYA/xiOB3wfnzJ5GVuKHOvHqTJjyvov+2+07dgGJtolvv9El0dsiwETKuGblU9T LCsNsOvkxMmfzyOjiG/PvH7gFNV799VLlPkVlpwpEtORoNrEZTrFMXDTWynqa5honE5j O3Rw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DZVO5Fte; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-76530-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76530-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 pj6-20020a17090b4f4600b00297160ba34csi10167353pjb.104.2024.02.22.04.46.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 04:46:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76530-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=DZVO5Fte; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-76530-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76530-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 26F0B283952 for ; Thu, 22 Feb 2024 12:45:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0394F145331; 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="DZVO5Fte" 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 3B75D12DD96; Thu, 22 Feb 2024 12:43:42 +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=I1Al92qMxDdFAqG7KFaueKGyU5rJBB+CA70y5VbtZ5QTt2/XpY/q6UsdzVlhfNDCYZsf9QD/OOaPyWUza+NZlw6RxidhUqRSRqcwk5tpAy18ffMu1ihiVg0UYQ5kx1aHIVue2awRAICTSRZj8WkNQT1WpZUv7zo+ijgynD9G4D0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708605822; c=relaxed/simple; bh=V1KomR4EYfJ5rWH5vbpqFhkkFyp2l4Yik0iVHegn1sc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=apMMy8djqxhy2h5P4R9VQvcD/78QL7R9UxWOi1Ea3RV4ktg2OaO+57022mcEtfe+/6O+rCIozVB//zATv4hoRSCjaKDUqiJE8tAL8gzgPnP+tRmUOwTNhhckq/q31tvmxUFOrAQEhfW4qWOXDzaYQTV1TmaBdXNCZqKz+ClkgfA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DZVO5Fte; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id DE46AC433B1; 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=V1KomR4EYfJ5rWH5vbpqFhkkFyp2l4Yik0iVHegn1sc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=DZVO5FteyniSEsuQFid7EvprD5it4sZV7nS0TgN7Ss3ZtkgFK2yI/e9GP76Ad/Aja S/uMbLeIm6JEc04UCzQEwRiEtGgsrntV+CVGeFWBNuzrvp20iGb1bF0OxWrKQy+2CB VFhVTnzi6l6pR4mI8oUj0Wa4ILwCG1NhAmKhvWspmbkzQHUIjOKjqD5MxMv4JE1yVM QGU4QLNdEH94NTkRAxzQO1qAIf6A5MuKLWggHi48FuAiONFmYsbzEgGioxgVaXM0au eUVk4weMiYCqCkPQHSlnm+3sYgmxXuoK4c6RuQg20T3EGHq0549ULUbOmJm/KfrCJl BbeoJzPax7CyQ== 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 BFB88C54798; Thu, 22 Feb 2024 12:43:41 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Thu, 22 Feb 2024 20:43:22 +0800 Subject: [PATCH net-next v4 2/6] net: mdio: hisi-femac: make clock optional 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-2-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=720; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=RxVNNMcUcOL8zwGYeNVp22tshMMwMwhDPBBRMx/bOA4=; b=1c9dFQmaUoe8pYc+8UA7JNdtR9Upmnvh5R0mJamXsLrTU2F9PMlNqiN/8AASZ0TCUfB2qU/v7 j5ea6kccwz4AWFpQwwgxagmjlSrEfvdLJNm83pqxOHOEnqqC2iUFLNU 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: 1791603234933279557 X-GMAIL-MSGID: 1791603234933279557 From: Yang Xiwen The clocks are optional. Signed-off-by: Yang Xiwen --- drivers/net/mdio/mdio-hisi-femac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mdio/mdio-hisi-femac.c b/drivers/net/mdio/mdio-hisi-femac.c index 6703f626ee83..a2620b200381 100644 --- a/drivers/net/mdio/mdio-hisi-femac.c +++ b/drivers/net/mdio/mdio-hisi-femac.c @@ -93,7 +93,7 @@ static int hisi_femac_mdio_probe(struct platform_device *pdev) goto err_out_free_mdiobus; } - data->clk = devm_clk_get(&pdev->dev, NULL); + data->clk = devm_clk_get_optional(&pdev->dev, NULL); if (IS_ERR(data->clk)) { ret = PTR_ERR(data->clk); goto err_out_free_mdiobus; From patchwork Thu Feb 22 12:43:23 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: 204744 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:aa16:b0:108:e6aa:91d0 with SMTP id by22csp224984dyb; Thu, 22 Feb 2024 04:46:10 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUVKA6KsnMHbrGzj5CYQDUl7XNg5bcDj+8dorTiKTyZmxu/qj1ysaHpzWE78lNbHRMbtDETqA3ISRJUh7WS5bZLPIAHIg== X-Google-Smtp-Source: AGHT+IFideec6w4gUa6BWvUxrvpfzHlW6NX+gVLwQLW7yecISCS/j8oaibKHXzjdgCO6358NchfP X-Received: by 2002:a0c:e0cf:0:b0:68f:601b:9001 with SMTP id x15-20020a0ce0cf000000b0068f601b9001mr4272021qvk.23.1708605969911; Thu, 22 Feb 2024 04:46:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708605969; cv=pass; d=google.com; s=arc-20160816; b=ODvXcy60Pv8VLbtRjmMz14FYxuKqOvH1+f0m6+2ePx4vAwdnp3589nRnaX4LoxkqPs nZ+AD7pSEOkrkVCYty2iSon5Xlnjt5ycS+Hdfdp3c6GEnKacVrJO0MVqjjysEJ1YMlQx IoPqSZt7lYSRt4w3/ngUw9g/cWaT1cvWJ4qhDcGq+EWXEa01eJy0VJIy0lC4eagCgKjc g8ncrW2sfLCFf7JLc/jrfyH/M78qRXY4cH8E/4yap/hUFgNWslalP+EZcfUdsglrL+oY Fu/snCC3CTIsxyBno7+cvlMvIMfkOitsJuli4H9nZtKVad1HgUxB3jEE/RD/r2zXwfdW k7XA== 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=4IuqJT6Ds6MLb+nSGTU+/ReupU77yHufwKzpchdQyjM=; fh=xf53zEEwO8UfwqXA8rNDXb86USgBpvamfpvPadu/NTs=; b=St7RkhtAVhWM+0IaF9I810ScaI4MSl4gwXd6r4ok6rwHQFb1LIB9gFl6yWHg2eUO5B u9QfsP/hLZfXHm4wgrHjuHshpvOrnXEQRhCiELdY5niIvfPEw2LRC2Bys1jKnBuOJk9g pJNyarQf9BjtaDOs8+oGAry3bIly5HqtBslPZK/QmV3KRfQQEfp1eJhArNWrY6++l4ix hQ+tyxSATfSliZt0Sit1gK9ghMTlDL4EuWb0/ce5hrqwFsbmmXb9A0fR5VbZpOhSifSm NIL1nElMYeiM96jhipOGY6NrCtzQDaWNh2req9T1S4HKxQ6GpyiqR4TcLkTevcPEBxoM hsiA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lYGGSCmK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-76531-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76531-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id jk8-20020ad45d48000000b0068ce704bed7si12258622qvb.522.2024.02.22.04.46.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 04:46:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76531-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lYGGSCmK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-76531-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76531-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id BF0351C24A7B for ; Thu, 22 Feb 2024 12:45:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F45F14600E; 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="lYGGSCmK" 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 3B79E12DD97; Thu, 22 Feb 2024 12:43:42 +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=oVuHFugnh5Ki06hWzkY3mXKWk8m2W/ulPdKBTvO74K1/tMi3H5w/1LS492Q7OtJ28VhdKVAMrbhL9N6747QXsOmPKIzROTGS63ZlirmJPitaaJtIXSyEmUg54ghmtAKOG3SrJKjlCaAUMUEeD4no4HpXzESoqY/vwS7oX4orxAM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708605822; c=relaxed/simple; bh=q5PGMNCy5OeIZklkcuyegUf5HBFFBndhdfq9OggdzzY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bELwdUPeLS7A7STIphBulKKAuVwLQo9B2ffLg4AxBA4/cVkBjoC2v1e2onh0WjCZnIdyb77uFOalkHD4ghCUqdR3x1scAkOpIBJW6mVu79SiE10L/+RAPqvvVKAjI+NqFkRbvaS1YQ2Xqd4JqKL833t2IuN/Z0Qlad5xklVYwwo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lYGGSCmK; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id E9C6EC433B2; 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=1708605822; bh=q5PGMNCy5OeIZklkcuyegUf5HBFFBndhdfq9OggdzzY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=lYGGSCmK2w4N4FxdKWYSa97jl2O8GQ/vav0QIGTddqFmZfIpSRpTv5LomvUr3x9aX b5xy3Fjh+tBX1KXN1F9hayGCsPsMe4ygp7LL5ccyhYm3UXPiu2t+0ucTZhxl5G6WsQ x+53bPifYkHcEFXkBFTgtLKfbbfE88GXGFgL63WnuhuqjeMs23kP6KvzBJeJqHw0jB OUDKGNbj+/83993zsgiVm5Q1xnf7mra7BZJXPPJUtJBM5bZ9Gx0o58QfNRbjBqVg0G gqqkUOU0z5uvpJvdlHXxIBFniWBp9vT4fvrwoBMaXkYaznhyhAvvEeoELiC1sWdHAM cA3aFNm35+QtA== 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 CB96BC54788; Thu, 22 Feb 2024 12:43:41 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Thu, 22 Feb 2024 20:43:23 +0800 Subject: [PATCH net-next v4 3/6] dt-bindings: net: remove outdated hisilicon-femac 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-3-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=2357; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=8ICAnSLBv8dPhcTYWVHR0AJKAQbZebLk5c3PYvX8hqQ=; b=5TXGKPCxCKZJE9vi91I/BFRQmlRjtAazNf/GxA2ymReFPMiV583iXm+mMFxYGKFRgwZv77Ojd 4E43/yz6COxAjwaaOvCaSlyAWiPHpc6DlxMfpzXjIlv40JqSuHA3nOL 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: 1791603213295357441 X-GMAIL-MSGID: 1791603213295357441 From: Yang Xiwen The user documented(Hi3516) is not found in current kernel anymore. And it seems this SoC has been EOL for a long time. While at it, Remove this binding entirely due to recent driver changes. Signed-off-by: Yang Xiwen --- .../devicetree/bindings/net/hisilicon-femac.txt | 41 ---------------------- 1 file changed, 41 deletions(-) diff --git a/Documentation/devicetree/bindings/net/hisilicon-femac.txt b/Documentation/devicetree/bindings/net/hisilicon-femac.txt deleted file mode 100644 index 5f96976f3cea..000000000000 --- a/Documentation/devicetree/bindings/net/hisilicon-femac.txt +++ /dev/null @@ -1,41 +0,0 @@ -Hisilicon Fast Ethernet MAC controller - -Required properties: -- compatible: should contain one of the following version strings: - * "hisilicon,hisi-femac-v1" - * "hisilicon,hisi-femac-v2" - and the soc string "hisilicon,hi3516cv300-femac". -- reg: specifies base physical address(s) and size of the device registers. - The first region is the MAC core register base and size. - The second region is the global MAC control register. -- interrupts: should contain the MAC interrupt. -- clocks: A phandle to the MAC main clock. -- resets: should contain the phandle to the MAC reset signal(required) and - the PHY reset signal(optional). -- reset-names: should contain the reset signal name "mac"(required) - and "phy"(optional). -- phy-mode: see ethernet.txt [1]. -- phy-handle: see ethernet.txt [1]. -- hisilicon,phy-reset-delays-us: triplet of delays if PHY reset signal given. - The 1st cell is reset pre-delay in micro seconds. - The 2nd cell is reset pulse in micro seconds. - The 3rd cell is reset post-delay in micro seconds. - -The MAC address will be determined using the optional properties -defined in ethernet.txt[1]. - -[1] Documentation/devicetree/bindings/net/ethernet.txt - -Example: - hisi_femac: ethernet@10090000 { - compatible = "hisilicon,hi3516cv300-femac","hisilicon,hisi-femac-v2"; - reg = <0x10090000 0x1000>,<0x10091300 0x200>; - interrupts = <12>; - clocks = <&crg HI3518EV200_ETH_CLK>; - resets = <&crg 0xec 0>,<&crg 0xec 3>; - reset-names = "mac","phy"; - mac-address = [00 00 00 00 00 00]; - phy-mode = "mii"; - phy-handle = <&phy0>; - hisilicon,phy-reset-delays-us = <10000 20000 20000>; - }; From patchwork Thu Feb 22 12:43:24 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: 204745 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:aa16:b0:108:e6aa:91d0 with SMTP id by22csp225005dyb; Thu, 22 Feb 2024 04:46:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUVjl1AJ1JDvcotkNU67+oVYQ9vExZlCaWaqlF5ZZ86lWI9lGEqqwOM/8QIFar1OoHKdtwDDUbzGRKJoj6f5YN9Hx9ueQ== X-Google-Smtp-Source: AGHT+IFHJYI8ADU+lJK+RHtTHW5AGCkJRbPhXiDApSYytjDcjconv8Q9bTQsfLSN6TuvdDxykQD/ X-Received: by 2002:a05:620a:167c:b0:787:1fb5:7e61 with SMTP id d28-20020a05620a167c00b007871fb57e61mr23154415qko.46.1708605972355; Thu, 22 Feb 2024 04:46:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708605972; cv=pass; d=google.com; s=arc-20160816; b=YczwgLFkNjiWLLYyQpHLnlzwVuSmSO2vMaOCo/EYrWGio0eZMU2Nj1RKVseDcQT0Ko VaPfFnQK9dt2rphvsFb+tD35NVRuyd88NbHOn5uMtGcc7NbKu4ytKXpwpGTpoL1ck9nu MCpbZFcQMYMBr3rulBcGqRD9t2VW46gen5w0rRNSkGlLTWn0UyMRPknTn8Wm0garq5D1 kN+CtVthJ7YPvyTB934vyZIdING5GkqnnVpQZLTDK3F6lAA1MAtfAOHhfTIOUJCxNszv pcEala4G/MHOZ5jEC6lPFSnhAQn6ekQX3Fe6d5W4C9vP5xEb+zUFjy+TS7XQZcgpaH9t T6Cg== 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=d3cMja03P1p+YnKTaO0HshHA8Wbdb8o0UHZXORz+ME0=; fh=xf53zEEwO8UfwqXA8rNDXb86USgBpvamfpvPadu/NTs=; b=XYOPrgElMxc/P0656agmQwTaGX6X7Sbc0C5k/PBWBeZOmMLWNyiHG5RY8NJ/g6m5vE THzcUpuxzVW+1YmQnk+jCVHs99JcrOtuQGVH1ks9V7KKjRgCdBoHQh+tEt1kxQ6c2wpF PaccQ2fLhQXho17LYncirs8dqJbJ5HexxnWNcpccFIbJlnTpKCNyTYwMHMu38rgZy90y mZNlOBzrwn0LeeczJyuWIj40lUIXM2Txbr803aYE6JV82ZOXDInDUAfrdHMSxacHKIXH aeRKWQIokeT0Be/XKP3Q2o7jpxPo/nfMEY3BTBHoAD1IKiyqU06SUOY71QkplCE0aPLl FhGA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Wim7ArOc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-76529-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76529-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id y13-20020a05620a0e0d00b007877a5a6b25si5214435qkm.674.2024.02.22.04.46.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 04:46:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76529-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Wim7ArOc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-76529-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76529-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 6E8E41C24B2B for ; Thu, 22 Feb 2024 12:45:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5D3A31468F3; 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="Wim7ArOc" 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 3B72112DD93; Thu, 22 Feb 2024 12:43:42 +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=Ssyg4sJxsraw1ss6QWbROZEoklBv4cA3r1bAvXXTyqXUaTgHXydzLz3hRn8yXKT9cbxPbvNc4T/bxEdkiky+Om1CwJa0p+664Hd4IIyvQwbhflW9uSKjdBYJkVIq5cmzK1uwzqXjjN9CVGVVB0025JCMnS8mCMGe6SD4JNPyN8k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708605822; c=relaxed/simple; bh=oJuSPJD8GR/wjJbE+mVqeaijIrE2Zu4CuUFl6OFH/pQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VKXI0IFDHcBPYTimpKtP1ThiDpq3vQ08sBvFd6UBvWtQfmMtYoCz6J7FBsjjRDG8XG6wFhPjeI3bgTmLXSm3HE6nOX7xsrqjyUmjtoNUPfSqXaRYg4l+AumbjkbTixpARyCSyNzZVSXtimEnYXg292qajwwrbVkJrUtoqSqKaLw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Wim7ArOc; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id F11F7C43609; 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=1708605822; bh=oJuSPJD8GR/wjJbE+mVqeaijIrE2Zu4CuUFl6OFH/pQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=Wim7ArOchrAe0fbajTRCC9w5og2tDJnx4D7FKA61bdgaYOZPHOOpHESJjq4IZlMST rERWwgt4l27v1I722FqoNxllYDBRtb8cInkIyav4hNYS2iYULj/Qsal43irvBx2rkP saFtIpLHp6yMpf9nlAmO4a0l8nCYByTwPDASkDYg5BWpKzmxe/gTl5+90FczdZAkm8 qAoVhOeTNa+ojtG8XJ039Sz9NyTxPgjZosI1z8vtUkFHmBNIah3dcTatikYimGGDuC bZXIi+HhGnDqir20EY/kffsya+u9fcXcQjAKjkXaevGnX+I/rKwlPJgQvanCtKz7tV 2HmSz7AohSPyg== 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 D9D2CC54E41; Thu, 22 Feb 2024 12:43:41 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Thu, 22 Feb 2024 20:43:24 +0800 Subject: [PATCH net-next v4 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 Message-Id: <20240222-net-v4-4-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=3843; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=s74McZo3tz0CRQGXU249Pq+NWVbKcQ+gU6lSPVvGiGw=; b=Ux9CgjbsJPHzU+Zx5d2w/9uRO1P76Bej7dRkQuKK3tS2fryiPKHEVPERaDrd5yTltOdVEoPJv Epk915lkMSRCaqOv5ddOj9lGora3qD4O+8xNslqXk7Af4gOAn14hvzA 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: 1791603215673810151 X-GMAIL-MSGID: 1791603215673810151 From: Yang Xiwen Compared to previous txt based binding doc, the following changes are made according to the TRM: - Remove unmaintained Hi3516 SoC, add Hi3798MV200 - add MDIO subnode, because MDIO bus is integrated - add ahb bus clock, phy clock and reset Also remove "hisi-femac-v1/2" binding. The difference between versions is unknown and not documented anywhere. Nor is it used in driver. Remove it until it's needed in the future. Signed-off-by: Yang Xiwen --- .../bindings/net/hisilicon,hisi-femac.yaml | 116 +++++++++++++++++++++ 1 file changed, 116 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..56d7c8a26d0c --- /dev/null +++ b/Documentation/devicetree/bindings/net/hisilicon,hisi-femac.yaml @@ -0,0 +1,116 @@ +# 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 + + 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 = <&clk_femac>, + <&clk_femacif>, + <&clk_fephy>; + 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>; + }; + }; + }; From patchwork Thu Feb 22 12:43:25 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: 204751 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:aa16:b0:108:e6aa:91d0 with SMTP id by22csp226698dyb; Thu, 22 Feb 2024 04:49:42 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUNFkHDbiORRHlCRtPt+4dnznjtXm3XfknrYqxxPraGzkVSi3Gsb1SNIe+AiuIIXrpdFsz1iNNmqN7jLiKIk/Pj6qeGKQ== X-Google-Smtp-Source: AGHT+IFwuAHlqA0Wl5UU5W9JMHTxkiHMeKHRDb8PBU7xRuiauq4zP6iqvtWL6k0T2HT3h9YPot4Y X-Received: by 2002:a17:90a:9a94:b0:299:1777:134c with SMTP id e20-20020a17090a9a9400b002991777134cmr16376835pjp.33.1708606182130; Thu, 22 Feb 2024 04:49:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708606182; cv=pass; d=google.com; s=arc-20160816; b=dybi74q4cNu60g7FrUpEnjyKExvzCyd+yKkC14l/7ARHb2wO/SMaaNFNwtEa6Oy+ZZ gEKxIASb1gYqGXWwOUUUeqCCSkv6DHBPTtcvWdRAWUORr/XQ9XusyUy7vcl4MMRiR0H+ xYwRgxJNjOrQSdc2Pzo0E8t1vX6171HaEWBYEAzgsLltEYY6SvPbD2i9XCpBH6wL8ayN cnmfCu+XWE5l/g4cUzq5x821zOxczD7eZnHzJB3IkucKTQQPkQLk0qHEqv8I/mUygRdv V0Hz7T6iXdpU6HhmywoNPLwATN6gzGxT83rd3bC9Gs7jqccJMwK5RHToR+FO2LCzTfpb gapw== 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=lPf/vtLpIO478uLt6O/SjEyRujqy3WikxTOLtOc8Uag=; fh=xf53zEEwO8UfwqXA8rNDXb86USgBpvamfpvPadu/NTs=; b=ZnT1DGmoibLCh+aUksrw2p9+UCvv7hjNinR5PP9Q/pIfCdkc0xEO93dHXBYkFt75RR dNkfCvWT2Z9AXRo33yKBHSI3hYtIGh6XrhZl/w0o+0dsjWn17wduDlpyZYA3m9xLizk3 nUvdVVIZISOw3RdtVvIfkhrA4DAZgkF5ywAAOkhgsk6qdIOMrzPpgb41UrNYauCkt8iY S1fq4bM4Cct5VsPaLj5HbkFoiuMNa/A4A49dYbyv+ou0ThgApkfTzB3MZJRSNuI5sagh eU150tbtlF4JWoyQO7/u4gdb7AWtroVOI+iWwmVa8d7x/cpZBXXlOckdFcul8jhturkm 1wIg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VjI0ffNX; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-76533-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76533-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id bu5-20020a17090aee4500b002995cc18356si3476543pjb.67.2024.02.22.04.49.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 04:49:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76533-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VjI0ffNX; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-76533-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76533-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 1BB1CB270B6 for ; Thu, 22 Feb 2024 12:46:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F187D1482E9; Thu, 22 Feb 2024 12:43:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VjI0ffNX" 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 8D1C912EBC0; Thu, 22 Feb 2024 12:43:42 +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=G4nMAzoXO8zQGhg+uWa2v8PIzhlFi3JPBsxC3MeHMCnh8/QT0HbdAgkSC3Jqu4yRKCqPsp78s7telx/k7r8uyV0/FPJc+qjOmBn2zYUYxAE6ecFcK/oK4KRfFeIvqp4UhENjdso8wLFk4j22jXTz+tL+OnshLmFIjHNhyVl0ZlQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708605822; c=relaxed/simple; bh=GBaheOhdznjtGRKp6u9ZnNvUhBZp5GtwDt/jdqgbVr4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=nfMqg+4eO0H72LnTLg2ZrY7I6eSJLhPmuGKezY4pen27CZDDN+8H/zOXolbqnxTbRGkJ/f1Yp88t2aK3fAtD4vPMxxvHQ8mw+6xmwnJPojTWg9MuZEZ6F3TLgig/w8QpmEXW4gxPPuS/8TEHDH1g6NUxpBZB5AcGSVoBVJDuhvU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VjI0ffNX; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 02B90C43141; Thu, 22 Feb 2024 12:43:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708605822; bh=GBaheOhdznjtGRKp6u9ZnNvUhBZp5GtwDt/jdqgbVr4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=VjI0ffNXQxse6B5ys3SS6NpPPP9Os+d3MsLKoYwdfqpN6kS4NC4J3gQ5iegdVR/fh GSqaIkk4VelmuApnz7Z/xZWLoU7GXtuTxNWuYKMLz+kQfwU4F6xrdMUn/6RpuupB1U KXJvWDEFP/budn2076so8dxh+BlSdVKR4Hdjpx8JYZqx3PEQ8fSW2hyNM8SXy/wKbz 3dZ2uSXmYbDnrzPkF0j/zfPnzgBAnPb5VqN1TehvJ1At/BOqoXDw02K0TJEUnLanao p7Xv8GGmdNuU1tOHDv3VCaidVZK33ocU2G2+pSTpTrJBrlJ7z5II0/1FvMx7/WabNX chvHJLS3kKeSA== 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 E6366C48BF8; Thu, 22 Feb 2024 12:43:41 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Thu, 22 Feb 2024 20:43:25 +0800 Subject: [PATCH net-next v4 5/6] net: hisilicon: add support for hisi_femac core on Hi3798MV200 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-5-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=7210; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=/txku2bb14pGE8xgSS0aeGHZMyxLoNFPUgd/T9v5WGE=; b=VFa7gyMfDcxQO+jhkyA0pP3gSCsFbZqGhi6gqpkmIrVxzIwKm3lo/MuQnYMODdt0zsfDVQtS/ OzOwmvr5bMgCYK2dMmcfQGL46PtIikSJLbViTL4qyNw2uqsxWYXayAS 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: 1791603436284090224 X-GMAIL-MSGID: 1791603436284090224 From: Yang Xiwen Register the sub MDIO bus if it is found. Also implement the internal PHY reset procedure as needed. Note it's unable to put the MDIO bus node outside of MAC controller (i.e. at the same level in the parent bus node). Because we need to control all clocks and resets in FEMAC driver due to the phy reset procedure. So the clocks can't be assigned to MDIO bus device, which is an essential resource for the MDIO bus to work. No backward compatibility is maintained since the only existing user(Hi3516DV300) has not received any updates from HiSilicon for about 8 years already. And till today, no mainline dts for this SoC is found. It seems unlikely that there are still existing mainline Hi3516DV300 users. The effort to maintain the old binding seems gain a little. Signed-off-by: Yang Xiwen --- drivers/net/ethernet/hisilicon/hisi_femac.c | 74 +++++++++++++++++++++++------ 1 file changed, 60 insertions(+), 14 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hisi_femac.c b/drivers/net/ethernet/hisilicon/hisi_femac.c index 2406263c9dd3..eab91e011d11 100644 --- a/drivers/net/ethernet/hisilicon/hisi_femac.c +++ b/drivers/net/ethernet/hisilicon/hisi_femac.c @@ -10,8 +10,10 @@ #include #include #include +#include #include #include +#include #include #include @@ -97,6 +99,13 @@ enum phy_reset_delays { DELAYS_NUM, }; +enum clk_type { + CLK_MAC, + CLK_MACIF, + CLK_PHY, + CLK_NUM, +}; + struct hisi_femac_queue { struct sk_buff **skb; dma_addr_t *dma_phys; @@ -108,7 +117,7 @@ struct hisi_femac_queue { struct hisi_femac_priv { void __iomem *port_base; void __iomem *glb_base; - struct clk *clk; + struct clk_bulk_data *clks; struct reset_control *mac_rst; struct reset_control *phy_rst; u32 phy_reset_delays[DELAYS_NUM]; @@ -116,6 +125,7 @@ struct hisi_femac_priv { struct device *dev; struct net_device *ndev; + struct platform_device *mdio_pdev; struct hisi_femac_queue txq; struct hisi_femac_queue rxq; @@ -693,6 +703,7 @@ static const struct net_device_ops hisi_femac_netdev_ops = { static void hisi_femac_core_reset(struct hisi_femac_priv *priv) { reset_control_assert(priv->mac_rst); + usleep_range(200, 300); reset_control_deassert(priv->mac_rst); } @@ -712,6 +723,10 @@ static void hisi_femac_sleep_us(u32 time_us) static void hisi_femac_phy_reset(struct hisi_femac_priv *priv) { + /* MAC clock must be disabled before PHY reset + */ + clk_disable(priv->clks[CLK_MAC].clk); + clk_disable(priv->clks[CLK_MACIF].clk); /* To make sure PHY hardware reset success, * we must keep PHY in deassert state first and * then complete the hardware reset operation @@ -727,6 +742,9 @@ static void hisi_femac_phy_reset(struct hisi_femac_priv *priv) reset_control_deassert(priv->phy_rst); /* delay some time to ensure later MDIO access */ hisi_femac_sleep_us(priv->phy_reset_delays[POST_DELAY]); + + clk_enable(priv->clks[CLK_MAC].clk); + clk_enable(priv->clks[CLK_MACIF].clk); } static void hisi_femac_port_init(struct hisi_femac_priv *priv) @@ -768,11 +786,12 @@ static void hisi_femac_port_init(struct hisi_femac_priv *priv) static int hisi_femac_drv_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct device_node *node = dev->of_node; + struct device_node *node = dev->of_node, *mdio_np; struct net_device *ndev; struct hisi_femac_priv *priv; struct phy_device *phy; int ret; + bool mdio_registered = false; ndev = alloc_etherdev(sizeof(*priv)); if (!ndev) @@ -797,17 +816,16 @@ static int hisi_femac_drv_probe(struct platform_device *pdev) goto out_free_netdev; } - priv->clk = devm_clk_get(&pdev->dev, NULL); - if (IS_ERR(priv->clk)) { - dev_err(dev, "failed to get clk\n"); - ret = -ENODEV; + ret = devm_clk_bulk_get_all(&pdev->dev, &priv->clks); + if (ret < 0 || ret != CLK_NUM) { + dev_err(dev, "failed to get clk bulk: %d\n", ret); goto out_free_netdev; } - ret = clk_prepare_enable(priv->clk); + ret = clk_bulk_prepare_enable(CLK_NUM, priv->clks); if (ret) { - dev_err(dev, "failed to enable clk %d\n", ret); - goto out_free_netdev; + dev_err(dev, "failed to enable clk bulk: %d\n", ret); + goto out_disable_clk; } priv->mac_rst = devm_reset_control_get(dev, "mac"); @@ -830,11 +848,29 @@ static int hisi_femac_drv_probe(struct platform_device *pdev) hisi_femac_phy_reset(priv); } + // Register the optional MDIO bus + for_each_available_child_of_node(node, mdio_np) { + if (of_node_name_prefix(mdio_np, "mdio")) { + priv->mdio_pdev = of_platform_device_create(mdio_np, NULL, dev); + of_node_put(mdio_np); + if (!priv->mdio_pdev) { + dev_err(dev, "failed to register MDIO bus device\n"); + ret = -ENODEV; + goto out_disable_clk; + } + mdio_registered = true; + break; + } + } + + if (!mdio_registered) + dev_warn(dev, "MDIO subnode not found. This is usually a bug.\n"); + phy = of_phy_get_and_connect(ndev, node, hisi_femac_adjust_link); if (!phy) { dev_err(dev, "connect to PHY failed!\n"); ret = -ENODEV; - goto out_disable_clk; + goto out_unregister_mdio_bus; } phy_attached_print(phy, "phy_id=0x%.8lx, phy_mode=%s\n", @@ -885,8 +921,10 @@ static int hisi_femac_drv_probe(struct platform_device *pdev) out_disconnect_phy: netif_napi_del(&priv->napi); phy_disconnect(phy); +out_unregister_mdio_bus: + platform_device_unregister(priv->mdio_pdev); out_disable_clk: - clk_disable_unprepare(priv->clk); + clk_bulk_disable_unprepare(CLK_NUM, priv->clks); out_free_netdev: free_netdev(ndev); @@ -902,7 +940,8 @@ static void hisi_femac_drv_remove(struct platform_device *pdev) unregister_netdev(ndev); phy_disconnect(ndev->phydev); - clk_disable_unprepare(priv->clk); + platform_device_unregister(priv->mdio_pdev); + clk_bulk_disable_unprepare(CLK_NUM, priv->clks); free_netdev(ndev); } @@ -919,7 +958,7 @@ static int hisi_femac_drv_suspend(struct platform_device *pdev, netif_device_detach(ndev); } - clk_disable_unprepare(priv->clk); + clk_bulk_disable_unprepare(CLK_NUM, priv->clks); return 0; } @@ -928,8 +967,14 @@ static int hisi_femac_drv_resume(struct platform_device *pdev) { struct net_device *ndev = platform_get_drvdata(pdev); struct hisi_femac_priv *priv = netdev_priv(ndev); + int ret; + + ret = clk_bulk_prepare_enable(CLK_NUM, priv->clks); + if (ret) { + dev_err(&pdev->dev, "failed to enable clk bulk: %d\n", ret); + return ret; + } - clk_prepare_enable(priv->clk); if (priv->phy_rst) hisi_femac_phy_reset(priv); @@ -948,6 +993,7 @@ static const struct of_device_id hisi_femac_match[] = { {.compatible = "hisilicon,hisi-femac-v1",}, {.compatible = "hisilicon,hisi-femac-v2",}, {.compatible = "hisilicon,hi3516cv300-femac",}, + {.compatible = "hisilicon,hi3798mv200-femac",}, {}, }; From patchwork Thu Feb 22 12:43:26 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: 204750 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:aa16:b0:108:e6aa:91d0 with SMTP id by22csp226616dyb; Thu, 22 Feb 2024 04:49:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU/PdbsuDzKZ4JPUkjdQno+n5p+flCzLHQGCfMNKgRFMKw3FzbRhY8MeJiUbEfz0n3GKoSiaXru7vONZNBZCDwy+GVpUQ== X-Google-Smtp-Source: AGHT+IEyQMjOwUWlAEsf1ObPOn5Fwh+bP54184bMdi+HMX5nxlnzwNVADTghtZod5x+1Gm1mxFI8 X-Received: by 2002:a05:6358:f1c4:b0:17b:618e:76c with SMTP id kr4-20020a056358f1c400b0017b618e076cmr4607001rwb.22.1708606171022; Thu, 22 Feb 2024 04:49:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708606170; cv=pass; d=google.com; s=arc-20160816; b=mjxbjQsDI+mbKwF3Z6y61h7k1/54XBhNjuoa3EC0bEvoh3gwsWVFejdWw2NBULEtN+ 2kpeP12+uHstnjf7a8dhSVo6hfYMrSIA9BLlNtB7y1M196juafimnSpAGkvbt6o0qAPm /iBbO+QonyL0SObGeA/iKE2nK7qe9oD3+Eqm49fdg9EJ9C6la4HovlP+d3sMqtjG3tyg qNI4+dOmMbA4lS8VbM+ZmuP6rSsobOqcBrUp0cnYQhS9LyDDYqMoVf737M+LQeJbmUAy /TBqpbgkLetlbAUjwCdXHTiWC2cq8iQiZ6gn9CxPWx7UbGEKN+mZqzuCW583Bt0GirO2 rwDw== 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=ZYeuO4JfGlvzekOTmrU/1ri2Z+PPPTV8Q+YQw8qBALE=; fh=xf53zEEwO8UfwqXA8rNDXb86USgBpvamfpvPadu/NTs=; b=nlkqMb7Q4uEBE6Q7ohuyMkVFuTPE2umbtdKAnDGYN+lss9VcyOybMgf+ShWO/Qr3yQ K8balNppUPA0b5p8pNc7+9DFYFwt0Xp2fBG/FxaEF5glVu/JXfcluUoAsmrzbRVa6s79 OogGBqJtdEHGANUBYa8y/L04RqY39c778x2yBj3S4UBaWxrVa6t74Ui9tM7xnHr0PieD +Q4xVqgJAJg3ZbXo3FR7aMi9jzUxkqSjbZnW/7WnLiF6GaNKQIAzJymk/xD+AE7q1SHa P1M2w+l4zqEflPiXrzUB4nGVoxLn+FtINg45sQyKu9t3g264J92q2hnNWpQV49bLs31e WOsA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sZ+tU+zw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-76532-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76532-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id il15-20020a17090b164f00b0029a17df3876si3148512pjb.172.2024.02.22.04.49.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 04:49:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76532-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sZ+tU+zw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-76532-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76532-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 62BE7B26FBA for ; Thu, 22 Feb 2024 12:46:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 16EA912DD82; Thu, 22 Feb 2024 12:43:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sZ+tU+zw" 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 6E1EE12E1D6; Thu, 22 Feb 2024 12:43:42 +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=D4zomdrNY8cIUm3DQT8EGRpJvfpBvAicrQNqtmzkDDoqwxGIiruzKLjEFRdrUNHC3OyYLZfnXM4g7A70UJUQ0tSJEBUGYYpgV2e4jUjzdfX6/TYm+7q1c+T2hjMZqA/9NA0lrU+54qqb51YgiTxD50SWdND7iNLALaEmRy+O4t0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708605822; c=relaxed/simple; bh=OcmgXpcRM8kSwibnYWY2jGXTBaTcyrBdkKpBfGjwCpA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=AEHzaogHtzwhS1xPX6veVRhD4fRDHFRAX71IoPxEdysHI275kuoaCFk7GiG2qRKbYSygZK5WGppNGpm9qB97XGT5xNsHxxFSDOf9//chZbjx4yq83d8fWsvbNOKfVEDfSo0635YWyOhXfJUtUhmd4mxu0R/r9kO4I4toI9hWFf4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sZ+tU+zw; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 12893C43142; Thu, 22 Feb 2024 12:43:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708605822; bh=OcmgXpcRM8kSwibnYWY2jGXTBaTcyrBdkKpBfGjwCpA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=sZ+tU+zwHEuCkU2aGO+otM9xajArfGOWdB7GRU+bbhwj6mxtjcfkzS2d0LtYX2Qmk 8JkQTwY6CcF9KWaFR8JfLv79sxUWv0IbNmVTu+q1/bqreWVKnvtG2k/pTleAfi0vdv 4vjVr38sXAwanX0fYV2g1N9hCpX7UDDwo6Bo6vsqFN7tfqgk8qSEaymUa8PAFKYL+O NSkHMmrKLrqIO8PxcdUCIRn0K9yCfYhKiBEQ8b7aGQXn/raxHC7hh2FTQsaxhva6rM VtNmg12WFpgar1eSzvKwRv5zi0PWHVhYFRrhULK42uYSxU9gI5ZFa8Im90tt9dtVqr E95+MQ7gMAjAg== 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 F2CFEC5479F; Thu, 22 Feb 2024 12:43:41 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Thu, 22 Feb 2024 20:43:26 +0800 Subject: [PATCH net-next v4 6/6] net: hisi_femac: remove unused compatible strings 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-6-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=1155; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=sYmI7rY8FFj5xi4CE0Px8R4wNFWcF8TjujWAa/SwbJA=; b=J+c5JmE+zwQ+47hqbBiqjZouHf4AaRNXkfmB5TRcybazVxCARxI6fNv6NiDDCsoZaW0aFzkn9 UIGYuWnSagDB1mHQCxoRd4RDDclKQaubg2jdJa9Zdso2/OsJ7DmYJR8 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: 1791603424459293466 X-GMAIL-MSGID: 1791603424459293466 From: Yang Xiwen The only documented SoC Hi3516DV300 does not receive any updates from 8 years ago. With the recent driver changes, it unlikely works for this SoC anymore. Remove the binding for this SoC. Also it's hard to get the version number and it's unknown how the version can be used. Remove them until it's really needed. Signed-off-by: Yang Xiwen --- drivers/net/ethernet/hisilicon/hisi_femac.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hisi_femac.c b/drivers/net/ethernet/hisilicon/hisi_femac.c index eab91e011d11..9466ca9da2bb 100644 --- a/drivers/net/ethernet/hisilicon/hisi_femac.c +++ b/drivers/net/ethernet/hisilicon/hisi_femac.c @@ -990,9 +990,7 @@ static int hisi_femac_drv_resume(struct platform_device *pdev) #endif static const struct of_device_id hisi_femac_match[] = { - {.compatible = "hisilicon,hisi-femac-v1",}, - {.compatible = "hisilicon,hisi-femac-v2",}, - {.compatible = "hisilicon,hi3516cv300-femac",}, + {.compatible = "hisilicon,hisi-femac",}, {.compatible = "hisilicon,hi3798mv200-femac",}, {}, };