Skip to content

spmi: pmic-arb: Add support for multiple buses

Abel Vesa linux-arm-kernel linux-arm-msm linux-devicetree linux-mediatek lkml 11 versions – Applied

Status from this message: Applied to spmi-next

Get series with b4
b4 am [email protected] change-id 20240207-spmi-multi-master-support-832a704b779b

Versions newest first

  1. v10 Latest7 patches 7 repliesApplied
  2. v97 patches 4 repliesSuperseded
  3. v87 patches 6 repliesSuperseded
Earlier versions · 8
VersionPostedPatchesRepliesStatus
v76 patches5 repliesSuperseded
v6 posting 2/25 patches11 repliesSuperseded
v6 posting 1/25 patches2 repliesSuperseded
v54 patches2 repliesSuperseded
v4 RFC4 patches0 repliesSuperseded
v3 RFC4 patches11 repliesSuperseded
v2 RFC1 patch2 repliesSuperseded
v1 RFC2 patches9 repliesSuperseded

Changes in v10 from the cover letter

- Updated the commit for the x1e80100 dedicated schema file to explain
why the this platform specific compatible was used.
- Link to v9: https://lore.kernel.org/r/[email protected]

Patches in v10 Applied

#Subject and filesSizeRepliesApplied
1/7dt-bindings: spmi: Add X1E80100 SPMI PMIC ARB schemaDocumentation/devicetree/bindings/spmi/qcom,x1e80100-spmi-pmic-arb.yaml+136 -01 reply
2/7dt-bindings: spmi: Deprecate qcom,bus-idDocumentation/devicetree/bindings/spmi/qcom,spmi-pmic-arb.yaml+1 -01 reply
3/7spmi: pmic-arb: Fix some compile warnings about members not being describeddrivers/spmi/spmi-pmic-arb.c+5 -01 reply
4/7spmi: pmic-arb: Make the APID init a version operationdrivers/spmi/spmi-pmic-arb.c+69 -751 reply
5/7spmi: pmic-arb: Make core resources acquiring a version operationdrivers/spmi/spmi-pmic-arb.c+71 -431 reply
6/7spmi: pmic-arb: Register controller for bus instead of arbiterdrivers/spmi/spmi-pmic-arb.c+374 -2851 reply
7/7spmi: pmic-arb: Add multi bus supportdrivers/spmi/spmi-pmic-arb.c+120 -181 reply

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchKrzysztof KozlowskiNeil Armstrong
1/7R-b
2/7R-b
3/7R-b
4/7R-b
5/7R-b
6/7R-b
7/7R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v10 thread

Cover letter [PATCH v10 0/7] spmi: pmic-arb: Add support for multiple buses

This patchset prepares for and adds support for 2 buses, which is supported in HW starting with version 7. Until now, none of the currently supported platforms in upstream have used the second bus. The X1E80100 platform, on the other hand, needs the second bus for the USB2.0 to work as there are 3 SMB2360 PMICs which provide eUSB2 repeaters and they are all found on the second bus.

---
Changes in v10:
- Updated the commit for the x1e80100 dedicated schema file to explain
why the this platform specific compatible was used.
- Link to v9: https://lore.kernel.org/r/[email protected]

Changes in v9:
- Use the proper number of buses on deregister, like David suggested
- Moved the lock from the arbiter to the bus, like David suggested
- Fixed type in schema file, pointed out by David
- Added Neil's R-b tag to patches #3, #6 and #7
- Link to v8: https://lore.kernel.org/r/[email protected]

Changes in v8:
- Added Neil's R-b tag to the 3rd patch
- Fixed compile warnings already existent by adding another patch
- Fixed compile warning about get_core_resources, reported by Neil
- Dropped and moved the spurious core removal changes, as suggested by Neil
- Link to v7: https://lore.kernel.org/r/[email protected]

Changes in v7:
- This time really collected Krzysztof's R-b tags
- Added Neil's R-b tag to the 4th patch
- Split the multi bus patch into two separate patches, one for adding the bus object and one for the secondary bus, as per Neil's suggestion
- Fixed regression for single bus platforms triggered by casting to pmic_arb instead of bus in pmic_arb_non_data_cmd_v1
- Fixed bus object allocation by using ctrl drvdata instead
- Prefixed the spmi node property in x1e80100 schema with '^'
- Fixed struct and function documentation warnings reported by Neil

Changes in v6 (resend):
- Collected Krzysztof's R-b tags
- Link to v6: https://lore.kernel.org/r/[email protected]

Changes in v6:
- Changed the compatible to platform specific (X1E80100) along with the
schema. Fixed the spmi buses unit addresses and added the empty ranges
property. Added missing properties to the spmi buses and the
"unevaluatedProperties: false".
- Deprecated the "qcom,bus-id" in the legacy schema.
- Changed the driver to check for legacy compatible first
- Link to v5: https://lore.kernel.org/r/[email protected]

Changes in v5:
- Dropped the RFC as there aren't any concerns about the approach anymore
- Dropped the unused dev and res variables from pmic_arb_get_obsrvr_chnls_v2
- Link to v4: https://lore.kernel.org/r/[email protected]

Changes in v4:
- Fixed comment above pmic_arb_init_apid_v7 by dropping the extra "bus" word
- Swicthed to devm_platform_ioremap_resource_byname for obsrvr and chnls.
The core remains with platform_get_resource_byname as we need the core size.
- Dropped comment from probe related to the need of platform_get_resource_byname
as it not true anymore.
- Dropped the qcom,bus-id optional property.
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
- Split the change into 3 separate patches. First 2 patches are moving
apid init and core resources into version specific ops. Third one is
adding the support for 2 buses and dedicated compatible.
- Added separate bindings patch
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Reworked it so that it registers a spmi controller for each bus
rather than relying on the generic framework to pass on the bus
(master) id.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Abel Vesa (7):
dt-bindings: spmi: Add X1E80100 SPMI PMIC ARB schema
dt-bindings: spmi: Deprecate qcom,bus-id
spmi: pmic-arb: Fix some compile warnings about members not being described
spmi: pmic-arb: Make the APID init a version operation
spmi: pmic-arb: Make core resources acquiring a version operation
spmi: pmic-arb: Register controller for bus instead of arbiter
spmi: pmic-arb: Add multi bus support

 .../bindings/spmi/qcom,spmi-pmic-arb.yaml          |   1 +
 .../bindings/spmi/qcom,x1e80100-spmi-pmic-arb.yaml | 136 +++
 drivers/spmi/spmi-pmic-arb.c                       | 964 +++++++++++++--------
 3 files changed, 728 insertions(+), 373 deletions(-)

---
base-commit: 4eab358930711bbeb85bf5ee267d0d42d3394c2c
change-id: 20240207-spmi-multi-master-support-832a704b779b

Best regards,

Signature · 1 line
Abel Vesa <[email protected]>