ramips: add support for DuZun DM06

DuZun DM06 is a develop board based on mt7628
64M RAM, 8M SPI Flash, 1 WAN, 1 LAN.
wm8960 codec with line out, line in and speaker output.

Signed-off-by: Michael Lee <igvtee@gmail.com>
lede-17.01
Michael Lee 2016-05-28 22:22:10 +08:00 committed by John Crispin
parent 49b7421836
commit 9a4935687d
5 changed files with 171 additions and 0 deletions

View File

@ -172,6 +172,10 @@ ramips_setup_interfaces()
wrh-300cr) wrh-300cr)
ucidef_set_interface_lan "eth0" ucidef_set_interface_lan "eth0"
;; ;;
duzun-dm06)
ucidef_add_switch "switch0" \
"1:lan" "0:wan" "6@eth0"
;;
e1700|\ e1700|\
mt7620a_mt7530) mt7620a_mt7530)
ucidef_add_switch "switch1" \ ucidef_add_switch "switch1" \

View File

@ -151,6 +151,9 @@ ramips_board_detect() {
*"Dovado Tiny AC") *"Dovado Tiny AC")
name="tiny-ac" name="tiny-ac"
;; ;;
*"DuZun DM06")
name="duzun-dm06"
;;
*"E1700") *"E1700")
name="e1700" name="e1700"
;; ;;

View File

@ -50,6 +50,7 @@ platform_check_image() {
dir-620-a1|\ dir-620-a1|\
dir-620-d1|\ dir-620-d1|\
dir-810l|\ dir-810l|\
duzun-dm06|\
e1700|\ e1700|\
esr-9753|\ esr-9753|\
ex2700|\ ex2700|\

View File

@ -0,0 +1,155 @@
/dts-v1/;
/include/ "mt7628an.dtsi"
/ {
compatible = "duzun,dm06-mt7628an", "mediatek,mt7628an-soc";
model = "DuZun DM06";
memory@0 {
device_type = "memory";
reg = <0x0 0x4000000>;
};
gpio-keys-polled {
compatible = "gpio-keys-polled";
#address-cells = <1>;
#size-cells = <0>;
poll-interval = <100>;
reset {
label = "reset";
gpios = <&gpio1 14 1>;
linux,code = <0x198>;
};
wps {
label = "wps";
gpios = <&gpio1 6 1>;
linux,code = <0x211>;
};
};
sound {
compatible = "simple-audio-card";
simple-audio-card,name = "Audio-I2S";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-master = <&dailink0_master>;
simple-audio-card,frame-master = <&dailink0_master>;
simple-audio-card,widgets =
"Headphone", "Headphones";
simple-audio-card,routing =
"Headphones", "HP_L",
"Headphones", "HP_R";
simple-audio-card,mclk-fs = <256>;
simple-audio-card,cpu {
sound-dai = <&i2s>;
};
dailink0_master: simple-audio-card,codec {
sound-dai = <&codec>;
};
};
};
&pinctrl {
state_default: pinctrl0 {
gpio {
ralink,group = "wdt", "uart1";
ralink,function = "gpio";
};
};
i2s_pins: i2s {
i2s {
ralink,group = "i2s";
ralink,function = "i2s";
};
};
wm8960_mclk_pins: wm8960_mclk {
wm8960_mclk {
ralink,group = "refclk";
ralink,function = "reclk";
};
};
};
&gpio1 {
status = "okay";
};
&i2c {
status = "okay";
codec: wm8960@1a {
#sound-dai-cells = <0>;
compatible = "wlf,wm8960";
reg = <0x1a>;
wlf,shared-lrclk;
};
};
&ethernet {
mtd-mac-address = <&factory 0x4>;
};
&esw {
mediatek,portmap = <0x3>;
mediatek,portdisable = <0x3c>;
};
&i2s {
#sound-dai-cells = <0>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&i2s_pins>, <&wm8960_mclk_pins>;
};
&sdhci {
status = "okay";
};
&gdma {
status = "okay";
};
&spi0 {
status = "okay";
m25p80@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "jedec,spi-nor";
reg = <0>;
linux,modalias = "m25p80";
spi-max-frequency = <60000000>;
m25p,chunked-io = <32>;
m25p,fast-read;
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 {
label = "firmware";
reg = <0x50000 0x7b0000>;
};
};
};

View File

@ -25,3 +25,11 @@ define Device/wrtnode2p
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-ledtrig-usbdev DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-ledtrig-usbdev
endef endef
TARGET_DEVICES += wrtnode2p TARGET_DEVICES += wrtnode2p
define Device/duzun-dm06
DTS := DUZUN-DM06
IMAGE_SIZE := $(ralink_default_fw_size_8M)
DEVICE_TITLE := DuZun DM06
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-ledtrig-usbdev
endef
TARGET_DEVICES += duzun-dm06