Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp667219iog; Thu, 30 Jun 2022 08:01:38 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s9uIBFuByp2kCEVDvUu9yVB+nV9hBkxT7arBHHGjFWNW6HkCiwzS8D2FWWawRF2PMU6h/V X-Received: by 2002:a63:8149:0:b0:40d:2b52:f37d with SMTP id t70-20020a638149000000b0040d2b52f37dmr7857823pgd.89.1656601298129; Thu, 30 Jun 2022 08:01:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656601298; cv=none; d=google.com; s=arc-20160816; b=ET758IreIDA4OjuLJFT0dCisnmse9XRIz5B4UG3tj6iHYMZEA9t6XSuDWjJd8AZP3A 598uCVsSgRexWT2mmvcnEkKfWl4nG3SaYbKy4heS6um2Ngffblbm0YfIzQr5sCVy9bYY ePvEGwJn/VCaFQiBnwnaaJu8Q5tXRVMlX5jJDMe0n9K32Sf+50vnmeL6etuP79a5RSUj +KoeBGf17csVdMxO7oKDY9uBQLqxUDauU8etHMb1u8VysIolQYunk+cHaLGBI6pwFt6V ffI3oMqgOppHE/nlVz9UviDPVMXQ9a33k+D2KEGfooA3Nzm+qzpmZbaJQjSFTagzvDzF NcEA== 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:dkim-signature; bh=5Q0/3Zp7gW4gT+Sw+FNUzkL95d+izWXUAdtdR88h4Rc=; b=ml52iejXe+nu2LFcjcDrdh7RBUu57Dew4rMw+e2uXmUUWuDcvZVVIq3bAM/SXP5RIU JODlsEUGM9xrNMpgqxqojdQp+HzvBVjWesEv6uHqPuXdSHiQzY+lFHzNGz/vcmr2JTc5 XYApTfgUFbTTRa4Q61Se22jju7wRAg7mVGvtBTXEliZgiv+ELgFCFJwifSbYlyhW1T+p p+bjcschs7MIjNaKAzoyAlirx2Qq4axXCtklz5HVfBIGD0KZkhTx1qrk4jmgdZPNlpZE jswxbw8lPj4bP26/cl3HzPzcFCi7DpZX1sr6uYh3eKFp/zbqnUHgcq3WxmFwEcq0EHYk Xrxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=VfJhf0my; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r12-20020a63d90c000000b0041154ac71aesi11864495pgg.591.2022.06.30.08.01.17; Thu, 30 Jun 2022 08:01:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=VfJhf0my; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236924AbiF3OTS (ORCPT + 99 others); Thu, 30 Jun 2022 10:19:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237344AbiF3OR7 (ORCPT ); Thu, 30 Jun 2022 10:17:59 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [176.9.125.105]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 502504553A; Thu, 30 Jun 2022 07:02:48 -0700 (PDT) Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 4162822236; Thu, 30 Jun 2022 16:02:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1656597766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=5Q0/3Zp7gW4gT+Sw+FNUzkL95d+izWXUAdtdR88h4Rc=; b=VfJhf0myZO+bKRT/91LVbfEvPr3FZu+ii3IlCLv0tu5rqN6CDQvbi7RUzvxn78NXZifaIE PL7xHOYT11DdAn1bcSpJZEOc1ONExahrf4ZilNRXbin5UuELXJHeXO3SfOhyS5FlMeCtra JbRp5JRqZvIFca1c/HPkAxB2xQpTVaw= From: Michael Walle To: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Horatiu Vultur Cc: UNGLinuxDriver@microchip.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Walle Subject: [PATCH net-next 0/4] net: lan966x: hardcode port count Date: Thu, 30 Jun 2022 16:02:33 +0200 Message-Id: <20220630140237.692986-1-michael@walle.cc> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, 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 Don't rely on the device tree to count the number of physical port. Instead introduce a new compatible string which the driver can use to select the correct port count. This also hardcodes the generic compatible string to 8. The rationale is that this compatible string was just used for the LAN9668 for now and I'm not even sure the current driver would support the LAN9662. Michael Walle (4): net: lan966x: hardcode the number of external ports dt-bindings: net: lan966x: add specific compatible string net: lan966x: add new compatible microchip,lan9668-switch ARM: dts: lan966x: use new microchip,lan9668-switch compatible .../net/microchip,lan966x-switch.yaml | 5 +++- arch/arm/boot/dts/lan966x.dtsi | 2 +- .../ethernet/microchip/lan966x/lan966x_main.c | 24 +++++++++++++------ 3 files changed, 22 insertions(+), 9 deletions(-) -- 2.30.2