Message ID | 20181229125711.5205-1-martin.blumenstingl@googlemail.com (mailing list archive) |
---|---|
Headers | show |
Series | ARM: dts: meson: fix SD card cd-gpio (pre v4.21-rc) | expand |
On Sat, Dec 29, 2018 at 1:57 PM Martin Blumenstingl <martin.blumenstingl@googlemail.com> wrote: > > Today I noticed that my Odroid-C1 doesn't see it's SD card anymore. > My board is not the only one, Odroid-C1 on KernelCI suffers from the > same problem: > v4.20-6428-g00c569b567c7 still sees the SD card (mmc0): [0] > v4.20-8955-g903b77c63167 doesn't see the SD card (mmc0) anymore: [1] > > My Endless Mini (EC-100) is also affected by this issue. > > a git bisect run points to this commit: > 89a5e15bcba87df5120d4656e0ff33d4f7cd6152 ("gpio/mmc/of: Respect polarity > in the device tree") > > and indeed, reverting it makes my Odroid-C1 and EC-100 see the SD card > again. I started a separate discussion for that topic on the linux-mmc and linux-gpio mailing list for this topic: [0] comments regarding this series are still welcome! Regards Martin [0] https://marc.info/?l=linux-mmc&m=154609359306732&w=3
On Sat, Dec 29, 2018 at 1:57 PM Martin Blumenstingl <martin.blumenstingl@googlemail.com> wrote: > However, while reviewing the .dts files for the 32-bit Amlogic Meson > boards I found that the cd-gpios are specified incorrectly in the .dts. > Documentation/devicetree/bindings/mmc/mmc.txt states: "[...] using the > "cd-inverted" property means, that the CD line is active high, i.e. it > is high, when a card is inserted". > This is not the case on all currently supported 32-bit Meson boards, so > this switches the cd-gpios > - from GPIO_ACTIVE_HIGH with the "cd-inverted" property being set > - to GPIO_ACTIVE_LOW with the "cd-inverted" property being absent > > This fix also works even if the following two commits are reverted: > - 89a5e15bcba87d ("gpio/mmc/of: Respect polarity in the device tree") > - 81c85ec15a1946 ("gpio: OF: Parse MMC-specific CD and WP properties") Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Thanks for looking into this, I think fixing the device trees is orthogonal to fixing the issue I created, let's fix both! Yours, Linus Walleij
Hi Linus, On Sun, Dec 30, 2018 at 8:57 PM Linus Walleij <linus.walleij@linaro.org> wrote: > > On Sat, Dec 29, 2018 at 1:57 PM Martin Blumenstingl > <martin.blumenstingl@googlemail.com> wrote: > > > However, while reviewing the .dts files for the 32-bit Amlogic Meson > > boards I found that the cd-gpios are specified incorrectly in the .dts. > > Documentation/devicetree/bindings/mmc/mmc.txt states: "[...] using the > > "cd-inverted" property means, that the CD line is active high, i.e. it > > is high, when a card is inserted". > > This is not the case on all currently supported 32-bit Meson boards, so > > this switches the cd-gpios > > - from GPIO_ACTIVE_HIGH with the "cd-inverted" property being set > > - to GPIO_ACTIVE_LOW with the "cd-inverted" property being absent > > > > This fix also works even if the following two commits are reverted: > > - 89a5e15bcba87d ("gpio/mmc/of: Respect polarity in the device tree") > > - 81c85ec15a1946 ("gpio: OF: Parse MMC-specific CD and WP properties") > > Reviewed-by: Linus Walleij <linus.walleij@linaro.org> thank you for reviewing my series! > Thanks for looking into this, I think fixing the device trees is > orthogonal to fixing the issue I created, let's fix both! I fully agree. if I still have time I'll look into a patch for the MMC core later today, otherwise I'll try to do it tomorrow Regards Martin
Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes: > On Sat, Dec 29, 2018 at 1:57 PM Martin Blumenstingl > <martin.blumenstingl@googlemail.com> wrote: >> >> Today I noticed that my Odroid-C1 doesn't see it's SD card anymore. >> My board is not the only one, Odroid-C1 on KernelCI suffers from the >> same problem: >> v4.20-6428-g00c569b567c7 still sees the SD card (mmc0): [0] >> v4.20-8955-g903b77c63167 doesn't see the SD card (mmc0) anymore: [1] >> >> My Endless Mini (EC-100) is also affected by this issue. >> >> a git bisect run points to this commit: >> 89a5e15bcba87df5120d4656e0ff33d4f7cd6152 ("gpio/mmc/of: Respect polarity >> in the device tree") >> >> and indeed, reverting it makes my Odroid-C1 and EC-100 see the SD card >> again. > I started a separate discussion for that topic on the linux-mmc and > linux-gpio mailing list for this topic: [0] > > comments regarding this series are still welcome! Like Linus mentioned, fixing the DTs is still important, so queuing as fixes for v5.0-rc (branch v4.21/fixes) Kevin