Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5018196pxj; Wed, 26 May 2021 00:21:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBwR0ndsCerK30Q/35xR4zQfE+ZR91wPKhDxFJ9XwTyOktMCwx+nH1Kni60pcK2MZ2aX4f X-Received: by 2002:a05:6402:7d7:: with SMTP id u23mr36171569edy.196.1622013700502; Wed, 26 May 2021 00:21:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622013700; cv=none; d=google.com; s=arc-20160816; b=kQFkqElt1U1F/9NwttHyqyRb+M52ndcDo/9CIGW8XWLdbZCK4OgsfjuZG9BFxRpsEH Tkaz2N5Ms9KmyNBWI7mM7B9cpsd5ll2zA6gazD07PhXzA11j7bBuBiCZbWFPAB/bykzu dt6nOUno6orxcOQT6ucv1NQq4QEltXbkBZuBDfHJbvVKGf47xqapY+CKeZjOPW/xmiS8 kJnCz59AI/iPHoY9HED2ZoAqrAjjzthKkVDtmQS4EjTfrtboM2V/KZ9wWYJuocP3OqeU gydbgFsyEks++eSoS3S0i+rwsp4PxpzhIPzpe2ELnpTi/zoL6uALpjMBc7yJ9gVpHWtz /dOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=paRx9Y7tZwyexahj2Zy+NJysDafuA5ISe0ykQ+1p6qs=; b=TdLu98nk+sSyIev7g8bkymSh92mt759B+nTB0+FV90fkaeQayr0lxHoGSMAI0CygsH UmlPRH2aMeMGVzcYBoIB8/cm6DKsBEambHiM9J1Pa93dyv7VPRrwViNb5LUdmDIqACwk JBDk6aLfQExMCqaRW4QOgVObLjCVlB/8zmw5Lz3ZheNz7Rb78TM+jPHLpCBn6j0P/wnh JYeT5uR5p07lBY//o7S4fELV9/0Hnls4+TbSMJmRYBAtQO10SylZoxpf/KypT+ypj/1Z 27JUx3KH3tmsHLBm6CjugTtM/InDD8EuoFZ8Phi4wpFdXqQflWzCA0fB83lijsfN0UJn mvgQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nb17si19280254ejc.226.2021.05.26.00.21.16; Wed, 26 May 2021 00:21:40 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233016AbhEZHTt (ORCPT + 99 others); Wed, 26 May 2021 03:19:49 -0400 Received: from muru.com ([72.249.23.125]:60568 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233030AbhEZHTq (ORCPT ); Wed, 26 May 2021 03:19:46 -0400 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 581CE80AE; Wed, 26 May 2021 07:18:19 +0000 (UTC) Date: Wed, 26 May 2021 10:18:10 +0300 From: Tony Lindgren To: Rob Herring Cc: Sven Peter , devicetree@vger.kernel.org, linux-clk , linux-arm-kernel , "linux-kernel@vger.kernel.org" , Hector Martin , Michael Turquette , Stephen Boyd , Mark Kettenis , Arnd Bergmann Subject: Re: [PATCH 0/3] Apple M1 clock gate driver Message-ID: References: <20210524182745.22923-1-sven@svenpeter.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, * Rob Herring [210525 18:09]: > I would do a single node per mmio region with the register offset (or > offset / 4) being the clock id. This can still support new SoCs easily > if you have a fallback compatible. If you want/need to get all the > clocks, just walk the DT 'clocks' properties and extract all the IDs. I mostly agree.. Except I'd also leave out the artificial clock ID and just use real register offsets from the clock controller base instead. So a single clock controller node for each MMIO range, then set #clock=cells = <1>. Then the binding follows what we have for the interrupts-extended binding for example. If the clock controller optionally needs some data in the dts, that can be added to the clock controller node. Or it can be driver internal built-in data. If the data for dts can be described in a generic way, even better :) This would make the consumer interface look like below with a clock controller node and register offset from it: clocks = <&clock_controller1 0x1234>; Regards, Tony