Merge commit '339c882a12a3d8dc19cbf7671d8afb3afee3dc2d'

* commit '339c882a12a3d8dc19cbf7671d8afb3afee3dc2d':
  media: i2c: add vcm driver dw9800v
  media: i2c: ov16885: add camera sensor driver
  mfd: display-serdes: modify function definition for maxim chips
  media: i2c: add os04d10 sensor driver
  arm64: dts: rockchip: rk3308-evb: Add rk3308 audio v10 board devicetree
  regulator: rk806: fixes return value when read register failed

Change-Id: I6e27bb7cbd5329cf287fbe833c49f33d3e84cd85

Conflicts:
	drivers/media/i2c/Kconfig
	drivers/media/i2c/Makefile
This commit is contained in:
Tao Huang
2023-12-15 20:40:59 +08:00
15 changed files with 5055 additions and 18 deletions

View File

@@ -14,6 +14,8 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += px30-evb-ddr4-v10-linux.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-evb.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-evb-amic-v11.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-evb-amic-v13.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-evb-audio-amic-v10.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-evb-audio-v10-display-rgb.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-evb-dmic-pdm-v11.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-evb-dmic-pdm-v13.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-roc-cc.dtb

View File

@@ -0,0 +1,52 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2023 Rockchip Electronics Co., Ltd
*/
/dts-v1/;
#include "rk3308-evb-audio-v10.dtsi"
/ {
model = "Rockchip RK3308 evb audio analog mic v10 board";
compatible = "rockchip,rk3308-evb-audio-amic-v10", "rockchip,rk3308";
vad_acodec_sound: vad-acodec-sound {
status = "okay";
compatible = "rockchip,multicodecs-card";
rockchip,card-name = "rockchip,rk3308-vad";
rockchip,codec-hp-det;
rockchip,mclk-fs = <256>;
rockchip,cpu = <&i2s_8ch_2>;
rockchip,codec = <&acodec>, <&vad>;
};
};
&acodec {
rockchip,micbias1;
rockchip,micbias2;
rockchip,en-always-grps = <1 2 3>;
rockchip,adc-grps-route = <1 2 3 0>;
};
&acodec_sound {
status = "disabled";
};
&bluetooth_sound {
status = "okay";
};
&i2s_2ch_0 {
status = "okay";
#sound-dai-cells = <0>;
};
&vad {
status = "okay";
rockchip,audio-src = <&i2s_8ch_2>;
rockchip,det-channel = <0>;
rockchip,buffer-time-ms = <200>;
rockchip,mode = <1>;
#sound-dai-cells = <0>;
};

View File

