Re: [PATCH 2/9] dt-bindings: soc: google: Add Google Tensor CPM binding

From: Krzysztof Kozlowski

Date: Wed Nov 25 2026 - 03:32:12 EST


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_<N>" 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?
>>
>>> 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?

And if you do not have the source code, then not a binding, so you won't
have case like:
https://lore.kernel.org/all/20261124-qcom-adsp-shared-vmid-fixes-v1-1-f1a808dc41a5@xxxxxxxxxxxxxx/

Best regards,
Krzysztof