mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: "Douglas Anderson" <dianders@chromium.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Peter Griffin" <peter.griffin@linaro.org>,
	"André Draszik" <andre.draszik@linaro.org>,
	"Tudor Ambarus" <tudor.ambarus@linaro.org>
Cc: linux-samsung-soc@vger.kernel.org, Roy Luo <royluo@google.com>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Chen-Yu Tsai <wenst@chromium.org>,
	Julius Werner <jwerner@chromium.org>,
	William McVicker <willmcvicker@google.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] dt-bindings: arm: google: Add bindings for frankel/blazer/mustang
Date: Wed, 12 Nov 2025 08:58:40 +0100	[thread overview]
Message-ID: <05c833f0-15bc-4a86-9ac4-daf835fe4393@kernel.org> (raw)
In-Reply-To: <20251111112158.1.I72a0b72562b85d02fee424fed939fea9049ddda9@changeid>

On 11/11/2025 20:22, Douglas Anderson wrote:
> Add top-level DT bindings useful for Pixel 10 (frankel), Pixel 10 Pro
> (blazer), and Pixel 10 Pro XL (mustang).
> 
> Since overlays are fairly well-supported these days and the downstream
> Pixel bootloader assumes that the SoC is the base overlay and specific
> board revisions are overlays, reflect the SoC / board split in the
> bindings.
> 
> The SoC in the Pixel 10 series has the marketing name of "Tensor
> G5". Despite the fact that it sounds very similar to the "Tensor G4",
> it's a very different chip. Tensor G4 was, for all intents and
> purposes, a Samsung Exynos offshoot whereas Tensor G5 is entirely its
> own SoC. This SoC is known internally as "laguna" and canonically
> referred to in code as "lga". There are two known revisions of the
> SoC: an A0 pre-production variant (ID 0x000500) and a B0 variant (ID
> 0x000510) used in production. The ID is canonicaly broken up into a
> 16-bit SoC product ID, a 4-bit major rev, and a 4-bit minor rev.
> 
> The dtb for all supported SoC revisions is appended to one of the boot
> partitions and the bootloader will look at the device trees and pick
> the correct one. The current bootloader uses a downstream
> `soc_compatible` node to help it pick the correct device tree. It
> looks like this:
>   soc_compatible {
>     B0 {
>       description = "LGA B0";
>       product_id = <0x5>;
>       major = <0x1>;
>       minor = <0x0>;
>       pkg_mode = <0x0>;
>     };
>   };
> Note that `pkg_mode` isn't currently part of the ID on the SoC and the
> bootloader always assumes 0 for it.
> 
> In this patch, put the SoC IDs straight into the compatible. Though
> the bootloader doesn't look at the compatible at the moment, this
> should be easy to teach the bootloader about.
> 
> Boards all know their own platform_id / product_id / stage / major /
> minor / variant. For instance, Google Pixel 10 Pro XL MP1 is:
> * platform_id (8-bits): 0x07 - frankel/blazer/mustang
> * product_id (8-bits):  0x05 - mustang
> * stage (4-bits):       0x06 - MP
> * major (8-bits):       0x01 - MP 1
> * minor (8-bits):       0x00 - MP 1.0
> * variant (8-bits):     0x00 - No special variant
> 
> When board overlays are packed into the "dtbo" partition, a tool
> (`mkdtimg`) extracts a board ID and board rev from the overlay and
> stores that as metadata with the overlay. Downstream, the dtso
> intended for the Pixel 10 Pro XL MP1 has the following properties at
> its top-level:
>   board_id = <0x70506>;
>   board_rev = <0x010000>;
> 
> The use of top-level IDs can probably be used for overlays upstream as
> well, but also add the IDs to the compatible string in case it's
> useful.
> 
> Compatible strings are added for all board revisions known to be
> produced based on downstream sources.
> 
> A few notes:
> * If you look at `/proc/device-tree/compatible` and
>   `/proc/device-tree/model` on a running device, that won't
>   necessarily be an exact description of the hardware you're running
>   on. If the bootloader can't find a device tree that's an exact match
>   then it will pick the best match (within reason--it will never pick
>   a device tree for a different product--just for different revs of
>   the same product).
> * There is no merging of the top-level compatible from the SoC and
>   board. The compatible string containing IDs for the SoC will not be
>   found in the device-tree passed to the OS.
> 
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
> In the past, attempts to have the SoC as a base device tree and boards
> supported as overlays has been NAKed. From a previous discussion [1]
> "Nope, boards are not overlays. Boards are DTB." I believe this needs
> to be relitigated.
> 
> In the previous NAK, I didn't see any links to documentation
> explicitly stating that DTBs have to represent boards. It's also
> unclear, at least to me, _why_ a DTB would be limited to represent a
> "board" nor what the definition of a "board" is.
> 
> As at least one stab at why someone might not want an overlay scheme
> like this, one could point out that the top-level compatible can be a
> bit of a mess. Specifically in this scheme the board "compatible" from
> the overlay will fully replace/hide the SoC "compatible" from the base
> SoC. If this is truly the main concern, it wouldn't be terribly hard
> to add a new semantic (maybe selectable via a new additional
> property?) that caused the compatible strings to be merged in a
> reasonable way.
> 
> Aside from dealing with the compatible string, let's think about what
> a "board" is. I will make the argument here that the SoC qualifies as
> a "board" and that the main PCB of a phone can be looked at as a
> "cape" for this SoC "board". While this may sound like a stretch, I
> would invite a reader to propose a definition of "board" that excludes
> this. Specifically, it can be noted:
> * I have a development board at my desk that is "socketed". That is, I
>   can pull the SoC out and put a different one in. I can swap in a
>   "rev A0" or a "rev B0" SoC into this socket. Conceivably, I could
>   even put a "Tensor G6", G7, G8, or G999 in the socket if it was
>   compatible. In this sense, the "SoC" is a standalone thing that can
>   be attached to the devboard "cape". The SoC being a standalone thing
>   is in the name. It's a "system" on a chip.
> * In case the definition of a board somehow needs a PCB involved, I
>   can note that on my dev board the CPU socket is soldered onto to a
>   CPU daughtercard (a PCB!) that then has a board-to-board connector
>   to the main PCB.
> * Perhaps one could argue that a dev board like I have describe would
>   qualify for this SoC/board overlay scheme but that a normal cell
>   phone wouldn't because the SoC isn't removable. Perhaps removability
>   is a requirement here? If so, imagine if some company took a
>   Raspberry Pi, soldered some components directly onto the "expansion"
>   pins, and resold that to consumers. Does this mean they can't use
>   overlays?
> 
> To me, the above arguments justify why SoC DTBs + "board" overlays
> should be accepted. As far as I can tell, there is no downside and
> many people who would be made happy with this.
> 
> [1] https://lore.kernel.org/all/dbeb28be-1aac-400b-87c1-9764aca3a799@kernel.org/
> 
>  .../devicetree/bindings/arm/google.yaml       | 87 +++++++++++++++----
>  1 file changed, 68 insertions(+), 19 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/arm/google.yaml b/Documentation/devicetree/bindings/arm/google.yaml
> index 99961e5282e5..f9f9ea1c8050 100644
> --- a/Documentation/devicetree/bindings/arm/google.yaml
> +++ b/Documentation/devicetree/bindings/arm/google.yaml
> @@ -13,27 +13,18 @@ description: |
>    ARM platforms using SoCs designed by Google branded "Tensor" used in Pixel
>    devices.
>  
> -  Currently upstream this is devices using "gs101" SoC which is found in Pixel
> -  6, Pixel 6 Pro and Pixel 6a.
> +  These bindings for older Pixel devices don't use device tree overlays so
> +  no separate SoC entry is added. This may change in the future.
>  
> -  Google have a few different names for the SoC:
> -  - Marketing name ("Tensor")
> -  - Codename ("Whitechapel")
> -  - SoC ID ("gs101")
> -  - Die ID ("S5P9845")
> -
> -  Likewise there are a couple of names for the actual device
> -  - Marketing name ("Pixel 6")
> -  - Codename ("Oriole")
> -
> -  Devicetrees should use the lowercased SoC ID and lowercased board codename,
> -  e.g. gs101 and gs101-oriole.
> +  Newer Pixel devices are expected to have the SoC device tree as the base
> +  and specific board device trees as overlays.
>  
>  properties:
>    $nodename:
>      const: '/'
>    compatible:
>      oneOf:
> +      # Google Tensor G1 AKA gs101 AKA whitechapel AKA Die ID S5P9845 boards
>        - description: Google Pixel 6 or 6 Pro (Oriole or Raven)
>          items:
>            - enum:
> @@ -41,13 +32,71 @@ properties:
>                - google,gs101-raven
>            - const: google,gs101
>  
> +      # Google Tensor G5 AKA lga (laguna) SoC and boards
> +      - description: Tensor G5 SoC (laguna)
> +        items:
> +          - enum:
> +              - google,soc-id-0005-rev-00  # A0
> +              - google,soc-id-0005-rev-10  # B0

