* BCM36xx support. @ 2012-04-18 5:51 Rogier Wolff 2012-05-31 13:55 ` Florian Fainelli 0 siblings, 1 reply; 3+ messages in thread From: Rogier Wolff @ 2012-04-18 5:51 UTC (permalink / raw) To: linux-kernel While working on SPI and I2C support for the BCM2835, I found the BCM63xx SPI driver in the kernel. Turns out that this support was partially merged: The support can only be enabled when BCM63xx configuration symbol is defined which menuconfig lists as: Symbol: BCM63XX [=BCM63XX] Type : unknown I'd say the definition of this is not possible through the normal channels. And in the driver (drivers/spi/spi-bcm63xx.c) I see: #include <bcm63xx_dev_spi.h> but that file is not in the current git release. (some more googling has resulted in me finding out that I don't want to know how the 63xx SPI controller works as it's for a MIPS processor while the 2835 is ARM). Roger. -- ** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 ** ** Delftechpark 26 2628 XH Delft, The Netherlands. KVK: 27239233 ** *-- BitWizard writes Linux device drivers for any device you may have! --* The plan was simple, like my brother-in-law Phil. But unlike Phil, this plan just might work. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: BCM36xx support. 2012-04-18 5:51 BCM36xx support Rogier Wolff @ 2012-05-31 13:55 ` Florian Fainelli 2012-05-31 14:25 ` Rogier Wolff 0 siblings, 1 reply; 3+ messages in thread From: Florian Fainelli @ 2012-05-31 13:55 UTC (permalink / raw) To: Rogier Wolff; +Cc: linux-kernel, linux-mips Hi Rogier, First of all, you should have CC'd linux-mips, because that's where BCM63xx development happens. On Wednesday 18 April 2012 07:51:40 Rogier Wolff wrote: > > While working on SPI and I2C support for the BCM2835, I found the > BCM63xx SPI driver in the kernel. Turns out that this support > was partially merged: > > The support can only be enabled when BCM63xx configuration symbol > is defined which menuconfig lists as: > > Symbol: BCM63XX [=BCM63XX] > Type : unknown > > I'd say the definition of this is not possible through the normal > channels. > > And in the driver (drivers/spi/spi-bcm63xx.c) I see: > > #include <bcm63xx_dev_spi.h> > > but that file is not in the current git release. No, it did not make it for a reason I ignore, probably miscommunication. > > (some more googling has resulted in me finding out that I don't want > to know how the 63xx SPI controller works as it's for a MIPS processor > while the 2835 is ARM). And so? if the core is the same, just use it on your platform too. If you have a look at the architecture files, you will see that the various BCM63xx SoC have their internal registers shuffled but the SPI core is always software compatible, another set of registers can be added for BCM2835. I have no objection making such a driver more generic and not limited to bcm63xx like it is right now. -- Florian ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: BCM36xx support. 2012-05-31 13:55 ` Florian Fainelli @ 2012-05-31 14:25 ` Rogier Wolff 0 siblings, 0 replies; 3+ messages in thread From: Rogier Wolff @ 2012-05-31 14:25 UTC (permalink / raw) To: Florian Fainelli; +Cc: Rogier Wolff, linux-kernel, linux-mips Hi Florian, On Thu, May 31, 2012 at 03:55:34PM +0200, Florian Fainelli wrote: > First of all, you should have CC'd linux-mips, because that's where > BCM63xx development happens. As I'm not familiar with mips-development, I didn't know that. > On Wednesday 18 April 2012 07:51:40 Rogier Wolff wrote: > > > > While working on SPI and I2C support for the BCM2835, I found the > > BCM63xx SPI driver in the kernel. Turns out that this support > > was partially merged: > > > > The support can only be enabled when BCM63xx configuration symbol > > is defined which menuconfig lists as: > > > > Symbol: BCM63XX [=BCM63XX] > > Type : unknown > > > > I'd say the definition of this is not possible through the normal > > channels. > > > > And in the driver (drivers/spi/spi-bcm63xx.c) I see: > > > > #include <bcm63xx_dev_spi.h> > > > > but that file is not in the current git release. > > No, it did not make it for a reason I ignore, probably miscommunication. > > > > > (some more googling has resulted in me finding out that I don't want > > to know how the 63xx SPI controller works as it's for a MIPS processor > > while the 2835 is ARM). > And so? if the core is the same, just use it on your platform > too. If you have a look at the architecture files, you will see that > the various BCM63xx SoC have their internal registers shuffled but > the SPI core is always software compatible, another set of registers > can be added for BCM2835. I expect the core to be very different because they are for different processors. But of course if they are the same, a single driver would be better. However, with the header file missing, I can't find if the register offsets are the same. That would be a hint that the module is the the same. Reading the driver I see lots "readb" and "writeb" calls. These presumably read/write a byte. The '2835 module doesn't have any byte-registers. All registers are 32bits. I consider this a further hint that the modules are not the same. I've read some of the code, and for instance, there seems to be a limited-width register (3 or 4 bits) that specify the clock rate on the bcm63xx. On the bcm2835 the clock is set by good chunk (15 bits IIRC) of a 32-bit register which specifies the clock divisor. The core clock runs at 250MHz, so I can specify clock rates at with 1:250 accuracy around 1MHz. (i.e. 1000000 Hz is possible as well as 1004000) I consider this a further hint that the modules are not the same. So with three of those hints I'll take the hint that they are not the same, and concentrate on building a new driver for the bcm2835 (and 2708?) Roger. -- ** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 ** ** Delftechpark 26 2628 XH Delft, The Netherlands. KVK: 27239233 ** *-- BitWizard writes Linux device drivers for any device you may have! --* The plan was simple, like my brother-in-law Phil. But unlike Phil, this plan just might work. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-31 14:36 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-04-18 5:51 BCM36xx support Rogier Wolff 2012-05-31 13:55 ` Florian Fainelli 2012-05-31 14:25 ` Rogier Wolff
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox