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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A42E8CD4857 for ; Wed, 4 Sep 2024 17:10:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Iqt+zesRFHLpIS/hqFROtrd7FMYxHqBTvOuaNxUX9g0=; b=0fEzydLKvRuPA64BPHmeqxNYs2 8qQIgfAp/swwClt8cmJGenaXYhba+wEbJnaeGk5v9zhcHDQ2Dlthf/sEKDobli1vxgXX3uLXG9TfS ANevkGmwrvvrcwbJYS9HuOjrta8+zwWzu1Ga8QwM6vjCnKexXOpgXvYGZxF4DE98wDGZchyjvK9U1 78DBxIVL1WzNa8w0gc4QYlenmM8/hFMOqWPvfs4mw9K+D5lfGFnVQbMraGrLXxc70HxBqlJxQaatb Es2zyZxj/U0D0lPmurEX8agO4DmrgSl5GteTkLrezLVWyt6rSDFjy0SePJpekg3l0sN3e/y7zgDpG GN8iGwrw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sltWF-00000005Op4-2mo9; Wed, 04 Sep 2024 17:10:11 +0000 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sltV5-00000005Oea-44ap for linux-arm-kernel@lists.infradead.org; Wed, 04 Sep 2024 17:09:01 +0000 Received: by mail-pj1-x1044.google.com with SMTP id 98e67ed59e1d1-2d88edf1340so2998487a91.1 for ; Wed, 04 Sep 2024 10:08:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beagleboard-org.20230601.gappssmtp.com; s=20230601; t=1725469738; x=1726074538; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Iqt+zesRFHLpIS/hqFROtrd7FMYxHqBTvOuaNxUX9g0=; b=NzhxIYujOEBN2L6mcYmvPKmKZ/RZHNP1YnOJdyhOB8Hu5oEuRmPi4m4r382mthojhx 57keDrErWypDNBrcc+oavuPrwBcNOjtY5rWS4EPTAT5Xs++tEaDN4jJMAwUoAfKIJR+p jjjAAFUK2sn7Jc2hk3de2KjFJSnWwHqu/ITqtflXfq49HasEJBn193UIYtIvME3nbgct c12Rft4awoxlVAx2l8PlO85QicbgOs6jSNjH5bIZhDl4zKBHQ1GaLz8bIIt+HIKUci2e 13i4N2A/hrvYcAYu5zojfe5ZvfQaAngxmWk/b6OV1FBV++3pTPupgqzHz7Lekh3wjWrd zCXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725469738; x=1726074538; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Iqt+zesRFHLpIS/hqFROtrd7FMYxHqBTvOuaNxUX9g0=; b=NyuFVUzGmELt8leJsWiL38szPSbOaNX1wkq0vsjyzQEMrEKGzqBgzyoBFSIpofZhc8 2x2xsPceFdCtR4TKE6VffRaV9g278bSJ85hlfGlyc9KHMiBoC/mb2FJ/TnSYnj21lJrd Tg429jH6hkrCq0OmWKX1k17wR1oCwq42lnZ9p6VYCYGVlVL7ld+PqZXfLozybsKMXS0o moepTA8NgQK48mKEoG6oX7CdiuthLdgbAqMPhIryNQ5k059+4PrsVFhyRAicskyi6q63 cpqKq+a0cN3ApYYoR2HekAaN848BUBWcEDfhpvq6DnVYceP/W+UdRDzrqFTceIdxOPI5 kDZQ== X-Forwarded-Encrypted: i=1; AJvYcCXRmZofB3J5ByP03Q+U4P0+oGTwJdXCbseDYW/3vwZf2Z0+OJ7VVUh1oczYaff9k5ZYxP2PkyFfo4yi4ihLVqHc@lists.infradead.org X-Gm-Message-State: AOJu0YynTiELN0DiomGs5Ip6qDBv1VTxvMLc2fc7Ds86yR9eD0gCy9XD XQyNB3Auz6n83Yo/66MVbkyN1EgT9EkFuWlyng6KateY5KQEle6VDNnuklea6w== X-Google-Smtp-Source: AGHT+IF3Kb+pDTWTbCuoLq+gGygGJqsbJK48Dtfc4WBRAMElYtzZVRlYr9KBQ5TwDHvV7PFjVCf8Ww== X-Received: by 2002:a17:90a:4d85:b0:2d8:f7c6:e1dd with SMTP id 98e67ed59e1d1-2da55a78a6cmr7812790a91.37.1725469738084; Wed, 04 Sep 2024 10:08:58 -0700 (PDT) Received: from [172.16.118.100] ([103.15.228.94]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d84462afb6sm16246387a91.33.2024.09.04.10.08.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Sep 2024 10:08:57 -0700 (PDT) Message-ID: <2d3fd95f-6f4d-49d9-a473-b4c5631a4fee@beagleboard.org> Date: Wed, 4 Sep 2024 22:38:48 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 1/7] dt-bindings: connector: Add mikrobus-connector Content-Language: en-US To: Rob Herring Cc: Michael Walle , Mark Brown , Vaishnav M A , Krzysztof Kozlowski , Conor Dooley , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Greg Kroah-Hartman , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Andrew Lunn , jkridner@beagleboard.org, robertcnelson@beagleboard.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20240627-mikrobus-scratch-spi-v5-0-9e6c148bf5f0@beagleboard.org> <20240627-mikrobus-scratch-spi-v5-1-9e6c148bf5f0@beagleboard.org> From: Ayush Singh In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240904_100900_148328_D5D36A8F X-CRM114-Status: GOOD ( 15.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org >> gpio-map is what you are looking for. It's documented in the DT spec. >> It was created exactly for this purpose of remapping GPIO lines on a >> connector. >> >> Rob Hi. I found docs on nexus nodes [1] and tried using it for mikroBUS, but it does not seem to be working. Here is my connector: ```     mikrobus_gpio0: mikrobus-gpio0 {         #gpio-cells = <2>;         gpio-map =         <0 0 &main_gpio1 11 0>, <1 0 &main_gpio1 9 0>,         <2 0 &main_gpio1 24 0>, <3 0 &main_gpio1 25 0>,         <4 0 &main_gpio1 22 0>, <5 0 &main_gpio1 23 0>,         <6 0 &main_gpio1 7 0>, <7 0 &main_gpio1 8 0>,         <8 0 &main_gpio1 14 0>, <9 0 &main_gpio1 13 0>,         <10 0 &main_gpio1 12 0>, <11 0 &main_gpio1 10 0>;         gpio-map-mask = <0xf 0x0>;         gpio-map-pass-thru = <0x0 0x1>;     }; ... &main_uart5 {     status = "okay";     pinctrl-names = "default";     pinctrl-0 = <&mikrobus_uart_pins_default>;     gnss {         compatible = "u-blox,neo-8";         reset-gpios = <&mikrobus_gpio0 10 GPIO_ACTIVE_LOW>;     }; }; ``` After some fdtdump, I can see that at least the dtc compiler does not seem to do the forwarding at dt compile time. Here is the dump: ``` mikrobus-gpio0 {         #gpio-cells = <0x00000002>;         gpio-map = <0x00000000 0x00000000 0x00000025 0x0000000b 0x00000000 0x00000001 0x00000000 0x00000025 0x00000009 0x00000000 0x00000002 0x00000000 0x00000025 0x00000018 0x00000000 0x00000003 0x00000000 0x00000025 0x00000019 0x00000000 0x00000004 0x00000000 0x00000025 0x00000016 0x00000000 0x00000005 0x00000000 0x00000025 0x00000017 0x00000000 0x00000006 0x00000000 0x00000025 0x00000007 0x00000000 0x00000007 0x00000000 0x00000025 0x00000008 0x00000000 0x00000008 0x00000000 0x00000025 0x0000000e 0x00000000 0x00000009 0x00000000 0x00000025 0x0000000d 0x00000000 0x0000000a 0x00000000 0x00000025 0x0000000c 0x00000000 0x0000000b 0x00000000 0x00000025 0x0000000a 0x00000000>;         gpio-map-mask = <0x0000000f 0x00000000>;         gpio-map-pass-thru = <0x00000000 0x00000001>;         phandle = <0x0000000e>;     }; ... serial@2850000 {             compatible = "ti,am64-uart", "ti,am654-uart";             reg = <0x00000000 0x02850000 0x00000000 0x00000100>;             interrupts = <0x00000000 0x000000b7 0x00000004>;             power-domains = <0x00000003 0x0000009c 0x00000001>;             clocks = <0x00000002 0x0000009c 0x00000000>;             clock-names = "fclk";             status = "okay";             pinctrl-names = "default";             pinctrl-0 = <0x0000000d>;             phandle = <0x00000081>;             gnss {                 compatible = "u-blox,neo-8";                 reset-gpios = <0x0000000e 0x0000000a 0x00000001>;             };  }; ``` So I am a bit unsure. Is the dtc parser in the kernel supposed to do the mapping, or is it supposed to be done by `dtc` at compile time? Maybe we do not have support for it in upstream kernel yet? Or maybe I am missing something? [1]: https://devicetree-specification.readthedocs.io/en/v0.3/devicetree-basics.html#nexus-nodes-and-specifier-mapping Ayush Singh