RPi-3 brcmfmac errors on boot

Michael Zoran mzoran at crowfest.net
Tue Nov 29 16:32:19 PST 2016


On Tue, 2016-11-29 at 15:04 -0500, Don Zickus wrote:
> On Mon, Nov 28, 2016 at 01:42:42PM -0800, Michael Zoran wrote:
> > On Mon, 2016-11-28 at 11:18 -0500, Don Zickus wrote:
> > > 
> > > But bluetooth..
> > > 
> > > I have a custom built hciattach binary to use to download the
> > > special
> > > bluetooth firmware /lib/firmware/BCM43430A1.hcd
> > > 
> > > hciattach /dev/ttyAMA0 bcm43xx-3wire 921600 noflow -
> > > 
> > > However that still times out trying to start the initial download
> > > (based on
> > > hciattach debug printfs I have).
> > > 
> > > I am guessing my bluetooth pins are not setup correctly?  Where
> > > can I
> > > find
> > > the correct pull ups I need?
> > > 
> > 
> > You can find the pullups in the downstream device tree source
> > file.  Or
> >  at least I think that's what's setting up the pullups. Although if
> > you
> > are detecting it, it might be correct.
> 
> Hi Michael,
> 
> I am not sure it is being detected.  I believe I have to download the
> binary
> blob with hciattach to activate the device, which is what I am
> failing with.
> 
> > 
> > I know they made a patch for bluez that might be part of it.  I
> > also
> > know the Bluetooth module used in the RPI 3 isn't that great.  It's
> > a
> > serial attached module for all that's worth.
> 
> Yeah, I have those 5 bluez patches in my hciattach binary but it
> still isn't
> working.  I was hoping to figure out how to determine if the device
> is
> configured correctly.
> 
> I tried to mimic some of the device tree stuff from raspbian with a
> patch
> like below:
> 
> diff --git a/arch/arm/boot/dts/bcm283x.dtsi
> b/arch/arm/boot/dts/bcm283x.dtsi
> index 02fde31..975184e 100644
> --- a/arch/arm/boot/dts/bcm283x.dtsi
> +++ b/arch/arm/boot/dts/bcm283x.dtsi
> @@ -189,6 +189,7 @@
>                         gpclk2_gpio43: gpclk2_gpio43 {
>                                 brcm,pins = <43>;
>                                 brcm,function = <BCM2835_FSEL_ALT0>;
> +                               brcm,pull = <0>;
>                         };
> 
>                         i2c0_gpio0: i2c0_gpio0 {
> @@ -305,6 +306,7 @@
>                         uart0_ctsrts_gpio32: uart0_ctsrts_gpio32 {
>                                 brcm,pins = <32 33>;
>                                 brcm,function = <BCM2835_FSEL_ALT3>;
> +                               brcm,pull = <0 2>;
>                         };
> 
>                         uart1_gpio14: uart1_gpio14 {
> @@ -341,10 +343,10 @@
>                         compatible = "brcm,bcm2835-pl011",
> "arm,pl011",
> "arm,primecell";
>                         reg = <0x7e201000 0x1000>;
>                         interrupts = <2 25>;
> -                       clocks = <&clocks BCM2835_CLOCK_UART>,
> -                                <&clocks BCM2835_CLOCK_VPU>;
> +                       clocks = <&clk_uart0 &clk_apb_p>;
>                         clock-names = "uartclk", "apb_pclk";
>                         arm,primecell-periphid = <0x00241011>;
> +                       status = "disabled";
>                 };
> 
>                 i2s: i2s at 7e203000 {
> @@ -537,5 +542,22 @@
>                         clock-output-names = "otg";
>                         clock-frequency = <480000000>;
>                 };
> +
> +               clk_uart0: clock at 5 {
> +                       compatible = "fixed-clock";
> +                       reg = <5>;
> +                       #clock-cells = <0>;
> +                       clock-output-names = "uart0_pclk";
> +                       clock-frequency = <48000000>;
> +               };
> +
> +               clk_apb_p: clock at 6 {
> +                       compatible = "fixed-clock";
> +                       reg = <6>;
> +                       #clock-cells = <0>;
> +                       clock-output-names = "apb_pclk";
> +                       clock-frequency = <126000000>;
> +               };
> +
>         };
> 
> But no luck. :-(
> 
> Thoughts?
> 
> Cheers,
> Don
> 

This is a long shot, but I noticed that the downstream kernel has this
line:

&uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_pins &bt_pins>;
        status = "okay";
};

I think with your names, it would look like:

&uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&gpclk2_gpio43 &uart0_ctsrts_gpio32>;
        status = "okay";
};

Just for debugging, you can try pointing your config.txt at the
Raspbian dtb these days.  It built "on top" of the upstream dtb.

The downstream dtb is bcm2710-rpi-3-b.dtb.







More information about the linux-rpi-kernel mailing list