From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 006DCC433DB for ; Fri, 15 Jan 2021 21:41:54 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AA46D239ED for ; Fri, 15 Jan 2021 21:41:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA46D239ED Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=beagleboard.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6fezReDjNvztUnKmAbD+DGIM14IhFyZ41rRngEXr4Lo=; b=kzqYoflNkpR+4USoEgeLlQv+Y yo+tyGXazTSSa1x76DAtx//pcv4i+yuf+kYdenrC2bYO1Mg+fh2hyvHSZEFXggt7YiWrouMnn+Ytp YSyRC2qh/odBZrG+QjwKWGjl3Qy7ldK4dUzYoKX9aSXn41IHysUoHtrrUTi3bcOR6fPoxtmMuO5z9 xVcJ7XLiE89aWbnYRMKPPGjfaY31rnA6rCsgv/GuEQyLzTZ+KIjiL0IeowDbClSKO9RZk1S0FkUPr GfAfMqeDKMqO38OlQheOgK92SoT+Ftq7sw13WK+UZE+BtKcEqJYe+N0Ap+uGxsuPGROk4ph7Qf1qN 3qtYaEfVQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l0WpZ-0005Zl-KU; Fri, 15 Jan 2021 21:40:29 +0000 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l0WpW-0005ZA-HR for linux-arm-kernel@lists.infradead.org; Fri, 15 Jan 2021 21:40:27 +0000 Received: by mail-pj1-x1036.google.com with SMTP id u4so5968832pjn.4 for ; Fri, 15 Jan 2021 13:40:24 -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=EPtLb7wv37OHRh//I5vBhTy33TXYiqEW4Rm3xqSK9siBMam1aHODKb9+yDQKDbMzgJ G8LnyW9AzOOoF3yaJqHCUYwLPVBQq087sdiFbYwMCiLR1ovOaCzPFcv0VPr0ZCMoyqD6 KkV3oEX0mkG2svbbnJqvqtGSFRC5UvcVSuRG9BEdijO6HvStrIBzPRnlEehUiQmy6O6G lNYZuFOT21bwYVOH6EqQkGNeQfSB25APhxIVzNGrDBB5C3TA+fqmsFEVM/SnzrPvBFnF UWKrNkxXs7uevfru36iFApEkvP6PqCvt5/qpdolJObx/rSz2BV5/25S8NzV+Ttp4e1Rt NH9Q== X-Gm-Message-State: AOAM531j5pZAQKGQSlx8dwTty5tIs8Uv+Xi0t+FeJwIOQ1EMFLinlh8W x42dWDc86+6ik0TI386diI63SA== X-Google-Smtp-Source: ABdhPJyON92K2TmcPW2QR85yuolP22tM0R4t7l3u4HZpjfPFf8vlelLyS2GSnGt/ynZIDrLg6P8b7Q== 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 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-Disposition: inline In-Reply-To: <20210115190201.9273b637a7f967e7e55bc740@bidouilliste.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210115_164026_694226_CA706102 X-CRM114-Status: GOOD ( 25.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Jason Kridner , Tony Lindgren , Linus Walleij , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Rob Herring , Haojian Zhuang , bcousson@baylibre.com, linux-omap@vger.kernel.org, Robert Nelson , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel