User Tools

Site Tools


doc:hardware:soc:soc.broadcom.bcm63xx

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
doc:hardware:soc:soc.broadcom.bcm63xx [2012/12/23 18:05]
mol0tov
doc:hardware:soc:soc.broadcom.bcm63xx [2016/08/21 07:20] (current)
pbailey [Known 63268 platforms*:]
Line 1: Line 1:
 +====== Broadcom BCM63xx ======
 +This page covers the BCM63xx [[doc:​hardware:​SoC]] specificities,​ but the [[doc:​hardware:​soc:​soc.broadcom.bcm33xx|BCM33xx]] SoC (excluding BCM3302 which is a CPU) are the exact same chip, except that the DSL core is replaced with a DOCSIS/​EuroDOCSIS one.
  
 +[[http://​www.broadcom.com/​products/​Broadband-Carrier-Access/​xDSL-CPE-Solutions|Broadcom63xx SoC]] integrates ADSL/ADSL2+ features, routing, and external Wireless NIC.
 +
 +This SoC is widely used by most xDSL platforms in the world. It is one of the most successful xDSL platforms due to the simplicity of migrating old platforms (e.g: BCM6345) to new ones without much software impact. ​
 +
 +The Architecture is based on a standard **MIPS32 Big Endian** Instruction Set, and shares some features with the R4000 microprocessor.
 +
 +===== Linux support =====
 +  * The OpenWrt support for the Broadcom BCM63xx SoC family currently only works with following models:
 +        * **6318**
 +        * **6328**
 +        * **6338**
 +        * **6345**
 +        * **6348**
 +        * **6358** / **6359**
 +        * **6361** / **6362**
 +        * **6368** / **6369**
 +        * **63168** / **63169** / **63268** / **63269**
 +  * There are working drivers for USB Host (OHCI and EHCI) and Ethernet under the GPL. USB Device drivers are also supported but only for BCM6368 and newer SoCs.
 +  * -> [[doc/​techref/​brcm63xx.imagetag]]
 +
 +==== Broadcom xDSL ====
 +  * xDSL and ATM are **<color crimson>​NOT SUPPORTED</​color>​**. Not by some binary nor are there GPL drivers available!
 +    * Netgear has released some sources for DSL-driver: [[https://​sourceforge.net/​projects/​officialnetgearfirmware/​files/​DG834_G_GBv3_4_01_06.zip/​download|DG834GBv4 GPL and closed code]]
 +    * https://​forum.openwrt.org/​viewtopic.php?​id=24271
 +    * http://​comments.gmane.org/​gmane.comp.embedded.openwrt.devel/​17440
 +    * http://​www.neufbox4.org/​forum/​viewtopic.php?​pid=15930#​p15930
 +    * https://​github.com/​cubieb/​hg556a_source/​tree/​master/​bcmdrivers/​broadcom/​char/​adsl/​bcm96358 here seems to be a quite complete stack for bcm6348/58 kernel 2.6
 +  * -> [[inbox/​adsl_support]] effort to make it work again on Linux kernel 2.6.8.1 from 2004-08-14
 +
 +==== Dual Core ====
 +Some SoCs like BCM6358 or BCM6368 have two cores. BCM6358 only uses 1 core. Spite there being [[wp>​Symmetric multiprocessing|SMP]] code for using two cores in the kernel (see [[http://​lxr.free-electrons.com/​source/​arch/​mips/​kernel/​smp-bmips.c|smp-bmips.c]]),​ it seems hard to use both cores: it is needed to initialize the second cpu; also the irq code code currently only enables irqs on the first cpu, so only userspace can use the second core, all interrupt handlers will use the first one.
 +
 + -> [[doc:​hardware:​soc:​soc.broadcom.bcm63xx:​smp|SMP/​CMT Broadcom 63xx]]
 +
 +==== Finished tasks ====
 +The support for Broadcom 63xx is at this state :
 +
 +  * Full Linux support for BCM63xx with runtime detection of the SoC on which the kernel is running.
 +  * GPL drivers for Ethernet/​switch,​ OHCI, EHCI, SPI, Watchdog
 +  * Dual core partially supported in BM6362/6368 and no support in BCM6358.
 +  * NAND flash chips are supported since Linux kernel 4.2.
 +  * SPI driver has some bugs.
 +  * **No available drivers** (neither binary, nor GPL) for DSL, ATM, VoIP, on-board SLIC/SLAC
 +  * **Still not ported** to OpenWrt but with available drivers under the GPL:
 +    * [[#​Cipher_Engine|Cipher Engine]]
 +
 +==== How to help ====
 +  * Download: [[ftp://​downloads.netgear.com/​files/​GPL/​DG834GBv4_V5.01.01_src.zip|DG834GBv4 GPL and closed code]] and help writing specification for the DSL core, the place to host specifications is [[http://​bcm63xx.sipsolutions.net|BCM63xx at Sipsolutions.net]].
 +  * Improve the bcm63xx SPI driver.
 +  * Dual core SMP/CMT still needs further work, specially for BCM6358 with a shared TLB. If you know how to get rid of the problem of having a shared TLB between 2 cores, with working code, please contact with developers\\ see -> [[doc/​hardware/​soc/​soc.broadcom.bcm63xx/​smp#​tlb.exception.handlers|TLB exception handlers]]
 +  * BCM63168 with Kernel 3.4 source can be found here: [[https://​drive.google.com/​folderview?​id=0B-U-Krbg5qbTfkEwYkFpUkhVNFhlU3hPeWlZSUlmNlppTkpsODlSbm5FOElyV1p3MENCZlk&​usp=sharing|100AAJX8_4.16L.02A GPL and closed code]].
 +===== Existent 63xx variants =====
 +^ SoC ^ CPU MHz ^ Dual Core ^ RAM ^ USB Device ^ USB Host ^ PCMCIA/​PCCARD ^ PCI ^ PCIe ^ Wireless NIC ^ ADSL2 ^ ADSL2+ ^ VDSL ^ VDSL2 ^ Fiber ^ OpenWrt ^
 +| **{{tagpage>​bcm6318}}** |  333  |  ☐  |  DDR2  |  2.0  |  2.0  |  ☐  |  ☐  |  ✔  |  ☐  |  ✔  |  ✔  |  ☐  |  ☐  |  ☐  | |
 +| **{{tagpage>​bcm6328}}** |  320  |  ☐  |  DDR2  |  2.0  |  2.0  |  ☐  |  ☐  |  ✔  |  ☐  |  ✔  |  ✔  |  ☐  |  ☐  |  ☐  | 12.09 |
 +| **{{tagpage>​bcm6329}}** |  320  |  ✔  |  DDR2  |  2.0  |  2.0  |  ☐  |  ☐  |  ✔  |  ☐  |  ☐  |  ☐  |  ☐  |  ☐  |  ☐  | |
 +| **{{tagpage>​bcm6335}}** |  140  |   ​☐ ​ |  SDR  |  ☐   ​| ​ ☐  |  ☐  |  ☐  |  ☐  |  ☐  |  ✔  |  ☐  |  ☐  |  ☐  |  ☐  |  |
 +| **{{tagpage>​bcm6338}}** |  240  |  ☐  |  SDR  |  1.1  |  ☐   ​| ​ ☐  |  ☐  |  ☐  |  ☐  |  ✔  |  ✔  |  ☐  |  ☐  |  ☐  | [[http://​downloads.openwrt.org/​backfire/​10.03.1/​brcm63xx/​|10.03]] |
 +| **{{tagpage>​bcm6345}}** |  140  |  ☐  |  SDR  |  1.1  |  ☐   ​| ​ ✔  |  ☐  |  ☐  |  ☐  |  ✔  |  ☐  |  ☐  |  ☐  |  ☐  | [[http://​downloads.openwrt.org/​backfire/​10.03.1/​brcm63xx/​|10.03]] |
 +| **{{tagpage>​bcm6348}}** |  240<​nowiki>​|</​nowiki>​256 ​ |  ☐  |  SDR  |  1.1  |  1.1  |  ✔  |  ✔  |  ☐  |  ☐  |  ✔  |  ✔  |  ☐  |  ☐  |  ☐  | [[http://​downloads.openwrt.org/​backfire/​10.03.1/​brcm63xx/​|10.03]] |
 +| **{{tagpage>​bcm6358}}** |  300  |  ✔  |  DDR  |  2.0  |  2.0  |  ✔  |  ✔  |  ☐  |  ☐  |  ✔  |  ✔  |  ☐  |  ☐  |  ☐  | [[http://​downloads.openwrt.org/​backfire/​10.03.1/​brcm63xx/​|10.03]] |
 +| **{{tagpage>​bcm6359}}** |  300  |  ✔  |  DDR  |  2.0  |  2.0  |  ✔  |  ✔  |  ☐  |  ☐  |  ☐  |  ☐  |  ☐  |  ☐  |  ☐  | [[http://​downloads.openwrt.org/​backfire/​10.03.1/​brcm63xx/​|10.03]] |
 +| **{{tagpage>​bcm6361}}\\ {{tagpage>​bcm6362}}** |  400  |  ✔  |  DDR2  |  2.0  |  2.0  |  ☐  |  ☐  |  ✔  |  ✔  |  ✔  |  ✔  |  ☐  |  ☐  |  ☐  | [[https://​dev.openwrt.org/​changeset/​32923/​trunk|r32923]] |
 +| **{{tagpage>​bcm6367}}** |  400  |  ✔  |  DDR  |  2.0  |  2.0  |  ✔  |  ✔  |  ☐  |  ☐  |  ✔  |  ✔  |  ✔  |  ☐  |  ☐  | 12.09 |
 +| **{{tagpage>​bcm6368}}** |  400  |  ✔  |  DDR  |  2.0  |  2.0  |  ✔  |  ✔  |  ☐  |  ☐  |  ✔  |  ✔  |  ✔  |  ✔  |  ☐  | 12.09 |
 +| **{{tagpage>​bcm6369}}** |  400  |  ✔  |  DDR  |  2.0  |  2.0  |  ✔  |  ✔  |  ☐  |  ☐  |  ☐  |  ☐  |  ☐  |  ☐  |  ☐  | |
 +| **{{tagpage>​bcm63168}}\\ {{tagpage>​bcm63268}}** |  400  |  ✔  |  DDR2  |  2.0  |  2.0  |  ☐  |  ☐  |  ✔  |  ✔  |  ✔  |  ✔  |  ✔  |  ✔  |  ☐  |  |
 +| **{{tagpage>​bcm63169}}\\ {{tagpage>​bcm63269}}** |  400  |  ✔  |  ?  |  2.0  |  2.0  |  ☐  |  ☐  |  ✔  |  ✔  |  ☐  |  ☐  |  ☐  |  ☐  |  ☐  |  |
 +| **{{tagpage>​bcm6816}}** |  300  |  ✔  |  ?  |  2.0  |  2.0  |  ✔  |  ✔  |  ✔  |  ☐  |  ☐  |  ☐  |  ☐  |  ☐   ​| ​ ✔  |  |
 +| **{{tagpage>​bcm6818}}** |  400  |  ✔  |  ?  |  2.0  |  2.0  |  ✔  |  ✔  |  ✔  |  ☐  |  ☐  |  ☐  |  ☐  |  ☐   ​| ​ ✔  |  |
 +|**{{tagpage>​bcm63138}}**| ​ 1000  |  ✔  |  ?  |  3.0  |  3.0  |  ☐  |  ☐  |  ✔  |  ☐  |  ✔  |  ✔  |  ✔  |  ✔   ​| ​ ☐  |  |
 +
 +  * The third digit, when set to 3 (like in BCM6335, BCM6338) denotes a single-chip and cost-reduction oriented design.
 +  * There are also some other variants like bcm6341, which is a DSP used in VoIP products in conjunction with a BCM6348 SoC.
 +  * The bcm63138 supports G.fast, G.inp and SRA.
 +===== CPU caches =====
 +|  |  |  ^ icache ^^^^ dcache ^^^^^
 +|SoC | CPU version |  Core  |  Size (kB)  | Associativity |  Linesize (bytes) ​ | Cache policy ​ |  Size (kB) |  Associativity ​ |  Aliases ​ |  Linesize (bytes) ​ |  Cache policy ​ |
 +| BCM6348 | **BMIPS3300 V0.7** |  0  |  16  |  2-way  |  16  | VIPT  |  8 |  2-way  |  ☐  |  16  |  VIPT  |
 +| BCM6358 | **BMIPS4350 V1.0** |  0  |  32  |  2-way  |  16  | VIPT  |  16 |  2-way  |  ✔  |  16  |  VIPT  |
 +| ::: | ::: |  1  |  16  |  2-way  |  16  | VIPT  | ::: | ::: | ::: | ::: | ::: |
 +| BCM6368 | **BMIPS4350 V3.1** |  0  |  64  |  4-way  |  16  | VIPT  |  32 |  2-way  |  ✔  |  16  |  VIPT  |
 +| ::: | ::: |  1  |  64  |  4-way  |  16  | VIPT  | ::: | ::: | ::: | ::: | ::: |
 +| BCM6328 | **BMIPS4350 v7.5** |  0  |  32  |  4-way  |  16  | VIPT  |  32 |  2-way  |  ✔  |  16  |  VIPT  |
 +| BCM63168 | **BMIPS4350 V8.0** |  0  |  64  |  4-way  |  16  | VIPT  |  32 |  2-way  |  ✔  |  16  |  VIPT  |
 +| ::: | ::: |  1  |  64  |  4-way  |  16  | VIPT  | ::: | ::: | ::: | ::: | ::: |
 +**VIPT** = Virtually indexed, physically tagged
 +
 +See -> http://​www.linux-mips.org/​wiki/​Caches
 +
 +===== Internal BUS =====
 +  * **SSB**: 6348, 6358, 6368
 +  * **BCMA**: 6318, 6328, 6362, 63168, 63268
 +===== TRNG =====
 +[[wp>​Hardware_random_number_generator|Hardware random number generator]]
 +
 +Only available in **BCM6362, BCM6368, BCM6816**. GPL supported.
 +[[http://​lxr.free-electrons.com/​source/​drivers/​char/​hw_random/​bcm63xx-rng.c|bcm63xx-rng.c]]
 +[[http://​lxr.free-electrons.com/​source/​arch/​mips/​bcm63xx/​dev-rng.c|dev-rng.c]]
 +
 +To take advantage of this hardware feature, **rng-tools** should be installed.
 +
 +
 +===== Cipher Engine =====
 +BCM63xx SoCs have [[doc/​hardware/​cryptographic.hardware.accelerators|cryptographic hardware accelerators]]. The Cipher engine accelerates the IPSec protocol by using dedicated hardware blocks. BCM63XX SoCs (all family? FIXME) are implemented with the Encapsulating Security Payload (ESP) and Authentication Header (AH) IPSec protocols:
 +  * **AES and DES/3DES** hardware encryption and decryption.
 +    * AES in both Cipher Block Chaining (CBC) mode and Counter (CTR) mode. Can be performed in 128-, 192-, and 256-bit modes.
 +    * DES, 3DES in Cipher Block Chaining (CBC) mode
 +  * **HMAC-SHA1 and HMAC-MD5** authentication in hardware.
 +
 +This what Broadcom calls **SPU**. The driver is available with GPL
 +
 +http://​code.google.com/​p/​gfiber-gflt100/​source/​browse/​bcmdrivers/​opensource/​char/​spudd/​impl2/​
 +
 +this code isn't still ported to OpenWRT, thus no crypto acceleration available
 +
 +===== SPI =====
 +[[wp>​Serial_Peripheral_Interface_Bus|Serial Peripheral Interface]]
 +
 +Two types of SPI controllers are present in BCM63xx:
 +  * **SPI** : **Not** available in 6318, 6328, 6345
 +  * **HSSPI**: High speed SPI, **only** available in 6318, 6328, 6362, 63268 SoCs
 +
 +By default only one or two (more in newer SoCs) Slave Selects are available. Additional Slave Selects are at GPIO lines, but they need to be enabled.
 +| (SPI) | Slave Select 0 | Slave Select 1 | Slave Select 2 | Slave Select 3 | Slave Select 4 | Slave Select 5 |
 +| **BCM6348** |  ✔  |  GPIO29 ​ |  GPIO30 ​ |  GPIO31 ​ |  ☐  |  ☐  |
 +| **BCM6358** |  ✔  |  ✔  |  GPIO32 ​ |  GPIO33 ​ |  ☐  |  ☐  |
 +| **BCM6368**\\ **BCM6816**\\ **BCM6818** |  ✔  |  ✔  |  GPIO28 ​ |  GPIO29 ​ |  GPIO30 ​ |  GPIO31 ​ |
 +| **BCM6362** |  ✔  |  ✔  |  GPIO9  |  GPIO10 ​ |  ☐  |  ☐  |
 +
 +| (HSSPI) | Slave Select 0 | Slave Select 1 | Slave Select 2 | Slave Select 3 | Slave Select 4 | Slave Select 5 | Slave Select 6 | Slave Select 7 |
 +| **BCM6328** |  ✔  |  ✔  |  <​del>​GPIO9</​del>​ :?:  |  ☐  |  ☐  |  ☐  |  ☐  |  ☐  |
 +| **BCM6828** |  ✔  |  ✔  |  GPIO16 ​ |  GPIO17 ​ |  GPIO9  |  ☐  |  ☐  |  ☐  |
 +| **BCM63268** |  ✔  |  ✔  |  ✔  |  ✔  |  GPIO16 ​ |  GPIO17 ​ |  GPIO8  |  GPIO9  |
 +
 +Snippet code example for enabling these extra slave-selects at GPIOs:
 +
 +<code c>/* BCM6348 */
 + u32 val;
 + /* Enable Extra SPI CS */
 + /* GPIO 29 is SS1, GPIO 30 is SS2, GPIO 31 is SS2 */
 + val = bcm_gpio_readl(GPIO_MODE_REG);​
 + val |= GPIO_MODE_6348_G1_SPI_MASTER;​
 + bcm_gpio_writel(val,​ GPIO_MODE_REG);​
 +
 +/* BCM6358 */
 + u32 val;
 + /* Enable Overlay for SPI SS Pins */
 + val = bcm_gpio_readl(GPIO_MODE_REG);​
 + val |= GPIO_MODE_6358_EXTRA_SPI_SS;​
 + bcm_gpio_writel(val,​ GPIO_MODE_REG);​
 + /* Enable SPI Slave Select as Output Pins */
 +        /* GPIO 32 is SS2, GPIO 33 is SS3 */
 + val = bcm_gpio_readl(GPIO_CTL_HI_REG);​
 + val |= 0x0003;
 + bcm_gpio_writel(val,​ GPIO_CTL_HI_REG);​
 +
 +/* BCM6368 */
 + u32 val;
 + /* Enable Extra SPI CS */
 + val = bcm_gpio_readl(GPIO_MODE_REG);​
 + val |= (GPIO_MODE_6368_SPI_SSN2 | GPIO_MODE_6368_SPI_SSN3 | GPIO_MODE_6368_SPI_SSN4 | GPIO_MODE_6368_SPI_SSN5);​
 + bcm_gpio_writel(val,​ GPIO_MODE_REG);​
 + /* Enable SPI Slave Select as Output Pins */            ​
 +        /* GPIO 28 is SS2, GPIO 29 is SS3, GPIO 30 is SS4, GPIO 31 is SS5*/   
 + val = bcm_gpio_readl(GPIO_CTL_LO_REG);​
 + val |= (GPIO_MODE_6368_SPI_SSN2 | GPIO_MODE_6368_SPI_SSN3 | GPIO_MODE_6368_SPI_SSN4 | GPIO_MODE_6368_SPI_SSN5);​
 + bcm_gpio_writel(val,​ GPIO_CTL_LO_REG);​
 +    ​
 +/* BCM6328 */
 +#define SEL_SPI2 ​                8
 +#define PINMUX_SEL_SPI2_MASK ​    (3 << SEL_SPI2)
 +#define PINMUX_SEL_SPI2 ​         (2 << SEL_SPI2)
 + u32 val;
 + /* configure pinmux to SPI extra Slave Select */
 + val = bcm_gpio_readl(GPIO_PINMUX_OTHR_REG);​
 + val &= ~PINMUX_SEL_SPI2_MASK;​
 + bcm_gpio_writel(val,​ GPIO_PINMUX_OTHR_REG);​
 +                ​
 + val = bcm_gpio_readl(GPIO_PINMUX_OTHR_REG);​
 + val |= PINMUX_SEL_SPI2;​
 + bcm_gpio_writel(val,​ GPIO_PINMUX_OTHR_REG);​
 +
 +/* BCM63268 */
 +#define GPIO_MODE_63268_HSSPI_SSN4 (1 << 16)
 +#define GPIO_MODE_63268_HSSPI_SSN5 (1 << 17)
 +#define GPIO_MODE_63268_HSSPI_SSN6 (1 << 8)
 +#define GPIO_MODE_63268_HSSPI_SSN7 (1 << 9)
 + u32 val;
 + /* GPIO 16 is SS4, GPIO 17 is SS5, GPIO 8 is SS6, GPIO 9 is SS7*/   
 + val = bcm_gpio_readl(GPIO_MODE_REG);​
 + val |= (GPIO_MODE_63268_HSSPI_SSN4 | GPIO_MODE_63268_HSSPI_SSN5 | GPIO_MODE_63268_HSSPI_SSN6 | GPIO_MODE_63268_HSSPI_SSN7);​
 + bcm_gpio_writel(val,​ GPIO_MODE_REG);​
 +</​code>  ​
 +
 +===== GPIOs =====
 +[[doc/​hardware/​port.gpio|General Purpose Input/​Output]]
 +
 +On bcm63xx boards the GPIOs are used for diferent purposes:
 +  * **software leds**: the GPIOS are controled by the linux kernel, and can be user configured by using led triggers drivers.
 +  * **hardware leds**: the GPIOs are multiplexed to act as pure leds controled by hardware. The GPIO functionality is lost, avoiding to control them with Openwrt. They can monitor LAN activity, serial activity, and so on. They can be software controled again by writing some particular registers of the SoC.
 +  * **buttons**:​ configured as inputs, software controled using the polling method. Can be configured by the user to trigger events.
 +  * **other hardware**: some GPIOs are wired to hardware specific interfaces, such as PCI, PCMCIA, ethernet, UART, SPI, and so on. They are multiplexed and enabled by Openwrt during initialization of the board devices.
 +
 +Note bcm63xx GPIO drivers don't provide IRQs. As a result of this, if you install custom input drivers that require GPIO interrupts, they won't work.
 +
 +The amount of GPIOs of each SoC model is different:
 +|                | BCM6345 | BCM6338 | BCM6348 | BCM6358 | BCM6368 | BCM6318 | BCM6328 | BCM6362 | BCM63268 |
 +| **GPIO count** |  16     ​| ​ 8      |  37     ​| ​ 38     ​| ​   38   ​| ​ 64     ​| ​ 32     ​| ​ 48     ​| ​ 52      |
 +
 +When having more than 32 GPIOs they are splitted between 2 gpiochips. The labels in the Linux kernel are: 
 +  * ''​bcm63xx-gpio.0''​
 +  * ''​bcm63xx-gpio.1''​
 +
 +
 +==== External IRQs ====
 +
 +A few GPIOs are shared with external IRQs
 +| External interrupts |  IRQ_EXT_0 ​ |  IRQ_EXT_1 ​ |  IRQ_EXT_2 ​ |  IRQ_EXT_3 ​ |  IRQ_EXT_4 ​ | IRQ_EXT_5 ​ |
 +| **BCM6328** |  GPIO23 ​ |  GPIO24 ​ |  GPIO15 ​ |  GPIO12 ​ |  ☐  |  ☐  |
 +| **BCM6338** |  GPIO4* ​ |  GPIO5* ​ |  GPIO6* ​ |  GPIO7* ​ |  ☐  |  ☐  |
 +| **BCM6345** |  GPIO12* ​ |  GPIO13* ​ |  GPIO14* ​ |  GPIO15* ​ |  ☐  |  ☐  |
 +| **BCM6348** |  GPIO32 ​ |  GPIO33 ​ |  GPIO34 ​ |  GPIO35 ​ |  <color grey>​GPIO36</​color> ​ |  ☐  |
 +| **BCM6358** |  GPIO34 ​ |  GPIO35 ​ |  GPIO36 ​ |  GPIO37 ​ |  GPIO32 ​ |  GPIO33 ​ |
 +| **BCM6368** |  :::  |  :::  |  :::  |  :::  |  :::  |  :::  |
 +| **BCM63268** |  GPIO32 ​ |  GPIO33 ​ |  GPIO34 ​ |  GPIO35 ​ |  ☐  |  ☐  |
 +<​nowiki>​*)</​nowiki>​ Guessed
 +
 +Caveats:
 +  * IRQ_EXT_4 and IRQ_EXT_5 aren't defined in the kernel driver
 +  * IRQ_EXT_4 and IRQ_EXT_5 aren't implemented in BCM6358 SoC (OpenWrt ≤ BB). Proposed patch for Barrier Breaker -> http://​pastebin.com/​xaqJznWw
 +  * IRQ_EXT_4 in BCM6348 cannot be managed because it seems there isn't enough //CP0 CAUSE// registers to do the job.
 +  * Since Chaos Calmer version external IRQs are broken -> https://​dev.openwrt.org/​ticket/​21613
 +
 +
 +Snippet kernel code example: a button press triggers an IRQ, printing something on the console. Tested on BCM6348, Openwrt 12.09 and GPIO33 connected to an external button.
 +<code C>
 +#include <​linux/​kernel.h>​
 +#include <​linux/​err.h>​
 +#include <​linux/​module.h>​
 +#include <​linux/​spinlock.h>​
 +#include <​linux/​interrupt.h>​
 +
 +#include <​bcm63xx_cpu.h>​
 +#include <​bcm63xx_io.h>​
 +#include <​bcm63xx_regs.h>​
 +#include <​bcm63xx_irq.h>​
 +
 +static irqreturn_t gpio_interrupt(int irq, void *dev_id)
 +{
 + printk("​my IRQ triggered!!!!\n"​);​
 + return IRQ_HANDLED;​
 +}
 +
 +int bcm63xx_button_init(void)
 +{
 + int ret, irq;
 +
 + printk("​TEST IRQ (GPIO-button)\n"​);​
 + irq = IRQ_EXT_1;
 + ret = request_irq(irq,​ gpio_interrupt,​ 0, "​bcm63xx_extIRQ",​ NULL);
 + if (ret) {
 + printk(KERN_ERR "​bcm63xx-extIRQ:​ failed to register irq %d\n",​irq);​
 + return ret;
 + }
 + printk("​Mapped IRQ %d\n", irq );
 +
 + return 0;
 +}
 +
 +arch_initcall(bcm63xx_button_init);​
 +</​code>​
 +===== Bootloader =====
 +[[doc:​techref:​Bootloader]]:​ Some devices use [[doc:​techref:​bootloader:​RedBoot]] such as Inventel Liveboxes. Most of the others use [[doc:​techref:​bootloader:​CFE]] with a built-in LZMA decompressor. CFE is not using standard LZMA compression arguments, and most noticeably, changes the dictionary size, so beware. ​ Thomson routers have their own bootloader.
 +
 +There is released source code for RedBoot (Inventel Livebox), and probably can be modified to work with other routers. Also there is some source code for [[doc:​techref:​bootloader:​Uboot]].
 +
 +<WRAP center round download 80%>
 +  * TBSBOOT (crippled U-Boot) source code with the toolchain included for vx160 SoCs but with some code for bcm6338, bcm6348 and bcm6358: ​ [[https://​drive.google.com/​uc?​export=download&​id=0B-EMoBe-_OdBSjF3bFFtZEp2WGs|UBOOT-sourcecode-vx160.tar.gz]] ​
 +  * RedBoot source code for Inventel Liveboxes (bcm6348) : [[https://​drive.google.com/​uc?​export=download&​id=0B-EMoBe-_OdBa1BNajBvaGhEZU0|REDBOOT-sourcecode-blue5g.tar.gz]] ​
 +</​WRAP>​
 +
 +
 +
 +
 +On several CPE (Customer-premises equipment) hardware devices and especially on smart phones, the OEM bootloaders are feature poor (no netboot, no booting from a USB stick, etc.), obfuscated (require some magic values to be correct) or completely messed up and make it cumbersome, difficult or impossible to install free software on the device. It is thus paramount to always have at least some products available, that have OEM bootloaders that keep installing free software easy (cf. [[doc:​howto:​generic.flashing]]). And it could be interesting to port such bootloaders to devices, which happen to come with a restricted bootloader. Compare the available [[doc:​techref:​bootloader]] out there, their license, available code and feature sets. Please also remember that //available source code// it NOT enough, it has to be under some license, that allow for modification and redistribution.
 +
 +
 +===== Dump the flash =====
 +There exists an utility to backup the entire flash:\\
 +[[https://​github.com/​Noltari/​cfetool|cfetool]]\\
 +You must connect your PC with the bcm63xx router via serial TTL port while CFE is running. Then execute //cfetool// with a command like this, maybe different with different boot address / flash sizes.
 +<​code>​./​cfetool.py --read=dump.bin --addr=0xB8000000 --size=0x1000000 --block=0x10000
 +--addr=0xB8000000 -> Flash Memory Address (see CFE bootlog --> Boot Address)
 +--size=0x1000000 -> 16Mb Flash
 +--block=0x10000 -> Memory dumped each iteration (default is 10Kb 0x2800)</​code>​
 +cfetool expects the serial port used is /​dev/​ttyUSB0 in your PC, but you can change it with "​--serial=/​dev/​ttyUSB1"​.
 +
 +**Note**: not all CFEs have internally the dm/sm command, as a result of this cfetool may not work with some devices. Alternatively you can dump the flash via traditional methods like JTAG or with an OpenWrt ramdisk firmware version.
 +
 +
 +===== BCM6348 pinout =====
 +|  BCM6348 KPBG  |  BCM6348 SKFBG  |
 +| {{:​doc:​hardware:​soc:​bcm6348_kpbg_pinout.png?​300|}} | {{:​doc:​hardware:​soc:​bcm6348_skfbg_pinout.png?​300|}} |
 +===== BCM6361 partial pinout =====
 +{{:​media:​bcm6361ekfebg.png?​300|}}
 +
 +
 +===== Known 63xx platforms =====
 +==== Known 6345 platforms*: ====
 +<columns 100% 40%>
 +| [[http://​www.voyager.bt.com/​wireless_devices/​voyager_2100/​product_info.htm|BT Voyager 2100]] | 
 +| [[http://​www.dynalink.com.au/​modemsadsl_cur.htm?​prod=RTA230|Dynalink RTA230]] | 
 +| [[oldwiki:​openwrtdocs:​hardware:​dynalink:​rta770w|Dynalink RTA770W]] | 
 +| [[oldwiki:​openwrtdocs:​hardware:​linksys:​wag54gs|ZTE ZXDSL 831A]] | 
 +| [[http://​gigaset.siemens.com/​shc/​0,​1935,​hq_en_0_42931_rArNrNrNrN,​00.html|Siemens SE515]] | 
 +| [[http://​www.zhone.com/​products/​6211/​|Paradyne 6211-A1]] | 
 +| [[http://​www.usr.com/​images/​products/​product-emea.asp?​prod=9105|US Robotics USR9105]] | 
 +| [[http://​www.usr.com/​images/​products/​product-emea.asp?​prod=9106|US Robotics USR9106]] | 
 +| [[http://​www.belkin.com/​uk/​support/​product/?​lid=enu&​pid=F5D7632uk4A|Belkin F5D7632 v2]] | 
 +
 +<​newcolumn>​
 +---- datatable ----
 +cols  : Platform, Brand, %title%
 +filter: platform*~6345
 +sort  : Brand
 +----
 +</​columns>​
 +
 +
 +==== Known 6338 platforms*: ====
 +<columns 100% 40%>
 +| [[http://​ru.asus.com/​products.aspx?​l1=13&​l2=96&​l3=0&​l4=0&​model=1105&​modelmenu=1|ASUS AM602]] | 
 +| [[oldwiki:​openwrtdocs:​hardware:​huawei:​echolife.hg520|Huawei EchoLife HG510]] | 
 +| [[http://​www.netgear.co.uk/​adsl_ethernet_modem_dm111p.php|Netgear DM111P]] | 
 +| [[http://​www.dynalink.co.nz/​modemsadsl_cur.htm?​prod=RTA1320|Dynalink RTA1320]] [[http://​www.nateks-networks.ru/​content/​view/​44/​45/​|(Nateks Unispot21)]] | 
 +| [[oldwiki:​openwrtdocs:​hardware:​siemens:​cl110|Siemens CL 110]] | 
 +| [[http://​zhone.com/​products/​6211/​|Zhone 6211]] | 
 +| [[http://​zhone.com/​products/​6212/​|Zhone 6212-l2/​-l3]] | 
 +| [[http://​www.tp-link.com/​products/​product_des.asp?​id=44|tp-link tp-8840]] | 
 +| Thomson SpeedTouch ST516 v6 |
 +| Thomson SpeedTouch ST530 v6 (same as above with USB port)|
 +
 +<​newcolumn>​
 +---- datatable ----
 +cols  : Platform, Brand, %title%
 +filter: platform*~6338
 +sort  : Brand
 +----
 +</​columns>​
 +
 +
 +==== Some 6348 platforms*: ====
 +<columns 100% 40%>
 +| [[https://​h10145.www1.hp.com/​downloads/​SoftwareReleases.aspx?​ProductNumber=JE457A|3Com 3CRWDR200A-75]] | 
 +| [[http://​www.asus.com/​Networks/​ADSL_Modem_Routers/​AM604|ASUS AM604]] | 
 +| [[http://​www.asus.com/​Networks/​ADSL_Modem_Routers/​AM604g/​|ASUS AM604g]] | 
 +| [[http://​www.asus.com/​Networks/​ADSL_Modem_Routers/​WL600g/​|ASUS]] [[toh:​asus/​wl600g| WL-600G]] | 
 +| [[http://​www.asus.com/​Networks/​ADSL_Modem_Routers/​AM200g/​|ASUS]] [[oldwiki:​openwrtdocs:​hardware:​asus:​am200g| AM200G]] | 
 +| [[oldwiki:​openwrtdocs:​hardware:​belkin:​f5d7633_4|Belkin f5d7633-4]] | 
 +| [[oldwiki:​openwrtdocs:​hardware:​bt:​voyager2091|BT Voyager 2091]] | 
 +| [[toh:​comtrend/​ct5621|Comtrend CT-5621]]| ​
 +| [[toh:/​comtrend/​ct536plus|Comtrend CT-536+ / HG-536+]] | 
 +| [[toh/​netcomm/​nb9w|Comtrend CT-638/1]] | 
 +| [[http://​www.dynalink.co.nz/​cms/​index.php?​page=rta1046vw|Dynalink RTA1046VW]] | 
 +| Freebox v4 |
 +| Freebox v5 | 
 +| [[toh:​t-com:​spw500v|T-Com Speedport W500V (Hitachi AH4021)]] | 
 +| [[oldwiki:​openwrtdocs:​hardware:​huawei:​echolife_hg520|Huawei EchoLife HG520]] | 
 +| [[oldwiki:​openwrtdocs:​hardware:​huawei:​hg550|Huawei EchoLife HG550]] | 
 +| [[toh:​inventel:​DV4210|Inventel Livebox]] | 
 +| [[oldwiki:​openwrtdocs:​hardware:​linksys:​wag54gs|Linksys WAG54GS]] | 
 +| [[toh:​linksys:​wag54gx2|Linksys WAG54GX2]] | 
 +| [[http://​homesupport.cisco.com/​en-eu/​support/​gateways/​WAG325N|Linksys WAG325N]] | 
 +| [[http://​homesupport.cisco.com/​en-eu/​support/​gateways/​WAG300N|Linksys WAG300N]] | 
 +| [[http://​support.netcommwireless.com/​product/​xdsl/​nb8w|Netcomm NB8W]] (Re-branded Comtrend CT-536) | 
 +| [[http://​support.netcommwireless.com/​product/​voip/​nb9|Netcomm NB9]] (Re-branded Comtrend CT-638) | 
 +| [[:​toh:​netcomm:​nb9w|Netcomm NB9W]] (Re-branded Comtrend CT-638) | 
 +| [[toh/​netgear/​dg834gt|Netgear DG834GT]] | 
 +| [[http://​support.netgear.com/​product/​DG834PN|Netgear DG834PN]] | 
 +| [[toh:​pirelli/​aga|Pirelli Alice Gate+ Wi-Fi]] | 
 +| [[toh:​pirelli/​a125g|Pirelli DRG A125G]] |
 +| [[toh:​sagem:​fast2404|Sagem F@ST2404]] | 
 +| [[toh/​thomson/​tg605|Thomson Speedtouch TG605/​TG605S]] | 
 +| [[toh/​thomson/​st716|Thomson Speedtouch ST716(g)]] | 
 +| [[toh/​thomson/​st780|Thomson Speedtouch ST780(i)WL]] | 
 +| [[toh/​thomson/​st7g|Thomson Speedtouch 7G]] | 
 +| [[http://​www.usr-emea.com/​support/​s-prod-template.asp?​loc=unkg&​prod=9107|US Robotics]] [[:​toh:​us.robotics:​usr9107| USR9107]]| ​
 +| [[http://​www.usr-emea.com/​support/​s-prod-template.asp?​loc=unkg&​prod=9108|US Robotics]] [[:​toh:​us.robotics:​usr9108| USR9108]]| ​
 +| [[http://​zhone.com/​products/​6218/​|Zhone 6218]] | 
 +| [[http://​zhone.com/​products/​6238/​|Zhone 6238]] | 
 +| [[oldwiki:​openwrtdocs:​hardware:​linksys:​wag54gs|ZTE ZXDSL 831CII]] | 
 +
 +<​newcolumn>​
 +---- datatable ----
 +cols  : Platform, Brand, %title%
 +filter: platform*~6348
 +sort  : Brand
 +----
 +</​columns>​
 +
 +
 +==== Some 6358 platforms*: ====
 +<columns 100% 40%>
 +| [[toh:​comtrend/​ct6373|Comtrend CT-6373]]|
 +| [[oldwiki:​openwrtdocs:​hardware:​buffalo:​wbmr-g300n|Buffalo WBMR-G300N]] | 
 +| [[http://​www.dlink.com/​products/?​pid=567|D-Link DSL-2640B]] | 
 +| [[toh:​d-link:​dsl-2650u|DSL-2650U/​BRU/​D]] |
 +| [[http://​www.dlink.co.uk/​cs/​Satellite?​c=Product_C&​childpagename=DLinkEurope-GB%2FDLProductCarousel&​cid=1197319446523&​p=1197318962342&​packedargs=ParentPageID%3D1197318962321%26TopLevelPageProduct%3DConsumer%26locale%3D1195806691854%26packedargs%3DProductParentID%253D1195808621247&​pagename=DLinkEurope-GB%2FDLWrapper|D-Link DSL-2740B hw C2, C3]] |  ​
 +| [[oldwiki:​openwrtdocs:​hardware:​netcomm:​nb9wmaxx|Netcomm NB9WMAXX]] | 
 +| [[oldwiki:​openwrtdocs:​hardware:​netgear:​dg834n|Netgear DG834N]] | 
 +| [[oldwiki:​openwrtdocs:​hardware:​neuf:​neufbox4|Neuf Box 4]] | 
 +| [[toh:​pirelli/​agpf|ALICE GATE VoIP 2 Plus Wi-Fi Business]] | 
 +| [[http://​www.usr-emea.com/​products/​p-broadband-product.asp?​prod=bb-9113&​loc=unkg|US Robotics USR9113]] | 
 +| [[http://​zhone.com/​products/​6228/​|Zhone 6228]] | 
 +| [[toh:​BT::​homehub_v2a|BT Homehub 2 Type A]] |
 +| Thomson TG784 |
 +
 +<​newcolumn>​
 +---- datatable ----
 +cols  : Platform, Brand, %title%
 +filter: platform*~6358
 +sort  : Brand
 +----
 +</​columns>​
 +
 +
 +==== Some 6328 platforms*: ====
 +<columns 100% 40%>
 +| [[toh:​adb/​p.dg_a4001n1|ADB P.DG A4001N1]]|
 +| [[toh:​comtrend/​ar5381u|Comtrend AR-5381u]]|
 +| [[toh:​comtrend/​ar5387un|Comtrend AR-5387un]]|
 +| [[toh:​d-link/​dsl-2740b|D-Link DSL-2740B/​DSL-2741B]]|
 +
 +<​newcolumn>​
 +---- datatable ----
 +cols  : Platform, Brand, %title%
 +filter: platform=Broadcom BCM6328
 +sort  : Brand
 +----
 +</​columns>​
 +
 +
 +==== Known 6361 platforms*: ====
 +<columns 100% 40%>
 +| [[toh:​bt:​homehub_v3b|BT HomeHub 3.0b]]|
 +| [[toh/​sercom/​shg1500|Sercom SHG1500]] AKA Vodafone Station 2 |
 +| [[toh/​aztech/​aztech_dsl7002grv_s|Aztech DSL7002GRV(S)]] (commonly shipped to Fibre customers by Singtel in Singapore) |
 +
 +<​newcolumn>​
 +---- datatable ----
 +cols  : Platform, Brand, %title%
 +filter: platform*~6361
 +sort  : Brand
 +----
 +</​columns>​
 +
 +
 +==== Known 6362 platforms*: ====
 +<columns 100% 40%>
 +| [[http://​www.att.com/​equipment/​accessory-details/?​q_sku=sku5480277|Motorola NVG510]] Commonly used with AT&T copper Uverse, which supports VOIP but not TV. (Motorola GPL [[http://​sourceforge.net/​motorola/​nvg510/​home/​Home/​|source]]). Also on [[http://​www.wikidevi.com/​wiki/​Motorola_NVG510|WikiDevi]]|
 +| [[http://​www.netgear.com/​home/​products/​wirelessrouters/​high-performance/​DGND3700.aspx|Netgear DGND3700 (v2)]] |
 +
 +<​newcolumn>​
 +---- datatable ----
 +cols  : Platform, Brand, %title%
 +filter: platform*~6362
 +sort  : Brand
 +----
 +</​columns>​
 +
 +
 +==== Known 6368 platforms*: ====
 +<columns 100% 40%>
 +| [[http://​free.fr/​adsl|Freebox Server]] |
 +| [[http://​www.zyxel.com/​fi/​fi/​products_services/​p_870hn_51b.shtml|ZyXEL P-870HN-51b]] (commonly shipped to VDSL2 customers by Sonera in Finland) |
 +| [[http://​www.zyxel.com/​products_services/​p_870hn_5xb_series.shtml?​t=p|ZyXEL P-870HN-53b]] (commonly shipped to ADSL/VDSL customers by T-Mobile in Czech Republic) |
 +| [[http://​www.netgear.com/​service-provider/​products/​routers-and-gateways/​dsl-gateways/​vvg2000.aspx|NETGEAR VVG2000]] (sold to VDSL2 customers by Bezeq in Israel) |
 +| [[http://​www.dlink.ru/​mn/​products/​5/​1349.html|D-Link DSL-6740U]] (sold to VDSL2 customers by Bezeq in Israel) |
 +| [[http://​www.cisco.com/​en/​US/​products/​ps11999/​index.html|Cisco 867-VAE]]|
 +| [[http://​www.netgear.com/​home/​products/​wirelessrouters/​high-performance/​DGND3700.aspx|Netgear DGND3700 (v1)]] |
 +| [[http://​intenogroup.com/​store/​tabid/​88/​categoryid/​3/​productid/​2/​default.aspx|Inteno DG201]] |
 +| [[toh/​thomson/​tg789vn|Thomson TG789vn]] | 
 +| [[toh/​comtrend/​vr3025u|Comtrend VR-3025u]] | 
 +| [[toh/​comtrend/​vr3025un|Comtrend VR-3025un]] | 
 +| [[http://​www.actiontec.com/​216.html|Actiontec Q2000]] (commonly shipped to VDSL2 customers of Centurylink/​Qwest) |
 +
 +<​newcolumn>​
 +---- datatable ----
 +cols  : Platform, Brand, %title%
 +filter: platform*~6368
 +sort  : Brand
 +----
 +</​columns>​
 +
 +
 +==== Known 63168 platforms*: ====
 +<columns 100% 40%>
 +| [[http://​www.airties.com/​products/​dslgw/​Air5650| Airties Air 5650]] (commonly shipped to TTnet Hipernet customers in Turkey) |
 +| [[toh:​d-link:​dsl-6850u|D-Link DSL6850U]] |
 +| SmartRG sr630n - 5-port VDSL modem, already runs some custom linux distribution |
 +| [[https://​wikidevi.com/​wiki/​SmartRG_SR505N|SmartRG SR505N]], also a VDSL modem, [[https://​www.dslreports.com/​forum/​r28868424-SmartRG-SR505N-w-Tomato-WRT-w-SL-MLPPP|maybe working with Tomato?]] |
 +| [[http://​www.slovanet.net/​sk/​zariadenia/​internet/​internetove-zariadenia/​adb-vv3212.html| ADB VV3212]] (Distributed by Slovak Telekom) |
 +| [[http://​opensource.actiontec.com/​t1200x.html|Actiontec T1200H]] |
 +| [[http://​opensource.actiontec.com/​t2200x.html|Actiontec T2200H]] |
 +| [[http://​www.kasda.cn/​product_info.asp?​id=199|Kasda KW5212, also a VDSL modem.]] |
 +
 +<​newcolumn>​
 +---- datatable ----
 +cols  : Platform, Brand, %title%
 +filter: platform*~63168
 +sort  : Brand
 +----
 +</​columns>​
 +
 +
 +==== Known 63268 platforms*: ====
 +<columns 100% 40%>
 +| [[:​toh:​inteno/​dg301b|Inteno DG301]] (commonly shipped to Sonera customers in Finland) |
 +| [[http://​www.technicolor.com/​en/​solutions-services/​connected-home/​modems-gateways/​xdsl-modems-gateways/​smart-vdsl-gateway|Technicolor TG799Svn v2]] (commonly shipped to Telia customers in Sweden) |
 +| [[https://​wikidevi.com/​wiki/​ZyXEL_C1000Z|Zyxel C1000Z]]|
 +
 +<​newcolumn>​
 +---- datatable ----
 +cols  : Platform, Brand, %title%
 +filter: platform*~63268
 +sort  : Brand
 +----
 +</​columns>​
 +
 +===== Tags =====
 +{{tag>​bcm63xx bcm6318 bcm6328 bcm6338 bcm6345 bcm6348 bcm6358 bcm6361 bcm6362 bcm6368 bcm6816 bcm6818 bcm63168 bcm63268 }}