Re: mt7621 GPIO mapping mystery

2023-01-23 Thread Peter Naulls
On 1/22/23 13:58, Daniel Santos wrote: [snip] Thanks Daniel and all the others (to many to mention). Yes, I should have read the datasheet much earlier, so in the end I really have only myself to blame. The fix was simply to add back in the "rgmii2" group back into the gpio group. I

Re: mt7621 GPIO mapping mystery

2023-01-22 Thread Daniel Santos
On 1/22/23 12:24, Arınç ÜNAL wrote: On 22.01.2023 20:44, Daniel Santos wrote: On 1/22/23 00:23, Arınç ÜNAL wrote: On 22 January 2023 02:02:04 GMT+03:00, Daniel Santos wrote: On 1/21/23 15:19, Arınç ÜNAL wrote: On 21.01.2023 21:32, Daniel Santos wrote: ... You can use this to see what the

Re: mt7621 GPIO mapping mystery

2023-01-22 Thread Arınç ÜNAL
On 22.01.2023 20:44, Daniel Santos wrote: On 1/22/23 00:23, Arınç ÜNAL wrote: On 22 January 2023 02:02:04 GMT+03:00, Daniel Santos wrote: On 1/21/23 15:19, Arınç ÜNAL wrote: On 21.01.2023 21:32, Daniel Santos wrote: ... You can use this to see what the valid values are for each group,

Re: mt7621 GPIO mapping mystery

2023-01-22 Thread Lukas Zeller
Hi Bas, > On 21 Jan 2023, at 22:53, Bas Mevissen wrote: > >> On 2023-01-21 22:42, Lukas Zeller wrote: >> That really looks like a great solution with all advantages combined! >> I agree this is better than patching, I just did not realize it was >> possible at all to modularize dt overlay

Re: mt7621 GPIO mapping mystery

2023-01-21 Thread John Crispin
On 21.01.23 15:51, Sergio Paracuellos wrote: AFAICS, the Ralink driver sets gpio mode for a group of pins using set_mux operation [1] so when the gpio_request_enable() operation is called a check for that pin is set as gpio is performed. Nothing else. Maybe John Crispin who is the writer of

Re: mt7621 GPIO mapping mystery

2023-01-21 Thread Arınç ÜNAL
On 22 January 2023 02:02:04 GMT+03:00, Daniel Santos wrote: >On 1/21/23 15:19, Arınç ÜNAL wrote: >> On 21.01.2023 21:32, Daniel Santos wrote: >>> ... You can use this to see what the valid values are for each group, >>> because until this all goes yaml, there's nothing to tell you if you've

Re: mt7621 GPIO mapping mystery

2023-01-21 Thread Daniel Santos
On 1/21/23 15:19, Arınç ÜNAL wrote: On 21.01.2023 21:32, Daniel Santos wrote: ... You can use this to see what the valid values are for each group, because until this all goes yaml, there's nothing to tell you if you've used an invalid value. Speaking of which:

Re: mt7621 GPIO mapping mystery

2023-01-21 Thread Bas Mevissen via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software.--- Begin Message --- On 2023-01-21 22:42, Lukas

Re: mt7621 GPIO mapping mystery

2023-01-21 Thread Lukas Zeller
Hi Tomasz, thanks a lot for that hint to dtbocfg and the makefile! > On 21 Jan 2023, at 17:27, Tomasz Maciej Nowak wrote: > > [...] > > W dniu 21.01.2023 o 16:33, Lukas Zeller pisze: >> >> So basically, I'm suggesting to revisit the decision to reject the patch >> from Daniel Golle [1]. >

Re: mt7621 GPIO mapping mystery

2023-01-21 Thread Arınç ÜNAL
By the way, I just got an "undelivered mail returned to sender" for John's mail address. I don't think they'll be replying here any time soon. ;) Arınç ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org

Re: mt7621 GPIO mapping mystery

2023-01-21 Thread Arınç ÜNAL
On 21.01.2023 21:32, Daniel Santos wrote: Hello all, I saw this a few days ago, but was too busy to answer then -- sorry about that. I've dug into this code a bit, but for the mt7620. On 1/21/23 08:51, Sergio Paracuellos wrote: Hi, [+cc John Crispin] On Sat, Jan 21, 2023 at 2:45 PM Arınç

Re: mt7621 GPIO mapping mystery

2023-01-21 Thread Daniel Santos
Hello all, I saw this a few days ago, but was too busy to answer then -- sorry about that. I've dug into this code a bit, but for the mt7620. On 1/21/23 08:51, Sergio Paracuellos wrote: Hi, [+cc John Crispin] On Sat, Jan 21, 2023 at 2:45 PM Arınç ÜNAL wrote: On 21.01.2023 10:56, Sergio

