Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp2705048rdb; Wed, 15 Nov 2023 08:17:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IFvZbQK7BfcrArVi6GxTEkFs0/5cp1cYjnFIj3RbwH1ySoWfFlxH4wTxTmg+7FtViO0+udm X-Received: by 2002:a05:6a20:7345:b0:130:d5a:e40e with SMTP id v5-20020a056a20734500b001300d5ae40emr11830301pzc.7.1700065057392; Wed, 15 Nov 2023 08:17:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700065057; cv=none; d=google.com; s=arc-20160816; b=pZPF0npDU8Fv+8/+WMCyqH5P9V2RQIiKr7FSxELbtReRUdULeRdaPKDfW+DIa0FBRt dUwj0g/7g5QuC1DxRbQEB8ujhc/BUcuZ4+xivr0tBTUtVybfFafWopRzao2+K2x6F5AH f2YuKXyWiRIX11oIcl9mQCxZ6x7wEFH5rQcC7FSJlbKzGqEkWDw9m+6F1DyfEgA3JWbJ 4O0jKesLrOihMxrn789MKdFPY4ycxuKBxFlMITjbeyMCLfqF1bWTpKj3UDnRuaSVWZUc qFu208nckRLArpQmXM7c0nHs74acOjUHXKdDW+k0EXHyU/821yUVoOgz2laA9karOZq4 vpIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=wYfs7wiI1xmxaxDt3krpKsC1uJFC6LeNKDzF3hoksPw=; fh=4gpfRGcGnp+CfSXRmR6id0uiB/MqlRnmFc1qe8IoiFE=; b=Bzj47vkDVxxShHQQ8uU1yRUlukZCCSYiDeay7wkk8uqBCBN+RH5PJX7xY4G0c9H4KR 84RzIJg3VnjDfp3Kj5428laK9F9holSckJXkDSQlpL2hwcnYoAhxXwjRTr9xOysVYMmN /1ZaIj/ICji9hj0tXbPOsNAzjnFGrgxydRAtzNBC/8vp65U1jzYDxMMaxKE6RZEWgWVf e3cOuOFZbuSWSZmSYBkRAtsFDGGI/cp2D8QExn+TfVT07cwgn5bif1O2u+pLoE6b2zpY ppcoGEnR4XgR1H6/tQ0LIHDsDjxn2j7a+7vfcDjbpj6UGsHKVFbVpVl4Qs8vjbB4OVF+ 6RiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=RJBerz5C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id i8-20020a635408000000b005b90af19430si9804329pgb.595.2023.11.15.08.17.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 08:17:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=RJBerz5C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 22B04820E532; Wed, 15 Nov 2023 08:17:36 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229457AbjKOQRc (ORCPT + 99 others); Wed, 15 Nov 2023 11:17:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229886AbjKOQRb (ORCPT ); Wed, 15 Nov 2023 11:17:31 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4F7811D; Wed, 15 Nov 2023 08:17:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=wYfs7wiI1xmxaxDt3krpKsC1uJFC6LeNKDzF3hoksPw=; b=RJBerz5CQ0fEajYRmbbpglaxJ7 NmW7K6ERfzEOx6QoSvrQNuwlb6sCvSxKt4ydd+16TZikAmibK8JzqbmKTUHq/xN/U8lV2VOfCtHHr CHFwtxMZzma/4sjfvcuMux1krXshcK0A4SNWlrWH5f5dLMLDBJYSsFqKABbaKv3bKORM=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1r3IZq-000GJt-QX; Wed, 15 Nov 2023 17:17:18 +0100 Date: Wed, 15 Nov 2023 17:17:18 +0100 From: Andrew Lunn To: Luo Jie Cc: agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, hkallweit1@gmail.com, linux@armlinux.org.uk, robert.marko@sartura.hr, linux-arm-msm@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, quic_srichara@quicinc.com Subject: Re: [PATCH 7/9] net: mdio: ipq4019: program phy address when "fixup" defined Message-ID: <2cf175d7-d96b-4f51-9dd7-2ce8229ca212@lunn.ch> References: <20231115032515.4249-1-quic_luoj@quicinc.com> <20231115032515.4249-8-quic_luoj@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231115032515.4249-8-quic_luoj@quicinc.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 15 Nov 2023 08:17:36 -0800 (PST) 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