Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4327444pxk; Tue, 8 Sep 2020 17:35:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxg3YJDsS8f2pIblrjGgeYUHufeT4y/80rf7ohQlkwlYFEkpGlJUeb8ql3vJILU+syD3Lfe X-Received: by 2002:aa7:de03:: with SMTP id h3mr1666463edv.232.1599611753210; Tue, 08 Sep 2020 17:35:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599611753; cv=none; d=google.com; s=arc-20160816; b=yh6QvUh5K4xQcyl3+Yg4RrMhBahpGqMST6u/IgMmOx6AM1ASHY8I4cX2Fv0CzjHCGF JG6wfgpmVE5M2EqfZrveIPqMX4ur2AtXphC8C4pmNtkzwG7+s/zYtXSF8sD44mTiuJ5z 2PsA7eNsPdxT4u4dqcHbom75nQfF0rAbR9/uIZKb0nyUINAMkjuRdmDiTv47F/YSn2Wt dy0UEEuwrLmdbwjKEn0fyfH2teTR4k/dPQm6TMUChJ9M8wOCH5+UQ1qQjJg1/TZESebh sEGrKJzUSxJg2IiHoBGFBf+Hfs80tjSVa1fpgQtNNs4Cn7SxPR6Z8INM8SiG1S16D0XB NzeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5uNeaE2Rby/fnh3O4xhlUXs/uwBS9UavtgyEhlwwdSg=; b=hXFQYCUZhoMWV8gREtqr4fWewv+thiH8uBzGZ0q+pwgZz0XiJItUoqW543ZvdZwx9v kmAMJYxYro2I5XTPKOzCdu6Al3QC1PO+cuzzuMbpuIloOvQIr+Hl0RngTcHZbIMCdqT4 T4FnRBQRXuvDxr14zArjjhsvIn32VIXo0ex+mOY8YeXbXHQhLJ891YszF5qcljIEOHzw lGWIHEuKAdeEDK0D5RuBKgZs+lI6tIoDT4L43nK8n0vNrrAAy2cLMKQcBSyaQupeKyYB 9wnIITny+3fwIqaByXlhfhu+iX08pDP6sYFMHp1mjpjrLNG/kOm2/Rfapqzreb1ORceB KSfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sPXC7IsL; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q6si377590ejx.221.2020.09.08.17.35.28; Tue, 08 Sep 2020 17:35:53 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sPXC7IsL; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728363AbgIIAe6 (ORCPT + 99 others); Tue, 8 Sep 2020 20:34:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726642AbgIIAe4 (ORCPT ); Tue, 8 Sep 2020 20:34:56 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2711EC061573; Tue, 8 Sep 2020 17:34:55 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id u13so776864pgh.1; Tue, 08 Sep 2020 17:34:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5uNeaE2Rby/fnh3O4xhlUXs/uwBS9UavtgyEhlwwdSg=; b=sPXC7IsLPz2deia5p0HcEvsDKR9Kr9crl7xYr/9eu5D8tyxWOUHPSEF22CnqKWsN9s y/fwUO6jW6b7YrclRXF1jvV8UKzwH0L30fJByTWmghdYjXTcc/ukXgxMDZo9rokArl4H L+0+iX7RI9bUg3cEDditunnR0787Sz0mQg3bHOJ8m1oUHKFnSsEx/9wvhDpCNNYy5Fu5 RDoBSoaYhWipgzCQ7A4L9e3hagfbmofsl1Tc2qJVQ5UIYewGO5XPEcQKiKID6HRUvRMY lTvounISuepcxoZqvoNsm/d7RQba7VJs3BiRoCC+8r0KbId1J1cU44g/uhv6T/7XNO10 NEUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5uNeaE2Rby/fnh3O4xhlUXs/uwBS9UavtgyEhlwwdSg=; b=U5HhPmDE1e7vOAIJ20SIS0GJ4WjzR+VuhvPvTWkxTcZdTYbtjzoQbwvoQiRnw8pr6h ggKWG2iZfxIzlLWwSaM7WTwbnWHxRk/QEt/9A6e5nhL6xVkZAAf8OBafpE6ixnfBVk6W bgm4LWUucYG7gmGayHhGyI9QgC/fgUdad3wKrKoDXRZVusu1MJW7qNjuGrfA09NmaIGI EZ3gkrEVpR8NEmv+3ThEnUwH2n8erm6avV+dsu1AMG4+J/AdKeV0WWO7m35JXm+G8QEG SHnMT0/WC2HS9ah5C+hvdSNk3zMVSywRzWs0aZa9rScy6Ncd0XJY/MQk/hZ0iXe0oMtP CqRQ== X-Gm-Message-State: AOAM533UScRs2thNj3haCNBGelpIOKvOXP8YZpGEtwII78ztYjeSvR5l mzeyyT7GoS/A6nNowkxrQ7w= X-Received: by 2002:a17:902:8a93:: with SMTP id p19mr1175793plo.101.1599611694678; Tue, 08 Sep 2020 17:34:54 -0700 (PDT) Received: from zen.local (174-21-64-208.tukw.qwest.net. [174.21.64.208]) by smtp.gmail.com with ESMTPSA id l12sm315018pjq.31.2020.09.08.17.34.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 17:34:54 -0700 (PDT) From: Trent Piepho To: linux-arm-kernel@lists.infradead.org Cc: Drew Fustini , Tony Lindgren , Rob Herring , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Linus Walleij , Haojian Zhuang , devicetree@vger.kernel.org, "bcousson@baylibre.comLinus Walleij" , Jason Kridner , Robert Nelson , Linus Walleij Subject: Re: [PATCH v4 2/2] ARM: dts: am33xx-l4: change #pinctrl-cells from 1 to 2 Date: Tue, 08 Sep 2020 17:34:53 -0700 Message-ID: <3192458.miyTKKkx7g@zen.local> In-Reply-To: <20200701013320.130441-3-drew@beagleboard.org> References: <20200701013320.130441-1-drew@beagleboard.org> <20200701013320.130441-3-drew@beagleboard.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday, June 30, 2020 6:33:20 PM PDT 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. > --- 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>; > #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) If a dts file uses am33xx_pinmux from am33xx-l4.dtsi, but does not use the AM33XX_PADCONF() macro for all pin settings, like say it uses AM33XX_IOPAD(), then the dtb will be totally broken as pin addresses and values will all be off. Similarly, using AM33XX_PADCONF() with a different pinctrl defined elsewhere would also break. In the latest linux-next kernel, I found one case of the former problem, in am335x-guardian.dts. The barebox bootloader had all the am33xx boards broken when the dts change was imported without adding the OR-two-values special case to the pinctrl driver. Which I then tracked to here.