static void brcm_machine_restart(char *command) { static void (*back_to_prom)(void) = (void (*)(void)) 0xbfc00000; /* PR21527 - Fix SMP reboot problem */ #ifdef CONFIG_SMP smp_send_stop(); udelay(10); #endif /* * If NAND is on CS0, we need to revert to direct access in order to * re-enable XIP so CFE can boot. This was once done through a * call to brcmnand_prepare_reboot() from this function, but is * now handled through the FS/MTD notifier. */ /* enable chip reset, then do it */ BDEV_SET(BCHP_SUN_TOP_CTRL_RESET_CTRL, BCHP_SUN_TOP_CTRL_RESET_CTRL_master_reset_en_MASK); BDEV_RD(BCHP_SUN_TOP_CTRL_RESET_CTRL); BDEV_SET(BCHP_SUN_TOP_CTRL_SW_RESET, BCHP_SUN_TOP_CTRL_SW_RESET_chip_master_reset_MASK); BDEV_RD(BCHP_SUN_TOP_CTRL_SW_RESET); udelay(10); /* NOTREACHED */ /* Reboot */ back_to_prom(); }
// Neutron, etc, just reset the CPU static void tivo_machine_restart(void) { BDEV_SET(BCHP_SUN_TOP_CTRL_RESET_CTRL, BCHP_SUN_TOP_CTRL_RESET_CTRL_master_reset_en_MASK); BDEV_RD(BCHP_SUN_TOP_CTRL_RESET_CTRL); BDEV_SET(BCHP_SUN_TOP_CTRL_SW_RESET, BCHP_SUN_TOP_CTRL_SW_RESET_chip_master_reset_MASK); BDEV_RD(BCHP_SUN_TOP_CTRL_SW_RESET); while(1); }
static void brcm_upg_enable(unsigned int irq) { irq -= BRCM_UPG_L2_BASE; BUG_ON(irq >= 32); BDEV_SET(BCHP_IRQ0_IRQEN, (1UL << irq)); BDEV_RD(BCHP_IRQ0_IRQEN); }
// perform a reset by cycling the system power void tivo_machine_restart(void) { local_irq_disable(); // we don't want anything to work anymore BDEV_UNSET(BCHP_GIO_IODIR_LO, 1<<22); // assert PS_RESET aka gpio 22 BDEV_SET(BCHP_GIO_DATA_LO, 1<<22); // this will soon cause power supply to cycle if (EPFHandlerFunction) (*EPFHandlerFunction)(); // meawhile, maybe invoke EPFHandlerFunction, note it won't return printk("Halted.\n"); while(1); // otherwise spin until dead }
static void __init init_port(void) { unsigned int divisor; BDEV_WR(UART_REG(UART_LCR), 0x3); /* 8n1 */ BDEV_WR(UART_REG(UART_IER), 0); /* no interrupt */ BDEV_WR(UART_REG(UART_FCR), 0); /* no fifo */ BDEV_WR(UART_REG(UART_MCR), 0x3); /* DTR + RTS */ BDEV_SET(UART_REG(UART_LCR), UART_LCR_DLAB); #if defined(CONFIG_BRCM_IKOS) /* Reverse-engineer brcm_base_baud0 from the bootloader's setting */ divisor = (BDEV_RD(UART_REG(UART_DLM)) << 8) | BDEV_RD(UART_REG(UART_DLL)); brcm_base_baud0 = divisor * BAUD; #endif divisor = (brcm_base_baud0 + BAUD/2) / BAUD; BDEV_WR(UART_REG(UART_DLL), divisor & 0xff); BDEV_WR(UART_REG(UART_DLM), (divisor >> 8) & 0xff); BDEV_UNSET(UART_REG(UART_LCR), UART_LCR_DLAB); }
void __init arch_init_irq(void) { int irq; CPUINT1C->IntrW0MaskSet = 0xffffffff; CPUINT1C_TP1->IntrW0MaskSet = 0xffffffff; CPUINT1C->IntrW1MaskSet = 0xffffffff; CPUINT1C_TP1->IntrW1MaskSet = 0xffffffff; #if L1_IRQS > 64 CPUINT1C_TP1->IntrW2MaskSet = 0xffffffff; CPUINT1C->IntrW2MaskSet = 0xffffffff; #endif change_c0_status(ST0_IE, 0); /* Setup timer interrupt */ irq_desc[BCM_LINUX_SYSTIMER_IRQ].status = IRQ_DISABLED; irq_desc[BCM_LINUX_SYSTIMER_IRQ].action = 0; irq_desc[BCM_LINUX_SYSTIMER_IRQ].depth = 1; irq_desc[BCM_LINUX_SYSTIMER_IRQ].chip = &brcm_mips_int7_type; #ifdef CONFIG_SMP /* Setup timer interrupt */ irq_desc[BCM_LINUX_SYSTIMER_1_IRQ].status = IRQ_DISABLED; irq_desc[BCM_LINUX_SYSTIMER_1_IRQ].action = 0; irq_desc[BCM_LINUX_SYSTIMER_1_IRQ].depth = 1; irq_desc[BCM_LINUX_SYSTIMER_1_IRQ].chip = &brcm_mips_int7_type; /* S/W IPC interrupts */ irq_desc[BCM_LINUX_IPC_0_IRQ].status = IRQ_DISABLED; irq_desc[BCM_LINUX_IPC_0_IRQ].action = 0; irq_desc[BCM_LINUX_IPC_0_IRQ].depth = 1; irq_desc[BCM_LINUX_IPC_0_IRQ].chip = &brcm_mips_int0_type; irq_desc[BCM_LINUX_IPC_1_IRQ].status = IRQ_DISABLED; irq_desc[BCM_LINUX_IPC_1_IRQ].action = 0; irq_desc[BCM_LINUX_IPC_1_IRQ].depth = 1; irq_desc[BCM_LINUX_IPC_1_IRQ].chip = &brcm_mips_int1_type; #endif /* Install all the 7xxx IRQs */ for (irq = 1; irq <= L1_IRQS; irq++) { irq_desc[irq].status = IRQ_DISABLED; irq_desc[irq].action = 0; irq_desc[irq].depth = 1; irq_desc[irq].chip = &brcm_intc_type; #ifdef CONFIG_SMP irq_desc[irq].affinity = cpumask_of_cpu(0); #endif } #ifdef CONFIG_OPROFILE /* profile IRQ */ irq_desc[BCM_LINUX_PERFCOUNT_IRQ].status = IRQ_DISABLED; irq_desc[BCM_LINUX_PERFCOUNT_IRQ].action = 0; irq_desc[BCM_LINUX_PERFCOUNT_IRQ].depth = 1; irq_desc[BCM_LINUX_PERFCOUNT_IRQ].chip = &brcm_mips_performance_type; //brcm_mips_performance_enable(0); #endif /* enable IRQ2 (this runs on TP0). IRQ3 enabled during TP1 boot. */ set_c0_status(STATUSF_IP2); /* enable L2 interrupts for UARTA, B, C */ #if defined(BCHP_IRQ0_UART_IRQEN_uarta_MASK) BDEV_SET(BCHP_IRQ0_UART_IRQEN, BCHP_IRQ0_UART_IRQEN_uarta_MASK | BCHP_IRQ0_UART_IRQEN_uartb_MASK | BCHP_IRQ0_UART_IRQEN_uartc_MASK); #else BDEV_SET(BCHP_IRQ0_IRQEN, BCHP_IRQ0_IRQEN_uarta_irqen_MASK | BCHP_IRQ0_IRQEN_uartb_irqen_MASK | BCHP_IRQ0_IRQEN_uartc_irqen_MASK); #endif }
void __init board_pinmux_setup(void) { #if !defined(CONFIG_BRCM_IKOS) #if defined(CONFIG_BCM35230) #if defined(CONFIG_BCMGENET_0_GPHY) PINMUX(6, i2ssosck_outd, 2); PINMUX(6, i2ssd_outd, 2); PINMUX(6, i2sws_outd, 2); PINMUX(6, i2ssck_outd, 2); PINMUX(6, i2ssosck_outc, 2); PINMUX(6, i2ssd_outc, 2); PINMUX(6, i2sws_outc, 2); PINMUX(6, i2ssck_outc, 2); PINMUX(7, i2ssd_in, 5); PINMUX(7, i2sws_in, 5); PINMUX(7, i2ssck_in, 5); PINMUX(8, gpio_4, 4); PINMUX(9, gpio_74, 3); PINMUX(10, gpio_79, 3); PINMUX(10, gpio_78, 3); PINMUX(10, gpio_77, 3); PINMUX(10, gpio_76, 3); PINMUX(10, gpio_75, 3); PINMUX(11, dint, 2); brcm_ext_mii_mode = BRCM_PHY_TYPE_EXT_MII; #endif #elif defined(CONFIG_BCM3548B0) PINMUX(6, gpio_30, 2); /* UARTB TX */ PINMUX(6, gpio_31, 2); /* UARTB RX */ PINMUX(7, gpio_43, 2); /* UARTC TX */ PINMUX(7, gpio_42, 2); /* UARTC RX */ PINMUX(6, gpio_32, 2); /* SPI */ PINMUX(6, gpio_33, 2); PINMUX(6, gpio_34, 2); PINMUX(6, gpio_35, 2); PINMUX(6, gpio_36, 2); #elif defined(CONFIG_BCM3563C0) /* UARTB RX requires board mod; UARTC is on RS232 daughtercard */ PINMUX(10, gpio_47, 1); /* UARTB TX */ PINMUX(10, gpio_46, 2); /* UARTB RX */ PINMUX(7, gpio_17, 1); /* UARTC TX */ PINMUX(7, gpio_16, 1); /* UARTC RX */ #elif defined(CONFIG_BCM7038C0) PINMUX(9, gpio_47, 2); /* UARTB TX */ PINMUX(9, gpio_46, 2); /* UARTB RX */ #elif defined(CONFIG_BCM7118C0) PINMUX(1, uart_txdb, 0); /* UARTB TX */ PINMUX(1, uart_rxdb, 0); /* UARTB RX */ PINMUX(11, gpio_54, 2); /* UARTC TX */ PINMUX(11, gpio_55, 2); /* UARTC RX */ #elif defined(CONFIG_BCM7125) PINMUX(8, uart_1_rxd, 0); /* UARTB RX */ PINMUX(9, uart_1_txd, 0); /* UARTB TX */ PINMUX(9, gpio_16, 1); /* UARTC RX */ PINMUX(9, gpio_17, 1); /* UARTC TX */ PINMUX(10, sgpio_02, 1); /* MoCA I2C on BSCB */ PINMUX(10, sgpio_03, 1); brcm_moca_i2c_base = BPHYSADDR(BCHP_BSCB_REG_START); brcm_ext_mii_mode = BRCM_PHY_TYPE_EXT_MII; #elif defined(CONFIG_BCM7231) PINMUX(11, gpio_94, 1); /* UARTB TX */ PINMUX(11, gpio_95, 1); /* UARTB RX */ if (BRCM_PROD_ID() == 0x7230) { /* 7230 is not the same ballout as 7231 */ AON_PINMUX(0, aon_gpio_04, 6); /* SDIO */ AON_PINMUX(0, aon_gpio_05, 6); AON_PINMUX(1, aon_gpio_12, 5); AON_PINMUX(1, aon_gpio_13, 5); AON_PINMUX(2, aon_gpio_14, 5); AON_PINMUX(2, aon_gpio_15, 6); AON_PINMUX(2, aon_gpio_16, 6); AON_PINMUX(2, aon_gpio_17, 6); AON_PINMUX(2, aon_gpio_18, 6); AON_PINMUX(2, aon_gpio_19, 6); /* disable GPIO pulldowns */ BDEV_WR_F_RB(AON_PIN_CTRL_PIN_MUX_PAD_CTRL_0, aon_gpio_04_pad_ctrl, 0); BDEV_WR_F_RB(AON_PIN_CTRL_PIN_MUX_PAD_CTRL_0, aon_gpio_05_pad_ctrl, 0); BDEV_WR_F_RB(AON_PIN_CTRL_PIN_MUX_PAD_CTRL_1, aon_gpio_12_pad_ctrl, 0); BDEV_WR_F_RB(AON_PIN_CTRL_PIN_MUX_PAD_CTRL_1, aon_gpio_13_pad_ctrl, 0); BDEV_WR_F_RB(AON_PIN_CTRL_PIN_MUX_PAD_CTRL_1, aon_gpio_14_pad_ctrl, 0); BDEV_WR_F_RB(AON_PIN_CTRL_PIN_MUX_PAD_CTRL_1, aon_gpio_15_pad_ctrl, 0); BDEV_WR_F_RB(AON_PIN_CTRL_PIN_MUX_PAD_CTRL_1, aon_gpio_16_pad_ctrl, 0); BDEV_WR_F_RB(AON_PIN_CTRL_PIN_MUX_PAD_CTRL_1, aon_gpio_17_pad_ctrl, 0); BDEV_WR_F_RB(AON_PIN_CTRL_PIN_MUX_PAD_CTRL_1, aon_gpio_18_pad_ctrl, 0); BDEV_WR_F_RB(AON_PIN_CTRL_PIN_MUX_PAD_CTRL_1, aon_gpio_19_pad_ctrl, 0); /* limit speed to 25MHz due to AON pad timing restrictions */ BDEV_UNSET(BCHP_SDIO_0_CFG_CAP_REG0, 1 << 19); /* Highspd=0 */ BDEV_SET(BCHP_SDIO_0_CFG_CAP_REG1, 1 << 31); /* Override=1 */ } else { /* set RGMII lines to 2.5V */ BDEV_WR_F(SUN_TOP_CTRL_GENERAL_CTRL_NO_SCAN_0, rgmii_0_pad_mode, 1); PINMUX(15, gpio_132, 1); /* RGMII RX */ PINMUX(15, gpio_133, 1); PINMUX(15, gpio_134, 1); PINMUX(16, gpio_139, 1); PINMUX(16, gpio_140, 1); PINMUX(16, gpio_141, 1); PINMUX(16, gpio_142, 1); PINMUX(16, gpio_138, 1); /* RGMII TX */ PINMUX(17, gpio_143, 1); PINMUX(17, gpio_144, 1); PINMUX(17, gpio_145, 1); PINMUX(17, gpio_146, 1); PINMUX(17, gpio_147, 1); PINMUX(17, gpio_149, 1); /* RGMII MDIO */ PINMUX(16, gpio_137, 1); /* no pulldown on RGMII lines */ PADCTRL(8, gpio_132_pad_ctrl, 0); PADCTRL(8, gpio_133_pad_ctrl, 0); PADCTRL(8, gpio_134_pad_ctrl, 0); PADCTRL(8, gpio_137_pad_ctrl, 0); PADCTRL(8, gpio_138_pad_ctrl, 0); PADCTRL(9, gpio_139_pad_ctrl, 0); PADCTRL(9, gpio_140_pad_ctrl, 0); PADCTRL(9, gpio_141_pad_ctrl, 0); PADCTRL(9, gpio_142_pad_ctrl, 0); PADCTRL(9, gpio_143_pad_ctrl, 0); PADCTRL(9, gpio_144_pad_ctrl, 0); PADCTRL(9, gpio_145_pad_ctrl, 0); PADCTRL(9, gpio_146_pad_ctrl, 0); PADCTRL(9, gpio_147_pad_ctrl, 0); PADCTRL(9, gpio_149_pad_ctrl, 0); PINMUX(14, gpio_122, 1); /* SDIO */ PINMUX(14, gpio_123, 1); PINMUX(14, gpio_124, 1); PINMUX(14, gpio_125, 1); PINMUX(14, gpio_126, 1); PINMUX(15, gpio_127, 1); PINMUX(15, gpio_128, 1); PINMUX(15, gpio_129, 1); PINMUX(15, gpio_130, 1); PINMUX(15, gpio_131, 1); /* no pulldown on SDIO lines */ PADCTRL(7, gpio_122_pad_ctrl, 0); PADCTRL(7, gpio_123_pad_ctrl, 0); PADCTRL(8, gpio_124_pad_ctrl, 0); PADCTRL(8, gpio_125_pad_ctrl, 0); PADCTRL(8, gpio_126_pad_ctrl, 0); PADCTRL(8, gpio_127_pad_ctrl, 0); PADCTRL(8, gpio_128_pad_ctrl, 0); PADCTRL(8, gpio_129_pad_ctrl, 0); PADCTRL(8, gpio_130_pad_ctrl, 0); PADCTRL(8, gpio_131_pad_ctrl, 0); } #elif defined(CONFIG_BCM7325B0) PINMUX(11, uart_txdb, 0); /* UARTB TX */ PINMUX(11, uart_rxdb, 0); /* UARTB RX */ #if defined(CONFIG_BCMEMAC_EXTMII) PINMUX(5, gpio_32, 1); /* MII */ PINMUX(5, gpio_33, 1); PINMUX(5, gpio_34, 1); PINMUX(5, gpio_35, 1); PINMUX(5, gpio_36, 1); PINMUX(5, gpio_37, 1); PINMUX(6, gpio_38, 1); PINMUX(6, gpio_39, 1); PINMUX(6, gpio_40, 1); PINMUX(6, gpio_41, 1); PINMUX(6, gpio_42, 1); PINMUX(6, gpio_43, 1); PINMUX(6, gpio_44, 1); PINMUX(6, gpio_45, 1); PINMUX(6, gpio_46, 1); PINMUX(6, gpio_47, 1); PINMUX(7, gpio_48, 1); PINMUX(7, gpio_49, 1); #endif #elif defined(CONFIG_BCM7335B0) PINMUX(7, gpio_034, 1); /* UARTB TX */ PINMUX(7, gpio_035, 1); /* UARTB RX */ PINMUX(7, gpio_038, 1); /* UARTC TX */ PINMUX(7, gpio_039, 1); /* UARTC RX */ PINMUX(9, gpio_054, 3); /* MII */ PINMUX(9, gpio_055, 3); PINMUX(9, gpio_056, 3); PINMUX(9, gpio_057, 3); PINMUX(9, gpio_058, 3); PINMUX(9, gpio_059, 3); PINMUX(9, gpio_060, 3); PINMUX(9, gpio_061, 3); PINMUX(9, gpio_062, 3); PINMUX(10, gpio_063, 3); PINMUX(10, gpio_065, 3); PINMUX(10, gpio_066, 3); PINMUX(10, gpio_067, 3); PINMUX(10, gpio_068, 3); PINMUX(10, gpio_069, 3); PINMUX(10, gpio_070, 3); PINMUX(10, gpio_071, 3); PINMUX(10, gpio_072, 3); #elif defined(CONFIG_BCM7340) PINMUX(18, uart_rxdb, 0); /* UARTB RX */ PINMUX(18, uart_txdb, 0); /* UARTB TX */ PINMUX(4, gpio_00, 3); /* UARTC RX */ PINMUX(4, gpio_01, 3); /* UARTC TX */ PINMUX(14, sgpio_00, 1); /* MoCA I2C on BSCA */ PINMUX(14, sgpio_01, 1); brcm_moca_i2c_base = BPHYSADDR(BCHP_BSCA_REG_START); #elif defined(CONFIG_BCM7342) PINMUX(10, gpio_023, 1); /* ENET LEDs */ PINMUX(11, gpio_024, 1); PINMUX(23, vo_656_7, 1); /* MoCA LEDs */ PINMUX(23, vo_656_clk, 1); PINMUX(12, gpio_034, 1); /* UARTB TX */ PINMUX(12, gpio_035, 1); /* UARTB RX */ PINMUX(12, gpio_038, 1); /* UARTC TX */ PINMUX(12, gpio_039, 1); /* UARTC RX */ PINMUX(21, sgpio_02, 1); /* MoCA I2C on BSCB */ PINMUX(21, sgpio_03, 1); brcm_moca_i2c_base = BPHYSADDR(BCHP_BSCB_REG_START); #elif defined(CONFIG_BCM7344) AON_PINMUX(0, aon_gpio_00, 3); /* UARTC RX (NC) */ AON_PINMUX(0, aon_gpio_01, 3); /* UARTC TX (NC) */ /* NOTE: this is buggy in A0 */ AON_PINMUX(2, aon_sgpio_00, 1); /* MoCA I2C */ AON_PINMUX(2, aon_sgpio_01, 1); brcm_moca_i2c_base = BPHYSADDR(BCHP_BSCC_REG_START); #if defined(CONFIG_BCMGENET_0_GPHY) /* select MAC0 for RGMII */ BDEV_WR_F(SUN_TOP_CTRL_GENERAL_CTRL_0, mii_genet_mac_select, 0); PINMUX(9, gpio_31, 1); /* RGMII RX */ PINMUX(9, gpio_28, 1); PINMUX(9, gpio_27, 1); PINMUX(9, gpio_26, 1); PINMUX(8, gpio_25, 1); PINMUX(8, gpio_24, 1); PINMUX(8, gpio_23, 1); PINMUX(9, gpio_34, 1); /* RGMII TX */ PINMUX(9, gpio_35, 1); PINMUX(10, gpio_36, 1); PINMUX(10, gpio_40, 1); PINMUX(10, gpio_39, 1); PINMUX(10, gpio_38, 1); PINMUX(10, gpio_37, 1); PINMUX(10, gpio_32, 1); /* ENET MDIO */ PINMUX(10, gpio_33, 1); PINMUX(9, gpio_29, 1); PINMUX(9, gpio_30, 1); #endif #elif defined(CONFIG_BCM7346) PINMUX(15, gpio_068, 2); /* MoCA link */ PINMUX(16, gpio_069, 1); /* MoCA activity */ PINMUX(9, gpio_017, 1); /* UARTB TX */ PINMUX(9, gpio_018, 1); /* UARTB RX */ PINMUX(10, gpio_021, 1); /* UARTC TX */ PINMUX(10, gpio_022, 1); /* UARTC RX */ PINMUX(16, sgpio_02, 1); /* MoCA I2C on BSCB */ PINMUX(16, sgpio_03, 1); brcm_moca_i2c_base = BPHYSADDR(BCHP_BSCB_REG_START); #elif defined(CONFIG_BCM7400D0) PINMUX(3, gpio_008, 2); /* UARTB TX */ PINMUX(3, gpio_007, 2); /* UARTB RX */ PINMUX(3, gpio_012, 2); /* UARTC TX */ PINMUX(3, gpio_011, 2); /* UARTC RX */ /* CFE forgot to set these */ PINMUX(2, gpio_000, 1); /* enet_activity */ PINMUX(2, gpio_001, 1); /* enet_link */ #elif defined(CONFIG_BCM7401C0) PINMUX(11, gpio_49, 1); /* UARTA TX */ PINMUX(11, gpio_50, 1); /* UARTA RX */ /* default console is on UARTB */ PINMUX(10, gpio_42, 1); /* UARTC TX */ PINMUX(10, gpio_39, 1); /* UARTC RX */ /* CFE forgot to set these */ PINMUX(10, gpio_43, 1); /* enet_link */ PINMUX(10, gpio_45, 1); /* enet_activity */ #elif defined(CONFIG_BCM7403A0) PINMUX(11, gpio_49, 1); /* UARTA TX */ PINMUX(11, gpio_50, 1); /* UARTA RX */ /* default console is on UARTB */ PINMUX(10, gpio_42, 1); /* UARTC TX */ PINMUX(10, gpio_39, 1); /* UARTC RX */ /* CFE forgot to set these */ PINMUX(10, gpio_43, 1); /* enet_link */ PINMUX(10, gpio_45, 1); /* enet_activity */ #elif defined(CONFIG_BCM7405B0) #if !defined(CONFIG_KGDB) /* * Default: use MII, no UARTB/UARTC. * BCM97405 SW2801-7 should be OFF */ PINMUX(2, gpio_002, 1); /* MII */ PINMUX(2, gpio_003, 1); PINMUX(3, gpio_004, 1); PINMUX(3, gpio_005, 1); PINMUX(3, gpio_006, 1); PINMUX(3, gpio_007, 1); PINMUX(3, gpio_008, 1); PINMUX(3, gpio_009, 1); PINMUX(3, gpio_010, 1); PINMUX(3, gpio_011, 1); PINMUX(3, gpio_012, 1); PINMUX(3, gpio_013, 1); PINMUX(4, gpio_014, 1); PINMUX(4, gpio_015, 1); PINMUX(4, gpio_016, 1); PINMUX(4, gpio_017, 1); PINMUX(4, gpio_018, 1); PINMUX(4, gpio_019, 1); #else /* * Alternate: use UARTB, UARTC. Required for kgdb. * BCM97405 SW2801-7 should be ON */ PINMUX(3, gpio_008, 2); /* UARTB TX */ PINMUX(3, gpio_007, 2); /* UARTB RX */ PINMUX(3, gpio_012, 2); /* UARTC TX */ PINMUX(3, gpio_011, 2); /* UARTC RX */ printk(KERN_WARNING "%s: disabling MII to enable extra UARTs\n", __func__); #endif #elif defined(CONFIG_BCM7408) PINMUX(2, gpio_01, 1); /* MoCA LEDs */ PINMUX(2, gpio_02, 1); PINMUX(3, gpio_06, 1); /* UARTB RX */ PINMUX(3, gpio_05, 1); /* UARTB TX */ PINMUX(3, gpio_12, 1); /* UARTC RX */ PINMUX(3, gpio_11, 1); /* UARTC TX */ PINMUX(7, sgpio_02, 1); /* MoCA I2C on BSCB */ PINMUX(7, sgpio_03, 1); brcm_moca_i2c_base = BPHYSADDR(BCHP_BSCB_REG_START); #elif defined(CONFIG_BCM7420) PINMUX(7, gpio_000, 1); /* ENET LEDs */ PINMUX(7, gpio_001, 1); PINMUX(9, gpio_017, 1); /* MoCA LEDs */ PINMUX(9, gpio_019, 1); PINMUX(17, gpio_081, 4); /* UARTB RX */ PINMUX(17, gpio_082, 4); /* UARTB TX */ PINMUX(9, gpio_022, 3); /* UARTC RX */ PINMUX(9, gpio_023, 3); /* UARTC TX */ PINMUX(21, sgpio_02, 1); /* MoCA I2C on BSCB */ PINMUX(21, sgpio_03, 1); brcm_moca_i2c_base = BPHYSADDR(BCHP_BSCB_REG_START); #if defined(CONFIG_BCMGENET_0_GPHY) /* set RGMII lines to 2.5V */ BDEV_WR_F(SUN_TOP_CTRL_GENERAL_CTRL_NO_SCAN_1, rgmii_pad_mode, 1); PINMUX(7, gpio_002, 1); /* RGMII RX */ PINMUX(7, gpio_003, 1); PINMUX(7, gpio_004, 1); PINMUX(7, gpio_005, 1); PINMUX(7, gpio_006, 1); PINMUX(7, gpio_007, 1); PINMUX(8, gpio_009, 1); /* RGMII TX */ PINMUX(8, gpio_010, 1); PINMUX(8, gpio_011, 1); PINMUX(8, gpio_012, 1); PINMUX(8, gpio_013, 1); PINMUX(8, gpio_014, 1); PINMUX(20, gpio_108, 3); /* ENET MDIO */ PINMUX(20, gpio_109, 4); #endif #elif defined(CONFIG_BCM7422) || defined(CONFIG_BCM7425) /* Bootloader indicates the availability of SDIO_0 in SCRATCH reg */ if ((BDEV_RD(BCHP_SDIO_0_CFG_SCRATCH) & 0x01) == 0) { PINMUX(14, gpio_072, 2); PINMUX(14, gpio_073, 2); PINMUX(14, gpio_074, 2); PINMUX(14, gpio_075, 2); PINMUX(15, gpio_076, 2); PINMUX(15, gpio_077, 2); PINMUX(15, gpio_078, 2); PINMUX(15, gpio_079, 2); PINMUX(15, gpio_080, 2); PINMUX(15, gpio_081, 2); /* enable internal pullups */ BDEV_WR_F_RB(SUN_TOP_CTRL_PIN_MUX_PAD_CTRL_9, gpio_072_pad_ctrl, 2); BDEV_WR_F_RB(SUN_TOP_CTRL_PIN_MUX_PAD_CTRL_10, gpio_073_pad_ctrl, 2); BDEV_WR_F_RB(SUN_TOP_CTRL_PIN_MUX_PAD_CTRL_10, gpio_074_pad_ctrl, 2); BDEV_WR_F_RB(SUN_TOP_CTRL_PIN_MUX_PAD_CTRL_10, gpio_075_pad_ctrl, 2); BDEV_WR_F_RB(SUN_TOP_CTRL_PIN_MUX_PAD_CTRL_10, gpio_076_pad_ctrl, 2); BDEV_WR_F_RB(SUN_TOP_CTRL_PIN_MUX_PAD_CTRL_10, gpio_077_pad_ctrl, 2); BDEV_WR_F_RB(SUN_TOP_CTRL_PIN_MUX_PAD_CTRL_10, gpio_078_pad_ctrl, 2); BDEV_WR_F_RB(SUN_TOP_CTRL_PIN_MUX_PAD_CTRL_10, gpio_079_pad_ctrl, 2); BDEV_WR_F_RB(SUN_TOP_CTRL_PIN_MUX_PAD_CTRL_10, gpio_080_pad_ctrl, 2); BDEV_WR_F_RB(SUN_TOP_CTRL_PIN_MUX_PAD_CTRL_10, gpio_081_pad_ctrl, 2); /* always use 3.3V (SDIO0_LOW_V_SEL_N=1) */ BDEV_UNSET(BCHP_GIO_AON_IODIR_LO, 1 << 4); BDEV_SET(BCHP_GIO_AON_DATA_LO, 1 << 4); } PINMUX(18, sgpio_00, 1); /* MoCA I2C on BSCA */ PINMUX(19, sgpio_01, 1); brcm_moca_i2c_base = BPHYSADDR(BCHP_BSCA_REG_START); #elif defined(CONFIG_BCM7468) /* NOTE: R1022 and R1023 must be installed to use UARTB */ PINMUX(4, gpio_15, 3); /* UARTB TX */ PINMUX(4, gpio_14, 3); /* UARTB RX */ PINMUX(3, gpio_01, 1); /* SDIO */ PINMUX(3, gpio_02, 1); PINMUX(3, gpio_03, 1); PINMUX(3, gpio_04, 1); PINMUX(3, gpio_05, 1); PINMUX(3, gpio_06, 1); PINMUX(3, gpio_07, 1); PINMUX(3, gpio_08, 1); PINMUX(4, gpio_09, 1); PINMUX(4, gpio_10, 1); /* disable GPIO pulldowns, in order to get 3.3v on SDIO pins */ BDEV_WR_F_RB(SUN_TOP_CTRL_PIN_MUX_PAD_CTRL_2, gpio_01_pad_ctrl, 0); BDEV_WR_F_RB(SUN_TOP_CTRL_PIN_MUX_PAD_CTRL_2, gpio_02_pad_ctrl, 0); BDEV_WR_F_RB(SUN_TOP_CTRL_PIN_MUX_PAD_CTRL_2, gpio_03_pad_ctrl, 0); BDEV_WR_F_RB(SUN_TOP_CTRL_PIN_MUX_PAD_CTRL_2, gpio_04_pad_ctrl, 0); BDEV_WR_F_RB(SUN_TOP_CTRL_PIN_MUX_PAD_CTRL_2, gpio_05_pad_ctrl, 0); BDEV_WR_F_RB(SUN_TOP_CTRL_PIN_MUX_PAD_CTRL_2, gpio_06_pad_ctrl, 0); BDEV_WR_F_RB(SUN_TOP_CTRL_PIN_MUX_PAD_CTRL_2, gpio_07_pad_ctrl, 0); BDEV_WR_F_RB(SUN_TOP_CTRL_PIN_MUX_PAD_CTRL_2, gpio_08_pad_ctrl, 0); BDEV_WR_F_RB(SUN_TOP_CTRL_PIN_MUX_PAD_CTRL_2, gpio_09_pad_ctrl, 0); BDEV_WR_F_RB(SUN_TOP_CTRL_PIN_MUX_PAD_CTRL_2, gpio_10_pad_ctrl, 0); brcm_ext_mii_mode = BRCM_PHY_TYPE_EXT_MII; #elif defined(CONFIG_BCM7550) PINMUX(13, gpio_84, 1); /* UARTB TX */ PINMUX(13, gpio_85, 1); /* UARTB RX */ PINMUX(13, gpio_86, 1); /* UARTC TX */ PINMUX(13, gpio_87, 1); /* UARTC RX */ #elif defined(CONFIG_BCM7630) PINMUX(7, gpio_02, 1); /* UARTB RX */ PINMUX(7, gpio_03, 1); /* UARTB TX */ PINMUX(7, gpio_04, 1); /* UARTC RX */ PINMUX(7, gpio_05, 1); /* UARTC TX */ /* disable GPIO pulldowns, in order to get 3.3v on SDIO pins */ BDEV_WR_F_RB(CLK_SDIO_PAD_CTRL, SDIO_PDN, 0); PINMUX(11, gpio_36, 1); /* SDIO */ PINMUX(11, gpio_37, 1); PINMUX(11, gpio_38, 1); PINMUX(11, gpio_39, 1); PINMUX(12, gpio_40, 1); PINMUX(12, gpio_41, 1); PINMUX(12, gpio_42, 1); PINMUX(12, gpio_43, 1); PINMUX(12, gpio_44, 1); #elif defined(CONFIG_BCM7635) PINMUX(7, gpio_02, 1); /* UARTB RX */ PINMUX(8, gpio_03, 1); /* UARTB TX */ PINMUX(8, gpio_04, 1); /* UARTC RX */ PINMUX(8, gpio_05, 1); /* UARTC TX */ /* disable GPIO pulldowns, in order to get 3.3v on SDIO pins */ BDEV_WR_F_RB(VCXO_CTL_MISC_GPIO_PAD_CTRL, GPIO_PDN, 0); PINMUX(12, gpio_36, 1); /* SDIO */ PINMUX(12, gpio_37, 1); PINMUX(12, gpio_38, 1); PINMUX(12, gpio_39, 1); PINMUX(12, gpio_40, 1); PINMUX(12, gpio_41, 1); PINMUX(12, gpio_42, 1); PINMUX(13, gpio_43, 1); PINMUX(13, gpio_44, 1); #endif /* chip type */ #endif /* !defined(CONFIG_BRCM_IKOS) */ }