All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/4] dt-bindings: Document how Chromebooks with depthcharge boot
@ 2022-05-13 16:59 Douglas Anderson
  2022-05-13 16:59 ` [PATCH v2 2/4] dt-bindings: arm: qcom: Add sc7180 Chromebook board bindings Douglas Anderson
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: Douglas Anderson @ 2022-05-13 16:59 UTC (permalink / raw)
  To: Rob Herring, Bjorn Andersson
  Cc: Stephen Boyd, Krzysztof Kozlowski, Matthias Kaehlcke,
	Rajendra Nayak, Alexandru M Stan, Julius Werner,
	Joseph S . Barrera III, Douglas Anderson, Krzysztof Kozlowski,
	Rob Herring, devicetree, linux-kernel

This documents how many Chromebooks pick the device tree that will be
passed to the OS and can help understand the revisions / skus listed
as the top-level "compatible" in many Chromebooks.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
---

Changes in v2:
- ("Document how Chromebooks with depthcharge boot") new for v2.

 .../devicetree/chromebook-boot-flow.rst       | 63 +++++++++++++++++++
 1 file changed, 63 insertions(+)
 create mode 100644 Documentation/devicetree/chromebook-boot-flow.rst

diff --git a/Documentation/devicetree/chromebook-boot-flow.rst b/Documentation/devicetree/chromebook-boot-flow.rst
new file mode 100644
index 000000000000..84aeb0a17ee4
--- /dev/null
+++ b/Documentation/devicetree/chromebook-boot-flow.rst
@@ -0,0 +1,63 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+======================================
+Chromebook Boot Flow
+======================================
+
+Most recent Chromebooks that use device tree boot using the opensource
+depthcharge bootloader. Depthcharge expects the OS to be packaged as a "FIT
+Image" which contains an OS image as well as a collection of device trees. It
+is up to depthcharge to pick the right device tree from the FIT Image and
+provide it to the OS.
+
+The scheme that depthcharge uses to pick the device tree takes into account
+three variables:
+- Board name, specified at compile time.
+- Board revision number, read from GPIO strappings at boot time.
+- SKU number, read from GPIO strappings at boot time.
+
+For recent Chromebooks, depthcharge creates a match list that looks like this:
+- google,$(BOARD)-rev$(REV)-sku$(SKU)
+- google,$(BOARD)-rev$(REV)
+- google,$(BOARD)-sku$(SKU)
+- google,$(BOARD)
+
+Note that some older Chromebooks may use a slightly different list that may
+not include sku matching or may prioritize sku/rev differently.
+
+Note that for some boards there may be extra board-specific logic to inject
+extra compatibles into the list, but this is uncommon.
+
+Depthcharge will look through all device trees in the FIT image trying to
+find one that matches the most specific compatible. It will then look
+through all device trees in the FIT image trying to find the one that
+matches the _second most_ specific compatible, etc.
+
+When searching for a device tree, depthcharge doesn't care where the
+compatible falls within a given device tree. As an example, if we're on
+board "lazor", rev 4, sku 0 and we have two device trees:
+- "google,lazor-rev5-sku0", "google,lazor-rev4-sku0", "qcom,sc7180"
+- "google,lazor", "qcom,sc7180"
+
+Then depthcharge will pick the first device tree even though
+"google,lazor-rev4-sku0" was the second compatible listed in that device tree.
+This is because it is a more specific compatible than "google,lazor".
+
+It should be noted that depthcharge does not have any smarts to try to
+match board or SKU revisions that are "close by". That is to say that
+if depthcharge knows it's on "rev4" of a board but there is no "rev4"
+device tree that depthcharge _won't_ look for a "rev3" device tree.
+
+In general when any significant changes are made to a board the board
+revision number is increased even if none of those changes need to
+be reflected in the device tree. Thus it's fairly common to see device
+trees with multiple revisions.
+
+It should be noted that, taking into account the above system that the
+depthcharge has, the most flexibility is achieved if the device tree
+supporting the newest revision(s) of a board omits the "-rev{REV}"
+compatible strings. When this is done then if you get a new board
+revision and try to run old software on it then we'll at pick the most
+reasonable device tree. If it turns out that the new revision actually
+has no device-tree visible changes then we'll not only pick the most
+reasonable device tree, we'll pick the exact right one.
\ No newline at end of file
-- 
2.36.0.550.gb090851708-goog


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 2/4] dt-bindings: arm: qcom: Add sc7180 Chromebook board bindings
  2022-05-13 16:59 [PATCH v2 1/4] dt-bindings: Document how Chromebooks with depthcharge boot Douglas Anderson
@ 2022-05-13 16:59 ` Douglas Anderson
  2022-05-13 19:25   ` Matthias Kaehlcke
  2022-05-16  7:01   ` Krzysztof Kozlowski
  2022-05-13 16:59 ` [PATCH v2 3/4] dt-bindings: arm: qcom: Add / fix sc7280 " Douglas Anderson
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 19+ messages in thread
From: Douglas Anderson @ 2022-05-13 16:59 UTC (permalink / raw)
  To: Rob Herring, Bjorn Andersson
  Cc: Stephen Boyd, Krzysztof Kozlowski, Matthias Kaehlcke,
	Rajendra Nayak, Alexandru M Stan, Julius Werner,
	Joseph S . Barrera III, Douglas Anderson, Andy Gross,
	Krzysztof Kozlowski, Rob Herring, Stephen Boyd, devicetree,
	linux-arm-msm, linux-kernel

This copy-pastes compatibles from sc7180-based boards from the device
trees to the yaml file so that `make dtbs_check` will be happy.

NOTES:
- I make no attempt to try to share an "item" for all sc7180 based
  Chromebooks. Because of the revision matching scheme used by the
  Chromebook bootloader, at times we need a different number of
  revisions listed.
- Some of the odd entries in here (like google,homestar-rev23 or the
  fact that "Google Lazor Limozeen without Touchscreen" changed from
  sku5 to sku6) are not typos but simply reflect reality.
- Many revisions of boards here never actually went to consumers, but
  they are still in use within various companies that were involved in
  Chromebook development. Since Chromebooks are developed with an
  "upstream first" methodology, having these revisions supported with
  upstream Linux is important. Making it easy for Chromebooks to be
  developed with an "upstream first" methodology is valuable to the
  upstream community because it improves the quality of upstream and
  gets Chromebooks supported with vanilla upstream faster.

This patch also adds a link to the Chromebook boot flow documentation
to explain that Chromebooks don't use the scheme described for the
Qualcomm bootloader.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
The link added here will (obviously) not function until the
documentation patch makes it to mainline. Presumably folks who want to
read it in the meantime can find it pretty easily. If there's a better
way to link this then please let me know.

Changes in v2:
- Add link to doc about how Chromebook devicetrees work.
- Use a "description" instead of a comment for each item.
- Use the marketing name instead of the code name where possible.

 .../devicetree/bindings/arm/qcom.yaml         | 187 +++++++++++++++++-
 1 file changed, 186 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
index 5c06d1bfc046..8ec0805f4996 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -90,6 +90,11 @@ description: |
   A dragonboard board v0.1 of subtype 1 with an apq8074 SoC version 2, made in
   foundry 2.
 
+  There are many devices in the list below that run the standard ChromeOS
+  bootloader setup and use the open source depthcharge bootloader to boot the
+  OS. These devices do not use the scheme described above. For details, see:
+  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/chromebook-boot-flow.rst
+
 properties:
   $nodename:
     const: "/"
@@ -214,11 +219,191 @@ properties:
               - qcom,ipq8074-hk10-c2
           - const: qcom,ipq8074
 
-      - items:
+      - description: Qualcomm Technologies, Inc. SC7180 IDP
+        items:
           - enum:
               - qcom,sc7180-idp
           - const: qcom,sc7180
 
+      - description: HP Chromebook x2 11c (rev1 - 2)
+        items:
+          - const: google,coachz-rev1
+          - const: google,coachz-rev2
+          - const: qcom,sc7180
+
+      - description: HP Chromebook x2 11c (newest rev)
+        items:
+          - const: google,coachz
+          - const: qcom,sc7180
+
+      - description: HP Chromebook x2 11c with LTE (rev1 - 2)
+        items:
+          - const: google,coachz-rev1-sku0
+          - const: google,coachz-rev2-sku0
+          - const: qcom,sc7180
+
+      - description: HP Chromebook x2 11c with LTE (newest rev)
+        items:
+          - const: google,coachz-sku0
+          - const: qcom,sc7180
+
+      - description: Lenovo Chromebook Duet 5 13 (rev2)
+        items:
+          - const: google,homestar-rev2
+          - const: google,homestar-rev23
+          - const: qcom,sc7180
+
+      - description: Lenovo Chromebook Duet 5 13 (rev3)
+        items:
+          - const: google,homestar-rev3
+          - const: qcom,sc7180
+
+      - description: Lenovo Chromebook Duet 5 13 (newest rev)
+        items:
+          - const: google,homestar
+          - const: qcom,sc7180
+
+      - description: Acer Chromebook Spin 513 (rev0)
+        items:
+          - const: google,lazor-rev0
+          - const: qcom,sc7180
+
+      - description: Acer Chromebook Spin 513 (rev1 - 2)
+        items:
+          - const: google,lazor-rev1
+          - const: google,lazor-rev2
+          - const: qcom,sc7180
+
+      - description: Acer Chromebook Spin 513 (rev3 - 8)
+        items:
+          - const: google,lazor-rev3
+          - const: google,lazor-rev4
+          - const: google,lazor-rev5
+          - const: google,lazor-rev6
+          - const: google,lazor-rev7
+          - const: google,lazor-rev8
+          - const: qcom,sc7180
+
+      - description: Acer Chromebook Spin 513 (newest rev)
+        items:
+          - const: google,lazor
+          - const: qcom,sc7180
+
+      - description: Acer Chromebook Spin 513 with KB Backlight (rev1 - 2)
+        items:
+          - const: google,lazor-rev1-sku2
+          - const: google,lazor-rev2-sku2
+          - const: qcom,sc7180
+
+      - description: Acer Chromebook Spin 513 with KB Backlight (rev3 - 8)
+        items:
+          - const: google,lazor-rev3-sku2
+          - const: google,lazor-rev4-sku2
+          - const: google,lazor-rev5-sku2
+          - const: google,lazor-rev6-sku2
+          - const: google,lazor-rev7-sku2
+          - const: google,lazor-rev8-sku2
+          - const: qcom,sc7180
+
+      - description: Acer Chromebook Spin 513 with KB Backlight (newest rev)
+        items:
+          - const: google,lazor-sku2
+          - const: qcom,sc7180
+
+      - description: Acer Chromebook Spin 513 with LTE (rev1 - 2)
+        items:
+          - const: google,lazor-rev1-sku0
+          - const: google,lazor-rev2-sku0
+          - const: qcom,sc7180
+
+      - description: Acer Chromebook Spin 513 with LTE (rev3 - 8)
+        items:
+          - const: google,lazor-rev3-sku0
+          - const: google,lazor-rev4-sku0
+          - const: google,lazor-rev5-sku0
+          - const: google,lazor-rev6-sku0
+          - const: google,lazor-rev7-sku0
+          - const: google,lazor-rev8-sku0
+          - const: qcom,sc7180
+
+      - description: Acer Chromebook Spin 513 with LTE (newest rev)
+        items:
+          - const: google,lazor-sku0
+          - const: qcom,sc7180
+
+      - description: Acer Chromebook 511 (rev4 - rev8)
+        items:
+          - const: google,lazor-rev4-sku4
+          - const: google,lazor-rev5-sku4
+          - const: google,lazor-rev6-sku4
+          - const: google,lazor-rev7-sku4
+          - const: google,lazor-rev8-sku4
+          - const: qcom,sc7180
+
+      - description: Acer Chromebook 511 (newest rev)
+        items:
+          - const: google,lazor-sku4
+          - const: qcom,sc7180
+
+      - description: Acer Chromebook 511 without Touchscreen (rev4)
+        items:
+          - const: google,lazor-rev4-sku5
+          - const: qcom,sc7180
+
+      - description: Acer Chromebook 511 without Touchscreen (rev5 - rev8)
+        items:
+          - const: google,lazor-rev5-sku5
+          - const: google,lazor-rev5-sku6
+          - const: google,lazor-rev6-sku6
+          - const: google,lazor-rev7-sku6
+          - const: google,lazor-rev8-sku6
+          - const: qcom,sc7180
+
+      - description: Acer Chromebook 511 without Touchscreen (newest rev)
+        items:
+          - const: google,lazor-sku6
+          - const: qcom,sc7180
+
+      - description: Sharp Dynabook Chromebook C1 (rev1)
+        items:
+          - const: google,pompom-rev1
+          - const: qcom,sc7180
+
+      - description: Sharp Dynabook Chromebook C1 (rev2)
+        items:
+          - const: google,pompom-rev2
+          - const: qcom,sc7180
+
+      - description: Sharp Dynabook Chromebook C1 (newest rev)
+        items:
+          - const: google,pompom
+          - const: qcom,sc7180
+
+      - description: Sharp Dynabook Chromebook C1 with LTE (rev1)
+        items:
+          - const: google,pompom-rev1-sku0
+          - const: qcom,sc7180
+
+      - description: Sharp Dynabook Chromebook C1 with LTE (rev2)
+        items:
+          - const: google,pompom-rev2-sku0
+          - const: qcom,sc7180
+
+      - description: Sharp Dynabook Chromebook C1 with LTE (newest rev)
+        items:
+          - const: google,pompom-sku0
+          - const: qcom,sc7180
+
+      - description: Google Trogdor (newest rev)
+        items:
+          - const: google,trogdor
+          - const: qcom,sc7180
+
+      - description: Google Trogdor with LTE (newest rev)
+        items:
+          - const: google,trogdor-sku0
+          - const: qcom,sc7180
+
       - items:
           - enum:
               - qcom,sc7280-crd
-- 
2.36.0.550.gb090851708-goog


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 3/4] dt-bindings: arm: qcom: Add / fix sc7280 board bindings
  2022-05-13 16:59 [PATCH v2 1/4] dt-bindings: Document how Chromebooks with depthcharge boot Douglas Anderson
  2022-05-13 16:59 ` [PATCH v2 2/4] dt-bindings: arm: qcom: Add sc7180 Chromebook board bindings Douglas Anderson
@ 2022-05-13 16:59 ` Douglas Anderson
  2022-05-13 19:36   ` Matthias Kaehlcke
  2022-05-16  7:02   ` Krzysztof Kozlowski
  2022-05-13 16:59 ` [PATCH v2 4/4] dt-bindings: arm: qcom: Add more sc7180 Chromebook " Douglas Anderson
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 19+ messages in thread
From: Douglas Anderson @ 2022-05-13 16:59 UTC (permalink / raw)
  To: Rob Herring, Bjorn Andersson
  Cc: Stephen Boyd, Krzysztof Kozlowski, Matthias Kaehlcke,
	Rajendra Nayak, Alexandru M Stan, Julius Werner,
	Joseph S . Barrera III, Douglas Anderson, Andy Gross,
	Krzysztof Kozlowski, Rob Herring, Stephen Boyd, devicetree,
	linux-arm-msm, linux-kernel

This copy-pastes compatibles from sc7280-based boards from the device
trees to the yaml file. It also fixes the CRD/IDP bindings which had
gotten stale.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
It should be noted that these match the sc7280 boards as of the top of
the "for-next" branch of the tree
git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git

Changes in v2:
- Use a "description" instead of a comment for each item.

 .../devicetree/bindings/arm/qcom.yaml         | 42 +++++++++++++++----
 1 file changed, 34 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
