PaddleStroke

  • Content Count

    70
  • Joined

  • Last visited

About PaddleStroke

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thanks! I went with chmod a+s /usr/bin/python And it's working now! Thanks again for your support. I think I should make a proper gamepad kernel module rather than this python script. For reference, the python script is launched as a service in systemd. By the way I made a video on the hardware part of prototyping, maybe it will interest some people
  2. Thanks! I can now read the values of the LRADC. Now I have only one issue left is that my python script does not have permission to read /dev/mem when it's started automatically at launch. I had the same permission issue when trying to read AXP209 ADC, which we solved by using a .rule file in etc/udev/rules. I tried to add one line for /dev/mem but I think I'm missing something here. ACTION=="add", SUBSYSTEM=="iio", RUN+="/bin/chmod g+w /sys/bus/iio/devices/iio:device0/in_voltage3_scale" ACTION=="add", SUBSYSTEM=="iio", RUN+="/bin/chmod g+w /sys/bus/iio/devices/iio:de
  3. Could you please tell me how to do this? I don't know what is the control register nor how to initialize it.
  4. Hi! Thanks for your reply ! I had to put that on hold for some time, but I'm back on it. After checking the A20 user manual I find that the offset for LRADC1 is 0x10 and not 0x0D. So I guess you meant 0x01C22810 for LRADC1? So I should be doing something like : fd = open("/dev/mem", "r+") mem = mmap.mmap(fd.fileno(), 16, 0x01C22800 ) close(fd) while(we need to get the values): mem.seek(0x0C) LRADC0_byte = mem.read(1) mem.seek(0x10) LRADC1_byte = mem.read(1) //further process the values mem.close() Does that sounds correct to you?
  5. Hey guys, I'm trying to find a way to read the values of the LRADC0 and LRADC1 of the A20. Those ADC are usually used for android-style buttons (labeled "VOL+", "VOL-", "MENU", "SEARCH", "HOME", "ESC" and "ENTER") which are connected to a low-resolution ADC via a resistor network. But I want to use the ADC for another purpose and I just need to read values between 0 and 63. Now it seems there is already a driver which let you setup the android-style buttons in the DTS (as can be seen in this patch) But I can't find the code of this driver, w
  6. Finally it works as expected. I changed the GPIO to PC18 (which was high by default when I probed it before changing it in dts) First I tried to make modifications to match torvalds DTS with the PI12 CLK settings. But it wasn't working. In the end I just tried reset to megous settings, just changing the port to PC18 and it works. So it seems something is forcing PE1 to low.
  7. Yes if the Enable pin is connected to 3v3 directly. The issue is that the PE1 to which enable pin is connected never go high. I suspect it's because the clock is not set but I'm not sure
  8. No I did not have the clock in previous success. I think maybe because CLK is not connected the reset hang forever maybe? I think the clk is used by wifi too. The supplier of AP6210 told me so.
  9. Ok if I recall correctly armbian use the megous fork of torvals right? If so there are lot of difference in cubietruck DTS. It does not look right : Megous fork : mmc3_pwrseq: mmc3_pwrseq { compatible = "mmc-pwrseq-simple"; pinctrl-names = "default"; pinctrl-0 = <&mmc3_pwrseq_pin_cubietruck>; reset-gpios = <&pio 7 9 GPIO_ACTIVE_LOW>; /* PH9 WIFI_EN */ }; &pio { ... mmc3_pwrseq_pin_cubietruck: mmc3_pwrseq_pin@0 { pins = "PH9"; function = "gpio_out"; }; ... Torvalds github : mmc3_pwrseq: mmc3_pwrseq {
  10. I don't understand what is this "mmc-pwrseq-simple" I read this but still don't understand... The WL_REG_ON is not a reset pin. It seems it's just a Enable pin. So it should just be high. I tried changing the GPIO assigned to PC18. Before doing so I checked multimeter said 3.3V, this pin was high by default. Now after reboot the pin goes low right after booting kernel and stays low. If I understand correctly this : compatible = "mmc-pwrseq-simple"; reset-gpios = <&pio 7 9 GPIO_ACTIVE_LOW>; /* PH9 WIFI_EN */ Will asserted (means activate right
  11. I hand soldered PE1 to WIFI_EN. I wondered if I have not burned something on AP6210 side because it was really hard to solder a wire to the AP6210 pin. But because the wifi can be hand-booted by connecting a wire between 3v3 and WIFI_EN I guess the enable pin still work. On the SoC side I don't think it could have burned because it's far from SoC and trace is very small (0.127mm), so very little heat should have gone up. So overall I don't think anything burnt I wonder maybe if the PE1 is maybe setup by default to do something else. Maybe it's use is overwriten b
  12. I hand connected a wire from 3v3 to wifi_en Do you know where I can find a table of the GPIO number? Alternatively do you think problem could be in uboot ? Maybe we have not patched correctly uboot dts Or maybe it's the E gpio the problem? Maybe they are used by something else? Or maybe some hardware issue ?
  13. Ok I could get the wifi working by wiring manually the WIFI_EN pin directly to 3V3. Apparantly the PE1 was not turning on and always kept at 0V (reading from multimeter). Not sure why. Now iwconfig show the card in wlan0. I think maybe the wifi is just off by default when booting up? Then we have to enable it manually with a command? Do you know if a command enable/disable wifi?
  14. grep SDIO and BRCM don't return anything either. MMC return something though (see enclosed picture). It looks like an error what do you think? 1c12000 is the mmc3 1c0f0000 is the mmc0 (sd card) sunxi-mmc 1c12000.mmc: Linked as a consumer to regulator.2 sunxi-mmc 1c12000.mmc: Dropping the link to regulator.2 sunxi-mmc 1c12000.mmc: Linked as a consumer to regulator.2 sunxi-mmc 1c12000.mmc: Dropping the link to regulator.2 sunxi-mmc 1c12000.mmc: Linked as a consumer to regulator.2 sunxi-mmc 1c12000.mmc: Dropping the link to regulator.2 sunxi-mmc 1c12000.mmc: allocated mm
  15. on my board I have not set the USB_DRV GPIO for any USB, they are always ON (enable pin of sy6280 pull up to 5V). Also ID_detect is not connected either as I'm not using OTG. So none of these are connected : &reg_usb0_vbus { gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>; &usbphy { usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */ usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */ Not sure if they should be removed from the DTS? Also are you sur