~funderscore blog cgit wiki get in touch
aboutsummaryrefslogtreecommitdiff
blob: 037b60197598bca3eaaa3e2c61d176e401e2a7ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Copyright (C) 2018 PHYTEC Messtechnik
 * Author: Christian Hemp <c.hemp@phytec.de>
 */

#include <dt-bindings/input/input.h>

/ {
	gpio-keys {
		compatible = "gpio-keys";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_gpio_keys>;
		status = "disabled";

		power {
			label = "Power Button";
			gpios = <&gpio5 28 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_WAKEUP>;
			wakeup-source;
		};

		sleep {
			label = "Sleep Button";
			gpios = <&gpio6 18 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_SLEEP>;
		};
	};

	user_leds: user-leds {
		compatible = "gpio-leds";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_user_leds>;
		status = "disabled";

		user-led1 {
			gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "gpio";
			default-state = "on";
		};

		user-led2 {
			gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "gpio";
			default-state = "on";
		};

		user-led3 {
			gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "gpio";
			default-state = "on";
		};
	};
};

&iomuxc {
	pinctrl_gpio_keys: gpiokeysgrp {
		fsl,pins = <
			MX6QDL_PAD_SD3_DAT6__GPIO6_IO18		0x1b0b0
			MX6QDL_PAD_CSI0_DAT10__GPIO5_IO28	0x1b0b0
		>;
	};

	pinctrl_user_leds: userledsgrp {
		fsl,pins = <
			MX6QDL_PAD_SD3_DAT4__GPIO7_IO01		0x1b0b0
			MX6QDL_PAD_SD3_DAT5__GPIO7_IO00		0x1b0b0
			MX6QDL_PAD_CSI0_DAT11__GPIO5_IO29	0x1b0b0
		>;
	};
};