treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / mips / boot / dts / ralink / gardena_smart_gateway_mt7688.dts
blob6069b33cf09f202fed0561e3c58602d9e76ba1e5
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Copyright (c) 2019 Stefan Roese <sr@denx.de>
4  */
6 /dts-v1/;
8 /include/ "mt7628a.dtsi"
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/input/input.h>
13 / {
14         compatible = "gardena,smart-gateway-mt7688", "ralink,mt7688a-soc",
15                      "ralink,mt7628a-soc";
16         model = "GARDENA smart Gateway (MT7688)";
18         memory@0 {
19                 device_type = "memory";
20                 reg = <0x0 0x8000000>;
21         };
23         gpio-keys {
24                 compatible = "gpio-keys";
26                 pinctrl-names = "default";
27                 pinctrl-0 = <&pinmux_gpio_gpio>;        /* GPIO11 */
29                 user_btn1 {
30                         label = "USER_BTN1";
31                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
32                         linux,code =<KEY_PROG1> ;
33                 };
34         };
36         leds {
37                 compatible = "gpio-leds";
39                 pinctrl-names = "default";
40                 pinctrl-0 = <&pinmux_pwm0_gpio>,        /* GPIO18 */
41                             <&pinmux_pwm1_gpio>,        /* GPIO19 */
42                             <&pinmux_sdmode_gpio>,      /* GPIO22..29 */
43                             <&pinmux_p0led_an_gpio>;    /* GPIO43 */
44                 /*
45                  * <&pinmux_i2s_gpio> (covers GPIO0..3) is needed here as
46                  * well for GPIO3. But this is already claimed for uart1
47                  * (see below). So we can't include it in this LED node.
48                  */
50                 power_blue {
51                         label = "smartgw:power:blue";
52                         gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
53                         default-state = "off";
54                 };
56                 power_green {
57                         label = "smartgw:power:green";
58                         gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
59                         default-state = "off";
60                 };
62                 power_red {
63                         label = "smartgw:power:red";
64                         gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
65                         default-state = "off";
66                 };
68                 radio_blue {
69                         label = "smartgw:radio:blue";
70                         gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
71                         default-state = "off";
72                 };
74                 radio_green {
75                         label = "smartgw:radio:green";
76                         gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
77                         default-state = "off";
78                 };
80                 radio_red {
81                         label = "smartgw:radio:red";
82                         gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
83                         default-state = "off";
84                 };
86                 internet_blue {
87                         label = "smartgw:internet:blue";
88                         gpios = <&gpio 26 GPIO_ACTIVE_HIGH>;
89                         default-state = "off";
90                 };
92                 internet_green {
93                         label = "smartgw:internet:green";
94                         gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
95                         default-state = "off";
96                 };
98                 internet_red {
99                         label = "smartgw:internet:red";
100                         gpios = <&gpio 28 GPIO_ACTIVE_HIGH>;
101                         default-state = "off";
102                 };
104                 ethernet_link {
105                         label = "smartgw:eth:link";
106                         gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
107                         linux,default-trigger = "netdev";
108                 };
110                 ethernet_activity {
111                         label = "smartgw:eth:act";
112                         gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
113                         linux,default-trigger = "netdev";
114                 };
115         };
117         aliases {
118                 serial0 = &uart0;
119         };
122 &i2c {
123         status = "okay";
126 &spi {
127         status = "okay";
129         pinctrl-names = "default";
130         pinctrl-0 = <&pinmux_spi_spi>, <&pinmux_spi_cs1_cs>;
132         m25p80@0 {
133                 compatible = "jedec,spi-nor";
134                 reg = <0>;
135                 spi-max-frequency = <40000000>;
137                 partitions {
138                         compatible = "fixed-partitions";
139                         #address-cells = <1>;
140                         #size-cells = <1>;
142                         partition@0 {
143                                 label = "uboot";
144                                 reg = <0x0 0xa0000>;
145                                 read-only;
146                         };
148                         partition@a0000 {
149                                 label = "uboot_env0";
150                                 reg = <0xa0000 0x10000>;
151                         };
153                         partition@b0000 {
154                                 label = "uboot_env1";
155                                 reg = <0xb0000 0x10000>;
156                         };
158                         factory: partition@c0000 {
159                                 label = "factory";
160                                 reg = <0xc0000 0x10000>;
161                                 read-only;
162                         };
163                 };
164         };
166         nand_flash@1 {
167                 compatible = "spi-nand";
168                 linux,mtd-name = "gd5f";
169                 reg = <1>;
170                 spi-max-frequency = <40000000>;
171         };
174 &uart1 {
175         status = "okay";
177         pinctrl-names = "default";
178         pinctrl-0 = <&pinmux_i2s_gpio>;         /* GPIO0..3 */
180         fifo-size = <8>;
181         tx-threshold = <8>;
183         rts-gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
184         cts-gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
187 &uart2 {
188         status = "okay";
190         pinctrl-names = "default";
191         pinctrl-0 = <&pinmux_p2led_an_gpio>,    /* GPIO41 */
192                     <&pinmux_p3led_an_gpio>;    /* GPIO40 */
194         rts-gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
195         cts-gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
198 &watchdog {
199         status = "okay";
202 &wmac {
203         status = "okay";
204         mediatek,mtd-eeprom = <&factory 0x0000>;