From patchwork Tue Dec 12 11:58:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suraj Jaiswal X-Patchwork-Id: 177285 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp7669041vqy; Tue, 12 Dec 2023 03:59:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IGeb1QTuYebHnuj8Xv98C8CMgO4lWZ0KgnxfgjXwhPogj0bAPqD7GnZ2AcNH35gxh/SjczT X-Received: by 2002:a17:903:244e:b0:1d0:b6d1:d442 with SMTP id l14-20020a170903244e00b001d0b6d1d442mr8774893pls.62.1702382383024; Tue, 12 Dec 2023 03:59:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702382383; cv=none; d=google.com; s=arc-20160816; b=ZEOrz/5g9izsZv8JlQ01vz4zt+ogy1GrGL9og2p9vxlqWEvbF+A1aOPABHIcUD/9pJ 6/9Ju0hEntUkLzSZ6YbyEmQLLo/BW5Fhu81VwB3eXGuy0N1QGyPlNYi8+9xRiLHqNoUf r9oEQJ6Wnf4BpSlj7MY0AC8ZejGiVUT9DWzM7YsPN5R3UQgpHOw2SIWh1q7ncSKAajQd eo23sUyjfP5vkXpgEoy45hoMWszstuz65Sxp85M4frldnc+psWhntjLPGdLOmlCHg/+W T4RuB55S5DT9eaR6cUiANLYUcriWVN/chuQSG8g9+j+gT2eia+IKom0lghQSoLElYS1/ jQzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=B+sgRFv5yp3Rlr3nFlR9pT+L2BHT0szx2DeDHoUL8MA=; fh=AO1athPla3jqhCn4k6adBHi7gs3A5EcpzQmM6u71SYU=; b=UAXBTSjXmc8JX0WF5DuuJsuweSehpineQgLxDp1GLoIpAhqvwlFM2m6iwtMwh/l4XN SUXs+T2vgiLjch1kg7aw+cm0srAbl4v4dD2Vck2WexXaPm5ArEWO3HoiBivlY//YIxKN fYXxLD4b4nxxyrHKqC6lGtJ95YaiZN+iDJbK79JYH/QsQrHMDpG/QyqDXK9i6KYO30Ij A/jGvI2YtF00XFXDXGwoHdE9ViTj8VCmd55jhNxQwVmiiU6xD3BK+sGdxDlM9mwCq9/S 6RvBgQ1kqCi3sXFq8Gz65r9CJfEqaeseZsPBazliavGk78cRBoAQTOmmV6+HiCmXAZd9 3ueA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=oEoZIln8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id i4-20020a170902c94400b001d2ebb106e0si7428753pla.4.2023.12.12.03.59.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 03:59:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=oEoZIln8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 73DD08021587; Tue, 12 Dec 2023 03:59:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346385AbjLLL70 (ORCPT + 99 others); Tue, 12 Dec 2023 06:59:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346389AbjLLL7Z (ORCPT ); Tue, 12 Dec 2023 06:59:25 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 947F8C3; Tue, 12 Dec 2023 03:59:31 -0800 (PST) Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BCBgEhA029961; Tue, 12 Dec 2023 11:59:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= qcppdkim1; bh=B+sgRFv5yp3Rlr3nFlR9pT+L2BHT0szx2DeDHoUL8MA=; b=oE oZIln8pjgk/O5iJY1FWn37F0dq+BJ/BQG15jxX8afwBJDcbY9md3ZdIuoU+L6VTw T4ZmtYPs5FDGUivQ8UKYYe/iVJB1x/B2ckx5UoAOfsz8bzk7FB7pNW/REDXn1CB6 XkWgnDzyWMO8ICKip4uVciBm+dtPYkgMphmn6YKEYUQS4f+Bd4o0wlt9+L/AHHbi t0ErZ+Wkg27MP9cC/yBeQm7mWjbLfihkkjGLK082ufWILa8rhTrdCueuFHp+iXsj 7KrJV8vahzzW5FGXKgiefsJbG4zXhv7822SXbUbIfCOr+CDrdupayp/wGNdmrNAl QJgBWXnqYcVEIZuk24vw== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3uxgbb0xw8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Dec 2023 11:59:19 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3BCBxIMa025475 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Dec 2023 11:59:18 GMT Received: from hu-jsuraj-hyd.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Tue, 12 Dec 2023 03:59:08 -0800 From: Suraj Jaiswal To: , Vinod Koul , Bhupesh Sharma , Andy Gross , Bjorn Andersson , Konrad Dybcio , "David S. Miller" , Eric Dumazet , "Jakub Kicinski" , Rob Herring , "Krzysztof Kozlowski" , Conor Dooley , Alexandre Torgue , "Jose Abreu" , Maxime Coquelin , , , , , , Prasad Sodagudi , Andrew Halaney , Rob Herring CC: Subject: [PATCH net-next v6 1/3] dt-bindings: net: qcom,ethqos: add binding doc for safety IRQ for sa8775p Date: Tue, 12 Dec 2023 17:28:39 +0530 Message-ID: <20231212115841.3800241-2-quic_jsuraj@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231212115841.3800241-1-quic_jsuraj@quicinc.com> References: <20231212115841.3800241-1-quic_jsuraj@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: Bm0dyaX7Thdojr3nNLZWVD5qYGUn9S3Y X-Proofpoint-ORIG-GUID: Bm0dyaX7Thdojr3nNLZWVD5qYGUn9S3Y X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 malwarescore=0 impostorscore=0 suspectscore=0 lowpriorityscore=0 mlxscore=0 bulkscore=0 clxscore=1015 spamscore=0 adultscore=0 mlxlogscore=999 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312120096 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 12 Dec 2023 03:59:40 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785077309595949439 X-GMAIL-MSGID: 1785077309595949439 Add binding doc for safety IRQ. The safety IRQ will be triggered for ECC(error correction code), DPP(data path parity), FSM(finite state machine) error. Signed-off-by: Suraj Jaiswal Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/net/qcom,ethqos.yaml | 9 ++++++--- Documentation/devicetree/bindings/net/snps,dwmac.yaml | 6 ++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/net/qcom,ethqos.yaml b/Documentation/devicetree/bindings/net/qcom,ethqos.yaml index 7bdb412a0185..69a337c7e345 100644 --- a/Documentation/devicetree/bindings/net/qcom,ethqos.yaml +++ b/Documentation/devicetree/bindings/net/qcom,ethqos.yaml @@ -37,12 +37,14 @@ properties: items: - description: Combined signal for various interrupt events - description: The interrupt that occurs when Rx exits the LPI state + - description: The interrupt that occurs when HW safety error triggered interrupt-names: minItems: 1 items: - const: macirq - - const: eth_lpi + - enum: [eth_lpi, sfty] + - const: sfty clocks: maxItems: 4 @@ -89,8 +91,9 @@ examples: <&gcc GCC_ETH_PTP_CLK>, <&gcc GCC_ETH_RGMII_CLK>; interrupts = , - ; - interrupt-names = "macirq", "eth_lpi"; + , + ; + interrupt-names = "macirq", "eth_lpi", "sfty"; rx-fifo-depth = <4096>; tx-fifo-depth = <4096>; diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index 5c2769dc689a..9b04e2ed7c18 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -107,13 +107,15 @@ properties: - description: Combined signal for various interrupt events - description: The interrupt to manage the remote wake-up packet detection - description: The interrupt that occurs when Rx exits the LPI state + - description: The interrupt that occurs when HW safety error triggered interrupt-names: minItems: 1 items: - const: macirq - - enum: [eth_wake_irq, eth_lpi] - - const: eth_lpi + - enum: [eth_wake_irq, eth_lpi, sfty] + - enum: [eth_wake_irq, eth_lpi, sfty] + - enum: [eth_wake_irq, eth_lpi, sfty] clocks: minItems: 1 From patchwork Tue Dec 12 11:58:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suraj Jaiswal X-Patchwork-Id: 177286 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp7669080vqy; Tue, 12 Dec 2023 03:59:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IEa0DFiX9oQrrVHjrbFLKbNr9Xc3bYpLcHTjK3dBjjtvQd3V60MlgJ0ENo4U4zOH4t61YqW X-Received: by 2002:a05:6a21:3398:b0:18b:9093:ff13 with SMTP id yy24-20020a056a21339800b0018b9093ff13mr7405351pzb.52.1702382388663; Tue, 12 Dec 2023 03:59:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702382388; cv=none; d=google.com; s=arc-20160816; b=ts7uS2wv6fRSXCkwkfBT2L/ksQ8aA564n6d/gVlhaFZhK1cYedtxb9i6m5WpcrHfrY oeILExtXEcBnzqsbR3MZZRekMQJu10pbeKJzTJbIjEC9YvwOs/bREv31Jg/7CX+9MB8y hHWMpvlFEy+8KGvqBjOOL/xSDUeAfUsbsKWD7YX2MIA0oayrwAYa39sk4yxD7cdnLrTc YVUMK5fQhmLR0Jet6Bxe9663R9lbiyVnBdXVL3hcTl7rsrxf1OhPU2NFP+tHhXAfbuyW 63buuz9n8u42Kv8aQtCl5dJtRo68ifcOYIhixZAh5OHN2W3oruSz+hI+aoUiDE4Kg4kQ 0yLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eGw0cQhVrtcmurS3n/ixC3C1je1QddxvzESq1C6/PT8=; fh=AO1athPla3jqhCn4k6adBHi7gs3A5EcpzQmM6u71SYU=; b=mV2pGI6G9D98C3L78TM9gulFCjczFd8ITHrZsLaUyt2ttV6RtLM4apDuEjHLsgGqyL 7/Jolt8zSGjcyKeRW0EMmqPZL2rAHItOE4uGNGmBWzxz9R0LFRthVweo4H5fGFBat6QV 3OFuc3mrDL310feqQVVwuFqlF+Ql5h+NXADPZRx5DY0Rs2UjD/vr9QT3F6afcVBcT21T gLQeOQ8U4qj6xWXYHViX/QAcPmDowJh80y6X2IUyY/WCIxPdchVIngtl6z7e1Q0Idzh4 AZIK0FihoCbKHPigIpSCV4Kb5rZ+nvCC6x3g5udj3xVVSoriwcWhK+zG0f1yOzwRYBXT Yl8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="I/8KUQAa"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id v10-20020a65568a000000b005be18ddf8b4si7616264pgs.646.2023.12.12.03.59.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 03:59:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="I/8KUQAa"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 157AA804BDD9; Tue, 12 Dec 2023 03:59:47 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346389AbjLLL7h (ORCPT + 99 others); Tue, 12 Dec 2023 06:59:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346377AbjLLL7f (ORCPT ); Tue, 12 Dec 2023 06:59:35 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD124F3; Tue, 12 Dec 2023 03:59:41 -0800 (PST) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BC7gRwX028744; Tue, 12 Dec 2023 11:59:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= qcppdkim1; bh=eGw0cQhVrtcmurS3n/ixC3C1je1QddxvzESq1C6/PT8=; b=I/ 8KUQAaqcUdeBzl/iO3A+Mgm9tL20Fe6rpDxjI2g7R48aTag3tMCIowhaiN5jga7n sN0UYGlnmG92JATG/KXbznAaWWevI3HimD9iRgWFvSkHcHG5gbZwCKdTQ6CRW8uv FTsIBs9rXIx2Nfd4eXSUmOFVNd3FVbXAyR1q/Vm7a7xqDgeWYDAyk2L2u7F2Rsou nBM7Ev1cbDGRGBtxTF4DCoWPweA0PPmLeElnPlijE6iV6bJv+qS9PxIkmpbCM7Z+ P/jz3i2RFAUZhFNCYyJd4ju6Ikg9nyjYaLzRiSm9oWkXZXmBbemzbaje/w09f3v2 j3LYRiUW8xholTYg9YRg== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3uxkc80jkr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Dec 2023 11:59:26 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3BCBxPl3009396 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Dec 2023 11:59:25 GMT Received: from hu-jsuraj-hyd.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Tue, 12 Dec 2023 03:59:15 -0800 From: Suraj Jaiswal To: , Vinod Koul , Bhupesh Sharma , Andy Gross , Bjorn Andersson , Konrad Dybcio , "David S. Miller" , Eric Dumazet , "Jakub Kicinski" , Rob Herring , "Krzysztof Kozlowski" , Conor Dooley , Alexandre Torgue , "Jose Abreu" , Maxime Coquelin , , , , , , Prasad Sodagudi , Andrew Halaney , Rob Herring CC: Subject: [PATCH net-next v6 2/3] arm64: dts: qcom: sa8775p: enable safety IRQ Date: Tue, 12 Dec 2023 17:28:40 +0530 Message-ID: <20231212115841.3800241-3-quic_jsuraj@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231212115841.3800241-1-quic_jsuraj@quicinc.com> References: <20231212115841.3800241-1-quic_jsuraj@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 3pL_bZvDRVXc3uadJ_iiduOUHTkc5u7k X-Proofpoint-ORIG-GUID: 3pL_bZvDRVXc3uadJ_iiduOUHTkc5u7k X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_01,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 priorityscore=1501 mlxlogscore=700 suspectscore=0 bulkscore=0 malwarescore=0 adultscore=0 impostorscore=0 spamscore=0 mlxscore=0 phishscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312120096 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 12 Dec 2023 03:59:47 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785077315472346994 X-GMAIL-MSGID: 1785077315472346994 Add changes to support safety IRQ handling support for ethernet. Signed-off-by: Suraj Jaiswal Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sa8775p.dtsi | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sa8775p.dtsi b/arch/arm64/boot/dts/qcom/sa8775p.dtsi index 2da567a6f64e..36380a4d2b0e 100644 --- a/arch/arm64/boot/dts/qcom/sa8775p.dtsi +++ b/arch/arm64/boot/dts/qcom/sa8775p.dtsi @@ -2394,8 +2394,9 @@ ethernet1: ethernet@23000000 { <0x0 0x23016000 0x0 0x100>; reg-names = "stmmaceth", "rgmii"; - interrupts = ; - interrupt-names = "macirq"; + interrupts = , + ; + interrupt-names = "macirq", "sfty"; clocks = <&gcc GCC_EMAC1_AXI_CLK>, <&gcc GCC_EMAC1_SLV_AHB_CLK>, @@ -2427,8 +2428,9 @@ ethernet0: ethernet@23040000 { <0x0 0x23056000 0x0 0x100>; reg-names = "stmmaceth", "rgmii"; - interrupts = ; - interrupt-names = "macirq"; + interrupts = , + ; + interrupt-names = "macirq", "sfty"; clocks = <&gcc GCC_EMAC0_AXI_CLK>, <&gcc GCC_EMAC0_SLV_AHB_CLK>, From patchwork Tue Dec 12 11:58:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suraj Jaiswal X-Patchwork-Id: 177287 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp7669591vqy; Tue, 12 Dec 2023 04:00:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IHqthCdWCa6EU9GuwuYiMadNFl7CIb5ffPvGca/sra4A3hkdGGr6hVJvQBv+HwascixXtC2 X-Received: by 2002:a05:6870:70a4:b0:1fb:75c:4016 with SMTP id v36-20020a05687070a400b001fb075c4016mr7781509oae.118.1702382435141; Tue, 12 Dec 2023 04:00:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702382435; cv=none; d=google.com; s=arc-20160816; b=eiVIGPJMWT0TwpCxSHZWCzMjr4BnTY0XK4cRM/op4zgso04T9TYkQNB7AqBjGBUNiv 1A0qTPPeFyQaY7wjpXdKbJmj9sqboh1/WDiwNyacS9DmI5lGjpWRHpE6+Uu1igWXyHxE oLVjZ6A046kU+hvsS9j31EtD5ghpyiSEHS7y0igOXlP1gSiD/ui/h7id/sIyL4PBT4Nn R0E8Vfe/8/fIlJY5f2U9f0pkoHMH/avCn5ZmtQkZBN+zjObiS9FVh02y5P/UlVyqJGcN rJ3EKeeih+PbEJo7vp9+/v8900/j5HRCjnHdGVqCpRnwLIyUi7K3O48Awt6PZAtbPos8 Kpiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=g6HqMetjFG/uo5SDnsvOVJKxQYze5a/R9LJ9E8Klzso=; fh=AO1athPla3jqhCn4k6adBHi7gs3A5EcpzQmM6u71SYU=; b=0C4gyltI3QlCObWaSuoAafq8QeSzQpvFY1bc0d6JBRDbQgMg5jjfFWmcIZoL+zH1Fn 2Othrv7KXlztF40py+55+M6mhVk3f6wA9RtNxLq27f5/xV9wVnc6I49Eb3Wfol71y+CI e1SoX4xxrQcInLgE7X9I1Kn7ElEq7W9ifeOT+MG2Z1fqz49rpp2SIxgePbZknl2Se8HO zmeOwliI5FGjXCCCkpN6BZl++cePt/g/pQSJPGXPsBYX/3+wbOpPOsz5jh/WpdkOTur/ t/nZx0XlNYmVLYm0kuYsgJ78fba2/V1PFHCjj6P/4aEU7pqK2Ma48pXcyhWuTF7vIx8p ZQmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=olslnvGn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id u2-20020a63df02000000b005be03f0da7csi7648112pgg.61.2023.12.12.04.00.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 04:00:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=olslnvGn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 0E746807C554; Tue, 12 Dec 2023 04:00:11 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346413AbjLLL7p (ORCPT + 99 others); Tue, 12 Dec 2023 06:59:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346408AbjLLL7l (ORCPT ); Tue, 12 Dec 2023 06:59:41 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F393F3; Tue, 12 Dec 2023 03:59:47 -0800 (PST) Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BCBhcpk030173; Tue, 12 Dec 2023 11:59:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= qcppdkim1; bh=g6HqMetjFG/uo5SDnsvOVJKxQYze5a/R9LJ9E8Klzso=; b=ol slnvGnb060VMJW0ZLhGajsbCt0aUwC/Qy9ctV0BcqOuspLYnNPJtvGM2EqDljKOr rnvNZMei9V6DEcIWwMFZn8NdmEeENrmalsStYVSI5005zITMMz7pBj3dIfy6xk6O 3SfxaY+B8CWfMQGh0op2YwqhDNxWVnX6pHs+5qAloK26ge+ZgzJBUKeKb1soeSJi xnEw/m+hTLfsjfyBtRA0gKnxrbwKBW9mHogdj55jZDDJAGrZP4hagESP7ZFLX2vt OELJ2MjiHQoFU0gtkxC+Xv+rmMGJCvlSyi8TZoUWl04hfCkBqesOL7yRmy5O8vaI 4ex6/XlPjYQcGdNHkvPw== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3uxa901n4k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Dec 2023 11:59:34 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3BCBxXNU020070 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Dec 2023 11:59:33 GMT Received: from hu-jsuraj-hyd.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Tue, 12 Dec 2023 03:59:23 -0800 From: Suraj Jaiswal To: , Vinod Koul , Bhupesh Sharma , Andy Gross , Bjorn Andersson , Konrad Dybcio , "David S. Miller" , Eric Dumazet , "Jakub Kicinski" , Rob Herring , "Krzysztof Kozlowski" , Conor Dooley , Alexandre Torgue , "Jose Abreu" , Maxime Coquelin , , , , , , Prasad Sodagudi , Andrew Halaney , Rob Herring CC: Subject: [PATCH net-next v6 3/3] net: stmmac: Add driver support for DWMAC5 common safety IRQ Date: Tue, 12 Dec 2023 17:28:41 +0530 Message-ID: <20231212115841.3800241-4-quic_jsuraj@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231212115841.3800241-1-quic_jsuraj@quicinc.com> References: <20231212115841.3800241-1-quic_jsuraj@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: nF5iIgNy9QigahSqW3PLAJDn9BhcnrV7 X-Proofpoint-ORIG-GUID: nF5iIgNy9QigahSqW3PLAJDn9BhcnrV7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 phishscore=0 adultscore=0 mlxlogscore=999 malwarescore=0 impostorscore=0 mlxscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 bulkscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312120096 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 12 Dec 2023 04:00:11 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785077364332871295 X-GMAIL-MSGID: 1785077364332871295 Add support to listen HW safety IRQ like ECC(error correction code), DPP(data path parity), FSM(finite state machine) fault in common IRQ line. Signed-off-by: Suraj Jaiswal --- drivers/net/ethernet/stmicro/stmmac/common.h | 1 + drivers/net/ethernet/stmicro/stmmac/stmmac.h | 3 +++ .../net/ethernet/stmicro/stmmac/stmmac_main.c | 21 +++++++++++++++++++ .../ethernet/stmicro/stmmac/stmmac_platform.c | 9 ++++++++ 4 files changed, 34 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h index 721c1f8e892f..b9233b09b80f 100644 --- a/drivers/net/ethernet/stmicro/stmmac/common.h +++ b/drivers/net/ethernet/stmicro/stmmac/common.h @@ -344,6 +344,7 @@ enum request_irq_err { REQ_IRQ_ERR_ALL, REQ_IRQ_ERR_TX, REQ_IRQ_ERR_RX, + REQ_IRQ_ERR_SFTY, REQ_IRQ_ERR_SFTY_UE, REQ_IRQ_ERR_SFTY_CE, REQ_IRQ_ERR_LPI, diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h index 9f89acf31050..ca3d93851bed 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h @@ -31,6 +31,7 @@ struct stmmac_resources { int wol_irq; int lpi_irq; int irq; + int sfty_irq; int sfty_ce_irq; int sfty_ue_irq; int rx_irq[MTL_MAX_RX_QUEUES]; @@ -297,6 +298,7 @@ struct stmmac_priv { void __iomem *ptpaddr; void __iomem *estaddr; unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)]; + int sfty_irq; int sfty_ce_irq; int sfty_ue_irq; int rx_irq[MTL_MAX_RX_QUEUES]; @@ -305,6 +307,7 @@ struct stmmac_priv { char int_name_mac[IFNAMSIZ + 9]; char int_name_wol[IFNAMSIZ + 9]; char int_name_lpi[IFNAMSIZ + 9]; + char int_name_sfty[IFNAMSIZ + 10]; char int_name_sfty_ce[IFNAMSIZ + 10]; char int_name_sfty_ue[IFNAMSIZ + 10]; char int_name_rx_irq[MTL_MAX_TX_QUEUES][IFNAMSIZ + 14]; diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 47de466e432c..6cf289f192a7 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -3592,6 +3592,10 @@ static void stmmac_free_irq(struct net_device *dev, if (priv->wol_irq > 0 && priv->wol_irq != dev->irq) free_irq(priv->wol_irq, dev); fallthrough; + case REQ_IRQ_ERR_SFTY: + if (priv->sfty_irq > 0 && priv->sfty_irq != dev->irq) + free_irq(priv->sfty_irq, dev); + fallthrough; case REQ_IRQ_ERR_WOL: free_irq(dev->irq, dev); fallthrough; @@ -3759,6 +3763,7 @@ static int stmmac_request_irq_single(struct net_device *dev) struct stmmac_priv *priv = netdev_priv(dev); enum request_irq_err irq_err; int ret; + char *int_name; ret = request_irq(dev->irq, stmmac_interrupt, IRQF_SHARED, dev->name, dev); @@ -3798,6 +3803,20 @@ static int stmmac_request_irq_single(struct net_device *dev) } } + if (priv->sfty_irq > 0 && priv->sfty_irq != dev->irq) { + int_name = priv->int_name_sfty; + sprintf(int_name, "%s:%s", dev->name, "safety"); + ret = request_irq(priv->sfty_irq, stmmac_safety_interrupt, + 0, int_name, dev); + if (unlikely(ret < 0)) { + netdev_err(priv->dev, + "%s: alloc safety failed %d (error: %d)\n", + __func__, priv->sfty_irq, ret); + irq_err = REQ_IRQ_ERR_SFTY; + goto irq_error; + } + } + return 0; irq_error: @@ -7462,8 +7481,10 @@ int stmmac_dvr_probe(struct device *device, priv->dev->irq = res->irq; priv->wol_irq = res->wol_irq; priv->lpi_irq = res->lpi_irq; + priv->sfty_irq = res->sfty_irq; priv->sfty_ce_irq = res->sfty_ce_irq; priv->sfty_ue_irq = res->sfty_ue_irq; + for (i = 0; i < MTL_MAX_RX_QUEUES; i++) priv->rx_irq[i] = res->rx_irq[i]; for (i = 0; i < MTL_MAX_TX_QUEUES; i++) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index 1ffde555da47..3808a3225a7d 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -726,6 +726,15 @@ int stmmac_get_platform_resources(struct platform_device *pdev, dev_info(&pdev->dev, "IRQ eth_lpi not found\n"); } + stmmac_res->sfty_irq = + platform_get_irq_byname_optional(pdev, "sfty"); + + if (stmmac_res->sfty_irq < 0) { + if (stmmac_res->sfty_irq == -EPROBE_DEFER) + return -EPROBE_DEFER; + dev_info(&pdev->dev, "IRQ safety IRQ not found\n"); + } + stmmac_res->addr = devm_platform_ioremap_resource(pdev, 0); return PTR_ERR_OR_ZERO(stmmac_res->addr);