mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-27 09:11:49 +00:00
Tinkerboard camera support (#1482)
* fix kernelcrash with config_of_overlay combined with isp1 camera driver,based on:30a8401c2f
* add basic dtbo infrastucture * set ov5647 (RPi cam rev 1.3) as default, imx219 (RPi cam V2.1) outputs a blurry green videostream at the moment * maybe fix powering for camera * adjust mainline dtbo patch to bsp kernel * got you! little.. dtbo's are properly built and applied during boot. * add imx219 overlay to switch between cameras & add ae/awb fix for ov 5647 from asus tinker repo * patch imx219 up to96396323fa
* bring back wireguard, otherwise igor gets grumpy :D * fix camera status
This commit is contained in:
parent
f0400a21c7
commit
a040785d42
9 changed files with 1236 additions and 15 deletions
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm 4.4.181 Kernel Configuration
|
||||
# Linux/arm 4.4.182 Kernel Configuration
|
||||
#
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARM_HAS_SG_CHAIN=y
|
||||
|
@ -1857,7 +1857,6 @@ CONFIG_ATH10K=m
|
|||
# CONFIG_ATH10K_TRACING is not set
|
||||
CONFIG_WCN36XX=m
|
||||
# CONFIG_WCN36XX_DEBUGFS is not set
|
||||
CONFIG_RTL8188EU=m
|
||||
# CONFIG_B43 is not set
|
||||
# CONFIG_B43LEGACY is not set
|
||||
CONFIG_BRCMUTIL=m
|
||||
|
@ -1908,6 +1907,7 @@ CONFIG_WIFI_BUILD_MODULE=y
|
|||
# CONFIG_AP6XXX is not set
|
||||
CONFIG_CYW_BCMDHD=m
|
||||
CONFIG_RTL_WIRELESS_SOLUTION=y
|
||||
CONFIG_RTL8188EU=m
|
||||
# CONFIG_RTL8188FU is not set
|
||||
# CONFIG_RTL8189ES is not set
|
||||
# CONFIG_RTL8189FS is not set
|
||||
|
@ -1923,7 +1923,6 @@ CONFIG_MVL88W8977=m
|
|||
# CONFIG_SSV6051 is not set
|
||||
# CONFIG_WL_TI is not set
|
||||
CONFIG_RTL8822BU=m
|
||||
CONFIG_RTL8821AU=m
|
||||
CONFIG_RTL8812AU=m
|
||||
CONFIG_ZD1211RW=m
|
||||
# CONFIG_ZD1211RW_DEBUG is not set
|
||||
|
@ -2810,13 +2809,15 @@ CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
|
|||
# CONFIG_MEDIA_SDR_SUPPORT is not set
|
||||
# CONFIG_MEDIA_RC_SUPPORT is not set
|
||||
# CONFIG_MEDIA_CEC_SUPPORT is not set
|
||||
# CONFIG_MEDIA_CONTROLLER is not set
|
||||
CONFIG_MEDIA_CONTROLLER=y
|
||||
CONFIG_VIDEO_DEV=y
|
||||
CONFIG_VIDEO_V4L2_SUBDEV_API=y
|
||||
CONFIG_VIDEO_V4L2=y
|
||||
# CONFIG_VIDEO_ADV_DEBUG is not set
|
||||
# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
|
||||
CONFIG_VIDEO_TUNER=m
|
||||
CONFIG_V4L2_MEM2MEM_DEV=y
|
||||
CONFIG_V4L2_FWNODE=y
|
||||
CONFIG_VIDEOBUF_GEN=y
|
||||
CONFIG_VIDEOBUF2_CORE=y
|
||||
CONFIG_VIDEOBUF2_MEMOPS=y
|
||||
|
@ -2880,7 +2881,11 @@ CONFIG_DVB_AS102=m
|
|||
CONFIG_V4L_PLATFORM_DRIVERS=y
|
||||
CONFIG_SOC_CAMERA=y
|
||||
CONFIG_SOC_CAMERA_PLATFORM=m
|
||||
# CONFIG_VIDEO_XILINX is not set
|
||||
CONFIG_VIDEO_RK_CIF_ISP10=y
|
||||
CONFIG_VIDEO_ROCKCHIP_CIF=y
|
||||
CONFIG_VIDEO_ROCKCHIP_ISP1=y
|
||||
CONFIG_VIDEO_ROCKCHIP_ISP_DPHY_SY=y
|
||||
CONFIG_V4L_MEM2MEM_DRIVERS=y
|
||||
# CONFIG_VIDEO_MEM2MEM_DEINTERLACE is not set
|
||||
# CONFIG_VIDEO_SH_VEU is not set
|
||||
|
@ -2904,54 +2909,143 @@ CONFIG_DVB_B2C2_FLEXCOP=m
|
|||
#
|
||||
# Media ancillary drivers (tuners, sensors, i2c, frontends)
|
||||
#
|
||||
CONFIG_MEDIA_SUBDRV_AUTOSELECT=y
|
||||
# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set
|
||||
CONFIG_MEDIA_ATTACH=y
|
||||
|
||||
#
|
||||
# Encoders, decoders, sensors and other helper chips
|
||||
#
|
||||
|
||||
#
|
||||
# Audio decoders, processors and mixers
|
||||
#
|
||||
# CONFIG_VIDEO_TVAUDIO is not set
|
||||
# CONFIG_VIDEO_TDA7432 is not set
|
||||
# CONFIG_VIDEO_TDA9840 is not set
|
||||
# CONFIG_VIDEO_TEA6415C is not set
|
||||
# CONFIG_VIDEO_TEA6420 is not set
|
||||
# CONFIG_VIDEO_MSP3400 is not set
|
||||
# CONFIG_VIDEO_CS5345 is not set
|
||||
# CONFIG_VIDEO_CS53L32A is not set
|
||||
# CONFIG_VIDEO_TLV320AIC23B is not set
|
||||
# CONFIG_VIDEO_UDA1342 is not set
|
||||
# CONFIG_VIDEO_WM8775 is not set
|
||||
# CONFIG_VIDEO_WM8739 is not set
|
||||
# CONFIG_VIDEO_VP27SMPX is not set
|
||||
# CONFIG_VIDEO_SONY_BTF_MPX is not set
|
||||
|
||||
#
|
||||
# RDS decoders
|
||||
#
|
||||
# CONFIG_VIDEO_SAA6588 is not set
|
||||
|
||||
#
|
||||
# Video decoders
|
||||
#
|
||||
# CONFIG_VIDEO_ADV7180 is not set
|
||||
# CONFIG_VIDEO_ADV7181D is not set
|
||||
# CONFIG_VIDEO_ADV7183 is not set
|
||||
# CONFIG_VIDEO_ADV7604 is not set
|
||||
# CONFIG_VIDEO_ADV7842 is not set
|
||||
# CONFIG_VIDEO_BT819 is not set
|
||||
# CONFIG_VIDEO_BT856 is not set
|
||||
# CONFIG_VIDEO_BT866 is not set
|
||||
# CONFIG_VIDEO_KS0127 is not set
|
||||
# CONFIG_VIDEO_ML86V7667 is not set
|
||||
# CONFIG_VIDEO_SAA7110 is not set
|
||||
# CONFIG_VIDEO_SAA711X is not set
|
||||
# CONFIG_VIDEO_TC35874X is not set
|
||||
# CONFIG_VIDEO_TVP514X is not set
|
||||
# CONFIG_VIDEO_TVP5150 is not set
|
||||
# CONFIG_VIDEO_TVP7002 is not set
|
||||
# CONFIG_VIDEO_TW2804 is not set
|
||||
# CONFIG_VIDEO_TW9903 is not set
|
||||
# CONFIG_VIDEO_TW9906 is not set
|
||||
# CONFIG_VIDEO_VPX3220 is not set
|
||||
|
||||
#
|
||||
# Video and audio decoders
|
||||
#
|
||||
# CONFIG_VIDEO_SAA717X is not set
|
||||
# CONFIG_VIDEO_CX25840 is not set
|
||||
|
||||
#
|
||||
# Video encoders
|
||||
#
|
||||
# CONFIG_VIDEO_SAA7127 is not set
|
||||
# CONFIG_VIDEO_SAA7185 is not set
|
||||
# CONFIG_VIDEO_ADV7170 is not set
|
||||
# CONFIG_VIDEO_ADV7175 is not set
|
||||
# CONFIG_VIDEO_ADV7343 is not set
|
||||
# CONFIG_VIDEO_ADV7393 is not set
|
||||
# CONFIG_VIDEO_ADV7511 is not set
|
||||
# CONFIG_VIDEO_AD9389B is not set
|
||||
# CONFIG_VIDEO_AK881X is not set
|
||||
# CONFIG_VIDEO_THS8200 is not set
|
||||
|
||||
#
|
||||
# Camera sensor devices
|
||||
#
|
||||
CONFIG_VIDEO_IMX219=y
|
||||
# CONFIG_VIDEO_OV2659 is not set
|
||||
# CONFIG_VIDEO_OV2685 is not set
|
||||
# CONFIG_VIDEO_OV4689 is not set
|
||||
CONFIG_VIDEO_OV5647=y
|
||||
# CONFIG_VIDEO_OV5695 is not set
|
||||
# CONFIG_VIDEO_OV7640 is not set
|
||||
# CONFIG_VIDEO_OV7670 is not set
|
||||
# CONFIG_VIDEO_OV9650 is not set
|
||||
# CONFIG_VIDEO_OV13850 is not set
|
||||
# CONFIG_VIDEO_VS6624 is not set
|
||||
# CONFIG_VIDEO_MT9M032 is not set
|
||||
# CONFIG_VIDEO_MT9P031 is not set
|
||||
# CONFIG_VIDEO_MT9T001 is not set
|
||||
# CONFIG_VIDEO_MT9V011 is not set
|
||||
# CONFIG_VIDEO_MT9V032 is not set
|
||||
# CONFIG_VIDEO_SR030PC30 is not set
|
||||
# CONFIG_VIDEO_NOON010PC30 is not set
|
||||
# CONFIG_VIDEO_M5MOLS is not set
|
||||
# CONFIG_VIDEO_S5K6AA is not set
|
||||
# CONFIG_VIDEO_S5K6A3 is not set
|
||||
# CONFIG_VIDEO_S5K4ECGX is not set
|
||||
# CONFIG_VIDEO_S5K5BAF is not set
|
||||
# CONFIG_VIDEO_SMIAPP is not set
|
||||
# CONFIG_VIDEO_S5C73M3 is not set
|
||||
# CONFIG_VIDEO_GC2155 is not set
|
||||
# CONFIG_VIDEO_GC0312 is not set
|
||||
# CONFIG_VIDEO_GC2145 is not set
|
||||
# CONFIG_VIDEO_GC0329 is not set
|
||||
# CONFIG_VIDEO_GC2035 is not set
|
||||
|
||||
#
|
||||
# Flash devices
|
||||
#
|
||||
# CONFIG_VIDEO_ADP1653 is not set
|
||||
# CONFIG_VIDEO_AS3645A is not set
|
||||
# CONFIG_VIDEO_LM3560 is not set
|
||||
# CONFIG_VIDEO_LM3646 is not set
|
||||
|
||||
#
|
||||
# Video improvement chips
|
||||
#
|
||||
# CONFIG_VIDEO_UPD64031A is not set
|
||||
# CONFIG_VIDEO_UPD64083 is not set
|
||||
|
||||
#
|
||||
# Camera lens devices
|
||||
#
|
||||
# CONFIG_VIDEO_VM149C is not set
|
||||
|
||||
#
|
||||
# Audio/Video compression chips
|
||||
#
|
||||
# CONFIG_VIDEO_SAA6752HS is not set
|
||||
|
||||
#
|
||||
# Miscellaneous helper chips
|
||||
#
|
||||
# CONFIG_VIDEO_THS7303 is not set
|
||||
# CONFIG_VIDEO_M52790 is not set
|
||||
|
||||
#
|
||||
# Sensors used on soc_camera driver
|
||||
|
@ -2984,21 +3078,31 @@ CONFIG_MEDIA_ATTACH=y
|
|||
# CONFIG_VIDEO_NT99230 is not set
|
||||
# CONFIG_VIDEO_OV9750 is not set
|
||||
CONFIG_MEDIA_TUNER=y
|
||||
CONFIG_MEDIA_TUNER_SIMPLE=y
|
||||
CONFIG_MEDIA_TUNER_TDA8290=y
|
||||
CONFIG_MEDIA_TUNER_TDA827X=y
|
||||
CONFIG_MEDIA_TUNER_TDA18271=y
|
||||
CONFIG_MEDIA_TUNER_TDA9887=y
|
||||
CONFIG_MEDIA_TUNER_MT20XX=y
|
||||
|
||||
#
|
||||
# Customize TV tuners
|
||||
#
|
||||
CONFIG_MEDIA_TUNER_SIMPLE=m
|
||||
CONFIG_MEDIA_TUNER_TDA8290=m
|
||||
CONFIG_MEDIA_TUNER_TDA827X=m
|
||||
CONFIG_MEDIA_TUNER_TDA18271=m
|
||||
CONFIG_MEDIA_TUNER_TDA9887=m
|
||||
CONFIG_MEDIA_TUNER_TEA5761=m
|
||||
CONFIG_MEDIA_TUNER_TEA5767=m
|
||||
CONFIG_MEDIA_TUNER_MSI001=m
|
||||
CONFIG_MEDIA_TUNER_MT20XX=m
|
||||
CONFIG_MEDIA_TUNER_MT2060=m
|
||||
CONFIG_MEDIA_TUNER_MT2063=m
|
||||
CONFIG_MEDIA_TUNER_MT2266=m
|
||||
CONFIG_MEDIA_TUNER_MT2131=m
|
||||
CONFIG_MEDIA_TUNER_QT1010=m
|
||||
CONFIG_MEDIA_TUNER_XC2028=y
|
||||
CONFIG_MEDIA_TUNER_XC5000=y
|
||||
CONFIG_MEDIA_TUNER_XC4000=y
|
||||
CONFIG_MEDIA_TUNER_XC2028=m
|
||||
CONFIG_MEDIA_TUNER_XC5000=m
|
||||
CONFIG_MEDIA_TUNER_XC4000=m
|
||||
CONFIG_MEDIA_TUNER_MXL5005S=m
|
||||
CONFIG_MEDIA_TUNER_MXL5007T=m
|
||||
CONFIG_MEDIA_TUNER_MC44S803=y
|
||||
CONFIG_MEDIA_TUNER_MC44S803=m
|
||||
CONFIG_MEDIA_TUNER_MAX2165=m
|
||||
CONFIG_MEDIA_TUNER_TDA18218=m
|
||||
CONFIG_MEDIA_TUNER_FC0011=m
|
||||
CONFIG_MEDIA_TUNER_FC0012=m
|
||||
|
@ -3006,47 +3110,91 @@ CONFIG_MEDIA_TUNER_FC0013=m
|
|||
CONFIG_MEDIA_TUNER_TDA18212=m
|
||||
CONFIG_MEDIA_TUNER_E4000=m
|
||||
CONFIG_MEDIA_TUNER_FC2580=m
|
||||
CONFIG_MEDIA_TUNER_M88RS6000T=m
|
||||
CONFIG_MEDIA_TUNER_TUA9001=m
|
||||
CONFIG_MEDIA_TUNER_SI2157=m
|
||||
CONFIG_MEDIA_TUNER_IT913X=m
|
||||
CONFIG_MEDIA_TUNER_R820T=m
|
||||
CONFIG_MEDIA_TUNER_MXL301RF=m
|
||||
CONFIG_MEDIA_TUNER_QM1D1C0042=m
|
||||
|
||||
#
|
||||
# Customise DVB Frontends
|
||||
#
|
||||
|
||||
#
|
||||
# Multistandard (satellite) frontends
|
||||
#
|
||||
CONFIG_DVB_STB0899=m
|
||||
CONFIG_DVB_STB6100=m
|
||||
CONFIG_DVB_STV090x=m
|
||||
CONFIG_DVB_STV6110x=m
|
||||
CONFIG_DVB_M88DS3103=m
|
||||
|
||||
#
|
||||
# Multistandard (cable + terrestrial) frontends
|
||||
#
|
||||
CONFIG_DVB_DRXK=m
|
||||
CONFIG_DVB_TDA18271C2DD=m
|
||||
CONFIG_DVB_SI2165=m
|
||||
|
||||
#
|
||||
# DVB-S (satellite) frontends
|
||||
#
|
||||
CONFIG_DVB_CX24110=m
|
||||
CONFIG_DVB_CX24123=m
|
||||
CONFIG_DVB_MT312=m
|
||||
CONFIG_DVB_ZL10036=m
|
||||
CONFIG_DVB_ZL10039=m
|
||||
CONFIG_DVB_S5H1420=m
|
||||
CONFIG_DVB_STV0288=m
|
||||
CONFIG_DVB_STB6000=m
|
||||
CONFIG_DVB_STV0299=m
|
||||
CONFIG_DVB_STV6110=m
|
||||
CONFIG_DVB_STV0900=m
|
||||
CONFIG_DVB_TDA8083=m
|
||||
CONFIG_DVB_TDA10086=m
|
||||
CONFIG_DVB_TDA8261=m
|
||||
CONFIG_DVB_VES1X93=m
|
||||
CONFIG_DVB_TUNER_ITD1000=m
|
||||
CONFIG_DVB_TUNER_CX24113=m
|
||||
CONFIG_DVB_TDA826X=m
|
||||
CONFIG_DVB_TUA6100=m
|
||||
CONFIG_DVB_CX24116=m
|
||||
CONFIG_DVB_CX24117=m
|
||||
CONFIG_DVB_CX24120=m
|
||||
CONFIG_DVB_SI21XX=m
|
||||
CONFIG_DVB_TS2020=m
|
||||
CONFIG_DVB_DS3000=m
|
||||
CONFIG_DVB_MB86A16=m
|
||||
CONFIG_DVB_TDA10071=m
|
||||
|
||||
#
|
||||
# DVB-T (terrestrial) frontends
|
||||
#
|
||||
CONFIG_DVB_SP8870=m
|
||||
CONFIG_DVB_SP887X=m
|
||||
CONFIG_DVB_CX22700=m
|
||||
CONFIG_DVB_CX22702=m
|
||||
CONFIG_DVB_S5H1432=m
|
||||
CONFIG_DVB_DRXD=m
|
||||
CONFIG_DVB_L64781=m
|
||||
CONFIG_DVB_TDA1004X=m
|
||||
CONFIG_DVB_NXT6000=m
|
||||
CONFIG_DVB_MT352=m
|
||||
CONFIG_DVB_ZL10353=m
|
||||
CONFIG_DVB_DIB3000MB=m
|
||||
CONFIG_DVB_DIB3000MC=m
|
||||
CONFIG_DVB_DIB7000M=m
|
||||
CONFIG_DVB_DIB7000P=m
|
||||
CONFIG_DVB_DIB9000=m
|
||||
CONFIG_DVB_TDA10048=m
|
||||
CONFIG_DVB_AF9013=m
|
||||
CONFIG_DVB_EC100=m
|
||||
CONFIG_DVB_HD29L2=m
|
||||
CONFIG_DVB_STV0367=m
|
||||
CONFIG_DVB_CXD2820R=m
|
||||
CONFIG_DVB_CXD2841ER=m
|
||||
CONFIG_DVB_RTL2830=m
|
||||
CONFIG_DVB_RTL2832=m
|
||||
CONFIG_DVB_SI2168=m
|
||||
|
@ -3055,6 +3203,8 @@ CONFIG_DVB_AS102_FE=m
|
|||
#
|
||||
# DVB-C (cable) frontends
|
||||
#
|
||||
CONFIG_DVB_VES1820=m
|
||||
CONFIG_DVB_TDA10021=m
|
||||
CONFIG_DVB_TDA10023=m
|
||||
CONFIG_DVB_STV0297=m
|
||||
|
||||
|
@ -3062,35 +3212,59 @@ CONFIG_DVB_STV0297=m
|
|||
# ATSC (North American/Korean Terrestrial/Cable DTV) frontends
|
||||
#
|
||||
CONFIG_DVB_NXT200X=m
|
||||
CONFIG_DVB_OR51211=m
|
||||
CONFIG_DVB_OR51132=m
|
||||
CONFIG_DVB_BCM3510=m
|
||||
CONFIG_DVB_LGDT330X=m
|
||||
CONFIG_DVB_LGDT3305=m
|
||||
CONFIG_DVB_LGDT3306A=m
|
||||
CONFIG_DVB_LG2160=m
|
||||
CONFIG_DVB_S5H1409=m
|
||||
CONFIG_DVB_AU8522=m
|
||||
CONFIG_DVB_AU8522_DTV=m
|
||||
CONFIG_DVB_AU8522_V4L=m
|
||||
CONFIG_DVB_S5H1411=m
|
||||
|
||||
#
|
||||
# ISDB-T (terrestrial) frontends
|
||||
#
|
||||
CONFIG_DVB_S921=m
|
||||
CONFIG_DVB_DIB8000=m
|
||||
CONFIG_DVB_MB86A20S=m
|
||||
|
||||
#
|
||||
# ISDB-S (satellite) & ISDB-T (terrestrial) frontends
|
||||
#
|
||||
CONFIG_DVB_TC90522=m
|
||||
|
||||
#
|
||||
# Digital terrestrial only tuners/PLL
|
||||
#
|
||||
CONFIG_DVB_PLL=m
|
||||
CONFIG_DVB_TUNER_DIB0070=m
|
||||
CONFIG_DVB_TUNER_DIB0090=m
|
||||
|
||||
#
|
||||
# SEC control devices for DVB-S
|
||||
#
|
||||
CONFIG_DVB_DRX39XYJ=m
|
||||
CONFIG_DVB_LNBH25=m
|
||||
CONFIG_DVB_LNBP21=m
|
||||
CONFIG_DVB_LNBP22=m
|
||||
CONFIG_DVB_ISL6405=m
|
||||
CONFIG_DVB_ISL6421=m
|
||||
CONFIG_DVB_ISL6423=m
|
||||
CONFIG_DVB_A8293=m
|
||||
CONFIG_DVB_SP2=m
|
||||
CONFIG_DVB_LGS8GL5=m
|
||||
CONFIG_DVB_LGS8GXX=m
|
||||
CONFIG_DVB_ATBM8830=m
|
||||
CONFIG_DVB_TDA665x=m
|
||||
CONFIG_DVB_IX2505V=m
|
||||
CONFIG_DVB_M88RS2000=m
|
||||
CONFIG_DVB_AF9033=m
|
||||
CONFIG_DVB_HORUS3A=m
|
||||
CONFIG_DVB_ASCOT2E=m
|
||||
|
||||
#
|
||||
# Tools to develop new frontends
|
||||
|
|
106
patch/kernel/rockchip-default/310_add_basic_dtbo_structure.patch
Normal file
106
patch/kernel/rockchip-default/310_add_basic_dtbo_structure.patch
Normal file
|
@ -0,0 +1,106 @@
|
|||
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
|
||||
index 2c908f4d..2d4581a6 100644
|
||||
--- a/arch/arm/Makefile
|
||||
+++ b/arch/arm/Makefile
|
||||
@@ -337,6 +337,12 @@ $(INSTALL_TARGETS):
|
||||
%.dtb: | scripts
|
||||
$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@
|
||||
|
||||
+%.dtbo: | scripts
|
||||
+ $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@
|
||||
+
|
||||
+%.scr: | scripts
|
||||
+ $(Q)$(MAKE) $(build)=$(boot)/dts ARCH=$(ARCH) $(boot)/dts/$@
|
||||
+
|
||||
PHONY += dtbs dtbs_install
|
||||
|
||||
dtbs: prepare scripts
|
||||
diff --git a/arch/arm/boot/.gitignore b/arch/arm/boot/.gitignore
|
||||
index ad7a0253..e064e5f2 100644
|
||||
--- a/arch/arm/boot/.gitignore
|
||||
+++ b/arch/arm/boot/.gitignore
|
||||
@@ -3,5 +3,6 @@ zImage
|
||||
xipImage
|
||||
bootpImage
|
||||
uImage
|
||||
-*.dtb
|
||||
-zImage-dtb
|
||||
\ No newline at end of file
|
||||
+*.dtb*
|
||||
+*.scr
|
||||
+zImage-dtb
|
||||
diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst
|
||||
index 1c15717e..c71a5f0e 100644
|
||||
--- a/scripts/Makefile.dtbinst
|
||||
+++ b/scripts/Makefile.dtbinst
|
||||
@@ -29,6 +29,9 @@ ifeq ("$(dtbinst-root)", "$(obj)")
|
||||
endif
|
||||
|
||||
dtbinst-files := $(dtb-y)
|
||||
+dtboinst-files := $(dtbo-y)
|
||||
+script-files := $(scr-y)
|
||||
+readme-files := $(dtbotxt-y)
|
||||
dtbinst-dirs := $(dts-dirs)
|
||||
|
||||
# Helper targets for Installing DTBs into the boot directory
|
||||
@@ -42,10 +45,20 @@ $(dtbinst-files) $(dtbinst-dirs): | __dtbs_install_prep
|
||||
$(dtbinst-files): %.dtb: $(obj)/%.dtb
|
||||
$(call cmd,dtb_install,$(install-dir))
|
||||
|
||||
+
|
||||
+$(dtboinst-files): %.dtbo: $(obj)/%.dtbo
|
||||
+ $(call cmd,dtb_install,$(install-dir))
|
||||
+
|
||||
+$(script-files): %.scr: $(obj)/%.scr
|
||||
+ $(call cmd,dtb_install,$(install-dir))
|
||||
+
|
||||
+$(readme-files): %: $(src)/%
|
||||
+ $(call cmd,dtb_install,$(install-dir))
|
||||
+
|
||||
$(dtbinst-dirs):
|
||||
$(Q)$(MAKE) $(dtbinst)=$(obj)/$@
|
||||
|
||||
-PHONY += $(dtbinst-files) $(dtbinst-dirs)
|
||||
-__dtbs_install: $(dtbinst-files) $(dtbinst-dirs)
|
||||
+PHONY += $(dtbinst-files) $(dtboinst-files) $(script-files) $(readme-files) $(dtbinst-dirs)
|
||||
+__dtbs_install: $(dtbinst-files) $(dtboinst-files) $(script-files) $(readme-files) $(dtbinst-dirs)
|
||||
|
||||
.PHONY: $(PHONY)
|
||||
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
|
||||
index 3fb2aaa0..7956778c 100644
|
||||
--- a/scripts/Makefile.lib
|
||||
+++ b/scripts/Makefile.lib
|
||||
@@ -270,6 +270,9 @@ cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -n -f -9 > $@) || \
|
||||
# ---------------------------------------------------------------------------
|
||||
DTC ?= $(objtree)/scripts/dtc/dtc
|
||||
|
||||
+# Overlay support
|
||||
+DTC_FLAGS += -@ -Wno-unit_address_format -Wno-simple_bus_reg
|
||||
+
|
||||
# Generation of symbols for Android
|
||||
ifeq ($(CONFIG_ANDROID),y)
|
||||
DTC_FLAGS += -@
|
||||
@@ -319,6 +322,23 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
|
||||
$(obj)/%.dtb: $(src)/%.dts FORCE
|
||||
$(call if_changed_dep,dtc)
|
||||
|
||||
+quiet_cmd_dtco = DTCO $@
|
||||
+cmd_dtco = mkdir -p $(dir ${dtc-tmp}) ; \
|
||||
+ $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
|
||||
+ $(DTC) -O dtb -o $@ -b 0 \
|
||||
+ -i $(dir $<) $(DTC_FLAGS) \
|
||||
+ -d $(depfile).dtc.tmp $(dtc-tmp) ; \
|
||||
+ cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
|
||||
+
|
||||
+$(obj)/%.dtbo: $(src)/%.dts FORCE
|
||||
+ $(call if_changed_dep,dtco)
|
||||
+
|
||||
+quiet_cmd_scr = MKIMAGE $@
|
||||
+cmd_scr = mkimage -C none -A $(ARCH) -T script -d $< $@
|
||||
+
|
||||
+$(obj)/%.scr: $(src)/%.scr-cmd FORCE
|
||||
+ $(call if_changed,scr)
|
||||
+
|
||||
dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
|
||||
|
||||
# cat
|
30
patch/kernel/rockchip-default/311_fix_overlay.patch
Normal file
30
patch/kernel/rockchip-default/311_fix_overlay.patch
Normal file
|
@ -0,0 +1,30 @@
|
|||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index c350d70d..42027d0e 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -837,7 +837,10 @@ DTB_LIST := $(dtb-y)
|
||||
endif
|
||||
|
||||
targets += dtbs dtbs_install
|
||||
-targets += $(DTB_LIST)
|
||||
+targets += $(dtb-y)
|
||||
|
||||
-always := $(DTB_LIST)
|
||||
+always := $(dtb-y)
|
||||
+subdir-y := overlay
|
||||
clean-files := *.dtb
|
||||
+
|
||||
+dts-dirs += overlay
|
||||
diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst
|
||||
index c71a5f0e..bcc0fc52 100644
|
||||
--- a/scripts/Makefile.dtbinst
|
||||
+++ b/scripts/Makefile.dtbinst
|
||||
@@ -40,7 +40,7 @@ quiet_cmd_dtb_install = INSTALL $<
|
||||
|
||||
install-dir = $(patsubst $(dtbinst-root)%,$(INSTALL_DTBS_PATH)%,$(obj))
|
||||
|
||||
-$(dtbinst-files) $(dtbinst-dirs): | __dtbs_install_prep
|
||||
+$(dtbinst-files) $(dtboinst-files) $(dtbinst-dirs): | __dtbs_install_prep
|
||||
|
||||
$(dtbinst-files): %.dtb: $(obj)/%.dtb
|
||||
$(call cmd,dtb_install,$(install-dir))
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/drivers/of/property.c b/drivers/of/property.c
|
||||
index 2c201e2c..ae79a6f8 100644
|
||||
--- a/drivers/of/property.c
|
||||
+++ b/drivers/of/property.c
|
||||
@@ -900,7 +900,7 @@ of_fwnode_graph_get_port_parent(struct fwnode_handle *fwnode)
|
||||
struct device_node *np;
|
||||
|
||||
/* Get the parent of the port */
|
||||
- np = of_get_next_parent(to_of_node(fwnode));
|
||||
+ np = of_get_parent(to_of_node(fwnode));
|
||||
if (!np)
|
||||
return NULL;
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
diff --git a/arch/arm/boot/dts/rk3288-miniarm.dts b/arch/arm/boot/dts/rk3288-miniarm.dts
|
||||
index 24a4827c..e26a65e8 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-miniarm.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-miniarm.dts
|
||||
@@ -498,17 +498,23 @@
|
||||
reg = <0x36>;
|
||||
clocks = <&ext_cam_clk>;
|
||||
status = "okay";
|
||||
+
|
||||
+ port {
|
||||
+ ov5647_out: endpoint {
|
||||
+ remote-endpoint = <&mipi_dphy_in>;
|
||||
+ data-lanes = <1 2>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
camera1: imx219@10 {
|
||||
compatible = "sony,imx219";
|
||||
reg = <0x10>;
|
||||
clocks = <&ext_cam_clk>;
|
||||
- status = "okay";
|
||||
-
|
||||
+ status = "disabled";
|
||||
port {
|
||||
imx219_out: endpoint {
|
||||
- remote-endpoint = <&imx219_in>;
|
||||
+ remote-endpoint;
|
||||
data-lanes = <1 2>;
|
||||
};
|
||||
};
|
||||
@@ -562,8 +568,8 @@
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
|
||||
- imx219_in: endpoint {
|
||||
- remote-endpoint = <&imx219_out>;
|
||||
+ mipi_dphy_in: endpoint {
|
||||
+ remote-endpoint = <&ov5647_out>;
|
||||
data-lanes = <1 2>;
|
||||
};
|
||||
};
|
||||
@@ -843,7 +849,8 @@
|
||||
|
||||
cam_pins {
|
||||
cam_pwr: cam-pwr {
|
||||
- rockchip,pins = <2 0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ rockchip,pins = <0 17 RK_FUNC_GPIO &pcfg_pull_none>,
|
||||
+ <2 0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
};
|
|
@ -0,0 +1,500 @@
|
|||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index 0f88b9fb..c350d70d 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -573,7 +573,8 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \
|
||||
rk3308-evb-dmic-i2s-v10-aarch32.dtb \
|
||||
rk3308-voice-module-board-v10-aarch32.dtb \
|
||||
rk3308-voice-module-amic-mainboard-v10-aarch32.dtb \
|
||||
- rk3308-voice-module-pdm-mainboard-v10-aarch32.dtb
|
||||
+ rk3308-voice-module-pdm-mainboard-v10-aarch32.dtb
|
||||
+subdir-y := overlay
|
||||
dtb-$(CONFIG_ARCH_S3C24XX) += \
|
||||
s3c2416-smdk2416.dtb
|
||||
dtb-$(CONFIG_ARCH_S3C64XX) += \
|
||||
diff --git a/arch/arm/boot/dts/overlay/Makefile b/arch/arm/boot/dts/overlay/Makefile
|
||||
new file mode 100644
|
||||
index 00000000..56d8cb18
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/Makefile
|
||||
@@ -0,0 +1,26 @@
|
||||
+# SPDX-License-Identifier: GPL-2.0
|
||||
+dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
|
||||
+ rockchip-ds1307.dtbo \
|
||||
+ rockchip-i2c1.dtbo \
|
||||
+ rockchip-i2c4.dtbo \
|
||||
+ rockchip-spi0.dtbo \
|
||||
+ rockchip-spi2.dtbo \
|
||||
+ rockchip-spidev0.dtbo \
|
||||
+ rockchip-spidev2.dtbo \
|
||||
+ rockchip-uart1.dtbo \
|
||||
+ rockchip-uart2.dtbo \
|
||||
+ rockchip-uart3.dtbo \
|
||||
+ rockchip-uart4.dtbo \
|
||||
+ rockchip-w1-gpio.dtbo
|
||||
+
|
||||
+scr-$(CONFIG_ARCH_ROCKCHIP) += \
|
||||
+ rockchip-fixup.scr
|
||||
+
|
||||
+dtbotxt-$(CONFIG_ARCH_ROCKCHIP) += \
|
||||
+ README.rockchip-overlays
|
||||
+
|
||||
+targets += $(dtbo-y) $(scr-y) $(dtbotxt-y)
|
||||
+
|
||||
+always := $(dtbo-y) $(scr-y) $(dtbotxt-y)
|
||||
+clean-files := *.dtbo *.scr
|
||||
+
|
||||
diff --git a/arch/arm/boot/dts/overlay/README.rockchip-overlays b/arch/arm/boot/dts/overlay/README.rockchip-overlays
|
||||
new file mode 100644
|
||||
index 00000000..df4559ca
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/README.rockchip-overlays
|
||||
@@ -0,0 +1,78 @@
|
||||
+This document describes overlays provided in the kernel packages
|
||||
+For generic Armbian overlays documentation please see
|
||||
+https://docs.armbian.com/User-Guide_Allwinner_overlays/
|
||||
+
|
||||
+### Platform:
|
||||
+
|
||||
+rockchip (Rockchip)
|
||||
+
|
||||
+### Provided overlays:
|
||||
+
|
||||
+- ds1307
|
||||
+- i2c1
|
||||
+- i2c4
|
||||
+- spi0
|
||||
+- spi2
|
||||
+- spidev0
|
||||
+- spidev2
|
||||
+- uart1
|
||||
+- uart2
|
||||
+- uart3
|
||||
+- uart4
|
||||
+- w1-gpio
|
||||
+
|
||||
+### Overlay details:
|
||||
+
|
||||
+### ds1307
|
||||
+
|
||||
+Activates ds1307 rtc on i2c1
|
||||
+
|
||||
+### i2c1
|
||||
+
|
||||
+Activate i2c1
|
||||
+
|
||||
+### i2c4
|
||||
+
|
||||
+Activate i2c4
|
||||
+
|
||||
+### spi0
|
||||
+
|
||||
+Activate spi0
|
||||
+conflicts with uart4
|
||||
+
|
||||
+### spi2
|
||||
+
|
||||
+Activate spi2
|
||||
+
|
||||
+### spidev0
|
||||
+
|
||||
+Activate spidev on spi0
|
||||
+Depends on spi0
|
||||
+
|
||||
+### spidev2
|
||||
+
|
||||
+Activate spidev on spi2
|
||||
+depends on spi2
|
||||
+
|
||||
+### uart1
|
||||
+
|
||||
+Activate uart1
|
||||
+
|
||||
+### uart2
|
||||
+
|
||||
+Activate uart2
|
||||
+
|
||||
+### uart3
|
||||
+
|
||||
+Activate uart3
|
||||
+
|
||||
+### uart4
|
||||
+
|
||||
+Activate uart4
|
||||
+Conflicts with spi0
|
||||
+
|
||||
+### w1-gpio
|
||||
+
|
||||
+Activates 1-wire gpio master on GPIO0 17
|
||||
+
|
||||
+
|
||||
diff --git a/arch/arm/boot/dts/overlay/rockchip-ds1307.dts b/arch/arm/boot/dts/overlay/rockchip-ds1307.dts
|
||||
new file mode 100644
|
||||
index 00000000..af240e46
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/rockchip-ds1307.dts
|
||||
@@ -0,0 +1,21 @@
|
||||
+/* Definitions for ds1307
|
||||
+* From ASUS: https://github.com/TinkerBoard/debian_kernel/commits/develop/arch/arm/boot/dts/overlays/ds1307-overlay.dts
|
||||
+*/
|
||||
+
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "rockchip,rk3288-miniarm", "rockchip,rk3288";
|
||||
+
|
||||
+ fragment@0 {
|
||||
+ target = <&i2c1>;
|
||||
+ __overlay__ {
|
||||
+ rtc: ds1307@68 {
|
||||
+ compatible = "dallas,ds1307";
|
||||
+ reg = <0x68>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/overlay/rockchip-fixup.scr-cmd b/arch/arm/boot/dts/overlay/rockchip-fixup.scr-cmd
|
||||
new file mode 100644
|
||||
index 00000000..d4c39e20
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/rockchip-fixup.scr-cmd
|
||||
@@ -0,0 +1,4 @@
|
||||
+# overlays fixup script
|
||||
+# implements (or rather substitutes) overlay arguments functionality
|
||||
+# using u-boot scripting, environment variables and "fdt" command
|
||||
+
|
||||
diff --git a/arch/arm/boot/dts/overlay/rockchip-i2c1.dts b/arch/arm/boot/dts/overlay/rockchip-i2c1.dts
|
||||
new file mode 100644
|
||||
index 00000000..12064d4d
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/rockchip-i2c1.dts
|
||||
@@ -0,0 +1,16 @@
|
||||
+/* Definitions for i2c1
|
||||
+*/
|
||||
+
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "rockchip,rk3288-miniarm", "rockchip,rk3288";
|
||||
+
|
||||
+ fragment@0 {
|
||||
+ target = <&i2c1>;
|
||||
+ __overlay__ {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/overlay/rockchip-i2c4.dts b/arch/arm/boot/dts/overlay/rockchip-i2c4.dts
|
||||
new file mode 100644
|
||||
index 00000000..b399ecbd
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/rockchip-i2c4.dts
|
||||
@@ -0,0 +1,16 @@
|
||||
+/* Definitions for i2c4
|
||||
+*/
|
||||
+
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "rockchip,rk3288-miniarm", "rockchip,rk3288";
|
||||
+
|
||||
+ fragment@0 {
|
||||
+ target = <&i2c4>;
|
||||
+ __overlay__ {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/overlay/rockchip-spi0.dts b/arch/arm/boot/dts/overlay/rockchip-spi0.dts
|
||||
new file mode 100644
|
||||
index 00000000..cde22beb
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/rockchip-spi0.dts
|
||||
@@ -0,0 +1,17 @@
|
||||
+/* Definitions for spi0
|
||||
+*/
|
||||
+
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "rockchip,rk3288-miniarm", "rockchip,rk3288";
|
||||
+
|
||||
+ fragment@0 {
|
||||
+ target = <&spi0>;
|
||||
+ __overlay__ {
|
||||
+ status = "okay";
|
||||
+ max-freq = <50000000>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/overlay/rockchip-spi2.dts b/arch/arm/boot/dts/overlay/rockchip-spi2.dts
|
||||
new file mode 100644
|
||||
index 00000000..dcbfd8ad
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/rockchip-spi2.dts
|
||||
@@ -0,0 +1,17 @@
|
||||
+/* Definitions for spi2
|
||||
+*/
|
||||
+
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "rockchip,rk3288-miniarm", "rockchip,rk3288";
|
||||
+
|
||||
+ fragment@0 {
|
||||
+ target = <&spi2>;
|
||||
+ __overlay__ {
|
||||
+ status = "okay";
|
||||
+ max-freq = <50000000>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/overlay/rockchip-spidev0.dts b/arch/arm/boot/dts/overlay/rockchip-spidev0.dts
|
||||
new file mode 100644
|
||||
index 00000000..6f456576
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/rockchip-spidev0.dts
|
||||
@@ -0,0 +1,33 @@
|
||||
+/* Definition for SPI0 Spidev
|
||||
+ * spi port for Tinker Board
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/{
|
||||
+ compatible = "rockchip,rk3288-miniarm", "rockchip,rk3288";
|
||||
+
|
||||
+ fragment@0 {
|
||||
+
|
||||
+ target = <&spi0>;
|
||||
+ __overlay__ {
|
||||
+
|
||||
+ spidev@0 {
|
||||
+ compatible = "rockchip,spi_tinker";
|
||||
+ reg = <0>;
|
||||
+ spi-max-frequency = <50000000>;
|
||||
+ spi-cpha = <1>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ spidev@1 {
|
||||
+ compatible = "rockchip,spi_tinker";
|
||||
+ reg = <1>;
|
||||
+ spi-max-frequency = <50000000>;
|
||||
+ spi-cpha = <1>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/overlay/rockchip-spidev2.dts b/arch/arm/boot/dts/overlay/rockchip-spidev2.dts
|
||||
new file mode 100644
|
||||
index 00000000..bdaf0bd7
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/rockchip-spidev2.dts
|
||||
@@ -0,0 +1,33 @@
|
||||
+/* Definition for SPI2 Spidev
|
||||
+ * spi port for Tinker Board
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/{
|
||||
+ compatible = "rockchip,rk3288-miniarm", "rockchip,rk3288";
|
||||
+
|
||||
+ fragment@0 {
|
||||
+
|
||||
+ target = <&spi2>;
|
||||
+ __overlay__ {
|
||||
+
|
||||
+ spidev@0 {
|
||||
+ compatible = "rockchip,spi_tinker";
|
||||
+ reg = <0>;
|
||||
+ spi-max-frequency = <50000000>;
|
||||
+ spi-cpha = <1>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ spidev@1 {
|
||||
+ compatible = "rockchip,spi_tinker";
|
||||
+ reg = <1>;
|
||||
+ spi-max-frequency = <50000000>;
|
||||
+ spi-cpha = <1>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/overlay/rockchip-uart1.dts b/arch/arm/boot/dts/overlay/rockchip-uart1.dts
|
||||
new file mode 100644
|
||||
index 00000000..8d6b28a9
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/rockchip-uart1.dts
|
||||
@@ -0,0 +1,16 @@
|
||||
+/* Definitions for uart1
|
||||
+*/
|
||||
+
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "rockchip,rk3288-miniarm", "rockchip,rk3288";
|
||||
+
|
||||
+ fragment@0 {
|
||||
+ target = <&uart1>;
|
||||
+ __overlay__ {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/overlay/rockchip-uart2.dts b/arch/arm/boot/dts/overlay/rockchip-uart2.dts
|
||||
new file mode 100644
|
||||
index 00000000..875de3c6
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/rockchip-uart2.dts
|
||||
@@ -0,0 +1,16 @@
|
||||
+/* Definitions for uart2
|
||||
+*/
|
||||
+
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "rockchip,rk3288-miniarm", "rockchip,rk3288";
|
||||
+
|
||||
+ fragment@0 {
|
||||
+ target = <&uart2>;
|
||||
+ __overlay__ {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/overlay/rockchip-uart3.dts b/arch/arm/boot/dts/overlay/rockchip-uart3.dts
|
||||
new file mode 100644
|
||||
index 00000000..ccc51248
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/rockchip-uart3.dts
|
||||
@@ -0,0 +1,16 @@
|
||||
+/* Definitions for uart3
|
||||
+*/
|
||||
+
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "rockchip,rk3288-miniarm", "rockchip,rk3288";
|
||||
+
|
||||
+ fragment@0 {
|
||||
+ target = <&uart3>;
|
||||
+ __overlay__ {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/overlay/rockchip-uart4.dts b/arch/arm/boot/dts/overlay/rockchip-uart4.dts
|
||||
new file mode 100644
|
||||
index 00000000..cc9f84ae
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/rockchip-uart4.dts
|
||||
@@ -0,0 +1,16 @@
|
||||
+/* Definitions for uart4
|
||||
+*/
|
||||
+
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "rockchip,rk3288-miniarm", "rockchip,rk3288";
|
||||
+
|
||||
+ fragment@0 {
|
||||
+ target = <&uart4>;
|
||||
+ __overlay__ {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/overlay/rockchip-w1-gpio.dts b/arch/arm/boot/dts/overlay/rockchip-w1-gpio.dts
|
||||
new file mode 100644
|
||||
index 00000000..c0377d2e
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/rockchip-w1-gpio.dts
|
||||
@@ -0,0 +1,23 @@
|
||||
+/* 1-Wire GPIO
|
||||
+* From ASUS: https://github.com/TinkerBoard/debian_kernel/blob/develop/arch/arm/boot/dts/overlays/w1-gpio-overlay.dts
|
||||
+*
|
||||
+*
|
||||
+*/
|
||||
+
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "rockchip,rk3288-tinker", "rockchip,rk3288";
|
||||
+ fragment@0 {
|
||||
+ target-path = "/";
|
||||
+ __overlay__ {
|
||||
+ w1: onewire@0 {
|
||||
+ compatible = "w1-gpio";
|
||||
+ pinctrl-names = "default";
|
||||
+ gpios = <&gpio0 17 0>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/rk3288-miniarm.dts b/arch/arm/boot/dts/rk3288-miniarm.dts
|
||||
index e26a65e8..4d3e80b9 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-miniarm.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-miniarm.dts
|
||||
@@ -487,7 +487,7 @@
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
- status = "okay";
|
||||
+ status = "disabled";
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
@@ -541,7 +541,7 @@
|
||||
};
|
||||
|
||||
&i2c4 {
|
||||
- status = "okay";
|
||||
+ status = "disabled";
|
||||
};
|
||||
|
||||
&isp {
|
||||
@@ -693,21 +693,21 @@
|
||||
&uart1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart1_xfer>, <&uart1_cts>, <&uart1_rts>;
|
||||
- status = "okay";
|
||||
+ status = "disabled";
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
- status = "okay";
|
||||
+ status = "disabled";
|
||||
};
|
||||
|
||||
&uart3 {
|
||||
- status = "okay";
|
||||
+ status = "disabled";
|
||||
};
|
||||
|
||||
&uart4 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart4_xfer>, <&uart4_cts>, <&uart4_rts>;
|
||||
- status = "okay";
|
||||
+ status = "disabled";
|
||||
};
|
||||
|
||||
&usbphy {
|
|
@ -0,0 +1,39 @@
|
|||
From e94564e21c62e313dbe455db44acb9e8c0f92a0a Mon Sep 17 00:00:00 2001
|
||||
From: Jungchi_Liao <Jungchi_Liao@asus.com>
|
||||
Date: Wed, 4 Jul 2018 12:33:45 +0800
|
||||
Subject: [PATCH] Use auto AE/AWB control form OV5647
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Change-Id: I991aa4c56a795b21dd28b45c9938624f6510dba6
|
||||
Reviewed-on: https://tp-biosrd-v02/gerrit/83090
|
||||
Reviewed-by: Jamess Huang(黃以民) <Jamess_Huang@asus.com>
|
||||
Tested-by: Jamess Huang(黃以民) <Jamess_Huang@asus.com>
|
||||
---
|
||||
drivers/media/i2c/ov5647.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
mode change 100644 => 100755 drivers/media/i2c/ov5647.c
|
||||
|
||||
diff --git a/drivers/media/i2c/ov5647.c b/drivers/media/i2c/ov5647.c
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
index b8b011ece42f..cdd77b868eb0
|
||||
--- a/drivers/media/i2c/ov5647.c
|
||||
+++ b/drivers/media/i2c/ov5647.c
|
||||
@@ -158,6 +158,7 @@ static struct regval_list ov5647_common_regs[] = {
|
||||
{0x3a1f, 0x28},
|
||||
{0x4001, 0x02},
|
||||
{0x4000, 0x09},
|
||||
+#if 0 // use auto AE/AWB control from sensor
|
||||
{0x3503, 0x03}, /* manual,0xAE */
|
||||
{0x3500, 0x00},
|
||||
{0x3501, 0x6f},
|
||||
@@ -173,6 +174,7 @@ static struct regval_list ov5647_common_regs[] = {
|
||||
{0x518a, 0x04},
|
||||
{0x518b, 0x00},
|
||||
{0x5000, 0x00}, /* lenc WBC on */
|
||||
+#endif
|
||||
{0x3011, 0x62},
|
||||
/* mipi */
|
||||
{0x3016, 0x08},
|
98
patch/kernel/rockchip-default/324_imx219_overlay.patch
Normal file
98
patch/kernel/rockchip-default/324_imx219_overlay.patch
Normal file
|
@ -0,0 +1,98 @@
|
|||
diff --git a/arch/arm/boot/dts/overlay/Makefile b/arch/arm/boot/dts/overlay/Makefile
|
||||
index 56d8cb18..c46f29d6 100644
|
||||
--- a/arch/arm/boot/dts/overlay/Makefile
|
||||
+++ b/arch/arm/boot/dts/overlay/Makefile
|
||||
@@ -11,7 +11,8 @@ dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
|
||||
rockchip-uart2.dtbo \
|
||||
rockchip-uart3.dtbo \
|
||||
rockchip-uart4.dtbo \
|
||||
- rockchip-w1-gpio.dtbo
|
||||
+ rockchip-w1-gpio.dtbo \
|
||||
+ rockchip-imx219.dtbo
|
||||
|
||||
scr-$(CONFIG_ARCH_ROCKCHIP) += \
|
||||
rockchip-fixup.scr
|
||||
diff --git a/arch/arm/boot/dts/overlay/README.rockchip-overlays b/arch/arm/boot/dts/overlay/README.rockchip-overlays
|
||||
index df4559ca..4246b8b8 100644
|
||||
--- a/arch/arm/boot/dts/overlay/README.rockchip-overlays
|
||||
+++ b/arch/arm/boot/dts/overlay/README.rockchip-overlays
|
||||
@@ -20,6 +20,7 @@ rockchip (Rockchip)
|
||||
- uart3
|
||||
- uart4
|
||||
- w1-gpio
|
||||
+- imx-219
|
||||
|
||||
### Overlay details:
|
||||
|
||||
@@ -75,4 +76,8 @@ Conflicts with spi0
|
||||
|
||||
Activates 1-wire gpio master on GPIO0 17
|
||||
|
||||
+### imx219
|
||||
+
|
||||
+Sets imx219 (RPi cam V2.1) as default camera on CSI
|
||||
+
|
||||
|
||||
diff --git a/arch/arm/boot/dts/overlay/rockchip-imx219.dts b/arch/arm/boot/dts/overlay/rockchip-imx219.dts
|
||||
new file mode 100644
|
||||
index 00000000..1fc6af4d
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/rockchip-imx219.dts
|
||||
@@ -0,0 +1,57 @@
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "rockchip,rk3288-miniarm", "rockchip,rk3288";
|
||||
+
|
||||
+ fragment@0 {
|
||||
+ target = <&i2c2>;
|
||||
+ __overlay__ {
|
||||
+
|
||||
+ camera0: ov5647@36 {
|
||||
+ compatible = "ovti,ov5647";
|
||||
+ reg = <0x36>;
|
||||
+ clocks = <&ext_cam_clk>;
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ port {
|
||||
+ ov5647_out: endpoint {
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ camera1: imx219@10 {
|
||||
+ compatible = "sony,imx219";
|
||||
+ reg = <0x10>;
|
||||
+ clocks = <&ext_cam_clk>;
|
||||
+ status = "okay";
|
||||
+ port {
|
||||
+ imx219_out: endpoint {
|
||||
+ remote-endpoint = <&mipi_dphy_in>;
|
||||
+ data-lanes = <1 2>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ fragment@1 {
|
||||
+ target = <&mipi_phy_rx0>;
|
||||
+ __overlay__ {
|
||||
+ ports {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ port@0 {
|
||||
+ reg = <0>;
|
||||
+
|
||||
+ mipi_dphy_in: endpoint {
|
||||
+ remote-endpoint = <&imx219_out>;
|
||||
+ data-lanes = <1 2>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
209
patch/kernel/rockchip-default/325_imx219_driverupdated.patch
Normal file
209
patch/kernel/rockchip-default/325_imx219_driverupdated.patch
Normal file
|
@ -0,0 +1,209 @@
|
|||
diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c
|
||||
index a05d5e9f..7d453abd 100644
|
||||
--- a/drivers/media/i2c/imx219.c
|
||||
+++ b/drivers/media/i2c/imx219.c
|
||||
@@ -56,6 +56,8 @@ struct imx219_mode {
|
||||
u32 hts_def;
|
||||
u32 vts_def;
|
||||
const struct imx219_reg *reg_list;
|
||||
+ u8 binning_v; // 0 = no binning, 1 = 2x binning, 2 = 4x binning
|
||||
+ u8 binning_h;
|
||||
};
|
||||
|
||||
/* MCLK:24MHz 3280x2464 21.2fps MIPI LANE2 */
|
||||
@@ -70,8 +72,6 @@ static const struct imx219_reg imx219_init_tab_3280_2464_21fps[] = {
|
||||
{0x0128, 0x00}, /* DPHY_CNTRL */
|
||||
{0x012A, 0x18}, /* EXCK_FREQ[15:8] */
|
||||
{0x012B, 0x00}, /* EXCK_FREQ[7:0] */
|
||||
- {0x015A, 0x01}, /* INTEG TIME[15:8] */
|
||||
- {0x015B, 0xF4}, /* INTEG TIME[7:0] */
|
||||
{0x0160, 0x09}, /* FRM_LENGTH_A[15:8] */
|
||||
{0x0161, 0xC4}, /* FRM_LENGTH_A[7:0] */
|
||||
{0x0162, 0x0D}, /* LINE_LENGTH_A[15:8] */
|
||||
@@ -163,6 +163,56 @@ static const struct imx219_reg imx219_init_tab_1920_1080_30fps[] = {
|
||||
{IMX219_TABLE_END, 0x00}
|
||||
};
|
||||
|
||||
+/* MCLK:24MHz 1640x1232 2x2 binning 30fps MIPI LANE2 */
|
||||
+static const struct imx219_reg imx219_init_tab_1640_1232_30fps[] = {
|
||||
+ {0x30EB, 0x05}, /* Access Code for address over 0x3000 */
|
||||
+ {0x30EB, 0x0C}, /* Access Code for address over 0x3000 */
|
||||
+ {0x300A, 0xFF}, /* Access Code for address over 0x3000 */
|
||||
+ {0x300B, 0xFF}, /* Access Code for address over 0x3000 */
|
||||
+ {0x30EB, 0x05}, /* Access Code for address over 0x3000 */
|
||||
+ {0x30EB, 0x09}, /* Access Code for address over 0x3000 */
|
||||
+ {0x0114, 0x01}, /* CSI_LANE_MODE[1:0} */
|
||||
+ {0x0128, 0x00}, /* DPHY_CNTRL */
|
||||
+ {0x012A, 0x18}, /* EXCK_FREQ[15:8] */
|
||||
+ {0x012B, 0x00}, /* EXCK_FREQ[7:0] */
|
||||
+ {0x0160, 0x06}, /* FRM_LENGTH_A[15:8] */
|
||||
+ {0x0161, 0xE6}, /* FRM_LENGTH_A[7:0] */
|
||||
+ {0x0162, 0x0D}, /* LINE_LENGTH_A[15:8] */
|
||||
+ {0x0163, 0x78}, /* LINE_LENGTH_A[7:0] */
|
||||
+ {0x0260, 0x06}, /* FRM_LENGTH_B[15:8] */
|
||||
+ {0x0261, 0xE6}, /* FRM_LENGTH_B[7:0] */
|
||||
+ {0x0262, 0x0D}, /* LINE_LENGTH_B[15:8] */
|
||||
+ {0x0263, 0x78}, /* LINE_LENGTH_B[7:0] */
|
||||
+ {0x0170, 0x01}, /* X_ODD_INC_A[2:0] */
|
||||
+ {0x0171, 0x01}, /* Y_ODD_INC_A[2:0] */
|
||||
+ {0x0270, 0x01}, /* X_ODD_INC_B[2:0] */
|
||||
+ {0x0271, 0x01}, /* Y_ODD_INC_B[2:0] */
|
||||
+ {0x0174, 0x01}, /* BINNING_MODE_H_A */
|
||||
+ {0x0175, 0x01}, /* BINNING_MODE_V_A */
|
||||
+ {0x0274, 0x01}, /* BINNING_MODE_H_B */
|
||||
+ {0x0275, 0x01}, /* BINNING_MODE_V_B */
|
||||
+ {0x018C, 0x0A}, /* CSI_DATA_FORMAT_A[15:8] */
|
||||
+ {0x018D, 0x0A}, /* CSI_DATA_FORMAT_A[7:0] */
|
||||
+ {0x028C, 0x0A}, /* CSI_DATA_FORMAT_B[15:8] */
|
||||
+ {0x028D, 0x0A}, /* CSI_DATA_FORMAT_B[7:0] */
|
||||
+ {0x0301, 0x05}, /* VTPXCK_DIV */
|
||||
+ {0x0303, 0x01}, /* VTSYCK_DIV */
|
||||
+ {0x0304, 0x03}, /* PREPLLCK_VT_DIV[3:0] */
|
||||
+ {0x0305, 0x03}, /* PREPLLCK_OP_DIV[3:0] */
|
||||
+ {0x0306, 0x00}, /* PLL_VT_MPY[10:8] */
|
||||
+ {0x0307, 0x39}, /* PLL_VT_MPY[7:0] */
|
||||
+ {0x0309, 0x0A}, /* OPPXCK_DIV[4:0] */
|
||||
+ {0x030B, 0x01}, /* OPSYCK_DIV */
|
||||
+ {0x030C, 0x00}, /* PLL_OP_MPY[10:8] */
|
||||
+ {0x030D, 0x72}, /* PLL_OP_MPY[7:0] */
|
||||
+ {0x455E, 0x00}, /* CIS Tuning */
|
||||
+ {0x471E, 0x4B}, /* CIS Tuning */
|
||||
+ {0x4767, 0x0F}, /* CIS Tuning */
|
||||
+ {0x4750, 0x14}, /* CIS Tuning */
|
||||
+ {0x47B4, 0x14}, /* CIS Tuning */
|
||||
+ {IMX219_TABLE_END, 0x00}
|
||||
+};
|
||||
+
|
||||
static const struct imx219_reg start[] = {
|
||||
{0x0100, 0x01}, /* mode select streaming on */
|
||||
{IMX219_TABLE_END, 0x00}
|
||||
@@ -241,6 +291,8 @@ static const struct imx219_mode supported_modes[] = {
|
||||
.hts_def = 0x0d78 - IMX219_EXP_LINES_MARGIN,
|
||||
.vts_def = 0x06E6,
|
||||
.reg_list = imx219_init_tab_1920_1080_30fps,
|
||||
+ .binning_h = 0,
|
||||
+ .binning_v = 0,
|
||||
},
|
||||
{
|
||||
.width = 3280,
|
||||
@@ -249,6 +301,18 @@ static const struct imx219_mode supported_modes[] = {
|
||||
.hts_def = 0x0d78 - IMX219_EXP_LINES_MARGIN,
|
||||
.vts_def = 0x09c4,
|
||||
.reg_list = imx219_init_tab_3280_2464_21fps,
|
||||
+ .binning_h = 0,
|
||||
+ .binning_v = 0,
|
||||
+ },
|
||||
+ {
|
||||
+ .width = 1640,
|
||||
+ .height = 1232,
|
||||
+ .max_fps = 30,
|
||||
+ .hts_def = 0x0d78 - IMX219_EXP_LINES_MARGIN,
|
||||
+ .vts_def = 0x06E6,
|
||||
+ .reg_list = imx219_init_tab_1640_1232_30fps,
|
||||
+ .binning_h = 1,
|
||||
+ .binning_v = 1,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -328,8 +392,11 @@ static int imx219_s_stream(struct v4l2_subdev *sd, int enable)
|
||||
u8 reg = 0x00;
|
||||
int ret;
|
||||
|
||||
- if (!enable)
|
||||
- return reg_write_table(client, stop);
|
||||
+ if (!enable) {
|
||||
+ ret = reg_write_table(client, stop);
|
||||
+ mdelay(100);
|
||||
+ return ret;
|
||||
+ }
|
||||
|
||||
ret = reg_write_table(client, priv->cur_mode->reg_list);
|
||||
if (ret)
|
||||
@@ -399,6 +466,15 @@ static int imx219_s_stream(struct v4l2_subdev *sd, int enable)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
+ /* Set exposure and gain */
|
||||
+ ret = reg_write(client, 0x0157, priv->analogue_gain);
|
||||
+ ret |= reg_write(client, 0x0158, priv->digital_gain >> 8);
|
||||
+ ret |= reg_write(client, 0x0159, priv->digital_gain & 0xff);
|
||||
+ ret |= reg_write(client, 0x015a, priv->exposure_time >> 8);
|
||||
+ ret |= reg_write(client, 0x015b, priv->exposure_time & 0xff);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
return reg_write_table(client, start);
|
||||
}
|
||||
|
||||
@@ -566,12 +642,11 @@ static int imx219_s_ctrl(struct v4l2_ctrl *ctrl)
|
||||
ret = reg_write(client, 0x0157, priv->analogue_gain);
|
||||
ret |= reg_write(client, 0x0158, priv->digital_gain >> 8);
|
||||
ret |= reg_write(client, 0x0159, priv->digital_gain & 0xff);
|
||||
-
|
||||
+
|
||||
return ret;
|
||||
|
||||
case V4L2_CID_EXPOSURE:
|
||||
priv->exposure_time = ctrl->val;
|
||||
-
|
||||
ret = reg_write(client, 0x015a, priv->exposure_time >> 8);
|
||||
ret |= reg_write(client, 0x015b, priv->exposure_time & 0xff);
|
||||
return ret;
|
||||
@@ -650,7 +725,14 @@ static int imx219_set_fmt(struct v4l2_subdev *sd,
|
||||
return 0;
|
||||
|
||||
mode = imx219_find_best_fit(fmt);
|
||||
- fmt->format.code = MEDIA_BUS_FMT_SRGGB10_1X10;
|
||||
+ if(priv->hflip == 0 && priv->vflip == 0)
|
||||
+ fmt->format.code = MEDIA_BUS_FMT_SRGGB10_1X10;
|
||||
+ else if(priv->hflip != 0 && priv->vflip == 0)
|
||||
+ fmt->format.code = MEDIA_BUS_FMT_SGRBG10_1X10;
|
||||
+ else if(priv->hflip == 0 && priv->vflip != 0)
|
||||
+ fmt->format.code = MEDIA_BUS_FMT_SGBRG10_1X10;
|
||||
+ else
|
||||
+ fmt->format.code = MEDIA_BUS_FMT_SBGGR10_1X10;
|
||||
fmt->format.width = mode->width;
|
||||
fmt->format.height = mode->height;
|
||||
fmt->format.field = V4L2_FIELD_NONE;
|
||||
@@ -667,14 +749,14 @@ static int imx219_set_fmt(struct v4l2_subdev *sd,
|
||||
pixel_rate, 1, pixel_rate);
|
||||
|
||||
/* reset crop window */
|
||||
- priv->crop_rect.left = 1640 - (mode->width / 2);
|
||||
+ priv->crop_rect.left = 1640 - ((mode->width << mode->binning_h) / 2);
|
||||
if (priv->crop_rect.left < 0)
|
||||
priv->crop_rect.left = 0;
|
||||
- priv->crop_rect.top = 1232 - (mode->height / 2);
|
||||
+ priv->crop_rect.top = 1232 - ((mode->height << mode->binning_v) / 2);
|
||||
if (priv->crop_rect.top < 0)
|
||||
priv->crop_rect.top = 0;
|
||||
- priv->crop_rect.width = mode->width;
|
||||
- priv->crop_rect.height = mode->height;
|
||||
+ priv->crop_rect.width = (mode->width << mode->binning_h);
|
||||
+ priv->crop_rect.height = (mode->height << mode->binning_v);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -692,7 +774,16 @@ static int imx219_get_fmt(struct v4l2_subdev *sd,
|
||||
|
||||
fmt->format.width = mode->width;
|
||||
fmt->format.height = mode->height;
|
||||
- fmt->format.code = MEDIA_BUS_FMT_SRGGB10_1X10;
|
||||
+
|
||||
+ if(priv->hflip == 0 && priv->vflip == 0)
|
||||
+ fmt->format.code = MEDIA_BUS_FMT_SRGGB10_1X10;
|
||||
+ else if(priv->hflip != 0 && priv->vflip == 0)
|
||||
+ fmt->format.code = MEDIA_BUS_FMT_SGRBG10_1X10;
|
||||
+ else if(priv->hflip == 0 && priv->vflip != 0)
|
||||
+ fmt->format.code = MEDIA_BUS_FMT_SGBRG10_1X10;
|
||||
+ else
|
||||
+ fmt->format.code = MEDIA_BUS_FMT_SBGGR10_1X10;
|
||||
+
|
||||
fmt->format.field = V4L2_FIELD_NONE;
|
||||
|
||||
return 0;
|
||||
@@ -960,3 +1051,4 @@ module_i2c_driver(imx219_i2c_driver);
|
||||
MODULE_DESCRIPTION("Sony IMX219 Camera driver");
|
||||
MODULE_AUTHOR("Guennadi Liakhovetski <g.liakhovetski@gmx.de>");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
+
|
Loading…
Add table
Reference in a new issue