1
0
mirror of https://xff.cz/git/u-boot/ synced 2026-01-17 11:52:58 +01:00

pinephone-pro: Enable DMC node when booting from U-Boot using RK blobs

Signed-off-by: Ondrej Jirman <megi@xff.cz>
This commit is contained in:
Ondrej Jirman
2023-06-02 04:26:13 +02:00
parent 57fa31f00c
commit fa049d4fe7
2 changed files with 35 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
# SPDX-License-Identifier: GPL-2.0+
obj-y += pinephone-pro-rk3399.o

View File

@@ -0,0 +1,32 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2016 Rockchip Electronics Co., Ltd
* (C) Copyright 2022 Peter Robinson <pbrobinson at gmail.com>
*/
#include <common.h>
#include <dm.h>
#include <init.h>
#include <fdt_support.h>
#include <linux/libfdt.h>
#include <syscon.h>
#include <asm/io.h>
#include <asm/arch-rockchip/clock.h>
#include <asm/arch-rockchip/grf_rk3399.h>
#include <asm/arch-rockchip/hardware.h>
#include <asm/arch-rockchip/misc.h>
#include <power/regulator.h>
#ifdef CONFIG_OF_BOARD_SETUP
int ft_board_setup(void *blob, struct bd_info *bd)
{
#ifdef CONFIG_ROCKCHIP_EXTERNAL_TPL
int rc = fdt_find_and_setprop(blob, "/memory-controller",
"status", "okay", sizeof("okay"), 1);
if (rc)
printf("Unable to enable DMC err=%s\n", fdt_strerror(rc));
#endif
return 0;
}
#endif