Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1806452pxb; Sun, 17 Jan 2021 23:46:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJynXQoJB7TRqE7n8bE4D6cLBYLOZX1RpEYJDQDDLUwrz64jVQFklS806wjt4Gh51QyesxSz X-Received: by 2002:a17:906:4a04:: with SMTP id w4mr8662557eju.46.1610955967347; Sun, 17 Jan 2021 23:46:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610955967; cv=none; d=google.com; s=arc-20160816; b=OacAt0Uk1bktsnYGsF0Ct6hTL8j+zpg4BGg3nmj5ZtoctQ61KZUOseooBf446Y4CYE 1VOewKcVrszL17gwvbfQAWMUwWM3m5y0L30qaF6cpdtFxzgne9ErAC4H009Fe7/0D767 ms8mGzoqw/xt1GQGlLzgRrnFUvA3hPPz7M6ITiSpFk6f0zdFoydFytJv2MA2/cc5n3cJ 6ixDHxFFqhkIMWcTkaNlNx9TMU0hedrT/UXvsvVGED6WCafkQrlwD8GzFk417pbTnoJm +kJ7+dxWKD6g/WcDHcPy2gUfMEorjL6qQbbNtniLoDvD4PxEjibIoZiZryu0YFIVg+mN 03hw== 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; bh=L32rmDnPyczn9GFiNdM2H8mAn/DbJr7zckwtKhsZ1J8=; b=VbJk8rMY+H8dhn57a/paSJneAMzrCC/dt+WP+bhfv4WVfZxG8wnBmQBW+4tMrFMYvt Bj7qC5lh9X+OetdxHuibG4zA1DeYnjno+zZ1bKdrKJTwSfzRIANC7YwQFe7yyvwK9XyV 6Tdivyt6NLjTOeIkv/Bk2oEzknmHEUSalGVV/0HgiXfvh0U9muN/1oyFmhbc/CiEAZ36 jCg4JwPE2/OWeFF1ONCv+K8S1+JBb+dxRCLuF3glv0zZMJ3Dj8GdiIO7RrjXQ2jHuHdf jQGv1E6XbRWc0OfxXZ+j2Qn3L0paLbGanB1DwG72y4l7IZNJrO2VvHR3HSjhTgJX/iGx ImOg== 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 s24si7483673ejd.135.2021.01.17.23.45.43; Sun, 17 Jan 2021 23:46:07 -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; 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 S1733019AbhARHlu (ORCPT + 99 others); Mon, 18 Jan 2021 02:41:50 -0500 Received: from muru.com ([72.249.23.125]:55324 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730272AbhARHlq (ORCPT ); Mon, 18 Jan 2021 02:41:46 -0500 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 382D680AE; Mon, 18 Jan 2021 07:41:03 +0000 (UTC) Date: Mon, 18 Jan 2021 09:41:00 +0200 From: Tony Lindgren To: Drew Fustini Cc: Emmanuel Vadot , 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: References: <20200701013320.130441-1-drew@beagleboard.org> <20200701013320.130441-3-drew@beagleboard.org> <20210115190201.9273b637a7f967e7e55bc740@bidouilliste.com> <20210115214018.GA554007@x1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210115214018.GA554007@x1> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Drew Fustini [210115 21:40]: > 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? Sounds good to me. Regards, Tony > [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