forked from openwrt/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ramips: add support for Creality WB-01 openwrt#3802
- Loading branch information
Showing
4 changed files
with
168 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT | ||
|
||
#include "mt7628an.dtsi" | ||
|
||
#include <dt-bindings/gpio/gpio.h> | ||
#include <dt-bindings/input/input.h> | ||
|
||
/ { | ||
compatible = "creality,wb-01", "mediatek,mt7628an-soc"; | ||
model = "Creality WB-01"; | ||
|
||
aliases { | ||
led-boot = &led_status; | ||
led-failsafe = &led_status; | ||
led-upgrade = &led_status; | ||
led-running = &led_status; | ||
label-mac-device = &wmac; | ||
}; | ||
|
||
keys { | ||
compatible = "gpio-keys"; | ||
|
||
reset { | ||
label = "reset"; | ||
gpios = <&gpio 38 GPIO_ACTIVE_LOW>; | ||
linux,code = <KEY_RESTART>; | ||
}; | ||
}; | ||
|
||
leds { | ||
compatible = "gpio-leds"; | ||
|
||
lan { | ||
label = "blue:lan"; | ||
gpios = <&gpio 43 GPIO_ACTIVE_LOW>; | ||
}; | ||
|
||
wlan2g { | ||
label = "yellow:wlan2g"; | ||
gpios = <&gpio 44 GPIO_ACTIVE_LOW>; | ||
linux,default-trigger = "phy0tpt"; | ||
}; | ||
|
||
led_status: status { | ||
label = "green:status"; | ||
gpios = <&gpio 42 GPIO_ACTIVE_LOW>; | ||
}; | ||
|
||
sd { | ||
label = "red:sd"; | ||
gpios = <&gpio 40 GPIO_ACTIVE_LOW>; | ||
}; | ||
}; | ||
}; | ||
|
||
&spi0 { | ||
status = "okay"; | ||
|
||
flash@0 { | ||
compatible = "jedec,spi-nor"; | ||
reg = <0>; | ||
spi-max-frequency = <40000000>; | ||
|
||
partitions { | ||
compatible = "fixed-partitions"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
partition@0 { | ||
label = "u-boot"; | ||
reg = <0x0 0x30000>; | ||
read-only; | ||
}; | ||
|
||
partition@30000 { | ||
label = "u-boot-env"; | ||
reg = <0x30000 0x10000>; | ||
read-only; | ||
}; | ||
|
||
factory: partition@40000 { | ||
label = "factory"; | ||
reg = <0x40000 0x10000>; | ||
read-only; | ||
}; | ||
|
||
partition@50000 { | ||
compatible = "denx,uimage"; | ||
label = "firmware"; | ||
reg = <0x50000 0xfb0000>; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
&state_default { | ||
gpio { | ||
groups = "wdt", "p3led_an", "p1led_an", "p0led_an", "wled_an"; | ||
function = "gpio"; | ||
}; | ||
}; | ||
|
||
&wmac { | ||
status = "okay"; | ||
mediatek,mtd-eeprom = <&factory 0x0>; | ||
}; | ||
|
||
ðernet { | ||
nvmem-cells = <&macaddr_factory_28>; | ||
nvmem-cell-names = "mac-address"; | ||
}; | ||
|
||
&factory { | ||
compatible = "nvmem-cells"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
macaddr_factory_28: macaddr@28 { | ||
reg = <0x28 0x6>; | ||
}; | ||
}; | ||
|
||
&sdhci { | ||
status = "okay"; | ||
mediatek,cd-low; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters