mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 09:12:08 +02:00
Merge tag 'u-boot-rockchip-20200327' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip
- Fixed for rv1108 and elgin-rv1108 board - Fix the keyboard from USB instead of CrOS EC
This commit is contained in:
@@ -40,9 +40,20 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
&uart2 {
|
&uart2 {
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&uart2m0_xfer_pullup>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&usb20_otg {
|
&usb20_otg {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&pinctrl {
|
||||||
|
uart2m0 {
|
||||||
|
uart2m0_xfer_pullup: uart2m0-xfer-pullup {
|
||||||
|
rockchip,pins = <2 RK_PD2 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
|
||||||
|
<2 RK_PD1 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
6
arch/arm/dts/rv1108-u-boot.dtsi
Normal file
6
arch/arm/dts/rv1108-u-boot.dtsi
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0+
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2019 Jagan Teki <jagan@amarulasolutions.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "rockchip-u-boot.dtsi"
|
@@ -5,8 +5,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <syscon.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <fdtdec.h>
|
#include <asm/arch-rockchip/clock.h>
|
||||||
#include <asm/arch-rockchip/grf_rv1108.h>
|
#include <asm/arch-rockchip/grf_rv1108.h>
|
||||||
#include <asm/arch-rockchip/hardware.h>
|
#include <asm/arch-rockchip/hardware.h>
|
||||||
#include <asm/gpio.h>
|
#include <asm/gpio.h>
|
||||||
@@ -15,7 +16,6 @@ DECLARE_GLOBAL_DATA_PTR;
|
|||||||
|
|
||||||
int mach_cpu_init(void)
|
int mach_cpu_init(void)
|
||||||
{
|
{
|
||||||
int node;
|
|
||||||
struct rv1108_grf *grf;
|
struct rv1108_grf *grf;
|
||||||
enum {
|
enum {
|
||||||
GPIO3C3_SHIFT = 6,
|
GPIO3C3_SHIFT = 6,
|
||||||
@@ -35,8 +35,7 @@ int mach_cpu_init(void)
|
|||||||
GPIO2D1_UART2_SIN_M0,
|
GPIO2D1_UART2_SIN_M0,
|
||||||
};
|
};
|
||||||
|
|
||||||
node = fdt_node_offset_by_compatible(gd->fdt_blob, -1, "rockchip,rv1108-grf");
|
grf = syscon_get_first_range(ROCKCHIP_SYSCON_GRF);
|
||||||
grf = (struct rv1108_grf *)fdtdec_get_addr(gd->fdt_blob, node, "reg");
|
|
||||||
|
|
||||||
/* Elgin board use UART2 m0 for debug*/
|
/* Elgin board use UART2 m0 for debug*/
|
||||||
rk_clrsetreg(&grf->gpio2d_iomux,
|
rk_clrsetreg(&grf->gpio2d_iomux,
|
||||||
@@ -50,7 +49,7 @@ int mach_cpu_init(void)
|
|||||||
|
|
||||||
#define MODEM_ENABLE_GPIO 111
|
#define MODEM_ENABLE_GPIO 111
|
||||||
|
|
||||||
int board_early_init_f(void)
|
int rk_board_late_init(void)
|
||||||
{
|
{
|
||||||
gpio_request(MODEM_ENABLE_GPIO, "modem_enable");
|
gpio_request(MODEM_ENABLE_GPIO, "modem_enable");
|
||||||
gpio_direction_output(MODEM_ENABLE_GPIO, 0);
|
gpio_direction_output(MODEM_ENABLE_GPIO, 0);
|
||||||
|
@@ -5,8 +5,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <syscon.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <fdtdec.h>
|
#include <asm/arch-rockchip/clock.h>
|
||||||
#include <asm/arch-rockchip/grf_rv1108.h>
|
#include <asm/arch-rockchip/grf_rv1108.h>
|
||||||
#include <asm/arch-rockchip/hardware.h>
|
#include <asm/arch-rockchip/hardware.h>
|
||||||
|
|
||||||
@@ -14,7 +15,6 @@ DECLARE_GLOBAL_DATA_PTR;
|
|||||||
|
|
||||||
int mach_cpu_init(void)
|
int mach_cpu_init(void)
|
||||||
{
|
{
|
||||||
int node;
|
|
||||||
struct rv1108_grf *grf;
|
struct rv1108_grf *grf;
|
||||||
enum {
|
enum {
|
||||||
GPIO3C3_SHIFT = 6,
|
GPIO3C3_SHIFT = 6,
|
||||||
@@ -34,8 +34,7 @@ int mach_cpu_init(void)
|
|||||||
GPIO2D1_UART2_SIN_M0,
|
GPIO2D1_UART2_SIN_M0,
|
||||||
};
|
};
|
||||||
|
|
||||||
node = fdt_node_offset_by_compatible(gd->fdt_blob, -1, "rockchip,rv1108-grf");
|
grf = syscon_get_first_range(ROCKCHIP_SYSCON_GRF);
|
||||||
grf = (struct rv1108_grf *)fdtdec_get_addr(gd->fdt_blob, node, "reg");
|
|
||||||
|
|
||||||
/*evb board use UART2 m0 for debug*/
|
/*evb board use UART2 m0 for debug*/
|
||||||
rk_clrsetreg(&grf->gpio2d_iomux,
|
rk_clrsetreg(&grf->gpio2d_iomux,
|
||||||
|
@@ -4,12 +4,14 @@ CONFIG_SYS_TEXT_BASE=0x60000000
|
|||||||
CONFIG_ENV_OFFSET=0x3F8000
|
CONFIG_ENV_OFFSET=0x3F8000
|
||||||
CONFIG_ROCKCHIP_RV1108=y
|
CONFIG_ROCKCHIP_RV1108=y
|
||||||
CONFIG_TARGET_ELGIN_RV1108=y
|
CONFIG_TARGET_ELGIN_RV1108=y
|
||||||
|
CONFIG_ROCKCHIP_BOOT_MODE_REG=0
|
||||||
CONFIG_NR_DRAM_BANKS=1
|
CONFIG_NR_DRAM_BANKS=1
|
||||||
CONFIG_DEBUG_UART_BASE=0x10210000
|
CONFIG_DEBUG_UART_BASE=0x10210000
|
||||||
CONFIG_DEBUG_UART_CLOCK=24000000
|
CONFIG_DEBUG_UART_CLOCK=24000000
|
||||||
CONFIG_DEBUG_UART=y
|
CONFIG_DEBUG_UART=y
|
||||||
# CONFIG_USE_BOOTCOMMAND is not set
|
# CONFIG_USE_BOOTCOMMAND is not set
|
||||||
CONFIG_DEFAULT_FDT_FILE="rv1108-elgin-r1.dtb"
|
CONFIG_DEFAULT_FDT_FILE="rv1108-elgin-r1.dtb"
|
||||||
|
CONFIG_BOARD_LATE_INIT=y
|
||||||
# CONFIG_DISPLAY_CPUINFO is not set
|
# CONFIG_DISPLAY_CPUINFO is not set
|
||||||
CONFIG_DISPLAY_BOARDINFO_LATE=y
|
CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||||
CONFIG_CMD_GPIO=y
|
CONFIG_CMD_GPIO=y
|
||||||
|
@@ -75,6 +75,7 @@ CONFIG_USB_GADGET_DWC2_OTG=y
|
|||||||
CONFIG_USB_HOST_ETHER=y
|
CONFIG_USB_HOST_ETHER=y
|
||||||
CONFIG_USB_ETHER_ASIX=y
|
CONFIG_USB_ETHER_ASIX=y
|
||||||
CONFIG_USB_ETHER_SMSC95XX=y
|
CONFIG_USB_ETHER_SMSC95XX=y
|
||||||
|
CONFIG_USB_KEYBOARD=y
|
||||||
CONFIG_DM_VIDEO=y
|
CONFIG_DM_VIDEO=y
|
||||||
# CONFIG_VIDEO_BPP8 is not set
|
# CONFIG_VIDEO_BPP8 is not set
|
||||||
CONFIG_DISPLAY=y
|
CONFIG_DISPLAY=y
|
||||||
|
@@ -56,5 +56,6 @@ CONFIG_USB_ETHER_ASIX88179=y
|
|||||||
CONFIG_USB_ETHER_MCS7830=y
|
CONFIG_USB_ETHER_MCS7830=y
|
||||||
CONFIG_USB_ETHER_RTL8152=y
|
CONFIG_USB_ETHER_RTL8152=y
|
||||||
CONFIG_USB_ETHER_SMSC95XX=y
|
CONFIG_USB_ETHER_SMSC95XX=y
|
||||||
|
CONFIG_USB_KEYBOARD=y
|
||||||
CONFIG_SPL_TINY_MEMSET=y
|
CONFIG_SPL_TINY_MEMSET=y
|
||||||
CONFIG_ERRNO_STR=y
|
CONFIG_ERRNO_STR=y
|
||||||
|
@@ -74,6 +74,7 @@ CONFIG_USB_DWC2=y
|
|||||||
CONFIG_ROCKCHIP_USB2_PHY=y
|
CONFIG_ROCKCHIP_USB2_PHY=y
|
||||||
CONFIG_USB_GADGET=y
|
CONFIG_USB_GADGET=y
|
||||||
CONFIG_USB_GADGET_DWC2_OTG=y
|
CONFIG_USB_GADGET_DWC2_OTG=y
|
||||||
|
CONFIG_USB_KEYBOARD=y
|
||||||
CONFIG_DM_VIDEO=y
|
CONFIG_DM_VIDEO=y
|
||||||
# CONFIG_VIDEO_BPP8 is not set
|
# CONFIG_VIDEO_BPP8 is not set
|
||||||
CONFIG_DISPLAY=y
|
CONFIG_DISPLAY=y
|
||||||
|
@@ -80,6 +80,7 @@ CONFIG_USB_GADGET_DWC2_OTG=y
|
|||||||
CONFIG_USB_HOST_ETHER=y
|
CONFIG_USB_HOST_ETHER=y
|
||||||
CONFIG_USB_ETHER_ASIX=y
|
CONFIG_USB_ETHER_ASIX=y
|
||||||
CONFIG_USB_ETHER_SMSC95XX=y
|
CONFIG_USB_ETHER_SMSC95XX=y
|
||||||
|
CONFIG_USB_KEYBOARD=y
|
||||||
CONFIG_DM_VIDEO=y
|
CONFIG_DM_VIDEO=y
|
||||||
CONFIG_DISPLAY=y
|
CONFIG_DISPLAY=y
|
||||||
CONFIG_VIDEO_ROCKCHIP=y
|
CONFIG_VIDEO_ROCKCHIP=y
|
||||||
|
@@ -80,6 +80,7 @@ CONFIG_USB_GADGET_DWC2_OTG=y
|
|||||||
CONFIG_USB_HOST_ETHER=y
|
CONFIG_USB_HOST_ETHER=y
|
||||||
CONFIG_USB_ETHER_ASIX=y
|
CONFIG_USB_ETHER_ASIX=y
|
||||||
CONFIG_USB_ETHER_SMSC95XX=y
|
CONFIG_USB_ETHER_SMSC95XX=y
|
||||||
|
CONFIG_USB_KEYBOARD=y
|
||||||
CONFIG_DM_VIDEO=y
|
CONFIG_DM_VIDEO=y
|
||||||
# CONFIG_VIDEO_BPP8 is not set
|
# CONFIG_VIDEO_BPP8 is not set
|
||||||
CONFIG_DISPLAY=y
|
CONFIG_DISPLAY=y
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
#define __CONFIG_H
|
#define __CONFIG_H
|
||||||
|
|
||||||
#define ROCKCHIP_DEVICE_SETTINGS \
|
#define ROCKCHIP_DEVICE_SETTINGS \
|
||||||
"stdin=serial,cros-ec-keyb\0" \
|
"stdin=serial,usbkbd\0" \
|
||||||
"stdout=serial,vidconsole\0" \
|
"stdout=serial,vidconsole\0" \
|
||||||
"stderr=serial,vidconsole\0"
|
"stderr=serial,vidconsole\0"
|
||||||
|
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
#define __ROC_PC_RK3399_H
|
#define __ROC_PC_RK3399_H
|
||||||
|
|
||||||
#define ROCKCHIP_DEVICE_SETTINGS \
|
#define ROCKCHIP_DEVICE_SETTINGS \
|
||||||
"stdin=serial,cros-ec-keyb\0" \
|
"stdin=serial,usbkbd\0" \
|
||||||
"stdout=serial,vidconsole\0" \
|
"stdout=serial,vidconsole\0" \
|
||||||
"stderr=serial,vidconsole\0"
|
"stderr=serial,vidconsole\0"
|
||||||
|
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
#define __CONFIG_H
|
#define __CONFIG_H
|
||||||
|
|
||||||
#define ROCKCHIP_DEVICE_SETTINGS \
|
#define ROCKCHIP_DEVICE_SETTINGS \
|
||||||
"stdin=serial,cros-ec-keyb\0" \
|
"stdin=serial,usbkbd\0" \
|
||||||
"stdout=serial,vidconsole\0" \
|
"stdout=serial,vidconsole\0" \
|
||||||
"stderr=serial,vidconsole\0"
|
"stderr=serial,vidconsole\0"
|
||||||
|
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
#define __CONFIG_H
|
#define __CONFIG_H
|
||||||
|
|
||||||
#define ROCKCHIP_DEVICE_SETTINGS \
|
#define ROCKCHIP_DEVICE_SETTINGS \
|
||||||
"stdin=serial,cros-ec-keyb\0" \
|
"stdin=serial,usbkbd\0" \
|
||||||
"stdout=serial,vidconsole\0" \
|
"stdout=serial,vidconsole\0" \
|
||||||
"stderr=serial,vidconsole\0"
|
"stderr=serial,vidconsole\0"
|
||||||
|
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
#define __CONFIG_H
|
#define __CONFIG_H
|
||||||
|
|
||||||
#define ROCKCHIP_DEVICE_SETTINGS \
|
#define ROCKCHIP_DEVICE_SETTINGS \
|
||||||
"stdin=serial,cros-ec-keyb\0" \
|
"stdin=serial,usbkbd\0" \
|
||||||
"stdout=serial,vidconsole\0" \
|
"stdout=serial,vidconsole\0" \
|
||||||
"stderr=serial,vidconsole\0"
|
"stderr=serial,vidconsole\0"
|
||||||
|
|
||||||
|
@@ -307,11 +307,13 @@ static int rkcommon_parse_header(const void *buf, struct header0_info *header0,
|
|||||||
rkcommon_offset_to_spi(hdr1_offset));
|
rkcommon_offset_to_spi(hdr1_offset));
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(spl_infos); i++) {
|
for (i = 0; i < ARRAY_SIZE(spl_infos); i++) {
|
||||||
if (!memcmp(&hdr1_sdmmc->magic, spl_infos[i].spl_hdr, 4)) {
|
if (!memcmp(&hdr1_sdmmc->magic, spl_infos[i].spl_hdr,
|
||||||
|
RK_SPL_HDR_SIZE)) {
|
||||||
if (spl_info)
|
if (spl_info)
|
||||||
*spl_info = &spl_infos[i];
|
*spl_info = &spl_infos[i];
|
||||||
return IH_TYPE_RKSD;
|
return IH_TYPE_RKSD;
|
||||||
} else if (!memcmp(&hdr1_spi->magic, spl_infos[i].spl_hdr, 4)) {
|
} else if (!memcmp(&hdr1_spi->magic, spl_infos[i].spl_hdr,
|
||||||
|
RK_SPL_HDR_SIZE)) {
|
||||||
if (spl_info)
|
if (spl_info)
|
||||||
*spl_info = &spl_infos[i];
|
*spl_info = &spl_infos[i];
|
||||||
return IH_TYPE_RKSPI;
|
return IH_TYPE_RKSPI;
|
||||||
|
Reference in New Issue
Block a user