Go to advanced search

by zeoneo
Sat Mar 21, 2020 12:46 pm
Forum: Bare metal, Assembly language
Topic: Bare metal BCM43438 Driver
Replies: 77
Views: 11247

Re: Bare metal BCM43438 Driver

@zeoneo You're welcome. In the meantime my driver can associate and authenticate to a WPA2 enabled network. I have some issues, but it is working using the method to take the Plan 9 driver as it is (with some slight modifications) and build an environment around. I have to say, that the author of t...
by zeoneo
Sat Mar 21, 2020 11:22 am
Forum: Bare metal, Assembly language
Topic: Bare metal BCM43438 Driver
Replies: 77
Views: 11247

Re: Bare metal BCM43438 Driver

Thanks Rsta. I was still facing the issue with my bootloader and uploading kernel binary. @LdB I am able to read the chip id using this https://github.com/zeoneo/rpi-3b-wifi/blob/master/src/emmc-sdio.c https://github.com/zeoneo/rpi-3b-wifi/blob/master/src/wifi-io.c #################### Inside Bootlo...
by zeoneo
Sat Mar 21, 2020 11:19 am
Forum: Bare metal, Assembly language
Topic: RPI 3B SDHOST Controller
Replies: 8
Views: 1890

Re: RPI 3B SDHOST Controller

Hey @cleverca22

I was able to make it work :D.

https://github.com/zeoneo/rpi-3b-wifi/b ... c/sdhost.c

Thank you for your help.
by zeoneo
Sun Mar 15, 2020 4:36 pm
Forum: Bare metal, Assembly language
Topic: Bare metal BCM43438 Driver
Replies: 77
Views: 11247

Re: Bare metal BCM43438 Driver

I was able to compile wifi /sample after toolchain upgrade but it does not send any uart response after booting.

I have enable_uart=1 and core_freq=250Mhz hard coded in config.txt

Even after commenting that it didn't work.

I compiled fot RASPI 3 32 bit
by zeoneo
Sat Mar 14, 2020 6:49 pm
Forum: Bare metal, Assembly language
Topic: Bare metal BCM43438 Driver
Replies: 77
Views: 11247

Re: Bare metal BCM43438 Driver

Just to clarify one last thing because this get even messier on the Pi4 and I will show you the comment I am questioning. Check the page 65 it says Arasan Tm in the section introduction to external mass media controller. Yes we know that and AFAIK so is the new 3rd one on the Pi4 ... just no-one ev...
by zeoneo
Sat Mar 14, 2020 2:48 pm
Forum: Bare metal, Assembly language
Topic: RPI 3B SDHOST Controller
Replies: 8
Views: 1890

Re: RPI 3B SDHOST Controller

https://github.com/librerpi/rpi-open-firmware/blob/master/arm_chainloader/drivers/sdhost_impl.cc this is an sdhost driver that ive been using recently, it controls the device at 0x7e202000 the code present in that file, is enough to read blocks from an SD card and detect the card size its always be...
by zeoneo
Sat Mar 14, 2020 10:08 am
Forum: Bare metal, Assembly language
Topic: Bare metal BCM43438 Driver
Replies: 77
Views: 11247

Re: Bare metal BCM43438 Driver

FYI The Plan 9 ether4330.c and emmc.c drivers are working well on the RPi 3B, 3B+ and 4B with only slight modifications. I have built an emulation framework for the Plan 9 kernel environment with Circle and these drivers run successfully in it: logger: Circle 41.2 started on Raspberry Pi 3 Model B+...
by zeoneo
Sat Mar 14, 2020 10:05 am
Forum: Bare metal, Assembly language
Topic: Bare metal BCM43438 Driver
Replies: 77
Views: 11247

Re: Bare metal BCM43438 Driver

Why it seems to be a problem because you are calling the one at PERIPHERAL_BASE + 0x300000 the Arasan So ever since 2014 we have called the other one the Arasan https://www.raspberrypi.org/forums/viewtopic.php?t=246767 I already have the sdhost controller working fine and I will use that one to acc...
by zeoneo
Sat Mar 14, 2020 8:26 am
Forum: Bare metal, Assembly language
Topic: Bare metal BCM43438 Driver
Replies: 77
Views: 11247

