Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1081783rwb; Wed, 7 Dec 2022 08:24:22 -0800 (PST) X-Google-Smtp-Source: AA0mqf40ifuBul0ctpgg6ykhPsE2xysBFjOCY0XiVXCAr6Z4KpHQrrcnZeP1tTnNZb/X44U2Wla/ X-Received: by 2002:a17:90a:c207:b0:219:c705:57ea with SMTP id e7-20020a17090ac20700b00219c70557eamr17511626pjt.126.1670430262059; Wed, 07 Dec 2022 08:24:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670430262; cv=none; d=google.com; s=arc-20160816; b=QlSKmqEULG5/Am7CXjZUX9SPb0NtC7bf6f2QQelyvFxDHDYpk481m7kBccufm1LMnr KG8n6wVFp/ezlLfLKCdi7+v5a7d5Bo/hLuVpvkZLAb5VZ2gOAFq/kfEVMbL3koyiJLdv Xm7lhGX1n1GhXZr5SU3CqE0frCIlEgy1/5yrICUFejLDyy7JbxzfvL6K7y9GUlOzOZ5z 4qpHUuufxH9pABdSGwYRlHE5BHAZJ2Nj1am/Pe3FOC1T4AuYnF4Jas0/aUeZTZ7KaFdE y1XGdEeJqDvGjbVHa4vjZjHljXKxHipdzokKBqMWOy0UXYcqHCJntgrXQaqhFYULvXMY pC9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ai9AyaYCOP+1mwEvT2GphqrR/8UUpCv7twpnp2ghV2Y=; b=R10fkBZ8piaKzhq0cFHvXT3xrE5Umz5c+ombpa5ZmHV3jbjV/oFQzAPig71wBSanoX PoJ94vormUHxvCXBl/XhttMCPELwiX29FC6enVmg0RGtPUbT20yop9TdaDr4gJpbjX3s MgQsD/SdlUm9Sr2sMB87gXw/u/e8XtPahwBUdTJiB0xJGbVgf5u/AFyVfgE2MzyIAfzC OYoOtKB2f05rdf1UxHTn51U4oXNc3SIl709yVOmIgo8+gwH/wy/0PtyTOTcKb/DLKXyI d/UiOsevujqP8lTc3e/T3nk6IDnO6JeJNYNJXLIvsdE5BYK82CBvvjdKDC8mHuimD3zy wdaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=XFnLUGer; 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=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x10-20020a63f70a000000b004776766023csi20153200pgh.609.2022.12.07.08.24.12; Wed, 07 Dec 2022 08:24:22 -0800 (PST) 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=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=XFnLUGer; 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=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229571AbiLGPlV (ORCPT + 76 others); Wed, 7 Dec 2022 10:41:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbiLGPlU (ORCPT ); Wed, 7 Dec 2022 10:41:20 -0500 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C46721252 for ; Wed, 7 Dec 2022 07:41:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ai9AyaYCOP+1mwEvT2GphqrR/8UUpCv7twpnp2ghV2Y=; b=XFnLUGerdTFheh129qR9NxuuEE wE6qV8cHZ/Xe8fWU6RCnXrx2owtf4Pv3lQ3g3b6gwVp1mdGe0Vo2a4BwKigQg1O3Xy9rT4S8YxWhj TBwt2OJFMefQ5Y3q9dlJojxrbircOIWKn7yD897QcPH0k6PMbqb1rjmAXKttaQtJTUgs71jJ6yDG4 PyGxnWT0kOonCAzoFe5yX6gNnBFUMb+KXLz8T7oCcqPnTKAfwbGyRbm8402RZ9vE8P/09PvIFw7DN 79gB74o+AD0ZZIVOVwbLBGQ44x8hd9QblrDJBSoiLyMefOHiqf5kh7G4gN6t+qIhPd0xyPWiAmD/2 5X48Z14g==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:35618) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1p2wXp-0000m5-1X; Wed, 07 Dec 2022 15:41:13 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1p2wXn-0000qu-B2; Wed, 07 Dec 2022 15:41:11 +0000 Date: Wed, 7 Dec 2022 15:41:11 +0000 From: "Russell King (Oracle)" To: Andrew Lunn Cc: Jonathan =?iso-8859-1?Q?Neusch=E4fer?= , linux-arm-kernel@lists.infradead.org, Robert Jarzmik , Haojian Zhuang , Daniel Mack , linux-kernel@vger.kernel.org Subject: Re: PXA25x: GPIO driver fails probe due to resource conflict with pinctrl driver Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: Russell King (Oracle) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE 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 Wed, Dec 07, 2022 at 04:28:07PM +0100, Andrew Lunn wrote: > On Wed, Dec 07, 2022 at 12:25:53PM +0100, Jonathan Neusch?fer wrote: > > Hello, > > > > I am currently trying to bring up Linux 6.1-rcX on a PXA255 board, using a > > devicetree. One problem I encountered is that the PXA GPIO driver fails to > > probe because it uses the same MMIO register range as the pinctrl driver: > > > > [ 0.666169] pxa25x-pinctrl 40e00054.pinctrl: initialized pxa2xx pinctrl driver > > [ 0.694407] pxa-gpio 40e00000.gpio: can't request region for resource [mem 0x40e00000-0x40e0ffff] > > [ 0.695050] pxa-gpio: probe of 40e00000.gpio failed with error -16 > > > > Before I try to fix this myself: Is GPIO on PXA25x currently expected to > > work and when has it last been seen working? > > > > What would be a good way to fix this? > > How are the registers arranged? As documented in drivers/gpio/gpio-pxa.c - it'll be easier for you to look there rather than for me to explain it - but suffice it to say that the pinctrl registers are amongst the GPIO registers. > Is 0x40e00000-0x40e0ffff simply too > large, and making it smaller would fix the issue? Or are the registers > interleaved? They're interleaved. Looking at the .dtsi file for PXA25x, it seems that the pinctrl claims just the addresses that it needs, but the GPIO controller has no reg property in the .dtsi, so I'm not sure what fills that information in. DT could describe the region for PXA25x, which is just: 0x40e00000 - 0x40e00054 Later PXA have more banks, so would require additional resources to be listed. However, first, we need to know what provides the iomem resource for this: gpio: gpio@40e00000 { compatible = "intel,pxa25x-gpio"; gpio-ranges = <&pinctrl 0 0 84>; clocks = <&clks CLK_NONE>; }; -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!