diff options
author | Peter Robinson <pbrobinson@gmail.com> | 2020-03-05 13:17:56 +0000 |
---|---|---|
committer | Peter Robinson <pbrobinson@gmail.com> | 2020-03-05 13:17:56 +0000 |
commit | d61f9f67f874634930c6637d498e4e1a4fb58270 (patch) | |
tree | 9c90043316302090c72203c6fd99b68469faf012 /ARM-dts-bcm2711-Move-emmc2-into-its-own-bus.patch | |
parent | e36b70bfaacea3836fcbd9a762a10009171b4736 (diff) | |
download | kernel-d61f9f67f874634930c6637d498e4e1a4fb58270.tar.gz kernel-d61f9f67f874634930c6637d498e4e1a4fb58270.tar.xz kernel-d61f9f67f874634930c6637d498e4e1a4fb58270.zip |
rpi4: add patch for newer HW rev fixes for emmc
Diffstat (limited to 'ARM-dts-bcm2711-Move-emmc2-into-its-own-bus.patch')
-rw-r--r-- | ARM-dts-bcm2711-Move-emmc2-into-its-own-bus.patch | 168 |
1 files changed, 168 insertions, 0 deletions
diff --git a/ARM-dts-bcm2711-Move-emmc2-into-its-own-bus.patch b/ARM-dts-bcm2711-Move-emmc2-into-its-own-bus.patch new file mode 100644 index 000000000..dd0087104 --- /dev/null +++ b/ARM-dts-bcm2711-Move-emmc2-into-its-own-bus.patch @@ -0,0 +1,168 @@ +From patchwork Wed Mar 4 13:24:37 2020 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> +X-Patchwork-Id: 11420129 +Return-Path: + <SRS0=pU4t=4V=lists.infradead.org=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@kernel.org> +Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org + [172.30.200.123]) + by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C6D01139A + for <patchwork-linux-arm@patchwork.kernel.org>; + Wed, 4 Mar 2020 13:24:52 +0000 (UTC) +Received: from bombadil.infradead.org (bombadil.infradead.org + [198.137.202.133]) + (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) + (No client certificate requested) + by mail.kernel.org (Postfix) with ESMTPS id 8EA4C20848 + for <patchwork-linux-arm@patchwork.kernel.org>; + Wed, 4 Mar 2020 13:24:52 +0000 (UTC) +Authentication-Results: mail.kernel.org; + dkim=pass (2048-bit key) header.d=lists.infradead.org + header.i=@lists.infradead.org header.b="rVot4hOX" +DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8EA4C20848 +Authentication-Results: mail.kernel.org; + dmarc=none (p=none dis=none) header.from=suse.de +Authentication-Results: mail.kernel.org; + spf=none + smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org +DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; + d=lists.infradead.org; s=bombadil.20170209; h=Sender: + Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: + List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To + :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: + Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: + List-Owner; bh=8vOVvuwuEiZ/+aeWTFI6G54jitKev/MSiGHvL/NuYpM=; b=rVot4hOXzlJULi + AIV0tWo7xq5srSJPr0aW3ccsKyfTNsVGmB0Y4G8A2Wqd+29xOVNJGk9jIAaRqBaAEGozzfFQj8JuQ + YRKsDyKXSMgpM5EHFtlq7TSvY21pe6uHhTkMCYnhLdZu7BrX9V2BLfnG7b7kx+wVgh2SDk5Tu8iJI + 3vNkR22Qd4bIZAMQVwr97BN6IasYg2C9Q1hACZKKYVTxOvCw1MDDfedhRK9IxgZXV8eacZco5TlC+ + 3FlBQSP6dxBhpgAZ2VSD8k94TZe8Vnj1HMmja4MShu5hUOaBMzV/cvTA0y9OFseFvzL3YES1oyPzk + vPYT4iiUYIWQEEsfDJoA==; +Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) + by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) + id 1j9U10-0004Kq-KB; Wed, 04 Mar 2020 13:24:46 +0000 +Received: from mx2.suse.de ([195.135.220.15]) + by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) + id 1j9U0x-0004KG-Lg; Wed, 04 Mar 2020 13:24:45 +0000 +X-Virus-Scanned: by amavisd-new at test-mx.suse.de +Received: from relay2.suse.de (unknown [195.135.220.254]) + by mx2.suse.de (Postfix) with ESMTP id 28610AAC7; + Wed, 4 Mar 2020 13:24:42 +0000 (UTC) +From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> +To: Rob Herring <robh+dt@kernel.org>, + Nicolas Saenz Julienne <nsaenzjulienne@suse.de> +Subject: [PATCH v2] ARM: dts: bcm2711: Move emmc2 into its own bus +Date: Wed, 4 Mar 2020 14:24:37 +0100 +Message-Id: <20200304132437.20164-1-nsaenzjulienne@suse.de> +X-Mailer: git-send-email 2.25.1 +MIME-Version: 1.0 +X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 +X-CRM114-CacheID: sfid-20200304_052443_860022_0913505C +X-CRM114-Status: GOOD ( 14.37 ) +X-Spam-Score: -2.3 (--) +X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: + Content analysis details: (-2.3 points) + pts rule name description + ---- ---------------------- + -------------------------------------------------- + -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, + medium trust [195.135.220.15 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.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) + [195.135.220.15 listed in wl.mailspike.net] + 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders +X-BeenThere: linux-arm-kernel@lists.infradead.org +X-Mailman-Version: 2.1.29 +Precedence: list +List-Id: <linux-arm-kernel.lists.infradead.org> +List-Unsubscribe: + <http://lists.infradead.org/mailman/options/linux-arm-kernel>, + <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> +List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> +List-Post: <mailto:linux-arm-kernel@lists.infradead.org> +List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> +List-Subscribe: + <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, + <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> +Cc: devicetree@vger.kernel.org, f.fainelli@gmail.com, phil@raspberrypi.org, + linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, + linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org +Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> +Errors-To: + linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org + +Depending on bcm2711's revision its emmc2 controller might have +different DMA constraints. Raspberry Pi 4's firmware will take care of +updating those, but only if a certain alias is found in the device tree. +So, move emmc2 into its own bus, so as not to pollute other devices with +dma-ranges changes and create the emmc2bus alias. + +Based in Phil ELwell's downstream implementation. + +Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> +--- + +Changes since v1: + - Add comment in dt + - Fix commit title + + arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 1 + + arch/arm/boot/dts/bcm2711.dtsi | 25 ++++++++++++++++++++----- + 2 files changed, 21 insertions(+), 5 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts +index 1d4b589fe233..e26ea9006378 100644 +--- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts ++++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts +@@ -20,6 +20,7 @@ memory@0 { + }; + + aliases { ++ emmc2bus = &emmc2bus; + ethernet0 = &genet; + pcie0 = &pcie0; + }; +diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi +index d1e684d0acfd..a91cf68e3c4c 100644 +--- a/arch/arm/boot/dts/bcm2711.dtsi ++++ b/arch/arm/boot/dts/bcm2711.dtsi +@@ -241,17 +241,32 @@ pwm1: pwm@7e20c800 { + status = "disabled"; + }; + ++ hvs@7e400000 { ++ interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>; ++ }; ++ }; ++ ++ /* ++ * emmc2 has different DMA constraints based on SoC revisions. It was ++ * moved into its own bus, so as for RPi4's firmware to update them. ++ * The firmware will find whether the emmc2bus alias is defined, and if ++ * so, it'll edit the dma-ranges property below accordingly. ++ */ ++ emmc2bus: emmc2bus { ++ compatible = "simple-bus"; ++ #address-cells = <2>; ++ #size-cells = <1>; ++ ++ ranges = <0x0 0x7e000000 0x0 0xfe000000 0x01800000>; ++ dma-ranges = <0x0 0xc0000000 0x0 0x00000000 0x40000000>; ++ + emmc2: emmc2@7e340000 { + compatible = "brcm,bcm2711-emmc2"; +- reg = <0x7e340000 0x100>; ++ reg = <0x0 0x7e340000 0x100>; + interrupts = <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clocks BCM2711_CLOCK_EMMC2>; + status = "disabled"; + }; +- +- hvs@7e400000 { +- interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>; +- }; + }; + + arm-pmu { |