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/03/31 23:22] – ↷ Page moved from docs:hardware:soc:soc.broadcom.bcm63xx:pinmux to docs:techref:hardware:soc:soc.broadcom.bcm63xx:pinmux bobafetthotmaildocs: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
  
-^ GPIO pin HW pinmux bits peripheral  comments +^ GPIO ^  GROUP0  ^  GROUP1                 ^^^  GROUP2    GROUP3            ^^  GROUP4                ^^ 
-0        ''LED0''   | ''0x00030000''  Legacy LEDs no known BCM6348 based board uses Legacy LEDs + REG |  0x7    |  0x40  |  0x60  |  0x80  |   0x500      0x7000   0x8000   0x30000  |  0x80000  
-1        ''LED1''      | :::         |   :::         |   :::         |    +   |                                  |||                              || LEGACY LED 0 | UTO TXD4 | 
-^ 2        | ''LED2''     :::         |   :::           :::            +^  1           |                          |||                              || LEGACY LED 1 | UTO TXD5 | 
-^ 3        ''LED3''      | :::         |   :::           :::            +   |                                  |||                              || LEGACY LED 2 | UTO TXD6 | 
-^ 4        | ''RXD4''   |       UTOPIA  | | +   |                                  |||                              || LEGACY LED 3 | UTO TXD7 | 
-^ 5        | ''RXD5''   | :::     :::  ::: + 4                                    |||                              ||              | UTO RXD4 
-^ 6        | ''RXD6''   | :::     :::  ::: + 5                                    |||                              ||              | UTO RXD5 
-^ 7        | ''RXD7''   | :::     :::  ::: + 6                                    |||                              ||              | UTO RXD6 
-^ 8        ''TXD0''     ''0x00007007'' MII external phy required when the board is equiped with a BCM5325 switch or an AC101L external MII phy transceiver + 7                                    |||                              ||              | UTO RXD7 
-^ 9        ''TXD1''      | :::         |   :::           :::         +                                    |||           MII RXD0 | UTO RXD0 |                        |
-^ 10       | ''TXD2''      :::         |   :::           :::         +   |                                  |||           | MII RXD1 | UTO RXD1 |                        || 
-^ 11       ''RXEN''      | :::         |   :::           :::         + 10  |                                  |||           | MII RXD2 | UTO RXD2 |                        || 
-^ 12       ''RXD0''      | :::         |   :::           :::         + 11  |                                  |||           | MII RXD3 | UTO RXD3 |                        || 
-^ 13       | ''RXD1''      :::         |   :::           :::         + 12  |                                  |||           | MII TXD0 | UTO TXD0 |                        || 
-^ 14       ''RXD2''      | :::         |   :::           :::         + 13  |                                  |||           | MII TXD1 | UTO TXD1 |                        || 
-^ 15       | ''RXD3''      :::         |   :::           :::         + 14  |                                  |||           | MII TXD2 | UTO TXD2 |                        || 
-^ 16       ''INTB#''     ''0x00000500'' mini PCI   REQ1and GNT1# are for the second miniPCI slot + 15  |                                  |||           | MII TXD3 | UTO TXD3 |                        || 
-^ 17       ''REQ0#''     :::           :::           :::         + 16                                   ||| PCI INTA|                    ||                        |
-^ 18       ''REQ1#''     :::           :::           :::         + 17          |                          ||| PCI REQ0# |                    ||                        |
-^ 19       ''GNT0#''     :::           :::           :::         + 18          |                          ||| PCI REQ1# |                    ||                        |
-^ 20       ''GNT1#''     :::           :::           :::         + 19          |                          ||| PCI GNT0# |                    ||                        |
-^ 21       ''RST#''     | :::         |   :::           :::         + 20          |                          ||| PCI GNT1# |                    ||                        |
-^ 22       | ''CINT# | <color green>DCD</color>''  ''0x00000040''\\ ''<color green>0x00000060 ?</color>'' CardBus (PCCARD)\\ <color green>UART</color> | | + 21  |                                  ||| PCI IDSEL |                    ||                        || 
-^ 23       ''CCD1<color green>RI</color>''   :::           :::            :::         + 22  |         | PCCARD READY | UART DCD |    |            |                    ||                        || 
-^ 24       ''CCD2<color green>DSR</color>''  :::           :::           :::         + 23          | PCCARD CCD1  UART RI                                   ||                        || 
-^ 25       | ''CVS1# | <color green>CTS</color>''  :::         |   :::           :::         + 24          | PCCARD CCD2  UART DSR |                                  ||                        || 
-^ 26       | ''CVS2# | <color green>DTR</color>''  :::         |   :::           :::         + 25  |         PCCARD VS1   | UART CTS |    |            |                    ||                        |
-^ 27       ''CREQ# | <color green>RTS</color>''  :::           :::           :::         + 26  |         PCCARD VS2   | UART DTR |    |            |                    ||                        |
-^ 28       | ''RXADDR''  unknown     UTOPIA       | | + 27          | PCCARD CREQ# | UART RTS |                                  ||                        || 
-^ 29       ''SS1#''     ''0x00000060'' | SPI        | | + 28  |                               | UTO RXADDR0 |            |                    ||                        || 
-^ 30       ''SS2#''     :::           :::           :::         + 29                       | SPI SS1  | UTO RXADDR1 |            |                    ||                        || 
-^ 31       ''SS3#''     :::           :::           :::         + 30          |              | SPI SS2  UTO TXADDR0                               ||                        || 
-^ 32       ''MDC''   ''0x00007007'' MII external phy | + 31          |              | SPI SS3  UTO TXADDR1                               ||                        || 
-^ :::      ''extIRQ0''  n/a         external IRQs no bits for enabling IRQs, shared media + 32  MII MDC |  <color grey>EXT IRQ0</color>                                                    |||||||| 
-^ 33       | ''extIRQ1''  :::         |   :::           :::         + 33  |          <color grey>EXT IRQ1</color>                                                    |||||||| 
-^ 34       | ''extIRQ2''  :::         |   :::           :::         + 34  |          <color grey>EXT IRQ2</color>                                                    |||||||| 
-^ 35       | ''extIRQ3''  :::         |   :::           :::         + 35  |          <color grey>EXT IRQ3</color>                                                    |||||||| 
-^ 36       | ''extIRQ4''  :::         |   :::           :::         |+ 36  |          <color grey>EXT IRQ4</color>                                                    ||||||||
  
