[OpenWrt-Devel] Request to submit patch for new route board.
shengkai
shengkai_81 at 163.com
Sat Apr 4 08:45:24 EDT 2015
hi Maintainer and All,
We are an open source hardware team come from china, and we developed an open source route board using MT7620A soc. In order to support this new board officially, we plan to sumbit the special code for our prodcut to openwrt branch.
This is the first time to summbit code, maybe there is some error although read the wiki carefully, appreciat your commants. Thanks in advance.
The following is the detailed information for this path. Beside that, I attached the patch file in mail although the wiki doesn't suggest using this way.
I use the Git to clone the latest code and do change on it. All the code has been tested carefully.
Patch Information:
This patch used to support new route board "MicroWRT". It's an open source hardware and use the MT7620a SOC. It has a 16M flash and 64M 16bit DDR2 RAM. You can use most interface, such as i2c, SPI, i2s and PCIe. Besides that there are three expansion borad to combine with the core board. For detailed infomation, you can refer to our webpage: https://www.microduino.cc/wiki/index.php?title=Main_Page
In this path, changed one existing file "/target/linux/ramips/image/Makefile" which used to define the microWRT build.
Two new file are introduced.
/target/linux/ramips/dts/MicroWRT.dts. This is the dts file for board "MicroWRT"
/target/linux/ramips/mt7620/profiles/microwrt.mk. This is the file to define the profile, then you can choose microwrt in "Target profile" configuartion.
Patch Code:
changed file
===================================
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index 743f7b4..ce0733d 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -865,7 +865,7 @@ Image/Build/Profile/XIAOMI-MIWIFI-MINI=$(call BuildFirmware/Default16M/$(1),$(1)
Image/Build/Profile/ZTE-Q7=$(call BuildFirmware/Default8M/$(1),$(1),zte-q7,ZTE-Q7)
Image/Build/Profile/ZBT-WA05=$(call BuildFirmware/Default8M/$(1),$(1),zbt-wa05,ZBT-WA05)
Image/Build/Profile/ArcherC20i=$(call BuildFirmware/Tplink/$(1),$(1),ArcherC20i,ArcherC20i)
-
+Image/Build/Profile/MicroWRT=$(call BuildFirmware/Default16M/$(1),$(1),microwrt,MicroWRT)
ifeq ($(SUBTARGET),mt7620)
define Image/Build/Profile/Default
@@ -895,6 +895,7 @@ define Image/Build/Profile/Default
$(call Image/Build/Profile/ZTE-Q7,$(1))
$(call Image/Build/Profile/ZBT-WA05,$(1))
$(call Image/Build/Profile/ArcherC20i,$(1))
+ $(call Image/Build/Profile/MicroWRT,$(1))
endef
endif
New file /target/linux/ramips/dts/MicroWRT.dts
===================================================
+/dts-v1/;
+/include/ "mt7620a.dtsi"
+/ {
+ compatible = "microwrt", "ralink,mt7620a-soc";
+ model = "MicroWRT";
+
+ palmbus at 10000000 {
+ gpio0: gpio at 600 {
+ status = "okay";
+ };
+ gpio1: gpio at 638 {
+ status = "okay";
+ };
+ gpio2: gpio at 660 {
+ status = "okay";
+ };
+ gpio3: gpio at 688 {
+ status = "okay";
+ };
+
+ spi at b00 {
+ status = "okay";
+
+ m25p80 at 0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "mx25l12805d";
+ reg = <0 0>;
+ linux,modalias = "m25p80", "w25q128";
+ spi-max-frequency = <10000000>;
+
+ partition at 0 {
+ label = "u-boot";
+ reg = <0x0 0x20000>;
+ read-only;
+ };
+
+ partition at 20000 {
+ label = "u-boot-env";
+ reg = <0x20000 0x10000>;
+ read-only;
+ };
+
+ factory: partition at 30000 {
+ label = "factory";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ partition at 40000 {
+ label = "firmware";
+ reg = <0x40000 0xfb0000>;
+ };
+ };
+ };
+ };
+
+ pinctrl {
+ state_default: pinctrl0 {
+ default {
+ ralink,group = "i2c", "spi refclk", "rgmii1";
+ ralink,function = "gpio";
+ };
+ };
+ };
+
+ ehci at 101c0000 {
+ status = "okay";
+ };
+
+ ohci at 101c1000 {
+ status = "okay";
+ };
+
+ ethernet at 10100000 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ephy_pins>;
+
+ mtd-mac-address = <&factory 0x4>;
+ ralink,port-map = "llllw";
+ };
+
+ gsw at 10110000 {
+ ralink,port4 = "ephy";
+ };
+
+ wmac at 10180000 {
+ ralink,mtd-eeprom = <&factory 0>;
+ };
+
+ pcie at 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 = <0x198>;
+ };
+ s2 {
+ label = "wps";
+ gpios = <&gpio0 2 1>;
+ linux,code = <0x211>;
+ };
+ };
+};
New file /target/linux/ramips/mt7620/profiles/microwrt.mk
=============================================================
+ define Profile/MicroWRT
+ NAME:=MicroWRT
+ PACKAGES:=\
+ kmod-usb-core kmod-usb-dwc2 kmod-usb2 kmod-usb-ohci \
+ kmod-mt76
+ endef
+
+ define Profile/MicroWRT/Description
+ Support for MicroWRT
+ endef
+ $(eval $(call Profile,MicroWRT))
Appreciate your responsed!
Thanks,
Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150404/ba8bb75f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: new patch.diff
Type: application/octet-stream
Size: 5267 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150404/ba8bb75f/attachment.obj>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list