From patchwork Sat Nov 7 13:39:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Chmiel?= X-Patchwork-Id: 11888959 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 939EBC388F9 for ; Sat, 7 Nov 2020 13:41:01 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 37002206ED for ; Sat, 7 Nov 2020 13:41:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="q4EYjS9H"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pp3Nijb3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 37002206ED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=diwCxDfxevnMRaacbpSlXI/uJ31KukXxV4vkie8rA7A=; b=q4EYjS9HprPIQz8zLlXrg5yDds /k2Q4jtMs1S5iuU62GLH8SlJVfIun9X/oiEVhRGy79vWmXtTkdHCeee9RsEWn0Y+RDFo/s+FSEz5W X6Y/CjbzcTSSfRBsQ3EahP5gITB0wKw32dg+DRGX0sOtLpV/HKku7wHgTv+K6BGR6dNcJj1fLI961 PT71QdZIPO8wJAm7olQUw76zR84uq4x855OnmTTo+QEu6e+dY/E+si3paX0ul3s1LPasW+LbuJXJA if6OH5B+9mGsfelUgmRQWNhsPBTgzPUywkrQI/HSZd9GCOKDQLOFMOkTHjXPebgy0XLd0C5ODelN7 yuOvaSlg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kbORS-0004BY-Pj; Sat, 07 Nov 2020 13:39:42 +0000 Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kbORR-0004B5-0V for linux-arm-kernel@lists.infradead.org; Sat, 07 Nov 2020 13:39:41 +0000 Received: by mail-lj1-x229.google.com with SMTP id q19so2847024ljc.10 for ; Sat, 07 Nov 2020 05:39:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=c5vk1HU4LMO05/HvLhuFLID0YfaxsQiSjHZGb3JZL+k=; b=pp3Nijb3qelAlJYoXTJYgO4SDTsvHQB1JVzF89P6cF7PNLT/RAQs2CvY4zJ2L+s657 Rncm1TbS0AhZp5RWhK17AA9nfGkJuPjqOuiTzG5SUXR0X/CBwILioM5AcJwIQfNT3oNi 6l3Iz82nm4lT7T+93ohGSnSSQK2e0WzReQZ6oDBR1YsM0b2OGWCkPUBtqGJXh4R/zsbe KIFr52Gn7obgs+qgg1HXxFe3Q+6Ig0nlw89gQ2rUe1ccXEJ9GVn4GcREF7Z1huS2l5MB wGPvhOufbRsForGk7jLelkIHSAe/hKG7VFQ3BOthkkFnmdb6qq1eWE5eUd9JYdKtVV+w mESg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=c5vk1HU4LMO05/HvLhuFLID0YfaxsQiSjHZGb3JZL+k=; b=Y7v4il6d/wuZUD7ZFSH8fd5iG2mTfgwwtiBYVjLOvesiNhRuK78u19my796SeH0x5F 7i0FG+FwDcvxZdK2DWx72nJ/Di8qPcUt/KdGHX7eiOoV+ONeeAISvAsN1cIkXPPatO6f qT3oyzd0Rv7titpNB2lcWQ+eiJbYow/E7C5tD+yxz8ArXcJiBjvnftSEKBaUKqIYkJWG w/ji29iFCFNbUTGWVa5ttAWrmjsbfDn+qdg6VQy/jxvbkGoRJ7zDn6XS7Ge8t0hwMJuK Rk7fd+2RgvPIYyOLXDc9wG046X3R443iN4ZJZZ1b8c8FCB4sC2owN/QbJS0oiYCObDaB 9HhQ== X-Gm-Message-State: AOAM531y+cLyeDICDiHht35rVhLU36mRS6mKnC8/3uI6vxA0KfTj3MAq 3e58uWEEoaVbFqZMS+mZZdY= X-Google-Smtp-Source: ABdhPJykwd8X4etetyGtEH9KC2jai7rgshQmz5xZq3TNNHZcMixp/o1ZAsTHgBT0IRpaPnjMLSR6FQ== X-Received: by 2002:a2e:9ac4:: with SMTP id p4mr2412087ljj.247.1604756379480; Sat, 07 Nov 2020 05:39:39 -0800 (PST) Received: from localhost.localdomain ([2a02:a315:5445:5300:d646:fcbb:9c5e:1da1]) by smtp.googlemail.com with ESMTPSA id y27sm524189ljm.74.2020.11.07.05.39.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Nov 2020 05:39:38 -0800 (PST) From: =?utf-8?q?Pawe=C5=82_Chmiel?= To: kgene@kernel.org, krzk@kernel.org, alim.akhtar@samsung.com Subject: [PATCH v2 1/2] arm64: dts: exynos: Include common syscon restart/poweroff for Exynos7 Date: Sat, 7 Nov 2020 14:39:25 +0100 Message-Id: <20201107133926.37187-1-pawel.mikolaj.chmiel@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201107_083941_088302_7403482D X-CRM114-Status: GOOD ( 14.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, thomas.ab@samsung.com, a.kesavan@samsung.com, naveenkrishna.ch@gmail.com, linux-arm-kernel@lists.infradead.org, =?utf-8?q?Pawe=C5=82_Chmiel?= Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Exynos7 uses the same syscon reboot and poweroff nodes as other Exynos SoCs, so instead of duplicating code we can just include common dtsi file, which already contains definitions of them. After this change, poweroff node will be also available, previously this dts file did contain only reboot node. Fixes: fb026cb65247 ("arm64: dts: Add reboot node for exynos7") Fixes: b9024cbc937d ("arm64: dts: Add initial device tree support for exynos7") Signed-off-by: Paweł Chmiel --- Changes from v1: - Split into two separate patches. - Include existing exynos-syscon-restart.dtsi to avoid code duplication. --- arch/arm64/boot/dts/exynos/exynos7.dtsi | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/arch/arm64/boot/dts/exynos/exynos7.dtsi b/arch/arm64/boot/dts/exynos/exynos7.dtsi index 7a2cba4220d9..723f5d5fcf00 100644 --- a/arch/arm64/boot/dts/exynos/exynos7.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos7.dtsi @@ -624,13 +624,6 @@ hsi2c_11: hsi2c@136a0000 { pmu_system_controller: system-controller@105c0000 { compatible = "samsung,exynos7-pmu", "syscon"; reg = <0x105c0000 0x5000>; - - reboot: syscon-reboot { - compatible = "syscon-reboot"; - regmap = <&pmu_system_controller>; - offset = <0x0400>; - mask = <0x1>; - }; }; rtc: rtc@10590000 { @@ -818,3 +811,5 @@ atlas_thermal: cluster0-thermal { }; #include "exynos7-pinctrl.dtsi" +#include "arm/exynos-syscon-restart.dtsi" + From patchwork Sat Nov 7 13:39:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Chmiel?= X-Patchwork-Id: 11888961 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1BC5DC388F7 for ; Sat, 7 Nov 2020 13:41:00 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 A8D76206ED for ; Sat, 7 Nov 2020 13:40:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Uh2ajZ00"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AhDiTzaq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A8D76206ED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vi5dii3Hschz9Q2F30GdZmnToh0ynSxY6T0C6luQhG4=; b=Uh2ajZ000mPO0t3xL9jEFO5S6 DUsttyPxAOcPvT5DXmh4T3rvgqp4CtGmgUd4Q8fsP/coG3pM2RBMusvQ+teriJygORKIRCvaCPQno PWNrt0MAbN1NzidiqRLeMX3saB9s8EJIwAeZzrvYRMVP/MeWSfb30rK0POiA8rJ9vqmbzCuUTG5oW y4NRT8x/9hoWfiIgOwF66TWSAxIETaI+OYd7+UB62fw3Y51oeJBUY2cNipQ+fMCyRJSz9i040B9gI jACWdD1zBgVyRTPH2iM4qAd5HCybbikbdnVFAY2fm6VWtpDXZurmLyezZ+8uJq7SSAgnaYTP2SOG5 D5HKBtVWQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kbORV-0004CR-Ib; Sat, 07 Nov 2020 13:39:45 +0000 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kbORS-0004BP-Ec for linux-arm-kernel@lists.infradead.org; Sat, 07 Nov 2020 13:39:43 +0000 Received: by mail-lf1-x131.google.com with SMTP id h6so5871696lfj.3 for ; Sat, 07 Nov 2020 05:39:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lAR/h1wV/mVrmRlM3JEvsi3/vv0tMjOOYCctIjXs1fA=; b=AhDiTzaqcIBZB/kD/hlamzvzQ/LFTFLzK2Ti4G+IBZg9/+yDi5Mw2INNbxyzhei+lu G0EvTSygiRODFHWPQJW70UBEGeCEGtL7TOXZR85U6Sl65Pc/wZmfY2Gs/iOsbyZ9toOg 26gI68BDpXhyRpQMGhGLDbOmvAJgFk76xSeRhYTq4zn2FPR1lH8lGm4tbIjNoBrDmGZN nBdkXRqVyK9qa73nHLG8TPyaoeT4isYOR1iT6cQnJXzUPGpz8EytJH+zgtgH6E6vlXCR UjXKSLU/vFpGAmi46NVNjgH2Sn5kyi0do8wkLWim659Op9OS3hIJYOXUdQaU/TY3lSH5 1DrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lAR/h1wV/mVrmRlM3JEvsi3/vv0tMjOOYCctIjXs1fA=; b=KYSGTIyWS+N1/ggoS8Gszz7RcP2Tp/eIUqTYJ+5VeS4SiaR5RyC6fyuCGhAD/a+usI F6KGrtquxqMLLPC/Pz2/JZmCcjt9i1MVypqGx+ZmqhcFARp0Rb3eWH3HrxE8pMweXQi5 XRJ+qsOUX++qbepTr/HjgZMz7YRNSlWi5GejaxIVqzUIS71UVV0I9cuMs0ebDZmRcFDm AUPN8vzVOC88Y1Iiiyuc8h3BUUOi88ZvS7MRX9T4+GG7+uGEdkUhYH0ahMPmLJm1BSC6 H0/FjR7aimsDN4EKeizGUf7FtVrCImOeQZ6lhOkPh/Y99coFc3AE1gJucBes73a2fa+u WCoA== X-Gm-Message-State: AOAM532+i9jYTEaQmIxtco1KgXLJlyBeBxfUUVGrjLzZkN0wob7ZLSQq mml9aKtW7g+c5EABL9k5nI4= X-Google-Smtp-Source: ABdhPJxGEb/igDJY7FFYn1Atx88+hv86yhzhEjECh4F4QIcwxm/ZUYV/HiIyeNiwwYfb9+TtVWFh0w== X-Received: by 2002:ac2:533b:: with SMTP id f27mr2495942lfh.57.1604756381108; Sat, 07 Nov 2020 05:39:41 -0800 (PST) Received: from localhost.localdomain ([2a02:a315:5445:5300:d646:fcbb:9c5e:1da1]) by smtp.googlemail.com with ESMTPSA id y27sm524189ljm.74.2020.11.07.05.39.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Nov 2020 05:39:40 -0800 (PST) From: =?utf-8?q?Pawe=C5=82_Chmiel?= To: kgene@kernel.org, krzk@kernel.org, alim.akhtar@samsung.com Subject: [PATCH v2 2/2] arm64: dts: exynos: Correct psci compatible used on Exynos7 Date: Sat, 7 Nov 2020 14:39:26 +0100 Message-Id: <20201107133926.37187-2-pawel.mikolaj.chmiel@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201107133926.37187-1-pawel.mikolaj.chmiel@gmail.com> References: <20201107133926.37187-1-pawel.mikolaj.chmiel@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201107_083942_522874_4DF4F607 X-CRM114-Status: GOOD ( 15.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, thomas.ab@samsung.com, a.kesavan@samsung.com, naveenkrishna.ch@gmail.com, linux-arm-kernel@lists.infradead.org, =?utf-8?q?Pawe=C5=82_Chmiel?= Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org It's not possible to reboot or poweroff Exynos7420 using PSCI. Instead we need to use syscon reboot/poweroff drivers, like it's done for other Exynos SoCs. This was confirmed by checking vendor source and testing it on Samsung Galaxy S6 device based on this SoC. To be able to use custom restart/poweroff handlers instead of PSCI functions, we need to correct psci compatible. This also requires us to provide function ids for CPU_ON and CPU_OFF. Fixes: fb026cb65247 ("arm64: dts: Add reboot node for exynos7") Fixes: b9024cbc937d ("arm64: dts: Add initial device tree support for exynos7") Signed-off-by: Paweł Chmiel --- Changes from v1: - Split into two separate patches. --- arch/arm64/boot/dts/exynos/exynos7.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/exynos/exynos7.dtsi b/arch/arm64/boot/dts/exynos/exynos7.dtsi index 723f5d5fcf00..fff383206545 100644 --- a/arch/arm64/boot/dts/exynos/exynos7.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos7.dtsi @@ -117,8 +117,10 @@ cpu_atlas3: cpu@3 { }; psci { - compatible = "arm,psci-0.2"; + compatible = "arm,psci"; method = "smc"; + cpu_off = <0x84000002>; + cpu_on = <0xC4000003>; }; soc: soc@0 {