mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
gru: kevin: define GPIOs used on both platforms
The same GPIOs are used on both platforms, definitions are added an a new .h to make it easier to re-use them across the code. BRANCH=none BUG=chrome-os-partner:51537 TEST=panel backlight still enabled on Gru as before. The rest of the GPIOs are used in the upcoming patches. Change-Id: I1a6c5b5beb82ffcc5fea397e8e9ec2f183f4a7e0 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/346219 Tested-by: Shunqian Zheng <zhengsq@rock-chips.com>
This commit is contained in:
parent
d2b76cec74
commit
c58788026f
2 changed files with 33 additions and 1 deletions
30
src/mainboard/google/gru/board.h
Normal file
30
src/mainboard/google/gru/board.h
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
/*
|
||||||
|
* This file is part of the coreboot project.
|
||||||
|
*
|
||||||
|
* Copyright 2016 Rockchip 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_GRU_BOARD_H
|
||||||
|
#define __COREBOOT_SRC_MAINBOARD_GOOGLE_GRU_BOARD_H
|
||||||
|
|
||||||
|
#include <gpio.h>
|
||||||
|
|
||||||
|
#define GPIO_BACKLIGHT GPIO(1, C, 1)
|
||||||
|
#define GPIO_EC_IN_RW GPIO(3, B, 0)
|
||||||
|
#define GPIO_EC_IRQ GPIO(0, A, 1)
|
||||||
|
#define GPIO_RESET GPIO(0, B, 3)
|
||||||
|
#define GPIO_WP GPIO(1, C, 2)
|
||||||
|
|
||||||
|
void setup_chromeos_gpios(void);
|
||||||
|
|
||||||
|
#endif /* ! __COREBOOT_SRC_MAINBOARD_GOOGLE_GRU_BOARD_H */
|
|
@ -25,6 +25,8 @@
|
||||||
#include <soc/grf.h>
|
#include <soc/grf.h>
|
||||||
#include <soc/i2c.h>
|
#include <soc/i2c.h>
|
||||||
|
|
||||||
|
#include "board.h"
|
||||||
|
|
||||||
static void configure_emmc(void)
|
static void configure_emmc(void)
|
||||||
{
|
{
|
||||||
/* Host controller does not support programmable clock generator.
|
/* Host controller does not support programmable clock generator.
|
||||||
|
@ -144,7 +146,7 @@ static void enable_backlight_booster(void)
|
||||||
|
|
||||||
void mainboard_power_on_backlight(void)
|
void mainboard_power_on_backlight(void)
|
||||||
{
|
{
|
||||||
gpio_output(GPIO(1, C, 1), 1); /* BL_EN */
|
gpio_output(GPIO_BACKLIGHT, 1); /* BL_EN */
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BOARD_GOOGLE_GRU))
|
if (IS_ENABLED(CONFIG_BOARD_GOOGLE_GRU))
|
||||||
enable_backlight_booster();
|
enable_backlight_booster();
|
||||||
|
|
Loading…
Add table
Reference in a new issue