Re: mt7621 GPIO mapping mystery

2023-01-21 Thread Tomasz Maciej Nowak
Hi. W dniu 21.01.2023 o 16:33, Lukas Zeller pisze: > Hi Sergio, thanks for the reply! > > On 21 Jan 2023, at 14:00, Sergio Paracuellos > wrote: > >> On Sat, Jan 21, 2023 at 1:19 PM Lukas Zeller wrote: >>> [...]So while I understand that using only the DT mechanisms for >>> configuring GPIO

Re: mt7621 GPIO mapping mystery

2023-01-21 Thread Lukas Zeller
Hi Sergio, thanks for the reply! On 21 Jan 2023, at 14:00, Sergio Paracuellos wrote: > On Sat, Jan 21, 2023 at 1:19 PM Lukas Zeller wrote: >> [...]So while I understand that using only the DT mechanisms for configuring >> GPIO modes, named gpios and libgpiod instead of /sys/class/gpio etc.

Re: mt7621 GPIO mapping mystery

2023-01-21 Thread Sergio Paracuellos
Hi, [+cc John Crispin] On Sat, Jan 21, 2023 at 2:45 PM Arınç ÜNAL wrote: > > On 21.01.2023 10:56, Sergio Paracuellos wrote: > > Hi, > > > > On Sat, Jan 21, 2023 at 7:03 AM Arınç ÜNAL wrote: > >> > >> Pins from 22 to 33 are on the rgmii2 pin group. They don't function as > >> GPIO by default.

Re: mt7621 GPIO mapping mystery

2023-01-21 Thread Arınç ÜNAL
On 21.01.2023 10:56, Sergio Paracuellos wrote: Hi, On Sat, Jan 21, 2023 at 7:03 AM Arınç ÜNAL wrote: Pins from 22 to 33 are on the rgmii2 pin group. They don't function as GPIO by default. Requesting a gpio by either from devicetree or `echo 203 > /sys/class/gpio/export` won't change

Re: mt7621 GPIO mapping mystery

2023-01-21 Thread Sergio Paracuellos
Hi, On Sat, Jan 21, 2023 at 1:19 PM Lukas Zeller wrote: > > Hi, > > > On 21 Jan 2023, at 08:56, Sergio Paracuellos > > wrote: > > > > [...] Yes, you have to claim the pin group as gpio on the device tree to > > make this work. > > This revals a underlying problem I tried to ask about back in

Re: mt7621 GPIO mapping mystery

2023-01-21 Thread Lukas Zeller
Hi, > On 21 Jan 2023, at 08:56, Sergio Paracuellos > wrote: > > [...] Yes, you have to claim the pin group as gpio on the device tree to > make this work. This revals a underlying problem I tried to ask about back in June 2022 [1] - what is the state of userland GPIO support in OpenWrt?

Re: mt7621 GPIO mapping mystery

2023-01-21 Thread Sergio Paracuellos
Hi, On Sat, Jan 21, 2023 at 7:03 AM Arınç ÜNAL wrote: > > Pins from 22 to 33 are on the rgmii2 pin group. They don't function as > GPIO by default. Requesting a gpio by either from devicetree or `echo > 203 > /sys/class/gpio/export` won't change anything. You have to claim > the pin group as

Re: mt7621 GPIO mapping mystery

2023-01-20 Thread Arınç ÜNAL
Pins from 22 to 33 are on the rgmii2 pin group. They don't function as GPIO by default. Requesting a gpio by either from devicetree or `echo 203 > /sys/class/gpio/export` won't change anything. You have to claim the pin group as gpio on the devicetree. Quoting my response from [0]:

Re: mt7621 GPIO mapping mystery

2023-01-20 Thread Rosen Penev
CC: Sergio On Fri, Jan 20, 2023 at 11:29 AM Peter Naulls wrote: > > > > I posted previously on GPIOs, which caused some debate; this may or may not > be relevant, but I'd be remiss to not mention it: > > http://lists.openwrt.org/pipermail/openwrt-devel/2022-October/039593.html > > I've been

mt7621 GPIO mapping mystery

2023-01-20 Thread Peter Naulls
I posted previously on GPIOs, which caused some debate; this may or may not be relevant, but I'd be remiss to not mention it: http://lists.openwrt.org/pipermail/openwrt-devel/2022-October/039593.html I've been chasing an issue with GPIO mapping in for an mt7621 on the OpenWrt 5.10.161 etc