index 8ec0805f4996..c76ea703c2e6 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -404,14 +404,40 @@ properties:
           - const: google,trogdor-sku0
           - const: qcom,sc7180
 
-      - items:
-          - enum:
-              - qcom,sc7280-crd
-              - qcom,sc7280-idp
-              - qcom,sc7280-idp2
-              - google,hoglin
-              - google,piglin
-              - google,senor
+      - description: Qualcomm Technologies, Inc. sc7280 CRD platform (rev3 - 4)
+        items:
+          - const: qcom,sc7280-crd
+          - const: google,hoglin-rev3
+          - const: google,hoglin-rev4
+          - const: google,piglin-rev3
+          - const: google,piglin-rev4
+          - const: qcom,sc7280
+
+      - description: Qualcomm Technologies, Inc. sc7280 CRD platform (newest rev)
+        items:
+          - const: google,hoglin
+          - const: qcom,sc7280
+
+      - description: Qualcomm Technologies, Inc. sc7280 IDP SKU1 platform
+        items:
+          - const: qcom,sc7280-idp
+          - const: google,senor
+          - const: qcom,sc7280
+
+      - description: Qualcomm Technologies, Inc. sc7280 IDP SKU2 platform
+        items:
+          - const: qcom,sc7280-idp2
+          - const: google,piglin
+          - const: qcom,sc7280
+
+      - description: Google Herobrine (newest rev)
+        items:
+          - const: google,herobrine
+          - const: qcom,sc7280
+
+      - description: Google Villager (newest rev)
+        items:
+          - const: google,villager
           - const: qcom,sc7280
 
       - items:
-- 
2.36.0.550.gb090851708-goog


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 4/4] dt-bindings: arm: qcom: Add more sc7180 Chromebook board bindings
  2022-05-13 16:59 [PATCH v2 1/4] dt-bindings: Document how Chromebooks with depthcharge boot Douglas Anderson
  2022-05-13 16:59 ` [PATCH v2 2/4] dt-bindings: arm: qcom: Add sc7180 Chromebook board bindings Douglas Anderson
  2022-05-13 16:59 ` [PATCH v2 3/4] dt-bindings: arm: qcom: Add / fix sc7280 " Douglas Anderson
