Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1119696pxu; Thu, 17 Dec 2020 02:42:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJzD09eaWA1bINQs1gjcos2eYu51mMykhNg/is+uX4cDD3kGTqiq18K4vywzWfp7Qbd8Dk46 X-Received: by 2002:a17:906:c83b:: with SMTP id dd27mr35082327ejb.356.1608201729131; Thu, 17 Dec 2020 02:42:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608201729; cv=none; d=google.com; s=arc-20160816; b=WnwPfLRcD3EUEIgVFxCdf4RBAo1CXLr6geNRzOi/yYJpDxav4Qjj8QSegyKBygnCzD w/mJIiUxHPPj0KsfRq4D4sisbcngWHAIOzep8l535/L2kWOT6DWDQdK+mMw30V34JaBC C26w5itsNAv3voM/cYf+ucuAZykClyjVNEivwtIQ1MdZvgPRB8sa7dn5d1qxuLl2LqUz 59B957lbcqUE9xynwKIYZ75pGJjEI3JFh3nbrP3sf6s5horYnHsEaHPkxdEmPXFrzdav pjyb8NsFps6f68y+aBbOoxzX9JMtBx0Hwuw3jC8gDvWxiVj8zZxRZmry8KJ64J5YrCUH X6sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=knEMF2sPyROQdjviejviZY0AH5zbV3C0ni9r3HNpLQU=; b=NnaTeqZsv+9ghFF1puh7QEEjSAoCj59YsHADPk7zr10kL71wkEd21NVMtZOyBIkgqK yBEyaUFCN8xIbmjglI2Je0IgLenejOXcXIfjZANbqLptvDFzd6GWl3PZt2QulIbYxohu W7Y3zvFWrRP+b36qm6S4zQUDDtiAs3s1kmZG/0cFMQ/nE+pDziJ1W49pDuHvFdKmeHVF qGgY2sqcqFSEq7pc4IJ1jxZoIx/MvPX0qpVPp2IVP+Sg4UubJNFRPW32DI/LaCSbKdVr f37YCyLlZfBeFvKumi9AATomkAAA3DreWN2eZmTce0Ar5flPThlV7kpqH/6TOWT95IwK RMrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=d06Zp4vn; 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 o4si2393016ejr.495.2020.12.17.02.41.45; Thu, 17 Dec 2020 02:42:09 -0800 (PST) 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=d06Zp4vn; 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 S1727382AbgLQKja (ORCPT + 99 others); Thu, 17 Dec 2020 05:39:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726998AbgLQKj3 (ORCPT ); Thu, 17 Dec 2020 05:39:29 -0500 Received: from mail-oo1-xc2d.google.com (mail-oo1-xc2d.google.com [IPv6:2607:f8b0:4864:20::c2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C7BBC06138C; Thu, 17 Dec 2020 02:38:49 -0800 (PST) Received: by mail-oo1-xc2d.google.com with SMTP id o5so2856731oop.12; Thu, 17 Dec 2020 02:38:49 -0800 (PST) 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=knEMF2sPyROQdjviejviZY0AH5zbV3C0ni9r3HNpLQU=; b=d06Zp4vnZGfUsi5UmAFJbHncNk3H9EoNFfGevwArhnSkNDowx2CpAS+e63ItPKbdxw T/8OKRH6wDcTXLTtr2sj2o0N6+GVE2ufSo6DDIVr8gsjyS6Zitc17DC+ACvI2sPg8axf DYztnGNMUUWTGSR/H2YKXivfiNJFRz5PKN3rgGVqpjuLMQ4Y90mV3d+/c9K2d2UxAzpp /g55L9MbiLyaHe/jYYzvornQSUH0wEXJ1YuW/GoVijvuzKQzjMamdhpvjLuGh14LIlO/ wzsAbUVXOP5hv/QSG7ZSmdEmHQi/lF1+IXObVpYjxyda6PDoUsdWdpt/QNCVuSenhorl +dEQ== 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=knEMF2sPyROQdjviejviZY0AH5zbV3C0ni9r3HNpLQU=; b=pfoezMflr0DDENqyzPPwM3yZWQxZO+NHbHAaUEsA5LT+p7Yh/f3C8/w7JJ1s+DwgCu SnOEqht1a7ixjUX/Zxe4z5MAB9lYUTeapd4fPSSUtRbg+YX3HISkrqsM3HoMKK1t1v7j dObDyBgHai74T1xaMxA44b4+s9tV2p00nSuXWp0iThk7s11gwdqKt+wyxLNSuvBVPFbZ eiI4wQ8Y+dHv7aNiS1jHGwOJZVjMgTlIvvG9RUu/F03iZX9J2ihMKwRe+HVEa4FAQfq7 pxoYhT/wPVHVfPvyRgrQ3M86yWAmHNutaAyC83xXNu9qC0kIh9gWFXcdeNyuB7E3yj2R B/FQ== X-Gm-Message-State: AOAM532LGSXVHgH8GG+R1UpYK4fe1PaMhVZChZmSv7siWCughrkVoZYj uFyAkhL38uzOQHRVEaMS7dP2NJJtOEfVsaHGKE0= X-Received: by 2002:a4a:9c5:: with SMTP id 188mr19096256ooa.77.1608201528687; Thu, 17 Dec 2020 02:38:48 -0800 (PST) MIME-Version: 1.0 References: <20201122095556.21597-1-sergio.paracuellos@gmail.com> <20201122095556.21597-3-sergio.paracuellos@gmail.com> <160819550615.1580929.14234996916739809712@swboyd.mtv.corp.google.com> <160819962346.1580929.2348154780751858972@swboyd.mtv.corp.google.com> <160820116913.1580929.15821601182796836787@swboyd.mtv.corp.google.com> In-Reply-To: <160820116913.1580929.15821601182796836787@swboyd.mtv.corp.google.com> From: Sergio Paracuellos Date: Thu, 17 Dec 2020 11:38:37 +0100 Message-ID: Subject: Re: [PATCH v4 2/6] dt: bindings: add mt7621-clk device tree binding documentation To: Stephen Boyd Cc: Michael Turquette , Rob Herring , John Crispin , Thomas Bogendoerfer , Greg KH , Chuanhong Guo , Weijie Gao , COMMON CLK FRAMEWORK , linux-kernel , "open list:MIPS , open list:STAGING SUBSYSTEM , NeilBrown , open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 17, 2020 at 11:32 AM Stephen Boyd wrote: > > Quoting Sergio Paracuellos (2020-12-17 02:14:10) > > On Thu, Dec 17, 2020 at 11:07 AM Stephen Boyd wrote: > > > > > > Quoting Sergio Paracuellos (2020-12-17 02:01:39) > > > > > > > > On Thu, Dec 17, 2020 at 9:58 AM Stephen Boyd wrote: > > > > > > > > > > Quoting Sergio Paracuellos (2020-11-22 01:55:52) > > > > > > > > > > > diff --git a/Documentation/devicetree/bindings/clock/mediatek,mt7621-clk.yaml b/Documentation/devicetree/bindings/clock/mediatek,mt7621-clk.yaml > > > > > > new file mode 100644 > > > > > > index 000000000000..6aca4c1a4a46 > > > > > > --- /dev/null > > > > > > +++ b/Documentation/devicetree/bindings/clock/mediatek,mt7621-clk.yaml > > > > > > > > > > > + compatible = "mediatek,mt7621-sysc", "syscon"; > > > > > > + reg = <0x0 0x100>; > > > > > > + > > > > > > + pll { > > > > > > > > > > clock-controller? Why can't the parent device be the clk provider and > > > > > have #clock-cells? > > > > > > > > > > > > > I don't get your point, sorry. Can you please explain this a bit more > > > > or point to me to an example to understand the real meaning of this? > > > > > > It looks like this is a made up child node of syscon so that a driver > > > can probe in the kernel. It would be more DT friendly to create a > > > platform device from the parent node's driver, or just register the clks > > > with the framework directly in that driver. > > > > We cannot create a platform device because we need clocks available in > > 'plat_time_init' before setting up the timer for the GIC. > > The only way I see to avoid this syscon and having this as a child > > node is to use architecture operations in > > 'arch/mips/include/asm/mach-ralink/ralink_regs.h' > > instead of getting a phandle using the regmap is being currently used... > > Can that be done with > > CLK_OF_DECLARE_DRIVER("mediatek,mt7621-sysc", my_timer_clk_init) > > ? Is the syscon used anywhere besides by the clk driver? Yes, for example all the gates use them to access SYSC_REG_CLKCFG1 in all of their 'mt7621_gate_ops' and also in all 'recalc_rate' functions where SYSC_REG_SYSTEM_CONFIG0, is readed.