From nobody Tue Nov 24 11:36:00 2026 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.168.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794824397; b=M7+8NHptrJx1d8Wit3kit7iyyd6iDBQlyJTlVgV1AsOrT5XeflPyoE2bSwqOuQWQs/Nd BtOijbv1X96E9op/eeh0RmUCuYWJLXgNZlN9otuc2Tn0YrlqkVu/refol78ZgV28Q1eWR Zjr+eObQtbeMYRQCb28U811cMfoK1TD214x4/o/+d1LLbzhJcbLse9i6GJqEKEBQC/z+n iuyqHpRFhp+HXP81aAh1Pco7ZlEsNK2iLS4CeabUoxSEKWj12O2PQyhNKegbiM1YJjfwn 5i+FlZ7/JImODStdjdcYn02P3X2jnKZy5luMS7BO0NiKepbV5J7n2QkPuQm7tLndhzQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794824397; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:X-Received:Received:From:Date: Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Proofpoint-Spam-Info: X-Proofpoint-ORIG-GUID:X-Proofpoint-GUID: X-Proofpoint-Spam-Details-Enc:X-Authority-Analysis: X-Proofpoint-Virus-Version:X-Proofpoint-Spam-Details; bh=/29wzYL5hjbrZK+L5pG+5RIKtZiSHZ80bCt20C+U4BE=; b=A267gOfz9WMkoaQuCdbynQnboabkA2H5WBlGdwmX4mgUuS0cyRiviNgwuOhAi/8QMRGe CfhHwxnpKJz2pRtqvjkhUUZjWFua49Huv4lxgiwCsXuZAc46eQHe8dXpWEJ4zRXjQ9RWA cIgXQZVNIkGzAWHTwgnitXkAiOUaErpyWL3geduzRmJFmLIRul2CWnLjJySx+0vjkGuze XnssXx1fFTctQc7m8ME41FdSVK4tmjlFIfA6sc+vLEnZCrG/HB7Mo6TUZ6Y5GkEak//b1 tj6NocGYjprNgUtEIcWu4xwkuVn8S988L+p2RJ++2Ykqa7HSZz6mhXvLkipHZyow+ng== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=InxAuCdu; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=WHe2RQLM; arc=none smtp.remote-ip=205.220.168.131 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 70DF0606A338 for ; Mon, 16 Nov 2026 10:19:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 70DF0606A338 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=InxAuCdu; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=WHe2RQLM Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6AG7ex223488790 for ; Mon, 16 Nov 2026 10:19:57 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= /29wzYL5hjbrZK+L5pG+5RIKtZiSHZ80bCt20C+U4BE=; b=InxAuCduqqhr67kM 4MJPcxWu4F85hnhTRnvzPEvilUprntVB6Kg5G5C0e2j1MukC1gT8XHshX3ZpcSjx yZl3CL1jRAawSvzM1+L5yt2X0FfE9++QzR4daG/WynvLzqEtyTmdsDXLuM8cHtuA CfFuYt8HtMvFMLCz841idpNhbM+xsGxgPlizvvQCIry8QRVCXEWJx+lz/43WCS4x bOWrfxn+kF0f+eQmRQWNfsqslkeTcBj2grCyZ5HS2YzeLp+4BYGtq5qgt4DfNGc+ 6lwsvK0R4cJytb1FSB+OHyg4/jRSNX13WCY9VSkhQpOqkiDfQ4tJI2Sr2hDhXdT7 ZrsPFA== Received: from mail-dy1-f198.google.com (mail-dy1-f198.google.com [74.125.82.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hxhmcdwn2-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 16 Nov 2026 10:19:56 +0000 (GMT) Received: by mail-dy1-f198.google.com with SMTP id 5a478bee46e88-36f479b9819so1627436eec.1 for ; Mon, 16 Nov 2026 02:19:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1794824396; x=1795429196; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=/29wzYL5hjbrZK+L5pG+5RIKtZiSHZ80bCt20C+U4BE=; b=WHe2RQLMJ1UqrhUcVdDirp9poHsvHsIbOr9ZIuYsVnuCHADTBETxx3T4XH4eEjCeyj VsHKcBGt3je5IMNYCVCCcq/krX4i8+K0TjgugXwTvB4+3s6uzITzf8Id2JSznvbiF6yu aXnxjAbgA6mzoXlGJo8ymKU7heY89CK0nI4CbCUgsQeIgbO7JZpAbzS2DGaiF70w/e95 oQ2ZP2HYqNfFAaetnPyHBB9dv3WG/OM5hGUox8jxdWgKklHD6x25Pnik4oBpz2SRpTky 0rCmBH6Bj7ZXVLmo4vgwjRFFVBMmaHCGywnT0abGtQD+fMcKNlPuwbi7LFyFx45mW7jK 7HZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794824396; x=1795429196; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=/29wzYL5hjbrZK+L5pG+5RIKtZiSHZ80bCt20C+U4BE=; b=pyJrjStXx+Z1EFMCrR6IEsrhfxUeamFVVUNwwxY3sL4dZ6cUCNFMp2icWxr/R1aD2h rJMxeXEDeaVakEt5A2sW3VXhAKHdhtE39x48alUcQw2Bs4kydWN5JYCVajlv9QLaKCVm DHGnmq8XlmiccFzzLfn8aGTu5MCHACHKfj1BRTrHkcHSrcpBGHcgZLBzUSehrwF9pDv+ Mc9bWHjwjfekxjLaB0nIpTqP5nO61nd0bCLnXbAIrkHr8/L8VJfMW80KxrCegR+/QBCW wdpDvK3YG9+0wEDpc3lP32Wmpsg6xnQcARglAR5BgWdpTNQUjRM4OPvevrfZMqfao23q lQJA== X-Forwarded-Encrypted: i=1; AL+hErGis0PH6Z8AJiz3PMCaPi/oxz5ku6sg1Aiw1LpE5KskIJbEdrJr1NKkJn6RLowKkqLJ61njJ17jYnBJ9uE=@vger.kernel.org X-Gm-Message-State: APuU4Z/5qFOHz/ad6OG38ZrltYg9Vtu0hhcL65gQJfw48RNN3l6CIF4P HWHIUI3XgOn7wSB3HinYHjUsTMeIenStxRung+8hchPT2ayVIX9l0jofy0QzYCynWunuL2B6qUK FQQ6cyIfWp6eqKm5rUp2U8bCaWG5T62RjbVDIlFwxm1p+Hs+Ea2w+JNywaBssxTg5cK0= X-Gm-Gg: AYBFou1el7AIrEuKFtfqwmBReGr1yzrToZb1K49nkADfkmRtZiyHLNqDctB7e6YorYh Hbx1a7ogV6u37iA7gGF4FmlWPJbVdRp1ZbJxKO6Sa2TZT2jx4vHpCi3ynd3AC4X7Ft65tw5aR+w X8fuHZKLUhvvjh9yFsO39j6ugzNcbV0I/cexIyy2LCOH24W7hvKcWlyI183SxMTy8OjddHei+Rb pV15Md2DGRDmzpqIjzgoqjZAIW7iizub5kiO6hbc8m4CpRVITkWv+zLuQ7hwgdJ2Th+AOP5zQUS 32ya6gDFb3+Z5/2ALZnhXrjCUbU7F2D0tYQ/JmEe3J0u85XkFY31H3xTRQUoCN9waebPTPPKv/b tyC23RGf9uzRRKmd8Ptc5KhkqWGNVu1Q1sWu7YcgeNW4pHeEZYeZJDny8fZIp+HzFGZmPvGnbMJ hqUcERIDvxX7+0PWgO X-Received: by 2002:a05:7300:cca2:b0:36e:371:8255 with SMTP id 5a478bee46e88-379603825bemr9380721eec.0.1794824396190; Mon, 16 Nov 2026 02:19:56 -0800 (PST) X-Received: by 2002:a05:7300:cca2:b0:36e:371:8255 with SMTP id 5a478bee46e88-379603825bemr9380690eec.0.1794824395719; Mon, 16 Nov 2026 02:19:55 -0800 (PST) Received: from hu-luoj-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-37956bad6casm32599557eec.26.2026.11.16.02.19.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2026 02:19:55 -0800 (PST) From: Luo Jie Date: Mon, 16 Nov 2026 02:19:48 -0800 Subject: [PATCH v3 1/4] arm64: dts: qcom: ipq5210: Fix xo_board parent clock X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20261116-qcom_ipq5210_nsscc-v3-1-1eaf92698379@oss.qualcomm.com> References: <20261116-qcom_ipq5210_nsscc-v3-0-1eaf92698379@oss.qualcomm.com> In-Reply-To: <20261116-qcom_ipq5210_nsscc-v3-0-1eaf92698379@oss.qualcomm.com> To: Bjorn Andersson , Abel Vesa , Stephen Boyd , Brian Masney , Jerome Brunet , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Georgi Djakov , Philipp Zabel , Luo Jie , Richard Cochran , Konrad Dybcio Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, netdev@vger.kernel.org, quic_kkumarcs@quicinc.com, quic_linchen@quicinc.com, quic_leiwei@quicinc.com X-Mailer: b4 0.17-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1794824393; l=1065; i=jie.luo@oss.qualcomm.com; s=20251128; h=from:subject:message-id; bh=Fb14u3Uh0Gv0knlh6Un+7Vkp8cbUQBriP9GOv5lWagI=; b=V7YGsYPUpWsnuewY1heonI3tkDNpBSFcmTeztXkuS9EiJLIyVBfXfSuDoPS9v/cGCSKqOYtuH 0LQ3NeruA1QApWabdBPl+ID0VuXdZVdkjV14rNqW7i9WmV0H9FJlWO3 X-Developer-Key: i=jie.luo@oss.qualcomm.com; a=ed25519; pk=gSsYMDakxtd6UDFYDdA9y9yjIs5Etp5GK/3DoXWPyS0= X-Proofpoint-Spam-Info: AW1haW4tMjYxMTE2MDA0MCBTYWx0ZWRfX87DjXOFYHIg1 hGrQ9XFsouVA5TMAxEd5S6pLe6hjO7Ez/m/qi25/mrYHmO2Bdq6HC5EWvkhNnEJ/H+c1W6K+Sl6 fW8tnp7Z/1ovBYhKNFUc0uMnE1t/Gsc= X-Proofpoint-ORIG-GUID: 6TUb5k3fEG_vTlVgFcn8-TtHdNHBS9Pl X-Proofpoint-GUID: 6TUb5k3fEG_vTlVgFcn8-TtHdNHBS9Pl X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTE2MDA0MCBTYWx0ZWRfX+5FRPAtCxhwb xDTungsy5TpbstzuIFYo4hCY8qWWXCxYvb0ofP6c9yH2jDk26InlExjl9UJtNsV2hqvcgXAUvNG LpWI0Bew28u+VkEGXfHFF23nRqzYfHdo1ltPKRh+HkgaJSyfyqH0dXmJXPL8rwxTD/1kFL3XD1n oDdHwx0LbZnjoTocXWeENs1j2PJthT7oVUu3Gc69CysH5tCQSCFC/Dr7s6u15Q94jC88J8Ig2NW aA4MDvjn5eyKHo7StOxrDNtfM2cCEnykYCEasE3Be45Q4Pf8uDde7H6Xr68yyavI/gnl62dcPTi 6Ey+6zUQcCJrCZi7HwEgHzWlcZedU5bXsEiMuDx8X79tp8IsfO246OaAsqMIe9Gagqh6s4HpsL5 ULR7jDw1snHOtNbE0NIIs9X7ZJy0rWmXWCCIfo14xg+HwO/TN2Bq8SSfZBRM/DcL+bxVJJGm8q7 XvSLAi/C4bHzjDnr1+g== X-Authority-Analysis: v=2.4 cv=Vpy2kO2n c=1 sm=1 tr=0 ts=6afad8cc cx=c_pps a=wEP8DlPgTf/vqF+yE6f9lg==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=zJRp6_cAMcgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=EUspDBNiAAAA:8 a=VEHikqRv1_aYAJNswC8A:9 a=QEXdDO2ut3YA:10 a=bBxd6f-gb0O0v-kibOvt:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-11-16_03,2026-11-11_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 adultscore=0 clxscore=1015 malwarescore=0 phishscore=0 priorityscore=1501 bulkscore=0 spamscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2611160040 xo_board is fixed to 24 MHz, which is routed from the 48 MHz WiFi output clock (also the reference clock of CMN PLL, ref_48mhz_clk) divided by 2. However, xo_board is parented to xo_clk directly, bypassing ref_48mhz_clk. Parent xo_board to ref_48mhz_clk to match the hardware clock routing, There is no rate change, where xo_clk is 48 MHz and ref_48mhz_clk is 1:1. Fixes: 1d6abd242b45 ("arm64: dts: qcom: ipq5210: Update xo_board to use fix= ed factor clock") Signed-off-by: Luo Jie Reviewed-by: Abel Vesa --- arch/arm64/boot/dts/qcom/ipq5210.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/ipq5210.dtsi b/arch/arm64/boot/dts/qc= om/ipq5210.dtsi index 0c1ede0f73b2..6e4de7c29d29 100644 --- a/arch/arm64/boot/dts/qcom/ipq5210.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq5210.dtsi @@ -27,7 +27,7 @@ sleep_clk: sleep-clk { =20 xo_board: xo-board-clk { compatible =3D "fixed-factor-clock"; - clocks =3D <&xo_clk>; + clocks =3D <&ref_48mhz_clk>; #clock-cells =3D <0>; }; =20 --=20 2.43.0 From nobody Tue Nov 24 11:36:00 2026 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.180.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794824401; b=QBXYLaaBaefwLlAs/3Sjyh82OOH+YIZLyLQ7oLbNbNx3JEMkbLJ3N6Bhqqd3yld2gMv1 obmj+3PVkfJAWkOs3GxJ+UqzIYmdgbZrMlW9fQN++ibCewSs3AWFWE1bzDbKJ46izG9yC QAdY7Nxvytt91DvvwCkTQbmJOof3JYaylv+I8X98bSJCiRlygZyudRW4ctZVzz3+74WHh BMfIh5IMi+kr+b/pilJm0snu0UJpVRM/Vj7oKHAsB7KGKU6pAvosusoa24y+EqOSuH01I iziuzZMNzej7TmkFeR1Xhsd3CrWa2UDtIjPazwyi2uQ9geuut8rEHUXwPXQ5pnLjc0g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794824401; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:X-Received:Received:From:Date: Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Proofpoint-Spam-Details-Enc: X-Proofpoint-GUID:X-Proofpoint-ORIG-GUID:X-Authority-Analysis: X-Proofpoint-Spam-Info:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=ZtCX4xQXTEPkv73DiejIQwicvHDcj4jWWQYQqoWbQC0=; b=n3pAxYFUMNKO/QuAbwfCrAiWKQtbRcGLBsxPzba67re7Ke6cwssy4bj9OuSNTgVKitL3 H1yV8CqwDbxw2Ug0MHUlTK/RGk9yuxGeHWnyFBfQMK4L5+qrKRrJlmbOl6by3xUV91rwL +d9E06n0xwO+4uk0zMpwRdByicTZukmEKN3pFcrerzGGjRYYNPj9FYem9T671JtqPxVqp YAvLSDdkPXLoEaXOeZPNJhGtf0oT2OzLVBGwFgXbYeGdG63HOVT72NN9rsC1zMxYLQ4w7 npXY3X0AZf7chhPMqrO/KXfsWGR1a2p5vZ1niK4h/IHsQvdTOpI6m4w0Jb9wG7Yb2IA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=Jrdefy10; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=FT77magM; arc=none smtp.remote-ip=205.220.180.131 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7EBE606A8BE for ; Mon, 16 Nov 2026 10:19:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D7EBE606A8BE Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=Jrdefy10; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=FT77magM Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6AG9PO953427996 for ; Mon, 16 Nov 2026 10:19:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= ZtCX4xQXTEPkv73DiejIQwicvHDcj4jWWQYQqoWbQC0=; b=Jrdefy10jF+Pol4f Z+88dFBv60zuPaXXMoYFbGDXPgfDbMBOLyu7PIyKzTGFTKIn6ZsX5Wi0nT/kSDK8 auqWu0gMqa5Cpr7nJ17/WAlRpGzJu+bwQl9YwL3LKkB7mf66hoNDPLq2mdr4w/h6 w28nmzYBzrqL7t7eLTSWOssmlpbeVwlD6jj6rdYkz1CihDpHgjqoMOE/CvGfHiy6 O+i+diBeYyERliMASPaq8nbK/3eJgT1gDEnjSZ9FnHUTif3M1O0zIMAbbzbwMZwk WHaq5vUbDt0TNjwnDaeC7Mf/l7A1d24O3jo28eRTH1CO6oHdhcun1yxYKwwSdNhb sq1pTw== Received: from mail-dy1-f199.google.com (mail-dy1-f199.google.com [74.125.82.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hyy6gg6jd-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 16 Nov 2026 10:19:58 +0000 (GMT) Received: by mail-dy1-f199.google.com with SMTP id 5a478bee46e88-370230d93efso2223179eec.1 for ; Mon, 16 Nov 2026 02:19:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1794824398; x=1795429198; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=ZtCX4xQXTEPkv73DiejIQwicvHDcj4jWWQYQqoWbQC0=; b=FT77magM7a9D6n1olYcEnaphWUFMRT/wA8rx7Q5b894+bgC4tM+8L4m2anafEfQFeO ABP569TDwYKUCOpebX7l3ZPI7bGpEXF9aZwSXlDFmoucTrlvbh3404pjkIeIWjUEe99U Y62dqfdxVg9Z5r3CXoFrMqjse5YWdPX40NgPQMF11EYolzC7jKKRx1slZ53c64wH3XHc nVjFtq/H3L5JrivjcMZAVOMuFo6EWCwpocCn2OiHfwmoThTxB7TUEhGr5r6PI9AzSlCk e+JaEdaN4qPui4SR1prHPl4KVpyGNPhBpNisR7TMqORaWwiu5aUFklNgy5vnyufNcMP3 UErQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794824398; x=1795429198; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=ZtCX4xQXTEPkv73DiejIQwicvHDcj4jWWQYQqoWbQC0=; b=Ozje9ECpl+cZjI0N1b2rIe1SrX033BCWlil5jqUWrUymrqAO9+X2P62qhH/QJ7Fn/1 CI7CahX92vScs6T4QZi9kSl4NM7lmsILubRv+6RvpzbjYjtO+XaguFEBvmo4nalNvSOY SPNLcz9JlR+ZrTb8IwKYddbl9CXH+T59RAFumnPG60cgKtdVAcEKqD0txhfCSD/htfEL IVIKk6GMjUHGTnx5AijFLvHxvCbUi5QCY1znuudeliFBdreTjssmV4QWpPMfJfaYgMYX iYUnC3Fk6nGR/jCAKZSKHZcgj/Jss+a2k4s03nA/zOjCR622nYlEUvT0a1M7TKRnxGdk s2eQ== X-Forwarded-Encrypted: i=1; AL+hErEaz6vBXfOKbnAmiNzFeOCXsHcSzVeOG3rJiJ5rJ4kBjiuHqMkJDtcfi/UnY7tKKEDRsWhS6+OSmjIAg20=@vger.kernel.org X-Gm-Message-State: APuU4Z9FW0cN4wDo05Lw99qQhkCk8gFNA9qigefKWRkqtXGhBIjzq4xZ P/ZfMQCpvCQ5owbhwwwZwMRmT4QtfNlPX6Bmeb3FHhXhQFvvmDrTKpv8C0ze6dCYAYANqR0Hra8 ZU+W1OxSScFxFmNvCqTIu7VIa42Ri/pkax1mKZM5qKUK9Zk6cwGsUAUMGzn7AZvJtVgc= X-Gm-Gg: AZFdTZdUltn/aOVvQcFU8WHMmRb1/VGgWY2Pd6gNvcbCXejR5WAtzSlJuhjTW3ZEiPx pbxDQHrgWToCpLjcx81qqCVBwgSMTLQUKNS9b14Qn7bxTA3xWewRD4YvhH361W1eV9+9FGSdQkx NaY1ZGKVcAAyysyzYCUoa6TjYIRPqBb6wbvMfVv5l2Lp1H9+KUHbi1m79z2gjJ5BCvPgv07ov2Y VUF7Ni/dW8K+JFbDfFmN0vD+HPvNPPIZo/99CK/SOtIucm4ybx7V2nX+NxlntQZM8IfJ+PBCWNs ANQ5wgzaCpnmuf3NjN6Tn6FBbi6IIw5EhE4nOYVuI4Ladex6MTx+r+pneWY6ziM81ChMc94hTzT O2QM7f9TRU4+j0XdR0v8tPfsoirDLcEzFjxeEKCHvqw+bEbEBWR44UJRUQUz4NrVdh/P5MztO7M bIB6hdCK2hxQOX0h59 X-Received: by 2002:a05:7301:fd09:b0:36d:4570:a32d with SMTP id 5a478bee46e88-37963953f0amr10216794eec.2.1794824397538; Mon, 16 Nov 2026 02:19:57 -0800 (PST) X-Received: by 2002:a05:7301:fd09:b0:36d:4570:a32d with SMTP id 5a478bee46e88-37963953f0amr10216771eec.2.1794824396845; Mon, 16 Nov 2026 02:19:56 -0800 (PST) Received: from hu-luoj-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-37956bad6casm32599557eec.26.2026.11.16.02.19.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2026 02:19:56 -0800 (PST) From: Luo Jie Date: Mon, 16 Nov 2026 02:19:49 -0800 Subject: [PATCH v3 2/4] dt-bindings: clock: qcom: Add NSS clock controller for IPQ5210 SoC X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20261116-qcom_ipq5210_nsscc-v3-2-1eaf92698379@oss.qualcomm.com> References: <20261116-qcom_ipq5210_nsscc-v3-0-1eaf92698379@oss.qualcomm.com> In-Reply-To: <20261116-qcom_ipq5210_nsscc-v3-0-1eaf92698379@oss.qualcomm.com> To: Bjorn Andersson , Abel Vesa , Stephen Boyd , Brian Masney , Jerome Brunet , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Georgi Djakov , Philipp Zabel , Luo Jie , Richard Cochran , Konrad Dybcio Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, netdev@vger.kernel.org, quic_kkumarcs@quicinc.com, quic_linchen@quicinc.com, quic_leiwei@quicinc.com, Krzysztof Kozlowski X-Mailer: b4 0.17-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1794824393; l=12425; i=jie.luo@oss.qualcomm.com; s=20251128; h=from:subject:message-id; bh=osDt9Wx7l8Dwz1s9gshsRSw/jihamPUhGKdWi/poDxE=; b=t0XyA1Zs9Sq39Vl1rI3dTGND2lWe3o9b7AjcbwzTGOD6k3Ito7/o8esqlpQ4ygQ2/naTMsIqV 9co/g2OdRTcBIac2/Ku067F6ppm3Qkk0uP/7kD+hfAIHvnABvBQ4Kgr X-Developer-Key: i=jie.luo@oss.qualcomm.com; a=ed25519; pk=gSsYMDakxtd6UDFYDdA9y9yjIs5Etp5GK/3DoXWPyS0= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTE2MDA0MCBTYWx0ZWRfX8yGwqPb7EF6F 9vJwzFC+0oBE8k5+K/gUkZx9kqXVabtDUXxLPY//Pd/fJkogJzLQwSq9lpklnsJua6cPQKfsUWt r49BOYzgnbeyxiNgzouYQxs3q0aFSskzMxjvrj/elCTUXIsJjCSlw4SzGhNPNHuebJaRfter7YG RvIvFQdc1GatqpP2ejvPgK/ZhXex1cU2OUjVWd47pSMjJBB7Nu2az0W/GTwzuyN4UAOK1tX3QcT 60UW1v54OQpJ5881e0PvfCyIN9EvMiTNyRrdOKbB8YekMUZLd/AK6cIsWKThfNA45ZEYiJHw1Q4 jO6fAdX8Q1NhljV2QQnTYZ+PiWpdfENom1dhOlPvq7EkG2adQMJMX8Ij3OFCTGaL7uz6JkOdJ1x LMQ4y//JvzB4Cs4lOeAzEVHG4lX/G4IHwg+cPBrbjR6foTZ4xvo8bu0xrloZ6+v/0rKSWgLw2Et CaGx1Hipm4HCRCJPdWg== X-Proofpoint-GUID: BcPrKfNHf4hcm8ZkInOIG2vsfL4gKwjF X-Proofpoint-ORIG-GUID: BcPrKfNHf4hcm8ZkInOIG2vsfL4gKwjF X-Authority-Analysis: v=2.4 cv=D/DSufRj c=1 sm=1 tr=0 ts=6afad8ce cx=c_pps a=cFYjgdjTJScbgFmBucgdfQ==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=zJRp6_cAMcgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=gEfo2CItAAAA:8 a=EUspDBNiAAAA:8 a=VwQbUJbxAAAA:8 a=5BNNu1SJyhHsDrVplQ0A:9 a=QEXdDO2ut3YA:10 a=scEy_gLbYbu1JhEsrz4S:22 a=sptkURWiP4Gy88Gu7hUp:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMTE2MDA0MCBTYWx0ZWRfX2x5+06pic6Ui JPl+7yLdwrh1ytDOtLTe2Hl/Xv9G7Oh1m2qz3LCBVvQGJoqHlT2V6F3f2WBUHtw3dJBKrMhhGa8 d3O0aIzBrtuHgywxAE3TmIRNU4+XmVc= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-11-16_03,2026-11-11_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 spamscore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 clxscore=1015 adultscore=0 malwarescore=0 impostorscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2611160040 NSS clock controller provides the clocks and resets to the networking blocks such as PPE (Packet Process Engine), UNIPHY (PCS) and EPHY on IPQ5210 devices. Add support for the compatible string "qcom,ipq5210-nsscc" based on the existing IPQ9574/IPQ5424 NSS clock controller Device Tree binding. IPQ5210 additionally exposes a pair of EPHY-RAW Rx/Tx clock sources used to derive the clocks for its integrated 2.5G Ethernet PHY, so extend the clocks and clock-names lists with "ephy_rx" and "ephy_tx". Also add master/slave ids for IPQ5210 networking interfaces, which are used by the nsscc-ipq5210 driver for providing interconnect services using the icc-clk framework. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Luo Jie Acked-by: Georgi Djakov --- .../bindings/clock/qcom,ipq9574-nsscc.yaml | 47 ++++++++- include/dt-bindings/clock/qcom,ipq5210-nsscc.h | 106 +++++++++++++++++= ++++ include/dt-bindings/interconnect/qcom,ipq5210.h | 18 ++++ include/dt-bindings/reset/qcom,ipq5210-nsscc.h | 60 ++++++++++++ 4 files changed, 228 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/clock/qcom,ipq9574-nsscc.yam= l b/Documentation/devicetree/bindings/clock/qcom,ipq9574-nsscc.yaml index a35bbc7b1924..0064866bea82 100644 --- a/Documentation/devicetree/bindings/clock/qcom,ipq9574-nsscc.yaml +++ b/Documentation/devicetree/bindings/clock/qcom,ipq9574-nsscc.yaml @@ -4,28 +4,33 @@ $id: http://devicetree.org/schemas/clock/qcom,ipq9574-nsscc.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# =20 -title: Qualcomm Networking Sub System Clock & Reset Controller on IPQ9574 = and IPQ5424 +title: Qualcomm Networking Sub System Clock & Reset Controller on IPQ SoCs =20 maintainers: - Bjorn Andersson + - Luo Jie =20 description: | Qualcomm networking sub system clock control module provides the clocks, - resets on IPQ9574 and IPQ5424 + resets on IPQ9574, IPQ5424 and IPQ5210 =20 See also: + include/dt-bindings/clock/qcom,ipq5210-nsscc.h include/dt-bindings/clock/qcom,ipq5424-nsscc.h include/dt-bindings/clock/qcom,ipq9574-nsscc.h + include/dt-bindings/reset/qcom,ipq5210-nsscc.h include/dt-bindings/reset/qcom,ipq5424-nsscc.h include/dt-bindings/reset/qcom,ipq9574-nsscc.h =20 properties: compatible: enum: + - qcom,ipq5210-nsscc - qcom,ipq5424-nsscc - qcom,ipq9574-nsscc =20 clocks: + minItems: 11 items: - description: Board XO source - description: CMN_PLL NSS (Bias PLL cc) clock source. This clock ra= te @@ -42,11 +47,14 @@ properties: - description: Uniphy2 NSS Rx clock source - description: Uniphy2 NSS Tx clock source - description: GCC NSSCC clock source + - description: CMN_PLL EPHY-RAW Rx clock source + - description: CMN_PLL EPHY-RAW Tx clock source =20 '#interconnect-cells': const: 1 =20 clock-names: + minItems: 11 items: - const: xo - enum: @@ -63,6 +71,8 @@ properties: - const: uniphy2_rx - const: uniphy2_tx - const: bus + - const: ephy_rx + - const: ephy_tx =20 required: - compatible @@ -77,6 +87,8 @@ allOf: const: qcom,ipq9574-nsscc then: properties: + clocks: + maxItems: 11 clock-names: items: - const: xo @@ -90,8 +102,35 @@ allOf: - const: uniphy2_rx - const: uniphy2_tx - const: bus - else: + - if: + properties: + compatible: + const: qcom,ipq5424-nsscc + then: + properties: + clocks: + maxItems: 11 + clock-names: + items: + - const: xo + - const: nss + - const: ppe + - const: gpll0_out + - const: uniphy0_rx + - const: uniphy0_tx + - const: uniphy1_rx + - const: uniphy1_tx + - const: uniphy2_rx + - const: uniphy2_tx + - const: bus + - if: + properties: + compatible: + const: qcom,ipq5210-nsscc + then: properties: + clocks: + minItems: 13 clock-names: items: - const: xo @@ -105,6 +144,8 @@ allOf: - const: uniphy2_rx - const: uniphy2_tx - const: bus + - const: ephy_rx + - const: ephy_tx =20 unevaluatedProperties: false =20 diff --git a/include/dt-bindings/clock/qcom,ipq5210-nsscc.h b/include/dt-bi= ndings/clock/qcom,ipq5210-nsscc.h new file mode 100644 index 000000000000..62ead8d9b076 --- /dev/null +++ b/include/dt-bindings/clock/qcom,ipq5210-nsscc.h @@ -0,0 +1,106 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. + */ + +#ifndef _DT_BINDINGS_CLOCK_QCOM_IPQ5210_NSSCC_H +#define _DT_BINDINGS_CLOCK_QCOM_IPQ5210_NSSCC_H + +#define NSS_CC_PPE_CLK_SRC 0 +#define NSS_CC_PPE_SWITCH_IPE_CLK 1 +#define NSS_CC_PPE_SWITCH_BTQ_CLK 2 +#define NSS_CC_PPE_SWITCH_CLK 3 +#define NSS_CC_PPE_SWITCH_CFG_CLK 4 +#define NSS_CC_PPE_EDMA_CLK 5 +#define NSS_CC_PPE_EDMA_CFG_CLK 6 +#define NSS_CC_PORT1_MAC_CLK 7 +#define NSS_CC_PORT1_RX_CLK 8 +#define NSS_CC_PORT1_RX_CLK_SRC 9 +#define NSS_CC_PORT1_RX_DIV_CLK_SRC 10 +#define NSS_CC_PORT1_TX_CLK 11 +#define NSS_CC_PORT1_TX_CLK_SRC 12 +#define NSS_CC_PORT1_TX_DIV_CLK_SRC 13 +#define NSS_CC_PORT2_MAC_CLK 14 +#define NSS_CC_PORT2_RX_CLK 15 +#define NSS_CC_PORT2_RX_CLK_SRC 16 +#define NSS_CC_PORT2_RX_DIV_CLK_SRC 17 +#define NSS_CC_PORT2_TX_CLK 18 +#define NSS_CC_PORT2_TX_CLK_SRC 19 +#define NSS_CC_PORT2_TX_DIV_CLK_SRC 20 +#define NSS_CC_PORT3_MAC_CLK 21 +#define NSS_CC_PORT3_RX_CLK 22 +#define NSS_CC_PORT3_RX_CLK_SRC 23 +#define NSS_CC_PORT3_RX_DIV_CLK_SRC 24 +#define NSS_CC_PORT3_TX_CLK 25 +#define NSS_CC_PORT3_TX_CLK_SRC 26 +#define NSS_CC_PORT3_TX_DIV_CLK_SRC 27 +#define NSS_CC_PORT4_MAC_CLK 28 +#define NSS_CC_PORT4_RX_CLK 29 +#define NSS_CC_PORT4_RX_CLK_SRC 30 +#define NSS_CC_PORT4_RX_DIV_CLK_SRC 31 +#define NSS_CC_PORT4_TX_CLK 32 +#define NSS_CC_PORT4_TX_CLK_SRC 33 +#define NSS_CC_PORT4_TX_DIV_CLK_SRC 34 +#define NSS_CC_PORT5_MAC_CLK 35 +#define NSS_CC_PORT5_RX_CLK 36 +#define NSS_CC_PORT5_RX_CLK_SRC 37 +#define NSS_CC_PORT5_RX_DIV_CLK_SRC 38 +#define NSS_CC_PORT5_TX_CLK 39 +#define NSS_CC_PORT5_TX_CLK_SRC 40 +#define NSS_CC_PORT5_TX_DIV_CLK_SRC 41 +#define NSS_CC_PORT6_MAC_CLK 42 +#define NSS_CC_PORT6_RX_CLK 43 +#define NSS_CC_PORT6_RX_CLK_SRC 44 +#define NSS_CC_PORT6_RX_DIV_CLK_SRC 45 +#define NSS_CC_PORT6_TX_CLK 46 +#define NSS_CC_PORT6_TX_CLK_SRC 47 +#define NSS_CC_PORT6_TX_DIV_CLK_SRC 48 +#define NSS_CC_NSSNOC_PPE_CLK 49 +#define NSS_CC_NSSNOC_PPE_CFG_CLK 50 +#define NSS_CC_UNIPHY_PORT1_RX_CLK 51 +#define NSS_CC_UNIPHY_PORT1_TX_CLK 52 +#define NSS_CC_UNIPHY_PORT2_RX_CLK 53 +#define NSS_CC_UNIPHY_PORT2_TX_CLK 54 +#define NSS_CC_UNIPHY_PORT3_RX_CLK 55 +#define NSS_CC_UNIPHY_PORT3_TX_CLK 56 +#define NSS_CC_UNIPHY_PORT4_RX_CLK 57 +#define NSS_CC_UNIPHY_PORT4_TX_CLK 58 +#define NSS_CC_UNIPHY_PORT5_RX_CLK 59 +#define NSS_CC_UNIPHY_PORT5_TX_CLK 60 +#define NSS_CC_UNIPHY_PORT6_RX_CLK 61 +#define NSS_CC_UNIPHY_PORT6_TX_CLK 62 +#define NSS_CC_XGMAC0_PTP_REF_CLK 63 +#define NSS_CC_XGMAC0_PTP_REF_DIV_CLK_SRC 64 +#define NSS_CC_XGMAC1_PTP_REF_CLK 65 +#define NSS_CC_XGMAC1_PTP_REF_DIV_CLK_SRC 66 +#define NSS_CC_XGMAC2_PTP_REF_CLK 67 +#define NSS_CC_XGMAC2_PTP_REF_DIV_CLK_SRC 68 +#define NSS_CC_PON_CLK 69 +#define NSS_CC_EPHY_RX_CLK_SRC 70 +#define NSS_CC_EPHY_RX_CLK 71 +#define NSS_CC_EPHY_TX_CLK_SRC 72 +#define NSS_CC_EPHY_TX_CLK 73 +#define NSS_CC_UNIPHY_PORT1_RX_DIV4_CLK_SRC 74 +#define NSS_CC_UNIPHY_PORT1_TX_DIV4_CLK_SRC 75 +#define NSS_CC_UNIPHY_PORT2_RX_DIV4_CLK_SRC 76 +#define NSS_CC_UNIPHY_PORT2_TX_DIV4_CLK_SRC 77 +#define NSS_CC_UNIPHY_PORT3_RX_DIV4_CLK_SRC 78 +#define NSS_CC_UNIPHY_PORT3_TX_DIV4_CLK_SRC 79 +#define NSS_CC_UNIPHY_PORT4_RX_DIV4_CLK_SRC 80 +#define NSS_CC_UNIPHY_PORT4_TX_DIV4_CLK_SRC 81 +#define NSS_CC_UNIPHY_PORT1_RX_DIV4_CLK 82 +#define NSS_CC_UNIPHY_PORT1_TX_DIV4_CLK 83 +#define NSS_CC_UNIPHY_PORT2_RX_DIV4_CLK 84 +#define NSS_CC_UNIPHY_PORT2_TX_DIV4_CLK 85 +#define NSS_CC_UNIPHY_PORT3_RX_DIV4_CLK 86 +#define NSS_CC_UNIPHY_PORT3_TX_DIV4_CLK 87 +#define NSS_CC_UNIPHY_PORT4_RX_DIV4_CLK 88 +#define NSS_CC_UNIPHY_PORT4_TX_DIV4_CLK 89 +#define NSS_CC_EIP_BFDCD_CLK_SRC 90 +#define NSS_CC_EIP_CLK 91 +#define NSS_CC_NSSNOC_EIP_CLK 92 +#define NSS_CC_CFG_CLK_SRC 93 +#define NSS_CC_NSS_CSR_CLK 94 +#define NSS_CC_NSSNOC_NSS_CSR_CLK 95 + +#endif diff --git a/include/dt-bindings/interconnect/qcom,ipq5210.h b/include/dt-b= indings/interconnect/qcom,ipq5210.h new file mode 100644 index 000000000000..44f8d35a372a --- /dev/null +++ b/include/dt-bindings/interconnect/qcom,ipq5210.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. + */ + +#ifndef INTERCONNECT_QCOM_IPQ5210_H +#define INTERCONNECT_QCOM_IPQ5210_H + +#define MASTER_NSSNOC_PPE 0 +#define SLAVE_NSSNOC_PPE 1 +#define MASTER_NSSNOC_PPE_CFG 2 +#define SLAVE_NSSNOC_PPE_CFG 3 +#define MASTER_NSSNOC_NSS_CSR 4 +#define SLAVE_NSSNOC_NSS_CSR 5 +#define MASTER_NSSNOC_EIP 6 +#define SLAVE_NSSNOC_EIP 7 + +#endif /* INTERCONNECT_QCOM_IPQ5210_H */ diff --git a/include/dt-bindings/reset/qcom,ipq5210-nsscc.h b/include/dt-bi= ndings/reset/qcom,ipq5210-nsscc.h new file mode 100644 index 000000000000..0616a3623897 --- /dev/null +++ b/include/dt-bindings/reset/qcom,ipq5210-nsscc.h @@ -0,0 +1,60 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. + */ + +#ifndef _DT_BINDINGS_RESET_QCOM_IPQ5210_NSSCC_H +#define _DT_BINDINGS_RESET_QCOM_IPQ5210_NSSCC_H + +#define NSS_CC_PPE_BCR 0 +#define NSS_CC_PPE_SWITCH_IPE_CLK_ARES 1 +#define NSS_CC_PPE_SWITCH_BTQ_CLK_ARES 2 +#define NSS_CC_PPE_SWITCH_CLK_ARES 3 +#define NSS_CC_PPE_SWITCH_CFG_CLK_ARES 4 +#define NSS_CC_PPE_EDMA_CLK_ARES 5 +#define NSS_CC_PPE_EDMA_CFG_CLK_ARES 6 +#define NSS_CC_PORT1_MAC_CLK_ARES 7 +#define NSS_CC_PORT2_MAC_CLK_ARES 8 +#define NSS_CC_PORT3_MAC_CLK_ARES 9 +#define NSS_CC_PORT4_MAC_CLK_ARES 10 +#define NSS_CC_PORT5_MAC_CLK_ARES 11 +#define NSS_CC_PORT6_MAC_CLK_ARES 12 +#define NSS_CC_PON_CLK_ARES 13 +#define NSS_CC_XGMAC0_PTP_REF_CLK_ARES 14 +#define NSS_CC_XGMAC1_PTP_REF_CLK_ARES 15 +#define NSS_CC_XGMAC2_PTP_REF_CLK_ARES 16 +#define NSS_CC_NSSNOC_PPE_CLK_ARES 17 +#define NSS_CC_NSSNOC_PPE_CFG_CLK_ARES 18 +#define NSS_CC_PORT1_RX_CLK_ARES 19 +#define NSS_CC_PORT1_TX_CLK_ARES 20 +#define NSS_CC_PORT2_RX_CLK_ARES 21 +#define NSS_CC_PORT2_TX_CLK_ARES 22 +#define NSS_CC_PORT3_RX_CLK_ARES 23 +#define NSS_CC_PORT3_TX_CLK_ARES 24 +#define NSS_CC_PORT4_RX_CLK_ARES 25 +#define NSS_CC_PORT4_TX_CLK_ARES 26 +#define NSS_CC_PORT5_RX_CLK_ARES 27 +#define NSS_CC_PORT5_TX_CLK_ARES 28 +#define NSS_CC_PORT6_RX_CLK_ARES 29 +#define NSS_CC_PORT6_TX_CLK_ARES 30 +#define NSS_CC_EPHY_RX_CLK_ARES 31 +#define NSS_CC_EPHY_TX_CLK_ARES 32 +#define NSS_CC_UNIPHY_PORT1_RX_CLK_ARES 33 +#define NSS_CC_UNIPHY_PORT1_TX_CLK_ARES 34 +#define NSS_CC_UNIPHY_PORT2_RX_CLK_ARES 35 +#define NSS_CC_UNIPHY_PORT2_TX_CLK_ARES 36 +#define NSS_CC_UNIPHY_PORT3_RX_CLK_ARES 37 +#define NSS_CC_UNIPHY_PORT3_TX_CLK_ARES 38 +#define NSS_CC_UNIPHY_PORT4_RX_CLK_ARES 39 +#define NSS_CC_UNIPHY_PORT4_TX_CLK_ARES 40 +#define NSS_CC_UNIPHY_PORT5_RX_CLK_ARES 41 +#define NSS_CC_UNIPHY_PORT5_TX_CLK_ARES 42 +#define NSS_CC_UNIPHY_PORT6_RX_CLK_ARES 43 +#define NSS_CC_UNIPHY_PORT6_TX_CLK_ARES 44 +#define NSS_CC_EIP_CLK_ARES 45 +#define NSS_CC_NSSNOC_EIP_CLK_ARES 46 +#define NSS_CC_NSS_CSR_CLK_ARES 47 +#define NSS_CC_NSSNOC_NSS_CSR_CLK_ARES 48 +#define NSS_CC_DEBUG_CLK_ARES 49 + +#endif --=20 2.43.0 From nobody Tue Nov 24 11:36:00 2026 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.180.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794824404; b=POx6v8tMm4nJBgQ4zHqQLPHdoPzXTP6NIQxeQHBFNhFXf9IGc3f3RM9W3SKskKQxTG33 Jl0ch+RN6USSHYpp24O57zEa9/uLJay5o8eIios+G9cBSSKKAQjO7JSXjsZrviuGXVAaf NDgVQIxaWg07aeNCfMtD6zwram9toFCcdj66beYtK8IA0ske6qcmJSGvtXWP/speWylgx 7xA8JmCzbkaWNkvBbzXOoBVjOBO/OMO1psSzHO1BLiyQOmu+RCVVSNeeFZr3ZXF3aBgLA LHIa2gb37m4HgD3sz6+WvJY9KBF87KMPPWKig+1SyUhHX/WSRmnUmPc68LUNydYpomg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794824404; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:X-Received:Received:From:Date: Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Proofpoint-Spam-Info: X-Proofpoint-GUID:X-Proofpoint-Spam-Details-Enc: X-Proofpoint-ORIG-GUID:X-Authority-Analysis: X-Proofpoint-Virus-Version:X-Proofpoint-Spam-Details; bh=qrLy5z6Dmk9L6TkgVgW6znV4rrxPY2PdTrmHjIa1C5E=; b=iA43D/I9OSxDyCUexIBWxiYKZxkTW4HS3Ovn8glfg1EJpYq2/4gSWuXDaUAJiiTGyblB viVPO8D+bKQVFjKt4OGbdhEjf2dD/3zyLMvhHWd1X1QvfTPJqbG79BS6A4Far/xIL20Uh bciWi/MYFaaTuac3am5RicyXXa6hwHNAsKBaJ5/i8X4F0HFP+uZn6NEybUichDTSlKNlt AsZbvA2id2I5ClGaE8/R2DSjfKoEO6mi/c812MoMo+oHVShLka1CTbw+dbtVRshr0riVX UOh+KQe9ZVwgDvJbfEhomDhEMRF74//t/bfvQI1K4wtQYhulbiWQ01UaSfs6KzQLxVA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=YtcpUWWP; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=O9oBAs2H; arc=none smtp.remote-ip=205.220.180.131 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4266F606A882 for ; Mon, 16 Nov 2026 10:20:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4266F606A882 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=YtcpUWWP; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=O9oBAs2H Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6AGA2kR2953476 for ; Mon, 16 Nov 2026 10:20:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= qrLy5z6Dmk9L6TkgVgW6znV4rrxPY2PdTrmHjIa1C5E=; b=YtcpUWWPsyy3uGy2 TO7WjmUqoQd0U59lkN9b1p3fMn050jNRMCMRF8pq0TqNn8JB9Viq60v+EjFanXcf aDaThESNSiT+11VTjU6iWVAgMUUgSgHvBYvRTA3kGwgh999//oFCRntvcv8hTriF c0qlT/iMdtQaEDrOJ2MZBzykOU8dgK4DXrz0K/jI7vhLISXdRx/9McIVeP6hpMyG 4aJtGooCHRXllM4v81b92BkJldNCTVOOkwTcrjycSPZL86VyDONOhIfITkUI2kna pQ6wJLctPMsS++cN8VYoiQhxwkbIDjF8w4v8VV1JOMqZyZIqcLahf8IQwm+w6aMT oQ0DwQ== Received: from mail-dy1-f200.google.com (mail-dy1-f200.google.com [74.125.82.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hyyqy827s-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 16 Nov 2026 10:20:00 +0000 (GMT) Received: by mail-dy1-f200.google.com with SMTP id 5a478bee46e88-375bac6bd21so2685390eec.0 for ; Mon, 16 Nov 2026 02:20:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1794824400; x=1795429200; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=qrLy5z6Dmk9L6TkgVgW6znV4rrxPY2PdTrmHjIa1C5E=; b=O9oBAs2Hxdjjirr/c7w2O3Rw3sK8otrp1MWWVa3GZUDbwoYE8djnp1AI3YpAIhAgaV 7BJA0tKsnX1Bi/xlXL6LomowoGyevBxPMhNczkloAHXsH9bNMSsZRcsGmqvqFBS1XGLx B1vziC26H2ga8mUsxbUOK7VHw4ABdji1L+sHXl2e2GhaqShoO6TjawBMLh4QkSoVeLkG OGTuJOxCZqfXAIyoJGApnhB1krE2AMFJKL1QdHNIJS/IdhpMxWLJJJFpGg4sBBPhNp2Z wEuIgGRE/+Z5a0rUv02rFzS+rcwsB7liC7BpctHUDmD4aVa6OQ62cZ1R8ZsgGA/p4gyu 36Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794824400; x=1795429200; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=qrLy5z6Dmk9L6TkgVgW6znV4rrxPY2PdTrmHjIa1C5E=; b=08nZeHAdQrbaj0vxD7pBsUDYoi4rLMrINBbmnMHnKsBOuCxha0pnBkr+pVWug4XBT9 6zDIkq7ornMa0iFh5iEGhOt4VVkqKXVxsjaNqQtAFVDXFxyq4hAFMFpISRdir+Ebqc++ jmsRlnRBe+kWHnXpbcsQQtIPiG9eEg+m7lMEg+m34DMKLaSJvjIBdf+tRRPNOX3ahw/U qPo47SWHxgp4IDdR71pS4lSXkhUPhb57CiYMfAFKNuYHFrE7pxrtC08mMnDt0686efJQ iitbEJCLTAITDfnVCXW69Mal805fRHUpaCCMa7MMA9FZlhR/xUHYWsI3NgV/xdtfRzPb cDJg== X-Forwarded-Encrypted: i=1; AL+hErEZi/e83Qm2A4GWM/BJyPJWnaYylEecBxlhFTS6XffrDSM01fH53ktkstvvLlZrcEcSkxUQZJH5qGrOaDs=@vger.kernel.org X-Gm-Message-State: APuU4Z+16dnJ9ltQtcKFuR5RPwZVorWLVkYePvsrlTmIcmjYbFFr/m7+ I8Pld7CKWKM9G7bbp3Pu8z91sAzwqHC4taDZZFk1O7sSIzMkOIaZFy0eWr5MksnH3+SYDNEzham t+SdiAZqNfrg3dw620fc9iGPjzm1JcwJPxZAZSYsyCGNebDj4Geaf9pvhy4Zdg0p8v64= X-Gm-Gg: AYBFou36i74GEcmv56o7cq2TY+60vQDjt/Ms49LWHfsFuQ/KxHqxR3lCduG/eHGlhS5 HV8Ou7oH/wxt6tJfC9Tbe1iEbBrztmwBD5wU/XY9ysHB0ij/uc1LV8UP4BMaaoIKfhXZLEsXQvT FQT+N901O9sTgiM0p1dQ0iIRKCA68eDtAFVJ1FI3hAJQ3vi2DKeWGWDhNcUzkONmNYlUbjubeFz d5M5dYU488TG22ZOyyt/tnOeWLtEbAW9Blflsl1nWyGjzhN0mmJuxx4cR8DmUHLM0K8enryl4y2 zi1O51IxKsYAA/Q28xmem9YEFgfSDYCY3GMURN2cuVyS3uk3tCu18WvnReIPmOvDhOa2O89CK9L XGeVacgwZ5+eB3efer3+6Sh6PLGIPbOHqkd3swIPNh0LHxbgJAGb7rjfw7LcsQ6BjC4s9YYYfNM w422AtD3lJIr9fusOc X-Received: by 2002:a05:7301:1887:b0:36d:6a77:960a with SMTP id 5a478bee46e88-37963564b9fmr9267313eec.1.1794824399199; Mon, 16 Nov 2026 02:19:59 -0800 (PST) X-Received: by 2002:a05:7301:1887:b0:36d:6a77:960a with SMTP id 5a478bee46e88-37963564b9fmr9267276eec.1.1794824398348; Mon, 16 Nov 2026 02:19:58 -0800 (PST) Received: from hu-luoj-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-37956bad6casm32599557eec.26.2026.11.16.02.19.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2026 02:19:57 -0800 (PST) From: Luo Jie Date: Mon, 16 Nov 2026 02:19:50 -0800 Subject: [PATCH v3 3/4] clk: qcom: Add NSS clock controller driver for IPQ5210 SoC X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20261116-qcom_ipq5210_nsscc-v3-3-1eaf92698379@oss.qualcomm.com> References: <20261116-qcom_ipq5210_nsscc-v3-0-1eaf92698379@oss.qualcomm.com> In-Reply-To: <20261116-qcom_ipq5210_nsscc-v3-0-1eaf92698379@oss.qualcomm.com> To: Bjorn Andersson , Abel Vesa , Stephen Boyd , Brian Masney , Jerome Brunet , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Georgi Djakov , Philipp Zabel , Luo Jie , Richard Cochran , Konrad Dybcio Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, netdev@vger.kernel.org, quic_kkumarcs@quicinc.com, quic_linchen@quicinc.com, quic_leiwei@quicinc.com, Abel Vesa X-Mailer: b4 0.17-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1794824393; l=67259; i=jie.luo@oss.qualcomm.com; s=20251128; h=from:subject:message-id; bh=0DaSP1QLd+SGh9mjpwBhyH3XfJ1/56gxydbET/cbJlM=; b=+Sy3EaOXdGjy9xbsPCzGgEGw/ceyKcyWXBwQpqY+eKuAwnmgapIw9ZzYya2iSyYIPi5Kyq5fz xT0ytQa5fbbAky4jsGQUOBC0XN0qemuzarGNa/g705l3/haSGJ8qPZ5 X-Developer-Key: i=jie.luo@oss.qualcomm.com; a=ed25519; pk=gSsYMDakxtd6UDFYDdA9y9yjIs5Etp5GK/3DoXWPyS0= X-Proofpoint-Spam-Info: AW1haW4tMjYxMTE2MDA0MCBTYWx0ZWRfX0LOqaHHh2GR6 4NxKbpm8AKuB3ECNHANBjlaQN5V6pU1uGPnuccm9aWXJhAJbeiK7JqzVO2+imYzNHm92QMx958A amalUdvmPNNgUmGvZn7osF3TkkCnTmo= X-Proofpoint-GUID: DtFgDpo-fP_2b_26XKrbqchDHVoKj7HS X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTE2MDA0MCBTYWx0ZWRfX7JcpduvYsFdT QGDXson7Q5NbjcSt01RxqetoHuVH/DYnYdRKHcKYpQZexHoEJ0dxqSJydqZgE2luwVfUbubivJX 03NE/80yBy7wjQC8uWMDv6+MtK23ehfgu8+jTXGV+fPLUQtQJBkgp/w3Y3EQX8DRvgBcSOs6IuD LnL7g2BnkK840GG0P9rgCR0NOofs1Zv1ZirXUAFu14s6oZMM0HTaW1u/mVCKqrPZRx6VAs3CooZ EZdwkWLK56GaKh9i1aRlMmCxQdK5kjUEdquy5QyaJCGluWbUUBoTuXOZjpoU4aEpr6ImlsB+sk8 Gj0txcji50v2odNtM39wRtaZTxFlycUyKVFd85O7jz7ziYlpTSKHp0GBKiFm3Rl9jebhZPoH20g yvLp24Dd2ZqT+oNWz3l/uaj8cugeJ2Li7qRny7hpXeeDLjxUNH1pRblIbM33fADa1fyWylXqhBv sFSVNtNwgxVohWjd+Ww== X-Proofpoint-ORIG-GUID: DtFgDpo-fP_2b_26XKrbqchDHVoKj7HS X-Authority-Analysis: v=2.4 cv=ePeGH3p1 c=1 sm=1 tr=0 ts=6afad8d1 cx=c_pps a=PfFC4Oe2JQzmKTvty2cRDw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=zJRp6_cAMcgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=EUspDBNiAAAA:8 a=9NNFwX1Lmsrkzrh2ROEA:9 a=QEXdDO2ut3YA:10 a=6Ab_bkdmUrQuMsNx7PHu:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-11-16_03,2026-11-11_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 adultscore=0 spamscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 bulkscore=0 malwarescore=0 lowpriorityscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2611160040 The NSS (Network SubSystem) clock controller provides the clocks and resets to the networking blocks such as PPE (Packet Process Engine), UNIPHY (PCS) and the integrated Ethernet PHY on IPQ5210 devices. The icc-clk framework is used to enable NoC related clocks to create paths so that the networking blocks such as PPE can connect to these NoCs. Reviewed-by: Abel Vesa Signed-off-by: Luo Jie --- drivers/clk/qcom/Kconfig | 12 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/nsscc-ipq5210.c | 2201 ++++++++++++++++++++++++++++++++++= ++++ 3 files changed, 2214 insertions(+) diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig index e6c58e8b1849..a63f568b1405 100644 --- a/drivers/clk/qcom/Kconfig +++ b/drivers/clk/qcom/Kconfig @@ -737,6 +737,18 @@ config IPQ_GCC_9650 i2c, USB, SD/eMMC, etc. Select this for the root clock of ipq9650. =20 +config IPQ_NSSCC_5210 + tristate "IPQ5210 NSS Clock Controller" + depends on ARM64 || COMPILE_TEST + depends on IPQ_GCC_5210 + default m if ARCH_QCOM + help + Support for NSS clock controller on ipq5210 devices. + NSSCC receives the clock sources from GCC and CMN PLL. + It in turn supplies the clocks and resets to the networking hardware. + Say Y or M if you want to enable networking function on the + IPQ5210 devices. + config IPQ_NSSCC_5424 tristate "IPQ5424 NSS Clock Controller" depends on ARM64 || COMPILE_TEST diff --git a/drivers/clk/qcom/Makefile b/drivers/clk/qcom/Makefile index f84d7343a3a4..a0d9b50f2caf 100644 --- a/drivers/clk/qcom/Makefile +++ b/drivers/clk/qcom/Makefile @@ -81,6 +81,7 @@ obj-$(CONFIG_IPQ_GCC_806X) +=3D gcc-ipq806x.o obj-$(CONFIG_IPQ_GCC_8074) +=3D gcc-ipq8074.o obj-$(CONFIG_IPQ_GCC_9574) +=3D gcc-ipq9574.o obj-$(CONFIG_IPQ_GCC_9650) +=3D gcc-ipq9650.o +obj-$(CONFIG_IPQ_NSSCC_5210) +=3D nsscc-ipq5210.o obj-$(CONFIG_IPQ_NSSCC_5424) +=3D nsscc-ipq5424.o obj-$(CONFIG_IPQ_NSSCC_9574) +=3D nsscc-ipq9574.o obj-$(CONFIG_IPQ_LCC_806X) +=3D lcc-ipq806x.o diff --git a/drivers/clk/qcom/nsscc-ipq5210.c b/drivers/clk/qcom/nsscc-ipq5= 210.c new file mode 100644 index 000000000000..5607471caf20 --- /dev/null +++ b/drivers/clk/qcom/nsscc-ipq5210.c @@ -0,0 +1,2201 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "clk-branch.h" +#include "clk-rcg.h" +#include "clk-regmap.h" +#include "clk-regmap-divider.h" +#include "clk-regmap-mux.h" +#include "common.h" +#include "reset.h" + +/* Need to match the order of clocks in DT binding */ +enum { + DT_XO, + DT_CMN_PLL_NSS_CLK_375M, + DT_CMN_PLL_NSS_CLK_429M, + DT_GCC_GPLL0, + DT_UNIPHY0_NSS_RX_CLK, + DT_UNIPHY0_NSS_TX_CLK, + DT_UNIPHY1_NSS_RX_CLK, + DT_UNIPHY1_NSS_TX_CLK, + DT_UNIPHY2_NSS_RX_CLK, + DT_UNIPHY2_NSS_TX_CLK, + DT_GCC_NSSCC_CLK, + DT_EPHY_RX_CLK, + DT_EPHY_TX_CLK, +}; + +enum { + P_XO, + P_CMN_PLL_NSS_CLK_375M, + P_CMN_PLL_NSS_CLK_429M, + P_GCC_GPLL0, + P_UNIPHY0_NSS_RX_CLK, + P_UNIPHY0_NSS_TX_CLK, + P_UNIPHY1_NSS_RX_CLK, + P_UNIPHY1_NSS_TX_CLK, + P_UNIPHY2_NSS_RX_CLK, + P_UNIPHY2_NSS_TX_CLK, + P_EPHY_RX_CLK, + P_EPHY_TX_CLK, +}; + +static const struct parent_map nss_cc_parent_map_ppe_cfg[] =3D { + { P_XO, 0 }, + { P_GCC_GPLL0, 2 }, +}; + +static const struct parent_map nss_cc_parent_map_ppe[] =3D { + { P_XO, 0 }, + { P_CMN_PLL_NSS_CLK_429M, 6 }, +}; + +static const struct clk_parent_data nss_cc_ppe_parent_data_ppe_cfg[] =3D { + { .index =3D DT_XO }, + { .index =3D DT_GCC_GPLL0 }, +}; + +static const struct clk_parent_data nss_cc_ppe_parent_data_ppe[] =3D { + { .index =3D DT_XO }, + { .index =3D DT_CMN_PLL_NSS_CLK_429M }, +}; + +static const struct clk_parent_data nss_cc_ppe_parent_data_eip[] =3D { + { .index =3D DT_XO }, + { .index =3D DT_CMN_PLL_NSS_CLK_375M }, +}; + +static const struct parent_map nss_cc_parent_map_port1_3_rx[] =3D { + { P_XO, 0 }, + { P_UNIPHY0_NSS_RX_CLK, 3 }, +}; + +static const struct parent_map nss_cc_parent_map_port1_3_tx[] =3D { + { P_XO, 0 }, + { P_UNIPHY0_NSS_TX_CLK, 4 }, +}; + +static const struct parent_map nss_cc_parent_map_port4_rx[] =3D { + { P_XO, 0 }, + { P_EPHY_RX_CLK, 1 }, + { P_UNIPHY0_NSS_RX_CLK, 3 }, +}; + +static const struct parent_map nss_cc_parent_map_port4_tx[] =3D { + { P_XO, 0 }, + { P_UNIPHY0_NSS_TX_CLK, 4 }, + { P_EPHY_TX_CLK, 5 }, +}; + +static const struct clk_parent_data gcc_xo_ephy_uniphy0_rx[] =3D { + { .index =3D DT_XO }, + { .index =3D DT_EPHY_RX_CLK }, + { .index =3D DT_UNIPHY0_NSS_RX_CLK }, +}; + +static const struct clk_parent_data gcc_xo_ephy_uniphy0_tx[] =3D { + { .index =3D DT_XO }, + { .index =3D DT_UNIPHY0_NSS_TX_CLK }, + { .index =3D DT_EPHY_TX_CLK }, +}; + +static const struct clk_parent_data gcc_xo_uniphy0_gcc_rx[] =3D { + { .index =3D DT_XO }, + { .index =3D DT_UNIPHY0_NSS_RX_CLK }, +}; + +static const struct clk_parent_data gcc_xo_uniphy0_gcc_tx[] =3D { + { .index =3D DT_XO }, + { .index =3D DT_UNIPHY0_NSS_TX_CLK }, +}; + +static const struct parent_map nss_cc_parent_map_port5_rx[] =3D { + { P_XO, 0 }, + { P_EPHY_RX_CLK, 1 }, + { P_UNIPHY1_NSS_RX_CLK, 3 }, +}; + +static const struct parent_map nss_cc_parent_map_port5_tx[] =3D { + { P_XO, 0 }, + { P_UNIPHY1_NSS_TX_CLK, 4 }, + { P_EPHY_TX_CLK, 5 }, +}; + +static const struct clk_parent_data gcc_xo_ephy_uniphy1_rx[] =3D { + { .index =3D DT_XO }, + { .index =3D DT_EPHY_RX_CLK }, + { .index =3D DT_UNIPHY1_NSS_RX_CLK }, +}; + +static const struct clk_parent_data gcc_xo_ephy_uniphy1_tx[] =3D { + { .index =3D DT_XO }, + { .index =3D DT_UNIPHY1_NSS_TX_CLK }, + { .index =3D DT_EPHY_TX_CLK }, +}; + +static const struct parent_map nss_cc_parent_map_port6_rx[] =3D { + { P_XO, 0 }, + { P_UNIPHY2_NSS_RX_CLK, 3 }, +}; + +static const struct parent_map nss_cc_parent_map_port6_tx[] =3D { + { P_XO, 0 }, + { P_UNIPHY2_NSS_TX_CLK, 4 }, +}; + +static const struct clk_parent_data gcc_xo_uniphy2_rx[] =3D { + { .index =3D DT_XO }, + { .index =3D DT_UNIPHY2_NSS_RX_CLK }, +}; + +static const struct clk_parent_data gcc_xo_uniphy2_tx[] =3D { + { .index =3D DT_XO }, + { .index =3D DT_UNIPHY2_NSS_TX_CLK }, +}; + +static const struct freq_tbl ftbl_nss_cc_ppe_clk_src[] =3D { + F(24000000, P_XO, 1, 0, 0), + F(429000000, P_CMN_PLL_NSS_CLK_429M, 1, 0, 0), + { } +}; + +static struct clk_rcg2 nss_cc_ppe_clk_src =3D { + .cmd_rcgr =3D 0x3ec, + .mnd_width =3D 0, + .hid_width =3D 5, + .parent_map =3D nss_cc_parent_map_ppe, + .freq_tbl =3D ftbl_nss_cc_ppe_clk_src, + .clkr.hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_ppe_clk_src", + .parent_data =3D nss_cc_ppe_parent_data_ppe, + .num_parents =3D ARRAY_SIZE(nss_cc_ppe_parent_data_ppe), + .ops =3D &clk_rcg2_ops, + }, +}; + +/* + * The XGMAC PTP reference clock rate needs to be configurable, so the + * PTP reference dividers use the writable divider ops. CLK_SET_RATE_PARENT + * is not set, so that the rate change only updates the divider and does + * not change the shared PPE clock. + */ +static struct clk_regmap_div nss_cc_xgmac0_ptp_ref_div_clk_src =3D { + .reg =3D 0x3f4, + .shift =3D 0, + .width =3D 4, + .clkr.hw.init =3D &(const struct clk_init_data) { + .name =3D "nss_cc_xgmac0_ptp_ref_div_clk_src", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_ppe_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .ops =3D &clk_regmap_div_ops, + }, +}; + +static struct clk_regmap_div nss_cc_xgmac1_ptp_ref_div_clk_src =3D { + .reg =3D 0x3f8, + .shift =3D 0, + .width =3D 4, + .clkr.hw.init =3D &(const struct clk_init_data) { + .name =3D "nss_cc_xgmac1_ptp_ref_div_clk_src", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_ppe_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .ops =3D &clk_regmap_div_ops, + }, +}; + +static struct clk_regmap_div nss_cc_xgmac2_ptp_ref_div_clk_src =3D { + .reg =3D 0x3fc, + .shift =3D 0, + .width =3D 4, + .clkr.hw.init =3D &(const struct clk_init_data) { + .name =3D "nss_cc_xgmac2_ptp_ref_div_clk_src", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_ppe_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .ops =3D &clk_regmap_div_ops, + }, +}; + +static struct clk_branch nss_cc_ppe_switch_ipe_clk =3D { + .halt_reg =3D 0x424, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x424, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_ppe_switch_ipe_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_ppe_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_ppe_switch_btq_clk =3D { + .halt_reg =3D 0x42c, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x42c, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_ppe_switch_btq_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_ppe_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_ppe_switch_clk =3D { + .halt_reg =3D 0x434, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x434, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_ppe_switch_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_ppe_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_ppe_switch_cfg_clk =3D { + .halt_reg =3D 0x43c, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x43c, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_ppe_switch_cfg_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_ppe_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_ppe_edma_clk =3D { + .halt_reg =3D 0x440, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x440, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_ppe_edma_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_ppe_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_ppe_edma_cfg_clk =3D { + .halt_reg =3D 0x448, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x448, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_ppe_edma_cfg_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_ppe_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_port1_mac_clk =3D { + .halt_reg =3D 0x44c, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x44c, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port1_mac_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_ppe_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_port2_mac_clk =3D { + .halt_reg =3D 0x454, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x454, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port2_mac_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_ppe_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_port3_mac_clk =3D { + .halt_reg =3D 0x45c, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x45c, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port3_mac_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_ppe_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_port4_mac_clk =3D { + .halt_reg =3D 0x464, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x464, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port4_mac_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_ppe_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_port5_mac_clk =3D { + .halt_reg =3D 0x46c, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x46c, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port5_mac_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_ppe_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_port6_mac_clk =3D { + .halt_reg =3D 0x474, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x474, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port6_mac_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_ppe_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_pon_clk =3D { + .halt_reg =3D 0x47c, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x47c, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_pon_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_ppe_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_xgmac0_ptp_ref_clk =3D { + .halt_reg =3D 0x488, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x488, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_xgmac0_ptp_ref_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_xgmac0_ptp_ref_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_xgmac1_ptp_ref_clk =3D { + .halt_reg =3D 0x48c, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x48c, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_xgmac1_ptp_ref_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_xgmac1_ptp_ref_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_xgmac2_ptp_ref_clk =3D { + .halt_reg =3D 0x490, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x490, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_xgmac2_ptp_ref_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_xgmac2_ptp_ref_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_nssnoc_ppe_clk =3D { + .halt_reg =3D 0x4a4, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x4a4, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_nssnoc_ppe_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_ppe_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_nssnoc_ppe_cfg_clk =3D { + .halt_reg =3D 0x4a8, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x4a8, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_nssnoc_ppe_cfg_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_ppe_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static const struct freq_conf ftbl_nss_cc_port1_rx_clk_src_25[] =3D { + C(P_UNIPHY0_NSS_RX_CLK, 12.5, 0, 0), + C(P_UNIPHY0_NSS_RX_CLK, 5, 0, 0), +}; + +static const struct freq_conf ftbl_nss_cc_port1_rx_clk_src_125[] =3D { + C(P_UNIPHY0_NSS_RX_CLK, 2.5, 0, 0), + C(P_UNIPHY0_NSS_RX_CLK, 1, 0, 0), +}; + +static const struct freq_multi_tbl ftbl_nss_cc_port1_3_rx_clk_src[] =3D { + FMS(24000000, P_XO, 1, 0, 0), + FM(25000000, ftbl_nss_cc_port1_rx_clk_src_25), + FM(125000000, ftbl_nss_cc_port1_rx_clk_src_125), + FMS(156250000, P_UNIPHY0_NSS_RX_CLK, 2, 0, 0), + FMS(312500000, P_UNIPHY0_NSS_RX_CLK, 1, 0, 0), + FMS(378788000, P_UNIPHY0_NSS_RX_CLK, 1, 0, 0), + { } +}; + +static struct clk_rcg2 nss_cc_port1_rx_clk_src =3D { + .cmd_rcgr =3D 0x4b4, + .mnd_width =3D 0, + .hid_width =3D 5, + .parent_map =3D nss_cc_parent_map_port1_3_rx, + .freq_multi_tbl =3D ftbl_nss_cc_port1_3_rx_clk_src, + .clkr.hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port1_rx_clk_src", + .parent_data =3D gcc_xo_uniphy0_gcc_rx, + .num_parents =3D ARRAY_SIZE(gcc_xo_uniphy0_gcc_rx), + .ops =3D &clk_rcg2_fm_ops, + }, +}; + +static struct clk_regmap_div nss_cc_port1_rx_div_clk_src =3D { + .reg =3D 0x4bc, + .shift =3D 0, + .width =3D 9, + .clkr.hw.init =3D &(const struct clk_init_data) { + .name =3D "nss_cc_port1_rx_div_clk_src", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port1_rx_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_regmap_div_ops, + }, +}; + +static const struct freq_conf ftbl_nss_cc_port1_tx_clk_src_25[] =3D { + C(P_UNIPHY0_NSS_TX_CLK, 12.5, 0, 0), + C(P_UNIPHY0_NSS_TX_CLK, 5, 0, 0), +}; + +static const struct freq_conf ftbl_nss_cc_port1_tx_clk_src_125[] =3D { + C(P_UNIPHY0_NSS_TX_CLK, 2.5, 0, 0), + C(P_UNIPHY0_NSS_TX_CLK, 1, 0, 0), +}; + +static const struct freq_multi_tbl ftbl_nss_cc_port1_3_tx_clk_src[] =3D { + FMS(24000000, P_XO, 1, 0, 0), + FM(25000000, ftbl_nss_cc_port1_tx_clk_src_25), + FM(125000000, ftbl_nss_cc_port1_tx_clk_src_125), + FMS(156250000, P_UNIPHY0_NSS_TX_CLK, 2, 0, 0), + FMS(312500000, P_UNIPHY0_NSS_TX_CLK, 1, 0, 0), + FMS(378788000, P_UNIPHY0_NSS_TX_CLK, 1, 0, 0), + { } +}; + +static struct clk_rcg2 nss_cc_port1_tx_clk_src =3D { + .cmd_rcgr =3D 0x4c0, + .mnd_width =3D 0, + .hid_width =3D 5, + .parent_map =3D nss_cc_parent_map_port1_3_tx, + .freq_multi_tbl =3D ftbl_nss_cc_port1_3_tx_clk_src, + .clkr.hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port1_tx_clk_src", + .parent_data =3D gcc_xo_uniphy0_gcc_tx, + .num_parents =3D ARRAY_SIZE(gcc_xo_uniphy0_gcc_tx), + .ops =3D &clk_rcg2_fm_ops, + }, +}; + +static struct clk_regmap_div nss_cc_port1_tx_div_clk_src =3D { + .reg =3D 0x4c8, + .shift =3D 0, + .width =3D 9, + .clkr.hw.init =3D &(const struct clk_init_data) { + .name =3D "nss_cc_port1_tx_div_clk_src", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port1_tx_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_regmap_div_ops, + }, +}; + +static struct clk_rcg2 nss_cc_port2_rx_clk_src =3D { + .cmd_rcgr =3D 0x4cc, + .mnd_width =3D 0, + .hid_width =3D 5, + .parent_map =3D nss_cc_parent_map_port1_3_rx, + .freq_multi_tbl =3D ftbl_nss_cc_port1_3_rx_clk_src, + .clkr.hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port2_rx_clk_src", + .parent_data =3D gcc_xo_uniphy0_gcc_rx, + .num_parents =3D ARRAY_SIZE(gcc_xo_uniphy0_gcc_rx), + .ops =3D &clk_rcg2_fm_ops, + }, +}; + +static struct clk_regmap_div nss_cc_port2_rx_div_clk_src =3D { + .reg =3D 0x4d4, + .shift =3D 0, + .width =3D 9, + .clkr.hw.init =3D &(const struct clk_init_data) { + .name =3D "nss_cc_port2_rx_div_clk_src", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port2_rx_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_regmap_div_ops, + }, +}; + +static struct clk_rcg2 nss_cc_port2_tx_clk_src =3D { + .cmd_rcgr =3D 0x4d8, + .mnd_width =3D 0, + .hid_width =3D 5, + .parent_map =3D nss_cc_parent_map_port1_3_tx, + .freq_multi_tbl =3D ftbl_nss_cc_port1_3_tx_clk_src, + .clkr.hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port2_tx_clk_src", + .parent_data =3D gcc_xo_uniphy0_gcc_tx, + .num_parents =3D ARRAY_SIZE(gcc_xo_uniphy0_gcc_tx), + .ops =3D &clk_rcg2_fm_ops, + }, +}; + +static struct clk_regmap_div nss_cc_port2_tx_div_clk_src =3D { + .reg =3D 0x4e0, + .shift =3D 0, + .width =3D 9, + .clkr.hw.init =3D &(const struct clk_init_data) { + .name =3D "nss_cc_port2_tx_div_clk_src", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port2_tx_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_regmap_div_ops, + }, +}; + +static struct clk_rcg2 nss_cc_port3_rx_clk_src =3D { + .cmd_rcgr =3D 0x4e4, + .mnd_width =3D 0, + .hid_width =3D 5, + .parent_map =3D nss_cc_parent_map_port1_3_rx, + .freq_multi_tbl =3D ftbl_nss_cc_port1_3_rx_clk_src, + .clkr.hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port3_rx_clk_src", + .parent_data =3D gcc_xo_uniphy0_gcc_rx, + .num_parents =3D ARRAY_SIZE(gcc_xo_uniphy0_gcc_rx), + .ops =3D &clk_rcg2_fm_ops, + }, +}; + +static struct clk_regmap_div nss_cc_port3_rx_div_clk_src =3D { + .reg =3D 0x4ec, + .shift =3D 0, + .width =3D 9, + .clkr.hw.init =3D &(const struct clk_init_data) { + .name =3D "nss_cc_port3_rx_div_clk_src", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port3_rx_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_regmap_div_ops, + }, +}; + +static struct clk_rcg2 nss_cc_port3_tx_clk_src =3D { + .cmd_rcgr =3D 0x4f0, + .mnd_width =3D 0, + .hid_width =3D 5, + .parent_map =3D nss_cc_parent_map_port1_3_tx, + .freq_multi_tbl =3D ftbl_nss_cc_port1_3_tx_clk_src, + .clkr.hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port3_tx_clk_src", + .parent_data =3D gcc_xo_uniphy0_gcc_tx, + .num_parents =3D ARRAY_SIZE(gcc_xo_uniphy0_gcc_tx), + .ops =3D &clk_rcg2_fm_ops, + }, +}; + +static struct clk_regmap_div nss_cc_port3_tx_div_clk_src =3D { + .reg =3D 0x4f8, + .shift =3D 0, + .width =3D 9, + .clkr.hw.init =3D &(const struct clk_init_data) { + .name =3D "nss_cc_port3_tx_div_clk_src", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port3_tx_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_regmap_div_ops, + }, +}; + +static const struct freq_conf ftbl_nss_cc_port4_rx_clk_src_25[] =3D { + C(P_UNIPHY0_NSS_RX_CLK, 12.5, 0, 0), + C(P_UNIPHY0_NSS_RX_CLK, 5, 0, 0), + C(P_EPHY_RX_CLK, 5, 0, 0), +}; + +static const struct freq_conf ftbl_nss_cc_port4_rx_clk_src_125[] =3D { + C(P_UNIPHY0_NSS_RX_CLK, 2.5, 0, 0), + C(P_UNIPHY0_NSS_RX_CLK, 1, 0, 0), + C(P_EPHY_RX_CLK, 1, 0, 0), +}; + +static const struct freq_conf ftbl_nss_cc_port4_rx_clk_src_312p5[] =3D { + C(P_UNIPHY0_NSS_RX_CLK, 1, 0, 0), + C(P_EPHY_RX_CLK, 1, 0, 0), +}; + +static const struct freq_multi_tbl ftbl_nss_cc_port4_rx_clk_src[] =3D { + FMS(24000000, P_XO, 1, 0, 0), + FM(25000000, ftbl_nss_cc_port4_rx_clk_src_25), + FM(125000000, ftbl_nss_cc_port4_rx_clk_src_125), + FMS(156250000, P_UNIPHY0_NSS_RX_CLK, 2, 0, 0), + FM(312500000, ftbl_nss_cc_port4_rx_clk_src_312p5), + { } +}; + +static struct clk_rcg2 nss_cc_port4_rx_clk_src =3D { + .cmd_rcgr =3D 0x4fc, + .mnd_width =3D 0, + .hid_width =3D 5, + .parent_map =3D nss_cc_parent_map_port4_rx, + .freq_multi_tbl =3D ftbl_nss_cc_port4_rx_clk_src, + .clkr.hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port4_rx_clk_src", + .parent_data =3D gcc_xo_ephy_uniphy0_rx, + .num_parents =3D ARRAY_SIZE(gcc_xo_ephy_uniphy0_rx), + .ops =3D &clk_rcg2_fm_ops, + }, +}; + +static struct clk_regmap_div nss_cc_port4_rx_div_clk_src =3D { + .reg =3D 0x504, + .shift =3D 0, + .width =3D 9, + .clkr.hw.init =3D &(const struct clk_init_data) { + .name =3D "nss_cc_port4_rx_div_clk_src", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port4_rx_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_regmap_div_ops, + }, +}; + +static const struct freq_conf ftbl_nss_cc_port4_tx_clk_src_25[] =3D { + C(P_UNIPHY0_NSS_TX_CLK, 12.5, 0, 0), + C(P_UNIPHY0_NSS_TX_CLK, 5, 0, 0), + C(P_EPHY_TX_CLK, 5, 0, 0), +}; + +static const struct freq_conf ftbl_nss_cc_port4_tx_clk_src_125[] =3D { + C(P_UNIPHY0_NSS_TX_CLK, 2.5, 0, 0), + C(P_UNIPHY0_NSS_TX_CLK, 1, 0, 0), + C(P_EPHY_TX_CLK, 1, 0, 0), +}; + +static const struct freq_conf ftbl_nss_cc_port4_tx_clk_src_312p5[] =3D { + C(P_UNIPHY0_NSS_TX_CLK, 1, 0, 0), + C(P_EPHY_TX_CLK, 1, 0, 0), +}; + +static const struct freq_multi_tbl ftbl_nss_cc_port4_tx_clk_src[] =3D { + FMS(24000000, P_XO, 1, 0, 0), + FM(25000000, ftbl_nss_cc_port4_tx_clk_src_25), + FM(125000000, ftbl_nss_cc_port4_tx_clk_src_125), + FMS(156250000, P_UNIPHY0_NSS_TX_CLK, 2, 0, 0), + FM(312500000, ftbl_nss_cc_port4_tx_clk_src_312p5), + { } +}; + +static struct clk_rcg2 nss_cc_port4_tx_clk_src =3D { + .cmd_rcgr =3D 0x508, + .mnd_width =3D 0, + .hid_width =3D 5, + .parent_map =3D nss_cc_parent_map_port4_tx, + .freq_multi_tbl =3D ftbl_nss_cc_port4_tx_clk_src, + .clkr.hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port4_tx_clk_src", + .parent_data =3D gcc_xo_ephy_uniphy0_tx, + .num_parents =3D ARRAY_SIZE(gcc_xo_ephy_uniphy0_tx), + .ops =3D &clk_rcg2_fm_ops, + }, +}; + +static struct clk_regmap_div nss_cc_port4_tx_div_clk_src =3D { + .reg =3D 0x510, + .shift =3D 0, + .width =3D 9, + .clkr.hw.init =3D &(const struct clk_init_data) { + .name =3D "nss_cc_port4_tx_div_clk_src", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port4_tx_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_regmap_div_ops, + }, +}; + +static const struct freq_conf ftbl_nss_cc_port5_rx_clk_src_25[] =3D { + C(P_UNIPHY1_NSS_RX_CLK, 12.5, 0, 0), + C(P_UNIPHY1_NSS_RX_CLK, 5, 0, 0), + C(P_EPHY_RX_CLK, 5, 0, 0), +}; + +static const struct freq_conf ftbl_nss_cc_port5_rx_clk_src_125[] =3D { + C(P_UNIPHY1_NSS_RX_CLK, 2.5, 0, 0), + C(P_UNIPHY1_NSS_RX_CLK, 1, 0, 0), + C(P_EPHY_RX_CLK, 1, 0, 0), +}; + +static const struct freq_conf ftbl_nss_cc_port5_rx_clk_src_312p5[] =3D { + C(P_UNIPHY1_NSS_RX_CLK, 1, 0, 0), + C(P_EPHY_RX_CLK, 1, 0, 0), +}; + +static const struct freq_multi_tbl ftbl_nss_cc_port5_rx_clk_src[] =3D { + FMS(24000000, P_XO, 1, 0, 0), + FM(25000000, ftbl_nss_cc_port5_rx_clk_src_25), + FM(125000000, ftbl_nss_cc_port5_rx_clk_src_125), + FMS(156250000, P_UNIPHY1_NSS_RX_CLK, 2, 0, 0), + FM(312500000, ftbl_nss_cc_port5_rx_clk_src_312p5), + { } +}; + +static struct clk_rcg2 nss_cc_port5_rx_clk_src =3D { + .cmd_rcgr =3D 0x514, + .mnd_width =3D 0, + .hid_width =3D 5, + .parent_map =3D nss_cc_parent_map_port5_rx, + .freq_multi_tbl =3D ftbl_nss_cc_port5_rx_clk_src, + .clkr.hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port5_rx_clk_src", + .parent_data =3D gcc_xo_ephy_uniphy1_rx, + .num_parents =3D ARRAY_SIZE(gcc_xo_ephy_uniphy1_rx), + .ops =3D &clk_rcg2_fm_ops, + }, +}; + +static struct clk_regmap_div nss_cc_port5_rx_div_clk_src =3D { + .reg =3D 0x51c, + .shift =3D 0, + .width =3D 9, + .clkr.hw.init =3D &(const struct clk_init_data) { + .name =3D "nss_cc_port5_rx_div_clk_src", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port5_rx_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_regmap_div_ops, + }, +}; + +static const struct freq_conf ftbl_nss_cc_port5_tx_clk_src_25[] =3D { + C(P_UNIPHY1_NSS_TX_CLK, 12.5, 0, 0), + C(P_UNIPHY1_NSS_TX_CLK, 5, 0, 0), + C(P_EPHY_TX_CLK, 5, 0, 0), +}; + +static const struct freq_conf ftbl_nss_cc_port5_tx_clk_src_125[] =3D { + C(P_UNIPHY1_NSS_TX_CLK, 2.5, 0, 0), + C(P_UNIPHY1_NSS_TX_CLK, 1, 0, 0), + C(P_EPHY_TX_CLK, 1, 0, 0), +}; + +static const struct freq_conf ftbl_nss_cc_port5_tx_clk_src_312p5[] =3D { + C(P_UNIPHY1_NSS_TX_CLK, 1, 0, 0), + C(P_EPHY_TX_CLK, 1, 0, 0), +}; + +static const struct freq_multi_tbl ftbl_nss_cc_port5_tx_clk_src[] =3D { + FMS(24000000, P_XO, 1, 0, 0), + FM(25000000, ftbl_nss_cc_port5_tx_clk_src_25), + FM(125000000, ftbl_nss_cc_port5_tx_clk_src_125), + FMS(156250000, P_UNIPHY1_NSS_TX_CLK, 2, 0, 0), + FM(312500000, ftbl_nss_cc_port5_tx_clk_src_312p5), + { } +}; + +static struct clk_rcg2 nss_cc_port5_tx_clk_src =3D { + .cmd_rcgr =3D 0x520, + .mnd_width =3D 0, + .hid_width =3D 5, + .parent_map =3D nss_cc_parent_map_port5_tx, + .freq_multi_tbl =3D ftbl_nss_cc_port5_tx_clk_src, + .clkr.hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port5_tx_clk_src", + .parent_data =3D gcc_xo_ephy_uniphy1_tx, + .num_parents =3D ARRAY_SIZE(gcc_xo_ephy_uniphy1_tx), + .ops =3D &clk_rcg2_fm_ops, + }, +}; + +static struct clk_regmap_div nss_cc_port5_tx_div_clk_src =3D { + .reg =3D 0x528, + .shift =3D 0, + .width =3D 9, + .clkr.hw.init =3D &(const struct clk_init_data) { + .name =3D "nss_cc_port5_tx_div_clk_src", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port5_tx_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_regmap_div_ops, + }, +}; + +static const struct freq_conf ftbl_nss_cc_port6_rx_clk_src_25[] =3D { + C(P_UNIPHY2_NSS_RX_CLK, 12.5, 0, 0), + C(P_UNIPHY2_NSS_RX_CLK, 5, 0, 0), +}; + +static const struct freq_conf ftbl_nss_cc_port6_rx_clk_src_125[] =3D { + C(P_UNIPHY2_NSS_RX_CLK, 2.5, 0, 0), + C(P_UNIPHY2_NSS_RX_CLK, 1, 0, 0), +}; + +static const struct freq_multi_tbl ftbl_nss_cc_port6_rx_clk_src[] =3D { + FMS(24000000, P_XO, 1, 0, 0), + FM(25000000, ftbl_nss_cc_port6_rx_clk_src_25), + FM(125000000, ftbl_nss_cc_port6_rx_clk_src_125), + FMS(156250000, P_UNIPHY2_NSS_RX_CLK, 2, 0, 0), + FMS(312500000, P_UNIPHY2_NSS_RX_CLK, 1, 0, 0), + { } +}; + +static struct clk_rcg2 nss_cc_port6_rx_clk_src =3D { + .cmd_rcgr =3D 0x52c, + .mnd_width =3D 0, + .hid_width =3D 5, + .parent_map =3D nss_cc_parent_map_port6_rx, + .freq_multi_tbl =3D ftbl_nss_cc_port6_rx_clk_src, + .clkr.hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port6_rx_clk_src", + .parent_data =3D gcc_xo_uniphy2_rx, + .num_parents =3D ARRAY_SIZE(gcc_xo_uniphy2_rx), + .ops =3D &clk_rcg2_fm_ops, + }, +}; + +static struct clk_regmap_div nss_cc_port6_rx_div_clk_src =3D { + .reg =3D 0x534, + .shift =3D 0, + .width =3D 9, + .clkr.hw.init =3D &(const struct clk_init_data) { + .name =3D "nss_cc_port6_rx_div_clk_src", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port6_rx_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_regmap_div_ops, + }, +}; + +static const struct freq_conf ftbl_nss_cc_port6_tx_clk_src_25[] =3D { + C(P_UNIPHY2_NSS_TX_CLK, 12.5, 0, 0), + C(P_UNIPHY2_NSS_TX_CLK, 5, 0, 0), +}; + +static const struct freq_conf ftbl_nss_cc_port6_tx_clk_src_125[] =3D { + C(P_UNIPHY2_NSS_TX_CLK, 2.5, 0, 0), + C(P_UNIPHY2_NSS_TX_CLK, 1, 0, 0), +}; + +static const struct freq_multi_tbl ftbl_nss_cc_port6_tx_clk_src[] =3D { + FMS(24000000, P_XO, 1, 0, 0), + FM(25000000, ftbl_nss_cc_port6_tx_clk_src_25), + FM(125000000, ftbl_nss_cc_port6_tx_clk_src_125), + FMS(156250000, P_UNIPHY2_NSS_TX_CLK, 2, 0, 0), + FMS(312500000, P_UNIPHY2_NSS_TX_CLK, 1, 0, 0), + { } +}; + +static struct clk_rcg2 nss_cc_port6_tx_clk_src =3D { + .cmd_rcgr =3D 0x538, + .mnd_width =3D 0, + .hid_width =3D 5, + .parent_map =3D nss_cc_parent_map_port6_tx, + .freq_multi_tbl =3D ftbl_nss_cc_port6_tx_clk_src, + .clkr.hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port6_tx_clk_src", + .parent_data =3D gcc_xo_uniphy2_tx, + .num_parents =3D ARRAY_SIZE(gcc_xo_uniphy2_tx), + .ops =3D &clk_rcg2_fm_ops, + }, +}; + +static struct clk_regmap_div nss_cc_port6_tx_div_clk_src =3D { + .reg =3D 0x540, + .shift =3D 0, + .width =3D 9, + .clkr.hw.init =3D &(const struct clk_init_data) { + .name =3D "nss_cc_port6_tx_div_clk_src", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port6_tx_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_regmap_div_ops, + }, +}; + +static struct clk_branch nss_cc_port1_rx_clk =3D { + .halt_reg =3D 0x548, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x548, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port1_rx_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port1_rx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_port1_tx_clk =3D { + .halt_reg =3D 0x550, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x550, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port1_tx_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port1_tx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_port2_rx_clk =3D { + .halt_reg =3D 0x558, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x558, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port2_rx_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port2_rx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_port2_tx_clk =3D { + .halt_reg =3D 0x560, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x560, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port2_tx_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port2_tx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_port3_rx_clk =3D { + .halt_reg =3D 0x568, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x568, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port3_rx_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port3_rx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_port3_tx_clk =3D { + .halt_reg =3D 0x570, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x570, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port3_tx_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port3_tx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_port4_rx_clk =3D { + .halt_reg =3D 0x578, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x578, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port4_rx_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port4_rx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_port4_tx_clk =3D { + .halt_reg =3D 0x580, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x580, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port4_tx_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port4_tx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_port5_rx_clk =3D { + .halt_reg =3D 0x588, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x588, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port5_rx_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port5_rx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_port5_tx_clk =3D { + .halt_reg =3D 0x590, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x590, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port5_tx_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port5_tx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_port6_rx_clk =3D { + .halt_reg =3D 0x598, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x598, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port6_rx_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port6_rx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_port6_tx_clk =3D { + .halt_reg =3D 0x5a0, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x5a0, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_port6_tx_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port6_tx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_uniphy_port1_rx_clk =3D { + .halt_reg =3D 0x5e0, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x5e0, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_uniphy_port1_rx_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port1_rx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_uniphy_port1_tx_clk =3D { + .halt_reg =3D 0x5e4, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x5e4, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_uniphy_port1_tx_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port1_tx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_uniphy_port2_rx_clk =3D { + .halt_reg =3D 0x5e8, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x5e8, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_uniphy_port2_rx_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port2_rx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_uniphy_port2_tx_clk =3D { + .halt_reg =3D 0x5ec, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x5ec, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_uniphy_port2_tx_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port2_tx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_uniphy_port3_rx_clk =3D { + .halt_reg =3D 0x5f0, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x5f0, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_uniphy_port3_rx_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port3_rx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_uniphy_port3_tx_clk =3D { + .halt_reg =3D 0x5f4, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x5f4, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_uniphy_port3_tx_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port3_tx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_uniphy_port4_rx_clk =3D { + .halt_reg =3D 0x5f8, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x5f8, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_uniphy_port4_rx_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port4_rx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_uniphy_port4_tx_clk =3D { + .halt_reg =3D 0x5fc, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x5fc, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_uniphy_port4_tx_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port4_tx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_uniphy_port5_rx_clk =3D { + .halt_reg =3D 0x600, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x600, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_uniphy_port5_rx_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port5_rx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_uniphy_port5_tx_clk =3D { + .halt_reg =3D 0x604, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x604, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_uniphy_port5_tx_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port5_tx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_uniphy_port6_rx_clk =3D { + .halt_reg =3D 0x608, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x608, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_uniphy_port6_rx_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port6_rx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_uniphy_port6_tx_clk =3D { + .halt_reg =3D 0x60c, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x60c, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_uniphy_port6_tx_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port6_tx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_regmap_mux nss_cc_ephy_rx_mux_clk_src =3D { + .reg =3D 0x610, + .shift =3D 0, + .width =3D 1, + .clkr =3D { + .hw.init =3D &(const struct clk_init_data) { + .name =3D "nss_cc_ephy_rx_mux_clk_src", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port4_rx_div_clk_src.clkr.hw, + &nss_cc_port5_rx_div_clk_src.clkr.hw, + }, + .num_parents =3D 2, + .flags =3D CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT, + .ops =3D &clk_regmap_mux_closest_ops, + }, + }, +}; + +static struct clk_branch nss_cc_ephy_rx_clk =3D { + .halt_reg =3D 0x618, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x618, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_ephy_rx_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_ephy_rx_mux_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_regmap_mux nss_cc_ephy_tx_mux_clk_src =3D { + .reg =3D 0x614, + .shift =3D 0, + .width =3D 1, + .clkr =3D { + .hw.init =3D &(const struct clk_init_data) { + .name =3D "nss_cc_ephy_tx_mux_clk_src", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port4_tx_div_clk_src.clkr.hw, + &nss_cc_port5_tx_div_clk_src.clkr.hw, + }, + .num_parents =3D 2, + .flags =3D CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT, + .ops =3D &clk_regmap_mux_closest_ops, + }, + }, +}; + +static struct clk_branch nss_cc_ephy_tx_clk =3D { + .halt_reg =3D 0x61c, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x61c, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_ephy_tx_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_ephy_tx_mux_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_regmap_div nss_cc_uniphy_port1_rx_div4_clk_src =3D { + .reg =3D 0x624, + .shift =3D 0, + .width =3D 4, + .clkr.hw.init =3D &(const struct clk_init_data) { + .name =3D "nss_cc_uniphy_port1_rx_div4_clk_src", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port1_rx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .ops =3D &clk_regmap_div_ops, + }, +}; + +static struct clk_regmap_div nss_cc_uniphy_port1_tx_div4_clk_src =3D { + .reg =3D 0x628, + .shift =3D 0, + .width =3D 4, + .clkr.hw.init =3D &(const struct clk_init_data) { + .name =3D "nss_cc_uniphy_port1_tx_div4_clk_src", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port1_tx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .ops =3D &clk_regmap_div_ops, + }, +}; + +static struct clk_regmap_div nss_cc_uniphy_port2_rx_div4_clk_src =3D { + .reg =3D 0x62c, + .shift =3D 0, + .width =3D 4, + .clkr.hw.init =3D &(const struct clk_init_data) { + .name =3D "nss_cc_uniphy_port2_rx_div4_clk_src", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port2_rx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .ops =3D &clk_regmap_div_ops, + }, +}; + +static struct clk_regmap_div nss_cc_uniphy_port2_tx_div4_clk_src =3D { + .reg =3D 0x630, + .shift =3D 0, + .width =3D 4, + .clkr.hw.init =3D &(const struct clk_init_data) { + .name =3D "nss_cc_uniphy_port2_tx_div4_clk_src", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port2_tx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .ops =3D &clk_regmap_div_ops, + }, +}; + +static struct clk_regmap_div nss_cc_uniphy_port3_rx_div4_clk_src =3D { + .reg =3D 0x634, + .shift =3D 0, + .width =3D 4, + .clkr.hw.init =3D &(const struct clk_init_data) { + .name =3D "nss_cc_uniphy_port3_rx_div4_clk_src", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port3_rx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .ops =3D &clk_regmap_div_ops, + }, +}; + +static struct clk_regmap_div nss_cc_uniphy_port3_tx_div4_clk_src =3D { + .reg =3D 0x638, + .shift =3D 0, + .width =3D 4, + .clkr.hw.init =3D &(const struct clk_init_data) { + .name =3D "nss_cc_uniphy_port3_tx_div4_clk_src", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port3_tx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .ops =3D &clk_regmap_div_ops, + }, +}; + +static struct clk_regmap_div nss_cc_uniphy_port4_rx_div4_clk_src =3D { + .reg =3D 0x63c, + .shift =3D 0, + .width =3D 4, + .clkr.hw.init =3D &(const struct clk_init_data) { + .name =3D "nss_cc_uniphy_port4_rx_div4_clk_src", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port4_rx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .ops =3D &clk_regmap_div_ops, + }, +}; + +static struct clk_regmap_div nss_cc_uniphy_port4_tx_div4_clk_src =3D { + .reg =3D 0x640, + .shift =3D 0, + .width =3D 4, + .clkr.hw.init =3D &(const struct clk_init_data) { + .name =3D "nss_cc_uniphy_port4_tx_div4_clk_src", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_port4_tx_div_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .ops =3D &clk_regmap_div_ops, + }, +}; + +static struct clk_branch nss_cc_uniphy_port1_rx_div4_clk =3D { + .halt_reg =3D 0x644, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x644, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_uniphy_port1_rx_div4_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_uniphy_port1_rx_div4_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_uniphy_port1_tx_div4_clk =3D { + .halt_reg =3D 0x648, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x648, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_uniphy_port1_tx_div4_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_uniphy_port1_tx_div4_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_uniphy_port2_rx_div4_clk =3D { + .halt_reg =3D 0x64c, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x64c, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_uniphy_port2_rx_div4_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_uniphy_port2_rx_div4_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_uniphy_port2_tx_div4_clk =3D { + .halt_reg =3D 0x650, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x650, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_uniphy_port2_tx_div4_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_uniphy_port2_tx_div4_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_uniphy_port3_rx_div4_clk =3D { + .halt_reg =3D 0x654, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x654, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_uniphy_port3_rx_div4_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_uniphy_port3_rx_div4_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_uniphy_port3_tx_div4_clk =3D { + .halt_reg =3D 0x658, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x658, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_uniphy_port3_tx_div4_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_uniphy_port3_tx_div4_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_uniphy_port4_rx_div4_clk =3D { + .halt_reg =3D 0x65c, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x65c, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_uniphy_port4_rx_div4_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_uniphy_port4_rx_div4_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_uniphy_port4_tx_div4_clk =3D { + .halt_reg =3D 0x660, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x660, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_uniphy_port4_tx_div4_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_uniphy_port4_tx_div4_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static const struct freq_tbl ftbl_nss_cc_eip_bfdcd_clk_src[] =3D { + F(375000000, P_CMN_PLL_NSS_CLK_375M, 1, 0, 0), + { } +}; + +static const struct parent_map nss_cc_parent_map_eip[] =3D { + { P_XO, 0 }, + { P_CMN_PLL_NSS_CLK_375M, 5 }, +}; + +static struct clk_rcg2 nss_cc_eip_bfdcd_clk_src =3D { + .cmd_rcgr =3D 0x6a8, + .mnd_width =3D 0, + .hid_width =3D 5, + .parent_map =3D nss_cc_parent_map_eip, + .freq_tbl =3D ftbl_nss_cc_eip_bfdcd_clk_src, + .clkr.hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_eip_bfdcd_clk_src", + .parent_data =3D nss_cc_ppe_parent_data_eip, + .num_parents =3D ARRAY_SIZE(nss_cc_ppe_parent_data_eip), + .ops =3D &clk_rcg2_ops, + }, +}; + +static struct clk_branch nss_cc_eip_clk =3D { + .halt_reg =3D 0x6bc, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x6bc, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_eip_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_eip_bfdcd_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_nssnoc_eip_clk =3D { + .halt_reg =3D 0x6c4, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x6c4, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_nssnoc_eip_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_eip_bfdcd_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static const struct freq_tbl ftbl_nss_cc_cfg_clk_ppe_cfg[] =3D { + F(100000000, P_GCC_GPLL0, 8, 0, 0), + { } +}; + +static struct clk_rcg2 nss_cc_cfg_clk_src =3D { + .cmd_rcgr =3D 0x70c, + .mnd_width =3D 0, + .hid_width =3D 5, + .parent_map =3D nss_cc_parent_map_ppe_cfg, + .freq_tbl =3D ftbl_nss_cc_cfg_clk_ppe_cfg, + .clkr.hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_cfg_clk_src", + .parent_data =3D nss_cc_ppe_parent_data_ppe_cfg, + .num_parents =3D ARRAY_SIZE(nss_cc_ppe_parent_data_ppe_cfg), + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_rcg2_ops, + }, +}; + +static struct clk_branch nss_cc_nss_csr_clk =3D { + .halt_reg =3D 0x714, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x714, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_nss_csr_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_cfg_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch nss_cc_nssnoc_nss_csr_clk =3D { + .halt_reg =3D 0x718, + .halt_check =3D BRANCH_HALT, + .clkr =3D { + .enable_reg =3D 0x718, + .enable_mask =3D BIT(0), + .hw.init =3D &(const struct clk_init_data){ + .name =3D "nss_cc_nssnoc_nss_csr_clk", + .parent_hws =3D (const struct clk_hw*[]){ + &nss_cc_cfg_clk_src.clkr.hw, + }, + .num_parents =3D 1, + .flags =3D CLK_SET_RATE_PARENT, + .ops =3D &clk_branch2_ops, + }, + }, +}; + +static struct clk_regmap *nss_cc_ipq5210_clocks[] =3D { + [NSS_CC_PPE_CLK_SRC] =3D &nss_cc_ppe_clk_src.clkr, + [NSS_CC_PPE_SWITCH_IPE_CLK] =3D &nss_cc_ppe_switch_ipe_clk.clkr, + [NSS_CC_PPE_SWITCH_BTQ_CLK] =3D &nss_cc_ppe_switch_btq_clk.clkr, + [NSS_CC_PPE_SWITCH_CLK] =3D &nss_cc_ppe_switch_clk.clkr, + [NSS_CC_PPE_SWITCH_CFG_CLK] =3D &nss_cc_ppe_switch_cfg_clk.clkr, + [NSS_CC_PPE_EDMA_CLK] =3D &nss_cc_ppe_edma_clk.clkr, + [NSS_CC_PPE_EDMA_CFG_CLK] =3D &nss_cc_ppe_edma_cfg_clk.clkr, + [NSS_CC_PORT1_MAC_CLK] =3D &nss_cc_port1_mac_clk.clkr, + [NSS_CC_PORT1_RX_CLK] =3D &nss_cc_port1_rx_clk.clkr, + [NSS_CC_PORT1_RX_CLK_SRC] =3D &nss_cc_port1_rx_clk_src.clkr, + [NSS_CC_PORT1_RX_DIV_CLK_SRC] =3D &nss_cc_port1_rx_div_clk_src.clkr, + [NSS_CC_PORT1_TX_CLK] =3D &nss_cc_port1_tx_clk.clkr, + [NSS_CC_PORT1_TX_CLK_SRC] =3D &nss_cc_port1_tx_clk_src.clkr, + [NSS_CC_PORT1_TX_DIV_CLK_SRC] =3D &nss_cc_port1_tx_div_clk_src.clkr, + [NSS_CC_PORT2_MAC_CLK] =3D &nss_cc_port2_mac_clk.clkr, + [NSS_CC_PORT2_RX_CLK] =3D &nss_cc_port2_rx_clk.clkr, + [NSS_CC_PORT2_RX_CLK_SRC] =3D &nss_cc_port2_rx_clk_src.clkr, + [NSS_CC_PORT2_RX_DIV_CLK_SRC] =3D &nss_cc_port2_rx_div_clk_src.clkr, + [NSS_CC_PORT2_TX_CLK] =3D &nss_cc_port2_tx_clk.clkr, + [NSS_CC_PORT2_TX_CLK_SRC] =3D &nss_cc_port2_tx_clk_src.clkr, + [NSS_CC_PORT2_TX_DIV_CLK_SRC] =3D &nss_cc_port2_tx_div_clk_src.clkr, + [NSS_CC_PORT3_MAC_CLK] =3D &nss_cc_port3_mac_clk.clkr, + [NSS_CC_PORT3_RX_CLK] =3D &nss_cc_port3_rx_clk.clkr, + [NSS_CC_PORT3_RX_CLK_SRC] =3D &nss_cc_port3_rx_clk_src.clkr, + [NSS_CC_PORT3_RX_DIV_CLK_SRC] =3D &nss_cc_port3_rx_div_clk_src.clkr, + [NSS_CC_PORT3_TX_CLK] =3D &nss_cc_port3_tx_clk.clkr, + [NSS_CC_PORT3_TX_CLK_SRC] =3D &nss_cc_port3_tx_clk_src.clkr, + [NSS_CC_PORT3_TX_DIV_CLK_SRC] =3D &nss_cc_port3_tx_div_clk_src.clkr, + [NSS_CC_PORT4_MAC_CLK] =3D &nss_cc_port4_mac_clk.clkr, + [NSS_CC_PORT4_RX_CLK] =3D &nss_cc_port4_rx_clk.clkr, + [NSS_CC_PORT4_RX_CLK_SRC] =3D &nss_cc_port4_rx_clk_src.clkr, + [NSS_CC_PORT4_RX_DIV_CLK_SRC] =3D &nss_cc_port4_rx_div_clk_src.clkr, + [NSS_CC_PORT4_TX_CLK] =3D &nss_cc_port4_tx_clk.clkr, + [NSS_CC_PORT4_TX_CLK_SRC] =3D &nss_cc_port4_tx_clk_src.clkr, + [NSS_CC_PORT4_TX_DIV_CLK_SRC] =3D &nss_cc_port4_tx_div_clk_src.clkr, + [NSS_CC_PORT5_MAC_CLK] =3D &nss_cc_port5_mac_clk.clkr, + [NSS_CC_PORT5_RX_CLK] =3D &nss_cc_port5_rx_clk.clkr, + [NSS_CC_PORT5_RX_CLK_SRC] =3D &nss_cc_port5_rx_clk_src.clkr, + [NSS_CC_PORT5_RX_DIV_CLK_SRC] =3D &nss_cc_port5_rx_div_clk_src.clkr, + [NSS_CC_PORT5_TX_CLK] =3D &nss_cc_port5_tx_clk.clkr, + [NSS_CC_PORT5_TX_CLK_SRC] =3D &nss_cc_port5_tx_clk_src.clkr, + [NSS_CC_PORT5_TX_DIV_CLK_SRC] =3D &nss_cc_port5_tx_div_clk_src.clkr, + [NSS_CC_PORT6_MAC_CLK] =3D &nss_cc_port6_mac_clk.clkr, + [NSS_CC_PORT6_RX_CLK] =3D &nss_cc_port6_rx_clk.clkr, + [NSS_CC_PORT6_RX_CLK_SRC] =3D &nss_cc_port6_rx_clk_src.clkr, + [NSS_CC_PORT6_RX_DIV_CLK_SRC] =3D &nss_cc_port6_rx_div_clk_src.clkr, + [NSS_CC_PORT6_TX_CLK] =3D &nss_cc_port6_tx_clk.clkr, + [NSS_CC_PORT6_TX_CLK_SRC] =3D &nss_cc_port6_tx_clk_src.clkr, + [NSS_CC_PORT6_TX_DIV_CLK_SRC] =3D &nss_cc_port6_tx_div_clk_src.clkr, + [NSS_CC_NSSNOC_PPE_CLK] =3D &nss_cc_nssnoc_ppe_clk.clkr, + [NSS_CC_NSSNOC_PPE_CFG_CLK] =3D &nss_cc_nssnoc_ppe_cfg_clk.clkr, + [NSS_CC_UNIPHY_PORT1_RX_CLK] =3D &nss_cc_uniphy_port1_rx_clk.clkr, + [NSS_CC_UNIPHY_PORT1_TX_CLK] =3D &nss_cc_uniphy_port1_tx_clk.clkr, + [NSS_CC_UNIPHY_PORT2_RX_CLK] =3D &nss_cc_uniphy_port2_rx_clk.clkr, + [NSS_CC_UNIPHY_PORT2_TX_CLK] =3D &nss_cc_uniphy_port2_tx_clk.clkr, + [NSS_CC_UNIPHY_PORT3_RX_CLK] =3D &nss_cc_uniphy_port3_rx_clk.clkr, + [NSS_CC_UNIPHY_PORT3_TX_CLK] =3D &nss_cc_uniphy_port3_tx_clk.clkr, + [NSS_CC_UNIPHY_PORT4_RX_CLK] =3D &nss_cc_uniphy_port4_rx_clk.clkr, + [NSS_CC_UNIPHY_PORT4_TX_CLK] =3D &nss_cc_uniphy_port4_tx_clk.clkr, + [NSS_CC_UNIPHY_PORT5_RX_CLK] =3D &nss_cc_uniphy_port5_rx_clk.clkr, + [NSS_CC_UNIPHY_PORT5_TX_CLK] =3D &nss_cc_uniphy_port5_tx_clk.clkr, + [NSS_CC_UNIPHY_PORT6_RX_CLK] =3D &nss_cc_uniphy_port6_rx_clk.clkr, + [NSS_CC_UNIPHY_PORT6_TX_CLK] =3D &nss_cc_uniphy_port6_tx_clk.clkr, + [NSS_CC_XGMAC0_PTP_REF_CLK] =3D &nss_cc_xgmac0_ptp_ref_clk.clkr, + [NSS_CC_XGMAC0_PTP_REF_DIV_CLK_SRC] =3D &nss_cc_xgmac0_ptp_ref_div_clk_sr= c.clkr, + [NSS_CC_XGMAC1_PTP_REF_CLK] =3D &nss_cc_xgmac1_ptp_ref_clk.clkr, + [NSS_CC_XGMAC1_PTP_REF_DIV_CLK_SRC] =3D &nss_cc_xgmac1_ptp_ref_div_clk_sr= c.clkr, + [NSS_CC_XGMAC2_PTP_REF_CLK] =3D &nss_cc_xgmac2_ptp_ref_clk.clkr, + [NSS_CC_XGMAC2_PTP_REF_DIV_CLK_SRC] =3D &nss_cc_xgmac2_ptp_ref_div_clk_sr= c.clkr, + [NSS_CC_PON_CLK] =3D &nss_cc_pon_clk.clkr, + [NSS_CC_EPHY_RX_CLK_SRC] =3D &nss_cc_ephy_rx_mux_clk_src.clkr, + [NSS_CC_EPHY_RX_CLK] =3D &nss_cc_ephy_rx_clk.clkr, + [NSS_CC_EPHY_TX_CLK_SRC] =3D &nss_cc_ephy_tx_mux_clk_src.clkr, + [NSS_CC_EPHY_TX_CLK] =3D &nss_cc_ephy_tx_clk.clkr, + [NSS_CC_UNIPHY_PORT1_RX_DIV4_CLK_SRC] =3D &nss_cc_uniphy_port1_rx_div4_cl= k_src.clkr, + [NSS_CC_UNIPHY_PORT1_TX_DIV4_CLK_SRC] =3D &nss_cc_uniphy_port1_tx_div4_cl= k_src.clkr, + [NSS_CC_UNIPHY_PORT2_RX_DIV4_CLK_SRC] =3D &nss_cc_uniphy_port2_rx_div4_cl= k_src.clkr, + [NSS_CC_UNIPHY_PORT2_TX_DIV4_CLK_SRC] =3D &nss_cc_uniphy_port2_tx_div4_cl= k_src.clkr, + [NSS_CC_UNIPHY_PORT3_RX_DIV4_CLK_SRC] =3D &nss_cc_uniphy_port3_rx_div4_cl= k_src.clkr, + [NSS_CC_UNIPHY_PORT3_TX_DIV4_CLK_SRC] =3D &nss_cc_uniphy_port3_tx_div4_cl= k_src.clkr, + [NSS_CC_UNIPHY_PORT4_RX_DIV4_CLK_SRC] =3D &nss_cc_uniphy_port4_rx_div4_cl= k_src.clkr, + [NSS_CC_UNIPHY_PORT4_TX_DIV4_CLK_SRC] =3D &nss_cc_uniphy_port4_tx_div4_cl= k_src.clkr, + [NSS_CC_UNIPHY_PORT1_RX_DIV4_CLK] =3D &nss_cc_uniphy_port1_rx_div4_clk.cl= kr, + [NSS_CC_UNIPHY_PORT1_TX_DIV4_CLK] =3D &nss_cc_uniphy_port1_tx_div4_clk.cl= kr, + [NSS_CC_UNIPHY_PORT2_RX_DIV4_CLK] =3D &nss_cc_uniphy_port2_rx_div4_clk.cl= kr, + [NSS_CC_UNIPHY_PORT2_TX_DIV4_CLK] =3D &nss_cc_uniphy_port2_tx_div4_clk.cl= kr, + [NSS_CC_UNIPHY_PORT3_RX_DIV4_CLK] =3D &nss_cc_uniphy_port3_rx_div4_clk.cl= kr, + [NSS_CC_UNIPHY_PORT3_TX_DIV4_CLK] =3D &nss_cc_uniphy_port3_tx_div4_clk.cl= kr, + [NSS_CC_UNIPHY_PORT4_RX_DIV4_CLK] =3D &nss_cc_uniphy_port4_rx_div4_clk.cl= kr, + [NSS_CC_UNIPHY_PORT4_TX_DIV4_CLK] =3D &nss_cc_uniphy_port4_tx_div4_clk.cl= kr, + [NSS_CC_EIP_BFDCD_CLK_SRC] =3D &nss_cc_eip_bfdcd_clk_src.clkr, + [NSS_CC_EIP_CLK] =3D &nss_cc_eip_clk.clkr, + [NSS_CC_NSSNOC_EIP_CLK] =3D &nss_cc_nssnoc_eip_clk.clkr, + [NSS_CC_CFG_CLK_SRC] =3D &nss_cc_cfg_clk_src.clkr, + [NSS_CC_NSS_CSR_CLK] =3D &nss_cc_nss_csr_clk.clkr, + [NSS_CC_NSSNOC_NSS_CSR_CLK] =3D &nss_cc_nssnoc_nss_csr_clk.clkr, +}; + +static const struct qcom_reset_map nss_cc_ipq5210_resets[] =3D { + [NSS_CC_PPE_BCR] =3D { 0x3e8 }, + [NSS_CC_PPE_SWITCH_IPE_CLK_ARES] =3D { 0x424, 2 }, + [NSS_CC_PPE_SWITCH_BTQ_CLK_ARES] =3D { 0x42c, 2 }, + [NSS_CC_PPE_SWITCH_CLK_ARES] =3D { 0x434, 2 }, + [NSS_CC_PPE_SWITCH_CFG_CLK_ARES] =3D { 0x43c, 2 }, + [NSS_CC_PPE_EDMA_CLK_ARES] =3D { 0x440, 2 }, + [NSS_CC_PPE_EDMA_CFG_CLK_ARES] =3D { 0x448, 2 }, + [NSS_CC_PORT1_MAC_CLK_ARES] =3D { 0x44c, 2 }, + [NSS_CC_PORT2_MAC_CLK_ARES] =3D { 0x454, 2 }, + [NSS_CC_PORT3_MAC_CLK_ARES] =3D { 0x45c, 2 }, + [NSS_CC_PORT4_MAC_CLK_ARES] =3D { 0x464, 2 }, + [NSS_CC_PORT5_MAC_CLK_ARES] =3D { 0x46c, 2 }, + [NSS_CC_PORT6_MAC_CLK_ARES] =3D { 0x474, 2 }, + [NSS_CC_PON_CLK_ARES] =3D { 0x47c, 2 }, + [NSS_CC_XGMAC0_PTP_REF_CLK_ARES] =3D { 0x488, 2 }, + [NSS_CC_XGMAC1_PTP_REF_CLK_ARES] =3D { 0x48c, 2 }, + [NSS_CC_XGMAC2_PTP_REF_CLK_ARES] =3D { 0x490, 2 }, + [NSS_CC_NSSNOC_PPE_CLK_ARES] =3D { 0x4a4, 2 }, + [NSS_CC_NSSNOC_PPE_CFG_CLK_ARES] =3D { 0x4a8, 2 }, + [NSS_CC_PORT1_RX_CLK_ARES] =3D { 0x548, 2 }, + [NSS_CC_PORT1_TX_CLK_ARES] =3D { 0x550, 2 }, + [NSS_CC_PORT2_RX_CLK_ARES] =3D { 0x558, 2 }, + [NSS_CC_PORT2_TX_CLK_ARES] =3D { 0x560, 2 }, + [NSS_CC_PORT3_RX_CLK_ARES] =3D { 0x568, 2 }, + [NSS_CC_PORT3_TX_CLK_ARES] =3D { 0x570, 2 }, + [NSS_CC_PORT4_RX_CLK_ARES] =3D { 0x578, 2 }, + [NSS_CC_PORT4_TX_CLK_ARES] =3D { 0x580, 2 }, + [NSS_CC_PORT5_RX_CLK_ARES] =3D { 0x588, 2 }, + [NSS_CC_PORT5_TX_CLK_ARES] =3D { 0x590, 2 }, + [NSS_CC_PORT6_RX_CLK_ARES] =3D { 0x598, 2 }, + [NSS_CC_PORT6_TX_CLK_ARES] =3D { 0x5a0, 2 }, + [NSS_CC_EPHY_RX_CLK_ARES] =3D { 0x618, 2 }, + [NSS_CC_EPHY_TX_CLK_ARES] =3D { 0x61c, 2 }, + [NSS_CC_UNIPHY_PORT1_RX_CLK_ARES] =3D { 0x5e0, 2 }, + [NSS_CC_UNIPHY_PORT1_TX_CLK_ARES] =3D { 0x5e4, 2 }, + [NSS_CC_UNIPHY_PORT2_RX_CLK_ARES] =3D { 0x5e8, 2 }, + [NSS_CC_UNIPHY_PORT2_TX_CLK_ARES] =3D { 0x5ec, 2 }, + [NSS_CC_UNIPHY_PORT3_RX_CLK_ARES] =3D { 0x5f0, 2 }, + [NSS_CC_UNIPHY_PORT3_TX_CLK_ARES] =3D { 0x5f4, 2 }, + [NSS_CC_UNIPHY_PORT4_RX_CLK_ARES] =3D { 0x5f8, 2 }, + [NSS_CC_UNIPHY_PORT4_TX_CLK_ARES] =3D { 0x5fc, 2 }, + [NSS_CC_UNIPHY_PORT5_RX_CLK_ARES] =3D { 0x600, 2 }, + [NSS_CC_UNIPHY_PORT5_TX_CLK_ARES] =3D { 0x604, 2 }, + [NSS_CC_UNIPHY_PORT6_RX_CLK_ARES] =3D { 0x608, 2 }, + [NSS_CC_UNIPHY_PORT6_TX_CLK_ARES] =3D { 0x60c, 2 }, + [NSS_CC_EIP_CLK_ARES] =3D { 0x6bc, 2 }, + [NSS_CC_NSSNOC_EIP_CLK_ARES] =3D { 0x6c4, 2 }, + [NSS_CC_NSS_CSR_CLK_ARES] =3D { 0x714, 2 }, + [NSS_CC_NSSNOC_NSS_CSR_CLK_ARES] =3D { 0x718, 2 }, + [NSS_CC_DEBUG_CLK_ARES] =3D { 0x770, 2 }, +}; + +static const struct regmap_config nss_cc_ipq5210_regmap_config =3D { + .reg_bits =3D 32, + .reg_stride =3D 4, + .val_bits =3D 32, + .max_register =3D 0x800, + .fast_io =3D true, +}; + +static const struct qcom_icc_hws_data icc_ipq5210_nss_hws[] =3D { + { MASTER_NSSNOC_PPE, SLAVE_NSSNOC_PPE, NSS_CC_NSSNOC_PPE_CLK }, + { MASTER_NSSNOC_PPE_CFG, SLAVE_NSSNOC_PPE_CFG, NSS_CC_NSSNOC_PPE_CFG_CLK = }, + { MASTER_NSSNOC_NSS_CSR, SLAVE_NSSNOC_NSS_CSR, NSS_CC_NSSNOC_NSS_CSR_CLK = }, + { MASTER_NSSNOC_EIP, SLAVE_NSSNOC_EIP, NSS_CC_NSSNOC_EIP_CLK }, +}; + +#define IPQ_NSSCC_ID (5210 * 2) /* some unique value */ + +static const struct qcom_cc_desc nss_cc_ipq5210_desc =3D { + .config =3D &nss_cc_ipq5210_regmap_config, + .clks =3D nss_cc_ipq5210_clocks, + .num_clks =3D ARRAY_SIZE(nss_cc_ipq5210_clocks), + .resets =3D nss_cc_ipq5210_resets, + .num_resets =3D ARRAY_SIZE(nss_cc_ipq5210_resets), + .icc_hws =3D icc_ipq5210_nss_hws, + .num_icc_hws =3D ARRAY_SIZE(icc_ipq5210_nss_hws), + .icc_first_node_id =3D IPQ_NSSCC_ID, +}; + +static const struct dev_pm_ops nss_cc_ipq5210_pm_ops =3D { + RUNTIME_PM_OPS(pm_clk_suspend, pm_clk_resume, NULL) +}; + +static const struct of_device_id nss_cc_ipq5210_match_table[] =3D { + { .compatible =3D "qcom,ipq5210-nsscc" }, + { } +}; +MODULE_DEVICE_TABLE(of, nss_cc_ipq5210_match_table); + +static int nss_cc_ipq5210_probe(struct platform_device *pdev) +{ + int ret; + + ret =3D devm_pm_runtime_enable(&pdev->dev); + if (ret) + return dev_err_probe(&pdev->dev, ret, "Fail to enable runtime PM\n"); + + ret =3D devm_pm_clk_create(&pdev->dev); + if (ret) + return dev_err_probe(&pdev->dev, ret, "Fail to create PM clock\n"); + + ret =3D pm_clk_add(&pdev->dev, "bus"); + if (ret) + return dev_err_probe(&pdev->dev, ret, "Fail to add bus clock\n"); + + ret =3D pm_runtime_resume_and_get(&pdev->dev); + if (ret) + return dev_err_probe(&pdev->dev, ret, "Fail to resume\n"); + + ret =3D qcom_cc_probe(pdev, &nss_cc_ipq5210_desc); + pm_runtime_put(&pdev->dev); + + return ret; +} + +static struct platform_driver nss_cc_ipq5210_driver =3D { + .probe =3D nss_cc_ipq5210_probe, + .driver =3D { + .name =3D "qcom,ipq5210-nsscc", + .of_match_table =3D nss_cc_ipq5210_match_table, + .pm =3D pm_ptr(&nss_cc_ipq5210_pm_ops), + .sync_state =3D icc_sync_state, + }, +}; +module_platform_driver(nss_cc_ipq5210_driver); + +MODULE_DESCRIPTION("Qualcomm Technologies, Inc. NSSCC IPQ5210 Driver"); +MODULE_LICENSE("GPL"); --=20 2.43.0 From nobody Tue Nov 24 11:36:00 2026 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.168.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794824403; b=oqiZjVe4rEKXbyeLXNSLg0fnf3Mwm4yJ/UlJEy/oKStbFyLEQkQMd9XlqCWHYqeS9EOi g89jASvpX3mjVnyZE0P1FK6j3+Y0d9OONhdtvAf2FrLgc8TdJMwXxf1gJ1AjU+4UjgU6I xliA0zpldRW35GKFeLtqu3lbfxgdlO5a6aj+em+EdnveFHhKfkSVPoEf1b+/zRALv4q2j ZP49pSCa3nXWU8DWNFQyirSQqSTeUEpfNx+fsZ/KBG3zKwQtqZLcFTI+3BmcnHZelfhNV t7ZUoh1cP/B1c4xd9nidqRW3AyhP7EfWKZ2MttYjEZgdCXhtPxbnZq9txYpr04QkjkA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794824403; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:X-Received:Received:From:Date: Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Proofpoint-Spam-Info: X-Proofpoint-ORIG-GUID:X-Proofpoint-GUID: X-Proofpoint-Spam-Details-Enc:X-Authority-Analysis: X-Proofpoint-Virus-Version:X-Proofpoint-Spam-Details; bh=vITkXUOIKwIz3F/FjsZXi+qjCvbdxlE0z38bkytrMaI=; b=TSJrvMHt0F1VTl1ddvsGtb7pVsrRtALI1XTQe3VIGcXiCM1X9DnJtOgqjURpVkz4YZ8x wl5kLqU6sRpZyy48mkcNE+I4BaAfR4LBnFm6Jn9V6kS4m6vdqqpJ+LEbX0G6ojfGIU+uA izL4wthAogfqmV3tDVnxwETfDNszc9dBKcj8cc0FKjqHJO31jc7vLeWQTtmG5wJNJ3GOG pZcQidbtu+0IdfPIIPc5UvwQ0nDgYs9499CPRfhF3xzDvR0a8dV53hnIFoq0tDvkKoOj+ zHxuC1gjSgmNRcxtKYSpzbzL2KfYrKfBJtm5zaQBzumYUOpnaJy3+paPMRDMzFco2ag== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=hM5tp0fB; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=KKZIGoJP; arc=none smtp.remote-ip=205.220.168.131 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BAC6C60A2628 for ; Mon, 16 Nov 2026 10:20:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BAC6C60A2628 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=hM5tp0fB; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=KKZIGoJP Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6AG7exWK3488793 for ; Mon, 16 Nov 2026 10:20:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= vITkXUOIKwIz3F/FjsZXi+qjCvbdxlE0z38bkytrMaI=; b=hM5tp0fBHV/jKh+O 3uuQVrORrHiHG9eua0pHNlVRvWLW9YsMvmsQRLRLIe6jPDTDjlelJThigIj8OqpE o4JsbnRCc68SrR0MIVMyYSVy1IwZm0v+Z5FYByDrjDZKCMFemKCROY3UAe0aw/jz kiS9DTi3cC7FB/ouxl+abIqfaO49R28TgFnRi+AilGIXOam1iOK9FKUAbqbLaQdB i7MZJFH9K8GEhDnwJ6lfzIYHnZQb0inMcCAY68KtQdfFbdXCw061OAli6vASJ0HW nNC50bhR7mFasPiEmwQlH/m5snl4KUpGvdWH9tecD8gHpD1RPCeDShd26JowsHbD CLOGDQ== Received: from mail-dy1-f197.google.com (mail-dy1-f197.google.com [74.125.82.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hxhmcdwns-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 16 Nov 2026 10:20:00 +0000 (GMT) Received: by mail-dy1-f197.google.com with SMTP id 5a478bee46e88-375bac6bd21so2685406eec.0 for ; Mon, 16 Nov 2026 02:20:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1794824400; x=1795429200; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=vITkXUOIKwIz3F/FjsZXi+qjCvbdxlE0z38bkytrMaI=; b=KKZIGoJPBK+zbWBtjKofURWti0lUYU4eysl84RA99BAwZcfpDSzS/yfrDyYrp2DlDO Nmzn/7U32spcnELXTfyA7eWPLTm0dNyEQCyHHCPScAMVKWhDZV26uwl917Lbk8hmK1jY wn2HpzEpaEZMdtHV8QDNvF2kmufa669TDEdKCx+4esnCYIHw1bJq2+mWKTIXp03+kMWt zvxuhMzV60nWeM8qt/fZo3H5hw8wdZ1xsw9G7p1jV0NElt8gdWP54xnxQcmGYiopfOhd 1fVuRWU9MODwK4QJ2XZVIYm71oSZ0OtCMkone9CGiG2+wtNwnlqPu3+YdGbVweANgb29 KCdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794824400; x=1795429200; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=vITkXUOIKwIz3F/FjsZXi+qjCvbdxlE0z38bkytrMaI=; b=nNRnrosjKZtV1Gu6EXcNk+9MpEjVcgw/FSo52d6n2OdrDNIpMWVHDm6MXhfcvGa83f MhKcvmbp4Y0MvG+tAwbkdf1aAMDyll20iDwKqeu8xSWW1CVkfItgN/fQROU64BXthgor qadjB168+xvYI2VzypCShDttg9rADt05P3wTRmdog6/6owI6+TSFM4vJ4lBWNFgZcXA1 GquoUcpSPnGlVoqXCXnBbIMZ0lSuOqVZVBOyBX0WJf0NpIYANgfV5y8QOjZSDXtN/bD9 oTmWg3lcdffBh/CJtJDKSzPqP3CU2rdbkCDVwKUWHXhyJx89l6GYbFIAIwOsz/Ejx8zw 6H+A== X-Forwarded-Encrypted: i=1; AL+hErHsY4mPu9VGnXE15JsVa1S6W/7svqcG0fYtVZ3mR8i2igSI2DVCZW+F5WpQQULJOZd1Xng29ZSAUGt6BwI=@vger.kernel.org X-Gm-Message-State: APuU4Z+D3qkRpP7QL0/qt42flHVcLQxKG5/u3rhqX4WIrGjQtw3ja3yJ Qam5X6oz2qsFQKZePr0dgwgzmWJKEdumWRD6BjQA5VSbuavsltXFyqByv8d+967UiI/mx1qk/0k eFQtjDfP/rtyrjm31IxOzDc7WnIMVjWFNS+JzC3ku4NArOgExpV61KLT5xcnOUi6wxgI= X-Gm-Gg: AZFdTZeqP7n+F+9teuUil3rMN2cgrUMnnd07B2IEgQVWHXZr8SIny2CSkAuxnalTde3 5eVaf9JzL6ZaOQIYOFyhfWdz1mHJ9afMudm1rM/R74ig/VjzY4pMdG9eSQAafwxzOHcz8RoUch4 hgzfZC8mN0mWCoPBCMgso198ytpS03S6NUXWEqMT7m3fWBlNCNBUnLEsM4QWSgj5GrSMWGK1c9v TBxSRGJtPfeQOs64WycGxdy8m5kMryfpjc4gi+fa1w4e4iQ6Zf7b73b7OFLMxcx82R8Q+Cp4t1l tmOdb7wIsUIgfz+nXRTuhA1cQvkdAlb8EDcYle9t3KedeJIGw2pX14mwdHP7DGQUpfgXHSVtYM7 KaSBN1Vsn0JDtXy1oYNyXvoRk58PAcFlbrRcwhxxPke3uFkQxbxkv5kdUezPyyTzmOmU/WZsUVc 2SN/3yHW9foNF1ENCM X-Received: by 2002:a05:693c:20c8:20b0:36a:37:1404 with SMTP id 5a478bee46e88-37966e3af34mr9607569eec.13.1794824400271; Mon, 16 Nov 2026 02:20:00 -0800 (PST) X-Received: by 2002:a05:693c:20c8:20b0:36a:37:1404 with SMTP id 5a478bee46e88-37966e3af34mr9607524eec.13.1794824399552; Mon, 16 Nov 2026 02:19:59 -0800 (PST) Received: from hu-luoj-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-37956bad6casm32599557eec.26.2026.11.16.02.19.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2026 02:19:59 -0800 (PST) From: Luo Jie Date: Mon, 16 Nov 2026 02:19:51 -0800 Subject: [PATCH v3 4/4] arm64: dts: qcom: ipq5210: Add NSS clock controller node X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20261116-qcom_ipq5210_nsscc-v3-4-1eaf92698379@oss.qualcomm.com> References: <20261116-qcom_ipq5210_nsscc-v3-0-1eaf92698379@oss.qualcomm.com> In-Reply-To: <20261116-qcom_ipq5210_nsscc-v3-0-1eaf92698379@oss.qualcomm.com> To: Bjorn Andersson , Abel Vesa , Stephen Boyd , Brian Masney , Jerome Brunet , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Georgi Djakov , Philipp Zabel , Luo Jie , Richard Cochran , Konrad Dybcio Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, netdev@vger.kernel.org, quic_kkumarcs@quicinc.com, quic_linchen@quicinc.com, quic_leiwei@quicinc.com X-Mailer: b4 0.17-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1794824393; l=2069; i=jie.luo@oss.qualcomm.com; s=20251128; h=from:subject:message-id; bh=beU54FXzwyrnuCcc7U/sv8QlVLauZi/DeLqeFsbtHI0=; b=LEg1pPKNgDy7sbq9s336DvRligY97/kGMaXfeVIFPu5Rp3TB7F1OSLTGzJQIA7vg+t40R3AJt Fa/hyNai5yYC9d+RQlGxM6nNX8kO8YbJkpwkAd1UeYdcAOd3KRBPD98 X-Developer-Key: i=jie.luo@oss.qualcomm.com; a=ed25519; pk=gSsYMDakxtd6UDFYDdA9y9yjIs5Etp5GK/3DoXWPyS0= X-Proofpoint-Spam-Info: AW1haW4tMjYxMTE2MDA0MCBTYWx0ZWRfX630ysN+UXgvC OzBnEMIi/oVg6NSGvQg7ysnMhu+JGID2XAvzCiToZ/PKMJKmIAHh15m6gM28xn/8Wa4C3Fd+PgT muUPg8inOKBz3oFVjR2SnRYuUiliMNs= X-Proofpoint-ORIG-GUID: xFVj6zXMD6Sgvkvfx0-E60d76GOCrVeJ X-Proofpoint-GUID: xFVj6zXMD6Sgvkvfx0-E60d76GOCrVeJ X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTE2MDA0MCBTYWx0ZWRfXxFHjiEhAnC9d YbJF1lMFOZ67xdzIL21KMM//vmaeG1jf21ZjzzSH7PUu687SfZ6Zez2MUXsT46sg9TsEN/jCufI nWRDoDswjRMBfNg6wCPiKN9YbkyExz+6MKCl7+Im+oGahuuBRbG7ov7E6ZGWYgRJ2OmHed375S5 4SQA0jWEW5mN3Zn25LS36xG9MHl88wpmB5QgXkap1WXkqPGZz1kO7X9f7VHwwEsLq1iGVmudo/D 0JobaEMwc4vod2jCpp/yRwjLkfu34aUQ9MYFEvEC8c5rxn4pFo4REiCXHG3Ph0ADAlZZiMOGiTB ologZWe8qTRW6iUQk85jb9uj6xah0BkdsuB3ZRGGCvRXtT83zhPMWeDAEkRJNKUz7XiedQNK1LM borzZEtMRMnKaZbYGcLCVdqeVOdEiOcPrZlHQ+HVuGGz7I3SAZ5arhCcm+F/44AJnwJO+VQSdMv nsDbZdwCa/Ucu7kctuw== X-Authority-Analysis: v=2.4 cv=Vpy2kO2n c=1 sm=1 tr=0 ts=6afad8d0 cx=c_pps a=Uww141gWH0fZj/3QKPojxA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=zJRp6_cAMcgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=EUspDBNiAAAA:8 a=6SnK136Pe_QpXSRpRBcA:9 a=QEXdDO2ut3YA:10 a=PxkB5W3o20Ba91AHUih5:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-11-16_03,2026-11-11_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 adultscore=0 clxscore=1015 malwarescore=0 phishscore=0 priorityscore=1501 bulkscore=0 spamscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2611160040 NSS clock controller provides the clocks and resets to the networking hardware blocks on the IPQ5210, such as PPE (Packet Process Engine) and the integrated EPHY. Note that the CMN PLL output clock names are reversed with respect to the hardware block they actually feed: IPQ5210_PPE_CLK is wired to the NSS hardware block, and IPQ5210_NSS_CLK is wired to the PPE hardware block. Documentation is added in the DTS file to call this out and avoid confusion. Signed-off-by: Luo Jie --- arch/arm64/boot/dts/qcom/ipq5210.dtsi | 40 +++++++++++++++++++++++++++++++= ++++ 1 file changed, 40 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/ipq5210.dtsi b/arch/arm64/boot/dts/qc= om/ipq5210.dtsi index 6e4de7c29d29..575c06a8e14b 100644 --- a/arch/arm64/boot/dts/qcom/ipq5210.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq5210.dtsi @@ -331,6 +331,46 @@ frame@b128000 { status =3D "disabled"; }; }; + + nsscc: clock-controller@39b00000 { + compatible =3D "qcom,ipq5210-nsscc"; + reg =3D <0x0 0x39b00000 0x0 0x100000>; + /* + * Note: CMN PLL output clock names below are reversed relative + * to the hardware block they feed - IPQ5210_PPE_CLK is wired to + * the NSS hardware block ("nss") and IPQ5210_NSS_CLK is wired + * to the PPE hardware block ("ppe"). + */ + clocks =3D <&xo_board>, + <&cmn_pll IPQ5210_PPE_CLK>, + <&cmn_pll IPQ5210_NSS_CLK>, + <&gcc GPLL0>, + <0>, + <0>, + <0>, + <0>, + <0>, + <0>, + <&gcc GCC_NSSCC_CLK>, + <&cmn_pll IPQ5210_EPHY_RAW_CLK>, + <&cmn_pll IPQ5210_EPHY_RAW_CLK>; + clock-names =3D "xo", + "nss", + "ppe", + "gpll0_out", + "uniphy0_rx", + "uniphy0_tx", + "uniphy1_rx", + "uniphy1_tx", + "uniphy2_rx", + "uniphy2_tx", + "bus", + "ephy_rx", + "ephy_tx"; + #clock-cells =3D <1>; + #reset-cells =3D <1>; + #interconnect-cells =3D <1>; + }; }; =20 timer { --=20 2.43.0