@@ -0,0 +1,139 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2022 Rockchip Electronics Co., Ltd
*/
/dts-v1/;
#include "rk3308-evb-audio-amic-v10.dts"
/ {
model = "Rockchip RK3308B EVB AUDIO DDR3 V10 Board + Rockchip RK3308 RGB ExtBoard V10";
compatible = "rockchip,rk3308-evb-audio-rgb-display-v10", "rockchip,rk3308";
backlight: backlight {
status = "okay";
compatible = "pwm-backlight";
pwms = <&pwm1 0 25000 0>;
brightness-levels = <
0 1 2 3 4 5 6 7
8 9 10 11 12 13 14 15
16 17 18 19 20 21 22 23
24 25 26 27 28 29 30 31
32 33 34 35 36 37 38 39
40 41 42 43 44 45 46 47
48 49 50 51 52 53 54 55
56 57 58 59 60 61 62 63
64 65 66 67 68 69 70 71
72 73 74 75 76 77 78 79
80 81 82 83 84 85 86 87
88 89 90 91 92 93 94 95
96 97 98 99 100 101 102 103
104 105 106 107 108 109 110 111
112 113 114 115 116 117 118 119
120 121 122 123 124 125 126 127
128 129 130 131 132 133 134 135
136 137 138 139 140 141 142 143
144 145 146 147 148 149 150 151
152 153 154 155 156 157 158 159
160 161 162 163 164 165 166 167
168 169 170 171 172 173 174 175
176 177 178 179 180 181 182 183
184 185 186 187 188 189 190 191
192 193 194 195 196 197 198 199
200 201 202 203 204 205 206 207
208 209 210 211 212 213 214 215
216 217 218 219 220 221 222 223
224 225 226 227 228 229 230 231
232 233 234 235 236 237 238 239
240 241 242 243 244 245 246 247
248 249 250 251 252 253 254 255>;
default-brightness-level = <200>;
};
panel: panel {
compatible = "simple-panel";
bus-format = <MEDIA_BUS_FMT_RGB666_1X18>;
backlight = <&backlight>;
enable-gpios = <&gpio2 RK_PB3 GPIO_ACTIVE_LOW>;
enable-delay-ms = <20>;
reset-gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_LOW>;
reset-value = <0>;
reset-delay-ms = <10>;
status = "okay";
display-timings {
native-mode = <&fx070_dhm11boe_timing>;
fx070_dhm11boe_timing: timing0 {
clock-frequency = <50000000>;
hactive = <1024>;
vactive = <600>;
hback-porch = <140>;
hfront-porch = <160>;
vback-porch = <20>;
vfront-porch = <20>;
hsync-len = <20>;
vsync-len = <2>; //value range <2~22>
hsync-active = <0>;
vsync-active = <0>;
de-active = <0>;
pixelclk-active = <0>;
};
};
port {
panel_in_rgb: endpoint {
remote-endpoint = <&rgb_out_panel>;
};
};
};
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
cma {
compatible = "shared-dma-pool";
reusable;
size = <0x0 0x800000>;
linux,cma-default;
};
};
};
&display_subsystem {
status = "okay";
};
&pwm1 {
status = "okay";
};
&rgb {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&lcdc_ctl>;
ports {
rgb_out: port@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
rgb_out_panel: endpoint@0 {
reg = <0>;
remote-endpoint = <&panel_in_rgb>;
};
};
};
};
&route_rgb {
status = "okay";
};
&vop {
status = "okay";
};

View File

@@ -0,0 +1,59 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2023 Rockchip Electronics Co., Ltd
*/
#include <dt-bindings/input/input.h>
#include "rk3308-evb-v11.dtsi"
/ {
/delete-node/ wireless-wlan;
/delete-node/ wireless-bluetooth;
/delete-node/ gpio-keys;
wireless-wlan {
compatible = "wlan-platdata";
rockchip,grf = <&grf>;
pinctrl-names = "default";
pinctrl-0 = <&wifi_wake_host>, <&rtc_32k>;
wifi_chip_type = "ap6256";
WIFI,host_wake_irq = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
status = "okay";
};
wireless-bluetooth {
compatible = "bluetooth-platdata";
uart_rts_gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_LOW>;
pinctrl-names = "default", "rts_gpio";
pinctrl-0 = <&uart4_rts>;
pinctrl-1 = <&uart4_rts_pin>;
BT,power_gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
BT,wake_host_irq = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>;
status = "okay";
};
};
&acodec {
pinctrl-names = "default";
pinctrl-0 = <&hp_det>;
};
&emmc {
status = "okay";
};
&pinctrl {
acodec {
hp_det: hp-det {
rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_input_high>;
};
};
};
&sfc {
status = "okay";
};
&vccio_sd {
gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_HIGH>;
};

View File

@@ -990,6 +990,17 @@ config VIDEO_OS04A10
This is a Video4Linux2 sensor driver for the OmniVision
OS04A10 camera.
config VIDEO_OS04D10
tristate "OmniVision OS04D10 sensor support"
depends on I2C && VIDEO_DEV
depends on MEDIA_CAMERA_SUPPORT
select MEDIA_CONTROLLER
select VIDEO_V4L2_SUBDEV_API
select V4L2_FWNODE
help
This is a Video4Linux2 sensor driver for the OmniVision
OS04D10 camera.
config VIDEO_OS05A20
tristate "OmniVision OS05A20 sensor support"
depends on I2C && VIDEO_DEV
@@ -1113,6 +1124,17 @@ config VIDEO_OV13B10
This is a Video4Linux2 sensor driver for the OmniVision
OV13B10 camera.
config VIDEO_OV16885
tristate "OmniVision OV16885 sensor support"
depends on I2C && VIDEO_DEV
depends on MEDIA_CAMERA_SUPPORT
select MEDIA_CONTROLLER
select VIDEO_V4L2_SUBDEV_API
select V4L2_FWNODE
help
This is a Video4Linux2 sensor driver for the OmniVision
OV16885 camera.
config VIDEO_OV16A10
tristate "OmniVision OV16A10 sensor support"
depends on I2C && VIDEO_DEV
@@ -2034,6 +2056,18 @@ config VIDEO_DW9768
capability. This is designed for linear control of
voice coil motors, controlled via I2C serial interface.
config VIDEO_DW9800V
tristate "DW9800V lens voice coil support"
depends on I2C && VIDEO_DEV
select MEDIA_CONTROLLER
select VIDEO_V4L2_SUBDEV_API
select V4L2_FWNODE
help
This is a driver for the DW9800V camera lens voice coil.
DW9800W is a 10 bit DAC with ±130mA output current sink
capability. This is designed for linear control of bi-direction
voice coil motors, controlled via I2C serial interface.
config VIDEO_DW9800W
tristate "DW9800W lens voice coil support"
depends on I2C && VIDEO_DEV

View File

@@ -42,6 +42,7 @@ obj-$(CONFIG_VIDEO_DES_MAXIM4C) += maxim4c/
obj-$(CONFIG_VIDEO_DW9714) += dw9714.o
obj-$(CONFIG_VIDEO_DW9763) += dw9763.o
obj-$(CONFIG_VIDEO_DW9768) += dw9768.o
obj-$(CONFIG_VIDEO_DW9800V) += dw9800v.o
obj-$(CONFIG_VIDEO_DW9800W) += dw9800w.o
obj-$(CONFIG_VIDEO_DW9807_VCM) += dw9807-vcm.o
obj-$(CONFIG_VIDEO_EP9461E) += ep9461e.o
@@ -146,6 +147,7 @@ obj-$(CONFIG_VIDEO_OS02G10) += os02g10.o
obj-$(CONFIG_VIDEO_OS02K10) += os02k10.o
obj-$(CONFIG_VIDEO_OS03B10) += os03b10.o
obj-$(CONFIG_VIDEO_OS04A10) += os04a10.o
obj-$(CONFIG_VIDEO_OS04D10) += os04d10.o
obj-$(CONFIG_VIDEO_OS05A20) += os05a20.o
obj-$(CONFIG_VIDEO_OS08A20) += os08a20.o
obj-$(CONFIG_VIDEO_OTP_EEPROM) += otp_eeprom.o
@@ -158,6 +160,7 @@ obj-$(CONFIG_VIDEO_OV13850) += ov13850.o
obj-$(CONFIG_VIDEO_OV13855) += ov13855.o
obj-$(CONFIG_VIDEO_OV13858) += ov13858.o
obj-$(CONFIG_VIDEO_OV13B10) += ov13b10.o
obj-$(CONFIG_VIDEO_OV16885) += ov16885.o
obj-$(CONFIG_VIDEO_OV16A10) += ov16a10.o
obj-$(CONFIG_VIDEO_OV16A1Q) += ov16a1q.o
obj-$(CONFIG_VIDEO_OV2640) += ov2640.o

1068
drivers/media/i2c/dw9800v.c Normal file

File diff suppressed because it is too large Load Diff

1510
drivers/media/i2c/os04d10.c Normal file

File diff suppressed because it is too large Load Diff

2165
drivers/media/i2c/ov16885.c Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -121,7 +121,7 @@ static const char *MAX96745_UART_groups[] = { "MAX96745_UART" };
#define FUNCTION_DESC_GPIO_OUTPUT_A(id) \
{ \
.name = "DES_GPIO"#id"_OUTPUT_A", \
.name = "SER_TXID"#id"_TO_DES_LINKA", \
.group_names = serdes_gpio_groups, \
.num_group_names = ARRAY_SIZE(serdes_gpio_groups), \
.data = (void *)(const struct serdes_function_data []) { \
@@ -132,7 +132,7 @@ static const char *MAX96745_UART_groups[] = { "MAX96745_UART" };
#define FUNCTION_DESC_GPIO_OUTPUT_B(id) \
{ \
.name = "DES_GPIO"#id"_OUTPUT_B", \
.name = "SER_TXID"#id"_TO_DES_LINKB", \
.group_names = serdes_gpio_groups, \
.num_group_names = ARRAY_SIZE(serdes_gpio_groups), \
.data = (void *)(const struct serdes_function_data []) { \
@@ -143,7 +143,7 @@ static const char *MAX96745_UART_groups[] = { "MAX96745_UART" };
#define FUNCTION_DESC_GPIO_INPUT_A(id) \
{ \
.name = "DES_GPIO"#id"_INPUT_A", \
.name = "DES_RXID"#id"_TO_SER_LINKA", \
.group_names = serdes_gpio_groups, \
.num_group_names = ARRAY_SIZE(serdes_gpio_groups), \
.data = (void *)(const struct serdes_function_data []) { \
@@ -153,7 +153,7 @@ static const char *MAX96745_UART_groups[] = { "MAX96745_UART" };
#define FUNCTION_DESC_GPIO_INPUT_B(id) \
{ \
.name = "DES_GPIO"#id"_INPUT_B", \
.name = "DES_RXID"#id"_TO_SER_LINKB", \
.group_names = serdes_gpio_groups, \
.num_group_names = ARRAY_SIZE(serdes_gpio_groups), \
.data = (void *)(const struct serdes_function_data []) { \

View File

@@ -84,7 +84,7 @@ static const char *serdes_gpio_groups[] = {
#define FUNCTION_DESC_GPIO_INPUT_BYPASS(id) \
{ \
.name = "SER_TO_DES_GPIO"#id, \
.name = "SER_TO_DES_RXID"#id, \
.group_names = serdes_gpio_groups, \
.num_group_names = ARRAY_SIZE(serdes_gpio_groups), \
.data = (void *)(const struct serdes_function_data []) { \
@@ -94,7 +94,7 @@ static const char *serdes_gpio_groups[] = {
#define FUNCTION_DESC_GPIO_OUTPUT_BYPASS(id) \
{ \
.name = "DES_GPIO"#id"_TO_SER", \
.name = "DES_TXID"#id"_TO_SER", \
.group_names = serdes_gpio_groups, \
.num_group_names = ARRAY_SIZE(serdes_gpio_groups), \
.data = (void *)(const struct serdes_function_data []) { \
@@ -104,7 +104,7 @@ static const char *serdes_gpio_groups[] = {
#define FUNCTION_DESC_GPIO_OUTPUT_LOW(id) \
{ \
.name = "DES_GPIO"#id"_OUTPUT_LOW", \
.name = "DES_TXID"#id"_OUTPUT_LOW", \
.group_names = serdes_gpio_groups, \
.num_group_names = ARRAY_SIZE(serdes_gpio_groups), \
.data = (void *)(const struct serdes_function_data []) { \
@@ -115,7 +115,7 @@ static const char *serdes_gpio_groups[] = {
#define FUNCTION_DESC_GPIO_OUTPUT_HIGH(id) \
{ \
.name = "DES_GPIO"#id"_OUTPUT_HIGH", \
.name = "DES_TXID"#id"_OUTPUT_HIGH", \
.group_names = serdes_gpio_groups, \
.num_group_names = ARRAY_SIZE(serdes_gpio_groups), \
.data = (void *)(const struct serdes_function_data []) { \

View File

@@ -202,7 +202,7 @@ static const char *MAX96755_UART_groups[] = { "MAX96755_UART" };
#define FUNCTION_DESC_GPIO_INPUT(id) \
{ \
.name = "DES_GPIO"#id"_TO_SER", \
.name = "DES_RXID"#id"_TO_SER", \
.group_names = serdes_gpio_groups, \
.num_group_names = ARRAY_SIZE(serdes_gpio_groups), \
.data = (void *)(const struct serdes_function_data []) { \
@@ -212,7 +212,7 @@ static const char *MAX96755_UART_groups[] = { "MAX96755_UART" };
#define FUNCTION_DESC_GPIO_OUTPUT(id) \
{ \
.name = "SER_TO_DES_GPIO"#id, \
.name = "SER_TO_DES_TXID"#id, \
.group_names = serdes_gpio_groups, \
.num_group_names = ARRAY_SIZE(serdes_gpio_groups), \
.data = (void *)(const struct serdes_function_data []) { \

View File

@@ -89,7 +89,7 @@ static const char *serdes_gpio_groups[] = {
#define FUNCTION_DESC_GPIO_INPUT_BYPASS(id) \
{ \
.name = "SER_TO_DES_GPIO"#id, \
.name = "SER_TO_DES_RXID"#id, \
.group_names = serdes_gpio_groups, \
.num_group_names = ARRAY_SIZE(serdes_gpio_groups), \
.data = (void *)(const struct serdes_function_data []) { \
@@ -99,7 +99,7 @@ static const char *serdes_gpio_groups[] = {
#define FUNCTION_DESC_GPIO_OUTPUT_BYPASS(id) \
{ \
.name = "DES_GPIO"#id"_TO_SER", \
.name = "DES_TXID"#id"_TO_SER", \
.group_names = serdes_gpio_groups, \
.num_group_names = ARRAY_SIZE(serdes_gpio_groups), \
.data = (void *)(const struct serdes_function_data []) { \
@@ -109,7 +109,7 @@ static const char *serdes_gpio_groups[] = {
#define FUNCTION_DESC_GPIO_OUTPUT_LOW(id) \
{ \
.name = "DES_GPIO"#id"_OUTPUT_LOW", \
.name = "DES_TXID"#id"_OUTPUT_LOW", \
.group_names = serdes_gpio_groups, \
.num_group_names = ARRAY_SIZE(serdes_gpio_groups), \
.data = (void *)(const struct serdes_function_data []) { \
@@ -120,7 +120,7 @@ static const char *serdes_gpio_groups[] = {
#define FUNCTION_DESC_GPIO_OUTPUT_HIGH(id) \
{ \
.name = "DES_GPIO"#id"_OUTPUT_HIGH", \
.name = "DES_TXID"#id"_OUTPUT_HIGH", \
.group_names = serdes_gpio_groups, \
.num_group_names = ARRAY_SIZE(serdes_gpio_groups), \
.data = (void *)(const struct serdes_function_data []) { \

View File

@@ -201,7 +201,7 @@ static const char *MAX96789_UART_groups[] = { "MAX96789_UART" };
#define FUNCTION_DESC_GPIO_INPUT(id) \
{ \
.name = "DES_GPIO"#id"_TO_SER", \
.name = "DES_RXID"#id"_TO_SER", \
.group_names = serdes_gpio_groups, \
.num_group_names = ARRAY_SIZE(serdes_gpio_groups), \
.data = (void *)(const struct serdes_function_data []) { \
@@ -211,7 +211,7 @@ static const char *MAX96789_UART_groups[] = { "MAX96789_UART" };
#define FUNCTION_DESC_GPIO_OUTPUT(id) \
{ \
.name = "SER_TO_DES_GPIO"#id, \
.name = "SER_TXID"#id"_TO_DES", \
.group_names = serdes_gpio_groups, \
.num_group_names = ARRAY_SIZE(serdes_gpio_groups), \
.data = (void *)(const struct serdes_function_data []) { \

View File

@@ -759,7 +759,7 @@ static int rk806_regulator_is_enabled_regmap(struct regulator_dev *rdev)
struct rk806 *rk806 = pdata->rk806;
int rid = rdev_get_id(rdev);
int gpio_level, pid;
unsigned int val;
int ret, val;
int mode;
mode = get_dvs_mode(rdev);
@@ -770,7 +770,12 @@ static int rk806_regulator_is_enabled_regmap(struct regulator_dev *rdev)
return rk806_field_read(rk806, pdata->dvs_field[rid].sleep_en);
}
val = rk806_field_read(rk806, pdata->dvs_field[rid].en_reg);
ret = rk806_field_read(rk806, pdata->dvs_field[rid].en_reg);
if (ret < 0)
return ret;
val = ret;
return (val & rdev->desc->enable_val) != 0;
}