drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_reg.h
Source file repositories/reference/linux-study-clean/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_reg.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_reg.h- Extension
.h- Size
- 7101 bytes
- Lines
- 185
- Domain
- Driver Families
- Bucket
- drivers/media
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
Dependency Surface
linux/kernel.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#ifndef _SUN6I_CSI_REG_H_
#define _SUN6I_CSI_REG_H_
#include <linux/kernel.h>
#define SUN6I_CSI_ADDR_VALUE(a) ((a) >> 2)
#define SUN6I_CSI_EN_REG 0x0
#define SUN6I_CSI_EN_VER_EN BIT(30)
#define SUN6I_CSI_EN_PTN_CYCLE(v) (((v) << 16) & GENMASK(23, 16))
#define SUN6I_CSI_EN_SRAM_PWDN BIT(8)
#define SUN6I_CSI_EN_PTN_START BIT(4)
#define SUN6I_CSI_EN_CLK_CNT_SPL_VSYNC BIT(3)
#define SUN6I_CSI_EN_CLK_CNT_EN BIT(2)
#define SUN6I_CSI_EN_PTN_GEN_EN BIT(1)
#define SUN6I_CSI_EN_CSI_EN BIT(0)
/* Note that Allwinner manuals and code invert positive/negative definitions. */
#define SUN6I_CSI_IF_CFG_REG 0x4
#define SUN6I_CSI_IF_CFG_FIELD_DT_PCLK_SHIFT(v) (((v) << 24) & GENMASK(27, 24))
#define SUN6I_CSI_IF_CFG_SRC_TYPE_PROGRESSIVE (0 << 21)
#define SUN6I_CSI_IF_CFG_SRC_TYPE_INTERLACED (1 << 21)
#define SUN6I_CSI_IF_CFG_FPS_DS BIT(20)
#define SUN6I_CSI_IF_CFG_FIELD_POSITIVE (0 << 19)
#define SUN6I_CSI_IF_CFG_FIELD_NEGATIVE (1 << 19)
#define SUN6I_CSI_IF_CFG_VREF_POL_POSITIVE (0 << 18)
#define SUN6I_CSI_IF_CFG_VREF_POL_NEGATIVE (1 << 18)
#define SUN6I_CSI_IF_CFG_HREF_POL_POSITIVE (0 << 17)
#define SUN6I_CSI_IF_CFG_HREF_POL_NEGATIVE (1 << 17)
#define SUN6I_CSI_IF_CFG_CLK_POL_FALLING (0 << 16)
#define SUN6I_CSI_IF_CFG_CLK_POL_RISING (1 << 16)
#define SUN6I_CSI_IF_CFG_FIELD_DT_FIELD_VSYNC (0 << 14)
#define SUN6I_CSI_IF_CFG_FIELD_DT_FIELD (1 << 14)
#define SUN6I_CSI_IF_CFG_FIELD_DT_VSYNC (2 << 14)
#define SUN6I_CSI_IF_CFG_DATA_WIDTH_8 (0 << 8)
#define SUN6I_CSI_IF_CFG_DATA_WIDTH_10 (1 << 8)
#define SUN6I_CSI_IF_CFG_DATA_WIDTH_12 (2 << 8)
#define SUN6I_CSI_IF_CFG_DATA_WIDTH_8_PLUS_2 (3 << 8)
#define SUN6I_CSI_IF_CFG_DATA_WIDTH_2_TIMES_8 (4 << 8)
#define SUN6I_CSI_IF_CFG_IF_CSI (0 << 7)
#define SUN6I_CSI_IF_CFG_IF_MIPI (1 << 7)
#define SUN6I_CSI_IF_CFG_IF_CSI_YUV_RAW (0 << 0)
#define SUN6I_CSI_IF_CFG_IF_CSI_YUV_COMBINED (1 << 0)
#define SUN6I_CSI_IF_CFG_IF_CSI_BT656 (4 << 0)
#define SUN6I_CSI_IF_CFG_IF_CSI_BT1120 (5 << 0)
#define SUN6I_CSI_CAP_REG 0x8
#define SUN6I_CSI_CAP_MASK(v) (((v) << 2) & GENMASK(5, 2))
#define SUN6I_CSI_CAP_VCAP_ON BIT(1)
#define SUN6I_CSI_CAP_SCAP_ON BIT(0)
#define SUN6I_CSI_SYNC_CNT_REG 0xc
#define SUN6I_CSI_FIFO_THRS_REG 0x10
#define SUN6I_CSI_BT656_HEAD_CFG_REG 0x14
#define SUN6I_CSI_PTN_LEN_REG 0x30
#define SUN6I_CSI_PTN_ADDR_REG 0x34
#define SUN6I_CSI_VER_REG 0x3c
#define SUN6I_CSI_CH_CFG_REG 0x44
#define SUN6I_CSI_CH_CFG_PAD_VAL(v) (((v) << 24) & GENMASK(31, 24))
#define SUN6I_CSI_CH_CFG_INPUT_FMT(v) (((v) << 20) & GENMASK(23, 20))
#define SUN6I_CSI_CH_CFG_OUTPUT_FMT(v) (((v) << 16) & GENMASK(19, 16))
#define SUN6I_CSI_CH_CFG_VFLIP_EN BIT(13)
#define SUN6I_CSI_CH_CFG_HFLIP_EN BIT(12)
#define SUN6I_CSI_CH_CFG_FIELD_SEL_FIELD0 (0 << 10)
#define SUN6I_CSI_CH_CFG_FIELD_SEL_FIELD1 (1 << 10)
#define SUN6I_CSI_CH_CFG_FIELD_SEL_EITHER (2 << 10)
#define SUN6I_CSI_CH_CFG_INPUT_YUV_SEQ(v) (((v) << 8) & GENMASK(9, 8))
#define SUN6I_CSI_INPUT_FMT_RAW 0
#define SUN6I_CSI_INPUT_FMT_YUV422 3
#define SUN6I_CSI_INPUT_FMT_YUV420 4
/* Note that Allwinner manuals and code invert frame/field definitions. */
/* RAW */
#define SUN6I_CSI_OUTPUT_FMT_FRAME_RAW_8 0
#define SUN6I_CSI_OUTPUT_FMT_FRAME_RAW_10 1
#define SUN6I_CSI_OUTPUT_FMT_FRAME_RAW_12 2
#define SUN6I_CSI_OUTPUT_FMT_FRAME_RGB565 4
#define SUN6I_CSI_OUTPUT_FMT_FRAME_RGB888 5
#define SUN6I_CSI_OUTPUT_FMT_FRAME_PRGB888 6
#define SUN6I_CSI_OUTPUT_FMT_FIELD_RAW_8 8
#define SUN6I_CSI_OUTPUT_FMT_FIELD_RAW_10 9
#define SUN6I_CSI_OUTPUT_FMT_FIELD_RAW_12 10
#define SUN6I_CSI_OUTPUT_FMT_FIELD_RGB565 12
#define SUN6I_CSI_OUTPUT_FMT_FIELD_RGB888 13
#define SUN6I_CSI_OUTPUT_FMT_FIELD_PRGB888 14
Annotation
- Immediate include surface: `linux/kernel.h`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.