From patchwork Mon Jun 20 16:47:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathias Kresin X-Patchwork-Id: 638132 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rYGzj43b2z9s4n for ; Tue, 21 Jun 2016 02:49:37 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kresin-me.20150623.gappssmtp.com header.i=@kresin-me.20150623.gappssmtp.com header.b=IfN2n9wS; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bF2Mz-0001jK-GT; Mon, 20 Jun 2016 16:48:17 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bF2Mx-0001cx-2Z for lede-dev@lists.infradead.org; Mon, 20 Jun 2016 16:48:16 +0000 Received: by mail-wm0-x243.google.com with SMTP id 187so15510976wmz.1 for ; Mon, 20 Jun 2016 09:47:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kresin-me.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=+g6Prf3fxM1yoruHuD+DSoReEJAGzZaGG0xInT5AU3E=; b=IfN2n9wStP4OFlZz5JlYhNXR7G/G2iyS86ifTjiYvHaYgEcqNTxtANV03sS/KbaBpN I7/KFJL6EjMt5Tj1R2ANecqnGdWM9gq0xMXC8fi8v8Sw1fR/BIQWqvzIdcbBYr77t6F7 tm+yK0HNQqf67Gj62x92w/83wzHrlr8eQ9xXaqmAkEnElWc8DgVUKth4FBtVo/k7RFK1 GKYwY9MYs/VVRFcSfK+qkd+zWTGUKCpRH35sOO0zvhyOVeDjy6U/V/BzirHLuVp994mj nhMHr/+3EnIvJFiRiT1zl+CBwzxi3Q+faVSOcm21wpm2wfWv//4PJVSooRupTd+Z84dm gC0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=+g6Prf3fxM1yoruHuD+DSoReEJAGzZaGG0xInT5AU3E=; b=jcVMsRzqGeJzifOjHEpVCWVc9j7WTGkP8xYC8UuRDJQc4zPg6BRwx6Adq0lnN42AwF HTJkKa4tSUdBCf/fLB4jLl1Ua1ifjXgHA6tcR6x2rLhCUPKSJ+axCrgrauL7SBQB87se HYLKHGPZLWcl20IhoKLwPoLUjJLZ1wXrhzmX2quSApcO/A5Zx6CHASigrmbCzFYbNcuU 0/lUit2MV54rXKac9GjzGzWFbD0za25E9PJ0/ii9+8E8rF8XcVg6T71qYeYGGH3TnVhX enp9m4WpHs+2rXv1Z/eWr4vlx7q6WC3wBekjENROUk38nL4k/M5rMegILN03IygJ+/G0 Pagg== X-Gm-Message-State: ALyK8tI03/sDAx9A4qu9Z+phQfHhcgsVkGwNsmeFh4o4AdJJfo6It6fKMHzsdljxtu+tSw== X-Received: by 10.194.101.233 with SMTP id fj9mr15229321wjb.54.1466441272494; Mon, 20 Jun 2016 09:47:52 -0700 (PDT) Received: from desktop.wvd.kresin.me (p5DDC653E.dip0.t-ipconnect.de. [93.220.101.62]) by smtp.gmail.com with ESMTPSA id o129sm4220803wmb.17.2016.06.20.09.47.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 Jun 2016 09:47:52 -0700 (PDT) From: Mathias Kresin To: lede-dev@lists.infradead.org Date: Mon, 20 Jun 2016 18:47:38 +0200 Message-Id: <1466441259-5074-1-git-send-email-dev@kresin.me> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160620_094815_509870_7A38A1BE X-CRM114-Status: GOOD ( 13.63 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:243 listed in] [list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid Subject: [LEDE-DEV] [PATCH 1/2] lantiq: add support for ARV7506PW11 (Alice/O2 IAD 4421) X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Oswald Buddenhagen MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Oswald Buddenhagen Ethernet, ADSL2+ and LEDs are fully functional. Supporting the two TAE ports and SIP gateway was not attempted. The WiFi is unreliable, due to experimental support for rt35xx family devices by the rt2800pci driver. Signed-off-by: Oswald Buddenhagen [rebase to LEDE HEAD] [switch to normal image instead of brnboot image] [remove not required pinmux child nodes keys, leds, ebu, exin, pci_in and pci_out] [remove switch_rst pinmux child node (no support for hw reset in driver/setting a default GPIO value in DT] [enable usage of the wireless LED] [fixup mac address configuration] Sgned-off-by: Mathias Kresin --- target/linux/lantiq/base-files/etc/board.d/01_leds | 3 + .../linux/lantiq/base-files/etc/board.d/02_network | 8 ++ .../etc/hotplug.d/firmware/10-rt2x00-eeprom | 2 +- target/linux/lantiq/dts/ARV7506PW11.dts | 159 +++++++++++++++++++++ target/linux/lantiq/image/Makefile | 12 ++ 5 files changed, 183 insertions(+), 1 deletion(-) create mode 100644 target/linux/lantiq/dts/ARV7506PW11.dts diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/base-files/etc/board.d/01_leds index 4cca17f..c9d9a77 100755 --- a/target/linux/lantiq/base-files/etc/board.d/01_leds +++ b/target/linux/lantiq/base-files/etc/board.d/01_leds @@ -27,6 +27,9 @@ board_config_update board=$(lantiq_board_name) case "$board" in +ARV7506PW11) + ucidef_set_led_wlan "wifi" "wifi" "arv7506pw11:green:wlan" "phy0radio" + ;; BTHOMEHUBV5A) ucidef_set_led_default "dimmed" "dimmed" "dimmed" "0" ;; diff --git a/target/linux/lantiq/base-files/etc/board.d/02_network b/target/linux/lantiq/base-files/etc/board.d/02_network index cafcb0e..e872315 100755 --- a/target/linux/lantiq/base-files/etc/board.d/02_network +++ b/target/linux/lantiq/base-files/etc/board.d/02_network @@ -46,6 +46,14 @@ ARV4519PW|ARV7510PW22|ARV7518PW|ARV752DPW22|ARV8539PW22) ;; # rtl8306g +ARV7506PW11) + lan_mac=$(mtd_get_mac_binary board_config 22) + wan_mac=$(macaddr_add "$lan_mac" 2) + ucidef_add_switch "switch0" \ + "4:lan:1" "3:lan:2" "2:lan:3" "1:lan:4" "5t@eth0" + ;; + +# rtl8306g ARV7519PW) lan_mac=$(mtd_get_mac_binary board_config 22) wan_mac=$(macaddr_add "$lan_mac" 1) diff --git a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom b/target/linux/lantiq/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom index 5f1cb00..da10797 100644 --- a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom +++ b/target/linux/lantiq/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom @@ -35,7 +35,7 @@ case "$FIRMWARE" in "RT2860.eeprom" ) local board=$(lantiq_board_name) case $board in - ARV7510PW22|ARV7519PW|ARV752DPW|ARV752DPW22|VGV7519) + ARV7506PW11|ARV7510PW22|ARV7519PW|ARV752DPW|ARV752DPW22|VGV7519) rt2x00_eeprom_extract "board_config" 520 256 1 ;; ARV7525PW) diff --git a/target/linux/lantiq/dts/ARV7506PW11.dts b/target/linux/lantiq/dts/ARV7506PW11.dts new file mode 100644 index 0000000..7519e22 --- /dev/null +++ b/target/linux/lantiq/dts/ARV7506PW11.dts @@ -0,0 +1,159 @@ +/dts-v1/; + +/include/ "danube.dtsi" + +/ { + model = "ARV7506PW11 - Alice/O2 IAD 4421"; + + chosen { + leds { + boot = &power; + failsafe = &power_red; + running = &power; + + dsl = &dsl; + internet = &internet; + wifi = &wlan; + }; + }; + + memory@0 { + reg = <0x0 0x4000000>; + }; + + fpi@10000000 { + localbus@0 { + nor-boot@0 { + compatible = "lantiq,nor"; + bank-width = <2>; + reg = <0 0x0 0x800000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "uboot"; + reg = <0x00000 0x40000>; + read-only; + }; + + partition@40000 { + label = "uboot_env"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7a0000>; + }; + + partition@7f0000 { + label = "board_config"; + reg = <0x7f0000 0x10000>; + read-only; + }; + }; + }; + + mac_addr { + compatible = "lantiq,eth-mac"; + reg = <0 0x7f0016 0x6>; + }; + }; + + gpio: pinmux@E100B10 { + pinctrl-names = "default"; + pinctrl-0 = <&state_default>; + + state_default: pinmux { + pci { + lantiq,groups = "gnt1"; + lantiq,function = "pci"; + lantiq,output = <1>; + }; + pci_rst { + lantiq,pins = "io21"; + lantiq,pull = <2>; + lantiq,output = <1>; + }; + }; + }; + + /* GPIO 19: switch reset */ + etop@E180000 { + phy-mode = "rmii"; + }; + + pci@E105400 { + status = "okay"; + gpio-reset = <&gpio 21 0>; + }; + }; + + ralink_eep { + compatible = "ralink,eeprom"; + ralink,eeprom = "RT2860.eeprom"; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <100>; + + rfkill { + label = "rfkill"; + gpios = <&gpio 11 1>; + linux,code = <0xf7>; + }; + reset { + label = "reset"; + gpios = <&gpio 30 1>; + linux,code = <0x198>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + wlan: wlan { + label = "arv7506pw11:green:wlan"; + gpios = <&gpio 2 1>; + }; + power: power { + label = "arv7506pw11:green:power"; + gpios = <&gpio 3 1>; + default-state = "keep"; + }; + dsl: dsl { + label = "arv7506pw11:green:dsl"; + gpios = <&gpio 4 1>; + }; + internet: internet { + label = "arv7506pw11:green:internet"; + gpios = <&gpio 5 1>; + }; + power_red: power_red { + label = "arv7506pw11:red:power"; + gpios = <&gpio 6 1>; + }; + internet_red { + label = "arv7506pw11:red:internet"; + gpios = <&gpio 7 1>; + }; + info { + label = "arv7506pw11:green:info"; + gpios = <&gpio 8 1>; + }; + telefon { + label = "arv7506pw11:green:telefon"; + gpios = <&gpio 9 1>; + }; + info_red { + label = "arv7506pw11:red:info"; + gpios = <&gpio 20 1>; + }; + }; +}; diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index e75d634..026934f 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -354,6 +354,18 @@ define Device/ARV4519PW endef TARGET_DEVICES += ARV4519PW +define Device/ARV7506PW11 + DEVICE_PROFILE := ARV7506PW11 + IMAGE_SIZE := 7808k + DEVICE_TITLE := Alice/O2 IAD 4421 - ARV7506PW11 + DEVICE_PACKAGES := kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ + kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \ + ltq-adsl-app ppp-mod-pppoa \ + kmod-rt2800-pci wpad-mini \ + swconfig +endef +TARGET_DEVICES += ARV7506PW11 + define Device/ARV7510PW22 DEVICE_PROFILE := ARV7510PW22 IMAGE_SIZE := 31232k