[PATCH 2/2] sandbox: add dummy pinctrl nodes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux