From: John Crispin Date: Mon, 14 Jul 2014 17:10:39 +0000 (+0000) Subject: ramips: basic support for Planex MZK-750DHP X-Git-Tag: reboot~6527 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=74db9511dc40410aceb6ab7122c965aa4bc42af3;p=openwrt%2Fstaging%2Fpepe2k.git ramips: basic support for Planex MZK-750DHP some gpios are still missing. Signed-off-by: John Crispin SVN-Revision: 41654 --- diff --git a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom index e958899ca1..18a0448de4 100644 --- a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom +++ b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom @@ -90,6 +90,7 @@ case "$FIRMWARE" in mofi3500-3gn | \ mpr-a1 | \ mpr-a2 | \ + mzk-750dhp | \ pwh2004 | \ ncs601w | \ nbg-419n | \ diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network b/target/linux/ramips/base-files/etc/uci-defaults/02_network index 39f46bb979..b54b555326 100755 --- a/target/linux/ramips/base-files/etc/uci-defaults/02_network +++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network @@ -97,7 +97,8 @@ ramips_setup_interfaces() dir-320-b1 | \ dir-615-h1 | \ hlk-rm04 | \ - mzk-w300nh2) + mzk-w300nh2 | \ + mzk-750dhp) ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" "1" "1" ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 6t" diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index b36b53c302..2e831d2931 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -160,6 +160,9 @@ ramips_board_detect() { *"HAME MPR-A2") name="mpr-a2" ;; + *"Planex MZK-750DHP") + name="mzk-750dhp" + ;; *"NBG-419N") name="nbg-419n" ;; diff --git a/target/linux/ramips/dts/MZK-750DHP.dts b/target/linux/ramips/dts/MZK-750DHP.dts new file mode 100644 index 0000000000..e25118791d --- /dev/null +++ b/target/linux/ramips/dts/MZK-750DHP.dts @@ -0,0 +1,87 @@ +/dts-v1/; + +/include/ "mt7620a.dtsi" + +/ { + compatible = "ralink,mt7620a-soc"; + model = "Planex MZK-750DHP"; + + palmbus@10000000 { + gpio1: gpio@638 { + status = "okay"; + }; + + spi@b00 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "en25q64"; + reg = <0 0>; + linux,modalias = "m25p80", "mx25l6405d"; + spi-max-frequency = <10000000>; + + 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>; + }; + }; + }; + }; + + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uartf", "mdio", "wdt", "spi refclk", "pa", "rgmii1", "rgmii2", "wled", "nd_sd"; + ralink,function = "gpio"; + }; + }; + }; + + ethernet@10100000 { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + + mtd-mac-address = <&factory 0x4>; + ralink,port-map = "llllw"; + }; + + gsw@10110000 { + ralink,port4 = "ephy"; + }; + + pcie@10140000 { + status = "okay"; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + s1 { + label = "reset"; + gpios = <&gpio0 1 1>; + linux,code = <0x100>; + }; + }; +}; diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index 25889ea052..c7225a6a39 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -714,6 +714,7 @@ dlink810l_mtd_size=6881280 Image/Build/Profile/DIR-810L=$(call BuildFirmware/CustomFlash/$(1),$(1),dir-810l,DIR-810L,$(dlink810l_mtd_size)) na930_mtd_size=20971520 Image/Build/Profile/NA930=$(call BuildFirmware/CustomFlash/$(1),$(1),na930,NA930,$(na930_mtd_size)) +Image/Build/Profile/MZK-750DHP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-750dhp,MZK-750DHP) ifeq ($(SUBTARGET),mt7620a) define Image/Build/Profile/Default @@ -726,6 +727,7 @@ define Image/Build/Profile/Default $(call Image/Build/Profile/WHR300HP2,$(1)) $(call Image/Build/Profile/WHR600D,$(1)) $(call Image/Build/Profile/WHR1166D,$(1)) + $(call Image/Build/Profile/MZK-750DHP,$(1)) $(call Image/Build/Profile/NA930,$(1)) endef endif