SoCs cannot be final compatibles. Your commit msg does not explain what
is 'soc-id' or 'soc_id' in this context.

> +          - const: google,lga
> +      - description: Google Pixel 10 Board (Frankel)
> +        items:
> +          - enum:
> +              - google,pixel-id-070302-rev-000000  # Proto 0
> +              - google,pixel-id-070302-rev-010000  # Proto 1
> +              - google,pixel-id-070302-rev-010100  # Proto 1.1
> +              - google,pixel-id-070303-rev-010000  # EVT 1
> +              - google,pixel-id-070303-rev-010100  # EVT 1.1
> +              - google,pixel-id-070303-rev-010101  # EVT 1.1 Wingboard
> +              - google,pixel-id-070304-rev-010000  # DVT 1
> +              - google,pixel-id-070305-rev-010000  # PVT 1
> +              - google,pixel-id-070306-rev-010000  # MP 1
> +          - const: google,lga-frankel
> +          - const: google,lga

So what is the lga? What is lga-frankel?

> +      - description: Google Pixel 10 Pro Board (Blazer)
> +        items:
> +          - enum:
> +              - google,pixel-id-070402-rev-000000  # Proto 0
> +              - google,pixel-id-070402-rev-010000  # Proto 1
> +              - google,pixel-id-070402-rev-010100  # Proto 1.1
> +              - google,pixel-id-070403-rev-010000  # EVT 1
> +              - google,pixel-id-070403-rev-010100  # EVT 1.1
> +              - google,pixel-id-070404-rev-010000  # DVT 1
> +              - google,pixel-id-070405-rev-010000  # PVT 1
> +              - google,pixel-id-070406-rev-010000  # MP 1
> +          - const: google,lga-blazer
> +          - const: google,lga
> +      - description: Google Pixel 10 Pro XL Board (Mustang)
> +        items:
> +          - enum:
> +              - google,pixel-id-070502-rev-000000  # Proto 0
> +              - google,pixel-id-070502-rev-010000  # Proto 1
> +              - google,pixel-id-070502-rev-010100  # Proto 1.1
> +              - google,pixel-id-070502-rev-010101  # Proto 1.1 Wingboard
> +              - google,pixel-id-070503-rev-010000  # EVT 1
> +              - google,pixel-id-070503-rev-010100  # EVT 1.1
> +              - google,pixel-id-070503-rev-010101  # EVT 1.1 Wingboard
> +              - google,pixel-id-070504-rev-010000  # DVT 1
> +              - google,pixel-id-070505-rev-010000  # PVT 1
> +              - google,pixel-id-070506-rev-010000  # MP 1
> +          - const: google,lga-mustang
> +          - const: google,lga
> +
> +allOf:
>    # Bootloader requires empty ect node to be present
> -  ect:
> -    type: object
> -    additionalProperties: false

