From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9487AC197A0 for ; Thu, 16 Nov 2023 11:17:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345124AbjKPLRl (ORCPT ); Thu, 16 Nov 2023 06:17:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345125AbjKPLRh (ORCPT ); Thu, 16 Nov 2023 06:17:37 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C38CD4B; Thu, 16 Nov 2023 03:17:29 -0800 (PST) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AG93IT7012664; Thu, 16 Nov 2023 11:17:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=SyAr0+834frsHXJosNimVgW4YH4JIr7IPM5AnqXeAGI=; b=YkOUP86yQ+BItnCcdr5Yl4EKM59qpaRaiubWxF0b1fnGdPa3wryuvTcis4cjXJjGDSdK 0sgXPwEqPj4m2F+fd/E6SnHj7sRC/PIQw+53WRHTELo1AG+KbUt7vcon1aZd+tPbZB8t HPyyYmEXlBBJbxfhE2Aq5fKryM24VW9rBzEVeic2onQ32AJH53oS/4Lp/205FumO5Ny5 0vxrnoyu6MM1vdHCsLa9BmaWxvQ62EEEMlXqsoybm9LrUIYFzbBHPpEY0PMWrH0MVaR+ sBBOR5sIMNxKqC2Q/l9ubhwZF0fk2WZkQryBtXx5kk8E8bK0XdHFbKblKkLZ8LpGwnHe Iw== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3ucu27u58x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Nov 2023 11:17:13 +0000 Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3AGBHC1Z031871 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Nov 2023 11:17:12 GMT Received: from [10.253.72.184] (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.39; Thu, 16 Nov 2023 03:17:07 -0800 Message-ID: <272ce8f7-9c57-4d5f-a609-52c098b63227@quicinc.com> Date: Thu, 16 Nov 2023 19:17:05 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 7/9] net: mdio: ipq4019: program phy address when "fixup" defined Content-Language: en-US To: Andrew Lunn CC: , , , , , , , , , , , , , , , , , References: <20231115032515.4249-1-quic_luoj@quicinc.com> <20231115032515.4249-8-quic_luoj@quicinc.com> <2cf175d7-d96b-4f51-9dd7-2ce8229ca212@lunn.ch> From: Jie Luo In-Reply-To: <2cf175d7-d96b-4f51-9dd7-2ce8229ca212@lunn.ch> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: D4tc1U-T_wSHTygZBBDfZ6JOmujM6fLc X-Proofpoint-ORIG-GUID: D4tc1U-T_wSHTygZBBDfZ6JOmujM6fLc X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-16_09,2023-11-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 malwarescore=0 phishscore=0 impostorscore=0 bulkscore=0 adultscore=0 priorityscore=1501 clxscore=1015 lowpriorityscore=0 suspectscore=0 spamscore=0 mlxlogscore=635 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311160090 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/16/2023 12:17 AM, Andrew Lunn wrote: > On Wed, Nov 15, 2023 at 11:25:13AM +0800, Luo Jie wrote: >> The PHY/PCS MDIO address can be programed when the property >> "fixup" of phy node is defined. >> >> The qca8084 PHY/PCS address configuration register is accessed >> by MDIO bus with the special MDIO sequence. >> >> The PHY address configuration register of IPQ5018 is accessed >> by local bus. >> >> Add the function ipq_mdio_preinit, which should be called before >> the PHY device scanned and registered. > > I'm not convinced this belongs in the MDIO bus driver. Its really a > PHY property, so i think all this should be in the PHY driver. If you > specify the PHY ID in the compatible string, you can get the driver > loaded and the probe function called. You can then set the PHY > address. > > Andrew I will try to do the initialization configs in the PHY probe function, Thanks Andrew for the suggestions.