Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp10598ybt; Tue, 30 Jun 2020 13:46:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzFLr3NYEE4E6uuUnxKu/VuTrkexj18zQ8bCmEFDmaQTk9leYijSeK9mNJsBmKV0Myx3Pc X-Received: by 2002:a17:906:26c7:: with SMTP id u7mr17731385ejc.13.1593549621586; Tue, 30 Jun 2020 13:40:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593549621; cv=none; d=google.com; s=arc-20160816; b=hHeOp2Cu2lo4sNBwJ9ajGPSA/oDj3WMEYZLIuFe00j1kuWWA9muBxwX9nw1G1g2K49 jvl40Q81sZCVB4HV5bW1ydSGPCAMOXvKDF6zBQKYbcz2DKkxOkkq1C7DXvk8KXWU3De7 SE0UeMtSDLYJFP/LiWoFQWC88bmW66nX5SDOz7yfx9TFlqwAjC18hIxV7r8k5bzw7DpN 587yLhB1z3rcxF6rXzJY4VfblgqMR7Wo69y8sO7CxIKejWpTr3A7RqvyGpzDuXFmWy+e PtaQjwIG0KdjaiO0nq7vFBmJASpqnj7QABygsZAF59eG9JWvz2X9GEFFSrq0ujDdH2ZS mR0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=nhqJIpcbZ88rzaqnnGn34poYpVY4cQx2c+crP9fgmGw=; b=g1NBmQzGC4LSZK+ZhM3WOLUH6EFHP/I/aa7kLl/3mmVn2bPkRPYX7uHQ8lfLHpCv/7 LAW+hJI0X+ufpcs21ymLvjf0FHm+nF9YUPht9FrFO4zzwgnsoaqMExQ/FdxwEmZZJUxK 46dmN1OPwFlezw2jhzRIUHHT3pqM8q8RCRc4UDiM1fxFv6s50uPeo88PT0eVo6lvg80n G6AIeYbewKZ7Wkbm7J732RYqymVR0CRjIQ6AJp/GgLQyhEpbpDZtFR+ptu3rUPwdDMl0 c7sHrvM+HQ+O77GsDT19WFIDaw5z4HQ9nqkMIaQuQ6+31f1HhiKnlSrOO0y8W/ye4QQE kuOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id yj19si2497878ejb.410.2020.06.30.13.39.58; Tue, 30 Jun 2020 13:40:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388228AbgF3SUn (ORCPT + 99 others); Tue, 30 Jun 2020 14:20:43 -0400 Received: from muru.com ([72.249.23.125]:60110 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733297AbgF3SUn (ORCPT ); Tue, 30 Jun 2020 14:20:43 -0400 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 620CE8164; Tue, 30 Jun 2020 18:21:33 +0000 (UTC) Date: Tue, 30 Jun 2020 11:20:37 -0700 From: Tony Lindgren To: Drew Fustini Cc: Rob Herring , bcousson@baylibre.com, linux-omap@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jason Kridner , Robert Nelson , "H . Nikolaus Schaller" , Linus Walleij Subject: Re: [PATCH v2] ARM: dts: am335x-pocketbeagle: set default mux for gpio pins Message-ID: <20200630182037.GF37466@atomide.com> References: <20200628152442.322593-1-drew@beagleboard.org> <20200629170358.GT37466@atomide.com> <20200630020102.GA45128@x1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200630020102.GA45128@x1> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Drew Fustini [200630 02:02]: > On Mon, Jun 29, 2020 at 10:03:58AM -0700, Tony Lindgren wrote: > > Hi, > > > > * Drew Fustini [200628 08:26]: > > > v2 changes: > > > - change default mux from output to input. Input is safer as it does > > > not drive the line. If the user wants output, they will need to edit > > > this device tree. > > > > So can you please clarify this a bit, are you saying that gpio output can't > > be done via userspace? > > As it stands, there is no way for userspace to change a pin from gpio > input to gpio output as it is based on the reciever active bit in the > pin control register (table 9-60 in the AM3358 datasheet [0]). OK. I guess one not so nice option would be to enable receiver active for all the gpio pins.. But this also affects power consumption a little. > I thought it would be useful to at least define the GPIOs available for > use on the PocketBeagle by default (and eventually the other BeagleBone > device trees). Input seems to be the safest value. This patch at least > makes it more clear where the user should edit to switch from input to > output. Some TI TRMs actually have tables listing the preferred mux logic for unused pins. I recall safe mode input pull down being one of the preferred modes. Sorry not sure which TRM that is, maybe omap3 or omap4 or omap5? > > Needing to change the dts does not sound good to me.. But maybe you mean > > this is needed until the gpio-omap and pinctrl-single patches are merged? > > I agree that I would like for userspace to be able to do run-time > changes. However, I think something would need to be added to the > pinconf support in pinctrl-single for that to be possible. There are > bias properties but non for receiver enable. > > Does it seem sensible to add that? Well let's see with Linus W says. To me it seems this might be a good reason to allow a sysfs interface to change the pinctrl if we don't have it yet? With the proper gpio line naming it should be quite simple to use too :) Regards, Tony