Please keep it here

> +  - if:
> +      properties:
> +        compatible:

not:

> +          contains:
> +            const: google,gs101

> +    then:
> +      properties:
> +        ect:

ect: false, instead


Best regards,
Krzysztof

  reply	other threads:[~2025-11-12  7:58 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-11 19:22 [PATCH 0/4] arm64: google: Introduce frankel, blazer, and mustang boards Douglas Anderson
2025-11-11 19:22 ` [PATCH 1/4] dt-bindings: arm: google: Add bindings for frankel/blazer/mustang Douglas Anderson
2025-11-12  7:58   ` Krzysztof Kozlowski [this message]
2025-11-12 19:19     ` Doug Anderson
2025-11-13  7:23       ` Krzysztof Kozlowski
2025-11-13 16:23         ` Doug Anderson
2025-11-13 16:34           ` Krzysztof Kozlowski
2025-11-13 17:16             ` Doug Anderson
2025-11-13 17:43               ` Krzysztof Kozlowski
2025-11-13 18:04                 ` Doug Anderson
2025-11-13 18:41                   ` Doug Anderson
2025-11-14  9:26                   ` Krzysztof Kozlowski
2025-11-14 15:54                     ` Rob Herring
2025-11-13  2:27   ` Rob Herring
2025-11-13  3:29     ` Doug Anderson
2025-11-14 15:20       ` Rob Herring
2025-11-14 18:53         ` Doug Anderson
2025-11-18 22:47           ` Doug Anderson
2025-11-11 19:22 ` [PATCH 2/4] dt-bindings: serial: snps-dw-apb-uart: Add "google,lga-uart" Douglas Anderson
2025-11-12  7:59   ` Krzysztof Kozlowski
2025-11-11 19:22 ` [PATCH 3/4] arm64: dts: google: Add dts directory for Google-designed silicon Douglas Anderson
2025-11-12  8:10   ` Krzysztof Kozlowski
2025-11-12 12:26     ` Peter Griffin
2025-11-12 12:36       ` Linus Walleij
2025-11-12 12:43         ` Peter Griffin
2025-11-11 19:22 ` [PATCH 4/4] arm64: dts: google: Add initial dts for frankel, blazer, and mustang Douglas Anderson
2025-11-12  8:14   ` Krzysztof Kozlowski
2025-11-12  9:35     ` Chen-Yu Tsai
2025-11-12  9:48       ` Krzysztof Kozlowski
2025-11-12 20:59         ` Doug Anderson
2025-11-17  6:43         ` Chen-Yu Tsai
2025-11-17  6:55           ` Krzysztof Kozlowski
2025-11-17  7:01             ` Chen-Yu Tsai
2025-11-23 22:27 ` [PATCH 0/4] arm64: google: Introduce frankel, blazer, and mustang boards Pavel Machek
2025-11-24 16:13   ` Doug Anderson
2025-12-02 22:14     ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=05c833f0-15bc-4a86-9ac4-daf835fe4393@kernel.org \
    --to=krzk@kernel.org \
    --cc=andre.draszik@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=jwerner@chromium.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=peter.griffin@linaro.org \
    --cc=robh@kernel.org \
    --cc=royluo@google.com \
    --cc=tudor.ambarus@linaro.org \
    --cc=wenst@chromium.org \
    --cc=willmcvicker@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®