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