Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1141417rdb; Wed, 24 Jan 2024 06:12:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IGjYfVL3J0e0G8f2OWNP7CQygfWUCzcTJDta70BJFdQOADdARGrV9dFwPpbpAy03EQSJElE X-Received: by 2002:aa7:88c2:0:b0:6d9:b9ba:fc7b with SMTP id k2-20020aa788c2000000b006d9b9bafc7bmr1779158pff.33.1706105550200; Wed, 24 Jan 2024 06:12:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706105550; cv=pass; d=google.com; s=arc-20160816; b=Cyc94yb6fVx4w6MdQKdp2JKcFKhj8IU5sWvUA6WH4Ef4+lwxbAfgqXMNe3V1S102zy RBPhPFObg/AU/ET5aVEjz2D8qXq77NVFQvHd7I6HP7a2VMiw/STR5IAkCBz9NBxJbwe7 nC7rA3ZIQ92a8YUvZtXIMZnvpg+MEuMnrN7pZhs2Ac+Vck8dxgQticQVfiGMrwgcfxo9 bN3xQL6qTX8XAeaYqIMmn1e/pyaghZ35J1DGTN6Iri4j21kczIlBwBJA8/IjUcDil3d4 7qlJ8x1E+NuyRv8lKwpLrfvmpsZMUuK6BCYIe91xESCURNc+GeTdeG8fSCRMU/zv4dVL 1YJA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:autocrypt:references :in-reply-to:date:cc:to:reply-to:from:subject:message-id :dkim-signature; bh=wl5cqQcWfykVVJblgMlQOTH7snhU8fazVZAYDiv1i+4=; fh=x46mKBHmKSHexnV73vklVp4Tnumwotw9Lwi/8zpQLPY=; b=YRfVtybxHbo0AY1HcLt2H8wGFL9CyCfUsWGqhPKpjF+X+LKQVBioUKvBvHkoUn8Io7 7U4j2Otq/SprtYJ1AZ8AWnKlWsCXN43CRuwNraNFKcW6PCug6ucS1ks/EvOnFy7nYTDA F42nXPYxMhI8ASMj+UkUXCMwP4PBAwGeYhg3T0gMPfBtho3DG8uH3nI2xzHE9eWmhQ5k QfXlpnjHlq5TarXp3HJQ7uHptCs9ua4e32bHarK08dGkvyMA6AGKXE6nAWtY9QBBnHYO 9FH0/AwED7BKLhMBLj3Fo84kft67sd9HeiFVYoI1Paq7zSlrXCeqx8ntZEk0INq3N7MR oT2w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@pschenker.ch header.s=20220412 header.b="T/2AMIqw"; arc=pass (i=1 spf=pass spfdomain=pschenker.ch dkim=pass dkdomain=pschenker.ch dmarc=pass fromdomain=pschenker.ch); spf=pass (google.com: domain of linux-kernel+bounces-35991-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35991-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=pschenker.ch Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id jo38-20020a056a0090a600b006dd86b2d681si1810009pfb.7.2024.01.24.06.12.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 06:12:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35991-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@pschenker.ch header.s=20220412 header.b="T/2AMIqw"; arc=pass (i=1 spf=pass spfdomain=pschenker.ch dkim=pass dkdomain=pschenker.ch dmarc=pass fromdomain=pschenker.ch); spf=pass (google.com: domain of linux-kernel+bounces-35991-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35991-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=pschenker.ch 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id B37A6B23E58 for ; Tue, 23 Jan 2024 19:44:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5AAA482D89; Tue, 23 Jan 2024 19:44:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=pschenker.ch header.i=@pschenker.ch header.b="T/2AMIqw" Received: from smtp-bc0a.mail.infomaniak.ch (smtp-bc0a.mail.infomaniak.ch [45.157.188.10]) (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 3E1A6823AE; Tue, 23 Jan 2024 19:44:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.157.188.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706039061; cv=none; b=Hl9O7f/Yqw/eSpiPlSDLU5qmGfMZViezLdQlIt5KC61Gx9ImTvvDmRalx2WvBRkdzWyCrFUpWJD2gP8kiRIGw9nbg4DoXMiB99vjkP+bf/rxp827hR7jGYXRCxRtUj2bNhAODPV7oe5pOWghG2WKuGUMgNjO/B0uKqzxb+zKfpI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706039061; c=relaxed/simple; bh=wl5cqQcWfykVVJblgMlQOTH7snhU8fazVZAYDiv1i+4=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=FikCOcbR6njjAiaSutt6VF5CSxjaFBNgezZUX2H7ZBYOb92xsJ8LpeYbIpF6HYOHpQr9mrxg0W7a8BcCxwr2zJptPgii78gF65ATZCmUTPt8Dy5xXfLqcZ1bXs7O1PjhBaQr5lVlSfUE3tEFvmOhwu7GoGshgoHTI1ZI73jX/qg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pschenker.ch; spf=pass smtp.mailfrom=pschenker.ch; dkim=pass (1024-bit key) header.d=pschenker.ch header.i=@pschenker.ch header.b=T/2AMIqw; arc=none smtp.client-ip=45.157.188.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pschenker.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pschenker.ch Received: from smtp-3-0000.mail.infomaniak.ch (unknown [10.4.36.107]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4TKHbK2DftzMr2QW; Tue, 23 Jan 2024 20:44:13 +0100 (CET) Received: from unknown by smtp-3-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4TKHbJ0MFvz3b; Tue, 23 Jan 2024 20:44:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pschenker.ch; s=20220412; t=1706039053; bh=wl5cqQcWfykVVJblgMlQOTH7snhU8fazVZAYDiv1i+4=; h=Subject:From:Reply-To:To:Cc:Date:In-Reply-To:References:From; b=T/2AMIqwHzqN4SWaSS2PkqwluUZlfpZsXeGU7/6qHPr6ik3hmzYtDPlc1Zqmot1mS fv70ViNQ1UiDjB/+DWv9HOk3eCLB0S/KWffHjYl9D2bmyZjM75yAuKFcFfWy+molC0 7qMbku6xa9/9Rqkwi/1wkiF5TP6KrMHI/kwZLV/A= Message-ID: <1b5a20ce6e6332b7fad7b6af61a5548152ae19c9.camel@pschenker.ch> Subject: Re: [PATCH net-next v1 1/2] dt-bindings: net: dsa: Add KSZ8567 switch support From: Philippe Schenker Reply-To: dev@pschenker.ch To: Conor Dooley Cc: netdev@vger.kernel.org, Paolo Abeni , Conor Dooley , Woojung Huh , Vladimir Oltean , linux-kernel@vger.kernel.org, UNGLinuxDriver@microchip.com, Marek Vasut , Florian Fainelli , devicetree@vger.kernel.org, Eric Dumazet , "David S . Miller" , Krzysztof Kozlowski , Jakub Kicinski , Andrew Lunn , Rob Herring Date: Tue, 23 Jan 2024 20:44:11 +0100 In-Reply-To: <20240123-carpool-avatar-c1e51ab3cc32@spud> References: <20240123135014.614858-1-dev@pschenker.ch> <20240123-ripening-tabby-b97785375990@spud> <20240123-atlas-dart-7e955e7e24e5@spud> <979b1e77b5bb62463d52e7b9d3f9ca1415f4006a.camel@pschenker.ch> <20240123-carpool-avatar-c1e51ab3cc32@spud> Autocrypt: addr=dev@pschenker.ch; prefer-encrypt=mutual; keydata=mQGNBGS2ZAkBDADqs7dCmUtCld0RXbarkJeH9uOPdaRTpSS3HrdCqyQ65RCu9AnloKX68EZbZU0v+UiHAURwhG6vtO91QP6oSPiLDJzicPN+sAwdxgmCYOLavyiQDTlzodu0yZvLlWXMAAs19n2Gz0WVZqltnaxWHVbeAFqYWGjemeKRM7v0W66wh4vTmCVL3Ywk0Pp/HjvNjijDIGV2kBubNK221Nc5Yo+1jsAkh0xhzngLpdjIMsF/ZzihitiTVYvwparu6COzw5W9naNE3CdW+QDVPmYOGy2zdX+1ETjHo+gOAX86vwDjjG/7sGM+6pb6bUDKJja7+K6Z5pqL6iNz3lLcvgsKobd/kqL39Y5phhh66hAut9a91flBEqk09GRMsiBkNslXmFctEM4SXXJJTLKe1UXq3tScb0+2vB61qidpmQTLRBVq3TXtdelPMBLwuA4UwHb2DDo9lx+YX2EPVWIn03+M9cqw5ICvB0F1mYAlKnLy7p2EX/EYHugmH0mzq4i7nQNpTOEAEQEAAbQkUGhpbGlwcGUgU2NoZW5rZXIgPGRldkBwc2NoZW5rZXIuY2g+iQHOBBMBCgA4FiEEPaCxfVqqNYSPnRhRjRDjR2hoXxoFAmS2ZAkCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQjRDjR2hoXxqd8Qv6Awz00hYCopnatbPJOFElSbtVK2O17rXt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6cloe99lZNUhycDMn/zPoe4235lpmqhC3mNQ/hnwGN4dywifiAJNg8D6gu3M4QaVqeNEPxyBCNfdquoFLW 7y2ACHIW8WQkD8EORcLp7+QKQh4NgSkg= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Infomaniak-Routing: alpha On Tue, 2024-01-23 at 18:37 +0000, Conor Dooley wrote: > On Tue, Jan 23, 2024 at 06:30:16PM +0100, Philippe Schenker wrote: > >=20 > >=20 > > On Tue, 2024-01-23 at 17:23 +0000, Conor Dooley wrote: > > > On Tue, Jan 23, 2024 at 05:17:53PM +0100, Philippe Schenker wrote: > > > >=20 > > > >=20 > > > > On Tue, 2024-01-23 at 16:06 +0000, Conor Dooley wrote: > > > > > On Tue, Jan 23, 2024 at 02:50:13PM +0100, Philippe Schenker > > > > > wrote: > > > > > > From: Philippe Schenker > > > > > >=20 > > > > > > This commit adds the dt-binding for KSZ8567, a robust 7-port > > > > > > Ethernet switch. The KSZ8567 features two RGMII/MII/RMII > > > > > > interfaces, > > > > > > each capable of gigabit speeds, complemented by five 10/100 > > > > > > Mbps > > > > > > MAC/PHYs. > > > > > >=20 > > > > > > Signed-off-by: Philippe Schenker > > > > > > > > > > >=20 > > > > > This device has all the same constraints as the other ones in > > > > > this > > > > > binding, why is it not compatible with any of them? If it > > > > > isn't, > > > > > the > > > > > compatible should mention why it is not. > > > >=20 > > > > Hi Conor, Thanks for your message! > > > >=20 > > > > I need the compatible to make sure the correct ID of the switch > > > > is > > > > being set in the driver as well as its features. > > >=20 > > > Are the features of this switch such that a driver for another ksz > > > switch would not work (even in a limited capacity) with the 8567? > > > Things like the register map changing or some feature being > > > removed > > > are > > > examples of why it may not work. > >=20 > > Yes the ksz dsa driver is made so that it checks the ID of the > > attached > > chip and refuses to work if it doesn't match. [1] >=20 > That sounds counter productive to be honest. Why does the driver not > trust that the dt is correct? I saw this recently in some IIO drivers, > but it was shot down for this sort of reason. >=20 > > It is a very similar chip and uses the same regmap as KSZ9567 but > > with > > lower phy-speeds on its 5 switch ports. The two upstream CPU ports > > are > > gigabit capable. All this information is set-up in the second patch > > of > > this series. [2] >=20 > That, to me, means the lack of a fallback is justified. If it were the > other way around, then a fallback sounds like it would be suitable. Yes, I believe a generic fallback would anyway mostly end up with errors or misbehavior. But I also might be wrong. What I checked is that these per-switch settings even increased from 5.15..6.7 which to me it seems those are really needed. I am no expert in this driver at all I just try to make my hardware work and with these patches it now seems to switch really well. >=20 > >=20 > > I will include a description to the second series. Thanks for your > > feedback. >=20 > Okay, thanks. You can add > Acked-by: Conor Dooley > when you do. >=20 > And despite the email, I have nothing to do with these switches, I am > just a sucker that signed up to review dt-bindings... Well, I'm grateful for your review and feedback. Thanks for your work around Linux kernel! And thanks for the Acked-by. Philippe >=20 > Thanks, > Conor. >=20 > >=20 > > Philippe > >=20 > >=20 > > [1] > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree= /drivers/net/dsa/microchip/ksz_common.c?h=3Dv6.8-rc1#n3181 > > [2] > > https://patchwork.kernel.org/project/netdevbpf/patch/20240123135014.614= 858-2-dev@pschenker.ch/ > >=20 > > >=20 > > > > You mean I shall mention the reason in the commit-message, or > > > > where? > > >=20 > > > Yes. > > >=20 > > > Thanks, > > > Conor > > >=20 > > > > > > =C2=A0Documentation/devicetree/bindings/net/dsa/microchip,ksz.y= am > > > > > > l | > > > > > > 1 + > > > > > > =C2=A01 file changed, 1 insertion(+) > > > > > >=20 > > > > > > diff --git > > > > > > a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.ya > > > > > > ml > > > > > > b/Documentation/devicetree/bindings/net/dsa/microchip,ksz.ya > > > > > > ml > > > > > > index c963dc09e8e1..52acc15ebcbf 100644 > > > > > > --- > > > > > > a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.ya > > > > > > ml > > > > > > +++ > > > > > > b/Documentation/devicetree/bindings/net/dsa/microchip,ksz.ya > > > > > > ml > > > > > > @@ -31,6 +31,7 @@ properties: > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - microchip,ksz9893 > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - microchip,ksz9563 > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - microchip,ksz8563 > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - microchip,ksz8567 > > > > > > =C2=A0 > > > > > > =C2=A0=C2=A0 reset-gpios: > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0 description: > > > > > > --=20 > > > > > > 2.34.1 > > > > > >=20