Emil Posted December 31, 2018 Posted December 31, 2018 Hello Maybe it will help someone. I lost a lot of time trying to connect 1-wire to Cubieboard2 via DVK 522 (it has DS18B20 connection on PB10 /gpio 66/ with external pullup). I've done steps in http://linux-sunxi.org/1-Wire Quote You don't have to edit the fex-file, but the /boot/armbianEnv.txt and add the lines: overlays=w1-gpio param_w1_pin=PB10 # desired pin param_w1_pin_int_pullup=1 # internal pullup-resistor: 1=on, 0=off with different combination and it doesn't work. In /sys/bus/w1/devices i had only sth like 00-80... 00-40... 00-c00.. without w1_slave file (i was 100% sure of hardware - it works on waveshare debian image) SOLUTION: In /boot/armbianEnv.txt lines needs to be without comments: Quote overlays=w1-gpio param_w1_pin=PB10 param_w1_pin_int_pullup=0 and that's it ( overlays are created automatically by config so it will be sth like for example this: overlays=mmc2 nand uart2 uart3 uart4 uart5 uart6 uart7 w1-gpio ) other interesting behaviour cat /sys/kernel/debug/gpio gpio-42 ( |w1 ) in hi I don't know why pin 66 ( https://github.com/cubieplayer/Cubian/wiki/GPIO-Introduction ) has number 42 now I've tried to use PC02 http://linux-sunxi.org/A20/PIO#PC02_.2866.29 and also "(position of letter in alphabet - 1) * 32 + pin number" dmesg output [ 18.227575] sun4i-pinctrl 1c20800.pinctrl: unknown pin PB10 # desired pin finally helped INFO: Cubieboard2, DVK522 image: Armbian Stretch mainline kernel 4.14.y (legacy kernel doesn't boot) on SATA drive cat /proc/version Linux version 4.14.84-sunxi (root@armbian.com) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #3 SMP Sat Dec 1 07:18:41 CET 2018
martinayotte Posted December 31, 2018 Posted December 31, 2018 13 hours ago, Emil said: I don't know why pin 66 Never use header pin number ... SoC is not aware how manufacturer bring GPIOs to header pins ...
Recommended Posts