From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 2/2] sandbox: add dummy pinctrl nodes
Date: Mon, 1 Jul 2024 09:27:33 +0200 [thread overview]
Message-ID: <20240701072733.163431-2-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20240701072733.163431-1-a.fatoum@pengutronix.de>
Now that MMIO addresses 0-1023 point at valid memory, let's use it
describe a fake pinctrl-single controller. This allows testing common
pinctrl code in sandbox.
Device parameter support to select the state will follow later.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
arch/sandbox/dts/sandbox.dts | 53 ++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts
index f3fe6ce65c08..bb37cfeaf9a2 100644
--- a/arch/sandbox/dts/sandbox.dts
+++ b/arch/sandbox/dts/sandbox.dts
@@ -108,19 +108,72 @@ power {
compatible = "barebox,sandbox-power";
nvmem-cell-names = "reset-source";
nvmem-cells = <&reset_source>;
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&pinctrl_power_default>;
+ pinctrl-1 = <&pinctrl_power_sleep>;
};
watchdog {
compatible = "barebox,sandbox-watchdog";
nvmem-cell-names = "reset-source";
nvmem-cells = <&reset_source>;
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&pinctrl_watchdog_default>;
+ pinctrl-1 = <&pinctrl_watchdog_sleep>;
};
sound {
compatible = "barebox,sandbox-sound";
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&pinctrl_sound_default>;
+ pinctrl-1 = <&pinctrl_sound_sleep>;
};
led {
compatible = "barebox,sandbox-led";
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&pinctrl_led_default>;
+ pinctrl-1 = <&pinctrl_led_sleep>;
+ };
+
+ pinctrl {
+ compatible = "pinctrl-single";
+ /* Proxy 0 addressing */
+ reg = <0x0 0x0 0x0 0x4>;
+ #pinctrl-cells = <1>;
+ pinctrl-single,register-width = <8>;
+ pinctrl-single,function-mask = <0x0000000f>;
+
+ pinctrl_power_default: power-default-pins {
+ pinctrl-single,pins = <0x00 0x01>;
+ };
+
+ pinctrl_power_sleep: power-sleep-pins {
+ pinctrl-single,pins = <0x00 0x02>;
+ };
+
+ pinctrl_watchdog_default: watchdog-default-pins {
+ pinctrl-single,pins = <0x01 0x01>;
+ };
+
+ pinctrl_watchdog_sleep: watchdog-sleep-pins {
+ pinctrl-single,pins = <0x01 0x02>;
+ };
+
+ pinctrl_sound_default: sound-default-pins {
+ pinctrl-single,pins = <0x02 0x01>;
+ };
+
+ pinctrl_sound_sleep: sound-sleep-pins {
+ pinctrl-single,pins = <0x02 0x02>;
+ };
+
+ pinctrl_led_default: led-default-pins {
+ pinctrl-single,pins = <0x03 0x01>;
+ };
+
+ pinctrl_led_sleep: led-sleep-pins {
+ pinctrl-single,pins = <0x03 0x02>;
+ };
};
};
--
2.39.2
prev parent reply other threads:[~2024-07-01 7:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-01 7:27 [PATCH 1/2] sandbox: io: alias first page of I/O memory to I/O port space Ahmad Fatoum
2024-07-01 7:27 ` Ahmad Fatoum [this message]
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=20240701072733.163431-2-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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