From patchwork Mon Sep 18 15:38:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 9956997 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7069660385 for ; Mon, 18 Sep 2017 15:39:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E46528ABF for ; Mon, 18 Sep 2017 15:39:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 530F628C81; Mon, 18 Sep 2017 15:39:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D6EA228ABF for ; Mon, 18 Sep 2017 15:39:25 +0000 (UTC) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=amOjSlag28jVu5MNIBUb09eZjUx7Alq6nn8mdqbJD38=; b=Sjl KvQH86verzcjzmAoKYLWjihnOadTZgZbTIJfN78oI7+w1w7QdKMstmE5oEMZRVQQruaC5wVAWLzei wDfxAIMU69vnIc5mk2FjXeMY9CPcImNEx561BEIau+Fek8C+gx9V0HhSNIpC6zte+WWNayovCrQa9 emOxzeeb21RRp7fSWEI6KhSzvogSk5wCLUaD5M/8c897FHgFt8KdClAJE1UAgH8lDW9h0G+F3goU5 /spxIgFHpoejUwPEw6Yb6TKLMFI+d5XfTMSrmCagWLrKXYFML5B2q/9umHmegeu5jTr7JmaX71RcM HGGAJ9b2NHwmXpkySAzWqV2bpnt0h8Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dty8l-0002AY-8F; Mon, 18 Sep 2017 15:39:19 +0000 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dty8g-00028S-Ip for linux-arm-kernel@lists.infradead.org; Mon, 18 Sep 2017 15:39:17 +0000 Received: by mail-wm0-x22a.google.com with SMTP id i189so3880254wmf.1 for ; Mon, 18 Sep 2017 08:38:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=/iyAT4RKUn5MO9fktn2AuX7evnCo3Afgm4z3End3cbc=; b=POnEz+aq2H6k5PUQ5swl1erUbrw7u6hZdtKdl+ZU0suLeq0XtY3oCpheyZKT9phTkj UtbySa7TLEbuiZISrLgcZta0sElCeY/xJBSXV16VTb9wGNsR1FqXPhbCir/BNoa5M9vr dh4NDMuUeB9704L9sUkwSqSeQ0PVN7blLc/PI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=/iyAT4RKUn5MO9fktn2AuX7evnCo3Afgm4z3End3cbc=; b=CyGP6IYofzxSYE6CYPJo9ZIztq8s91fcX3YhIhclTkvBxwrZHG4hp1s3Zs8CRepQ3h 9Q7dmpdrAw//egUHaQvZhAz3avZHuQC7brhj1Or40dKjOo4ApVZv6DjPIzxpV8cfD6au DdLWQ9z3B36vIwbqoEGtSxFDWLGurkjr7Ak+pvUA9uU3g4YTOKILMaC88Og44rxf279i 6fHixvyEDqhQZpKB+uKzNUuMhwbmTxiNUC4f4CLGTxSZgT5lrPZcfMVJ9M0ulxqLARxG k2Vgn0N6soSD6LDvpXyxo8vd3T/nPEMvuiX07rP7gVRbnR4Pn03MgoOwNVe6NH2NCB5M bjjg== X-Gm-Message-State: AHPjjUhcLNRmTX2Ha0SwCPSrZ3yE4hK+eh7LmobV08HSgmoFXUFZIxG9 1fmOtrcwE6z1veW4nL8SL6K8kw== X-Google-Smtp-Source: AOwi7QCwlF0Y41p6qxI0tpEsoVgUNeRRO8958PUoTsE7uq5drMMd+opAJrBujBuMOTYt1qUs2AcVFA== X-Received: by 10.28.218.146 with SMTP id r140mr8530481wmg.14.1505749131147; Mon, 18 Sep 2017 08:38:51 -0700 (PDT) Received: from wychelm.lan (cpc87211-aztw31-2-0-cust196.18-1.cable.virginm.net. [82.46.60.197]) by smtp.gmail.com with ESMTPSA id k9sm8483431wrk.27.2017.09.18.08.38.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Sep 2017 08:38:50 -0700 (PDT) From: Daniel Thompson To: Liviu Dudau , Sudeep Holla , Lorenzo Pieralisi Subject: [PATCH] arm64: dts: foundation-v8: Enable PSCI mode Date: Mon, 18 Sep 2017 16:38:32 +0100 Message-Id: <20170918153832.16356-1-daniel.thompson@linaro.org> X-Mailer: git-send-email 2.9.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170918_083914_785320_B9FF0385 X-CRM114-Status: GOOD ( 15.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Daniel Thompson , patches@linaro.org, Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org, Rob Herring , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Currently if the Foundation model is running ARM Trusted Firmware then the kernel, which is configured to use spin tables, cannot start secondary processors or "power off" the simulation. Add a couple of labels to the include file, and introduce a new .dts file that uses these to override the enable-method. Signed-off-by: Daniel Thompson Acked-by: Mark Rutland --- arch/arm64/boot/dts/arm/Makefile | 3 +- .../boot/dts/arm/foundation-v8-gicv3-psci.dts | 51 ++++++++++++++++++++++ arch/arm64/boot/dts/arm/foundation-v8.dtsi | 8 ++-- 3 files changed, 57 insertions(+), 5 deletions(-) create mode 100644 arch/arm64/boot/dts/arm/foundation-v8-gicv3-psci.dts -- 2.9.5 diff --git a/arch/arm64/boot/dts/arm/Makefile b/arch/arm64/boot/dts/arm/Makefile index 75cc2aa10101..c9ec88809f3d 100644 --- a/arch/arm64/boot/dts/arm/Makefile +++ b/arch/arm64/boot/dts/arm/Makefile @@ -1,4 +1,5 @@ -dtb-$(CONFIG_ARCH_VEXPRESS) += foundation-v8.dtb foundation-v8-gicv3.dtb +dtb-$(CONFIG_ARCH_VEXPRESS) += \ + foundation-v8.dtb foundation-v8-gicv3.dtb foundation-v8-gicv3-psci.dtb dtb-$(CONFIG_ARCH_VEXPRESS) += juno.dtb juno-r1.dtb juno-r2.dtb dtb-$(CONFIG_ARCH_VEXPRESS) += rtsm_ve-aemv8a.dtb dtb-$(CONFIG_ARCH_VEXPRESS) += vexpress-v2f-1xv7-ca53x2.dtb diff --git a/arch/arm64/boot/dts/arm/foundation-v8-gicv3-psci.dts b/arch/arm64/boot/dts/arm/foundation-v8-gicv3-psci.dts new file mode 100644 index 000000000000..94a249095104 --- /dev/null +++ b/arch/arm64/boot/dts/arm/foundation-v8-gicv3-psci.dts @@ -0,0 +1,51 @@ +/* + * ARM Ltd. + * + * ARMv8 Foundation model DTS (GICv3 configuration) + */ + +#include "foundation-v8.dtsi" + +/ { + psci { + compatible = "arm,psci-1.0"; + method = "smc"; + }; + + gic: interrupt-controller@2f000000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <3>; + #address-cells = <2>; + #size-cells = <2>; + ranges; + interrupt-controller; + reg = <0x0 0x2f000000 0x0 0x10000>, + <0x0 0x2f100000 0x0 0x200000>, + <0x0 0x2c000000 0x0 0x2000>, + <0x0 0x2c010000 0x0 0x2000>, + <0x0 0x2c02f000 0x0 0x2000>; + interrupts = <1 9 4>; + + its: its@2f020000 { + compatible = "arm,gic-v3-its"; + msi-controller; + reg = <0x0 0x2f020000 0x0 0x20000>; + }; + }; +}; + +&cpu0 { + enable-method = "psci"; +}; + +&cpu1 { + enable-method = "psci"; +}; + +&cpu2 { + enable-method = "psci"; +}; + +&cpu3 { + enable-method = "psci"; +}; diff --git a/arch/arm64/boot/dts/arm/foundation-v8.dtsi b/arch/arm64/boot/dts/arm/foundation-v8.dtsi index 8ecdd4331980..8c7f8c4f090a 100644 --- a/arch/arm64/boot/dts/arm/foundation-v8.dtsi +++ b/arch/arm64/boot/dts/arm/foundation-v8.dtsi @@ -28,7 +28,7 @@ #address-cells = <2>; #size-cells = <0>; - cpu@0 { + cpu0: cpu@0 { device_type = "cpu"; compatible = "arm,armv8"; reg = <0x0 0x0>; @@ -36,7 +36,7 @@ cpu-release-addr = <0x0 0x8000fff8>; next-level-cache = <&L2_0>; }; - cpu@1 { + cpu1: cpu@1 { device_type = "cpu"; compatible = "arm,armv8"; reg = <0x0 0x1>; @@ -44,7 +44,7 @@ cpu-release-addr = <0x0 0x8000fff8>; next-level-cache = <&L2_0>; }; - cpu@2 { + cpu2: cpu@2 { device_type = "cpu"; compatible = "arm,armv8"; reg = <0x0 0x2>; @@ -52,7 +52,7 @@ cpu-release-addr = <0x0 0x8000fff8>; next-level-cache = <&L2_0>; }; - cpu@3 { + cpu3: cpu@3 { device_type = "cpu"; compatible = "arm,armv8"; reg = <0x0 0x3>;