From: Yixun Lan <dlan@gentoo.org>
To: Alex Elder <elder@riscstar.com>
Cc: lee@kernel.org, lgirdwood@gmail.com, broonie@kernel.org,
alexandre.belloni@bootlin.com, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org, mat.jonczyk@o2.pl,
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: Re: [PATCH v9 6/8] riscv: dts: spacemit: enable the i2c8 adapter
Date: Fri, 25 Jul 2025 05:11:13 +0800 [thread overview]
Message-ID: <20250724211113-GYA748868@gentoo> (raw)
In-Reply-To: <20250724202511.499288-7-elder@riscstar.com>
Hi Alex,
On 15:25 Thu 24 Jul , Alex Elder wrote:
> Define properties for the I2C adapter that provides access to the
> SpacemiT P1 PMIC. Enable this adapter on the Banana Pi BPI-F3.
>
> Signed-off-by: Alex Elder <elder@riscstar.com>
> ---
> arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 15 +++++++++++++++
> arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi | 7 +++++++
> arch/riscv/boot/dts/spacemit/k1.dtsi | 11 +++++++++++
> 3 files changed, 33 insertions(+)
>
> diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> index fe22c747c5012..7c9f91c88e01a 100644
> --- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> +++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
> @@ -40,6 +40,21 @@ &emmc {
> status = "okay";
> };
>
> +&i2c8 {
> + pinctrl-0 = <&i2c8_cfg>;
> + pinctrl-names = "default";
..
> + #address-cells = <1>;
> + #size-cells = <0>;
I think these two can be moved into dtsi, as they are
common and fixed properties for the i2c controller
> + status = "okay";
> +
> + pmic@41 {
> + compatible = "spacemit,p1";
> + reg = <0x41>;
> + interrupts = <64>;
..
> + status = "okay";
status property here can be dropped as enabled by default
> + };
> +};
> +
> &uart0 {
> pinctrl-names = "default";
> pinctrl-0 = <&uart0_2_cfg>;
> diff --git a/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi b/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
> index 3810557374228..96d7a46d4bf77 100644
> --- a/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
> +++ b/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
> @@ -11,6 +11,13 @@
> #define K1_GPIO(x) (x / 32) (x % 32)
>
> &pinctrl {
> + i2c8_cfg: i2c8-cfg {
> + i2c8-0-pins {
> + pinmux = <K1_PADCONF(93, 0)>, /* PWR_SCL */
> + <K1_PADCONF(94, 0)>; /* PWR_SDA */
> + };
> + };
> +
> uart0_2_cfg: uart0-2-cfg {
> uart0-2-pins {
> pinmux = <K1_PADCONF(68, 2)>,
> diff --git a/arch/riscv/boot/dts/spacemit/k1.dtsi b/arch/riscv/boot/dts/spacemit/k1.dtsi
> index abde8bb07c95c..2a5a132d5a774 100644
> --- a/arch/riscv/boot/dts/spacemit/k1.dtsi
> +++ b/arch/riscv/boot/dts/spacemit/k1.dtsi
> @@ -459,6 +459,17 @@ pwm7: pwm@d401bc00 {
> status = "disabled";
> };
>
> + i2c8: i2c@d401d800 {
> + compatible = "spacemit,k1-i2c";
> + reg = <0x0 0xd401d800 0x0 0x38>;
..
> + interrupts = <19>;
I'd suggest to move interrupts property after clock, see my similar
comment
https://lore.kernel.org/all/20250724121916-GYA748228@gentoo/
> + clocks = <&syscon_apbc CLK_TWSI8>,
> + <&syscon_apbc CLK_TWSI8_BUS>;
> + clock-names = "func", "bus";
> + clock-frequency = <400000>;
> + status = "disabled";
> + };
> +
> pinctrl: pinctrl@d401e000 {
> compatible = "spacemit,k1-pinctrl";
> reg = <0x0 0xd401e000 0x0 0x400>;
> --
> 2.43.0
>
--
Yixun Lan (dlan)
next prev parent reply other threads:[~2025-07-24 21:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-24 20:25 [PATCH v9 0/8] spacemit: introduce P1 PMIC support Alex Elder
2025-07-24 20:25 ` [PATCH v9 1/8] dt-bindings: mfd: add support the SpacemiT P1 PMIC Alex Elder
2025-07-24 20:25 ` [PATCH v9 2/8] mfd: simple-mfd-i2c: specify max_register Alex Elder
2025-07-25 12:27 ` Alex Elder
2025-07-24 20:25 ` [PATCH v9 3/8] mfd: simple-mfd-i2c: add SpacemiT P1 support Alex Elder
2025-07-24 20:25 ` [PATCH v9 4/8] regulator: spacemit: support SpacemiT P1 regulators Alex Elder
2025-07-24 20:25 ` [PATCH v9 5/8] rtc: spacemit: support the SpacemiT P1 RTC Alex Elder
2025-07-24 20:25 ` [PATCH v9 6/8] riscv: dts: spacemit: enable the i2c8 adapter Alex Elder
2025-07-24 21:11 ` Yixun Lan [this message]
2025-07-25 12:27 ` Alex Elder
2025-07-24 20:25 ` [PATCH v9 7/8] riscv: dts: spacemit: define fixed regulators Alex Elder
2025-07-24 20:25 ` [PATCH v9 8/8] 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=20250724211113-GYA748868@gentoo \
--to=dlan@gentoo.org \
--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=elder@riscstar.com \
--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