* [PATCH v5 0/2] Samsung S2MPG10 PMIC MFD-based drivers
@ 2025-07-30 9:31 André Draszik
2025-07-30 9:31 ` [PATCH v5 1/2] dt-bindings: clock: samsung,s2mps11: add s2mpg10 André Draszik
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: André Draszik @ 2025-07-30 9:31 UTC (permalink / raw)
To: Krzysztof Kozlowski, Lee Jones, Rob Herring, Conor Dooley,
Sylwester Nawrocki, Chanwoo Choi, Alim Akhtar, Michael Turquette,
Stephen Boyd, Russell King, Catalin Marinas, Will Deacon,
Alexandre Belloni
Cc: Peter Griffin, Tudor Ambarus, Will McVicker, kernel-team,
linux-kernel, linux-samsung-soc, devicetree, linux-clk,
linux-arm-kernel, linux-rtc, André Draszik,
Krzysztof Kozlowski
Original cover letter further down.
This is a resend of two patches from the original series that haven't
been merged yet. That series was merged except for the attached two
patches here. Other than rebasing against next-20250729 there are no
changes to them.
Lee, I think Stephen's intention was to get these two merged via the
MFD tree please.
Original cover letter:
----------------------
This series adds initial support for the Samsung S2MPG10 PMIC using the
MFD framework. This is a PMIC for mobile applications and is used on
the Google Pixel 6 and 6 Pro (oriole / raven).
*** dependency note ***
To compile, this depends on the Samsung ACPM driver in Linux next with
the following additional patches:
https://lore.kernel.org/all/20250324-acpm-atomic-v2-0-7d87746e1765@linaro.org/
https://lore.kernel.org/all/20250319-acpm-fixes-v2-0-ac2c1bcf322b@linaro.org/
https://lore.kernel.org/all/20250327-acpm-children-v1-0-0afe15ee2ff7@linaro.org/
*** dependency note end ***
+++ Kconfig update +++
There is a Kconfig symbol update in this series, because the existing
Samsung S2M driver has been split into core and transport (I2C & ACPM)
parts. CONFIG_MFD_SEC_CORE is now truly a core driver, and
the I2C code that was part of it is now enabled via CONFIG_MFD_SEC_I2C.
This was necessary because unlike the other S2M PMICs, S2MPG10 doesn't
talk via I2C, but via the Samsung ACPM firmware.
+++ Kconfig update end +++
This series must be applied in-order, due to interdependencies of some
of the patches. There are also various cleanup patches to the S2M
drivers. I've kept them ordered as:
* DT bindings (patches 1 ... 3)
* s2m mfd prep for adding S2MPG10 support (patches 4 ... 7)
* split S2M mfd driver into s2m-core and s2m-i2c, including the
kconfig symbol update (patch 8)
* S2MPG10 core driver (patch 9)
* s2m mfd driver cleanup patches (patches 10 ... 23)
* S2MPG10 clock driver (patch 24)
* s2m RTC prep for adding S2MPG10 (patch 25 ... 26)
* S2MPG10 RTC driver (patch 27)
* s2m RTC cleanup patches (patches 28 ... 31)
I realise these are many, but since some prep-work was required to be
able to add S2MPG anyway, I wanted to get the cleanup patches in as
well :-) Let me know if I should postpone them to a later date instead.
The S2MPG10 includes buck converters, various LDOs, power meters, RTC,
clock outputs, and additional GPIOs interfaces.
This series adds support in the top-level device driver, and for the
RTC and clock. Importantly, having the RTC driver allows to do a proper
reset of the system. Drivers or driver updates for the other components
will be added in future patches.
This will need a DT update for Oriole / Raven to enable this device. I
will send that out separately.
Cheers,
Andre'
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
Changes in v5:
- just a rebase & resend of the last two remaining patches
- no other changes
- Link to v4: https://lore.kernel.org/r/20250409-s2mpg10-v4-0-d66d5f39b6bf@linaro.org
Changes in v4:
- various updates to sec-acpm (patch 9, Lee)
- cache enum type in patch 25 (Krzysztof)
- collect tags
- Link to v3: https://lore.kernel.org/r/20250403-s2mpg10-v3-0-b542b3505e68@linaro.org
Changes in v3:
- Krzysztof:
- keep 'regulators' subnode required even for s2mpg10
- drop '$ref' and 'unevaluatedProperties' from pmic subnode, use
'additionalProperties' instead
- add some regulators to examples since s2mpg10 requires them as of
v3
- sec-acpm:
- use an enum for struct sec_acpm_bus_context::type
- consistent name space for all functions sec_pmic_acpm_... to be
similar to i2c and consistent in this file
- Link to v2: https://lore.kernel.org/r/20250328-s2mpg10-v2-0-b54dee33fb6b@linaro.org
Changes in v2:
- Rob:
- make PMIC node a child of ACPM, and all related changes (binding,
driver)
- Krzysztof:
- merge defconfig updates into patch changing the symbols (patch 8)
- split MODULE_AUTHOR update into a separate patch
- better alignment fix (patch 11)
- merge two s2dos05/s2mpu05 related patches into one (patch 14)
- myself:
- keep PMIC DT parsing in core, not in transport driver
- several updates in sec-acpm.c, see separate entries in patch 9
- fix typo in patch 17
- collect tags
- Link to v1: https://lore.kernel.org/r/20250323-s2mpg10-v1-0-d08943702707@linaro.org
---
André Draszik (2):
dt-bindings: clock: samsung,s2mps11: add s2mpg10
clk: s2mps11: add support for S2MPG10 PMIC clock
Documentation/devicetree/bindings/clock/samsung,s2mps11.yaml | 1 +
drivers/clk/clk-s2mps11.c | 8 ++++++++
2 files changed, 9 insertions(+)
---
base-commit: 54efec8782214652b331c50646013f8526570e8d
change-id: 20250321-s2mpg10-ef5d1ebd3043
Best regards,
--
André Draszik <andre.draszik@linaro.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v5 1/2] dt-bindings: clock: samsung,s2mps11: add s2mpg10
2025-07-30 9:31 [PATCH v5 0/2] Samsung S2MPG10 PMIC MFD-based drivers André Draszik
@ 2025-07-30 9:31 ` André Draszik
2025-07-30 9:31 ` [PATCH v5 2/2] clk: s2mps11: add support for S2MPG10 PMIC clock André Draszik
2025-07-30 14:51 ` [PATCH v5 0/2] Samsung S2MPG10 PMIC MFD-based drivers Lee Jones
2 siblings, 0 replies; 6+ messages in thread
From: André Draszik @ 2025-07-30 9:31 UTC (permalink / raw)
To: Krzysztof Kozlowski, Lee Jones, Rob Herring, Conor Dooley,
Sylwester Nawrocki, Chanwoo Choi, Alim Akhtar, Michael Turquette,
Stephen Boyd, Russell King, Catalin Marinas, Will Deacon,
Alexandre Belloni
Cc: Peter Griffin, Tudor Ambarus, Will McVicker, kernel-team,
linux-kernel, linux-samsung-soc, devicetree, linux-clk,
linux-arm-kernel, linux-rtc, André Draszik
The Samsung S2MPG10 clock controller is similar to the existing clock
controllers supported by this binding. Register offsets / layout are
slightly different, so it needs its own compatible.
Acked-by: Stephen Boyd <sboyd@kernel.org>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
Documentation/devicetree/bindings/clock/samsung,s2mps11.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/clock/samsung,s2mps11.yaml b/Documentation/devicetree/bindings/clock/samsung,s2mps11.yaml
index d5296e6053a1881650b8e8ff2524ea01689b7395..91d455155a606a60ed2006e57709466ae8d72664 100644
--- a/Documentation/devicetree/bindings/clock/samsung,s2mps11.yaml
+++ b/Documentation/devicetree/bindings/clock/samsung,s2mps11.yaml
@@ -25,6 +25,7 @@ description: |
properties:
compatible:
enum:
+ - samsung,s2mpg10-clk
- samsung,s2mps11-clk
- samsung,s2mps13-clk # S2MPS13 and S2MPS15
- samsung,s2mps14-clk
--
2.50.1.552.g942d659e1b-goog
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v5 2/2] clk: s2mps11: add support for S2MPG10 PMIC clock
2025-07-30 9:31 [PATCH v5 0/2] Samsung S2MPG10 PMIC MFD-based drivers André Draszik
2025-07-30 9:31 ` [PATCH v5 1/2] dt-bindings: clock: samsung,s2mps11: add s2mpg10 André Draszik
@ 2025-07-30 9:31 ` André Draszik
2025-07-30 14:51 ` [PATCH v5 0/2] Samsung S2MPG10 PMIC MFD-based drivers Lee Jones
2 siblings, 0 replies; 6+ messages in thread
From: André Draszik @ 2025-07-30 9:31 UTC (permalink / raw)
To: Krzysztof Kozlowski, Lee Jones, Rob Herring, Conor Dooley,
Sylwester Nawrocki, Chanwoo Choi, Alim Akhtar, Michael Turquette,
Stephen Boyd, Russell King, Catalin Marinas, Will Deacon,
Alexandre Belloni
Cc: Peter Griffin, Tudor Ambarus, Will McVicker, kernel-team,
linux-kernel, linux-samsung-soc, devicetree, linux-clk,
linux-arm-kernel, linux-rtc, André Draszik,
Krzysztof Kozlowski
Add support for Samsung's S2MPG10 PMIC clock, which is similar to the
existing PMIC clocks supported by this driver.
S2MPG10 has three clock outputs @ 32kHz: AP, peri1 and peri2.
Acked-by: Stephen Boyd <sboyd@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
drivers/clk/clk-s2mps11.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c
index d4e9c3577b35dec8d9ec67c489b7b5ae27211f55..ff7ce12a5da6b437b5c92b9a32dcaf9423647cde 100644
--- a/drivers/clk/clk-s2mps11.c
+++ b/drivers/clk/clk-s2mps11.c
@@ -11,6 +11,7 @@
#include <linux/regmap.h>
#include <linux/clk-provider.h>
#include <linux/platform_device.h>
+#include <linux/mfd/samsung/s2mpg10.h>
#include <linux/mfd/samsung/s2mps11.h>
#include <linux/mfd/samsung/s2mps13.h>
#include <linux/mfd/samsung/s2mps14.h>
@@ -140,6 +141,9 @@ static int s2mps11_clk_probe(struct platform_device *pdev)
clk_data->num = S2MPS11_CLKS_NUM;
switch (hwid) {
+ case S2MPG10:
+ s2mps11_reg = S2MPG10_PMIC_RTCBUF;
+ break;
case S2MPS11X:
s2mps11_reg = S2MPS11_REG_RTC_CTRL;
break;
@@ -221,6 +225,7 @@ static void s2mps11_clk_remove(struct platform_device *pdev)
}
static const struct platform_device_id s2mps11_clk_id[] = {
+ { "s2mpg10-clk", S2MPG10},
{ "s2mps11-clk", S2MPS11X},
{ "s2mps13-clk", S2MPS13X},
{ "s2mps14-clk", S2MPS14X},
@@ -241,6 +246,9 @@ MODULE_DEVICE_TABLE(platform, s2mps11_clk_id);
*/
static const struct of_device_id s2mps11_dt_match[] __used = {
{
+ .compatible = "samsung,s2mpg10-clk",
+ .data = (void *)S2MPG10,
+ }, {
.compatible = "samsung,s2mps11-clk",
.data = (void *)S2MPS11X,
}, {
--
2.50.1.552.g942d659e1b-goog
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v5 0/2] Samsung S2MPG10 PMIC MFD-based drivers
2025-07-30 9:31 [PATCH v5 0/2] Samsung S2MPG10 PMIC MFD-based drivers André Draszik
2025-07-30 9:31 ` [PATCH v5 1/2] dt-bindings: clock: samsung,s2mps11: add s2mpg10 André Draszik
2025-07-30 9:31 ` [PATCH v5 2/2] clk: s2mps11: add support for S2MPG10 PMIC clock André Draszik
@ 2025-07-30 14:51 ` Lee Jones
2025-07-31 10:20 ` André Draszik
2 siblings, 1 reply; 6+ messages in thread
From: Lee Jones @ 2025-07-30 14:51 UTC (permalink / raw)
To: André Draszik
Cc: Krzysztof Kozlowski, Rob Herring, Conor Dooley,
Sylwester Nawrocki, Chanwoo Choi, Alim Akhtar, Michael Turquette,
Stephen Boyd, Russell King, Catalin Marinas, Will Deacon,
Alexandre Belloni, Peter Griffin, Tudor Ambarus, Will McVicker,
kernel-team, linux-kernel, linux-samsung-soc, devicetree,
linux-clk, linux-arm-kernel, linux-rtc, Krzysztof Kozlowski
On Wed, 30 Jul 2025, André Draszik wrote:
> Original cover letter further down.
>
> This is a resend of two patches from the original series that haven't
> been merged yet. That series was merged except for the attached two
> patches here. Other than rebasing against next-20250729 there are no
> changes to them.
>
> Lee, I think Stephen's intention was to get these two merged via the
> MFD tree please.
Although I have no issue with this, it does seem a little odd now that
the set consists of only Clk patches. Let me know what you / Stephen
decide.
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v5 0/2] Samsung S2MPG10 PMIC MFD-based drivers
2025-07-30 14:51 ` [PATCH v5 0/2] Samsung S2MPG10 PMIC MFD-based drivers Lee Jones
@ 2025-07-31 10:20 ` André Draszik
2025-07-31 16:46 ` Stephen Boyd
0 siblings, 1 reply; 6+ messages in thread
From: André Draszik @ 2025-07-31 10:20 UTC (permalink / raw)
To: Lee Jones, Stephen Boyd
Cc: Krzysztof Kozlowski, Rob Herring, Conor Dooley,
Sylwester Nawrocki, Chanwoo Choi, Alim Akhtar, Michael Turquette,
Russell King, Catalin Marinas, Will Deacon, Alexandre Belloni,
Peter Griffin, Tudor Ambarus, Will McVicker, kernel-team,
linux-kernel, linux-samsung-soc, devicetree, linux-clk,
linux-arm-kernel, linux-rtc, Krzysztof Kozlowski
On Wed, 2025-07-30 at 15:51 +0100, Lee Jones wrote:
> On Wed, 30 Jul 2025, André Draszik wrote:
>
> > Original cover letter further down.
> >
> > This is a resend of two patches from the original series that haven't
> > been merged yet. That series was merged except for the attached two
> > patches here. Other than rebasing against next-20250729 there are no
> > changes to them.
> >
> > Lee, I think Stephen's intention was to get these two merged via the
> > MFD tree please.
>
> Although I have no issue with this, it does seem a little odd now that
> the set consists of only Clk patches. Let me know what you / Stephen
> decide.
Thanks Lee.
I simply went by Stephen's ACK, which to me implies he wanted it merged
via a different tree (mfd). I guess at this stage it doesn't matter anymore,
since all the core changes are in already.
I'll defer to Stephen :-)
Cheers,
Andre'
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v5 0/2] Samsung S2MPG10 PMIC MFD-based drivers
2025-07-31 10:20 ` André Draszik
@ 2025-07-31 16:46 ` Stephen Boyd
0 siblings, 0 replies; 6+ messages in thread
From: Stephen Boyd @ 2025-07-31 16:46 UTC (permalink / raw)
To: André Draszik, Lee Jones
Cc: Krzysztof Kozlowski, Rob Herring, Conor Dooley,
Sylwester Nawrocki, Chanwoo Choi, Alim Akhtar, Michael Turquette,
Russell King, Catalin Marinas, Will Deacon, Alexandre Belloni,
Peter Griffin, Tudor Ambarus, Will McVicker, kernel-team,
linux-kernel, linux-samsung-soc, devicetree, linux-clk,
linux-arm-kernel, linux-rtc, Krzysztof Kozlowski
Quoting André Draszik (2025-07-31 03:20:56)
> On Wed, 2025-07-30 at 15:51 +0100, Lee Jones wrote:
> > On Wed, 30 Jul 2025, André Draszik wrote:
> >
> > > Original cover letter further down.
> > >
> > > This is a resend of two patches from the original series that haven't
> > > been merged yet. That series was merged except for the attached two
> > > patches here. Other than rebasing against next-20250729 there are no
> > > changes to them.
> > >
> > > Lee, I think Stephen's intention was to get these two merged via the
> > > MFD tree please.
> >
> > Although I have no issue with this, it does seem a little odd now that
> > the set consists of only Clk patches. Let me know what you / Stephen
> > decide.
>
> Thanks Lee.
>
> I simply went by Stephen's ACK, which to me implies he wanted it merged
> via a different tree (mfd). I guess at this stage it doesn't matter anymore,
> since all the core changes are in already.
>
I'll pick it up after the merge window closes.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-07-31 16:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-30 9:31 [PATCH v5 0/2] Samsung S2MPG10 PMIC MFD-based drivers André Draszik
2025-07-30 9:31 ` [PATCH v5 1/2] dt-bindings: clock: samsung,s2mps11: add s2mpg10 André Draszik
2025-07-30 9:31 ` [PATCH v5 2/2] clk: s2mps11: add support for S2MPG10 PMIC clock André Draszik
2025-07-30 14:51 ` [PATCH v5 0/2] Samsung S2MPG10 PMIC MFD-based drivers Lee Jones
2025-07-31 10:20 ` André Draszik
2025-07-31 16:46 ` Stephen Boyd
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).