Page MenuHomeFreeBSD

bobf_mrp3.com (Bob Frazier)
Engineering

Projects

User does not belong to any projects.

User Details

User Since
Apr 10 2018, 5:30 PM (315 w, 1 d)

consulting, software and electronics engineering.
corporation: S.F.T. Inc. (mrp3.com)

Recent Activity

Nov 27 2018

bobf_mrp3.com added a comment to D16088: correct spigen-rpi2.dtso, add spigen-rpi3.dtso.

I forgot to mention, someone suggested modifying everything so that only a single overlay is used for all 3 RPi versions. It would require that the compat strings in the single overlay include all 3 of the driver specs. In the past when I have attempted multiple compat strings, the overlay wouldn't load. It is possible I was doing something else wrong, however. Not sure if this should become a blocking issue or not.

Nov 27 2018, 5:44 AM
bobf_mrp3.com added a comment to D16088: correct spigen-rpi2.dtso, add spigen-rpi3.dtso.

is it too late to commit this to 12?

Nov 27 2018, 5:41 AM

Oct 22 2018

bobf_mrp3.com added inline comments to D17055: gpioc user-space interrupt handling.
Oct 22 2018, 8:36 PM · ARM

Oct 13 2018

bobf_mrp3.com added inline comments to D17055: gpioc user-space interrupt handling.
Oct 13 2018, 9:11 PM · ARM
bobf_mrp3.com added inline comments to D17055: gpioc user-space interrupt handling.
Oct 13 2018, 8:55 PM · ARM

Sep 15 2018

bobf_mrp3.com added inline comments to D17055: gpioc user-space interrupt handling.
Sep 15 2018, 8:44 PM · ARM

Sep 9 2018

bobf_mrp3.com created D17084: doc update for bcm238x_pwm(4) to reflect changes made to driver.
Sep 9 2018, 1:45 AM · ARM

Sep 6 2018

bobf_mrp3.com added inline comments to D17055: gpioc user-space interrupt handling.
Sep 6 2018, 10:33 PM · ARM
bobf_mrp3.com updated the diff for D17055: gpioc user-space interrupt handling.

re-did diff to include all lines

Sep 6 2018, 7:51 PM · ARM
bobf_mrp3.com created D17055: gpioc user-space interrupt handling.
Sep 6 2018, 12:25 PM · ARM
bobf_mrp3.com added inline comments to D17055: gpioc user-space interrupt handling.
Sep 6 2018, 12:25 PM · ARM
bobf_mrp3.com added inline comments to D17055: gpioc user-space interrupt handling.
Sep 6 2018, 12:25 PM · ARM
bobf_mrp3.com added inline comments to D17055: gpioc user-space interrupt handling.
Sep 6 2018, 12:25 PM · ARM
bobf_mrp3.com added inline comments to D17055: gpioc user-space interrupt handling.
Sep 6 2018, 12:25 PM · ARM
bobf_mrp3.com added inline comments to D17055: gpioc user-space interrupt handling.
Sep 6 2018, 12:24 PM · ARM
bobf_mrp3.com added a comment to D17055: gpioc user-space interrupt handling.

applied diff to most recently obtained revision (r338415), added as-is. No build nor startup problems noted.

Sep 6 2018, 12:24 PM · ARM

Jul 1 2018

bobf_mrp3.com updated the test plan for D16088: correct spigen-rpi2.dtso, add spigen-rpi3.dtso.
Jul 1 2018, 10:54 PM
bobf_mrp3.com updated the diff for D16088: correct spigen-rpi2.dtso, add spigen-rpi3.dtso.

cosmetic things, added the Makefile line to build the rpi3 patch

Jul 1 2018, 10:34 PM
bobf_mrp3.com created D16088: correct spigen-rpi2.dtso, add spigen-rpi3.dtso.
Jul 1 2018, 10:25 PM

Jun 23 2018

bobf_mrp3.com added inline comments to D15031: bcm2835_spi.c mod to support mode and clock in ivars from spibus.
Jun 23 2018, 8:10 PM

