martinayotte

  • Posts

    3891
  • Joined

  • Last visited

Everything posted by martinayotte

  1. I got those errors while playing with 4.5.0-rc6+. USB needs "twin-resets", both EHCI and OHCI. I had to patch the kernel with those patches from Hans : https://github.com/jwrdegoede/linux-sunxi/commit/0c28f012ac570a1a301503cee21734954495ab3b https://github.com/jwrdegoede/linux-sunxi/commit/22da4ea5fd499a77d44ed6ed013671963b7e5138 https://github.com/jwrdegoede/linux-sunxi/commit/bce1da6ba9eac77109099b8026128b5e1c44480a
  2. Do you mean with 4.4.x ? While doing some tests on my Olimex-Micro-A20, I've discovered that it was required there too. Maybe you had older version. This "spidev_dt_ids" list has been added in Mainline around November, I think. Before that, it wasn't required.
  3. For making SPI working, not only DTS need to be patched, but also the SPIdev driver itself to become HW SPI friendly. --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -695,6 +695,7 @@ static struct class *spidev_class; static const struct of_device_id spidev_dt_ids[] = { { .compatible = "rohm,dh2228fv" }, { .compatible = "lineartechnology,ltc2488" }, + { .compatible = "allwinner,sun4i-a10-spi" }, + { .compatible = "allwinner,sun6i-a31-spi" }, {}, }; MODULE_DEVICE_TABLE(of, spidev_dt_ids); Here is in attachment my updated patches ... BTW, to be able to submit those patches to Mainline in a near future, I had to do the same exercise directly on 4.5.0-rc6+, which I finally succeeded yesterday. (I still other issues with this 4.5.0-rc6+, but not related to my patches themselves) EDIT : The 4.5.0 has been released last Sunday, so I guess I will need to merge it again in the new 4.6.0-rcX branch ... ;-) orangepipc-patches.zip
  4. (quoting my self ...) While doing some tests on SPI from Python scripts, I figure out that there were bugs in orangepi_PC_gpio_pyH3-master, I've found them and fix them ! Since orangepi_PC_gpio_pyH3-master come from Olimex pyA20, I've decided to look there too, updating my Olimex A20-Micro, rebuild Armbian image, checking SPIs ... Same bugs, but also same issue of no SPI well defined in DTS for sun7i-a20-olinuxino-micro.dts ! I've some DTS edit, I hope to be able to prepare a patch for that too ..
  5. Unfortunately, my personal applications doesn't requires any needs from GPU, so I'm not the good guy to answer any thing here ...
  6. I've ran armbianmonitor on few USB storage devices ... One USB flash dongle : http://sprunge.us/gLYi Some External USB HDDs : http://sprunge.us/GFSF http://sprunge.us/QCSU http://sprunge.us/VGdI
  7. Here are the patches I've prepared for getting I2C and SPI on OrangePiPC under 4.4.4. BTW, Tkaiser, I wouldn't been able to add the last I2C (TWI_R where the PMIC is attached) because lack of PL* pins in the current H3 pinctrl. I would'nt like start new task for that since the mainline guys already working to have another H3 R_PinCtrl : https://lkml.org/lkml/2016/2/1/150 orangepipc-patches.zip
  8. BTW, Thanks, Tkaiser ! I've finally got the SPI working after whole day of work, I've faced several issues, one of them was related to http://www.spinics.net/lists/linux-spi/msg03301.html where Mainline guys don't wish that SPIDEV been part of the DT. So, now I will have to work on the tasks of creating a patch for Armbian containing all DTS fixes but also small addition to driver/spi/spidev.c (BTW, I've finally received my Opi-One this afternoon, but didn't got chance to try it out yet)
  9. Just to let you know : I've finally got I2C working under 4.4.4 !!! Several days of work, adding traces into kernel driver, to let me figure out that everything was related to <&bus_res> register. I will now try to get SPI working, and cleanup the sun8i-h3.dtsi to produce a patch. This patch probably needs to be submit to Mainline guys.
  10. Yes, that was my intention, but unfortunately, it doesn't seem to be an easy task. I will try to dig further ...
  11. About the build process, I've noticed that /tmp folder of my workstation is always becoming RO for other groups/users, so after "sudo ./compile.sh" finished, I always need to do a "sudo chmod a+rw /tmp"
  12. BTW, since talking about I2C, since my previous attempt to get it working on Mainline 4.4.1 several weeks ago, I've tried several thing on the newer 4.4.3 these recent days. I'm kind of newbie with DTS, I've tried many things assuming that I2C on H3 is supposed to be the same as A23/A31/A58 ... Am I right ? I didn't get any success and dmesg didn't provide me much details yet. If I can get I2C and SPI working fine under 4.4.3, I would be glad to switch to it forever and drop 3.4.110.
  13. Good ! Glad to see this post ! As TKaiser said very often, this kind of post merits to be transformed to some kind of Tutorial in the forum ... I've could then contribute by posting my MCP3017 python code.
  14. I don't think that you need to install SPI-Py Library, since the orangepi_PC_gpio_pyH3 Library has already a SPI interface.
  15. Regarding PMIC, there is maybe some patch for Mainline that are coming : https://lkml.org/lkml/2015/2/24/207 (I found that while searching for plain I2C patches)
  16. "Time" is always the "missing ingredient" ... But at least, there is some existing documentation, although a bit outdated : http://linux-sunxi.org/I2Cdev Maybe I will try to get chance to contribute in this page by adding some testing python code for controlling a GPIO expander such MCP23017. EDIT : For SPI, there is a simlar page : http://linux-sunxi.org/SPIdev EDIT2 : I've ran successfully this quick SPI test : https://raw.githubusercontent.com/loboris/OrangePI-Kernel/master/linux-3.4/Documentation/spi/spidev_test.c
  17. I've already done some I2C tests on port TWI1, and it is working fine. I was using python library orangepi_PC_gpio_pyH3-master. I will try the same on TWI0 when I get the chance. About SY8106, I've look at the schematic and it seems to be hook up on another port, the PL00 and PL01 pins, which seems to be defined in FEX as follow : [s_rsb0] s_rsb_used = 1 s_rsb_sck = port:PL00<2><1><2><default> s_rsb_sda = port:PL01<2><1><2><default> But I don't know how to access them. Is RSB other kind of Kernel driver ? Maybe we need to copy/paste an existing TWI and tweak it to use those 2 pins, I'm really not a FEX expert ... SPI ? I've never tried it under Linux, but I will do, but need to learn about it first, although I know SPI under smaller MCU such STM32. I've several devices to try such SPI Flash or LCD. EDIT : TWI0 is also working fine. EDIT2 : doing some search about RSB, I've found that means "Reduced Serial Bus", and there are commits about it in linux-vanilla/v4.4.1/drivers/bus/sunxi-rsb.c, but nothing in legacy 3.4. I've also seen some posts/commits in Mainline about "drivers/i2c/busses/i2c-sunxi-rsb.c"
  18. What was it ? (Since in my case the issue disappeared, is it simply because I'm using your latest FEX ?)
  19. Oh ! that is strange ... I didn't received my OPi-One yet, but seeing your discovery, I feel sad. Fortunately, I've only purchased one, and still love my 4 OPi-PC.
  20. Yes, that was a 'default gateway' issue. Fixed by now ... For the FEX diff requires for TW1, here it is : 150c150 < twi_used = 0 --- > twi_used = 1 239,240d238 < gpio_pin_20 = port:PA19<1><default><default><0> < gpio_pin_21 = port:PA18<1><default><default><0>
  21. Oh ! I've found a very strange bug ! With this 5.0.3 image, I had to first use wired networking, to be able to setup things. I added an RTL8188 on USB, it was working fine too, until I unplug the wired RJ45, the WiFi SSH freezed. Plugin the wired network, it works again, without any change, simply reissue the SSH command. So, it is really weird, it is like if eth0 is not working and running, no other network can works. I've never saw that, and all my other OPi-PC are running fine with only RTL8188 on them along with Loboris image.
  22. I've tested I2C, one of my OPi-PC had already a MCP23017 plugged on TWI1. At first, it didn't work, but I figured out that simply the TWI1 wasn't set as "use = 1" in the FEX and also had to remove PA18/PA19 from GPIO pins list.
  23. Hi TKaiser, I found the GPIO issue just few seconds ago, while reading your previous post saying that "1-Wire? Pin 37 on the connector when using Orange Pi" The OneWire driver was preload in Igor's image, and it was fighting with the python gpio_lib doing mem-map. I've simply removed the OneWire modules for now. Next, I will start testing I2C. About the "reboot" issue, I don't know, since I've used Igor's 5.0.3 image instead of building it myself this time to be up-and-running quickly. Even during the "firstrun" phases, I had to wait more than the famous "3 mins" and power-recycle to do the reboot.
  24. Hi folks, I've start playing with the 5.0.3 on OPi-PC, at first look, I discovered that "reboot" still not working. I will continue to play with it to figured out if anything else needs to be reported. EDIT : I've tested orangepi_PC_gpio_pyH3-master that I used on other OPi-PC with Loboris, the GPIOs can be flashed but it stop flashing after few blinks, without any crash. Simply restarting the python script again, and it flash again, but only for few blinks.
  25. Hi Igor, Hi TKaiser, Seeing those progress and commits, I've decided to jump into the bandwagon ! :-) I've compiled an image using Armbian-4.4.1 for OrangePi-PC, write it to a microsd and try it out. It boot properly, although boot is not very verbose, I presume it is on purpose. I decided next to get some networking using RTL8188 dongle : it wasn't seen in lsusb at first, I've connected it to vertical USB, but placing into the dual one, it worked ! I've then look at the GPIO using orangepi_PC_gpio_pyH3-master, it work too ! But for I2C bus, none are detected, so maybe there is something to tweak in the kernel configs, I will digg more ... BTW, I wasn't able to verify the clock speed, it is not in /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq anymore. Where should I look ? (in the dmesg log, I can see "cpu cpu0: failed to get cpu0 clock: -2") Thanks for all your work, EDIT : For I2C, I've compared kernel configs with my previous Loboris's build, and they look Ok, so it is maybe a bug ... :-(