linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/2] Add graph connections between tcpc & fg for Pixel 6
@ 2025-05-08  5:08 Amit Sunil Dhamne
  2025-05-08  5:08 ` [PATCH v1 1/2] dt-bindings: power: supply: max17201: add port property Amit Sunil Dhamne
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Amit Sunil Dhamne @ 2025-05-08  5:08 UTC (permalink / raw)
  To: sre, robh, krzk+dt, conor+dt, peter.griffin
  Cc: andre.draszik, badhri, tudor.ambarus, alim.akhtar, dima.fedrau,
	linux-pm, devicetree, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, Amit Sunil Dhamne

max77759 Type-C controller supplies VBUS into & out of (depending on the
charging mode) the battery in Pixel 6. In order to represent this
relationship, we use graph to connect tcpc & fuel gauge.

Link to USB connector binding that this patchset uses:
 - https://lore.kernel.org/all/20250507-batt_ops-v2-1-8d06130bffe6@google.com/

This patchset depends on the following:
 - https://lore.kernel.org/all/20250421-b4-gs101_max77759_fg-v3-0-50cd8caf9017@uclouvain.be/

Amit Sunil Dhamne (2):
  dt-bindings: power: supply: max17201: add port property
  arm64: dts: exynos: gs101-pixel-common: add graph property to connect
    tcpc & fg

 .../bindings/power/supply/maxim,max17201.yaml      |  5 +++++
 .../boot/dts/exynos/google/gs101-pixel-common.dtsi | 14 ++++++++++++++
 2 files changed, 19 insertions(+)


base-commit: 92a09c47464d040866cf2b4cd052bc60555185fb
prerequisite-patch-id: 74aa0a6fc4a5c56d870bb15375fad1fe41ffc1e9
prerequisite-patch-id: 46f968300dcf5442e12d882ca23168494249d378
prerequisite-patch-id: 3ad83a2782819bca215bb267d36a1ff04fe557b2
prerequisite-patch-id: 86b5207d8f44255c36b1e600ecdf4f948c5da685
prerequisite-patch-id: a15532888ff2572696d9fa6a14775e8ebf590391
-- 
2.49.0.987.g0cc8ee98dc-goog



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

* [PATCH v1 1/2] dt-bindings: power: supply: max17201: add port property
  2025-05-08  5:08 [PATCH v1 0/2] Add graph connections between tcpc & fg for Pixel 6 Amit Sunil Dhamne
@ 2025-05-08  5:08 ` Amit Sunil Dhamne
  2025-05-08  6:09   ` Rob Herring (Arm)
  2025-05-08  5:08 ` [PATCH v1 2/2] arm64: dts: exynos: gs101-pixel-common: add graph property to connect tcpc & fg Amit Sunil Dhamne
  2025-05-09 14:16 ` [PATCH v1 0/2] Add graph connections between tcpc & fg for Pixel 6 Rob Herring (Arm)
  2 siblings, 1 reply; 5+ messages in thread
From: Amit Sunil Dhamne @ 2025-05-08  5:08 UTC (permalink / raw)
  To: sre, robh, krzk+dt, conor+dt, peter.griffin
  Cc: andre.draszik, badhri, tudor.ambarus, alim.akhtar, dima.fedrau,
	linux-pm, devicetree, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, Amit Sunil Dhamne

Add port binding to represent an endpoint that connects the power line
from the battery to the Type-C port connector

Signed-off-by: Amit Sunil Dhamne <amitsd@google.com>
---
 .../devicetree/bindings/power/supply/maxim,max17201.yaml     | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/power/supply/maxim,max17201.yaml b/Documentation/devicetree/bindings/power/supply/maxim,max17201.yaml
index 4823021ff16b..50c2d672cabf 100644
--- a/Documentation/devicetree/bindings/power/supply/maxim,max17201.yaml
+++ b/Documentation/devicetree/bindings/power/supply/maxim,max17201.yaml
@@ -32,6 +32,11 @@ properties:
   interrupts:
     maxItems: 1
 
+  port:
+    $ref: /schemas/graph.yaml#/properties/port
+    description: OF graph endpoint representing power line (VBUS) connecting
+      with the Type-C port connector.
+
 required:
   - compatible
   - reg
-- 
2.49.0.987.g0cc8ee98dc-goog



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

* [PATCH v1 2/2] arm64: dts: exynos: gs101-pixel-common: add graph property to connect tcpc & fg
  2025-05-08  5:08 [PATCH v1 0/2] Add graph connections between tcpc & fg for Pixel 6 Amit Sunil Dhamne
  2025-05-08  5:08 ` [PATCH v1 1/2] dt-bindings: power: supply: max17201: add port property Amit Sunil Dhamne
@ 2025-05-08  5:08 ` Amit Sunil Dhamne
  2025-05-09 14:16 ` [PATCH v1 0/2] Add graph connections between tcpc & fg for Pixel 6 Rob Herring (Arm)
  2 siblings, 0 replies; 5+ messages in thread
From: Amit Sunil Dhamne @ 2025-05-08  5:08 UTC (permalink / raw)
  To: sre, robh, krzk+dt, conor+dt, peter.griffin
  Cc: andre.draszik, badhri, tudor.ambarus, alim.akhtar, dima.fedrau,
	linux-pm, devicetree, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, Amit Sunil Dhamne

Add "port" binding to represent vbus/vchgin connection between tcpc
connector & battery using OF graphs.

Signed-off-by: Amit Sunil Dhamne <amitsd@google.com>
---
 .../boot/dts/exynos/google/gs101-pixel-common.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/exynos/google/gs101-pixel-common.dtsi b/arch/arm64/boot/dts/exynos/google/gs101-pixel-common.dtsi
index 84fc10c35629..45b079c16146 100644
--- a/arch/arm64/boot/dts/exynos/google/gs101-pixel-common.dtsi
+++ b/arch/arm64/boot/dts/exynos/google/gs101-pixel-common.dtsi
@@ -186,6 +186,14 @@ usbc0_role_sw: endpoint {
 						remote-endpoint = <&usbdrd31_dwc3_role_switch>;
 					};
 				};
+
+				port@3 {
+					reg = <3>;
+
+					conn_batt_vbus: endpoint {
+						remote-endpoint = <&batt_conn_vbus>;
+					};
+				};
 			};
 		};
 	};
@@ -197,6 +205,12 @@ fuel-gauge@36 {
 		interrupt-parent = <&gpa9>;
 		interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
 		shunt-resistor-micro-ohms = <5000>;
+
+		port {
+			batt_conn_vbus: endpoint {
+				remote-endpoint = <&conn_batt_vbus>;
+			};
+		};
 	};
 };
 
-- 
2.49.0.987.g0cc8ee98dc-goog



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

* Re: [PATCH v1 1/2] dt-bindings: power: supply: max17201: add port property
  2025-05-08  5:08 ` [PATCH v1 1/2] dt-bindings: power: supply: max17201: add port property Amit Sunil Dhamne
@ 2025-05-08  6:09   ` Rob Herring (Arm)
  0 siblings, 0 replies; 5+ messages in thread
From: Rob Herring (Arm) @ 2025-05-08  6:09 UTC (permalink / raw)
  To: Amit Sunil Dhamne
  Cc: andre.draszik, tudor.ambarus, krzk+dt, sre, devicetree,
	linux-arm-kernel, dima.fedrau, alim.akhtar, conor+dt, badhri,
	linux-kernel, peter.griffin, linux-samsung-soc, linux-pm


On Wed, 07 May 2025 22:08:51 -0700, Amit Sunil Dhamne wrote:
> Add port binding to represent an endpoint that connects the power line
> from the battery to the Type-C port connector
> 
> Signed-off-by: Amit Sunil Dhamne <amitsd@google.com>
> ---
>  .../devicetree/bindings/power/supply/maxim,max17201.yaml     | 5 +++++
>  1 file changed, 5 insertions(+)
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:


doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250508050856.674782-2-amitsd@google.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.



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

* Re: [PATCH v1 0/2] Add graph connections between tcpc & fg for Pixel 6
  2025-05-08  5:08 [PATCH v1 0/2] Add graph connections between tcpc & fg for Pixel 6 Amit Sunil Dhamne
  2025-05-08  5:08 ` [PATCH v1 1/2] dt-bindings: power: supply: max17201: add port property Amit Sunil Dhamne
  2025-05-08  5:08 ` [PATCH v1 2/2] arm64: dts: exynos: gs101-pixel-common: add graph property to connect tcpc & fg Amit Sunil Dhamne
@ 2025-05-09 14:16 ` Rob Herring (Arm)
  2 siblings, 0 replies; 5+ messages in thread
From: Rob Herring (Arm) @ 2025-05-09 14:16 UTC (permalink / raw)
  To: Amit Sunil Dhamne
  Cc: tudor.ambarus, peter.griffin, andre.draszik, badhri, linux-pm,
	devicetree, sre, conor+dt, linux-samsung-soc, alim.akhtar,
	linux-arm-kernel, krzk+dt, dima.fedrau, linux-kernel


On Wed, 07 May 2025 22:08:50 -0700, Amit Sunil Dhamne wrote:
> max77759 Type-C controller supplies VBUS into & out of (depending on the
> charging mode) the battery in Pixel 6. In order to represent this
> relationship, we use graph to connect tcpc & fuel gauge.
> 
> Link to USB connector binding that this patchset uses:
>  - https://lore.kernel.org/all/20250507-batt_ops-v2-1-8d06130bffe6@google.com/
> 
> This patchset depends on the following:
>  - https://lore.kernel.org/all/20250421-b4-gs101_max77759_fg-v3-0-50cd8caf9017@uclouvain.be/
> 
> Amit Sunil Dhamne (2):
>   dt-bindings: power: supply: max17201: add port property
>   arm64: dts: exynos: gs101-pixel-common: add graph property to connect
>     tcpc & fg
> 
>  .../bindings/power/supply/maxim,max17201.yaml      |  5 +++++
>  .../boot/dts/exynos/google/gs101-pixel-common.dtsi | 14 ++++++++++++++
>  2 files changed, 19 insertions(+)
> 
> 
> base-commit: 92a09c47464d040866cf2b4cd052bc60555185fb
> prerequisite-patch-id: 74aa0a6fc4a5c56d870bb15375fad1fe41ffc1e9
> prerequisite-patch-id: 46f968300dcf5442e12d882ca23168494249d378
> prerequisite-patch-id: 3ad83a2782819bca215bb267d36a1ff04fe557b2
> prerequisite-patch-id: 86b5207d8f44255c36b1e600ecdf4f948c5da685
> prerequisite-patch-id: a15532888ff2572696d9fa6a14775e8ebf590391
> --
> 2.49.0.987.g0cc8ee98dc-goog
> 
> 
> 


My bot found new DTB warnings on the .dts files added or changed in this
series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:

  pip3 install dtschema --upgrade


This patch series was applied (using b4) to base:
 Base: using specified base-commit 92a09c47464d040866cf2b4cd052bc60555185fb
 Deps: looking for dependencies matching 5 patch-ids
 Deps: Applying prerequisite patch: [PATCH v3 1/5] power: supply: correct capacity computation
 Deps: Applying prerequisite patch: [PATCH v3 2/5] power: supply: add support for max77759 fuel gauge
 Deps: Applying prerequisite patch: [PATCH v3 3/5] dt-bindings: power: supply: add max77759-fg flavor
 Deps: Applying prerequisite patch: [PATCH v3 4/5] arm64: defconfig: enable Maxim max1720x driver
 Deps: Applying prerequisite patch: [PATCH v3 5/5] arm64: dts: exynos: gs101-oriole: enable Maxim max77759 fuel gauge

If this is not the correct base, please add 'base-commit' tag
(or use b4 which does this automatically)

New warnings running 'make CHECK_DTBS=y for arch/arm64/boot/dts/exynos/' for 20250508050856.674782-1-amitsd@google.com:

arch/arm64/boot/dts/exynos/google/gs101-oriole.dtb: fuel-gauge@36 (maxim,max77759-fg): reg: [[54]] is too short
	from schema $id: http://devicetree.org/schemas/power/supply/maxim,max17201.yaml#
arch/arm64/boot/dts/exynos/google/gs101-oriole.dtb: fuel-gauge@36 (maxim,max77759-fg): reg-names: ['m5'] is too short
	from schema $id: http://devicetree.org/schemas/power/supply/maxim,max17201.yaml#
arch/arm64/boot/dts/exynos/google/gs101-oriole.dtb: fuel-gauge@36 (maxim,max77759-fg): Unevaluated properties are not allowed ('reg-names' was unexpected)
	from schema $id: http://devicetree.org/schemas/power/supply/maxim,max17201.yaml#
arch/arm64/boot/dts/exynos/google/gs101-raven.dtb: fuel-gauge@36 (maxim,max77759-fg): reg: [[54]] is too short
	from schema $id: http://devicetree.org/schemas/power/supply/maxim,max17201.yaml#
arch/arm64/boot/dts/exynos/google/gs101-raven.dtb: fuel-gauge@36 (maxim,max77759-fg): reg-names: ['m5'] is too short
	from schema $id: http://devicetree.org/schemas/power/supply/maxim,max17201.yaml#
arch/arm64/boot/dts/exynos/google/gs101-raven.dtb: fuel-gauge@36 (maxim,max77759-fg): Unevaluated properties are not allowed ('reg-names' was unexpected)
	from schema $id: http://devicetree.org/schemas/power/supply/maxim,max17201.yaml#







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

end of thread, other threads:[~2025-05-09 16:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-08  5:08 [PATCH v1 0/2] Add graph connections between tcpc & fg for Pixel 6 Amit Sunil Dhamne
2025-05-08  5:08 ` [PATCH v1 1/2] dt-bindings: power: supply: max17201: add port property Amit Sunil Dhamne
2025-05-08  6:09   ` Rob Herring (Arm)
2025-05-08  5:08 ` [PATCH v1 2/2] arm64: dts: exynos: gs101-pixel-common: add graph property to connect tcpc & fg Amit Sunil Dhamne
2025-05-09 14:16 ` [PATCH v1 0/2] Add graph connections between tcpc & fg for Pixel 6 Rob Herring (Arm)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).