mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-07 16:11:43 +00:00
Ryu sensor hub has asymectric RO/RW images. The first one is very limited (not i2c master, no sensor drivers, gesture recognition). Image size is alter to offer more space for the RW firmware image, compiled with ryu_sh board. To write RO image and basic RW image: flashrom -V -p ec:type=sh,block=0x800 --fast-verify -w /tmp/ryu_sh_loader/ec.bin To write the expected RW image: flashrom -V -p ec:type=sh,block=0x800 --fast-verify -w -i EC_RW:/tmp/ryu_sh/ec.bin BRANCH=ToT BUG=chrome-os-partner:33908 CQ-DEPEND=CL:231970,CL:233233 TEST=load on Ryu, confirmed limited operation. Change-Id: Ib976e2b048935adfb9b2b072c071db5be2bc1c09 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/231984 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
44 lines
1.1 KiB
C
44 lines
1.1 KiB
C
/* Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
/* ryu sensor hub configuration */
|
|
|
|
#include "common.h"
|
|
#include "console.h"
|
|
#include "driver/accelgyro_lsm6ds0.h"
|
|
#include "gpio.h"
|
|
#include "hooks.h"
|
|
#include "i2c.h"
|
|
#include "motion_sense.h"
|
|
#include "power.h"
|
|
#include "registers.h"
|
|
#include "task.h"
|
|
#include "util.h"
|
|
|
|
#include "gpio_list.h"
|
|
|
|
/* I2C ports */
|
|
const struct i2c_port_t i2c_ports[] = {
|
|
{"slave", I2C_PORT_SLAVE, 100,
|
|
GPIO_SLAVE_I2C_SCL, GPIO_SLAVE_I2C_SDA},
|
|
};
|
|
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
|
|
|
|
void board_config_pre_init(void)
|
|
{
|
|
/*
|
|
* enable SYSCFG clock:
|
|
* otherwise the SYSCFG peripheral is not clocked during the pre-init
|
|
* and the register write as no effect.
|
|
*/
|
|
STM32_RCC_APB2ENR |= 1 << 0;
|
|
/*
|
|
* Remap USART DMA to match the USART driver
|
|
* the DMA mapping is :
|
|
* Chan 4 : USART1_TX
|
|
* Chan 5 : USART1_RX
|
|
*/
|
|
STM32_SYSCFG_CFGR1 |= (1 << 9) | (1 << 10);/* Remap USART1 RX/TX DMA */
|
|
}
|