Jump to content

Search the Community

Showing results for 'gpio'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Armbian
    • Armbian project administration
  • Community
    • Announcements
    • SBC News
    • Framework and userspace feature requests
    • Off-topic
  • Using Armbian
    • Beginners
    • Software, Applications, Userspace
    • Advanced users - Development
  • Standard support
    • Amlogic meson
    • Allwinner sunxi
    • Rockchip
    • Other families
  • Community maintained / Staging
    • TV boxes
    • Amlogic meson
    • Allwinner sunxi
    • Marvell mvebu
    • Rockchip
    • Other families
  • Support

Categories

  • Official giveaways
  • Community giveaways

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Matrix


Mastodon


IRC


Website URL


XMPP/Jabber


Skype


Github


Discord


Location


Interests

  1. I have got the same issue. Orange Pi Zero H2+ Linux moblink 6.6.16-current-sunxi #1 SMP Fri Feb 23 08:25:28 UTC 2024 armv7l GNU/Linux Armbian 24.2.1 I used some software which is 1) playing some sound into embedded sound card 2) processing interrupts on gpio (gpio event with GPIO API V2) During sysstat-collect.service failing for 1min 47.293s: +sound playing OK - gpio interrupts proccessing freeze I had to stop and disable sysstat-collect.service Also apt remove sysstat It helped. cat armbian-image-release cat armbian-release cat os-release
  2. Hello, to avoid this error, you can disable strict mode in the pin controller driver https://elixir.bootlin.com/linux/v6.7.12/source/drivers/pinctrl/sunxi/pinctrl-sun50i-h616.c But I'm not sure that the driver for this touchscreen can work on allwinner processors without changes, because their "gpio_in" and "irq" are different multiplexer states I think they cannot work simultaneously, so something similar is needed PS Of course you can use different pins for interrupts and gpio and then everything should work out of the box.
  3. Hi, Armbian_21.02.3_Odroidc1_focal_current_5.10.21 how do I find out which number do I need to provide to gpio export command? Let's say I have physical pin 16, which is labeled by the manufacturer as `GPIOX.5` or `102`. But that doesn't work with Armbian: echo 102 > /sys/class/gpio/export [ 1602.030617] export_store: invalid GPIO 102 How do I know the value to provide for /sys/class/gpio/export? # cat /sys/kernel/debug/gpio gpiochip1: GPIOs 413-428, parent: platform/c8100084.pinctrl, aobus-banks: gpio-416 ( |TF_IO ) out lo gpio-417 ( |usb-hub-reset ) out hi gpio-426 ( |c1:blue:alive ) out hi ACTIVE LOW gpiochip0: GPIOs 429-511, parent: platform/c1109880.pinctrl, cbus-banks: gpio-456 ( |regulator-tflash_vdd) out lo gpio-470 ( |PHY reset ) out hi ACTIVE LOW gpio-482 ( |cd ) in hi ACTIVE LOW gpio-492 ( |reset ) out hi ACTIVE LOW Thanks
  4. Dear Community, Currently Im playin with my Banana Pi M2 Berry and therefore I need a fusion of the LATEST Armbian -System with the compilers needed by the Boards Offical "GPIO-Libarys", which are outdated 7years ago. The most important libary would be the RPi.GPIO. RPi.GPIO The problem is, that this libary was using python2 and python3, python2 isnt my future i think, but for compiling the lib with python3 I need some pip-packages and the right arm-gcc compiler = 4.8 i think. DO i may need a cross-compile libary or whats are the requirements to build the lib on the latest system? To avoid hardware-determiner ERRORS, Im using the folder and its scripts/configs used in the offical Raspbian build for this device. The goal: The Latest Armbian-build with re-supported libarys like rpi.gpio or wiringpi! If there is someone who would like to update the GPIO-Controlling Libarys for Banana Pi with me, i'd be gratefull if some people let me know by pn, e-mail or github! Thanks, BlackLeakz
  5. Hello Armbian Team, i have the wish for the integration of - GPIO Support for RockPi 5b to the Edge Kerne - dtb's which are aviable for Kernel 5.10.160 mostly importend for me are the UARTS ( if tryed to compile the DTS files form 5.10.160 for the 6.8.2 .. ends after sending some to the UART with a Kernel segfault 😞 ) Thanks a lot for the good Work 🙂 René
  6. I have Armbian up and running on a Rock Pi S with a PoE HAT. To enable the audio jack on the PoE HAT I had to run the following commands as mentioned on the official Rock Pi S PoE Hat wiki. # echo 15 > /sys/class/gpio/export # echo out > /sys/class/gpio/gpio15/direction # echo 1 > /sys/class/gpio/gpio15/value Once enabled, the audio works as needed. However, every time the device is rebooted I have to SSH in and run these commands again to re-enable audio out which is obviously not ideal. How can I persist these changes between reboots?
  7. I used simple dts file as possible : /dts-v1/; /plugin/; / { model = "OrangePi Zero3"; compatible = "xunlong,orangepi-zero3", "allwinner,sun50i-h618"; fragment@0 { target-path = "/"; __overlay__ { w1: onewire@0 { compatible = "w1-gpio"; pinctrl-names = "default"; gpios = <&pio 2 7 0>; status = "okay"; }; }; }; }; compiled: armbian-add-overlay w1-gpio.dts and works 🙂 with armbianEnv.txt user_overlays=w1-gpio param_w1_pin=PC10 param_w1_pin_int_pullup=0 demsg show [ 5.015541] Driver for 1-wire Dallas network protocol. [ 5.019754] gpio-74 (onewire@0): enforced open drain please flag it properly in DT/ACPI DSDT/board file [ 5.046831] w1_master_driver w1_bus_master1: Attaching one wire slave 28.03165129ecff crc 24 and cat /sys//bus/w1/devices/28-03165129ecff/w1_slave 76 01 4b 46 7f ff 0c 10 d3 : crc=d3 YES 76 01 4b 46 7f ff 0c 10 d3 t=23375 SBC DS18B20 VCC (3V3) Pin 1 ---------- VCC DS18B20 | R1 = 4k7 | GPIO74 Pin 26 --------- Data DS18B20 GND Pin 6 ---------- GND DS18B20
  8. Armbian 6.6.16-sunxi64 (bookworm) on NanoPi NEO2 NanoHatOLED fails: - GPIO devices are missing; 2024-03-29 23:04:55 root@M-DNS:~# uname -a Linux M-DNS 6.6.16-current-sunxi64 #2 SMP Fri Feb 23 08:25:28 UTC 2024 aarch64 GNU/Linux Seems regression of earlier issue that had been solved: Would appreciate as GPIO will restored in kernel.
  9. I would like to ask about the entry in armbiaEnv.txt in the ArmBian distribution for Orange Pi Zero 3 overlay_prefix=sun50i-h616 does it have anything to do with the file in the directory? /boot/dtb-6.6.30-current-sunxi64/allwinner/sun50i-h618-orangepi-zero3.dtb For OZPI version 3 there is a prefix sun50i-h618 and in armbianEnv.txt there is overlay_prefix=sun50i-h616 shouldn't it be sun50i-h618 ?? I'm asking about this because I have a problem with using overlay for w1-gpio for OZPI v3, so I am looking for the source of the problem in various places
  10. I try to understand problem [ 4.997793] sun50i-h616-pinctrl 300b000.pinctrl: pin PC10 already requested by onewire@0; cannot claim for 300b000.pinctrl:74 and I see this message is generate by: https://github.com/torvalds/linux/blob/master/drivers/pinctrl/pinmux.c#L102 /** * pin_request() - request a single pin to be muxed in, typically for GPIO * @pctldev: the associated pin controller device * @pin: the pin number in the global pin space * @owner: a representation of the owner of this pin; typically the device * name that controls its mux function, or the requested GPIO name * @gpio_range: the range matching the GPIO pin if this is a request for a * single GPIO pin */ ...... if ((!gpio_range || ops->strict) && desc->mux_usecount && strcmp(desc->mux_owner, owner)) { dev_err(pctldev->dev, "pin %s already requested by %s; cannot claim for %s\n", desc->name, desc->mux_owner, owner); goto out; } if ((gpio_range || ops->strict) && desc->gpio_owner) { dev_err(pctldev->dev, "pin %s already requested by %s; cannot claim for %s\n", desc->name, desc->gpio_owner, owner); goto out; } .....
  11. Maybe I need a change in my w1-gpio.dts looking to https://elixir.bootlin.com/linux/v6.6.30/source/arch/arm64/boot/dts/allwinner compatible = "allwinner,sun50i-h616"; to model = "OrangePi Zero3"; compatible = "xunlong,orangepi-zero3", "allwinner,sun50i-h618"; and add #include "sun50i-h616-orangepi-zero.dtsi" like in https://elixir.bootlin.com/linux/v6.6.30/source/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
  12. Unfortunately, my programming knowledge is low and knowledge of DTS Overlays + source code of w1-gpio linux kernel does not allow me to find the source of the problem [ 4.997793] sun50i-h616-pinctrl 300b000.pinctrl: pin PC10 already requested by onewire@0; cannot claim for 300b000.pinctrl:74
  13. Ha, interesting ... I have put in armbianEnv.txt instead pc10 now param_w1_pin=gpio71 where gpio71 is number line for PC7 which is not connected DS18B20 🙂 at current is nothing connected and working w1-gpio with info log where is show PC10/gpio-74 [ 4.957396] Driver for 1-wire Dallas network protocol. [ 4.960325] w1-gpio onewire@0: there is not valid maps for state default [ 4.960433] gpio-74 (onewire@0): enforced open drain please flag it properly in DT/ACPI DSDT/board file [ 4.986579] w1_master_driver w1_bus_master1: Attaching one wire slave 28.03165129ecff crc 24 cat /sys/bus/w1/devices/28-03165129ecff/w1_slave 5f 01 4b 46 7f ff 0c 10 12 : crc=12 YES 5f 01 4b 46 7f ff 0c 10 12 t=21937 I can not understand this
  14. Summary, In all examples to use w1-gpio in Armbian in armbinaEnv.txt always is name of gpio is write in capital letters for example PC10 param_w1_pin=PC10 but when we use PC10 w1-gpio not works and in log is message: [ 4.997793] sun50i-h616-pinctrl 300b000.pinctrl: pin PC10 already requested by onewire@0; cannot claim for 300b000.pinctrl:74 command cat /sys/kernel/debug/gpio did not show that gpio 74 / PC10 is used command but when we use name gpio in lowercase letters pc10 w1-gpio works and show data from DS18B20 but show message in log [ 9.366246] w1-gpio onewire@0: there is not valid maps for state default command cat /sys/kernel/debug/gpio show gpiochip0: GPIOs 0-287, parent: platform/300b000.pinctrl, 300b000.pinctrl: gpio-74 ( |onewire@0 ) out hi and we can see data from DS18B20 cat /sys/bus/w1/devices/28-03165129ecff/w1_slave 53 01 4b 46 7f ff 0c 10 2d : crc=2d YES 53 01 4b 46 7f ff 0c 10 2d t=21187 for me, it is bug or in kernel 6.6.30 or overlay for Ornage Pi Zreo v3
  15. I have checked what hapen when on Ornage Pi Zero v1 with kernel 6.1.63 in armbianEnv.txt use pa14 instead PA14 in log I see [ 9.358693] Driver for 1-wire Dallas network protocol. [ 9.366246] w1-gpio onewire@0: there is not valid maps for state default [ 9.368019] gpio-110 (onewire@0): enforced open drain please flag it properly in DT/ACPI DSDT/board file and w1-gpio not working and no files in /sys/bus/w1/devices/ but we see marked in red the same information that I have on OZPI v3 when I use pc10 instead of PC10 but on OZPI v3 DS18B20 works and on OZPI v1 it doesn't work when I use the lower case name gpio This looks like some kind of bug in kernel 6.6.30 on OZPI v3
  16. dts overlay aren't 'perfect' https://elinux.org/Device_Tree_Source_Undocumented#:~:text=Node can be deleted with,%2Fdelete-property%2F directive.&text=If a delete is specified,with the overlay source file. If a delete is specified in an overlay source file, the delete only impacts the files compiled in association with the overlay source file. The delete does not result in an opcode in the resulting .dtb, thus applying the overlay will not delete the node or property in the base tree. and it may take using those 'hacks' described at that page to attempt a 'fix' hence, you may like to just note that those messages are 'benign' and w1-gpio works normally.
  17. Yes, that's right, I can ignore it when I have a working w1-gpio on OZPI v3, but it would be nice to see how to fix it so that it works correctly. But what's strange to me is that I have to use the gpio name in lower case and not in upper case as it was always described in the w1-gpio examples. I tried to use the name with gpiod, i.e. "gpio74", instead of names like PC10, but it didn't work, so it occurred to me to try writing the name in lower case "pc10" instead of capital letters as usual, and I found that it worked, but I think it's not normal since capital letters have been used so far, I will check on OZP v1 whether it will work if I change to lowercase letters Thank you for exchanging ideas and tips on solving the problem
  18. rather pinctrl could be related to pinctrl or maybe gpiod. I'm not too sure if that message means that w1-gpio is using that pin so pinctrl cannot use it. if that is the case, I think it is ok if pinctrl don't use it for gpio. that message is likely safe to ignore as long as your w1-gpio works. to 'fix' that it may take editing other dts to exclude that pin from pinctrl which could be a hassle.
  19. But I am not use gpio PC10 by another application etc, I define PC10 only for w1-gpio in armbianEnv.tx but when I use PC10 instead pc10 w1-gpio is not working and I can not read data DS18B20. When I use pc10 all working and I read atat from DS18B20 so info in log: pin PC10 already requested by onewire@0; cannot claim for 300b000.pinctrl:74 give me that w1-gpio is not working
  20. it may help to look in codes https://github.com/torvalds/linux/blob/master/drivers/w1/masters/w1-gpio.c https://github.com/torvalds/linux/tree/master/drivers/w1 [ 4.997793] sun50i-h616-pinctrl 300b000.pinctrl: pin PC10 already requested by onewire@0; cannot claim for 300b000.pinctrl:74 seem to suggest that pinctrl tries to map that pin but onewire@0 is using it, so i guess this is ok as long as you are not using that as normal gpio pin. that "no maps for state" is found here https://github.com/torvalds/linux/blob/cf87f46fd34d6c19283d9625a7822f20d90b64a4/drivers/pinctrl/devicetree.c#L175 ret = ops->dt_node_to_map(pctldev, np_config, &map, &num_maps); if (ret < 0) return ret; else if (num_maps == 0) { /* * If we have no valid maps (maybe caused by empty pinctrl node * or typing error) ther is no need remember this, so just * return. */ dev_info(p->dev, "there is not valid maps for state %s\n", statename); return 0; } my guess is it may be related to pinctrl-names = "default"; some related stuff https://www.kernel.org/doc/Documentation/devicetree/bindings/w1/ https://www.kernel.org/doc/Documentation/devicetree/bindings/w1/w1-gpio.txt as it works as you mentioned, I'd guess that "not valid maps for state default" can be ignored.
  21. But it is interesting most of examples armbianEnv.txt for parameters param_w1_pin=PC10 show name of gpio in use capital letters but when I use name in capital letters is problem and show in demsg info [ 4.997793] sun50i-h616-pinctrl 300b000.pinctrl: pin PC10 already requested by onewire@0; cannot claim for 300b000.pinctrl:74 and 1-Wire not working but when I use name of gpio in lowercase letters pc20 1-Wire works and show temperature from DS18B20 but is info [ 4.994076] w1-gpio onewire@0: there is not valid maps for state default It maybe any bug ?
  22. Wow 🙂 I have success dmesg | grep -i wire* [ 4.991132] Driver for 1-wire Dallas network protocol. [ 4.994076] w1-gpio onewire@0: there is not valid maps for state default [ 4.994183] gpio-74 (onewire@0): enforced open drain please flag it properly in DT/ACPI DSDT/board file [ 5.021347] w1_master_driver w1_bus_master1: Attaching one wire slave 28.03165129ecff crc 24 cat /sys/bus/w1/devices/28-03165129ecff/w1_slave 54 01 4b 46 7f ff 0c 10 fd : crc=fd YES 54 01 4b 46 7f ff 0c 10 fd t=21250 What do I change in /boot/armbianEnv.txt Instead of capital letters PC10, I used in lowercase letters pc10 for the gpio name stupid mistake on my part and maybe I suggested examples param_w1_pin=pc10 param_w1_pin_int_pullup=0 user_overlays=w1-gpio So we can now use sensors like DS18B20 etc with w1-gpio on Orange Pi Zero v3 w with w1-gpio.dts: /dts-v1/; /plugin/; / { compatible = "allwinner,sun50i-h616"; fragment@0 { target = <&pio>; __overlay__ { w1_pins: w1_pins { pins = "PC10"; function = "gpio_in"; }; }; }; fragment@1 { target-path = "/"; __overlay__ { onewire@0 { compatible = "w1-gpio"; pinctrl-names = "default"; pinctrl-0 = <&w1_pins>; gpios = <&pio 2 10 0>; /* PC10 */ status = "okay"; }; }; }; }; I don't know what I need to correct to remove this info: [ 4.994076] w1-gpio onewire@0: there is not valid maps for state default
  23. I connect DS18B20 to orange Pi Zero on Armbian 23.02.2 Bullseye with Linux 6.1.63 Via armbian-config in Hardware enabled w1_gpio and add to armbiaEnv.txt param_w1_pin=PA14 param_w1_pin_int_pullup=0 and in overlyas= was w1_gpio cat /sys/bus/w1/devices/28-03165129ecff/w1_slave 54 01 4b 46 7f ff 0c 10 fd : crc=fd YES 54 01 4b 46 7f ff 0c 10 fd t=21250 cat /sys/kernel/debug/gpio gpiochip0: GPIOs 0-223, parent: platform/1c20800.pinctrl, 1c20800.pinctrl: gpio-14 ( |onewire@0 ) out hi gpio-17 ( |orangepi:red:status ) out lo gpio-20 ( |reg_vcc_wifi ) out hi gpio-166 ( |cd ) in lo ACTIVE LOW gpio-204 ( |usb0_id_det ) in hi IRQ dmesg |grep wire* [ 9.398674] Driver for 1-wire Dallas network protocol. [ 9.410366] gpio-14 (onewire@0): enforced open drain please flag it properly in DT/ACPI DSDT/board file [ 9.463654] w1_master_driver w1_bus_master1: Attaching one wire slave 28.03165129ecff crc 24 so all working very well on OZPI v1 with kernel 6.163 on Armbian 23.02.2 So my DS18B20 is work but on OZPI v3 with 6.6.30 kernel and user overlay for w1-gpio not work for me. It maybe we need more add in overlay for w1-gpio.dts?
  24. I checked new sensor DS18B20 but still the same error in dmesg info, so I will try with my RPI or OZPI v1 z kernel 6.1 check use w1-gpio overlay
  25. I'm half way feeling that it may be possibly to use DS18B20 using gpiod / libgpiod https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/tree/ I tried googling around but thare are lots of offers for DS18B20 many of which use w1-gpio as you are doing the timing requires for DS18B20 fig 16 page 16 https://www.analog.com/media/en/technical-documentation/data-sheets/DS18B20.pdf from 15 uS to 60 uS per bit of data isn't after all that impossible to synchronize the hard part about libgpiod is the timing part as sending and receiving data is timing sensitive, if there is a way to do that to read and write data in sync with tight timing it is possibly feasible to do so even in python. i.e. no kernel drivers, the python (or c etc) codes simply use libgpiod and work the signals. I've thus far not (yet) found one based on libgpiod admist the 'noise' returned from the searches, maybe try searching around and you may find an existing implementation that's already done. ether way, you seemed to have *achieved* making w1-gpio work, perhaps try connecting a sensor to see if the dmesg changes. the hint is [ 4.997833] w1-gpio onewire@0: gpio_request (pin) failed [ 4.997841] w1-gpio: probe of onewire@0 failed with error -22 if w1-gpio does a 'probe' it is probably sending the 'reset' signal to the chip and waiting for a response
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines