Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp210837pxk; Wed, 23 Sep 2020 00:39:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwo9RkTMxUPUUjshfJWyrC2sytDez8LCdEFT/fN/3P2BWrOU889O3LHutk1igohUxs0x2+5 X-Received: by 2002:a17:906:6a54:: with SMTP id n20mr9198375ejs.401.1600846745791; Wed, 23 Sep 2020 00:39:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600846745; cv=none; d=google.com; s=arc-20160816; b=GXsHUMQk1vIX9D+PtIoZFqq88t4mWjTxUB5FNcA6gYIj6ml4PtOVsGhrywvIg5UiKR njXUiOf6QBjBWAUq5z6DVrFcukyv/eRZwUbMQ6lLurGJP/lnHkwz9jcERKzHKesfSu5n Ly/fQfx6zU151OL7VBwkpKdBPLSNKRrvK0bBwEq0ykTsVPUAvz15yO0kumYGeI5608iV U7UYsctirYj9fBM0fzeXn7COLr/7HXI1nIm3ZJaUVFWWtDqwhN2OxRCNOthuLOwbM7Wt i37TwyUyxDQxLJ5spvyDlr3HreoyScI1e2107OhDcb58lTsh316TDApfTIfmg67UNj/3 0DlQ== 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=daoTzWtB+PFd6ZGdNYHCQGZ/RwG6gMSmBvrqSrSEjf0=; b=Veniw4mcXrm7bLB91buDzTr2fypItX45Xkx4BwATSs0CDt0n6LMkiaPYJQzEgjFFgb wlYzkIlZhYQdWv7WMTRL64GEXHmg8HFQzywZUpK3+975LRx2ATtG7+LOv/oJklIXB6TM 4IK9O79MFQ7CCEVWEQ+SJ+cJEMX831KmsDkPr5qzQKv/Dy6VR5o5+aHztd8ASxAJ1+GG PoSZVA1gRugoWB/1YCiIcYFn+cYvAmbnRgcigUj4aFquWd2lghufAKMAdrJFFNhNSvuw Ia7UQkL61g7awchkTUZpppBioltSeEiNWLkhj0qqSEkZAdOiNw2IAKRnlqN8PsV9FX2T bZ+A== 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 t8si11730331edw.331.2020.09.23.00.38.41; Wed, 23 Sep 2020 00:39:05 -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 S1726672AbgIWHhU (ORCPT + 99 others); Wed, 23 Sep 2020 03:37:20 -0400 Received: from muru.com ([72.249.23.125]:45204 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726550AbgIWHhT (ORCPT ); Wed, 23 Sep 2020 03:37:19 -0400 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id E7B0B80A0; Wed, 23 Sep 2020 07:37:19 +0000 (UTC) Date: Wed, 23 Sep 2020 10:38:13 +0300 From: Tony Lindgren To: Drew Fustini Cc: Rob Herring , Linus Walleij , Jason Kridner , Robert Nelson , Trent Piepho , Christina Quast , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-gpio@vger.kernel.org Subject: Re: [PATCH v2] ARM: dts: document pinctrl-single,pins when #pinctrl-cells = 2 Message-ID: <20200923073813.GV7101@atomide.com> References: <20200919200836.3218536-1-drew@beagleboard.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200919200836.3218536-1-drew@beagleboard.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Drew Fustini [200919 23:10]: > Document the values in pinctrl-single,pins when #pinctrl-cells = <2> > > Fixes: 27c90e5e48d0 ("ARM: dts: am33xx-l4: change #pinctrl-cells from 1 to 2") > Reported-by: Trent Piepho > Link: https://lore.kernel.org/linux-omap/3139716.CMS8C0sQ7x@zen.local/ > Signed-off-by: Drew Fustini > --- > v2 change: > - rephrase to make it clear that the pin conf value and pin mux value > are OR'd together with #pinctrl-cells = <2> Acked-by: Tony Lindgren > .../bindings/pinctrl/pinctrl-single.txt | 21 ++++++++++++------- > 1 file changed, 14 insertions(+), 7 deletions(-) > > diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt > index e705acd3612c..f903eb4471f8 100644 > --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt > +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt > @@ -94,16 +94,23 @@ pinctrl-single,bit-per-mux is set), and uses the common pinctrl bindings as > specified in the pinctrl-bindings.txt document in this directory. > > The pin configuration nodes for pinctrl-single are specified as pinctrl > -register offset and value pairs using pinctrl-single,pins. Only the bits > -specified in pinctrl-single,function-mask are updated. For example, setting > -a pin for a device could be done with: > +register offset and values using pinctrl-single,pins. Only the bits specified > +in pinctrl-single,function-mask are updated. > + > +When #pinctrl-cells = 1, then setting a pin for a device could be done with: > > pinctrl-single,pins = <0xdc 0x118>; > > -Where 0xdc is the offset from the pinctrl register base address for the > -device pinctrl register, and 0x118 contains the desired value of the > -pinctrl register. See the device example and static board pins example > -below for more information. > +Where 0xdc is the offset from the pinctrl register base address for the device > +pinctrl register, and 0x118 contains the desired value of the pinctrl register. > + > +When #pinctrl-cells = 2, then setting a pin for a device could be done with: > + > + pinctrl-single,pins = <0xdc 0x30 0x07>; > + > +Where 0x30 is the pin configuration value and 0x07 is the pin mux mode value. > +These two values are OR'd together to produce the value stored at offset 0xdc. > +See the device example and static board pins example below for more information. > > In case when one register changes more than one pin's mux the > pinctrl-single,bits need to be used which takes three parameters: > -- > 2.25.1 >