From patchwork Mon May 25 07:09:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Duan X-Patchwork-Id: 200076 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=-7.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY, 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 A81F1C433E0 for ; Mon, 25 May 2020 07:14:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7F5AA2071A for ; Mon, 25 May 2020 07:14:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="mmKwhY8D" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389028AbgEYHOe (ORCPT ); Mon, 25 May 2020 03:14:34 -0400 Received: from mail-eopbgr70053.outbound.protection.outlook.com ([40.107.7.53]:1606 "EHLO EUR04-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388932AbgEYHOd (ORCPT ); Mon, 25 May 2020 03:14:33 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=moD6U0DEaSy52PebIwxQxVQRx3qNkrqdng4GYrq3+EiFlkro/t/kcPV8532/HrX3KaW5qOEIwAakgu83OMzPI8X+3yv13S6IM3FISxlfsLY8CWHdmv1Z4dqXi99qsQXlIz/RCM929yVh3tnNwrebOXNZ4IANlA75vzB3XCzlNQ8852FcMb+k0PiL0N1EevUwz3/Kl4mPWV4CQ/9zwyvoCoxbnpjK+1Grmg1fIMQh6bWBHhYM6Dqh3zXAdOUH0cXMH8CtXkKKyhn/9syA69L/BUQyxfMHDb60/4WxPn3uWgf5cT8I/3NkoUC6DxJMZ2ftHnDczyps4UY4JnLWdGK9pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Dk/r10oOGlggvwxNm1mFwelto6OD56anTW2eXX7sszY=; b=B8f2u0dGbBJkBEQ0FRyLGigcm/x4gbQXU37gFZ54mVjljOXctzlh/dQVuYu6zIoNlGM8HGD5m2lq3KI5Jh0vgwFj4jkDPcKyDcVEOMy9e7NIu0cB+5Btup6+jGJ5WxaGsgPrDkB0KFF+DqwJYAeMtp7nEAJJq0N7ZxxT7MvekN4If1gwxYzE7/zMU4NstqBaOQwl0r9KeEtbodx3kyF7AHoZrooUeolfDGb+qT8AAJH99Eii2NEzeLj0IqaMqr9drfKFUtNiwz/C9sGQCzaGPrOudmHRGts7iFF9cKEJ549fqFLr3P7H6EFV+p3koyZCwC8Ty9wseMphOCZr5JJM+g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Dk/r10oOGlggvwxNm1mFwelto6OD56anTW2eXX7sszY=; b=mmKwhY8DtZMTZS1Mx784BOyGqE0fEFnb9fTtDBbCKJXJDNdXEx/o636LqCrG9E7vlraD0f2feBaRRO05Ybuzl6dsnULE8/P9nvWkr+/XB//2eCXLWhixj7kb8kysxKtBOcLBOz4Rd+qe0/vKbycwCF5qV7s0FMrN49+xxpqi+Hg= Authentication-Results: lunn.ch; dkim=none (message not signed) header.d=none;lunn.ch; dmarc=none action=none header.from=nxp.com; Received: from AM6PR0402MB3607.eurprd04.prod.outlook.com (2603:10a6:209:12::18) by AM6PR0402MB3735.eurprd04.prod.outlook.com (2603:10a6:209:1a::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.27; Mon, 25 May 2020 07:14:18 +0000 Received: from AM6PR0402MB3607.eurprd04.prod.outlook.com ([fe80::35f8:f020:9b47:9aa1]) by AM6PR0402MB3607.eurprd04.prod.outlook.com ([fe80::35f8:f020:9b47:9aa1%7]) with mapi id 15.20.3021.029; Mon, 25 May 2020 07:14:18 +0000 From: fugang.duan@nxp.com To: andrew@lunn.ch, martin.fuzzey@flowbird.group, davem@davemloft.net Cc: netdev@vger.kernel.org, robh+dt@kernel.org, shawnguo@kernel.org, devicetree@vger.kernel.org, kuba@kernel.org, fugang.duan@nxp.com Subject: [PATCH net v2 1/4] net: ethernet: fec: move GPR register offset and bit into DT Date: Mon, 25 May 2020 15:09:26 +0800 Message-Id: <1590390569-4394-2-git-send-email-fugang.duan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1590390569-4394-1-git-send-email-fugang.duan@nxp.com> References: <1590390569-4394-1-git-send-email-fugang.duan@nxp.com> X-ClientProxiedBy: SG2PR06CA0213.apcprd06.prod.outlook.com (2603:1096:4:68::21) To AM6PR0402MB3607.eurprd04.prod.outlook.com (2603:10a6:209:12::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from b38611.ap.freescale.net (119.31.174.66) by SG2PR06CA0213.apcprd06.prod.outlook.com (2603:1096:4:68::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3021.23 via Frontend Transport; Mon, 25 May 2020 07:14:15 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 84bbd32c-7867-4323-0b40-08d8007b3d55 X-MS-TrafficTypeDiagnostic: AM6PR0402MB3735: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2000; X-Forefront-PRVS: 0414DF926F X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vq87qQQp4wn+QEV8Z+XXWtgj0C+aGSl657Fj2pwY01N1AvNr22D7iAHhnxjpklECJvSieVDG7p9dROJI900VM74OQk36TL3PEQGX9XkSfvRMRo+naMS97rGEgk9YVxiY2JgyZHE0GzVAP32pxiAAlJ1ARlv4YJf5WtdO6t1AQvL+WNu6I+Pml1o4mARXwlhkUjOJb9yoik5ZcL4hG+oRqux3bRJyh0Vgrfl/mol+YZlzEJ+RxVsO7CHYnw1NQ/o9d7rmM6NSpA5lDuTCF4DzQhjT2XA4i8DF+WrHhcTU9H/VVejBUDHcs3MNqgOB9qsN X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR0402MB3607.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(396003)(39860400002)(136003)(346002)(376002)(366004)(316002)(956004)(2616005)(66476007)(52116002)(6506007)(66556008)(66946007)(86362001)(36756003)(26005)(5660300002)(6486002)(16526019)(186003)(6512007)(2906002)(8676002)(9686003)(478600001)(8936002)(4326008)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: gbmvivzRwQz1LZkfmPbDk5tfpmWX8adzkVZx25LBlFx9kT3XDeBTnexFi4iLs5W3C2bA+FM9tPy1HOM6uGr2MNOlZTZMdqJ6KBX6jVN8tdlvIBpeR3RM//v9VaLudlOraFyMHdN/wnYcRMd6alVRcyZy6J/uBhX42iO3mEdA70rP7mfakr+jO6zPlaMpSXpmbAIhEMpRiPjX5g022GxGXln+l3NbG5hpd6RqCgKWP6bZfeIlE8aRqJZOwuroPaFhEIYX0kVxEMwcoTilX8P3Ey5qRCw3jMMDq8rpJANJyf8nVlOlGiUsiDwTwsvS6SW7SWlbQH3nSkdtVQOK+60JdgS39oNop/yCkrxbxgiX5upHfPvaqAP0/ojE1QqD3kWE6GJsshMmG3DVRrvvWGYT3OjgZUKQaw1I+Gbg1fL4lmnZ1+93+oz9Kl4Nd+et/av7uAn4yiHfcHKGPc3mDyNIlcNCxdNPe5+/hAvz+sLFkjI= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 84bbd32c-7867-4323-0b40-08d8007b3d55 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2020 07:14:18.6434 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: E+FxINdAT4q+9WTYZoPr+fuvQEBN/Jgr3m9uYOrpJFj2vSHGX4t9+C8nR8CVLeTz8FyJg54TPXza5cpaM1AkhQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3735 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Fugang Duan The commit da722186f654 (net: fec: set GPR bit on suspend by DT configuration) set the GPR reigster offset and bit in driver for wake on lan feature. But it introduces two issues here: - one SOC has two instances, they have different bit - different SOCs may have different offset and bit So to support wake-on-lan feature on other i.MX platforms, it should configure the GPR reigster offset and bit from DT. So the patch is to improve the commit da722186f654 (net: fec: set GPR bit on suspend by DT configuration) to support multiple ethernet instances on i.MX series. v2: * switch back to store the quirks bitmask in driver_data Signed-off-by: Fugang Duan --- drivers/net/ethernet/freescale/fec_main.c | 103 ++++++++++-------------------- 1 file changed, 34 insertions(+), 69 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 2e20914..4f55d30 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -86,56 +86,6 @@ static void fec_enet_itr_coal_init(struct net_device *ndev); #define FEC_ENET_OPD_V 0xFFF0 #define FEC_MDIO_PM_TIMEOUT 100 /* ms */ -struct fec_devinfo { - u32 quirks; - u8 stop_gpr_reg; - u8 stop_gpr_bit; -}; - -static const struct fec_devinfo fec_imx25_info = { - .quirks = FEC_QUIRK_USE_GASKET | FEC_QUIRK_MIB_CLEAR | - FEC_QUIRK_HAS_FRREG, -}; - -static const struct fec_devinfo fec_imx27_info = { - .quirks = FEC_QUIRK_MIB_CLEAR | FEC_QUIRK_HAS_FRREG, -}; - -static const struct fec_devinfo fec_imx28_info = { - .quirks = FEC_QUIRK_ENET_MAC | FEC_QUIRK_SWAP_FRAME | - FEC_QUIRK_SINGLE_MDIO | FEC_QUIRK_HAS_RACC | - FEC_QUIRK_HAS_FRREG, -}; - -static const struct fec_devinfo fec_imx6q_info = { - .quirks = FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_GBIT | - FEC_QUIRK_HAS_BUFDESC_EX | FEC_QUIRK_HAS_CSUM | - FEC_QUIRK_HAS_VLAN | FEC_QUIRK_ERR006358 | - FEC_QUIRK_HAS_RACC, - .stop_gpr_reg = 0x34, - .stop_gpr_bit = 27, -}; - -static const struct fec_devinfo fec_mvf600_info = { - .quirks = FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_RACC, -}; - -static const struct fec_devinfo fec_imx6x_info = { - .quirks = FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_GBIT | - FEC_QUIRK_HAS_BUFDESC_EX | FEC_QUIRK_HAS_CSUM | - FEC_QUIRK_HAS_VLAN | FEC_QUIRK_HAS_AVB | - FEC_QUIRK_ERR007885 | FEC_QUIRK_BUG_CAPTURE | - FEC_QUIRK_HAS_RACC | FEC_QUIRK_HAS_COALESCE, -}; - -static const struct fec_devinfo fec_imx6ul_info = { - .quirks = FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_GBIT | - FEC_QUIRK_HAS_BUFDESC_EX | FEC_QUIRK_HAS_CSUM | - FEC_QUIRK_HAS_VLAN | FEC_QUIRK_ERR007885 | - FEC_QUIRK_BUG_CAPTURE | FEC_QUIRK_HAS_RACC | - FEC_QUIRK_HAS_COALESCE, -}; - static struct platform_device_id fec_devtype[] = { { /* keep it for coldfire */ @@ -143,25 +93,39 @@ static struct platform_device_id fec_devtype[] = { .driver_data = 0, }, { .name = "imx25-fec", - .driver_data = (kernel_ulong_t)&fec_imx25_info, + .driver_data = FEC_QUIRK_USE_GASKET | FEC_QUIRK_MIB_CLEAR | + FEC_QUIRK_HAS_FRREG, }, { .name = "imx27-fec", - .driver_data = (kernel_ulong_t)&fec_imx27_info, + .driver_data = FEC_QUIRK_MIB_CLEAR | FEC_QUIRK_HAS_FRREG, }, { .name = "imx28-fec", - .driver_data = (kernel_ulong_t)&fec_imx28_info, + .driver_data = FEC_QUIRK_ENET_MAC | FEC_QUIRK_SWAP_FRAME | + FEC_QUIRK_SINGLE_MDIO | FEC_QUIRK_HAS_RACC | + FEC_QUIRK_HAS_FRREG, }, { .name = "imx6q-fec", - .driver_data = (kernel_ulong_t)&fec_imx6q_info, + .driver_data = FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_GBIT | + FEC_QUIRK_HAS_BUFDESC_EX | FEC_QUIRK_HAS_CSUM | + FEC_QUIRK_HAS_VLAN | FEC_QUIRK_ERR006358 | + FEC_QUIRK_HAS_RACC, }, { .name = "mvf600-fec", - .driver_data = (kernel_ulong_t)&fec_mvf600_info, + .driver_data = FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_RACC, }, { .name = "imx6sx-fec", - .driver_data = (kernel_ulong_t)&fec_imx6x_info, + .driver_data = FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_GBIT | + FEC_QUIRK_HAS_BUFDESC_EX | FEC_QUIRK_HAS_CSUM | + FEC_QUIRK_HAS_VLAN | FEC_QUIRK_HAS_AVB | + FEC_QUIRK_ERR007885 | FEC_QUIRK_BUG_CAPTURE | + FEC_QUIRK_HAS_RACC | FEC_QUIRK_HAS_COALESCE, }, { .name = "imx6ul-fec", - .driver_data = (kernel_ulong_t)&fec_imx6ul_info, + .driver_data = FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_GBIT | + FEC_QUIRK_HAS_BUFDESC_EX | FEC_QUIRK_HAS_CSUM | + FEC_QUIRK_HAS_VLAN | FEC_QUIRK_ERR007885 | + FEC_QUIRK_BUG_CAPTURE | FEC_QUIRK_HAS_RACC | + FEC_QUIRK_HAS_COALESCE, }, { /* sentinel */ } @@ -3476,19 +3440,23 @@ static int fec_enet_get_irq_cnt(struct platform_device *pdev) } static int fec_enet_init_stop_mode(struct fec_enet_private *fep, - struct fec_devinfo *dev_info, struct device_node *np) { struct device_node *gpr_np; + u32 out_val[3]; int ret = 0; - if (!dev_info) - return 0; - - gpr_np = of_parse_phandle(np, "gpr", 0); + gpr_np = of_parse_phandle(np, "fsl,stop-mode", 0); if (!gpr_np) return 0; + ret = of_property_read_u32_array(np, "fsl,stop-mode", out_val, + ARRAY_SIZE(out_val)); + if (ret) { + dev_dbg(&fep->pdev->dev, "no stop mode property\n"); + return ret; + } + fep->stop_gpr.gpr = syscon_node_to_regmap(gpr_np); if (IS_ERR(fep->stop_gpr.gpr)) { dev_err(&fep->pdev->dev, "could not find gpr regmap\n"); @@ -3497,8 +3465,8 @@ static int fec_enet_init_stop_mode(struct fec_enet_private *fep, goto out; } - fep->stop_gpr.reg = dev_info->stop_gpr_reg; - fep->stop_gpr.bit = dev_info->stop_gpr_bit; + fep->stop_gpr.reg = out_val[1]; + fep->stop_gpr.bit = out_val[2]; out: of_node_put(gpr_np); @@ -3521,7 +3489,6 @@ fec_probe(struct platform_device *pdev) int num_rx_qs; char irq_name[8]; int irq_cnt; - struct fec_devinfo *dev_info; fec_enet_get_queue_num(pdev, &num_tx_qs, &num_rx_qs); @@ -3539,9 +3506,7 @@ fec_probe(struct platform_device *pdev) of_id = of_match_device(fec_dt_ids, &pdev->dev); if (of_id) pdev->id_entry = of_id->data; - dev_info = (struct fec_devinfo *)pdev->id_entry->driver_data; - if (dev_info) - fep->quirks = dev_info->quirks; + fep->quirks = pdev->id_entry->driver_data; fep->netdev = ndev; fep->num_rx_queues = num_rx_qs; @@ -3575,7 +3540,7 @@ fec_probe(struct platform_device *pdev) if (of_get_property(np, "fsl,magic-packet", NULL)) fep->wol_flag |= FEC_WOL_HAS_MAGIC_PACKET; - ret = fec_enet_init_stop_mode(fep, dev_info, np); + ret = fec_enet_init_stop_mode(fep, np); if (ret) goto failed_stop_mode; From patchwork Mon May 25 07:09:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Duan X-Patchwork-Id: 200075 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=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, 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 9622BC433E0 for ; Mon, 25 May 2020 07:14:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6C9DD2071A for ; Mon, 25 May 2020 07:14:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="BwrCbjvD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389040AbgEYHOj (ORCPT ); Mon, 25 May 2020 03:14:39 -0400 Received: from mail-eopbgr70053.outbound.protection.outlook.com ([40.107.7.53]:1606 "EHLO EUR04-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388932AbgEYHOj (ORCPT ); Mon, 25 May 2020 03:14:39 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m6lg6ZbtVwMuM3rcAJpItYhB1yfQDTMWfLdL7ColVDjeRLuncHJutmN4PL73iJ5R2amUfIwZYEOKBjpUFQP4GKoteegwVsM5IKWgcazgZbPZY8irHXsHLEj9FtxLlUSNl8qWLy5E53R+XksRr/5PMjnVCIhoEnGiZYsOjIvAlAf04f4vE/bghw/zIwlll9LLm4RxmpRnjG5YpJw177ESulPDk6mGhiLT0ulpwDvLYDbceyLR8S2xAK1TTnjdl5dRFsSvm7oR5y3f8WauWJn1681gdROKgmVGq+NZtsxFLvzOUcZz44dCOrTqgh9IYsf+4SknJQIkYac9oJz4YUiXHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0+egVCaipiCG381DrpLO0ogjSrGIRRuIyw6tt8O/NjU=; b=hkgPR/al/AHLFPVdBGGQAYcoJha/W1Y1OFqrey57bh7bTiN+S/oPkL/xlTj2l/HNvMhBO9ELuLSR6jPFU654nsFklDjEFrMOa2wCIabsFxeG4mQeW6EaIgYDcuu1lgU/eKkgabzttoF9Tz7X+jnpVVr2/Xau0Q7QMoCYVTFzCx/iX1nVyzP784KVvQuWiYMJjgJbmD6unskDfdDUt26f2zaH5wiARbc3mUkRC7FVfoVUjzKHqj+4jsy1p22bcx9jCMcyyQ6Sg2l3yNGctEqv6GQZIBX5OPr79Vf+EnSVGsen8cOi4ZuuZhIz2dWCxVXpvE2adIpE1fTVzbfN7qE7XA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0+egVCaipiCG381DrpLO0ogjSrGIRRuIyw6tt8O/NjU=; b=BwrCbjvDn60T/V9hqlqQUFUsQttCxg3CQha13fdpIygD7R+pD+ZWTeg7xmb2rL/bWoKUUCyqtpKnPZjDZ68EOArp+yP1ld8gXNkP7rQcHpa0cmKEOEjuh+OwkkdDna6ZfNmFgELoYHzLyjnAUrjisuMoIp+0HwG/rH+UaM3h1OQ= Authentication-Results: lunn.ch; dkim=none (message not signed) header.d=none;lunn.ch; dmarc=none action=none header.from=nxp.com; Received: from AM6PR0402MB3607.eurprd04.prod.outlook.com (2603:10a6:209:12::18) by AM6PR0402MB3735.eurprd04.prod.outlook.com (2603:10a6:209:1a::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.27; Mon, 25 May 2020 07:14:25 +0000 Received: from AM6PR0402MB3607.eurprd04.prod.outlook.com ([fe80::35f8:f020:9b47:9aa1]) by AM6PR0402MB3607.eurprd04.prod.outlook.com ([fe80::35f8:f020:9b47:9aa1%7]) with mapi id 15.20.3021.029; Mon, 25 May 2020 07:14:25 +0000 From: fugang.duan@nxp.com To: andrew@lunn.ch, martin.fuzzey@flowbird.group, davem@davemloft.net Cc: netdev@vger.kernel.org, robh+dt@kernel.org, shawnguo@kernel.org, devicetree@vger.kernel.org, kuba@kernel.org, fugang.duan@nxp.com Subject: [PATCH net v2 3/4] ARM: dts: imx: add ethernet stop mode property Date: Mon, 25 May 2020 15:09:28 +0800 Message-Id: <1590390569-4394-4-git-send-email-fugang.duan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1590390569-4394-1-git-send-email-fugang.duan@nxp.com> References: <1590390569-4394-1-git-send-email-fugang.duan@nxp.com> X-ClientProxiedBy: SG2PR06CA0213.apcprd06.prod.outlook.com (2603:1096:4:68::21) To AM6PR0402MB3607.eurprd04.prod.outlook.com (2603:10a6:209:12::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from b38611.ap.freescale.net (119.31.174.66) by SG2PR06CA0213.apcprd06.prod.outlook.com (2603:1096:4:68::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3021.23 via Frontend Transport; Mon, 25 May 2020 07:14:22 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c6140ca0-0d11-49cf-c544-08d8007b413b X-MS-TrafficTypeDiagnostic: AM6PR0402MB3735: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2276; X-Forefront-PRVS: 0414DF926F X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DSPJ+sb46cIx2xGiWn/Ah7/BRclAZbxzjOuvqz/fqCvvb1zPQTtf7iHEaSou9U6fpzKGQ5W7O6Rp72eSRs4772cHUO0nqRyqNbTA3jX05dlDvG34X3iC7brgdug1xagieXf1O5FqmBhXeKoYDvEQba+1+crMaER93Igvh0dRSuryoNHmZybxZBgNrcGMXhfI2s0YgU5QbcX+J9ah9jkXZb8poKCS6M2TJqcQEuyif1GhdU5Rx1Q3Ne1qM7sZ0/GvM3gsYJ86ifPcKxPX4WVL/x/F2tvTinuKL9IJWZKhCNeF4att3KVCtKiM+Rw980MDLeZAidltSiAW2JYVWk3ZNQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR0402MB3607.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(396003)(39860400002)(136003)(346002)(376002)(366004)(316002)(956004)(2616005)(66476007)(52116002)(6506007)(66556008)(66946007)(86362001)(36756003)(26005)(5660300002)(6486002)(16526019)(186003)(6512007)(2906002)(8676002)(9686003)(478600001)(8936002)(4326008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: OI09dRPGRca4OB5CCCmEgzhJAHNXmLz1X96PIA7dVNyawECYgULhjIpVg55wyCSAZ/uTFR4QdwPr+U66wYTF5ANU2rHcd1rRiTvCbjyYnYovY5eIygXHwlbvFZkHwymADljNBrdhlviTgROBwAN1Vs4wAr+0r1hzY4ymI38rcEvvR3kN6C6QwL965ypWoNP3F37a6nXteRFMWU8mTunGA2B2dfSoNN3aQlqCbD6TxTAMWKmkQwvy0/fXMXWzovUHwd0vnEaDhoBpNHcm8kZIJbeWbtK26Cwohxyq0zK3h+6StHayjnnkCaWUzOGJRceSxir2GkTXDRdX30AFy+h/O4adH0W3NFubxY/CtPYixWgXqNJxgv8XdZNq2qHxFElC4kNxBbyjbLBIoQMiu427h6Qd/+NiWYuCRuz8w9gg7v9DOEPOnL/98GLZLRC1e6asoh9nBO4YEIrWI5bTgE/1x8gCWrLVzw51a/vTxvP0mwcj2wUNaTILvvhRxQHcKhP/ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c6140ca0-0d11-49cf-c544-08d8007b413b X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2020 07:14:25.0297 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 223yl5LQ5pETvLYRFL5RY8vkUNbjqRylao00e2iJrl9+pRXxUztOx1f8qV4M56UlFNk/g5sss0VZV6rfVAb2mg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3735 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Fugang Duan - Update the imx6qdl gpr property to define gpr register offset and bit in DT. - Add imx6sx/imx6ul/imx7d ethernet stop mode property. Signed-off-by: Fugang Duan --- arch/arm/boot/dts/imx6qdl.dtsi | 2 +- arch/arm/boot/dts/imx6sx.dtsi | 2 ++ arch/arm/boot/dts/imx6ul.dtsi | 2 ++ arch/arm/boot/dts/imx7d.dtsi | 1 + arch/arm/boot/dts/imx7s.dtsi | 1 + 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi index 98da446..48f5016 100644 --- a/arch/arm/boot/dts/imx6qdl.dtsi +++ b/arch/arm/boot/dts/imx6qdl.dtsi @@ -1045,7 +1045,7 @@ <&clks IMX6QDL_CLK_ENET>, <&clks IMX6QDL_CLK_ENET_REF>; clock-names = "ipg", "ahb", "ptp"; - gpr = <&gpr>; + fsl,stop-mode = <&gpr 0x34 27>; status = "disabled"; }; diff --git a/arch/arm/boot/dts/imx6sx.dtsi b/arch/arm/boot/dts/imx6sx.dtsi index d6f8317..09f21aa 100644 --- a/arch/arm/boot/dts/imx6sx.dtsi +++ b/arch/arm/boot/dts/imx6sx.dtsi @@ -930,6 +930,7 @@ "enet_clk_ref", "enet_out"; fsl,num-tx-queues = <3>; fsl,num-rx-queues = <3>; + fsl,stop-mode = <&gpr 0x10 3>; status = "disabled"; }; @@ -1039,6 +1040,7 @@ <&clks IMX6SX_CLK_ENET_PTP>; clock-names = "ipg", "ahb", "ptp", "enet_clk_ref", "enet_out"; + fsl,stop-mode = <&gpr 0x10 4>; status = "disabled"; }; diff --git a/arch/arm/boot/dts/imx6ul.dtsi b/arch/arm/boot/dts/imx6ul.dtsi index 2ccf67c..345ae9b 100644 --- a/arch/arm/boot/dts/imx6ul.dtsi +++ b/arch/arm/boot/dts/imx6ul.dtsi @@ -520,6 +520,7 @@ "enet_clk_ref", "enet_out"; fsl,num-tx-queues = <1>; fsl,num-rx-queues = <1>; + fsl,stop-mode = <&gpr 0x10 4>; status = "disabled"; }; @@ -856,6 +857,7 @@ "enet_clk_ref", "enet_out"; fsl,num-tx-queues = <1>; fsl,num-rx-queues = <1>; + fsl,stop-mode = <&gpr 0x10 3>; status = "disabled"; }; diff --git a/arch/arm/boot/dts/imx7d.dtsi b/arch/arm/boot/dts/imx7d.dtsi index 4c22828..cff875b 100644 --- a/arch/arm/boot/dts/imx7d.dtsi +++ b/arch/arm/boot/dts/imx7d.dtsi @@ -153,6 +153,7 @@ "enet_clk_ref", "enet_out"; fsl,num-tx-queues = <3>; fsl,num-rx-queues = <3>; + fsl,stop-mode = <&gpr 0x10 4>; status = "disabled"; }; diff --git a/arch/arm/boot/dts/imx7s.dtsi b/arch/arm/boot/dts/imx7s.dtsi index 76e3ffb..5bf0b39 100644 --- a/arch/arm/boot/dts/imx7s.dtsi +++ b/arch/arm/boot/dts/imx7s.dtsi @@ -1190,6 +1190,7 @@ "enet_clk_ref", "enet_out"; fsl,num-tx-queues = <3>; fsl,num-rx-queues = <3>; + fsl,stop-mode = <&gpr 0x10 3>; status = "disabled"; }; };