Re: Bare metal BCM43438 Driver

So for our step 1 we could compare the emmc.c and https://github.com/LdB-ECM/Raspberry-Pi/blob/master/SD_FAT32/SDCard.c. Then remove the unused part of SDCard.c and add any new methods which may be related to CMD52 (IO). Nope actually your code is better because it is running and already on the Ara...
by zeoneo
Sat Mar 14, 2020 3:41 am
Forum: Bare metal, Assembly language
Topic: Bare metal BCM43438 Driver
Replies: 77
Views: 11247

Re: Bare metal BCM43438 Driver

By eMMC I mean well documented Araasan controller which supports SD and SDIO standard implementation. Base Address: PERIPHERAL_BASE + 0x300000 Cypress Wifi chip is connected to PIN 34-39. If you choose Alt3 alternate function for 34-39 it will be talking to Arasan Controller I mentioned above. Step1...
by zeoneo
Fri Mar 13, 2020 6:29 pm
Forum: Bare metal, Assembly language
Topic: Bare metal BCM43438 Driver
Replies: 77
Views: 11247

Re: Bare metal BCM43438 Driver

If it does that I don't know how you talk to the wifi module there simply is no connection. Show me some code that drives the wifi from an EMMC host because I have no idea how that layer sits on the second MMC and none of the code you have in your repo does that nor anything you have shown me. I se...
by zeoneo
Fri Mar 13, 2020 6:01 pm
Forum: Bare metal, Assembly language
Topic: RPI 3B SDHOST Controller
Replies: 8
Views: 1890

Re: RPI 3B SDHOST Controller

Does anyone have the working code for broadcom sdhost driver[not the arasan emmc controller]?
by zeoneo
Fri Mar 13, 2020 5:54 pm
Forum: Bare metal, Assembly language
Topic: Bare metal BCM43438 Driver
Replies: 77
Views: 11247

Re: Bare metal BCM43438 Driver

Anyhow either a MOD will chime in hopefully or I will get the sucker talking :-)
Funny.
If you see something like cmd1 in sdhost.c then remove it and use cmd instead. After that rectification I tried to read the ocr and csd from the card. It's all 0xffffffff didn't work.
by zeoneo
Fri Mar 13, 2020 5:35 pm
Forum: Bare metal, Assembly language
Topic: Bare metal BCM43438 Driver
Replies: 77
Views: 11247

Re: Bare metal BCM43438 Driver

I don't think so .. I am reasonably sure you are wrong :-) https://hackaday.io/project/8678-rpi-wifi The BCM283x SoCs at the heart of every Pi has two MMC controllers. One of these connects to the SD card slot that the Pi boots and runs its OS from. The other has largely been ignored, but comes out...
by zeoneo
Fri Mar 13, 2020 4:42 pm
Forum: Bare metal, Assembly language
Topic: Bare metal BCM43438 Driver
Replies: 77
Views: 11247

Re: Bare metal BCM43438 Driver

You are posting to someone who had not played with the wifi before yesterday :-) I am just following this .. read it .. I am doing first steps which is on the SDIO aka SDHost https://iosoft.blog/2020/03/08/zerowi-part3/ Now the only thing I know is the question he asks why the CRC fails :-) It is b...
by zeoneo
Fri Mar 13, 2020 3:21 pm
Forum: Bare metal, Assembly language
Topic: Bare metal BCM43438 Driver
Replies: 77
Views: 11247

Re: Bare metal BCM43438 Driver

can you check plan9 drives the wifi while I try this I tried plan9 on my Pi3. I see boot screen but it gets stuck at due to some error. May be some config mismatch. I have seen a lot of cmdline.txt files which suggest it does have ethe4330 as wifi. 9fans mailing list suggests wifi works on pi3. Sen...
by zeoneo
Fri Mar 13, 2020 1:28 pm
Forum: Bare metal, Assembly language
Topic: Bare metal BCM43438 Driver
Replies: 77
Views: 11247

Re: Bare metal BCM43438 Driver

