Merge tag 'sound-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / imx28-duckbill-2-enocean.dts
1 /*
2  * Copyright (C) 2015-2017 I2SE GmbH <info@i2se.com>
3  * Copyright (C) 2016 Michael Heimpold <mhei@heimpold.de>
4  *
5  * The code contained herein is licensed under the GNU General Public
6  * License. You may obtain a copy of the GNU General Public License
7  * Version 2 or later at the following locations:
8  *
9  * http://www.opensource.org/licenses/gpl-license.html
10  * http://www.gnu.org/copyleft/gpl.html
11  */
12
13 /dts-v1/;
14 #include <dt-bindings/interrupt-controller/irq.h>
15 #include <dt-bindings/input/input.h>
16 #include <dt-bindings/gpio/gpio.h>
17 #include "imx28.dtsi"
18
19 / {
20         model = "I2SE Duckbill 2 EnOcean";
21         compatible = "i2se,duckbill-2-enocean", "i2se,duckbill-2", "fsl,imx28";
22
23         memory@40000000 {
24                 device_type = "memory";
25                 reg = <0x40000000 0x08000000>;
26         };
27
28         apb@80000000 {
29                 apbh@80000000 {
30                         ssp0: spi@80010000 {
31                                 compatible = "fsl,imx28-mmc";
32                                 pinctrl-names = "default";
33                                 pinctrl-0 = <&mmc0_8bit_pins_a
34                                         &mmc0_cd_cfg &mmc0_sck_cfg>;
35                                 bus-width = <8>;
36                                 vmmc-supply = <&reg_3p3v>;
37                                 status = "okay";
38                                 non-removable;
39                         };
40
41                         ssp2: spi@80014000 {
42                                 compatible = "fsl,imx28-mmc";
43                                 pinctrl-names = "default";
44                                 pinctrl-0 = <&mmc2_4bit_pins_b
45                                         &mmc2_cd_cfg &mmc2_sck_cfg_b>;
46                                 bus-width = <4>;
47                                 vmmc-supply = <&reg_3p3v>;
48                                 status = "okay";
49                         };
50
51                         pinctrl@80018000 {
52                                 pinctrl-names = "default";
53                                 pinctrl-0 = <&hog_pins_a>;
54
55                                 hog_pins_a: hog@0 {
56                                         reg = <0>;
57                                         fsl,pinmux-ids = <
58                                                 MX28_PAD_LCD_D17__GPIO_1_17    /* Revision detection */
59                                         >;
60                                         fsl,drive-strength = <MXS_DRIVE_4mA>;
61                                         fsl,voltage = <MXS_VOLTAGE_HIGH>;
62                                         fsl,pull-up = <MXS_PULL_DISABLE>;
63                                 };
64
65                                 mac0_phy_reset_pin: mac0-phy-reset@0 {
66                                         reg = <0>;
67                                         fsl,pinmux-ids = <
68                                                 MX28_PAD_GPMI_ALE__GPIO_0_26    /* PHY Reset */
69                                         >;
70                                         fsl,drive-strength = <MXS_DRIVE_4mA>;
71                                         fsl,voltage = <MXS_VOLTAGE_HIGH>;
72                                         fsl,pull-up = <MXS_PULL_DISABLE>;
73                                 };
74
75                                 mac0_phy_int_pin: mac0-phy-int@0 {
76                                         reg = <0>;
77                                         fsl,pinmux-ids = <
78                                                 MX28_PAD_GPMI_D07__GPIO_0_7    /* PHY Interrupt */
79                                         >;
80                                         fsl,drive-strength = <MXS_DRIVE_4mA>;
81                                         fsl,voltage = <MXS_VOLTAGE_HIGH>;
82                                         fsl,pull-up = <MXS_PULL_DISABLE>;
83                                 };
84
85                                 led_pins: leds@0 {
86                                         reg = <0>;
87                                         fsl,pinmux-ids = <
88                                                 MX28_PAD_SAIF0_MCLK__GPIO_3_20
89                                                 MX28_PAD_SAIF0_LRCLK__GPIO_3_21
90                                                 MX28_PAD_AUART0_CTS__GPIO_3_2
91                                                 MX28_PAD_I2C0_SCL__GPIO_3_24
92                                                 MX28_PAD_I2C0_SDA__GPIO_3_25
93                                         >;
94                                         fsl,drive-strength = <MXS_DRIVE_4mA>;
95                                         fsl,voltage = <MXS_VOLTAGE_HIGH>;
96                                         fsl,pull-up = <MXS_PULL_DISABLE>;
97                                 };
98
99                                 enocean_button: enocean-button@0 {
100                                         reg = <0>;
101                                         fsl,pinmux-ids = <
102                                                 MX28_PAD_AUART0_RTS__GPIO_3_3
103                                         >;
104                                         fsl,drive-strength = <MXS_DRIVE_4mA>;
105                                         fsl,voltage = <MXS_VOLTAGE_HIGH>;
106                                         fsl,pull-up = <MXS_PULL_DISABLE>;
107                                 };
108                         };
109                 };
110
111                 apbx@80040000 {
112                         lradc@80050000 {
113                                 status = "okay";
114                         };
115
116                         auart0: serial@8006a000 {
117                                 pinctrl-names = "default";
118                                 pinctrl-0 = <&auart0_2pins_a>;
119                                 status = "okay";
120                         };
121
122                         duart: serial@80074000 {
123                                 pinctrl-names = "default";
124                                 pinctrl-0 = <&duart_pins_a>;
125                                 status = "okay";
126                         };
127
128                         usbphy0: usbphy@8007c000 {
129                                 status = "okay";
130                         };
131                 };
132         };
133
134         ahb@80080000 {
135                 usb0: usb@80080000 {
136                         status = "okay";
137                         dr_mode = "peripheral";
138                 };
139
140                 mac0: ethernet@800f0000 {
141                         phy-mode = "rmii";
142                         pinctrl-names = "default";
143                         pinctrl-0 = <&mac0_pins_a>, <&mac0_phy_reset_pin>;
144                         phy-supply = <&reg_3p3v>;
145                         phy-reset-gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
146                         phy-reset-duration = <25>;
147                         phy-handle = <&ethphy>;
148                         status = "okay";
149
150                         mdio {
151                                 #address-cells = <1>;
152                                 #size-cells = <0>;
153
154                                 ethphy: ethernet-phy@0 {
155                                         compatible = "ethernet-phy-ieee802.3-c22";
156                                         reg = <0>;
157                                         pinctrl-names = "default";
158                                         pinctrl-0 = <&mac0_phy_int_pin>;
159                                         interrupt-parent = <&gpio0>;
160                                         interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
161                                         max-speed = <100>;
162                                 };
163                         };
164                 };
165         };
166
167         reg_3p3v: regulator-3p3v {
168                 compatible = "regulator-fixed";
169                 regulator-name = "3P3V";
170                 regulator-min-microvolt = <3300000>;
171                 regulator-max-microvolt = <3300000>;
172                 regulator-always-on;
173         };
174
175         leds {
176                 compatible = "gpio-leds";
177                 pinctrl-names = "default";
178                 pinctrl-0 = <&led_pins>;
179
180                 status-red {
181                         label = "duckbill:red:status";
182                         gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
183                         linux,default-trigger = "default-on";
184                 };
185
186                 status-green {
187                         label = "duckbill:green:status";
188                         gpios = <&gpio3 20 GPIO_ACTIVE_HIGH>;
189                         linux,default-trigger = "heartbeat";
190                 };
191
192                 enocean-blue {
193                         label = "duckbill:blue:enocean";
194                         gpios = <&gpio3 24 GPIO_ACTIVE_LOW>;
195                 };
196
197                 enocean-red {
198                         label = "duckbill:red:enocean";
199                         gpios = <&gpio3 25 GPIO_ACTIVE_LOW>;
200                 };
201
202                 enocean-green {
203                         label = "duckbill:green:enocean";
204                         gpios = <&gpio3 2 GPIO_ACTIVE_LOW>;
205                 };
206         };
207
208         gpio-keys {
209                 compatible = "gpio-keys";
210                 pinctrl-names = "default";
211                 pinctrl-0 = <&enocean_button>;
212
213                 enocean {
214                         label = "EnOcean";
215                         linux,code = <KEY_NEW>;
216                         gpios = <&gpio3 3 GPIO_ACTIVE_HIGH>;
217                 };
218         };
219 };