| 1 | /* |
| 2 | * SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | * |
| 4 | * i.MX6UL LCDIF controller |
| 5 | * |
| 6 | * Copyright (c) 2026 Yucai Liu <1486344514@qq.com> |
| 7 | */ |
| 8 | |
| 9 | #ifndef IMX6UL_LCDIF_H |
| 10 | #define IMX6UL_LCDIF_H |
| 11 | |
| 12 | #include "hw/core/sysbus.h" |
| 13 | #include "qom/object.h" |
| 14 | #include "qemu/timer.h" |
| 15 | #include "ui/console.h" |
| 16 | |
| 17 | #define TYPE_IMX6UL_LCDIF "imx6ul-lcdif" |
| 18 | #define IMX6UL_LCDIF_REGS_NUM ((0x230 >> 4) + 1) |
| 19 | OBJECT_DECLARE_SIMPLE_TYPE(IMX6ULLCDIFState, IMX6UL_LCDIF) |
| 20 | |
| 21 | struct IMX6ULLCDIFState { |
| 22 | SysBusDevice parent_obj; |
| 23 | |
| 24 | MemoryRegion iomem; |
| 25 | MemoryRegionSection fbsection; |
| 26 | qemu_irq irq; |
| 27 | QemuConsole *con; |
| 28 | QEMUTimer *frame_timer; |
| 29 | uint32_t fb_base; |
| 30 | uint32_t src_width; |
| 31 | uint32_t rows; |
| 32 | uint8_t src_bpp; |
| 33 | bool invalidate; |
| 34 | uint32_t regs[IMX6UL_LCDIF_REGS_NUM]; |
| 35 | }; |
| 36 | |
| 37 | #endif /* IMX6UL_LCDIF_H */ |