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,
linux.amoon@gmail.com, troymitchell988@gmail.com,
guodong@riscstar.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 v11 0/7] spacemit: introduce P1 PMIC support
Date: Sat, 2 Aug 2025 21:58:04 -0500 [thread overview]
Message-ID: <20250803025812.373029-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.
After a sequence of attempts to add a new "max_register" value
to the simple_mfd_data structure in a way that would hopefully
be useful, we have reverted to the solution that was originally
proposed, which simply defines a regmap_config containing that
value along with reg_bits and val_bits (both 8).
This version removes the second patch, which contained the added
code to support the simple_mfd_data->max_register field. It
also addresses a dependency issue in patch 4 (now 3) that was
pointed out by the Intel kernel test robot.
Note: Yixun Lan suggested privately that I ensure the I2C_K1
config option gets enabled, but I'm going to do that as a
follow-on patch.
-Alex
This series is available here:
https://github.com/riscstar/linux/tree/outgoing/pmic-v11
Between version 9 and version 10:
- Abandon trying to implement a simple_mfd_data->max_register field
- Fix a missing dependency pointed out by the kernel test robot
Here is version 10 of this series:
https://lore.kernel.org/lkml/20250726131003.3137282-1-elder@riscstar.com/
Between version 9 and version 10:
- The #address-cells and #size-cells for the i2c8 DTS node
were moved into its primary definition in "k1.dtsi".
- The interrupts property for the i2c8 DTS node was moved
below its clock-related properties.
- The status property in the pmic@41 DTS node was dropped.
- The function that provides the regmap_config structure
to use was reworked a bit.
- A new function was added to free the regmap_config
structure after it's no longer needed.
Here is version 9 of this series:
https://lore.kernel.org/lkml/20250724202511.499288-1-elder@riscstar.com/
Between version 8 and version 9:
- The max_config value is always used if it is provided with the
simple_mfd_data structure.
- The regmap_config structure used is allocated dynamically if
necessary; otherwise regmap_config_8r_8v is used.
- A small duplicated comment is removed
Here is version 8 of this series:
https://lore.kernel.org/lkml/20250710175107.1280221-1-elder@riscstar.com/
More complete history is available at that link.
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 | 135 ++++++++++++++
arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi | 7 +
arch/riscv/boot/dts/spacemit/k1.dtsi | 13 ++
drivers/mfd/Kconfig | 11 ++
drivers/mfd/simple-mfd-i2c.c | 18 ++
drivers/regulator/Kconfig | 13 ++
drivers/regulator/Makefile | 1 +
drivers/regulator/spacemit-p1.c | 157 ++++++++++++++++
drivers/rtc/Kconfig | 10 ++
drivers/rtc/Makefile | 1 +
drivers/rtc/rtc-spacemit-p1.c | 167 ++++++++++++++++++
12 files changed, 619 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: b9ddaa95fd283bce7041550ddbbe7e764c477110
--
2.48.1
next reply other threads:[~2025-08-03 2:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-03 2:58 Alex Elder [this message]
2025-08-03 2:58 ` [PATCH v11 1/7] dt-bindings: mfd: add support the SpacemiT P1 PMIC Alex Elder
2025-08-03 2:58 ` [PATCH v11 2/7] mfd: simple-mfd-i2c: add SpacemiT P1 support Alex Elder
2025-08-03 2:58 ` [PATCH v11 3/7] regulator: spacemit: support SpacemiT P1 regulators Alex Elder
2025-08-03 2:58 ` [PATCH v11 4/7] rtc: spacemit: support the SpacemiT P1 RTC Alex Elder
2025-08-03 2:58 ` [PATCH v11 5/7] riscv: dts: spacemit: enable the i2c8 adapter Alex Elder
2025-08-03 2:58 ` [PATCH v11 6/7] riscv: dts: spacemit: define fixed regulators Alex Elder
2025-08-03 2:58 ` [PATCH v11 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=20250803025812.373029-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=guodong@riscstar.com \
--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=linux.amoon@gmail.com \
--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
all inboxes | Powered by JetHome®