diff --git a/arch/riscv/boot/dts/thead/th1520-huiwei-product.dts b/arch/riscv/boot/dts/thead/th1520-huiwei-product.dts index e48396d1a..4975b90b0 100644 --- a/arch/riscv/boot/dts/thead/th1520-huiwei-product.dts +++ b/arch/riscv/boot/dts/thead/th1520-huiwei-product.dts @@ -19,17 +19,7 @@ sound-dai = <&es8388_audio_codec>; }; }; - simple-audio-card,dai-link@1 { /* I2S - AUDIO SYS CODEC 7210*/ - reg = <1>; - format = "i2s"; - cpu { - sound-dai = <&i2s1 0>; - }; - codec { - sound-dai = <&es7210_audio_codec>; - }; - }; - simple-audio-card,dai-link@2 { /* I2S - AUDIO SYS CODEC HDMI*/ + simple-audio-card,dai-link@1 { /* I2S - AUDIO SYS CODEC HDMI*/ reg = <2>; format = "i2s"; cpu { diff --git a/arch/riscv/boot/dts/thead/th1520-huiwei.dtsi b/arch/riscv/boot/dts/thead/th1520-huiwei.dtsi index 8ddc28b6a..11486ed7e 100644 --- a/arch/riscv/boot/dts/thead/th1520-huiwei.dtsi +++ b/arch/riscv/boot/dts/thead/th1520-huiwei.dtsi @@ -287,25 +287,6 @@ status = "okay"; }; - reg_tp_pwr_en: regulator-pwr-en { - compatible = "regulator-fixed"; - regulator-name = "regulator-pwr-en"; - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - gpio = <&pcal6408ahk_d 4 1>; - enable-active-high; - regulator-always-on; - }; - - reg_usb_hub_vdd1v2: regulator-hub-vdd12-en { - compatible = "regulator-fixed"; - regulator-name = "regulator-hub-vdd12-en"; - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - gpio = <&pcal6408ahk_d 2 1>; - enable-active-high; - }; - reg_usb_hub_vcc5v: regulator-hub-vcc5v-en { compatible = "regulator-fixed"; regulator-name = "regulator-hub-vcc5v-en"; @@ -472,24 +453,6 @@ regulator-always-on; }; - soc_vdd33_lcd0_en_reg: soc_lcd0_vdd33_en { - compatible = "regulator-fixed"; - regulator-name = "soc_lcd0_vdd33_en"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - gpio = <&pcal6408ahk_d 5 1>; - enable-active-high; - }; - - soc_vdd18_lcd0_en_reg: soc_lcd0_vdd18_en { - compatible = "regulator-fixed"; - regulator-name = "soc_lcd0_vdd18_en"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - gpio = <&pcal6408ahk_d 6 1>; - enable-active-high; - }; - soc_vdd5v_se_en_reg: soc_vdd5v_se_en { compatible = "regulator-fixed"; regulator-name = "soc_vdd5v_se_en"; @@ -520,88 +483,6 @@ }; - - soc_avdd28_rgb_reg: soc_avdd28_rgb { - compatible = "regulator-fixed"; - regulator-name = "soc_avdd28_rgb"; - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - gpio = <&pcal6408ahk_b 1 1>; - enable-active-high; - }; - - soc_dovdd18_rgb_reg: soc_dovdd18_rgb { - compatible = "regulator-fixed"; - regulator-name = "soc_dovdd18_rgb"; - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - gpio = <&pcal6408ahk_b 2 1>; - enable-active-high; - }; - - soc_dvdd12_rgb_reg: soc_dvdd12_rgb { - compatible = "regulator-fixed"; - regulator-name = "soc_dvdd12_rgb"; - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - gpio = <&pcal6408ahk_b 0 1>; - enable-active-high; - }; - - soc_avdd25_ir_reg: soc_avdd25_ir { - compatible = "regulator-fixed"; - regulator-name = "soc_avdd25_ir"; - regulator-min-microvolt = <2500000>; - regulator-max-microvolt = <2500000>; - gpio = <&pcal6408ahk_b 5 1>; - enable-active-high; - }; - - soc_dovdd18_ir_reg: soc_dovdd18_ir { - compatible = "regulator-fixed"; - regulator-name = "soc_dovdd18_ir"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - gpio = <&pcal6408ahk_b 3 1>; - enable-active-high; - }; - - soc_dvdd12_ir_reg: soc_dvdd12_ir { - compatible = "regulator-fixed"; - regulator-name = "soc_dvdd12_ir"; - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - gpio = <&pcal6408ahk_b 4 1>; - enable-active-high; - }; - - soc_cam2_avdd25_ir_reg: soc_cam2_avdd25_ir { - compatible = "regulator-fixed"; - regulator-name = "soc_cam2_avdd25_ir"; - regulator-min-microvolt = <2500000>; - regulator-max-microvolt = <2500000>; - gpio = <&pcal6408ahk_b 7 1>; - enable-active-high; - }; - - soc_cam2_dovdd18_ir_reg: soc_cam2_dovdd18_ir { - compatible = "regulator-fixed"; - regulator-name = "soc_cam2_dovdd18_ir"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - gpio = <&pcal6408ahk_b 6 1>; - enable-active-high; - }; - - soc_cam2_dvdd12_ir_reg: soc_cam2_dvdd12_ir { - compatible = "regulator-fixed"; - regulator-name = "soc_cam2_dvdd12_ir"; - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - gpio = <&pcal6408ahk_c 0 1>; - enable-active-high; - }; - dvdd_cpu_reg: appcpu_dvdd { compatible = "thead,light-dialog-pmic"; regulator-name = "appcpu_dvdd"; @@ -897,7 +778,7 @@ es8388_audio_codec: es8388@11 { #sound-dai-cells = <0>; - compatible = "everest,es8388", "everest,es8323"; + compatible = "everest,es8323"; reg = <0x11>; sound-name-prefix = "ES8388"; headset-detect = <&rk_headset>; @@ -910,17 +791,6 @@ pinctrl-0 = <&pinctrl_audiopa3 &pinctrl_audiopa2>; }; - es7210_audio_codec: es7210@40 { - #sound-dai-cells = <0>; - compatible = "MicArray_0"; - reg = <0x40>; - sound-name-prefix = "ES7210"; - MVDD-supply = <&soc_aud_3v3_en_reg>; - AVDD-supply = <&soc_aud_3v3_en_reg>; - DVDD-supply = <&soc_aud_1v8_en_reg>; - PVDD-supply = <&soc_aud_1v8_en_reg>; - }; - audio_aw87519_pa: amp@58 { compatible = "awinic,aw87519_pa"; reg = <0x58>; @@ -950,13 +820,6 @@ status = "disabled"; }; - es7210_audio_codec_1: es7210@40 { - #sound-dai-cells = <0>; - compatible = "MicArray_0"; - reg = <0x40>; - status = "disabled"; - }; - audio_aw87519_pa2@58 { compatible = "awinic,aw87519_pa"; reg = <0x58>; @@ -1060,24 +923,6 @@ }; }; -&qspi1 { - compatible = "snps,dw-apb-ssi"; - num-cs = <1>; - cs-gpios = <&gpio0_porta 1 0>; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_qspi1>; - status = "okay"; - - spidev@0 { - compatible = "spidev"; - #address-cells = <0x1>; - #size-cells = <0x1>; - reg = <0x0>; - spi-max-frequency = <50000000>; - }; - -}; - &gmac0 { phy-mode = "rgmii-id"; rx-clk-delay = <0x00>; /* for RGMII */ @@ -1568,13 +1413,6 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c0>; - pcal6408ahk_b: gpio@18 { - compatible = "nxp,pca9557"; - reg = <0x18>; - gpio-controller; - #gpio-cells = <2>; - }; - usbc0: husb311_0@4e { compatible = "hynetek,husb311"; reg = <0x4e>; @@ -1664,13 +1502,6 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c1>; - pcal6408ahk_c: gpio@18 { - compatible = "nxp,pca9557"; - reg = <0x18>; - gpio-controller; - #gpio-cells = <2>; - }; - hc32fx_mcu:hc32fx_mcu@0x4c { compatible = "hc32fx-mcu"; reg = <0x4c>; @@ -1736,13 +1567,6 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c3>; - pcal6408ahk_d: gpio@18 { - compatible = "nxp,pca9557"; - reg = <0x18>; - gpio-controller; - #gpio-cells = <2>; - }; - touch@14 { #gpio-cells = <2>; compatible = "goodix,gt9271"; @@ -1839,74 +1663,6 @@ memory-region = <&dsp1_mem>; }; -&vvcam_sensor0 { - sensor_name = "OV12870"; - sensor_regulators = "soc_dovdd18_rgb", "soc_dvdd12_rgb", "soc_avdd28_rgb"; - sensor_regulator_timing_us = <70 50 20>; - sensor_pdn = <&gpio1_porta 28 0>; //powerdown pin / shutdown pin - sensor_rst = <&pcal6408ahk_c 1 0>; - sensor_pdn_delay_us = <4000>; //powerdown pin / shutdown pin actived till I2C ready - DOVDD18_RGB-supply = <&soc_dovdd18_rgb_reg>; - DVDD12_RGB-supply = <&soc_dvdd12_rgb_reg>; - AVDD28_RGB-supply = <&soc_avdd28_rgb_reg>; - i2c_reg_width = /bits/ 8 <2>; - i2c_data_width = /bits/ 8 <1>; - i2c_addr = /bits/ 8 <0x10>; - i2c_bus = /bits/ 8 <0>; - status = "okay"; -}; - -&vvcam_sensor1 {//cam1 csia - sensor_name = "SC132GS"; - sensor_regulators = "soc_dovdd18_ir", "soc_dvdd12_ir", "soc_avdd25_ir"; - sensor_regulator_timing_us = <70 1000 2000>; - i2c_addr = /bits/ 8 <0x30>; - sensor_pdn = <&gpio1_porta 30 0>; //powerdown pin / shutdown pin - sensor_rst = <&pcal6408ahk_c 2 0>; - sensor_pdn_delay_us = <2000>; //powerdown pin / shutdown pin actived till I2C ready - DOVDD18_IR-supply = <&soc_dovdd18_ir_reg>; - DVDD12_IR-supply = <&soc_dvdd12_ir_reg>; - AVDD25_IR-supply = <&soc_avdd25_ir_reg>; - i2c_reg_width = /bits/ 8 <2>; - i2c_data_width = /bits/ 8 <1>; - i2c_bus = /bits/ 8 <1>; - status = "okay"; -}; - -&vvcam_sensor2 {//cam2 csib - sensor_name = "SC132GS"; - sensor_regulators = "soc_cam2_dovdd18_ir", "soc_cam2_dvdd12_ir", "soc_cam2_avdd25_ir"; - sensor_regulator_timing_us = <70 1000 2000>; - i2c_addr = /bits/ 8 <0x30>; - sensor_pdn = <&gpio2_porta 13 0>; //powerdown pin / shutdown pin - sensor_rst = <&pcal6408ahk_c 3 0>; - sensor_pdn_delay_us = <2000>; //powerdown pin / shutdown pin actived till I2C ready - DOVDD18_IR-supply = <&soc_cam2_dovdd18_ir_reg>; - DVDD12_IR-supply = <&soc_cam2_dvdd12_ir_reg>; - AVDD25_IR-supply = <&soc_cam2_avdd25_ir_reg>; - i2c_reg_width = /bits/ 8 <2>; - i2c_data_width = /bits/ 8 <1>; - i2c_bus = /bits/ 8 <2>; - status = "okay"; -}; - -&vvcam_sensor3 {//cam3 csi0 modified - sensor_name = "OV5693"; - sensor_regulators = "soc_dovdd18_rgb", "soc_dvdd12_rgb", "soc_avdd28_rgb"; - sensor_regulator_timing_us = <70 50 20>; - sensor_pdn = <&gpio1_porta 28 0>; //powerdown pin / shutdown pin - sensor_rst = <&pcal6408ahk_c 1 0>; - sensor_pdn_delay_us = <4000>; //powerdown pin / shutdown pin actived till I2C ready - DOVDD18_RGB-supply = <&soc_dovdd18_rgb_reg>; - DVDD12_RGB-supply = <&soc_dvdd12_rgb_reg>; - AVDD28_RGB-supply = <&soc_avdd28_rgb_reg>; - i2c_reg_width = /bits/ 8 <2>; - i2c_data_width = /bits/ 8 <1>; - i2c_addr = /bits/ 8 <0x36>; - i2c_bus = /bits/ 8 <0>; - status = "okay"; -}; - &video2 { vi_mem_pool_region = <0>; // vi_mem: framebuffer, region[0] status = "okay"; @@ -2220,17 +1976,7 @@ sound-dai = <&es8388_audio_codec>; }; }; - simple-audio-card,dai-link@1 { /* I2S - AUDIO SYS CODEC 7210*/ - reg = <1>; - format = "i2s"; - cpu { - sound-dai = <&i2s1 0>; - }; - codec { - sound-dai = <&es7210_audio_codec>; - }; - }; - simple-audio-card,dai-link@2 { /* I2S - HDMI*/ + simple-audio-card,dai-link@1 { /* I2S - HDMI*/ reg = <2>; format = "i2s"; cpu { diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/dts/thead/th1520.dtsi index d425e0457..97894a0bb 100644 --- a/arch/riscv/boot/dts/thead/th1520.dtsi +++ b/arch/riscv/boot/dts/thead/th1520.dtsi @@ -1767,8 +1767,8 @@ light,sel = "ap_i2s"; interrupt-parent = <&intc>; interrupts = <70>; - dmas = <&dmac0 35>, <&dmac0 40>; - dma-names = "tx", "rx"; + dmas = <&dmac0 35>; + dma-names = "tx"; light,dma_maxburst = <4>; #dma-cells = <1>; clocks = <&vosys_clk_gate LIGHT_CLKGEN_HDMI_I2S_CLK>; @@ -2162,7 +2162,7 @@ clocks = <&clk CLKGEN_I2C1_PCLK>; clock-names = "pclk"; clock-frequency = <100000>; - i2c_mode = "dma"; + // i2c_mode = "dma"; dmas = <&dmac0 14>, <&dmac0 15>; dma-names = "tx", "rx"; #dma-cells = <1>; @@ -2238,7 +2238,7 @@ clocks = <&clk CLKGEN_I2C4_PCLK>; clock-names = "pclk"; clock-frequency = <100000>; - i2c_mode = "dma"; + // i2c_mode = "dma"; dmas = <&dmac0 20>, <&dmac0 21>; dma-names = "tx", "rx"; #dma-cells = <1>; diff --git a/drivers/gpu/drm/panel/panel-lt8911.c b/drivers/gpu/drm/panel/panel-lt8911.c index 8652671d8..84a9a1029 100644 --- a/drivers/gpu/drm/panel/panel-lt8911.c +++ b/drivers/gpu/drm/panel/panel-lt8911.c @@ -10,7 +10,7 @@ #define LT_8911_I2C_ADAPTER 3 #define LT_8911_I2C_ADDR 0x45 -static struct i2c_mipi_dsi *g_lt8911_mipi_dsi = NULL; +static struct i2c_mipi_dsi g_lt8911_mipi_dsi; static bool g_is_std_suspend __nosavedata; static const struct drm_display_mode lt8911_default_mode = { @@ -707,7 +707,7 @@ static int backlight_init(struct i2c_mipi_dsi *md) static int i2c_md_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct device *dev = &client->dev; - struct i2c_mipi_dsi *md = g_lt8911_mipi_dsi; + struct i2c_mipi_dsi *md = &g_lt8911_mipi_dsi; DBG_FUNC("start"); @@ -872,13 +872,10 @@ static int lt8911_dsi_probe(struct mipi_dsi_device *dsi) int ret; struct i2c_mipi_dsi *ctx; - ctx = g_lt8911_mipi_dsi; + ctx = &g_lt8911_mipi_dsi; if(ctx == NULL){ - ctx = devm_kzalloc(&dsi->dev, sizeof(*ctx), GFP_KERNEL); - if (!ctx) - return -ENOMEM; - g_lt8911_mipi_dsi = ctx; + return -ENOMEM; } if(ctx->client == NULL){ diff --git a/drivers/gpu/drm/panel/panel-lt8911.h b/drivers/gpu/drm/panel/panel-lt8911.h index 7143dfa55..8cceaffa7 100644 --- a/drivers/gpu/drm/panel/panel-lt8911.h +++ b/drivers/gpu/drm/panel/panel-lt8911.h @@ -28,7 +28,7 @@ #include