From patchwork Mon Jun 19 06:36:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 1796328 X-Patchwork-Delegate: zajec5@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=19bThQc+; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=pKJYOzJV; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Ql0VY3RGsz20Wk for ; Mon, 19 Jun 2023 16:39:33 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=B7SfQ4/+Q8Acmi4VACjgZNYjs+9numzHjMiRCbBEO0M=; b=19bThQc+jG7Uru hpXrbhIF5pBCcbntIMsA0bKjoVwqQ20q4Thu9/qzfF1w+koN778INXgRkuZAVkYp51Asot7+W8AvC W4jc2aH2xWc0B6nNRksQUlR7XEPoIG+TMpLwkElpoj0/EUlVFOEJNG/EBjhrDTJcryDf946JIbE2X 5DmgyZPE9JZtX1awhh0jZmd2eqCrCds2gZlNjirlry8oqgMrKQEEdO9A/10gPXw3OrHYfYjRgosBE BV8cJl5W/63n4zSOuWGlrPgyVixHzIkHKZBM78eLoUbIe3Gu4S12PdiIW+9Cc5QKVzPnoKcnq9RYL lpXhHYMxsUOFwrjdCrrA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qB8V5-007ai3-06; Mon, 19 Jun 2023 06:36:31 +0000 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qB8V2-007ah5-0t for openwrt-devel@lists.openwrt.org; Mon, 19 Jun 2023 06:36:29 +0000 Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2b47bfd4e45so6266761fa.0 for ; Sun, 18 Jun 2023 23:36:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687156586; x=1689748586; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6AUtQYpRpHbQMJTUo5sEeAc7mmZhnZfZF6ddAfXUIck=; b=pKJYOzJVApV/TQ/rS7dTQiI/BdiEYvMx/1/ZCKsnJbl88dF+pxO6x4qYNf6GoJgWna ekx6YUaIYKgWQnsvlr6k+7GTdLxW23pNLOyV7yiRXIv6d731jr+kJ+PGYtDXFyE2IxY8 XjZ50wdRA9s2L1gW+TteC3Vk0ihqzMCsx/rHafe3GpK13Cz1H2FlDk++8Vy7HUpoz8Jf Rz7CkdvYK2DSw8bDoKwtdXb8gqdcNbmBns4hZQRVaHygDvWGSiY+mJSCitaYfY1Q9F/s TGqSvivYwchO33zyu9cmD13afWKBw2scl8HaxhLkmU3OhnqXa406K6w1UeU4k0xPTR6H AtvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687156586; x=1689748586; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6AUtQYpRpHbQMJTUo5sEeAc7mmZhnZfZF6ddAfXUIck=; b=AcQlCyPgc8+uGfggfDT4sWeWsCTCPDz8HS/0N3ij5KsTt5C3pY3w3+x8wU6neJekNs OzgVVaY9djlDt7uaKPEfb3gjAkGsk3hXpzAD/emS34aMygFZIa3wn4CQOymcS4+7YGfk GKpCO5Se6EX+MQCcGfBuGVjaxlNPYGjjtBDp3hRIENJ+t1bsEnAGntY/+irG1taClyBy LKiip8X8jNW5WvyDo+ivo2h1i2KyUvxX+jyqCofCoXkBHn+az4/Q024OcuWmUuVhzTA9 iSS51HTAcC7/IAJc40c81/pzo2vb1UUWLgAOJGJmm72iskBKSjNjh6YNIOf7SLgEDbJd A0MQ== X-Gm-Message-State: AC+VfDzTq4ZHrDT2KqlzRnKiAwNlCdgpdqQoWmcciiqa92mNDO9jVO80 r0mdW6qgtyhNrYzUCssdX0c9WUr+QngJ2aqAZCw= X-Google-Smtp-Source: ACHHUZ4FYPwTaDBcb6Kc3rfoLpcyPrxSjBNruAebj6rW4qy3YP6jOs2xv0MuXvqxkdklesdtQtRbxw== X-Received: by 2002:a2e:94d0:0:b0:2b4:7f66:8c89 with SMTP id r16-20020a2e94d0000000b002b47f668c89mr479737ljh.38.1687156585913; Sun, 18 Jun 2023 23:36:25 -0700 (PDT) Received: from Fecusia.lan (c-05d8225c.014-348-6c756e10.bbcust.telenor.se. [92.34.216.5]) by smtp.gmail.com with ESMTPSA id z11-20020a2e7e0b000000b002ad9df0586bsm957426ljc.132.2023.06.18.23.36.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Jun 2023 23:36:25 -0700 (PDT) From: Linus Walleij To: openwrt-devel@lists.openwrt.org Cc: Christian Lamparter , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Linus Walleij Subject: [PATCH v3 1/5] bcm53xx: Fix kernel v6.1 config Date: Mon, 19 Jun 2023 08:36:14 +0200 Message-Id: <20230619063618.2595217-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230619063618.2595217-1-linus.walleij@linaro.org> References: <20230619063618.2595217-1-linus.walleij@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230618_233628_313530_AAB9379A X-CRM114-Status: GOOD ( 10.30 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The v6.1 kernel does not build for me, building with -j1 V=s reveals that it is prompting for a kernel config option. I also needed to add CONFIG_MTD_SPLIT_FIRMWARE for splitting to work. This make the v6.1 config work nicely as a baseline for my DIR-890L patches. Content analysis details: (-0.2 points, 5.0 required) 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:22d listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an 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.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The v6.1 kernel does not build for me, building with -j1 V=s reveals that it is prompting for a kernel config option. I also needed to add CONFIG_MTD_SPLIT_FIRMWARE for splitting to work. This make the v6.1 config work nicely as a baseline for my DIR-890L patches. Signed-off-by: Linus Walleij --- ChangeLog ->v3: - New patch to make kernel v6.1 work --- target/linux/bcm53xx/config-6.1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/linux/bcm53xx/config-6.1 b/target/linux/bcm53xx/config-6.1 index d96beb687df0..0ffd90b64d1c 100644 --- a/target/linux/bcm53xx/config-6.1 +++ b/target/linux/bcm53xx/config-6.1 @@ -5,6 +5,7 @@ CONFIG_ARCH_BCM_5301X=y CONFIG_ARCH_BCM_53573=y # CONFIG_ARCH_BCM_HR2 is not set CONFIG_ARCH_BCM_IPROC=y +CONFIG_ARCH_FORCE_MAX_ORDER=11 CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_KEEP_MEMBLOCK=y CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y @@ -207,6 +208,7 @@ CONFIG_MTD_PARSER_TPLINK_SAFELOADER=y CONFIG_MTD_PARSER_TRX=y CONFIG_MTD_RAW_NAND=y CONFIG_MTD_SPI_NOR=y +CONFIG_MTD_SPLIT_FIRMWARE=y CONFIG_MTD_SPLIT_SEAMA_FW=y CONFIG_MTD_UBI=y CONFIG_MTD_UBI_BEB_LIMIT=20 From patchwork Mon Jun 19 06:36:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 1796327 X-Patchwork-Delegate: zajec5@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=LicofPFB; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=wrUFdfmX; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Ql0VM4Dqbz20Wk for ; Mon, 19 Jun 2023 16:39:23 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rGg+DIHRriT3HePrFV32Xhnl4JkCTkVyGELYC4yi5/I=; b=LicofPFB+U3BwV LdZIc/h1STq2eaGeGBYpoHny7UEVWLR0XHTXzBKlGp5n1z45MqIQ8Ly80GW/v7URV6WAE+md4MnRX NAhIWttl3iYgmiIkQ9/xiW5J7Uihnnag8JOogZRJ/CCXs7PwckcL5j6WZexV84euq2ds6BV6byp5r /1fuHKK+zR5KmFFJGbrmUxtYSHWUhXWMjJj5U4L5rmZ7RthL5Uf50cL+MHlO4NumKvBm7NVXdUYM5 pexAq5KWx+HRnf5+ExQfusmjTiukQOMFSLJPv9AQE1aHuHZbbswwqkfKUtdn/2T5pmqzukOiRdQF6 Uqxb0IP7yTdk4py+n+Fg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qB8VB-007ak7-3A; Mon, 19 Jun 2023 06:36:37 +0000 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qB8V5-007ahs-0p for openwrt-devel@lists.openwrt.org; Mon, 19 Jun 2023 06:36:35 +0000 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2b45a71c9caso35369521fa.3 for ; Sun, 18 Jun 2023 23:36:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687156589; x=1689748589; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=53DIK0ueNdgYML+4fHLd+l7AStN8W7pXsy5dhZ5qwww=; b=wrUFdfmXUyQhs3uYDTnTho2K1ntA3ANoRQCTavFof0sgNWfKf6tdGy3GtxD/YsyRjs /iECmIyZiIt6zXzlV7+OfFiBVKlq9v84f6aFi6ISUUgg0jopacfMb7e8W4d/yL4LV4U/ erN4N1ikWPUlH9aZEiqmHcIhpKMi7xsYe1kh7hjrQV2fu07mlbbZPTtRcTH6UVpvtlEb Nvl5TLt28gh+2czNTMddLktCqLO+MAytnWKenPiCSbWm2O51yRZgVeeAj8K0xfaJCrK3 WMOyp6SDfGGcPyTaWWU7kL20bBvB5GudVlN2Uj1AhnGwd27SSuk1ibg4Dtu7d2ZMFgbN cBdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687156589; x=1689748589; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=53DIK0ueNdgYML+4fHLd+l7AStN8W7pXsy5dhZ5qwww=; b=Gh50NeUKFo36xdv2Atb2QXLTG1QwF7PlPgQej9hqyaOkZyowjQib4VgK0xhoIwPvo3 gDqnsYLB9X60SVsBLtkFK/ZoA7LQQ+RGmU0k3N+/RrlXbevjB8ggijsoVJEMouD89dYB mzYzpSpdEol+myHN37VLTIz3P21U/8NFyP4mVhAvBXN1xshtOdUZTSosKOsbt85jAdJi y1RScVSA0Q70N1g5/GOuG4BFwOoIsHGQdP67gNOqqKk9sDTsCnumzD9nf5tlm/06LTpa PxitixzromzzCwdpwM0j9rmPDPihikuZSDzbTUHUzTRwwhhJYN9uDfFKHS/BnDzr11Zl eHVg== X-Gm-Message-State: AC+VfDz88TdrL82X9D5re/Mr4bAFHK7dnEz8ilZUbaqrhnH7rJ6XvLwP toygT08FnUXw41T8iI1P4A0ezWAS0b4OfZkNn+M= X-Google-Smtp-Source: ACHHUZ6Drq+WYZaWrdcPdJ53GYTRhGHBQzdFRjyVnbPLLKgLS/XdCUYgL4d1Z2ixBIXT5MunAtwn+w== X-Received: by 2002:a2e:8746:0:b0:2b4:66bb:4f2d with SMTP id q6-20020a2e8746000000b002b466bb4f2dmr2241475ljj.19.1687156587879; Sun, 18 Jun 2023 23:36:27 -0700 (PDT) Received: from Fecusia.lan (c-05d8225c.014-348-6c756e10.bbcust.telenor.se. [92.34.216.5]) by smtp.gmail.com with ESMTPSA id z11-20020a2e7e0b000000b002ad9df0586bsm957426ljc.132.2023.06.18.23.36.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Jun 2023 23:36:27 -0700 (PDT) From: Linus Walleij To: openwrt-devel@lists.openwrt.org Cc: Christian Lamparter , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Linus Walleij Subject: [PATCH v3 2/5] uboot-bcm53xx: Add U-Boot for NorthStar BCM53xx Date: Mon, 19 Jun 2023 08:36:15 +0200 Message-Id: <20230619063618.2595217-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230619063618.2595217-1-linus.walleij@linaro.org> References: <20230619063618.2595217-1-linus.walleij@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230618_233631_305106_8892E48D X-CRM114-Status: GOOD ( 31.46 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: I recently added support for the NorthStar ARM BCM53xx SoCs to the upstream U-Boot. This is a back port on top of the 2023.04 version already imported to OpenWrt with the 5 necessary upstream patches. Content analysis details: (-0.2 points, 5.0 required) 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:22b listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an 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.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org I recently added support for the NorthStar ARM BCM53xx SoCs to the upstream U-Boot. This is a back port on top of the 2023.04 version already imported to OpenWrt with the 5 necessary upstream patches. This is needed to create a small U-Boot for the BCM53xx-based D-Link DIR-890L and I think also the DIR-885L, so that a recent (bigger) kernel can be loaded and executed from the SEAMA partitions on these devices. Signed-off-by: Linus Walleij --- ChangeLog v2->v3: - Rebased on master ChangeLog v1->v2: - Rebased on master --- .github/labeler.yml | 1 + package/boot/uboot-bcm53xx/Makefile | 37 + ...0001-nand-brcmnand-add-iproc-support.patch | 199 ++++++ ...nand_base-Handle-algorithm-selection.patch | 80 +++ ...t-device-tree-for-Broadcom-Northstar.patch | 659 ++++++++++++++++++ ...port-for-the-Broadcom-Northstar-SoCs.patch | 66 ++ ...ard-Add-new-Broadcom-Northstar-board.patch | 372 ++++++++++ 7 files changed, 1414 insertions(+) create mode 100644 package/boot/uboot-bcm53xx/Makefile create mode 100644 package/boot/uboot-bcm53xx/patches/0001-nand-brcmnand-add-iproc-support.patch create mode 100644 package/boot/uboot-bcm53xx/patches/0002-mtd-rawnand-nand_base-Handle-algorithm-selection.patch create mode 100644 package/boot/uboot-bcm53xx/patches/0003-arm-dts-Import-device-tree-for-Broadcom-Northstar.patch create mode 100644 package/boot/uboot-bcm53xx/patches/0004-arm-Add-support-for-the-Broadcom-Northstar-SoCs.patch create mode 100644 package/boot/uboot-bcm53xx/patches/0005-board-Add-new-Broadcom-Northstar-board.patch diff --git a/.github/labeler.yml b/.github/labeler.yml index e22f074604fe..c8f8466d4a61 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -25,6 +25,7 @@ - "package/boot/uboot-bcm4908/**" "target/bcm53xx": - "target/linux/bcm53xx/**" + - "package/boot/uboot-bcm53xx/**" "target/bcm63xx": - "target/linux/bcm63xx/**" - "package/kernel/bcm63xx-cfe/**" diff --git a/package/boot/uboot-bcm53xx/Makefile b/package/boot/uboot-bcm53xx/Makefile new file mode 100644 index 000000000000..ab80b9608adc --- /dev/null +++ b/package/boot/uboot-bcm53xx/Makefile @@ -0,0 +1,37 @@ +include $(TOPDIR)/rules.mk + +PKG_VERSION:=2023.04 +PKG_HASH:=e31cac91545ff41b71cec5d8c22afd695645cd6e2a442ccdacacd60534069341 +PKG_RELEASE:=$(AUTORELEASE) + +include $(INCLUDE_DIR)/u-boot.mk +include $(INCLUDE_DIR)/package.mk + +define U-Boot/Default + BUILD_TARGET:=bcm53xx + BUILD_SUBTARGET:=generic + UBOOT_CONFIG:=bcmns + UBOOT_BOARD:=$(1) +endef + +define U-Boot/dir-885l + NAME:=D-Link DIR-885L + BUILD_DEVICES:=dlink_dir-885l +endef + +define U-Boot/dir-890l + NAME:=D-Link DIR-890L + BUILD_DEVICES:=dlink_dir-890l +endef + +UBOOT_TARGETS := dir-885l dir-890l + +define Build/InstallDev + $(INSTALL_DIR) $(STAGING_DIR_IMAGE) + $(CP) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-u-boot.bin +endef + +define Package/u-boot/install/default +endef + +$(eval $(call BuildPackage/U-Boot)) diff --git a/package/boot/uboot-bcm53xx/patches/0001-nand-brcmnand-add-iproc-support.patch b/package/boot/uboot-bcm53xx/patches/0001-nand-brcmnand-add-iproc-support.patch new file mode 100644 index 000000000000..fe6f4d944afe --- /dev/null +++ b/package/boot/uboot-bcm53xx/patches/0001-nand-brcmnand-add-iproc-support.patch @@ -0,0 +1,199 @@ +From 854dc4b790ce1291326d52b8405ebe771bff2edd Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Wed, 8 Mar 2023 22:42:31 +0100 +Subject: [PATCH 1/5] nand: brcmnand: add iproc support + +Add support for the iproc Broadcom NAND controller, +used in Northstar SoCs for example. Based on the Linux +driver. + +Cc: Philippe Reynes +Cc: Dario Binacchi +Reviewed-by: Michael Trimarchi +Signed-off-by: Linus Walleij +Acked-by: William Zhang +Link: https://lore.kernel.org/all/20230308214231.378013-1-linus.walleij@linaro.org/ +Signed-off-by: Dario Binacchi +--- + drivers/mtd/nand/raw/Kconfig | 7 + + drivers/mtd/nand/raw/brcmnand/Makefile | 1 + + drivers/mtd/nand/raw/brcmnand/iproc_nand.c | 148 +++++++++++++++++++++ + 3 files changed, 156 insertions(+) + create mode 100644 drivers/mtd/nand/raw/brcmnand/iproc_nand.c + +--- a/drivers/mtd/nand/raw/Kconfig ++++ b/drivers/mtd/nand/raw/Kconfig +@@ -156,6 +156,13 @@ config NAND_BRCMNAND_63158 + help + Enable support for broadcom nand driver on bcm63158. + ++config NAND_BRCMNAND_IPROC ++ bool "Support Broadcom NAND controller on the iproc family" ++ depends on NAND_BRCMNAND ++ help ++ Enable support for broadcom nand driver on the Broadcom ++ iproc family such as Northstar (BCM5301x, BCM4708...) ++ + config NAND_DAVINCI + bool "Support TI Davinci NAND controller" + select SYS_NAND_SELF_INIT if TARGET_DA850EVM +--- a/drivers/mtd/nand/raw/brcmnand/Makefile ++++ b/drivers/mtd/nand/raw/brcmnand/Makefile +@@ -6,5 +6,6 @@ obj-$(CONFIG_NAND_BRCMNAND_6753) += bcm6 + obj-$(CONFIG_NAND_BRCMNAND_68360) += bcm68360_nand.o + obj-$(CONFIG_NAND_BRCMNAND_6838) += bcm6838_nand.o + obj-$(CONFIG_NAND_BRCMNAND_6858) += bcm6858_nand.o ++obj-$(CONFIG_NAND_BRCMNAND_IPROC) += iproc_nand.o + obj-$(CONFIG_NAND_BRCMNAND) += brcmnand.o + obj-$(CONFIG_NAND_BRCMNAND) += brcmnand_compat.o +--- /dev/null ++++ b/drivers/mtd/nand/raw/brcmnand/iproc_nand.c +@@ -0,0 +1,148 @@ ++// SPDX-License-Identifier: GPL-2.0 ++/* ++ * Code borrowed from the Linux driver ++ * Copyright (C) 2015 Broadcom Corporation ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "brcmnand.h" ++ ++struct iproc_nand_soc { ++ struct brcmnand_soc soc; ++ void __iomem *idm_base; ++ void __iomem *ext_base; ++}; ++ ++#define IPROC_NAND_CTLR_READY_OFFSET 0x10 ++#define IPROC_NAND_CTLR_READY BIT(0) ++ ++#define IPROC_NAND_IO_CTRL_OFFSET 0x00 ++#define IPROC_NAND_APB_LE_MODE BIT(24) ++#define IPROC_NAND_INT_CTRL_READ_ENABLE BIT(6) ++ ++static bool iproc_nand_intc_ack(struct brcmnand_soc *soc) ++{ ++ struct iproc_nand_soc *priv = ++ container_of(soc, struct iproc_nand_soc, soc); ++ void __iomem *mmio = priv->ext_base + IPROC_NAND_CTLR_READY_OFFSET; ++ u32 val = brcmnand_readl(mmio); ++ ++ if (val & IPROC_NAND_CTLR_READY) { ++ brcmnand_writel(IPROC_NAND_CTLR_READY, mmio); ++ return true; ++ } ++ ++ return false; ++} ++ ++static void iproc_nand_intc_set(struct brcmnand_soc *soc, bool en) ++{ ++ struct iproc_nand_soc *priv = ++ container_of(soc, struct iproc_nand_soc, soc); ++ void __iomem *mmio = priv->idm_base + IPROC_NAND_IO_CTRL_OFFSET; ++ u32 val = brcmnand_readl(mmio); ++ ++ if (en) ++ val |= IPROC_NAND_INT_CTRL_READ_ENABLE; ++ else ++ val &= ~IPROC_NAND_INT_CTRL_READ_ENABLE; ++ ++ brcmnand_writel(val, mmio); ++} ++ ++static void iproc_nand_apb_access(struct brcmnand_soc *soc, bool prepare, ++ bool is_param) ++{ ++ struct iproc_nand_soc *priv = ++ container_of(soc, struct iproc_nand_soc, soc); ++ void __iomem *mmio = priv->idm_base + IPROC_NAND_IO_CTRL_OFFSET; ++ u32 val; ++ ++ val = brcmnand_readl(mmio); ++ ++ /* ++ * In the case of BE or when dealing with NAND data, always configure ++ * the APB bus to LE mode before accessing the FIFO and back to BE mode ++ * after the access is done ++ */ ++ if (IS_ENABLED(CONFIG_SYS_BIG_ENDIAN) || !is_param) { ++ if (prepare) ++ val |= IPROC_NAND_APB_LE_MODE; ++ else ++ val &= ~IPROC_NAND_APB_LE_MODE; ++ } else { /* when in LE accessing the parameter page, keep APB in BE */ ++ val &= ~IPROC_NAND_APB_LE_MODE; ++ } ++ ++ brcmnand_writel(val, mmio); ++} ++ ++static int iproc_nand_probe(struct udevice *dev) ++{ ++ struct udevice *pdev = dev; ++ struct iproc_nand_soc *priv = dev_get_priv(dev); ++ struct brcmnand_soc *soc; ++ struct resource res; ++ int ret; ++ ++ soc = &priv->soc; ++ ++ ret = dev_read_resource_byname(pdev, "iproc-idm", &res); ++ if (ret) ++ return ret; ++ ++ priv->idm_base = devm_ioremap(dev, res.start, resource_size(&res)); ++ if (IS_ERR(priv->idm_base)) ++ return PTR_ERR(priv->idm_base); ++ ++ ret = dev_read_resource_byname(pdev, "iproc-ext", &res); ++ if (ret) ++ return ret; ++ ++ priv->ext_base = devm_ioremap(dev, res.start, resource_size(&res)); ++ if (IS_ERR(priv->ext_base)) ++ return PTR_ERR(priv->ext_base); ++ ++ soc->ctlrdy_ack = iproc_nand_intc_ack; ++ soc->ctlrdy_set_enabled = iproc_nand_intc_set; ++ soc->prepare_data_bus = iproc_nand_apb_access; ++ ++ return brcmnand_probe(pdev, soc); ++} ++ ++static const struct udevice_id iproc_nand_dt_ids[] = { ++ { ++ .compatible = "brcm,nand-iproc", ++ }, ++ { /* sentinel */ } ++}; ++ ++U_BOOT_DRIVER(iproc_nand) = { ++ .name = "iproc-nand", ++ .id = UCLASS_MTD, ++ .of_match = iproc_nand_dt_ids, ++ .probe = iproc_nand_probe, ++ .priv_auto = sizeof(struct iproc_nand_soc), ++}; ++ ++void board_nand_init(void) ++{ ++ struct udevice *dev; ++ int ret; ++ ++ ret = uclass_get_device_by_driver(UCLASS_MTD, ++ DM_DRIVER_GET(iproc_nand), &dev); ++ if (ret && ret != -ENODEV) ++ pr_err("Failed to initialize %s. (error %d)\n", dev->name, ++ ret); ++} diff --git a/package/boot/uboot-bcm53xx/patches/0002-mtd-rawnand-nand_base-Handle-algorithm-selection.patch b/package/boot/uboot-bcm53xx/patches/0002-mtd-rawnand-nand_base-Handle-algorithm-selection.patch new file mode 100644 index 000000000000..eb2a5ec70397 --- /dev/null +++ b/package/boot/uboot-bcm53xx/patches/0002-mtd-rawnand-nand_base-Handle-algorithm-selection.patch @@ -0,0 +1,80 @@ +From d75483f8892f3a0dfb8f5aa4147e72c02c8b034c Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Fri, 7 Apr 2023 15:40:05 +0200 +Subject: [PATCH 2/5] mtd: rawnand: nand_base: Handle algorithm selection + +For BRCMNAND with 1-bit BCH ECC (BCH-1) such as used on the +D-Link DIR-885L and DIR-890L routers, we need to explicitly +select the ECC like this in the device tree: + + nand-ecc-algo = "bch"; + nand-ecc-strength = <1>; + nand-ecc-step-size = <512>; + +This is handled by the Linux kernel but U-Boot core does +not respect this. Fix it up by parsing the algorithm and +preserve the behaviour using this property to select +software BCH as far as possible. + +Reviewed-by: Michael Trimarchi +Acked-by: William Zhang +Signed-off-by: Linus Walleij +Tested-by: Tom Rini [am335x_evm] +Link: https://lore.kernel.org/all/20230407134008.1939717-3-linus.walleij@linaro.org/ +Signed-off-by: Dario Binacchi +--- + drivers/mtd/nand/raw/nand_base.c | 29 +++++++++++++++++++++++++---- + 1 file changed, 25 insertions(+), 4 deletions(-) + +--- a/drivers/mtd/nand/raw/nand_base.c ++++ b/drivers/mtd/nand/raw/nand_base.c +@@ -4487,6 +4487,7 @@ EXPORT_SYMBOL(nand_detect); + static int nand_dt_init(struct mtd_info *mtd, struct nand_chip *chip, ofnode node) + { + int ret, ecc_mode = -1, ecc_strength, ecc_step; ++ int ecc_algo = NAND_ECC_UNKNOWN; + const char *str; + + ret = ofnode_read_s32_default(node, "nand-bus-width", -1); +@@ -4512,10 +4513,22 @@ static int nand_dt_init(struct mtd_info + ecc_mode = NAND_ECC_SOFT_BCH; + } + +- if (ecc_mode == NAND_ECC_SOFT) { +- str = ofnode_read_string(node, "nand-ecc-algo"); +- if (str && !strcmp(str, "bch")) +- ecc_mode = NAND_ECC_SOFT_BCH; ++ str = ofnode_read_string(node, "nand-ecc-algo"); ++ if (str) { ++ /* ++ * If we are in NAND_ECC_SOFT mode, just alter the ++ * soft mode to BCH here. No change of algorithm. ++ */ ++ if (ecc_mode == NAND_ECC_SOFT) { ++ if (!strcmp(str, "bch")) ++ ecc_mode = NAND_ECC_SOFT_BCH; ++ } else { ++ if (!strcmp(str, "bch")) { ++ ecc_algo = NAND_ECC_BCH; ++ } else if (!strcmp(str, "hamming")) { ++ ecc_algo = NAND_ECC_HAMMING; ++ } ++ } + } + + ecc_strength = ofnode_read_s32_default(node, +@@ -4529,6 +4542,14 @@ static int nand_dt_init(struct mtd_info + return -EINVAL; + } + ++ /* ++ * Chip drivers may have assigned default algorithms here, ++ * onlt override it if we have found something explicitly ++ * specified in the device tree. ++ */ ++ if (ecc_algo != NAND_ECC_UNKNOWN) ++ chip->ecc.algo = ecc_algo; ++ + if (ecc_mode >= 0) + chip->ecc.mode = ecc_mode; + diff --git a/package/boot/uboot-bcm53xx/patches/0003-arm-dts-Import-device-tree-for-Broadcom-Northstar.patch b/package/boot/uboot-bcm53xx/patches/0003-arm-dts-Import-device-tree-for-Broadcom-Northstar.patch new file mode 100644 index 000000000000..6a4eef77f8f0 --- /dev/null +++ b/package/boot/uboot-bcm53xx/patches/0003-arm-dts-Import-device-tree-for-Broadcom-Northstar.patch @@ -0,0 +1,659 @@ +From 3d6098a662b7ff5b80c4b75c54fcd1b2baf9f150 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Mon, 24 Apr 2023 09:38:28 +0200 +Subject: [PATCH 3/5] arm: dts: Import device tree for Broadcom Northstar +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This brings in the main SoC device tree used by the +Broadcom Northstar chipset, i.e. BCM4709x and BCM5301x. +This is taken from the v6.3 Linux kernel. + +Cc: Rafał Miłecki +Signed-off-by: Linus Walleij +--- + arch/arm/dts/bcm5301x.dtsi | 581 ++++++++++++++++++++++++++++ + include/dt-bindings/clock/bcm-nsp.h | 51 +++ + 2 files changed, 632 insertions(+) + create mode 100644 arch/arm/dts/bcm5301x.dtsi + create mode 100644 include/dt-bindings/clock/bcm-nsp.h + +--- /dev/null ++++ b/arch/arm/dts/bcm5301x.dtsi +@@ -0,0 +1,581 @@ ++/* ++ * Broadcom BCM470X / BCM5301X ARM platform code. ++ * Generic DTS part for all BCM53010, BCM53011, BCM53012, BCM53014, BCM53015, ++ * BCM53016, BCM53017, BCM53018, BCM4707, BCM4708 and BCM4709 SoCs ++ * ++ * Copyright 2013-2014 Hauke Mehrtens ++ * ++ * Licensed under the GNU/GPL. See COPYING for details. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++/ { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ interrupt-parent = <&gic>; ++ ++ chipcommon-a-bus@18000000 { ++ compatible = "simple-bus"; ++ ranges = <0x00000000 0x18000000 0x00001000>; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ uart0: serial@300 { ++ compatible = "ns16550"; ++ reg = <0x0300 0x100>; ++ interrupts = ; ++ clocks = <&iprocslow>; ++ status = "disabled"; ++ }; ++ ++ uart1: serial@400 { ++ compatible = "ns16550"; ++ reg = <0x0400 0x100>; ++ interrupts = ; ++ clocks = <&iprocslow>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinmux_uart1>; ++ status = "disabled"; ++ }; ++ }; ++ ++ mpcore-bus@19000000 { ++ compatible = "simple-bus"; ++ ranges = <0x00000000 0x19000000 0x00023000>; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ a9pll: arm_clk@0 { ++ #clock-cells = <0>; ++ compatible = "brcm,nsp-armpll"; ++ clocks = <&osc>; ++ reg = <0x00000 0x1000>; ++ }; ++ ++ scu@20000 { ++ compatible = "arm,cortex-a9-scu"; ++ reg = <0x20000 0x100>; ++ }; ++ ++ timer@20200 { ++ compatible = "arm,cortex-a9-global-timer"; ++ reg = <0x20200 0x100>; ++ interrupts = ; ++ clocks = <&periph_clk>; ++ }; ++ ++ timer@20600 { ++ compatible = "arm,cortex-a9-twd-timer"; ++ reg = <0x20600 0x20>; ++ interrupts = ; ++ clocks = <&periph_clk>; ++ }; ++ ++ watchdog@20620 { ++ compatible = "arm,cortex-a9-twd-wdt"; ++ reg = <0x20620 0x20>; ++ interrupts = ; ++ clocks = <&periph_clk>; ++ }; ++ ++ gic: interrupt-controller@21000 { ++ compatible = "arm,cortex-a9-gic"; ++ #interrupt-cells = <3>; ++ #address-cells = <0>; ++ interrupt-controller; ++ reg = <0x21000 0x1000>, ++ <0x20100 0x100>; ++ }; ++ ++ L2: cache-controller@22000 { ++ compatible = "arm,pl310-cache"; ++ reg = <0x22000 0x1000>; ++ cache-unified; ++ arm,shared-override; ++ prefetch-data = <1>; ++ prefetch-instr = <1>; ++ cache-level = <2>; ++ }; ++ }; ++ ++ pmu { ++ compatible = "arm,cortex-a9-pmu"; ++ interrupts = ++ , ++ ; ++ }; ++ ++ clocks { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges; ++ ++ osc: oscillator { ++ #clock-cells = <0>; ++ compatible = "fixed-clock"; ++ clock-frequency = <25000000>; ++ }; ++ ++ iprocmed: iprocmed { ++ #clock-cells = <0>; ++ compatible = "fixed-factor-clock"; ++ clocks = <&genpll BCM_NSP_GENPLL_IPROCFAST_CLK>; ++ clock-div = <2>; ++ clock-mult = <1>; ++ }; ++ ++ iprocslow: iprocslow { ++ #clock-cells = <0>; ++ compatible = "fixed-factor-clock"; ++ clocks = <&genpll BCM_NSP_GENPLL_IPROCFAST_CLK>; ++ clock-div = <4>; ++ clock-mult = <1>; ++ }; ++ ++ periph_clk: periph_clk { ++ #clock-cells = <0>; ++ compatible = "fixed-factor-clock"; ++ clocks = <&a9pll>; ++ clock-div = <2>; ++ clock-mult = <1>; ++ }; ++ }; ++ ++ axi@18000000 { ++ compatible = "brcm,bus-axi"; ++ reg = <0x18000000 0x1000>; ++ ranges = <0x00000000 0x18000000 0x00100000>; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ #interrupt-cells = <1>; ++ interrupt-map-mask = <0x000fffff 0xffff>; ++ interrupt-map = ++ /* ChipCommon */ ++ <0x00000000 0 &gic GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>, ++ ++ /* Switch Register Access Block */ ++ <0x00007000 0 &gic GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00007000 1 &gic GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00007000 2 &gic GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00007000 3 &gic GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00007000 4 &gic GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00007000 5 &gic GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00007000 6 &gic GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00007000 7 &gic GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00007000 8 &gic GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00007000 9 &gic GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00007000 10 &gic GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00007000 11 &gic GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00007000 12 &gic GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>, ++ ++ /* PCIe Controller 0 */ ++ <0x00012000 0 &gic GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00012000 1 &gic GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00012000 2 &gic GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00012000 3 &gic GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00012000 4 &gic GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00012000 5 &gic GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, ++ ++ /* PCIe Controller 1 */ ++ <0x00013000 0 &gic GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00013000 1 &gic GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00013000 2 &gic GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00013000 3 &gic GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00013000 4 &gic GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00013000 5 &gic GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>, ++ ++ /* PCIe Controller 2 */ ++ <0x00014000 0 &gic GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00014000 1 &gic GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00014000 2 &gic GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00014000 3 &gic GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00014000 4 &gic GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00014000 5 &gic GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>, ++ ++ /* USB 2.0 Controller */ ++ <0x00021000 0 &gic GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>, ++ ++ /* USB 3.0 Controller */ ++ <0x00023000 0 &gic GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>, ++ ++ /* Ethernet Controller 0 */ ++ <0x00024000 0 &gic GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>, ++ ++ /* Ethernet Controller 1 */ ++ <0x00025000 0 &gic GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>, ++ ++ /* Ethernet Controller 2 */ ++ <0x00026000 0 &gic GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>, ++ ++ /* Ethernet Controller 3 */ ++ <0x00027000 0 &gic GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH>, ++ ++ /* NAND Controller */ ++ <0x00028000 0 &gic GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00028000 1 &gic GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00028000 2 &gic GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00028000 3 &gic GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00028000 4 &gic GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00028000 5 &gic GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00028000 6 &gic GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>, ++ <0x00028000 7 &gic GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>; ++ ++ chipcommon: chipcommon@0 { ++ reg = <0x00000000 0x1000>; ++ ++ gpio-controller; ++ #gpio-cells = <2>; ++ interrupt-controller; ++ #interrupt-cells = <2>; ++ }; ++ ++ pcie0: pcie@12000 { ++ reg = <0x00012000 0x1000>; ++ }; ++ ++ pcie1: pcie@13000 { ++ reg = <0x00013000 0x1000>; ++ }; ++ ++ pcie2: pcie@14000 { ++ reg = <0x00014000 0x1000>; ++ }; ++ ++ usb2: usb2@21000 { ++ reg = <0x00021000 0x1000>; ++ ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges; ++ ++ interrupt-parent = <&gic>; ++ ++ ehci: usb@21000 { ++ #usb-cells = <0>; ++ ++ compatible = "generic-ehci"; ++ reg = <0x00021000 0x1000>; ++ interrupts = ; ++ phys = <&usb2_phy>; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ ehci_port1: port@1 { ++ reg = <1>; ++ #trigger-source-cells = <0>; ++ }; ++ ++ ehci_port2: port@2 { ++ reg = <2>; ++ #trigger-source-cells = <0>; ++ }; ++ }; ++ ++ ohci: usb@22000 { ++ #usb-cells = <0>; ++ ++ compatible = "generic-ohci"; ++ reg = <0x00022000 0x1000>; ++ interrupts = ; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ ohci_port1: port@1 { ++ reg = <1>; ++ #trigger-source-cells = <0>; ++ }; ++ ++ ohci_port2: port@2 { ++ reg = <2>; ++ #trigger-source-cells = <0>; ++ }; ++ }; ++ }; ++ ++ usb3: usb3@23000 { ++ reg = <0x00023000 0x1000>; ++ ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges; ++ ++ interrupt-parent = <&gic>; ++ ++ xhci: usb@23000 { ++ #usb-cells = <0>; ++ ++ compatible = "generic-xhci"; ++ reg = <0x00023000 0x1000>; ++ interrupts = ; ++ phys = <&usb3_phy>; ++ phy-names = "usb"; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ xhci_port1: port@1 { ++ reg = <1>; ++ #trigger-source-cells = <0>; ++ }; ++ }; ++ }; ++ ++ gmac0: ethernet@24000 { ++ reg = <0x24000 0x800>; ++ }; ++ ++ gmac1: ethernet@25000 { ++ reg = <0x25000 0x800>; ++ }; ++ ++ gmac2: ethernet@26000 { ++ reg = <0x26000 0x800>; ++ }; ++ ++ gmac3: ethernet@27000 { ++ reg = <0x27000 0x800>; ++ }; ++ }; ++ ++ 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>; ++ #size-cells = <0>; ++ #address-cells = <1>; ++ }; ++ ++ mdio-mux@18003000 { ++ compatible = "mdio-mux-mmioreg", "mdio-mux"; ++ mdio-parent-bus = <&mdio>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0x18003000 0x4>; ++ mux-mask = <0x200>; ++ ++ mdio@0 { ++ reg = <0x0>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ usb3_phy: usb3-phy@10 { ++ compatible = "brcm,ns-ax-usb3-phy"; ++ reg = <0x10>; ++ usb3-dmp-syscon = <&usb3_dmp>; ++ #phy-cells = <0>; ++ status = "disabled"; ++ }; ++ }; ++ }; ++ ++ 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>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ clock-frequency = <100000>; ++ status = "disabled"; ++ }; ++ ++ dmu-bus@1800c000 { ++ compatible = "simple-bus"; ++ ranges = <0 0x1800c000 0x1000>; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ cru-bus@100 { ++ compatible = "brcm,ns-cru", "simple-mfd"; ++ reg = <0x100 0x1a4>; ++ ranges; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ lcpll0: clock-controller@100 { ++ #clock-cells = <1>; ++ compatible = "brcm,nsp-lcpll0"; ++ reg = <0x100 0x14>; ++ clocks = <&osc>; ++ clock-output-names = "lcpll0", "pcie_phy", ++ "sdio", "ddr_phy"; ++ }; ++ ++ genpll: clock-controller@140 { ++ #clock-cells = <1>; ++ compatible = "brcm,nsp-genpll"; ++ reg = <0x140 0x24>; ++ clocks = <&osc>; ++ clock-output-names = "genpll", "phy", ++ "ethernetclk", ++ "usbclk", "iprocfast", ++ "sata1", "sata2"; ++ }; ++ ++ usb2_phy: phy@164 { ++ compatible = "brcm,ns-usb2-phy"; ++ reg = <0x164 0x4>; ++ brcm,syscon-clkset = <&cru_clkset>; ++ clocks = <&genpll BCM_NSP_GENPLL_USB_PHY_REF_CLK>; ++ clock-names = "phy-ref-clk"; ++ #phy-cells = <0>; ++ }; ++ ++ cru_clkset: syscon@180 { ++ compatible = "brcm,cru-clkset", "syscon"; ++ reg = <0x180 0x4>; ++ }; ++ ++ pinctrl: pinctrl@1c0 { ++ compatible = "brcm,bcm4708-pinmux"; ++ reg = <0x1c0 0x24>; ++ reg-names = "cru_gpio_control"; ++ ++ spi-pins { ++ groups = "spi_grp"; ++ function = "spi"; ++ }; ++ ++ pinmux_i2c: i2c-pins { ++ groups = "i2c_grp"; ++ function = "i2c"; ++ }; ++ ++ pinmux_pwm: pwm-pins { ++ groups = "pwm0_grp", "pwm1_grp", ++ "pwm2_grp", "pwm3_grp"; ++ function = "pwm"; ++ }; ++ ++ pinmux_uart1: uart1-pins { ++ groups = "uart1_grp"; ++ function = "uart1"; ++ }; ++ }; ++ ++ thermal: thermal@2c0 { ++ compatible = "brcm,ns-thermal"; ++ reg = <0x2c0 0x10>; ++ #thermal-sensor-cells = <0>; ++ }; ++ }; ++ }; ++ ++ srab: ethernet-switch@18007000 { ++ compatible = "brcm,bcm53011-srab", "brcm,bcm5301x-srab"; ++ reg = <0x18007000 0x1000>; ++ ++ status = "disabled"; ++ ++ /* ports are defined in board DTS */ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ }; ++ }; ++ ++ rng: rng@18004000 { ++ compatible = "brcm,bcm5301x-rng"; ++ reg = <0x18004000 0x14>; ++ }; ++ ++ nand_controller: nand-controller@18028000 { ++ compatible = "brcm,nand-iproc", "brcm,brcmnand-v6.1", "brcm,brcmnand"; ++ reg = <0x18028000 0x600>, <0x1811a408 0x600>, <0x18028f00 0x20>; ++ reg-names = "nand", "iproc-idm", "iproc-ext"; ++ interrupts = ; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ brcm,nand-has-wp; ++ }; ++ ++ spi@18029200 { ++ compatible = "brcm,spi-nsp-qspi", "brcm,spi-bcm-qspi"; ++ reg = <0x18029200 0x184>, ++ <0x18029000 0x124>, ++ <0x1811b408 0x004>, ++ <0x180293a0 0x01c>; ++ reg-names = "mspi", "bspi", "intr_regs", "intr_status_reg"; ++ interrupts = , ++ , ++ , ++ , ++ , ++ , ++ ; ++ interrupt-names = "mspi_done", ++ "mspi_halted", ++ "spi_lr_fullness_reached", ++ "spi_lr_session_aborted", ++ "spi_lr_impatient", ++ "spi_lr_session_done", ++ "spi_lr_overread"; ++ clocks = <&iprocmed>; ++ clock-names = "iprocmed"; ++ num-cs = <2>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ spi_nor: flash@0 { ++ compatible = "jedec,spi-nor"; ++ reg = <0>; ++ spi-max-frequency = <20000000>; ++ status = "disabled"; ++ ++ partitions { ++ compatible = "brcm,bcm947xx-cfe-partitions"; ++ }; ++ }; ++ }; ++ ++ thermal-zones { ++ cpu_thermal: cpu-thermal { ++ polling-delay-passive = <0>; ++ polling-delay = <1000>; ++ coefficients = <(-556) 418000>; ++ thermal-sensors = <&thermal>; ++ ++ trips { ++ cpu-crit { ++ temperature = <125000>; ++ hysteresis = <0>; ++ type = "critical"; ++ }; ++ }; ++ ++ cooling-maps { ++ }; ++ }; ++ }; ++}; +--- /dev/null ++++ b/include/dt-bindings/clock/bcm-nsp.h +@@ -0,0 +1,51 @@ ++/* ++ * BSD LICENSE ++ * ++ * Copyright(c) 2015 Broadcom Corporation. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * ++ * * Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * * Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in ++ * the documentation and/or other materials provided with the ++ * distribution. ++ * * Neither the name of Broadcom Corporation nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#ifndef _CLOCK_BCM_NSP_H ++#define _CLOCK_BCM_NSP_H ++ ++/* GENPLL clock channel ID */ ++#define BCM_NSP_GENPLL 0 ++#define BCM_NSP_GENPLL_PHY_CLK 1 ++#define BCM_NSP_GENPLL_ENET_SW_CLK 2 ++#define BCM_NSP_GENPLL_USB_PHY_REF_CLK 3 ++#define BCM_NSP_GENPLL_IPROCFAST_CLK 4 ++#define BCM_NSP_GENPLL_SATA1_CLK 5 ++#define BCM_NSP_GENPLL_SATA2_CLK 6 ++ ++/* LCPLL0 clock channel ID */ ++#define BCM_NSP_LCPLL0 0 ++#define BCM_NSP_LCPLL0_PCIE_PHY_REF_CLK 1 ++#define BCM_NSP_LCPLL0_SDIO_CLK 2 ++#define BCM_NSP_LCPLL0_DDR_PHY_CLK 3 ++ ++#endif /* _CLOCK_BCM_NSP_H */ diff --git a/package/boot/uboot-bcm53xx/patches/0004-arm-Add-support-for-the-Broadcom-Northstar-SoCs.patch b/package/boot/uboot-bcm53xx/patches/0004-arm-Add-support-for-the-Broadcom-Northstar-SoCs.patch new file mode 100644 index 000000000000..92eaa46e51c3 --- /dev/null +++ b/package/boot/uboot-bcm53xx/patches/0004-arm-Add-support-for-the-Broadcom-Northstar-SoCs.patch @@ -0,0 +1,66 @@ +From b81ea0a64b01ae42e8b41d2a8b9a3fabffe97489 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Mon, 24 Apr 2023 09:38:29 +0200 +Subject: [PATCH 4/5] arm: Add support for the Broadcom Northstar SoCs +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The original Northstar is an ARM SoC series that comprise +BCM4709x and BCM5301x and uses a dual-core Cortex A9, the +global timer and a few other things. + +This series should not be confused with North Star Plus +(NSP) which is partly supported by U-Boot already. + +The SoC is well supported by the Linux kernel and OpenWrt +as it is used in many routers. + +Since we currently don't need any chip-specific quirks +and can get the system up from just the device tree, a +mach-* directory doesn't even need to be added, just +some small Kconfig fragments. + +Cc: Rafał Miłecki +Signed-off-by: Linus Walleij +--- + arch/arm/Kconfig | 21 ++++++++++++++++++++- + 1 file changed, 20 insertions(+), 1 deletion(-) + +--- a/arch/arm/Kconfig ++++ b/arch/arm/Kconfig +@@ -357,7 +357,7 @@ config SYS_ARM_ARCH + + choice + prompt "Select the ARM data write cache policy" +- default SYS_ARM_CACHE_WRITETHROUGH if TARGET_BCMCYGNUS || RZA1 ++ default SYS_ARM_CACHE_WRITETHROUGH if TARGET_BCMCYGNUS || TARGET_BCMNS || RZA1 + default SYS_ARM_CACHE_WRITEBACK + + config SYS_ARM_CACHE_WRITEBACK +@@ -670,6 +670,25 @@ config TARGET_BCMCYGNUS + imply HASH_VERIFY + imply NETDEVICES + ++config TARGET_BCMNS ++ bool "Support Broadcom Northstar" ++ select CPU_V7A ++ select DM ++ select DM_GPIO ++ select DM_SERIAL ++ select OF_CONTROL ++ select TIMER ++ select SYS_NS16550 ++ select ARM_GLOBAL_TIMER ++ imply SYS_THUMB_BUILD ++ imply MTD_RAW_NAND ++ imply NAND_BRCMNAND ++ imply NAND_BRCMNAND_IPROC ++ help ++ Support for Broadcom Northstar SoCs. NS is a dual-core 32-bit ++ ARMv7 Cortex-A9 SoC family including BCM4708, BCM47094, ++ BCM5301x etc. ++ + config TARGET_BCMNS2 + bool "Support Broadcom Northstar2" + select ARM64 diff --git a/package/boot/uboot-bcm53xx/patches/0005-board-Add-new-Broadcom-Northstar-board.patch b/package/boot/uboot-bcm53xx/patches/0005-board-Add-new-Broadcom-Northstar-board.patch new file mode 100644 index 000000000000..158718133d43 --- /dev/null +++ b/package/boot/uboot-bcm53xx/patches/0005-board-Add-new-Broadcom-Northstar-board.patch @@ -0,0 +1,372 @@ +From 652a6fa45b6c9d52dd9685fc12ad662e54a9092e Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Mon, 24 Apr 2023 09:38:30 +0200 +Subject: [PATCH 5/5] board: Add new Broadcom Northstar board +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This adds a simple Northstar "BRCMNS" board to be used with +the BCM4708x and BCM5301x chips. + +The main intention is to use this with the D-Link DIR-890L +and DIR-885L routers for loading the kernel into RAM from +NAND memory using the BCH-1 ECC and using the separately +submitted SEAMA load command, so we are currently not adding +support for things such as networking. + +The DTS file is a multiplatform NorthStar board, designed to +be usable with several NorthStar designs by avoiding any +particulars not related to the operation of U-Boot. + +If other board need other ECC for example, they need to +create a separate DTS file and augment the code, but I don't +know if any other users will turn up. + +Cc: Rafał Miłecki +Signed-off-by: Linus Walleij +--- + arch/arm/Kconfig | 1 + + arch/arm/dts/Makefile | 2 ++ + arch/arm/dts/ns-board.dts | 57 ++++++++++++++++++++++++++++++ + board/broadcom/bcmns/Kconfig | 12 +++++++ + board/broadcom/bcmns/MAINTAINERS | 6 ++++ + board/broadcom/bcmns/Makefile | 2 ++ + board/broadcom/bcmns/ns.c | 60 ++++++++++++++++++++++++++++++++ + configs/bcmns_defconfig | 41 ++++++++++++++++++++++ + doc/board/broadcom/index.rst | 1 + + doc/board/broadcom/northstar.rst | 44 +++++++++++++++++++++++ + include/configs/bcmns.h | 49 ++++++++++++++++++++++++++ + 11 files changed, 275 insertions(+) + create mode 100644 arch/arm/dts/ns-board.dts + create mode 100644 board/broadcom/bcmns/Kconfig + create mode 100644 board/broadcom/bcmns/MAINTAINERS + create mode 100644 board/broadcom/bcmns/Makefile + create mode 100644 board/broadcom/bcmns/ns.c + create mode 100644 configs/bcmns_defconfig + create mode 100644 doc/board/broadcom/northstar.rst + create mode 100644 include/configs/bcmns.h + +--- a/arch/arm/Kconfig ++++ b/arch/arm/Kconfig +@@ -2286,6 +2286,7 @@ source "board/Marvell/octeontx2/Kconfig" + source "board/armltd/vexpress/Kconfig" + source "board/armltd/vexpress64/Kconfig" + source "board/cortina/presidio-asic/Kconfig" ++source "board/broadcom/bcmns/Kconfig" + source "board/broadcom/bcmns3/Kconfig" + source "board/cavium/thunderx/Kconfig" + source "board/eets/pdu001/Kconfig" +--- a/arch/arm/dts/Makefile ++++ b/arch/arm/dts/Makefile +@@ -1185,6 +1185,8 @@ dtb-$(CONFIG_ARCH_BCM283X) += \ + bcm2837-rpi-cm3-io3.dtb \ + bcm2711-rpi-4-b.dtb + ++dtb-$(CONFIG_TARGET_BCMNS) += ns-board.dtb ++ + dtb-$(CONFIG_TARGET_BCMNS3) += ns3-board.dtb + + dtb-$(CONFIG_ARCH_BCMSTB) += bcm7xxx.dtb +--- /dev/null ++++ b/arch/arm/dts/ns-board.dts +@@ -0,0 +1,57 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++ ++/dts-v1/; ++ ++#include "bcm5301x.dtsi" ++ ++/ { ++ /* ++ * The Northstar does not have a proper fallback compatible, but ++ * these basic chips will suffice. ++ */ ++ model = "Northstar model"; ++ compatible = "brcm,bcm47094", "brcm,bcm4708"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ interrupt-parent = <&gic>; ++ ++ memory { ++ device_type = "memory"; ++ reg = <0x00000000 0x08000000>, ++ <0x88000000 0x08000000>; ++ }; ++ ++ aliases { ++ serial0 = &uart0; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ }; ++ ++ nand-controller@18028000 { ++ nandcs: nand@0 { ++ compatible = "brcm,nandcs"; ++ reg = <0>; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ /* ++ * Same as using the bcm5301x-nand-cs0-bch1.dtsi ++ * include from the Linux kernel. ++ */ ++ nand-ecc-algo = "bch"; ++ nand-ecc-strength = <1>; ++ nand-ecc-step-size = <512>; ++ ++ partitions { ++ compatible = "brcm,bcm947xx-cfe-partitions"; ++ }; ++ }; ++ }; ++}; ++ ++&uart0 { ++ clock-frequency = <125000000>; ++ status = "okay"; ++}; +--- /dev/null ++++ b/board/broadcom/bcmns/Kconfig +@@ -0,0 +1,12 @@ ++if TARGET_BCMNS ++ ++config SYS_BOARD ++ default "bcmns" ++ ++config SYS_VENDOR ++ default "broadcom" ++ ++config SYS_CONFIG_NAME ++ default "bcmns" ++ ++endif +--- /dev/null ++++ b/board/broadcom/bcmns/MAINTAINERS +@@ -0,0 +1,6 @@ ++BCMNS BOARD ++M: Linus Walleij ++S: Maintained ++F: board/broadcom/bcmnsp/ ++F: configs/bcmnsp_defconfig ++F: include/configs/bcmnsp.h +--- /dev/null ++++ b/board/broadcom/bcmns/Makefile +@@ -0,0 +1,2 @@ ++# SPDX-License-Identifier: GPL-2.0-or-later ++obj-y := ns.o +--- /dev/null ++++ b/board/broadcom/bcmns/ns.c +@@ -0,0 +1,60 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++/* ++ * Broadcom Northstar generic board set-up code ++ * Copyright (C) 2023 Linus Walleij ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++DECLARE_GLOBAL_DATA_PTR; ++ ++int dram_init(void) ++{ ++ return fdtdec_setup_mem_size_base(); ++} ++ ++int dram_init_banksize(void) ++{ ++ return fdtdec_setup_memory_banksize(); ++} ++ ++int board_late_init(void) ++{ ++ /* LEDs etc can be initialized here */ ++ return 0; ++} ++ ++int board_init(void) ++{ ++ return 0; ++} ++ ++void reset_cpu(void) ++{ ++} ++ ++int print_cpuinfo(void) ++{ ++ printf("BCMNS Northstar SoC\n"); ++ return 0; ++} ++ ++int misc_init_r(void) ++{ ++ return 0; ++} ++ ++int ft_board_setup(void *fdt, struct bd_info *bd) ++{ ++ printf("Northstar board setup: DTB at 0x%08lx\n", (ulong)fdt); ++ return 0; ++} ++ +--- /dev/null ++++ b/configs/bcmns_defconfig +@@ -0,0 +1,41 @@ ++CONFIG_ARM=y ++CONFIG_TARGET_BCMNS=y ++CONFIG_TEXT_BASE=0x00008000 ++CONFIG_SYS_MALLOC_LEN=0x2000000 ++CONFIG_SYS_MALLOC_F_LEN=0x8000 ++CONFIG_NR_DRAM_BANKS=2 ++CONFIG_DEFAULT_DEVICE_TREE="ns-board" ++CONFIG_IDENT_STRING="Broadcom Northstar" ++CONFIG_SYS_LOAD_ADDR=0x00008000 ++CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y ++CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x00100000 ++# CONFIG_BOOTSTD is not set ++CONFIG_AUTOBOOT_KEYED=y ++CONFIG_AUTOBOOT_PROMPT="Boot Northstar system in %d seconds\n" ++CONFIG_BOOTDELAY=1 ++CONFIG_USE_BOOTCOMMAND=y ++CONFIG_BOOTCOMMAND="run bootcmd_dlink_dir8xxl" ++CONFIG_SYS_PROMPT="northstar> " ++CONFIG_ENV_VARS_UBOOT_CONFIG=y ++CONFIG_OF_BOARD_SETUP=y ++CONFIG_OF_STDOUT_VIA_ALIAS=y ++CONFIG_DISPLAY_BOARDINFO_LATE=y ++CONFIG_HUSH_PARSER=y ++CONFIG_SYS_MAXARGS=64 ++CONFIG_CMD_SEAMA=y ++CONFIG_CMD_BOOTZ=y ++CONFIG_CMD_CACHE=y ++CONFIG_OF_EMBED=y ++CONFIG_USE_HOSTNAME=y ++CONFIG_HOSTNAME="NS" ++CONFIG_CLK=y ++CONFIG_MTD=y ++CONFIG_DM_MTD=y ++CONFIG_MTD_RAW_NAND=y ++CONFIG_NAND_BRCMNAND=y ++CONFIG_SYS_NAND_ONFI_DETECTION=y ++CONFIG_CMD_NAND=y ++CONFIG_DM_SERIAL=y ++CONFIG_SYS_NS16550=y ++# CONFIG_NET is not set ++# CONFIG_EFI_LOADER is not set +--- a/doc/board/broadcom/index.rst ++++ b/doc/board/broadcom/index.rst +@@ -9,3 +9,4 @@ Broadcom + + bcm7xxx + raspberrypi ++ northstar +--- /dev/null ++++ b/doc/board/broadcom/northstar.rst +@@ -0,0 +1,44 @@ ++.. SPDX-License-Identifier: GPL-2.0+ ++.. Copyright (C) 2023 Linus Walleij ++ ++Broadcom Northstar Boards ++========================= ++ ++This document describes how to use U-Boot on the Broadcom Northstar ++boards, comprised of the Cortex A9 ARM-based BCM470x and BCM5301x SoCs. These ++were introduced in 2012-2013 and some of them are also called StrataGX. ++ ++Northstar is part of the iProc SoC family. ++ ++A good overview of these boards can be found in Jon Mason's presentation ++"Enabling New Hardware in U-Boot" where the difference between Northstar ++and Northstar Plus and Northstar 2 (Aarch64) is addressed. ++ ++The ROM in the Northstar SoC will typically look into NOR flash memory ++for a boot loader, and the way this works is undocumented. It should be ++possible to execute U-Boot as the first binary from the NOR flash but ++this usage path is unexplored. Please add information if you know more. ++ ++D-Link Boards ++------------- ++ ++When we use U-Boot with D-Link routers, the NOR flash has a boot loader ++and web server that can re-flash the bigger NAND flash memory for object ++code in the SEAMA format, so on these platforms U-Boot is converted into ++a SEAMA binary and installed in the SoC using the flash tool resident in ++the NOR flash. Details can be found in the OpenWrt project codebase. ++ ++Configure ++--------- ++ ++.. code-block:: console ++ ++ $ make CROSS_COMPILE=${CROSS_COMPILE} bcmns_defconfig ++ ++Build ++----- ++ ++.. code-block:: console ++ ++ $ make CROSS_COMPILE=${CROSS_COMPILE} ++ $ ${CROSS_COMPILE}strip u-boot +--- /dev/null ++++ b/include/configs/bcmns.h +@@ -0,0 +1,49 @@ ++/* SPDX-License-Identifier: GPL-2.0+ */ ++ ++#ifndef __BCM_NS_H ++#define __BCM_NS_H ++ ++#include ++ ++/* Physical Memory Map */ ++#define V2M_BASE 0x00000000 ++#define PHYS_SDRAM_1 V2M_BASE ++ ++#define CFG_SYS_SDRAM_BASE PHYS_SDRAM_1 ++ ++/* Called "periph_clk" in Linux, used by the global timer */ ++#define CFG_SYS_HZ_CLOCK 500000000 ++ ++/* Called "iprocslow" in Linux */ ++#define CFG_SYS_NS16550_CLK 125000000 ++ ++/* console configuration */ ++#define CONSOLE_ARGS "console_args=console=ttyS0,115200n8\0" ++#define MAX_CPUS "max_cpus=maxcpus=2\0" ++#define EXTRA_ARGS "extra_args=earlycon=uart8250,mmio32,0x18000300\0" ++ ++#define BASE_ARGS "${console_args} ${extra_args} ${pcie_args}" \ ++ " ${max_cpus} ${log_level} ${reserved_mem}" ++#define SETBOOTARGS "setbootargs=setenv bootargs " BASE_ARGS "\0" ++ ++#define KERNEL_LOADADDR_CFG \ ++ "loadaddr=0x01000000\0" \ ++ "dtb_loadaddr=0x02000000\0" ++ ++/* ++ * Hardcoded for the only boards we support, if you add more ++ * boards, add a more clever bootcmd! ++ */ ++#define NS_BOOTCMD "bootcmd_dlink_dir8xxl=seama 0x00fe0000; go 0x01000000" ++ ++#define ARCH_ENV_SETTINGS \ ++ CONSOLE_ARGS \ ++ MAX_CPUS \ ++ EXTRA_ARGS \ ++ KERNEL_LOADADDR_CFG \ ++ NS_BOOTCMD ++ ++#define CFG_EXTRA_ENV_SETTINGS \ ++ ARCH_ENV_SETTINGS ++ ++#endif /* __BCM_NS_H */ From patchwork Mon Jun 19 06:36:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 1796329 X-Patchwork-Delegate: zajec5@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=FEcdQ1TD; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=uO/Ra5Ej; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Ql0VZ4Dwpz20Wk for ; Mon, 19 Jun 2023 16:39:34 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PgHqppnuwwT5X4gyx2Fe6m9gl6SWr1Zjx8K7EiF6h6M=; b=FEcdQ1TDEblGq6 LIbUNwxdUHHBpZXNv7wpmOk+1EwK+sQRXUGziTgGDvtnLrO5idt3VQ1/xDt2bDgMwly1zINBVlyac zm7TjRwoYNoF046G34E40RICq+icVWqcDhljfwGMkoBvQEkkTzWoHoJrR6BCLOnBaaMzlFYZMaRAW HyWgFWGreCVIcnoVpXwVJXvyd1JiS+frYjOliGNPg8liTD4PKcRa9smSyqkm2uW5UtAQqiKI2/h8t vrNUjMx5ONrqCP5QerK9JPrNzt0UiLReRmqaGITpoacT9944oLAcGAYN34FKAF7mbZ1OUqo9NbbwN 1qTQbIjyZW95Q4k1ej3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qB8V9-007ajT-1J; Mon, 19 Jun 2023 06:36:35 +0000 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qB8V6-007ai0-02 for openwrt-devel@lists.openwrt.org; Mon, 19 Jun 2023 06:36:33 +0000 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2b474dac685so12102441fa.3 for ; Sun, 18 Jun 2023 23:36:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687156590; x=1689748590; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Vi3Xpqd27+n8hbXCmtT9lgoWk2HJUsSlsar/36VVMNA=; b=uO/Ra5EjovbGthXKqYcsq9wpitUy+C1A/VIBM1Uc0bar9mDeL5fsVWApz1nC1A2pqr H5B8ioCEn3X2lTafmd6SAyxVs9vSTVR7hnC5CQdqJTiO6LWnJyBoAep9musAq+nMK79J Mqnl9tU9/PftmeTDkZtDMpofpEqaimcPOMP9MmAWLTCtLtT4ASF77r2eTgmyP0mBH0eR 3BfcT2Awsn8yD3sHwvwVw2i3AlTp7lqi2qzCeUEktjOMPmpV7UuYshOMNo6PkN9J2d65 c56oXT4AeMBQTfCoYyIYjPsqjaFGZKL+4pj5T+9Abx+Iw49DlH2VX8qDDu8jP1lcyvXu tkag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687156590; x=1689748590; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Vi3Xpqd27+n8hbXCmtT9lgoWk2HJUsSlsar/36VVMNA=; b=Y8HWF9SFfTi3JSTcXLKzWYdIqd7g47jAhSYKtu8lSZ/LJTdV5jor2lvZfL/DNB9s15 vZ901yByCVZEkCJh1zSjxHnfJGDbNgbPNFSNP6LY9KlbVJ/wDQZVM5DSyQEVSc/6oV8D /xbYdQJdX6EX0MdEzxSAwDfMH9pPs+nu9MldMgt/5Hfp915Sy/ZKHFORKDpVSYL/d3xj QIQZ183lqgT3JKMm5i3fV4i+UiAZWRP8SAjnUYwffvaf8bP0ApdADQFUqAVDEd49vGNe N9rf4ApaSYamJqiE8///G6kPdpGC9IsWxeSspNxRSWpjrpOob2oxVpjhL/fJjpCdle8k Ee3w== X-Gm-Message-State: AC+VfDypxfz7SLmz/FfmC5pl64mWe12SsHMaSogS+UeB4x4EVxzIxULV MOGTBKSdbWR5g3FR8Ul7fvR8za5yN6PkGfFsrCE= X-Google-Smtp-Source: ACHHUZ44qMiJa/E6Q8DCP7WBtMV9ai9h0aLN0O+tQtuO4fTmqdbOgrIlcSsIvaPmiSsmWfGfBBejsQ== X-Received: by 2002:a2e:8e8a:0:b0:2b4:8239:b132 with SMTP id z10-20020a2e8e8a000000b002b48239b132mr250978ljk.22.1687156589966; Sun, 18 Jun 2023 23:36:29 -0700 (PDT) Received: from Fecusia.lan (c-05d8225c.014-348-6c756e10.bbcust.telenor.se. [92.34.216.5]) by smtp.gmail.com with ESMTPSA id z11-20020a2e7e0b000000b002ad9df0586bsm957426ljc.132.2023.06.18.23.36.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Jun 2023 23:36:29 -0700 (PDT) From: Linus Walleij To: openwrt-devel@lists.openwrt.org Cc: Christian Lamparter , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Linus Walleij Subject: [PATCH v3 3/5] bcm53xx: Add support for D-Link DIR-890L Date: Mon, 19 Jun 2023 08:36:16 +0200 Message-Id: <20230619063618.2595217-4-linus.walleij@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230619063618.2595217-1-linus.walleij@linaro.org> References: <20230619063618.2595217-1-linus.walleij@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230618_233632_048106_74166D5D X-CRM114-Status: GOOD ( 16.23 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The DIR-890L is very similar to DIR-885L, but has both USB2 and USB3. The signature for the wrgac36 board was copied from DD-Wrt. The DIR-890L bootstrap will only load the first 2 MB after the SEAMA header in the NAND flash, uncompress it with LZMA and execute it. Since the compressed kernel will not fit in 2 MB we have a proble [...] Content analysis details: (-0.2 points, 5.0 required) 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:231 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an 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.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The DIR-890L is very similar to DIR-885L, but has both USB2 and USB3. The signature for the wrgac36 board was copied from DD-Wrt. The DIR-890L bootstrap will only load the first 2 MB after the SEAMA header in the NAND flash, uncompress it with LZMA and execute it. Since the compressed kernel will not fit in 2 MB we have a problem. Solve this by putting a LZMA compressed U-Boot into the first 128 KB of the flash followed by the kernel. The bootstrap will then uncompress and execute U-Boot and then we let U-Boot read the kernel from flash and execute it. Signed-off-by: Linus Walleij --- ChangeLog v2->v3: - Rebased on master - Test with kernel v6.1 ChangeLog v1->v2: - Rebased on master --- .../base-files/etc/uci-defaults/09_fix_crc | 3 ++- .../base-files/lib/upgrade/platform.sh | 1 + target/linux/bcm53xx/image/Makefile | 21 +++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/target/linux/bcm53xx/base-files/etc/uci-defaults/09_fix_crc b/target/linux/bcm53xx/base-files/etc/uci-defaults/09_fix_crc index 89ce8970d75a..c39625b86536 100644 --- a/target/linux/bcm53xx/base-files/etc/uci-defaults/09_fix_crc +++ b/target/linux/bcm53xx/base-files/etc/uci-defaults/09_fix_crc @@ -13,7 +13,8 @@ fixseama() { } case "$board" in -dlink,dir-885l) +dlink,dir-885l | \ +dlink,dir-890l) fixseama ;; *) diff --git a/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh b/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh index 3ebde77d3f94..958a9fd247ab 100644 --- a/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh @@ -37,6 +37,7 @@ platform_expected_image() { case "$machine" in "dlink,dir-885l") echo "seamaseal wrgac42_dlink.2015_dir885l"; return;; + "dlink,dir-890l") echo "seamaseal wrgac36_dlink.2013gui_dir890"; return;; "luxul,abr-4500-v1") echo "lxl ABR-4500"; return;; "luxul,xap-810-v1") echo "lxl XAP-810"; return;; "luxul,xap-1410v1") echo "lxl XAP-1410"; return;; diff --git a/target/linux/bcm53xx/image/Makefile b/target/linux/bcm53xx/image/Makefile index defa68e59f98..eb9f27c91eb5 100644 --- a/target/linux/bcm53xx/image/Makefile +++ b/target/linux/bcm53xx/image/Makefile @@ -88,6 +88,12 @@ define Build/luxul-lxl mv $@.new $@ endef +# Outputs a lzma compressed U-Boot that start at 0x00008000 +# just like the D-Link boot loaders expect +define Build/dlink-uboot-bin + $(STAGING_DIR_HOST)/bin/lzma e $(STAGING_DIR_IMAGE)/$(DEVICE_NAME)-u-boot.bin -d16 $@ +endef + define Build/seama-nand # Seama entity $(STAGING_DIR_HOST)/bin/oseama \ @@ -266,6 +272,21 @@ define Device/dlink_dir-885l endef TARGET_DEVICES += dlink_dir-885l +define Device/dlink_dir-890l + DEVICE_VENDOR := D-Link + DEVICE_MODEL := DIR-890L + DEVICE_PACKAGES := $(BRCMFMAC_43602A1) $(USB2_PACKAGES) $(USB3_PACKAGES) + # Layout: U-boot (128kb max) followed by kernel and appended DTB. + # This is done because the boot loader will only read the first 2 MB + # from the flash and decompress the LZMA it finds there after the + # SEAMA header. Since the compressed kernel will not fit in 2 MB, + # we put U-Boot there and let U-Boot read and execute the kernel. + KERNEL := dlink-uboot-bin | pad-to 128k | append-kernel | append-dtb + $(Device/dlink) + SIGNATURE := wrgac36_dlink.2013gui_dir890 +endef +TARGET_DEVICES += dlink_dir-890l + define Device/dlink_dwl-8610ap DEVICE_VENDOR := D-Link DEVICE_MODEL := DWL-8610AP From patchwork Mon Jun 19 06:36:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 1796330 X-Patchwork-Delegate: zajec5@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=nuQFBUk9; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=kMSdbcNm; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Ql0Vb2xYwz20Z9 for ; Mon, 19 Jun 2023 16:39:35 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3DKYN+09wBtp8ZJeFI9/OOqqNy6wgv3J+5LePV+qLxc=; b=nuQFBUk9kiHxpl FIfi+hlha5CcPegs/Ka3NxXFRStW+HJRAdgrX5SzlFmjHoSXCOJ9xxR6p339j4zn7lvwpo0odc4jR VSgaJ8NsEOXYsR94tT4UAfz/i4sH+SC2xxer2B7T+3DkLCBOlNfZw+YHGgVtKYIfbg9mXvj6gJpxQ DlLeoyOFOhRuSp7pblBTZLQtxkM/KuZ6Z6VeEphfyvXZAshfsZTf3/gTcZz3R6d/cZca/yciNPOBm Dc5Z6GdDqDo/KBVTzSbPMrkuRsinXo4eJxB0BGc/xcIVVylOaPkCO7hF9u6k3nuasbHRcpDbewMdk CXAzUjR28GdA+Ev5unMA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qB8VA-007ajq-2P; Mon, 19 Jun 2023 06:36:36 +0000 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qB8V6-007aie-3B for openwrt-devel@lists.openwrt.org; Mon, 19 Jun 2023 06:36:34 +0000 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2b466073e19so24311021fa.1 for ; Sun, 18 Jun 2023 23:36:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687156591; x=1689748591; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mzcX1h8NpEHiZQR/fPd/KF8FtZZ0E+I5w0xO+X3gTkw=; b=kMSdbcNmNp63vUMOqEZ+di3fwSIH2XIh085DtvqPTip/af6PL0W/HABT+KA3Wdowpv ID0SsyVMc8F2ab7L5vZdcFJu1gINyVUMbk0YQdC6Yr/MZaYJ3Q4XlCzJxJ5yCksbMoPr u6OIfh5CdDnM1UVz7CmvsdS9oVAt7TPyfzYA+DZ12YeJWaoS7jXBdR4fm5/N80sbeKLM gMStubskNIUN3xfIdUajUmrnXbKdQ4ht4omUfEud8GOgoLlSeS2xD3JnixTJNBuz+3R4 gDoxENY9hTZnF2xL3/gmMwB+iTsgf5U5ZmfnyDfTqiAqqX1H393NGQ0LA9Jzeuwy2hgc 64xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687156591; x=1689748591; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mzcX1h8NpEHiZQR/fPd/KF8FtZZ0E+I5w0xO+X3gTkw=; b=kxfCjk5fPU2KkRuYHqWod1u2zDT1MBfybft+fiKU/duosA/d5OpY9oYfDxvb8P5GVg uw+LbrxYI5jZpVzwegNBBROAwOVvlw4PmKDhU5yI1fQRZY6NlNPNpYmECg0IQI2b0oPL imdiyW+Pu/VlQ9iGjP/CQY8aHQbg0Zit8jdShaWC4H/zLT6hherr/PZbcM81SZg1BylK wG0YSQxj+EcFd3T0l89QMoJ62yGvo0hXyL+wRV+mVqvcAKhn+brqLb7yKlV/ZlfVuy0j WZLYpIJvw134HTE2EhA2f9/Xxq62vQvI8gFAhLkT7cqHk8m5m9q73dg2CeLOYgBb2hrk tRfw== X-Gm-Message-State: AC+VfDzzv3Ra2RsL1v4JV32ShWEugcltIOlEWoWmeSonWR1QxWCw4Hzk a7CM/5CvbvuzG0qXbROzN1w0b3Et2GO+c/3JqqM= X-Google-Smtp-Source: ACHHUZ7liCgEkOkhnDbMEuU1KmgwrIy0U6iJV8Xlowa6/6YPw8+OMB0/XiM5vvZQHLJa/7WE+Ig5Iw== X-Received: by 2002:a2e:8908:0:b0:2b4:6f70:c393 with SMTP id d8-20020a2e8908000000b002b46f70c393mr2114095lji.20.1687156591426; Sun, 18 Jun 2023 23:36:31 -0700 (PDT) Received: from Fecusia.lan (c-05d8225c.014-348-6c756e10.bbcust.telenor.se. [92.34.216.5]) by smtp.gmail.com with ESMTPSA id z11-20020a2e7e0b000000b002ad9df0586bsm957426ljc.132.2023.06.18.23.36.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Jun 2023 23:36:31 -0700 (PDT) From: Linus Walleij To: openwrt-devel@lists.openwrt.org Cc: Christian Lamparter , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Linus Walleij Subject: [PATCH v3 4/5] bcm53xx: dir885/dir890: Tag both partitions as SEAMA Date: Mon, 19 Jun 2023 08:36:17 +0200 Message-Id: <20230619063618.2595217-5-linus.walleij@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230619063618.2595217-1-linus.walleij@linaro.org> References: <20230619063618.2595217-1-linus.walleij@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230618_233633_027678_295E81AC X-CRM114-Status: GOOD ( 14.47 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The newly added D-Link DIR-890L also needs to have a seama tag on its partition so that it will be split properly by mtdsplit. Signed-off-by: Linus Walleij --- ChangeLog v2->v3: - Add patch for kernel v6.1 - Test with kernel v6.1 ChangeLog v1->v2: - Rebased on master --- ...-dts-BCM5301X-Describe-pa [...] Content analysis details: (-0.2 points, 5.0 required) 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:231 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an 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.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The newly added D-Link DIR-890L also needs to have a seama tag on its partition so that it will be split properly by mtdsplit. Signed-off-by: Linus Walleij --- ChangeLog v2->v3: - Add patch for kernel v6.1 - Test with kernel v6.1 ChangeLog v1->v2: - Rebased on master --- ...-dts-BCM5301X-Describe-partition-formats.patch | 15 +++++++++++++-- ...-dts-BCM5301X-Describe-partition-formats.patch | 15 +++++++++++++-- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/target/linux/bcm53xx/patches-5.15/321-ARM-dts-BCM5301X-Describe-partition-formats.patch b/target/linux/bcm53xx/patches-5.15/321-ARM-dts-BCM5301X-Describe-partition-formats.patch index f2861177dd1d..185db3960761 100644 --- a/target/linux/bcm53xx/patches-5.15/321-ARM-dts-BCM5301X-Describe-partition-formats.patch +++ b/target/linux/bcm53xx/patches-5.15/321-ARM-dts-BCM5301X-Describe-partition-formats.patch @@ -1,4 +1,4 @@ -From 7166207bd1d8c46d09d640d46afc685df9bb9083 Mon Sep 17 00:00:00 2001 +From a054e2fe2d00bd32f308986de654b66f054083d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Thu, 22 Nov 2018 09:21:49 +0100 Subject: [PATCH] ARM: dts: BCM5301X: Describe partition formats @@ -11,7 +11,8 @@ It's needed by OpenWrt for custom partitioning. Signed-off-by: Rafał Miłecki --- arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts | 1 + - 1 file changed, 1 insertion(+) + arch/arm/boot/dts/bcm47094-dlink-dir-890l.dts | 1 + + 2 files changed, 2 insertions(+) --- a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts +++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts @@ -23,3 +24,13 @@ Signed-off-by: Rafał Miłecki }; }; }; +--- a/arch/arm/boot/dts/bcm47094-dlink-dir-890l.dts ++++ b/arch/arm/boot/dts/bcm47094-dlink-dir-890l.dts +@@ -151,6 +151,7 @@ + firmware@0 { + label = "firmware"; + reg = <0x00000000 0x08000000>; ++ compatible = "seama"; + }; + }; + }; diff --git a/target/linux/bcm53xx/patches-6.1/321-ARM-dts-BCM5301X-Describe-partition-formats.patch b/target/linux/bcm53xx/patches-6.1/321-ARM-dts-BCM5301X-Describe-partition-formats.patch index f2861177dd1d..185db3960761 100644 --- a/target/linux/bcm53xx/patches-6.1/321-ARM-dts-BCM5301X-Describe-partition-formats.patch +++ b/target/linux/bcm53xx/patches-6.1/321-ARM-dts-BCM5301X-Describe-partition-formats.patch @@ -1,4 +1,4 @@ -From 7166207bd1d8c46d09d640d46afc685df9bb9083 Mon Sep 17 00:00:00 2001 +From a054e2fe2d00bd32f308986de654b66f054083d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Thu, 22 Nov 2018 09:21:49 +0100 Subject: [PATCH] ARM: dts: BCM5301X: Describe partition formats @@ -11,7 +11,8 @@ It's needed by OpenWrt for custom partitioning. Signed-off-by: Rafał Miłecki --- arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts | 1 + - 1 file changed, 1 insertion(+) + arch/arm/boot/dts/bcm47094-dlink-dir-890l.dts | 1 + + 2 files changed, 2 insertions(+) --- a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts +++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts @@ -23,3 +24,13 @@ Signed-off-by: Rafał Miłecki }; }; }; +--- a/arch/arm/boot/dts/bcm47094-dlink-dir-890l.dts ++++ b/arch/arm/boot/dts/bcm47094-dlink-dir-890l.dts +@@ -151,6 +151,7 @@ + firmware@0 { + label = "firmware"; + reg = <0x00000000 0x08000000>; ++ compatible = "seama"; + }; + }; + }; From patchwork Mon Jun 19 06:36:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 1796323 X-Patchwork-Delegate: zajec5@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=hc3WxXPg; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=i6N6JE8e; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Ql0VD6tB6z20Wk for ; Mon, 19 Jun 2023 16:39:16 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Py4IJWCkucuhLR8ITYWI+SjWpkzT1aq2Dy3NfamxMxc=; b=hc3WxXPgaM0aHp 2SToiNQ9MHmmcgjNRAgsNMMM9V8eZrjy9UmJzrDQD3CpmObDWygl8DFB0eFChNzlr0f1U5mC3qpgw CgKQKk8cytcBZ0Iq/QAGDxs6pSCkm3Dgq0I4PGB4gEwRi2CrGf/KR9/IWKgp51qj/igTHZA+bwzAq xLUohkNnzMLzBoDteteO/mEoqKd2/JFpTJVVrnsxTcvCG03lqb5XGB7c2aLqR7aP/GbKgGJn0hTLR 9ByrhGgpC76qnZlhSFKVoxG0qcPAaC4tqmFeEAphY/IMw6GeJ3B9tL1dNrhT6wm2tNtCcSCNgmK1N /NyueO92qu8yUGbnFokQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qB8VD-007akc-0m; Mon, 19 Jun 2023 06:36:39 +0000 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qB8V8-007aj9-3B for openwrt-devel@lists.openwrt.org; Mon, 19 Jun 2023 06:36:36 +0000 Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2b46f5f4d79so15532311fa.1 for ; Sun, 18 Jun 2023 23:36:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687156593; x=1689748593; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NEN8Occ5+V2lPtVeyOvNdbMuPMBQ11H+I5WI3BVnty4=; b=i6N6JE8evx7aVHad39XwoOQPCJRhXmfTwYnKf3/vHvfxcUGRgYaf49b0REcFkPiOy8 g0MeRfpyiwBoO19D1CYiYmi+qUHoYqevbaQhN4tk8+m2cOqaLL1ogxDHCOIBI7BXmJur rDPFsxkT4tAftnEw+6zNAyvarE+6I1xtI1Jx3dzE9fB9vdtFIRhyHzcJ6blY7hF2NKIA SCreZ+YviVueau2If9IhJIBmuihxPweFMkj05cCl8MlnJb01R1Gyp6szdhNlU/GckfuH 3cxMG9Q1uSpLQk74KuuHQn+UKhpQ8J9k3ydjGsynLneGRNgmeqrzarE2vb9i6tR5bpB9 QRPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687156593; x=1689748593; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NEN8Occ5+V2lPtVeyOvNdbMuPMBQ11H+I5WI3BVnty4=; b=Gq99tdQXZjMpwy6pfZEAThxrO8QQuNoTogHAZL8JCJLItOfY6a5node+O2M8+IwF4Q Mczzxkb/ixw8H2zqh7n/n37mEsJ2RVmdq+4rAjKF0bkh21h4vgYVu0Lh2zzp98DMy9rt f16jXZP2Nmp3VY/nRal0ZQC8q7xHQ7RNxVYf/zLJn+q367G8/iW6vr/7hqkhAwCYzbd6 sWHPeLUdjnm4T1qPHj/anvPPf1CAZ67M7+l77VA9vvRY0ptjN1xrE9/EuNJosguzxKkk VPxALGzGVcHrllY739qG+UrNkYgrDJUWjQ+4nSO0umAP+PoXgsmQwLkhRO+u4l4DVCP/ S8ng== X-Gm-Message-State: AC+VfDz97w6NwaIk1RqZ0eeL9GSNOe+aoG2wyrVgE855z3SiMuydp7Cc FgbL0Szo/C1XUMNI9OMGYxLKmvPq0Y8ScoSl1mA= X-Google-Smtp-Source: ACHHUZ5GProZ1yx6gQ+4A8rCy3dKTbMrzsAY029++RqXG3n2h+t1FR46AOQdD7snv++v8TF6Ar1bJw== X-Received: by 2002:a2e:a4a5:0:b0:2b4:5eee:5d9d with SMTP id g5-20020a2ea4a5000000b002b45eee5d9dmr2162796ljm.26.1687156593422; Sun, 18 Jun 2023 23:36:33 -0700 (PDT) Received: from Fecusia.lan (c-05d8225c.014-348-6c756e10.bbcust.telenor.se. [92.34.216.5]) by smtp.gmail.com with ESMTPSA id z11-20020a2e7e0b000000b002ad9df0586bsm957426ljc.132.2023.06.18.23.36.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Jun 2023 23:36:33 -0700 (PDT) From: Linus Walleij To: openwrt-devel@lists.openwrt.org Cc: Christian Lamparter , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Linus Walleij Subject: [PATCH v3 5/5] bcm53xx: Add network configuration for DIR-890L Date: Mon, 19 Jun 2023 08:36:18 +0200 Message-Id: <20230619063618.2595217-6-linus.walleij@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230619063618.2595217-1-linus.walleij@linaro.org> References: <20230619063618.2595217-1-linus.walleij@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230618_233635_018884_57DC211D X-CRM114-Status: UNSURE ( 9.82 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This adds the lan/wan default bridge config and also the MAC NVRAM read-out for et2. DIR-885L was missing a default bridge config so I just added that too while I was at it. Signed-off-by: Linus Walleij --- ChangeLog v2->v3: - Rebased on master ChangeLog v1->v2: - The DIR-890L sets up the Mac address from the NVRAM indicated in the device tree s [...] Content analysis details: (-0.2 points, 5.0 required) 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:22d listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an 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.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This adds the lan/wan default bridge config and also the MAC NVRAM read-out for et2. DIR-885L was missing a default bridge config so I just added that too while I was at it. Signed-off-by: Linus Walleij --- ChangeLog v2->v3: - Rebased on master ChangeLog v1->v2: - The DIR-890L sets up the Mac address from the NVRAM indicated in the device tree so drop that oneliner. --- target/linux/bcm53xx/base-files/etc/board.d/02_network | 4 ++++ 1 file changed, 4 insertions(+) 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 6bec600540ea..ba1cf7ac8d94 100644 --- a/target/linux/bcm53xx/base-files/etc/board.d/02_network +++ b/target/linux/bcm53xx/base-files/etc/board.d/02_network @@ -16,6 +16,10 @@ bcm53xx_setup_interfaces() asus,rt-ac88u) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 extsw" "wan" ;; + dlink,dir-885l | \ + dlink,dir-890l) + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan" + ;; dlink,dwl-8610ap) ucidef_set_interface_lan "eth0 eth1" "dhcp" ;;