From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17D01C31D64 for ; Mon, 21 Jan 2019 07:11:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D9E0C217F9 for ; Mon, 21 Jan 2019 07:11:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548054711; bh=eglPkBUC4dUH/o4RIB7XjQCXOA0uzbKxEVip8CKfxU8=; h=From:To:Cc:Subject:Date:List-ID:From; b=qzv/+nZbvDUFjwv3BB6TOmgMHdca7WkCCwDTh9nDtVd26YDLM4A3Q+l15KPFU910w 8S1biQN90CjISO9M9bowRrTyfsn6jUkHssCING5l9/mYjfZ60Us6SRxd07nL+RAeHZ zr0R67bbZWBnNIG2AY0o8JVpX16/tL8Ham9Iqnq0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727539AbfAUHLu (ORCPT ); Mon, 21 Jan 2019 02:11:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:36662 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725871AbfAUHLu (ORCPT ); Mon, 21 Jan 2019 02:11:50 -0500 Received: from goober.digi.com (unknown [103.48.210.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CCAC6217F4; Mon, 21 Jan 2019 07:11:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548054709; bh=eglPkBUC4dUH/o4RIB7XjQCXOA0uzbKxEVip8CKfxU8=; h=From:To:Cc:Subject:Date:From; b=qP+DRFF1J5CYSIpjI/N1dWJELTzZBS+/BXcBpbjuAXiKrJRJ3kRYbFWAGRd9Keo82 9O5vAUQ/q0V6qZ60cWB7y1x7BTqkVXF0yo8IdfJ84fGhC+CTjArH5cRpD+kJ6aPhX8 IYYY/ISw5WSdWdWIa/vcYXsaXEPkAGKUfIcffR+0= From: gerg@kernel.org To: sean.wang@mediatek.com, bjorn@mork.no, andrew@lunn.ch, vivien.didelot@savoirfairelinux.com, f.fainelli@gmail.com, netdev@vger.kernel.org Cc: rene@vdorst.com, john@phrozen.org, neil@brown.name Subject: [PATCHv3 0/3]: net: support MT7530 switch in the MT7621 SoC Date: Mon, 21 Jan 2019 17:11:37 +1000 Message-Id: <20190121071140.23089-1-gerg@kernel.org> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This is the third version of a patch series supporting the MT7530 switch as used in the MediaTek MT7621 SoC. Unlike the MediaTek MT7623 the MT7621 is built around a dual core MIPS CPU architecture. But inside it uses basically the same 7530 switch. This series resolves all issues I had with previous versions, and I can now reliably use the driver on a 7621 SoC platform. These patches were generated against linux-5.0-rc3. The first patch enables support for the existing kernel mediatek ethernet driver on the MT7621 SoC. This support is from Bjørn Mork, with an update and fix by me. Using this driver fixed a number of problems I had (TX checksums, large RX packet drop) over the staging driver (drivers/staging/mt7621-eth). Patch 2 modifies the mt7530 DSA driver to support the 7530 switch as implemented in the Mediatek MT7621 SoC. The last patch updates the devicetree bindings to reflect the new support in the mt7530 driver. There is no real dependencies between the patches, so they can be taken independantly. Creating a new binding for the MT7621 seems like the only viable approach to distinguish between a stand alone 7530 switch, the silicon module in the MT7623 SoC and the silicon in the MT7621. Certainly the 7530 ID register in the MT7623 and MT7621 returns the same value, "0x7530001". Looking at the mt7530.c DSA driver it might make some sense to convert the existing "mediatek,mcm" binding to something like "mediatek,mt7623" to be consistent with this new MT7621 support. As far as I can tell this is the intention of this binding. Documentation/devicetree/bindings/net/dsa/mt7530.txt | 6 - drivers/net/dsa/mt7530.c | 97 +++++++++++-------- drivers/net/dsa/mt7530.h | 9 + drivers/net/ethernet/mediatek/Kconfig | 2 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 48 ++++++++- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 4 6 files changed, 118 insertions(+), 48 deletions(-) v1: initial patch series v2: rebase to linux-5.0-rc2 include mediatek ethernet driver changes use devicetree binding to identify platform v3: dropped mediatek ethernet driver auto negotiate patch change devicetree binding text as per feedback rebase onto 5.0-rc3