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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FEBBC4332F for ; Thu, 14 Apr 2022 18:33:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344636AbiDNSgO (ORCPT ); Thu, 14 Apr 2022 14:36:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242401AbiDNSgL (ORCPT ); Thu, 14 Apr 2022 14:36:11 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5D4EEBB86; Thu, 14 Apr 2022 11:33:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649961226; x=1681497226; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=oRmVExYVaB1xDR78U0c+1m6aDPKj+y1FVLIHRd7bypw=; b=NsWrnO/Xax3gUkRFeDs/RxrYdu+pDeAuQEJCcif5O0yEX3YZezNqWm9s krF31/X+mOFPklyGJWRmDnd47Mpi6vmF3Dau4jEj7RqAJoqH5O6d0XSjW ta7y5j4pKHW2QXutqlQ7GGaq1FCbbNXTZgMLrMFVzEwWCsK4d13tiwDAu 5B1C1+ionPUFmtF5A/HSTC40+lV/y1cv51GT9vkc0U4BQbOlL5dm527te VPMC99BNEoqJpWi2+dAdEOY0WW6+FE+CMvEH4t9t7WuFWuUQWwydEvzRx sbrrT+FDF85wD9mj5JY9+VGsTpVnZD3b5Myngti4iQEpLARuDQLlOsRzT A==; X-IronPort-AV: E=McAfee;i="6400,9594,10317"; a="325909054" X-IronPort-AV: E=Sophos;i="5.90,260,1643702400"; d="scan'208";a="325909054" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2022 11:33:23 -0700 X-IronPort-AV: E=Sophos;i="5.90,260,1643702400"; d="scan'208";a="527503151" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2022 11:33:15 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1nf4HH-002Rzo-IM; Thu, 14 Apr 2022 21:33:11 +0300 Date: Thu, 14 Apr 2022 21:33:11 +0300 From: Andy Shevchenko To: Martin Blumenstingl Cc: Marek Szyprowski , Qianggui Song , Geert Uytterhoeven , Krzysztof Kozlowski , Marc Zyngier , Fabien Dessenne , Linus Walleij , "open list:GPIO SUBSYSTEM" , linux-arm Mailing List , linux-amlogic , Linux Kernel Mailing List , OpenBMC Maillist , Linux-Renesas , Linux Samsung SOC , linux-stm32@st-md-mailman.stormreply.com, Neil Armstrong , Kevin Hilman , Jerome Brunet , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Tomasz Figa , Sylwester Nawrocki , Alim Akhtar , Maxime Coquelin , Alexandre Torgue , Bartosz Golaszewski , Philipp Zabel Subject: Re: [PATCH v4 11/13] pinctrl: meson: Replace custom code by gpiochip_node_count() call Message-ID: References: <20220401103604.8705-1-andriy.shevchenko@linux.intel.com> <20220401103604.8705-12-andriy.shevchenko@linux.intel.com> <3a24ef01-3231-1bee-7429-dce5680c5682@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 14, 2022 at 09:28:30PM +0300, Andy Shevchenko wrote: > On Thu, Apr 14, 2022 at 07:06:21PM +0300, Andy Shevchenko wrote: > > On Thu, Apr 14, 2022 at 6:32 PM Martin Blumenstingl > > wrote: > > > On Thu, Apr 14, 2022 at 3:51 PM Andy Shevchenko > > > wrote: > > > [...] > > > > > This patch landed in linux next-20220413 as commit 88834c75cae5 > > > > > ("pinctrl: meson: Replace custom code by gpiochip_node_count() call"). > > > > > Unfortunately it breaks booting of all my Amlogic-based test boards > > > > > (Odroid C4, N2, Khadas VIM3, VIM3l). MMC driver is no longer probed and > > > > > boards are unable to mount rootfs. Reverting this patch on top of > > > > > linux-next fixes the issue. > > > > > > > > Thank you for letting me know, I'll withdraw it and investigate. > > > If needed I can investigate further later today/tomorrow. I think the > > > problem is that our node name doesn't follow the .dts recommendation. > > > > > > For GXL (arch/arm64/boot/dts/amlogic/meson-gxl.dtsi) the GPIO > > > controller nodes are for example: > > > gpio: bank@4b0 { > > > ... > > > } > > > and > > > gpio_ao: bank@14 { > > > ... > > > } > > > > > > See also: > > > $ git grep -C6 gpio-controller arch/arm64/boot/dts/amlogic/*.dtsi > > > > > > Marek did not state which error he's getting but I suspect it fails > > > with "no gpio node found". > > > > Would be interesting to know that, yeah. > > > > The subtle difference between the patched and unpatched version is > > that the former uses only available nodes, it means that node is not > > available by some reason and then the error would be the one you > > guessed. > > Looking into the difference between iterating via available nodes I have found > nothing suspicious. Your DTSes do not have status property, so it assumes the > node is available. > > I'm quite puzzled what's going on there. Because I can't see what the logical > difference the patch brought in. > > P.S. In any case it's withdrawn now and shouldn't appear in the next Linux > Next. But I would really appreciate more input on this. Okay, now I got it. The "name" of the node is not the same as containing the property with a given name. So, the faulting line of the code is this one: gpio_np = to_of_node(device_get_named_child_node(pc->dev, "gpio-controller")); -- With Best Regards, Andy Shevchenko