From: Rob Herring <robh@kernel.org>
To: Ayush Singh <ayush@beagleboard.org>
Cc: Michael Walle <mwalle@kernel.org>,
Mark Brown <broonie@kernel.org>,
Vaishnav M A <vaishnav@beagleboard.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Derek Kiernan <derek.kiernan@amd.com>,
Dragan Cvetic <dragan.cvetic@amd.com>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Nishanth Menon <nm@ti.com>,
Vignesh Raghavendra <vigneshr@ti.com>,
Tero Kristo <kristo@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
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
Subject: Re: [PATCH v5 1/7] dt-bindings: connector: Add mikrobus-connector
Date: Wed, 4 Sep 2024 12:49:49 -0500 [thread overview]
Message-ID: <CAL_JsqLEfBGQsJw6Vn2FnCrMOEmwhTq9ro2Qca7bBAM_UKZ6-g@mail.gmail.com> (raw)
In-Reply-To: <2d3fd95f-6f4d-49d9-a473-b4c5631a4fee@beagleboard.org>
On Wed, Sep 4, 2024 at 12:09 PM Ayush Singh <ayush@beagleboard.org> wrote:
>
> >> 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:
dtc knows nothing about it.
> ```
>
> 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>;
> };
You might need "gpio-controller" here. Though if you do, I think
that's a mistake in the kernel. It should work like interrupt-map and
generally you have either interrupt-controller or interrupt-map, but
not both (though that is allowed now too).
> ...
>
> 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
No such thing as "dtc parser in the kernel".
> mapping, or is it supposed to be done by `dtc` at compile time?
No.
> Maybe we
> do not have support for it in upstream kernel yet?
Yes, there is upstream support. Grep for of_parse_phandle_with_args_map.
Rob
next prev parent reply other threads:[~2024-09-04 17:50 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-27 16:26 [PATCH v5 0/7] misc: Add mikroBUS driver Ayush Singh
2024-06-27 16:26 ` [PATCH v5 1/7] dt-bindings: connector: Add mikrobus-connector Ayush Singh
2024-06-27 17:12 ` Michael Walle
2024-06-27 17:29 ` Ayush Singh
2024-06-27 17:49 ` Michael Walle
2024-06-27 18:44 ` Andrew Lunn
2024-08-31 18:11 ` Ayush Singh
2024-09-04 14:46 ` Rob Herring
2024-09-04 17:08 ` Ayush Singh
2024-09-04 17:49 ` Rob Herring [this message]
2024-09-05 20:24 ` Ayush Singh
2024-06-28 17:00 ` Rob Herring
2024-06-28 16:28 ` Rob Herring
2024-07-02 15:14 ` Ayush Singh
2024-07-02 15:17 ` Rob Herring
2024-06-27 16:26 ` [PATCH v5 2/7] dt-bindings: mikrobus: Add mikrobus board base Ayush Singh
2024-06-28 16:04 ` Rob Herring
2024-06-27 16:26 ` [PATCH v5 3/7] dt-bindings: mikrobus: Add mikrobus-spi binding Ayush Singh
2024-06-27 19:21 ` Rob Herring (Arm)
2024-06-28 16:48 ` Conor Dooley
2024-07-05 7:44 ` Geert Uytterhoeven
2024-06-27 16:26 ` [PATCH v5 4/7] spi: Make of_find_spi_controller_by_node() available Ayush Singh
2024-06-27 16:26 ` [PATCH v5 5/7] spi: Make of_register_spi_device() available Ayush Singh
2024-06-27 16:26 ` [PATCH v5 6/7] mikrobus: Add mikroBUS driver Ayush Singh
2024-07-04 13:06 ` Greg Kroah-Hartman
2024-07-04 13:11 ` Mark Brown
2024-07-04 13:29 ` Ayush Singh
2024-06-27 16:26 ` [PATCH v5 7/7] dts: ti: k3-am625-beagleplay: Add mikroBUS Ayush Singh
2024-06-27 16:42 ` Nishanth Menon
2024-06-27 17:07 ` Ayush Singh
2024-06-27 17:07 ` Andrew Davis
2024-06-27 17:16 ` Ayush Singh
2024-06-27 17:50 ` Andrew Davis
2024-06-27 18:16 ` Ayush Singh
2024-06-27 18:53 ` Andrew Lunn
2024-06-28 17:27 ` Rob Herring
2024-06-27 17:21 ` Michael Walle
2024-06-27 17:43 ` Ayush Singh
2024-07-05 8:01 ` Geert Uytterhoeven
2024-07-05 8:19 ` Geert Uytterhoeven
2024-07-05 16:34 ` Andrew Davis
2024-07-05 17:36 ` Geert Uytterhoeven
2024-06-28 15:14 ` Conor Dooley
2024-06-28 6:31 ` [PATCH v5 0/7] misc: Add mikroBUS driver Ayush Singh
2024-06-28 13:52 ` Andrew Lunn
2024-06-28 18:05 ` Ayush Singh
2024-06-28 15:41 ` Rob Herring (Arm)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAL_JsqLEfBGQsJw6Vn2FnCrMOEmwhTq9ro2Qca7bBAM_UKZ6-g@mail.gmail.com \
--to=robh@kernel.org \
--cc=andrew@lunn.ch \
--cc=arnd@arndb.de \
--cc=ayush@beagleboard.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=derek.kiernan@amd.com \
--cc=devicetree@vger.kernel.org \
--cc=dragan.cvetic@amd.com \
--cc=gregkh@linuxfoundation.org \
--cc=jkridner@beagleboard.org \
--cc=kristo@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=mwalle@kernel.org \
--cc=nm@ti.com \
--cc=robertcnelson@beagleboard.org \
--cc=vaishnav@beagleboard.org \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).