Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp2709926rwb; Mon, 7 Aug 2023 02:02:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFvP+wK6hwKHVBOEfWzKxvKzmDFmuv582FTQgnP58u/k7PbybKgt3R5MBgh8KYN/sl+xlD9 X-Received: by 2002:a05:6a20:4fa3:b0:13d:54cd:63e7 with SMTP id gh35-20020a056a204fa300b0013d54cd63e7mr8535227pzb.33.1691398956725; Mon, 07 Aug 2023 02:02:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691398956; cv=none; d=google.com; s=arc-20160816; b=0EzRJtn3Tl6d6SVtBmMussi1sYEm2z5LvAcn+D0uYWpSqwlkEEOXQSmXNRsL5SD0cw OO0eO0UwHSg87OA+0SRCSRgYdFP3zmQfi32iWrvihKiCneo8//TdlGMUjSYZHbVEObX8 +J5SmJlgHH0m99STMwS/IVJynDbZ9BCayocP+dmzen9BGZ7LpntD7F+lZoae5hy3y4dP TmQ/QKJ8Qupq/Jzg2jNd9r8pcbZyWeLlemCIL86m3yc4MgEh3ANAoqz6kHrn6Zh/+t4a ohOn67OE0UxBunUbMUMd+YoeQ9EcgcbMDsfzfvS3PTWzxV9dMhDALqImEI0NNSHUPd7+ +IKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=qXreic1jeDVpRWpVaJNwZXPhQDgIeVSEDk98xTOHGBY=; fh=W+XECX+Q7RZrsH5z0IIYiFhahsEUz1SxZJX04n0sL2c=; b=lJW+shsNEzu/v9qK3xVk/Z9NP8UWGSlnwAt2NqiAq5eJ1vrJV5yiA/RkVeOGPKTiig z9Qf1NnSIDhqBUWpWcfiQOj6kMEY34/w0iHn+Y0M76XYsOF1b4mIjNHl0jaOGwjbSkHD AoisvMB4jzyC+o56nJuAKODHaeAk2yu4lWb9bCdu8Q04oPgln8IIIwdR3hjuv7s+W8Ij 0IK87dGJoWtoum2kbxC9QB9Cvdf4c2ylWh1lDF2rNOf2GSz/Ahe0I5yH2FmPss62GH7n yAtCVB45UqcyojoidEBv3b/KN6vpwhtc0fwaM8oczdFrwTp/JEkSvBViW0nFpIXzZI3j bXOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=xhI9Yiuz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 63-20020a630942000000b0055ba8970e79si5571375pgj.587.2023.08.07.02.02.23; Mon, 07 Aug 2023 02:02:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=xhI9Yiuz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230356AbjHGIJb (ORCPT + 99 others); Mon, 7 Aug 2023 04:09:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229515AbjHGIJa (ORCPT ); Mon, 7 Aug 2023 04:09:30 -0400 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 839D1170A; Mon, 7 Aug 2023 01:09:29 -0700 (PDT) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 37789NeD088783; Mon, 7 Aug 2023 03:09:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1691395763; bh=qXreic1jeDVpRWpVaJNwZXPhQDgIeVSEDk98xTOHGBY=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=xhI9Yiuz1Uumh52CcWtha1h6ubD29E+hDHlxmTz9RdmGawemMH5Mc3q7pnGgqxgTx YzQcV9BB01dN1Uy/1N//ldg8zBWHJj1x8WaMj97WjTBXPXSTD4Oli984K+cV2uGjm5 PEktHsDE6401V/UO9C7P9dCj7xcnkNznml0QUngY= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 37789Nxt095413 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 7 Aug 2023 03:09:23 -0500 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; Mon, 7 Aug 2023 03:09:23 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) 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; Mon, 7 Aug 2023 03:09:23 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 37789MwN023168; Mon, 7 Aug 2023 03:09:23 -0500 Date: Mon, 7 Aug 2023 13:39:22 +0530 From: Dhruva Gole To: Tony Lindgren CC: Nishanth Menon , Linus Walleij , , , , , Vignesh Raghavendra Subject: Re: [PATCH] pinctrl: single: Add compatible for ti,am625-padconf Message-ID: <20230807080922.t35yvyvrknjcriyr@dhruva> References: <20230805045554.786092-1-d-gole@ti.com> <20230805171508.schg4xquoa24klk5@october> <20230807070724.GN14799@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20230807070724.GN14799@atomide.com> X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Aug 07, 2023 at 10:07:24 +0300, Tony Lindgren wrote: > * Nishanth Menon [230805 17:15]: > > On 10:25-20230805, Dhruva Gole wrote: > > > From: Tony Lindgren > > > +static const struct pcs_soc_data pinctrl_single_am625 = { > > > + .flags = PCS_QUIRK_SHARED_IRQ | PCS_CONTEXT_LOSS_OFF, > > > + .irq_enable_mask = (1 << 29), /* WKUP_EN */ > > > + .irq_status_mask = (1 << 30), /* WKUP_EVT */ > > > +}; > > > + > > > > Why cant we set this in the k3-pinctrl.h and set it once? Do you mean that I set 1 << 29 and 30 as sort of macros in the k3-pinctrl.h file and then include it in pinctrl-single.c? Are we okay to #include a header from arch/arm64/boot/dts/ti? > > Good idea to define the bit offsets k3-pinctrl.h instead of magic numbers > here :) If I understand what Nishanth is saying correctly, are we expected to set the wake_en bit on every single K3 SoC's every single padconf reg? I am a little sceptical with this approach, because what is people _don't_ want to wakeup from certain pads? What would be the right way to disable wakeup on those pads then? > > > The event will not be generated until wakeup daisy chain is triggered > > anyways. Any voltage level shift can potentially trigger a daisychain and I don't think that's really such a good idea? > > Yup, and having that happen is enough to show the wake-up reason with > grep wakeup /proc/interrupts :) > > > Have you looked at all the padconf registers across devices to ensure > > the WKUP_EN/EVT bits are present? daisy chain feature is used elsewhere > > as well. In my limited experience, I have only seen daisychain wakeups being enabled on AM62x SOC. This is because this is one of the first K3 devices to implement deepsleep, and I think IO daisychain only applies for wakeups in the case of deepsleep kind of scenarios. > > The lack of bits at least earlier just meant that attempting to use a > wake-up interrupt would just never trigger. Worth checking though. > Dhruva, care to check if some padconf register have reserved bits for > 29 and 30 that might be set high by default? Sure, I could take a look, but setting wake_en on all pads still doesn't feel right to me. > > Regards, > > Tony To summarise, I don't think any other devices are using daisychain atleast today, and even if there is possibility of using in future I think the same compatible I have used here can be used to set wake_en wherever applicable, for eg. whenever AM62A would want to use daisychain it can use this quirk in it's DT node. I believe that we shouldn't set every pad as daisychain enabled otherwise in deepsleep it may result in unintended wakeups. And the way I thought we can give this choice to the user is using wakeirq chained interrupt along with this quirk, compatible = "ti,am6-padconf"; -- Best regards, Dhruva Gole