Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2375000rdb; Mon, 11 Sep 2023 22:46:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG63PD+nZTl851PZXzpzCOMaSpzCUcWZF4Xj6ZpZIy1Cx4tv5l/ghdi5Xpsrdt+AUckyUb+ X-Received: by 2002:a17:902:8202:b0:1bf:1367:b7fb with SMTP id x2-20020a170902820200b001bf1367b7fbmr10247049pln.46.1694497568886; Mon, 11 Sep 2023 22:46:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694497568; cv=none; d=google.com; s=arc-20160816; b=jK9+xIgDKK/1Uih0b+gZ8IZ9MCnNofnVAj+8xjDeoPwWGzhhU9+dOlbFk9k2C9nagp vEgKescxDhVh/jjgw5G42evM/wMe7HTwzlD4GmVT82Mc5ENZHZdM49HtBpp/13H4nsXx SXdFXiG5ifyU0ONC1gI7vZi7wTO4LzNVX6VR8wKXc/INKEgjtJiM6h0eA14Ow5Jq7GQ2 qXMGZn9p21jyBoKNYcttz6j/h1ChaK3gJN+kh9kZSxX3awuQlUu8nLQMlVZFYwPqL1U6 yAJPUIW8iw1GXKOuO6d6Kehqcxp+/ZWDziYJHVoisa/5ARs07w6K4qzVV6pRDXrXUZEu h0VQ== 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 :message-id:date:subject:cc:to:from; bh=nWojiUnp1OM6cU8nCPFB4vkYU5UdM7o3/F5P5qxsc08=; fh=J4gjwt0mePoRaYCjaHLm28JnUFi5LyPM6ZZbSRFLAL0=; b=tOiIFQU7SDT8wkpW7OfVapph+Xxx4RK7pftufKyKMxD/yAVM6mx0wJ+yNzElDTOpTk gqAvsIr9FMDr/LMhnprYPLUffj7X88t3nh7iKGqy97OGUFYaTw2hxy0gyLTVm2NzEnvM ZXCwCNuREPuM6nqY6HUbe0B8EuNztVmecq5Kuln9hZhjJnrofTwyRE4Y6X3/O3UqlKzP ezEeCT0ZaiePi2QwSx5qZv70UBUmB9rFJoxsSBDcF5cXC8Zdry04a5LDUSi2Bc40k5Yq RUJLUbZBtt/nzYmHLoXKDw8j6TyUZgghh+6ISgOT6kkLxJntBLr/oRNht3CPxJHDSKad OVdg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id b5-20020a170902d50500b001bb0fb5e06csi7705677plg.483.2023.09.11.22.46.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 22:46:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 5D4268033DCA; Mon, 11 Sep 2023 21:58:53 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229920AbjILE6w (ORCPT + 99 others); Tue, 12 Sep 2023 00:58:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230239AbjILE6f (ORCPT ); Tue, 12 Sep 2023 00:58:35 -0400 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B52B5FEA for ; Mon, 11 Sep 2023 21:55:24 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qfvQV-00040l-B9; Tue, 12 Sep 2023 06:55:03 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1qfvQT-005hVm-JP; Tue, 12 Sep 2023 06:55:01 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1qfvQS-007owG-2z; Tue, 12 Sep 2023 06:55:00 +0200 From: Oleksij Rempel To: "David S. Miller" , Andrew Lunn , Eric Dumazet , Florian Fainelli , Jakub Kicinski , Paolo Abeni , Vladimir Oltean , Woojung Huh , Arun Ramadoss , Conor Dooley , Krzysztof Kozlowski , Rob Herring Cc: Oleksij Rempel , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com, "Russell King (Oracle)" , devicetree@vger.kernel.org Subject: [PATCH net-next v4 0/2] net: dsa: microchip: add drive strength support Date: Tue, 12 Sep 2023 06:54:57 +0200 Message-Id: <20230912045459.1864085-1-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org 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 (agentk.vger.email [0.0.0.0]); Mon, 11 Sep 2023 21:58:53 -0700 (PDT) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email changes v4: - integrate microchip feedback to the ksz9477_drive_strengths comment. - add Reviewed-by: Rob Herring changes v3: - yaml: use enum instead of min/max - do not use snprintf() on overlapping buffer. - unify ksz_drive_strength_to_reg() and ksz_drive_strength_error(). Make it usable for KSZ9477 and KSZ8830 variants. - use ksz_rmw8() in ksz9477_drive_strength_write() changes v2: - make it work on all know KSZ* variants except of undocumented LAN* switches - add io-drive-strength compatible for ksz88xx chips - test exact drive strength instead of nearest closest. - add comment and refactor the code Oleksij Rempel (2): dt-bindings: net: dsa: microchip: Update ksz device tree bindings for drive strength net: dsa: microchip: Add drive strength configuration .../bindings/net/dsa/microchip,ksz.yaml | 20 ++ drivers/net/dsa/microchip/ksz8795_reg.h | 14 - drivers/net/dsa/microchip/ksz9477_reg.h | 13 - drivers/net/dsa/microchip/ksz_common.c | 309 ++++++++++++++++++ drivers/net/dsa/microchip/ksz_common.h | 20 ++ 5 files changed, 349 insertions(+), 27 deletions(-) -- 2.39.2