Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp307387pxb; Fri, 15 Jan 2021 13:42:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJweefy/Hj8MkyiyGL9Bv/1HJnIshR1eIqkihLqvitRkbiwMtZo3JmFKpAYeZetotUsi4sb9 X-Received: by 2002:a17:906:4a1a:: with SMTP id w26mr4170475eju.422.1610746965779; Fri, 15 Jan 2021 13:42:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610746965; cv=none; d=google.com; s=arc-20160816; b=OoAwv+6KXunTDPrtsziEBgywI/vB2MizLJfno+Uv4Sc8Iuvv0gPTCmx+CTnqdLbkKN a2PG5WEQKzDv9ZO821hA6UcChNP2MMTJzNekYGNAqw1wR0g6g+rSmQFdlPiuc4mGRIAz B1/bdhn5XCmzXjF5m1+2FnNT28xO+9gAvl0EOdjzRs9BiqkHMWcS/fw1955/LdtaZs+2 Q9kCfamX6ZaZtJ8V23qlxAamWdE7pZLk284bG5aXVydFw9gAb0mN68d7fXTtX54x/yce bvQlF4Fs5TntR0Qo+lpHeJTkSyM6kQUQBwVUemn+4dM9+qhPX3xP6IkCpCE8bC9U2j12 +Zfw== 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=n0vrgI0v5AqdqRBlnR2zrY3ADnVU6Fc4aa8ej4oQxWI=; b=W5a2IU9LJWRcdVaY8XZXXTkrBvQXVIhDVCoETYiS7QAxA0UvURq5We2Q4kPKADAUWV HiAB2GqLYMSgK2Slx3ffEfLO0/xzUYDbLHZrzOyYacmKxlvmRLiULuN44ECqr74WCWf5 xx3fjdytbGJ+JBW/gst46MxNuvGpjM8O663FAivhp08nFoTHCD0zZPZ+qytKLZ9ZXuVp qnLOallgYXLasg6HkO4rR4QJriRbc6Oz90j23s5X1PJKvborL8jPHeUGtvfYB/RlMTpW +paTa827s/Ggf1oQIPHdle/7VSkIopXmxDgntxS/1FQujPVkzCX/vlERhXtsyiZ9WBkL Cl2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@beagleboard-org.20150623.gappssmtp.com header.s=20150623 header.b=ikcuoSYx; 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 u22si3980128ejo.574.2021.01.15.13.42.21; Fri, 15 Jan 2021 13:42:45 -0800 (PST) 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; dkim=pass header.i=@beagleboard-org.20150623.gappssmtp.com header.s=20150623 header.b=ikcuoSYx; 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 S1726438AbhAOVlF (ORCPT + 99 others); Fri, 15 Jan 2021 16:41:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726032AbhAOVlD (ORCPT ); Fri, 15 Jan 2021 16:41:03 -0500 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 087D9C061794 for ; Fri, 15 Jan 2021 13:40:23 -0800 (PST) Received: by mail-pl1-x62a.google.com with SMTP id x18so5372420pln.6 for ; Fri, 15 Jan 2021 13:40:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beagleboard-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=n0vrgI0v5AqdqRBlnR2zrY3ADnVU6Fc4aa8ej4oQxWI=; b=ikcuoSYxk+o95pgvXIejJia6Wa7r/h9H62sZs/9Cpe0sUYFhlD4wlTCAyWvkqgnFeR b7uz4pJ+VSk13U7/kgu/HN1fbjzCSiL1Fr0tHbBdEWI44HuPCaufm4EjQCvtNWcFY6+/ h95/5c9l7eYKlBEOHbNdaa2yfxd3eC8jF8lwQpuB1SvDRSoI2oxkC+6E8vKloU9c86LN IuNA0+P1JPndHgec5mX3JNo4ycRIS4mRaYQDTuy9Zq2PWmpA0bgKE+73iqWJ1AIXZ/J7 6pMr0mOQacx5TQxTFcRF6X8aapFgYLuxV1FzvvJ7e/IztP5mDs0dHeu+8yUz7dw4VE2m TDAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=n0vrgI0v5AqdqRBlnR2zrY3ADnVU6Fc4aa8ej4oQxWI=; b=TwhIzwKeAygFS2z3K2+pKxbAtni0jHwt37itELRWnWVKpkRA3IekByu0q+qSY4bOAb m8WL7q8hwJ8DvtapVMShgTPJFhB7IWvZYjsw06K44m3eiaHtyOO6dGUUbrf4cZ1G/wO+ CTnMoGjyD1dKK+6Yk5eYVOZ6B2j+ocTaxNR30bjCIjrbPsAYUy3FBu5TMgKY/NLUGLp+ mwQY2bwmomnTyyAeyPELQOT/xI46tE4sTMjEjMJo6Y8YRNLGioWqmMmuQJmw9G6MEOv/ JWqGuDiJpse/A1OGhx2Rj+vpIzw5bKIhSZk6UbQvLRRDcBlQBIgcRx6rF7rbJF9vxrzO 7flw== X-Gm-Message-State: AOAM532xX+SX/Klki7alx8BFSNS5Y1yxQX5G2kLWbadqWlSJY+hxHQLQ 2BOHss+a9orREgzrIM3EJeyLwQ== X-Received: by 2002:a17:902:8216:b029:dc:1e79:e74c with SMTP id x22-20020a1709028216b02900dc1e79e74cmr14532231pln.5.1610746821003; Fri, 15 Jan 2021 13:40:21 -0800 (PST) Received: from x1 ([2601:1c0:4701:ae70:1a90:2b4:7e34:6b31]) by smtp.gmail.com with ESMTPSA id e5sm8744463pfc.76.2021.01.15.13.40.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 13:40:20 -0800 (PST) Date: Fri, 15 Jan 2021 13:40:18 -0800 From: Drew Fustini To: Emmanuel Vadot Cc: Tony Lindgren , Rob Herring , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Linus Walleij , Haojian Zhuang , devicetree@vger.kernel.org, bcousson@baylibre.com, Jason Kridner , Robert Nelson Subject: Re: [PATCH v4 2/2] ARM: dts: am33xx-l4: change #pinctrl-cells from 1 to 2 Message-ID: <20210115214018.GA554007@x1> References: <20200701013320.130441-1-drew@beagleboard.org> <20200701013320.130441-3-drew@beagleboard.org> <20210115190201.9273b637a7f967e7e55bc740@bidouilliste.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210115190201.9273b637a7f967e7e55bc740@bidouilliste.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 15, 2021 at 07:02:01PM +0100, Emmanuel Vadot wrote: > > Hello Drew, > > On Wed, 1 Jul 2020 03:33:20 +0200 > Drew Fustini wrote: > > > Increase #pinctrl-cells to 2 so that mux and conf be kept separate. This > > requires the AM33XX_PADCONF macro in omap.h to also be modified to keep pin > > conf and pin mux values separate. > > > > Signed-off-by: Drew Fustini > > --- > > arch/arm/boot/dts/am33xx-l4.dtsi | 2 +- > > include/dt-bindings/pinctrl/omap.h | 2 +- > > 2 files changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/arch/arm/boot/dts/am33xx-l4.dtsi b/arch/arm/boot/dts/am33xx-l4.dtsi > > index a9cbefc80c0c..3141590e5889 100644 > > --- a/arch/arm/boot/dts/am33xx-l4.dtsi > > +++ b/arch/arm/boot/dts/am33xx-l4.dtsi > > @@ -278,7 +278,7 @@ scm: scm@0 { > > am33xx_pinmux: pinmux@800 { > > compatible = "pinctrl-single"; > > reg = <0x800 0x238>; > > - #pinctrl-cells = <1>; > > + #pinctrl-cells = <2>; > > pinctrl-single,register-width = <32>; > > pinctrl-single,function-mask = <0x7f>; > > }; > > diff --git a/include/dt-bindings/pinctrl/omap.h b/include/dt-bindings/pinctrl/omap.h > > index 625718042413..2d2a8c737822 100644 > > --- a/include/dt-bindings/pinctrl/omap.h > > +++ b/include/dt-bindings/pinctrl/omap.h > > @@ -65,7 +65,7 @@ > > #define DM814X_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x0800) (val) > > #define DM816X_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x0800) (val) > > #define AM33XX_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x0800) (val) > > -#define AM33XX_PADCONF(pa, dir, mux) OMAP_IOPAD_OFFSET((pa), 0x0800) ((dir) | (mux)) > > +#define AM33XX_PADCONF(pa, conf, mux) OMAP_IOPAD_OFFSET((pa), 0x0800) (conf) (mux) > > > > /* > > * Macros to allow using the offset from the padconf physical address > > -- > > 2.25.1 > > Based on the bindings doc a value of 2 is only acceptable if one uses > pinctrl-single,bits but all the am33xx pins still uses > pinctrl-single,pins. > I noticed this because this breaks FreeBSD when I tried with 5.9 dts. > > -- > Emmanuel Vadot Hello Emmanuel, Sorry to hear about that. This change was made based on discussion with Tony Lindgren this past July. Trent Piepho later pointed out issues wtih the change including the binding documentation. I had tried to fix the documentation in September [1]. However, I notice that it seems I missed changing the lines near the top of pinctrl-single.txt [2]: - #pinctrl-cells : number of cells in addition to the index, set to 1 for pinctrl-single,pins and 2 for pinctrl-single,bits I am thinking that should be re-written as: - #pinctrl-cells : number of cells in addition to the index, this value can be 1 or 2 for pinctrl-single,pins and must be 2 for pinctrl-single,bits Tony - what do you think? Thanks, Drew [1] https://lore.kernel.org/linux-gpio/20200919200836.3218536-1-drew@beagleboard.org/ [2] https://www.kernel.org/doc/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt