drivers/video: add GC0308 VGA CMOS image sensor driver

Add support for the GalaxyCore GC0308 VGA CMOS image sensor.
The driver implements the NuttX imgsensor interface and supports
VGA (640x480), QVGA (320x240), and QQVGA (160x120) resolutions
via Kconfig selection. Output format is RGB565X (big-endian).

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
This commit is contained in:
wangjianyu3
2026-03-16 11:49:41 +08:00
committed by Alan C. Assis
parent a07a6a00f4
commit fadfa85296
5 changed files with 963 additions and 0 deletions
+4
View File
@@ -50,6 +50,10 @@ if(CONFIG_DRIVERS_VIDEO)
list(APPEND SRCS ov2640.c)
endif()
if(CONFIG_VIDEO_GC0308)
list(APPEND SRCS gc0308.c)
endif()
endif()
if(CONFIG_GOLDFISH_FB)
+7
View File
@@ -465,6 +465,13 @@ config OV2640_REGDEBUG
endif # VIDEO_OV2640
config VIDEO_GC0308
bool "GC0308 camera chip"
default n
select I2C
---help---
GC0308 VGA CMOS image sensor with DVP interface.
config GOLDFISH_CAMERA
bool "Goldfish camera support"
depends on VIDEO
+4
View File
@@ -60,6 +60,10 @@ ifeq ($(CONFIG_VIDEO_OV2640),y)
CSRCS += ov2640.c
endif
ifeq ($(CONFIG_VIDEO_GC0308),y)
CSRCS += gc0308.c
endif
endif
ifeq ($(CONFIG_GOLDFISH_FB),y)
File diff suppressed because it is too large Load Diff
+57
View File
@@ -0,0 +1,57 @@
/****************************************************************************
* include/nuttx/video/gc0308.h
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
#ifndef __INCLUDE_NUTTX_VIDEO_GC0308_H
#define __INCLUDE_NUTTX_VIDEO_GC0308_H
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/i2c/i2c_master.h>
#include <nuttx/video/imgsensor.h>
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
/****************************************************************************
* Name: gc0308_initialize
*
* Description:
* Initialize the GC0308 camera sensor driver.
*
* Input Parameters:
* i2c - I2C bus device
* width - Desired frame width (0 = VGA 640)
* height - Desired frame height (0 = VGA 480)
*
* Returned Value:
* Pointer to imgsensor_s on success; NULL on failure.
*
****************************************************************************/
struct imgsensor_s *gc0308_initialize(struct i2c_master_s *i2c,
uint16_t width,
uint16_t height);
#endif /* __INCLUDE_NUTTX_VIDEO_GC0308_H */