@ 2022-05-13 16:59 ` Douglas Anderson
  2022-05-13 20:37   ` Matthias Kaehlcke
  2022-05-16  7:05   ` Krzysztof Kozlowski
  2022-05-13 18:42 ` [PATCH v2 1/4] dt-bindings: Document how Chromebooks with depthcharge boot Matthias Kaehlcke
  2022-05-16  6:57 ` Krzysztof Kozlowski
  4 siblings, 2 replies; 19+ messages in thread
From: Douglas Anderson @ 2022-05-13 16:59 UTC (permalink / raw)
  To: Rob Herring, Bjorn Andersson
  Cc: Stephen Boyd, Krzysztof Kozlowski, Matthias Kaehlcke,
	Rajendra Nayak, Alexandru M Stan, Julius Werner,
	Joseph S . Barrera III, Douglas Anderson, Andy Gross,
	Krzysztof Kozlowski, Rob Herring, Stephen Boyd, devicetree,
	linux-arm-msm, linux-kernel

This adds board bindings for boards that are downstream but not quite
upstream yet.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
---

Changes in v2:
- Use a "description" instead of a comment for each item.
- Use the marketing name instead of the code name where possible.

 .../devicetree/bindings/arm/qcom.yaml         | 92 +++++++++++++++++++
 1 file changed, 92 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
index c76ea703c2e6..6d1d44b48289 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -263,6 +263,16 @@ properties:
           - const: google,homestar
           - const: qcom,sc7180
 
+      - description: Google Kingoftown (rev0)
+        items:
+          - const: google,kingoftown-rev0
+          - const: qcom,sc7180
+
+      - description: Google Kingoftown (newest rev)
+        items:
+          - const: google,kingoftown
+          - const: qcom,sc7180
+
       - description: Acer Chromebook Spin 513 (rev0)
         items:
           - const: google,lazor-rev0
@@ -364,6 +374,48 @@ properties:
           - const: google,lazor-sku6
           - const: qcom,sc7180
 
+      - description: Google Mrbland with AUO panel (rev0)
+        items:
+          - const: google,mrbland-rev0-sku0
+          - const: qcom,sc7180
+
+      - description: Google Mrbland with AUO panel (newest rev)
+        items:
+          - const: google,mrbland-sku1536
+          - const: qcom,sc7180
+
+      - description: Google Mrbland with BOE panel (rev0)
+        items:
+          - const: google,mrbland-rev0-sku16
+          - const: qcom,sc7180
+
+      - description: Google Mrbland with BOE panel (newest rev)
+        items:
+          - const: google,mrbland-sku1024
+          - const: google,mrbland-sku768
+          - const: qcom,sc7180
+
+      - description: Google Pazquel with Parade (newest rev)
+        items:
+          - const: google,pazquel-sku5
+          - const: qcom,sc7180
+
+      - description: Google Pazquel with TI (newest rev)
+        items:
+          - const: google,pazquel-sku1
+          - const: qcom,sc7180
+
+      - description: Google Pazquel with LTE and Parade (newest rev)
+        items:
+          - const: google,pazquel-sku4
+          - const: qcom,sc7180
+
+      - description: Google Pazquel with LTE and TI (newest rev)
+        items:
+          - const: google,pazquel-sku0
+          - const: google,pazquel-sku2
+          - const: qcom,sc7180
+
       - description: Sharp Dynabook Chromebook C1 (rev1)
         items:
           - const: google,pompom-rev1
@@ -394,6 +446,16 @@ properties:
           - const: google,pompom-sku0
           - const: qcom,sc7180
 
+      - description: Google Quackingstick (newest rev)
+        items:
+          - const: google,quackingstick-sku1537
+          - const: qcom,sc7180
+
+      - description: Google Quackingstick with LTE (newest rev)
+        items:
+          - const: google,quackingstick-sku1536
+          - const: qcom,sc7180
+
       - description: Google Trogdor (newest rev)
         items:
           - const: google,trogdor
@@ -404,6 +466,36 @@ properties:
           - const: google,trogdor-sku0
           - const: qcom,sc7180
 
+      - description: Lenovo IdeaPad Chromebook Duet 3 with BOE panel (rev0)
+        items:
+          - const: google,wormdingler-rev0-sku16
+          - const: qcom,sc7180
+
+      - description: Lenovo IdeaPad Chromebook Duet 3 with BOE panel (newest rev)
+        items:
+          - const: google,wormdingler-sku1024
+          - const: qcom,sc7180
+
+      - description: Lenovo IdeaPad Chromebook Duet 3 with BOE panel and rt5682s (newest rev)
+        items:
+          - const: google,wormdingler-sku1025
+          - const: qcom,sc7180
+
+      - description: Lenovo IdeaPad Chromebook Duet 3 with INX panel (rev0)
+        items:
+          - const: google,wormdingler-rev0-sku0
+          - const: qcom,sc7180
+
+      - description: Lenovo IdeaPad Chromebook Duet 3 with INX panel (newest rev)
+        items:
+          - const: google,wormdingler-sku0
+          - const: qcom,sc7180
+
+      - description: Lenovo IdeaPad Chromebook Duet 3 with INX panel and rt5682s (newest rev)
+        items:
+          - const: google,wormdingler-sku1
+          - const: qcom,sc7180
+
       - description: Qualcomm Technologies, Inc. sc7280 CRD platform (rev3 - 4)
         items:
           - const: qcom,sc7280-crd
-- 
2.36.0.550.gb090851708-goog


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 1/4] dt-bindings: Document how Chromebooks with depthcharge boot
  2022-05-13 16:59 [PATCH v2 1/4] dt-bindings: Document how Chromebooks with depthcharge boot Douglas Anderson
                   ` (2 preceding siblings ...)
  2022-05-13 16:59 ` [PATCH v2 4/4] dt-bindings: arm: qcom: Add more sc7180 Chromebook " Douglas Anderson
@ 2022-05-13 18:42 ` Matthias Kaehlcke
  2022-05-16  6:57 ` Krzysztof Kozlowski
  4 siblings, 0 replies; 19+ messages in thread
From: Matthias Kaehlcke @ 2022-05-13 18:42 UTC (permalink / raw)
  To: Douglas Anderson
  Cc: Rob Herring, Bjorn Andersson, Stephen Boyd, Krzysztof Kozlowski,
	Rajendra Nayak, Alexandru M Stan, Julius Werner,
	Joseph S . Barrera III, Krzysztof Kozlowski, Rob Herring,
	devicetree, linux-kernel

On Fri, May 13, 2022 at 09:59:17AM -0700, Douglas Anderson wrote:
> This documents how many Chromebooks pick the device tree that will be
> passed to the OS and can help understand the revisions / skus listed
> as the top-level "compatible" in many Chromebooks.
> 
> Signed-off-by: Douglas Anderson <dianders@chromium.org>

Thanks!

a few nits below

> ---
> 
> Changes in v2:
> - ("Document how Chromebooks with depthcharge boot") new for v2.
> 
>  .../devicetree/chromebook-boot-flow.rst       | 63 +++++++++++++++++++
>  1 file changed, 63 insertions(+)
>  create mode 100644 Documentation/devicetree/chromebook-boot-flow.rst
> 
> diff --git a/Documentation/devicetree/chromebook-boot-flow.rst b/Documentation/devicetree/chromebook-boot-flow.rst
> new file mode 100644
> index 000000000000..84aeb0a17ee4
> --- /dev/null
> +++ b/Documentation/devicetree/chromebook-boot-flow.rst
> @@ -0,0 +1,63 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +
> +======================================
> +Chromebook Boot Flow
> +======================================
> +
> +Most recent Chromebooks that use device tree boot using the opensource

s/using/are using/

> +depthcharge bootloader. Depthcharge expects the OS to be packaged as a "FIT
> +Image" which contains an OS image as well as a collection of device trees. It
> +is up to depthcharge to pick the right device tree from the FIT Image and
> +provide it to the OS.
> +
> +The scheme that depthcharge uses to pick the device tree takes into account
> +three variables:
> +- Board name, specified at compile time.
> +- Board revision number, read from GPIO strappings at boot time.
> +- SKU number, read from GPIO strappings at boot time.
> +
> +For recent Chromebooks, depthcharge creates a match list that looks like this:
> +- google,$(BOARD)-rev$(REV)-sku$(SKU)
> +- google,$(BOARD)-rev$(REV)
> +- google,$(BOARD)-sku$(SKU)
> +- google,$(BOARD)
> +
> +Note that some older Chromebooks may use a slightly different list that may

nit: first 'may' isn't really needed, since this is about 'some' Chromebooks
whose list 'may' differ in certain ways.

> +not include sku matching or may prioritize sku/rev differently.
> +
> +Note that for some boards there may be extra board-specific logic to inject
> +extra compatibles into the list, but this is uncommon.
> +
> +Depthcharge will look through all device trees in the FIT image trying to
> +find one that matches the most specific compatible. It will then look
> +through all device trees in the FIT image trying to find the one that
> +matches the _second most_ specific compatible, etc.
> +
> +When searching for a device tree, depthcharge doesn't care where the
> +compatible falls within a given device tree. As an example, if we're on
> +board "lazor", rev 4, sku 0 and we have two device trees:
> +- "google,lazor-rev5-sku0", "google,lazor-rev4-sku0", "qcom,sc7180"
> +- "google,lazor", "qcom,sc7180"
> +
> +Then depthcharge will pick the first device tree even though
> +"google,lazor-rev4-sku0" was the second compatible listed in that device tree.
> +This is because it is a more specific compatible than "google,lazor".
> +
> +It should be noted that depthcharge does not have any smarts to try to
> +match board or SKU revisions that are "close by". That is to say that
> +if depthcharge knows it's on "rev4" of a board but there is no "rev4"
> +device tree that depthcharge _won't_ look for a "rev3" device tree.

s/that/then/

> +
> +In general when any significant changes are made to a board the board
> +revision number is increased even if none of those changes need to
> +be reflected in the device tree. Thus it's fairly common to see device
> +trees with multiple revisions.
> +
> +It should be noted that, taking into account the above system that the
> +depthcharge has, the most flexibility is achieved if the device tree

s/the depthcharge/depthcharge/

> +supporting the newest revision(s) of a board omits the "-rev{REV}"
> +compatible strings. When this is done then if you get a new board
> +revision and try to run old software on it then we'll at pick the most
> +reasonable device tree. If it turns out that the new revision actually
> +has no device-tree visible changes then we'll not only pick the most
> +reasonable device tree, we'll pick the exact right one.
> \ No newline at end of file
> -- 
> 2.36.0.550.gb090851708-goog
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 2/4] dt-bindings: arm: qcom: Add sc7180 Chromebook board bindings
  2022-05-13 16:59 ` [PATCH v2 2/4] dt-bindings: arm: qcom: Add sc7180 Chromebook board bindings Douglas Anderson
@ 2022-05-13 19:25   ` Matthias Kaehlcke
  2022-05-16  7:01   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 19+ messages in thread
From: Matthias Kaehlcke @ 2022-05-13 19:25 UTC (permalink / raw)
  To: Douglas Anderson
  Cc: Rob Herring, Bjorn Andersson, Stephen Boyd, Krzysztof Kozlowski,
	Rajendra Nayak, Alexandru M Stan, Julius Werner,
	Joseph S . Barrera III, Andy Gross, Krzysztof Kozlowski,
	Rob Herring, Stephen Boyd, devicetree, linux-arm-msm,
	linux-kernel

On Fri, May 13, 2022 at 09:59:18AM -0700, Douglas Anderson wrote:
> This copy-pastes compatibles from sc7180-based boards from the device
> trees to the yaml file so that `make dtbs_check` will be happy.
> 
> NOTES:
> - I make no attempt to try to share an "item" for all sc7180 based
>   Chromebooks. Because of the revision matching scheme used by the
>   Chromebook bootloader, at times we need a different number of
>   revisions listed.
> - Some of the odd entries in here (like google,homestar-rev23 or the
>   fact that "Google Lazor Limozeen without Touchscreen" changed from
>   sku5 to sku6) are not typos but simply reflect reality.
> - Many revisions of boards here never actually went to consumers, but
>   they are still in use within various companies that were involved in
>   Chromebook development. Since Chromebooks are developed with an
>   "upstream first" methodology, having these revisions supported with
>   upstream Linux is important. Making it easy for Chromebooks to be
>   developed with an "upstream first" methodology is valuable to the
>   upstream community because it improves the quality of upstream and
>   gets Chromebooks supported with vanilla upstream faster.
> 
> This patch also adds a link to the Chromebook boot flow documentation
> to explain that Chromebooks don't use the scheme described for the
> Qualcomm bootloader.
> 
> Signed-off-by: Douglas Anderson <dianders@chromium.org>

Reviewed-by: Matthias Kaehlcke <mka@chromium.org>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 3/4] dt-bindings: arm: qcom: Add / fix sc7280 board bindings
  2022-05-13 16:59 ` [PATCH v2 3/4] dt-bindings: arm: qcom: Add / fix sc7280 " Douglas Anderson
