public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v9 0/8] mfd: bcm590xx: Add support for BCM59054
@ 2025-05-15 14:16 Artur Weber
  2025-05-15 14:16 ` [PATCH v9 1/8] dt-bindings: mfd: brcm,bcm59056: Convert to YAML Artur Weber
                   ` (9 more replies)
  0 siblings, 10 replies; 22+ messages in thread
From: Artur Weber @ 2025-05-15 14:16 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Liam Girdwood, Mark Brown, Florian Fainelli, Ray Jui,
	Scott Branden, Broadcom internal kernel review list
  Cc: Stanislav Jakubek, devicetree, linux-kernel, linux-arm-kernel,
	~postmarketos/upstreaming, Artur Weber

Add support for the BCM59054 MFD to the bcm590xx driver and fix a
couple of small bugs in it that also affected the already supported
BCM59056.

While we're at it - convert the devicetree bindings to YAML format
and drop the bcm59056 DTS in favor of describing the PMU in users'
DTS files, as is done for most other MFDs.

The BCM59054 is fairly similar to the BCM59056, with the primary
difference being the different number and layout of regulators.
It is primarily used in devices using the BCM21664 and BCM23550
chipsets.

This patchset has been tested on a Samsung Galaxy Grand Neo
(baffinlite rev02; DTS not in mainline yet) with a BCM59054 PMIC.
Testing on a BCM59056 would be appreciated.

Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
---
Changes in v9:
- Rebase on mfd/for-mfd-next again
- Drop "ARM: dts: Drop DTS for BCM59056 PMU" as it has been applied
- Address another style nitpick on "mfd: bcm590xx: Add PMU ID/revision parsing function"
- Pick up Reviewed-by tag from Stanislav
- Link to v8: https://lore.kernel.org/r/20250430-bcm59054-v8-0-e4cf638169a4@gmail.com

Changes in v8:
- Rebase on mfd/for-mfd-next
- Drop "mfd: bcm590xx: Drop unused "id" member of bcm590xx MFD struct"
  as it has been applied
- Address style nitpicks on "mfd: bcm590xx: Add PMU ID/revision parsing function"
- Link to v7: https://lore.kernel.org/r/20250316-bcm59054-v7-0-4281126be1b8@gmail.com

Changes in v7:
- Return -ENODEV on PMU ID mismatch
- Drop "Check your DT compatible" from ID mismatch error message
- Pick up Reviewed-by trailers from Rob on DT bindings
- Link to v6: https://lore.kernel.org/r/20250304-bcm59054-v6-0-ae8302358443@gmail.com

Changes in v6:
- Rename mfd/brcm,bcm590xx.yaml to mfd/brcm,bcm59056.yaml again
- Use PMU ID value as device type
- Rename rev_dig and rev_ana to rev_digital and rev_analog
- Link to v5: https://lore.kernel.org/r/20250221-bcm59054-v5-0-065f516a9042@gmail.com

Changes in v5:
- Make regulator binding descriptions reference mfd/brcm,bcm590xx.yaml
  instead of mfd/brcm,bcm59056.yaml
- Move regmap type enum to common MFD header
- Link to v4: https://lore.kernel.org/r/20250215-bcm59054-v4-0-dbfb2d76a855@gmail.com

Changes in v4:
- Fix yamllint warnings in DT bindings
- Address miscelaneous review comments related to DT bindings
  - Note that I did not end up moving the regulator refs from
    allOf compatible matches; I explained my reasoning in [1].
    [1] https://lore.kernel.org/lkml/ab853605-859d-44c6-8cbd-44391cd677e6@gmail.com/
- Add PMU ID/revision parsing to MFD driver
- Fix instances of regulator data not matching vendor kernel for
  BCM59054
- Use different voltage table for BCM59054 VSR reg based on PMU
  revision
- Link to v3: https://lore.kernel.org/r/20250131-bcm59054-v3-0-bbac52a84787@gmail.com

Changes in v3:
- Split out regulator DT bindings into separate YAML
- Use tables of regulator info instead of get_XXX_register, reg_is_XXX
  functions
- Drop "regulator: bcm590xx: Add proper handling for PMMODE registers";
  it adds unnecessary noise to the series and will be submitted separately
- Link to v2: https://lore.kernel.org/r/20231030-bcm59054-v2-0-5fa4011aa5ba@gmail.com

Changes in v2:
- Fixed BCM59054 ID being passed to BCM59056 function in the
  regulator driver
- Dropped linux-rpi-kernel from the CC list
- Link to v1: https://lore.kernel.org/r/20231030-bcm59054-v1-0-3517f980c1e3@gmail.com

