Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp2181997lqa; Tue, 30 Apr 2024 10:08:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVlVKyNOMzHALPUAiNSMn5iJkw32E//Lmi0617txgEK7AnivEy51Y3BVG5TErXxKlkNqYylGkQsSKu42Fe/PmVWxeLQPsPE8gzEntm9Jw== X-Google-Smtp-Source: AGHT+IGbUwtrMBiAMDD4PqMcMI1t0znu9mDDXLB53mf34Uo5VyWAtbgjzE58jIlVS4L4SUSSC0fV X-Received: by 2002:a05:6870:1586:b0:22e:c8ee:9307 with SMTP id j6-20020a056870158600b0022ec8ee9307mr77244oab.29.1714496882034; Tue, 30 Apr 2024 10:08:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714496882; cv=pass; d=google.com; s=arc-20160816; b=JFK+Om6y2ZDUzvYMIxfn+gCheGJiU1PEhnIDV5yCuAHzEgUnjisflPx73oP+eWpnxg ero3fJtdJPosyVz7xqnFDm0UaWEUfRXOhV4w8cFMvzTIgCQqqjxmK7zIIs8mRMUNu0rL ElDxPDtbpccKr71q4XyCMc+/YgRRGTmPQS9yBIRJ6FPWxSUxcGlFF0hz3O6rj9U7GjfH SVhVMk25skWSoIsYmtw11hRZYzeeKgJEBHiVa2UuVz7CPjslNIFcBNXd0SlIgkPnZXRN hNKlz5WpDJdkTRi2jLGZA05un2lbzPdbLgrglzJKv9gMrLvYyN/yXTtTNEY/cFZTAJf4 xIBQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=MS5M099kdXlpkd7OGdREv4B/wtpEFtzNTs1YnG6jLEg=; fh=EHoRzhGKoo+5LVrsaIpS8Om/3HcdyKJQapNQJMyZzfk=; b=tYiYJqN0WTNUvFG7ozEu1rLNrQpvRUBP7HGDc+UV2tC7oDGA+ga+fwZWMzJgTPoYxE zfqqLydWn5xyUFccgFGUjsRBAAVYspuiHxRn5VL/iI2kaA+LG2EX40CmP6xPyzziD86P d5vMW9fFhyrIpZGqiZJTmVv7gLKccnfjHn0TQtG+/ksENQhhIcAfcJKbBi9amajSq7v2 79RR4BjP29ZBVtinS8OutGLrYEA41fCTZGS/7eKdKdF2KRWDCC51clQ8MCU69CD33M5B 8YSRDkm83i7q/tOJ+IHIp7o84xuqVtEcJtbl2zj/bQhcuMuTQtMBjHCCVhMgCP5UZL0C oj/g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="BPhi/PZL"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-164478-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164478-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id x16-20020a9d6290000000b006ee48c936c8si1284169otk.187.2024.04.30.10.08.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 10:08:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-164478-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="BPhi/PZL"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-164478-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164478-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 977162885E6 for ; Tue, 30 Apr 2024 17:01:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 477FC184139; Tue, 30 Apr 2024 16:55:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BPhi/PZL" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 581C91836EE; Tue, 30 Apr 2024 16:55:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714496128; cv=none; b=LDd6TTiOJMX2dwIxljQwCgX7/jD2r+EunYJ0m58hNR91WaYP+ijhx7bUo/6PXUcdFjRgUZptQYjo4xOYnnJYLEH2G2yCFNCakbJ1Tn5vaKOscoi5fAJHsm2LANhkDcGUHgkWmm7qK/GQk0cxLMixRyQ+xF3sEA1KzoXh2R9TK0Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714496128; c=relaxed/simple; bh=afEaKbtT3sTJoRjqGUMv4dNh/Opd3i+knlydOHpRElM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dXlEvahINiZ+L0AtSKdvNihfBoXtU+9Cv/WKLyC0hSk15sc1Tbtpiw/v2Dm9qAdYNFciQaj973tSU9A9kIQULgA4BZaE9DXpww94ui+f5oUP3ZoUL0ciLKFqJbcOPVzgbX0g1XZ3xzua0oSBvFbxI4WfmunS3Gasm/O/d1oeRHU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BPhi/PZL; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C8B00C2BBFC; Tue, 30 Apr 2024 16:55:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714496128; bh=afEaKbtT3sTJoRjqGUMv4dNh/Opd3i+knlydOHpRElM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BPhi/PZLth6a7tETJJ+1u7dd7WBmJV/4L8EVw17ALRH7e0EUUEvxWtVyGsKklLnim Pd/Wb6IDT2rdxIT7fXIIHs0DMQg/EV/dgbQxn63BiHJMefIlIJqvJe2DQM9sXeZP+j NPPpEsmXNjkMUxzx4xuOQs+SLgPrfJZrf6eBqPsrg84SBN9HCoUpJsvq1l33UoV6/9 JZP42clG60jChHV5M6zLW+aep8PnvZL4hn8rAov1AAVsKIGLAxfkCIcfId4vyoYJSj oT0Yq9p5CRzrXXeyhNcv+tZU934jkTvci1B+4KoSobX8MZvZLVq0fqPee9WHMao4el ZnOtaZKWFlRVg== Date: Tue, 30 Apr 2024 17:55:20 +0100 From: Conor Dooley To: Parthiban.Veerasooran@microchip.com Cc: andrew@lunn.ch, ramon.nordin.rodriguez@ferroamp.se, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, saeedm@nvidia.com, anthony.l.nguyen@intel.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, corbet@lwn.net, linux-doc@vger.kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, devicetree@vger.kernel.org, Horatiu.Vultur@microchip.com, ruanjinjie@huawei.com, Steen.Hegelund@microchip.com, vladimir.oltean@nxp.com, UNGLinuxDriver@microchip.com, Thorsten.Kummermehr@microchip.com, Pier.Beruto@onsemi.com, Selvamani.Rajagopal@onsemi.com, Nicolas.Ferre@microchip.com, benjamin.bigler@bernformulastudent.ch Subject: Re: [PATCH net-next v4 11/12] microchip: lan865x: add driver support for Microchip's LAN865X MAC-PHY Message-ID: <20240430-sharpie-manor-fd53df03b77d@spud> References: <20240418125648.372526-1-Parthiban.Veerasooran@microchip.com> <20240418125648.372526-12-Parthiban.Veerasooran@microchip.com> <20240427-vaporizer-pencil-be6a25030f08@spud> <1ae4f1d5-140b-41b1-9191-da14fd67d409@microchip.com> <243dab3b-ac07-4d88-8c43-aed53a34cea9@lunn.ch> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="js/VJxOTZJXlYBp3" Content-Disposition: inline In-Reply-To: --js/VJxOTZJXlYBp3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 30, 2024 at 01:30:22PM +0000, Parthiban.Veerasooran@microchip.c= om wrote: > Hi Andrew, >=20 > On 29/04/24 5:39 pm, Andrew Lunn wrote: > > EXTERNAL EMAIL: Do not click links or open attachments unless you know = the content is safe > >=20 > >> Looks like, the below changes needed to work correctly, > >> > >> lan865x.c: > >> - compatible string to be changed like below as it is a fallback for a= ll > >> variants, > >> .compatible =3D "microchip,lan8650" > >> - DRV_NAME to be changed like below, > >> #define DRV_NAME "lan8650" > >> > >> microchip,lan865x.example.dts for lan8650: > >> - compatible string to be changed like below, > >> .compatible =3D "microchip,lan8650"; > >> OR > >> microchip,lan865x.example.dts for lan8651: > >> - compatible string to be changed like below, > >> compatible =3D "microchip,lan8651", "microchip,lan8650"; > >> > >> I tested with the above changes and there was no issues observed. Any > >> comments on this? Otherwise we can stick with these changes for the ne= xt > >> version. > >=20 > > As Conor said, this is probably relying on the fallback > > mechanism. Please look at other SPI devices, e.g. hwmon, and see how > > they probe for multiple different devices. > I just referred the below drivers for the spi devices handling along=20 > with the compatible, >=20 > https://elixir.bootlin.com/linux/latest/source/drivers/net/ethernet/davic= om/dm9051.c#L1239 >=20 > https://elixir.bootlin.com/linux/latest/source/drivers/net/ethernet/adi/a= din1110.c#L1644 >=20 > lan8650 - MAC-PHY chip > lan8651 - ETH Click-Mikroe with MAC-PHY chip >=20 > So, they are different in interface but not in functionality. There is=20 > no difference in the configuration. So let's consider lan8650 is the=20 > fallback option for lan8651. >=20 > By referring the above links, I have restructured the code like below to= =20 > support with lan8651 fallback. Still there is no change in the existing= =20 > device tree binding. This is the only change in lan865x.c. >=20 > static const struct spi_device_id spidev_spi_ids[] =3D { > { .name =3D "lan8650" }, > {}, > }; >=20 > static const struct of_device_id lan865x_dt_ids[] =3D { > { .compatible =3D "microchip,lan8650" }, > { /* Sentinel */ } > }; > MODULE_DEVICE_TABLE(of, lan865x_dt_ids); >=20 > static struct spi_driver lan865x_driver =3D { > .driver =3D { > .name =3D DRV_NAME, > .of_match_table =3D lan865x_dt_ids, > }, > .probe =3D lan865x_probe, > .remove =3D lan865x_remove, > .id_table =3D spidev_spi_ids, > }; >=20 > I also referred the below two links for the device tree binding and=20 > driver in case of fallback. Did you also verify that the warning from the spi core is no longer generated when using compatible =3D "microchip,lan8651", "microchip,lan8650= "? --js/VJxOTZJXlYBp3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZjEieAAKCRB4tDGHoIJi 0rXJAQCg3c5KEmlcUVnAQeoyvJAbMOXTrqTIe+5HNtP5ghxVCQD9H3u3qZgPhyOU umMo7Mi2fXou2ruId81UEDb48eDqIQ0= =yp6N -----END PGP SIGNATURE----- --js/VJxOTZJXlYBp3--