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
docs:techref:hardware:soc:soc.broadcom.bcm63xx:pinmux [2018/12/18 09:14] danitooldocs:techref:hardware:soc:soc.broadcom.bcm63xx:pinmux [2020/05/24 22:21] (current) – [BCM6348 GPIO pinmux] danitool
Line 3: Line 3:
 Size: 4 bytes Size: 4 bytes
  
-|    ^  GROUP0  ^  GROUP1                 ^^  GROUP2    GROUP3            ^^  GROUP4                ^^ +^ GPIO ^  GROUP0  ^  GROUP1                 ^^^  GROUP2    GROUP3            ^^  GROUP4                ^^ 
-                                  ||                              || UTO TXD4 | LEGACY LED 0 | +^  REG |  0x7    |  0x40  |  0x60  |  0x80  |   0x500      0x7000  |  0x8000  |  0x30000  |  0x80000 
-                                  ||                              || UTO TXD5 | LEGACY LED 1 | +^  0   |                                  |||                              || LEGACY LED 0 | UTO TXD4 
-                                  ||                              || UTO TXD6 | LEGACY LED 2 | +^  1   |                                  |||                              || LEGACY LED 1 | UTO TXD5 
-                                  ||                              || UTO TXD7 | LEGACY LED 3 | +^  2   |                                  |||                              || LEGACY LED 2 | UTO TXD6 
-                                  ||                              || UTO RXD4 |              +^  3   |                                  |||                              || LEGACY LED 3 | UTO TXD7 
-                                  ||                              || UTO RXD5 |              +^  4   |                                  |||                              ||              | UTO RXD4 | 
-                                  ||                              || UTO RXD6 |              +^  5   |                                  |||                              ||              | UTO RXD5 | 
-^ 7  |                                  ||                              || UTO RXD7 |              +^  6   |                                  |||                              ||              | UTO RXD6 | 
-                                  ||           | MII RXD0 | UTO RXD0 |                        || +   |                                  |||                              ||              | UTO RXD7 | 
-                                  ||           | MII RXD1 | UTO RXD1 |                        || +^  8   |                                  |||           | MII RXD0 | UTO RXD0 |                        || 
-^ 10 |                                  ||           | MII RXD2 | UTO RXD2 |                        || +^  9   |                                  |||           | MII RXD1 | UTO RXD1 |                        || 
-^ 11 |                                  ||           | MII RXD3 | UTO RXD3 |                        || + 10  |                                  |||           | MII RXD2 | UTO RXD2 |                        || 
-^ 12 |                                  ||           | MII TXD0 | UTO TXD0 |                        || + 11  |                                  |||           | MII RXD3 | UTO RXD3 |                        || 
-^ 13 |                                  ||           | MII TXD1 | UTO TXD1 |                        || + 12  |                                  |||           | MII TXD0 | UTO TXD0 |                        || 
-^ 14 |        |                          ||           | MII TXD2 | UTO TXD2 |                        || + 13  |                                  |||           | MII TXD1 | UTO TXD1 |                        || 
-^ 15 |                                  ||           | MII TXD3 | UTO TXD3 |                        || + 14          |                          |||           | MII TXD2 | UTO TXD2 |                        || 
-^ 16 |                                  || PCI INTA# |                    ||                        || + 15  |                                  |||           | MII TXD3 | UTO TXD3 |                        || 
-^ 17 |                                  || PCI REQ0# |                    ||                        || + 16  |                                  ||| PCI INTA# |                    ||                        || 
-^ 18 |                                  || PCI REQ1# |                    ||                        || + 17  |                                  ||| PCI REQ0# |                    ||                        || 
-^ 19 |                                  || PCI GNT0# |                    ||                        || + 18  |                                  ||| PCI REQ1# |                    ||                        || 
-^ 20 |                                  || PCI GNT1# |                    ||                        || + 19  |                                  ||| PCI GNT0# |                    ||                        || 
-^ 21 |                                  || PCI IDSEL |                    ||                        || + 20  |                                  ||| PCI GNT1# |                    ||                        || 
-^ 22 |         | PCCARD READY | UART DCD             |                    ||                        || + 21  |                                  ||| PCI IDSEL |                    ||                        || 
-^ 23 |         | PCCARD CCD1  | UART RI    |           |                    ||                        || + 22  |         | PCCARD READY | UART DCD |               |                    ||                        || 
-^ 24 |         | PCCARD CCD2  | UART DSR             |                    ||                        || + 23  |         | PCCARD CCD1  | UART RI                |                    ||                        || 
-^ 25 |         | PCCARD VS1   | UART CTS             |                    ||                        || + 24  |         | PCCARD CCD2  | UART DSR |               |                    ||                        || 
-^ 26 |         | PCCARD VS2   | UART DTR             |                    ||                        || + 25  |         | PCCARD VS1   | UART CTS |               |                    ||                        || 
-^ 27 |                      | UART RTS             |                    ||                        || + 26  |         | PCCARD VS2   | UART DTR |               |                    ||                        || 
-^ 28 |                      | UTO RXADDR0|           |                    ||                        || + 27  |         PCCARD CREQ# | UART RTS |               |                    ||                        || 
-^ 29 |         | SPI SS1      | UTO RXADDR1|           |                    ||                        || + 28  |                      |          | UTO RXADDR0 |            |                    ||                        || 
-^ 30 |         | SPI SS2      | UTO TXADDR0|           |                    ||                        || + 29  |         |              | SPI SS1  | UTO RXADDR1 |            |                    ||                        || 
-^ 31 |         | SPI SS3      | UTO TXADDR1|           |                    ||                        || + 30  |         |              | SPI SS2  | UTO TXADDR0 |            |                    ||                        || 
-^ 32 | MII MDC |                          ||                              ||                        || + 31  |         |              | SPI SS3  | UTO TXADDR1 |            |                    ||                        || 
-^ 32 | EXT IRQ1                         ||                              ||                        || + 32  | MII MDC |  <color grey>EXT IRQ0</color>                                                    |||||||| 
-^ 33 | EXT IRQ2                         ||                              ||                        || + 33          |  <color grey>EXT IRQ1</color>                                                    |||||||| 
-^ 34 | EXT IRQ3                         ||                              ||                        || + 34          |  <color grey>EXT IRQ2</color>                                                    |||||||| 
-^ 35 | EXT IRQ4                         ||                              ||                        || + 35           <color grey>EXT IRQ3</color>                                                    |||||||| 
-^ 36 | EXT IRQ5                         ||                              ||                        ||+ 36          |  <color grey>EXT IRQ4</color>                                                    |||||||| 
 + 
 +**Note**: the EXT IRQs are shared with the GPIO function, they don't need to be enabled by any gpio mode group.
  
 Code from Broadcom GPL (//6348_map_part.h// file): Code from Broadcom GPL (//6348_map_part.h// file):
Line 53: Line 55:
 #define         GROUP3_DIAG             0x00009000 #define         GROUP3_DIAG             0x00009000
 #define         GROUP3_UTOPIA           0x00008000 #define         GROUP3_UTOPIA           0x00008000
-#define         GROUP3_EXT_MII          0x00007000+#define         GROUP3_EXT_MII          0x00007000 // presumable use
 #define         GROUP2_DIAG             0x00000900 #define         GROUP2_DIAG             0x00000900
-#define         GROUP2_PCI              0x00000500+#define         GROUP2_PCI              0x00000500 // presumable use
 #define         GROUP1_DIAG             0x00000090 #define         GROUP1_DIAG             0x00000090
 #define         GROUP1_UTOPIA           0x00000080 #define         GROUP1_UTOPIA           0x00000080
 #define         GROUP1_SPI_UART         0x00000060 #define         GROUP1_SPI_UART         0x00000060
-#define         GROUP1_SPI_MASTER       0x00000060 +#define         GROUP1_SPI_MASTER       0x00000060 // presumable use 
-#define         GROUP1_MII_PCCARD       0x00000040+#define         GROUP1_MII_PCCARD       0x00000040 // presumable use
 #define         GROUP1_MII_SNOOP        0x00000020 #define         GROUP1_MII_SNOOP        0x00000020
 #define         GROUP1_EXT_EPHY         0x00000010 #define         GROUP1_EXT_EPHY         0x00000010
 #define         GROUP0_DIAG             0x00000009 #define         GROUP0_DIAG             0x00000009
-#define         GROUP0_EXT_MII          0x00000007+#define         GROUP0_EXT_MII          0x00000007 // presumable use
 </code> </code>
  
-===== Tags ===== 
-[[meta:tags|How to add tags]] 
-{{tag>bcm63xx bcm6348 gpio}} 
  
 +Code from Broadcom GPL, enabling some GPIO modes. (File ''linux/arch/mips/brcm-boards/bcm963xx/setup.c'')
 +
 +<code c>static int __init bcm6348_hw_init(void)
 +{
 +    unsigned long data;
 +    unsigned short GPIOOverlays;
 +
 +    /* Set MPI clock to 33MHz and Utopia clock to 25MHz */
 +    data = PERF->pll_control;
 +    data &= ~MPI_CLK_MASK;
 +    data |= MPI_CLK_33MHZ;
 +    data &= ~MPI_UTOPIA_MASK;
 +    data |= MPI_UTOPIA_25MHZ; /* 6348 utopia frequency has to be 25MHZ */
 +    PERF->pll_control = data;
 +
 +    /* Enable SPI interface */
 +    PERF->blkEnables |= SPI_CLK_EN;
 +
 +    GPIO->GPIOMode = 0;
 +
 +    if( BpGetGPIOverlays(&GPIOOverlays) == BP_SUCCESS ) {
 +
 +        if (GPIOOverlays & BP_UTOPIA) {
 +            /* Enable UTOPIA interface */
 +            GPIO->GPIOMode |= GROUP4_UTOPIA | GROUP3_UTOPIA | GROUP1_UTOPIA;
 +            PERF->blkEnables |= SAR_CLK_EN;
 +        }
 +
 +        if (GPIOOverlays & BP_MII2) {
 +            if (GPIOOverlays & BP_UTOPIA) {
 +                printk ("*************** ERROR ***************\n");
 +                printk ("Invalid GPIO configuration. External MII cannot be enabled with UTOPIA\n");
 +            }
 +            /* Enable external MII interface */
 +            GPIO->GPIOMode |= (GROUP3_EXT_MII|GROUP0_EXT_MII); /*  */
 +        }
 +
 +        if (GPIOOverlays & BP_SPI_EXT_CS) {
 +            if (GPIOOverlays & BP_UTOPIA) {
 +                printk ("*************** ERROR ***************\n");
 +                printk ("Invalid GPIO configuration. SPI Extra CS cannot be enabled with UTOPIA\n");
 +            }
 +            /* Enable Extra SPI CS */
 +            GPIO->GPIOMode |= GROUP1_SPI_MASTER;
 +        }
 +
 +#if defined(CONFIG_PCI)
 +        if (GPIOOverlays & BP_PCI) {
 +            /* Enable PCI interface */
 +            GPIO->GPIOMode |= GROUP2_PCI | GROUP1_MII_PCCARD;
 +
 +            mpi_init();
 +            if (GPIOOverlays & BP_CB) {
 +                mpi_DetectPcCard();
 +            }
 +            else {
 +                /*
 +                 * CardBus support is defaulted to Slot 0 because there is no external
 +                 * IDSEL for CardBus.  To disable the CardBus and allow a standard PCI
 +                 * card in Slot 0 set the cbus_idsel field to 0x1f.
 +                */
 +                data = MPI->pcmcia_cntl1;
 +                data |= CARDBUS_IDSEL;
 +                MPI->pcmcia_cntl1 = data;
 +            }
 +        }
 +#endif
 +    }
 +</code>
 +
 +===== Devices =====
 +The list of related devices:
 +{{tagpage>bcm6348}},
 +{{tagpage>bcm63xx}},
 +{{tagpage>gpio}}
  
  • Last modified: 2018/12/18 09:14
  • by danitool