**** BEGIN LOGGING AT Thu Jan 18 03:00:02 2018 Jan 18 11:57:52 does anyone run a recent linux kernel on am335x w/ operational cpufreq? Jan 18 11:59:13 i don't even see the cpufreq sysfs node on beagleboard's 4.14.13 and stuck at 300MHz (according to bogomips), even though the support is in .config and the voltage-frequency table is in dt Jan 18 12:01:59 bogomips is bogo Jan 18 12:02:15 http://bpaste.net/show/38a2688e5108 dmesg Jan 18 12:02:49 tbr: sure, but it suggests i'm not at 1GHz and everything is slow generally Jan 18 12:03:01 no it doesn't suggest ANYTHING Jan 18 12:03:13 the value is and has been worthless for ages Jan 18 12:03:37 check sysfs, that should have actual information Jan 18 12:03:56 I'm at work so don't have access to any BBB right now. Jan 18 12:05:40 no idea where i can find this info w/o cpufreq Jan 18 12:34:36 L29Ah: btw, do you power over USB or barrel connector? Jan 18 12:35:00 USB limits CPU frequency to IIRC 800MHz or even less due to power budget Jan 18 12:35:13 barrel one Jan 18 12:39:26 is that a TI or a bone kernel? Jan 18 12:41:16 https://github.com/beagleboard/linux, 4.14-rt branch Jan 18 12:46:10 you compiled it yourself instead of using a prebuilt kernel? Jan 18 12:47:05 isn't bogomips measured during very very early boot, way before cpufreq is even operational? Jan 18 12:48:13 yes and it's a rather arcane "measurement" without real comparability to anything, hence bogo as in bogus. Jan 18 12:48:42 it does seem to be approximately 1 GHz on beaglebones here Jan 18 12:49:04 but you are of course right that it is absolutely not required to be an indication of the cpu clock frequency :) Jan 18 12:49:08 also, TI kernel, who knows what they do regarding CPU frequency Jan 18 12:49:32 yes Jan 18 12:49:42 do you suggest using the upstream kernel? Jan 18 12:49:55 tbr: regardless, he doesn't have cpufreq, so the kernel isn't touching the clock speed Jan 18 12:50:15 I'd suggest to use the 'bone' kernel, that's a lightly patched vanilla Jan 18 12:50:30 there's a script to install/change kernels Jan 18 12:50:54 L29Ah: silly question maybe, but you're sure it's a real beaglebone black? Jan 18 12:51:03 and not some weird chinese clone Jan 18 12:51:35 i'm sure it's a weird chinese clone Jan 18 12:52:08 can you read the part code on the processor? (starting with AM335) Jan 18 12:52:36 am3358, as i've said Jan 18 12:52:41 full part code Jan 18 12:52:43 oh, i didn't Jan 18 12:53:11 am3358bzcz100 Jan 18 12:53:16 hmm Jan 18 12:53:47 have you tried a standard prebuilt image for the beaglebone? Jan 18 12:54:11 no Jan 18 12:54:39 https://debian.beagleboard.org/images/bone-debian-9.2-iot-armhf-2017-10-10-4gb.img.xz this one? Jan 18 12:54:50 https://beagleboard.org/latest-images Jan 18 12:54:58 grab the latest stretch iot image from there Jan 18 12:55:12 yeah Jan 18 12:55:18 that one Jan 18 12:55:37 i hope it won't get upset if i only grab the kernel Jan 18 12:55:55 ehm, I don't think the kernel is the issue here Jan 18 12:56:52 initial configuration of cpu frequency is done by u-boot Jan 18 12:57:10 i see, thx Jan 18 12:58:24 Does anyone know how to install Wilink 8 on BeagleBone Green Wireless? Jan 18 12:58:46 L29Ah: when booting from sd card, make sure to bypass the bootloader on eMMC by either 1. powering up while holding down the S2 button (you can let go of the S2 button once the leds turn on), or 2. wipe eMMC if you don't care about its contents Jan 18 12:59:38 according to the uart, i get straight to my freshly built 2016.07 u-boot Jan 18 12:59:51 wow that's ancient Jan 18 13:00:16 master won't get to the console for some unknown reason so i jumped back Jan 18 13:00:18 have you tried it with a prebuilt u-boot ? Jan 18 13:00:27 no Jan 18 13:01:03 https://rcn-ee.com/repos/bootloader/am335x_boneblack/ Jan 18 13:01:18 v2018.01-r10 is the latest Jan 18 13:01:57 of course, that's why I suggested testing the standard image, since then you have a standard bootloader and standard kernel Jan 18 13:02:35 and then you can start replacing things by custom builds if you have a need for it Jan 18 13:03:01 what are the least flaky microsd cards these days btw? Jan 18 13:03:43 but right now neither your hardware, your bootloader, nor your kernel is "known good" ... which is not exactly ideal for figuring out the cause of issues Jan 18 13:08:40 btw, if you want to reproduce the kernels built by robert nelson for the beaglebone's standard images, easiest is to use one of these repositories: Jan 18 13:08:54 https://github.com/RobertCNelson/ti-linux-kernel-dev for -ti kernels Jan 18 13:08:57 https://github.com/RobertCNelson/bb-kernel for -bone kernels Jan 18 13:09:06 select appropriate branch for the series you want Jan 18 13:09:25 copy system.sh.sample to system.sh and adjust contents to taste Jan 18 13:10:40 then run ./build_deb.sh if you want a debian package or ./build_kernel.sh for a tar.gz Jan 18 14:58:26 Hello everyone Jan 18 15:01:17 i am CTO of a information company Jan 18 15:01:35 and we have a project that is running on beaglebone black Jan 18 15:01:55 can we sell this product commercially? Jan 18 15:02:23 we have not an extra component on beaglebone Jan 18 15:03:08 only our software is running Jan 18 15:04:16 hey there! Jan 18 15:04:24 anyone here? Jan 18 15:04:43 hey Jan 18 15:05:17 are u there? Jan 18 15:07:25 'e's not gointa hafdat title much longa, u betcha Jan 18 15:13:40 he forgot to mention blockchain Jan 18 15:28:25 Why would anyone buy it from you when they could buy one off digikey or wherever and just put your software on it / clone the image Jan 18 15:28:34 You should be licensing the software, in my opinion Jan 18 15:29:38 ok u-boot from bone hangs and reboots after a while just like the built upstream one Jan 18 15:30:07 do i get it right that the soc needs to talk to pmic to be able to adjust vcore for the sake of frequency scaling? Jan 18 15:49:00 L29Ah: so I guess that board isn't actually even compatible with the beaglebone black Jan 18 15:51:15 and yes before switching from 500 MHz (the default configured by boot ROM) to 1 GHz it needs to request the pmic (via i2c) to raise the mpu supply Jan 18 15:51:22 yes it has a different pmic at least :/ Jan 18 15:52:28 oh, which? Jan 18 15:52:45 TPS65910 Jan 18 15:53:20 http://www.marsboard.com/marsboard_am335x_feature.html this thing Jan 18 15:53:52 and the kernel config they provide is named "beaglebone" and doesn't even correspond to the pmic Jan 18 15:54:13 [ 0.000000] OF: fdt: Machine model: TI AM335x BeagleBone Black Jan 18 15:54:17 that's a blatant lie too :P Jan 18 15:54:50 anyway, custom board means you'll need, at a minimum, a custom u-boot and a custom device tree Jan 18 15:55:00 yeah Jan 18 15:55:02 at least i have the schematics Jan 18 15:57:05 does it at least have a board identification eeprom? (containing some form of identification that's distinct from those used by existing am335x boards) Jan 18 15:58:59 since then you can probably submit the DT and relevant u-boot additions to rcn to get this board supported in standard beaglebone images Jan 18 16:00:18 there's some at24 chip on the board Jan 18 16:00:20 so why a TPS65910 instead of the TPS65217 ? Jan 18 16:00:28 dunno Jan 18 16:00:34 and what's your motivation for getting this board working? Jan 18 16:01:24 i want a board w/ am3358 and grabbed the one i could find quickly locally Jan 18 16:03:26 i guess if i'm to spend over a couple of days to support it, i'd better order a bbb Jan 18 16:04:13 and of course they didn't bother sending their DT and u-boot patches upstream Jan 18 16:05:22 lemme take a quick look at the schematic Jan 18 16:05:40 https://www.waveshare.com/w/upload/6/61/CM-AM335X_v2.0.pdf Jan 18 16:05:51 already got it from their site Jan 18 16:06:38 so, you had a running system, presumably based on their u-boot and kernel? Jan 18 16:08:13 i have a running system on their u-boot and kernel that has cpufreq that doesn't do anything useful; i've built my own u-boot and kernel using bbb defconfigs (had to remove the pmic support from the kernel though to make it boot) that works Jan 18 16:08:44 without cpufreq Jan 18 16:09:13 and any pmic communication altogether, but ethernet and mmc works fine Jan 18 16:09:38 wait, you have a bbb u-boot working at all on this thing? Jan 18 16:09:42 what does it output during boot? Jan 18 16:09:50 yes, the old one Jan 18 16:10:28 http://bpaste.net/show/eacb19ed67f6 Jan 18 16:11:44 interesting, I guess either the board init does really doesn't do even the slightest bit of error checking Jan 18 16:12:02 am335x_boneblack_config Jan 18 16:12:42 or it does but just prints some warnings (prior to the console being available) and proceeds in some fallback config Jan 18 16:12:49 that would also explain the 300 MHz Jan 18 16:12:53 sort of Jan 18 16:14:31 still, I'm amazed you got it to work basically without pmic support in u-boot or kernel Jan 18 16:15:35 oh i've missed the spl output when copy-pasting: http://bpaste.net/show/7deb1c3402fd Jan 18 16:15:57 yeah still nothing remarkable Jan 18 16:16:21 so, but then there must be a board id eeprom with something sane content Jan 18 16:17:15 try head -c 64 /sys/bus/nvmem/devices/0-00500/nvmem | hexdump -C Jan 18 16:21:43 btw I'd recommend against leaving this board connected to power after shutting down via software (once the pmic has been properly declared) Jan 18 16:24:36 http://bpaste.net/show/7b45f79e06b5 Jan 18 16:25:10 oh boy, their power supply tree looks like there's a decent chance that the vdd_3v3b will remain supplied after board shutdown, which is not going to be healthy for the am335x Jan 18 16:26:05 wtf they claim to be an actual beaglebone black Jan 18 16:26:26 albeit with a board revision number that isn't used for the bbb Jan 18 16:26:54 still, this is bogus as hell given that they use a different pmic Jan 18 16:29:09 but, it does seem that most of the board is identical to a bbb, so it should be pretty easy to get this thing supported Jan 18 16:33:15 * n8vi runs into another PRU issue Jan 18 16:34:24 So, I didn't realize there is an "IoT" and a "LXQT" image on the beagleboard.org site, and that since our project needs a GUI, we need the LXQT version. And that apparently the LXQT version is a different version of debian. Jan 18 16:34:44 So, the PRU works great with the IoT version, but not the LXQT version. Jan 18 16:34:49 the one at latest-images is a bit dated I think Jan 18 16:34:53 grab the one from the wiki Jan 18 16:34:54 I get "prussdrv_open(PRU_EVTOUT_0) failed ( == -1) Jan 18 16:34:55 " Jan 18 16:35:29 https://elinux.org/Beagleboard:BeagleBoneBlack_Debian Jan 18 16:36:05 and then grab the stretch-lxqt flasher Jan 18 16:36:36 I will give that a shot. Thanks. Jan 18 16:36:47 btw, "since our project needs a GUI, we need the LXQT version" ... that isn't actually true of course :P Jan 18 16:37:04 needing a GUI for a project != needing a complete desktop environment with tons of crap preinstalled Jan 18 16:38:02 And starting with the IoT version and adding a GUI is another option I'm considering Jan 18 16:38:24 we also have a project that uses a GUI, but that's just a fullscreen Qt5 application (using the linuxfb or eglfs backend, no X11) Jan 18 16:40:25 interesting Jan 18 16:40:41 This is why I'm not the GUI guy lol Jan 18 16:41:25 I'm also definitely not a GUI guy :) I just made the environment working for the gui guy Jan 18 16:48:11 Well, this project predates me and I have a little hesitation about learning more about its dependancies :) Jan 18 16:49:52 L29Ah: so, the short summary for supporting this board would be: Jan 18 16:50:42 L29Ah: 1. add a detection for it in u-boot. it already has a bunch of tests for boards that claim to be a beaglebone black (board_is_bone_lt()) but actually aren't: https://github.com/dutchanddutch/u-boot/blob/am335x-v2017.11+overlays/board/ti/am335x/board.h#L63-L91 Jan 18 16:51:46 in your case by testing on the revision being "00A5", which is not a valid beaglebone black revision according to https://github.com/beagleboard/image-builder#eeprom-database Jan 18 16:53:04 then in board.c add the necessary tests for it in the pmic initialization code Jan 18 16:53:31 note that board.c already contains tps65910 init code, since the AM335x EVM uses one Jan 18 16:55:29 i.e. here you want to call scale_vcores_generic() instead of scale_vcores_bone() for this board: https://github.com/dutchanddutch/u-boot/blob/am335x-v2017.11+overlays/board/ti/am335x/board.c#L901-L912 Jan 18 16:57:23 and then you'll need to hunt around a bit to see how the board identification is passed along and used to select the device tree to use Jan 18 16:57:41 what's dutchanddutch? is this a wip u-boot repo for am335x? Jan 18 16:58:18 that's just our u-boot repo... rcn has a repo with u-boot patches, but not a repo with the patched u-boot as far as I noticed Jan 18 16:58:48 this branch is just mainline v2017.11 with rcn's patches applied Jan 18 17:00:50 do i even need to modify u-boot as the linux kernel should be talking to pmic by itself and boots ok in my case? Jan 18 17:01:22 u-boot does the initial pmic initialization Jan 18 17:03:36 hmm, I do wonder what goes wrong exactly when using current u-boot on this board, since it looks like it should just skip voltage/frequency setup when the pmic isn't detected: https://github.com/dutchanddutch/u-boot/blob/am335x-v2017.11+overlays/board/ti/am335x/board.c#L771-L772 Jan 18 17:07:34 I think I may have tried this version and it gave me a bunch of errors when I tried to use pin-config. I'll try it again though to be sure. Jan 18 17:20:27 L29Ah: oh btw, should you have a desire to directly query the cpu frequency (without requiring any cpufreq support from the kernel), here's how to compile a tiny program to do just that: https://pastebin.com/raw/hAK8XLm1 Jan 18 17:21:25 (I'm just borrowing the jbang project there for its makefile, headers, and support code) Jan 18 17:21:39 k booted a fixed u-boot Jan 18 17:22:26 yay 995 bogomips Jan 18 17:25:42 should i send the patch directly to rcn? Jan 18 17:28:04 i see that many suppliers do not have "classic" bbb revC in stock right now. i wonder what is the cause of such shortage Jan 18 17:34:01 L29Ah: that sounds like a good idea, together with a link to the site and a dump of the board id eeprom Jan 18 17:36:33 hey all Jan 18 17:36:56 is there any python library that i can incorporate into my code to use the peripherals on the beagle bone bliue Jan 18 17:39:00 Any peripherals in particular? Jan 18 17:42:17 pwm drivers Jan 18 17:42:19 imu Jan 18 17:43:19 have you tried the adafruit BBIO libs? Jan 18 17:47:25 i have not Jan 18 17:47:53 and https://github.com/dmh2000/bbb-imu is what I found for the IMU Jan 18 17:48:31 heh Jan 18 17:48:34 "Important : IMU's are complicated and require significant math skills to use properly." Jan 18 17:48:52 also "This project was for my personal interest, and if you want a more complete solution that covers much more about the imu and the rest of the board, you should look at https://github.com/StrawsonDesign/Robotics_Cape_Installer" Jan 18 17:55:00 Okay, zmatt, I'm getting closer, but now I get this: Jan 18 17:55:01 # config-pin -q P9_25 Jan 18 17:55:01 P9_25 pinmux file not found! Jan 18 17:55:02 Cannot read pinmux file: /sys/devices/platform/ocp/ocp*P9_25_pinmux/state Jan 18 17:55:26 Jan 18 17:57:23 can you check the output of show-pins for P9.25 ? Jan 18 17:57:56 (see https://github.com/mvduin/bbb-pin-utils if you don't have it already) Jan 18 17:58:04 grabbing that now Jan 18 17:59:08 # ./show-pins | grep P9.25 Jan 18 17:59:08 P9.25 / audio osc 107 fast rx up 0 asp 0 tx hclk mcasp@48038000 (mcasp0_pins) Jan 18 17:59:32 Okay, I assume that means I need to disable audio in uEnv.txt Jan 18 17:59:39 :) Jan 18 18:00:44 What a handy utility that is Jan 18 18:00:56 thanks Jan 18 18:01:03 is it yours? Jan 18 18:01:06 yup Jan 18 18:01:11 nice work Jan 18 18:01:55 yay! Jan 18 18:02:01 looks like it's working Jan 18 18:02:30 Can't test with a logic analyser right now, but config-pin is not throwing errors anymore. Jan 18 18:02:33 thanks again Jan 18 18:05:06 np Jan 18 18:38:20 oh, nope, that isn't working Jan 18 18:38:28 still getting "prussdrv_open(PRU_EVTOUT_0) failed ( == -1) Jan 18 18:38:29 " Jan 18 18:39:41 I have "uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo" in uEnv.txt Jan 18 19:03:45 Loaded -bone kernel, issue no longer persists Jan 18 19:04:39 once again with your help, zmatt, from an old irc conversation with someone else found through google lol Jan 18 21:08:34 n8vi: that suggests u-boot overlays aren't working Jan 18 21:09:42 rcn's -ti kernels support both remoteproc-pru and uio-pruss, but switching between them was a bit problematic until the introduction of u-boot overlays Jan 18 21:18:56 so, the default for -ti kernels has fluctuated a bit iirc, but eventually it just gravitated towards remoteproc-pru Jan 18 21:19:28 -bone kernels only support uio-pruss, hence this is also enabled by them by default Jan 18 21:20:47 so, if you have to install a -bone kernel to get uio working, that means u-boot overlays are not functioning and the "uboot_overlay_pru=..." setting in /boot/uEnv.txt is being ignored **** ENDING LOGGING AT Fri Jan 19 03:00:00 2018