From patchwork Tue Dec 19 07:25:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 13497923 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 261C1C41535 for ; Tue, 19 Dec 2023 07:26:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :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=VTfIuFKGjP27A+7fEvvpeSFkZJE9/uYPNJdurIH98gA=; b=rQMVPe22et7l49 O/WRfjRLA+BBi0+q0ZUN0twFMKruOMOm56+j2b7yeLJRhhbue7XNZ5ccKphS1unVSAOS5rh5gycjP NqWxUuQVNdmTJ0PSLMIt5CeWpwii3yufNEh3ra46K0ZldmaihslFrWtj6xxxy0vR8EN4bS3sZBpsY rQFBZuGtkv9ZFBbWHebqv4rGytMYCzzQ2Cny7lDmc37k3/fx+U4l+FK7iamF0FFLOWtOHGf1hU9cM IzKyO6AzOOwlGSp7yKroykAH/ss6qLjkuDOqylyrQNe9M653+YMkbfFqq78/XFSLdb7rSFRahuHnQ o+imYgLx2gsDqIATLWgQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rFUU4-00D4u3-06; Tue, 19 Dec 2023 07:25:44 +0000 Received: from mail5.25mail.st ([74.50.62.9]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rFUTz-00D4rN-0m for linux-arm-kernel@lists.infradead.org; Tue, 19 Dec 2023 07:25:41 +0000 Received: from localhost (91-158-86-216.elisa-laajakaista.fi [91.158.86.216]) by mail5.25mail.st (Postfix) with ESMTPSA id 62691604D5; Tue, 19 Dec 2023 07:25:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=atomide.com; s=25mailst; t=1702970738; bh=GmHlF0gJsvMlurGp4NdLNFDOaIpDj3Uq5WSvMZGtiTw=; h=From:To:Cc:Subject:Date:From; b=JoefOzwybbT2dBz0a+G3SdX+cM+nQzVZ70SZLuybwec9m44f/UwO8+PqieS+cOYoy NbsrNhqxR/81wmZtNfq1tQ2nrkZXzwD1CjrCm5R8juE+YQB+amUIn++F9zkMqUlZZn itJt9NJM4pc7nY/5RVgbWGWwQAKpiXjw28uYQuaViofSE+lT0z5L5UhsFwqviPW0P6 zpwZ9yAds8+D6sQGVMik6okKCyfo5RDFAtPyhxNl5QwyDQuU/a/prdS8whylHQMraP SM5n53nKDiqp6U+wM9fAQdxbbZmGSdrOXz3QOv6HoUrZwz27ToHlfaRHnuILJhFxQ2 wvpW/cEjklRjQ== From: Tony Lindgren To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Dhruva Gole , Kevin Hilman , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH v4 1/1] arm64: dts: ti: k3-am62-wakeup: Configure ti-sysc for wkup_uart0 Date: Tue, 19 Dec 2023 09:25:01 +0200 Message-ID: <20231219072503.12427-1-tony@atomide.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231218_232539_499308_155B1D74 X-CRM114-Status: GOOD ( 15.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The devices in the wkup domain are capable of waking up the system from suspend. We can configure the wkup domain devices in a generic way using the ti-sysc interconnect target module driver like we have done with the earlier TI SoCs. As ti-sysc manages the SYSCONFIG related registers independent of the child hardware device, the wake-up configuration is also set even if wkup_uart0 is reserved by sysfw. The wkup_uart0 device has interconnect target module register mapping like dra7 wkup uart. There is a 1 MB interconnect target range with one uart IP block in the target module. The power domain and clock affects the whole interconnect target module. Note we change the functional clock name to follow the ti-sysc binding and use "fck" instead of "fclk". Tested-by: Dhruva Gole Reviewed-by: Kevin Hilman Signed-off-by: Tony Lindgren Tested-by: Markus Schneider-Pargmann --- Changes since v3: - Use the first reg for the target module node name to avoid a make W=1 dtbs warning as noted by Nishanth Changes since v2: - Fix node name for 8250 IP, it's at offset 0 from the target module - Added Kevin's Reviewed-by from v2 as the node name change is mostly cosmetic Changes since v1: - Added Tested-by from Dhruva --- arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi | 33 ++++++++++++++++++---- 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi --- a/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi @@ -5,6 +5,8 @@ * Copyright (C) 2020-2022 Texas Instruments Incorporated - https://www.ti.com/ */ +#include + &cbass_wakeup { wkup_conf: syscon@43000000 { bootph-all; @@ -21,14 +23,33 @@ chipid: chipid@14 { }; }; - wkup_uart0: serial@2b300000 { - compatible = "ti,am64-uart", "ti,am654-uart"; - reg = <0x00 0x2b300000 0x00 0x100>; - interrupts = ; + target-module@2b300050 { + compatible = "ti,sysc-omap2", "ti,sysc"; + reg = <0 0x2b300050 0 0x4>, + <0 0x2b300054 0 0x4>, + <0 0x2b300058 0 0x4>; + reg-names = "rev", "sysc", "syss"; + ti,sysc-mask = <(SYSC_OMAP2_ENAWAKEUP | + SYSC_OMAP2_SOFTRESET | + SYSC_OMAP2_AUTOIDLE)>; + ti,sysc-sidle = , + , + , + ; + ti,syss-mask = <1>; power-domains = <&k3_pds 114 TI_SCI_PD_EXCLUSIVE>; clocks = <&k3_clks 114 0>; - clock-names = "fclk"; - status = "disabled"; + clock-names = "fck"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0 0x2b300000 0x100000>; + + wkup_uart0: serial@0 { + compatible = "ti,am64-uart", "ti,am654-uart"; + reg = <0 0x100>; + interrupts = ; + status = "disabled"; + }; }; wkup_i2c0: i2c@2b200000 {