Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp3168995rwb; Mon, 7 Aug 2023 09:11:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHBLlsfC1JSI4rmeXaG4u2hdSod65mUiO1qvuVjUUTt9cKTaiLzRUClsBemPK6EvI/SXcZ2 X-Received: by 2002:a17:902:c952:b0:1b8:c1f:fcfc with SMTP id i18-20020a170902c95200b001b80c1ffcfcmr9739148pla.11.1691424672915; Mon, 07 Aug 2023 09:11:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691424672; cv=none; d=google.com; s=arc-20160816; b=NAtW146YXwOF5Rj4MUb0tqAAusNW2LZT8V5nwrPu8Wv3RQXO1HHlLNDsbWsOZvIAOM g15Y0fNiS7iMQNExvIcSp3G43i0C+uq3E4StMc18gIrUlrZIv7DQWrzqUFuKrLIa3fUi gIN7TUAoPPt4t11d5pRO9O2Y+VFLIiPFxkORqg0lGcK67Y1WJ6xtgmKUevB4VOicNSFY VwPe3ucI9zeI9mgutLKwA/i3Qmh/qpV9+B2sOGFEnuJW9fWWlyefGbpw2jSnGIUKFoCp /dl2m9TPdcOCOYVwF3Wy6k3qUHWg3zqJNcT+gB8p7kr+WyFmILCPRE3vIZ63ODrJLoNw v7sg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=LxIuDrnugWUWf6Gc14SpD7v+KN8Q+LO0U/QjZXJYEtQ=; fh=QJHRBizSm5mjBK0oivtA3AlGhsFqtf9Yoanrlw3BTto=; b=AAqBaDpJXFNsNpTvfeUKbvnG/16jHfMysdJpg21m6aa+qPhWTtu0tlY1DcBWfPnbgC J5LlcSQ6atAr4CaEDC0ZNi2minAO8nJ3QM7lBpIQE/+3P3jr9eUpdh9s0yl9iK9E6Qkq NvXEj6XjD8U7nfGJQUDuAIkmX3EoP+NU0c+viP2kLtQfeSqA/kNcEFIb8zeinbVMkwKN 3kd5czsCu+m3X4sLr6RZ/rsm+I4+0EVbhaGkd4yzfSd0TsTtvgpFEtsGaINCsUS+LY3h 2dhifMk3iel0LyCFU9NTa0qjI4qKWxENOmuje4znulSUrqcfH7Y9sDm1JDbBfRDl3i0x t3vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=AYF7o6EY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u16-20020a170902e81000b001bbc7b6492fsi5981069plg.8.2023.08.07.09.10.56; Mon, 07 Aug 2023 09:11:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=AYF7o6EY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230507AbjHGPmU (ORCPT + 99 others); Mon, 7 Aug 2023 11:42:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229732AbjHGPmT (ORCPT ); Mon, 7 Aug 2023 11:42:19 -0400 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 254D4E3; Mon, 7 Aug 2023 08:42:18 -0700 (PDT) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 377Fg8OG118273; Mon, 7 Aug 2023 10:42:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1691422928; bh=LxIuDrnugWUWf6Gc14SpD7v+KN8Q+LO0U/QjZXJYEtQ=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=AYF7o6EYGwL6rEbUd/K1yFM4uXfBhyml+pqatjAX4oUQOvwNtCQSdjAkBtLYpFnmo Sj2quF7tEg9QiSUPj4/foVrsyRYqWrS17vvjLSbSKo7ha0WSSrnAir0n267JLclxgr 1Emv/gqAN85bAnmuDQ314n1b02NIw4uYjMublQLk= Received: from DLEE110.ent.ti.com (dlee110.ent.ti.com [157.170.170.21]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 377Fg8hc124586 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 7 Aug 2023 10:42:08 -0500 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 7 Aug 2023 10:42:07 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Mon, 7 Aug 2023 10:42:07 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 377Fg73T091750; Mon, 7 Aug 2023 10:42:07 -0500 Date: Mon, 7 Aug 2023 10:42:07 -0500 From: Nishanth Menon To: Andrew Davis CC: Dhruva Gole , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley , , , Subject: Re: [PATCH 10/13] arm64: dts: ti: k3-j7200: Enable GPIO nodes at the board level Message-ID: <20230807154207.7eho6er55revipjo@shuffling> References: <20230802205309.257392-1-afd@ti.com> <20230802205309.257392-11-afd@ti.com> <1b3366b0-e3a4-3609-9e25-7b880d2fe656@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1b3366b0-e3a4-3609-9e25-7b880d2fe656@ti.com> X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10:28-20230807, Andrew Davis wrote: > On 8/7/23 12:38 AM, Dhruva Gole wrote: > > Andrew, > > > > On 03/08/23 02:23, Andrew Davis wrote: > > > GPIO nodes defined in the top-level J7200 SoC dtsi files are incomplete > > > and may not be functional unless they are extended with pinmux and > > > device information. > > > > > > Disable the GPIO nodes in the dtsi files and only enable the ones that > > > are actually pinned out on a given board. > > > > > > Signed-off-by: Andrew Davis > > > --- > > > ? .../boot/dts/ti/k3-j7200-common-proc-board.dts | 18 ++++-------------- > > > ? arch/arm64/boot/dts/ti/k3-j7200-main.dtsi????? |? 4 ++++ > > > ? .../arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi |? 2 ++ > > > ? 3 files changed, 10 insertions(+), 14 deletions(-) > > > > > > diff --git a/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts b/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts > > > index dee9056f56051..4a5c4f36baeec 100644 > > > --- a/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts > > > +++ b/arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts > > > @@ -240,27 +240,17 @@ &main_uart3 { > > > ????? pinctrl-0 = <&main_uart3_pins_default>; > > > ? }; > > > -&main_gpio2 { > > > -??? status = "disabled"; > > > -}; > > > - > > > -&main_gpio4 { > > > -??? status = "disabled"; > > > -}; > > > - > > > -&main_gpio6 { > > > -??? status = "disabled"; > > > +&main_gpio0 { > > > +??? status = "okay"; > > > +??? /* default pins */ > > > > Small question, where is the pmx for main_gpio0? What does "default pins" > > refer to here? Where are they pinmuxed? > > > > Good question, where is the pmx for main_gpio0? I don't know, it was > never defined before either, we only are noticing this now as we are > disabling by default instead of leaving an unfinished node enabled > by default. (another benefit of this disabled by default scheme). > > What is really happening is GPIO nodes we tend to pinmux differently > than normal device nodes. Their pinmux selections tends to be spread > out in all the nodes that make use of these GPIO pins, not all together > here in this node. > > For instance in this device we use one of the main_gpio0 pins as a > GPIO toggled regulator, and we define the pinmux for it in that node > (see vdd-sd-dv-default-pins). > > We can either define the rest of the pins not used elsewhere > here, or we can consider GPIO an exception to the rule, I'd say > the latter is fine for now. GPIO pinmux are typically defined where they need - the only place where they are explicitly called out in gpio is when they are meant to be used by libgpio - typically in the case of dev boards. Just drop the comments of /* default pins */ - that is just mis-leading. -- Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D