---
Artur Weber (8):
      dt-bindings: mfd: brcm,bcm59056: Convert to YAML
      dt-bindings: mfd: brcm,bcm59056: Add compatible for BCM59054
      mfd: bcm590xx: Add support for multiple device types + BCM59054 compatible
      mfd: bcm590xx: Add PMU ID/revision parsing function
      regulator: bcm590xx: Use dev_err_probe for regulator register error
      regulator: bcm590xx: Store regulator descriptions in table
      regulator: bcm590xx: Rename BCM59056-specific data as such
      regulator: bcm590xx: Add support for BCM59054 regulators

 .../devicetree/bindings/mfd/brcm,bcm59056.txt      |   39 -
 .../devicetree/bindings/mfd/brcm,bcm59056.yaml     |   76 ++
 .../bindings/regulator/brcm,bcm59054.yaml          |   56 +
 .../bindings/regulator/brcm,bcm59056.yaml          |   51 +
 drivers/mfd/bcm590xx.c                             |   66 +-
 drivers/regulator/bcm590xx-regulator.c             | 1289 ++++++++++++++++----
 include/linux/mfd/bcm590xx.h                       |   27 +
 7 files changed, 1325 insertions(+), 279 deletions(-)
---
base-commit: 6103b87af895954882de162cc652d02a6f65c074
change-id: 20240816-bcm59054-a880695e41e8

Best regards,
-- 
Artur Weber <aweber.kernel@gmail.com>


