From patchwork Tue Jun 4 07:34:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 1109668 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=prevas.dk Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=prevas.se header.i=@prevas.se header.b="iqgIOjvV"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 45J3c83Lz9z9s4Y for ; Tue, 4 Jun 2019 17:35:20 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727047AbfFDHfM (ORCPT ); Tue, 4 Jun 2019 03:35:12 -0400 Received: from mail-eopbgr50125.outbound.protection.outlook.com ([40.107.5.125]:15586 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726719AbfFDHfK (ORCPT ); Tue, 4 Jun 2019 03:35:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.se; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/6BHss+HZx9fDVHZ//L79DuH6RnqEY4+s8IE+pQ1cz4=; b=iqgIOjvVtcoHHkcjyqHe4hz3jvoi8f+bjda2ATNncOTRvL/3onEY1mDmL69vCW1X2U0RpMTymvAzADl2gwaoBxxK0YMDd+WUTA+fut7ECjLcVClmaxfJrm19xDx0ot5TUEJEG5l5aALwGYi17w561c474OF75eBozqlTDJecrw4= Received: from DB8PR10MB2634.EURPRD10.PROD.OUTLOOK.COM (20.179.10.220) by DB8PR10MB3435.EURPRD10.PROD.OUTLOOK.COM (10.255.17.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1965.12; Tue, 4 Jun 2019 07:34:22 +0000 Received: from DB8PR10MB2634.EURPRD10.PROD.OUTLOOK.COM ([fe80::a0b0:f05d:f1e:2d5b]) by DB8PR10MB2634.EURPRD10.PROD.OUTLOOK.COM ([fe80::a0b0:f05d:f1e:2d5b%4]) with mapi id 15.20.1943.018; Tue, 4 Jun 2019 07:34:22 +0000 From: Rasmus Villemoes To: Andrew Lunn , Vivien Didelot , Florian Fainelli , "David S. Miller" , Rob Herring , Mark Rutland , "netdev@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Rasmus Villemoes Subject: [PATCH net-next v4 00/10] net: dsa: mv88e6xxx: support for mv88e6250 Thread-Topic: [PATCH net-next v4 00/10] net: dsa: mv88e6xxx: support for mv88e6250 Thread-Index: AQHVGqftsl1YP7nTFUS4ZaU4A3wHoQ== Date: Tue, 4 Jun 2019 07:34:22 +0000 Message-ID: <20190604073412.21743-1-rasmus.villemoes@prevas.dk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM6PR03CA0030.eurprd03.prod.outlook.com (2603:10a6:20b::43) To DB8PR10MB2634.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:ab::28) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Rasmus.Villemoes@prevas.se; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.20.1 x-originating-ip: [81.216.59.226] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8a8587a7-f6f0-4410-74a2-08d6e8bf0fc8 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600148)(711020)(4605104)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:DB8PR10MB3435; x-ms-traffictypediagnostic: DB8PR10MB3435: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 0058ABBBC7 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(366004)(376002)(136003)(39850400004)(396003)(189003)(199004)(5660300002)(66446008)(73956011)(2501003)(66476007)(66556008)(66946007)(64756008)(99286004)(66066001)(386003)(6506007)(8976002)(52116002)(110136005)(316002)(7736002)(305945005)(81166006)(81156014)(8676002)(8936002)(476003)(74482002)(486006)(2616005)(256004)(44832011)(14444005)(186003)(42882007)(71190400001)(1076003)(102836004)(71200400001)(50226002)(6436002)(26005)(36756003)(478600001)(25786009)(6486002)(68736007)(6116002)(3846002)(53936002)(2906002)(6512007)(2201001)(72206003)(107886003)(14454004)(4326008)(138113003); DIR:OUT; SFP:1102; SCL:1; SRVR:DB8PR10MB3435; H:DB8PR10MB2634.EURPRD10.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: prevas.se does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: j4b7QEF7sa4TTgvnkfMGO/au8rM9v6MRKVbrO7oOnqxMqHGmf1w6g3rtDgi0/o6TaJKW1nBZhCIH424BtQo5QZrg75Yp1VoOwR//37PcsR/yRioR1rYx/1rQ6EexP5t3rLo0MALs2FjG3o6AJhKV1oUyIknjk1ZDpnspG9up8mxoXXF/0XFuGpYIE4jHW59ba//RSWfpXoB2dpnsvX1DEkyEM0UC8JgtpYY8X2Ujw3kk68DUvGKBRam6OP/MqLDrLm26c0T1JhcDyqh7IMvqopSj5PrRCfBAUmKRUNKrY1nLAwGn9Y/VLqgNwnT5dE31vdyt0vOHUUOD9YGifQkgLpoG8DyWEcOc1JNgtEdyd4/b3T2m+Ch5aiRCxfMcKPoG1C3JC9L+e+/ccGB/qV+5qVtuEkYVpe8dpyStbfpMSTU= MIME-Version: 1.0 X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: 8a8587a7-f6f0-4410-74a2-08d6e8bf0fc8 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2019 07:34:22.3994 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Rasmus.Villemoes@prevas.dk X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR10MB3435 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This adds support for the mv88e6250 chip. Initially based on the mv88e6240, this time around, I've been through each ->ops callback and checked that it makes sense, either replacing with a 6250 specific variant or dropping it if no equivalent functionality seems to exist for the 6250. Along the way, I found a few oddities in the existing code, mostly sent as separate patches/questions. The one relevant to the 6250 is the ieee_pri_map callback, where the existing mv88e6085_g1_ieee_pri_map() is actually wrong for many of the existing users. I've put the mv88e6250_g1_ieee_pri_map() patch first in case some of the existing chips get switched over to use that and it is deemed important enough for -stable. v4: - fix style issue in 1/10 - add Andrew's reviewed-by to 1,6,7,8,9,10. v3: - rebase on top of net-next/master - add reviewed-bys to patches unchanged from v2 (2,3,4,5) - add 6250-specific ->ieee_pri_map, ->port_set_speed, ->port_link_state (1,6,7) - in addition, use mv88e6065_phylink_validate for ->phylink_validate, and don't implement ->port_get_cmode, ->port_set_jumbo_size, ->port_disable_learn_limit, ->rmu_disable - drop ptp support - add patch adding the compatible string to the DT binding (9) - add small refactoring patch (10) v2: - rebase on top of net-next/master - add reviewed-by to two patches unchanged from v1 (2,3) - add separate watchdog_ops Rasmus Villemoes (10): net: dsa: mv88e6xxx: add mv88e6250_g1_ieee_pri_map net: dsa: mv88e6xxx: introduce support for two chips using direct smi addressing net: dsa: mv88e6xxx: prepare mv88e6xxx_g1_atu_op() for the mv88e6250 net: dsa: mv88e6xxx: implement vtu_getnext and vtu_loadpurge for mv88e6250 net: dsa: mv88e6xxx: implement watchdog_ops for mv88e6250 net: dsa: mv88e6xxx: implement port_set_speed for mv88e6250 net: dsa: mv88e6xxx: implement port_link_state for mv88e6250 net: dsa: mv88e6xxx: add support for mv88e6250 dt-bindings: net: dsa: marvell: add "marvell,mv88e6250" compatible string net: dsa: mv88e6xxx: refactor mv88e6352_g1_reset .../devicetree/bindings/net/dsa/marvell.txt | 7 +- drivers/net/dsa/mv88e6xxx/chip.c | 81 +++++++++++++++++++ drivers/net/dsa/mv88e6xxx/chip.h | 8 ++ drivers/net/dsa/mv88e6xxx/global1.c | 17 +++- drivers/net/dsa/mv88e6xxx/global1.h | 7 ++ drivers/net/dsa/mv88e6xxx/global1_atu.c | 5 +- drivers/net/dsa/mv88e6xxx/global1_vtu.c | 58 +++++++++++++ drivers/net/dsa/mv88e6xxx/global2.c | 26 ++++++ drivers/net/dsa/mv88e6xxx/global2.h | 14 ++++ drivers/net/dsa/mv88e6xxx/port.c | 77 ++++++++++++++++++ drivers/net/dsa/mv88e6xxx/port.h | 14 ++++ drivers/net/dsa/mv88e6xxx/smi.c | 25 +++++- 12 files changed, 333 insertions(+), 6 deletions(-)