From: Alex Elder <elder@riscstar.com>
To: lee@kernel.org, lgirdwood@gmail.com, broonie@kernel.org,
alexandre.belloni@bootlin.com, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org
Cc: mat.jonczyk@o2.pl, dlan@gentoo.org, paul.walmsley@sifive.com,
palmer@dabbelt.com, aou@eecs.berkeley.edu, alex@ghiti.fr,
troymitchell988@gmail.com, linux-rtc@vger.kernel.org,
devicetree@vger.kernel.org, linux-riscv@lists.infradead.org,
spacemit@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH v4 0/7] spacemit: introduce P1 PMIC support
Date: Wed, 25 Jun 2025 11:41:11 -0500 [thread overview]
Message-ID: <20250625164119.1068842-1-elder@riscstar.com> (raw)
The SpacemiT P1 is an I2C-controlled PMIC that implements 6 buck
converters and 12 LDOs. It contains a load switch, ADC channels,
GPIOs, a real-time clock, and a watchdog timer.
This series introduces a multifunction driver for the P1 PMIC as well
as drivers for its regulators and RTC.
This version primarily updates the RTC code (in patch 4) based on
review feedback. It also adds adds a dependency in patch 2, to
ensure the MFD_SIMPLE_MFD_I2C dependencies are met when selected.
This series is available here:
https://github.com/riscstar/linux/tree/outgoing/pmic-v4
-Alex
Between version 3 and version 4:
- I got confirmation from SpacemiT that the RTC hardware does not
implement the "latch" of registers as documented, and updated the
RTC code accordingly (looping on read)
- The RTC set_time() callback now returns an error value if one is
reported when a regmap write re-enables the RTC
- Renamed the RTC Kconfig option to be RTC_DRV_SPACEMIT_P1
- Renamed the RTC source file be "rtc-spacemit-p1.c"
- Replaced an RTC enumerated type with simple numeric indices
- A message is no longer reported when devm_rtc_register_device()
returns an error in the RTC driver
- CONFIG_MFD_SPACEMIT_P1 now depends on I2C, to avoid a build error
Here is version 3 of this series:
https://lore.kernel.org/linux-rtc/20250622032941.3768912-2-elder@riscstar.com/
Between version 2 and version 3:
- Removed "spacemit-pmic.c" and updated "simple-mfd-i2c.c" instead
- Added an RTC driver, so that the MFD has more than one sub-device
- Other suggestions were directed at "spacemit-pmic.c"
Here is version 2 of this series:
https://lore.kernel.org/lkml/20250613210150.1468845-1-elder@riscstar.com/
Between version 1 and version 2:
- Added Reviewed-by tag from Mark Brown to patch 3
- Implemented suggestions from Vivian Wang:
- Fixed a typo in the subject line in patch 1
- Now use module_i2c_driver() for the PMIC driver in patch 2
- Added MODULE_ALIAS() for both drivers (patches 2 and 3)
- Defined and used DRV_NAME in both drivers
- Added additional Kconfig module help text for both drivers
Here is version 1 of this series:
https://lore.kernel.org/lkml/20250613210150.1468845-1-elder@riscstar.com/
Alex Elder (7):
dt-bindings: mfd: add support the SpacemiT P1 PMIC
mfd: simple-mfd-i2c: add SpacemiT P1 support
regulator: spacemit: support SpacemiT P1 regulators
rtc: spacemit: support the SpacemiT P1 RTC
riscv: dts: spacemit: enable the i2c8 adapter
riscv: dts: spacemit: define fixed regulators
riscv: dts: spacemit: define regulator constraints
.../devicetree/bindings/mfd/spacemit,p1.yaml | 86 +++++++++
.../boot/dts/spacemit/k1-bananapi-f3.dts | 138 ++++++++++++++
arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi | 7 +
arch/riscv/boot/dts/spacemit/k1.dtsi | 11 ++
drivers/mfd/Kconfig | 11 ++
drivers/mfd/simple-mfd-i2c.c | 18 ++
drivers/regulator/Kconfig | 12 ++
drivers/regulator/Makefile | 1 +
drivers/regulator/spacemit-p1.c | 157 ++++++++++++++++
drivers/rtc/Kconfig | 10 ++
drivers/rtc/Makefile | 1 +
drivers/rtc/rtc-spacemit-p1.c | 169 ++++++++++++++++++
12 files changed, 621 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mfd/spacemit,p1.yaml
create mode 100644 drivers/regulator/spacemit-p1.c
create mode 100644 drivers/rtc/rtc-spacemit-p1.c
base-commit: 1b152eeca84a02bdb648f16b82ef3394007a9dcf
--
2.45.2
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next reply other threads:[~2025-06-25 20:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-25 16:41 Alex Elder [this message]
2025-06-25 16:41 ` [PATCH v4 1/7] dt-bindings: mfd: add support the SpacemiT P1 PMIC Alex Elder
2025-06-25 16:41 ` [PATCH v4 2/7] mfd: simple-mfd-i2c: add SpacemiT P1 support Alex Elder
2025-06-27 12:51 ` Lee Jones
2025-06-27 13:36 ` Alex Elder
2025-07-01 11:07 ` Lee Jones
2025-06-25 16:41 ` [PATCH v4 3/7] regulator: spacemit: support SpacemiT P1 regulators Alex Elder
2025-06-25 16:41 ` [PATCH v4 4/7] rtc: spacemit: support the SpacemiT P1 RTC Alex Elder
2025-06-25 22:01 ` Alexandre Belloni
2025-06-25 22:10 ` Alex Elder
2025-06-25 16:41 ` [PATCH v4 5/7] riscv: dts: spacemit: enable the i2c8 adapter Alex Elder
2025-06-25 16:41 ` [PATCH v4 6/7] riscv: dts: spacemit: define fixed regulators Alex Elder
2025-06-25 16:41 ` [PATCH v4 7/7] riscv: dts: spacemit: define regulator constraints Alex Elder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250625164119.1068842-1-elder@riscstar.com \
--to=elder@riscstar.com \
--cc=alex@ghiti.fr \
--cc=alexandre.belloni@bootlin.com \
--cc=aou@eecs.berkeley.edu \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlan@gentoo.org \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-rtc@vger.kernel.org \
--cc=mat.jonczyk@o2.pl \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robh@kernel.org \
--cc=spacemit@lists.linux.dev \
--cc=troymitchell988@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox