From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 903393C1095 for ; Thu, 11 Jun 2026 11:54:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781178887; cv=none; b=f5964JDwAHuj5I9AtICSANOo5T8qjwRJV+uB4RK2ieMGFgxvuYnIUEP7m0LL6VmA5DXa8BMFewDlNBLKpW4NQ6qXqU9ukJDdP/MzeHtyOl2sFdIFDpgjOragADRtNgWG+zq1EEdQyuydoFtURNHtpv1PgJJAwZ0Xquec0MuTnu4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781178887; c=relaxed/simple; bh=aGzMDiq3cXRRQ/rhHELbsPnJZmxLWFamWZhd4QjjA7s=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=tvfdN8wX5e0vv31ur0ikLFRg2EI8JqF4mYh9fvfDBbxsM10zMV3OaKBqAqhX21HzbQSAeQI2RTjlu8ZnO9zlUAF2Z7D+i1N9BPnhNnvshm1GAQb1sE+pGHCIe5rJ03vDAN4DgsLQo73auhpunSmBLSzvcy0KN935F2Vr2NFb/WY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=Vs1+TR8u; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=TQvpyBwB; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject 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.b="Vs1+TR8u"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="TQvpyBwB" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65B9x5an267495 for ; Thu, 11 Jun 2026 11:54:46 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= jW5HT6ZuExf9aRitTp/TQw7gkO8riJN2NQLF5cnnH/8=; b=Vs1+TR8uABKi9vdf EaNT3+3T3+ivWOG518iWwjstcT4N/16Ogs2Q6NeLReXD27OBBtcAI3Xq35M5ogH5 p7baLPTsZlpUnTHyNKmgpCRTWr1XTC38e7gscqeFk7Cz6mFWaCZicobTdQj7YtZ4 UWMAIaBI+x6jySlIt5TSHVHT4yMsTv0E6eLw9pIruBDsUg2AP06luMK3I2mcStxT +/Esz/eCMPjhOaGw/50ArjckxNZTea4LNhwgu6M/XzOXHqJNMNpNGbV5jKatcCd5 mKNqj1p3ijlVbRbxaf8v447s02XjMRmeQAnBscDQebqcWggdRy8CxR2iMtPdpgjg glfxiw== Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eqe6u37vt-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 11 Jun 2026 11:54:45 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-91550f68e7cso186061785a.3 for ; Thu, 11 Jun 2026 04:54:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781178885; x=1781783685; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=jW5HT6ZuExf9aRitTp/TQw7gkO8riJN2NQLF5cnnH/8=; b=TQvpyBwBeDCTdjxAIEmheNYBKBdHt//+tB+d6FbWRnSp0HLZraIte3FVk58Z5sHwzE qeva+QzDXck6CVhyuPE7ZvZz5g9KQ86/ZxnruEUSGAO9UHRR6xzCvQ6uzewWf+WlvygJ 9nbEBEg5AhcqMzNwzR0Ibgs22pO7s6twQZSRHFWtgVjWECfF8S22GvhIyAe0xyhFinkH F/UASn3YgF8A+CvmYkJVhzfjoNgALUGR6xg2FNDT/s3SIh0D64UljQgYkuj+7KmksiBs UtSDpxYf5/O5+6eMg9ksmHIxiExARAmgljjIcshMNhdZfC3kK7/k1Xqyjw8l4S4LdCkX r+BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781178885; x=1781783685; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jW5HT6ZuExf9aRitTp/TQw7gkO8riJN2NQLF5cnnH/8=; b=Sq0Ftp9/r824/oyjy9fNyp5pv7hPm0hPsIA6UqQLX4F0NqKTxQZGFeWwh0+TtOwvrw k+6cgD8Kj1I2IEUa2ZrbK3Zza7JhiypCUZ2btjG1gO7NLKfyTFNZiWT4NGVC2067bcYM RdqlffU0MOcsiVPpr23yFRgcO6vUclrPfOAmj2dbYRcx29c41XDTXcHE5bnQZrwYCGOz 1ib9qVBegWQeBgpxZAiQx2WctdgZy1SmeFRMoTSuRcfEpZqHlqKYqLrwowQWn5+/jEs6 tvRrHnIjzunpnt7HsF5jD+5YS3X/Vs2ZlhRl40NPCdmvEMKcDigjagRh4FCcJDTzmRb8 S6TA== X-Forwarded-Encrypted: i=1; AFNElJ9tGHqP0Je7kuOiK2cgRM/OU7/VcYQrkq8UhFhr5VI+ep7sV4cUnyQxwugMhTVdLWilMcObFJTW9APvtms=@vger.kernel.org X-Gm-Message-State: AOJu0YzxPSYNtLHS93IVbtv71Ir2Wj6RNX6rpm8ucAM8F5w1omVlx2Ep eIOVwei/J2DnUcyxNCHo6YeoaU07m5u/ih3g/8rqJRnhrHSyD3NtA359c3i9tJQoSHljnVVzIqg Sftjiwr6nZ0afxMBCtwmXrhYOXedt1FuocpbadnsX2t3KSLpfTRNrH7ztG9sxwD88Zf8= X-Gm-Gg: Acq92OF8HuRYySu4U+VuddesudTFjiRj5RZMqg8SUEzXaY1lQIKqdA1sDvDnBzjT0pt oNIff2CpTOUkoL8EBRCPYAX3djgUqBtVdNcZfflOPeTRxMhePYbbGtQ5ya8bkP5g9PYIpghVPby CKT3q1baK5xLnHuQgBBye0rlm8Gr+HLusV0VY6vOZvPVTMA1MpaMGrNOts4FIyZuiNuzQIAM/pD T71JrOdXrQ61f/ldIQftVo3Gmx2j12XDLDwv1TQ/ieSaoPrYSTXZUnmYmSt7jJGPcxYwlpjpvve bjQtgboOCd7C1tJ+JFB86EhssVz2UAqvdxy1QaBdxX3kHkoQudwhKSS1llYYbc/P3XHUT+j9/PL Q2n+Q4xZrVe2JURlNu7IJWX/a6wFPImbxUju5qIfTdkdzs9ZTmbof7Uqp X-Received: by 2002:a05:620a:4553:b0:8f1:9e59:2208 with SMTP id af79cd13be357-9160acc6f24mr198782385a.4.1781178884870; Thu, 11 Jun 2026 04:54:44 -0700 (PDT) X-Received: by 2002:a05:620a:4553:b0:8f1:9e59:2208 with SMTP id af79cd13be357-9160acc6f24mr198780185a.4.1781178884422; Thu, 11 Jun 2026 04:54:44 -0700 (PDT) Received: from [192.168.120.170] ([178.235.128.140]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-bfcb5abe4a9sm55098666b.46.2026.06.11.04.54.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 Jun 2026 04:54:43 -0700 (PDT) Message-ID: Date: Thu, 11 Jun 2026 13:54:40 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 4/4] net: phy: at803x: add RX and TX clock management for IPQ5018 PHY To: Andrew Lunn , George Moussalem , Kathiravan Thirumoorthy Cc: Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Bjorn Andersson , Konrad Dybcio , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org References: <20260605-ipq5018-gephy-clocks-v3-0-f232d9ca0966@outlook.com> <20260605-ipq5018-gephy-clocks-v3-4-f232d9ca0966@outlook.com> <36cd63f4-749e-4b09-b8a6-cbf6924dea88@lunn.ch> <471a21f2-7ab0-410c-861d-5722a94b127d@lunn.ch> Content-Language: en-US From: Konrad Dybcio In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: BjR1RzC2Iweg_SoipvfNrl_7zxFKXsxY X-Proofpoint-Spam-Info: AW1haW4tMjYwNjExMDEyMCBTYWx0ZWRfX3N7mnYVzU2oJ vNg35nkDO7ZSFaq1+0EuimN6CrAmD1aIh/pJGqZ2ggM6HB1FvxMQM5+FVJYTLn+pxPjxNwMPYrB Qk1HyTgnsv6+nLyubYW4IhtqVo0VDL8= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjExMDEyMCBTYWx0ZWRfX9JT+d86IIER8 UWvlHAweVps44Dcz8Xe0oK6uMZ+A+4BXqjegd4xlMtBINW3XP1TJJmOlfnf615PluArj0NQCe0c mUQOXMWNMb+LaiGKbodfntffjObnM1t10VnrEktwJ2bu8Sjv5GXdBTFDblq1ucpwoASx7xUBD6w 4SEcnDddPA9vfIEyDQPThUhovIe5V3Irl2mdghkMam4kf+F25xl/YYwILeKVoLWObfViQLQA5dw eimhN6dBdSKuL/dxVRPOLRNo/eKibg7XoSlWsZ5Pcv4ilFbjWGY96kE6U01w4FXioRnRSedTjf5 1q3CEF8k7B3/4xtSHeKulnX3na+uKFjt4In+mkgormDpyBBfapxxL9TQ/zIhFK+dlw6/B8J+Ghc ZplYimLdqVMdOpmdSNMhcjCqDJALbp1oU4TJP+xkv3VI5ucNdSV4m2wGMOQ30lHd3DuAJU1d+tP n3FiFJkVX+Sg0jej+MA== X-Authority-Analysis: v=2.4 cv=F5lnsKhN c=1 sm=1 tr=0 ts=6a2aa205 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=PRfkaYvzSr8QmIIGAkY2Sg==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=C1GzXxPXE202J-4HI-EA:9 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-ORIG-GUID: BjR1RzC2Iweg_SoipvfNrl_7zxFKXsxY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-11_02,2026-06-09_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 adultscore=0 bulkscore=0 suspectscore=0 impostorscore=0 priorityscore=1501 spamscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606110120 On 6/5/26 8:14 PM, Andrew Lunn wrote: >>>> This PHY is integrated into the IPQ5018 SoC, connected to the first GMAC >>>> (GMAC0) and probed upon boot. However, this PHY is not used on all >>>> boards because an external PHY or switch can be wired to the SoC's >>>> second GMAC instead (through a PCS). So from a power management >>>> perspective, it would be better if we can disable the clocks if there's >>>> no link detected. >>> >>> Humm, is link the correct criteria? If the PHY is not used, >>> .config_aneg should not be called. Why not have the probe method get >>> the optional clocks, but leave them off. When .config_aneg is called >>> for the first time, enable the clocks? >> >> Will check if config_aneg is called and test accordingly. >> >> ip link set eth0 up/down and cable (un)plug do trigger >> link_change_notify, and based on the link state the RX/TX clocks are >> turned off/on properly. > > You are talking about something else here. You say the device is not > used. If it is not used, .config_aneg should not be called. > > This is a second use case, the device is used, and you want to limit > the power it consumes, when there is no link. Do you have any numbers? > How much power is actually saved? If the PHY is part of the SoC, keeping it online would require some more hw to be online, so it probably sums up.. I don't know for sure, I don't really work with the router SoCs Is there any prior art wrt enabling/disabling the PHYs (not necessarily clocks specifically, but say power supplies) at runtime? A quick grep only points to this very driver, which gets the regulator during probe, enables it and never turns it off Maybe +Kathiravan knows more? Konrad