1 // SPDX-License-Identifier: GPL-2.0+
3 * (C)Copyright 2016 Rockchip Electronics Co., Ltd
4 * Authors: Andy Yan <andy.yan@rock-chips.com>
10 #include <asm/arch-rockchip/grf_rv1108.h>
11 #include <asm/arch-rockchip/hardware.h>
14 DECLARE_GLOBAL_DATA_PTR;
16 int mach_cpu_init(void)
19 struct rv1108_grf *grf;
22 GPIO3C3_MASK = 3 << GPIO3C3_SHIFT,
25 GPIO3C2_MASK = 3 << GPIO3C2_SHIFT,
28 GPIO2D2_MASK = 3 << GPIO2D2_SHIFT,
30 GPIO2D2_UART2_SOUT_M0,
33 GPIO2D1_MASK = 3 << GPIO2D1_SHIFT,
38 node = fdt_node_offset_by_compatible(gd->fdt_blob, -1, "rockchip,rv1108-grf");
39 grf = (struct rv1108_grf *)fdtdec_get_addr(gd->fdt_blob, node, "reg");
41 /* Elgin board use UART2 m0 for debug*/
42 rk_clrsetreg(&grf->gpio2d_iomux,
43 GPIO2D2_MASK | GPIO2D1_MASK,
44 GPIO2D2_UART2_SOUT_M0 << GPIO2D2_SHIFT |
45 GPIO2D1_UART2_SIN_M0 << GPIO2D1_SHIFT);
46 rk_clrreg(&grf->gpio3c_iomux, GPIO3C3_MASK | GPIO3C2_MASK);
51 #define MODEM_ENABLE_GPIO 111
55 gpio_request(MODEM_ENABLE_GPIO, "modem_enable");
56 gpio_direction_output(MODEM_ENABLE_GPIO, 0);
63 gd->ram_size = 0x8000000;
68 int dram_init_banksize(void)
70 gd->bd->bi_dram[0].start = 0x60000000;
71 gd->bd->bi_dram[0].size = 0x8000000;