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>
13 compatible = "sanlinking,d240", "ralink,mt7620a-soc";
14 model = "Sanlinking Technologies D240";
17 led-boot = &led_power;
18 led-failsafe = &led_power;
19 led-running = &led_power;
20 led-upgrade = &led_power;
24 bootargs = "console=ttyS0,115200";
28 compatible = "gpio-export";
32 gpio-export,name = "power_mpcie2";
33 gpio-export,output = <1>;
34 gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
38 gpio-export,name = "power_mpcie1";
39 gpio-export,output = <1>;
40 gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>;
45 compatible = "gpio-leds";
49 gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
54 gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
55 trigger-sources = <&ohci_port1>, <&ehci_port1>;
56 linux,default-trigger = "usbport";
61 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
66 compatible = "gpio-keys";
70 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
71 linux,code = <KEY_RESTART>;
92 compatible = "jedec,spi-nor";
94 spi-max-frequency = <10000000>;
97 compatible = "fixed-partitions";
108 label = "u-boot-env";
109 reg = <0x30000 0x10000>;
113 factory: partition@40000 {
115 reg = <0x40000 0x10000>;
119 compatible = "fixed-layout";
120 #address-cells = <1>;
123 eeprom_factory_0: eeprom@0 {
127 macaddr_factory_4: macaddr@4 {
134 compatible = "denx,uimage";
136 reg = <0x50000 0xfb0000>;
144 /* the pins function is already set during pinmux driver load */
145 /delete-property/ pinctrl-0;
157 nvmem-cells = <&macaddr_factory_4>;
158 nvmem-cell-names = "mac-address";
160 mediatek,portmap = "llllw";
164 nvmem-cells = <&eeprom_factory_0>;
165 nvmem-cell-names = "eeprom";
170 groups = "i2c", "uartf", "wled", "spi refclk", "pa";
175 * The sd function of the nd_sd group configures two of the
176 * groups pins as gpios. The pins are used as PCIe reset/power.
177 * Due to the driver load order, the pins are configured way to
178 * late if triggered by the sd-card driver.
179 * To not introduce another kind of driver load order
180 * dependency and configure the pins as early as possible,
181 * means during pinmux driver load.