From patchwork Wed Jun 13 08:51:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan HERPAI X-Patchwork-Id: 928770 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=uid0.hu Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gVxc5UZX"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 415LB86GnKz9ry1 for ; Wed, 13 Jun 2018 18:53:04 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yZqckg/cmC/IY83kT8Jb23Ax9hMDPjTmcdLBsBkptRw=; b=gVxc5UZXSlipnv Ws07Lr/VHVG50f9/nOq7p6Pk/8hpQdB+vcDzwlbQ9JCRieAB5WOjsF9sj40JSoQw60PWGmIM0YRvN Vr1xP3O1HKkN1PnZ5wi0AizXw49q91e1SP33OpxJLWk7aOdhgB/V5jn/dyuIKNbkqRABXQLMZfjO6 SEsGU2g9NF/LL3EIU3GYkPmbRfAIif7Yq/ye74lcQrBTmN1W/lWJkVuNNN9DS6ZARnFdm91uAvyNT xJ5xW78ysZnJogMaXeSg/9mGiZcwo02wUWkCgsWJ11LOUt86w74DHFMG3Zro0oaWzqf3wWIroDOrV y5LcXUwHflB+nkpcWQ4w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fT1WX-0007zB-QX; Wed, 13 Jun 2018 08:53:01 +0000 Received: from tunnel231050-pt.tunnel.tserv1.bud1.ipv6.he.net ([2001:470:1f1a:93::2] helo=trabant.uid0.hu) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fT1Vg-0007UR-0M for openwrt-devel@lists.openwrt.org; Wed, 13 Jun 2018 08:52:11 +0000 Received: from wigyori by trabant.uid0.hu with local (Exim 4.89 #1 (Debian)) id 1fT1VS-0006ji-J0 from ; Wed, 13 Jun 2018 10:51:54 +0200 From: Zoltan HERPAI To: openwrt-devel@lists.openwrt.org Date: Wed, 13 Jun 2018 10:51:53 +0200 Message-Id: <1528879913-25844-4-git-send-email-wigyori@uid0.hu> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1528879913-25844-1-git-send-email-wigyori@uid0.hu> References: <1528879913-25844-1-git-send-email-wigyori@uid0.hu> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180613_015208_223165_096CCA1E X-CRM114-Status: GOOD ( 10.53 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- Subject: [OpenWrt-Devel] [PATCH 4/4] ath79: add support for ON Networks N150R (rebranded WNR612v2) X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zoltan HERPAI , john@phrozen.org MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Signed-off-by: Zoltan HERPAI --- target/linux/ath79/base-files/etc/board.d/01_leds | 3 ++- target/linux/ath79/base-files/etc/board.d/02_network | 3 ++- .../base-files/etc/hotplug.d/firmware/10-ath9k-eeprom | 1 + target/linux/ath79/dts/ar7240_on_n150r.dts | 10 ++++++++++ target/linux/ath79/image/tiny-netgear.mk | 17 +++++++++++++++++ 5 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 target/linux/ath79/dts/ar7240_on_n150r.dts diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds b/target/linux/ath79/base-files/etc/board.d/01_leds index ee6568e..47c9cab 100755 --- a/target/linux/ath79/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/base-files/etc/board.d/01_leds @@ -27,7 +27,8 @@ case "$board" in "glinet,ar150") ucidef_set_led_wlan "wlan" "WLAN" "gl-ar150:orange:wlan" "phy0tpt" ;; -"netgear,wnr612-v2") +"netgear,wnr612-v2"|\ +"on,n150r") ucidef_set_led_netdev "wan" "WAN" "netgear:green:wan" "eth0" ucidef_set_led_wlan "wlan" "WLAN" "netgear:green:wlan" "phy0tpt" ucidef_set_led_switch "lan1" "LAN1" "netgear:green:lan1" "switch0" "0x02" "0x0f" diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network index f1f4bd0..ba4e7d4 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -26,7 +26,8 @@ ath79_setup_interfaces() "glinet,ar150") ucidef_set_interfaces_lan_wan "eth1" "eth0" ;; - "netgear,wnr612-v2") + "netgear,wnr612-v2"|\ + "on,n150r") ucidef_set_interfaces_lan_wan "eth1.1" "eth0" ucidef_add_switch "switch0" \ "0@eth1" "1:lan" "2:lan" "3:lan:3" "4:lan:4" diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 1ed7460..5b22b15 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -55,6 +55,7 @@ case "$FIRMWARE" in ath9k_eeprom_extract "art" 20480 1088 ;; "netgear,wnr612-v2"|\ + "on,n150r"|\ "tplink,tl-wr740n-v2"|\ "ubnt,unifi") ath9k_eeprom_extract "art" 4096 2048 diff --git a/target/linux/ath79/dts/ar7240_on_n150r.dts b/target/linux/ath79/dts/ar7240_on_n150r.dts new file mode 100644 index 0000000..cb4cf92 --- /dev/null +++ b/target/linux/ath79/dts/ar7240_on_n150r.dts @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "ar7240_netgear_wnr612-v2.dtsi" + +/ { + model = "ON Network N150R"; + compatible = "on,n150r"; +}; + diff --git a/target/linux/ath79/image/tiny-netgear.mk b/target/linux/ath79/image/tiny-netgear.mk index 81f83fd..48d14e9 100644 --- a/target/linux/ath79/image/tiny-netgear.mk +++ b/target/linux/ath79/image/tiny-netgear.mk @@ -17,3 +17,20 @@ define Device/netgear_wnr612-v2 SUPPORTED_DEVICES := netgear,wnr612-v2 wnr612-v2 endef TARGET_DEVICES += netgear_wnr612-v2 + +define Device/n150r + ATH_SOC := ar7240 + DEVICE_TITLE := ON Network N150R + DEVICE_DTS := ar7240_on_n150r + NETGEAR_KERNEL_MAGIC := 0x32303631 + KERNEL := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma + KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma + NETGEAR_BOARD_ID := N150R + IMAGE_SIZE := 3904k + IMAGES := sysupgrade.bin factory.img + IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | append-rootfs | pad-rootfs + IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE) + IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | check-size $$$$(IMAGE_SIZE) + SUPPORTED_DEVICES := on,n150r n150r +endef +TARGET_DEVICES += n150r