Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2055165pxb; Sun, 17 Oct 2021 04:50:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzfptFIpbWW77/L8Tjs3nmipraIZJSysRBZnwaCwUN7pYgXB7qg0ivrLULjdCLyEgjI19T X-Received: by 2002:a05:6402:1d49:: with SMTP id dz9mr34187663edb.55.1634471450429; Sun, 17 Oct 2021 04:50:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634471450; cv=none; d=google.com; s=arc-20160816; b=TWXIpeReYc/Xx3a5+KLo3fLs1arxLmkQlp/7eW+0IZ+GWx5v/BKxTeQFpAJZN91bBQ L76ZSvRyQDMCL3mERzIl1DCF6pYhpL3U1H1/OcXagTgWqgoxKmfzf06J1YFKbaAtJfOL IpmzJfuJZI+/xLmvD84BaQ8N0l1tBEWm2B8BQQMxbrcCYpp3XKEDoxUa/W9SwwfRS/WL 2yMKlHGAqaOLIlG46/qrmsQjsk/lz9zxL5UoQ4SOG6UrrYdZV2PJ5vm9jRFCW7a1+qlo Oc1LDJRZ1PU4/Ku5SjbAFz30yRXay9N7FI/POtZIHWkCRPwGWu0qAXg2EYLoIDul6D2a cvuQ== 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=zv/bK6mv5i9aibqrnGxAb4uWDtguEVNXq1Vv1S231L0=; b=uaETat5mfMmkCCV9q9IcFVR3fGVX+M43yoRmaSdGbIyXg+o0zI6q2M6Ig1+mN7a/uT F9pbeS70Lv3j4+ScXvDXss94nWCtEmdAgx1fN9PjJug4phocbMNnGLiUxbDUpHWaskJz 3zOvaLLcskCDO5+a9gSeuE0jZleU3OrbLEfmGfakZ8yZRuTaUkmFZmAFUvEr1fMN0G/N aVzqWvzN+ybthU8zsviobxkBUNYIzSpkezvSl4y5rlT9oBz7ar1VPRhesLPLPUqd2245 vvcW7NQMw7OZzdF53vFg/u2sAMy+49P8gPWikVGJwuQ3gPmYRJPe22/zVx92cMol3GQM X8WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@pqrs.dk header.s=google header.b=LADuMVCO; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y9si24169632edc.11.2021.10.17.04.50.27; Sun, 17 Oct 2021 04:50:50 -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=temperror (no key for signature) header.i=@pqrs.dk header.s=google header.b=LADuMVCO; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232244AbhJORMv (ORCPT + 99 others); Fri, 15 Oct 2021 13:12:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237927AbhJORMu (ORCPT ); Fri, 15 Oct 2021 13:12:50 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDD5FC061764 for ; Fri, 15 Oct 2021 10:10:43 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id 5so10450042edw.7 for ; Fri, 15 Oct 2021 10:10:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pqrs.dk; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zv/bK6mv5i9aibqrnGxAb4uWDtguEVNXq1Vv1S231L0=; b=LADuMVCO4xqEnY8XtfY68QPmh0j4u+jmRzAyhCsS7/cjP1R152zUQDgbrOVo2G8pQ3 rvfwlwkfbr9bPBeXVcIQDcCVFXRj+8pY0xRg172AKBcp9jiJ94ULiZXH/P8Mm6aRwpo3 6dEn7iaP5bKaRw+Chd53ENoCCnLzle36KX950= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zv/bK6mv5i9aibqrnGxAb4uWDtguEVNXq1Vv1S231L0=; b=XEPSyPOeKQW89ezHje5u7RQjg0npfhHnWnfsiseitmP+4ny4euHN5ITOWC0YLC3PKU 9wznFYG3CT27usuf1H9Lu/aMBqI7AW+JUBwbGIm2stAthwOHt6XWaqZJDEgPH2DqR6yu uO0hFCAXlW6TbkBdScVx4jKbGLsb5CIhx7SV09jHAC63eeuB+vGJSpdsnOirjNkiieaY uMeqVIRARBimJ+ffeIXyJ+ErGVKQhoDuzH2QzjyJpin7gsfncTc+dUqVUFmCmQvccsms ou+Gq0hv/3bMfVvVPFv2U/qea1xpOHDXKsM6As6t0Lzx/MXkfOjsoosEUjaf7dvLqiqY J83w== X-Gm-Message-State: AOAM530KsGskv4idoJAzP3QzTWt2Y/X/CevifwOO1mvDbIbGkxGSOiPp wNLBGzcnDA9ouC1S1UYWK82eNA== X-Received: by 2002:a05:6402:4250:: with SMTP id g16mr19339439edb.26.1634317842088; Fri, 15 Oct 2021 10:10:42 -0700 (PDT) Received: from capella.. (80.71.142.18.ipv4.parknet.dk. [80.71.142.18]) by smtp.gmail.com with ESMTPSA id jt24sm4735792ejb.59.2021.10.15.10.10.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Oct 2021 10:10:41 -0700 (PDT) From: =?UTF-8?q?Alvin=20=C5=A0ipraga?= To: Linus Walleij , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , Rob Herring , Heiner Kallweit , Russell King Cc: =?UTF-8?q?Alvin=20=C5=A0ipraga?= , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 net-next 0/7] net: dsa: add support for RTL8365MB-VC Date: Fri, 15 Oct 2021 19:10:21 +0200 Message-Id: <20211015171030.2713493-1-alvin@pqrs.dk> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alvin Šipraga This series adds support for Realtek's RTL8365MB-VC, a 4+1 port 10/100/1000M Ethernet switch. The driver - rtl8365mb - was developed by Michael Ramussen and myself. This version of the driver is relatively slim, implementing only the standalone port functionality and no offload capabilities. It is based on a previous RFC series [1] from August, and the main difference is the removal of some spurious VLAN operations. Otherwise I have simply addressed most of the feedback. Please see the respective patches for more detail. In parallel I am working on offloading the bridge layer capabilities, but I would like to get the basic stuff upstreamed as soon as possible. v2 -> v2: - move IRQ setup earlier in probe per Florian's suggestion - fix compilation error on some archs due to FIELD_PREP use in v1 - follow Jakub's suggestion and use the standard ethtool stats API; NOTE: new patch in the series for relevant DSA plumbing - following the stats change, it became apparent that the rtl8366 helper library is no longer that helpful; scrap it and implement the ethtool ops specifically for this chip v1 -> v2: - drop DSA port type checks during MAC configuration - use OF properties to configure RGMII TX/RX delay - don't set default fwd_offload_mark if packet is trapped to CPU - remove port mapping macros - update device tree bindings documentation with an example - cosmetic changes to the tagging driver using FIELD_* macros [1] https://lore.kernel.org/netdev/20210822193145.1312668-1-alvin@pqrs.dk/ Alvin Šipraga (7): ether: add EtherType for proprietary Realtek protocols net: dsa: allow reporting of standard ethtool stats for slave devices net: dsa: move NET_DSA_TAG_RTL4_A to right place in Kconfig/Makefile dt-bindings: net: dsa: realtek-smi: document new compatible rtl8365mb net: dsa: tag_rtl8_4: add realtek 8 byte protocol 4 tag net: dsa: realtek-smi: add rtl8365mb subdriver for RTL8365MB-VC net: phy: realtek: add support for RTL8365MB-VC internal PHYs .../bindings/net/dsa/realtek-smi.txt | 87 + drivers/net/dsa/Kconfig | 1 + drivers/net/dsa/Makefile | 2 +- drivers/net/dsa/realtek-smi-core.c | 4 + drivers/net/dsa/realtek-smi-core.h | 1 + drivers/net/dsa/rtl8365mb.c | 1981 +++++++++++++++++ drivers/net/phy/realtek.c | 8 + include/net/dsa.h | 8 + include/uapi/linux/if_ether.h | 1 + net/dsa/Kconfig | 20 +- net/dsa/Makefile | 3 +- net/dsa/slave.c | 34 + net/dsa/tag_rtl8_4.c | 185 ++ 13 files changed, 2326 insertions(+), 9 deletions(-) create mode 100644 drivers/net/dsa/rtl8365mb.c create mode 100644 net/dsa/tag_rtl8_4.c -- 2.32.0