18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci * Copyright 2010 Advanced Micro Devices, Inc.
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a
58c2ecf20Sopenharmony_ci * copy of this software and associated documentation files (the "Software"),
68c2ecf20Sopenharmony_ci * to deal in the Software without restriction, including without limitation
78c2ecf20Sopenharmony_ci * the rights to use, copy, modify, merge, publish, distribute, sublicense,
88c2ecf20Sopenharmony_ci * and/or sell copies of the Software, and to permit persons to whom the
98c2ecf20Sopenharmony_ci * Software is furnished to do so, subject to the following conditions:
108c2ecf20Sopenharmony_ci *
118c2ecf20Sopenharmony_ci * The above copyright notice and this permission notice shall be included in
128c2ecf20Sopenharmony_ci * all copies or substantial portions of the Software.
138c2ecf20Sopenharmony_ci *
148c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
158c2ecf20Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
168c2ecf20Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
178c2ecf20Sopenharmony_ci * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
188c2ecf20Sopenharmony_ci * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
198c2ecf20Sopenharmony_ci * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
208c2ecf20Sopenharmony_ci * OTHER DEALINGS IN THE SOFTWARE.
218c2ecf20Sopenharmony_ci *
228c2ecf20Sopenharmony_ci * Authors: Alex Deucher
238c2ecf20Sopenharmony_ci */
248c2ecf20Sopenharmony_ci#ifndef __SI_REG_H__
258c2ecf20Sopenharmony_ci#define __SI_REG_H__
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci/* SI */
288c2ecf20Sopenharmony_ci#define SI_DC_GPIO_HPD_MASK                      0x65b0
298c2ecf20Sopenharmony_ci#define SI_DC_GPIO_HPD_A                         0x65b4
308c2ecf20Sopenharmony_ci#define SI_DC_GPIO_HPD_EN                        0x65b8
318c2ecf20Sopenharmony_ci#define SI_DC_GPIO_HPD_Y                         0x65bc
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci#define SI_GRPH_CONTROL                          0x6804
348c2ecf20Sopenharmony_ci#       define SI_GRPH_DEPTH(x)                  (((x) & 0x3) << 0)
358c2ecf20Sopenharmony_ci#       define SI_GRPH_DEPTH_8BPP                0
368c2ecf20Sopenharmony_ci#       define SI_GRPH_DEPTH_16BPP               1
378c2ecf20Sopenharmony_ci#       define SI_GRPH_DEPTH_32BPP               2
388c2ecf20Sopenharmony_ci#       define SI_GRPH_NUM_BANKS(x)              (((x) & 0x3) << 2)
398c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_2_BANK               0
408c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_4_BANK               1
418c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_8_BANK               2
428c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_16_BANK              3
438c2ecf20Sopenharmony_ci#       define SI_GRPH_Z(x)                      (((x) & 0x3) << 4)
448c2ecf20Sopenharmony_ci#       define SI_GRPH_BANK_WIDTH(x)             (((x) & 0x3) << 6)
458c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_BANK_WIDTH_1         0
468c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_BANK_WIDTH_2         1
478c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_BANK_WIDTH_4         2
488c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_BANK_WIDTH_8         3
498c2ecf20Sopenharmony_ci#       define SI_GRPH_FORMAT(x)                 (((x) & 0x7) << 8)
508c2ecf20Sopenharmony_ci/* 8 BPP */
518c2ecf20Sopenharmony_ci#       define SI_GRPH_FORMAT_INDEXED            0
528c2ecf20Sopenharmony_ci/* 16 BPP */
538c2ecf20Sopenharmony_ci#       define SI_GRPH_FORMAT_ARGB1555           0
548c2ecf20Sopenharmony_ci#       define SI_GRPH_FORMAT_ARGB565            1
558c2ecf20Sopenharmony_ci#       define SI_GRPH_FORMAT_ARGB4444           2
568c2ecf20Sopenharmony_ci#       define SI_GRPH_FORMAT_AI88               3
578c2ecf20Sopenharmony_ci#       define SI_GRPH_FORMAT_MONO16             4
588c2ecf20Sopenharmony_ci#       define SI_GRPH_FORMAT_BGRA5551           5
598c2ecf20Sopenharmony_ci/* 32 BPP */
608c2ecf20Sopenharmony_ci#       define SI_GRPH_FORMAT_ARGB8888           0
618c2ecf20Sopenharmony_ci#       define SI_GRPH_FORMAT_ARGB2101010        1
628c2ecf20Sopenharmony_ci#       define SI_GRPH_FORMAT_32BPP_DIG          2
638c2ecf20Sopenharmony_ci#       define SI_GRPH_FORMAT_8B_ARGB2101010     3
648c2ecf20Sopenharmony_ci#       define SI_GRPH_FORMAT_BGRA1010102        4
658c2ecf20Sopenharmony_ci#       define SI_GRPH_FORMAT_8B_BGRA1010102     5
668c2ecf20Sopenharmony_ci#       define SI_GRPH_FORMAT_RGB111110          6
678c2ecf20Sopenharmony_ci#       define SI_GRPH_FORMAT_BGR101111          7
688c2ecf20Sopenharmony_ci#       define SI_GRPH_BANK_HEIGHT(x)            (((x) & 0x3) << 11)
698c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_BANK_HEIGHT_1        0
708c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_BANK_HEIGHT_2        1
718c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_BANK_HEIGHT_4        2
728c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_BANK_HEIGHT_8        3
738c2ecf20Sopenharmony_ci#       define SI_GRPH_TILE_SPLIT(x)             (((x) & 0x7) << 13)
748c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_TILE_SPLIT_64B       0
758c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_TILE_SPLIT_128B      1
768c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_TILE_SPLIT_256B      2
778c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_TILE_SPLIT_512B      3
788c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_TILE_SPLIT_1KB       4
798c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_TILE_SPLIT_2KB       5
808c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_TILE_SPLIT_4KB       6
818c2ecf20Sopenharmony_ci#       define SI_GRPH_MACRO_TILE_ASPECT(x)      (((x) & 0x3) << 18)
828c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_MACRO_TILE_ASPECT_1  0
838c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_MACRO_TILE_ASPECT_2  1
848c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_MACRO_TILE_ASPECT_4  2
858c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_MACRO_TILE_ASPECT_8  3
868c2ecf20Sopenharmony_ci#       define SI_GRPH_ARRAY_MODE(x)             (((x) & 0x7) << 20)
878c2ecf20Sopenharmony_ci#       define SI_GRPH_ARRAY_LINEAR_GENERAL      0
888c2ecf20Sopenharmony_ci#       define SI_GRPH_ARRAY_LINEAR_ALIGNED      1
898c2ecf20Sopenharmony_ci#       define SI_GRPH_ARRAY_1D_TILED_THIN1      2
908c2ecf20Sopenharmony_ci#       define SI_GRPH_ARRAY_2D_TILED_THIN1      4
918c2ecf20Sopenharmony_ci#       define SI_GRPH_PIPE_CONFIG(x)		 (((x) & 0x1f) << 24)
928c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_P2			 0
938c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_P4_8x16		 4
948c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_P4_16x16		 5
958c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_P4_16x32		 6
968c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_P4_32x32		 7
978c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_P8_16x16_8x16	 8
988c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_P8_16x32_8x16	 9
998c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_P8_32x32_8x16	 10
1008c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_P8_16x32_16x16	 11
1018c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_P8_32x32_16x16	 12
1028c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_P8_32x32_16x32	 13
1038c2ecf20Sopenharmony_ci#       define SI_ADDR_SURF_P8_32x64_32x32	 14
1048c2ecf20Sopenharmony_ci
1058c2ecf20Sopenharmony_ci#endif
106