From patchwork Sat Sep 5 22:50:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 1358235 X-Patchwork-Delegate: chunkeey@googlemail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=rpHC1Ka4; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=BHQoi/sD; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BkVDt6lGkz9sRK for ; Sun, 6 Sep 2020 08:52:46 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=VRoIhcMrO/XLse/klRzIYkKGVMHftq4CU7XZqjMbTfo=; b=rpHC1Ka4vG4lbI30xKCfEP/YcC 1KRcuAu03k3VqEFGBWvGvb6r7ypWlxH4LqXFtt85pvhjha9sbzDPshP/8pD+b4OJgOUdbDh/CjI+m qdDZNNbuzsJ4XJZlqfeCIDhstWuOw1JJDxmdZ6L/b5UUkyBYQxV7Td3wPaT0XakhSYF4tS9U/b+vX i3eQWaf1TKUTFCYY8WIJ6X4T2xNplxwYsEEzV13V7kEDxcJJk7+xlh/8xGvJlXd8802qoPHXuDnDv knFUNJ1/ZRfkeTBGVIrzEKy1Gq2mu0v4/7qoxhIwahbAr49hyoZKO9GcpseNu1GUsA0jlm2+cgoA9 cxgFUbkg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kEh1G-0000te-Jz; Sat, 05 Sep 2020 22:50:50 +0000 Received: from mail-ed1-x541.google.com ([2a00:1450:4864:20::541]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kEh1B-0000qn-16 for openwrt-devel@lists.openwrt.org; Sat, 05 Sep 2020 22:50:46 +0000 Received: by mail-ed1-x541.google.com with SMTP id l17so9215866edq.12 for ; Sat, 05 Sep 2020 15:50:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kTOoFQ4gQcDuTmAJBBKTjxxKQ+3QGu5OEt13HM9wIE4=; b=BHQoi/sDC3mEG4AeznBbHk+yhxEMSv/WgxXcdXJStciPyAUDWOIyrusDK9XLsXBQyR 0ckde/PTRSKhJbBke6BZhVCgWoJVTYqn54qtXoeM1kXrQQYR64A/jgtW0E1EuzrmiDgO sHR2lM6GQWQ0KZ8ZCfJPVkn4Pqs8t87I+xQif7XNElqtWZNZIoIeD0tHt3hkyKKpBpw6 Q3D6MjsXqtvnBE4cm92fJaIl+I+WTfPGLDcsVRIvn14+ToZyB9Xd6dOln67FbmOoXR9r wLROYwQYe3F7RHvqkYWN6u6+dC7EZLQfkodFtenivgO/h6Y1DL3R6sffcSkuWLFb2J0h B8cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kTOoFQ4gQcDuTmAJBBKTjxxKQ+3QGu5OEt13HM9wIE4=; b=jrRxanzQFew/G3kMwTpMsNXHB3iFxnAzUAh7w8Bg42MbUlFHMjwYU0hDB2sekR83yy EHZjcqtSfNy8B/XGmR6NLybEDp41RjGptwChs3r75A++/MWMIizhdeQrxlo9QRvRmwhx F6vAdx/AeEfWpXm7ab2etzy/N6/WHMNe11T5qq1gkwlCS8soFU8FVRQwc3IRtDdFCs3Z V4Ylhqa8JvXzAxIy+jsQEdvEIkOJbCDJ23AG8W8kcE8oyqpqz9sUvv0+7CVZb9o4kf7j V9aQEcGFHe2I9DqaXzC5RWNLHJG+voPlyLWSIVsiydAHTEqDajs+K3zY6jAoAwnILx37 wqAg== X-Gm-Message-State: AOAM530hX12cwPQyQVv9KYYoosXm5TdGnbZvq1gjMHLcYomsvSYvT/J9 jg8bMf0h8A6JJBcGjRkEPY2evYxSSB8= X-Google-Smtp-Source: ABdhPJyeICgySYOZ7PxAjMbr3NUuzdzjgVciR3q2L4xo5Xo0zao3ZMFBE5MbdrUfxBihe2kQyEub0A== X-Received: by 2002:aa7:d585:: with SMTP id r5mr15405883edq.278.1599346243485; Sat, 05 Sep 2020 15:50:43 -0700 (PDT) Received: from debian64.daheim (pd9e292e7.dip0.t-ipconnect.de. [217.226.146.231]) by smtp.gmail.com with ESMTPSA id d9sm9835870edt.20.2020.09.05.15.50.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Sep 2020 15:50:43 -0700 (PDT) Received: from chuck by debian64.daheim with local (Exim 4.94) (envelope-from ) id 1kEh11-001AQL-NP; Sun, 06 Sep 2020 00:50:35 +0200 From: Christian Lamparter To: openwrt-devel@lists.openwrt.org Subject: [PATCH v2 1/7] scripts: mkits.sh make it possible to specify fdt@# Date: Sun, 6 Sep 2020 00:50:26 +0200 Message-Id: X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200905_185045_093241_9ADD3E04 X-CRM114-Status: GOOD ( 14.12 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:541 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [chunkeey[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -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 -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: rafal@milecki.pl, hauke@hauke-m.de, f.fainelli@gmail.com, chrisrblake93@gmail.com, Adrian Schmutzler Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Some bootloaders are really keen on just one special fdt in a multi-image fit image. This is a problem, because currently this is fixed to "fdt@1". This patch introduces a new device variable: DEVICE_FDT_NUM that allows to specify the right fdt number. If the value is absent "1" will be chosen. Signed-off-by: Christian Lamparter --- include/image-commands.mk | 1 + include/image.mk | 6 ++++-- scripts/mkits.sh | 12 ++++++++---- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/include/image-commands.mk b/include/image-commands.mk index 9516801c8d..740d627fc7 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -158,6 +158,7 @@ define Build/fit -D $(DEVICE_NAME) -o $@.its -k $@ \ $(if $(word 2,$(1)),-d $(word 2,$(1))) -C $(word 1,$(1)) \ -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ + $(if $(DEVICE_FDT_NUM),-n $(DEVICE_FDT_NUM)) \ -c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config@1") \ -A $(LINUX_KARCH) -v $(LINUX_VERSION) PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new diff --git a/include/image.mk b/include/image.mk index 703aeb6816..a1308f47ad 100644 --- a/include/image.mk +++ b/include/image.mk @@ -432,6 +432,7 @@ define Device/Init DEVICE_DTS := DEVICE_DTS_CONFIG := DEVICE_DTS_DIR := + DEVICE_FDT_NUM := SOC := BOARD_NAME := @@ -453,8 +454,9 @@ DEFAULT_DEVICE_VARS := \ DEVICE_NAME KERNEL KERNEL_INITRAMFS KERNEL_INITRAMFS_IMAGE KERNEL_SIZE \ CMDLINE UBOOTENV_IN_UBI KERNEL_IN_UBI BLOCKSIZE PAGESIZE SUBPAGESIZE \ VID_HDR_OFFSET UBINIZE_OPTS UBINIZE_PARTS MKUBIFS_OPTS DEVICE_DTS \ - DEVICE_DTS_CONFIG DEVICE_DTS_DIR SOC BOARD_NAME UIMAGE_NAME SUPPORTED_DEVICES \ - IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR UBOOT_PATH IMAGE_SIZE \ + DEVICE_DTS_CONFIG DEVICE_DTS_DIR DEVICE_FDT_NUM SOC BOARD_NAME \ + UIMAGE_NAME SUPPORTED_DEVICES IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR \ + UBOOT_PATH IMAGE_SIZE \ DEVICE_COMPAT_VERSION DEVICE_COMPAT_MESSAGE \ DEVICE_VENDOR DEVICE_MODEL DEVICE_VARIANT \ DEVICE_ALT0_VENDOR DEVICE_ALT0_MODEL DEVICE_ALT0_VARIANT \ diff --git a/scripts/mkits.sh b/scripts/mkits.sh index 468ef670e6..bb629d6fca 100755 --- a/scripts/mkits.sh +++ b/scripts/mkits.sh @@ -16,7 +16,7 @@ usage() { printf "Usage: %s -A arch -C comp -a addr -e entry" "$(basename "$0")" - printf " -v version -k kernel [-D name -d dtb] -o its_file" + printf " -v version -k kernel [-D name -n address -d dtb] -o its_file" printf "\n\t-A ==> set architecture to 'arch'" printf "\n\t-C ==> set compression type 'comp'" @@ -26,12 +26,15 @@ usage() { printf "\n\t-v ==> set kernel version to 'version'" printf "\n\t-k ==> include kernel image 'kernel'" printf "\n\t-D ==> human friendly Device Tree Blob 'name'" + printf "\n\t-n ==> fdt unit-address 'address'" printf "\n\t-d ==> include Device Tree Blob 'dtb'" printf "\n\t-o ==> create output file 'its_file'\n" exit 1 } -while getopts ":A:a:c:C:D:d:e:k:o:v:" OPTION +FDTNUM=1 + +while getopts ":A:a:c:C:D:d:e:k:n:o:v:" OPTION do case $OPTION in A ) ARCH=$OPTARG;; @@ -42,6 +45,7 @@ do d ) DTB=$OPTARG;; e ) ENTRY_ADDR=$OPTARG;; k ) KERNEL=$OPTARG;; + n ) FDTNUM=$OPTARG;; o ) OUTPUT=$OPTARG;; v ) VERSION=$OPTARG;; * ) echo "Invalid option passed to '$0' (options:$*)" @@ -61,7 +65,7 @@ ARCH_UPPER=$(echo "$ARCH" | tr '[:lower:]' '[:upper:]') # Conditionally create fdt information if [ -n "${DTB}" ]; then FDT_NODE=" - fdt@1 { + fdt@$FDTNUM { description = \"${ARCH_UPPER} OpenWrt ${DEVICE} device tree blob\"; data = /incbin/(\"${DTB}\"); type = \"flat_dt\"; @@ -75,7 +79,7 @@ if [ -n "${DTB}" ]; then }; }; " - FDT_PROP="fdt = \"fdt@1\";" + FDT_PROP="fdt = \"fdt@$FDTNUM\";" fi # Create a default, fully populated DTS file From patchwork Sat Sep 5 22:50:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 1358232 X-Patchwork-Delegate: chunkeey@googlemail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=VcJLBq/Q; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=bbTpR5+V; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BkVDL5NyLz9sRK for ; Sun, 6 Sep 2020 08:52:18 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=d67UldD4ib/rAvUixb8/X/DmXMQm1mHbUY4HpsDWdL8=; b=VcJLBq/QoZIcpDn6zvhfTZmVD 0wbnormSow6/ZDMabhNUN2ap+uPv9s/3BzmzFrEFznKYruJLuTnopdKjXbTu2TsAXDWugMTaXL8uK EVZxVHqUEohreuM/c/TBU7bj9ovmPCMV0zqWmVzIf7Ulq8yfdcMgTZOM5tXCaKe+b4dtDUc8aSiZW 5rrT5H0kWHwIPlmkYF5OKsTYe9AX9BnLhv6QiKpR7hjSaqvIk+ktSw1bkMPQd5IZPm8iSLPyvrri2 Er9msXRy4lyujdRZZ1WZP12NGXMO8QhPnnCbcmDpQTO0ZXR8pD/rkH/d3dZMmGpzvE702J3g8gTMD 9UxBpDBqA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kEh1C-0000rY-Ec; Sat, 05 Sep 2020 22:50:46 +0000 Received: from mail-ed1-x542.google.com ([2a00:1450:4864:20::542]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kEh1A-0000qj-Ih for openwrt-devel@lists.openwrt.org; Sat, 05 Sep 2020 22:50:45 +0000 Received: by mail-ed1-x542.google.com with SMTP id a12so9219884eds.13 for ; Sat, 05 Sep 2020 15:50:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vVK4zUYfaf/JPHjMF7W6zCJC6Tg8/fi7QZCkW+MgU04=; b=bbTpR5+VNcxvsIQKxhiRUvrMOQpOY5C2Dkz21IrI5Pd7p1BQtcZMWJQfil+a50tHVg DvpXxIYu/nb9VZUVTBfs8crm+VHwAIbPYVSX5WW6o/PM+1fGG/8djcIttgtmsWlCXkEv HXtlSgkfmq4l0+ku+Re2lWGdARl/h4+IoiVhJ2NW/97THXcFOYc6ABi5CwjsiElCwiJG K3bdzz6Dc3uI8pPs3jyddR247j6sDrNbnAcUcpXRhBOWSn7NouzmryorN5KpBVyVQCnz pkfdE7yK37tToJOh63E1syAfRinuX2VBK/yRXke1AGsAZThl6VVvgvi3yXCx01Tv93Bs plbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vVK4zUYfaf/JPHjMF7W6zCJC6Tg8/fi7QZCkW+MgU04=; b=WPiAnV51QNDfuB/kJHOVL3msldHzJWOEZah2fD1i8k74rl1obecYSTK/RWiWJHJz/2 VlKWmlZX7jIPVbtr75SDH9SMMI9JbGckpSsb50LsyejYYUHnt7uv8INSaKtiMSRDPvjb kj7cg2twiStqiLqKimIWtLihSDcfr5WUMBcKXfFXu+3Ke0hIQ5Bxx9N8ShydsowiJH1Y U0vUP2rP2l5HtnPiT2kyW9iWclQwMu8Qkyj0Njyvwr5PxH2IIEIT8GJ1RtBGvegjlAWH fetmMmJuEYKZcxY05y/bK+ZARBK+GGFZeZNvoK6dacZ/EmYq6TKWQrVyRqTs4MMFG2h2 TI4A== X-Gm-Message-State: AOAM531DZgJoHoU8mtxce6DV4KhviiVH+CfBkEh5kg8V8zovygcZD4LU V00ofqAFf/8jRU3e6nq5l8QaVNke91U= X-Google-Smtp-Source: ABdhPJzbpD+SM+GK99lmlE5DjNtYdfam22/InmZp6JNygiTOJ3wKqV5ue/mImgk7wQlmVAtYm7Mmew== X-Received: by 2002:a05:6402:1016:: with SMTP id c22mr15626978edu.89.1599346243020; Sat, 05 Sep 2020 15:50:43 -0700 (PDT) Received: from debian64.daheim (pd9e292e7.dip0.t-ipconnect.de. [217.226.146.231]) by smtp.gmail.com with ESMTPSA id jo2sm10196103ejb.101.2020.09.05.15.50.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Sep 2020 15:50:42 -0700 (PDT) Received: from chuck by debian64.daheim with local (Exim 4.94) (envelope-from ) id 1kEh14-001AQQ-OG; Sun, 06 Sep 2020 00:50:38 +0200 From: Christian Lamparter To: openwrt-devel@lists.openwrt.org Subject: [PATCH v2 2/7] build: define PWM_SUPPORT arch feature flag Date: Sun, 6 Sep 2020 00:50:27 +0200 Message-Id: X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200905_185044_648787_8FC4B05B X-CRM114-Status: GOOD ( 15.10 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [chunkeey[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:542 listed in] [list.dnswl.org] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -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 -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: rafal@milecki.pl, hauke@hauke-m.de, f.fainelli@gmail.com, chrisrblake93@gmail.com, Adrian Schmutzler Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org As the PWM has its own sub-system in the Linux kernel, I think it should be handled in the same way as GPIO, RTC, PCI... This patch introduces a specific feature flag "pwm" and the "leds-pwm" kernel module as the first customer. Signed-off-by: Christian Lamparter --- package/kernel/linux/modules/leds.mk | 16 ++++++++++++++++ scripts/target-metadata.pl | 1 + target/Config.in | 3 +++ 3 files changed, 20 insertions(+) diff --git a/package/kernel/linux/modules/leds.mk b/package/kernel/linux/modules/leds.mk index c030b54b39..fe90c6b559 100644 --- a/package/kernel/linux/modules/leds.mk +++ b/package/kernel/linux/modules/leds.mk @@ -159,3 +159,19 @@ define KernelPackage/leds-pca963x/description endef $(eval $(call KernelPackage,leds-pca963x)) + + +define KernelPackage/leds-pwm + SUBMENU:=$(LEDS_MENU) + TITLE:=PWM driven LED Support + KCONFIG:=CONFIG_LEDS_PWM + DEPENDS:= @PWM_SUPPORT + FILES:=$(LINUX_DIR)/drivers/leds/leds-pwm.ko + AUTOLOAD:=$(call AutoLoad,60,leds-pwm,1) +endef + +define KernelPackage/leds-pwm/description + This option enables support for pwm driven LEDs +endef + +$(eval $(call KernelPackage,leds-pwm)) diff --git a/scripts/target-metadata.pl b/scripts/target-metadata.pl index c58f096573..bf6413d315 100755 --- a/scripts/target-metadata.pl +++ b/scripts/target-metadata.pl @@ -20,6 +20,7 @@ sub target_config_features(@) { /^usb$/ and $ret .= "\tselect USB_SUPPORT\n"; /^usbgadget$/ and $ret .= "\tselect USB_GADGET_SUPPORT\n"; /^pcmcia$/ and $ret .= "\tselect PCMCIA_SUPPORT\n"; + /^pwm$/ and $ret .= "\select PWM_SUPPORT\n"; /^rtc$/ and $ret .= "\tselect RTC_SUPPORT\n"; /^squashfs$/ and $ret .= "\tselect USES_SQUASHFS\n"; /^jffs2$/ and $ret .= "\tselect USES_JFFS2\n"; diff --git a/target/Config.in b/target/Config.in index 9fead5994f..43de4710df 100644 --- a/target/Config.in +++ b/target/Config.in @@ -29,6 +29,9 @@ config PCIE_SUPPORT config PCMCIA_SUPPORT bool +config PWM_SUPPORT + bool + config USB_SUPPORT select AUDIO_SUPPORT bool From patchwork Sat Sep 5 22:50:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 1358231 X-Patchwork-Delegate: chunkeey@googlemail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=mbAnrvDq; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=UJd9XXBX; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BkVDJ0B6Vz9sRK for ; Sun, 6 Sep 2020 08:52:16 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Gl27vNiyZT58SHU7Ez8cAZj0ON28AEXvElxVQj3k1PM=; b=mbAnrvDqlpamJSmT2XObMG/tW V36nf4nc0nr6EcF8RWh4XWvemzicCJ13fEPPFRAvbbge7PjE5CM3ZcJ9Ex4DnzMJ1aPYvHF9ks4Fk k4Y6jnYWkIZn7KF0e4cuPbWm94kEPLUOs7eVYiE6Y3J1WwLGn+Xp3bsbpi/eGI5K6ca4EivWDhCWy S96TF8OBd3qw85pD3PEj7UuBwcXXQrCzgpIwIyslP9dOjE6do7B7evQOn/YJ6rg++aUUe74HDQy0b iGuJNRKWTEXcCqFfKp1H+neFwEtOvZeeOqLfloXj0pa6WexOkaVWnFpYAKm0F77QUjbO8BsLZWy5A RRDHQFc3Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kEh1L-0000v4-2n; Sat, 05 Sep 2020 22:50:55 +0000 Received: from mail-ej1-x643.google.com ([2a00:1450:4864:20::643]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kEh1C-0000rV-M9 for openwrt-devel@lists.openwrt.org; Sat, 05 Sep 2020 22:50:48 +0000 Received: by mail-ej1-x643.google.com with SMTP id i26so13106034ejb.12 for ; Sat, 05 Sep 2020 15:50:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HL6JSJX6Zlljl/KWDJaDyRjzv5TI711yCPK6ZmrQkv0=; b=UJd9XXBX9PzBxfDkLq0smS2cqnstz0j+wmKoFuqLKAJywTYi/vn+EusmSWfVVdZ0h5 YCLEGb3n079KjNEq6AVElVbAaJcn+To3wml/6T8Ah9raQ7DSNyBaXVEWH6bDEj2/9vB3 2rfo4U+u0xS2IIRh5Fs9Yx4VOuUmMtvpLOXEY/Tm38OzLr2jAJY4HXJgNyLhBkgskgZG AWcZRRrjJOir4Q4jl85HRHgpvx5EnCcLRLD/x/yeUvUoluPudvd7iyVgxh5dcETnabir 1P7cloNGuO2mY4K7llWTk+RNK8BdX3hdikrXb8BiIE95mww2dzimd/yf6Y7qmv5anKJY jhIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HL6JSJX6Zlljl/KWDJaDyRjzv5TI711yCPK6ZmrQkv0=; b=B6RFHfiyCd7lspow3JcpQm6Hxd0tQqsYbv4lU03ZpydvF5+hBES6KoL24dh5DpuLQS SdFPO0Od4mEMtUvWQiBO/hW5SaxeScGAc+qHytB86ezX3gHyWI2LITOsEB/KRhMJp+Aa qYlUoq6XqG//UJ4hxgr1cIjeDxWTZcQEZAmPEYq3IKHgGc/GJdK8VfQJlyW4tovCEfPv Ob5Bx4/6OLy1q8xoz+goxTAUpNmTDEfvCIVEnDZLhTv5jL2G/Mt93xKmC4SbE37GZsVp NUKFCYHfIH+EA4GZAHVHfPjczDIdZP0GvYSISi0aEaMngnYKCmiRMuKq65RYHz6GyGIu 6VsA== X-Gm-Message-State: AOAM532iTYVEeaPRm1Ti5RgEDDPwA1YnyHqydLfdueOT8UeXfVx9CtUW O1+QGTutR0EsET2uPjge/iQuucuhvOM= X-Google-Smtp-Source: ABdhPJyoD4rwXBf9hEgGkZm9D8ysVxGukMLa2Oq7rbh2uxzO7LoGAuQ8Fs1VKqDKAtbHhTmx/Vuaiw== X-Received: by 2002:a17:906:2d42:: with SMTP id e2mr13891444eji.10.1599346245218; Sat, 05 Sep 2020 15:50:45 -0700 (PDT) Received: from debian64.daheim (pd9e292e7.dip0.t-ipconnect.de. [217.226.146.231]) by smtp.gmail.com with ESMTPSA id w14sm10228812ejn.36.2020.09.05.15.50.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Sep 2020 15:50:44 -0700 (PDT) Received: from chuck by debian64.daheim with local (Exim 4.94) (envelope-from ) id 1kEh14-001AQS-Pg; Sun, 06 Sep 2020 00:50:38 +0200 From: Christian Lamparter To: openwrt-devel@lists.openwrt.org Subject: [PATCH v2 3/7] bcm53xx: enable PWM for bcm53xx Date: Sun, 6 Sep 2020 00:50:28 +0200 Message-Id: X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200905_185046_773803_40BDBE97 X-CRM114-Status: GOOD ( 17.99 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:643 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [chunkeey[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -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 -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: rafal@milecki.pl, hauke@hauke-m.de, f.fainelli@gmail.com, chrisrblake93@gmail.com, Adrian Schmutzler Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The Meraki MR32 (BCM53016A1) uses the pwm to drive the tricolor LED. The driver has been available in upstream for a long time. Only the Device-Tree definition was missing, but it has been queued recently. Signed-off-by: Christian Lamparter --- target/linux/bcm53xx/Makefile | 2 +- target/linux/bcm53xx/config-5.4 | 3 ++ ...M-dts-BCM5301X-Specify-PWM-in-the-DT.patch | 45 +++++++++++++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 target/linux/bcm53xx/patches-5.4/033-v5.10-ARM-dts-BCM5301X-Specify-PWM-in-the-DT.patch diff --git a/target/linux/bcm53xx/Makefile b/target/linux/bcm53xx/Makefile index 35f8513801..f980f8a8fb 100644 --- a/target/linux/bcm53xx/Makefile +++ b/target/linux/bcm53xx/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk ARCH:=arm BOARD:=bcm53xx BOARDNAME:=Broadcom BCM47xx/53xx (ARM) -FEATURES:=squashfs nand usb pci pcie gpio +FEATURES:=squashfs nand usb pci pcie gpio pwm CPU_TYPE:=cortex-a9 SUBTARGETS:=generic diff --git a/target/linux/bcm53xx/config-5.4 b/target/linux/bcm53xx/config-5.4 index eacfcb620e..8c7cdf45d5 100644 --- a/target/linux/bcm53xx/config-5.4 +++ b/target/linux/bcm53xx/config-5.4 @@ -308,6 +308,9 @@ CONFIG_PINCTRL=y # CONFIG_PINCTRL_IPROC_GPIO is not set CONFIG_PINCTRL_NS=y # CONFIG_PINCTRL_NS2_MUX is not set +CONFIG_PWM=y +CONFIG_PWM_BCM_IPROC=y +CONFIG_PWM_SYSFS=y CONFIG_RATIONAL=y CONFIG_RCU_NEED_SEGCBLIST=y CONFIG_RCU_STALL_COMMON=y diff --git a/target/linux/bcm53xx/patches-5.4/033-v5.10-ARM-dts-BCM5301X-Specify-PWM-in-the-DT.patch b/target/linux/bcm53xx/patches-5.4/033-v5.10-ARM-dts-BCM5301X-Specify-PWM-in-the-DT.patch new file mode 100644 index 0000000000..d7b871bde4 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.4/033-v5.10-ARM-dts-BCM5301X-Specify-PWM-in-the-DT.patch @@ -0,0 +1,45 @@ +From 9bd34833986d4af180c6d75a326edb933a17de31 Mon Sep 17 00:00:00 2001 +From: Christian Lamparter +Date: Wed, 6 Jun 2018 21:01:59 +0200 +Subject: [PATCH] ARM: dts: BCM5301X: Specify PWM in the DT + +The BCM53016 in the Meraki MR32 uses the on-chip PWM +controller to drive a tri-color RGB LED. Since I plan +to use the PWM, I made a label for the pwm's pinmux +node. This way, it can be easily referenced. + +Signed-off-by: Christian Lamparter +Acked-by: Scott Branden + +--- a/arch/arm/boot/dts/bcm5301x.dtsi ++++ b/arch/arm/boot/dts/bcm5301x.dtsi +@@ -350,6 +350,14 @@ + }; + }; + ++ pwm: pwm@18002000 { ++ compatible = "brcm,iproc-pwm"; ++ reg = <0x18002000 0x28>; ++ clocks = <&osc>; ++ #pwm-cells = <3>; ++ status = "disabled"; ++ }; ++ + mdio: mdio@18003000 { + compatible = "brcm,iproc-mdio"; + reg = <0x18003000 0x8>; +@@ -417,12 +425,12 @@ + function = "spi"; + }; + +- i2c { ++ pinmux_i2c: i2c { + groups = "i2c_grp"; + function = "i2c"; + }; + +- pwm { ++ pinmux_pwm: pwm { + groups = "pwm0_grp", "pwm1_grp", + "pwm2_grp", "pwm3_grp"; + function = "pwm"; From patchwork Sat Sep 5 22:50:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 1358236 X-Patchwork-Delegate: chunkeey@googlemail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=OgVu84l+; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=GBSTgiqD; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BkVDv4kPkz9sTd for ; Sun, 6 Sep 2020 08:52:47 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=GevuJ91TqG3Zwrs7lhPm3LotNL6RCg2+avHFllL0j9U=; b=OgVu84l+V1CdIE3xKnwPO3pXr i6YVEXI5ZtLdmIjZWs/GTexK/HzFr/uNaIlsitb52NjU00NOkP4KoEeDrAV9NdK+S/oHb8txZ7I++ rWZJTYEDajLPv5vZZmAVt6NyK8DVslQPtuOfzV4hR8BZ3PFbZ3MUA1/8FNOHYCE4sPEHHtkk6xfLH cW/7ywppxQlN9sXR8UuS0e4oX+mwj6i4mLBpSQDNO43eRp48ucLMTi5LYcIA5lEhD/iOAZ3my4uKB ZR31HamxrqTqSviXXBoDiAq13XttB+yHU55C7AgUS/Vk4TNE+wxx6aeAE4CG3kplK4w78RKkU7AAN TNlrJrKzw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kEh1I-0000uR-TD; Sat, 05 Sep 2020 22:50:52 +0000 Received: from mail-ed1-x542.google.com ([2a00:1450:4864:20::542]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kEh1C-0000rZ-KE for openwrt-devel@lists.openwrt.org; Sat, 05 Sep 2020 22:50:48 +0000 Received: by mail-ed1-x542.google.com with SMTP id l63so9243520edl.9 for ; Sat, 05 Sep 2020 15:50:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RffDWVbJPTLVEZNXc4WKdtd9m/XU7tOxKjkS0crGyT8=; b=GBSTgiqDFVs6k2olQ2bY6RlCtQTSG4NAMm9CdtGygU0qghi6NnRL2tsLIRKHCItHiT S/rxfNUyWHAWkdripF3cFlDSwgzgSZAGEF3YanHJKX8qUbfPf/PzHeicmTu7Qh8UfL5i kKICW8/IlhYNfIBt+T1VX7DDTXWXCnyIwmKtKige+HLIKe7Ar5BqRx9vWQHfyb0UaAZ2 4ETNSPI36uabASSS8rn81WQ9UBP1zXm4q3Cjh7YIRw0xDZZwUMSQ8p+qVXP1s1/TpneK eGhE7MqZIZRSeREkqxuuA1rrB+Fj/7do2Z6M5nq1S2Ek+7kjj8ZU5n5H3D22SUSKcelv beeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RffDWVbJPTLVEZNXc4WKdtd9m/XU7tOxKjkS0crGyT8=; b=LdKb00gq5SX79AY5OBL1f2iWXiXoGrp/Q8CoSt62yUltwHdwpgfMWDRduv5RUrb+5y 35NoRliQQSg91o4VdB4XYW1J6eVlZmEwJwUl2zpW+hnwBCvVuHALz/ZDFjbvqFS8XM0R w4qNVggk5+L3RJOYTgbhD1MocYnP0N4i9JXjYa+rM4ixm83VHXE7J3i8mpGcvN7TTM86 2lPPxODXH3jTRbW52WlbkwLfp7MlE10ZxWjGO4HEsunqDoDXSBV1pFcM1RKPvyl8DNpy 6vgtr5gp4ULsX2o36GC5gpF2Px901epTt6JzGi+NociPDGnxIHrR/8dai3Ji6mNUvA5O nZGg== X-Gm-Message-State: AOAM533glmffNdj/It8a9LJZelXnc0QBK28v6VIAhtzaCg1KUevwNkav zC1+0kHRzKkG4DXQxaq3uoRz9hAyG/M= X-Google-Smtp-Source: ABdhPJyPicb+BJ1ZB3X0v+8HZ5biSscJfOxeWRZjMU2+EG/vJvCfY3U5VoNZ7v7Bc8Fab9QqRPHFWQ== X-Received: by 2002:aa7:c38a:: with SMTP id k10mr15548080edq.325.1599346245473; Sat, 05 Sep 2020 15:50:45 -0700 (PDT) Received: from debian64.daheim (pd9e292e7.dip0.t-ipconnect.de. [217.226.146.231]) by smtp.gmail.com with ESMTPSA id n14sm10162973edb.52.2020.09.05.15.50.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Sep 2020 15:50:44 -0700 (PDT) Received: from chuck by debian64.daheim with local (Exim 4.94) (envelope-from ) id 1kEh15-001AQU-SB; Sun, 06 Sep 2020 00:50:39 +0200 From: Christian Lamparter To: openwrt-devel@lists.openwrt.org Subject: [PATCH v2 4/7] bcm53xx: backport uart2 and pcie2 device-nodes Date: Sun, 6 Sep 2020 00:50:29 +0200 Message-Id: X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200905_185046_722726_A1C00746 X-CRM114-Status: GOOD ( 16.15 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:542 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [chunkeey[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -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 -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: rafal@milecki.pl, hauke@hauke-m.de, f.fainelli@gmail.com, chrisrblake93@gmail.com, Adrian Schmutzler Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org These have made their way into -next. Signed-off-by: Christian Lamparter --- ...dts-BCM5301X-Specify-uart2-in-the-DT.patch | 37 +++++++++++++++++++ ...dts-BCM5301X-Specify-pcie2-in-the-DT.patch | 33 +++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 target/linux/bcm53xx/patches-5.4/034-v5.10-ARM-dts-BCM5301X-Specify-uart2-in-the-DT.patch create mode 100644 target/linux/bcm53xx/patches-5.4/035-v5.10-ARM-dts-BCM5301X-Specify-pcie2-in-the-DT.patch diff --git a/target/linux/bcm53xx/patches-5.4/034-v5.10-ARM-dts-BCM5301X-Specify-uart2-in-the-DT.patch b/target/linux/bcm53xx/patches-5.4/034-v5.10-ARM-dts-BCM5301X-Specify-uart2-in-the-DT.patch new file mode 100644 index 0000000000..1fec981146 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.4/034-v5.10-ARM-dts-BCM5301X-Specify-uart2-in-the-DT.patch @@ -0,0 +1,37 @@ +From 95c1f0076303922ca401851b6605dc17eb0eb732 Mon Sep 17 00:00:00 2001 +From: Christian Lamparter +Date: Wed, 6 Jun 2018 21:57:15 +0200 +Subject: [PATCH 1/4] ARM: dts: BCM5301X: Specify uart2 in the DT + +The BCM53016 in the Meraki MR32 utilizes the third "uart2" +to connect to a on-board Bluetooth-LE 4.0 BCM20732 chip. + +Signed-off-by: Christian Lamparter +Reviewed-by: Scott Branden +--- + arch/arm/boot/dts/bcm5301x.dtsi | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi +index 45cd8c7411dd..eb1290fed235 100644 +--- a/arch/arm/boot/dts/bcm5301x.dtsi ++++ b/arch/arm/boot/dts/bcm5301x.dtsi +@@ -392,6 +392,15 @@ usb3_dmp: syscon@18105000 { + reg = <0x18105000 0x1000>; + }; + ++ uart2: serial@18008000 { ++ compatible = "ns16550a"; ++ reg = <0x18008000 0x20>; ++ clocks = <&iprocslow>; ++ interrupts = ; ++ reg-shift = <2>; ++ status = "disabled"; ++ }; ++ + i2c0: i2c@18009000 { + compatible = "brcm,iproc-i2c"; + reg = <0x18009000 0x50>; +-- +2.28.0 + diff --git a/target/linux/bcm53xx/patches-5.4/035-v5.10-ARM-dts-BCM5301X-Specify-pcie2-in-the-DT.patch b/target/linux/bcm53xx/patches-5.4/035-v5.10-ARM-dts-BCM5301X-Specify-pcie2-in-the-DT.patch new file mode 100644 index 0000000000..d4ec31c0ae --- /dev/null +++ b/target/linux/bcm53xx/patches-5.4/035-v5.10-ARM-dts-BCM5301X-Specify-pcie2-in-the-DT.patch @@ -0,0 +1,33 @@ +From 5abb709b027a6234c135843764bad383be264162 Mon Sep 17 00:00:00 2001 +From: Christian Lamparter +Date: Sun, 10 Jun 2018 17:17:53 +0200 +Subject: [PATCH 2/4] ARM: dts: BCM5301X: Specify pcie2 in the DT + +The SoC supports three pcie ports. Currently, only +pcie0 and pcie1 are enabled. This patch adds the +pcie2 port as well. + +Signed-off-by: Christian Lamparter +Reviewed-by: Scott Branden +--- + arch/arm/boot/dts/bcm5301x.dtsi | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi +index eb1290fed235..9d9e8fe3f6ae 100644 +--- a/arch/arm/boot/dts/bcm5301x.dtsi ++++ b/arch/arm/boot/dts/bcm5301x.dtsi +@@ -252,6 +252,10 @@ pcie1: pcie@13000 { + reg = <0x00013000 0x1000>; + }; + ++ pcie2: pcie@14000 { ++ reg = <0x00014000 0x1000>; ++ }; ++ + usb2: usb2@21000 { + reg = <0x00021000 0x1000>; + +-- +2.28.0 + From patchwork Sat Sep 5 22:50:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 1358233 X-Patchwork-Delegate: chunkeey@googlemail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=0w+z4mSn; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=qUsHeKwI; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BkVDX2H7fz9sRK for ; Sun, 6 Sep 2020 08:52:27 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=DCEKaArP6EU4ah7lFdXYk3sTnWPdK/NayEpa+dRfTA8=; b=0w+z4mSnTJ8yGYlyNJjQyitcu 5t7qzezyDZ+YzTZoSFnqgI0mYMAPoNw5zRYDlBH/cPDyQPxqZXLvvDxrGWeKcayv6tIr/mOU4C9fn JQl3q1Om4lHiXPUYbRQIFecUWIr58QsnKxcCnLcwYC3wCbDre1cO8FvWylBW0y4mh+hmpkSQDlGTK +4xfRlmM69ER+bviH7me23NkZsKWQ5KDZRGMPXinpyDDXzi+wK6oHFmKWXT+L3Q1LKKDuOZiALTq7 oRIYnrr62u47iW7j6vygRtUfO/Z2b5ZJFgnLl8ssGIj69G4Tr8rhTGUs86oucJvzeYy0xSiVbEGXe Dj1FXg8Ag==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kEh1N-0000vi-Cw; Sat, 05 Sep 2020 22:50:57 +0000 Received: from mail-ej1-x644.google.com ([2a00:1450:4864:20::644]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kEh1D-0000rm-CE for openwrt-devel@lists.openwrt.org; Sat, 05 Sep 2020 22:50:49 +0000 Received: by mail-ej1-x644.google.com with SMTP id i22so13143230eja.5 for ; Sat, 05 Sep 2020 15:50:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+Hukl9HFPkKLC0i2h2zmGdd2GyUb6Lx7PMeWnysH+cg=; b=qUsHeKwIj/9JkW5LmLvmOBKeg/UOERhUxboWoLZlXvYBVXPiTFOy3yYSaAEm9bFQ2f OZhms1ad7flI3clQ5bOWiC2BTaJQBs9REURIfp9/1ty+GXN6yKUDk75kFmlyNtGaB7on jgoaH8aDCnKVS75OcVmuKy6eo5vmQAqNlC5mrQO/T2Bo2lORdobgbU6Zsksd2LONewqk +Ry9Nz3vQfMHeQDNU0Pqap5NLZ2Blts7pDbs1hxhqi2HERmhoaR3vNgiUfHVIfRO/rfH +DTBSr6roo8ifmvQDGLYXu+ncMLz87Zh21IX16f0pTz3Z8ND16zdv4vu5FFTes0/sjY3 2AKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+Hukl9HFPkKLC0i2h2zmGdd2GyUb6Lx7PMeWnysH+cg=; b=gdK2RnqJz0e4u7TIdQ4PRq6ifCHFH/xbFh+kH7kaF4QSmc8zv5T8h9PsA3p8lP6H0e XnXOBnlvn9BnVQ53WZbxYIad4a4B1M/6ScOB2WI4kVVi5kaUYa1hmaG3brM2MdircPU/ iIh5jJufwENIFAuQ5UKmeE450cBNlPG4/5ApYuxtHLizyYIWXaCZh0jPCvr0FIuSqsVL 2Be0lFFUjU6URzuDiGrqXsGnOfR8X8WDiWqm3BaBMsfUz+ntXPF4jfBzGgwSd8DDcKRm mEfXXQSalp9c1xpaHBoeWOYCo98to6MPTGRVuOp24hvfU6EKZGn5czOWXyatwCw9UYjM or2w== X-Gm-Message-State: AOAM531K0Gf3KVJ4sajEHP+ZiL40y34h7xCwEOCOF5QNm8jKDf0heoUw ZHK2l7xHSVyqB0u8rBaDEMnkvHk86iU= X-Google-Smtp-Source: ABdhPJwWXNff1Y0OuTKKapMp1jNsYLxTn/Mk/oRBbUcFX++AOjqBXIcRoKTjdq9ZE9v+Mm4SrtsYHA== X-Received: by 2002:a17:906:37c1:: with SMTP id o1mr14147067ejc.279.1599346246012; Sat, 05 Sep 2020 15:50:46 -0700 (PDT) Received: from debian64.daheim (pd9e292e7.dip0.t-ipconnect.de. [217.226.146.231]) by smtp.gmail.com with ESMTPSA id y14sm10163246eje.10.2020.09.05.15.50.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Sep 2020 15:50:44 -0700 (PDT) Received: from chuck by debian64.daheim with local (Exim 4.94) (envelope-from ) id 1kEh17-001AQW-U4; Sun, 06 Sep 2020 00:50:41 +0200 From: Christian Lamparter To: openwrt-devel@lists.openwrt.org Subject: [PATCH v2 5/7] kernel: add default for new config symbols Date: Sun, 6 Sep 2020 00:50:30 +0200 Message-Id: <1e220a910a1a9b63fd643116b760094aadd75167.1599346205.git.chunkeey@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200905_185047_469042_C7F574E5 X-CRM114-Status: GOOD ( 12.77 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:644 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [chunkeey[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -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 -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: rafal@milecki.pl, hauke@hauke-m.de, f.fainelli@gmail.com, chrisrblake93@gmail.com, Adrian Schmutzler Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Provide disabled defaults for I2C_SLAVE_EEPROM and IPMB_DEVICE_INTERFACE. Signed-off-by: Christian Lamparter --- target/linux/generic/config-5.4 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4 index d543819aad..2f5ab98d26 100644 --- a/target/linux/generic/config-5.4 +++ b/target/linux/generic/config-5.4 @@ -2134,6 +2134,7 @@ CONFIG_HW_RANDOM_TPM=y # CONFIG_I2C_SIS630 is not set # CONFIG_I2C_SIS96X is not set # CONFIG_I2C_SLAVE is not set +# CONFIG_I2C_SLAVE_EEPROM is not set # CONFIG_I2C_SMBUS is not set # CONFIG_I2C_STUB is not set # CONFIG_I2C_TAOS_EVM is not set @@ -2394,6 +2395,7 @@ CONFIG_IO_STRICT_DEVMEM=y # CONFIG_IP6_NF_TARGET_SYNPROXY is not set # CONFIG_IPACK_BUS is not set # CONFIG_IPC_NS is not set +# CONFIG_IPMB_DEVICE_INTERFACE is not set # CONFIG_IPMI_HANDLER is not set # CONFIG_IPV6 is not set # CONFIG_IPV6_FOU is not set From patchwork Sat Sep 5 22:50:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 1358230 X-Patchwork-Delegate: chunkeey@googlemail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=3RRfumsj; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=hTIzemdt; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BkVDC1bJbz9sRK for ; Sun, 6 Sep 2020 08:52:11 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YEqxnq9bJfUPbIy7hWvBMwkTTj+K4ms9OsIl8xRzJ9k=; b=3RRfumsjtXMhhO6d5x64dgs1t Fkk32ot5B2R15X+LIgvB23495f1FqT2RoEdkzUF9RXYeRfIswU+je0liDyMiC0hKlX7z8VCwexE9/ AlvHebpkHCmSmLs7j3qLwVV7vRV3ts3eymICyMmFDiWhAjlnYhrLjF4Zv5lYoE6XGpy50/wgJ+rxa LkcLhX3hgm28pR66iIcRJlr4+P+AVw9KLrWnvpgQ+iSUWLpyh8KidUK93/puUWl9TIYI9pr1kpdVp 5LJoftgu0mmxruC//zSmTrJ/Os4UjWnTjSMdnnxSvCAZrTNs+xcqVvPKthbvuKOCUpH9tB/Q7QnT+ Mb9zoIdqQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kEh1P-0000wG-Rv; Sat, 05 Sep 2020 22:50:59 +0000 Received: from mail-ej1-x644.google.com ([2a00:1450:4864:20::644]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kEh1D-0000rj-CF for openwrt-devel@lists.openwrt.org; Sat, 05 Sep 2020 22:50:49 +0000 Received: by mail-ej1-x644.google.com with SMTP id p9so13128807ejf.6 for ; Sat, 05 Sep 2020 15:50:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Un6zZvUcJRIokZobWPPQSQbOzvlzbF9B6F0exynr2Eo=; b=hTIzemdtdXt0a+XUSNz25v+jNe5v9LZSEfU7i6FHjoCSj+nko8FZUADRofrxLo43T5 dxIAXkpfOvKRdTy0+lUcJ8bMXiI7f6RYi08d3MSw6yYYI5Q7nTCufBnM9kdp13c69CHI K39oh2DXnscqWOHcmRtXGVzZK+bi++QCi97/0c4r4pNniq9jo1o6hbgR47sVtkzYJ6Kg gVhCMKQocWH1xpykiXbQq96lSIUdyTPp0jC3If/MbGaKoQotIJaHtm/oVicjO6nG9fsS Bzm6uhzBI9IEguLIYEtsQ0p/W9ufqG76ALuL4Hu/iejj3rcNDX5oqhtvSOKrXqwAfFWi 1qiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Un6zZvUcJRIokZobWPPQSQbOzvlzbF9B6F0exynr2Eo=; b=cmrTDd145W+c+ZvVJj9S5EUTkYK2rcGxHn6mUnMw1qVEKqizTVsMokSFQXCfxFOl75 PeG3Y4HFWm+iCwdr0I1BjyDymvJ+yRakmHPp4+sA7bcLtB0JMAhOFKSSw/ACqd2QbPi/ E27XvLtKkywfBLRFm+IZKRZPchtZjJ3/WmVbI3n40euD6MwQs9mUoY67zLBAedSNmqD7 pP5KJz4iv0pdC2I3IGKH6/ld9M2JwaWwJzGdTMat5lq7hIeXwEwFfBTY2nDxedLEj3+6 /8MX9F+EdwLDOor8CJ5g1S0oBEKND6UTSl+eoGwrHL8FnBl2IL7klkf761pTcFcTpDes TGMg== X-Gm-Message-State: AOAM5312zV8MUx/Tg6KCWjFjynIpNmWIkCGcPCMM1M6rxKXjvRKCN/WA R8+8Ux5L99eckRJ/F4YBVC9d/6ucEGc= X-Google-Smtp-Source: ABdhPJwaMBpp5czxbzP0K0eeNjJswgMTU4oVOT147lsAKCiP/c8SJrNTGgNl+IAhI+RG2S8hL/k+Eg== X-Received: by 2002:a17:906:bb06:: with SMTP id jz6mr13894044ejb.275.1599346245721; Sat, 05 Sep 2020 15:50:45 -0700 (PDT) Received: from debian64.daheim (pd9e292e7.dip0.t-ipconnect.de. [217.226.146.231]) by smtp.gmail.com with ESMTPSA id n20sm10411207ejs.14.2020.09.05.15.50.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Sep 2020 15:50:44 -0700 (PDT) Received: from chuck by debian64.daheim with local (Exim 4.94) (envelope-from ) id 1kEh1A-001AQc-9T; Sun, 06 Sep 2020 00:50:44 +0200 From: Christian Lamparter To: openwrt-devel@lists.openwrt.org Subject: [PATCH v2 6/7] kernel: package bcm53xx i2c module Date: Sun, 6 Sep 2020 00:50:31 +0200 Message-Id: <33189a16492ead50ec5938124ea0c8556a5ab930.1599346205.git.chunkeey@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <1e220a910a1a9b63fd643116b760094aadd75167.1599346205.git.chunkeey@gmail.com> References: <1e220a910a1a9b63fd643116b760094aadd75167.1599346205.git.chunkeey@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200905_185047_464431_1DA9D8BB X-CRM114-Status: GOOD ( 10.66 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:644 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [chunkeey[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -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 -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: rafal@milecki.pl, hauke@hauke-m.de, f.fainelli@gmail.com, chrisrblake93@gmail.com, Adrian Schmutzler Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The BCM5301x SoCs do have i2c. Since this is only being used by the Meraki MR32, this will be packaged as a module. Signed-off-by: Christian Lamparter --- package/kernel/linux/modules/i2c.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/package/kernel/linux/modules/i2c.mk b/package/kernel/linux/modules/i2c.mk index ca6463c81b..1c8b1b844e 100644 --- a/package/kernel/linux/modules/i2c.mk +++ b/package/kernel/linux/modules/i2c.mk @@ -259,3 +259,17 @@ endef $(eval $(call KernelPackage,i2c-tiny-usb)) +I2C_BCM_IPROC_MODULES:= \ + CONFIG_I2C_BCM_IPROC:drivers/i2c/busses/i2c-bcm-iproc + +define KernelPackage/i2c-bcm-iproc + $(call i2c_defaults,$(I2C_BCM_IPROC_MODULES),59) + TITLE:=Broadcom iProc I2C controller + DEPENDS:=@TARGET_bcm53xx +kmod-i2c-core +endef + +define KernelPackage/i2c-bcm-iproc/description + Kernel module for the Broadcom iProc I2C controller. +endef + +$(eval $(call KernelPackage,i2c-bcm-iproc)) From patchwork Sat Sep 5 22:50:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 1358234 X-Patchwork-Delegate: chunkeey@googlemail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=AagDxuqN; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=bGoLRl7Q; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BkVDY49B2z9sRK for ; Sun, 6 Sep 2020 08:52:29 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vOl5Pww7sogwRVNcJL0MVlJKoVb4KF0M2zB3Hbfrxtg=; b=AagDxuqNw5muQ8sJo/Lu3WZCU fWYt8wlUZLQQGfZX4zW3xiJSm9pH+PpgYi8mCsLxMTsLLgc4wsjFlMidUdKSXHEd52i3sy2eOpuWH TNpTehtS6bNxIsn1cN7kR4jBXPQbzCt0bgjkJxFuF3zy7w3gm36OgOG9frRYVTA/kLsyiW5+bCPMP zWiLQ0Vhn94QYpKknqLNcw6qMuk+ZZqzB/EIGoni4Yv0nw/cOAyWTT1ZW0NHvgM4wvVlLg6BoRBqd RYfzdHenqzViM2BvJ9oFJ07wufbA+NjQJle3wqiFOeRo7aqYG7FMZ5v/0bGJdjHEBloNO5mpMswGO GDP9d9PRA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kEh1T-0000xi-5n; Sat, 05 Sep 2020 22:51:03 +0000 Received: from mail-ed1-x542.google.com ([2a00:1450:4864:20::542]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kEh1D-0000sM-Uv for openwrt-devel@lists.openwrt.org; Sat, 05 Sep 2020 22:50:51 +0000 Received: by mail-ed1-x542.google.com with SMTP id t16so4470523edw.7 for ; Sat, 05 Sep 2020 15:50:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CX3qgmIrfSRJxk39MRmgcMmCn5u4qtzA8Z5ehvW0q+k=; b=bGoLRl7QYxNQdTIBk+gnGOsVSDXqGPm4/hv9cWCSCMI4SZNETeUAOOiZSmhzHm4YoR niNOCSGr+CVsshpQXkHytbtM+jKx5ycYmqDqEMXCU6T1Bp2mvCp8zwetyfYwLLh/7QBb qb/v0f9F515lYkSetE62dBIqeSoukAgE/aqdRT/ycoynPGP4k1KJvIrl1WDJXvcoXRWo Gad65A2k0Ces/7gWQwark54sLcmK0CEQM0jc6090i0Sr8fTr3Zu/SU9Mq8mxFMxPxVX7 7E1xppL8EPhZSdI0prgjj/HLZS5RlR8jMeP9Owg55CU38weVi000r2jcnYUQZQ+YR038 tSOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CX3qgmIrfSRJxk39MRmgcMmCn5u4qtzA8Z5ehvW0q+k=; b=e8Sm6VPe5a00H6+hKg9iIpGuWHl8KeVynFRQQumjTBqqT1RZO70GObzr0RUfVHQDUf /Ci/fZqedEMwqsSgd590qxGsjITArvFW7yvNggUQzIU5GyPYsKjn8dWDQVx4ild20oMs Cyo8KGKUgq2CAj66y0j/ZX2ykQzDTcduoRzpkB7w8kSPQ7QLFRqIABQ1KDMEVRnjP4kc xFFnT3Mn0mFhkd/BK/JZ6C420blAeKaSs2yPgXoA/9iNbMA3dcsfb5+qyegWRYuZozM+ r3s9kEUZUcGv1zUYqwgn+FAXrz5iX8v0qjaH/2ajRzgL3l3C9ZsuyK3/DaYY7UvuBbYl Km3Q== X-Gm-Message-State: AOAM533Cj7Y1XqPbTzD7GK1R2T2BgkAftaGl7UQFOz5CpgcxFJQA1025 lTb628be4BX1wFfmEt+YTyIn6nf2114= X-Google-Smtp-Source: ABdhPJzGDM2Z8kxpiQMAdDh+pWmsKWylYKlyuuenj4E14W/CFMVnInq05sLOSGUyl2roxH02SJVR5w== X-Received: by 2002:a50:bf08:: with SMTP id f8mr14554735edk.207.1599346246336; Sat, 05 Sep 2020 15:50:46 -0700 (PDT) Received: from debian64.daheim (pd9e292e7.dip0.t-ipconnect.de. [217.226.146.231]) by smtp.gmail.com with ESMTPSA id p17sm10007984ejw.125.2020.09.05.15.50.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Sep 2020 15:50:44 -0700 (PDT) Received: from chuck by debian64.daheim with local (Exim 4.94) (envelope-from ) id 1kEh1A-001AQf-As; Sun, 06 Sep 2020 00:50:44 +0200 From: Christian Lamparter To: openwrt-devel@lists.openwrt.org Subject: [PATCH v2 7/7] bcm53xx: add Cisco Meraki MR32 Date: Sun, 6 Sep 2020 00:50:32 +0200 Message-Id: X-Mailer: git-send-email 2.28.0 In-Reply-To: <33189a16492ead50ec5938124ea0c8556a5ab930.1599346205.git.chunkeey@gmail.com> References: <1e220a910a1a9b63fd643116b760094aadd75167.1599346205.git.chunkeey@gmail.com> <33189a16492ead50ec5938124ea0c8556a5ab930.1599346205.git.chunkeey@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200905_185048_133246_EC6179EF X-CRM114-Status: GOOD ( 35.78 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:542 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [chunkeey[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 NUMERIC_HTTP_ADDR URI: Uses a numeric IP address in URL -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -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 -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: rafal@milecki.pl, hauke@hauke-m.de, f.fainelli@gmail.com, chrisrblake93@gmail.com, Adrian Schmutzler Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This patch adds support for Cisco Meraki MR32. The unit was donated by Chris Blake. Thank you! WARNING: Only the 1x1:1 abgn Air Marshal WIPS wifi is currently supported by b43: b43-phy2: Found PHY: Analog 9, Type 4 (N), Revision 16 b43-phy2: Found Radio: Manuf 0x17F, ID 0x2057, Revision 9, Version 1 b43-phy2: Loading firmware version 784.2 (2012-08-15 21:35:19) and only as 802.11ABG! while WIFI1 and WIFI2 (both BCM4352) are not: b43-phy0: Broadcom 4352 WLAN found (core revision 42) b43-phy0 ERROR: FOUND UNSUPPORTED PHY (Analog 12, Type 11 (AC), Revision 1) Hardware Highlights: SoC: Broadcom BCM53016A1 (1 GHz, 2 cores) RAM: 128 MiB NAND: 128 MiB Spansion S34ML01G2 (~114 MiB useable) ETH: 1GBit Ethernet Port - PoE WIFI1: Broadcom BCM43520 an+ac (2x2:2 - id: 0x4352) WIFI2: Broadcom BCM43520 bgn (2x2:2 - id: 0x4352) WIFI3: Broadcom BCM43428 abgn (1x1:1 - id: 43428) BLE: Broadcom BCM20732 (ttyS1) LEDS: 1 x Programmable RGB Status LED (driven by a PWM) 1 x White LED (GPIO) 1 x Orange LED Fault Indicator (GPIO) 2 x LAN Activity / Speed LEDs (On the RJ45 Port) BUTTON: one Reset button MISC: AT24C64 8KiB EEPROM (i2c - stores Ethernet MAC + Serial#!) ina219 hardware monitor (i2c) Kensington Lock SERIAL: WARNING: The serial port needs a TTL/RS-232 3V3 level converter! The Serial setting is 115200-8-N-1. The board has a populated right angle 1x4 0.1" pinheader. The pinout is: VCC, RX, TX, GND. (Use a multimeter) Flashing needs a serial adaptor (due to the lack of a working dropbear on the original firmware). This flashing procedure for the MR32 was tested with firmware: "r23-149867:150252-aacharya". 0. Create a seperate Ethernet LAN which does not have access to the internet. Ideally use 192.168.1.2 for your PC. Make sure to reserve 192.168.1.1 it will be used later on by the OpenWrt firmware. The original Meraki firmware will likely try to setup the network via DHCP Discovery, so make sure your PC is running a DHCP-Server (i.e.: dnsmasq) '# dnsmasq -i eth# -F 192.168.1.5,192.168.1.50 Furthermore, the PC needs a supported ssh/http/ftp server in order to retrieve the initramfs + dtb file 1. Disassemble the MR32 device by removing all screws (4 screws are located under the 4 rubber feets!) and prying open the plastic covers without breaking the plastic retention clips. Once inside, remove all the screws on the outer metal shielding to get to the PCB. It's not necessary to remove the antennas! 2. Connect the serial cable to the serial header. 3. Partially reassemble the outer metal shielding to ensure that the SoC has a proper heat sink. 4. Connect the Ethernet patch cable to the device and the power cable. 5. Wait for the device to boot and enter the root shell. (rooting is not discussed in detail here please refer to Chris Blake - "pwning the meraki mr18" blog post: (The same method works with the MR32's r23-149867:150252-aacharya) Wait for the MR32 to enter the "" prompt and enter: odm serial_num read (Verify that it matches what's on the S/N Sticker on the back!) odm serial_num write Q2XX-XXXX-XXXV odm serial_num read (Verify that the S/N has changed - and the LED start to flash) now to flash the firmware: odm firmware part.safe "http://192.168.1.2/mr32-initramfs.bin" Once OpenWrt booted use sysupgrade to permanently install OpenWrt. To do this: Download the latest sysupgrade.bin file for the MR32 to the device and use sysupgrade *sysupgrade.bin to install it. WARNING: DO NOT DELETE the "storage" ubi volume! To flash later MR32 Firmwares like r25-201804051805-G885d6d78-dhow-rel requires in-circut-i2c tools to access the I2C EEPROM AT24C64 next to the SoC. The idea is pretty much the same as from Step 5 from above: Change the serial number to Q2XXXXXXXXXV (should be around 0x7c), then attach a serial cable, ethernet (but make sure the device can't reach the internet!) hit "s" (the small s!) during boot to enter the root-shell and add the following commands to the /storage/config there: serial_allow_odm true serial_access_enabled true serial_access_check false valid_config true and then hit exit to let it finish booting. Signed-off-by: Christian Lamparter --- rfc -> v2 - fixed Adrian's comments - unbroke sysupgrade on other bcm53xx --- .../bcm53xx/base-files/etc/board.d/02_network | 7 +- target/linux/bcm53xx/base-files/etc/diag.sh | 3 + .../lib/preinit/07_set_preinit_iface_bcm53xx | 14 + .../base-files/lib/upgrade/platform.sh | 43 ++- target/linux/bcm53xx/image/Makefile | 27 ++ ...-ARM-BCM5301X-Add-DT-for-Meraki-MR32.patch | 281 ++++++++++++++++++ .../331-Meraki-MR32-Status-LEDs.patch | 28 ++ 7 files changed, 400 insertions(+), 3 deletions(-) create mode 100644 target/linux/bcm53xx/base-files/lib/preinit/07_set_preinit_iface_bcm53xx create mode 100644 target/linux/bcm53xx/patches-5.4/330-ARM-BCM5301X-Add-DT-for-Meraki-MR32.patch create mode 100644 target/linux/bcm53xx/patches-5.4/331-Meraki-MR32-Status-LEDs.patch diff --git a/target/linux/bcm53xx/base-files/etc/board.d/02_network b/target/linux/bcm53xx/base-files/etc/board.d/02_network index 5752b7760d..231566cfa0 100755 --- a/target/linux/bcm53xx/base-files/etc/board.d/02_network +++ b/target/linux/bcm53xx/base-files/etc/board.d/02_network @@ -89,10 +89,15 @@ bcm53xx_setup_macs() netgear,r8500) # As vendor doesn't use eth0 its MAC may be missing. Use one from eth2. et2macaddr="$(nvram get et2macaddr)" - [ -n "$et2macaddr" ] && ucidef_set_interface_macaddr "lan" "$et2macaddr" + ;; + meraki,mr32) + # The MAC is stored on an AT24C64 eeprom and not on the nvram + et2macaddr=$(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) ;; esac + [ -n "$et2macaddr" ] && ucidef_set_interface_macaddr "lan" "$et2macaddr" + wan_macaddr="$(nvram get wan_hwaddr)" case "$board" in asus,rt-ac87u) diff --git a/target/linux/bcm53xx/base-files/etc/diag.sh b/target/linux/bcm53xx/base-files/etc/diag.sh index 1a9332327a..bf5b779aa8 100644 --- a/target/linux/bcm53xx/base-files/etc/diag.sh +++ b/target/linux/bcm53xx/base-files/etc/diag.sh @@ -18,6 +18,9 @@ get_status_led() { status_led=$(basename $status_led_file) return fi; + + # And finally, let's also try the device-Tree aliases node + status_led="$(get_dt_led status)" } set_state() { diff --git a/target/linux/bcm53xx/base-files/lib/preinit/07_set_preinit_iface_bcm53xx b/target/linux/bcm53xx/base-files/lib/preinit/07_set_preinit_iface_bcm53xx new file mode 100644 index 0000000000..9e7c4b821e --- /dev/null +++ b/target/linux/bcm53xx/base-files/lib/preinit/07_set_preinit_iface_bcm53xx @@ -0,0 +1,14 @@ +set_preinit_iface() { + . /lib/functions.sh + + case $(board_name) in + meraki,mr32) + # switch needs to be out of the vlan mode. + swconfig dev switch0 set reset 1 + swconfig dev switch0 set enable_vlan 0 + swconfig dev switch0 set apply 1 + ;; + esac +} + +boot_hook_add preinit_main set_preinit_iface diff --git a/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh b/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh index 40b2ef67be..cbb8290275 100644 --- a/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh @@ -96,7 +96,7 @@ platform_identify() { echo "unknown" } -platform_check_image() { +platform_other_check_image() { [ "$#" -gt 1 ] && return 1 local file_type=$(platform_identify "$1") @@ -227,6 +227,25 @@ platform_check_image() { return $error } +platform_check_image() { + case "$(board_name)" in + meraki,mr32) + # Ideally, REQUIRE_IMAGE_METADATA=1 would suffice + # but this would require converting all other + # devices too. + nand_do_platform_check meraki-mr32 "$1" + return $? + ;; + *) + platform_other_check_image "$1" + return $? + ;; + esac + + return 1 +} + + # $(1): image for upgrade (with possible extra header) # $(2): offset of trx in image platform_do_upgrade_nand_trx() { @@ -393,7 +412,7 @@ platform_img_from_seama() { echo -n $dir/image-entity.bin } -platform_do_upgrade() { +platform_other_do_upgrade() { local file_type=$(platform_identify "$1") local trx="$1" local cmd= @@ -424,3 +443,23 @@ platform_do_upgrade() { default_do_upgrade "$trx" "$cmd" } + +platform_do_upgrade() { + case "$(board_name)" in + meraki,mr32) + CI_KERNPART="part.safe" + nand_do_upgrade "$1" + ;; + *) + platform_other_do_upgrade "$1" + ;; + esac +} + +platform_nand_pre_upgrade() { + case "$(board_name)" in + meraki,mr32) + CI_KERNPART="part.safe" + ;; + esac +} diff --git a/target/linux/bcm53xx/image/Makefile b/target/linux/bcm53xx/image/Makefile index 768477160a..613f2d533d 100644 --- a/target/linux/bcm53xx/image/Makefile +++ b/target/linux/bcm53xx/image/Makefile @@ -320,6 +320,33 @@ define Device/luxul_xwr-3150 endef TARGET_DEVICES += luxul_xwr-3150 +define Device/meraki_mr32 + DEVICE_VENODR := Meraki + DEVICE_MODEL := MR32 + DEVICE_PACKAGES := $(B43) kmod-i2c-bcm-iproc kmod-i2c-gpio kmod-eeprom-at24 \ + kmod-leds-pwm kmod-hwmon-core kmod-hwmon-ina2xx kmod-bluetooth + DEVICE_DTS := bcm53016-meraki-mr32 +# Meraki FW r23 tries to resize the part.safe partition before it will +# flash the image. This is a bit of a problem, since resizing will fail +# if the partition is smaller than the old one. + KERNEL_LOADADDR := 0x00008000 + KERNEL_INITRAMFS_SUFFIX := .bin + KERNEL_INITRAMFS := kernel-bin | fit none $$(DTS_DIR)/$$(DEVICE_DTS).dtb | \ + pad-to 10362880 + KERNEL := kernel-bin | fit none $$(DTS_DIR)/$$(DEVICE_DTS).dtb + IMAGES := sysupgrade.bin + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata + +# Currently the only device that uses the new image check + SUPPORTED_DEVICES := meraki,mr32 + +# The loader is specifically looking for fdt@2: +# [ 3.190000] find_itb_subimage: error finding fdt@2: FDT_ERR_NOTFOUND +# The image won't boot, if it isn't found. :( + DEVICE_FDT_NUM := 2 +endef +TARGET_DEVICES += meraki_mr32 + define Device/netgear DEVICE_VENDOR := NETGEAR IMAGES := chk diff --git a/target/linux/bcm53xx/patches-5.4/330-ARM-BCM5301X-Add-DT-for-Meraki-MR32.patch b/target/linux/bcm53xx/patches-5.4/330-ARM-BCM5301X-Add-DT-for-Meraki-MR32.patch new file mode 100644 index 0000000000..a59415d251 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.4/330-ARM-BCM5301X-Add-DT-for-Meraki-MR32.patch @@ -0,0 +1,281 @@ +From ca655714de06ebd51d0d060a4b12be9e9ac29194 Mon Sep 17 00:00:00 2001 +From: Christian Lamparter +Date: Thu, 7 Jun 2018 19:29:12 +0200 +Subject: [PATCH 4/4] ARM: BCM5301X: Add DT for Meraki MR32 + +add support for the Cisco Meraki MR32. +This is a dual-band enterprise class 802.11ac access point. +The unit was donated by Chris Blake. Thank you! + +SoC: Broadcom BCM53016A1 (1 GHz, 2 cores) +RAM: 128 MiB +NAND: 128 MiB Spansion S34ML01G2 (~114 MiB useable) +ETH: 1GBit Ethernet Port - PoE +WIFI1: Broadcom BCM43520 an+ac (2x2:2 - id: 0x4352) +WIFI2: Broadcom BCM43520 bgn (2x2:2 - id: 0x4352) +WIFI3: Broadcom BCM43428 abgn (1x1:1 - id: 43428) + +BLE: Broadcom BCM20732 (ttyS1) +LEDS: 1 x Programmable RGB Status LED (driven by a PWM) + 1 x White LED (GPIO) + 1 x Orange LED Fault Indicator (GPIO) + 2 x LAN Activity / Speed LEDs (On the RJ45 Port) +BUTTON: one Reset button +MISC: AT24C64 8KiB EEPROM (i2c - stores Ethernet MAC) + ina219 hardware monitor (i2c) + Kensington Lock + +SERIAL: + WARNING: The serial port needs a TTL/RS-232 3V3 level converter! + The Serial setting is 115200-8-N-1. The board has a populated + right angle 1x4 0.1" pinheader. + The pinout is: VCC, RX, TX, GND. + +Odd stuff: + - uart0 clock frequency is 62.5 MHz. + - The LEDs are labeled as SYS-LED1 through SYS-LED3 + because of the silkscreen on the PCB. + - the original u-boot has been compiled with most functions + and commands disabled. The u-boot env isn't setup properly + either and as a result, the bcm47xxpart probing is not + working. Hence, the nand partitions are specified through a + "fixed-partition" binding. + - The "WICED SMART(TM)" Bluetooth LE 4.0 BCM20732 chip is + connected to uart2 of the SoC. The BCM20732 does not + provide a HCI. So the linux' bluetooth stack is useless. + The mock-up node with the compatible binding and + enable-gpios property is provided solely as documentation. + +Signed-off-by: Christian Lamparter +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -119,6 +119,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ + bcm47094-luxul-xwr-3150-v1.dtb \ + bcm47094-netgear-r8500.dtb \ + bcm47094-phicomm-k3.dtb \ ++ bcm53016-meraki-mr32.dtb \ + bcm94708.dtb \ + bcm94709.dtb \ + bcm953012er.dtb \ +--- /dev/null ++++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts +@@ -0,0 +1,219 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++/* ++ * Broadcom BCM470X / BCM5301X ARM platform code. ++ * DTS for Meraki MR32 / Codename: Espresso ++ * ++ * Copyright (C) 2018-2020 Christian Lamparter ++ */ ++ ++/dts-v1/; ++ ++#include "bcm4708.dtsi" ++#include "bcm5301x-nand-cs0-bch8.dtsi" ++#include ++ ++/ { ++ compatible = "meraki,mr32", "brcm,brcm53016", "brcm,bcm4708"; ++ model = "Meraki MR32"; ++ ++ chosen { ++ bootargs = " console=ttyS0,115200n8 earlycon"; ++ }; ++ ++ memory { ++ reg = <0x00000000 0x08000000>; ++ device_type = "memory"; ++ }; ++ ++ aliases { ++ serial1 = &uart2; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ sysled3 { ++ function = LED_FUNCTION_FAULT; ++ color = ; ++ gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>; ++ panic-indicator; ++ }; ++ sysled2 { ++ function = LED_FUNCTION_INDICATOR; ++ color = ; ++ gpios = <&chipcommon 19 GPIO_ACTIVE_HIGH>; ++ }; ++ }; ++ ++ keys { ++ compatible = "gpio-keys"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ restart { ++ label = "Reset"; ++ linux,code = ; ++ gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ pwm-leds { ++ compatible = "pwm-leds"; ++ ++ red { ++ /* SYS-LED 1 - Tricolor */ ++ function = LED_FUNCTION_INDICATOR; ++ color = ; ++ pwms = <&pwm 0 50000 0>; ++ max-brightness = <255>; ++ }; ++ ++ green { ++ /* SYS-LED 1 - Tricolor */ ++ function = LED_FUNCTION_POWER; ++ color = ; ++ pwms = <&pwm 1 50000 0>; ++ max-brightness = <255>; ++ }; ++ ++ blue { ++ /* SYS-LED 1 - Tricolor */ ++ function = LED_FUNCTION_INDICATOR; ++ color = ; ++ pwms = <&pwm 2 50000 0>; ++ max-brightness = <255>; ++ }; ++ }; ++ ++ i2c { ++ /* ++ * The platform provided I2C does not budge. ++ * This is a replacement until I can figure ++ * out what are the missing bits... ++ */ ++ ++ compatible = "i2c-gpio"; ++ sda-gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>; ++ scl-gpios = <&chipcommon 4 GPIO_ACTIVE_HIGH>; ++ i2c-gpio,delay-us = <10>; /* close to 100 kHz */ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ current_sense: ina219@45 { ++ compatible = "ti,ina219"; ++ reg = <0x45>; ++ shunt-resistor = <60000>; /* = 60 mOhms */ ++ }; ++ ++ eeprom: eeprom@50 { ++ compatible = "atmel,24c64"; ++ reg = <0x50>; ++ pagesize = <32>; ++ read-only; ++ }; ++ }; ++}; ++ ++&i2c0 { ++ /* status = "okay"; - can be enabled once it works. */ ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinmux_i2c>; ++ ++ clock-frequency = <100000>; ++ ++ /* current_sense: */ ina219@45 { ++ compatible = "ti,ina219"; ++ reg = <0x45>; ++ shunt-resistor = <60000>; /* = 60 mOhms */ ++ }; ++ ++ /* eeprom: */ eeprom@50 { ++ compatible = "atmel,24c64"; ++ reg = <0x50>; ++ pagesize = <32>; ++ read-only; ++ }; ++}; ++ ++&uart0 { ++ clock-frequency = <62500000>; ++ /delete-property/ clocks; ++}; ++ ++&uart1 { ++ status = "disabled"; ++}; ++ ++&uart2 { ++ status = "okay"; ++ /* ++ * bluetooth-le { ++ * compatible = "brcm,bcm20732"; ++ * enable-gpios = <&chipcommon 20 GPIO_ACTIVE_HIGH>; ++ *}; ++ */ ++}; ++ ++&gmac1 { ++ status = "disabled"; ++}; ++&gmac2 { ++ status = "disabled"; ++}; ++&gmac3 { ++ status = "disabled"; ++}; ++ ++&pwm { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinmux_pwm>; ++}; ++ ++&nandcs { ++ nand-ecc-algo = "hw"; ++ ++ partitions { ++ /* ++ * The partition autodetection does not work for this device. ++ * It will only detect the "nvram" partition with an incorrect size. ++ * [ 1.721667] 1 bcm47xxpart partitions found on MTD device brcmnand.0 ++ * [ 1.727962] Creating 1 MTD partitions on "brcmnand.0": ++ * [ 1.733117] 0x000000400000-0x000008000000 : "nvram" ++ */ ++ ++ compatible = "fixed-partitions"; ++ #address-cells = <0x1>; ++ #size-cells = <0x1>; ++ ++ partition0@0 { ++ label = "u-boot"; ++ reg = <0x0 0x100000>; ++ read-only; ++ }; ++ ++ partition1@100000 { ++ label = "bootkernel1"; ++ reg = <0x100000 0x300000>; ++ read-only; ++ }; ++ ++ partition2@400000 { ++ label = "nvram"; ++ reg = <0x400000 0x100000>; ++ read-only; ++ }; ++ ++ partition3@500000 { ++ label = "bootkernel2"; ++ reg = <0x500000 0x300000>; ++ read-only; ++ }; ++ ++ partition4@800000 { ++ label = "ubi"; ++ reg = <0x800000 0x7780000>; ++ }; ++ }; ++}; diff --git a/target/linux/bcm53xx/patches-5.4/331-Meraki-MR32-Status-LEDs.patch b/target/linux/bcm53xx/patches-5.4/331-Meraki-MR32-Status-LEDs.patch new file mode 100644 index 0000000000..fb78ee93c4 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.4/331-Meraki-MR32-Status-LEDs.patch @@ -0,0 +1,28 @@ +From: Christian Lamparter +Date: Thu, 7 Jun 2018 19:29:12 +0200 +Subject: bcm53xx: add LED status label alias for Meraki MR32 + +add an led-status alias label. This is used by OpenWrt's LED +DTS lookup function to identifiy the indicator LED + +Signed-off-by: Christian Lamparter + +--- a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts ++++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts +@@ -27,6 +27,7 @@ + + aliases { + serial1 = &uart2; ++ led-status = &led_status; + }; + + leds { +@@ -68,7 +69,7 @@ + max-brightness = <255>; + }; + +- green { ++ led_status: green { + /* SYS-LED 1 - Tricolor */ + function = LED_FUNCTION_POWER; + color = ;