Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp506351pxj; Wed, 2 Jun 2021 04:53:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTSl0vmBbiMMvoubsw7dDSrQ3wHr1MG9861+Zep4NG6DMtDIQBkkngbdu7R3splRwqzB1R X-Received: by 2002:a17:906:26ce:: with SMTP id u14mr33333503ejc.187.1622634788335; Wed, 02 Jun 2021 04:53:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622634788; cv=none; d=google.com; s=arc-20160816; b=tEQvCPfLoyLACHMNj8R+JjI9YP4tlUgyPejOFidbFpKfW0x2xQqUJZSgwHpy3PO+JU tgycoqFwj3FA1jyp5DrfH6OjP6ojDyJVv3XMi+pHuUzvjis8N6KXgiMgTrln26NNrfxC CbbcXwennc7Q8vTcCBEa6eZ1dPpvSvR3motXQI7j/QVwx5ztl4s6lQUowZPcz472CdWf JT80RKFA19ltqcb8pwlY6tZrlDnLrF4dRbVFrNYlp2BFrNEFzkm8Q3JtXNXDxVKYujAs FN9rtgyp4A5eZSDeAjkUqTn2nPBctqWk17sZz6ebOOaL71AR7vWfbV8Yqh+zIjIU1JbF /TGw== 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=uGKIKixtMGw5DUFHU+bdjqfTE3xhZC2kpMmCt0b+DmM=; b=zDcON+x5Klj1WWwuSG5lrb6VHWDt6VYY4M1fVw85Df/fOZ+2O9sD6DWa63prsfjRMS YSzWfMMJ6HuJxLD9jevyWQKofJ/fcrQAKAtRXvZQPHb60w22WgHrKaEleiJ41ghdvIdP TYZ1pY7j05FOOSSXa3uFlz2u4fTsBY4lUPO0pM+66LNX2ZZWpV4fyPhyZtX42zEioycM 9Q49B1dB+Fn437vEGK0qhQBq4y7MulyOeYbFhgS5hVywJfgseN6AXIGI2dzQxoIoYx36 FOh4UFt0sutoT1RGFIvsczwrDp0TBvetZJQaiWFyOyBT0G85kUagBIejjbhJNRwRAJ2Q tF9g== 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 a19si1782197edy.189.2021.06.02.04.52.45; Wed, 02 Jun 2021 04:53:08 -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 S231915AbhFBJ3z (ORCPT + 99 others); Wed, 2 Jun 2021 05:29:55 -0400 Received: from muru.com ([72.249.23.125]:35376 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229618AbhFBJ3y (ORCPT ); Wed, 2 Jun 2021 05:29:54 -0400 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id D0BED8027; Wed, 2 Jun 2021 09:28:16 +0000 (UTC) Date: Wed, 2 Jun 2021 12:28:06 +0300 From: Tony Lindgren To: Sven Peter Cc: Rob Herring , 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> <6052f2f1-1e3f-474e-a767-e08ca19fbd43@www.fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6052f2f1-1e3f-474e-a767-e08ca19fbd43@www.fastmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Sven Peter [210530 11:11]: > The problem with that approach is that to enable e.g. UART_0 we actually need > to enable its parents as well, e.g. the Apple Device Tree for the M1 has the > following clock topology: > > UART0 (0x23b700270), parent: UART_P > UART_P (0x23b700220), parent: SIO > SIO (0x23b7001c0), parent: n/a > > The offsets and the parent/child relationship for all of these three clocks > change between SoCs. If I now use the offset as the clock id I still need > to specify that if e.g. UART uses <&clk_controller 0x270> I first need > to enable 0x1c0 and then 0x220 and only then 0x270. Maybe take a look what I suggested on using assigned-clocks and related properties in the clock controller node. That might solve the issue in a generic way for other SoCs too. Regards, Tony