**** BEGIN LOGGING AT Tue Aug 02 02:59:57 2016 Aug 02 03:05:44 * vagrantc would be interested in at least trying the watchdog daemon reset Aug 02 03:05:59 zmatt: i'm not sure how sophisticated the watdog on the switch is ... Aug 02 03:06:22 http://www.digital-loggers.com/lpc.html Aug 02 03:40:58 oh I assumed you meant you had something easily software-controllable Aug 02 03:41:17 with "watchdog" I just meant a 10-line perl script or something Aug 02 03:42:39 actually, it includes such functionality: "auto-ping" Aug 02 03:43:14 sorry, Auto-Ping™ Aug 02 03:44:08 assuming at least that if it gives up it leaves the device in powered off state Aug 02 03:44:32 their description isn't immediately clear on that Aug 02 03:46:35 hah, and they have example code for controlling the power switch via.... perl :D Aug 02 03:47:23 (which just uses LWP to poke the web interface) Aug 02 03:48:00 not even json or whatever, they just grep bits and chunks out of the HTML Aug 02 11:22:16 HI Aug 02 11:22:31 hey there? Aug 02 14:36:04 I'm having problems with serial on the BBGw. It used to work, but now I can't get it work anymore. Aug 02 14:36:16 I'm trying both pyserial and mraa Aug 02 14:37:11 I'm trying to use ttyS5 on pin P8_37 and P8_38 Aug 02 14:37:55 dmesg is showing that ttyS5 is mapped to MMIO Aug 02 14:44:11 How should I go about debugging this further? Aug 02 14:51:08 beatz: have you tried a generic terminal software and a loopback test? Aug 02 14:54:08 Oops sorry, just figured it out. I was missing config-pin Aug 02 14:54:45 Altough, I didn't have to use that the last time it worked. Aug 02 15:02:25 probably you used an overlay instead Aug 02 18:08:01 ping Aug 02 18:08:11 is there anybody here? Aug 02 18:59:17 oh wow, lol, they're actually working on a (supposedly) *decent* userspace gpio API Aug 02 18:59:32 this is what they managed to produce so far -> http://lxr.free-electrons.com/source/include/uapi/linux/gpio.h Aug 02 19:00:33 (since the first patch was accepted Oct 2015) Aug 02 20:03:29 elho Aug 02 20:10:54 hi all, still struggling with enabling spi0 using buildroot-generated images (debian works out of the box). I gave a go at modifyng the main dts file without success and now switched to using overlays (courtesy of a couple of patch suggested on the buildroot channel) Aug 02 20:12:13 got to the point where /lib/firmware is populated with lotsh of dtbo files and "echo BB-SPIDEV0 > /sys/devices/platform/bone_capemgr/slots" seems to work Aug 02 20:12:44 "cat /sys/devices/platform/bone_capemgr/slots" gives me "4: P-O-L- 0 Override Board Name,00A0,Override Manuf,BB-SPIDEV0" Aug 02 20:13:16 too bad /dev/spidev1.{0,1} do not appear Aug 02 20:13:43 I've tried both with kernel 4.1.18 and 4.413 Aug 02 20:14:04 what issue did you have with modifying the main dts? Aug 02 20:14:31 zmatt: the device did not appear in /dev Aug 02 20:15:07 also, if you're trying to enable spi0, why are you expecting /dev/spidev1.* to show up? Aug 02 20:15:09 note that I'm rather new to all this stuff, so I guess I'm doing something utterly wrong Aug 02 20:16:13 zmatt: with debian, I get "/dev/spidev1.0" and "/dev/spidev1.1". Anyway I see no /dev/spidev* Aug 02 20:19:33 actually spidev numbering is not guaranteed in mainline linux with the mcspi driver Aug 02 20:19:52 though fixing this turned out to be.... not very hard: Aug 02 20:19:53 https://github.com/dutchanddutch/bb-kernel/blob/am33x-v4.7/patches/fixes/0001-spi-omap2-mcspi-leave-bus_num-allocation-to-spi-core.patch Aug 02 20:21:28 with that patch, assuming you have entries in /aliases in your DT for spi devices, spi0 will be spi0 and spi1 will be spi1 Aug 02 20:21:39 which is nice for one's sanity Aug 02 20:22:14 zmatt: I see. IIRC, debian uses linux 3.8.13 Aug 02 20:22:20 ages ago Aug 02 20:23:07 zmatt: I also tried to modprobe spidev : don't know if it is relevant, buth nothing changed anyway Aug 02 20:23:28 modprobe should never be required, modules will be automatically loaded Aug 02 20:23:54 if the kernel didn't load it, it saw no use for it hence will still see no use for it if you modprobe it manually Aug 02 20:24:13 which kernel tree are you using? Aug 02 20:25:35 zmatt: https://github.com/beagleboard/linux.git Aug 02 20:26:26 zmatt: tried 4.1.13-ti-r36 and 4.4 Aug 02 20:29:15 k... Aug 02 20:33:36 https://github.com/mvduin/overlay-utils I made some utils that easy the process of making overlays, maybe that might help Aug 02 20:34:11 it has an example for spi1 but it shouldn't be hard to adapt to spi0 Aug 02 20:35:12 zmatt: thank you sir! Aug 02 20:36:35 saved you the effort, I just pushed an spi0.dtsi Aug 02 20:36:44 zmatt: cheer! Aug 02 20:37:30 you should be able to make spi0.dtbo && bin/add-overlay spi0.dtbo Aug 02 20:37:55 if that works, transplanting the content of that spi0.dtsi to your main overlay should work as well Aug 02 20:38:13 I personally never use overlays myself really Aug 02 20:39:02 the 'show-pins' util from https://github.com/mvduin/bbb-pin-utils may also be useful Aug 02 20:39:12 zmatt: I started without overlays: I don't really need them, but I got nowhere with the main dts. so I tried the other routher without getting anywhere.... Aug 02 20:39:12 it shows e.g. which pins are claimed by what for what purpose Aug 02 20:39:30 so I need perl on the target Aug 02 20:40:03 eh, well, if you want to run show-pins, yes Aug 02 20:40:38 zmatt: all the utils inside bin are perl script Aug 02 20:40:52 oh you mean the overlay utils? Aug 02 20:41:00 oh yes, sorry Aug 02 20:41:21 ehm, well you can compile it on any machine with dtc, and then insert the overlay manually instead of using my utils Aug 02 20:41:26 they're just provided for convenience Aug 02 20:42:51 and perl is something that I kinda expect to be available... e.g. for debian perl (specifically perl-base) is a required package Aug 02 20:44:11 of course you only need this stuff during development, not a final release image Aug 02 20:44:50 zmatt: I should be able to include perl in my buildroot build Aug 02 20:45:36 zmatt: would you suggest any particular check on my bbb before I start that route? Aug 02 20:46:49 I'm assuming you checked kernel log for relevant errors? Aug 02 20:49:17 also check /sys/class/spi_master/ Aug 02 20:49:42 to see if the problem is with the spi devices or the whole spi controller Aug 02 20:50:55 /sys/class/spi_master/ exists and is empty Aug 02 20:51:11 I can't see anything wrong in dmesg Aug 02 20:53:15 check the contents of /proc/device-tree/ocp/spi@48030000 (at least I think I got that path right) Aug 02 20:53:28 especially its "status" property Aug 02 20:54:00 wait never mind, that's not updated by overlays Aug 02 20:54:35 what does your overlay look like currently? Aug 02 20:54:50 zmatt: status is "okay" Aug 02 20:55:01 eh, that's interesting Aug 02 20:55:54 whereas /proc/device-tree/ocp/spi@481a0000/status is "disabled" Aug 02 20:56:16 that's spi1 Aug 02 20:56:44 which main dts are you using? Aug 02 20:57:51 zmatt: here's the overlay http://pastebin.com/ZCFjXqXc Aug 02 20:59:11 I think the main dts is "linux-4.1.13-ti-r36/arch/arm/boot/dts/am335x-boneblack.dts" Aug 02 20:59:39 compatible = "mcp3008"; ?? Aug 02 20:59:42 I tried "am335x-boneblack-spi0.dts" in place of that with no success Aug 02 21:00:47 I get no results if I grep -r mcp3008 drivers/spi Aug 02 21:00:51 in the linux tree Aug 02 21:02:15 zmatt: I can't see "compatible = "mcp3008";" : where did you see it? Aug 02 21:02:36 line 63 Aug 02 21:02:42 of your overlay Aug 02 21:03:43 zmatt: I think I've pasted the wrong one: sorry for the noise Aug 02 21:06:07 zmatt: http://pastebin.com/VyxCDeaY Aug 02 21:06:25 I just realized btw that the spi examples in my overlay-utils just enable the spi controller, it would still be necessary to declare a device on them Aug 02 21:07:00 zmatt: is "BB-SPIDEV0-00A0.dts" which I assume is the one invoked with "echo BB-SPIDEV0 > /sys/devices/platform/bone_capemgr/slots" Aug 02 21:07:27 why is it declaring two devices when it has only one chip select Aug 02 21:08:15 zmatt: no idea. I can't even read it... Aug 02 21:12:45 overlays are indeed even more annoying to read (let alone write) than device tree fragments in general Aug 02 21:12:53 which is why I made my overlay-utils :) Aug 02 21:13:20 I just pushed an update which includes an example device connected to spi0 cs0 Aug 02 21:13:55 I gotto go now though Aug 02 21:14:04 zmatt: thanx alot for your help! **** ENDING LOGGING AT Wed Aug 03 02:59:58 2016