From patchwork Sat May 22 05:59:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juerg Haefliger X-Patchwork-Id: 1482377 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FnCVz5Q4Nz9sVt; Sat, 22 May 2021 16:00:10 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lkKg7-0003ZR-9r; Sat, 22 May 2021 06:00:03 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lkKg5-0003YI-C0 for kernel-team@lists.ubuntu.com; Sat, 22 May 2021 06:00:01 +0000 Received: from mail-wr1-f71.google.com ([209.85.221.71]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lkKg5-0003Ey-3m for kernel-team@lists.ubuntu.com; Sat, 22 May 2021 06:00:01 +0000 Received: by mail-wr1-f71.google.com with SMTP id a5-20020a5d6ca50000b029011035a261adso9999915wra.17 for ; Fri, 21 May 2021 23:00:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=h/DlBGOdNY0nXRFv4uciP1vLr37pAhKPYqmkkBrWcmk=; b=uZw7usa8we6oDiIg1Iei3fU4sH/xfAc+dHhOFSiVsHqo/1WZdltnetzPpUdZr1DGtV Gl8nF8wGfV92krDXqVQ4rMK2xAbxuKu7XROI8LKOdbwzdUiPsnynpYP3i81ckhv608m1 AWbBJ/5ZTjYcEMObFeoq/4D76w0sEMEZQAgD8TPmAxL81vl6AV6RGHYIf+zveSYSA82l urR/Yg96+JOUWS20Whym4sWuiEJkpTyBL6m/iBZln55HPrKSbwWJokmIR1aWt5Qbwxyd TA96X4W6Kuk2OVXPP8MbZOXftAlHXyXKwt4HERringxTSnsDPXl+sSnyB3CFlXGHe0IE b66Q== X-Gm-Message-State: AOAM530En4sCrQ2ke4PwhE8CIbHLO4qoLVelNU/3D1VGhaqCVDlcuPJS rrOOcjcB3uCtb+2YN8V17WCgaNYTa7w9i1OIOIPspgrmUtgb4fVkN+yXNLg1x91PlP+gJDmSbEj T4rvNCT/dHDdFcfpgxKz0uTuzVSXYWtmdx1mSRrHPyA== X-Received: by 2002:a1c:2155:: with SMTP id h82mr11804850wmh.115.1621663200898; Fri, 21 May 2021 23:00:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSRBbtj7YYLfwu5k3AyqKhFeN6I9NBQrUTGwhnhT4cYtQmCCsnksrXM+jMDCRxxjDs28If8Q== X-Received: by 2002:a1c:2155:: with SMTP id h82mr11804843wmh.115.1621663200723; Fri, 21 May 2021 23:00:00 -0700 (PDT) Received: from gollum.fritz.box ([194.191.244.86]) by smtp.gmail.com with ESMTPSA id s11sm1544330wmf.14.2021.05.21.23.00.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 May 2021 23:00:00 -0700 (PDT) From: Juerg Haefliger X-Google-Original-From: Juerg Haefliger To: kernel-team@lists.ubuntu.com Subject: [SRU][F/raspi][G/raspi][H/raspi][PATCH 1/2] UBUNTU: [Config] raspi: Disable ATH9K_AHB, set ATH9K_PCI=y Date: Sat, 22 May 2021 07:59:58 +0200 Message-Id: <20210522055959.5465-2-juergh@canonical.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210522055959.5465-1-juergh@canonical.com> References: <20210522055959.5465-1-juergh@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1927037 The Raspberry Pis don't have an AHB-attached ATH9K but one can be plugged into the PCIe bus on a CM4, so disable AHB and enable PCI. The dependent option is set to match the generic kernel. Signed-off-by: Juerg Haefliger --- debian.raspi/config/config.common.ubuntu | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/debian.raspi/config/config.common.ubuntu b/debian.raspi/config/config.common.ubuntu index 8d181940b3d7..9ccc0de03fa0 100644 --- a/debian.raspi/config/config.common.ubuntu +++ b/debian.raspi/config/config.common.ubuntu @@ -512,7 +512,7 @@ CONFIG_ATH6KL_SDIO=m # CONFIG_ATH6KL_TRACING is not set CONFIG_ATH6KL_USB=m CONFIG_ATH9K=m -CONFIG_ATH9K_AHB=y +# CONFIG_ATH9K_AHB is not set CONFIG_ATH9K_BTCOEX_SUPPORT=y CONFIG_ATH9K_CHANNEL_CONTEXT=y CONFIG_ATH9K_COMMON=m @@ -524,7 +524,8 @@ CONFIG_ATH9K_HTC=m CONFIG_ATH9K_HTC_DEBUGFS=y CONFIG_ATH9K_HW=m CONFIG_ATH9K_HWRNG=y -# CONFIG_ATH9K_PCI is not set +CONFIG_ATH9K_PCI=y +CONFIG_ATH9K_PCI_NO_EEPROM=m CONFIG_ATH9K_PCOEM=y CONFIG_ATH9K_RFKILL=y CONFIG_ATH9K_STATION_STATISTICS=y From patchwork Sat May 22 05:59:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juerg Haefliger X-Patchwork-Id: 1482378 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FnCVz4Y0bz9sSs; Sat, 22 May 2021 16:00:11 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lkKgA-0003aC-Lv; Sat, 22 May 2021 06:00:06 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lkKg5-0003Z5-Sh for kernel-team@lists.ubuntu.com; Sat, 22 May 2021 06:00:01 +0000 Received: from mail-wr1-f71.google.com ([209.85.221.71]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lkKg5-0003Fx-JX for kernel-team@lists.ubuntu.com; Sat, 22 May 2021 06:00:01 +0000 Received: by mail-wr1-f71.google.com with SMTP id u5-20020adf9e050000b029010df603f280so10015373wre.18 for ; Fri, 21 May 2021 23:00:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CxqvWGHD58vi7ITP8PeEs8NsWqUFRirDC9n+mIGlLjk=; b=fi1lWJ0MUuSIk/7oMdBBxvlPExP54xMgq4V/+AaalC4Mtd8iCFifLwPg+Guu3IDW25 /P5LfR0mFkors1lCzj2qlbpiSa9E5v7V67bDjYT2EhDMHQxaPq5K8NUPbtRxXFjM7kDF o5XMREhKTnka6zQD1C7CEGbyWvNvNwxxpL/bjqESzttF5p+r61U0CrzUcV/crQCVCkQc ng8l+s9iJkVxCOlHXuWt1HC9rfxTEfyje8cn2d/r86vH2Vj3XDoSPmEBwAJoHQ8SfL1x kSqlLidu3V6zkc7ch+KNyxJotFzWMca/D0cuxuj8mqbjFOhlfsupfgf4sbMEs1kzoari 3yjQ== X-Gm-Message-State: AOAM533Nv57kqFlKlMNREUsIe/gkhfhb8kl3GooOF7XTwiGKo5dlNZbz Lj7HFSTb9Nq36G5eKmZCl39Cv0ojy80KcaacUsy/qvOzXEjJ9IWBBc9UvHw5Ym4EnCPt7WNJsCD 57jxloYCXta3EQb482y2V880+PMDy5c8lFGuz4LrXjA== X-Received: by 2002:a5d:4ccc:: with SMTP id c12mr12706518wrt.137.1621663201355; Fri, 21 May 2021 23:00:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXYu48lC0eLeuce6k3vySU2Lb3EjMa8Ymy5vyBqX1yYbbBZRhXe559Z9Do2W3g1pqMJ2cO3g== X-Received: by 2002:a5d:4ccc:: with SMTP id c12mr12706505wrt.137.1621663201156; Fri, 21 May 2021 23:00:01 -0700 (PDT) Received: from gollum.fritz.box ([194.191.244.86]) by smtp.gmail.com with ESMTPSA id s11sm1544330wmf.14.2021.05.21.23.00.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 May 2021 23:00:00 -0700 (PDT) From: Juerg Haefliger X-Google-Original-From: Juerg Haefliger To: kernel-team@lists.ubuntu.com Subject: [SRU][F/raspi][PATCH 2/2] overlays: Add pcie-32bit-dma overlay Date: Sat, 22 May 2021 07:59:59 +0200 Message-Id: <20210522055959.5465-3-juergh@canonical.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210522055959.5465-1-juergh@canonical.com> References: <20210522055959.5465-1-juergh@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Nicolas Saenz Julienne BugLink: https://bugs.launchpad.net/bugs/1927037 In order to accommodate full PCI DMA access to memory on newer BCM2711 revisions, we're forced to map PCIe's view of physical memory with an offset. This offset makes DMA addressing dependent on having 64bit support on the PCI device's side. Which isn't always the case. In order to mitigate this, introduce the pcie-32bit-dma overlay which will forbid firmware from updating the default inbound memory window. The default setting, albeit limited to accessing the lower 3GB of memory, will allow for 32bit DMA addresses at the expense of having to bounce buffers. Link: https://github.com/raspberrypi/linux/issues/4197 Signed-off-by: Nicolas Saenz Julienne (cherry picked from commit 2c51556df1be8d1a72a207da277d648cfef40fd4 rpi-5.11.y) Signed-off-by: Juerg Haefliger --- arch/arm/boot/dts/overlays/Makefile | 1 + arch/arm/boot/dts/overlays/README | 7 +++++++ arch/arm/boot/dts/overlays/overlay_map.dts | 4 ++++ .../dts/overlays/pcie-32bit-dma-overlay.dts | 18 ++++++++++++++++++ 4 files changed, 30 insertions(+) create mode 100644 arch/arm/boot/dts/overlays/pcie-32bit-dma-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile index b6abddcb2615..ae2ff52c9275 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -126,6 +126,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ ov9281.dtbo \ papirus.dtbo \ pca953x.dtbo \ + pcie-32bit-dma.dtbo \ pibell.dtbo \ pifacedigital.dtbo \ pifi-40.dtbo \ diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README index f3d6bf57f40b..03fdbdbe4729 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -2055,6 +2055,13 @@ Params: addr I2C address of expander. Default 0x20. xra1202 Select the Exar XRA1202 (8 bit) +Name: pcie-32bit-dma +Info: Force PCIe config to support 32bit DMA addresses at the expense of + having to bounce buffers. +Load: dtoverlay=pcie-32bit-dma +Params: + + [ The pcf2127-rtc overlay has been deleted. See i2c-rtc. ] diff --git a/arch/arm/boot/dts/overlays/overlay_map.dts b/arch/arm/boot/dts/overlays/overlay_map.dts index b2e6b41216b2..e9a15fab82c7 100644 --- a/arch/arm/boot/dts/overlays/overlay_map.dts +++ b/arch/arm/boot/dts/overlays/overlay_map.dts @@ -37,6 +37,10 @@ deprecated = "use gpio-ir"; }; + pcie-32bit-dma { + bcm2711; + }; + pi3-act-led { renamed = "act-led"; }; diff --git a/arch/arm/boot/dts/overlays/pcie-32bit-dma-overlay.dts b/arch/arm/boot/dts/overlays/pcie-32bit-dma-overlay.dts new file mode 100644 index 000000000000..cca3e83721b7 --- /dev/null +++ b/arch/arm/boot/dts/overlays/pcie-32bit-dma-overlay.dts @@ -0,0 +1,18 @@ +/* + * pcie-32bit-dma-overlay.dts + */ + +/dts-v1/; +/plugin/; + +/ { + compatible = "brcm,bcm2711"; + + fragment@0 { + target-path = "/aliases"; + __overlay__ { + pcie0 = ""; + }; + }; + +};