dt-bindings: firmware: google,gs101-acpm-ipc: add S2MPG11 secondary PMIC
PATCH v8 1/1 dt-bindings: firmware: google,gs101-acpm-ipc: add S2MPG11 secondary PMIC
In a typical system using the Samsung S2MPG10 PMIC, an S2MPG11 is used as a sub-PMIC.
The interface for both is the ACPM firmware protocol, so update the binding to allow the relevant node and update the example here to describe the connection for both PMICs.
Since we have two PMICs here, but can not use the 'reg' property (as the addressing is based on software, i.e. the ACPM firmware), the node names reflect that with their respective suffix. The existing 'pmic' therefore becomes deprecated in favour of 'pmic-1'.
While at it, update the example.
---
This is the last patch to be applied from the original series. Ideally it should be applied on top of commit 914809c666d6 ("Samsung S2MPG10 regulator and S2MPG11 PMIC drivers") from
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git/
or any child thereof due to patch context. That commit exists in linux-next.
Original cover letter below:
This series extends the existing S2MPG10 PMIC driver to add support for the regulators, and adds new S2MPG11 core and regulator drivers.
--- dependency note ---
This series must be applied in-order, due to the regulator drivers depending on headers & definitions added by the bindings and core drivers.
Due to patch context, there are dependencies on previous Samsung MFD patches, hence this series is against current for-mfd-next.
While these patches compile, regulator probe will only be successful with my deferrable regulators patches from
https://lore.kernel.org/r/[email protected]
(already in linux-next).
I think patches up to and including mfd changes could go via the MFD tree, and regulator patches using an immutable branch via the regulator tree on top.
--- end ---
The patches are kept together in one series, due to S2MPG11 and its regulators being very similar to S2MPG10.
The Samsung S2MPG11 PMIC is a Power Management IC for mobile applications with buck converters, various LDOs, power meters, and additional GPIO interfaces. It typically complements an S2MPG10 PMIC in a main/sub configuration as the sub-PMIC and both are used on the Google Pixel 6 and 6 Pro (oriole / raven).
A DT update for Oriole / Raven to enable these is required which I will send out separately.
Cheers,
Andre'
---
Changes in v8:
- resend patch 7 only with updated commit message, as all others are
merged already
- Link to v7: https://lore.kernel.org/r/[email protected]
Changes in v7:
- rebase against for-mfd-next
- add 'domain_suffix' to s2mpg11_irq_chip_pmic (patch 9)
- Link to v6: https://lore.kernel.org/r/[email protected]
Changes in v6:
- merge patch 21 into 15 (Bartosz)
- merge 'con-id' handling into patch 15
- collect tags
- Link to v5: https://lore.kernel.org/r/[email protected]
Changes in v5:
- rebase against mfd/sec alarm IRQ rework
https://lore.kernel.org/all/[email protected]/
- switch to async probe for mfd
- Mark: one MFD cell per PMIC, not per PMIC rail - drop or update related patches
- making the series runtime depend on
https://lore.kernel.org/r/[email protected]
- new patch:
- mfd: sec: s2mpg10: reorder regulators for better probe performance
- collect tags
- Link to v4: https://lore.kernel.org/r/[email protected]
Changes in v4:
- Krzysztof:
- s2mpg10-regulator.yaml: move additionalProperties to after allOf
- s2mpg10-regulator.yaml: use $defs, not definitions
- split samsung,s2mpg10-pmic.yaml and samsung,s2mpg11-pmic.yaml
- add full example for samsung,s2mpg10-pmic.yaml and 11
- acpm binding: commit message update
- acpm binding: pmic -> pmic-1, pmic2 -> pmic-2
- ensure binding file names match bindings
- fix typos in s2mpg11-regulator.yaml description text
- collect tags
- Link to v3: https://lore.kernel.org/r/[email protected]
Changes in v3:
- Krzysztof:
- split s2mpg10 core binding into separate file
- drop PCTRLSEL values that can be described using standard
properties, and update remaining macro names (self)
- drop maxItems:1 where not needed (Krzysztof)
- samsung,ext-control-gpios -> enable-gpios
- fix LDO20M_EN pin name -> VLDO20M_EN
- move all binding patternProperties to top-level
- one (driver) instance per actual rail, not per rail type (LDO or
buck)
- new macro REGULATOR_LINEAR_VRANGE() (patch 10)
- address some (pre-existing) checkpatch warnings
- various updates to regulator driver (patch 16 & 19).See footer there
- more descriptive commit messages
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- s2mpg11 also exposes additional GPIOs, update all relevant commit
messages (nevertheless, GPIOs are out of scope in this series)
- fix some commit message typos: s2mp1 -> s2mpg1
- patch2: drop | (literal style mark) from samsung,ext-control-gpios
- patch5: add | to vinb*-supply description for better formatting
- patch13: update ::of_parse_cb assignment
- patch15: drop duplicated ::of_parse_cb assignment
- Link to v1: https://lore.kernel.org/r/[email protected]
---
v4:
- Krzysztof:
- update commit message / subject
- pmic -> pmic-1, pmic2 -> pmic-2
--- .../bindings/firmware/google,gs101-acpm-ipc.yaml | 50 +++++++++++++++++++++- 1 file changed, 48 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/firmware/google,gs101-acpm-ipc.yaml +48 -2
@@ -37,6 +37,7 @@ properties: maxItems: 1 pmic: + deprecated: true description: Child node describing the main PMIC. type: object additionalProperties: true
@@ -45,6 +46,24 @@ properties: compatible: const: samsung,s2mpg10-pmic + pmic-1: + description: Child node describing the main PMIC. + type: object + additionalProperties: true + + properties: + compatible: + const: samsung,s2mpg10-pmic + + pmic-2: + description: Child node describing the sub PMIC. + type: object + additionalProperties: true + + properties: + compatible: + const: samsung,s2mpg11-pmic + shmem: description: List of phandle pointing to the shared memory (SHM) area. The memory
@@ -62,7 +81,9 @@ additionalProperties: false examples: - | + #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/interrupt-controller/irq.h> + #include <dt-bindings/regulator/samsung,s2mpg10-regulator.h> power-management { compatible = "google,gs101-acpm-ipc";
@@ -70,10 +91,12 @@ examples: mboxes = <&ap2apm_mailbox>; shmem = <&apm_sram>; - pmic { + pmic-1 { compatible = "samsung,s2mpg10-pmic"; interrupts-extended = <&gpa0 6 IRQ_TYPE_LEVEL_LOW>; + vinl3m-supply = <&buck8m>; + regulators { ldo1m { regulator-name = "vdd_ldo1";
@@ -82,7 +105,13 @@ examples: regulator-always-on; }; - // ... + ldo20m { + regulator-name = "vdd_dmics"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1300000>; + regulator-always-on; + samsung,ext-control = <S2MPG10_EXTCTRL_LDO20M_EN2>; + }; buck8m { regulator-name = "vdd_mif";
@@ -93,4 +122,21 @@ examples: }; }; }; + + pmic-2 { + compatible = "samsung,s2mpg11-pmic"; + interrupts-extended = <&gpa0 7 IRQ_TYPE_LEVEL_LOW>; + + vinl1s-supply = <&buck8m>; + vinl2s-supply = <&buck6s>; + + regulators { + buckd { + regulator-name = "vcc_ufs"; + regulator-ramp-delay = <6250>; + enable-gpios = <&gpp0 1 GPIO_ACTIVE_HIGH>; + samsung,ext-control = <S2MPG11_EXTCTRL_UFS_EN>; + }; + }; + }; };
---
base-commit: 9845cf73f7db6094c0d8419d6adb848028f4a921
change-id: 20250603-s2mpg1x-regulators-7a41c8399abf
Best regards,
Signature · 1 line
André Draszik <[email protected]>
Quoted 8 lines · André Draszik
In a typical system using the Samsung S2MPG10 PMIC, an S2MPG11 is used as a sub-PMIC.
The interface for both is the ACPM firmware protocol, so update the binding to allow the relevant node and update the example here to describe the connection for both PMICs.
[...]
Applied, thanks!
[1/1] dt-bindings: firmware: google,gs101-acpm-ipc: add S2MPG11 secondary PMIC
https://git.kernel.org/krzk/linux/c/f2e83070febf61fc72765cdc28d2a45c89b77ce4
Best regards,
Signature · 1 line
Krzysztof Kozlowski <[email protected]>