From patchwork Mon Jun 3 14:42:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 1109286 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="N73+jNRh"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 45Hd7J4sdTz9s4Y for ; Tue, 4 Jun 2019 00:42:20 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729017AbfFCOmT (ORCPT ); Mon, 3 Jun 2019 10:42:19 -0400 Received: from mail-eopbgr30100.outbound.protection.outlook.com ([40.107.3.100]:11233 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727650AbfFCOmT (ORCPT ); Mon, 3 Jun 2019 10:42:19 -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=jGK5V79uVY6ivmZu7SZ5vD3+lpGxkb2rGvR55HCjek4=; b=N73+jNRhP/TQbW8d8Ptjpx1Jc73wWmtN5HsAJlGGSAHFUFr/9js1PikABUdokjc2iKRMXGKOm6nmxbBLt3Au6PE9Nyq98ogDZkviFJwEDZ+Uhh48TmNh5HDVXPgElOfopbiRbzOoLW1W18RcUc/qFHq/Q9N5D6OuSbxHc+8T87M= Received: from VI1PR10MB2639.EURPRD10.PROD.OUTLOOK.COM (20.178.126.80) by VI1PR10MB2574.EURPRD10.PROD.OUTLOOK.COM (20.178.125.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1943.22; Mon, 3 Jun 2019 14:42:11 +0000 Received: from VI1PR10MB2639.EURPRD10.PROD.OUTLOOK.COM ([fe80::8844:426d:816b:f5d5]) by VI1PR10MB2639.EURPRD10.PROD.OUTLOOK.COM ([fe80::8844:426d:816b:f5d5%6]) with mapi id 15.20.1943.018; Mon, 3 Jun 2019 14:42:11 +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 v3 00/10] net: dsa: mv88e6xxx: support for mv88e6250 Thread-Topic: [PATCH net-next v3 00/10] net: dsa: mv88e6xxx: support for mv88e6250 Thread-Index: AQHVGhqGjje/xsefAEaPf0JYGqjm9g== Date: Mon, 3 Jun 2019 14:42:11 +0000 Message-ID: <20190603144112.27713-1-rasmus.villemoes@prevas.dk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1PR0701CA0070.eurprd07.prod.outlook.com (2603:10a6:3:64::14) To VI1PR10MB2639.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:803:e1::16) 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: 7e4d5941-37d7-4963-5b80-08d6e831a924 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:VI1PR10MB2574; x-ms-traffictypediagnostic: VI1PR10MB2574: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 0057EE387C x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39850400004)(366004)(346002)(376002)(396003)(136003)(189003)(199004)(42882007)(50226002)(476003)(73956011)(66556008)(64756008)(66446008)(66476007)(81156014)(256004)(14444005)(8976002)(53936002)(72206003)(66946007)(316002)(2201001)(14454004)(99286004)(8676002)(81166006)(8936002)(71190400001)(110136005)(71200400001)(107886003)(2501003)(102836004)(2616005)(4326008)(25786009)(386003)(7736002)(52116002)(6506007)(26005)(486006)(2906002)(66066001)(36756003)(186003)(6512007)(68736007)(1076003)(74482002)(305945005)(478600001)(3846002)(5660300002)(6436002)(6116002)(44832011)(6486002)(138113003); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR10MB2574; H:VI1PR10MB2639.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: 94L/TACrio555Zl6Uw1ooOtBpWHaeWVkVjKj7mqymHDEDxD1yvA5YVdqGzvo4o7q3+59h129zzKC9PMF4ClZhwYeLY2ltrheUWUZJq0LuEG7lkVtVVMCcccRLiOpZrFY6P95sBSO/T9mQqh9SVMAL3g7oIg6DTZ9yMgEC82ko7fcmscsp/4LN7/RaFz8I/rvApdf80XJXPLWOul8aa3RN5hYWBDljDxtFgxD2ySggdjatah2eoqaVxdXOp674KIRYLQb2g3ixanZw6rZ/x0+1ueRCemTqXHcrBebhFaVJtjBXNpnnOAY1BM42S8+N5V4WLgv684mXuu57CLzNRiOlIbkh6Cm7DAeO1JVsQFXtXyXwoUbkWJpghII2m1Y/M4gJtgVqtN1NuInVVjvi5J1NAeAK6rQZSDDNqLzDikWh1Q= MIME-Version: 1.0 X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: 7e4d5941-37d7-4963-5b80-08d6e831a924 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jun 2019 14:42:11.1165 (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: VI1PR10MB2574 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. 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(-)