Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: Nikita Maslo <nikitamalco203@gmail.com>
To: Bartosz Golaszewski <brgl@kernel.org>, Linus Walleij <linusw@kernel.org>
Cc: Nikita Maslo <nikitamalco203@gmail.com>,
	linux-gpio@vger.kernel.org, linux-amlogic@lists.infradead.org
Subject: Broken bitbang 1-wire on Amlogic after kernel update
Date: Fri, 15 May 2026 17:38:00 +0300	[thread overview]
Message-ID: <20260515143801.2132974-1-nikitamalco203@gmail.com> (raw)

Hi,

I was running linux-6.12.67 on a hardkernel odroid-c2 (Amlogic S905) Amlogic board with DS18B20 on
w1-gpio (1-Wire bitbang), everything worked fine. After updating the
kernel, 1-wire stopped working the DS18B20 fails to enumerate or
reads back the broken-bus, and dmesg
gets flooded with WARNINGs from gpiod_set_value/gpiod_get_value
called from w1_gpio_write_bit/w1_gpio_read_bit.

Hardware: Hardkernel ODROID-C2 (Amlogic S905).
Kernel:   linux-6.18.15 (also reproduces on linux-6.12.69; last
          known-good for me was linux-6.12.67).

Device tree fragment used:

    / {
        onewire {
            compatible = "w1-gpio";
            gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
        };
    };

dmesg, captured on ODROID-C2 / linux-6.18.15:

  [   59.102855] ------------[ cut here ]------------
  [   59.102891] WARNING: CPU: 0 PID: 1145 at drivers/gpio/gpiolib.c:3880 gpiod_set_value+0x78/0x88
  [   59.103569] CPU: 0 UID: 0 PID: 1145 Comm: w1_bus_master1 Tainted: G        WC          6.18.15-current-meson64 #8 PREEMPT
  [   59.103618] Hardware name: Hardkernel ODROID-C2 (DT)
  [   59.103658] pc : gpiod_set_value+0x78/0x88
  [   59.103687] lr : w1_gpio_write_bit+0x20/0x38 [w1_gpio]
  [   59.104161] Call trace:
  [   59.104175]  gpiod_set_value+0x78/0x88 (P)
  [   59.104210]  w1_gpio_write_bit+0x20/0x38 [w1_gpio]
  [   59.104238]  w1_reset_bus+0x84/0xe0 [wire]
  [   59.104272]  w1_search+0x88/0x2a0 [wire]
  [   59.104304]  w1_search_devices+0x54/0x90 [wire]
  [   59.104336]  w1_search_process_cb+0x84/0x170 [wire]
  [   59.104368]  w1_process+0x1c0/0x238 [wire]
  [   59.104400]  kthread+0x14c/0x218
  [   59.104432]  ret_from_fork+0x10/0x20
  [   59.104464] ---[ end trace 0000000000000000 ]---

A symmetric WARN at gpiolib.c:3501 fires from gpiod_get_value via
w1_gpio_read_bit on every read slot.

After a little researching, the suspect commit looks like:

28f240683871 ("pinctrl: meson: mark the GPIO controller as sleeping")

I also tested bitbang i2c-gpio on the same hardware after the update,
it seems to keep working.


                 reply	other threads:[~2026-05-15 14:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20260515143801.2132974-1-nikitamalco203@gmail.com \
    --to=nikitamalco203@gmail.com \
    --cc=brgl@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    /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