Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2400870pxb; Tue, 13 Apr 2021 00:34:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxohgnpoLlNQLI+hMAanQPNbszUpeT6fH3S3pgal7gu191Bf9cQ6R+94vMNqRKhU5oEj3wm X-Received: by 2002:a05:6402:c1:: with SMTP id i1mr33024577edu.315.1618299246178; Tue, 13 Apr 2021 00:34:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618299246; cv=none; d=google.com; s=arc-20160816; b=fp2raUhvmqufK2A4pnnhamxzjEoBBRbaoGcBFkgsjONTuYQwk3tSJMNOk25NdaYfbX 15S6aG0jnWlVYlrZEgy2kmZ2FPW1qeAhDDl8COdUoHGtWIruUGV7I1zeBQ2CaEDkm4hM M3q/ZNyfJp9Ad5qim0jEDExkhZ6/BuOK+IUNB1YZwlwvPF1K7Vjzd6rfcW5Qtmt3b5Bb DRhc9WT0VDOIBq4V+9/8wmeEZ2p0HqNjlJPOd9x2J3i48s2ex3v7XELQbAv82mtqfYym rZG7XE/LAvjqmSnBSlyHJM0beUNbtQM8HJc2dYqJ72FSzlsJr23MF7Ll8KzXJloS/Jvu Et4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=QxRg7ARheYE2yWjs+EQlLrkum7BInlLItK0G04Cixl8=; b=FUFitIEKyl5TJv13PKUmphbNfrRq98Yfde36BVFyuWldMi/A6SOTBf9KfenSGDXf72 uaVGfTHI6qzHSJ05KCriAZQ9xuE5YUr7Vx1r9s1nNQv+tIjoAm047JIN8wot1+05nMMZ tU9F1YCOg+cQ+RlMpjtGNUOE7HOCbKF17wnSKAEC4N0v3De7w5Upkz2TmG1LUX6M7oCh UklZ1h6HwQL5CowIzETHDaEQgCjHyuWygIgGYTFWlRp7WF0CkCI++4eUTC4s+6GUhaSy iWftAri8wowhbjb9VcpS+7DPHY2/uYWgU6+tYDKtSoCibqzQ5P9Isc+Z1leimuEeK7/Y hcAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XFpiTYrm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hr7si9833765ejc.596.2021.04.13.00.33.42; Tue, 13 Apr 2021 00:34:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XFpiTYrm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344186AbhDLXqJ (ORCPT + 99 others); Mon, 12 Apr 2021 19:46:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:59592 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237290AbhDLXqI (ORCPT ); Mon, 12 Apr 2021 19:46:08 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5CB6061278; Mon, 12 Apr 2021 23:45:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618271149; bh=QRIInDklK16Ym/43NY2Bvzrh8ZTmiRAiyJRfrUabGpk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=XFpiTYrmI2eNTJprFnnSFChlZDgqgDu1IHOvc7YS45+kb5dxAOGzw8PGt7y8GyQGD 0HGvbNrRlZplIxqPYpzYT/XbQMEn4DUDzHgdVFeBPPDbDTMY3ps4ulDCzrdA9GBjHQ vOkKDZ2WJaaqK+RcE4GITJ3r2BGxab4E8Bqgj2N9UrefkFF+D1+W7pS4pGKeSzU+cT 1kdtDxQgXqvdBRZkC3QWY5V8s0Jnk1yexmtnoqjGRl7LXGWQ8imR4I5HmEYYP3RsV5 i6RO+ffz1CCjDL928gs7O3FKN8sk4MQndgoYNHWKFHL7ETVQJLlu7SU0jyFRp+H0Nu kZdFH/yWp38NA== Date: Tue, 13 Apr 2021 01:45:45 +0200 From: Marek =?UTF-8?B?QmVow7pu?= To: Pali =?UTF-8?B?Um9ow6Fy?= Cc: Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: phy: marvell: fix detection of PHY on Topaz switches Message-ID: <20210413014545.1bb4601e@thinkpad> In-Reply-To: <20210412163829.kp7feb3yhzymukg2@pali> References: <20210412121430.20898-1-pali@kernel.org> <20210412133447.fyqkavrs5r5wbino@pali> <20210412150152.pbz5zt7mu3aefbrx@pali> <20210412155239.chgrne7uzvlrac2e@pali> <20210412163829.kp7feb3yhzymukg2@pali> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 12 Apr 2021 18:38:29 +0200 Pali Roh=C3=A1r wrote: > On Monday 12 April 2021 18:12:35 Andrew Lunn wrote: > > On Mon, Apr 12, 2021 at 05:52:39PM +0200, Pali Roh=C3=A1r wrote: =20 > > > On Monday 12 April 2021 17:32:33 Andrew Lunn wrote: =20 > > > > > Anyway, now I'm looking at phy/marvell.c driver again and it supp= orts > > > > > only 88E6341 and 88E6390 families from whole 88E63xxx range. > > > > >=20 > > > > > So do we need to define for now table for more than > > > > > MV88E6XXX_FAMILY_6341 and MV88E6XXX_FAMILY_6390 entries? =20 > > > >=20 > > > > Probably not. I've no idea if the 6393 has an ID, so to be safe you > > > > should add that. Assuming it has a family of its own. =20 > > >=20 > > > So what about just? > > >=20 > > > if (reg =3D=3D MII_PHYSID2 && !(val & 0x3f0)) { > > > if (chip->info->family =3D=3D MV88E6XXX_FAMILY_6341) > > > val |=3D MV88E6XXX_PORT_SWITCH_ID_PROD_6341 >> 4; > > > else if (chip->info->family =3D=3D MV88E6XXX_FAMILY_6390) > > > val |=3D MV88E6XXX_PORT_SWITCH_ID_PROD_6390 >> 4; > > > } =20 > >=20 > > As i said, i expect the 6393 also has no ID. And i recently found out > > Marvell have some automotive switches, 88Q5xxx which are actually > > based around the same IP and could be added to this driver. They also > > might not have an ID. I suspect this list is going to get longer, so > > having it table driven will make that simpler, less error prone. > >=20 > > Andrew =20 >=20 > Ok, I will use table but I fill it only with Topaz (6341) and Peridot > (6390) which was there before as I do not have 6393 switch for testing. >=20 > If you or anybody else has 6393 unit for testing, please extend then > table. 6393 PHYs report PHY ID 0x002b0808, I.e. no model number. I now realize that I did not implement this for 6393, these PHYs are detected as mv88e6085 ... PHY [...] driver [Generic PHY] (irq=3DPOLL) And it seems that this temperature sensor is different from 1510, 6341 and 6390 :) I will look into this and send a patch. Marek