From patchwork Tue Jan 23 13:50:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Schenker X-Patchwork-Id: 190960 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp344264dyi; Tue, 23 Jan 2024 05:51:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IF4olnb6k8b4fE2E7K9dMPuLoXRNQ2YCb/li8JIk4v+lNodvO+3aytIDBtGdbXsMcQPHvia X-Received: by 2002:a05:620a:390e:b0:783:250e:5293 with SMTP id qr14-20020a05620a390e00b00783250e5293mr9090272qkn.69.1706017874820; Tue, 23 Jan 2024 05:51:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706017874; cv=pass; d=google.com; s=arc-20160816; b=f5K2qoXxE89AQVBwJ18yzdWmUs+GfvaO73AeWS6J7Z8nBgVdaQ4u6QNLmd5yLtDKiQ +BX2g2nnE6l96W5qvfnhf7409pRggzhbroapCULblZcQShUFJo/CoaxhF73qqXahAuY7 TjLqNbQqd2XxmQ7V5P6Qq2cJQFFMgGDA1liJvlwpvgUVBMXFakUVJX2ANYq5W7Ez0/3Y reI3FGysupUjwSZgSHknjaaInoWmwUp2CLmmW4MJo+ZmIJLwf3lfFq6EzXOKnDTzItmQ LbWGauYpV7Kn5TKtZbslRrdGNRzSPNcK0IHoWeVjh/KEq7PG3YsthP186IF3gjcguJ8G VGfA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=5SZPWrK2zDvha3kIIJ78FBklNy8z55ZM1wrstwV/jHM=; fh=NEpxFbP2j5kGOOtfV1SEiXMb6DJz9cRbxzNXB+sEhuo=; b=KYHMUdN6AeunlT9/yXwNh2P1lFxxPM8k9TdgxbZOl1zz67HsZ6+ettHnjKGy9YUPYo VIc0NpwIv/K+IAYd5UTBsYQBtXxx1+GDV+/vz9UIxH8MlPz+pOvDmTsI0rHLoyGMqdWR 8Wm2wBe7HLDTefPseoty/GuLIBkTmci43MyUQKxag+83Lbziki4vq9JrsRldoc0XnbOQ SKuSMLs6z9l9Xs3kpxQ7rJAAELw6QATHe+mZ+GpTUWpqTnx1b9YHHeqh1tLeossxV+Ra P0l5VXKjjblnJOpsYqjAJrSnLa+4tyZ10VbQ0VqVisDwQShx+alJ/kNzZ+Z4dYsj+ySU ohIA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@pschenker.ch header.s=20220412 header.b=LsdP6EjA; 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-35403-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35403-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=pschenker.ch Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id pi38-20020a05620a37a600b00783aad8181fsi1318817qkn.233.2024.01.23.05.51.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 05:51:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35403-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@pschenker.ch header.s=20220412 header.b=LsdP6EjA; 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-35403-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35403-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 995E81C20F4A for ; Tue, 23 Jan 2024 13:51:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D5FC05FB9E; Tue, 23 Jan 2024 13:50:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=pschenker.ch header.i=@pschenker.ch header.b="LsdP6EjA" Received: from smtp-8fa8.mail.infomaniak.ch (smtp-8fa8.mail.infomaniak.ch [83.166.143.168]) (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 32EDD5F545 for ; Tue, 23 Jan 2024 13:50:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=83.166.143.168 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706017829; cv=none; b=oSMfRhrwTqQIOsHqAFm+Ax9qwbyF2HXIKvdTd1KlnO1orobn8ALt4BV/CDipIBVGhuQiAYfZrruseBXrYk1PYCVqRB/j/MJxta3tpCoJswHqbC9TPi0TGtVm654xaWv0/GhqWLiqb3MIoIQhNAEaHJZFulXIH+f29aLwaoJifH4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706017829; c=relaxed/simple; bh=LjhC1jDaXjp11zwHWnmEkccOYnM+1J/uiTXo3eT0lfI=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=AXeQhcjqEKSRAEv2fcyix/x+wQ1iM86mBN3kCO9Gf7nLGJSiNuiFM+1tzkim5wBRJdJu9AODMF9IwEJmdaLu7LpE3kfFN5bHx6nyMbEPBENQcReHRl6kSptSAE7CfmGo1Rj3k6HX/EHv66iJ/DRlBN7K1FZuaygDCxjq1UOJBnU= 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=LsdP6EjA; arc=none smtp.client-ip=83.166.143.168 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-0001.mail.infomaniak.ch (unknown [10.4.36.108]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4TK7kz23cLzMpvZR; Tue, 23 Jan 2024 14:50:19 +0100 (CET) Received: from unknown by smtp-3-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4TK7ky1Ds2zMppBZ; Tue, 23 Jan 2024 14:50:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pschenker.ch; s=20220412; t=1706017819; bh=LjhC1jDaXjp11zwHWnmEkccOYnM+1J/uiTXo3eT0lfI=; h=From:To:Cc:Subject:Date:From; b=LsdP6EjAqB46MQ8ZQkcFvTTgfsAgYFPC3amz7zJRhFaGiicuvD/a3YCx/Qqx+yVeK 5T0XYHSPS/EJaJujI1wpp1nLx5laTQn5VoK+2AXEnyqGjWfJo+nKo2QHJqfTOaFIL7 HwL5Wzc7etOlm+vnsh6zrM1yl7OyornibrS5itWs= From: Philippe Schenker To: netdev@vger.kernel.org Cc: 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 , Philippe Schenker Subject: [PATCH net-next v1 1/2] dt-bindings: net: dsa: Add KSZ8567 switch support Date: Tue, 23 Jan 2024 14:50:13 +0100 Message-Id: <20240123135014.614858-1-dev@pschenker.ch> X-Mailer: git-send-email 2.34.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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788889398905726915 X-GMAIL-MSGID: 1788889398905726915 From: Philippe Schenker 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. Signed-off-by: Philippe Schenker Acked-by: Conor Dooley --- Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml b/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml index c963dc09e8e1..52acc15ebcbf 100644 --- a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml +++ b/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml @@ -31,6 +31,7 @@ properties: - microchip,ksz9893 - microchip,ksz9563 - microchip,ksz8563 + - microchip,ksz8567 reset-gpios: description: From patchwork Tue Jan 23 13:50:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Schenker X-Patchwork-Id: 190959 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp344088dyi; Tue, 23 Jan 2024 05:50:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IEFXqE9R5uEcLxiELcz0BFBEvC/kW+exHYrB6MdwrXvSIrFwQt61vVM4upoG3AJvw5bu8RK X-Received: by 2002:a05:620a:898:b0:783:aebc:35f3 with SMTP id b24-20020a05620a089800b00783aebc35f3mr442294qka.80.1706017857239; Tue, 23 Jan 2024 05:50:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706017857; cv=pass; d=google.com; s=arc-20160816; b=pf/MBN5S42Ye2yjeVbBi4nfWJiBowtG1D6BrxRdVqEdSmd7MyopqexSZDlsQ+v1Ty9 iZYP556SDRb+iA/UedEC7nlN01b3Ehbh3zumwNWSXnxB+LkguuF64ROpaHxof+GSeFoi /ggybICSn7dpK+myWWaZiSr/qzzx58Mw4XAeI76SLdFTXS/ijlKpF/rx9hDGBfxcwkcK F0yOBGDUzSDNDcyYZn/fgdPspVM1PgL66ddgnFkYldnIDqJKt1R6hOoWjfvXL6GiY17M f7g0K3QFaWjgcA5X/rIgWxbKv2ZXFgUSc09Tk7tjWiWqhcgKNNymb2bxO/8ylOpQTXtt IixQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=0IEW0g+eGVDAsbEvR7ZsK7I8wwKHVmF9ApivXf07cxQ=; fh=NEpxFbP2j5kGOOtfV1SEiXMb6DJz9cRbxzNXB+sEhuo=; b=hgCgs5GWalnPGgS9ML/zUADctkIgXlcE3QOqqhLYtOLQgXl5giuerlJUseUh7BRii1 1ekI1RvnPSddfXnjtzWYvZBmO9gUzt7K8bvkUk2MPWfEwNIs1eqDo9Wcprdmyw2UD7sZ CqLICUUQVS5R+rXzPqrFBO2mD5xP9wiisEcVgTcMkljZiN3IUzSnnb4XAVEzJtWd9Gks K1jmYnf8JOFq7hnWTdW0S2FcjIQmyQqFlwNkwXC7gJ4ZARniNcgtmjGlg0UyHiI8up52 WOBgCH5lC6Ac/GUoWho/u5AAgpwswXvGtjdOs5wWyNN4oPKrN2lgF9l0l0TfvPHI4urP IaGw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@pschenker.ch header.s=20220412 header.b=bPMqBnpz; 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-35402-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35402-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=pschenker.ch Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c6-20020ae9e206000000b007832a1c1451si7978264qkc.25.2024.01.23.05.50.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 05:50:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35402-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@pschenker.ch header.s=20220412 header.b=bPMqBnpz; 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-35402-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35402-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 531921C20E11 for ; Tue, 23 Jan 2024 13:50:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9129E5F86B; Tue, 23 Jan 2024 13:50:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=pschenker.ch header.i=@pschenker.ch header.b="bPMqBnpz" Received: from smtp-8fae.mail.infomaniak.ch (smtp-8fae.mail.infomaniak.ch [83.166.143.174]) (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 D63975F55A for ; Tue, 23 Jan 2024 13:50:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=83.166.143.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706017827; cv=none; b=AZoLkRl1iClOOQ5CsV0d+o2RfXU/Q6v/i/q61PXglt0eDv6YuLhUVCBaOUs0g/flRwx8sBOdgEI1pwnoAgBKIUpPFHMa9HLeRJYNDbd5zzTxfuJFi+DAop86l0UQq7SPtacr5+S0Ne8qMsLcwVr6nnKrphj0V42kZoG0hVPAdOI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706017827; c=relaxed/simple; bh=+q/tYEcIVTExKnWzMTwhtlDg9ZknBc4T0oiIo10zzGY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Oi+BU5NLxiOzgmKq6hSLzKEinT1KgmyCfXoJQsiVPqb0lYMoWuXh8iABLsulVyFyIA0/jdJ35JpR3UHQPjrD7nO7pkejVpx7YUP+kx3jS7CbQQ74HpMkrbyBRByGVDoTy4wJJGR6iJdGIvYZFJABGzv7WtuQgzkSiqBp3GOzEnI= 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=bPMqBnpz; arc=none smtp.client-ip=83.166.143.174 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-0001.mail.infomaniak.ch (unknown [10.4.36.108]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4TK7l039CCzMq1N5; Tue, 23 Jan 2024 14:50:20 +0100 (CET) Received: from unknown by smtp-3-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4TK7kz4WkvzMppBk; Tue, 23 Jan 2024 14:50:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pschenker.ch; s=20220412; t=1706017820; bh=+q/tYEcIVTExKnWzMTwhtlDg9ZknBc4T0oiIo10zzGY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bPMqBnpzFFq0nHUd5n3DB8GbbU9QtVQ5oVk802ATafHT4iK49wowRj0zRphKAGnS6 dvj+8DPViTvRnsmuT8N2jT7Za0H9qs/8ufomhQwRjGgP4GmhUyQ+j2OX8PTOp8UvW+ bmKAMMpzD/3UzJ6gKIshZ6WugdZp+0cetnaxBfr4= From: Philippe Schenker To: netdev@vger.kernel.org Cc: 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 , Philippe Schenker Subject: [PATCH net-next v1 2/2] net: dsa: Add KSZ8567 switch support Date: Tue, 23 Jan 2024 14:50:14 +0100 Message-Id: <20240123135014.614858-2-dev@pschenker.ch> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240123135014.614858-1-dev@pschenker.ch> References: <20240123135014.614858-1-dev@pschenker.ch> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Infomaniak-Routing: alpha X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788889380562167696 X-GMAIL-MSGID: 1788889380562167696 From: Philippe Schenker This commit introduces support for the 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. Signed-off-by: Philippe Schenker --- drivers/net/dsa/microchip/ksz9477_i2c.c | 4 ++ drivers/net/dsa/microchip/ksz_common.c | 42 ++++++++++++++++++++- drivers/net/dsa/microchip/ksz_common.h | 1 + drivers/net/dsa/microchip/ksz_spi.c | 5 +++ include/linux/platform_data/microchip-ksz.h | 1 + 5 files changed, 52 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/microchip/ksz9477_i2c.c b/drivers/net/dsa/microchip/ksz9477_i2c.c index cac4a607e54a..82bebee4615c 100644 --- a/drivers/net/dsa/microchip/ksz9477_i2c.c +++ b/drivers/net/dsa/microchip/ksz9477_i2c.c @@ -103,6 +103,10 @@ static const struct of_device_id ksz9477_dt_ids[] = { .compatible = "microchip,ksz8563", .data = &ksz_switch_chips[KSZ8563] }, + { + .compatible = "microchip,ksz8567", + .data = &ksz_switch_chips[KSZ8567] + }, { .compatible = "microchip,ksz9567", .data = &ksz_switch_chips[KSZ9567] diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c index 245dfb7a7a31..9b96de86dfc8 100644 --- a/drivers/net/dsa/microchip/ksz_common.c +++ b/drivers/net/dsa/microchip/ksz_common.c @@ -1214,6 +1214,38 @@ const struct ksz_chip_data ksz_switch_chips[] = { .rd_table = &ksz8563_register_set, }, + [KSZ8567] = { + .chip_id = KSZ8567_CHIP_ID, + .dev_name = "KSZ8567", + .num_vlans = 4096, + .num_alus = 4096, + .num_statics = 16, + .cpu_ports = 0x7F, /* can be configured as cpu port */ + .port_cnt = 7, /* total port count */ + .port_nirqs = 3, + .num_tx_queues = 4, + .tc_cbs_supported = true, + .tc_ets_supported = true, + .ops = &ksz9477_dev_ops, + .mib_names = ksz9477_mib_names, + .mib_cnt = ARRAY_SIZE(ksz9477_mib_names), + .reg_mib_cnt = MIB_COUNTER_NUM, + .regs = ksz9477_regs, + .masks = ksz9477_masks, + .shifts = ksz9477_shifts, + .xmii_ctrl0 = ksz9477_xmii_ctrl0, + .xmii_ctrl1 = ksz9477_xmii_ctrl1, + .supports_mii = {false, false, false, false, + false, true, true}, + .supports_rmii = {false, false, false, false, + false, true, true}, + .supports_rgmii = {false, false, false, false, + false, true, true}, + .internal_phy = {true, true, true, true, + true, false, false}, + .gbit_capable = {false, false, false, false, false, true, true}, + }, + [KSZ8795] = { .chip_id = KSZ8795_CHIP_ID, .dev_name = "KSZ8795", @@ -2649,6 +2681,7 @@ static void ksz_port_teardown(struct dsa_switch *ds, int port) switch (dev->chip_id) { case KSZ8563_CHIP_ID: + case KSZ8567_CHIP_ID: case KSZ9477_CHIP_ID: case KSZ9563_CHIP_ID: case KSZ9567_CHIP_ID: @@ -2705,7 +2738,8 @@ static enum dsa_tag_protocol ksz_get_tag_protocol(struct dsa_switch *ds, dev->chip_id == KSZ9563_CHIP_ID) proto = DSA_TAG_PROTO_KSZ9893; - if (dev->chip_id == KSZ9477_CHIP_ID || + if (dev->chip_id == KSZ8567_CHIP_ID || + dev->chip_id == KSZ9477_CHIP_ID || dev->chip_id == KSZ9896_CHIP_ID || dev->chip_id == KSZ9897_CHIP_ID || dev->chip_id == KSZ9567_CHIP_ID) @@ -2813,6 +2847,7 @@ static int ksz_max_mtu(struct dsa_switch *ds, int port) case KSZ8830_CHIP_ID: return KSZ8863_HUGE_PACKET_SIZE - VLAN_ETH_HLEN - ETH_FCS_LEN; case KSZ8563_CHIP_ID: + case KSZ8567_CHIP_ID: case KSZ9477_CHIP_ID: case KSZ9563_CHIP_ID: case KSZ9567_CHIP_ID: @@ -2839,6 +2874,7 @@ static int ksz_validate_eee(struct dsa_switch *ds, int port) switch (dev->chip_id) { case KSZ8563_CHIP_ID: + case KSZ8567_CHIP_ID: case KSZ9477_CHIP_ID: case KSZ9563_CHIP_ID: case KSZ9567_CHIP_ID: @@ -3183,6 +3219,7 @@ static int ksz_switch_detect(struct ksz_device *dev) case KSZ9896_CHIP_ID: case KSZ9897_CHIP_ID: case KSZ9567_CHIP_ID: + case KSZ8567_CHIP_ID: case LAN9370_CHIP_ID: case LAN9371_CHIP_ID: case LAN9372_CHIP_ID: @@ -3220,6 +3257,7 @@ static int ksz_cls_flower_add(struct dsa_switch *ds, int port, switch (dev->chip_id) { case KSZ8563_CHIP_ID: + case KSZ8567_CHIP_ID: case KSZ9477_CHIP_ID: case KSZ9563_CHIP_ID: case KSZ9567_CHIP_ID: @@ -3239,6 +3277,7 @@ static int ksz_cls_flower_del(struct dsa_switch *ds, int port, switch (dev->chip_id) { case KSZ8563_CHIP_ID: + case KSZ8567_CHIP_ID: case KSZ9477_CHIP_ID: case KSZ9563_CHIP_ID: case KSZ9567_CHIP_ID: @@ -4142,6 +4181,7 @@ static int ksz_parse_drive_strength(struct ksz_device *dev) case KSZ8794_CHIP_ID: case KSZ8765_CHIP_ID: case KSZ8563_CHIP_ID: + case KSZ8567_CHIP_ID: case KSZ9477_CHIP_ID: case KSZ9563_CHIP_ID: case KSZ9567_CHIP_ID: diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h index 15612101a155..060c5de9aa05 100644 --- a/drivers/net/dsa/microchip/ksz_common.h +++ b/drivers/net/dsa/microchip/ksz_common.h @@ -187,6 +187,7 @@ struct ksz_device { /* List of supported models */ enum ksz_model { KSZ8563, + KSZ8567, KSZ8795, KSZ8794, KSZ8765, diff --git a/drivers/net/dsa/microchip/ksz_spi.c b/drivers/net/dsa/microchip/ksz_spi.c index 6f6d878e742c..c8166fb440ab 100644 --- a/drivers/net/dsa/microchip/ksz_spi.c +++ b/drivers/net/dsa/microchip/ksz_spi.c @@ -164,6 +164,10 @@ static const struct of_device_id ksz_dt_ids[] = { .compatible = "microchip,ksz8563", .data = &ksz_switch_chips[KSZ8563] }, + { + .compatible = "microchip,ksz8567", + .data = &ksz_switch_chips[KSZ8567] + }, { .compatible = "microchip,ksz9567", .data = &ksz_switch_chips[KSZ9567] @@ -204,6 +208,7 @@ static const struct spi_device_id ksz_spi_ids[] = { { "ksz9893" }, { "ksz9563" }, { "ksz8563" }, + { "ksz8567" }, { "ksz9567" }, { "lan9370" }, { "lan9371" }, diff --git a/include/linux/platform_data/microchip-ksz.h b/include/linux/platform_data/microchip-ksz.h index f177416635a2..c4466e56d9d7 100644 --- a/include/linux/platform_data/microchip-ksz.h +++ b/include/linux/platform_data/microchip-ksz.h @@ -24,6 +24,7 @@ enum ksz_chip_id { KSZ8563_CHIP_ID = 0x8563, + KSZ8567_CHIP_ID = 0x00856700, KSZ8795_CHIP_ID = 0x8795, KSZ8794_CHIP_ID = 0x8794, KSZ8765_CHIP_ID = 0x8765,