Date: Sat, 1 May 2021 22:48:34 -0700 From: Mark Millard <marklmi@yahoo.com> To: Emmanuel Vadot <manu@bidouilliste.com> Cc: freebsd-arm <freebsd-arm@freebsd.org> Subject: Re: I2C/IIC working on RPI4 8GB? Message-ID: <8727C9E1-81D8-4999-9610-33FCD7DAAA7D@yahoo.com> In-Reply-To: <20210430095148.0a82a78f64a99e59c03f2e82@bidouilliste.com> References: <1C2DD11C-B1F6-4C2A-9AB0-5F1553520FF5@FreeBSD.org> <20210426161138.a8f44b6e1134f73a411be57d@bidouilliste.com> <CF4C4332-BB2F-47E9-B879-8EEA0E53E848@FreeBSD.org> <C4828BF2-E8B7-45D1-B0F8-5E72AF84D565@yahoo.com> <47A634E3-4938-4AFC-9341-E480CEBF67FB@FreeBSD.org> <20210428101945.67417ef8eba251dcbcb38078@bidouilliste.com> <ED9ABBBE-9B5A-4B51-806C-F91AABE39731@FreeBSD.org> <486E3EA3-EBAE-492E-B12E-E72E3E3E7B6A@FreeBSD.org> <20210430095148.0a82a78f64a99e59c03f2e82@bidouilliste.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2021-Apr-30, at 00:51, Emmanuel Vadot <manu at bidouilliste.com> = wrote: > On Thu, 29 Apr 2021 17:57:45 +0100 > Mark Murray <markm@FreeBSD.org> wrote: >=20 >> On 28 Apr 2021, at 22:07, Mark Murray <markm@FreeBSD.org> wrote: >>>=20 >>> On 28 Apr 2021, at 09:19, Emmanuel Vadot <manu@bidouilliste.com> = wrote: >>>=20 >>>> According to this document is this just to detect that the slave = hold >>>> the scl line too long so I don't think that this is the problem = here. >>>> If you have a scope or a logic analyzer I suggest you start by = using >>>> it to confirm that when you scan with i2c -s you see something. >>>=20 >>> As it turns out, my logic analyser arrived today. >>=20 >> I got an oscilloscope onto pins 3 and 5 (GPIO2 and GPIO3), and "i2c = -s" does not a jot on them. >=20 > And this is with the i2cX.dtbo right ? > Can you share the full dmesg please ? >=20 >> I don't know if this helps, but the gpioctl utility thinks the pins = are both inputs: >=20 > I don't remember if the gpio/pinctrl controller in RPI still sees the > pins when they are configured to an alt function or not but that does > seems a bit strange yes. >=20 > Please share a full dmesg as I want to confirm that the pins are > configured for i2c function. >=20 >> . . . >=20 In case you look at some of the notes I've sent out, my RPi4B 8 GiBYte context shows: The RPi4's context is back as of 2021-Mar-12: merge-base: 7381bbee29df959e88ec59866cf2878263e7f3b2 merge-base: CommitDate: 2021-03-12 20:29:42 +0000 7381bbee29df (freebsd/main, freebsd/HEAD, pure-src, main) cam: Run all = XPT_ASYNC ccbs in a dedicated thread n245444 (--first-parent --count for merge-base) Boot verbose reported for case independent gpio|i2c|iic in dmesg -a from a boot -v : gic0: <ARM Generic Interrupt Controller> mem = 0x40041000-0x40041fff,0x40042000-0x40043fff,0x40044000-0x40045fff,0x400460= 00-0x40047fff irq 30 on simplebus0 gic0: pn 0x2, arch 0x2, rev 0x1, implementer 0x43b irqs 256 gpio0: <BCM2708/2835 GPIO controller> mem 0x7e200000-0x7e2000b3 irq = 14,15 on simplebus0 gpiobus0: <OFW GPIO bus> on gpio0 Processing 1 pin-config node(s) in pinctrl-0 for serial@7e201000 Processing 2 pin-config node(s) in pinctrl-0 for spi@7e204000 gpio0: set pin 9 to func 4 gpio0: set pin 10 to func 4 gpio0: set pin 11 to func 4 gpio0: set pin 8 to func 1 gpio0: set pin 7 to func 1 Processing 1 pin-config node(s) in pinctrl-0 for i2c@7e804000 Processing 1 pin-config node(s) in pinctrl-0 for bcm2835_audio gpio0: set pin 40 to func 4 gpio0: set pin 41 to func 4 Processing 1 pin-config node(s) in pinctrl-0 for mmc@7e300000 gpio0: set pin 48 to func 7, pull 0 gpio0: set pin 49 to func 7, pull 2 gpio0: set pin 50 to func 7, pull 2 gpio0: set pin 51 to func 7, pull 2 gpio0: set pin 52 to func 7, pull 2 gpio0: set pin 53 to func 7, pull 2 gpio1: <Raspberry Pi Firmware GPIO controller> on bcm2835_firmware0 gpiobus1: <GPIO bus> on gpio1 regfix0: Cannot set GPIO pin: 6 REGNODE_INIT failed: 6 regfix0: Cannot register regulator. mbox0: <BCM2835 VideoCore Mailbox> mem 0x7e00b880-0x7e00b8bf irq 13 on = simplebus0 gpioregulator0: <GPIO controlled regulator> on ofwbus0 . . . gpioc0: <GPIO controller> on gpio0 uart0: <PrimeCell UART (PL011)> mem 0x7e201000-0x7e2011ff irq 16 on = simplebus0 uart0: console (115200,n,8,1) uart0: fast interrupt uart0: PPS capture mode: DCD simplebus0: <mmc@7e202000> mem 0x7e202000-0x7e2020ff irq 17 disabled = compat brcm,bcm2835-sdhost (no driver attached) simplebus0: <i2s@7e203000> mem 0x7e203000-0x7e203023 disabled compat = brcm,bcm2835-i2s (no driver attached) spi0: <BCM2708/2835 SPI controller> mem 0x7e204000-0x7e2041ff irq 18 on = simplebus0 spibus0: <OFW SPI bus> on spi0 spibus0: <unknown card> at cs 0 mode 0 spibus0: <unknown card> at cs 1 mode 0 simplebus0: <i2c@7e205000> mem 0x7e205000-0x7e2051ff irq 19 disabled = compat brcm,bcm2711-i2c (no driver attached) simplebus0: <i2c0mux> disabled compat i2c-mux-pinctrl (no driver = attached) simplebus0: <dpi@7e208000> mem 0x7e208000-0x7e20808b disabled compat = brcm,bcm2835-dpi (no driver attached) simplebus0: <dsi@7e209000> mem 0x7e209000-0x7e209077 irq 20 disabled = compat brcm,bcm2835-dsi0 (no driver attached) simplebus0: <aux@7e215000> mem 0x7e215000-0x7e215007 compat = brcm,bcm2835-aux (no driver attached) simplebus0: <serial@7e215040> mem 0x7e215040-0x7e21507f irq 21 disabled = compat brcm,bcm2835-aux-uart (no driver attached) simplebus0: <spi@7e215080> mem 0x7e215080-0x7e2150bf irq 22 disabled = compat brcm,bcm2835-aux-spi (no driver attached) simplebus0: <spi@7e2150c0> mem 0x7e2150c0-0x7e2150ff irq 23 disabled = compat brcm,bcm2835-aux-spi (no driver attached) simplebus0: <pwm@7e20c000> mem 0x7e20c000-0x7e20c027 disabled compat = brcm,bcm2835-pwm (no driver attached) simplebus0: <hvs@7e400000> mem 0x7e400000-0x7e405fff irq 24 disabled = compat brcm,bcm2711-hvs (no driver attached) simplebus0: <dsi@7e700000> mem 0x7e700000-0x7e70008b irq 25 disabled = compat brcm,bcm2711-dsi1 (no driver attached) iichb0: <BCM2708/2835 BSC controller> mem 0x7e804000-0x7e804fff irq 26 = on simplebus0 . . . simplebus0: <i2c@7e205600> mem 0x7e205600-0x7e2057ff irq 50 disabled = compat brcm,bcm2711-i2c (no driver attached) simplebus0: <i2c@7e205800> mem 0x7e205800-0x7e2059ff irq 51 disabled = compat brcm,bcm2711-i2c (no driver attached) simplebus0: <i2c@7e205a00> mem 0x7e205a00-0x7e205bff irq 52 disabled = compat brcm,bcm2711-i2c (no driver attached) simplebus0: <i2c@7e205c00> mem 0x7e205c00-0x7e205dff irq 53 disabled = compat brcm,bcm2711-i2c (no driver attached) simplebus0: <pixelvalve@7e206000> mem 0x7e206000-0x7e2060ff irq 54 = disabled compat brcm,bcm2711-pixelvalve0 (no driver attached) simplebus0: <pixelvalve@7e207000> mem 0x7e207000-0x7e2070ff irq 55 = disabled compat brcm,bcm2711-pixelvalve1 (no driver attached) simplebus0: <pixelvalve@7e20a000> mem 0x7e20a000-0x7e20a0ff irq 56 = disabled compat brcm,bcm2711-pixelvalve2 (no driver attached) simplebus0: <pwm@7e20c800> mem 0x7e20c800-0x7e20c827 disabled compat = brcm,bcm2835-pwm (no driver attached) simplebus0: <pixelvalve@7e216000> mem 0x7e216000-0x7e2160ff irq 57 = disabled compat brcm,bcm2711-pixelvalve4 (no driver attached) simplebus0: <pixelvalve@7ec12000> mem 0x7ec12000-0x7ec120ff irq 58 = disabled compat brcm,bcm2711-pixelvalve3 (no driver attached) simplebus0: <clock@7ef00000> mem 0x7ef00000-0x7ef0000f disabled compat = brcm,brcm2711-dvp (no driver attached) simplebus0: <interrupt-controller@7ef00100> mem 0x7ef00100-0x7ef0012f = irq 59 disabled compat brcm,bcm2711-l2-intc (no driver attached) simplebus0: <hdmi@7ef00700> mem = 0x7ef00700-0x7ef009ff,0x7ef00300-0x7ef004ff,0x7ef00f00-0x7ef00f7f,0x7ef00f= 80-0x7ef00fff,0x7ef01b00-0x7ef01cff,0x7ef01f00-0x7ef022ff,0x7ef00200-0x7ef= 0027f,0x7ef04300-0x7ef043ff,0x7ef20000-0x7ef200ff,0x7ef00100-0x7ef0012f = irq 60,61,62,63,64,65 disabled compat brcm,bcm2711-hdmi0 (no driver = attached) simplebus0: <i2c@7ef04500> mem = 0x7ef04500-0x7ef045ff,0x7ef00b00-0x7ef00dff disabled compat = brcm,bcm2711-hdmi-i2c (no driver attached) simplebus0: <hdmi@7ef05700> mem = 0x7ef05700-0x7ef059ff,0x7ef05300-0x7ef054ff,0x7ef05f00-0x7ef05f7f,0x7ef05f= 80-0x7ef05fff,0x7ef06b00-0x7ef06cff,0x7ef06f00-0x7ef072ff,0x7ef00280-0x7ef= 002ff,0x7ef09300-0x7ef093ff,0x7ef20000-0x7ef200ff,0x7ef00100-0x7ef0012f = irq 66,67,68,69,70,71 disabled compat brcm,bcm2711-hdmi1 (no driver = attached) simplebus0: <i2c@7ef09500> mem = 0x7ef09500-0x7ef095ff,0x7ef05b00-0x7ef05dff disabled compat = brcm,bcm2711-hdmi-i2c (no driver attached) gpioc1: <GPIO controller> on gpio1 . . . simplebus0: <gpiomem> mem 0x7e200000-0x7e200fff compat = brcm,bcm2835-gpiomem (no driver attached) . . . gpioled0: <GPIO LEDs> on ofwbus0 . . . iicbus0: <OFW I2C bus> on iichb0 usbus0: 5.0Gbps Super Speed USB v3.0 iic0: <I2C generic I/O> on iicbus0 =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8727C9E1-81D8-4999-9610-33FCD7DAAA7D>