From patchwork Thu Oct 10 03:05:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yijie Yang X-Patchwork-Id: 13829430 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 3AC801940A2; Thu, 10 Oct 2024 03:06:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728529570; cv=none; b=rne2xLBkGUwO9TxlD7otYLILsWUGHsdKpNb4ZopRPTBoxSJXPbteEaVEPDu2gzhRKQCdpabKP84tnRXqzFp2+jNwutKmcbhuGjyxk88amwlVVBPw56mNxvwwHPNPTQ31WaRxZB6svLtmzuqOhPzVgznZuVFHo/ADTk2V99q5rzc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728529570; c=relaxed/simple; bh=9YCyxIsRM6izsmOAxvQ6MGg38sG9/3r68pXXG7ExYFM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=dO9NjUwY0AQj8CVHZvQplcIAsSMwW1BAwp+9KqOrId0n73bk2RGrzskwEPe+KTz965bkSpBSCGFPelEdbK3ssYhRNKfXMd0m/u51U7YKVZvr19jTTybcmlSwZOimYhSHI4Zf5LGxCcRxgj4LnxUWlCnufgNamcxxiCaV7T6oul0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=Ks6ZbyL7; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Ks6ZbyL7" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49A1bH5D005751; Thu, 10 Oct 2024 03:06:05 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= 54Gs2TdaP32tbXmbUdDNxHbcqBpDi2RDOnqU6iQKvjY=; b=Ks6ZbyL7Y6IxG1Ra PtRSRDwU4yiw7cJHJjEOgTRdSOipj7Nbv8vBcUiIM+JzqfIJGUgkarJ+2PP7Pq8F /7EbuaDfpdDE5tCMrgaQ6cPln3PAxdYSuXdWijD4FTrlP5vCCoeWLm2pSsfEU7J7 +V84Wk78KPlqJtSx/ybBBmsVFuU0HX5dsmGrSfAsfXTZQTMljoWm/AQCDLohZ8cR tgtjrB9xf7z3odMK4nsi+xvXeSGfEtAXu1iw8zovZzJBfO7Hr+RP7KXfVrN1X4/j lnXLGx7t/frqk1GiLxrhN2sor0kUzBk5wU6FZWqwuAwIP6FgK0L9vG35yII6DYik uSaQmQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 424yj06xgu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 10 Oct 2024 03:06:05 +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 49A364kp017058 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 10 Oct 2024 03:06: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; Wed, 9 Oct 2024 20:06:00 -0700 From: Yijie Yang Date: Thu, 10 Oct 2024 11:05:37 +0800 Subject: [PATCH 2/2] arm64: dts: qcom: qcs615-ride: Enable ethernet node Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <20241010-dts_qcs615-v1-2-05f27f6ac4d3@quicinc.com> References: <20241010-dts_qcs615-v1-0-05f27f6ac4d3@quicinc.com> In-Reply-To: <20241010-dts_qcs615-v1-0-05f27f6ac4d3@quicinc.com> To: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Richard Cochran CC: , , , , , , Yijie Yang X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1728529551; l=3052; i=quic_yijiyang@quicinc.com; s=20240408; h=from:subject:message-id; bh=9YCyxIsRM6izsmOAxvQ6MGg38sG9/3r68pXXG7ExYFM=; b=dgh861b23saf/FNbtnESHX1IjuTy5fsFXSgi/0/Oz/IGO+rxTnRwv5WoPyPfMSAJERQPTI6nA 9axfAesxLcgDCLb1cDCJIikv0vZvG3nwk6pFrlhjfuhNYbZ/1N4q4yQ X-Developer-Key: i=quic_yijiyang@quicinc.com; a=ed25519; pk=XvMv0rxjrXLYFdBXoFjTdOdAwDT5SPbQ5uAKGESDihk= 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: lt8JC8ChscMu0ZV7lSD8ioPEsg83RgOH X-Proofpoint-ORIG-GUID: lt8JC8ChscMu0ZV7lSD8ioPEsg83RgOH X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 impostorscore=0 bulkscore=0 mlxlogscore=999 mlxscore=0 adultscore=0 clxscore=1015 lowpriorityscore=0 suspectscore=0 priorityscore=1501 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410100019 Enable the ethernet node, add the phy node and pinctrl for ethernet. Signed-off-by: Yijie Yang --- arch/arm64/boot/dts/qcom/qcs615-ride.dts | 105 +++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qcs615-ride.dts b/arch/arm64/boot/dts/qcom/qcs615-ride.dts index 538e697e2dac..3d3c9edd860b 100644 --- a/arch/arm64/boot/dts/qcom/qcs615-ride.dts +++ b/arch/arm64/boot/dts/qcom/qcs615-ride.dts @@ -5,6 +5,7 @@ /dts-v1/; #include +#include #include "qcs615.dtsi" #include "qcs615-pmic.dtsi" @@ -201,6 +202,60 @@ vreg_l17a: ldo17 { }; }; +ðernet { + status = "okay"; + + pinctrl-0 = <ðernet_defaults>; + pinctrl-names = "default"; + + phy-handle = <&rgmii_phy>; + phy-mode = "rgmii"; + max-speed = <1000>; + + snps,mtl-rx-config = <&mtl_rx_setup>; + snps,mtl-tx-config = <&mtl_tx_setup>; + + mdio: 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>, @@ -292,6 +347,56 @@ &mdss_dsi0_phy { vdds-supply = <&vreg_l5a>; }; +&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>; + }; + + pps-pins { + pins = "gpio91"; + function = "rgmii"; + bias-disable; + drive-strength = <8>; + }; + + phy-reset-pins { + pins = "gpio104"; + function = "gpio"; + bias-pull-up; + drive-strength = <16>; + }; + }; +}; &tlmm { ioexp_intr_active: ioexp_intr_active {