Jun 22 2018

bobf_mrp3.com added a comment to D15067: spigen overlays for RPI-B, RPI-2 in base (was: possible new port for spigen overlay for Raspberry Pi).

verified working ok in r335524 which includes the name change applied to spigen ( https://reviews.freebsd.org/rS335506 ) on RPi 1 B.

Jun 22 2018, 5:30 PM

Jun 21 2018

bobf_mrp3.com updated the diff for D15029: new utility usr.sbin/spi.

additional things that showed up after the last diff

Jun 21 2018, 10:55 PM
bobf_mrp3.com updated the diff for D15029: new utility usr.sbin/spi.

cleaned up a couple of nitty style-related things. Ian go ahead and edit whatever you see fit for style etc.. Thanks also, because I probably wouldn't know what to do anyway.

Jun 21 2018, 10:36 PM
bobf_mrp3.com updated the diff for D15029: new utility usr.sbin/spi.

made changes to accomodate latest changes to D15301 . Removed reliance on sysctl info (can be added later, as needed).

Jun 21 2018, 9:16 PM
bobf_mrp3.com updated the diff for D15301: alter spigen device name to indicate cs as sub-unit.

need to verify this is correct by booting it up

Jun 21 2018, 8:50 PM
bobf_mrp3.com updated the diff for D15301: alter spigen device name to indicate cs as sub-unit.

applied Ian's comments, added definition for 'options SPIGEN_LEGACY_CDEVNAME' in opt_spi.h . builds, have not tested the bootup (yet). will do that next.

Jun 21 2018, 7:35 PM
bobf_mrp3.com added inline comments to D15301: alter spigen device name to indicate cs as sub-unit.
Jun 21 2018, 6:48 PM
bobf_mrp3.com added reviewers for D15029: new utility usr.sbin/spi: db, ian.
Jun 21 2018, 6:10 PM
bobf_mrp3.com added reviewers for D15031: bcm2835_spi.c mod to support mode and clock in ivars from spibus: db, ian.
Jun 21 2018, 6:09 PM
bobf_mrp3.com added reviewers for D15067: spigen overlays for RPI-B, RPI-2 in base (was: possible new port for spigen overlay for Raspberry Pi): db, ian.
Jun 21 2018, 6:08 PM
bobf_mrp3.com added reviewers for D15301: alter spigen device name to indicate cs as sub-unit: db, ian.
Jun 21 2018, 6:07 PM

Jun 16 2018

bobf_mrp3.com updated the test plan for D15067: spigen overlays for RPI-B, RPI-2 in base (was: possible new port for spigen overlay for Raspberry Pi).
Jun 16 2018, 12:10 AM

Jun 15 2018

bobf_mrp3.com added a comment to D15769: bcm2835_pwm - add sysctl vars and supporting code for channel 2.

gonzo - I added you as a reviewer since you apparently did the last commit to the driver, and because it's related to the RPi audio.

Jun 15 2018, 6:59 PM · ARM
bobf_mrp3.com added a reviewer for D15769: bcm2835_pwm - add sysctl vars and supporting code for channel 2: gonzo.
Jun 15 2018, 6:58 PM · ARM
bobf_mrp3.com added a comment to D15787: support for uart_dev_mu for RPI2, RPI-B.

It looks like there are no pinctrl combinations that can give you simultaneous pl011 and mu serial drivers on the RPi 2. manually tweeking the GPIO pins for the serial console will effectively switch between the two types, but only if you can bring up the 'mu ' driver with it NOT connected to active pins (which appears is not possible; ian suggested that without proper pinctrl support, the driver may constantly interrupt on a 'break' state, which explains what I've seen). However, one of the changes here should be retained since the RPi zero needs the 'mu' driver (it similarly has a bluetooth wired to the pl011 like the RPi 3).

Jun 15 2018, 5:57 PM

Jun 14 2018

bobf_mrp3.com added a comment to D15787: support for uart_dev_mu for RPI2, RPI-B.

apparently the problem is a bit worse that I thought. the stack backtrace for thread 10000 points to line 300 in init_main.c where the code is attempting to print "done" (for verbose kernel bootup) after completing 'configure_final'. This is the point where the console breaks into ddb.

Jun 14 2018, 6:36 PM
bobf_mrp3.com added a comment to D15787: support for uart_dev_mu for RPI2, RPI-B.

added some diagnostics to the uart_mu driver. a quick check shows rapid looping on 'uart_mu_bus_ipend' during startup. Additional test code only spat out a message when 'uart_mu_bus_ipend' would return a non-zero value (which apparently it does not).

Jun 14 2018, 6:15 PM
bobf_mrp3.com added a comment to D15787: support for uart_dev_mu for RPI2, RPI-B.

the overlay file in sys/gnu/dts/arm/bcm283x.dtsi has several clock entries for 'aux' related to uart1:

Jun 14 2018, 6:10 AM
bobf_mrp3.com added a comment to D15067: spigen overlays for RPI-B, RPI-2 in base (was: possible new port for spigen overlay for Raspberry Pi).

whoops - sorry people - I posted that last comment to the wrong Phab (it was for D15787

Jun 14 2018, 6:01 AM
bobf_mrp3.com added a comment to D15067: spigen overlays for RPI-B, RPI-2 in base (was: possible new port for spigen overlay for Raspberry Pi).
Jun 14 2018, 6:00 AM
bobf_mrp3.com added a comment to D15787: support for uart_dev_mu for RPI2, RPI-B.

for reference, this is what ofwdump believes those settings should be:

Jun 14 2018, 5:16 AM
bobf_mrp3.com added a comment to D15787: support for uart_dev_mu for RPI2, RPI-B.

I have not figured out why the kernel hangs (yet). I plan on working on it though. Step 1 will be to doctor up the 'mu' source with a bunch of printf()'s so I can see what it's up to, and at some point I may have to set up a complex remote debug environment for it. It might be as simple as having the wrong interrupt or clock assigned by the pre-defined DTB for the RPI2.

Jun 14 2018, 5:15 AM

Jun 13 2018

bobf_mrp3.com added a reviewer for D15787: support for uart_dev_mu for RPI2, RPI-B: db.
Jun 13 2018, 10:45 AM
bobf_mrp3.com created D15787: support for uart_dev_mu for RPI2, RPI-B.
Jun 13 2018, 10:44 AM

Jun 12 2018

bobf_mrp3.com updated the diff for D15031: bcm2835_spi.c mod to support mode and clock in ivars from spibus.

removed some commented-out code, minor edits

Jun 12 2018, 6:02 AM
bobf_mrp3.com updated the summary of D15067: spigen overlays for RPI-B, RPI-2 in base (was: possible new port for spigen overlay for Raspberry Pi).
Jun 12 2018, 5:39 AM
bobf_mrp3.com created D15769: bcm2835_pwm - add sysctl vars and supporting code for channel 2.
Jun 12 2018, 5:23 AM · ARM
bobf_mrp3.com updated the diff for D15067: spigen overlays for RPI-B, RPI-2 in base (was: possible new port for spigen overlay for Raspberry Pi).

Requires D15301 to work properly, i.e. allows the overlay to create the actual devices in reverse order without affecting the ability to relate the 'spigen' device name to its bus and CS number. The fdt library itself causes this to happen; that is, for an overlay the devices are inserted at the beginning of the section, as they are created, resulting in a kind of reversed sort of how they're specified in the overlay. but relying on the order in which the devices are created is undesirable. That is where D15301 comes in, and now the overlays won't have to specify spigen devices in reverse order.

Jun 12 2018, 4:42 AM

Jun 7 2018

bobf_mrp3.com added a comment to D15684: Add a driver for the BCM2835 Mini-UART.

may need an overlay for RPi 2

Jun 7 2018, 8:40 PM

Jun 4 2018

bobf_mrp3.com added a comment to D15029: new utility usr.sbin/spi.

for RPi it needs support added to the bcm2835_spi driver. See D15031

Jun 4 2018, 8:41 PM
bobf_mrp3.com added a comment to D15031: bcm2835_spi.c mod to support mode and clock in ivars from spibus.

updated a few comments. RPi 1,2 testing has been pretty good on my end. still needs RPi3 testing though.

Jun 4 2018, 8:39 PM
bobf_mrp3.com added inline comments to D15031: bcm2835_spi.c mod to support mode and clock in ivars from spibus.
Jun 4 2018, 8:36 PM

May 18 2018

bobf_mrp3.com added inline comments to D15067: spigen overlays for RPI-B, RPI-2 in base (was: possible new port for spigen overlay for Raspberry Pi).
May 18 2018, 2:57 AM

May 17 2018

bobf_mrp3.com added inline comments to D15029: new utility usr.sbin/spi.
May 17 2018, 8:23 PM
bobf_mrp3.com updated the diff for D15029: new utility usr.sbin/spi.

updated to be compatible with https://reviews.freebsd.org/D15301 changes. canonicalizes device file name so that a symlink can be used. Determines unit number from device file name using the canonicalized device name itself, or a matching 'spigen=' entry in '%location' (see D15301).

May 17 2018, 8:18 PM

May 10 2018

bobf_mrp3.com updated the diff for D15301: alter spigen device name to indicate cs as sub-unit.

update '%location' in spibus sysctl handler to reflect the spibus unit (and for spigen, spigenN.M name) in addition to the cs .

May 10 2018, 11:08 PM
bobf_mrp3.com added a comment to D15301: alter spigen device name to indicate cs as sub-unit.

ian pointed out that uftdi has a '%location' sysctl that contains useful information, including the 'ugen' device alias.
"dev.uftdi.0.%location: bus=7 hubaddr=3 port=2 devaddr=4 interface=0 ugen=ugen7.4"

May 10 2018, 6:47 PM
bobf_mrp3.com added a comment to D15301: alter spigen device name to indicate cs as sub-unit.

jhibbits suggested in IRC: it'd be better to have /dev/spi/X.Y, and have /dev/spigenN be a symlink, like USB is

May 10 2018, 6:42 PM
bobf_mrp3.com updated the diff for D15301: alter spigen device name to indicate cs as sub-unit.

this always creates the 'spigen#' device (based on unit number) as before, but then adds an alias 'spigenM.N' where 'M' is the spibus unit number, and 'N' is the cs pin ID, for each spigen device created.

May 10 2018, 6:11 PM
bobf_mrp3.com added inline comments to D15029: new utility usr.sbin/spi.
May 10 2018, 5:55 PM
bobf_mrp3.com added inline comments to D15301: alter spigen device name to indicate cs as sub-unit.
May 10 2018, 2:04 AM

May 5 2018

bobf_mrp3.com added a comment to D15301: alter spigen device name to indicate cs as sub-unit.

when this is all done, spigen will probably need a man page, to document the behavior, as well as documenting the sysctl API. I could make it a part of this change to add one...

May 5 2018, 5:44 PM
bobf_mrp3.com added inline comments to D15301: alter spigen device name to indicate cs as sub-unit.
May 5 2018, 5:39 PM

May 4 2018

bobf_mrp3.com updated the summary of D15301: alter spigen device name to indicate cs as sub-unit.
May 4 2018, 7:44 PM
bobf_mrp3.com created D15301: alter spigen device name to indicate cs as sub-unit.
May 4 2018, 7:40 PM
bobf_mrp3.com updated the diff for D15067: spigen overlays for RPI-B, RPI-2 in base (was: possible new port for spigen overlay for Raspberry Pi).

updated 'dtso' formatting to latest spec in accordance with r332483 commit comment

May 4 2018, 3:25 PM
bobf_mrp3.com updated the diff for D15067: spigen overlays for RPI-B, RPI-2 in base (was: possible new port for spigen overlay for Raspberry Pi).

added DTSO= section to sys/modules/dtb/rpi/Makefile (as recommended)

May 4 2018, 2:14 PM

May 3 2018

bobf_mrp3.com updated the diff for D15067: spigen overlays for RPI-B, RPI-2 in base (was: possible new port for spigen overlay for Raspberry Pi).

removed recommended port; added to base instead, to be installed in /boot/dtb/overlays/

May 3 2018, 8:45 PM
bobf_mrp3.com added a comment to D15067: spigen overlays for RPI-B, RPI-2 in base (was: possible new port for spigen overlay for Raspberry Pi).

removing the port diff; putting 2 overlays into base

May 3 2018, 8:42 PM
bobf_mrp3.com retitled D15067: spigen overlays for RPI-B, RPI-2 in base (was: possible new port for spigen overlay for Raspberry Pi) from possible new port for spigen overlay for Raspberry Pi to spigen overlays for RPI-B, RPI-2 in base (was: possible new port for spigen overlay for Raspberry Pi).
May 3 2018, 8:42 PM

Apr 30 2018

bobf_mrp3.com added inline comments to D15067: spigen overlays for RPI-B, RPI-2 in base (was: possible new port for spigen overlay for Raspberry Pi).
Apr 30 2018, 5:36 PM

Apr 27 2018

bobf_mrp3.com added inline comments to D15067: spigen overlays for RPI-B, RPI-2 in base (was: possible new port for spigen overlay for Raspberry Pi).
Apr 27 2018, 1:24 PM

Apr 26 2018

bobf_mrp3.com added inline comments to D15031: bcm2835_spi.c mod to support mode and clock in ivars from spibus.
Apr 26 2018, 2:03 AM
bobf_mrp3.com updated the diff for D15031: bcm2835_spi.c mod to support mode and clock in ivars from spibus.
  1. making the sysctl variables all read-only so you can still view them. changing the values happens with each transaction via spibus ivars. This could be made into a 'debug build only' feature.
  2. placed '#ifdef' block around assignment of CS_CSPOLn bits. This feature is effectively broken since there's no apparent method to set them all before any transaction happens. Once there is such a method, they should probably be set just one time and not per transaction. I will investigate doing this on load, and see if it is possible that the cs information is made available while creating the spigen devices.
  3. removed save/restore of clock freq and mode (it's not necessary)
  4. check for clock == 0 and fail with EINVAL
Apr 26 2018, 1:54 AM

Apr 24 2018

bobf_mrp3.com added inline comments to D15067: spigen overlays for RPI-B, RPI-2 in base (was: possible new port for spigen overlay for Raspberry Pi).
Apr 24 2018, 6:55 PM

Apr 18 2018

bobf_mrp3.com updated the test plan for D15029: new utility usr.sbin/spi.
Apr 18 2018, 6:53 PM
bobf_mrp3.com updated the diff for D15029: new utility usr.sbin/spi.

fixed bug related to '-C' (removed the 3 lines of code I mentioned in an inline comment), and another bug in 'verbose' output (newlines being done wrong)

Apr 18 2018, 6:49 PM

Apr 16 2018

bobf_mrp3.com added inline comments to D15029: new utility usr.sbin/spi.
Apr 16 2018, 9:45 PM
bobf_mrp3.com updated the test plan for D15031: bcm2835_spi.c mod to support mode and clock in ivars from spibus.
Apr 16 2018, 4:18 PM
bobf_mrp3.com updated the diff for D15031: bcm2835_spi.c mod to support mode and clock in ivars from spibus.

making some of the requested changes, waiting on others.

Apr 16 2018, 3:26 PM
bobf_mrp3.com added inline comments to D15031: bcm2835_spi.c mod to support mode and clock in ivars from spibus.
Apr 16 2018, 3:22 PM
bobf_mrp3.com added a comment to D15067: spigen overlays for RPI-B, RPI-2 in base (was: possible new port for spigen overlay for Raspberry Pi).

it seemed to me that a port was the better choice, although I'm not opposed at all to having it in the base.

Apr 16 2018, 2:35 PM
bobf_mrp3.com updated the test plan for D15029: new utility usr.sbin/spi.
Apr 16 2018, 1:48 PM
bobf_mrp3.com updated the diff for D15029: new utility usr.sbin/spi.

made recommended changes by ian (some 'hungarians' might remain, if you want to extend the definition to include things like 'hdev' and 'popt').

Apr 16 2018, 1:43 PM
bobf_mrp3.com added inline comments to D15029: new utility usr.sbin/spi.
Apr 16 2018, 1:24 PM

Apr 14 2018

bobf_mrp3.com created D15067: spigen overlays for RPI-B, RPI-2 in base (was: possible new port for spigen overlay for Raspberry Pi).
Apr 14 2018, 8:15 PM

Apr 12 2018

bobf_mrp3.com added inline comments to D15031: bcm2835_spi.c mod to support mode and clock in ivars from spibus.
Apr 12 2018, 3:19 PM
bobf_mrp3.com updated the diff for D15029: new utility usr.sbin/spi.

this one passes 'igor' on the man page, builds properly. no known issues with it. I think it's ready to ship.

Apr 12 2018, 4:53 AM
bobf_mrp3.com updated the diff for D15031: bcm2835_spi.c mod to support mode and clock in ivars from spibus.

re-arranged the order in which the mode and clock speed are set up. changed the method of setting clock polarity to use the individual 'CSPOL' bits instead of the 'global' one that applies to all CS lines (that would only have worked if all 3 lines have the same polarity). This should correct for the mode 3 glitch (still need to test it). however, it does not fully handle the potential problems with CS polarity; in short, unless you set up all of the CS polarity bits before any transaction occurs, any 'active high' CS device could act as if it were selected while the CS is in its default 'high' state, likely causing contention between slave devices. For now, the actual code is in the proposed patch as-is, and I'll research this further.

Apr 12 2018, 1:47 AM
bobf_mrp3.com added inline comments to D15031: bcm2835_spi.c mod to support mode and clock in ivars from spibus.
Apr 12 2018, 12:58 AM
bobf_mrp3.com added inline comments to D15031: bcm2835_spi.c mod to support mode and clock in ivars from spibus.
Apr 12 2018, 12:29 AM

Apr 11 2018

bobf_mrp3.com updated the test plan for D15029: new utility usr.sbin/spi.
Apr 11 2018, 7:36 PM
bobf_mrp3.com added a comment to D15029: new utility usr.sbin/spi.

I'm making additional (igor-based, other) changes to man page. will update once complete. Otherwise, it's essentially done.

Apr 11 2018, 7:34 PM
bobf_mrp3.com updated the diff for D15029: new utility usr.sbin/spi.

applied man page changes to spi.8 (thanks) . may tweek it again based on 'igor'.

Apr 11 2018, 7:21 PM
bobf_mrp3.com added inline comments to D15029: new utility usr.sbin/spi.
Apr 11 2018, 7:09 PM
bobf_mrp3.com added inline comments to D15031: bcm2835_spi.c mod to support mode and clock in ivars from spibus.
Apr 11 2018, 5:42 PM
bobf_mrp3.com added a comment to D15031: bcm2835_spi.c mod to support mode and clock in ivars from spibus.

verified mode and speed appear to be working (as assigned via spigen) although some weirdness in mode 3 causes the first received bit to be dropped. This could be my hardware doing it, and not the broadcom. but it's worth noting. it might be clock glitches or timing of the first clock pulse following cs, which can't be delayed with the existing spibus and driver. Applying a delay might help this, or not. Otherwise, it appears to be working properly unless someone can demonstrate a problem that i wasn't able to detect. Worst case I could set up a 2-channel o-scope to trigger off of the first clock pulse and display the bits and their timing, if any of this becomes suspect.

Apr 11 2018, 9:29 AM
bobf_mrp3.com added inline comments to D15029: new utility usr.sbin/spi.
Apr 11 2018, 9:25 AM

Apr 10 2018

bobf_mrp3.com added inline comments to D15029: new utility usr.sbin/spi.
Apr 10 2018, 11:22 PM
bobf_mrp3.com updated the test plan for D15029: new utility usr.sbin/spi.
Apr 10 2018, 11:12 PM