Hello Misc, I'm trying to get a BeagleBone Black talking onewire and i2c via GPIO to several off-board ICs through gpioow(4) and gpioiic(4) respectively.
I've got the following in /etc/rc.securelevel: # Set GPIO pin directions for USR LEDs and give them names gpioctl gpio1 21 set out USR0 gpioctl gpio1 22 set out USR1 gpioctl gpio1 23 set out USR2 gpioctl gpio1 24 set out USR3 # Attach a onewire(4) bus on a gpioow(4) device using 1 GPIO pin gpioctl gpio1 attach gpioow 29 0x1 # Attach a i2c(4) bus on a gpioiic(4) device using 2 GPIO pins gpioctl gpio2 attach gpioiic 2 0x3 dmesg shows the masters attaching after boot: beagle:/home/bK $ dmesg OpenBSD 6.1 (GENERIC) #89: Sat Apr 1 19:14:03 MDT 2017 dera...@armv7.openbsd.org:/usr/src/sys/arch/armv7/compile/GENERIC real mem = 536870912 (512MB) avail mem = 517754880 (493MB) mainbus0 at root: TI AM335x BeagleBone Black cpu0 at mainbus0: ARM Cortex A8 R3 rev 2 (ARMv7 core) cpu0: DC enabled IC enabled WB disabled EABT branch prediction enabled cpu0: 32KB(64b/l,4way) I-cache, 32KB(64b/l,4way) wr-back D-cache omap0 at mainbus0 prcm0 at omap0 rev 0.2 dmtimer0 at omap0 rev 3.1 dmtimer1 at omap0 rev 3.1 simplebus0 at mainbus0: "ocp" simplebus1 at simplebus0: "l4_wkup" simplebus2 at simplebus1: "scm" ompinmux0 at simplebus2 intc0 at simplebus0 rev 5.0 omgpio0 at simplebus0: rev 0.1 gpio0 at omgpio0: 32 pins omgpio1 at simplebus0: rev 0.1 gpio1 at omgpio1: 32 pins omgpio2 at simplebus0: rev 0.1 gpio2 at omgpio2: 32 pins omgpio3 at simplebus0: rev 0.1 gpio3 at omgpio3: 32 pins com0 at simplebus0: ti16750, 64 byte fifo com0: console tiiic0 at simplebus0 rev 0.11 iic0 at tiiic0 "ti,tps65217" at iic0 addr 0x24 not configured "at,24c256" at iic0 addr 0x50 not configured "nxp,tda998x" at iic0 addr 0x70 not configured tiiic1 at simplebus0 rev 0.11 iic1 at tiiic1 "at,24c256" at iic1 addr 0x54 not configured "at,24c256" at iic1 addr 0x55 not configured "at,24c256" at iic1 addr 0x56 not configured "at,24c256" at iic1 addr 0x57 not configured ommmc0 at simplebus0 sdmmc0 at ommmc0: 4-bit, sd high-speed, mmc high-speed ommmc1 at simplebus0 sdmmc1 at ommmc1: 1-bit omdog0 at simplebus0 rev 0.1 cpsw0 at simplebus0: version 1.12 (0), address 90:59:af:69:cf:7a ukphy0 at cpsw0 phy 0: Generic IEEE 802.3u media interface, rev. 1: OUI 0x0001f0, model 0x000f scsibus0 at sdmmc0: 2 targets, initiator 0 sd0 at scsibus0 targ 1 lun 0: <SD/MMC, LEXAR, 0010> SCSI2 0/direct removable sd0: 7646MB, 512 bytes/sector, 15659008 sectors scsibus1 at sdmmc1: 2 targets, initiator 0 sd1 at scsibus1 targ 1 lun 0: <SD/MMC, MMC02G, 0000> SCSI2 0/direct removable sd1: 1832MB, 512 bytes/sector, 3751936 sectors vscsi0 at root scsibus2 at vscsi0: 256 targets softraid0 at root scsibus3 at softraid0: 256 targets boot device: sd0 root on sd0a (f33e524785e13e4d.a) swap on sd0b dump on sd0b WARNING: CHECK AND RESET THE DATE! gpioow0 at gpio1: DATA[29] pull-up onewire0 at gpioow0 gpioiic0 at gpio2: SDA[2] pull-up, SCL[3] iic2 at gpioiic0 After boot, I'm able to toggle the USR LEDs no problem but I'm not able to see the temp sensors on either onewire or i2c. The slave ICs I'm using are both supported in the manual pages: DS18S20, man 4 owtemp DS1631, man 4 maxds Using the following pinouts as reference: http://www.toptechboy.com/wp-content/uploads/2015/06/beaglebone-black-pinout.jpg onewire: DQ on P8 header, pin 26 i2c: SDA on P8 header, pin 7 / SCL on P8 header, pin 8 (tried flipping SDA/SCL but no change) Am I assuming correctly that by asserting 5V to the ICs, the master will auto-poll and the value will be made available through sysctl(8)? Perhaps I'm missing a step before going to securemode? Any advice? Thanks in advance, -- Byron Klippert byronklipp...@ml1.net c. 867-336-1306