1 // SPDX-License-Identifier: BSD-3-Clause
3 * Copyright(c) 2017 Kristian Evensen <kristian.evensen@gmail.com>.
7 #include "mt7620a.dtsi"
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/input/input.h>
11 #include <dt-bindings/leds/common.h>
14 compatible = "sanlinking,d240", "ralink,mt7620a-soc";
15 model = "Sanlinking Technologies D240";
18 led-boot = &led_power;
19 led-failsafe = &led_power;
20 led-running = &led_power;
21 led-upgrade = &led_power;
25 bootargs = "console=ttyS0,115200";
29 compatible = "gpio-export";
33 gpio-export,name = "power_mpcie2";
34 gpio-export,output = <1>;
35 gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
39 gpio-export,name = "power_mpcie1";
40 gpio-export,output = <1>;
41 gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>;
46 compatible = "gpio-leds";
49 function = LED_FUNCTION_POWER;
50 color = <LED_COLOR_ID_BLUE>;
51 gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
55 function = LED_FUNCTION_USB;
56 color = <LED_COLOR_ID_BLUE>;
57 gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
58 trigger-sources = <&ohci_port1>, <&ehci_port1>;
59 linux,default-trigger = "usbport";
64 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
69 compatible = "gpio-keys";
73 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
74 linux,code = <KEY_RESTART>;
95 compatible = "jedec,spi-nor";
97 spi-max-frequency = <10000000>;
100 compatible = "fixed-partitions";
101 #address-cells = <1>;
111 label = "u-boot-env";
112 reg = <0x30000 0x10000>;
118 reg = <0x40000 0x10000>;
122 compatible = "fixed-layout";
123 #address-cells = <1>;
126 eeprom_factory_0: eeprom@0 {
130 macaddr_factory_4: macaddr@4 {
137 compatible = "denx,uimage";
139 reg = <0x50000 0xfb0000>;
147 /* the pins function is already set during pinmux driver load */
148 /delete-property/ pinctrl-0;
160 nvmem-cells = <&macaddr_factory_4>;
161 nvmem-cell-names = "mac-address";
163 mediatek,portmap = "llllw";
167 nvmem-cells = <&eeprom_factory_0>;
168 nvmem-cell-names = "eeprom";
173 groups = "i2c", "uartf", "wled", "spi refclk", "pa";
178 * The sd function of the nd_sd group configures two of the
179 * groups pins as gpios. The pins are used as PCIe reset/power.
180 * Due to the driver load order, the pins are configured way to
181 * late if triggered by the sd-card driver.
182 * To not introduce another kind of driver load order
183 * dependency and configure the pins as early as possible,
184 * means during pinmux driver load.