Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * Copyright (c) 2019 Stefan Roese <sr@denx.de>
0004  */
0005 
0006 /dts-v1/;
0007 
0008 /include/ "mt7628a.dtsi"
0009 
0010 #include <dt-bindings/gpio/gpio.h>
0011 #include <dt-bindings/input/input.h>
0012 
0013 / {
0014         compatible = "gardena,smart-gateway-mt7688", "ralink,mt7688a-soc",
0015                      "ralink,mt7628a-soc";
0016         model = "GARDENA smart Gateway (MT7688)";
0017 
0018         memory@0 {
0019                 device_type = "memory";
0020                 reg = <0x0 0x8000000>;
0021         };
0022 
0023         gpio-keys {
0024                 compatible = "gpio-keys";
0025 
0026                 pinctrl-names = "default";
0027                 pinctrl-0 = <&pinmux_gpio_gpio>;        /* GPIO11 */
0028 
0029                 button {
0030                         label = "USER_BTN1";
0031                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
0032                         linux,code =<KEY_PROG1> ;
0033                 };
0034         };
0035 
0036         leds {
0037                 compatible = "gpio-leds";
0038 
0039                 pinctrl-names = "default";
0040                 pinctrl-0 = <&pinmux_pwm0_gpio>,        /* GPIO18 */
0041                             <&pinmux_pwm1_gpio>,        /* GPIO19 */
0042                             <&pinmux_sdmode_gpio>,      /* GPIO22..29 */
0043                             <&pinmux_p0led_an_gpio>;    /* GPIO43 */
0044                 /*
0045                  * <&pinmux_i2s_gpio> (covers GPIO0..3) is needed here as
0046                  * well for GPIO3. But this is already claimed for uart1
0047                  * (see below). So we can't include it in this LED node.
0048                  */
0049 
0050                 power_blue {
0051                         label = "smartgw:power:blue";
0052                         gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
0053                         default-state = "off";
0054                 };
0055 
0056                 power_green {
0057                         label = "smartgw:power:green";
0058                         gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
0059                         default-state = "off";
0060                 };
0061 
0062                 power_red {
0063                         label = "smartgw:power:red";
0064                         gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
0065                         default-state = "off";
0066                 };
0067 
0068                 radio_blue {
0069                         label = "smartgw:radio:blue";
0070                         gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
0071                         default-state = "off";
0072                 };
0073 
0074                 radio_green {
0075                         label = "smartgw:radio:green";
0076                         gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
0077                         default-state = "off";
0078                 };
0079 
0080                 radio_red {
0081                         label = "smartgw:radio:red";
0082                         gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
0083                         default-state = "off";
0084                 };
0085 
0086                 internet_blue {
0087                         label = "smartgw:internet:blue";
0088                         gpios = <&gpio 26 GPIO_ACTIVE_HIGH>;
0089                         default-state = "off";
0090                 };
0091 
0092                 internet_green {
0093                         label = "smartgw:internet:green";
0094                         gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
0095                         default-state = "off";
0096                 };
0097 
0098                 internet_red {
0099                         label = "smartgw:internet:red";
0100                         gpios = <&gpio 28 GPIO_ACTIVE_HIGH>;
0101                         default-state = "off";
0102                 };
0103 
0104                 ethernet_link {
0105                         label = "smartgw:eth:link";
0106                         gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
0107                         linux,default-trigger = "netdev";
0108                 };
0109 
0110                 ethernet_activity {
0111                         label = "smartgw:eth:act";
0112                         gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
0113                         linux,default-trigger = "netdev";
0114                 };
0115         };
0116 
0117         aliases {
0118                 serial0 = &uart0;
0119         };
0120 };
0121 
0122 &i2c {
0123         status = "okay";
0124 };
0125 
0126 &spi {
0127         status = "okay";
0128 
0129         pinctrl-names = "default";
0130         pinctrl-0 = <&pinmux_spi_spi>, <&pinmux_spi_cs1_cs>;
0131 
0132         flash@0 {
0133                 compatible = "jedec,spi-nor";
0134                 reg = <0>;
0135                 spi-max-frequency = <40000000>;
0136 
0137                 partitions {
0138                         compatible = "fixed-partitions";
0139                         #address-cells = <1>;
0140                         #size-cells = <1>;
0141 
0142                         partition@0 {
0143                                 label = "uboot";
0144                                 reg = <0x0 0xa0000>;
0145                                 read-only;
0146                         };
0147 
0148                         partition@a0000 {
0149                                 label = "uboot_env0";
0150                                 reg = <0xa0000 0x10000>;
0151                         };
0152 
0153                         partition@b0000 {
0154                                 label = "uboot_env1";
0155                                 reg = <0xb0000 0x10000>;
0156                         };
0157 
0158                         factory: partition@c0000 {
0159                                 label = "factory";
0160                                 reg = <0xc0000 0x10000>;
0161                                 read-only;
0162                         };
0163                 };
0164         };
0165 
0166         nand_flash@1 {
0167                 compatible = "spi-nand";
0168                 linux,mtd-name = "gd5f";
0169                 reg = <1>;
0170                 spi-max-frequency = <40000000>;
0171         };
0172 };
0173 
0174 &uart1 {
0175         status = "okay";
0176 
0177         pinctrl-names = "default";
0178         pinctrl-0 = <&pinmux_i2s_gpio>;         /* GPIO0..3 */
0179 
0180         fifo-size = <8>;
0181         tx-threshold = <8>;
0182 
0183         rts-gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
0184         cts-gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
0185 };
0186 
0187 &uart2 {
0188         status = "okay";
0189 
0190         pinctrl-names = "default";
0191         pinctrl-0 = <&pinmux_p2led_an_gpio>,    /* GPIO41 */
0192                     <&pinmux_p3led_an_gpio>;    /* GPIO40 */
0193 
0194         rts-gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
0195         cts-gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
0196 };
0197 
0198 &watchdog {
0199         status = "okay";
0200 };
0201 
0202 &wmac {
0203         status = "okay";
0204         mediatek,mtd-eeprom = <&factory 0x0000>;
0205 };