From patchwork Wed Aug 5 18:30:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Piotr Dymacz X-Patchwork-Id: 504171 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 414901402C4 for ; Thu, 6 Aug 2015 04:37:28 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=0xN9IzzS; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 2095828C0DC; Wed, 5 Aug 2015 20:32:51 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 21AC128050F for ; Wed, 5 Aug 2015 20:30:20 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .gmail. - helo: .mail-lb0-f170.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -8.5 Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com [209.85.217.170]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Wed, 5 Aug 2015 20:30:18 +0200 (CEST) Received: by lbbpo9 with SMTP id po9so29658923lbb.2 for ; Wed, 05 Aug 2015 11:30:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=kk96vqf0M/+wvHHWBhaRBtD82VasIZhS+i517/3rNDQ=; b=0xN9IzzSmMtOTklDzXVq7GAA7sa9PASAiTntXloMDF39621QigQJqmELT2AgUbQiPu oIw+q9ylHebUwKVyDRYdMmtAcWxWktoTp0lP8ZvRqEJKxrIG52VemdBr4ac9LTFQO5r9 8hJ/vAlvrwvjFBluuTNr0rH8RpezcuOmwZJ3rzwPR/r2B2+BuqtlRNaHvizNJJ9iOwkn vCFRyTa2G312pvFIHOrZk9ftVzFrjGL9yJ9lQz8ZH9Na5Z4Cblgn8FPBcnfnd7lGav6p SOw03pgTap/lRIZ0wYiVOe9PTJjHrNRiwYPHg5DV948gYXNYUqPqHhTVH+w9/K0i2nx2 Q2nA== X-Received: by 10.152.7.206 with SMTP id l14mr10397475laa.3.1438799453981; Wed, 05 Aug 2015 11:30:53 -0700 (PDT) Received: from ubuntu1404vm.lan (178235196055.warszawa.vectranet.pl. [178.235.196.55]) by smtp.gmail.com with ESMTPSA id ao8sm726686lac.38.2015.08.05.11.30.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Aug 2015 11:30:53 -0700 (PDT) From: Piotr Dymacz To: openwrt-devel@lists.openwrt.org Date: Wed, 5 Aug 2015 20:30:06 +0200 Message-Id: <1438799426-24409-6-git-send-email-pepe2k@gmail.com> X-Mailer: git-send-email 2.4.6 In-Reply-To: <1438799426-24409-1-git-send-email-pepe2k@gmail.com> References: <1438799426-24409-1-git-send-email-pepe2k@gmail.com> Subject: [OpenWrt-Devel] [PATCH v2 05/25] ramips: fix Xiaomi MiWiFi Mini board, image and profile names X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" The following patch: * changes board name from "xiaomi-miwifi-mini" to "miwifi-mini" * changes filenames of dts and profile * fixes LED names in dts file and base-files scripts * removes manufacturer name from image filename for Xiaomi MiWiFi Mini device. Signed-off-by: Piotr Dymacz --- target/linux/ramips/base-files/etc/board.d/01_leds | 4 +- .../linux/ramips/base-files/etc/board.d/02_network | 2 +- target/linux/ramips/base-files/etc/diag.sh | 4 +- target/linux/ramips/base-files/lib/ramips.sh | 2 +- .../ramips/base-files/lib/upgrade/platform.sh | 2 +- target/linux/ramips/dts/MIWIFI-MINI.dts | 150 +++++++++++++++++++++ target/linux/ramips/dts/XIAOMI-MIWIFI-MINI.dts | 150 --------------------- target/linux/ramips/image/Makefile | 4 +- .../ramips/mt7620/profiles/xiaomi-miwifi-mini.mk | 18 --- target/linux/ramips/mt7620/profiles/xiaomi.mk | 18 +++ 10 files changed, 177 insertions(+), 177 deletions(-) create mode 100644 target/linux/ramips/dts/MIWIFI-MINI.dts delete mode 100644 target/linux/ramips/dts/XIAOMI-MIWIFI-MINI.dts delete mode 100644 target/linux/ramips/mt7620/profiles/xiaomi-miwifi-mini.mk create mode 100644 target/linux/ramips/mt7620/profiles/xiaomi.mk diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index bb990c9..7bd52e1 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -256,8 +256,8 @@ case $board in wt3020) ucidef_set_led_default "power" "power" "nexx:blue:power" "0" ;; - xiaomi-miwifi-mini) - ucidef_set_led_default "power" "power" "xiaomi:red:status" "1" + miwifi-mini) + ucidef_set_led_default "power" "power" "miwifi-mini:red:status" "1" ;; y1 |\ y1s) diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 42447d4..44aebcf 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -144,7 +144,7 @@ ramips_setup_interfaces() wsr-600 | \ wsr-1166 | \ wt1520 | \ - xiaomi-miwifi-mini |\ + miwifi-mini |\ y1) ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" "1" "1" diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index 019bbbb..cb3d851 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -233,8 +233,8 @@ get_status_led() { xdxrn502j) status_led="xdxrn502j:green:power" ;; - xiaomi-mini) - status_led="xiaomi:red:status" + miwifi-mini) + status_led="miwifi-mini:red:status" ;; f7c027) status_led="belkin:orange:status" diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 436ed09..fa90243 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -395,7 +395,7 @@ ramips_board_detect() { name="ncs601w" ;; *"Xiaomi MiWiFi Mini") - name="xiaomi-miwifi-mini" + name="miwifi-mini" ;; *"Sercomm NA930") name="na930" diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 1021123..f46155f 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -123,7 +123,7 @@ platform_check_image() { wt3020 |\ x5 |\ x8 |\ - xiaomi-miwifi-mini |\ + miwifi-mini |\ y1 |\ y1s |\ zte-q7 |\ diff --git a/target/linux/ramips/dts/MIWIFI-MINI.dts b/target/linux/ramips/dts/MIWIFI-MINI.dts new file mode 100644 index 0000000..fa9846c --- /dev/null +++ b/target/linux/ramips/dts/MIWIFI-MINI.dts @@ -0,0 +1,150 @@ +/dts-v1/; + +/include/ "mt7620a.dtsi" + +/ { + compatible = "xiaomi,miwifi-mini", "ralink,mt7620a-soc"; + model = "Xiaomi MiWiFi Mini"; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + palmbus@10000000 { + gpio0: gpio@600 { + status = "okay"; + }; + + gpio1: gpio@638 { + status = "okay"; + }; + + gpio2: gpio@660 { + status = "okay"; + }; + + spi@b00 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "w25q128"; + reg = <0 0>; + linux,modalias = "m25p80", "w25q128"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + }; + + 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 0xf80000>; + }; + + partition@fd0000 { + label = "crash"; + reg = <0xfd0000 0x10000>; + }; + + partition@fe0000 { + label = "reserved"; + reg = <0xfe0000 0x10000>; + read-only; + }; + + partition@ff0000 { + label = "Bdata"; + reg = <0xff0000 0x10000>; + }; + }; + }; + }; + + ehci@101c0000 { + status = "okay"; + }; + + ohci@101c1000 { + status = "okay"; + }; + + ethernet@10100000 { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mtd-mac-address = <&factory 0x4>; + ralink,port-map = "llllw"; + }; + + wmac@10180000 { + ralink,mtd-eeprom = <&factory 0>; + }; + + pcie@10140000 { + status = "okay"; + + pcie-bridge { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; + }; + + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "rgmii1"; + ralink,function = "gpio"; + }; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + blue { + label = "miwifi-mini:blue:status"; + gpios = <&gpio1 0 1>; + }; + + yellow { + label = "miwifi-mini:yellow:status"; + gpios = <&gpio1 2 1>; + }; + + red { + label = "miwifi-mini:red:status"; + gpios = <&gpio1 5 1>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio1 6 0>; + linux,code = <0x198>; + }; + }; +}; diff --git a/target/linux/ramips/dts/XIAOMI-MIWIFI-MINI.dts b/target/linux/ramips/dts/XIAOMI-MIWIFI-MINI.dts deleted file mode 100644 index c1acab4..0000000 --- a/target/linux/ramips/dts/XIAOMI-MIWIFI-MINI.dts +++ /dev/null @@ -1,150 +0,0 @@ -/dts-v1/; - -/include/ "mt7620a.dtsi" - -/ { - compatible = "XIAOMI MIWIFI MINI", "ralink,mt7620a-soc"; - model = "Xiaomi MiWiFi Mini"; - - chosen { - bootargs = "console=ttyS0,115200"; - }; - - palmbus@10000000 { - gpio0: gpio@600 { - status = "okay"; - }; - - gpio1: gpio@638 { - status = "okay"; - }; - - gpio2: gpio@660 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "w25q128"; - reg = <0 0>; - linux,modalias = "m25p80", "w25q128"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - }; - - 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 0xf80000>; - }; - - partition@fd0000 { - label = "crash"; - reg = <0xfd0000 0x10000>; - }; - - partition@fe0000 { - label = "reserved"; - reg = <0xfe0000 0x10000>; - read-only; - }; - - partition@ff0000 { - label = "Bdata"; - reg = <0xff0000 0x10000>; - }; - }; - }; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - - ethernet@10100000 { - pinctrl-names = "default"; - pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; - ralink,port-map = "llllw"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pcie@10140000 { - status = "okay"; - - pcie-bridge { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x8000>; - mediatek,2ghz = <0>; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "rgmii1"; - ralink,function = "gpio"; - }; - }; - }; - - gpio-leds { - compatible = "gpio-leds"; - - blue { - label = "xiaomi:blue:status"; - gpios = <&gpio1 0 1>; - }; - - yellow { - label = "xiaomi:yellow:status"; - gpios = <&gpio1 2 1>; - }; - - red { - label = "xiaomi:red:status"; - gpios = <&gpio1 5 1>; - }; - }; - - gpio-keys-polled { - compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; - poll-interval = <20>; - - reset { - label = "reset"; - gpios = <&gpio1 6 0>; - linux,code = <0x198>; - }; - }; -}; diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index 79a97a5..232742c 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -878,7 +878,7 @@ Image/Build/Profile/WMR300=$(call BuildFirmware/Default8M/$(1),$(1),wmr-300,WMR3 Image/Build/Profile/RT-N14U=$(call BuildFirmware/Default8M/$(1),$(1),rt-n14u,RT-N14U) Image/Build/Profile/WRTNODE=$(call BuildFirmware/Default16M/$(1),$(1),wrtnode,WRTNODE) Image/Build/Profile/WT3020=$(call BuildFirmware/PorayDualSize/$(1),$(1),wt3020,WT3020) -Image/Build/Profile/XIAOMI-MIWIFI-MINI=$(call BuildFirmware/Default16M/$(1),$(1),xiaomi-miwifi-mini,XIAOMI-MIWIFI-MINI) +Image/Build/Profile/MIWIFI-MINI=$(call BuildFirmware/Default16M/$(1),$(1),miwifi-mini,MIWIFI-MINI) 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/ZBT-WR8305RT=$(call BuildFirmware/Default8M/$(1),$(1),zbt-wr8305rt,ZBT-WR8305RT) @@ -912,7 +912,7 @@ define Image/Build/Profile/Default $(call Image/Build/Profile/RT-N14U,$(1)) $(call Image/Build/Profile/WRTNODE,$(1)) $(call Image/Build/Profile/WT3020,$(1)) - $(call Image/Build/Profile/XIAOMI-MIWIFI-MINI,$(1)) + $(call Image/Build/Profile/MIWIFI-MINI,$(1)) $(call Image/Build/Profile/ZTE-Q7,$(1)) $(call Image/Build/Profile/ZBT-WA05,$(1)) $(call Image/Build/Profile/ZBT-WR8305RT,$(1)) diff --git a/target/linux/ramips/mt7620/profiles/xiaomi-miwifi-mini.mk b/target/linux/ramips/mt7620/profiles/xiaomi-miwifi-mini.mk deleted file mode 100644 index 47819b2..0000000 --- a/target/linux/ramips/mt7620/profiles/xiaomi-miwifi-mini.mk +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/XIAOMI-MIWIFI-MINI - NAME:=Xiaomi MiWiFi Mini - PACKAGES:=\ - kmod-usb-core kmod-usb-dwc2 kmod-usb2 kmod-usb-ohci \ - kmod-mt76 -endef - -define Profile/XIAOMI-MIWIFI-MINI/Description - Support for Xiaomi MiWiFi Mini routers -endef -$(eval $(call Profile,XIAOMI-MIWIFI-MINI)) diff --git a/target/linux/ramips/mt7620/profiles/xiaomi.mk b/target/linux/ramips/mt7620/profiles/xiaomi.mk new file mode 100644 index 0000000..47f6d49 --- /dev/null +++ b/target/linux/ramips/mt7620/profiles/xiaomi.mk @@ -0,0 +1,18 @@ +# +# Copyright (C) 2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/MIWIFI-MINI + NAME:=Xiaomi MiWiFi Mini + PACKAGES:=\ + kmod-usb-core kmod-usb-dwc2 kmod-usb2 kmod-usb-ohci \ + kmod-mt76 +endef + +define Profile/MIWIFI-MINI/Description + Support for Xiaomi MiWiFi Mini routers +endef +$(eval $(call Profile,MIWIFI-MINI))