From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-eopbgr730114.outbound.protection.outlook.com ([40.107.73.114]:62688 "EHLO NAM05-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732197AbeIXUvY (ORCPT ); Mon, 24 Sep 2018 16:51:24 -0400 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Chris Brandt , "David S . Miller" , Sasha Levin Subject: [PATCH AUTOSEL 4.18 33/76] sh_eth: Add R7S9210 support Date: Mon, 24 Sep 2018 14:48:21 +0000 Message-ID: <20180924144751.164410-32-alexander.levin@microsoft.com> References: <20180924144751.164410-1-alexander.levin@microsoft.com> In-Reply-To: <20180924144751.164410-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Chris Brandt [ Upstream commit 6e0bb04d0e4f597d8d8f4f21401a9636f2809fd1 ] Add support for the R7S9210 which is part of the RZ/A2 series. Signed-off-by: Chris Brandt Acked-by: Rob Herring Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- .../devicetree/bindings/net/sh_eth.txt | 1 + drivers/net/ethernet/renesas/sh_eth.c | 36 +++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/Documentation/devicetree/bindings/net/sh_eth.txt b/Documentati= on/devicetree/bindings/net/sh_eth.txt index 82a4cf2c145d..a62fe3b613fc 100644 --- a/Documentation/devicetree/bindings/net/sh_eth.txt +++ b/Documentation/devicetree/bindings/net/sh_eth.txt @@ -16,6 +16,7 @@ Required properties: "renesas,ether-r8a7794" if the device is a part of R8A7794 SoC. "renesas,gether-r8a77980" if the device is a part of R8A77980 SoC. "renesas,ether-r7s72100" if the device is a part of R7S72100 SoC. + "renesas,ether-r7s9210" if the device is a part of R7S9210 SoC. "renesas,rcar-gen1-ether" for a generic R-Car Gen1 device. "renesas,rcar-gen2-ether" for a generic R-Car Gen2 or RZ/G1 device. diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/r= enesas/sh_eth.c index 5614fd231bbe..6520379b390e 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c @@ -807,6 +807,41 @@ static struct sh_eth_cpu_data r8a77980_data =3D { .magic =3D 1, .cexcr =3D 1, }; + +/* R7S9210 */ +static struct sh_eth_cpu_data r7s9210_data =3D { + .soft_reset =3D sh_eth_soft_reset, + + .set_duplex =3D sh_eth_set_duplex, + .set_rate =3D sh_eth_set_rate_rcar, + + .register_type =3D SH_ETH_REG_FAST_SH4, + + .edtrr_trns =3D EDTRR_TRNS_ETHER, + .ecsr_value =3D ECSR_ICD, + .ecsipr_value =3D ECSIPR_ICDIP, + .eesipr_value =3D EESIPR_TWBIP | EESIPR_TABTIP | EESIPR_RABTIP | + EESIPR_RFCOFIP | EESIPR_ECIIP | EESIPR_FTCIP | + EESIPR_TDEIP | EESIPR_TFUFIP | EESIPR_FRIP | + EESIPR_RDEIP | EESIPR_RFOFIP | EESIPR_CNDIP | + EESIPR_DLCIP | EESIPR_CDIP | EESIPR_TROIP | + EESIPR_RMAFIP | EESIPR_RRFIP | EESIPR_RTLFIP | + EESIPR_RTSFIP | EESIPR_PREIP | EESIPR_CERFIP, + + .tx_check =3D EESR_FTC | EESR_CND | EESR_DLC | EESR_CD | EESR_TRO, + .eesr_err_check =3D EESR_TWB | EESR_TABT | EESR_RABT | EESR_RFE | + EESR_RDE | EESR_RFRMER | EESR_TFE | EESR_TDE, + + .fdr_value =3D 0x0000070f, + + .apr =3D 1, + .mpr =3D 1, + .tpauser =3D 1, + .hw_swap =3D 1, + .rpadir =3D 1, + .no_ade =3D 1, + .xdfar_rw =3D 1, +}; #endif /* CONFIG_OF */ =20 static void sh_eth_set_rate_sh7724(struct net_device *ndev) @@ -3131,6 +3166,7 @@ static const struct of_device_id sh_eth_match_table[]= =3D { { .compatible =3D "renesas,ether-r8a7794", .data =3D &rcar_gen2_data }, { .compatible =3D "renesas,gether-r8a77980", .data =3D &r8a77980_data }, { .compatible =3D "renesas,ether-r7s72100", .data =3D &r7s72100_data }, + { .compatible =3D "renesas,ether-r7s9210", .data =3D &r7s9210_data }, { .compatible =3D "renesas,rcar-gen1-ether", .data =3D &rcar_gen1_data }, { .compatible =3D "renesas,rcar-gen2-ether", .data =3D &rcar_gen2_data }, { } --=20 2.17.1