google/rotor: Add support for the Rotor mainboard
Change-Id: I1f97b6f159a0ac36c96636066332ba355c056186 Signed-off-by: Hakim Giydan <hgiydan@marvell.com> Reviewed-on: https://review.coreboot.org/15507 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
parent
449368c2f0
commit
65c7ccc8b1
|
@ -0,0 +1,44 @@
|
|||
##
|
||||
## This file is part of the coreboot project.
|
||||
##
|
||||
## Copyright (C) 2016 Marvell, Inc.
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation; version 2 of the License.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
##
|
||||
|
||||
if BOARD_GOOGLE_ROTOR
|
||||
|
||||
config BOARD_SPECIFIC_OPTIONS # dummy
|
||||
def_bool y
|
||||
select SOC_MARVELL_MVMAP2315
|
||||
select MAINBOARD_HAS_CHROMEOS
|
||||
select BOARD_ROMSIZE_KB_4096
|
||||
|
||||
config CHROMEOS
|
||||
select VBOOT_MOCK_SECDATA
|
||||
|
||||
config MAINBOARD_DIR
|
||||
string
|
||||
default google/rotor
|
||||
|
||||
config MAINBOARD_PART_NUMBER
|
||||
string
|
||||
default "rotor"
|
||||
|
||||
config GBB_HWID
|
||||
string
|
||||
depends on CHROMEOS
|
||||
default "ROTOR TEST 1234"
|
||||
|
||||
config DRAM_SIZE_MB
|
||||
int
|
||||
default 232
|
||||
|
||||
endif # BOARD_MARVELL_ROTOR
|
|
@ -0,0 +1,2 @@
|
|||
config BOARD_GOOGLE_ROTOR
|
||||
bool "Rotor"
|
|
@ -0,0 +1,28 @@
|
|||
##
|
||||
## This file is part of the coreboot project.
|
||||
##
|
||||
## Copyright (C) 2016 Marvell, Inc.
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation; version 2 of the License.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
##
|
||||
|
||||
bootblock-y += bootblock.c
|
||||
bootblock-y += memlayout.ld
|
||||
bootblock-y += reset.c
|
||||
bootblock-$(CONFIG_CHROMEOS) += chromeos.c
|
||||
|
||||
ramstage-y += mainboard.c
|
||||
ramstage-y += memlayout.ld
|
||||
ramstage-y += reset.c
|
||||
ramstage-$(CONFIG_CHROMEOS) += chromeos.c
|
||||
|
||||
romstage-y += memlayout.ld
|
||||
romstage-y += reset.c
|
||||
romstage-$(CONFIG_CHROMEOS) += chromeos.c
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* This file is part of the coreboot project.
|
||||
*
|
||||
* Copyright (C) 2016 Marvell, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef __COREBOOT_SRC_MAINBOARD_GOOGLE_ROTOR_BOARD_H
|
||||
#define __COREBOOT_SRC_MAINBOARD_GOOGLE_ROTOR_BOARD_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <soc/pinmux.h>
|
||||
|
||||
#define PINMUX_APB_UART0_TXD PINMUX(165, 1, 1, 0, 0, PULLUP)
|
||||
#define PINMUX_APB_UART0_RXD PINMUX(166, 1, 1, 0, 0, PULLUP)
|
||||
#define PINMUX_APB_UART1_TXD PINMUX(176, 1, 1, 0, 0, PULLUP)
|
||||
#define PINMUX_APB_UART1_RXD PINMUX(177, 1, 1, 0, 0, PULLUP)
|
||||
|
||||
#endif /* __COREBOOT_SRC_MAINBOARD_GOOGLE_ROTOR_BOARD_H */
|
|
@ -0,0 +1,3 @@
|
|||
Category: laptop
|
||||
ROM protocol: parallel flash
|
||||
Flashrom support: y
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* This file is part of the coreboot project.
|
||||
*
|
||||
* Copyright (C) 2016 Marvell, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <arch/io.h>
|
||||
#include <bootblock_common.h>
|
||||
#include <console/console.h>
|
||||
#include <soc/clock.h>
|
||||
#include <soc/pinmux.h>
|
||||
|
||||
#include "board.h"
|
||||
|
||||
struct mvmap2315_pinmux board_pinmux[] = {
|
||||
PINMUX_APB_UART0_TXD,
|
||||
PINMUX_APB_UART0_RXD,
|
||||
PINMUX_APB_UART1_TXD,
|
||||
PINMUX_APB_UART1_RXD,
|
||||
};
|
||||
|
||||
static void pinmux_init(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(board_pinmux); i++)
|
||||
set_pinmux(board_pinmux[i]);
|
||||
}
|
||||
|
||||
void bootblock_mainboard_early_init(void)
|
||||
{
|
||||
/* enable APB/UART0 clock */
|
||||
setbits_le32(&mvmap2315_apmu_clk->uartclk0_clkgenconfig,
|
||||
MVMAP2315_UART_CLK_EN);
|
||||
|
||||
/* enable APB/UART1 clock */
|
||||
setbits_le32(&mvmap2315_apmu_clk->uartclk1_clkgenconfig,
|
||||
MVMAP2315_UART_CLK_EN);
|
||||
|
||||
pinmux_init();
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* This file is part of the coreboot project.
|
||||
*
|
||||
* Copyright (C) 2016 Marvell, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <boot/coreboot_tables.h>
|
||||
#include <bootmode.h>
|
||||
|
||||
#include "board.h"
|
||||
|
||||
void fill_lb_gpios(struct lb_gpios *gpios)
|
||||
{
|
||||
/*TODO: implement fill_lb_gpios */
|
||||
}
|
||||
|
||||
int get_developer_mode_switch(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int get_recovery_mode_switch(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int get_write_protect_state(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
FLASH@0x0 0x400000 {
|
||||
WP_RO@0x0 0x200000 {
|
||||
RO_SECTION@0x0 0x1f0000 {
|
||||
BOOTBLOCK@0 128K
|
||||
COREBOOT(CBFS)@0x20000 0xe0000
|
||||
FMAP@0x100000 0x1000
|
||||
GBB@0x101000 0xeef00
|
||||
RO_FRID@0x1eff00 0x100
|
||||
}
|
||||
RO_VPD@0x1f0000 0x10000
|
||||
}
|
||||
RW_SECTION_A@0x200000 0x78000 {
|
||||
VBLOCK_A@0x0 0x2000
|
||||
FW_MAIN_A(CBFS)@0x2000 0x75f00
|
||||
RW_FWID_A@0x77f00 0x100
|
||||
}
|
||||
RW_SHARED@0x278000 0x4000 {
|
||||
SHARED_DATA@0x0 0x4000
|
||||
}
|
||||
RW_ELOG@0x27c000 0x4000
|
||||
RW_SECTION_B@0x280000 0x78000 {
|
||||
VBLOCK_B@0x0 0x2000
|
||||
FW_MAIN_B(CBFS)@0x2000 0x75f00
|
||||
RW_FWID_B@0x77f00 0x100
|
||||
}
|
||||
RW_VPD@0x2f8000 0x8000
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
##
|
||||
## This file is part of the coreboot project.
|
||||
##
|
||||
## Copyright (C) 2016 Marvell, Inc.
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation; version 2 of the License.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
##
|
||||
|
||||
chip soc/marvell/mvmap2315
|
||||
device cpu_cluster 0 on end
|
||||
end
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* This file is part of the coreboot project.
|
||||
*
|
||||
* Copyright (C) 2016 Marvell, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <device/device.h>
|
||||
|
||||
static void mainboard_init(device_t dev)
|
||||
{
|
||||
/* TODO: implement mainboard_init */
|
||||
}
|
||||
|
||||
static void mainboard_enable(device_t dev)
|
||||
{
|
||||
dev->ops->init = &mainboard_init;
|
||||
}
|
||||
|
||||
struct chip_operations mainboard_ops = {
|
||||
.name = "rotor",
|
||||
.enable_dev = mainboard_enable,
|
||||
};
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* This file is part of the coreboot project.
|
||||
*
|
||||
* Copyright (C) 2016 Marvell, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <soc/memlayout.ld>
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* This file is part of the coreboot project.
|
||||
*
|
||||
* Copyright (C) 2016 Marvell, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <reset.h>
|
||||
#include <soc/reset.h>
|
||||
|
||||
void hard_reset(void)
|
||||
{
|
||||
mvmap2315_reset();
|
||||
}
|
Loading…
Reference in New Issue