From patchwork Tue Jan 21 07:54:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yijie Yang X-Patchwork-Id: 13945927 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 07937C02182 for ; Tue, 21 Jan 2025 08:01:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:CC:To:In-Reply-To:References :Message-ID:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=L3vMMHxUNrPj1M0U05TPvZCtPp3piwaRKsCsLbd47dw=; b=to2HDdAz8voGEbM7MrOYLxf9Qf JXqSu8lpnk1Hy4l4qopjQr6VngdLyJnK5ezz/Ospyyz7kZOd6XQ8kC9QVsNKZHNps/RPxUtIP+QIg WaupyePJZRnvTMGquhHiPGxRnHOFHrZTij4jC+hVwKeKZK3RWamyhE3YahyiTspyjAK2zMbKieQY3 CUVaa5uHy9Ee0OKJVxxXNIhJJ7gH2BxVppaSUYw2ejbcxq8D/sPwfoK1mLa/Q7zHFiECXDk7DT1nA Mfg1qUxL/9iK9HbXtU22n7423LwNrzDi2eZHUqL+UfzNy3VYsjKv3fEj5KWNXudKWxsG7pw5rbW+b hklm2W8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1ta9CH-00000007CFz-19IB; Tue, 21 Jan 2025 08:01:17 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1ta97E-00000007BSr-0aqL for linux-arm-kernel@lists.infradead.org; Tue, 21 Jan 2025 07:56:05 +0000 Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50L4gufD025163; Tue, 21 Jan 2025 07:55:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= L3vMMHxUNrPj1M0U05TPvZCtPp3piwaRKsCsLbd47dw=; b=ATT7p46b6j4ZWXv8 svIBOOEUS7ZnQ1iD+nIR83Hf8LL55KsQ1K7hIK9+vPc61YLx09TYTPjwnr4o43Oj unpUwm/I59ofAdb2tBxhoA6t0u0FwvJMnMGSeYFlw0rf52bKYk9fKVibsB5DM8nn 6lIRhxpWh0KcNa85o9ndqjgyMC2cruEL7VopgteMnHa90FUeGbTnn2TjrQvQaRyy XpCYJX77bD6NORjbSNSQd9DWi9AAisN7jijh3kfmDwEHFGmpjolXWWygJmmy0UJ6 5qYajKRQGnrGNqteCzVnG2/pt3xW88+ewh/4w5AkscYe+eqVXp8rgZ9uFRd/33qT bCXvmg== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 44a4t30dxw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Jan 2025 07:55:54 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA01.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 50L7trjb014818 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Jan 2025 07:55:53 GMT Received: from yijiyang-gv.ap.qualcomm.com (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Mon, 20 Jan 2025 23:55:48 -0800 From: Yijie Yang Date: Tue, 21 Jan 2025 15:54:53 +0800 Subject: [PATCH v3 1/4] dt-bindings: net: ethernet-controller: Correct the definition of phy-mode MIME-Version: 1.0 Message-ID: <20250121-dts_qcs615-v3-1-fa4496950d8a@quicinc.com> References: <20250121-dts_qcs615-v3-0-fa4496950d8a@quicinc.com> In-Reply-To: <20250121-dts_qcs615-v3-0-fa4496950d8a@quicinc.com> To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Maxime Coquelin , Alexandre Torgue , Bjorn Andersson , Konrad Dybcio , Richard Cochran CC: , , , , , , Yijie Yang X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1737446142; l=1025; i=quic_yijiyang@quicinc.com; s=20240408; h=from:subject:message-id; bh=K52foD8ZKSNBEteF20ZbKzww8kLNTvLjACSr0XSUutE=; b=wNc3fkiR5pXFQ7Rplbxsxn17PwRWqOrVYg4NCvr9qpQnw9edC1DroW/PA8n1Jd7J1GHDqZf+t f1l1aVaV2cDBz5AG5GbKHRAJrtshNtpykIUH+VWMlc46iBqtoZEtdeq X-Developer-Key: i=quic_yijiyang@quicinc.com; a=ed25519; pk=XvMv0rxjrXLYFdBXoFjTdOdAwDT5SPbQ5uAKGESDihk= X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: LYjBZENH2x8EcNGJrpw9ab81HOvLdx3- X-Proofpoint-ORIG-GUID: LYjBZENH2x8EcNGJrpw9ab81HOvLdx3- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-21_04,2025-01-21_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 mlxlogscore=713 adultscore=0 impostorscore=0 spamscore=0 bulkscore=0 lowpriorityscore=0 mlxscore=0 phishscore=0 malwarescore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501210064 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250120_235604_310507_9E53F1AB X-CRM114-Status: GOOD ( 12.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Correct the definition of 'phy-mode' to reflect that RX and TX delays are added by the board, not the MAC, to prevent confusion and ensure accurate documentation. Signed-off-by: Yijie Yang --- Documentation/devicetree/bindings/net/ethernet-controller.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/ethernet-controller.yaml b/Documentation/devicetree/bindings/net/ethernet-controller.yaml index 45819b2358002bc75e876eddb4b2ca18017c04bd..d56f1a2e79c4656762c7397dc96408bdde19c52b 100644 --- a/Documentation/devicetree/bindings/net/ethernet-controller.yaml +++ b/Documentation/devicetree/bindings/net/ethernet-controller.yaml @@ -74,7 +74,7 @@ properties: - rev-rmii - moca - # RX and TX delays are added by the MAC when required + # RX and TX delays are added by the board when required - rgmii # RGMII with internal RX and TX delays provided by the PHY, From patchwork Tue Jan 21 07:54:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yijie Yang X-Patchwork-Id: 13945928 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AF01EC02182 for ; Tue, 21 Jan 2025 08:02:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:CC:To:In-Reply-To:References :Message-ID:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=oTSddBFBZpIhVzkPETurEWo14Aj+75DmLa6musDz0bM=; b=j0KdDtt2eT0b8ZCZJZGYv1o/pr iehtHKFvvFsNsmm1PLRwng09Wd8CPDJC4PyncBVxRETz/ifplwqZRQvwYZ0tfOi4+Sw69VgpytfpT g5iTSpsXeRp4sU9A8rf4xVNgU9iDtxiBDZktak2g9geS3kOLU/4NsH7V7h2CXqjDzrQyA6pQtrQ/Z l3KRjS9A7ZGyIbj3CfWegJh0E5M9zNc6wiB6pNThu/BLezwzNk0WZUKz/mvwglAI7ML5dj9Vkn6jk 2s0gALEumsQ4Oe2zMSgbf6k/hr/9lB+q/3jA8rIOoahzLCfoCWExCgIcTHCmhDMcoK4q2x+u1YRwW Nh8YyJqg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1ta9DW-00000007CMI-3h5y; Tue, 21 Jan 2025 08:02:34 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1ta97I-00000007BTR-1rdb for linux-arm-kernel@lists.infradead.org; Tue, 21 Jan 2025 07:56:09 +0000 Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50KNr9lM029987; Tue, 21 Jan 2025 07:56:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= oTSddBFBZpIhVzkPETurEWo14Aj+75DmLa6musDz0bM=; b=izO3WHFVVXT2pnH4 cZMkGoOSVFYE82/bu6Kbf8IALqepCgurDGXfk13j4SnBLPQav+UHDFc5k8CqH5ft kabVWcPixRvZ91sQCuLX3O42U0H8TeRFd7vD9rvyEbLbP0a6QiKEygp4VEKGrGTK oV+rzO+f5X81E3twr9qigqt4XJQVX71Hxx/q+irHG8mJuaPJQqII/wUWvwQbAqkC Xvl56+kYZbXuPebWqGL9Vke64jMTsmtEtAQY1IPpGI26K4qtKTbskPc3LXLW/RCq AI3AQ24KFK9PQM5Ec5P2+79hEKjLIXu/h5QYISnYvn58JebAatYGgzdFHcnN0vEm UnpWPA== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 44a0j10weu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Jan 2025 07:56:00 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA03.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 50L7twvr030840 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Jan 2025 07:55:59 GMT Received: from yijiyang-gv.ap.qualcomm.com (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Mon, 20 Jan 2025 23:55:53 -0800 From: Yijie Yang Date: Tue, 21 Jan 2025 15:54:54 +0800 Subject: [PATCH v3 2/4] net: stmmac: dwmac-qcom-ethqos: Mask PHY mode if configured with rgmii-id MIME-Version: 1.0 Message-ID: <20250121-dts_qcs615-v3-2-fa4496950d8a@quicinc.com> References: <20250121-dts_qcs615-v3-0-fa4496950d8a@quicinc.com> In-Reply-To: <20250121-dts_qcs615-v3-0-fa4496950d8a@quicinc.com> To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Maxime Coquelin , Alexandre Torgue , Bjorn Andersson , Konrad Dybcio , Richard Cochran CC: , , , , , , Yijie Yang X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1737446142; l=2549; i=quic_yijiyang@quicinc.com; s=20240408; h=from:subject:message-id; bh=IOg1nnppdMQcH00w1oDu9lTpaep4VwJFdoVptu9pVOw=; b=u5lxfMjiG0oC+Rsdrtq5a/4ObLhn6e82cYu8U04hNlj4IB5qza/VM6cyqslnSsH50BjvsPIDu JvtyCL2bEW6Cy+AAnB8j2mi1k/HgSJcAalAx1lOmgeoXDKGt02+AsC8 X-Developer-Key: i=quic_yijiyang@quicinc.com; a=ed25519; pk=XvMv0rxjrXLYFdBXoFjTdOdAwDT5SPbQ5uAKGESDihk= X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: tYLQeiEyuYaUOBE6C0IierrWhvNxMere X-Proofpoint-ORIG-GUID: tYLQeiEyuYaUOBE6C0IierrWhvNxMere X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-21_04,2025-01-21_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 phishscore=0 clxscore=1015 spamscore=0 bulkscore=0 mlxlogscore=999 priorityscore=1501 lowpriorityscore=0 suspectscore=0 malwarescore=0 mlxscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501210064 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250120_235608_609252_ED1CA110 X-CRM114-Status: GOOD ( 20.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The Qualcomm board always chooses the MAC to provide the delay instead of the PHY, which is completely opposite to the suggestion of the Linux kernel. The usage of phy-mode in legacy DTS was also incorrect. Change the phy_mode passed from the DTS to the driver from PHY_INTERFACE_MODE_RGMII_ID to PHY_INTERFACE_MODE_RGMII to ensure correct operation and adherence to the definition. To address the ABI compatibility issue between the kernel and DTS caused by this change, handle the compatible string 'qcom,qcs404-evb-4000' in the code, as it is the only legacy board that mistakenly uses the 'rgmii' phy-mode. Signed-off-by: Yijie Yang --- .../net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c index 2a5b38723635b5ef9233ca4709e99dd5ddf06b77..e228a62723e221d58d8c4f104109e0dcf682d06d 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c @@ -401,14 +401,11 @@ static int ethqos_dll_configure(struct qcom_ethqos *ethqos) static int ethqos_rgmii_macro_init(struct qcom_ethqos *ethqos) { struct device *dev = ðqos->pdev->dev; - int phase_shift; + int phase_shift = 0; int loopback; /* Determine if the PHY adds a 2 ns TX delay or the MAC handles it */ - if (ethqos->phy_mode == PHY_INTERFACE_MODE_RGMII_ID || - ethqos->phy_mode == PHY_INTERFACE_MODE_RGMII_TXID) - phase_shift = 0; - else + if (ethqos->phy_mode == PHY_INTERFACE_MODE_RGMII_ID) phase_shift = RGMII_CONFIG2_TX_CLK_PHASE_SHIFT_EN; /* Disable loopback mode */ @@ -810,6 +807,17 @@ static int qcom_ethqos_probe(struct platform_device *pdev) ret = of_get_phy_mode(np, ðqos->phy_mode); if (ret) return dev_err_probe(dev, ret, "Failed to get phy mode\n"); + + root = of_find_node_by_path("/"); + if (root && of_device_is_compatible(root, "qcom,qcs404-evb-4000")) + ethqos->phy_mode = PHY_INTERFACE_MODE_RGMII_ID; + else if (ethqos->phy_mode == PHY_INTERFACE_MODE_RGMII) + return dev_err_probe(dev, -EINVAL, "Invalid phy-mode rgmii\n"); + of_node_put(root); + + if (plat_dat->phy_interface == PHY_INTERFACE_MODE_RGMII_ID) + plat_dat->phy_interface = PHY_INTERFACE_MODE_RGMII; + switch (ethqos->phy_mode) { case PHY_INTERFACE_MODE_RGMII: case PHY_INTERFACE_MODE_RGMII_ID: From patchwork Tue Jan 21 07:54:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yijie Yang X-Patchwork-Id: 13945931 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9B307C02182 for ; Tue, 21 Jan 2025 08:05:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:CC:To:In-Reply-To:References :Message-ID:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=i9IpyAq32RWq5IqDQ8FG5p4cQgFTnTO+EW9HFr5WAPs=; b=yPg+LB9b5mHsyVZN4uB7gIiZk1 sr577zlgMt9nEdIyQouMvb43y84ngor1nDkcjIJWuwOmj21e6sW9CEzzxRoPxOMx4tAhPg/+pTE4G uC76yuWC1qMieHLXWoAUobepdYmzgHOLQcuI0ThNCEWthMrjJa/0bsp5yfOWk1KuoeubMPcNVRtSv FI1XzbhWa9X9HgXQ3YZYPbKPpcG2TucNiYjT3Z8C6KJGYUIPNCWmBxNJQvtXK/Rr+ZwpZx0YNoy+6 ff73ALl2kaATX7rFC9Vu5hjPG4trx59yApNszlOPydIi373O1SX3QSwW4pbQgT1LJSQID1GjuQTTC chWOgFTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1ta9G1-00000007Ckj-11WP; Tue, 21 Jan 2025 08:05:09 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1ta97h-00000007BZ4-01Dp for linux-arm-kernel@lists.infradead.org; Tue, 21 Jan 2025 07:56:34 +0000 Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50KNGISw007409; Tue, 21 Jan 2025 07:56:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= i9IpyAq32RWq5IqDQ8FG5p4cQgFTnTO+EW9HFr5WAPs=; b=Dz0pFq8aSNSkV6hJ FBbRYSTQpNc1WOZYWTBOXpK2KUf6j90jyO3MjBGHdaG7V8QY/Iq6BMMndzsCDK2b KE0P1aJkfcIIXJ2eYR+3P9zMe6/IiRyBhlAy+dKCvjEFGP2PALxVSvEf9n73I19C yfof7m+Yr9HGXwW9oSV6+pxReOyn/7liUCem7Mv3T9Wv1j602Ei2AlerMn9G75AT ZaVY70ZSvHjIUsMANJqMPwC/to8h86p1efsY6byYGBbIOrwGIU+UqvEWzae4/+/z vENRqzcz6zUTJFpFUkhI9UE9GJ01mh+vXK6pGKOGm7Pk1Id4eYlPoFvob7psm89f kDNEGA== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 449v7e99cd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Jan 2025 07:56:22 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA03.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 50L7u452031025 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Jan 2025 07:56:04 GMT Received: from yijiyang-gv.ap.qualcomm.com (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Mon, 20 Jan 2025 23:55:59 -0800 From: Yijie Yang Date: Tue, 21 Jan 2025 15:54:55 +0800 Subject: [PATCH v3 3/4] arm64: dts: qcom: qcs615: add ethernet node MIME-Version: 1.0 Message-ID: <20250121-dts_qcs615-v3-3-fa4496950d8a@quicinc.com> References: <20250121-dts_qcs615-v3-0-fa4496950d8a@quicinc.com> In-Reply-To: <20250121-dts_qcs615-v3-0-fa4496950d8a@quicinc.com> To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Maxime Coquelin , Alexandre Torgue , Bjorn Andersson , Konrad Dybcio , Richard Cochran CC: , , , , , , Yijie Yang X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1737446143; l=1622; i=quic_yijiyang@quicinc.com; s=20240408; h=from:subject:message-id; bh=ZL8DFamzw8ju4ThEC/STKHYmbYZ2vK19I+bikrTWklA=; b=v6qIiX5x99C5eiRCtfcBhASLsqlZizNfhrnnGlBpWTsiW3PuPGfUDzdGDhcNEtXvIWY0vmes6 cDzBY2VF1G9At+hvC96P6olb61tRqkoJQ/bncFZBbodsOWvtuFReGEL X-Developer-Key: i=quic_yijiyang@quicinc.com; a=ed25519; pk=XvMv0rxjrXLYFdBXoFjTdOdAwDT5SPbQ5uAKGESDihk= X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 0jRxKBlAn2NlVgZAw8v68CscjsZ-d0XT X-Proofpoint-GUID: 0jRxKBlAn2NlVgZAw8v68CscjsZ-d0XT X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-21_04,2025-01-21_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 spamscore=0 clxscore=1015 mlxlogscore=637 impostorscore=0 mlxscore=0 lowpriorityscore=0 malwarescore=0 suspectscore=0 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501210065 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250120_235633_173950_AAF07912 X-CRM114-Status: GOOD ( 11.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add an ethernet controller node for QCS615 SoC to enable ethernet functionality. Signed-off-by: Yijie Yang --- arch/arm64/boot/dts/qcom/qcs615.dtsi | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qcs615.dtsi b/arch/arm64/boot/dts/qcom/qcs615.dtsi index f4abfad474ea62dea13d05eb874530947e1e8d3e..b93609a07a5554ab127c0c0540c58ebc781416a4 100644 --- a/arch/arm64/boot/dts/qcom/qcs615.dtsi +++ b/arch/arm64/boot/dts/qcom/qcs615.dtsi @@ -432,6 +432,40 @@ soc: soc@0 { #address-cells = <2>; #size-cells = <2>; + ethernet: ethernet@20000 { + compatible = "qcom,qcs615-ethqos", "qcom,qcs404-ethqos"; + reg = <0x0 0x00020000 0x0 0x10000>, + <0x0 0x00036000 0x0 0x100>; + reg-names = "stmmaceth", + "rgmii"; + + clocks = <&gcc GCC_EMAC_AXI_CLK>, + <&gcc GCC_EMAC_SLV_AHB_CLK>, + <&gcc GCC_EMAC_PTP_CLK>, + <&gcc GCC_EMAC_RGMII_CLK>; + clock-names = "stmmaceth", + "pclk", + "ptp_ref", + "rgmii"; + + interrupts = , + ; + interrupt-names = "macirq", + "eth_lpi"; + + power-domains = <&gcc EMAC_GDSC>; + resets = <&gcc GCC_EMAC_BCR>; + + iommus = <&apps_smmu 0x1c0 0x0>; + + snps,tso; + snps,pbl = <32>; + rx-fifo-depth = <16384>; + tx-fifo-depth = <20480>; + + status = "disabled"; + }; + gcc: clock-controller@100000 { compatible = "qcom,qcs615-gcc"; reg = <0 0x00100000 0 0x1f0000>; From patchwork Tue Jan 21 07:54:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yijie Yang X-Patchwork-Id: 13945929 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2F065C02182 for ; Tue, 21 Jan 2025 08:04:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:CC:To:In-Reply-To:References :Message-ID:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3M55RDZIhoScj1BK3E9p13CWYwK9W2yoOKDOnXxxQas=; b=CyWWq9olhIj2nLtgS1Zryy9NL+ I7nNWggcl5cCNOKTHakUAog1si8q4uJrCNbbf0Yzrf4Hlx9f6Y8E20v8eb1p50KeNoSuvH7DkHQ5u PUXqKBxviYY6F/iCkrKX3DMqKtD0Jo9zc8ec77WzPFg6N3f06WLVzvAn68+uMhuNoHqRph7bIXnbR jmDuVb8j5tgFhVEkkDg1jBn3ruLCOHRvuTGwyd5ugjCDDCk8yKJHXqYwvkxNBsIQtQ6zbLygPstNC zvf3HFVzm2ygpcQM0GTxCQ7TpDB2XOEVuumtvf3Ld619TPIXYpvEX0CzIvcBYO2zEQ3JMTIsrPXFa RrjWv/Gg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1ta9El-00000007Cab-2ZC6; Tue, 21 Jan 2025 08:03:51 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1ta97e-00000007BY6-3MeE for linux-arm-kernel@lists.infradead.org; Tue, 21 Jan 2025 07:56:32 +0000 Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50L1tToG006053; Tue, 21 Jan 2025 07:56:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 3M55RDZIhoScj1BK3E9p13CWYwK9W2yoOKDOnXxxQas=; b=DlY6cghHULhnx1HG 6+Wic1/p2gGnASiudSNGVR0N6m9JxJrkLAiMhckkRVNMqVtNrcv1xmuRRboJGowY MUU/OLAK3M9ZoxoGULYM8KY9nex4n3Dkz8Zs3qlbr87ia6kZwxJ8FfLDHNKbopij k8EjhiD/QlLRE5LlR76JkDgSozDfGiHo/7SQoivLvjMs0XmvJbC2QpWBlIGdwzci Q3QD3Wqt7aCgG2Wa9ZwMZtRbTv+PPT9bJq0tAPC1pBZxlCMC/wEkPmL0DCIz2Cdn D5Rq8OFTit0EiPOkBJLvcEX7Q9o12csd7rZZebKcXXSPijaPuFFjcDEEOMbgxZgl hpVIMw== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 44a2b80rfr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Jan 2025 07:56:23 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA05.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 50L7u9IM026543 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Jan 2025 07:56:09 GMT Received: from yijiyang-gv.ap.qualcomm.com (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Mon, 20 Jan 2025 23:56:04 -0800 From: Yijie Yang Date: Tue, 21 Jan 2025 15:54:56 +0800 Subject: [PATCH v3 4/4] arm64: dts: qcom: qcs615-ride: Enable ethernet node MIME-Version: 1.0 Message-ID: <20250121-dts_qcs615-v3-4-fa4496950d8a@quicinc.com> References: <20250121-dts_qcs615-v3-0-fa4496950d8a@quicinc.com> In-Reply-To: <20250121-dts_qcs615-v3-0-fa4496950d8a@quicinc.com> To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Maxime Coquelin , Alexandre Torgue , Bjorn Andersson , Konrad Dybcio , Richard Cochran CC: , , , , , , Yijie Yang X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1737446143; l=2940; i=quic_yijiyang@quicinc.com; s=20240408; h=from:subject:message-id; bh=YEt+SvlU1KY5Og1iXrbbdYg96Nx8cW4rVfwyTnmUdEk=; b=xD9KuogOG/gZWOXndKcgUdDOnoY0NtYpZMXYSDQZKDQblazOug4AhbfD7xFAfLBp3JBHe7Rd4 3Y92ndpLH16DusosHc/DJP96pnXIBJuEnX/c2pKDcB+Lj8Kx/ce37bp X-Developer-Key: i=quic_yijiyang@quicinc.com; a=ed25519; pk=XvMv0rxjrXLYFdBXoFjTdOdAwDT5SPbQ5uAKGESDihk= X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: DMu55lgGJr41YrRsyIjjU1lxXKaag2k9 X-Proofpoint-ORIG-GUID: DMu55lgGJr41YrRsyIjjU1lxXKaag2k9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-21_04,2025-01-21_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 priorityscore=1501 lowpriorityscore=0 adultscore=0 phishscore=0 clxscore=1015 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501210065 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250120_235630_848317_C81057FF X-CRM114-Status: GOOD ( 12.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Enable the ethernet node, add the phy node and pinctrl for ethernet. This change is necessary to support ethernet functionality on this board. Signed-off-by: Yijie Yang --- arch/arm64/boot/dts/qcom/qcs615-ride.dts | 104 +++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qcs615-ride.dts b/arch/arm64/boot/dts/qcom/qcs615-ride.dts index 2b5aa3c66867676bda59ff82b902b6e4974126f8..2d201b5d09a79613364f0e514858dd30b25706a9 100644 --- a/arch/arm64/boot/dts/qcom/qcs615-ride.dts +++ b/arch/arm64/boot/dts/qcom/qcs615-ride.dts @@ -211,6 +211,59 @@ vreg_l17a: ldo17 { }; }; +ðernet { + pinctrl-0 = <ðernet_defaults>; + pinctrl-names = "default"; + + phy-handle = <&rgmii_phy>; + phy-mode = "rgmii-id"; + + snps,mtl-rx-config = <&mtl_rx_setup>; + snps,mtl-tx-config = <&mtl_tx_setup>; + + status = "okay"; + + mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <1>; + #size-cells = <0>; + + rgmii_phy: phy@7 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0x7>; + + interrupts-extended = <&tlmm 121 IRQ_TYPE_EDGE_FALLING>; + device_type = "ethernet-phy"; + reset-gpios = <&tlmm 104 GPIO_ACTIVE_LOW>; + reset-assert-us = <11000>; + reset-deassert-us = <70000>; + }; + }; + + mtl_rx_setup: rx-queues-config { + snps,rx-queues-to-use = <1>; + snps,rx-sched-sp; + + queue0 { + snps,dcb-algorithm; + snps,map-to-dma-channel = <0x0>; + snps,route-up; + snps,priority = <0x1>; + }; + }; + + mtl_tx_setup: tx-queues-config { + snps,tx-queues-to-use = <1>; + snps,tx-sched-wrr; + + queue0 { + snps,weight = <0x10>; + snps,dcb-algorithm; + snps,priority = <0x0>; + }; + }; +}; + &gcc { clocks = <&rpmhcc RPMH_CXO_CLK>, <&rpmhcc RPMH_CXO_CLK_A>, @@ -278,6 +331,57 @@ &sdhc_2 { status = "okay"; }; +&tlmm { + ethernet_defaults: ethernet-defaults-state { + mdc-pins { + pins = "gpio113"; + function = "rgmii"; + bias-pull-up; + }; + + mdio-pins { + pins = "gpio114"; + function = "rgmii"; + bias-pull-up; + }; + + rgmii-rx-pins { + pins = "gpio81", "gpio82", "gpio83", "gpio102", "gpio103", "gpio112"; + function = "rgmii"; + bias-disable; + drive-strength = <2>; + }; + + rgmii-tx-pins { + pins = "gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio97"; + function = "rgmii"; + bias-pull-up; + drive-strength = <16>; + }; + + phy-intr-pins { + pins = "gpio121"; + function = "gpio"; + bias-disable; + drive-strength = <8>; + }; + + phy-reset-pins { + pins = "gpio104"; + function = "gpio"; + bias-pull-up; + drive-strength = <16>; + }; + + pps-pins { + pins = "gpio91"; + function = "rgmii"; + bias-disable; + drive-strength = <8>; + }; + }; +}; + &uart0 { status = "okay"; };