[OpenWrt-Devel] Broken GPIO on MT7620 after commit 34ca34b32b02

Andrey Jr. Melnikov temnota.am at gmail.com
Wed May 23 14:53:02 EDT 2018


In gmane.comp.embedded.lede.devel Kristian Evensen <kristian.evensen at gmail.com> wrote:
> On Wed, May 23, 2018 at 4:09 AM, Andrey Jr. Melnikov
> <temnota.am at gmail.com> wrote:
> > In gmane.comp.embedded.lede.devel Rosen Penev <rosenp at gmail.com> wrote:
> >> On Tue, May 22, 2018 at 7:45 AM, Kristian Evensen
> >> <kristian.evensen at gmail.com> wrote:
> >> > Hi,
> >> >
> >> > On Tue, May 22, 2018 at 4:33 PM, John Crispin <john at phrozen.org> wrote:
> >> >> what exactly is the issue ? breaking compat means that rosen either needs to
> >> >> fix the regression or we need to revert the patch.
> >> >
> >> > The issue I saw is that writing to GPIO has no effect. On my device
> >> > (mt7620-based), I can control the power to the two mini-pcie slots by
> >> > writing to /sys/class/gpio/power_pcie{1,2}/value. After the commit
> >> > "ramips: mmc: Sync with
> >> > staging driver", writing to these two files have no effect. I.e., I
> >> > can no longer control the power.
> >> Looks like it's this commit:
> >> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/staging/mt7621-mmc?h=next-20180517&id=b734735fcaca60e8f07b040cd8a700f6fabe5b39
> >
> >> Please try reverting. Unfortunately I don't have mt7620 hardware so I
> >> can't test. Based on the comment, the issue should be fixed elsewhere.
> > This commit removed programming SDXC_MODE register to GPIO mode and nothing
> > more.
> > So - fix your device dts, add nd_sd to gpio group.

> nd_sd is already part of the gpio group, so then I guess the change
> linked to by Rosen is not relevant in my case.

Relevant. In D240.dts we have

-- cut --
&sdhci {
        status = "okay";
};
-- cut --

so SD driver loads and reprogram GPIO register ND_SD_GPIO_MODE to ND mode
and you lost GPIO controls. Disable unused sdhci in DTS.


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
http://lists.infradead.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list