Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1838303ybt; Thu, 2 Jul 2020 15:30:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnmIZgtMRQYz4AoWOjJjbWv3PtHVQ0ggYoMpnqLJXlUWjnfCpU0zwDyC6Axc49Wzs0gwDS X-Received: by 2002:a17:906:7fc8:: with SMTP id r8mr30688064ejs.412.1593729022765; Thu, 02 Jul 2020 15:30:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593729022; cv=none; d=google.com; s=arc-20160816; b=OAT9Ef10jbiFRoJL83qoa2RE3vop4PeIotgbIkX9MldWCxUfc7JAdSDo/yzj33i+x4 pr8j9t4sOds591yA4+unkik/POLFMv9D6TY5277D5QB6LEuVOuqWUtR0I4RtX9BqtMaY fSS9EDaetewGYbTDgg/VvXe0cfzfWLE8UlMwVu+kkVzklJk66n9K9zHoE+J25+F1BS2O i+Bb21iMoaXTvIYMOEWEXEbgI181PycyqfIO7MjsWR8Ed1BtBmo5q75jVWckbkwu2A4o m353Bfj3AVGOtiXC11iOYOxPItvts5oFkuhsuS7MF3jNnjvOcsNmG+ONg9CXrbDvrr3N LTdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=xxQFr1BqDEffTMIbjj2nr78urbKnKQfjZ+rNpfgSt08=; b=GpJCTVfyy1wcqyuSDTSpP7e8KK8zMPg75rD+qAYY+u59UXMKmsFoQ4PeCWOgZm567r MmFMW/HJSoT2wLUwrSAH9ytqrKwrIm+LvwhLR5fQDra3Z2ApwM7/2twxQhiWgrAkQnA8 d9Oag5qq/p7fW3v1XdymLy43uwwoQpf2L0SxAATuAYdq6WxYLHoo6tiVWYmpKsEZ3i1A Gnnd5UK+RpIkQ9jFf8c9e9pxLC/xKueflj+ZF6m+YiWcfHpwBr/pVhojpqaOYbYDw0O2 mlBcet6cehGzJe8esMH8nTBJoRpCZG4UuxSHoJK6UaAW8y3OENQx0OcZ7nvE5Dw2M9ff /ykw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=H5Eg11Z9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dg8si6842765edb.184.2020.07.02.15.30.00; Thu, 02 Jul 2020 15:30:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=H5Eg11Z9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726371AbgGBW3m (ORCPT + 99 others); Thu, 2 Jul 2020 18:29:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726110AbgGBW3m (ORCPT ); Thu, 2 Jul 2020 18:29:42 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC1CFC08C5C1; Thu, 2 Jul 2020 15:29:41 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id h22so27101620lji.9; Thu, 02 Jul 2020 15:29:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xxQFr1BqDEffTMIbjj2nr78urbKnKQfjZ+rNpfgSt08=; b=H5Eg11Z9hn0nAlgWO7xYNhfv0JqaLDjFb6T3TNFC4HAhEYM+NAykFGb40mVhLCEyP8 89J6eu0fEwy/nisaUDezq6zLhobof7rGWCcDy5p0cCVTOXcIu91LT30adquKyk1RDcpo R5Za4WEURUdOtucQnivvJbaFYfMj1p1AiBdGYkZobOlKsMz4CJb9Ka5vqgX3hio6nEU4 LApjtLJ4mIuzgwD1Y67rCWqyTi0T9ViqnT9MwX/X1hWv+OdjGDDvjuKJNvyfqdALZyHz 0mSG7VtcmsjqA6JIA87D7xXr4IJ1fsqhQNS3ljpAHMYqKSLCfPIHnHNt2Yc6kXHAekRe UYig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xxQFr1BqDEffTMIbjj2nr78urbKnKQfjZ+rNpfgSt08=; b=CSibwBh/B0WsD7+B82rXM6+1vIXOLEhiI2gh5BrIOX1NRaPN87smcsBiA7oaIaK5KV XeaUkL8flzwozIPN0oyDlz7q79aCFiGEwX8hjqoReYJ4BZEey5mHI7PvTuomkoay5Ahq l6anU8UtU9LWyob9V00++5CfXGDqfX9+Ib/k2ZWFMmBe/AQbQccFuBbCQ1Qtrn9fFqDx cWifNg/TzxJo4ly4oFISCoX5YwhZ48tYvMnEYN8C+gIpTO30YBvxXxyX6BKbH2ZkmAdO LgL01WHbtkfAwH0qiacnm2NHXCE3R+VAMkDw+CsoC6rfsPKmKUN6s8M6Fa06McyKqCHO 82lg== X-Gm-Message-State: AOAM530smaHNs+5c0HEGujinBLUCOsoMgvL1xaihhLU/Q5gBtXJpbC7w +VtW/QG37zujmIwL5LzEIYFatjCO4eA2nKCQtLU= X-Received: by 2002:a2e:9e87:: with SMTP id f7mr18422139ljk.44.1593728980418; Thu, 02 Jul 2020 15:29:40 -0700 (PDT) MIME-Version: 1.0 References: <20200702175352.19223-1-TheSven73@gmail.com> <20200702175352.19223-3-TheSven73@gmail.com> In-Reply-To: <20200702175352.19223-3-TheSven73@gmail.com> From: Fabio Estevam Date: Thu, 2 Jul 2020 19:29:29 -0300 Message-ID: Subject: Re: [PATCH v5 3/3] ARM: imx6plus: optionally enable internal routing of clk_enet_ref To: Sven Van Asbroeck Cc: Shawn Guo , Fugang Duan , Rob Herring , "David S. Miller" , Jakub Kicinski , netdev , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Sascha Hauer , Pengutronix Kernel Team , NXP Linux Team , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sven, On Thu, Jul 2, 2020 at 2:53 PM Sven Van Asbroeck wrote: > + /* > + * 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); > + } With the device tree approach, I think that a better place to touch GPR5 would be inside the fec driver. You can refer to drivers/pci/controller/dwc/pci-imx6.c and follow the same approach for accessing the GPR register: ... /* Grab GPR config register range */ imx6_pcie->iomuxc_gpr = syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr") For the property name, what about fsl,txclk-from-pll?