165138eb7SQingqing Zhuo /* 265138eb7SQingqing Zhuo * Copyright 2022 Advanced Micro Devices, Inc. 365138eb7SQingqing Zhuo * 465138eb7SQingqing Zhuo * Permission is hereby granted, free of charge, to any person obtaining a 565138eb7SQingqing Zhuo * copy of this software and associated documentation files (the "Software"), 665138eb7SQingqing Zhuo * to deal in the Software without restriction, including without limitation 765138eb7SQingqing Zhuo * the rights to use, copy, modify, merge, publish, distribute, sublicense, 865138eb7SQingqing Zhuo * and/or sell copies of the Software, and to permit persons to whom the 965138eb7SQingqing Zhuo * Software is furnished to do so, subject to the following conditions: 1065138eb7SQingqing Zhuo * 1165138eb7SQingqing Zhuo * The above copyright notice and this permission notice shall be included in 1265138eb7SQingqing Zhuo * all copies or substantial portions of the Software. 1365138eb7SQingqing Zhuo * 1465138eb7SQingqing Zhuo * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1565138eb7SQingqing Zhuo * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1665138eb7SQingqing Zhuo * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1765138eb7SQingqing Zhuo * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 1865138eb7SQingqing Zhuo * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1965138eb7SQingqing Zhuo * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 2065138eb7SQingqing Zhuo * OTHER DEALINGS IN THE SOFTWARE. 2165138eb7SQingqing Zhuo * 2265138eb7SQingqing Zhuo * Authors: AMD 2365138eb7SQingqing Zhuo * 2465138eb7SQingqing Zhuo */ 2565138eb7SQingqing Zhuo 2665138eb7SQingqing Zhuo #ifndef _DMUB_DCN35_H_ 2765138eb7SQingqing Zhuo #define _DMUB_DCN35_H_ 2865138eb7SQingqing Zhuo 2965138eb7SQingqing Zhuo #include "dmub_dcn31.h" 3065138eb7SQingqing Zhuo 3165138eb7SQingqing Zhuo struct dmub_srv; 3265138eb7SQingqing Zhuo 3365138eb7SQingqing Zhuo /* DCN35 register definitions. */ 3465138eb7SQingqing Zhuo 3565138eb7SQingqing Zhuo #define DMUB_DCN35_REGS() \ 3665138eb7SQingqing Zhuo DMUB_SR(DMCUB_CNTL) \ 3765138eb7SQingqing Zhuo DMUB_SR(DMCUB_CNTL2) \ 3865138eb7SQingqing Zhuo DMUB_SR(DMCUB_SEC_CNTL) \ 3965138eb7SQingqing Zhuo DMUB_SR(DMCUB_INBOX0_SIZE) \ 4065138eb7SQingqing Zhuo DMUB_SR(DMCUB_INBOX0_RPTR) \ 4165138eb7SQingqing Zhuo DMUB_SR(DMCUB_INBOX0_WPTR) \ 4265138eb7SQingqing Zhuo DMUB_SR(DMCUB_INBOX1_BASE_ADDRESS) \ 4365138eb7SQingqing Zhuo DMUB_SR(DMCUB_INBOX1_SIZE) \ 4465138eb7SQingqing Zhuo DMUB_SR(DMCUB_INBOX1_RPTR) \ 4565138eb7SQingqing Zhuo DMUB_SR(DMCUB_INBOX1_WPTR) \ 4665138eb7SQingqing Zhuo DMUB_SR(DMCUB_OUTBOX0_BASE_ADDRESS) \ 4765138eb7SQingqing Zhuo DMUB_SR(DMCUB_OUTBOX0_SIZE) \ 4865138eb7SQingqing Zhuo DMUB_SR(DMCUB_OUTBOX0_RPTR) \ 4965138eb7SQingqing Zhuo DMUB_SR(DMCUB_OUTBOX0_WPTR) \ 5065138eb7SQingqing Zhuo DMUB_SR(DMCUB_OUTBOX1_BASE_ADDRESS) \ 5165138eb7SQingqing Zhuo DMUB_SR(DMCUB_OUTBOX1_SIZE) \ 5265138eb7SQingqing Zhuo DMUB_SR(DMCUB_OUTBOX1_RPTR) \ 5365138eb7SQingqing Zhuo DMUB_SR(DMCUB_OUTBOX1_WPTR) \ 5465138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW0_OFFSET) \ 5565138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW1_OFFSET) \ 5665138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW2_OFFSET) \ 5765138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW3_OFFSET) \ 5865138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW4_OFFSET) \ 5965138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW5_OFFSET) \ 6065138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW6_OFFSET) \ 6165138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW7_OFFSET) \ 6265138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW0_OFFSET_HIGH) \ 6365138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW1_OFFSET_HIGH) \ 6465138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW2_OFFSET_HIGH) \ 6565138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW3_OFFSET_HIGH) \ 6665138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW4_OFFSET_HIGH) \ 6765138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW5_OFFSET_HIGH) \ 6865138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW6_OFFSET_HIGH) \ 6965138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW7_OFFSET_HIGH) \ 7065138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW0_BASE_ADDRESS) \ 7165138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW1_BASE_ADDRESS) \ 7265138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW2_BASE_ADDRESS) \ 7365138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW3_BASE_ADDRESS) \ 7465138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW4_BASE_ADDRESS) \ 7565138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW5_BASE_ADDRESS) \ 7665138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW6_BASE_ADDRESS) \ 7765138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW7_BASE_ADDRESS) \ 7865138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW0_TOP_ADDRESS) \ 7965138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW1_TOP_ADDRESS) \ 8065138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW2_TOP_ADDRESS) \ 8165138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW3_TOP_ADDRESS) \ 8265138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW4_TOP_ADDRESS) \ 8365138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW5_TOP_ADDRESS) \ 8465138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW6_TOP_ADDRESS) \ 8565138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_CW7_TOP_ADDRESS) \ 8665138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION4_OFFSET) \ 8765138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION4_OFFSET_HIGH) \ 8865138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION4_TOP_ADDRESS) \ 8965138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION5_OFFSET) \ 9065138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION5_OFFSET_HIGH) \ 9165138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION5_TOP_ADDRESS) \ 92*b5e161e4SNicholas Kazlauskas DMUB_SR(DMCUB_REGION6_OFFSET) \ 93*b5e161e4SNicholas Kazlauskas DMUB_SR(DMCUB_REGION6_OFFSET_HIGH) \ 94*b5e161e4SNicholas Kazlauskas DMUB_SR(DMCUB_REGION6_TOP_ADDRESS) \ 9565138eb7SQingqing Zhuo DMUB_SR(DMCUB_SCRATCH0) \ 9665138eb7SQingqing Zhuo DMUB_SR(DMCUB_SCRATCH1) \ 9765138eb7SQingqing Zhuo DMUB_SR(DMCUB_SCRATCH2) \ 9865138eb7SQingqing Zhuo DMUB_SR(DMCUB_SCRATCH3) \ 9965138eb7SQingqing Zhuo DMUB_SR(DMCUB_SCRATCH4) \ 10065138eb7SQingqing Zhuo DMUB_SR(DMCUB_SCRATCH5) \ 10165138eb7SQingqing Zhuo DMUB_SR(DMCUB_SCRATCH6) \ 10265138eb7SQingqing Zhuo DMUB_SR(DMCUB_SCRATCH7) \ 10365138eb7SQingqing Zhuo DMUB_SR(DMCUB_SCRATCH8) \ 10465138eb7SQingqing Zhuo DMUB_SR(DMCUB_SCRATCH9) \ 10565138eb7SQingqing Zhuo DMUB_SR(DMCUB_SCRATCH10) \ 10665138eb7SQingqing Zhuo DMUB_SR(DMCUB_SCRATCH11) \ 10765138eb7SQingqing Zhuo DMUB_SR(DMCUB_SCRATCH12) \ 10865138eb7SQingqing Zhuo DMUB_SR(DMCUB_SCRATCH13) \ 10965138eb7SQingqing Zhuo DMUB_SR(DMCUB_SCRATCH14) \ 11065138eb7SQingqing Zhuo DMUB_SR(DMCUB_SCRATCH15) \ 11165138eb7SQingqing Zhuo DMUB_SR(DMCUB_SCRATCH16) \ 11265138eb7SQingqing Zhuo DMUB_SR(DMCUB_SCRATCH17) \ 11365138eb7SQingqing Zhuo DMUB_SR(DMCUB_SCRATCH18) \ 11465138eb7SQingqing Zhuo DMUB_SR(DMCUB_SCRATCH19) \ 11565138eb7SQingqing Zhuo DMUB_SR(DMCUB_SCRATCH20) \ 11665138eb7SQingqing Zhuo DMUB_SR(DMCUB_SCRATCH21) \ 11765138eb7SQingqing Zhuo DMUB_SR(DMCUB_GPINT_DATAIN0) \ 11865138eb7SQingqing Zhuo DMUB_SR(DMCUB_GPINT_DATAIN1) \ 11965138eb7SQingqing Zhuo DMUB_SR(DMCUB_GPINT_DATAOUT) \ 12065138eb7SQingqing Zhuo DMUB_SR(CC_DC_PIPE_DIS) \ 12165138eb7SQingqing Zhuo DMUB_SR(MMHUBBUB_SOFT_RESET) \ 12265138eb7SQingqing Zhuo DMUB_SR(DCN_VM_FB_LOCATION_BASE) \ 12365138eb7SQingqing Zhuo DMUB_SR(DCN_VM_FB_OFFSET) \ 12465138eb7SQingqing Zhuo DMUB_SR(DMCUB_TIMER_CURRENT) \ 12565138eb7SQingqing Zhuo DMUB_SR(DMCUB_INST_FETCH_FAULT_ADDR) \ 12665138eb7SQingqing Zhuo DMUB_SR(DMCUB_UNDEFINED_ADDRESS_FAULT_ADDR) \ 12765138eb7SQingqing Zhuo DMUB_SR(DMCUB_DATA_WRITE_FAULT_ADDR) \ 12865138eb7SQingqing Zhuo DMUB_SR(DMCUB_REGION3_TMR_AXI_SPACE) \ 12965138eb7SQingqing Zhuo DMUB_SR(DMCUB_INTERRUPT_ENABLE) \ 13065138eb7SQingqing Zhuo DMUB_SR(DMCUB_INTERRUPT_ACK) \ 13165138eb7SQingqing Zhuo DMUB_SR(DMU_CLK_CNTL) 13265138eb7SQingqing Zhuo 13365138eb7SQingqing Zhuo #define DMUB_DCN35_FIELDS() \ 13465138eb7SQingqing Zhuo DMUB_SF(DMCUB_CNTL, DMCUB_ENABLE) \ 13565138eb7SQingqing Zhuo DMUB_SF(DMCUB_CNTL, DMCUB_TRACEPORT_EN) \ 13665138eb7SQingqing Zhuo DMUB_SF(DMCUB_CNTL2, DMCUB_SOFT_RESET) \ 13765138eb7SQingqing Zhuo DMUB_SF(DMCUB_SEC_CNTL, DMCUB_SEC_RESET) \ 13865138eb7SQingqing Zhuo DMUB_SF(DMCUB_SEC_CNTL, DMCUB_MEM_UNIT_ID) \ 13965138eb7SQingqing Zhuo DMUB_SF(DMCUB_SEC_CNTL, DMCUB_SEC_RESET_STATUS) \ 14065138eb7SQingqing Zhuo DMUB_SF(DMCUB_REGION3_CW0_TOP_ADDRESS, DMCUB_REGION3_CW0_TOP_ADDRESS) \ 14165138eb7SQingqing Zhuo DMUB_SF(DMCUB_REGION3_CW0_TOP_ADDRESS, DMCUB_REGION3_CW0_ENABLE) \ 14265138eb7SQingqing Zhuo DMUB_SF(DMCUB_REGION3_CW1_TOP_ADDRESS, DMCUB_REGION3_CW1_TOP_ADDRESS) \ 14365138eb7SQingqing Zhuo DMUB_SF(DMCUB_REGION3_CW1_TOP_ADDRESS, DMCUB_REGION3_CW1_ENABLE) \ 14465138eb7SQingqing Zhuo DMUB_SF(DMCUB_REGION3_CW2_TOP_ADDRESS, DMCUB_REGION3_CW2_TOP_ADDRESS) \ 14565138eb7SQingqing Zhuo DMUB_SF(DMCUB_REGION3_CW2_TOP_ADDRESS, DMCUB_REGION3_CW2_ENABLE) \ 14665138eb7SQingqing Zhuo DMUB_SF(DMCUB_REGION3_CW3_TOP_ADDRESS, DMCUB_REGION3_CW3_TOP_ADDRESS) \ 14765138eb7SQingqing Zhuo DMUB_SF(DMCUB_REGION3_CW3_TOP_ADDRESS, DMCUB_REGION3_CW3_ENABLE) \ 14865138eb7SQingqing Zhuo DMUB_SF(DMCUB_REGION3_CW4_TOP_ADDRESS, DMCUB_REGION3_CW4_TOP_ADDRESS) \ 14965138eb7SQingqing Zhuo DMUB_SF(DMCUB_REGION3_CW4_TOP_ADDRESS, DMCUB_REGION3_CW4_ENABLE) \ 15065138eb7SQingqing Zhuo DMUB_SF(DMCUB_REGION3_CW5_TOP_ADDRESS, DMCUB_REGION3_CW5_TOP_ADDRESS) \ 15165138eb7SQingqing Zhuo DMUB_SF(DMCUB_REGION3_CW5_TOP_ADDRESS, DMCUB_REGION3_CW5_ENABLE) \ 15265138eb7SQingqing Zhuo DMUB_SF(DMCUB_REGION3_CW6_TOP_ADDRESS, DMCUB_REGION3_CW6_TOP_ADDRESS) \ 15365138eb7SQingqing Zhuo DMUB_SF(DMCUB_REGION3_CW6_TOP_ADDRESS, DMCUB_REGION3_CW6_ENABLE) \ 15465138eb7SQingqing Zhuo DMUB_SF(DMCUB_REGION3_CW7_TOP_ADDRESS, DMCUB_REGION3_CW7_TOP_ADDRESS) \ 15565138eb7SQingqing Zhuo DMUB_SF(DMCUB_REGION3_CW7_TOP_ADDRESS, DMCUB_REGION3_CW7_ENABLE) \ 15665138eb7SQingqing Zhuo DMUB_SF(DMCUB_REGION4_TOP_ADDRESS, DMCUB_REGION4_TOP_ADDRESS) \ 15765138eb7SQingqing Zhuo DMUB_SF(DMCUB_REGION4_TOP_ADDRESS, DMCUB_REGION4_ENABLE) \ 15865138eb7SQingqing Zhuo DMUB_SF(DMCUB_REGION5_TOP_ADDRESS, DMCUB_REGION5_TOP_ADDRESS) \ 15965138eb7SQingqing Zhuo DMUB_SF(DMCUB_REGION5_TOP_ADDRESS, DMCUB_REGION5_ENABLE) \ 160*b5e161e4SNicholas Kazlauskas DMUB_SF(DMCUB_REGION6_TOP_ADDRESS, DMCUB_REGION6_TOP_ADDRESS) \ 161*b5e161e4SNicholas Kazlauskas DMUB_SF(DMCUB_REGION6_TOP_ADDRESS, DMCUB_REGION6_ENABLE) \ 16265138eb7SQingqing Zhuo DMUB_SF(CC_DC_PIPE_DIS, DC_DMCUB_ENABLE) \ 16365138eb7SQingqing Zhuo DMUB_SF(MMHUBBUB_SOFT_RESET, DMUIF_SOFT_RESET) \ 16465138eb7SQingqing Zhuo DMUB_SF(DCN_VM_FB_LOCATION_BASE, FB_BASE) \ 16565138eb7SQingqing Zhuo DMUB_SF(DCN_VM_FB_OFFSET, FB_OFFSET) \ 16665138eb7SQingqing Zhuo DMUB_SF(DMCUB_INBOX0_WPTR, DMCUB_INBOX0_WPTR) \ 16765138eb7SQingqing Zhuo DMUB_SF(DMCUB_REGION3_TMR_AXI_SPACE, DMCUB_REGION3_TMR_AXI_SPACE) \ 16865138eb7SQingqing Zhuo DMUB_SF(DMCUB_INTERRUPT_ENABLE, DMCUB_GPINT_IH_INT_EN) \ 16965138eb7SQingqing Zhuo DMUB_SF(DMCUB_INTERRUPT_ACK, DMCUB_GPINT_IH_INT_ACK) \ 17065138eb7SQingqing Zhuo DMUB_SF(DMCUB_CNTL, DMCUB_PWAIT_MODE_STATUS) \ 17165138eb7SQingqing Zhuo DMUB_SF(DMU_CLK_CNTL, LONO_DISPCLK_GATE_DISABLE) \ 17265138eb7SQingqing Zhuo DMUB_SF(DMU_CLK_CNTL, LONO_SOCCLK_GATE_DISABLE) \ 17365138eb7SQingqing Zhuo DMUB_SF(DMU_CLK_CNTL, LONO_DMCUBCLK_GATE_DISABLE) 17465138eb7SQingqing Zhuo 17565138eb7SQingqing Zhuo struct dmub_srv_dcn35_reg_offset { 17665138eb7SQingqing Zhuo #define DMUB_SR(reg) uint32_t reg; 17765138eb7SQingqing Zhuo DMUB_DCN35_REGS() 17865138eb7SQingqing Zhuo DMCUB_INTERNAL_REGS() 17965138eb7SQingqing Zhuo #undef DMUB_SR 18065138eb7SQingqing Zhuo }; 18165138eb7SQingqing Zhuo 18265138eb7SQingqing Zhuo struct dmub_srv_dcn35_reg_shift { 18365138eb7SQingqing Zhuo #define DMUB_SF(reg, field) uint8_t reg##__##field; 18465138eb7SQingqing Zhuo DMUB_DCN35_FIELDS() 18565138eb7SQingqing Zhuo #undef DMUB_SF 18665138eb7SQingqing Zhuo }; 18765138eb7SQingqing Zhuo 18865138eb7SQingqing Zhuo struct dmub_srv_dcn35_reg_mask { 18965138eb7SQingqing Zhuo #define DMUB_SF(reg, field) uint32_t reg##__##field; 19065138eb7SQingqing Zhuo DMUB_DCN35_FIELDS() 19165138eb7SQingqing Zhuo #undef DMUB_SF 19265138eb7SQingqing Zhuo }; 19365138eb7SQingqing Zhuo 19465138eb7SQingqing Zhuo struct dmub_srv_dcn35_regs { 19565138eb7SQingqing Zhuo struct dmub_srv_dcn35_reg_offset offset; 19665138eb7SQingqing Zhuo struct dmub_srv_dcn35_reg_mask mask; 19765138eb7SQingqing Zhuo struct dmub_srv_dcn35_reg_shift shift; 19865138eb7SQingqing Zhuo }; 19965138eb7SQingqing Zhuo 20065138eb7SQingqing Zhuo /* Hardware functions. */ 20165138eb7SQingqing Zhuo 20265138eb7SQingqing Zhuo 20365138eb7SQingqing Zhuo void dmub_dcn35_init(struct dmub_srv *dmub); 20465138eb7SQingqing Zhuo 20565138eb7SQingqing Zhuo void dmub_dcn35_reset(struct dmub_srv *dmub); 20665138eb7SQingqing Zhuo 20765138eb7SQingqing Zhuo void dmub_dcn35_reset_release(struct dmub_srv *dmub); 20865138eb7SQingqing Zhuo 20965138eb7SQingqing Zhuo void dmub_dcn35_backdoor_load(struct dmub_srv *dmub, 21065138eb7SQingqing Zhuo const struct dmub_window *cw0, 21165138eb7SQingqing Zhuo const struct dmub_window *cw1); 21265138eb7SQingqing Zhuo 21365138eb7SQingqing Zhuo void dmub_dcn35_backdoor_load_zfb_mode(struct dmub_srv *dmub, 21465138eb7SQingqing Zhuo const struct dmub_window *cw0, 21565138eb7SQingqing Zhuo const struct dmub_window *cw1); 21665138eb7SQingqing Zhuo 21765138eb7SQingqing Zhuo void dmub_dcn35_setup_windows(struct dmub_srv *dmub, 21865138eb7SQingqing Zhuo const struct dmub_window *cw2, 21965138eb7SQingqing Zhuo const struct dmub_window *cw3, 22065138eb7SQingqing Zhuo const struct dmub_window *cw4, 22165138eb7SQingqing Zhuo const struct dmub_window *cw5, 222*b5e161e4SNicholas Kazlauskas const struct dmub_window *cw6, 223*b5e161e4SNicholas Kazlauskas const struct dmub_window *region6); 22465138eb7SQingqing Zhuo 22565138eb7SQingqing Zhuo void dmub_dcn35_setup_mailbox(struct dmub_srv *dmub, 22665138eb7SQingqing Zhuo const struct dmub_region *inbox1); 22765138eb7SQingqing Zhuo 22865138eb7SQingqing Zhuo uint32_t dmub_dcn35_get_inbox1_wptr(struct dmub_srv *dmub); 22965138eb7SQingqing Zhuo 23065138eb7SQingqing Zhuo uint32_t dmub_dcn35_get_inbox1_rptr(struct dmub_srv *dmub); 23165138eb7SQingqing Zhuo 23265138eb7SQingqing Zhuo void dmub_dcn35_set_inbox1_wptr(struct dmub_srv *dmub, uint32_t wptr_offset); 23365138eb7SQingqing Zhuo 23465138eb7SQingqing Zhuo void dmub_dcn35_setup_out_mailbox(struct dmub_srv *dmub, 23565138eb7SQingqing Zhuo const struct dmub_region *outbox1); 23665138eb7SQingqing Zhuo 23765138eb7SQingqing Zhuo uint32_t dmub_dcn35_get_outbox1_wptr(struct dmub_srv *dmub); 23865138eb7SQingqing Zhuo 23965138eb7SQingqing Zhuo void dmub_dcn35_set_outbox1_rptr(struct dmub_srv *dmub, uint32_t rptr_offset); 24065138eb7SQingqing Zhuo 24165138eb7SQingqing Zhuo bool dmub_dcn35_is_hw_init(struct dmub_srv *dmub); 24265138eb7SQingqing Zhuo 24365138eb7SQingqing Zhuo bool dmub_dcn35_is_supported(struct dmub_srv *dmub); 24465138eb7SQingqing Zhuo 24565138eb7SQingqing Zhuo void dmub_dcn35_set_gpint(struct dmub_srv *dmub, 24665138eb7SQingqing Zhuo union dmub_gpint_data_register reg); 24765138eb7SQingqing Zhuo 24865138eb7SQingqing Zhuo bool dmub_dcn35_is_gpint_acked(struct dmub_srv *dmub, 24965138eb7SQingqing Zhuo union dmub_gpint_data_register reg); 25065138eb7SQingqing Zhuo 25165138eb7SQingqing Zhuo uint32_t dmub_dcn35_get_gpint_response(struct dmub_srv *dmub); 25265138eb7SQingqing Zhuo 25365138eb7SQingqing Zhuo uint32_t dmub_dcn35_get_gpint_dataout(struct dmub_srv *dmub); 25465138eb7SQingqing Zhuo 25565138eb7SQingqing Zhuo void dmub_dcn35_enable_dmub_boot_options(struct dmub_srv *dmub, const struct dmub_srv_hw_params *params); 25665138eb7SQingqing Zhuo 25765138eb7SQingqing Zhuo void dmub_dcn35_skip_dmub_panel_power_sequence(struct dmub_srv *dmub, bool skip); 25865138eb7SQingqing Zhuo 25965138eb7SQingqing Zhuo union dmub_fw_boot_status dmub_dcn35_get_fw_boot_status(struct dmub_srv *dmub); 26065138eb7SQingqing Zhuo 26165138eb7SQingqing Zhuo union dmub_fw_boot_options dmub_dcn35_get_fw_boot_option(struct dmub_srv *dmub); 26265138eb7SQingqing Zhuo 26365138eb7SQingqing Zhuo void dmub_dcn35_setup_outbox0(struct dmub_srv *dmub, 26465138eb7SQingqing Zhuo const struct dmub_region *outbox0); 26565138eb7SQingqing Zhuo 26665138eb7SQingqing Zhuo uint32_t dmub_dcn35_get_outbox0_wptr(struct dmub_srv *dmub); 26765138eb7SQingqing Zhuo 26865138eb7SQingqing Zhuo void dmub_dcn35_set_outbox0_rptr(struct dmub_srv *dmub, uint32_t rptr_offset); 26965138eb7SQingqing Zhuo 27065138eb7SQingqing Zhuo uint32_t dmub_dcn35_get_current_time(struct dmub_srv *dmub); 27165138eb7SQingqing Zhuo 27265138eb7SQingqing Zhuo void dmub_dcn35_get_diagnostic_data(struct dmub_srv *dmub, struct dmub_diagnostic_data *diag_data); 27365138eb7SQingqing Zhuo 27465138eb7SQingqing Zhuo void dmub_dcn35_configure_dmub_in_system_memory(struct dmub_srv *dmub); 27565138eb7SQingqing Zhuo 27665138eb7SQingqing Zhuo void dmub_dcn35_send_inbox0_cmd(struct dmub_srv *dmub, union dmub_inbox0_data_register data); 27765138eb7SQingqing Zhuo 27865138eb7SQingqing Zhuo void dmub_dcn35_clear_inbox0_ack_register(struct dmub_srv *dmub); 27965138eb7SQingqing Zhuo 28065138eb7SQingqing Zhuo uint32_t dmub_dcn35_read_inbox0_ack_register(struct dmub_srv *dmub); 28165138eb7SQingqing Zhuo 28265138eb7SQingqing Zhuo bool dmub_dcn35_should_detect(struct dmub_srv *dmub); 28365138eb7SQingqing Zhuo 28465138eb7SQingqing Zhuo bool dmub_dcn35_is_hw_powered_up(struct dmub_srv *dmub); 28565138eb7SQingqing Zhuo 28665138eb7SQingqing Zhuo void dmub_srv_dcn35_regs_init(struct dmub_srv *dmub, struct dc_context *ctx); 28765138eb7SQingqing Zhuo 28865138eb7SQingqing Zhuo #endif /* _DMUB_DCN35_H_ */ 289