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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 249A2C433F5 for ; Sun, 28 Nov 2021 15:20:18 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C260680F81; Sun, 28 Nov 2021 16:20:15 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=akkea.ca Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=akkea.ca header.i=@akkea.ca header.b="FKEEYUwT"; dkim=pass (1024-bit key) header.d=akkea.ca header.i=@akkea.ca header.b="H8C1Ny9s"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9BBA580F9D; Sun, 28 Nov 2021 16:20:14 +0100 (CET) Received: from node.akkea.ca (li1434-30.members.linode.com [45.33.107.30]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id EA1C58083E for ; Sun, 28 Nov 2021 16:20:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=akkea.ca Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=angus@akkea.ca Received: from localhost (localhost [127.0.0.1]) by node.akkea.ca (Postfix) with ESMTP id 9BF4A4E2006; Sun, 28 Nov 2021 15:20:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akkea.ca; s=mail; t=1638112804; bh=FiVgVqryoyIgcRrgjsgvMXfGUbyKHmI6xly4KV53Xb4=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=FKEEYUwT53KUdx72wvRRicaB8vSz8W3enRfDzNhlM6l9x0BVH/LMUSIKsPNEyDAbI vHp11htG8zBqE1+gfDUz9in19DpB9b/eq2N3ejkxH71EMCiQpcMEkF6NETeNxJqIAN EypEERKe6jhjllQ2VC4DZj+d0MlyXmLAMzQBHh8k= Received: from node.akkea.ca ([127.0.0.1]) by localhost (mail.akkea.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TYBsmMew4p-m; Sun, 28 Nov 2021 15:20:03 +0000 (UTC) Received: from www.akkea.ca (li1434-30.members.linode.com [45.33.107.30]) by node.akkea.ca (Postfix) with ESMTPSA id AF52B4E2003; Sun, 28 Nov 2021 15:20:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akkea.ca; s=mail; t=1638112803; bh=FiVgVqryoyIgcRrgjsgvMXfGUbyKHmI6xly4KV53Xb4=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=H8C1Ny9sWrS1aqfGZMc2zrg2q1sAp/rfisndlEldvrC/DT5e6IZkR78Ea0Z0nJgnl Tp5mLmeHWDEG0dWwgGSvxQ4oyH1jRkdGCen9q8dOOJsAoHsoZhFxrWoxO63YVUVTVV 136OK9+JPsN1U+QoAqp2c4SAf3GcZ3/VAbxrrjxQ= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sun, 28 Nov 2021 07:20:03 -0800 From: Angus Ainslie To: Fabio Estevam Cc: U-Boot-Denx , Simon Glass , kernel@puri.sm Subject: Re: [PATCH] mxc_gpio: on imx8m read the DR instead of the PSR In-Reply-To: References: <20211128145143.1433262-1-angus@akkea.ca> Message-ID: X-Sender: angus@akkea.ca User-Agent: Roundcube Webmail/1.3.6 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.37 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Hi Fabio, On 2021-11-28 07:15, Fabio Estevam wrote: > Hi Angus, > > On Sun, Nov 28, 2021 at 11:52 AM Angus Ainslie wrote: >> >> On imx8m it is more correct to read the data register than the pad >> status >> register. >> >> In output mode the pad status register does not contain the value >> being >> output so we must read the DR for the value. >> >> In input mode the DR will contain the same value as the PSR when the >> pad >> mode is GPIO. >> >> If the pad mode is not GPIO and the pin is an input then 0 is always >> returned. > > Have you tried setting the SION bit of the pad? I have tried it with the SION bit set but I thought it would be better if the dts would match the linux dts and return the same result. Angus