@ 2022-05-13 19:36   ` Matthias Kaehlcke
  2022-05-16  7:02   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 19+ messages in thread
From: Matthias Kaehlcke @ 2022-05-13 19:36 UTC (permalink / raw)
  To: Douglas Anderson
  Cc: Rob Herring, Bjorn Andersson, Stephen Boyd, Krzysztof Kozlowski,
	Rajendra Nayak, Alexandru M Stan, Julius Werner,
	Joseph S . Barrera III, Andy Gross, Krzysztof Kozlowski,
	Rob Herring, Stephen Boyd, devicetree, linux-arm-msm,
	linux-kernel

On Fri, May 13, 2022 at 09:59:19AM -0700, Douglas Anderson wrote:
> This copy-pastes compatibles from sc7280-based boards from the device
> trees to the yaml file. It also fixes the CRD/IDP bindings which had
> gotten stale.
> 
> Signed-off-by: Douglas Anderson <dianders@chromium.org>

Reviewed-by: Matthias Kaehlcke <mka@chromium.org>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 4/4] dt-bindings: arm: qcom: Add more sc7180 Chromebook board bindings
  2022-05-13 16:59 ` [PATCH v2 4/4] dt-bindings: arm: qcom: Add more sc7180 Chromebook " Douglas Anderson
@ 2022-05-13 20:37   ` Matthias Kaehlcke
  2022-05-13 20:44     ` Doug Anderson
  2022-05-16  7:05   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 19+ messages in thread
From: Matthias Kaehlcke @ 2022-05-13 20:37 UTC (permalink / raw)
  To: Douglas Anderson
  Cc: Rob Herring, Bjorn Andersson, Stephen Boyd, Krzysztof Kozlowski,
	Rajendra Nayak, Alexandru M Stan, Julius Werner,
	Joseph S . Barrera III, Andy Gross, Krzysztof Kozlowski,
	Rob Herring, Stephen Boyd, devicetree, linux-arm-msm,
	linux-kernel

On Fri, May 13, 2022 at 09:59:20AM -0700, Douglas Anderson wrote:
> This adds board bindings for boards that are downstream but not quite
> upstream yet.
> 
> Signed-off-by: Douglas Anderson <dianders@chromium.org>

I didn't follow the discussion about the odd sku ids (-sku1537,
-sku1536, -sku1024, ...), but they match what is in the
downstream tree, so it seems alright :)

Reviewed-by: Matthias Kaehlcke <mka@chromium.org>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 4/4] dt-bindings: arm: qcom: Add more sc7180 Chromebook board bindings
  2022-05-13 20:37   ` Matthias Kaehlcke
@ 2022-05-13 20:44     ` Doug Anderson
  0 siblings, 0 replies; 19+ messages in thread
From: Doug Anderson @ 2022-05-13 20:44 UTC (permalink / raw)
  To: Matthias Kaehlcke
  Cc: Rob Herring, Bjorn Andersson, Stephen Boyd, Krzysztof Kozlowski,
	Rajendra Nayak, Alexandru M Stan, Julius Werner,
	Joseph S . Barrera III, Andy Gross, Krzysztof Kozlowski,
	Rob Herring, Stephen Boyd,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-msm, LKML

Hi,

On Fri, May 13, 2022 at 1:37 PM Matthias Kaehlcke <mka@chromium.org> wrote:
>
> On Fri, May 13, 2022 at 09:59:20AM -0700, Douglas Anderson wrote:
> > This adds board bindings for boards that are downstream but not quite
> > upstream yet.
> >
> > Signed-off-by: Douglas Anderson <dianders@chromium.org>
>
> I didn't follow the discussion about the odd sku ids (-sku1537,
> -sku1536, -sku1024, ...), but they match what is in the
> downstream tree, so it seems alright :)

It makes more sense in hex. hex(1536) = 0x600. Basically on these
boards there are two sets of GPIO strappings, the normal SKU
strappings and the panel strappings. Depthcharge combines them. You
end up with an ugly decimal number, but it's not the end of the world.

-Doug

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 1/4] dt-bindings: Document how Chromebooks with depthcharge boot
  2022-05-13 16:59 [PATCH v2 1/4] dt-bindings: Document how Chromebooks with depthcharge boot Douglas Anderson
                   ` (3 preceding siblings ...)
  2022-05-13 18:42 ` [PATCH v2 1/4] dt-bindings: Document how Chromebooks with depthcharge boot Matthias Kaehlcke
@ 2022-05-16  6:57 ` Krzysztof Kozlowski
  2022-05-16 15:06   ` Doug Anderson
  4 siblings, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2022-05-16  6:57 UTC (permalink / raw)
  To: Douglas Anderson, Rob Herring, Bjorn Andersson
  Cc: Stephen Boyd, Matthias Kaehlcke, Rajendra Nayak,
	Alexandru M Stan, Julius Werner, Joseph S . Barrera III,
	Krzysztof Kozlowski, Rob Herring, devicetree, linux-kernel

On 13/05/2022 18:59, Douglas Anderson wrote:
> This documents how many Chromebooks pick the device tree that will be
> passed to the OS and can help understand the revisions / skus listed
> as the top-level "compatible" in many Chromebooks.
> 
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
> 
> Changes in v2:
> - ("Document how Chromebooks with depthcharge boot") new for v2.
> 
>  .../devicetree/chromebook-boot-flow.rst       | 63 +++++++++++++++++++
>  1 file changed, 63 insertions(+)
>  create mode 100644 Documentation/devicetree/chromebook-boot-flow.rst

This is not a Devicetree (generic) document, so it is not the best place
for it. Maybe regular vendor place, e.g . Documentation/arm/google/ ?

