Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5578894imu; Mon, 26 Nov 2018 02:26:49 -0800 (PST) X-Google-Smtp-Source: AJdET5fnUpX57lJgrnVXscMT/KA6Oog8mtEXxmzOts9EwzIPNcFgiAXnDU5/mRwcejAh2sJn4OF1 X-Received: by 2002:a62:3305:: with SMTP id z5mr27738999pfz.112.1543228009125; Mon, 26 Nov 2018 02:26:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543228009; cv=none; d=google.com; s=arc-20160816; b=XS9DS99mfeZgoIqoa2UqSfKNZV3ci71Wb/I8WSDI1vNM7DeWh+cWkM9kTOFTVzEDmX dGsI9Wq4LNy2jwS+BqqzGidyLW4NJmgCoDRKMh4lWjyMY4qsFPB1aV5qGMwycrR5RlZd frFQt7xXqsf5miXpKqnqDYDMMfqTH+5RaNqDOZQsUQdsy1EoJNfEtuwG59rgilz29klu OTaXDlZpx+3D2NL5y2t3AeYk2ar79LBc/CPMB971ZaAoELvLBF/u5OB6uwhv/nlTX79d 65aFYiLzgbW0I8BSxehxGV2UcNxMl97aDRiZ+UlYxR8Cr2zt5BqXg60Y6vRoMiWRtM9u ke+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-disposition :user-agent:in-reply-to:mime-version:references:message-id:subject :cc:to:from:date; bh=KM6nDDAZoH50q81Sbl24Iwo9CmiGsOgSZst6krGj2Y4=; b=EzIaAOUcnXzJkEKW+j7EAzq6u//iN28ct/qHIC2zmB+RItslmzE34ot5MpTcIcXFyd CIH62PVQiz+yHQI4B6M0TS8yQMVcW+HIMnmoXjDuFnBYHkDhldNMYGsEPxgarWxCcfyU RD68VwcOAsuMgfYExP2db5j0LzN5dUeN+x3LVQMdrCUFvKIcGobCi3C8reqanMq6R4Gk Fv1qPbXwgqmML92QS9a3bf+HgYTfCJFFY2RdweoT17U7eOFysPcerR7MMFpgUJlOlozZ 0+mGXDRzormDaIhKXmgKg8IsqhV1G2V8UCGEowiQAi9Hrr3dDtfjn37ktV6MLmo3xyD6 eWtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=lZQJ4QTj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t65si4250995pfb.247.2018.11.26.02.26.33; Mon, 26 Nov 2018 02:26:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=lZQJ4QTj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726349AbeKZVT1 (ORCPT + 99 others); Mon, 26 Nov 2018 16:19:27 -0500 Received: from hqemgate14.nvidia.com ([216.228.121.143]:15113 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726105AbeKZVT0 (ORCPT ); Mon, 26 Nov 2018 16:19:26 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 26 Nov 2018 02:25:46 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Mon, 26 Nov 2018 02:25:45 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Mon, 26 Nov 2018 02:25:45 -0800 Received: from localhost (10.124.1.5) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 26 Nov 2018 10:25:44 +0000 Date: Mon, 26 Nov 2018 11:25:42 +0100 From: Thierry Reding To: Peter Ujfalusi CC: Tony Lindgren , Jon Hunter , Belisko Marek , LKML , , "Dr. H. Nikolaus Schaller" , Laxman Dewangan Subject: Re: omap5 fixing palmas IRQ_TYPE_NONE warning leads to gpadc timeouts Message-ID: <20181126102541.GC10878@ulmo> References: <20180703084516.GT112168@atomide.com> <20181113180656.GE53235@atomide.com> <46d271b2-35d3-6353-c530-3292cdac53ab@ti.com> <20181119161906.GP53235@atomide.com> <20181119171406.GQ53235@atomide.com> <725df8e7-4aff-3751-d0b0-809b89e882e5@nvidia.com> <20181123164827.GE53235@atomide.com> <20181126093625.GA10878@ulmo> MIME-Version: 1.0 In-Reply-To: X-NVConfidentiality: public User-Agent: Mutt/1.10.1 (2018-07-13) X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL101.nvidia.com (172.20.187.10) Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="f0KYrhQ4vYSV2aJu" Content-Disposition: inline DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1543227946; bh=KM6nDDAZoH50q81Sbl24Iwo9CmiGsOgSZst6krGj2Y4=; h=X-PGP-Universal:Date:From:To:CC:Subject:Message-ID:References: MIME-Version:In-Reply-To:X-NVConfidentiality:User-Agent: X-Originating-IP:X-ClientProxiedBy:Content-Type: Content-Disposition; b=lZQJ4QTjKKoAhpYW8Phanv3okVwfvJx6DPFNTkUZtEJrF5uiliDhXpa+zs1a3w2T8 8ZYIw8VvdbSMSh5teAtHGmJ0rodz+Gs2f2G0DlbKdwxlt9NZfdFRvb3MubHZ5ZDc3x +KXvnWWJ2xwlJCzte2gEKqziT4CpHHDVWrDeKENsGCIXFXdneK1l1gXFc3wI2y0cuS 4dkDcsMvWLHdF8hMJFV8QITun/JSTdbYzl+cffRFP0kqKBz/5iGtt43Rkc95tpyrrp u9XH08g1wXnFyuZ/WF6mICBHStboU1SM+spSVP6Ja7Z8B5oPaM5vYqHf+PKIYkkHKs dbsWizG826hcw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --f0KYrhQ4vYSV2aJu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 26, 2018 at 11:49:54AM +0200, Peter Ujfalusi wrote: > Thierry, >=20 > On 11/26/18 11:36 AM, Thierry Reding wrote: > > On Fri, Nov 23, 2018 at 08:48:27AM -0800, Tony Lindgren wrote: > >> * Jon Hunter [181120 11:14]: > >>> On 19/11/2018 17:14, Tony Lindgren wrote: > >>>> Well so commit 7e9d474954f4 ("ARM: tegra: Correct polarity for > >>>> Tegra114 PMIC interrupt") states that tegra114 inverts the > >>>> polarity of the PMIC interrupt. So adding Jon and Thierry to Cc. > >>> > >>> Yes Tegra can invert the polarity of the PMIC interrupt. > >> > >> So is there some IP on Tegra called "Tegra PMC" that is > >> inverting the interrupt? Or is the "Tegra PMC" that commit > >> 7e9d474954f4 mentions just the palmas configuration for > >> inverting the interrupt? > >=20 > > Yes, there's indeed an IP called PMC (Power-Management Controller) on > > Tegra. It has a special input that is usually wired up to the PMIC > > interrupt and a bit in the control register that configures the polarity > > of that interrupt. If the PMIC generates a low-active interrupt we > > usually set that bit to make sure it is properly sampled by the PMC. > >=20 > > The symptoms of this being incorrectly configured is usually an > > interrupt storm on the PMIC interrupt, which I think typically results > > in the system not booting at all, or taking a very long time to boot > > because of that storm. > >=20 > >> The problem I'm having is With omap5 where I can only get the > >> PMIC interrupts working with IRQ_TYPE_LEVEL_HIGH if > >> PALMAS_POLARITY_CTRL_INT_POLARITY is not set unlike for > >> Tegra. > >=20 > > Does somebody have access to the Palmas documentation? That should > > pretty clearly state what the default polarity is and what it changes to > > if you set the interrupt polarity bit. >=20 > The register map documentation I have states the following: > bit7 INT_POLARITY Select the polarity of the INT output line > 0: Interrupt line (INT) is low when interrupt is pending (default) RW > 1: Interrupt line (INT) is high when interrupt is pending >=20 > By default the Palmas irq is active low. That would confirm that the driver code is correct. My understanding is that the PMC on Tegra expects a low-active IRQ from the PMIC, so we need to invert the interrupt again in the PMC. > > From what you're saying it sounds like either the logic is the wrong way > > around in the Palmas MFD driver (and we correct it by switching it back > > to the correct polarity in the PMC) or that you'd need to find some way > > of inverting in on OMAP5. =46rom the above it sounds like there would need to be some mechanism in OMAP5 to invert the PMIC interrupt, similarly to how it is done in the PMC on Tegra. Thierry --f0KYrhQ4vYSV2aJu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAlv7yiIACgkQ3SOs138+ s6Gzug/+JNM3GWVVAq4tUhcK81m2KTuysWyjWF4VVKDgpi6U9esstKZaTTTZde8N dOmkgjZeKGlzOHyuqrM4ax2GD8BMN4v/eXgXifQ8ybTDYs3UU2V7elcJ7Mqm49oJ fIVDmOedsR0p5oemtMIhs9Grt6bVPoqtKMa2AbzKBawp2kmJ4kmTnCcbDs1ZLoWd dO1yHVY2npdOIIycsfL4NqtVm/b/EFEsnDMVjnau7FsZbbVCNG3gxUM0fZ9yb8+G H9UeQOA2NqcX3u0PhCVnpWZxtrgtWRU/WUpnEIg+JM+M4kZMP0Ac1zF0I2moA8bY AmFzDceqPWUINjTGgXw7eUNAFrnZAGw1oP5ebxFE+jcu1b6OhGmqN+SpdG4cmNBx p19KGI8bwkA+mBNxP4bMKn8KHRq5zJMI/pYRR2b9/PAXx3JOZKIW8FZ3uBVuKSzX ggOAFRZ+AH7vGtFednADnktNduOxYWJZfCcElGF/WkSBHn26HkUN9l99klreCfMD mEw8wzRl2pZJ0qTAEqSHnYHwQzF3S2FTvQqOmtJwKyB3kifOLY2yFYyd0TJkGYHd EemjDsxw/0e6FS9lWDava3dfMOvet/pHUUkGoN+dHfAmdWghEXv8hlSwbCSng/Rs igmmOuLdkJG8Qu/qTQHdSh4Nx0W+zivwoelbheJvqxAgu4FleVM= =uTXL -----END PGP SIGNATURE----- --f0KYrhQ4vYSV2aJu--