^ permalink raw reply	[flat|nested] 22+ messages in thread
* [PATCH v3 00/14] Support ROHM Scalable PMIC family
@ 2025-04-08  8:40 Matti Vaittinen
  2025-05-02  7:47 ` [GIT PULL] Immutable branch between MFD and Regulator due for the v6.16 merge window Lee Jones
  0 siblings, 1 reply; 22+ messages in thread
From: Matti Vaittinen @ 2025-04-08  8:40 UTC (permalink / raw)
  To: Matti Vaittinen, Matti Vaittinen
  Cc: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Liam Girdwood, Mark Brown, Matti Vaittinen, devicetree,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 4421 bytes --]

Support ROHM BD96802, BD96805 and BD96806 PMICs

The ROHM BD96801 [1] and BD96805 [2] are almost identical PMICs what comes
to the digital interface. Main difference is voltage tuning range.
Supporting BD96805 with BD96801 drivers is mostly just a matter of being
able to differentiate the PMICs (done based on the devicetree
compatible) and then providing separate voltage tables.

The ROHM BD96802 [3] is a companion PMIC which is intended to be used to
provide more capacity on systems where the BD96801 alone is not
sufficient. Startup sequence of these PMICs can be synchronized in
hardware level, and there seems to be some mechanisms which allow
delivering the companion PMIC (BD96802) status to the main PMIC
(BD96801/BD96805). This patch series does treat the companion PMIC(s) as
individual PMICs and allows using them from software point of view as a
stand alone ICs. From the digital point of view, the BD96802 is a subset
of BD96801, providing only buck1 and buck2 regulators. Please see the
data sheet

The ROHM BD96806 [4] is similar to the BD96802, except that it does also
provide different voltage tuning ranges.

This series adds basic voltage monitoring and control as well as a
watchdog support for these PMICs using the BD96801 drivers.

Similarly to the BD96801, these PMICs too have a few configurations
which can only be done when the PMIC is in STBY state. Similarly to the
BD96801, doing these configurations isn't supported by the driver. The
original BD96801 RFC [5] driver should be able to cover those
configurations, if modified to support these models.

[1]: ROHM BD96801 data sheet:
https://fscdn.rohm.com/en/products/databook/datasheet/ic/power/switching_regulator_system/product_brief_bd96801qxx-c-e.pdf
[2]: ROHM BD96805 data sheet:
https://fscdn.rohm.com/en/products/databook/datasheet/ic/power/switching_regulator_system/product_brief_bd96805qxx-c-e.pdf
[3]: ROHM BD96802 data sheet:
https://fscdn.rohm.com/en/products/databook/datasheet/ic/power/switching_regulator_system/product_brief_bd96802qxx-c-e.pdf
[4]: ROHM BD96806 data sheet:
https://fscdn.rohm.com/en/products/databook/datasheet/ic/power/switching_regulator_system/product_brief_bd96806qxx-c-e.pdf
[5]: Original BD96801 RFC:
https://lore.kernel.org/all/cover.1712058690.git.mazziesaccount@gmail.com/

Revision history:
v2 => v3:
 - Fix BD96806 voltages
 - Use defines for voltages to ease spotting (copy-paste) errors in
   regulator descs
 - Use lowercase node names in the BD96802 dt-binding
v1 => v2: MFD driver changes after review by Lee
 - Use enum for chip type instead of picking the data directly from the
   of_match_data.
 - rename "chip data" variable 'cd' to more widely used 'ddata'.
 link to v1:
  https://lore.kernel.org/all/cover.1741864404.git.mazziesaccount@gmail.com/


Matti Vaittinen (14):
  dt-bindings: regulator: Add ROHM BD96802 PMIC
  dt-bindings: mfd: Add ROHM BD96802 PMIC
  dt-bindings: mfd: bd96801: Add ROHM BD96805
  dt-bindings: mfd: bd96802: Add ROHM BD96806
  mfd: rohm-bd96801: Add chip info
  mfd: bd96801: Drop IC name from the regulator IRQ resources
  regulator: bd96801: Drop IC name from the IRQ resources
  mfd: rohm-bd96801: Support ROHM BD96802
  regulator: bd96801: Support ROHM BD96802
  mfd: bd96801: Support ROHM BD96805
  regulator: bd96801: Support ROHM BD96805 PMIC
  mfd: bd96801: Support ROHM BD96806
  regulator: bd96801: Support ROHM BD96806 PMIC
  MAINTAINERS: Add BD96802 specific header

 .../bindings/mfd/rohm,bd96801-pmic.yaml       |  10 +-
 .../bindings/mfd/rohm,bd96802-pmic.yaml       | 101 ++++
 .../regulator/rohm,bd96802-regulator.yaml     |  44 ++
 MAINTAINERS                                   |   1 +
 drivers/mfd/rohm-bd96801.c                    | 565 ++++++++++++++----
 drivers/regulator/bd96801-regulator.c         | 455 ++++++++++++--
 include/linux/mfd/rohm-bd96801.h              |   2 +
 include/linux/mfd/rohm-bd96802.h              |  74 +++
 include/linux/mfd/rohm-generic.h              |   3 +
 9 files changed, 1073 insertions(+), 182 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mfd/rohm,bd96802-pmic.yaml
 create mode 100644 Documentation/devicetree/bindings/regulator/rohm,bd96802-regulator.yaml
 create mode 100644 include/linux/mfd/rohm-bd96802.h


base-commit: 0af2f6be1b4281385b618cb86ad946eded089ac8
-- 
2.49.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2025-05-22 14:46 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-15 14:16 [PATCH v9 0/8] mfd: bcm590xx: Add support for BCM59054 Artur Weber
2025-05-15 14:16 ` [PATCH v9 1/8] dt-bindings: mfd: brcm,bcm59056: Convert to YAML Artur Weber
2025-05-15 14:16 ` [PATCH v9 2/8] dt-bindings: mfd: brcm,bcm59056: Add compatible for BCM59054 Artur Weber
2025-05-15 14:16 ` [PATCH v9 3/8] mfd: bcm590xx: Add support for multiple device types + BCM59054 compatible Artur Weber
2025-05-15 14:16 ` [PATCH v9 4/8] mfd: bcm590xx: Add PMU ID/revision parsing function Artur Weber
2025-05-15 14:16 ` [PATCH v9 5/8] regulator: bcm590xx: Use dev_err_probe for regulator register error Artur Weber
2025-05-16 11:56   ` Mark Brown
2025-05-15 14:16 ` [PATCH v9 6/8] regulator: bcm590xx: Store regulator descriptions in table Artur Weber
2025-05-16 12:30   ` Mark Brown
2025-05-15 14:16 ` [PATCH v9 7/8] regulator: bcm590xx: Rename BCM59056-specific data as such Artur Weber
2025-05-16 12:31   ` Mark Brown
2025-05-15 14:16 ` [PATCH v9 8/8] regulator: bcm590xx: Add support for BCM59054 regulators Artur Weber
2025-05-16 12:32   ` Mark Brown
2025-05-22 10:05 ` [PATCH v9 0/8] mfd: bcm590xx: Add support for BCM59054 Lee Jones
2025-05-22 14:45 ` [GIT PULL] Immutable branch between MFD and Regulator due for the v6.16 merge window Lee Jones
  -- strict thread matches above, loose matches on Subject: below --
2025-04-08  8:40 [PATCH v3 00/14] Support ROHM Scalable PMIC family Matti Vaittinen
2025-05-02  7:47 ` [GIT PULL] Immutable branch between MFD and Regulator due for the v6.16 merge window Lee Jones
2025-05-02 23:25   ` Mark Brown
2025-05-06  5:28     ` Matti Vaittinen
2025-05-06 14:10       ` Mark Brown
2025-05-06 14:29         ` Matti Vaittinen
2025-05-07 10:33     ` Lee Jones
2025-05-07 10:36       ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox