From patchwork Mon May 23 12:12:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 12858994 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 585EAC4332F for ; Mon, 23 May 2022 12:12:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235373AbiEWMMU (ORCPT ); Mon, 23 May 2022 08:12:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235372AbiEWMMS (ORCPT ); Mon, 23 May 2022 08:12:18 -0400 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 328A229C83 for ; Mon, 23 May 2022 05:12:16 -0700 (PDT) Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20220523121213epoutp02309781be59d9b0b987a969430638ebfc~xus5NBlZT1164811648epoutp02- for ; Mon, 23 May 2022 12:12:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20220523121213epoutp02309781be59d9b0b987a969430638ebfc~xus5NBlZT1164811648epoutp02- DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1653307933; bh=CbnJ6r5RJx+x5uEep6BdpxgGR6fmdjU3WvQatIu4L9o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FW0aq4UT8sH0UbKaXm+apVprt/9DGNd9KlIgP0bodkYvrhrPSjZLgR6J7hGQgBACC ZaKnsIe28EporqUymmdQDO/4fWr9hU26BsQdmCQeHsdi+3LrDRyc4oOPymPwxV/Ar9 RyjkY0Ksb45EJ27pkT8LO03rhA8JOmXRQojX3UXU= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20220523121213epcas2p1512ebc0af5c4266f295b5d208316a371~xus43mIes2307023070epcas2p1Y; Mon, 23 May 2022 12:12:13 +0000 (GMT) Received: from epsmges2p4.samsung.com (unknown [182.195.36.69]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4L6GRG5YPyz4x9Pv; Mon, 23 May 2022 12:12:10 +0000 (GMT) Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id D2.16.09694.A1A7B826; Mon, 23 May 2022 21:12:10 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p1.samsung.com (KnoxPortal) with ESMTPA id 20220523121210epcas2p101300d7187b70e310fa8f92b7d53ad72~xus2eInNS2307023070epcas2p1U; Mon, 23 May 2022 12:12:10 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220523121210epsmtrp2ce9f2b50131cbaf1e3c56c7fa8caa75b~xus2dbesh2440224402epsmtrp2u; Mon, 23 May 2022 12:12:10 +0000 (GMT) X-AuditID: b6c32a48-47fff700000025de-99-628b7a1ab3d7 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id B8.7F.11276.A1A7B826; Mon, 23 May 2022 21:12:10 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.51]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20220523121210epsmtip2d52eba55075cf70e868b5a21fdb2a798~xus2P5hcZ1576415764epsmtip2P; Mon, 23 May 2022 12:12:10 +0000 (GMT) From: Chanho Park To: Rob Herring , Krzysztof Kozlowski Cc: Alim Akhtar , Chanwoo Choi , Sam Protsenko , linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, Chanho Park Subject: [PATCH v3 2/2] arm64: dts: exynoautov9: add syscon reboot/reboot_mode support Date: Mon, 23 May 2022 21:12:44 +0900 Message-Id: <20220523121244.67341-3-chanho61.park@samsung.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220523121244.67341-1-chanho61.park@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplk+LIzCtJLcpLzFFi42LZdljTQleqqjvJ4PoNbYsH87axWVzer21x /ctzVov5R86xWvS9eMhsMeP8PiaL1r1H2C2e9+1jcuDw2LSqk83jzrU9bB59W1YxenzeJBfA EpVtk5GamJJapJCal5yfkpmXbqvkHRzvHG9qZmCoa2hpYa6kkJeYm2qr5OIToOuWmQN0hZJC WWJOKVAoILG4WEnfzqYov7QkVSEjv7jEVim1ICWnwLxArzgxt7g0L10vL7XEytDAwMgUqDAh O6Pvxnn2ghO8FWferGVuYFzK3cXIySEhYCLx7fdJpi5GLg4hgR2MEpPvbWKHcD4xSqxvvsgK 4XxjlGi89p8VrmXae0aIxF5GidmfrrFBOB8ZJZrfzACrYhPQldjy/BUjiC0iEC9x/k0jC0gR s8BLRokTlx6wgCSEBSIkevteMoHYLAKqEtNmPWAGsXkF7CSmfJzFBrFOXmLD/F6wOKeAvcSS rStYIGoEJU7OfAJmMwPVNG+dzQyyQELgLbvEqZkXmSCaXSR+fV4KdbewxKvjW9ghbCmJz+/2 Qi0ollg66xMTRHMDo8Tlbb+gEsYSs561A73AAbRBU2L9Ln0QU0JAWeLILai9fBIdh/+yQ4R5 JTrahCAa1SUObJ/OAmHLSnTP+Qx1gYfEjJa30CCdxCjx7sZJlgmMCrOQvDMLyTuzEBYvYGRe xSiWWlCcm55abFRgAo/j5PzcTYzgdKnlsYNx9tsPeocYmTgYDzFKcDArifBuT+xIEuJNSays Si3Kjy8qzUktPsRoCgzsicxSosn5wISdVxJvaGJpYGJmZm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s/3W/ZWrbmhPxS0Q4 SpeFcqf/+bSo8ilLtLCYWOPh3T8kBPduvvr76ewE/5wX36MMb735du+MpeTTk04/VOfWi/bt e5R8+2f6tmfHZnJJ5fEujF+g9fPKjUnHL7lbR1Q7CRqaiBp1tCWwht1Q5yjlPHjyzU/zXRFX Hvn9ZQ2+bXV97dPnW2rNxIQv6Nw1vzFbS/PcJEGlo1vSP8085Xc/+G7v5E86Wl8vKWdcKun/ 35AqP+vmF6ZvFw4k3uVSt2M7kK8n8WnuNbV7d1v/yjSYbqqZX6PEUpyRaKjFXFScCAArUIyD 2QIAAA== X-CMS-MailID: 20220523121210epcas2p101300d7187b70e310fa8f92b7d53ad72 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220523121210epcas2p101300d7187b70e310fa8f92b7d53ad72 References: <20220523121244.67341-1-chanho61.park@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Reboot of exynosautov9 SoC can be handled by setting the bit( SWRESET_SYSTEM[1]) of SYSTEM_CONFIGURATION register(PMU + 0x3a00). syscon-reboot-mode can be used to indicate the reboot mode for bootloader. SYSIP_DAT0 register(PMU + 0x810) will not be cleared after reboot so bootloader can enter the boot mode according to the value. Signed-off-by: Chanho Park --- arch/arm64/boot/dts/exynos/exynosautov9.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi index 0ce46ec5cdc3..3e23db8f09d9 100644 --- a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi +++ b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi @@ -8,6 +8,7 @@ #include #include +#include #include / { @@ -312,6 +313,22 @@ pinctrl_peric1: pinctrl@10830000 { pmu_system_controller: system-controller@10460000 { compatible = "samsung,exynos7-pmu", "syscon"; reg = <0x10460000 0x10000>; + + reboot: syscon-reboot { + compatible = "syscon-reboot"; + regmap = <&pmu_system_controller>; + offset = <0x3a00>; /* SYSTEM_CONFIGURATION */ + value = <0x2>; + mask = <0x2>; + }; + + reboot-mode { + compatible = "syscon-reboot-mode"; + offset = <0x810>; /* SYSIP_DAT0 */ + mode-bootloader = ; + mode-fastboot = ; + mode-recovery = ; + }; }; syscon_fsys2: syscon@17c20000 {