Are you sure the u-boot code runs the Pi3 wifi? I am not sure if it runs Pi3 Wifi (Probably not). I don't know if uboot's sdhost code work. I assumed it's present in master branch of their repo so it must have gone through some testing. Why did you choose to follow the U-boot wifi code? >> It's sdh...
by zeoneo
Fri Mar 13, 2020 12:33 pm
Forum: Bare metal, Assembly language
Topic: Bare metal BCM43438 Driver
Replies: 77
Views: 11247

Re: Bare metal BCM43438 Driver

Ok. Did it work for you? and I am not sure I understood it well. Why wouldn't it work? Is it not working in u-boot code :D ? I see you have changed the condition itself. https://github.com/u-boot/u-boot/blob/master/drivers/mmc/bcm2835_sdhost.c#L399 ret = readl_poll_timeout(host->ioaddr + SDCMD, valu...
by zeoneo
Fri Mar 13, 2020 2:04 am
Forum: Bare metal, Assembly language
Topic: Bare metal BCM43438 Driver
Replies: 77
Views: 11247

Re: Bare metal BCM43438 Driver

Yeah that was all I got thru last night, and ran out of time and didn't work for me either. Now if you get time before I get a chance to look at it tonight can you look at the readl_poll_timeout macro. All I can see is if you set cond to any value other than zero it reads the register and immediate...
by zeoneo
Thu Mar 12, 2020 7:13 pm
Forum: Bare metal, Assembly language
Topic: Bare metal BCM43438 Driver
Replies: 77
Views: 11247

Re: Bare metal BCM43438 Driver

Hmm made sense to me. Now I could actually see the values written in registers.
I should have checked if the register values after write and read are same.
I changed the frequency to 250 * 1000 * 1000.

Still getting the same timeout error.
by zeoneo
Thu Mar 12, 2020 3:02 pm
Forum: Bare metal, Assembly language
Topic: Bare metal BCM43438 Driver
Replies: 77
Views: 11247

Re: Bare metal BCM43438 Driver

Are you looking at plan9 driver here: https://9p.io/sources/contrib/miller/9/bcm/sdhost.c Set Clock static void emmcclk(uint freq) { u32int *r; uint div; int i; r = (u32int*)EMMCREGS; div = emmc.extclk / (freq<<1); if(emmc.extclk / (div<<1) > freq) div++; WR(Control1, clkdiv(div) | DTO<<Datatoshift ...
by zeoneo
Thu Mar 12, 2020 11:58 am
Forum: Bare metal, Assembly language
Topic: Bare metal BCM43438 Driver
Replies: 77
Views: 11247

Re: Bare metal BCM43438 Driver

The early one marked as Rev B 1.2 .. 2015 and it runs at 1.2Ghz https://www.raspberrypi.org/app/uploads ... 9x1080.jpg This one (2015 model with NO metal lid ). Btw which host operating system do you use for development? Does it support docker? My code didn't have any warnings as per arm-none-eabi-...
by zeoneo
Wed Mar 11, 2020 7:41 pm
Forum: Bare metal, Assembly language
Topic: Bare metal BCM43438 Driver
Replies: 77
Views: 11247

Re: Bare metal BCM43438 Driver

First of whatever output you got I am getting the same without changing anything. I don't why the uart doesn't work for you and timer as well. This code works correctly for me, even printf. I used the same uart code to upload my kernel every time it changed. I think may be the difference is in confi...
by zeoneo
Wed Mar 11, 2020 7:13 am
Forum: Bare metal, Assembly language
Topic: Bare metal BCM43438 Driver
Replies: 77
Views: 11247

Re: Bare metal BCM43438 Driver

I have setup separate repo.

https://github.com/zeoneo/rpi-3b-wifi/b ... c/sdhost.c

If you have docker desktop then you can easily build it. No setup required.

Thanks
by zeoneo
Wed Mar 11, 2020 2:38 am
Forum: Bare metal, Assembly language
Topic: Bare metal BCM43438 Driver
Replies: 77
Views: 11247

Re: Bare metal BCM43438 Driver

I am stuck at sdhost driver. I am referring to uboot's code. Do you have working sdhost?

Go to advanced search