Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1241794pxb; Wed, 10 Feb 2021 03:51:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyT1Itz/cygvcRKqeHHrPad6OxPb8ZpgQ88tlAM9QoOLUnEWLBm3XWt5Q7dNDGy5RDV+Yhk X-Received: by 2002:a17:906:c08e:: with SMTP id f14mr2688514ejz.388.1612957869165; Wed, 10 Feb 2021 03:51:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612957869; cv=none; d=google.com; s=arc-20160816; b=vNiBbyO6zaHLBGHKUn6JsPsfuK45s6oLfJ12n76zGreMvLgo56DCeYsPTrkXC2lAfR QcBzbfzfirtjZZrrbpJhP+ePRlk6zxbwpG5kSbDsU/P7MVCIMBJ76fM0q/JcUpfHRPTo QptCwUHBL9ilT+QpJVTmSPH5e+STuYIs7h81/kI5uUfCfof2ECH4TTqw0rkzRn/l64zn 0/LqND1/wFAiDFVxycaM0Qb0l5Rnb753/E8Eq4STFfNb+DFZE1YmVXBD+g0i0FYUuzwL iwSnN4twsPeW3q95vSV+iWwV8M+4Dmxvqml4JZje4dAO1VH6snLEjAwHZFdYSrY6MwEM gL4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:subject:from :references:cc:to; bh=EX1vde9elYftPoOI8mBif1aNydadk/nb6Cka05ZQ91U=; b=eKcD1+LbW7NaMtLHuUltA9dTPhb7he8j/iPGLLteCcfiqDZfakNdJpyowuxDm+uegS B2wA5/zpI+Mj+yxJg8swWJi/SYfbQmDY9WaINXz/+b9xdig7Gek1254pScoDSIDDf3f6 mIBZVNuP6WptWbVy1O5LHoDcIH/qEQLeURsSO28XXoQTVzfVQCtRw3jOeuXcBQjS8l75 duY5cXHhgiWhQAA1m5Xxw3jRHH6K4/+2PxeNm5coD3Uq+VcFIYNBt4zCnN29/7ZOXN0X ejErORxmzRlFGpst7iYY2j3W0FKdwd/9vU89lsAMPjQdUp9gRPw9rwuZUgKcavfBtDXm AwHQ== 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 f10si1174384edc.491.2021.02.10.03.50.45; Wed, 10 Feb 2021 03:51: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; 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 S231166AbhBJLr3 (ORCPT + 99 others); Wed, 10 Feb 2021 06:47:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230526AbhBJLos (ORCPT ); Wed, 10 Feb 2021 06:44:48 -0500 Received: from mail.marcansoft.com (marcansoft.com [IPv6:2a01:298:fe:f::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3424DC0617A7; Wed, 10 Feb 2021 03:43:43 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: marcan@marcan.st) by mail.marcansoft.com (Postfix) with ESMTPSA id 1385141EE3; Wed, 10 Feb 2021 11:43:38 +0000 (UTC) To: Tony Lindgren Cc: Arnd Bergmann , devicetree@vger.kernel.org, Marc Zyngier , linux-kernel@vger.kernel.org, Krzysztof Kozlowski , soc@kernel.org, robh+dt@kernel.org, Olof Johansson , linux-arm-kernel@lists.infradead.org References: <20210204203951.52105-1-marcan@marcan.st> <20210204203951.52105-19-marcan@marcan.st> <20210208110441.25qc6yken4effd6c@kozik-lap> <4481998a-27f6-951e-bb4f-a9d2b95f211f@marcan.st> From: Hector Martin Subject: Re: [PATCH 18/18] arm64: apple: Add initial Mac Mini 2020 (M1) devicetree Message-ID: <4dd911d8-ce84-bf4d-3aae-95ef321b4a97@marcan.st> Date: Wed, 10 Feb 2021 20:43:37 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: es-ES Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/02/2021 20.34, Tony Lindgren wrote: > * Hector Martin [210210 11:14]: >> That means it'll end up like this (so that we can have more than one >> fixed-clock): >> >> clocks { >> #address-cells = <1>; >> #size-cells = <0>; >> >> clk123: clock@0 { >> ... >> reg = <0> >> } >> >> clk456: clock@1 { >> ... >> reg = <1> >> } >> } >> >> Correct? > > Yeah, just don't use an imaginary dummy index for the reg. Use a real > register offset from a clock controller instance base, and a register > bit offset too if needed. I mean for fixed input clocks without any particular numbering, or for temporary fake clocks while we figure out the clock controller. Once a real clock controller is involved, if there are hardware indexes involved that are consistent then of course I'll use those in some way that makes sense. The purpose of the clock in this particular case is just to make the uart driver work, since it wants to know its reference clock; there is work to be done here to figure out the real clock tree (e.g. we don't even know yet if the uart supports alternate clocks, that's tricky to test until we have some form of I/O other than uart!). > Doing it right will save you tons of time later on ;) Absolutely, I'm just pointing out that instances of it being done right are in short supply right now :-) (which makes it tricky for people like me, trying to put this together for a new soc, to guess what the right approach is by looking at existing examples) -- Hector Martin (marcan@marcan.st) Public Key: https://mrcn.st/pub