1// Copyright 2018 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#pragma once
6
7#include <soc/aml-common/aml-gpu.h>
8#include <soc/aml-s905d2/s905d2-hw.h>
9
10enum {
11    S905D2_XTAL        = 0,    // 24MHz
12    S905D2_GP0         = 1,    // Currently set to 846 MHz
13    S905D2_HIFI        = 2,
14    S905D2_FCLK_DIV2P5 = 3,    // 800 MHz
15    S905D2_FCLK_DIV3   = 4,    // 666 MHz
16    S905D2_FCLK_DIV4   = 5,    // 500 MHz
17    S905D2_FCLK_DIV5   = 6,    // 400 MHz
18    S905D2_FCLK_DIV7   = 7,    // 285.7 MHz
19};
20
21static aml_gpu_block_t s905d2_gpu_blocks = {
22    .reset0_level_offset        = S905D2_RESET0_LEVEL,
23    .reset0_mask_offset         = S905D2_RESET0_MASK,
24    .reset2_level_offset        = S905D2_RESET2_LEVEL,
25    .reset2_mask_offset         = S905D2_RESET2_MASK,
26    .hhi_clock_cntl_offset      = 0x6C,
27    .gpu_clk_freq               =
28    {
29        S905D2_FCLK_DIV7,
30        S905D2_FCLK_DIV5,
31        S905D2_FCLK_DIV4,
32        S905D2_FCLK_DIV3,
33        S905D2_FCLK_DIV2P5,
34        S905D2_GP0,
35    },
36};
37