From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F035606A31E for ; Wed, 25 Nov 2026 19:14:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=zh97BfvN; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=QPKUAL1k DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=2Mxaj7MSnWu+9ygVGHzFTKYO5aL6o7ueBK40srZALsk=; b=zh97BfvNR5PzJIlYkJOl5Txj6T gepjqHvFTCL9et4wqHdAzAZZ5FakuXYqeplNBdrNOUDDNpW9L/2ikpSFimzEb5FQFpA+rN14bUUZ0 hgJBL1ZkVWOaQ6eTu7j+JuPegosSgVW7n9XdheBupb8mHRJSEfbWxOX94oPiC8/ivH0NUNGP4mFUc vRCqXs2tUr69sOEixMLMzzcl6osbXq7vsnhPnUOGYqzdN1948YGH+1QKV5UdXb6+tBR8nvdrZn0lJ Qhgo4KlUSECLanZEM5KHGsNxkUsRsyq2JRxhdIhe4Hn6XFW4gOMfaxb1jRM/cKREESSlmq8etKTsy USoCf5uQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xWIRf-0000000B6Jh-0mwD; Wed, 25 Nov 2026 19:14:19 +0000 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xWIRc-0000000B6Ir-0kdS for linux-arm-kernel@lists.infradead.org; Wed, 25 Nov 2026 19:14:17 +0000 Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-3ae2b7e1e17so3985807a91.3 for ; Wed, 25 Nov 2026 11:14:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1795634055; x=1796238855; darn=lists.infradead.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=2Mxaj7MSnWu+9ygVGHzFTKYO5aL6o7ueBK40srZALsk=; b=QPKUAL1kAntlSMxztX8PoyLC9fWf/BINYZJcuxiEDG06rl/JgaplENTeN+AE8wd5rb JOMdzpQdt3lMPKEklcacB2wQc7iXrqmDOGcOZLZp3+2FGsm21tPerhpP3dIGxghOCW1n Cbrw5KqCvGyBykJrAfL7hLCxvgxF9ywuAq194= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795634055; x=1796238855; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=2Mxaj7MSnWu+9ygVGHzFTKYO5aL6o7ueBK40srZALsk=; b=B3RYcbcAZ3EXA/wyiZJXaBkc5xgp7z7BaY6tbxdc71U9mp3ecdbyUXeU0PKECdcVUV uXa+KdPZKqjTlSJA6hQt7K09xvPAsnHM3KbbW2DVu9fORPkBlBhj4dsvN/wydZEt1uNN HVWKwrjedeyCv0wHwcvDprZ2Z/vL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2aKv7entKaO7pU89sp3gi2OlTiXhBCzk= X-Received: by 2002:a17:90a:d607:b0:3a4:ad5c:d48a with SMTP id 98e67ed59e1d1-3b41c97c8acmr18800018a91.67.1795634055227; Wed, 25 Nov 2026 11:14:15 -0800 (PST) Received: from localhost ([2a00:79e0:2e7c:8:d0a2:f616:6ba:a1ce]) by smtp.gmail.com with UTF8SMTPSA id 98e67ed59e1d1-3b40578dca0sm32183592a91.2.2026.11.25.11.14.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Nov 2026 11:14:14 -0800 (PST) Date: Wed, 25 Nov 2026 11:14:12 -0800 From: Brian Norris To: Krzysztof Kozlowski Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stephen Boyd , Brian Masney , Jerome Brunet , Thomas Gleixner , Ulf Hansson , Philipp Zabel , Peter Griffin , devicetree@vger.kernel.org, Tudor Ambarus , =?iso-8859-1?Q?Andr=E9?= Draszik , linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Radu Rendec , linux-arm-kernel@lists.infradead.org, Mariano Marciello , Douglas Anderson , linux-clk@vger.kernel.org, Jakub =?utf-8?B?R8WCb3dhY2tp?= Subject: Re: [PATCH 2/9] dt-bindings: soc: google: Add Google Tensor CPM binding Message-ID: References: <20261026214359.3122870-1-briannorris@chromium.org> <20261026144346.2.Ib692ddd35c1dbea1757d9b1db6c1c7e938fc4ea6@changeid> <20261028-rapid-daffodil-rat-0adc6a@quoll> <72ef7ef8-acc8-4ad5-9c09-76d9e944bf5c@kernel.org> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261125_111416_273895_ACAC8C30 X-CRM114-Status: GOOD ( 46.34 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-10.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Wed, Nov 25, 2026 at 09:31:54AM +0100, Krzysztof Kozlowski wrote: > On 25/11/2026 08:07, Krzysztof Kozlowski wrote: > > On 13/11/2026 02:14, Brian Norris wrote: > >> Hi Krzysztof, > >> > >> On Thu, Nov 05, 2026 at 07:54:22PM +0100, Krzysztof Kozlowski wrote: > >>> On 03/11/2026 03:36, Brian Norris wrote: > >>>> On Wed, Oct 28, 2026 at 02:19:23PM +0100, Krzysztof Kozlowski wrote: > >>>>> On Mon, Oct 26, 2026 at 02:43:40PM -0700, Brian Norris wrote: > >>>> > >>>>>> --- /dev/null > >>>>>> +++ b/include/dt-bindings/interrupt-controller/irq-cpm-google.h > >>>>>> @@ -0,0 +1,16 @@ > >>>>>> +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ > >>>>>> +/* > >>>>>> + * This header provides constants for CPM IRQ. > >>>>>> + * > >>>>>> + * Copyright 2025-2026 Google LLC > >>>>>> + * > >>>>>> + */ > >>>>>> +#ifndef _DT_BINDINGS_INTERRUPT_CONTROLLER_IRQ_CPM_H > >>>>>> +#define _DT_BINDINGS_INTERRUPT_CONTROLLER_IRQ_CPM_H > >>>>>> + > >>>>>> +#define CPM_IRQ_RTC_ALARM_NO 0 > >>>>> > >>>>> Keep naming consistent. Clocks has _CLK suffix, so this should not use > >>>>> prefix. > >>>>> > >>>>> > >>>>>> +#define CPM_IRQ_AOC_MIN 7 > >>>>> > >>>>> Anyway, ABI constants should be indexed from 0 and incremented by 1. > >>>> > >>>> What do you mean by this? Do I need to make up names for the > >>>> unused IDs between 0 and 7? On an initial search, I don't believe they > >>>> have any meaning at all. Does that mean I should make up some kind of > >>>> "RESERVED_" naming here? > >>> > >>> No, I meant CPM_IRQ_AOC_MIN is 1. > >>> > >>>> > >>>> Between 7 and 156, these are just ... 150 different "service numbers" > >>>> within the AOC (Always On Connectivity) subsystem. I can name them > >>>> AOC_0, AOC_1, ... AOC_149 if that helps. > >>>> > >>>> Or are you suggesting that I pack the actual use cases (so, 0 and 7-157) > >>>> into 0-151? I thought it was valuable to directly use the firmware > >>>> indexing where possible; if I change those, then the indexing loses its > >>>> inherent meaning, and we also have to add another layer of translation. > >>> > >>> We do not use hardware numbers as bindings and ABI, because that's > >>> pointless - no benefits, only risks. Similarly you do not define GIC > >>> interrupt numbers, pinctrl pin numbers, MMIO addresses as bindings. None > >>> of these bind anything between DTS and software, so not a binding. > >> > >> OK, I see your point about the distinction between hardware numbers and > >> bindings. So are firmware-protocol-defined numbers more like hardware > >> numbers or bindings? I'm not sure if you answered this question. I'm inferring "hardware numbers". > >>> There are some exceptions like SCMI firmware, but that's not the case here. > >> > >> It's funny you mention that, because that's exactly what Jerome compared > >> this to in the clk, reset, and pmdomain portions. > >> > >> These values are used literally in the firmware interface, so I'd > >> consider them very similar to SCMI firmware protocol IDs (and, not that > > > > Sure, where is the source code of the firmware then? In case this is a non-rhetorical question: it's proprietary. I have access, but it's not open source. > And if you do not have the source code, then not a binding, To be clear (I added some of this to your other recent reply too): 1) in v2 I dropped LPCM IDs from include/dt-bindings/ 2) they're completely gone from the clock DTS (the indirection is in the driver now) 3) they remain in the DTS for resets, as naming documentation So agreed, not a "binding" (if my above "distinction" interpretation was correct). But the numbers still may be appropriate in the device tree. And I don't understand where source code has anything to do with it. My understanding was that we treat firmware very similar to hardware -- it's opaque, and has IDs that we can rely on, if they're part of the ABI we use to communicate with the remote firmware. (If those ABI IDs change arbitrarily, e.g., on vendor firmware updates, that seems like a problem regardless of whether it's mapped directly in the device tree or in the driver. And I accept that if Google makes such poor decisions, we live with the damage -- possibly including having to update device trees. I do not believe Google tends to make such breaking changes, as it causes difficulties even in a non-upstream-Linux context.) > so you won't > have case like: > https://lore.kernel.org/all/20261124-qcom-adsp-shared-vmid-fixes-v1-1-f1a808dc41a5@mainlining.org/ I'm not quite sure where that's relevant. To me, that's not much different than somebody reading the SoC datasheet wrong and getting the GIC interrupt number wrong. It's not really an argument about ABI breakage; it was just a simple mistake, where obviously the previous assignment never worked. It also has seems to have nothing to do with access to source code. One doesn't require a public data sheet for every driver either. Or are you simply concerned about putting such error-prone things in include/dt-bindings/ ? Because in v2, there are no such HW/FW-assigned identifiers in include/dt-bindings/ -- all FW numbers are either purely in DTS (simple mappings like IRQ and resets), or in per-SoC indirection tables in drivers (clock and pmdomain). Brian