Hello, I have installed the "Armbian_community_25.2.0-trunk.124_Tinkerboard-2_bookworm_current_6.6.63_minimal.img.xz" image on my tinkerboard-2 to develop a library for one wire devices.
There is a problem with the usage of armbian-config on activating overlays. The entry in armbianEnv.txt includes the prefix in the overlay name. This can be workarounded manually, e.g. for w1-gpio the correct entry needs to be:
overlays=rk3399-w1-gpio2
If anyone can point me to the source code I maybe can provide a PR to fix it.
Another problem is the content of the overlay of this w1-gpio.
After activating the dmesg give an error (the first warning is normal and also exist on my working w1-gpio with tinkerboard1):
sudo dmesg | grep one
[ 8.630758] gpio-36 (onewire@0): enforced open drain please flag it properly in DT/ACPI DSDT/board file
[ 8.630883] OF: /onewire@0: could not get #gpio-cells for /vop@ff8f0000/port/endpoint@3
[ 8.630926] w1-gpio onewire@0: gpio_request_one (ext_pullup_enable_pin) failed
[ 8.630934] w1-gpio: probe of onewire@0 failed with error -22
Reloading the module "w1_gpio" each time leads to the same output.
Decompiling the overlay gives this content:
/dts-v1/;
/ {
compatible = "rockchip,rk3399";
fragment@0 {
target-path = "/";
__overlay__ {
onewire@0 {
compatible = "w1-gpio";
pinctrl-names = "default";
gpios = <0xffffffff 0x04 0x00 0xae>;
status = "okay";
phandle = <0x01>;
};
};
};
__symbols__ {
w1 = "/fragment@0/__overlay__/onewire@0";
};
__fixups__ {
gpio1 = "/fragment@0/__overlay__/onewire@0:gpios:0";
};
};
The difference to the tinkerboard1 overlay seems to be the structure of the "gpios" line. Normally there are 3 values only. Some searching in the latest Kernel documentation do not give me a hint that there is something changed in the past, but maybe I'm wrong here.
My first try was to remove the last value, compiling the dtbo and test it. There is no error anymore in the dmesg output. Also the gpio-36 is now shown:
sudo cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 0-31, parent: platform/ff720000.gpio, gpio0:
gpio-3 ( |act-led ) out lo
gpio-4 ( |pwr-led ) out hi
gpio-10 ( |rsv-led ) out lo
gpio-12 ( |ep ) out hi
gpiochip1: GPIOs 32-63, parent: platform/ff730000.gpio, gpio1:
gpio-35 ( |vbus-5vout ) out lo
gpio-36 ( |onewire@0 ) out lo
gpio-46 ( |vsel ) out lo
gpio-49 ( |vsel ) out lo
Nevertheless it is not working. On the tinkerboard1 the gpio output is a bit different (gpio-17 is "out hi"):
sudo cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 0-23, parent: platform/ff750000.gpio, gpio0:
gpio-3 ( |led-2 ) out hi
gpio-5 ( |GPIO Key Power ) in hi IRQ ACTIVE LOW
gpio-11 ( |dvs ) out hi
gpio-12 ( |dvs ) out lo
gpio-17 ( |onewire@0 ) out hi
How can I proceed at this point with debugging and error catching?
Thanks Thomas