Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp644136ybt; Wed, 1 Jul 2020 06:54:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXt/jbfHylkfLO3jxwWDOIINOZOfEVpelyc1oomfc04s0nPxRaEcSpYhBeOjIE4hG0ESq+ X-Received: by 2002:a17:906:19c7:: with SMTP id h7mr22506356ejd.403.1593611698650; Wed, 01 Jul 2020 06:54:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593611698; cv=none; d=google.com; s=arc-20160816; b=ygGpXk6AG8NFjC+Ry/7grp3F9LkuMMSMxwoJhlf+CjuRqiXquR716hM3YaMmuH7HZv 8Az3/ZrhTK318WV2CBF7spz4UmpIc6DqrDRdwg6qX5cM8BMZlBZE3qr5x9uvygQYLJv5 eZft0Air0Ahdwgk46X8YdU67wMw2+UdBg7vxd7TGsTx9yPhb92FX096IBsE9qUokSoX5 2tCbyYUvyaBVXAlF3vJ0Q8nxvSU0RKbfB0o/uMj/5zqqsHBHc/o+pJr06bgVy1xQtXmt pn7soNhC5Y5wZYI90TBBuPtfdMaxNNRXDJRQNBLd3QlWglQs0VjrocU/y5CLnvDcJEVk ieaQ== 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=Xj1Lk3VZEMaGF9wl7c7H3our1i602EVg5obbUq2ppYc=; b=DuSXJ4z61poqbGzqXNeRcX5d5Umba4jPoYvvHBnN5eodB7zKD/pLHgoZn7iYrAVUxz H3tniKSLs+DwNpwxZ6MYBtAB3q4dWvh6Kdd21QdDgc0IiyhnBL5pUTH8VTNlYC2EDLU0 Eq7nmLlhACbefMITpLP/KcjPGPnHOzg5SCoBgZVMGQwyeFjlhF434mXO/U1+tL4Kllev oFjdcGAuQO5mcfhYFvskn0x19msgK2MpaT9pzLjE8C4ZWaotRQxyl0ePTC5Z2NKBV1t8 o4k5EFztEMdb0/qEJLqMfINmJe2mb24dSF0TiY/kM4DYH0JBlKL9bfKIHquGXjV4Q3+y zyuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="KlWHBQV/"; 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 j5si3874227ejk.74.2020.07.01.06.54.33; Wed, 01 Jul 2020 06:54:58 -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="KlWHBQV/"; 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 S1730880AbgGANvq (ORCPT + 99 others); Wed, 1 Jul 2020 09:51:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730408AbgGANvp (ORCPT ); Wed, 1 Jul 2020 09:51:45 -0400 Received: from mail-oi1-x244.google.com (mail-oi1-x244.google.com [IPv6:2607:f8b0:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52BE1C08C5C1 for ; Wed, 1 Jul 2020 06:51:45 -0700 (PDT) Received: by mail-oi1-x244.google.com with SMTP id w17so19950524oie.6 for ; Wed, 01 Jul 2020 06:51:45 -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=Xj1Lk3VZEMaGF9wl7c7H3our1i602EVg5obbUq2ppYc=; b=KlWHBQV/y+Tis6Ilt/08e+X2Po+9I9X6lFsX+D0PfXHDvGzQLPWYp5J6q1ZYDAvF6i JOw1dCSMqErC9KMgcMPoRUUXw65wifJElvzosNZsPLh5kFawxR3oX2eF+LNP2cVfF85r zSn9dqb/NhZ6zgbalPwsFQW1+N0O3WzCUCKBrG9hG1QMBU3dhk5O7ABfqVWkJcVuiweW WH7kJUMTJkqwM1O+cY+leLTMkTdlITrWFoZImeebn0n3axiiTR0lx6CDMaGL0Ys3Jdla b7kAWY8PLXCTGuqzHsF8FGvY6/gHI3MINMb4sg9WcCdOD6y5iJFgZq+owImhz2ZLCOUQ qwwA== 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=Xj1Lk3VZEMaGF9wl7c7H3our1i602EVg5obbUq2ppYc=; b=LIS9bJ24WF5YYaFc8kMoVraVRsjgI297qBWGnRl+Ky8Adyyl6+hNEjFaqtA+vu+qVp gMXQXX1q5+bJ7Oc0abRJE7LFfu7F4XERzObJpI0iA+X63g5En8IWyotfqURAZpPTTihH S7k54raL0t9Ks7feev8GjgVi7LWEMH+NDacmQWT50oCUqJPPD3h2UIdFaWd2ps3VEfL0 V6QrYlo0G+5H0nHWyp8xxlgqfqgiXNu3MzxLSQhswvNvBrtbNvEAB56lUWAVBCUlw3xd JJjK1hPdAkRU6uQeXDmZk87hkdaVUYXLN8D4pdJoTyYOFmJVdXPEzbZ3drjp85Ar3ZY/ wX5Q== X-Gm-Message-State: AOAM530le5sy4bUPyjRDTMVJhE4p/YmzlZ0Gojq8wWOtZ4wTUw+ExE7a XoddmVtrzyUcnVGBk+2rmS8SivdQImXqwrEqk1g= X-Received: by 2002:aca:b205:: with SMTP id b5mr21158482oif.103.1593611504654; Wed, 01 Jul 2020 06:51:44 -0700 (PDT) MIME-Version: 1.0 References: <20200625140105.14999-1-TheSven73@gmail.com> <20200625140105.14999-2-TheSven73@gmail.com> In-Reply-To: From: Sven Van Asbroeck Date: Wed, 1 Jul 2020 09:51:33 -0400 Message-ID: Subject: Re: [EXT] Re: [PATCH v4 2/2] ARM: imx6plus: enable internal routing of clk_enet_ref where possible To: Fabio Estevam Cc: Andy Duan , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , dl-linux-imx , "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 Andy, Fabio, Does the following describe the mainline situation? Please correct if not. 1. imx6 ethernet ref_clk can be generated internally (by imx6) or externally (by PHY or oscillator on PCB) 2. if internal, fec's "ptp" clock in devicetree should be <&clks IMX6QDL_CLK_ENET_REF> 3. if external, fec's "ptp" clock should be that external clock, see 810c0ca879098 ("ARM: imx6q: support ptp and rmii clock from pad") 4. sabresd devicetree describes "ptp" clock as IMX6QDL_CLK_ENET_REF, although it's externally supplied (by PHY). This is incorrect. 5. nevertheless sabresd will work, because FEC driver can still work when the PTP clock in devicetree is different from supplied PTP clock 6. sabresd plus believes FEC is clocked internally, so flips the bit which routes the ptp clock internally 7. this breaks sabresd plus, as default internal clock is unsuitable 8. sabresd is sample board, so all boards based on sabresd may have the same issue, and break Solution 1: - describe sabresd ptp clock correctly in devicetree - "clean/correct" solution - may break other imx6q plus boards in mainline - may break out-of-tree (private) imx6q plus devicetrees based on sabresd Solution 2: - on plus, never route PTP clock internally by default use a devicetree property instead - complex solution, hard to understand if newcomer - prevents sabresd / clones breakage Solution 3: - set sabresd ptp clock freq to same as externally supplied clock - may still break designs based on sabresd - hard to understand what's actually happening Other solutions??