From patchwork Wed Jan 31 22:19:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 768741 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 06F83383A4; Wed, 31 Jan 2024 22:20:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.248 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706739609; cv=none; b=el4IgLZlNUz2o3m2UNUSIDwFteyFlGe9B/0ZpeCTyEB9mBtCPB4d0z1uYYEdxPlEJHaDmB/ELw8IWbXx/OO8Zpx5C9Gve0/hFLSfLlith0JPMg6EMCtw8AsQxxvGUx9PyG/kSadLDeikfdNqRbXrrccka+R7zXzEjlWcP0yYQVE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706739609; c=relaxed/simple; bh=bTBSyAWO+uR3Dr01EJDzUVOpbsMhuSfmMb5DDrgVaWI=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=os5kNUn2JVSyETplaKaUNpc3W8HhDFDyCKrAQQdRzd+/NPV8ux7kvs7NH4nEy9ZhCKN1FLym2jJ48e0cClbaaXQ0yqCJfE+OCTM0nNYzMQMAMu6qi5UrZN/G4XejVx/ZPtjRMQrLrWJotg/JTpmBx2quPnC/4W8D0vQ0lFeMVfE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=tjvEzXJd; arc=none smtp.client-ip=198.47.23.248 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="tjvEzXJd" Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 40VMK0VA010373; Wed, 31 Jan 2024 16:20:00 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1706739600; bh=eN3oPr+M4EypKKu046DK8GJ27aJRTrtTuWvBbhbnFeE=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=tjvEzXJdiVDGJgIzny2vLrGdXFezokbLAiE3Vu/6kJCU5vwE1uNKPin+sid+0S6Rt jOHCdbEJKAjO5BwsMdaSw5IPr5F8/C20IKSrDX+0Vaa6dSxp7mG7nTIb3uW1bw07e3 DIAL77wHFiU5aEXCdRXPNEHdvb5Cl92cUl0vtJmk= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 40VMK0Wd080790 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 31 Jan 2024 16:20:00 -0600 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 31 Jan 2024 16:19:59 -0600 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 31 Jan 2024 16:19:59 -0600 Received: from lelvsmtp5.itg.ti.com ([10.249.42.149]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 40VMJwx3102504; Wed, 31 Jan 2024 16:19:59 -0600 From: Andrew Davis To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sebastian Reichel , Vignesh Raghavendra CC: , , , , Andrew Davis Subject: [PATCH 01/12] dt-bindings: power: reset: Document ti,sci-reboot compatible Date: Wed, 31 Jan 2024 16:19:46 -0600 Message-ID: <20240131221957.213717-2-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240131221957.213717-1-afd@ti.com> References: <20240131221957.213717-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 This calls into the system firmware using TI-SCI to reboot the system. Used as a fallback when PSCI is unable or not available to reboot the system. Signed-off-by: Andrew Davis Acked-by: Conor Dooley --- .../bindings/power/reset/ti,sci-reboot.yaml | 33 +++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 34 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/reset/ti,sci-reboot.yaml diff --git a/Documentation/devicetree/bindings/power/reset/ti,sci-reboot.yaml b/Documentation/devicetree/bindings/power/reset/ti,sci-reboot.yaml new file mode 100644 index 0000000000000..aa628be33d122 --- /dev/null +++ b/Documentation/devicetree/bindings/power/reset/ti,sci-reboot.yaml @@ -0,0 +1,33 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/reset/ti,sci-reboot.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: TI-SCI reboot controller + +maintainers: + - Andrew Davis + +description: | + Some TI SoCs contain a system controller (like the Power Management Micro + Controller (PMMC) on Keystone 66AK2G SoC) that are responsible for controlling + the state of the various hardware modules present on the SoC. Communication + between the host processor running an OS and the system controller happens + through a protocol called TI System Control Interface (TI-SCI protocol). + + This reboot controller node uses the TI SCI protocol to perform a device reboot. + + Must be a child node of the associated TI-SCI system controller node. + +properties: + compatible: + const: ti,sci-reboot + +additionalProperties: false + +examples: + - | + k3_reboot: reboot-controller { + compatible = "ti,sci-reboot"; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 8999497011a26..45983bb174fe4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -21751,6 +21751,7 @@ F: Documentation/devicetree/bindings/arm/keystone/ti,sci.yaml F: Documentation/devicetree/bindings/clock/ti,sci-clk.yaml F: Documentation/devicetree/bindings/interrupt-controller/ti,sci-inta.yaml F: Documentation/devicetree/bindings/interrupt-controller/ti,sci-intr.yaml +F: Documentation/devicetree/bindings/power/reset/ti,sci-reboot.yaml F: Documentation/devicetree/bindings/reset/ti,sci-reset.yaml F: Documentation/devicetree/bindings/soc/ti/sci-pm-domain.yaml F: drivers/clk/keystone/sci-clk.c From patchwork Wed Jan 31 22:19:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 768743 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2A2C039AFE; Wed, 31 Jan 2024 22:20:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.249 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706739608; cv=none; b=K/itngneC1WAiGo4Moww2LJN+0CMfvCDaUdghUaZjb55NfcJH4myAxfpb+OyQa2Q7GGKGrkVl05x+8uj7Y7R+ySLPa4UXlr3GyCIZiXrpTtOaA9MqESzrvt47W3QqiUxj72Oc2dq1acofdT98tw70OeDUWl4Ygsnw/HQr0Mlt5A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706739608; c=relaxed/simple; bh=3XrBhJ7lFcCw9u4MVsQS//A6rOZ4Nmr3IhSO+twZxug=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=SIrVcEEoSRcA77KNoyanwi3ys4weqnKXkBVKro4jYJ8YTsi9Dm2ibEAFzrz3qN2hPmL9Mti8SW7seoTUY2cubDK2nFMLYr3/Pjyqly/Vd5gPIKakxmYmv8DzEUI2l/b9p4f1SjhtLn7toWpdEjhOMPgENlDpPCPd9abzayg+rYs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=hTi6l/P5; arc=none smtp.client-ip=198.47.23.249 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="hTi6l/P5" Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 40VMK1tM060758; Wed, 31 Jan 2024 16:20:01 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1706739601; bh=1YUSJDF+znyudL9/WwRSORWM+cm2PVwYB2DPgs0ZaYU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=hTi6l/P5C2NPqg6vQf12o1wOyHOl6v5Jxm7TN+Qd3oaoBR2tG/W2eX748unjJtzA1 ASJEJQE6KYw+bUVBWAuDZrtlUGyIkNTyxm42ICu6wIUQS/QNbhPhvjw0XJzev86EvO BpwTFw9eA4n/ZhFBxvh12ho+mVqQDdp1aEMk68Bc= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 40VMK1wi021515 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 31 Jan 2024 16:20:01 -0600 Received: from DLEE114.ent.ti.com (157.170.170.25) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 31 Jan 2024 16:20:00 -0600 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 31 Jan 2024 16:20:00 -0600 Received: from lelvsmtp5.itg.ti.com ([10.249.42.149]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 40VMJwx5102504; Wed, 31 Jan 2024 16:20:00 -0600 From: Andrew Davis To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sebastian Reichel , Vignesh Raghavendra CC: , , , , Andrew Davis Subject: [PATCH 03/12] power: reset: Add TI-SCI reboot driver Date: Wed, 31 Jan 2024 16:19:48 -0600 Message-ID: <20240131221957.213717-4-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240131221957.213717-1-afd@ti.com> References: <20240131221957.213717-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 This reboot driver calls into firmware using TI-SCI to reboot the system. We register the handler with low priority as we want PSCI to remain the main way these devices are rebooted. This driver acts as a fallback if PSCI is not able to reboot the system. Signed-off-by: Andrew Davis Reviewed-by: Nishanth Menon --- MAINTAINERS | 1 + drivers/power/reset/Kconfig | 7 ++++ drivers/power/reset/Makefile | 1 + drivers/power/reset/ti-sci-reboot.c | 63 +++++++++++++++++++++++++++++ 4 files changed, 72 insertions(+) create mode 100644 drivers/power/reset/ti-sci-reboot.c diff --git a/MAINTAINERS b/MAINTAINERS index 45983bb174fe4..ee67ea497fc56 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -21758,6 +21758,7 @@ F: drivers/clk/keystone/sci-clk.c F: drivers/firmware/ti_sci* F: drivers/irqchip/irq-ti-sci-inta.c F: drivers/irqchip/irq-ti-sci-intr.c +F: drivers/power/reset/ti-sci-reboot.c F: drivers/reset/reset-ti-sci.c F: drivers/soc/ti/ti_sci_inta_msi.c F: drivers/pmdomain/ti/ti_sci_pm_domains.c diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig index fece990af4a75..d3e91e54cae24 100644 --- a/drivers/power/reset/Kconfig +++ b/drivers/power/reset/Kconfig @@ -205,6 +205,13 @@ config POWER_RESET_ST help Reset support for STMicroelectronics boards. +config POWER_RESET_TI_SCI + tristate "TI System Control Interface (TI-SCI) reboot driver" + depends on TI_SCI_PROTOCOL + help + This enables the reboot driver support over TI System Control + Interface available on some TI's SoCs. + config POWER_RESET_TPS65086 bool "TPS65086 restart driver" depends on MFD_TPS65086 diff --git a/drivers/power/reset/Makefile b/drivers/power/reset/Makefile index a95d1bd275d18..881ca58a43b9c 100644 --- a/drivers/power/reset/Makefile +++ b/drivers/power/reset/Makefile @@ -23,6 +23,7 @@ obj-$(CONFIG_POWER_RESET_QNAP) += qnap-poweroff.o obj-$(CONFIG_POWER_RESET_REGULATOR) += regulator-poweroff.o obj-$(CONFIG_POWER_RESET_RESTART) += restart-poweroff.o obj-$(CONFIG_POWER_RESET_ST) += st-poweroff.o +obj-$(CONFIG_POWER_RESET_TI_SCI) += ti-sci-reboot.o obj-$(CONFIG_POWER_RESET_TPS65086) += tps65086-restart.o obj-$(CONFIG_POWER_RESET_VERSATILE) += arm-versatile-reboot.o obj-$(CONFIG_POWER_RESET_VEXPRESS) += vexpress-poweroff.o diff --git a/drivers/power/reset/ti-sci-reboot.c b/drivers/power/reset/ti-sci-reboot.c new file mode 100644 index 0000000000000..400bd5d740f8b --- /dev/null +++ b/drivers/power/reset/ti-sci-reboot.c @@ -0,0 +1,63 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Texas Instrument's System Control Interface (TI-SCI) reboot driver + * + * Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/ + * Andrew Davis + */ + +#include +#include +#include +#include + +#include + +static int ti_sci_reboot_handler(struct sys_off_data *data) +{ + const struct ti_sci_handle *sci = data->cb_data; + const struct ti_sci_core_ops *core_ops = &sci->ops.core_ops; + + core_ops->reboot_device(sci); + + return NOTIFY_DONE; +} + +static int ti_sci_reboot_probe(struct platform_device *pdev) +{ + const struct ti_sci_handle *sci; + int err; + + sci = devm_ti_sci_get_handle(&pdev->dev); + if (IS_ERR(sci)) + return PTR_ERR(sci); + + err = devm_register_sys_off_handler(&pdev->dev, + SYS_OFF_MODE_RESTART, + SYS_OFF_PRIO_LOW, + ti_sci_reboot_handler, + (void *)sci); + if (err) + return dev_err_probe(&pdev->dev, err, "Cannot register restart handler\n"); + + return 0; +} + +static const struct of_device_id ti_sci_reboot_of_match[] = { + { .compatible = "ti,sci-reboot", }, + { /* sentinel */ }, +}; +MODULE_DEVICE_TABLE(of, ti_sci_reboot_of_match); + +static struct platform_driver ti_sci_reboot_driver = { + .probe = ti_sci_reboot_probe, + .driver = { + .name = "ti-sci-reboot", + .of_match_table = ti_sci_reboot_of_match, + }, +}; +module_platform_driver(ti_sci_reboot_driver); + +MODULE_AUTHOR("Andrew Davis "); +MODULE_DESCRIPTION("TI System Control Interface (TI SCI) Reboot driver"); +MODULE_LICENSE("GPL"); From patchwork Wed Jan 31 22:19:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 768742 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 214E839FE3; Wed, 31 Jan 2024 22:20:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.142 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706739609; cv=none; b=XTYs5uP5hlbVvlfBls6WJOJ3smIzUkLf7B6v1v0PF5SGy9xaJ55QZnxTIs9RB8v8zq4idAWDlmKnHC102O5lRnewAkJg++eiVDADDqGVCw2gvfhbajdwIYT4oCQF7svUGv1e+dPyiltkOBU63TP5TTWHO5PD4Gq/ZpYTpwqCNF0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706739609; c=relaxed/simple; bh=Ceku6KOeH22JGvzJEnc13AFmxOzjxHH5/T5neKtxgds=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=WAfUSU7Dbb1TJ7NcUU6xzXfMINabuCDVLIEmb+7UO/99CYsd9JTtDO9s097ZzPEHItwMaRxvt7kvRRuAsXUrNiV9DzOx+A3XAwXErVAmYMBPWEu0hXX2727o10e5pTW5K/yxaSt2s7y9pIYf5oia8DZe7Q02k19jUjrBb3dxmz8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=RtmunIjO; arc=none smtp.client-ip=198.47.19.142 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="RtmunIjO" Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 40VMK25X009452; Wed, 31 Jan 2024 16:20:02 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1706739602; bh=8beJqyzumN9+CMCul7JvqwxP0DOUWWCHmJavY3XFYug=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=RtmunIjOWplS8pzTdSkBMjo/NrTviIck7Fc43LwA+pVc9eKuw5FMo2ldzeNQA4NHG ECPBN8Q+nC7N6p+bv7sOD85jZCSWPkzl8/NoG9EwHiRT8+PVywkhzRlA2mgmiAX0as pU2hhyqagA6Vui8dtg5kd9WfEj9N3LGZsGftWepA= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 40VMK2ua021601 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 31 Jan 2024 16:20:02 -0600 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 31 Jan 2024 16:20:01 -0600 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 31 Jan 2024 16:20:01 -0600 Received: from lelvsmtp5.itg.ti.com ([10.249.42.149]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 40VMJwx7102504; Wed, 31 Jan 2024 16:20:01 -0600 From: Andrew Davis To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sebastian Reichel , Vignesh Raghavendra CC: , , , , Andrew Davis Subject: [PATCH 05/12] arm64: dts: ti: k3-am62: Add reboot-controller node Date: Wed, 31 Jan 2024 16:19:50 -0600 Message-ID: <20240131221957.213717-6-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240131221957.213717-1-afd@ti.com> References: <20240131221957.213717-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 While PCSI normally handles reboot for K3, this is an available fallback in case PCSI reboot fails. Add direct reboot TI-SCI node to system-controller. Signed-off-by: Andrew Davis --- arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi index 464b7565d085d..eb71523e85c36 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi @@ -203,6 +203,11 @@ k3_reset: reset-controller { compatible = "ti,sci-reset"; #reset-cells = <2>; }; + + k3_reboot: reboot-controller { + bootph-all; + compatible = "ti,sci-reboot"; + }; }; crypto: crypto@40900000 { From patchwork Wed Jan 31 22:19:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 768740 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F0AFE39FFA; Wed, 31 Jan 2024 22:20:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.142 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706739610; cv=none; b=TWajLdGOM8SXwHJx+sbF+v41UHsrbc2842eAw+fMs3xOvqeoP6TaaMoTA3y33nkZ3AS3Ab5khwPPqsJ27VV0PTziOi9FwNeSOO//jNdNjac1ODNio21WVddc4HWg/roCB6nb+qK5VhWpmkzXbMsq8tBAV53vWHbvRdLrfig3mvQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706739610; c=relaxed/simple; bh=MfsdpvyjIkm3Ayj5tycpY7OlS3Ktzu09lZy/e/4xQSk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Vf0jjz/EIJgq+/++UeYthX+G7aV1NsCHulmsFjHUPHiCnH8cE4VP+NjOEc2dGe9noY5xcPWx2kJlXghLrcHr/OGFdv27/a515djA+qlJSNJILiZNPXuA8nzunDLRECub8K6orvzT10he9qa6RA6F6UY0L0JsTcb5+pEpxi0WNeY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=CnRVxiW1; arc=none smtp.client-ip=198.47.19.142 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="CnRVxiW1" Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 40VMK3fO009462; Wed, 31 Jan 2024 16:20:03 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1706739603; bh=zj5Poq1SiBWcRYBOWTA5UoHJNRwmeAY0U+bUiO41nd0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=CnRVxiW1IrcYoksjU4H7Jx9OMpVOoYMO2j5onAX2xMNnnsWsBmCS14P6lztHNGgh3 HdKj39+5A+iiVa069Ef5XN+uzGyNaavd/1cdjgAjK7kTorw4NYMM+lNXjD5xxHkecZ 3jsZnX8Ma+N/QPF/bAY5KRp9m4TwKzE94td/5uxc= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 40VMK3DT100617 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 31 Jan 2024 16:20:03 -0600 Received: from DFLE100.ent.ti.com (10.64.6.21) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 31 Jan 2024 16:20:02 -0600 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 31 Jan 2024 16:20:02 -0600 Received: from lelvsmtp5.itg.ti.com ([10.249.42.149]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 40VMJwx8102504; Wed, 31 Jan 2024 16:20:01 -0600 From: Andrew Davis To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sebastian Reichel , Vignesh Raghavendra CC: , , , , Andrew Davis Subject: [PATCH 06/12] arm64: dts: ti: k3-am62a: Add reboot-controller node Date: Wed, 31 Jan 2024 16:19:51 -0600 Message-ID: <20240131221957.213717-7-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240131221957.213717-1-afd@ti.com> References: <20240131221957.213717-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 While PCSI normally handles reboot for K3, this is an available fallback in case PCSI reboot fails. Add direct reboot TI-SCI node to system-controller. Signed-off-by: Andrew Davis --- arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi index f0b8c9ab14593..222505edc15bb 100644 --- a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi @@ -215,6 +215,10 @@ k3_reset: reset-controller { compatible = "ti,sci-reset"; #reset-cells = <2>; }; + + k3_reboot: reboot-controller { + compatible = "ti,sci-reboot"; + }; }; secure_proxy_sa3: mailbox@43600000 { From patchwork Wed Jan 31 22:19:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 768739 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CEC2D3A278; Wed, 31 Jan 2024 22:20:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.141 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706739611; cv=none; b=tXCQZy8EM7XvEgJ0SzBP/zRNe0l1c9RJEG7LUz6i9RlswPwIgCJRsYacDk08zpUKoSbiP6xgOl5HDnyRQBRIPqNKzciHTwN5Pb53FyhmZPPmLATpXk7OofWE+rAIb+12lSW9KRP1k3BRa5kePrqN9076FN8pwAOi8mrV0mzql1s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706739611; c=relaxed/simple; bh=7JjgghQ0SCI42dyRV2VURiHTHosLQOd1S81tXSYqLZo=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Yf3Oha0YrttaA1uy8Dmz/9XqiwDTVwGx3xaqGCDwp9JiSC5X9Fbn5PMH9k2bB83YjgUwPsigh0EMyXCvCXcO7WENdwy+Hd+2a4cr4qa6NjyG2fj+X5c4ZHotmdJ46cAEGcNycekW7HYZxP58LqeUyUc9IdMs9sLmifM92/X/pjQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=THPOF6w9; arc=none smtp.client-ip=198.47.19.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="THPOF6w9" Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 40VMK42q004388; Wed, 31 Jan 2024 16:20:04 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1706739604; bh=qWbSUtrKJS9+NDn8QtaMwirutdkz/edGVbVEUKGhHkM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=THPOF6w9d72Da9XSqUpfpCBv1QTX5ANMqPDl0ynefu6npMP1cwGj5dYI3kfZlFTJn uP9QwFtcL5BfHtZg+jR73SN4QEPY9CWLlyY6AkJMsfD7LilV679nkawvVj748ElxjR aMDAEkze9O39Ug53tRxUpyZOzlPnio8Wn0Dl7Z4g= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 40VMK4vG100745 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 31 Jan 2024 16:20:04 -0600 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 31 Jan 2024 16:20:04 -0600 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 31 Jan 2024 16:20:04 -0600 Received: from lelvsmtp5.itg.ti.com ([10.249.42.149]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 40VMJwxB102504; Wed, 31 Jan 2024 16:20:03 -0600 From: Andrew Davis To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sebastian Reichel , Vignesh Raghavendra CC: , , , , Andrew Davis Subject: [PATCH 09/12] arm64: dts: ti: k3-j7200: Add reboot-controller node Date: Wed, 31 Jan 2024 16:19:54 -0600 Message-ID: <20240131221957.213717-10-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240131221957.213717-1-afd@ti.com> References: <20240131221957.213717-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 While PCSI normally handles reboot for K3, this is an available fallback in case PCSI reboot fails. Add direct reboot TI-SCI node to system-controller. Signed-off-by: Andrew Davis --- arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi index 60b26374ae0cc..a37d66bcf93e9 100644 --- a/arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi @@ -32,6 +32,10 @@ k3_reset: reset-controller { compatible = "ti,sci-reset"; #reset-cells = <2>; }; + + k3_reboot: reboot-controller { + compatible = "ti,sci-reboot"; + }; }; mcu_timer0: timer@40400000 { From patchwork Wed Jan 31 22:19:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 768738 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A7C043AC0F; Wed, 31 Jan 2024 22:20:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.141 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706739612; cv=none; b=mDsE9TYN5o7bK/hVbk4BF7ACTKuC3BMwGzWwMQAll0T9qXnChTGbvjZiDheS0/lcDNLNiTJAe7bMxKdMCopvrX/CJJtIPe234Xw9bDbOcfbjI+hGHpJpxZAveDlGazPuMgbiObq8wjKM1scMOM/xyhKADmVnY+hUQnoavh/65ts= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706739612; c=relaxed/simple; bh=DjoRezQAyDk/p1frAkIYTwHmWJB/D/g0YDDF4pM0g2Y=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jlBptTbqRO2seFw8jAiCNpyu276Dd9zX39KuesuCk7HyYiow3Sa8W/tqV5PfSjeOljziY1quM9BV4REJXCb0VVZTlxTGBHbWmUS7XSOUfZ8wvs3HlELBu3r2hfiu6SPoO0YQcde0oOaXt7CCzeScJYbb0Xe0O9nJaZnreCRPF10= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=Awfcy8Z9; arc=none smtp.client-ip=198.47.19.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="Awfcy8Z9" Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 40VMK5IT004445; Wed, 31 Jan 2024 16:20:05 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1706739605; bh=5ccLGxfgTaF7LvtMbW1DBgvnDAXYVO9eKs/8Du1oT9o=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Awfcy8Z9EEZu1VprAoWlZNN0I1j1QS2t8GxNvte3XiPjYmv+qGC4Kk761SkkqroVi 6uIyEHasq8/7Wo4JzzVF7oh07ZvZ1HBZWLt7Ngpt4Phbmh+fB7v0V2FNI3QdsCaFlQ DkEK89krqOhvIK0MzH97f3lBbgi7emwhi9vcXc6s= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 40VMK5nI080992 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 31 Jan 2024 16:20:05 -0600 Received: from DLEE104.ent.ti.com (157.170.170.34) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 31 Jan 2024 16:20:05 -0600 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 31 Jan 2024 16:20:05 -0600 Received: from lelvsmtp5.itg.ti.com ([10.249.42.149]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 40VMJwxD102504; Wed, 31 Jan 2024 16:20:04 -0600 From: Andrew Davis To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sebastian Reichel , Vignesh Raghavendra CC: , , , , Andrew Davis Subject: [PATCH 11/12] arm64: dts: ti: k3-j721s2: Add reboot-controller node Date: Wed, 31 Jan 2024 16:19:56 -0600 Message-ID: <20240131221957.213717-12-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240131221957.213717-1-afd@ti.com> References: <20240131221957.213717-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 While PCSI normally handles reboot for K3, this is an available fallback in case PCSI reboot fails. Add direct reboot TI-SCI node to system-controller. Signed-off-by: Andrew Davis --- arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi index 80aa33c58a452..1f1125208dedf 100644 --- a/arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi @@ -32,6 +32,10 @@ k3_reset: reset-controller { compatible = "ti,sci-reset"; #reset-cells = <2>; }; + + k3_reboot: reboot-controller { + compatible = "ti,sci-reboot"; + }; }; wkup_conf: bus@43000000 {