-===== Tags ===== +**Note**the EXT IRQs are shared with the GPIO function, they don't need to be enabled by any gpio mode group.
-[[meta:tags|How to add tags]] +
-{{tag>bcm63xx bcm6348 gpio}}+
  
 +Code from Broadcom GPL (//6348_map_part.h// file):
 +<code c>
 +  uint32        GPIOMode;  //0xfffe0400 + 0x18
 +#define         GROUP4_DIAG             0x00090000
 +#define         GROUP4_UTOPIA           0x00080000
 +#define         GROUP4_LEGACY_LED       0x00030000
 +#define         GROUP4_MII_SNOOP        0x00020000
 +#define         GROUP4_EXT_EPHY         0x00010000
 +#define         GROUP3_DIAG             0x00009000
 +#define         GROUP3_UTOPIA           0x00008000
 +#define         GROUP3_EXT_MII          0x00007000 // presumable use
 +#define         GROUP2_DIAG             0x00000900
 +#define         GROUP2_PCI              0x00000500 // presumable use
 +#define         GROUP1_DIAG             0x00000090
 +#define         GROUP1_UTOPIA           0x00000080
 +#define         GROUP1_SPI_UART         0x00000060
 +#define         GROUP1_SPI_MASTER       0x00000060 // presumable use
 +#define         GROUP1_MII_PCCARD       0x00000040 // presumable use
 +#define         GROUP1_MII_SNOOP        0x00000020
 +#define         GROUP1_EXT_EPHY         0x00000010
 +#define         GROUP0_DIAG             0x00000009
 +#define         GROUP0_EXT_MII          0x00000007 // presumable use
 +</code>
 +
 +
 +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/03/31 23:22
  • by bobafetthotmail