> 
> diff --git a/Documentation/devicetree/chromebook-boot-flow.rst b/Documentation/devicetree/chromebook-boot-flow.rst
> new file mode 100644
> index 000000000000..84aeb0a17ee4
> --- /dev/null
> +++ b/Documentation/devicetree/chromebook-boot-flow.rst
> @@ -0,0 +1,63 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +
> +======================================
> +Chromebook Boot Flow
> +======================================
> +
> +Most recent Chromebooks that use device tree boot using the opensource
> +depthcharge bootloader. Depthcharge expects the OS to be packaged as a "FIT
> +Image" which contains an OS image as well as a collection of device trees. It
> +is up to depthcharge to pick the right device tree from the FIT Image and
> +provide it to the OS.
> +
> +The scheme that depthcharge uses to pick the device tree takes into account
> +three variables:
> +- Board name, specified at compile time.
> +- Board revision number, read from GPIO strappings at boot time.
> +- SKU number, read from GPIO strappings at boot time.
> +
> +For recent Chromebooks, depthcharge creates a match list that looks like this:
> +- google,$(BOARD)-rev$(REV)-sku$(SKU)
> +- google,$(BOARD)-rev$(REV)
> +- google,$(BOARD)-sku$(SKU)
> +- google,$(BOARD)
> +
> +Note that some older Chromebooks may use a slightly different list that may
> +not include sku matching or may prioritize sku/rev differently.
> +
> +Note that for some boards there may be extra board-specific logic to inject
> +extra compatibles into the list, but this is uncommon.
> +
> +Depthcharge will look through all device trees in the FIT image trying to
> +find one that matches the most specific compatible. It will then look
> +through all device trees in the FIT image trying to find the one that
> +matches the _second most_ specific compatible, etc.
> +
> +When searching for a device tree, depthcharge doesn't care where the
> +compatible falls within a given device tree. As an example, if we're on
> +board "lazor", rev 4, sku 0 and we have two device trees:
> +- "google,lazor-rev5-sku0", "google,lazor-rev4-sku0", "qcom,sc7180"
> +- "google,lazor", "qcom,sc7180"
> +
> +Then depthcharge will pick the first device tree even though
> +"google,lazor-rev4-sku0" was the second compatible listed in that device tree.
> +This is because it is a more specific compatible than "google,lazor".
> +
> +It should be noted that depthcharge does not have any smarts to try to
> +match board or SKU revisions that are "close by". That is to say that
> +if depthcharge knows it's on "rev4" of a board but there is no "rev4"
> +device tree that depthcharge _won't_ look for a "rev3" device tree.
> +
> +In general when any significant changes are made to a board the board
> +revision number is increased even if none of those changes need to
> +be reflected in the device tree. Thus it's fairly common to see device
> +trees with multiple revisions.
> +
> +It should be noted that, taking into account the above system that the
> +depthcharge has, the most flexibility is achieved if the device tree
> +supporting the newest revision(s) of a board omits the "-rev{REV}"
> +compatible strings. When this is done then if you get a new board
> +revision and try to run old software on it then we'll at pick the most
> +reasonable device tree. If it turns out that the new revision actually
> +has no device-tree visible changes then we'll not only pick the most
> +reasonable device tree, we'll pick the exact right one.
> \ No newline at end of file

Missing new line.


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 2/4] dt-bindings: arm: qcom: Add sc7180 Chromebook board bindings
  2022-05-13 16:59 ` [PATCH v2 2/4] dt-bindings: arm: qcom: Add sc7180 Chromebook board bindings Douglas Anderson
  2022-05-13 19:25   ` Matthias Kaehlcke
@ 2022-05-16  7:01   ` Krzysztof Kozlowski
  2022-05-16 15:01     ` Doug Anderson
  1 sibling, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2022-05-16  7:01 UTC (permalink / raw)
  To: Douglas Anderson, Rob Herring, Bjorn Andersson
  Cc: Stephen Boyd, Matthias Kaehlcke, Rajendra Nayak,
	Alexandru M Stan, Julius Werner, Joseph S . Barrera III,
	Andy Gross, Krzysztof Kozlowski, Rob Herring, Stephen Boyd,
	devicetree, linux-arm-msm, linux-kernel

On 13/05/2022 18:59, Douglas Anderson wrote:
> This copy-pastes compatibles from sc7180-based boards from the device
> trees to the yaml file so that `make dtbs_check` will be happy.
> 
> NOTES:
> - I make no attempt to try to share an "item" for all sc7180 based
>   Chromebooks. Because of the revision matching scheme used by the
>   Chromebook bootloader, at times we need a different number of
>   revisions listed.
> - Some of the odd entries in here (like google,homestar-rev23 or the
>   fact that "Google Lazor Limozeen without Touchscreen" changed from
>   sku5 to sku6) are not typos but simply reflect reality.
> - Many revisions of boards here never actually went to consumers, but
>   they are still in use within various companies that were involved in
>   Chromebook development. Since Chromebooks are developed with an
>   "upstream first" methodology, having these revisions supported with
>   upstream Linux is important. Making it easy for Chromebooks to be
>   developed with an "upstream first" methodology is valuable to the
>   upstream community because it improves the quality of upstream and
>   gets Chromebooks supported with vanilla upstream faster.
> 
> This patch also adds a link to the Chromebook boot flow documentation
> to explain that Chromebooks don't use the scheme described for the
> Qualcomm bootloader.
> 
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
> The link added here will (obviously) not function until the
> documentation patch makes it to mainline. Presumably folks who want to
> read it in the meantime can find it pretty easily. If there's a better
> way to link this then please let me know.
> 
> Changes in v2:
> - Add link to doc about how Chromebook devicetrees work.
> - Use a "description" instead of a comment for each item.
> - Use the marketing name instead of the code name where possible.
> 
>  .../devicetree/bindings/arm/qcom.yaml         | 187 +++++++++++++++++-
>  1 file changed, 186 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
> index 5c06d1bfc046..8ec0805f4996 100644
> --- a/Documentation/devicetree/bindings/arm/qcom.yaml
> +++ b/Documentation/devicetree/bindings/arm/qcom.yaml
> @@ -90,6 +90,11 @@ description: |
>    A dragonboard board v0.1 of subtype 1 with an apq8074 SoC version 2, made in
>    foundry 2.
>  
> +  There are many devices in the list below that run the standard ChromeOS
> +  bootloader setup and use the open source depthcharge bootloader to boot the
> +  OS. These devices do not use the scheme described above. For details, see:
> +  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/chromebook-boot-flow.rst

Absolute path within Linux repo, please, so
"Documentation/devicetree/chromebook-boot-flow.rst" (assuming that will
be the final location). There are tools which check them for validity.

Actually this change should be rather part of that other commit...

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 3/4] dt-bindings: arm: qcom: Add / fix sc7280 board bindings
  2022-05-13 16:59 ` [PATCH v2 3/4] dt-bindings: arm: qcom: Add / fix sc7280 " Douglas Anderson
  2022-05-13 19:36   ` Matthias Kaehlcke
@ 2022-05-16  7:02   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2022-05-16  7:02 UTC (permalink / raw)
  To: Douglas Anderson, Rob Herring, Bjorn Andersson
  Cc: Stephen Boyd, Matthias Kaehlcke, Rajendra Nayak,
	Alexandru M Stan, Julius Werner, Joseph S . Barrera III,
	Andy Gross, Krzysztof Kozlowski, Rob Herring, Stephen Boyd,
	devicetree, linux-arm-msm, linux-kernel

On 13/05/2022 18:59, Douglas Anderson wrote:
> This copy-pastes compatibles from sc7280-based boards from the device
> trees to the yaml file. It also fixes the CRD/IDP bindings which had
> gotten stale.
> 
> Signed-off-by: Douglas Anderson <dianders@chromium.org>

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 4/4] dt-bindings: arm: qcom: Add more sc7180 Chromebook board bindings
  2022-05-13 16:59 ` [PATCH v2 4/4] dt-bindings: arm: qcom: Add more sc7180 Chromebook " Douglas Anderson
  2022-05-13 20:37   ` Matthias Kaehlcke
@ 2022-05-16  7:05   ` Krzysztof Kozlowski
  2022-05-16 15:16     ` Doug Anderson
  1 sibling, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2022-05-16  7:05 UTC (permalink / raw)
  To: Douglas Anderson, Rob Herring, Bjorn Andersson
  Cc: Stephen Boyd, Matthias Kaehlcke, Rajendra Nayak,
	Alexandru M Stan, Julius Werner, Joseph S . Barrera III,
	Andy Gross, Krzysztof Kozlowski, Rob Herring, Stephen Boyd,
	devicetree, linux-arm-msm, linux-kernel

On 13/05/2022 18:59, Douglas Anderson wrote:
> This adds board bindings for boards that are downstream but not quite
> upstream yet.
> 
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
> 
> Changes in v2:
> - Use a "description" instead of a comment for each item.
> - Use the marketing name instead of the code name where possible.

These should be published with the patch adding their upstream DTS/DTSI.
There is no point to list all possible boards in the world from any
downstream source. For upstream there is no particular benefit for such
bindings, for downstream you also said there is no.


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 2/4] dt-bindings: arm: qcom: Add sc7180 Chromebook board bindings
  2022-05-16  7:01   ` Krzysztof Kozlowski
@ 2022-05-16 15:01     ` Doug Anderson
  2022-05-16 15:06       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 19+ messages in thread
From: Doug Anderson @ 2022-05-16 15:01 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Rob Herring, Bjorn Andersson, Stephen Boyd, Matthias Kaehlcke,
	Rajendra Nayak, Alexandru M Stan, Julius Werner,
	Joseph S . Barrera III, Andy Gross, Krzysztof Kozlowski,
	Rob Herring, Stephen Boyd,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-msm, LKML

Hi,

On Mon, May 16, 2022 at 12:01 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 13/05/2022 18:59, Douglas Anderson wrote:
> > This copy-pastes compatibles from sc7180-based boards from the device
> > trees to the yaml file so that `make dtbs_check` will be happy.
> >
> > NOTES:
> > - I make no attempt to try to share an "item" for all sc7180 based
> >   Chromebooks. Because of the revision matching scheme used by the
> >   Chromebook bootloader, at times we need a different number of
> >   revisions listed.
> > - Some of the odd entries in here (like google,homestar-rev23 or the
> >   fact that "Google Lazor Limozeen without Touchscreen" changed from
> >   sku5 to sku6) are not typos but simply reflect reality.
> > - Many revisions of boards here never actually went to consumers, but
> >   they are still in use within various companies that were involved in
> >   Chromebook development. Since Chromebooks are developed with an
> >   "upstream first" methodology, having these revisions supported with
> >   upstream Linux is important. Making it easy for Chromebooks to be
> >   developed with an "upstream first" methodology is valuable to the
> >   upstream community because it improves the quality of upstream and
> >   gets Chromebooks supported with vanilla upstream faster.
> >
> > This patch also adds a link to the Chromebook boot flow documentation
> > to explain that Chromebooks don't use the scheme described for the
> > Qualcomm bootloader.
> >
> > Signed-off-by: Douglas Anderson <dianders@chromium.org>
> > ---
> > The link added here will (obviously) not function until the
> > documentation patch makes it to mainline. Presumably folks who want to
> > read it in the meantime can find it pretty easily. If there's a better
> > way to link this then please let me know.
> >
> > Changes in v2:
> > - Add link to doc about how Chromebook devicetrees work.
> > - Use a "description" instead of a comment for each item.
> > - Use the marketing name instead of the code name where possible.
> >
> >  .../devicetree/bindings/arm/qcom.yaml         | 187 +++++++++++++++++-
> >  1 file changed, 186 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
> > index 5c06d1bfc046..8ec0805f4996 100644
> > --- a/Documentation/devicetree/bindings/arm/qcom.yaml
> > +++ b/Documentation/devicetree/bindings/arm/qcom.yaml
> > @@ -90,6 +90,11 @@ description: |
> >    A dragonboard board v0.1 of subtype 1 with an apq8074 SoC version 2, made in
> >    foundry 2.
> >
> > +  There are many devices in the list below that run the standard ChromeOS
> > +  bootloader setup and use the open source depthcharge bootloader to boot the
> > +  OS. These devices do not use the scheme described above. For details, see:
> > +  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/chromebook-boot-flow.rst
>
> Absolute path within Linux repo, please, so
> "Documentation/devicetree/chromebook-boot-flow.rst" (assuming that will
> be the final location). There are tools which check them for validity.

Got it, thanks!


> Actually this change should be rather part of that other commit...

I'm not sure I understand. Which of these are you suggesting?

1. You want me to squash the two commits into one, so we add the
generic doc in the same patch as the one adding sc7180 Chromebooks.

2. You want the generic doc to come first in the series and it just
adds the little blurb into
"Documentation/devicetree/bindings/arm/qcom.yaml" even though
Chromebooks aren't actually added until a later commit in the series.

3. You want to add the sc7180 Chromebooks first in the series with no
documentation and then later add in the generic documentation and the
blurb into "Documentation/devicetree/bindings/arm/qcom.yaml".


I'm also interested to know if you think the generic documentation
patch should land through the Qualcomm tree. I think it would
absolutely have to if I take your suggestion, right?


Thanks!

-Doug

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 1/4] dt-bindings: Document how Chromebooks with depthcharge boot
  2022-05-16  6:57 ` Krzysztof Kozlowski
@ 2022-05-16 15:06   ` Doug Anderson
  2022-05-16 15:11     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 19+ messages in thread
From: Doug Anderson @ 2022-05-16 15:06 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Rob Herring, Bjorn Andersson, Stephen Boyd, Matthias Kaehlcke,
	Rajendra Nayak, Alexandru M Stan, Julius Werner,
	Joseph S . Barrera III, Krzysztof Kozlowski, Rob Herring,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, LKML

Hi,

On Sun, May 15, 2022 at 11:57 PM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 13/05/2022 18:59, Douglas Anderson wrote:
> > This documents how many Chromebooks pick the device tree that will be
> > passed to the OS and can help understand the revisions / skus listed
> > as the top-level "compatible" in many Chromebooks.
> >
> > Signed-off-by: Douglas Anderson <dianders@chromium.org>
> > ---
> >
> > Changes in v2:
> > - ("Document how Chromebooks with depthcharge boot") new for v2.
> >
> >  .../devicetree/chromebook-boot-flow.rst       | 63 +++++++++++++++++++
> >  1 file changed, 63 insertions(+)
> >  create mode 100644 Documentation/devicetree/chromebook-boot-flow.rst
>
> This is not a Devicetree (generic) document, so it is not the best place
> for it. Maybe regular vendor place, e.g . Documentation/arm/google/ ?

I can put it there. ...but taking your two pieces of advice together,
you're saying:

1. Don't add this under the devicetree directory.

2. Don't refer to this by URL but instead by a relative file path.

I can do both of those two things, but I always had it in my mind that
the device tree was supposed to be "Linux agnostic". In other words,
you could refer to Linux as one OS that boots with device tree, but I
thought that the device tree docs were supposed to stand on their own.
With the above two suggestions, it seems like an extra piece tieing
the two together and assuming that both Linux and device tree docs are
living in the same place.

In any case, I'm happy to do what you request but I just want to double-check.

-Doug

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 2/4] dt-bindings: arm: qcom: Add sc7180 Chromebook board bindings
  2022-05-16 15:01     ` Doug Anderson
@ 2022-05-16 15:06       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2022-05-16 15:06 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Rob Herring, Bjorn Andersson, Stephen Boyd, Matthias Kaehlcke,
	Rajendra Nayak, Alexandru M Stan, Julius Werner,
	Joseph S . Barrera III, Andy Gross, Krzysztof Kozlowski,
	Rob Herring, Stephen Boyd,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-msm, LKML

On 16/05/2022 17:01, Doug Anderson wrote:
> 
> 
>> Actually this change should be rather part of that other commit...
> 
> I'm not sure I understand. Which of these are you suggesting?
> 
> 1. You want me to squash the two commits into one, so we add the
> generic doc in the same patch as the one adding sc7180 Chromebooks.
> 
> 2. You want the generic doc to come first in the series and it just
> adds the little blurb into
> "Documentation/devicetree/bindings/arm/qcom.yaml" even though
> Chromebooks aren't actually added until a later commit in the series.
> 
> 3. You want to add the sc7180 Chromebooks first in the series with no
> documentation and then later add in the generic documentation and the
> blurb into "Documentation/devicetree/bindings/arm/qcom.yaml".

Sorry for being unclear, I propose the third option. I mean, the hunk
referencing "chromebook-boot-flow.rst" should be rather added by the
patch adding that document.

> I'm also interested to know if you think the generic documentation
> patch should land through the Qualcomm tree. I think it would
> absolutely have to if I take your suggestion, right?

Yes, in that case would be a 5th patch in the set here, so I think
everything would go via Qcom SoC.


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 1/4] dt-bindings: Document how Chromebooks with depthcharge boot
  2022-05-16 15:06   ` Doug Anderson
@ 2022-05-16 15:11     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2022-05-16 15:11 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Rob Herring, Bjorn Andersson, Stephen Boyd, Matthias Kaehlcke,
	Rajendra Nayak, Alexandru M Stan, Julius Werner,
	Joseph S . Barrera III, Krzysztof Kozlowski, Rob Herring,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, LKML

On 16/05/2022 17:06, Doug Anderson wrote:
>>
>> This is not a Devicetree (generic) document, so it is not the best place
>> for it. Maybe regular vendor place, e.g . Documentation/arm/google/ ?
> 
> I can put it there. ...but taking your two pieces of advice together,
> you're saying:
> 
> 1. Don't add this under the devicetree directory.
> 
> 2. Don't refer to this by URL but instead by a relative file path.
> 
> I can do both of those two things, but I always had it in my mind that
> the device tree was supposed to be "Linux agnostic". In other words,
> you could refer to Linux as one OS that boots with device tree, but I
> thought that the device tree docs were supposed to stand on their own.
> With the above two suggestions, it seems like an extra piece tieing
> the two together and assuming that both Linux and device tree docs are
> living in the same place.

D'oh, you are right, it should not be referenced via path, if moved into
docs. Then let's discard that part of idea, so just move it to
Documentation/arm/google/ and keep the URL link in your bindings change.


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 4/4] dt-bindings: arm: qcom: Add more sc7180 Chromebook board bindings
  2022-05-16  7:05   ` Krzysztof Kozlowski
@ 2022-05-16 15:16     ` Doug Anderson
  2022-05-17  7:23       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 19+ messages in thread
From: Doug Anderson @ 2022-05-16 15:16 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Rob Herring, Bjorn Andersson, Stephen Boyd, Matthias Kaehlcke,
	Rajendra Nayak, Alexandru M Stan, Julius Werner,
	Joseph S . Barrera III, Andy Gross, Krzysztof Kozlowski,
	Rob Herring, Stephen Boyd,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-msm, LKML

Hi,

On Mon, May 16, 2022 at 12:05 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 13/05/2022 18:59, Douglas Anderson wrote:
> > This adds board bindings for boards that are downstream but not quite
> > upstream yet.
> >
> > Signed-off-by: Douglas Anderson <dianders@chromium.org>
> > ---
> >
> > Changes in v2:
> > - Use a "description" instead of a comment for each item.
> > - Use the marketing name instead of the code name where possible.
>
> These should be published with the patch adding their upstream DTS/DTSI.
> There is no point to list all possible boards in the world from any
> downstream source. For upstream there is no particular benefit for such
> bindings, for downstream you also said there is no.

Joe has been working on upstreaming these boards:

https://lore.kernel.org/r/20220510154406.v5.1.Id769ddc5dbf570ccb511db96da59f97d08f75a9c@changeid/

I think there is little chance that they won't go upstream at this
point. However, we're at a time in the merge window where it will be
several weeks before anything can land. If Joe were to include this
patch as part of his series I suspect it would be much more confusing
because it would add an unnecessary dependency between my series and
his and make it harder for Bjorn to apply it later. Keeping the patch
with my series means that the series can be applied more easily.

How about: I'll add a link to his latest posting in my next version.
Then, in the future (after these bindings patches have landed) then
future boards can go together with their bindings.

-DOug

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 4/4] dt-bindings: arm: qcom: Add more sc7180 Chromebook board bindings
  2022-05-16 15:16     ` Doug Anderson
@ 2022-05-17  7:23       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2022-05-17  7:23 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Rob Herring, Bjorn Andersson, Stephen Boyd, Matthias Kaehlcke,
	Rajendra Nayak, Alexandru M Stan, Julius Werner,
	Joseph S . Barrera III, Andy Gross, Krzysztof Kozlowski,
	Rob Herring, Stephen Boyd,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-msm, LKML

On 16/05/2022 17:16, Doug Anderson wrote:
> Hi,
> 
> On Mon, May 16, 2022 at 12:05 AM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> On 13/05/2022 18:59, Douglas Anderson wrote:
>>> This adds board bindings for boards that are downstream but not quite
>>> upstream yet.
>>>
>>> Signed-off-by: Douglas Anderson <dianders@chromium.org>
>>> ---
>>>
>>> Changes in v2:
>>> - Use a "description" instead of a comment for each item.
>>> - Use the marketing name instead of the code name where possible.
>>
>> These should be published with the patch adding their upstream DTS/DTSI.
>> There is no point to list all possible boards in the world from any
>> downstream source. For upstream there is no particular benefit for such
>> bindings, for downstream you also said there is no.
> 
> Joe has been working on upstreaming these boards:
> 
> https://lore.kernel.org/r/20220510154406.v5.1.Id769ddc5dbf570ccb511db96da59f97d08f75a9c@changeid/
> 
> I think there is little chance that they won't go upstream at this
> point. However, we're at a time in the merge window where it will be
> several weeks before anything can land. If Joe were to include this
> patch as part of his series I suspect it would be much more confusing
> because it would add an unnecessary dependency between my series and
> his and make it harder for Bjorn to apply it later. Keeping the patch
> with my series means that the series can be applied more easily.
> 
> How about: I'll add a link to his latest posting in my next version.
> Then, in the future (after these bindings patches have landed) then
> future boards can go together with their bindings.


Sure, sounds good.


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2022-05-17  7:23 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-13 16:59 [PATCH v2 1/4] dt-bindings: Document how Chromebooks with depthcharge boot Douglas Anderson
2022-05-13 16:59 ` [PATCH v2 2/4] dt-bindings: arm: qcom: Add sc7180 Chromebook board bindings Douglas Anderson
2022-05-13 19:25   ` Matthias Kaehlcke
2022-05-16  7:01   ` Krzysztof Kozlowski
2022-05-16 15:01     ` Doug Anderson
2022-05-16 15:06       ` Krzysztof Kozlowski
2022-05-13 16:59 ` [PATCH v2 3/4] dt-bindings: arm: qcom: Add / fix sc7280 " Douglas Anderson
2022-05-13 19:36   ` Matthias Kaehlcke
2022-05-16  7:02   ` Krzysztof Kozlowski
2022-05-13 16:59 ` [PATCH v2 4/4] dt-bindings: arm: qcom: Add more sc7180 Chromebook " Douglas Anderson
2022-05-13 20:37   ` Matthias Kaehlcke
2022-05-13 20:44     ` Doug Anderson
2022-05-16  7:05   ` Krzysztof Kozlowski
2022-05-16 15:16     ` Doug Anderson
2022-05-17  7:23       ` Krzysztof Kozlowski
2022-05-13 18:42 ` [PATCH v2 1/4] dt-bindings: Document how Chromebooks with depthcharge boot Matthias Kaehlcke
2022-05-16  6:57 ` Krzysztof Kozlowski
2022-05-16 15:06   ` Doug Anderson
2022-05-16 15:11     ` Krzysztof Kozlowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.