From patchwork Thu Jul 2 17:53:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Van Asbroeck X-Patchwork-Id: 11640085 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6CDA514B7 for ; Thu, 2 Jul 2020 17:55:26 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 46F7B20760 for ; Thu, 2 Jul 2020 17:55:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nEu90dK3"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bb1PyoLT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 46F7B20760 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=tsxLdFAxcj681+3m9DuEtmyy/HJQX7T4CfFzYqzfZjk=; b=nEu90dK3MjXJQEWqAg27Au1S29 Uc4BfI2TXPT3rQsksR/25N42RTawaa8BXM96gtrfmo6HFzdEjpGTKXT6xKPRsVRiS4XXuIXrq4yM8 SHC4NklC1XNWzqhofKXqxqV9hLwt/Cr1LKC3QjtX7abztBZQs6313dW3NzgwqadPFvoNQtN1jOHJj 2SB63DMOp6vAt+lrwC24mtR0iO5tMjjczNgR4RBldgJa7R2AckwjBUjnCStA5tYBkODDfLpGi8m27 S/n/XddmBGKhDK1Hbvpsh5ivu65D5OOnqB7UTHF8HN6f6BKHq1TOcD/tjMeO+07S7XMr08/XEZS9j xPUm0nHw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jr3PO-0005Fy-Bz; Thu, 02 Jul 2020 17:54:02 +0000 Received: from mail-qk1-x743.google.com ([2607:f8b0:4864:20::743]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jr3PL-0005EL-T6 for linux-arm-kernel@lists.infradead.org; Thu, 02 Jul 2020 17:54:00 +0000 Received: by mail-qk1-x743.google.com with SMTP id b185so15866336qkg.1 for ; Thu, 02 Jul 2020 10:53:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=0/GQxXxfGsYnBic5/RL6CAFNUaN6B/gl7pdQ8fVaHoY=; b=bb1PyoLTqgnmqpoyjiIqzjmgwRxbIg8/iGsNGwpirVNTcqI/GQWWEP9KFFNsCcQ10Y Ni/imIv6X56JStRHswX9whmutnIkp9Jwpyw17nRT4ye+1zS2B8WHUkvehHf6HtkRirUr zzJuHZC5HZrpJA0wVOqSeUSYAsh3oBtm0I5eOe8bKLXC8dpfaODBFsJFDB2Vn8gFNR/v WdX5Squi+dYMgYQR2SYNp5wy2DwPLQaCVC2RpOSHbFUfVtMI/q97tPM2I/aAwfNXWWpB imEUZFoBTZD10dU53SjxXkOV4t3X3K2X7Uq9ooGbmCV9xzi9qS/uULtffIR1Y/+AZ3qS Mmew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=0/GQxXxfGsYnBic5/RL6CAFNUaN6B/gl7pdQ8fVaHoY=; b=aOiuKAGIiHEuQCUk5682zKb9zUn2f40aik6uRXksDoSFfSRilH09iIg4jncsQIkUnz q84p7TE94VLvWnAIcl6hINvuVoeX2mS12+eU4B/1QsKezEdXhQAFV906mF0O1a8AV5Bm n2oA5ejMthxn3zDm5hgEEkyBhNVhBelxaW8VeGvWJPSxMD9dht7kXnae044P6Wucfvpm gGg4RF2UcH8RS2RfOO5YLeWSNO0tubZ5EtIqDMmsIDtc3j+hsMgnjScm7s4YtvwTtOsQ SUAiKuOdFGXKEAk4/IXvCbDt2rqKtvXucBrYKPUrRdCvFhm9YxgNuu1KQB1NwtaF/G8g 9XZQ== X-Gm-Message-State: AOAM530/qAf73jabboFY/POBfVN1LOt+53zWE2NgTSIZiVy3F45aG8/d fkYsy4tFedEb0gt4Fqt8hc5LZgWx X-Google-Smtp-Source: ABdhPJyHl0z1SgQYig6I2fdY7EXsTetGozQfTeorJpNp1pG+z4UU5fykSc183B/FAVq+lx8x9BbPzQ== X-Received: by 2002:a37:689:: with SMTP id 131mr22871561qkg.468.1593712436222; Thu, 02 Jul 2020 10:53:56 -0700 (PDT) Received: from localhost.localdomain ([72.53.229.195]) by smtp.gmail.com with ESMTPSA id w204sm9149937qka.41.2020.07.02.10.53.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2020 10:53:55 -0700 (PDT) From: Sven Van Asbroeck X-Google-Original-From: Sven Van Asbroeck To: shawnguo@kernel.org, fugang.duan@nxp.com, robh+dt@kernel.org Subject: [PATCH v5 1/3] ARM: imx: mach-imx6q: Search for fsl, imx6q-iomuxc-gpr earlier Date: Thu, 2 Jul 2020 13:53:50 -0400 Message-Id: <20200702175352.19223-1-TheSven73@gmail.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200702_135359_952505_DFAE23C8 X-CRM114-Status: GOOD ( 14.19 ) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:743 listed in] [list.dnswl.org] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [thesven73[at]gmail.com] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [thesven73[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, netdev@vger.kernel.org, Sascha Hauer , linux-kernel@vger.kernel.org, NXP Linux Team , Pengutronix Kernel Team , Jakub Kicinski , Fabio Estevam , "David S. Miller" , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Fabio Estevam Check the presence of fsl,imx6q-iomuxc-gpr earlier and exit in case of failure. This is done in preparation for adding support for configuring the GPR5 register for i.MX6QP a bit easier. Signed-off-by: Fabio Estevam --- Tree: v5.8-rc3 Patch history: see [PATCH v5 3/3] To: Shawn Guo To: Andy Duan To: Rob Herring Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org arch/arm/mach-imx/mach-imx6q.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 85c084a716ab..ae89ad93ca83 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@ -169,6 +169,12 @@ static void __init imx6q_1588_init(void) struct regmap *gpr; u32 clksel; + gpr = syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr"); + if (IS_ERR(gpr)) { + pr_err("failed to find fsl,imx6q-iomuxc-gpr regmap\n"); + return; + } + np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-fec"); if (!np) { pr_warn("%s: failed to find fec node\n", __func__); @@ -195,13 +201,8 @@ static void __init imx6q_1588_init(void) clksel = clk_is_match(ptp_clk, enet_ref) ? IMX6Q_GPR1_ENET_CLK_SEL_ANATOP : IMX6Q_GPR1_ENET_CLK_SEL_PAD; - gpr = syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr"); - if (!IS_ERR(gpr)) - regmap_update_bits(gpr, IOMUXC_GPR1, - IMX6Q_GPR1_ENET_CLK_SEL_MASK, - clksel); - else - pr_err("failed to find fsl,imx6q-iomuxc-gpr regmap\n"); + regmap_update_bits(gpr, IOMUXC_GPR1, IMX6Q_GPR1_ENET_CLK_SEL_MASK, + clksel); clk_put(enet_ref); put_ptp_clk: From patchwork Thu Jul 2 17:53:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Van Asbroeck X-Patchwork-Id: 11640087 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D86FC14B7 for ; Thu, 2 Jul 2020 17:55:28 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AF04120737 for ; Thu, 2 Jul 2020 17:55:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="IZGBRUlS"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZmldpPGG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AF04120737 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=qhnTuHA31z4Cs31qTqSZv281CGaQjUywTk0bMn8vmUk=; b=IZGBRUlSjxJMxAkRAB9IiAL9cq Mcy8TxdHWXvO56+XcNBM2myNOKVXIyIL0zz01woJ/MyStJqN+ahL5DlBr+xnvLgCqaibTIY/V4PZG DavSYeXuuD2qhRPeyym83eSKreHrgYWyIn7s4TGexMeTJrdgfRQ4m/IrIqTFdCyBlB1MXLgwjCy0M RLISFPw6AisKK8P+Gk6Ns5vVXFikRX6O88lO8NRR43xsVucg6DP1VIzblu3p+9eL1SMqxOaBW0ixz e5a3SRSJuhhQeTYpVkXnmzMwr3yAPn/ndQRPaXlFnEueu1y55aqa6ITER7UFiCUDlZdFTOs7VD/tC pkcrk2jw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jr3PQ-0005GZ-82; Thu, 02 Jul 2020 17:54:04 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jr3PM-0005EW-S0 for linux-arm-kernel@lists.infradead.org; Thu, 02 Jul 2020 17:54:01 +0000 Received: by mail-qk1-x741.google.com with SMTP id k18so26452893qke.4 for ; Thu, 02 Jul 2020 10:53:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=adUOUcaETQkVS7cnauVlN1+FIVTZhn7o3LTKSzYe1bc=; b=ZmldpPGGAUupGOjBWcXeGZIszb+8n3NZchM0xyTr1Z5NPEb76YxCQFLl6o6dZN9GSC TA1jf3ctAaiaoq8ZLPZU/WgKURo0KWp69XwkMuCvIJerC8NgvOfUCbG2HZorgBQcWOHc /KtHoU4JW1J/kVrL7kLtBRV46H3Db9ysJizxf8jjehx3I2uvdmMN1GY1rrtQRc42ARJn h5XtniBloV6rmeqvKUpOIUZOvDRfNZZC6+fHJDCY+/lyZtqPRw2rvSZJ4PAp2RzYggzx o+G7m77jsgBgtsjWQKhRaNw3gxbM2L0s9F/ljFqLgGw550KGzvNBK95YTZ4qrCQP5Mfp RecA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=adUOUcaETQkVS7cnauVlN1+FIVTZhn7o3LTKSzYe1bc=; b=eH2zjx+VPk7zyfsCpCt7KIJNuo6819r1l32vuHyw3whV2ALwF/BoyFt7YYMvBebb3A y5B+hqC0SzaBcn0t0EEgDhhPRhyvZ61t18Ibx8DgmTAezAJjh9drBbCPdn8iNhDknE5X v5u1h307XIESESHsJ5Ck03cQwdw/pG7ZtkgZroDZ2eJD6SMykXWrcHoD2K0bXqWOSgON ULoSzSOmqhH32slNfLhNOQckS/8WR2rM09rUY+1dOhaIwRMvtmw/wKbBAi2yKn5gCDX7 rxOgcjcevvVwbM9Z8OvI3AsnyB7ooWbflz9L8+mKewWU1rM/FMAWcRBcEmq7BCmZ82bQ OaKA== X-Gm-Message-State: AOAM531g+NcahG8+K8We8SCWxwJ2JfWxOZejcgaU9kXmsvoGgHLMSEXN 43ErOdsls5ZKP5+IMJH32Hw= X-Google-Smtp-Source: ABdhPJzIHwAA0Q0Poo8Me3UUZPAvAoi/DLDdPOje48J0iSrJbC+Eib9upIcn4CvPceOSoRL1jothQg== X-Received: by 2002:a37:a785:: with SMTP id q127mr30241028qke.334.1593712437648; Thu, 02 Jul 2020 10:53:57 -0700 (PDT) Received: from localhost.localdomain ([72.53.229.195]) by smtp.gmail.com with ESMTPSA id w204sm9149937qka.41.2020.07.02.10.53.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2020 10:53:57 -0700 (PDT) From: Sven Van Asbroeck X-Google-Original-From: Sven Van Asbroeck To: shawnguo@kernel.org, fugang.duan@nxp.com, robh+dt@kernel.org Subject: [PATCH v5 2/3] dt-bindings: fec: add fsl, ptpclk-bypass-pad boolean property Date: Thu, 2 Jul 2020 13:53:51 -0400 Message-Id: <20200702175352.19223-2-TheSven73@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200702175352.19223-1-TheSven73@gmail.com> References: <20200702175352.19223-1-TheSven73@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200702_135400_950510_5CEBEA5B X-CRM114-Status: GOOD ( 13.59 ) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:741 listed in] [list.dnswl.org] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [thesven73[at]gmail.com] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [thesven73[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, netdev@vger.kernel.org, Sascha Hauer , linux-kernel@vger.kernel.org, NXP Linux Team , Pengutronix Kernel Team , Jakub Kicinski , Fabio Estevam , "David S. Miller" , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org If present, sources the fec's PTP clock straight from the enet PLL, instead of having to be routed via a SoC pad. This is only possible on certain SoCs, notably the imx6 (quad) plus. Signed-off-by: Sven Van Asbroeck --- Tree: v5.8-rc3 Patch history: see [PATCH v5 3/3] To: Shawn Guo To: Andy Duan To: Rob Herring Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Documentation/devicetree/bindings/net/fsl-fec.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/net/fsl-fec.txt b/Documentation/devicetree/bindings/net/fsl-fec.txt index 9b543789cd52..e34df25a38f6 100644 --- a/Documentation/devicetree/bindings/net/fsl-fec.txt +++ b/Documentation/devicetree/bindings/net/fsl-fec.txt @@ -39,6 +39,9 @@ Optional properties: tx/rx queues 1 and 2. "int0" will be used for queue 0 and ENET_MII interrupts. For imx6sx, "int0" handles all 3 queues and ENET_MII. "pps" is for the pulse per second interrupt associated with 1588 precision time protocol(PTP). +- fsl,ptpclk-bypass-pad: If present, sources the fec's PTP clock straight from + the enet PLL, instead of having to be routed via a SoC pad. This is only + possible on certain SoCs, notably the imx6 (quad) plus. Optional subnodes: - mdio : specifies the mdio bus in the FEC, used as a container for phy nodes From patchwork Thu Jul 2 17:53:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Van Asbroeck X-Patchwork-Id: 11640089 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 54C846C1 for ; Thu, 2 Jul 2020 17:55:29 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2E84620737 for ; Thu, 2 Jul 2020 17:55:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cjW/3lZg"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="elhYe95R" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2E84620737 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=s8g7uO5Z2BIwy6Kn6M9Nk7WAdhLdZVsII8MPXfvaETE=; b=cjW/3lZgC2gSYp4iPprONwow3K mpLV2BBqROVkr28zzmr89+n/LLy5VZUcXjLDQmE+j+3TnmIGIWyi7Pk/NX2ew/S2ocAX2hDBSRLoc RDbXZR6ZqGiK6ZX+MlS4zX1YafIT7IS6JQMbYsmcWdjq7+E8a7zNClNMxm6ewRnbF8JyxAixpUVqX MJDCGqKtPL69RAf8/S/Wl+xlnIPTX9kiW3BozRh64j6vb+q11Bn7zULW/NiezDtKsjyozJF4szvUC evlIr0pzRcnOXnXm78EBmQRTFYspi/O0hjhiVS7VnR163Cc6rA9EGN6IYyCKYcD8eWSPliBnvMcx/ ya1uccFg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jr3PT-0005Hh-1R; Thu, 02 Jul 2020 17:54:07 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jr3PM-0005Eo-S1 for linux-arm-kernel@lists.infradead.org; Thu, 02 Jul 2020 17:54:02 +0000 Received: by mail-qt1-x841.google.com with SMTP id d27so21946878qtg.4 for ; Thu, 02 Jul 2020 10:54:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZKWKuZ/GqJQ2tlXnv5kEi5eyCWfh4Zy6tKRJWrUWoaM=; b=elhYe95RAW43tw1m88MdkH7kBUzi2ZgOftqKEM9l9fBrUR+wpcM6JpeDVnUgXkmEvg MjdNaswFysDTZb5Ogb9Gzi8XJil6h3Qr/G4xFrbeE5rTwc80GepH2raQTAZw5oOdZHHv G+3lA2iAL0MrgKy8XV0CPVbtv8YFw98N7Sm21Aq10wvpAnPWvNuT6hh2VBft0Cw/cl/k lk08LrNF3tDD62jegfVBQXJMWg6FW9Ew1/Zwm7aropH+ZbZtewjo3N/nAZ9MttWG58P9 arwAPDh6T+OAQIDjjnaouHW6EfGZ9YSq6TMkYUJBO3+ftnghUXqwTZ0/YOKQv1mhwGIT 5KnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ZKWKuZ/GqJQ2tlXnv5kEi5eyCWfh4Zy6tKRJWrUWoaM=; b=FQZRo65cWuuPJoqH8r+wRWSC4W3ftgA0WJcqGxa6jELZrh4cQFRlnP40i1Ro343JWV lcRWv3kf+JVscsvGYW5l+GJ5RHFgHc2cqPcNtCixoEWcBQ2n0JZxE9wiuZbb1AFub5dZ AsSgev5HtuQ9DvvOQHnPCBEQbvWpLDyFDvwcF9ByL6dbUawVMAMEdfGBXwz2yvFbGA7E Cjz3FMYvhNczGnquDERSfoD91c0pCkiYZwpYBlp0OXxgeQ6TkoA5PK/C1uWs4ReODZMH sdCj2x5OPSKXfnJVG4ZnQV4kK0hQCi2GjfuAegc1mTMA4sYrz+d2WyMFCy7Mb8ImfN4w 4Y7Q== X-Gm-Message-State: AOAM533NLmqS75frT2jBce1KdZ2bWnjUpQCfZOVbOgo5iKg5m3FQSvFV 3GWwNYgdYZi9j9KGHGTk7CQ= X-Google-Smtp-Source: ABdhPJxFIU3UKxBx6qN2dHiZNWiq9jLcasvtl0GEwPexqj0BW1YbvA10GOwT5IelBz2Hv/a92nrH0Q== X-Received: by 2002:ac8:429b:: with SMTP id o27mr21249400qtl.124.1593712438939; Thu, 02 Jul 2020 10:53:58 -0700 (PDT) Received: from localhost.localdomain ([72.53.229.195]) by smtp.gmail.com with ESMTPSA id w204sm9149937qka.41.2020.07.02.10.53.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2020 10:53:58 -0700 (PDT) From: Sven Van Asbroeck X-Google-Original-From: Sven Van Asbroeck To: shawnguo@kernel.org, fugang.duan@nxp.com, robh+dt@kernel.org Subject: [PATCH v5 3/3] ARM: imx6plus: optionally enable internal routing of clk_enet_ref Date: Thu, 2 Jul 2020 13:53:52 -0400 Message-Id: <20200702175352.19223-3-TheSven73@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200702175352.19223-1-TheSven73@gmail.com> References: <20200702175352.19223-1-TheSven73@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200702_135400_936472_736B4A9B X-CRM114-Status: GOOD ( 19.69 ) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:841 listed in] [list.dnswl.org] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [thesven73[at]gmail.com] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [thesven73[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, netdev@vger.kernel.org, Sascha Hauer , linux-kernel@vger.kernel.org, NXP Linux Team , Pengutronix Kernel Team , Jakub Kicinski , Fabio Estevam , "David S. Miller" , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org On imx6, the ethernet reference clock (clk_enet_ref) can be generated by either the imx6, or an external source (e.g. an oscillator or the PHY). When generated by the imx6, the clock source (from ANATOP) must be routed to the input of clk_enet_ref via two pads on the SoC, typically via a dedicated track on the PCB. On an imx6 plus however, there is a new setting which enables this clock to be routed internally on the SoC, from its ANATOP clock source, straight to clk_enet_ref, without having to go through the SoC pads. Enable internal routing if the fsl,ptpclk-bypass-pad boolean property is present in the "fsl,imx6q-fec" devicetree node. Link: https://lore.kernel.org/lkml/CAOMZO5BYC3DmE_G0XRwRH9vSJiVVvKbtznODyntsAuorF=HoqA@mail.gmail.com/ Signed-off-by: Sven Van Asbroeck --- Tree: v5.8-rc3 v4 -> v5: - identified that existing imx6q-plus boards could break ethernet if v4 patch is applied. reached consensus: prevent breakage by requiring an explicit devicetree property for internal ptp clk routing. Link: https://lore.kernel.org/lkml/CAOMZO5BYC3DmE_G0XRwRH9vSJiVVvKbtznODyntsAuorF=HoqA@mail.gmail.com/ v3 -> v4: - avoid double-check for IS_ERR(gpr) by including Fabio Estevam's patch. v2 -> v3: - remove check for imx6q, which is already implied when of_machine_is_compatible("fsl,imx6qp") v1 -> v2: - Fabio Estevam: use of_machine_is_compatible() to determine if we are running on an imx6 plus. To: Shawn Guo To: Andy Duan To: Rob Herring Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org arch/arm/mach-imx/mach-imx6q.c | 14 ++++++++++++++ include/linux/mfd/syscon/imx6q-iomuxc-gpr.h | 3 +++ 2 files changed, 17 insertions(+) diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index ae89ad93ca83..ac62994eb7ba 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@ -204,6 +204,20 @@ static void __init imx6q_1588_init(void) regmap_update_bits(gpr, IOMUXC_GPR1, IMX6Q_GPR1_ENET_CLK_SEL_MASK, clksel); + /* + * On imx6 plus, enet_ref from ANATOP/CCM can be internally routed to + * be the PTP clock source, instead of having to be routed through + * pads. + */ + if (of_machine_is_compatible("fsl,imx6qp")) { + clksel = of_property_read_bool(np, "fsl,ptpclk-bypass-pad") ? + IMX6Q_GPR5_ENET_TXCLK_SEL_PLL : + IMX6Q_GPR5_ENET_TXCLK_SEL_PAD; + regmap_update_bits(gpr, IOMUXC_GPR5, + IMX6Q_GPR5_ENET_TXCLK_SEL_MASK, clksel); + } + + clk_put(enet_ref); put_ptp_clk: clk_put(ptp_clk); diff --git a/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h b/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h index d4b5e527a7a3..58377002427f 100644 --- a/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h +++ b/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h @@ -240,6 +240,9 @@ #define IMX6Q_GPR4_IPU_RD_CACHE_CTL BIT(0) #define IMX6Q_GPR5_L2_CLK_STOP BIT(8) +#define IMX6Q_GPR5_ENET_TXCLK_SEL_MASK BIT(9) +#define IMX6Q_GPR5_ENET_TXCLK_SEL_PAD 0 +#define IMX6Q_GPR5_ENET_TXCLK_SEL_PLL BIT(9) #define IMX6Q_GPR5_SATA_SW_PD BIT(10) #define IMX6Q_GPR5_SATA_SW_RST BIT(11)