Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1116399pxu; Thu, 17 Dec 2020 02:35:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJxFEgHuIlXrJbtnaijevU04068YH8DdAo6nOiCyasUyMnsnvZ3v/s2E+VuH00JJqQBZ7Yhp X-Received: by 2002:a17:906:2707:: with SMTP id z7mr34963938ejc.418.1608201323822; Thu, 17 Dec 2020 02:35:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608201323; cv=none; d=google.com; s=arc-20160816; b=jO9ZUHzvLZOQd00+P3zZl0g1LfRxQNgpn8hTiMmsMEfpouvCKZWBoqRuCPU8DpHCyW oJjvCjtlJJ+QYrDJo1ZbRRncT6Wd0KjCY2HBYYru7lOcLTHdgIqCTVgG8iqCV5SrOAiQ qUuBerm1fRqwbqXkV9HMLHyc1wZzKpt9fOVTqFU66QAzQpWyujA81SQX910WziYynB0d CJROus09166x9dTRV5HYdxRLOLBKAiKz+t9adGv/ZSPas9RsevGOxGQxHyeQt/plfam+ rIrQal1Bra1Axwwyuf4Up/icEhQTYayArbt9lC9FOmYjYjADpT1dE5cPf2tPoP7Vi5UN lL/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=HA2fECqXdKPCPgneEmb2IIMPbahcOltm4wPhFyWp3M0=; b=i0w68gf6uu6vDMiZOjyaxcCptNDgFacZXNsj2QZB8gzkF53s/HIw3gKmiZFpfU1SWA nfL49bHQ4zeyl90sBs5z3XmBpqNHs4Fi5/+4i7vCuKOLa6u3gAH0S+wxcttQ3mt21CMA hLLI/GK5zrCFq/TwlABwuXcuM13X6IoFbxrrAF3Qbbmu1r8mBHyoZs+uxrSTgtQsWEl7 HK8DkM/9RnrMIWsK55pj761R/71cUBVsUEhQMhYyBEUblGRB/fOqSpjpKrO0y+T/ZyWr xLccF+uT5ewYnrDOTuKrrJxsGLOanS1ECTWu4KkgfEdz/k3UbX5y/BkImuGeywUuewzX ixFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kIKPbQXT; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h8si2806303ejj.161.2020.12.17.02.35.00; Thu, 17 Dec 2020 02:35:23 -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=@kernel.org header.s=k20201202 header.b=kIKPbQXT; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726580AbgLQKdc (ORCPT + 99 others); Thu, 17 Dec 2020 05:33:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:53740 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725930AbgLQKdb (ORCPT ); Thu, 17 Dec 2020 05:33:31 -0500 Content-Type: text/plain; charset="utf-8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1608201170; bh=Zz4IiQ8am45tfhmW1b2/exsoF0+5osn1Yg4Hf+pvegI=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=kIKPbQXTn+71fFaVOlhcJ+34OCgy2TL+rLW8pFpeIWHRZDdEK7maA/gqbcyDEAIpj 9oDEQF7dFdD9e3Qt5uO6tGdYRhU3o8pQjbuNg69RX2vwPEx/lsV1UFcQALIF/4Ryvu WjX4x7sDvp2cnXXCpdT0aWkKSI7X2TGxtI+1JOL1aJzfDjakQxjFQaO4vDnZfMEX+4 PaQHYEBvY7KDb1lSsQMg2FRrDsiKK+WB1thld5jVQWBdwmdeQXkoaTZj/Aa5CEhWF5 QUucacCNWqo9GdiO/TVjncDQNGaa/LS8ApzrD8HNQ9f008EGJ/RyYBcJ6uPxbMDKVr UXrraz9vDhjGA== MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: 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> Subject: Re: [PATCH v4 2/6] dt: bindings: add mt7621-clk device tree binding documentation From: 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" To: Sergio Paracuellos Date: Thu, 17 Dec 2020 02:32:49 -0800 Message-ID: <160820116913.1580929.15821601182796836787@swboyd.mtv.corp.google.com> User-Agent: alot/0.9.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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,mt7= 621-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 =3D "mediatek,mt7621-sysc", "syscon"; > > > > > + reg =3D <0x0 0x100>; > > > > > + > > > > > + pll { > > > > > > > > clock-controller? Why can't the parent device be the clk provider a= nd > > > > 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. >=20 > 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?