GNU Linux-libre 4.19.264-gnu1
[releases.git] / arch / arm / boot / dts / imx28-duckbill-2-spi.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/gpio/gpio.h>
16 #include "imx28.dtsi"
17
18 / {
19         model = "I2SE Duckbill 2 SPI";
20         compatible = "i2se,duckbill-2-spi", "i2se,duckbill-2", "fsl,imx28";
21
22         aliases {
23                 ethernet1 = &qca7000;
24         };
25
26         memory@40000000 {
27                 reg = <0x40000000 0x08000000>;
28         };
29
30         apb@80000000 {
31                 apbh@80000000 {
32                         ssp0: ssp@80010000 {
33                                 compatible = "fsl,imx28-mmc";
34                                 pinctrl-names = "default";
35                                 pinctrl-0 = <&mmc0_8bit_pins_a
36                                         &mmc0_cd_cfg &mmc0_sck_cfg>;
37                                 bus-width = <8>;
38                                 vmmc-supply = <&reg_3p3v>;
39                                 status = "okay";
40                                 non-removable;
41                         };
42
43                         ssp2: ssp@80014000 {
44                                 compatible = "fsl,imx28-spi";
45                                 pinctrl-names = "default";
46                                 pinctrl-0 = <&spi2_pins_a>;
47                                 status = "okay";
48
49                                 qca7000: ethernet@0 {
50                                         reg = <0>;
51                                         compatible = "qca,qca7000";
52                                         pinctrl-names = "default";
53                                         pinctrl-0 = <&qca7000_pins>;
54                                         interrupt-parent = <&gpio3>;
55                                         interrupts = <3 IRQ_TYPE_EDGE_RISING>;
56                                         spi-cpha;
57                                         spi-cpol;
58                                         spi-max-frequency = <8000000>;
59                                 };
60                         };
61
62                         pinctrl@80018000 {
63                                 pinctrl-names = "default";
64                                 pinctrl-0 = <&hog_pins_a>;
65
66                                 hog_pins_a: hog@0 {
67                                         reg = <0>;
68                                         fsl,pinmux-ids = <
69                                                 MX28_PAD_LCD_D17__GPIO_1_17    /* Revision detection */
70                                         >;
71                                         fsl,drive-strength = <MXS_DRIVE_4mA>;
72                                         fsl,voltage = <MXS_VOLTAGE_HIGH>;
73                                         fsl,pull-up = <MXS_PULL_DISABLE>;
74                                 };
75
76                                 mac0_phy_reset_pin: mac0-phy-reset@0 {
77                                         reg = <0>;
78                                         fsl,pinmux-ids = <
79                                                 MX28_PAD_GPMI_ALE__GPIO_0_26    /* PHY Reset */
80                                         >;
81                                         fsl,drive-strength = <MXS_DRIVE_4mA>;
82                                         fsl,voltage = <MXS_VOLTAGE_HIGH>;
83                                         fsl,pull-up = <MXS_PULL_DISABLE>;
84                                 };
85
86                                 mac0_phy_int_pin: mac0-phy-int@0 {
87                                         reg = <0>;
88                                         fsl,pinmux-ids = <
89                                                 MX28_PAD_GPMI_D07__GPIO_0_7    /* PHY Interrupt */
90                                         >;
91                                         fsl,drive-strength = <MXS_DRIVE_4mA>;
92                                         fsl,voltage = <MXS_VOLTAGE_HIGH>;
93                                         fsl,pull-up = <MXS_PULL_DISABLE>;
94                                 };
95
96                                 led_pins: led@0 {
97                                         reg = <0>;
98                                         fsl,pinmux-ids = <
99                                                 MX28_PAD_SAIF0_MCLK__GPIO_3_20
100                                                 MX28_PAD_SAIF0_LRCLK__GPIO_3_21
101                                         >;
102                                         fsl,drive-strength = <MXS_DRIVE_4mA>;
103                                         fsl,voltage = <MXS_VOLTAGE_HIGH>;
104                                         fsl,pull-up = <MXS_PULL_DISABLE>;
105                                 };
106
107                                 qca7000_pins: qca7000@0 {
108                                         reg = <0>;
109                                         fsl,pinmux-ids = <
110                                                 MX28_PAD_AUART0_RTS__GPIO_3_3    /* Interrupt */
111                                                 MX28_PAD_LCD_D13__GPIO_1_13      /* QCA7K reset */
112                                                 MX28_PAD_LCD_D14__GPIO_1_14      /* GPIO 0 */
113                                                 MX28_PAD_LCD_D15__GPIO_1_15      /* GPIO 1 */
114                                                 MX28_PAD_LCD_D18__GPIO_1_18      /* GPIO 2 */
115                                                 MX28_PAD_LCD_D21__GPIO_1_21      /* GPIO 3 */
116                                         >;
117                                         fsl,drive-strength = <MXS_DRIVE_4mA>;
118                                         fsl,voltage = <MXS_VOLTAGE_HIGH>;
119                                         fsl,pull-up = <MXS_PULL_DISABLE>;
120                                 };
121                         };
122                 };
123
124                 apbx@80040000 {
125                         lradc@80050000 {
126                                 status = "okay";
127                         };
128
129                         duart: serial@80074000 {
130                                 pinctrl-names = "default";
131                                 pinctrl-0 = <&duart_pins_a>;
132                                 status = "okay";
133                         };
134
135                         usbphy0: usbphy@8007c000 {
136                                 status = "okay";
137                         };
138                 };
139         };
140
141         ahb@80080000 {
142                 usb0: usb@80080000 {
143                         status = "okay";
144                         dr_mode = "peripheral";
145                 };
146
147                 mac0: ethernet@800f0000 {
148                         phy-mode = "rmii";
149                         pinctrl-names = "default";
150                         pinctrl-0 = <&mac0_pins_a>, <&mac0_phy_reset_pin>;
151                         phy-supply = <&reg_3p3v>;
152                         phy-reset-gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
153                         phy-reset-duration = <25>;
154                         phy-handle = <&ethphy>;
155                         status = "okay";
156
157                         mdio {
158                                 #address-cells = <1>;
159                                 #size-cells = <0>;
160
161                                 ethphy: ethernet-phy@0 {
162                                         compatible = "ethernet-phy-ieee802.3-c22";
163                                         reg = <0>;
164                                         pinctrl-names = "default";
165                                         pinctrl-0 = <&mac0_phy_int_pin>;
166                                         interrupt-parent = <&gpio0>;
167                                         interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
168                                         max-speed = <100>;
169                                 };
170                         };
171                 };
172         };
173
174         reg_3p3v: regulator-3p3v {
175                 compatible = "regulator-fixed";
176                 regulator-name = "3P3V";
177                 regulator-min-microvolt = <3300000>;
178                 regulator-max-microvolt = <3300000>;
179                 regulator-always-on;
180         };
181
182         leds {
183                 compatible = "gpio-leds";
184                 pinctrl-names = "default";
185                 pinctrl-0 = <&led_pins>;
186
187                 status-red {
188                         label = "duckbill:red:status";
189                         gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
190                         linux,default-trigger = "default-on";
191                 };
192
193                 status-green {
194                         label = "duckbill:green:status";
195                         gpios = <&gpio3 20 GPIO_ACTIVE_HIGH>;
196                         linux,default-trigger = "heartbeat";
197                 };
198         };
199 };