From mboxrd@z Thu Jan 1 00:00:00 1970 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 8F2FFEB64DD for ; Thu, 3 Aug 2023 15:58:09 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:CC:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wNQvWtebymzkKJJKBn35vGDFUku0LYl+YzvzmQPUoXc=; b=Mr+uziSiIzbpI1 UfxsR1V11yi0IUW6M6F1wtZpcAeYx6JeoXZiLixLyIDu6d4Tv4L2IEEhNoQ51EMaTjkKuANV7qKO0 kQwpv7vYWujDAvW6vZyKhs0Oyf1UHjtwfq0hTgwfwALb79dlu3g+8e9ApL4nEqaXdZorpHEGZd34p o0Ie4B8xyEYDGAu47PmP0wB2l+Izd/AWX07R1UI03kSw4xy0FRkKya3JWL+ZLMH8Jt5tV9pKSa5nD Cm2gSrO0CSAvNHyF9VK+0tuZwmActhJ4YPU67POl6Kn/XOG6kLssj5JyYUu5sCY5hfEtYLjo2myYf 0DZ1+9No2737aeMvHIcA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qRahs-00AGNh-2e; Thu, 03 Aug 2023 15:57:44 +0000 Received: from fllv0016.ext.ti.com ([198.47.19.142]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qRahp-00AGMq-2t for linux-arm-kernel@lists.infradead.org; Thu, 03 Aug 2023 15:57:43 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 373Fvaa6079791; Thu, 3 Aug 2023 10:57:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1691078256; bh=ap9tKouw072YkIwIE1OUhTE7tz2wKEeSEURmBKG1QQc=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=Sle5TNoqJlPMEECyl3wVffUDjOuJYimYpvGTFuj9JwJMD+jLLzJubzKJExGD62yFs 3D7neFqK8quSne5q+eTGlHnC4sTawI+hHrV+mfuF9Et/00o+ScXLHb/4Ana75h2S2F a7ZzNiP735J9t3ChzY36JLOZlnAHk4WDhq0c1bgU= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 373FvaQ2111483 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 3 Aug 2023 10:57:36 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 3 Aug 2023 10:57:35 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE106.ent.ti.com (157.170.170.36) 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; Thu, 3 Aug 2023 10:57:36 -0500 Received: from [10.250.36.243] (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 373FvZWK025943; Thu, 3 Aug 2023 10:57:35 -0500 Message-ID: <4019ef37-1c3d-ae2c-3006-17487e69f077@ti.com> Date: Thu, 3 Aug 2023 10:57:34 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH V6 1/4] firmware: ti_sci: Introduce Power Management Ops Content-Language: en-US To: Dhruva Gole CC: Nishanth Menon , Tero Kristo , "Santosh Shilimkar" , , , , Viresh Kumar , Praneeth Bajjuri , Tony Lindgren , Dave Gerlach , Vibhore Vardhan , Georgi Vlaev , Roger Quadros References: <20230803064247.503036-1-d-gole@ti.com> <20230803064247.503036-2-d-gole@ti.com> <930ffb16-f212-0bcb-4713-2acc138c4035@ti.com> <20230803154204.iyohslrpma7bqqpk@dhruva> From: Andrew Davis In-Reply-To: <20230803154204.iyohslrpma7bqqpk@dhruva> X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230803_085742_034585_3D405CD4 X-CRM114-Status: GOOD ( 22.90 ) 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: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 8/3/23 10:42 AM, Dhruva Gole wrote: > On Aug 03, 2023 at 10:14:03 -0500, Andrew Davis wrote: > [..snip..] >>> #define TI_SCI_IRQ_SECONDARY_HOST_INVALID 0xff >>> /** >>> diff --git a/include/linux/soc/ti/ti_sci_protocol.h b/include/linux/soc/ti/ti_sci_protocol.h >>> index bd0d11af76c5..f2d1d74ab8fc 100644 >>> --- a/include/linux/soc/ti/ti_sci_protocol.h >>> +++ b/include/linux/soc/ti/ti_sci_protocol.h >>> @@ -195,6 +195,49 @@ struct ti_sci_clk_ops { >>> u64 *current_freq); >>> }; >>> +/* TISCI LPM wake up sources */ >>> +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_WKUP_I2C0 0x00 >>> +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_WKUP_UART0 0x10 >>> +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_MCU_GPIO0 0x20 >>> +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_WKUP_ICEMELTER0 0x30 >>> +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_WKUP_TIMER0 0x40 >>> +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_WKUP_TIMER1 0x41 >>> +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_WKUP_RTC0 0x50 >>> +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_RESET 0x60 >>> +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_USB0 0x70 >>> +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_USB1 0x71 >>> +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_MAIN_IO 0x80 >>> +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_MCU_IO 0x81 >>> +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_CAN_IO 0x82 >>> +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_INVALID 0xFF >> >> I don't see these used in this series, do you need them? lpm_wake_reason() > > True, we are not currently using these macros. They _maybe required in > future. > I can remove them if required? > >> doesn't seem used either and I'm not sure how you plan to use it, could >> you detail that? > > When the system wakes from suspend-to-mem we can check which > subsystem has woken us up with the TISCI LPM_WAKEUP_REASON message. > There's no hardware event generated and we have to ask the firmware > for the actual wake reason. > > We may want to add support for a wake up interrupt controller that will > generate an interrupt for other subsystems. This might end up using this > lpm_wake_reason API, hence even though the function maybe unused today > it will be required for above described scenario. > > However if you prefer that I remove it and then add it in future when we > finally write a working interrupt controller driver, then do let me > know. > It's easier to review code that is used. We may go with a completely different approach by then, will be easier to unwind this if you don't start with it, only add it when used. Andrew >> >> Andrew >> >>> + >>> +/* TISCI LPM IO isolation control values */ >>> +#define TISCI_MSG_VALUE_IO_ENABLE 1 >>> +#define TISCI_MSG_VALUE_IO_DISABLE 0 >>> + > [..snip..] > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel