From patchwork Mon Dec 4 13:26:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suraj Jaiswal X-Patchwork-Id: 173342 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp2766981vqy; Mon, 4 Dec 2023 05:39:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IF7hf69e8sCTIeoDN3znZ5KMOb573C0KbFleZQv3Lj3uOB1GNoChgTjU+0fILzTY4RdwlG6 X-Received: by 2002:a05:6a00:9387:b0:6ce:2731:c243 with SMTP id ka7-20020a056a00938700b006ce2731c243mr1563344pfb.50.1701697168480; Mon, 04 Dec 2023 05:39:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701697168; cv=none; d=google.com; s=arc-20160816; b=kMG6DaaUVb3zQth5Z1g7Lz/7+IOkZmv+v/EVY3b0iFJUySKLBTPm3geDZCtxVNF8hQ OiZNITP7B8crBzq2IN3bAwKYWrYqVMIBukK3EGgVxfPY47OsSKT8QqxNkg4icmf8AbwT +4AkAQ8dyN59DTG468sKR8QCKxmAyVObledqbAAhAsZXujq2GDa/tUJ1iCOwpqRuZbuK WRcLA945RX+k49K0nhIuhKG3ieqR9W7ynyFGWsopNPS9IoYmBoVTpxJYOAoRQwxlDhDD YXO/xVTS4njxBneKiLVv402iL84EQH0ci4klOr3GXELc+t9DIUIX+cqrDbu+GvavxCb9 Xwtw== 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=A420T9ttVpumdwIV5qdytA1YgUXLFLdy0M7vqioUvzk=; fh=gw1nGGRvPTMpMB1+2yIHl2JD2hbsUI2mdSe/41PDYQ8=; b=fp9RpPkx0JQp4nICgQrdCVSAPCdxdGNweJhTjYHI4vEQWpgBDb4QVkrP45BXvlNiJH uz888fsP6EJFFwjgaDwCjTBexIz+psCiyLevTpGoJ+qZ64FHRtc0DogorKcQlmQoDIzD ePbeF0IbRzs63s43X2LHnQcgwUyj3bV0PT3r7/3vaBDv18nHcFRa66LS799zWyG5sbMD Jt2rc1O8HgyuvSJ25VUahE3RyzJAs6RGUFGmqXNkS5rk7M2Vs4ZdLR7Hj+wT62y57Hk4 bTSnuLbPfGb85ToTTPoIAylC82Oz6qyftucUzzQ36PqWQzBqwUb8Bt+TFy5TMqdn9AZY 92gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=pshjIxgF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id q5-20020a056a00150500b006cb4d47cfa9si8028315pfu.270.2023.12.04.05.39.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 05:39:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=pshjIxgF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id 14D39804130E; Mon, 4 Dec 2023 05:39:20 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344524AbjLDNig (ORCPT + 99 others); Mon, 4 Dec 2023 08:38:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235749AbjLDNiU (ORCPT ); Mon, 4 Dec 2023 08:38:20 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E359D5; Mon, 4 Dec 2023 05:27:10 -0800 (PST) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B4CqjIu000920; Mon, 4 Dec 2023 13:26:57 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=A420T9ttVpumdwIV5qdytA1YgUXLFLdy0M7vqioUvzk=; b=pshjIxgFoNFYiwcpcXI/FVPTejmwu97iA2xn4KE2iiuCRU7DLzuvLVIE2Apm7wm81isT Q5FaY/lQjmxu6vbLYg/ObGN8spf7nDy4W7fs6nHElCywBC+V38cuV0ZsmNPLWuAobyUN O7uBeBFcb0S0fl2Ehcg5C6a97Z4fuHexqaWcVwnnpCTEH4GqOqAbNhcXEvb45NSx/qI0 tAejGr7NGJbtRALqh7a5Js4z4CU0QnC6v4IDHCInKqGC++Wj3g49g80v85VOtN4in8kd 6eNKWZzeX++rRtsrgFQQc4lXAiyHZfvrfTxErLC/uVctr37FXLJ4WqcoXE45wPLi9c0h 8A== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3uqsxw4f4j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 04 Dec 2023 13:26:56 +0000 Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3B4DQtGU003830 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 4 Dec 2023 13:26:55 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; Mon, 4 Dec 2023 05:26:46 -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 CC: Subject: [PATCH net-next v3 1/3] dt-bindings: net: qcom,ethqos: add binding doc for safety IRQ for sa8775p Date: Mon, 4 Dec 2023 18:56:15 +0530 Message-ID: <2f215e2dabec345ec7f28e759c9463854959cced.1701695218.git.quic_jsuraj@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: 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-ORIG-GUID: yHVVmVAcoMtWDmAY5RRuzcM7Ay3_fBbV X-Proofpoint-GUID: yHVVmVAcoMtWDmAY5RRuzcM7Ay3_fBbV 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-04_11,2023-11-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 suspectscore=0 mlxscore=0 bulkscore=0 spamscore=0 clxscore=1015 priorityscore=1501 mlxlogscore=999 malwarescore=0 impostorscore=0 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2312040100 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 pete.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 (pete.vger.email [0.0.0.0]); Mon, 04 Dec 2023 05:39:20 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784358810312384658 X-GMAIL-MSGID: 1784358810312384658 Add binding doc for safety IRQ. The safety IRQ will be triggered for ECC, DPP, FSM error. Signed-off-by: Suraj Jaiswal --- Documentation/devicetree/bindings/net/qcom,ethqos.yaml | 9 ++++++--- Documentation/devicetree/bindings/net/snps,dwmac.yaml | 5 +++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/net/qcom,ethqos.yaml b/Documentation/devicetree/bindings/net/qcom,ethqos.yaml index 7bdb412a0185..93d21389e518 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, safety] + - const: safety 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", "safety"; 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..82ddee0ed1d1 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -107,13 +107,14 @@ 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, safety] + - enum: [eth_wake_irq, safety] clocks: minItems: 1 From patchwork Mon Dec 4 13:26:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suraj Jaiswal X-Patchwork-Id: 173336 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp2761097vqy; Mon, 4 Dec 2023 05:29:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IFFUxxCIUhfR18anQnORh3TjpTgtMcR3WXvV6wJQPCjV5sVsuBc/x+rWg+I/ynKlLeLSW1T X-Received: by 2002:a05:6a00:87:b0:6ce:5190:1ff8 with SMTP id c7-20020a056a00008700b006ce51901ff8mr1656040pfj.34.1701696569683; Mon, 04 Dec 2023 05:29:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701696569; cv=none; d=google.com; s=arc-20160816; b=Sr4zqESHRtT00BntDswrNiaY7pyPBY/mNqzp0iKuO/VibSrOmHv6ETm6jqPvnnUddr dqQ8ZKOaqdDVPrXXHJukBnSA+fYCETxViGv+eOxntuIpqBcS04Br/QnvLalYq03CavGP W7xs55R9rWoWjVQb0gE5Pd/h8z22/pbU/NZ1P4z1mSPYoN1ek9bbUyRunUadqgIiG0Rf rQ79ZsgNkSOazQ1fQlKsMsWgmBLET9f1DncUo4Giu7rLf02yqm7tq8A+XPg6SgJPtukw cK2X+WidHs3eyOxhbcq/UzmdH6oyrkuuku95JFWSzyEQ4Fpdc7vOnvR+WwNcFW//Fvk3 s8tQ== 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=x6LE3MtLGhTYFhqYeP5YLz7sqj7w/XAt98FOhZLnZRI=; fh=gw1nGGRvPTMpMB1+2yIHl2JD2hbsUI2mdSe/41PDYQ8=; b=oKmARcbexPKPuhDogQSW2oDWi5GEfK07b46sTB4ZopDqGfrAUuocg5oZCCnvYEQkMl z8UbbwjouuUxrmjjd2zXXlri3Hm0pngUUOX3zDK/zwZYjL5jglMfCZtcpe2BfMp29wBp zdA2TE/N5QIESoaI1fgXpvtje+QQpCEkZdMe9HojcNO/x+MiVS7je5kCOmLXpFSgBYJO kOneNS8n43S2lEF0PBUbF9G8yjEOcxlegGM7Y34hn22+0qHiXDPBfc21UVQpAFnlFX1i C4BqycZ0LYcE02Edrlt4TL+tpk6zgYmOb9Pz8Gu5C1ZjBInKSvsrn9o+5XHg4CzYSCs4 yzng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=V22Vl24d; 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 r18-20020a63d912000000b005b938759695si7721078pgg.886.2023.12.04.05.29.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 05:29:29 -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=V22Vl24d; 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 9066580A30E5; Mon, 4 Dec 2023 05:29:28 -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 S235598AbjLDN3Q (ORCPT + 99 others); Mon, 4 Dec 2023 08:29:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235658AbjLDN3D (ORCPT ); Mon, 4 Dec 2023 08:29:03 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE25726B3; Mon, 4 Dec 2023 05:27:27 -0800 (PST) Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B4Ce4AF011000; Mon, 4 Dec 2023 13:27:05 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=x6LE3MtLGhTYFhqYeP5YLz7sqj7w/XAt98FOhZLnZRI=; b=V22Vl24djUnUDIxatSXKFmWeDnk9oVMX+fnxLSOYexdpIp8skG/kd8Tq6l6bjN++lGRn uET2d3l9B4aY3gXfM+EmThe8VMVuLJ6+HAdpHQgzhBtFyw+e8qGLDKnGHwYydovjAHQt 9IUudU73DC9hFaJ183Q3cNstgy/q2+YJWu7elleFfJeJA01DrWFP1rnJjVBtG34oCGUv JpPDhXzmSlj4RTdjfnpDcZ+qm4NqxPyp7uaA9x3P8T53+AzJYkKgmDcGtQxmNui+Cqzh QI14rZqMR7QUozeTXbty7zxGTnBVaRi0kOifTk5YNffOO6C5F4Zy/o6pc1Rg2UKDagc0 7g== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3usdfwge2r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 04 Dec 2023 13:27:04 +0000 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 3B4DR2sf012818 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 4 Dec 2023 13:27:02 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; Mon, 4 Dec 2023 05:26:53 -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 CC: Subject: [PATCH net-next v3 2/3] arm64: dts: qcom: sa8775p: enable safety IRQ Date: Mon, 4 Dec 2023 18:56:16 +0530 Message-ID: <60c5e8ba8536538966fa4b22ccbd8345f8869a15.1701695218.git.quic_jsuraj@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: 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: oFYomotq8I7OHHagPXN7ns1P349Pk735 X-Proofpoint-ORIG-GUID: oFYomotq8I7OHHagPXN7ns1P349Pk735 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-04_12,2023-12-04_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxlogscore=662 mlxscore=0 suspectscore=0 lowpriorityscore=0 adultscore=0 priorityscore=1501 phishscore=0 spamscore=0 malwarescore=0 clxscore=1015 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2312040101 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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]); Mon, 04 Dec 2023 05:29:28 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784358181916721384 X-GMAIL-MSGID: 1784358181916721384 Add changes to support safety IRQ Handling Support for ethernet. Signed-off-by: Suraj Jaiswal --- 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 13dd44dd9ed1..c92d8f9b92f5 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", "safety"; 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", "safety"; clocks = <&gcc GCC_EMAC0_AXI_CLK>, <&gcc GCC_EMAC0_SLV_AHB_CLK>, From patchwork Mon Dec 4 13:26:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suraj Jaiswal X-Patchwork-Id: 173340 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp2766815vqy; Mon, 4 Dec 2023 05:39:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IE3N7iZjpdFFqUwehsV+vfpRXQV6tdPt9VmFhbJgyKV0PVvKJaA0IlinpygPUFOL6XbJJPF X-Received: by 2002:a05:6a00:4484:b0:6cb:4361:9f75 with SMTP id cu4-20020a056a00448400b006cb43619f75mr1382447pfb.22.1701697150393; Mon, 04 Dec 2023 05:39:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701697150; cv=none; d=google.com; s=arc-20160816; b=j1I1i7ddh2+7ZVIcrtmGCmYnxjU2QQXxCJy7i+bYqNCHujB6px9ck4FBvA+3Sntfv6 d2AelBTcFMTQQCT1+2tYevswD80+rKuxXMxFq9AGWq29vAQgSkNor2LaHZW4IVycPslG iuvD1tuP5q0eHzg3K65yxz0+C4jeZX7cWP58+dtjp0j6GQcrivgUlSTxB3tbuEhiH/Vg nEokMg/a0hL3p2HsaNqplnoZJcvXLpOMx8nwtxj0U3GfTl1H7LuVt2lbfPpEzVv9qt/x Ct3OpcrYHHrEizSTocgaQ86W7zEoIfBJxk815ExNGkjPJiGE1dpNVpjla3knkm3eCe3u CTJg== 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=Gcy1w3PefWJh243SAeR1phCMPiO1eZ4dlFAMhh8tH48=; fh=gw1nGGRvPTMpMB1+2yIHl2JD2hbsUI2mdSe/41PDYQ8=; b=VV8vnaJ8zsDH/iRnPAT7Kvq2fOoH1ILr77HL9C2+mrQne4fRKNxko67Er1lkVC9HyN yIVT+xfJi7Nks5kFkDFhYTpe09Mz8kJaxiOMsf7rvb1eM3bHO4h7NMtQeyQNk7KoKmy5 NfsVZp8RJb/9CALvOwf4t/mZwOLoo8UTrEvGcJuSxX+BxZHLq0v3TFWBqBo1987cilk9 hLk8/34doZKU3BjhGbJ6iVicZT+ORltMgwVaszzBCJAm3NmvkyfKrVGIi25xVDeeHwgb iTrXUs4A4IsHVviJCYSfLHCreDSdUQK+HvmKusg3q9IUP3HvNLHhdEwcQGysL/6OejPJ Xfcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=PdWrtqnQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id q20-20020a056a00151400b006cc07022e9fsi1097298pfu.57.2023.12.04.05.39.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 05:39:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=PdWrtqnQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id C8C068061370; Mon, 4 Dec 2023 05:39:06 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235662AbjLDNip (ORCPT + 99 others); Mon, 4 Dec 2023 08:38:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235661AbjLDNiX (ORCPT ); Mon, 4 Dec 2023 08:38:23 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C620926BA; Mon, 4 Dec 2023 05:27:29 -0800 (PST) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B4BcVUG013058; Mon, 4 Dec 2023 13:27:11 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=Gcy1w3PefWJh243SAeR1phCMPiO1eZ4dlFAMhh8tH48=; b=PdWrtqnQtNveZPhwR5OrfP12g66s8LeOh0cenOrAuZW/Ccuwg4c/Yx1Y42t2AXtMbySk aAu/T+yHXgORqstFAvrzQCwXn44YnCLx9r8hA/7JTe2R074jU5As8uD6YtSFbYJctOEP vHAsMaDHZvNI8OAm8ooqETrLowtRgM2IJ+aWJRsG5Tnxhmr21fMBL9UdN+Mj4xHHoBJY xy5zE3d6zhYa2dukenjD6MyZ0cJ2onFUnCmOUS9CGWDgup5qQlNZs2fZQm+u0NpLinuN mlG7bTKhaha33toYCGRz25uM+SRfMhVk8E1FzuMJqz5231h+mJt7mR0L7Ik/kT7KrWkz lA== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3uqwrvv11n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 04 Dec 2023 13:27:10 +0000 Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3B4DR9dn004045 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 4 Dec 2023 13:27:09 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; Mon, 4 Dec 2023 05:27:00 -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 CC: Subject: [PATCH net-next v3 3/3] net: stmmac: Add driver support for DWMAC5 safety IRQ Support Date: Mon, 4 Dec 2023 18:56:17 +0530 Message-ID: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: 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-ORIG-GUID: UKLH59-fwy_VhQPC-tByT52VPU6dgYiT X-Proofpoint-GUID: UKLH59-fwy_VhQPC-tByT52VPU6dgYiT 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-04_12,2023-12-04_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 malwarescore=0 bulkscore=0 lowpriorityscore=0 phishscore=0 mlxlogscore=999 suspectscore=0 priorityscore=1501 mlxscore=0 spamscore=0 clxscore=1015 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2312040101 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 howler.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 (howler.vger.email [0.0.0.0]); Mon, 04 Dec 2023 05:39:07 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784358790785301020 X-GMAIL-MSGID: 1784358790785301020 Add IRQ support to listen HW safety IRQ like ECC,DPP,FSM fault and print the fault information in the kernel log. Signed-off-by: Suraj Jaiswal --- drivers/net/ethernet/stmicro/stmmac/common.h | 1 + drivers/net/ethernet/stmicro/stmmac/stmmac.h | 2 ++ .../net/ethernet/stmicro/stmmac/stmmac_main.c | 18 ++++++++++++++++++ .../ethernet/stmicro/stmmac/stmmac_platform.c | 9 +++++++++ 4 files changed, 30 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h index 6b935922054d..c4821c7ab674 100644 --- a/drivers/net/ethernet/stmicro/stmmac/common.h +++ b/drivers/net/ethernet/stmicro/stmmac/common.h @@ -347,6 +347,7 @@ enum request_irq_err { REQ_IRQ_ERR_SFTY_UE, REQ_IRQ_ERR_SFTY_CE, REQ_IRQ_ERR_LPI, + REQ_IRQ_ERR_SAFETY, REQ_IRQ_ERR_WOL, REQ_IRQ_ERR_MAC, REQ_IRQ_ERR_NO, diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h index 686c94c2e8a7..8eac37ff002d 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h @@ -33,6 +33,7 @@ struct stmmac_resources { int irq; int sfty_ce_irq; int sfty_ue_irq; + int safety_common_irq; int rx_irq[MTL_MAX_RX_QUEUES]; int tx_irq[MTL_MAX_TX_QUEUES]; }; @@ -343,6 +344,7 @@ struct stmmac_priv { /* XDP BPF Program */ unsigned long *af_xdp_zc_qps; struct bpf_prog *xdp_prog; + int safety_common_irq; }; enum stmmac_state { diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index c2ac88aaffed..46a5cb20e4b4 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -3591,6 +3591,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_SAFETY: + if (priv->safety_common_irq > 0 && priv->safety_common_irq != dev->irq) + free_irq(priv->safety_common_irq, dev); + fallthrough; case REQ_IRQ_ERR_WOL: free_irq(dev->irq, dev); fallthrough; @@ -3797,6 +3801,18 @@ static int stmmac_request_irq_single(struct net_device *dev) } } + if (priv->safety_common_irq > 0 && priv->safety_common_irq != dev->irq) { + ret = request_irq(priv->safety_common_irq, stmmac_safety_interrupt, + 0, "safety", dev); + if (unlikely(ret < 0)) { + netdev_err(priv->dev, + "%s: alloc safety failed %d (error: %d)\n", + __func__, priv->safety_common_irq, ret); + irq_err = REQ_IRQ_ERR_SAFETY; + goto irq_error; + } + } + return 0; irq_error: @@ -7459,6 +7475,8 @@ int stmmac_dvr_probe(struct device *device, priv->lpi_irq = res->lpi_irq; priv->sfty_ce_irq = res->sfty_ce_irq; priv->sfty_ue_irq = res->sfty_ue_irq; + priv->safety_common_irq = res->safety_common_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..41a4a253d75b 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->safety_common_irq = + platform_get_irq_byname_optional(pdev, "safety"); + + if (stmmac_res->safety_common_irq < 0) { + if (stmmac_res->safety_common_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);