[PATCH 2/9] dt-bindings: soc: google: Add Google Tensor CPM binding
Brian Norris
briannorris at chromium.org
Mon Nov 2 18:36:18 PST 2026
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?
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.
> > +#define CPM_IRQ_AOC_MAX 156
> > +#define CPM_IRQ_AP_GDMC_WAKE 157
> > +
> > +#endif /* _DT_BINDINGS_INTERRUPT_CONTROLLER_IRQ_CPM_H */
> > --- /dev/null
> > +++ b/include/dt-bindings/soc/google,lga-lpcm.h
> > @@ -0,0 +1,54 @@
> > +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
> > +
> > +#ifndef __DT_BINDINGS_SOC_GOOGLE_LGA_LPCM_H
> > +#define __DT_BINDINGS_SOC_GOOGLE_LGA_LPCM_H
> > +
> > +/*
> > + * LPCM IDs of each SSWRP.
> > + */
> > +#define LGA_LPCM_CPM 0
>
> What are all these?
The binding doc says:
Each reset is specified by an LPCM ID (cell 1) and a reset ID (cell 2).
See <dt-bindings/soc/google,lga-lpcm.h> for LPCM IDs and
<dt-bindings/reset/google,lga-cpm-reset.h> for reset IDs.
and
Each clock is specified by an LPCM ID (cell 1) and a clock ID (cell
2). See <dt-bindings/soc/google,lga-lpcm.h> for LPCM IDs and
<dt-bindings/clock/google,lga-cpm.h> for clock IDs.
These are the IDs used in the firmware interface to talk about these
things, as many of the SoC resources involved (clocks, resets, power
domains) are grouped in this way (by subsystem (SSWRP / LPCM), and then
with indexing within each subsystem).
In reading again, I see that the definitions and explanation of these
terms and the SoC organization are split a bit between the pmdomain
commit message and the binding doc. Where would you prefer I elaborate
more? In the binding doc, the comments here, or both?
Or are you suggesting these IDs should be allocated/structured
differently?
Brian
> Best regards,
> Krzysztof
More information about the linux-arm-kernel
mailing list