求教,关于LicheeRV 86 Panel在tina2.0配置lcd的问题
-
设备树修改如下:
project device/config/chips/d1-h/ diff --git a/configs/nezha/linux-5.4/board.dts b/configs/nezha/linux-5.4/board.dts index 963aa17..fb8d344 100755 --- a/configs/nezha/linux-5.4/board.dts +++ b/configs/nezha/linux-5.4/board.dts @@ -6,7 +6,6 @@ /dts-v1/; -/memreserve/ 0x42000000 0x100000; /* dsp used 1MB */ #include "sun20iw1p1.dtsi" /{ @@ -15,7 +14,6 @@ aliases { dsp0 = &dsp0; dsp0_gpio_int= &dsp0_gpio_int; - gmac0 = &gmac0; }; dsp0: dsp0 { @@ -31,7 +29,7 @@ reg_vdd_cpu: vdd-cpu { compatible = "sunxi-pwm-regulator"; - pwms = <&pwm 0 5000 1>; + pwms = <&pwm 0 5000 0>; regulator-name = "vdd_cpu"; regulator-min-microvolt = <810000>; regulator-max-microvolt = <1160000>; @@ -47,7 +45,15 @@ regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; regulator-enable-ramp-delay = <1000>; - gpio = <&pio PD 19 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + reg_3v3: vdd_3v3 { + compatible = "regulator-fixed"; + regulator-name = "vdd_3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-enable-ramp-delay = <1000>; enable-active-high; }; }; @@ -234,62 +240,42 @@ gmac_pins_a: gmac@0 { pins = "PE0", "PE1", "PE2", "PE3", - "PE4", "PE5", "PE6", "PE7", - "PE8", "PE9", "PE10", "PE11", - "PE12", "PE13", "PE14", "PE15"; + "PE4", "PE5", "PE6", "PE7", + "PE8", "PE9"; function = "gmac0"; - muxsel = <8>; /* for uboot driver */ drive-strength = <10>; }; gmac_pins_b: gmac@1 { pins = "PE0", "PE1", "PE2", "PE3", - "PE4", "PE5", "PE6", "PE7", - "PE8", "PE9", "PE10", "PE11", - "PE12", "PE13", "PE14", "PE15"; + "PE4", "PE5", "PE6", "PE7", + "PE8", "PE9"; function = "gpio_in"; }; dmic_pins_a: dmic@0 { /* DMIC_PIN: CLK, DATA0, DATA1, DATA2 */ - pins = "PE17", "PB11", "PB10", "PD17"; + pins = "PE17", "PB11"; function = "dmic"; drive-strength = <20>; bias-disable; }; dmic_pins_b: dmic@1 { - pins = "PE17", "PB11", "PB10", "PD17"; + pins = "PE17", "PB11"; function = "io_disabled"; drive-strength = <20>; bias-disable; }; daudio0_pins_a: daudio0@0 { - /* MCLK, BCLK, LRCK */ - pins = "PE17", "PE16", "PE15"; + pins = "PE17", "PE16", "PE15", "PE14", "PE13"; function = "i2s0"; drive-strength = <20>; bias-disable; }; - daudio0_pins_b: daudio0@1 { - /* DIN0 */ - pins = "PE14"; - function = "i2s0_din"; - drive-strength = <20>; - bias-disable; - }; - - daudio0_pins_c: daudio0@2 { - /* DOUT0 */ - pins = "PE13"; - function = "i2s0_dout"; - drive-strength = <20>; - bias-disable; - }; - - daudio0_pins_d: daudio0_sleep@0 { + daudio0_pins_b: daudio0_sleep@0 { pins = "PE17", "PE16", "PE15", "PE14", "PE13"; function = "io_disabled"; drive-strength = <20>; @@ -297,30 +283,13 @@ }; daudio1_pins_a: daudio1@0 { - /* MCLK, LRCK, BCLK */ - pins = "PG11", "PG12", "PG13"; + pins = "PG11", "PG12", "PG13", "PG14", "PG15"; function = "i2s1"; drive-strength = <20>; bias-disable; }; - daudio1_pins_b: daudio1@1 { - /* DIN0 */ - pins = "PG14"; - function = "i2s1_din"; - drive-strength = <20>; - bias-disable; - }; - - daudio1_pins_c: daudio1@2 { - /* DOUT0 */ - pins = "PG15"; - function = "i2s1_dout"; - drive-strength = <20>; - bias-disable; - }; - - daudio1_pins_d: daudio1_sleep@0 { + daudio1_pins_b: daudio1_sleep@0 { pins = "PG11", "PG12", "PG13", "PG14", "PG15"; function = "io_disabled"; drive-strength = <20>; @@ -374,7 +343,7 @@ }; spi0_pins_a: spi0@0 { - pins = "PC2", "PC4", "PC5"; /* clk, mosi, miso */ + pins = "PC2", "PC4", "PC5","PC7", "PC6"; /*clk mosi miso hold wp*/ function = "spi0"; muxsel = <2>; drive-strength = <10>; @@ -385,7 +354,7 @@ function = "spi0"; muxsel = <2>; drive-strength = <10>; - bias-pull-up; /* cs, hold, wp should be pulled up */ + bias-pull-up; /* only CS should be pulled up */ }; spi0_pins_c: spi0@2 { @@ -396,16 +365,16 @@ }; spi1_pins_a: spi1@0 { - pins = "PD11", "PD12", "PD13"; /* clk, mosi, miso */ + pins = "PD11", "PD12", "PD13","PD14", "PD15"; /*clk mosi miso hold wp*/ function = "spi1"; drive-strength = <10>; }; spi1_pins_b: spi1@1 { - pins = "PD10", "PD14", "PD15"; + pins = "PD10"; function = "spi1"; drive-strength = <10>; - bias-pull-up; /* cs, hold, wp should be pulled up */ + bias-pull-up; // only CS should be pulled up }; spi1_pins_c: spi1@2 { @@ -447,9 +416,9 @@ pwm2_pin_b: pwm2@1 { pins = "PD18"; - function = "gpio_out"; + function = "gpio_in"; }; -/* + pwm7_pin_a: pwm7@0 { pins = "PD22"; function = "pwm7"; @@ -461,7 +430,6 @@ pins = "PD22"; function = "gpio_in"; }; -*/ s_cir0_pins_a: s_cir@0 { pins = "PB12"; @@ -486,6 +454,45 @@ pins = "PB0"; function = "gpio_in"; }; + + rgb18_20_pins_a: rgb18_20@0 { + pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", \ + "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", \ + "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", \ + "PD18", "PD19", "PD20", "PD21"; + function = "lcd0"; + drive-strength = <20>; + bias-disable; + }; + + rgb18_20_pins_b: rgb18_20@1 { + pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", \ + "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", \ + "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", \ + "PD18", "PD19", "PD20", "PD21"; + function = "io_disabled"; + bias-disable; + }; + + rgb18_10_pins_a: rgb18_10@0 { + pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", \ + "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", \ + "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", \ + "PD18", "PD19", "PD20", "PD21"; + function = "lcd0"; + drive-strength = <10>; + bias-disable; + }; + + rgb18_10_pins_b: rgb18_10@1 { + pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", \ + "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", \ + "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", \ + "PD18", "PD19", "PD20", "PD21"; + function = "io_disabled"; + bias-disable; + }; + }; &uart0 { @@ -510,11 +517,11 @@ }; &uart3 { - compatible = "allwinner,sun20iw1-dsp-uart"; + /*compatible = "allwinner,sun20iw1-dsp-uart";*/ pinctrl-names = "default", "sleep"; pinctrl-0 = <&uart3_pins_a>; pinctrl-1 = <&uart3_pins_a>; - status = "okay"; + status = "disabled"; }; &soc { @@ -557,12 +564,12 @@ compatible = "allwinner,sunxi-rfkill"; chip_en; power_en; - pinctrl-0 = <&wlan_pins_a>; - pinctrl-names = "default"; status = "okay"; wlan: wlan@0 { compatible = "allwinner,sunxi-wlan"; + pinctrl-0 = <&wlan_pins_a>; + pinctrl-names = "default"; clock-names = "32k-fanout1"; clocks = <&ccu CLK_FANOUT1_OUT>; wlan_busnum = <0x1>; @@ -578,6 +585,8 @@ bt: bt@0 { compatible = "allwinner,sunxi-bt"; + pinctrl-0 = <&wlan_pins_a>; + pinctrl-names = "default"; clock-names = "32k-fanout1"; clocks = <&ccu CLK_FANOUT1_OUT>; /*bt_power_num = <0x01>;*/ @@ -590,13 +599,13 @@ }; }; - btlpm: btlpm@0 { + /*btlpm: btlpm@0 { compatible = "allwinner,sunxi-btlpm"; uart_index = <0x1>; bt_wake = <&pio PG 16 GPIO_ACTIVE_HIGH>; bt_hostwake = <&pio PG 17 GPIO_ACTIVE_HIGH>; status = "okay"; - }; + };*/ addr_mgt: addr_mgt@0 { compatible = "allwinner,sunxi-addr_mgt"; @@ -826,8 +835,8 @@ tvd_row*tvd_column is the total tvd channel number to be used in multichannel mo pcm_lrck_period = <0x80>; slot_width_select = <0x20>; pinctrl-names = "default", "sleep"; - pinctrl-0 = <&daudio0_pins_a &daudio0_pins_b &daudio0_pins_c>; - pinctrl-1 = <&daudio0_pins_d>; + pinctrl-0 = <&daudio0_pins_a>; + pinctrl-1 = <&daudio0_pins_b>; pinctrl_used = <0x0>; status = "disabled"; }; @@ -861,8 +870,8 @@ tvd_row*tvd_column is the total tvd channel number to be used in multichannel mo pcm_lrck_period = <0x80>; slot_width_select = <0x20>; pinctrl-names = "default", "sleep"; - pinctrl-0 = <&daudio1_pins_a &daudio1_pins_b &daudio1_pins_c>; - pinctrl-1 = <&daudio1_pins_d>; + pinctrl-0 = <&daudio1_pins_a>; + pinctrl-1 = <&daudio1_pins_b>; pinctrl_used = <0x0>; status = "disabled"; }; @@ -930,12 +939,10 @@ tvd_row*tvd_column is the total tvd channel number to be used in multichannel mo */ &usbc0 { device_type = "usbc0"; - usb_port_type = <0x2>; + usb_port_type = <0x0>; usb_detect_type = <0x1>; usb_detect_mode = <0>; - usb_id_gpio = <&pio PD 21 GPIO_ACTIVE_HIGH>; enable-active-high; - usb_det_vbus_gpio = <&pio PD 20 GPIO_ACTIVE_HIGH>; usb_wakeup_suspend = <0>; usb_serial_unique = <0>; usb_serial_number = "20080411"; @@ -997,43 +1004,20 @@ tvd_row*tvd_column is the total tvd channel number to be used in multichannel mo dma-names = "tx", "rx"; status = "okay"; - /* pcf8574-usage: - * only use gpio0~7, 0 means PP0. - * pin set: - * gpios = <&pcf8574 0 GPIO_ACTIVE_LOW>; - * interrupt set: - * interrupt-parent = <&pcf8574>; - * interrupts = <0 IRQ_TYPE_EDGE_FALLING>; - */ - pcf8574: gpio@38 { - compatible = "nxp,pcf8574"; - reg = <0x38>; - gpio_base = <2020>; - gpio-controller; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - interrupt-parent = <&pio>; - interrupts = <PB 2 IRQ_TYPE_EDGE_FALLING>; + focaltech@48{ + compatible = "focaltech,fts"; status = "okay"; + reg = <0x48>; + interrupt-parent = <&pio>; + interrupts = <PG 14 IRQ_TYPE_LEVEL_LOW>; + focaltech,reset-gpio = <&pio PG 15 GPIO_ACTIVE_HIGH>; + focaltech,irq-gpio = <&pio PG 14 IRQ_TYPE_LEVEL_LOW>; + focaltech,max-touch-number = <2>; + focaltech,display-coords = <0 0 480 480>; + focaltech,reg_vdd = <®_3v3>; + focaltech,reg_avdd = <®_3v3>; }; - ctp@14 { - compatible = "allwinner,goodix"; - device_type = "ctp"; - reg = <0x14>; - status = "disabled"; - ctp_name = "gt9xxnew_ts"; - ctp_twi_id = <0x2>; - ctp_twi_addr = <0x14>; - ctp_screen_max_x = <0x320>; - ctp_screen_max_y = <0x500>; - ctp_revert_x_flag = <0x0>; - ctp_revert_y_flag = <0x1>; - ctp_exchange_x_y_flag = <0x0>; - ctp_int_port = <&pio PG 14 GPIO_ACTIVE_HIGH>; - ctp_wakeup = <&pio PG 15 GPIO_ACTIVE_HIGH>; - }; }; &twi3 { @@ -1045,14 +1029,12 @@ tvd_row*tvd_column is the total tvd channel number to be used in multichannel mo }; &gmac0 { - phy-mode = "rgmii"; + phy-mode = "rmii"; use_ephy25m = <1>; pinctrl-0 = <&gmac_pins_a>; pinctrl-1 = <&gmac_pins_b>; pinctrl-names = "default", "sleep"; phy-rst = <&pio PE 16 GPIO_ACTIVE_HIGH>; - tx-delay = <3>; /*2~4*/ - rx-delay = <0>; status = "okay"; }; @@ -1064,7 +1046,7 @@ tvd_row*tvd_column is the total tvd channel number to be used in multichannel mo /*spi-supply = <®_dcdc1>;*/ spi_slave_mode = <0>; spi0_cs_number = <1>; - spi0_cs_bitmap = <1>; + spi0_cs_bitmap = <1>; status = "disabled"; spi-nand@0 { @@ -1083,21 +1065,9 @@ tvd_row*tvd_column is the total tvd channel number to be used in multichannel mo pinctrl-1 = <&spi1_pins_c>; pinctrl-names = "default", "sleep"; spi_slave_mode = <0>; - spi1_cs_number = <1>; - spi1_cs_bitmap = <1>; - spi_dbi_enable = <1>; status = "disabled"; spi_board1@0 { - device_type = "spi-dbi"; - compatible = "sunxi,spidbi"; - spi-max-frequency = <0x5f5e100>; - reg = <0x0>; - spi-rx-bus-width = <0x4>; - spi-tx-bus-width = <0x4>; - status = "okay"; - }; - /* spi_board1@0 { device_type = "spi_board1"; compatible = "rohm,dh2228fv"; spi-max-frequency = <0x5f5e100>; @@ -1105,7 +1075,7 @@ tvd_row*tvd_column is the total tvd channel number to be used in multichannel mo spi-rx-bus-width = <0x4>; spi-tx-bus-width = <0x4>; status = "disabled"; - }; */ + }; }; &ledc { @@ -1279,57 +1249,50 @@ pull up or pull down(default 0), driver level(default 1), data> ;For lvds0: use lvds0_pins_a and lvds0_pins_b instead ;----------------------------------------------------------------------------------*/ &lcd0 { - lcd_used = <1>; - - lcd_driver_name = "tft08006"; - lcd_backlight = <100>; - lcd_if = <4>; - - lcd_x = <800>; - lcd_y = <1280>; - lcd_width = <52>; - lcd_height = <52>; - lcd_dclk_freq = <70>; - - lcd_pwm_used = <1>; - lcd_pwm_ch = <2>; - lcd_pwm_freq = <1000>; - lcd_pwm_pol = <0>; - lcd_pwm_max_limit = <255>; - - lcd_hbp = <32>; - lcd_ht = <868>; - lcd_hspw = <4>; - lcd_vbp = <12>; - lcd_vt = <1311>; - lcd_vspw = <4>; - - lcd_dsi_if = <0>; - lcd_dsi_lane = <4>; - lcd_lvds_if = <0>; - lcd_lvds_colordepth = <0>; - lcd_lvds_mode = <0>; - lcd_frm = <0>; - lcd_hv_clk_phase = <0>; - lcd_hv_sync_polarity= <0>; - lcd_io_phase = <0x0000>; - lcd_gamma_en = <0>; + lcd_used = <1>; + lcd_driver_name = "st7701s_rgb"; + + lcd_if = <0>; + lcd_hv_if = <0>; + + lcd_width = <70>; + lcd_height = <72>; + lcd_x = <480>; + lcd_y = <480>; + lcd_dclk_freq = <19>; + lcd_hbp = <60>; + lcd_ht = <612>; + lcd_hspw = <12>; + lcd_vbp = <18>; + lcd_vt = <520>; + lcd_vspw = <4>; + + lcd_backlight = <50>; + lcd_pwm_used = <1>; + lcd_pwm_ch = <7>; + lcd_pwm_freq = <20000>; + lcd_pwm_pol = <1>; lcd_bright_curve_en = <0>; - lcd_cmap_en = <0>; - lcd_fsync_en = <0>; - lcd_fsync_act_time = <1000>; - lcd_fsync_dis_time = <1000>; - lcd_fsync_pol = <0>; - - deu_mode = <0>; - lcdgamma4iep = <22>; - smart_color = <90>; - - lcd_gpio_0 = <&pio PG 13 GPIO_ACTIVE_HIGH>; - pinctrl-0 = <&dsi4lane_pins_a>; - pinctrl-1 = <&dsi4lane_pins_b>; + + lcd_frm = <1>; + lcd_io_phase = <0x0000>; + lcd_gamma_en = <0>; + lcd_cmap_en = <0>; + lcd_hv_clk_phase= <0>; + lcd_hv_sync_polarity= <0>; + lcd_rb_swap = <0>; + + lcd_power = "vcc-lcd"; + lcd_pin_power = "vcc-pd"; + lcd_gpio_0 = <&pio PG 13 GPIO_ACTIVE_HIGH>; + lcd_gpio_1 = <&pio PE 14 GPIO_ACTIVE_HIGH>; + lcd_gpio_2 = <&pio PE 12 GPIO_ACTIVE_HIGH>; + lcd_gpio_3 = <&pio PE 15 GPIO_ACTIVE_HIGH>; + pinctrl-0 = <&rgb18_pins_a>; + pinctrl-1 = <&rgb18_pins_b>; }; + &hdmi { hdmi_used = <1>; hdmi_power_cnt = <0>; @@ -1357,14 +1320,12 @@ pull up or pull down(default 0), driver level(default 1), data> status = "okay"; }; -/* &pwm7 { pinctrl-names = "active", "sleep"; pinctrl-0 = <&pwm7_pin_a>; pinctrl-1 = <&pwm7_pin_b>; status = "okay"; }; -*/ &rtp { allwinner,tp-sensitive-adjust = <0xf>; @@ -1399,61 +1360,4 @@ pull up or pull down(default 0), driver level(default 1), data> pinctrl-0 = <&ir1_pins_a>; pinctrl-1 = <&ir1_pins_b>; status = "disabled"; -}; - -/* &lcd_fb0 { - lcd_used = <1>; - lcd_driver_name = "kld35512"; - lcd_if = <1>; - lcd_dbi_if = <4>; - lcd_data_speed = <60>; - lcd_spi_bus_num = <1>; - lcd_x = <320>; - lcd_y = <480>; - lcd_pixel_fmt = <10>; - lcd_dbi_fmt = <2>; - lcd_rgb_order = <0>; - lcd_width = <60>; - lcd_height = <95>; - lcd_pwm_used = <1>; - lcd_pwm_ch = <7>; - lcd_pwm_freq = <5000>; - lcd_pwm_pol = <1>; - lcd_frm = <1>; - lcd_gamma_en = <1>; - fb_buffer_num = <2>; - lcd_backlight = <100>; - lcd_fps = <40>; - lcd_dbi_te = <1>; - lcd_dbi_clk_mode = <1>; - lcd_gpio_0 = <&pio PC 0 GPIO_ACTIVE_HIGH>; - status = "okay"; -}; */ - -/* &lcd_fb0 { - lcd_used = <1>; - lcd_driver_name = "kld2844b"; - lcd_if = <1>; - lcd_dbi_if = <4>; - lcd_data_speed = <60>; - lcd_spi_bus_num = <1>; - lcd_x = <240>; - lcd_y = <320>; - lcd_width = <60>; - lcd_height = <95>; - lcd_pwm_used = <1>; - lcd_pwm_ch = <7>; - lcd_pwm_freq = <5000>; - lcd_pwm_pol = <0>; - lcd_pixel_fmt = <0>; - lcd_dbi_fmt = <3>; - lcd_rgb_order = <0>; - lcd_frm = <1>; - lcd_gamma_en = <1>; - fb_buffer_num = <2>; - lcd_backlight = <100>; - lcd_dbi_te = <1>; - lcd_fps = <60>; - lcd_gpio_0 = <&pio PC 0 GPIO_ACTIVE_HIGH>; - status = "okay"; -}; */ +}; \ No newline at end of file diff --git a/configs/nezha/linux-5.4/config-5.4 b/configs/nezha/linux-5.4/config-5.4 index 87ab49e..d91578d 100644 --- a/configs/nezha/linux-5.4/config-5.4 +++ b/configs/nezha/linux-5.4/config-5.4 @@ -1368,6 +1368,7 @@ CONFIG_XR829_WLAN=m # CONFIG_SPARD_WLAN_SUPPORT is not set # CONFIG_BCMDHD is not set # CONFIG_AIC_WLAN_SUPPORT is not set +# CONFIG_RTL8723DS is not set # CONFIG_MAC80211_HWSIM is not set # CONFIG_USB_NET_RNDIS_WLAN is not set # CONFIG_VIRT_WIFI is not set diff --git a/configs/nezha/sys_config.fex b/configs/nezha/sys_config.fex index d52f3c1..a9b354e 100755 --- a/configs/nezha/sys_config.fex +++ b/configs/nezha/sys_config.fex @@ -23,7 +23,7 @@ debug_mode = 8 ;storage_type = boot medium, 0-nand, 1-sd, 2-emmc, 3-nor, 4-emmc3, 5-spinand -1(defualt)auto scan ;---------------------------------------------------------------------------------- [target] -storage_type = 5 +storage_type = 1 ;---------------------------------------------------------------------------------- diff --git a/configs/nezha/uboot-board.dts b/configs/nezha/uboot-board.dts index 81a521e..1efc8a6 100644 --- a/configs/nezha/uboot-board.dts +++ b/configs/nezha/uboot-board.dts @@ -42,7 +42,7 @@ &pwm2_pin_b { pins = "PD18"; muxsel = <0>; - function = "gpio_out"; + function = "gpio_in"; }; &pwm2 { @@ -261,57 +261,49 @@ }; &lcd0 { - lcd_used = <1>; - - lcd_driver_name = "tft08006"; - lcd_backlight = <100>; - lcd_if = <4>; - - lcd_x = <800>; - lcd_y = <1280>; - lcd_width = <52>; - lcd_height = <52>; - lcd_dclk_freq = <70>; - - lcd_pwm_used = <1>; - lcd_pwm_ch = <2>; - lcd_pwm_freq = <1000>; - lcd_pwm_pol = <0>; - lcd_pwm_max_limit = <255>; - - lcd_hbp = <32>; - lcd_ht = <868>; - lcd_hspw = <4>; - lcd_vbp = <12>; - lcd_vt = <1311>; - lcd_vspw = <4>; - - lcd_dsi_if = <0>; - lcd_dsi_lane = <4>; - lcd_lvds_if = <0>; - lcd_lvds_colordepth = <0>; - lcd_lvds_mode = <0>; - lcd_frm = <0>; - lcd_hv_clk_phase = <0>; - lcd_hv_sync_polarity= <0>; - lcd_io_phase = <0x0000>; - lcd_gamma_en = <0>; + lcd_used = <1>; + lcd_driver_name = "st7701s_rgb"; + + lcd_if = <0>; + lcd_hv_if = <0>; + + lcd_width = <70>; + lcd_height = <72>; + lcd_x = <480>; + lcd_y = <480>; + lcd_dclk_freq = <19>; + lcd_hbp = <60>; + lcd_ht = <612>; + lcd_hspw = <12>; + lcd_vbp = <18>; + lcd_vt = <520>; + lcd_vspw = <4>; + + lcd_backlight = <50>; + lcd_pwm_used = <1>; + lcd_pwm_ch = <7>; + lcd_pwm_freq = <20000>; + lcd_pwm_pol = <1>; lcd_bright_curve_en = <0>; - lcd_cmap_en = <0>; - lcd_fsync_en = <0>; - lcd_fsync_act_time = <1000>; - lcd_fsync_dis_time = <1000>; - lcd_fsync_pol = <0>; - - deu_mode = <0>; - lcdgamma4iep = <22>; - smart_color = <90>; - - lcd_gpio_0 = <&pio PG 13 GPIO_ACTIVE_HIGH>; - pinctrl-0 = <&dsi4lane_pins_a>; - pinctrl-1 = <&dsi4lane_pins_b>; + + lcd_frm = <1>; + lcd_io_phase = <0x0000>; + lcd_gamma_en = <0>; + lcd_cmap_en = <0>; + lcd_hv_clk_phase= <0>; + lcd_hv_sync_polarity= <0>; + + lcd_power = "vcc-lcd"; + lcd_pin_power = "vcc-pd"; + lcd_gpio_0 = <&pio PG 13 GPIO_ACTIVE_HIGH>; + lcd_gpio_1 = <&pio PE 14 GPIO_ACTIVE_HIGH>; + lcd_gpio_2 = <&pio PE 12 GPIO_ACTIVE_HIGH>; + lcd_gpio_3 = <&pio PE 15 GPIO_ACTIVE_HIGH>; + pinctrl-0 = <&rgb18_pins_a>; + pinctrl-1 = <&rgb18_pins_b>; }; + &hdmi { hdmi_used = <1>; hdmi_power_cnt = <0>; @@ -343,4 +335,4 @@ eink = &eink; spi0 = &spi0; -}; +}; \ No newline at end of file project lichee/linux-5.4/ diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig index 7e788946e..4c02b14b4 100644 --- a/drivers/net/wireless/Kconfig +++ b/drivers/net/wireless/Kconfig @@ -52,6 +52,8 @@ source "drivers/net/wireless/xr819s/Kconfig" source "drivers/net/wireless/uwe5622/Kconfig" source "drivers/net/wireless/bcmdhd/Kconfig" source "drivers/net/wireless/aic8800/Kconfig" +source "drivers/net/wireless/rtl8723ds/Kconfig" +# source "drivers/net/wireless/rtl8189fs/Kconfig" config PCMCIA_RAYCS tristate "Aviator/Raytheon 2.4GHz wireless support" diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile index 269cb635d..644069b49 100644 --- a/drivers/net/wireless/Makefile +++ b/drivers/net/wireless/Makefile @@ -32,6 +32,8 @@ obj-$(CONFIG_VIRT_WIFI) += virt_wifi.o obj-$(CONFIG_XR829_WLAN) += xr829/ obj-$(CONFIG_XR819S_WLAN) += xr819s/ +obj-$(CONFIG_RTL8723DS) += rtl8723ds/ +# obj-$(CONFIG_RTL8189FS) += rtl8189fs/ obj-$(CONFIG_SPARD_WLAN_SUPPORT) += uwe5622/ obj-$(CONFIG_BCMDHD) += bcmdhd/ obj-$(CONFIG_AIC_WLAN_SUPPORT) += aic8800/
设备树修改参考了https://github.com/Tina-Linux/tina-d1x-lichee-rv和sipeed提供的licheerv_d1_compile。
使用以下命令
cat /sys/kernel/debug/pinctrl/2000000.pinctrl/pinmux-pins
发现lcd的io均没有进行初始化
是否遗漏某些地方配置不当或者设备树修改错误了?
-
请贴出完整 board.dts 文件
-
@whycan 附上完整的board.dts
/* * Allwinner Technology CO., Ltd. sun20iw1p1 fpga. * * fpga support. */ /dts-v1/; #include "sun20iw1p1.dtsi" /{ compatible = "allwinner,d1-h", "arm,sun20iw1p1", "allwinner,sun20iw1p1"; aliases { dsp0 = &dsp0; dsp0_gpio_int= &dsp0_gpio_int; }; dsp0: dsp0 { compatible = "allwinner,sun20iw1-dsp"; status = "okay"; }; dsp0_gpio_int: dsp0_gpio_int { compatible = "allwinner,sun20iw1-dsp-gpio-int"; pin-group = "PB", "PC", "PD", "PE"; status = "disabled"; }; reg_vdd_cpu: vdd-cpu { compatible = "sunxi-pwm-regulator"; pwms = <&pwm 0 5000 0>; regulator-name = "vdd_cpu"; regulator-min-microvolt = <810000>; regulator-max-microvolt = <1160000>; regulator-ramp-delay = <25>; regulator-always-on; regulator-boot-on; status = "okay"; }; reg_usb1_vbus: usb1-vbus { compatible = "regulator-fixed"; regulator-name = "usb1-vbus"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; regulator-enable-ramp-delay = <1000>; enable-active-high; }; reg_3v3: vdd_3v3 { compatible = "regulator-fixed"; regulator-name = "vdd_3v3"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-enable-ramp-delay = <1000>; enable-active-high; }; }; &CPU0 { cpu-supply = <®_vdd_cpu>; }; &pio { sdc0_pins_a: sdc0@0 { allwinner,pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5"; allwinner,function = "sdc0"; allwinner,muxsel = <2>; allwinner,drive = <3>; allwinner,pull = <1>; pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5"; function = "sdc0"; drive-strength = <30>; bias-pull-up; power-source = <3300>; }; sdc0_pins_b: sdc0@1 { pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5"; function = "sdc0"; drive-strength = <30>; bias-pull-up; power-source = <1800>; }; sdc0_pins_c: sdc0@2 { pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5"; function = "gpio_in"; }; /* TODO: add jtag pin */ sdc0_pins_d: sdc0@3 { pins = "PF2", "PF4"; function = "uart0"; drive-strength = <10>; bias-pull-up; }; sdc0_pins_e: sdc0@4 { pins = "PF0", "PF1", "PF3", "PF5"; function = "jtag"; drive-strength = <10>; bias-pull-up; }; sdc1_pins_a: sdc1@0 { pins = "PG0", "PG1", "PG2", "PG3", "PG4", "PG5"; function = "sdc1"; drive-strength = <30>; bias-pull-up; }; sdc1_pins_b: sdc1@1 { pins = "PG0", "PG1", "PG2", "PG3", "PG4", "PG5"; function = "gpio_in"; }; sdc2_pins_a: sdc2@0 { allwinner,pins = "PC2", "PC3", "PC4", "PC5", "PC6", "PC7"; allwinner,function = "sdc2"; allwinner,muxsel = <3>; allwinner,drive = <3>; allwinner,pull = <1>; pins = "PC2", "PC3", "PC4", "PC5", "PC6", "PC7"; function = "sdc2"; drive-strength = <30>; bias-pull-up; }; sdc2_pins_b: sdc2@1 { pins = "PC2", "PC3", "PC4", "PC5", "PC6", "PC7"; function = "gpio_in"; }; wlan_pins_a:wlan@0 { pins = "PG11"; function = "clk_fanout1"; }; uart0_pins_a: uart0_pins@0 { /* For nezha board */ pins = "PB8", "PB9"; function = "uart0"; drive-strength = <10>; bias-pull-up; }; uart0_pins_b: uart0_pins@1 { /* For nezha board */ pins = "PB8", "PB9"; function = "gpio_in"; }; uart1_pins_a: uart1_pins@0 { /* For EVB1 board */ pins = "PG6", "PG7", "PG8", "PG9"; function = "uart1"; drive-strength = <10>; bias-pull-up; }; uart1_pins_b: uart1_pins { /* For EVB1 board */ pins = "PG6", "PG7", "PG8", "PG9"; function = "gpio_in"; }; uart2_pins_a: uart2_pins@0 { /* For EVB1 board */ pins = "PC0", "PC1"; function = "uart2"; drive-strength = <10>; bias-pull-up; }; uart2_pins_b: uart2_pins@1 { /* For EVB1 board */ pins = "PC0", "PC1"; function = "gpio_in"; }; uart3_pins_a: uart3_pins@0 { /* For EVB1 board */ pins = "PD10", "PD11"; function = "uart3"; muxsel = <5>; drive-strength = <10>; bias-pull-up; }; twi0_pins_a: twi0@0 { pins = "PB10", "PB11"; /*sck sda*/ function = "twi0"; drive-strength = <10>; }; twi0_pins_b: twi0@1 { pins = "PB10", "PB11"; function = "gpio_in"; }; twi1_pins_a: twi1@0 { pins = "PB4", "PB5"; function = "twi1"; drive-strength = <10>; }; twi1_pins_b: twi1@1 { pins = "PB4", "PB5"; function = "gpio_in"; }; twi2_pins_a: twi2@0 { pins = "PB0", "PB1"; function = "twi2"; drive-strength = <10>; }; twi2_pins_b: twi2@1 { pins = "PB0", "PB1"; function = "gpio_in"; }; twi3_pins_a: twi3@0 { pins = "PB6", "PB7"; function = "twi3"; drive-strength = <10>; }; twi3_pins_b: twi3@1 { pins = "PB6", "PB7"; function = "gpio_in"; }; gmac_pins_a: gmac@0 { pins = "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9"; function = "gmac0"; drive-strength = <10>; }; gmac_pins_b: gmac@1 { pins = "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9"; function = "gpio_in"; }; dmic_pins_a: dmic@0 { /* DMIC_PIN: CLK, DATA0, DATA1, DATA2 */ pins = "PE17", "PB11"; function = "dmic"; drive-strength = <20>; bias-disable; }; dmic_pins_b: dmic@1 { pins = "PE17", "PB11"; function = "io_disabled"; drive-strength = <20>; bias-disable; }; daudio0_pins_a: daudio0@0 { pins = "PE17", "PE16", "PE15", "PE14", "PE13"; function = "i2s0"; drive-strength = <20>; bias-disable; }; daudio0_pins_b: daudio0_sleep@0 { pins = "PE17", "PE16", "PE15", "PE14", "PE13"; function = "io_disabled"; drive-strength = <20>; bias-disable; }; daudio1_pins_a: daudio1@0 { pins = "PG11", "PG12", "PG13", "PG14", "PG15"; function = "i2s1"; drive-strength = <20>; bias-disable; }; daudio1_pins_b: daudio1_sleep@0 { pins = "PG11", "PG12", "PG13", "PG14", "PG15"; function = "io_disabled"; drive-strength = <20>; bias-disable; }; daudio2_pins_a: daudio2@0 { /* I2S_PIN: MCLK, BCLK, LRCK */ pins = "PB7", "PB5", "PB6"; function = "i2s2"; drive-strength = <20>; bias-disable; }; daudio2_pins_b: daudio2@1 { /* I2S_PIN: DOUT0 */ pins = "PB4"; function = "i2s2_dout"; drive-strength = <20>; bias-disable; }; daudio2_pins_c: daudio2@2 { /* I2S_PIN: DIN0 */ pins = "PB3"; function = "i2s2_din"; drive-strength = <20>; bias-disable; }; daudio2_pins_d: daudio2_sleep@0 { pins = "PB7", "PB5", "PB6", "PB4", "PB3"; function = "io_disabled"; drive-strength = <20>; bias-disable; }; spdif_pins_a: spdif@0 { /* SPDIF_PIN: SPDIF_OUT */ pins = "PB0"; function = "spdif"; drive-strength = <20>; bias-disable; }; spdif_pins_b: spdif_sleep@0 { pins = "PB0"; function = "io_disabled"; drive-strength = <20>; bias-disable; }; spi0_pins_a: spi0@0 { pins = "PC2", "PC4", "PC5","PC7", "PC6"; /*clk mosi miso hold wp*/ function = "spi0"; muxsel = <2>; drive-strength = <10>; }; spi0_pins_b: spi0@1 { pins = "PC3", "PC7", "PC6"; function = "spi0"; muxsel = <2>; drive-strength = <10>; bias-pull-up; /* only CS should be pulled up */ }; spi0_pins_c: spi0@2 { pins = "PC2", "PC3", "PC4", "PC5","PC6", "PC7"; function = "gpio_in"; muxsel = <0>; drive-strength = <10>; }; spi1_pins_a: spi1@0 { pins = "PD11", "PD12", "PD13","PD14", "PD15"; /*clk mosi miso hold wp*/ function = "spi1"; drive-strength = <10>; }; spi1_pins_b: spi1@1 { pins = "PD10"; function = "spi1"; drive-strength = <10>; bias-pull-up; // only CS should be pulled up }; spi1_pins_c: spi1@2 { pins = "PD10", "PD11", "PD12", "PD13","PD14", "PD15"; function = "gpio_in"; drive-strength = <10>; }; ledc_pins_a: ledc@0 { pins = "PC0"; function = "ledc"; drive-strength = <10>; }; ledc_pins_b: ledc@1 { pins = "PC0"; function = "gpio_in"; }; pwm0_pin_a: pwm0@0 { pins = "PD16"; function = "pwm0"; drive-strength = <10>; bias-pull-up; }; pwm0_pin_b: pwm0@1 { pins = "PD16"; function = "gpio_in"; bias-disable; }; pwm2_pin_a: pwm2@0 { pins = "PD18"; function = "pwm2"; drive-strength = <10>; bias-pull-up; }; pwm2_pin_b: pwm2@1 { pins = "PD18"; function = "gpio_in"; }; pwm7_pin_a: pwm7@0 { pins = "PD22"; function = "pwm7"; drive-strength = <10>; bias-pull-up; }; pwm7_pin_b: pwm7@1 { pins = "PD22"; function = "gpio_in"; }; s_cir0_pins_a: s_cir@0 { pins = "PB12"; function = "ir"; drive-strength = <10>; bias-pull-up; }; s_cir0_pins_b: s_cir@1 { pins = "PB12"; function = "gpio_in"; }; ir1_pins_a: ir1@0 { pins = "PB0"; function = "ir"; drive-strength = <10>; bias-pull-up; }; ir1_pins_b: ir1@1 { pins = "PB0"; function = "gpio_in"; }; rgb18_20_pins_a: rgb18_20@0 { pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", \ "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", \ "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", \ "PD18", "PD19", "PD20", "PD21"; function = "lcd0"; drive-strength = <20>; bias-disable; }; rgb18_20_pins_b: rgb18_20@1 { pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", \ "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", \ "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", \ "PD18", "PD19", "PD20", "PD21"; function = "io_disabled"; bias-disable; }; rgb18_10_pins_a: rgb18_10@0 { pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", \ "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", \ "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", \ "PD18", "PD19", "PD20", "PD21"; function = "lcd0"; drive-strength = <10>; bias-disable; }; rgb18_10_pins_b: rgb18_10@1 { pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", \ "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", \ "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", \ "PD18", "PD19", "PD20", "PD21"; function = "io_disabled"; bias-disable; }; }; &uart0 { pinctrl-names = "default", "sleep"; pinctrl-0 = <&uart0_pins_a>; pinctrl-1 = <&uart0_pins_b>; status = "okay"; }; &uart1 { pinctrl-names = "default", "sleep"; pinctrl-0 = <&uart1_pins_a>; pinctrl-1 = <&uart1_pins_b>; status = "okay"; }; &uart2 { pinctrl-names = "default", "sleep"; pinctrl-0 = <&uart2_pins_a>; pinctrl-1 = <&uart2_pins_b>; status = "disabled"; }; &uart3 { /*compatible = "allwinner,sun20iw1-dsp-uart";*/ pinctrl-names = "default", "sleep"; pinctrl-0 = <&uart3_pins_a>; pinctrl-1 = <&uart3_pins_a>; status = "disabled"; }; &soc { card0_boot_para@2 { /* * Avoid dtc compiling warnings. * @TODO: Developer should modify this to the actual value */ reg = <0x0 0x2 0x0 0x0>; device_type = "card0_boot_para"; card_ctrl = <0x0>; card_high_speed = <0x1>; card_line = <0x4>; pinctrl-0 = <&sdc0_pins_a>; }; card2_boot_para@3 { /* * Avoid dtc compiling warnings. * @TODO: Developer should modify this to the actual value */ reg = <0x0 0x3 0x0 0x0>; device_type = "card2_boot_para"; card_ctrl = <0x2>; card_high_speed = <0x1>; card_line = <0x4>; pinctrl-0 = <&sdc2_pins_a>; /*pinctrl-0 = <&sdc0_pins_a>;*/ /*sdc_ex_dly_used = <0x2>;*/ sdc_io_1v8 = <0x1>; /*sdc_type = "tm4";*/ sdc_tm4_hs200_max_freq = <150>; sdc_tm4_hs400_max_freq = <100>; sdc_ex_dly_used = <2>; /*sdc_tm4_win_th = <8>;*/ /*sdc_dis_host_caps = <0x180>;*/ }; rfkill: rfkill@0 { compatible = "allwinner,sunxi-rfkill"; chip_en; power_en; status = "okay"; wlan: wlan@0 { compatible = "allwinner,sunxi-wlan"; pinctrl-0 = <&wlan_pins_a>; pinctrl-names = "default"; clock-names = "32k-fanout1"; clocks = <&ccu CLK_FANOUT1_OUT>; wlan_busnum = <0x1>; wlan_regon = <&pio PG 12 GPIO_ACTIVE_HIGH>; wlan_hostwake = <&pio PG 10 GPIO_ACTIVE_HIGH>; /*wlan_power = "VCC-3V3";*/ /*wlan_power_vol = <3300000>;*/ /*interrupt-parent = <&pio>; interrupts = < PG 10 IRQ_TYPE_LEVEL_HIGH>;*/ wakeup-source; }; bt: bt@0 { compatible = "allwinner,sunxi-bt"; pinctrl-0 = <&wlan_pins_a>; pinctrl-names = "default"; clock-names = "32k-fanout1"; clocks = <&ccu CLK_FANOUT1_OUT>; /*bt_power_num = <0x01>;*/ /*bt_power = "axp803-dldo1";*/ /*bt_io_regulator = "axp803-dldo1";*/ /*bt_io_vol = <3300000>;*/ /*bt_power_vol = <330000>;*/ bt_rst_n = <&pio PG 18 GPIO_ACTIVE_LOW>; status = "okay"; }; }; /*btlpm: btlpm@0 { compatible = "allwinner,sunxi-btlpm"; uart_index = <0x1>; bt_wake = <&pio PG 16 GPIO_ACTIVE_HIGH>; bt_hostwake = <&pio PG 17 GPIO_ACTIVE_HIGH>; status = "okay"; };*/ addr_mgt: addr_mgt@0 { compatible = "allwinner,sunxi-addr_mgt"; type_addr_wifi = <0x0>; type_addr_bt = <0x0>; type_addr_eth = <0x0>; status = "okay"; }; }; &sdc2 { non-removable; bus-width = <4>; mmc-ddr-1_8v; mmc-hs200-1_8v; no-sdio; no-sd; ctl-spec-caps = <0x308>; cap-mmc-highspeed; sunxi-power-save-mode; sunxi-dis-signal-vol-sw; mmc-bootpart-noacc; max-frequency = <150000000>; /*vmmc-supply = <®_dcdc1>;*/ /*emmc io vol 3.3v*/ /*vqmmc-supply = <®_aldo1>;*/ /*emmc io vol 1.8v*/ /*vqmmc-supply = <®_eldo1>;*/ status = "disabled"; }; &sdc0 { bus-width = <4>; cd-gpios = <&pio PF 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /*non-removable;*/ /*broken-cd;*/ cd-inverted; /*data3-detect;*/ /*card-pwr-gpios = <&pio PH 14 1 1 2 0xffffffff>;*/ cd-used-24M; cap-sd-highspeed; /*sd-uhs-sdr50;*/ /*sd-uhs-ddr50;*/ /*sd-uhs-sdr104;*/ no-sdio; no-mmc; sunxi-power-save-mode; /*sunxi-dis-signal-vol-sw;*/ max-frequency = <150000000>; ctl-spec-caps = <0x8>; /*vmmc-supply = <®_dcdc1>;*/ /*vqmmc33sw-supply = <®_dcdc1>;*/ /*vdmmc33sw-supply = <®_dcdc1>;*/ /*vqmmc18sw-supply = <®_eldo1>;*/ /*vdmmc18sw-supply = <®_eldo1>;*/ status = "okay"; }; &sdc1 { bus-width = <4>; no-mmc; no-sd; cap-sd-highspeed; /*sd-uhs-sdr12*/ /*sd-uhs-sdr25;*/ /*sd-uhs-sdr50;*/ /*sd-uhs-ddr50;*/ /*sd-uhs-sdr104;*/ /*sunxi-power-save-mode;*/ /*sunxi-dis-signal-vol-sw;*/ cap-sdio-irq; keep-power-in-suspend; ignore-pm-notify; max-frequency = <150000000>; ctl-spec-caps = <0x8>; status = "okay"; }; /* tvd configuration used (create device, 0: do not create device, 1: create device) agc_auto_enable (0: agc manual mode,agc_manual_value is valid; 1: agc auto mode) agc_manual_value (agc manual value, default value is 64) cagc_enable (cagc 0: disable, 1: enable) fliter_used (3d fliter 0: disable, 1: enable) support two PMU power (tvd_power0, tvd_power1) support two GPIO power (tvd_gpio0, tvd_gpio1) NOTICE: If tvd need pmu power or gpio power,params need be configured under [tvd] tvd_sw (the switch of all tvd driver.) tvd_interface (0: cvbs, 1: ypbpr,) tvd_format (0:TVD_PL_YUV420 , 1: MB_YUV420, 2: TVD_PL_YUV422) tvd_system (0:ntsc, 1:pal) tvd_row (total row number in multi channel mode 1-2) tvd_column (total column number in multi channel mode 1-2) tvd_channelx_en (0:disable, 1~4:position in multi channel mode,In single channel mode,mean enable) tvd_row*tvd_column is the total tvd channel number to be used in multichannel mode +--------------------+--------------------+ | | | | | | | 1 | 2 | | | | | | | +--------------------+--------------------+ | | | | | | | 3 | 4 | | | | | | | +--------------------+--------------------+ */ &tvd { tvd_sw = <1>; tvd_interface = <0>; tvd_format = <0>; tvd_system = <1>; tvd_row = <1>; tvd_column = <1>; tvd_channel0_en = <1>; tvd_channel1_en = <0>; tvd_channel2_en = <0>; tvd_channel3_en = <0>; /*tvd_gpio0 = <&pio PD 22 GPIO_ACTIVE_HIGH>;*/ /*tvd_gpio1 = <&pio PD 23 GPIO_ACTIVE_HIGH>;*/ /*tvd_gpio2 = <&pio PD 24 GPIO_ACTIVE_HIGH>;*/ /* dc1sw-supply = <®_dc1sw>;*/ /* eldo3-supply = <®_eldo3>;*/ /*tvd_power0 = "dc1sw"*/ /*tvd_power1 = "eldo3"*/ }; &tvd0 { used = <1>; agc_auto_enable = <1>; agc_manual_value = <64>; cagc_enable = <1>; fliter_used = <1>; }; /* Audio Driver modules */ &sunxi_rpaf_dsp0 { status = "okay"; }; /* if audiocodec is used, sdc0 and uart0 should be closed to enable PA. */ &codec { /* MIC and headphone gain setting */ mic1gain = <0x13>; mic2gain = <0x13>; mic3gain = <0x13>; /* ADC/DAC DRC/HPF func enabled */ /* 0x1:DAP_HP_EN; 0x2:DAP_SPK_EN; 0x3:DAP_HPSPK_EN */ adcdrc_cfg = <0x0>; adchpf_cfg = <0x1>; dacdrc_cfg = <0x0>; dachpf_cfg = <0x0>; /* Volume about */ digital_vol = <0x00>; lineout_vol = <0x1a>; headphonegain = <0x03>; /* Pa enabled about */ pa_level = <0x01>; pa_pwr_level = <0x01>; pa_msleep_time = <0x78>; /* gpio-spk = <&pio PF 2 GPIO_ACTIVE_HIGH>; */ /* gpio-spk-pwr = <&pio PF 4 GPIO_ACTIVE_HIGH>; */ /* regulator about */ /* avcc-supply = <®_aldo1>; */ /* hpvcc-supply = <®_eldo1>; */ status = "okay"; }; &sndcodec { hp_detect_case = <0x01>; jack_enable = <0x01>; status = "okay"; }; &dummy_cpudai { /* CMA config about */ playback_cma = <128>; capture_cma = <256>; status = "okay"; }; &dmic { pinctrl-names = "default","sleep"; pinctrl-0 = <&dmic_pins_a>; pinctrl-1 = <&dmic_pins_b>; status = "okay"; }; &sounddmic { status = "okay"; }; &dmic_codec { status = "okay"; }; /*----------------------------------------------------------------------------- * pcm_lrck_period 16/32/64/128/256 * (set 0x20 for HDMI audio out) * slot_width_select 16bits/20bits/24bits/32bits * (set 0x20 for HDMI audio out) * frametype 0 --> short frame = 1 clock width; * 1 --> long frame = 2 clock width; * tdm_config 0 --> pcm * 1 --> i2s * (set 0x01 for HDMI audio out) * mclk_div 0 --> not output * 1/2/4/6/8/12/16/24/32/48/64/96/128/176/192 * (set mclk as external codec clk source, freq is pll_audio/mclk_div) * pinctrl_used 0 --> I2S/PCM use for internal (e.g. HDMI) * 1 --> I2S/PCM use for external audio * daudio_type: 0 --> external audio type * 1 --> HDMI audio type *---------------------------------------------------------------------------*/ &daudio0 { mclk_div = <0x01>; frametype = <0x00>; tdm_config = <0x01>; sign_extend = <0x00>; msb_lsb_first = <0x00>; pcm_lrck_period = <0x80>; slot_width_select = <0x20>; pinctrl-names = "default", "sleep"; pinctrl-0 = <&daudio0_pins_a>; pinctrl-1 = <&daudio0_pins_b>; pinctrl_used = <0x0>; status = "disabled"; }; /*----------------------------------------------------------------------------- * simple-audio-card,name name of sound card, e.g. * "snddaudio0" --> use for external audio * "sndhdmi" --> use for HDMI audio * sound-dai "snd-soc-dummy" --> use for I2S * "hdmiaudio" --> use for HDMI audio * "ac108" --> use for external audio of ac108 *---------------------------------------------------------------------------*/ &sounddaudio0 { /* simple-audio-card,format = "i2s"; */ /* simple-audio-card,frame-master = <&daudio0_master>; */ /* simple-audio-card,bitclock-master = <&daudio0_master>; */ /* simple-audio-card,bitclock-inversion; */ /* simple-audio-card,frame-inversion; */ status = "disabled"; daudio0_master: simple-audio-card,codec { /* sound-dai = <&ac108>; */ }; }; &daudio1 { mclk_div = <0x01>; frametype = <0x00>; tdm_config = <0x01>; sign_extend = <0x00>; msb_lsb_first = <0x00>; pcm_lrck_period = <0x80>; slot_width_select = <0x20>; pinctrl-names = "default", "sleep"; pinctrl-0 = <&daudio1_pins_a>; pinctrl-1 = <&daudio1_pins_b>; pinctrl_used = <0x0>; status = "disabled"; }; &sounddaudio1 { status = "disabled"; daudio1_master: simple-audio-card,codec { /* sound-dai = <&ac108>; */ }; }; &daudio2 { mclk_div = <0x00>; frametype = <0x00>; tdm_config = <0x01>; sign_extend = <0x00>; tx_data_mode = <0x00>; rx_data_mode = <0x00>; msb_lsb_first = <0x00>; pcm_lrck_period = <0x20>; slot_width_select = <0x20>; asrc_function_en = <0x00>; pinctrl-names = "default", "sleep"; /*pinctrl-0 = <&daudio2_pins_a &daudio2_pins_b &daudio2_pins_c>;*/ /*pinctrl-1 = <&daudio2_pins_d>;*/ /* HDMI audio, no need pin */ pinctrl-0; pinctrl-1; pinctrl_used = <0x0>; daudio_type = <0x1>; status = "okay"; }; /* if HDMI audio is used, daudio2 should be enable. */ &hdmiaudio { status = "okay"; }; &sounddaudio2 { status = "okay"; simple-audio-card,name = "sndhdmi"; daudio2_master: simple-audio-card,codec { sound-dai = <&hdmiaudio>; }; }; &spdif { pinctrl-names = "default","sleep"; pinctrl-0 = <&spdif_pins_a>; pinctrl-1 = <&spdif_pins_b>; status = "disabled"; }; &soundspdif { status = "disabled"; }; /* *usb_port_type: usb mode. 0-device, 1-host, 2-otg. *usb_detect_type: usb hotplug detect mode. 0-none, 1-vbus/id detect, 2-id/dpdm detect. *usb_detect_mode: 0-thread scan, 1-id gpio interrupt. *usb_id_gpio: gpio for id detect. *usb_det_vbus_gpio: gpio for id detect. gpio or "axp_ctrl"; *usb_wakeup_suspend:0-SUPER_STANDBY, 1-USB_STANDBY. */ &usbc0 { device_type = "usbc0"; usb_port_type = <0x0>; usb_detect_type = <0x1>; usb_detect_mode = <0>; enable-active-high; usb_wakeup_suspend = <0>; usb_serial_unique = <0>; usb_serial_number = "20080411"; rndis_wceis = <1>; status = "okay"; }; &ehci0 { drvvbus-supply = <®_usb1_vbus>; }; &ohci0 { drvvbus-supply = <®_usb1_vbus>; }; &usbc1 { device_type = "usbc1"; usb_regulator_io = "nocare"; usb_wakeup_suspend = <0>; status = "okay"; }; &ehci1 { status = "okay"; }; &ohci1 { status = "okay"; }; &twi0 { clock-frequency = <400000>; pinctrl-0 = <&twi0_pins_a>; pinctrl-1 = <&twi0_pins_b>; pinctrl-names = "default", "sleep"; status = "disabled"; eeprom@50 { compatible = "atmel,24c16"; reg = <0x50>; status = "disabled"; }; }; &twi1 { clock-frequency = <400000>; pinctrl-0 = <&twi1_pins_a>; pinctrl-1 = <&twi1_pins_b>; pinctrl-names = "default", "sleep"; status = "disabled"; }; &twi2 { clock-frequency = <400000>; pinctrl-0 = <&twi2_pins_a>; pinctrl-1 = <&twi2_pins_b>; pinctrl-names = "default", "sleep"; dmas = <&dma 45>, <&dma 45>; dma-names = "tx", "rx"; status = "okay"; focaltech@48{ compatible = "focaltech,fts"; status = "okay"; reg = <0x48>; interrupt-parent = <&pio>; interrupts = <PG 14 IRQ_TYPE_LEVEL_LOW>; focaltech,reset-gpio = <&pio PG 15 GPIO_ACTIVE_HIGH>; focaltech,irq-gpio = <&pio PG 14 IRQ_TYPE_LEVEL_LOW>; focaltech,max-touch-number = <2>; focaltech,display-coords = <0 0 480 480>; focaltech,reg_vdd = <®_3v3>; focaltech,reg_avdd = <®_3v3>; }; }; &twi3 { clock-frequency = <400000>; pinctrl-0 = <&twi3_pins_a>; pinctrl-1 = <&twi3_pins_b>; pinctrl-names = "default", "sleep"; status = "disabled"; }; &gmac0 { phy-mode = "rmii"; use_ephy25m = <1>; pinctrl-0 = <&gmac_pins_a>; pinctrl-1 = <&gmac_pins_b>; pinctrl-names = "default", "sleep"; phy-rst = <&pio PE 16 GPIO_ACTIVE_HIGH>; status = "okay"; }; &spi0 { clock-frequency = <100000000>; pinctrl-0 = <&spi0_pins_a &spi0_pins_b>; pinctrl-1 = <&spi0_pins_c>; pinctrl-names = "default", "sleep"; /*spi-supply = <®_dcdc1>;*/ spi_slave_mode = <0>; spi0_cs_number = <1>; spi0_cs_bitmap = <1>; status = "disabled"; spi-nand@0 { compatible = "spi-nand"; spi-max-frequency=<0x5F5E100>; reg = <0x0>; spi-rx-bus-width=<0x04>; spi-tx-bus-width=<0x04>; status="disabled"; }; }; &spi1 { clock-frequency = <100000000>; pinctrl-0 = <&spi1_pins_a &spi1_pins_b>; pinctrl-1 = <&spi1_pins_c>; pinctrl-names = "default", "sleep"; spi_slave_mode = <0>; status = "disabled"; spi_board1@0 { device_type = "spi_board1"; compatible = "rohm,dh2228fv"; spi-max-frequency = <0x5f5e100>; reg = <0x0>; spi-rx-bus-width = <0x4>; spi-tx-bus-width = <0x4>; status = "disabled"; }; }; &ledc { pinctrl-names = "default", "sleep"; pinctrl-0 = <&ledc_pins_a>; pinctrl-1 = <&ledc_pins_b>; led_count = <12>; output_mode = "GRB"; reset_ns = <84>; t1h_ns = <800>; t1l_ns = <320>; t0h_ns = <300>; t0l_ns = <800>; wait_time0_ns = <84>; wait_time1_ns = <84>; wait_data_time_ns = <600000>; status = "okay"; }; &keyboard0 { key0 = <210 0x160>; wakeup-source; status = "okay"; }; /*---------------------------------------------------------------------------------- disp init configuration disp_mode (0:screen0<screen0,fb0>) screenx_output_type (0:none; 1:lcd; 2:tv; 3:hdmi;5:vdpo) screenx_output_mode (used for hdmi output, 0:480i 1:576i 2:480p 3:576p 4:720p50) (5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60) screenx_output_format (for hdmi, 0:RGB 1:yuv444 2:yuv422 3:yuv420) screenx_output_bits (for hdmi, 0:8bit 1:10bit 2:12bit 2:16bit) screenx_output_eotf (for hdmi, 0:reserve 4:SDR 16:HDR10 18:HLG) screenx_output_cs (for hdmi, 0:undefined 257:BT709 260:BT601 263:BT2020) screenx_output_dvi_hdmi (for hdmi, 0:undefined 1:dvi mode 2:hdmi mode) screen0_output_range (for hdmi, 0:default 1:full 2:limited) screen0_output_scan (for hdmi, 0:no data 1:overscan 2:underscan) screen0_output_aspect_ratio (for hdmi, 8-same as original picture 9-4:3 10-16:9 11-14:9) fbx format (4:RGB655 5:RGB565 6:RGB556 7:ARGB1555 8:RGBA5551 9:RGB888 10:ARGB8888 12:ARGB4444) fbx pixel sequence (0:ARGB 1:BGRA 2:ABGR 3:RGBA) fb0_scaler_mode_enable(scaler mode enable, used FE) fbx_width,fbx_height (framebuffer horizontal/vertical pixels, fix to output resolution while equal 0) lcdx_backlight (lcd init backlight,the range:[0,256],default:197 lcdx_yy (lcd init screen bright/contrast/saturation/hue, value:0~100, default:50/50/57/50) lcd0_contrast (LCD contrast, 0~100) lcd0_saturation (LCD saturation, 0~100) lcd0_hue (LCD hue, 0~100) framebuffer software rotation setting: disp_rotation_used: (0:disable; 1:enable,you must set fbX_width to lcd_y, set fbX_height to lcd_x) degreeX: (X:screen index; 0:0 degree; 1:90 degree; 3:270 degree) degreeX_Y: (X:screen index; Y:layer index 0~15; 0:0 degree; 1:90 degree; 3:270 degree) devX_output_type : config output type in bootGUI framework in UBOOT-2018. (0:none; 1:lcd; 2:tv; 4:hdmi;) devX_output_mode : config output resolution(see include/video/sunxi_display2.h) of bootGUI framework in UBOOT-2018 devX_screen_id : config display index of bootGUI framework in UBOOT-2018 devX_do_hpd : whether do hpd detectation or not in UBOOT-2018 chn_cfg_mode : Hardware DE channel allocation config. 0:single display with 6 channel, 1:dual display with 4 channel in main display and 2 channel in second display, 2:dual display with 3 channel in main display and 3 channel in second in display. ----------------------------------------------------------------------------------*/ &disp { disp_init_enable = <1>; disp_mode = <0>; screen0_output_type = <1>; screen0_output_mode = <4>; screen1_output_type = <3>; screen1_output_mode = <10>; screen1_output_format = <0>; screen1_output_bits = <0>; screen1_output_eotf = <4>; screen1_output_cs = <257>; screen1_output_dvi_hdmi = <2>; screen1_output_range = <2>; screen1_output_scan = <0>; screen1_output_aspect_ratio = <8>; dev0_output_type = <1>; dev0_output_mode = <4>; dev0_screen_id = <0>; dev0_do_hpd = <0>; dev1_output_type = <4>; dev1_output_mode = <10>; dev1_screen_id = <1>; dev1_do_hpd = <1>; def_output_dev = <0>; hdmi_mode_check = <1>; fb0_format = <0>; fb0_width = <0>; fb0_height = <0>; fb1_format = <0>; fb1_width = <0>; fb1_height = <0>; chn_cfg_mode = <1>; disp_para_zone = <1>; /*VCC-LCD*/ /* dc1sw-supply = <®_dc1sw>;*/ /*VCC-DSI*/ /* eldo3-supply = <®_eldo3>;*/ /*VCC-PD*/ /* dcdc1-supply = <®_dcdc1>;*/ }; /*---------------------------------------------------------------------------------- ;lcd0 configuration ;lcd_if: 0:hv(sync+de); 1:8080; 2:ttl; 3:lvds; 4:dsi; 5:edp; 6:extend dsi ;lcd_hv_if 0:Parallel RGB; 8:Serial RGB; 10:Dummy RGB; 11: RGB Dummy;12:CCIR656 ;lcd_hv_clk_phase 0:0 degree;1:90 degree;2:180 degree;3:270 degree ;lcd_hv_sync_polarity 0:vs low,hs low; 1:vs high,hslow; 2:vs low,hs high; 3:vs high,hs high ;lcd_hv_syuv_seq 0:YUYV; 1:YVYU; 2:UYVY; 3:VYUY ;lcd_cpu_if 0:18bit/1 cycle parallel(RGB666); 4:16bit/1cycle parallel (RGB565) ; 6:18bit/3 cycle parallel(RGB666); 7:16bit/2cycle parallel (RGB565) ;lcd_cpu_te 0:frame auto trigger; 1:frame triggered by te rising edge; 2:frame triggered by te falling edge; ;lcd_dsi_if 0:video mode; 1: Command mode; 2:video burst mode ;lcd_dsi_te 0:frame auto trigger; 1:frame triggered by te rising edge; 2:frame triggered by te falling edge; ;lcd_x: lcd horizontal resolution ;lcd_y: lcd vertical resolution ;lcd_width: width of lcd in mm ;lcd_height: height of lcd in mm ;lcd_dclk_freq: in MHZ unit ;lcd_pwm_freq: in HZ unit ;lcd_pwm_pol: lcd backlight PWM polarity ;lcd_pwm_max_limit lcd backlight PWM max limit(<=255) ;lcd_hbp: hsync back porch(pixel) + hsync plus width(pixel); ;lcd_ht: hsync total cycle(pixel) ;lcd_vbp: vsync back porch(line) + vysnc plus width(line) ;lcd_vt: vysnc total cycle(line) ;lcd_hspw: hsync plus width(pixel) ;lcd_vspw: vysnc plus width(pixel) ;lcd_lvds_if: 0:single link; 1:dual link ;lcd_lvds_colordepth: 0:8bit; 1:6bit ;lcd_lvds_mode: 0:NS mode; 1:JEIDA mode ;lcd_frm: 0:disable; 1:enable rgb666 dither; 2:enable rgb656 dither ;lcd_io_phase: 0:noraml; 1:intert phase(0~3bit: vsync phase; 4~7bit:hsync phase; ; 8~11bit:dclk phase; 12~15bit:de phase) ;lcd_gamma_en lcd gamma correction enable ;lcd_bright_curve_en lcd bright curve correction enable ;lcd_cmap_en lcd color map function enable ;deu_mode 0:smoll lcd screen; 1:large lcd screen(larger than 10inch) ;lcdgamma4iep: Smart Backlight parameter, lcd gamma vale * 10; ; decrease it while lcd is not bright enough; increase while lcd is too bright ;smart_color 90:normal lcd screen 65:retina lcd screen(9.7inch) ;Pin setting for special function ie.LVDS, RGB data or vsync ; name(donot care) = port:PD12<pin function><pull up or pull down><drive ability><output level> ;Pin setting for gpio: ; lcd_gpio_X = port:PD12<pin function><pull up or pull down><drive ability><output level> ;Pin setting for backlight enable pin ; lcd_bl_en = port:PD12<pin function><pull up or pull down><drive ability><output level> ;fsync setting, pulse to csi ;lcd_fsync_en (0:disable fsync,1:enable) ;lcd_fsync_act_time (active time of fsync, unit:pixel) ;lcd_fsync_dis_time (disactive time of fsync, unit:pixel) ;lcd_fsync_pol (0:positive;1:negative) ;gpio config: <&pio for cpu or &r_pio for cpus, port, port num, pio function, pull up or pull down(default 0), driver level(default 1), data> ;For dual link lvds: use lvds2link_pins_a and lvds2link_pins_b instead ;For rgb24: use rgb24_pins_a and rgb24_pins_b instead ;For lvds1: use lvds1_pins_a and lvds1_pins_b instead ;For lvds0: use lvds0_pins_a and lvds0_pins_b instead ;----------------------------------------------------------------------------------*/ &lcd0 { lcd_used = <1>; lcd_driver_name = "st7701s_rgb"; lcd_if = <0>; lcd_hv_if = <0>; lcd_width = <70>; lcd_height = <72>; lcd_x = <480>; lcd_y = <480>; lcd_dclk_freq = <19>; lcd_hbp = <60>; lcd_ht = <612>; lcd_hspw = <12>; lcd_vbp = <18>; lcd_vt = <520>; lcd_vspw = <4>; lcd_backlight = <50>; lcd_pwm_used = <1>; lcd_pwm_ch = <7>; lcd_pwm_freq = <20000>; lcd_pwm_pol = <1>; lcd_bright_curve_en = <0>; lcd_frm = <1>; lcd_io_phase = <0x0000>; lcd_gamma_en = <0>; lcd_cmap_en = <0>; lcd_hv_clk_phase= <0>; lcd_hv_sync_polarity= <0>; lcd_rb_swap = <0>; lcd_power = "vcc-lcd"; lcd_pin_power = "vcc-pd"; lcd_gpio_0 = <&pio PG 13 GPIO_ACTIVE_HIGH>; lcd_gpio_1 = <&pio PE 14 GPIO_ACTIVE_HIGH>; lcd_gpio_2 = <&pio PE 12 GPIO_ACTIVE_HIGH>; lcd_gpio_3 = <&pio PE 15 GPIO_ACTIVE_HIGH>; pinctrl-0 = <&rgb18_pins_a>; pinctrl-1 = <&rgb18_pins_b>; }; &hdmi { hdmi_used = <1>; hdmi_power_cnt = <0>; hdmi_cts_compatibility = <1>; hdmi_hdcp_enable = <1>; hdmi_hdcp22_enable = <0>; hdmi_cec_support = <1>; hdmi_cec_super_standby = <0>; ddc_en_io_ctrl = <0>; power_io_ctrl = <0>; }; &pwm0 { pinctrl-names = "active", "sleep"; pinctrl-0 = <&pwm0_pin_a>; pinctrl-1 = <&pwm0_pin_b>; status = "okay"; }; &pwm2 { pinctrl-names = "active", "sleep"; pinctrl-0 = <&pwm2_pin_a>; pinctrl-1 = <&pwm2_pin_b>; status = "okay"; }; &pwm7 { pinctrl-names = "active", "sleep"; pinctrl-0 = <&pwm7_pin_a>; pinctrl-1 = <&pwm7_pin_b>; status = "okay"; }; &rtp { allwinner,tp-sensitive-adjust = <0xf>; allwinner,filter-type = <0x1>; allwinner,ts-attached; status = "disabled"; }; &gpadc { channel_num = <2>; channel_select = <3>; channel_data_select = <3>; channel_compare_select = <3>; channel_cld_select = <3>; channel_chd_select = <3>; channel0_compare_lowdata = <1700000>; channel0_compare_higdata = <1200000>; channel1_compare_lowdata = <460000>; channel1_compare_higdata = <1200000>; status = "disabled"; }; &s_cir0 { pinctrl-names = "default", "sleep"; pinctrl-0 = <&s_cir0_pins_a>; pinctrl-1 = <&s_cir0_pins_b>; status = "disabled"; }; &ir1 { pinctrl-names = "default", "sleep"; pinctrl-0 = <&ir1_pins_a>; pinctrl-1 = <&ir1_pins_b>; status = "disabled"; };
-
是这个 rgb18_20_pins_a 吗?
但是 LCD0 用得是这个: rgb18_pins_a
-
好像是因为没在linux源码仓库添加st7701_rgb的驱动。
先试试加上st7701_rgb的驱动
-
@whycan 其实用的是sun20iw1p1.dtsi里面的rgb18_pins_a
-
附上uboot的dts
/* * Allwinner Technology CO., Ltd. sun20iw1p1 soc board. * * soc board support. */ &platform { eraseflag = <1>; next_work = <3>; debug_mode = <1>; }; &target { boot_clock = <1008>; /*CPU boot frequency, Unit: MHz*/ storage_type = <0xffffffff>; /*boot medium, 0-nand, 1-card0, 2-card2, -1(defualt)auto scan*/ burn_key = <0>; /*1:support burn key; 0:not support burn key*/ dragonboard_test = <0>; /*1:support card boot dragonboard; 0:not support card boot dragonboard*/ }; &charger0 { pmu_safe_vol = <3500>; }; &twi6 { clock-frequency = <200000>; pinctrl-0 = <&s_twi0_pins_a>; no_suspend = <1>; twi_drv_used = <1>; status = "okay"; }; &pwm2_pin_a { pins = "PD18"; function = "pwm2"; muxsel = <5>; drive-strength = <10>; bias-pull-up; }; &pwm2_pin_b { pins = "PD18"; muxsel = <0>; function = "gpio_in"; }; &pwm2 { pinctrl-names = "active", "sleep"; pinctrl-0 = <&pwm2_pin_a>; pinctrl-1 = <&pwm2_pin_b>; status = "okay"; }; &pwm7_pin_a { pins = "PD22"; function = "pwm7"; muxsel = <5>; drive-strength = <10>; bias-pull-up; }; &pwm7_pin_b { pins = "PD22"; muxsel = <0>; function = "gpio_in"; }; &pwm7 { pinctrl-names = "active", "sleep"; pinctrl-0 = <&pwm7_pin_a>; pinctrl-1 = <&pwm7_pin_b>; status = "okay"; }; &sdc0_pins_a { allwinner,pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5"; allwinner,function = "sdc0"; allwinner,muxsel = <2>; allwinner,drive = <3>; allwinner,pull = <1>; pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5"; function = "sdc0"; drive-strength = <30>; bias-pull-up; power-source = <3300>; }; &sdc0_pins_b { pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5"; function = "sdc0"; drive-strength = <30>; bias-pull-up; power-source = <1800>; }; &sdc0_pins_c { pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5"; function = "gpio_in"; }; &sdc2_pins_a { allwinner,pins = "PC2", "PC3", "PC4", "PC5", "PC6", "PC7"; allwinner,function = "sdc2"; allwinner,muxsel = <3>; allwinner,drive = <3>; allwinner,pull = <1>; pins = "PC2", "PC3", "PC4", "PC5", "PC6", "PC7"; function = "sdc2"; drive-strength = <30>; bias-pull-up; }; &sdc2_pins_b { pins = "PC2", "PC3", "PC4", "PC5", "PC6", "PC7"; function = "gpio_in"; }; &nand0_pins_a { allwinner,pins = "PC0", "PC1", "PC2", "PC5", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16"; allwinner,pname= "nand0_we", "nand0_ale","nand0_cle", "nand0_nre", "nand0_d0", "nand0_d1", "nand0_d2", "nand0_d3", "nand0_d4", "nand0_d5", "nand0_d6", "nand0_d7", "nand0_ndqs"; allwinner,function = "nand0"; allwinner,muxsel = <2>; allwinner,drive = <1>; allwinner,pull = <0>; }; &nand0_pins_b { allwinner,pins = "PC4", "PC6", "PC03", "PC07"; allwinner,pname= "nand0_ce0", "nand0_rb0", "nand0_ce1", "nand0_rb1"; allwinner,function = "nand0"; allwinner,muxsel = <2>; allwinner,drive = <1>; allwinner,pull = <1>; /* only RB&CE should be pulled up */ }; &nand0_pins_c { allwinner,pins = "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16"; allwinner,function = "io_disabled"; allwinner,muxsel = <7>; allwinner,drive = <1>; allwinner,pull = <0>; }; &card0_boot_para { /* Avoid dtc compiling warnings. @TODO: Developer should modify this to the actual value */ /* reg = <0x0 0x2 0x0 0x0>; [> Avoid dtc compiling warnings. @TODO: Developer should modify this to the actual value <] */ device_type = "card0_boot_para"; card_ctrl = <0x0>; card_high_speed = <0x1>; card_line = <0x4>; pinctrl-0 = <&sdc0_pins_a>; }; &card2_boot_para { /* Avoid dtc compiling warnings. @TODO: Developer should modify this to the actual value */ /* reg = <0x0 0x3 0x0 0x0>; [> Avoid dtc compiling warnings. @TODO: Developer should modify this to the actual value <] */ device_type = "card2_boot_para"; card_ctrl = <0x2>; card_high_speed = <0x1>; card_line = <0x4>; pinctrl-0 = <&sdc2_pins_a>; sdc_ex_dly_used = <0x2>; sdc_tm4_hs200_max_freq = <150>; sdc_tm4_hs400_max_freq = <100>; }; &gpio_bias { /* Avoid dtc compiling warnings. @TODO: Developer should modify this to the actual value */ device_type = "gpio_bias"; }; &nand0 { compatible = "allwinner,sun20iw1-nand"; device_type = "nand0"; //reg = <0x0 0x04011000 0x0 0x1000>;/* nand0 */ pinctrl-names = "default", "sleep"; pinctrl-0 = <&nand0_pins_a &nand0_pins_b>; pinctrl-1 = <&nand0_pins_c>; nand0_regulator1 = "vcc-nand"; nand0_regulator2 = "none"; nand0_cache_level = <0x55aaaa55>; nand0_flush_cache_num = <0x55aaaa55>; nand0_capacity_level = <0x55aaaa55>; nand0_id_number_ctl = <0x55aaaa55>; nand0_print_level = <0x55aaaa55>; nand0_p0 = <0x55aaaa55>; nand0_p1 = <0x55aaaa55>; nand0_p2 = <0x55aaaa55>; nand0_p3 = <0x55aaaa55>; chip_code = "sun20iw1"; status = "disabled"; }; &disp { disp_init_enable = <1>; disp_mode = <0>; screen0_output_type = <1>; screen0_output_mode = <4>; screen1_output_type = <3>; screen1_output_mode = <10>; screen1_output_format = <0>; screen1_output_bits = <0>; screen1_output_eotf = <4>; screen1_output_cs = <257>; screen1_output_dvi_hdmi = <2>; screen1_output_range = <2>; screen1_output_scan = <0>; screen1_output_aspect_ratio = <8>; dev0_output_type = <1>; dev0_output_mode = <4>; dev0_screen_id = <0>; dev0_do_hpd = <0>; dev1_output_type = <4>; dev1_output_mode = <10>; dev1_screen_id = <1>; dev1_do_hpd = <1>; def_output_dev = <0>; hdmi_mode_check = <1>; fb0_format = <0>; fb0_width = <0>; fb0_height = <0>; fb1_format = <0>; fb1_width = <0>; fb1_height = <0>; chn_cfg_mode = <1>; disp_para_zone = <1>; /*VCC-LCD*/ /* dc1sw-supply = <®_dc1sw>;*/ /*VCC-DSI*/ /* eldo3-supply = <®_eldo3>;*/ /*VCC-PD*/ /* dcdc1-supply = <®_dcdc1>;*/ }; &lcd0 { lcd_used = <1>; lcd_driver_name = "st7701s_rgb"; lcd_if = <0>; lcd_hv_if = <0>; lcd_width = <70>; lcd_height = <72>; lcd_x = <480>; lcd_y = <480>; lcd_dclk_freq = <19>; lcd_hbp = <60>; lcd_ht = <612>; lcd_hspw = <12>; lcd_vbp = <18>; lcd_vt = <520>; lcd_vspw = <4>; lcd_backlight = <50>; lcd_pwm_used = <1>; lcd_pwm_ch = <7>; lcd_pwm_freq = <20000>; lcd_pwm_pol = <1>; lcd_bright_curve_en = <0>; lcd_frm = <1>; lcd_io_phase = <0x0000>; lcd_gamma_en = <0>; lcd_cmap_en = <0>; lcd_hv_clk_phase= <0>; lcd_hv_sync_polarity= <0>; lcd_power = "vcc-lcd"; lcd_pin_power = "vcc-pd"; lcd_gpio_0 = <&pio PG 13 GPIO_ACTIVE_HIGH>; lcd_gpio_1 = <&pio PE 14 GPIO_ACTIVE_HIGH>; lcd_gpio_2 = <&pio PE 12 GPIO_ACTIVE_HIGH>; lcd_gpio_3 = <&pio PE 15 GPIO_ACTIVE_HIGH>; pinctrl-0 = <&rgb18_pins_a>; pinctrl-1 = <&rgb18_pins_b>; }; &hdmi { hdmi_used = <1>; hdmi_power_cnt = <0>; hdmi_hdcp_enable = <1>; hdmi_hdcp22_enable = <0>; hdmi_cec_support = <1>; hdmi_cec_super_standby = <0>; ddc_en_io_ctrl = <0>; power_io_ctrl = <0>; }; &aliases { nand0 = &nand0; twi6 = &twi6; pwm = &pwm; pwm0 = &pwm0; pwm1 = &pwm1; pwm2 = &pwm2; pwm3 = &pwm3; pwm4 = &pwm4; pwm5 = &pwm5; pwm6 = &pwm6; pwm7 = &pwm7; disp = &disp; hdmi = &hdmi; lcd0 = &lcd0; lcd1 = &lcd1; eink = &eink; spi0 = &spi0; };
-
附上log
[34]HELLO! BOOT0 is starting! [37]BOOT0 commit : 88480af [39]set pll start [41]periph0 has been enabled [44]set pll end [45][pmu]: bus read error [48]board init ok [50]get_pmu_exist() = -1 [52]ddr_efuse_type: 0x0 [54]trefi:7.8ms [56][AUTO DEBUG] single rank and full DQ! [60]ddr_efuse_type: 0x0 [63]trefi:7.8ms [65][AUTO DEBUG] rank 0 row = 15 [68][AUTO DEBUG] rank 0 bank = 8 [71][AUTO DEBUG] rank 0 page size = 2 KB [75]DRAM BOOT DRIVE INFO: V0.33 [78]DRAM CLK = 792 MHz [80]DRAM Type = 3 (2:DDR2,3:DDR3) [83]DRAMC ZQ value: 0x7b7bfb [86]DRAM ODT value: 0x42. [88]ddr_efuse_type: 0x0 [91]DRAM SIZE =512 M [93]dram_tpr4:0x0 [95]PLL_DDR_CTRL_REG:0xf8004100 [98]DRAM_CLK_REG:0xc0000000 [100][TIMING DEBUG] MR2= 0x18 [105]DRAM simple test OK. [107]dram size =512 [109]card no is 0 [110]sdcard 0 line count 4 [113][mmc]: mmc driver ver 2021-04-2 16:45 [122][mmc]: Wrong media type 0x0 [125][mmc]: ***Try SD card 0*** [134][mmc]: HSSDR52/SDR25 4 bit [137][mmc]: 50000000 Hz [139][mmc]: 59638 MB [141][mmc]: ***SD/MMC 0 init OK!!!*** [195]Loading boot-pkg Succeed(index=0). [198]Entry_name = opensbi [201]Entry_name = u-boot [205]Entry_name = dtb [207]mmc not para [209]Jump to second Boot. OpenSBI auto-t113-linux-V0.8-2-g053d088 ____ _____ ____ _____ / __ \ / ____| _ \_ _| | | | |_ __ ___ _ __ | (___ | |_) || | | | | | '_ \ / _ \ '_ \ \___ \| _ < | | | |__| | |_) | __/ | | |____) | |_) || |_ \____/| .__/ \___|_| |_|_____/|____/_____| | | |_| Platform Name : T-HEAD Xuantie Platform Platform HART Features : RV64ACDFIMSUVX Platform Max HARTs : 1 Current Hart : 0 Firmware Base : 0x41fc0400 Firmware Size : 75 KB Runtime SBI Version : 0.2 MIDELEG : 0x0000000000000222 MEDELEG : 0x000000000000b1ff PMP0 : 0x0000000041fc0000-0x0000000041fdffff (A) PMP1 : 0x0000000040000000-0x000000007fffffff (A,R,W,X) PMP2 : 0x0000000080000000-0x00000000bfffffff (A,R,W,X) PMP3 : 0x0000000000020000-0x0000000000027fff (A,? U-Boot 2018.05-g24521d6-dirty-config-dirty (Jul 19 2022 - 14:31:38 +0800) Allwinner Technology [00.296]DRAM: 512 MiB [00.298]Relocation Offset is: 1dee7000 [00.302]secure enable bit: 0 [00.305]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz MBus=300Mhz [00.311]flash init start [00.313]workmode = 0,storage type = 1 [00.317][mmc]: mmc driver ver uboot2018:2021-11-19 15:38:00 [00.322][mmc]: get sdc_type fail and use default host:tm1. [00.328][mmc]: can't find node "mmc0",will add new node [00.333][mmc]: fdt err returned <no error> [00.337][mmc]: Using default timing para [00.341][mmc]: SUNXI SDMMC Controller Version:0x50310 [00.358][mmc]: card_caps:0x3000000a [00.361][mmc]: host_caps:0x3000003f [00.364]sunxi flash init ok [00.367]line:703 init_clocks [00.370]drv_disp_init request pwm success, pwm7:pwm7:0x2000c00. [00.386]drv_disp_init finish [00.389]boot_gui_init:start [00.392]set disp.dev2_output_type fail. using defval=0 [00.398]boot_gui_init:finish [00.418]=====================LCD_panel_init partno erro : can't find partition bootloader 54 bytes read in 3 ms (17.6 KiB/s) [00.652]bmp_name=bootlogo.bmp size 3072054 [00.743]=====================LCD_bl_open [00.747]LCD open finish 3072054 bytes read in 145 ms (20.2 MiB/s) no support big size bmp[800x1280] on fb[480x480] [00.813]show bmp on fb failed !-1 [00.849]Loading Environment from SUNXI_FLASH... OK [00.871]out of usb burn from boot: not need burn key [00.897]Item0 (Map) magic is bad [00.900]the secure storage item0 copy0 magic is bad [00.926]Item0 (Map) magic is bad [00.929]the secure storage item0 copy1 magic is bad [00.934]Item0 (Map) magic is bad partno erro : can't find partition private root_partition is rootfs set root to /dev/mmcblk0p5 [00.951]update part info [00.956]update bootcmd [00.962]change working_fdt 0x5eaa6da0 to 0x5ea86da0 disable nand error: FDT_ERR_BADPATH No reserved memory region found in source FDT [00.993]update dts noncached_alloc(): addr = 0x5ebf4080 noncached_alloc(): addr = 0x5ebf40c0 noncached_alloc(): addr = 0x5ebf4100 noncached_alloc(): addr = 0x5ebf4940 geth_sys_init:634: get node 'gmac0' error geth_sys_init fail! [01.013]Board Net Initialization Failed [01.017]No ethernet found. Hit any key to stop autoboot: 0 dsp0:uart config fail dsp0:gpio init config fail dsp0:sharespace config fail dsp0 version is r528-tina-v1.0.0-release-37-g735b6b4-dirty DSP0 start ok, img length 254860, booting from 0x400660 [01.311]no vendor_boot partition is found Android's image name: d1-h-nezha Detect comp gzip [01.562] Starting kernel ... [01.564][mmc]: MMC Device 2 not found [01.568][mmc]: mmc 2 not find, so not exit [ 0.000000] Linux version 5.4.61 (lewin@mint0) (riscv64-unknown-linux-gnu-gcc (C-SKY RISCV Tools V1.8.4 B20200702) 8.1.0, GNU ld (GNU Binutils) 2.32) #55 PREEMPT Tue Jul 19 06:40:47 UTC 2022 [ 0.000000] cma: Reserved 8 MiB at 0x000000005f800000 [ 0.000000] Zone ranges: [ 0.000000] DMA32 [mem 0x0000000040000000-0x000000005fffffff] [ 0.000000] Normal empty [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000040000000-0x000000005fffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000005fffffff] [ 0.000000] On node 0 totalpages: 131072 [ 0.000000] DMA32 zone: 1792 pages used for memmap [ 0.000000] DMA32 zone: 0 pages reserved [ 0.000000] DMA32 zone: 131072 pages, LIFO batch:31 [ 0.000000] elf_hwcap is 0x20112d [ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 [ 0.000000] pcpu-alloc: [0] 0 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 129280 [ 0.000000] Kernel command line: earlyprintk=sunxi-uart,0x02500000 clk_ignore_unused initcall_debug=0 console=ttyS0,115200 loglevel=8 root=/dev/mmcblk0p5 init=/sbin/init partitions=boot-resource@mmcblk0p1:env@mmcblk0p2:env-redund@mmcblk0p3:boot@mmcblk0p4:rootfs@mmcblk0p5:dsp0@mmcblk0p6:recovery@mmcblk0p7:UDISK@mmcblk0p8 cma=8M snum= mac_addr= wifi_mac= bt_mac= specialstr= gpt=1 androidboot.hardware=sun20iw1p1 boot_type=1 androidboot.boot_type=1 gpt=1 uboot_message=2018.05-g24521d6-dirty-config-dirty(07/19/2022-14:31:38) mbr_offset=1556480 [ 0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes, linear) [ 0.000000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes, linear) [ 0.000000] Sorting __ex_table... [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.000000] Memory: 497212K/524288K available (6335K kernel code, 589K rwdata, 2134K rodata, 184K init, 260K bss, 18884K reserved, 8192K cma-reserved) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] rcu: Preemptible hierarchical RCU implementation. [ 0.000000] Tasks RCU enabled. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies. [ 0.000000] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0 [ 0.000000] plic: mapped 200 interrupts with 1 handlers for 2 contexts. [ 0.000000] riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [0] [ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns [ 0.000006] sched_clock: 64 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns [ 0.000023] riscv_timer_clockevent depends on broadcast, but no broadcast function available [ 0.000315] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns [ 0.000933] Console: colour dummy device 80x25 [ 0.000969] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000) [ 0.000985] pid_max: default: 32768 minimum: 301 [ 0.001155] Mount-cache hash table entries: 1024 (order: 1, 8192 bytes, linear) [ 0.001174] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes, linear) [ 0.002739] ASID allocator initialised with 65536 entries [ 0.002892] rcu: Hierarchical SRCU implementation. [ 0.003500] devtmpfs: initialized [ 0.016833] random: get_random_u32 called from bucket_table_alloc.isra.31+0x4e/0x15e with crng_init=0 [ 0.017708] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.017738] futex hash table entries: 256 (order: 0, 6144 bytes, linear) [ 0.018119] pinctrl core: initialized pinctrl subsystem [ 0.019368] NET: Registered protocol family 16 [ 0.021189] DMA: preallocated 256 KiB pool for atomic allocations [ 0.021790] cpuidle: using governor menu [ 0.064443] rtc_ccu: sunxi ccu init OK [ 0.070747] clock: sunxi ccu init OK [ 0.071591] clock: sunxi ccu init OK [ 0.103615] iommu: Default domain type: Translated [ 0.103782] sunxi iommu: irq = 4 [ 0.104861] SCSI subsystem initialized [ 0.105199] usbcore: registered new interface driver usbfs [ 0.105277] usbcore: registered new interface driver hub [ 0.105378] usbcore: registered new device driver usb [ 0.105555] mc: Linux media interface: v0.10 [ 0.105623] videodev: Linux video capture interface: v2.00 [ 0.106649] sunxi-msgbox-amp 3003000.msgbox: invalid resource [ 0.107438] Advanced Linux Sound Architecture Driver Initialized. [ 0.108048] Bluetooth: Core ver 2.22 [ 0.108155] NET: Registered protocol family 31 [ 0.108165] Bluetooth: HCI device and connection manager initialized [ 0.108185] Bluetooth: HCI socket layer initialized [ 0.108200] Bluetooth: L2CAP socket layer initialized [ 0.108236] Bluetooth: SCO socket layer initialized [ 0.108521] pwm module init! [ 0.110061] g2d 5410000.g2d: Adding to iommu group 0 [ 0.110613] G2D: rcq version initialized.major:250 [ 0.111287] input: sunxi-keyboard as /devices/virtual/input/input0 [ 0.112676] clocksource: Switched to clocksource riscv_clocksource [ 0.125220] sun8iw20-pinctrl 2000000.pinctrl: initialized sunXi PIO driver [ 0.140333] thermal_sys: Registered thermal governor 'user_space' [ 0.140338] thermal_sys: Registered thermal governor 'power_allocator' [ 0.140850] NET: Registered protocol family 2 [ 0.141602] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear) [ 0.141642] TCP established hash table entries: 4096 (order: 3, 32768 bytes, linear) [ 0.141702] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear) [ 0.141749] TCP: Hash tables configured (established 4096 bind 4096) [ 0.141882] UDP hash table entries: 256 (order: 1, 8192 bytes, linear) [ 0.141921] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear) [ 0.142154] NET: Registered protocol family 1 [ 0.144666] Initialise system trusted keyrings [ 0.144878] workingset: timestamp_bits=62 max_order=17 bucket_order=0 [ 0.152646] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.173667] Key type asymmetric registered [ 0.173681] Asymmetric key parser 'x509' registered [ 0.173701] io scheduler mq-deadline registered [ 0.173711] io scheduler kyber registered [ 0.173730] atomic64_test: passed [ 0.174922] [DISP]disp_module_init [ 0.175459] disp 5000000.disp: Adding to iommu group 0 [ 0.176070] [DISP] disp_init,line:2386: [ 0.176075] smooth display screen:0 type:1 mode:4 [ 0.199450] disp 5000000.disp: 5000000.disp supply vcc-lcd not found, using dummy regulator [ 0.199713] disp 5000000.disp: 5000000.disp supply vcc-pd not found, using dummy regulator [ 0.210471] panel name: default_lcd [ 0.210486] panel name: st7701s [ 0.210493] panel name: st7701s_rgb [ 0.210509] panel name: tft08006 [ 0.210516] panel name: super_lcd_driver [ 0.210546] display_fb_request,fb_id:0 [ 0.219823] Freeing logo buffer memory: 900K [ 0.220267] disp_al_manager_apply ouput_type:1 [ 0.220383] [DISP] lcd_clk_config,line:732: [ 0.220395] disp 0, clk: pll(114000000),clk(114000000),dclk(19000000) dsi_rate(114000000) [ 0.220395] clk real:pll(288000000),clk(288000000),dclk(48000000) dsi_rate(0) [ 0.220774] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pd not found, using dummy regulator [ 0.221687] [DISP]disp_module_init finish [ 0.222541] sunxi_sid_init()551 - insmod ok [ 0.223182] pwm-regulator: supplied by regulator-dummy [ 0.230218] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pb not found, using dummy regulator [ 0.230603] uart uart0: get regulator failed [ 0.230630] uart uart0: uart0 supply uart not found, using dummy regulator [ 0.230986] uart0: ttyS0 at MMIO 0x2500000 (irq = 18, base_baud = 1500000) is a SUNXI [ 0.231012] sw_console_setup()1808 - console setup baud 115200 parity n bits 8, flow n [ 1.032118] printk: console [ttyS0] enabled [ 1.037725] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pg not found, using dummy regulator [ 1.049176] uart uart1: get regulator failed [ 1.054043] uart uart1: uart1 supply uart not found, using dummy regulator [ 1.062088] uart1: ttyS1 at MMIO 0x2500400 (irq = 19, base_baud = 1500000) is a SUNXI [ 1.072007] misc dump reg init [ 1.076326] sunxi-rfkill soc@3000000:rfkill@0: module version: v1.0.9 [ 1.083611] sunxi-rfkill soc@3000000:rfkill@0: devm_pinctrl_get() failed! [ 1.091210] sunxi-rfkill soc@3000000:rfkill@0: get gpio chip_en failed [ 1.098557] sunxi-rfkill soc@3000000:rfkill@0: get gpio power_en failed [ 1.106001] sunxi-rfkill soc@3000000:rfkill@0: wlan_busnum (1) [ 1.112528] sunxi-rfkill soc@3000000:rfkill@0: Missing wlan_power. [ 1.119490] sunxi-rfkill soc@3000000:rfkill@0: wlan clock[0] (32k-fanout1) [ 1.127257] sunxi-rfkill soc@3000000:rfkill@0: wlan_regon gpio=204 assert=1 [ 1.135153] sunxi-rfkill soc@3000000:rfkill@0: wlan_hostwake gpio=202 assert=1 [ 1.143326] sunxi-rfkill soc@3000000:rfkill@0: wakeup source is enabled [ 1.150956] sunxi-rfkill soc@3000000:rfkill@0: Missing bt_power. [ 1.157763] sunxi-rfkill soc@3000000:rfkill@0: bt clock[0] (32k-fanout1) [ 1.165332] sunxi-rfkill soc@3000000:rfkill@0: bt_rst gpio=210 assert=0 [ 1.173601] [ADDR_MGT] addr_mgt_probe: module version: v1.0.10 [ 1.181143] [ADDR_MGT] addr_mgt_probe: success. [ 1.187527] libphy: Fixed MDIO Bus: probed [ 1.192090] CAN device driver interface [ 1.197274] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pe not found, using dummy regulator [ 1.208574] sunxi gmac driver's version: 1.0.0 [ 1.213793] gmac-power0: NULL [ 1.217102] gmac-power1: NULL [ 1.220434] gmac-power2: NULL [ 1.225067] Failed to alloc md5 [ 1.228604] eth0: Use random mac address [ 1.233419] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 1.240730] sunxi-ehci: EHCI SUNXI driver [ 1.245834] get ehci0-controller wakeup-source is fail. [ 1.251762] sunxi ehci0-controller don't init wakeup source [ 1.258108] [sunxi-ehci0]: probe, pdev->name: 4101000.ehci0-controller, sunxi_ehci: 0xffffffe000935390, 0x:ffffffd004079000, irq_no:2e [ 1.271680] [sunxi-ehci0]: Not init ehci0 [ 1.276576] get ehci1-controller wakeup-source is fail. [ 1.282534] sunxi ehci1-controller don't init wakeup source [ 1.288861] [sunxi-ehci1]: probe, pdev->name: 4200000.ehci1-controller, sunxi_ehci: 0xffffffe000935758, 0x:ffffffd00407d000, irq_no:31 [ 1.302437] sunxi-ehci 4200000.ehci1-controller: 4200000.ehci1-controller supply drvvbus not found, using dummy regulator [ 1.315015] sunxi-ehci 4200000.ehci1-controller: 4200000.ehci1-controller supply hci not found, using dummy regulator [ 1.327263] sunxi-ehci 4200000.ehci1-controller: EHCI Host Controller [ 1.334571] sunxi-ehci 4200000.ehci1-controller: new USB bus registered, assigned bus number 1 [ 1.344427] sunxi-ehci 4200000.ehci1-controller: irq 49, io mem 0x04200000 [ 1.372722] sunxi-ehci 4200000.ehci1-controller: USB 2.0 started, EHCI 1.00 [ 1.381431] hub 1-0:1.0: USB hub found [ 1.385761] hub 1-0:1.0: 1 port detected [ 1.390931] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 1.397948] sunxi-ohci: OHCI SUNXI driver [ 1.403045] get ohci0-controller wakeup-source is fail. [ 1.409009] sunxi ohci0-controller don't init wakeup source [ 1.415308] [sunxi-ohci0]: probe, pdev->name: 4101400.ohci0-controller, sunxi_ohci: 0xffffffe000935ee8 [ 1.425743] [sunxi-ohci0]: Not init ohci0 [ 1.430544] get ohci1-controller wakeup-source is fail. [ 1.436564] sunxi ohci1-controller don't init wakeup source [ 1.442857] [sunxi-ohci1]: probe, pdev->name: 4200400.ohci1-controller, sunxi_ohci: 0xffffffe0009362b0 [ 1.453322] sunxi-ohci 4200400.ohci1-controller: 4200400.ohci1-controller supply drvvbus not found, using dummy regulator [ 1.465860] sunxi-ohci 4200400.ohci1-controller: 4200400.ohci1-controller supply hci not found, using dummy regulator [ 1.478175] sunxi-ohci 4200400.ohci1-controller: OHCI Host Controller [ 1.485477] sunxi-ohci 4200400.ohci1-controller: new USB bus registered, assigned bus number 2 [ 1.496300] sunxi-ohci 4200400.ohci1-controller: irq 50, io mem 0x04200400 [ 1.577683] hub 2-0:1.0: USB hub found [ 1.581916] hub 2-0:1.0: 1 port detected [ 1.587419] usbcore: registered new interface driver uas [ 1.593632] usbcore: registered new interface driver usb-storage [ 1.600434] usbcore: registered new interface driver ums-alauda [ 1.607217] usbcore: registered new interface driver ums-cypress [ 1.614073] usbcore: registered new interface driver ums-datafab [ 1.620868] usbcore: registered new interface driver ums_eneub6250 [ 1.627908] usbcore: registered new interface driver ums-freecom [ 1.634764] usbcore: registered new interface driver ums-isd200 [ 1.641472] usbcore: registered new interface driver ums-jumpshot [ 1.648424] usbcore: registered new interface driver ums-karma [ 1.655083] usbcore: registered new interface driver ums-onetouch [ 1.661989] usbcore: registered new interface driver ums-realtek [ 1.668845] usbcore: registered new interface driver ums-sddr09 [ 1.675603] usbcore: registered new interface driver ums-sddr55 [ 1.682302] usbcore: registered new interface driver ums-usbat [ 1.689431] sunxi_gpadc_init,2151, success [ 1.696246] sunxi-rtc 7090000.rtc: registered as rtc0 [ 1.702024] sunxi-rtc 7090000.rtc: setting system clock to 1970-01-01T18:51:30 UTC (67890) [ 1.711365] sunxi-rtc 7090000.rtc: sunxi rtc probed [ 1.717356] i2c /dev entries driver [ 1.721340] IR NEC protocol handler initialized [ 1.727161] sunxi cedar version 1.1 [ 1.731356] sunxi-cedar 1c0e000.ve: Adding to iommu group 0 [ 1.737693] VE: install start!!! [ 1.737693] [ 1.743259] VE: cedar-ve the get irq is 6 [ 1.743259] [ 1.749613] VE: ve_debug_proc_info:(____ptrval____), data:(____ptrval____), lock:(____ptrval____) [ 1.749613] [ 1.761235] VE: install end!!! [ 1.761235] [ 1.766339] VE: sunxi_cedar_probe [ 1.771641] sunxi-wdt 6011000.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0) [ 1.780833] Bluetooth: HCI UART driver ver 2.3 [ 1.785876] Bluetooth: HCI UART protocol H4 registered [ 1.791622] Bluetooth: HCI UART protocol BCSP registered [ 1.797594] Bluetooth: XRadio Bluetooth LPM Mode Driver Ver 1.0.10 [ 1.807626] sunxi-mmc 4020000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.21 2021-11-18 10:02) [ 1.817633] sunxi-mmc 4020000.sdmmc: ***ctl-spec-caps*** 8 [ 1.823892] sunxi-mmc 4020000.sdmmc: No vmmc regulator found [ 1.830224] sunxi-mmc 4020000.sdmmc: No vqmmc regulator found [ 1.836686] sunxi-mmc 4020000.sdmmc: No vdmmc regulator found [ 1.843149] sunxi-mmc 4020000.sdmmc: No vd33sw regulator found [ 1.849670] sunxi-mmc 4020000.sdmmc: No vd18sw regulator found [ 1.856223] sunxi-mmc 4020000.sdmmc: No vq33sw regulator found [ 1.862783] sunxi-mmc 4020000.sdmmc: No vq18sw regulator found [ 1.869722] sunxi-mmc 4020000.sdmmc: Got CD GPIO [ 1.875273] sunxi-mmc 4020000.sdmmc: set cd-gpios as 24M fail [ 1.881947] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.893124] sunxi-mmc 4020000.sdmmc: no vqmmc,Check if there is regulator [ 1.913264] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.937668] sunxi-mmc 4020000.sdmmc: detmode:gpio irq [ 1.943421] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.955684] sunxi-mmc 4021000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.21 2021-11-18 10:02) [ 1.965790] sunxi-mmc 4021000.sdmmc: ***ctl-spec-caps*** 8 [ 1.972039] sunxi-mmc 4021000.sdmmc: No vmmc regulator found [ 1.978448] sunxi-mmc 4021000.sdmmc: No vqmmc regulator found [ 1.984922] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.996519] sunxi-mmc 4021000.sdmmc: No vdmmc regulator found [ 2.002984] sunxi-mmc 4021000.sdmmc: No vd33sw regulator found [ 2.009505] sunxi-mmc 4021000.sdmmc: No vd18sw regulator found [ 2.016158] sunxi-mmc 4021000.sdmmc: No vq33sw regulator found [ 2.022752] sunxi-mmc 4021000.sdmmc: No vq18sw regulator found [ 2.029353] sunxi-mmc 4021000.sdmmc: Cann't get pin bias hs pinstate,check if needed [ 2.038413] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 2.050797] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B [ 2.062011] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator [ 2.070947] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 2.082552] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 2.106920] sunxi-mmc 4021000.sdmmc: detmode:manually by software [ 2.114619] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !! [ 2.121435] random: fast init done [ 2.125711] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pc not found, using dummy regulator [ 2.136697] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !! [ 2.143630] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 2.155468] sunxi_led_probe()1749 - start [ 2.160136] sunxi_get_str_of_property()1595 - failed to get the string of propname led_regulator! [ 2.170170] sunxi_register_led_classdev()1483 - led_classdev start [ 2.178459] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 2.191959] mmc0: host does not support reading read-only switch, assuming write-enable [ 2.202488] sunxi_led_probe()1845 - finish [ 2.207771] usbcore: registered new interface driver usbhid [ 2.214108] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B [ 2.225714] usbhid: USB HID core driver [ 2.230167] rpmsg_client_dsp_standby 3003000.msgbox.sunxi,dsp-power-msgbox.512.256: new channel: 0x200 -> 0x100! [ 2.241531] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 2.248457] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B [ 2.260110] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 2.267756] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 2.274730] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 4 timing SD-HS(SDR25) dt B [ 2.286380] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 2.293224] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B [ 2.305406] usbcore: registered new interface driver snd-usb-audio [ 2.316077] sunxi-daudio 2034000.daudio: regulator missing or invalid [ 2.323463] mmc0: new high speed SDXC card at address b368 [ 2.330911] [AUDIOCODEC][sunxi_codec_parse_params][2412]:digital_vol:0, lineout_vol:26, mic1gain:19, mic2gain:19 pa_msleep:120, pa_level:1, pa_pwr_level:1 [ 2.330911] [ 2.348920] mmcblk0: mmc0:b368 NCard 58.2 GiB [ 2.355990] [AUDIOCODEC][sunxi_codec_parse_params][2448]:adcdrc_cfg:0, adchpf_cfg:1, dacdrc_cfg:0, dachpf:0 [ 2.367631] [AUDIOCODEC][sunxi_internal_codec_probe][2609]:codec probe finished [ 2.376012] mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 [ 2.382366] debugfs: Directory '203034c.dummy_cpudai' with parent 'audiocodec' already present! [ 2.394883] [SNDCODEC][sunxi_card_init][583]:card init finished [ 2.403777] sunxi-codec-machine 2030340.sound: 2030000.codec <-> 203034c.dummy_cpudai mapping ok [ 2.415084] input: audiocodec sunxi Audio Jack as /devices/platform/soc@3000000/2030340.sound/sound/card0/input1 [ 2.427194] [SNDCODEC][sunxi_card_dev_probe][836]:register card finished [ 2.435461] sunxi-rpaf-dsp soc@3000000:rpaf-dsp@203034c: register device finished! [ 2.444011] sunxi-rpaf-dsp soc@3000000:rpaf-dsp@203034c: [rpaf_dsp0] probe finished! [ 2.453076] rpmsg_hifi 3003000.msgbox.sunxi,dsp-msgbox.514.258: id:sunxi,dsp-msgbox new channel: 0x202 -> 0x102! [ 2.464658] rpmsg_hifi 3003000.msgbox.sunxi,dsp-msgbox.514.258: rpmsg hifi[0] client driver is probed [ 2.476683] NET: Registered protocol family 10 [ 2.483173] Segment Routing with IPv6 [ 2.487465] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver [ 2.495006] NET: Registered protocol family 17 [ 2.500061] can: controller area network core (rev 20170425 abi 9) [ 2.507161] NET: Registered protocol family 29 [ 2.512171] can: raw protocol (rev 20170425) [ 2.516974] can: broadcast manager protocol (rev 20170425 t) [ 2.523359] can: netlink gateway (rev 20190810) max_hops=1 [ 2.529802] Bluetooth: RFCOMM TTY layer initialized [ 2.535385] Bluetooth: RFCOMM socket layer initialized [ 2.541192] Bluetooth: RFCOMM ver 1.11 [ 2.546439] Loading compiled-in X.509 certificates [ 2.554161] HDMI 2.0 driver init start! [ 2.558496] boot_hdmi=false [ 2.561673] ERROR: pinctrl_get for HDMI2.0 DDC fail [ 2.568735] HDMI2.0 module init end [ 2.598596] sunxi-i2c sunxi-i2c2: sunxi-i2c2 supply twi not found, using dummy regulator [ 2.614460] sunxi-i2c sunxi-i2c2: probe success [ 2.623249] debugfs: Directory '2031000.dmic' with parent 'snddmic' already present! [ 2.633448] sunxi-audio-card 2031060.sounddmic: dmic-hifi <-> 2031000.dmic mapping ok [ 2.643639] debugfs: Directory '2034000.daudio' with parent 'sndhdmi' already present! [ 2.654320] sunxi-audio-card 20340a0.sounddaudio2: 20340a4.hdmiaudio <-> 2034000.daudio mapping ok [ 2.666120] get det_vbus is fail, -84 [ 2.670204] get id is fail, -84 [ 2.675067] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 2.685997] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 2.693628] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 2.703338] clk: Not disabling unused clocks [ 2.708125] ALSA device list: [ 2.711444] #0: audiocodec [ 2.714786] cfg80211: failed to load regulatory.db [ 2.720224] #1: snddmic [ 2.723211] #2: sndhdmi [ 2.726163] alloc_fd: slot 0 not NULL! [ 2.738783] VFS: Mounted root (squashfs filesystem) readonly on device 179:5. [ 2.752289] devtmpfs: mounted [ 2.755883] Freeing unused kernel memory: 184K [ 2.760863] This architecture does not have kernel memory protection. [ 2.768162] Run /sbin/init as init process [ 3.173129] [SNDCODEC][sunxi_check_hs_detect_status][191]:plugin --> switch:3 [ 3.463374] init: Console is alive [ 3.467475] init: - watchdog - [ 3.471019] init: - preinit - [ 3.764555] [ 3.764555] insmod_device_driver [ 3.764555] [ 3.850887] sunxi_usb_udc 4100000.udc-controller: 4100000.udc-controller supply udc not found, using dummy regulator [ 3.864648] device_chose finished 139! [ 3.901635] random: procd: uninitialized urandom read (4 bytes read) formating /dev/by-name/UDISK to ext4 /etc/preinit: line 1: mkfs.ext4: not found [ 4.708354] mount_root: mounting /dev/root [ 4.714028] mount_root: loading kmods from internal overlay [ 4.847549] block: attempting to load /etc/config/fstab [ 4.874699] block: extroot: device not present, retrying in 5 seconds [ 6.462711] hdmi_hpd_sys_config_release [ 9.977010] block: extroot: cannot find device UDISK [ 9.994357] procd: - early - [ 9.997794] procd: - watchdog - [ 10.038017] random: procd: uninitialized urandom read (4 bytes read) [ 10.405018] procd: - watchdog - [ 10.408840] procd: - ubus - [ 10.412605] procd (1): /proc/115/oom_adj is deprecated, please use /proc/115/oom_score_adj instead. [ 10.492992] random: ubusd: uninitialized urandom read (4 bytes read) [ 10.673319] random: ubusd: uninitialized urandom read (4 bytes read) [ 10.711807] procd: - init - Please press Enter to activate this console. [ 11.942826] fuse: init (API version 7.31) [ 12.103643] file system registered [ 12.269745] usbcore: registered new interface driver uvcvideo [ 12.283758] configfs-gadget 4100000.udc-controller: failed to start g1: -19 [ 12.299687] USB Video Class driver (1.1.1) [ 12.672908] read descriptors [ 12.676160] read strings [ 14.928657] ======== XRADIO WIFI OPEN ======== [ 14.934590] [XRADIO] Driver Label:XR_V02.16.85_P2P_HT40_01.31 [ 14.941754] [XRADIO] Allocated hw_priv @ (____ptrval____) [ 14.949305] sunxi-rfkill soc@3000000:rfkill@0: bus_index: 1 [ 14.966950] sunxi-rfkill soc@3000000:rfkill@0: wlan power on success [ 15.236848] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B [ 15.250220] [XRADIO] Detect SDIO card 1 [ 15.262866] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator [ 15.282783] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 15.313405] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 15.328617] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 15.352616] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B [ 15.364501] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B [ 15.376755] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 4 timing SD-HS(SDR25) dt B [ 15.389686] mmc1: new high speed SDIO card at address 0001 [ 15.397062] [SBUS] XRadio Device:sdio clk=50000000 [ 15.404282] [XRADIO] XRADIO_HW_REV 1.0 detected. [ 15.513467] [XRADIO] xradio_update_dpllctrl: DPLL_CTRL Sync=0x00c00000. [ 15.611083] [XRADIO] Bootloader complete [ 20.877195] [XRADIO_ERR] xradio_firmware: Timeout waiting for FIFO. [ 20.884324] [XRADIO_ERR] xradio_load_firmware: can't download firmware. [ 20.891736] [XRADIO_ERR] xradio_load_firmware failed(-110). [ 20.899256] sunxi-rfkill soc@3000000:rfkill@0: wlan power off success [ 21.018853] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 7, RTO !! [ 21.025639] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 7, RTO !! [ 21.032389] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 7, RTO !! [ 21.039163] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 7, RTO !! [ 21.046188] mmc1: card 0001 removed [ 21.050241] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B [ 21.061591] [XRADIO] Remove SDIO card 1 [ 21.077537] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B [ 21.088757] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator [ 21.103845] xradio_core_init failed (-110)! [ 21.108968] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 21.146303] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !! [ 21.154041] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !! [ 21.160876] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 21.179328] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 21.191051] xt_time: kernel timezone is -0000 [ 21.204984] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 21.212543] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 21.220132] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 21.227718] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 21.234503] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B [ 21.246720] Error: Driver 'gt9xxnew_ts' is already registered, aborting... [ 22.527620] ======== XRADIO WIFI OPEN ======== [ 22.533224] [XRADIO] Driver Label:XR_V02.16.85_P2P_HT40_01.31 [ 22.540007] [XRADIO] Allocated hw_priv @ (____ptrval____) [ 22.552787] sunxi-rfkill soc@3000000:rfkill@0: bus_index: 1 [ 22.575991] sunxi-rfkill soc@3000000:rfkill@0: wlan power on success [ 22.783256] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B [ 22.794387] [XRADIO] Detect SDIO card 1 [ 22.802821] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator [ 22.822748] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 22.847646] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 22.862263] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 22.884874] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B [ 22.896490] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B [ 22.908375] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 4 timing SD-HS(SDR25) dt B [ 22.920908] mmc1: new high speed SDIO card at address 0001 [ 22.927920] [SBUS] XRadio Device:sdio clk=50000000 [ 22.942837] [XRADIO] XRADIO_HW_REV 1.0 detected. [ 22.993264] [XRADIO] xradio_update_dpllctrl: DPLL_CTRL Sync=0x00c00000. [ 23.032628] [XRADIO] Bootloader complete [ 28.041823] [XRADIO_ERR] xradio_firmware: Timeout waiting for FIFO. [ 28.048932] [XRADIO_ERR] xradio_load_firmware: can't download firmware. [ 28.056478] [XRADIO_ERR] xradio_load_firmware failed(-110). [ 28.064044] sunxi-rfkill soc@3000000:rfkill@0: wlan power off success [ 28.182833] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 7, RTO !! [ 28.189574] [XRADIO] Remove SDIO card 1 [ 28.189590] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 7, RTO !! [ 28.200632] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 7, RTO !! [ 28.207411] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 7, RTO !! [ 28.214429] mmc1: card 0001 removed [ 28.218483] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B [ 28.241464] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B [ 28.252755] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator [ 28.263892] xradio_core_init failed (-110)! [ 28.272792] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 28.306349] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !! [ 28.314154] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !! [ 28.320990] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 28.336182] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 28.360200] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! kmodloader done [ 28.370678] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 28.378356] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 28.386394] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !! [ 28.434655] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B Trying to connect to SWUpdate... [ 31.136964] [SNDCODEC][sunxi_card_hw_params][620]:stream_flag: 0 [ 33.122757] usb1-vbus: disabling [ 33.126538] vdd_3v3: disabling [ 43.200273] random: crng init done [ 43.204070] random: 6 urandom warning(s) missed due to ratelimiting BusyBox v1.27.2 () built-in shell (ash) _____ _ __ _ |_ _||_| ___ _ _ | | |_| ___ _ _ _ _ | | _ | || | | |__ | || || | ||_'_| | | | || | || _ | |_____||_||_|_||___||_,_| |_| |_||_|_||_|_| Tina is Based on OpenWrt! ---------------------------------------------- Tina Linux (Neptune, 61CC0487) ---------------------------------------------- root@TinaLinux:/# root@TinaLinux:/# root@TinaLinux:/# root@TinaLinux:/# root@TinaLinux:/# root@TinaLinux:/# root@TinaLinux:/# cat /sys/class/d devlink/ disp/ dma/ root@TinaLinux:/# cat /sys/kernel/debug/ asoc/ dma_buf/ mmc0/ sunxi_leds/ bdi/ enc_test/ mmc1/ suspend_stats block/ extfrag/ mtd/ ubi/ bluetooth/ fault_around_bytes pinctrl/ ubifs/ clear_warn_once gpio pm_qos/ usb/ clk/ hid/ pwm wakeup_sources device_component/ ieee80211/ regmap/ devices_deferred ion/ regulator/ dispdbg/ memblock/ sleep_time root@TinaLinux:/# cat /sys/kernel/debug/p pinctrl/ pm_qos/ pwm root@TinaLinux:/# cat /sys/kernel/debug/pinctrl/2000000.pinctrl/pin pinconf-groups pingroups pinmux-pins pinconf-pins pinmux-functions pins root@TinaLinux:/# cat /sys/kernel/debug/pinctrl/2000000.pinctrl/pin pinconf-groups pingroups pinmux-pins pinconf-pins pinmux-functions pins root@TinaLinux:/# cat /sys/kernel/debug/pinctrl/2000000.pinctrl/pinmux-pins Pinmux settings per pin Format: pin (name): mux_owner|gpio_owner (strict) hog? pin 32 (PB0): device 2502800.twi function gpio_in group PB0 pin 33 (PB1): device 2502800.twi function gpio_in group PB1 pin 34 (PB2): UNCLAIMED pin 35 (PB3): UNCLAIMED pin 36 (PB4): UNCLAIMED pin 37 (PB5): UNCLAIMED pin 38 (PB6): UNCLAIMED pin 39 (PB7): UNCLAIMED pin 40 (PB8): device 2500000.uart function uart0 group PB8 pin 41 (PB9): device 2500000.uart function uart0 group PB9 pin 42 (PB10): UNCLAIMED pin 43 (PB11): device 2031000.dmic function io_disabled group PB11 pin 44 (PB12): UNCLAIMED pin 64 (PC0): device 2008000.ledc function ledc group PC0 pin 65 (PC1): UNCLAIMED pin 66 (PC2): UNCLAIMED pin 67 (PC3): UNCLAIMED pin 68 (PC4): UNCLAIMED pin 69 (PC5): UNCLAIMED pin 70 (PC6): UNCLAIMED pin 71 (PC7): UNCLAIMED pin 96 (PD0): UNCLAIMED pin 97 (PD1): UNCLAIMED pin 98 (PD2): UNCLAIMED pin 99 (PD3): UNCLAIMED pin 100 (PD4): UNCLAIMED pin 101 (PD5): UNCLAIMED pin 102 (PD6): UNCLAIMED pin 103 (PD7): UNCLAIMED pin 104 (PD8): UNCLAIMED pin 105 (PD9): UNCLAIMED pin 106 (PD10): UNCLAIMED pin 107 (PD11): UNCLAIMED pin 108 (PD12): UNCLAIMED pin 109 (PD13): UNCLAIMED pin 110 (PD14): UNCLAIMED pin 111 (PD15): UNCLAIMED pin 112 (PD16): UNCLAIMED pin 113 (PD17): UNCLAIMED pin 114 (PD18): UNCLAIMED pin 115 (PD19): UNCLAIMED pin 116 (PD20): UNCLAIMED pin 117 (PD21): UNCLAIMED pin 118 (PD22): UNCLAIMED pin 128 (PE0): device 4500000.eth function gmac0 group PE0 pin 129 (PE1): device 4500000.eth function gmac0 group PE1 pin 130 (PE2): device 4500000.eth function gmac0 group PE2 pin 131 (PE3): device 4500000.eth function gmac0 group PE3 pin 132 (PE4): device 4500000.eth function gmac0 group PE4 pin 133 (PE5): device 4500000.eth function gmac0 group PE5 pin 134 (PE6): device 4500000.eth function gmac0 group PE6 pin 135 (PE7): device 4500000.eth function gmac0 group PE7 pin 136 (PE8): device 4500000.eth function gmac0 group PE8 pin 137 (PE9): device 4500000.eth function gmac0 group PE9 pin 138 (PE10): UNCLAIMED pin 139 (PE11): UNCLAIMED pin 140 (PE12): UNCLAIMED pin 141 (PE13): UNCLAIMED pin 142 (PE14): UNCLAIMED pin 143 (PE15): UNCLAIMED pin 144 (PE16): GPIO 2000000.pinctrl:144 pin 145 (PE17): device 2031000.dmic function io_disabled group PE17 pin 160 (PF0): device 4020000.sdmmc function sdc0 group PF0 pin 161 (PF1): device 4020000.sdmmc function sdc0 group PF1 pin 162 (PF2): device 4020000.sdmmc function sdc0 group PF2 pin 163 (PF3): device 4020000.sdmmc function sdc0 group PF3 pin 164 (PF4): device 4020000.sdmmc function sdc0 group PF4 pin 165 (PF5): device 4020000.sdmmc function sdc0 group PF5 pin 166 (PF6): GPIO 2000000.pinctrl:166 pin 192 (PG0): device 4021000.sdmmc function gpio_in group PG0 pin 193 (PG1): device 4021000.sdmmc function gpio_in group PG1 pin 194 (PG2): device 4021000.sdmmc function gpio_in group PG2 pin 195 (PG3): device 4021000.sdmmc function gpio_in group PG3 pin 196 (PG4): device 4021000.sdmmc function gpio_in group PG4 pin 197 (PG5): device 4021000.sdmmc function gpio_in group PG5 pin 198 (PG6): device 2500400.uart function uart1 group PG6 pin 199 (PG7): device 2500400.uart function uart1 group PG7 pin 200 (PG8): device 2500400.uart function uart1 group PG8 pin 201 (PG9): device 2500400.uart function uart1 group PG9 pin 202 (PG10): GPIO 2000000.pinctrl:202 pin 203 (PG11): UNCLAIMED pin 204 (PG12): GPIO 2000000.pinctrl:204 pin 205 (PG13): UNCLAIMED pin 206 (PG14): UNCLAIMED pin 207 (PG15): UNCLAIMED pin 208 (PG16): UNCLAIMED pin 209 (PG17): UNCLAIMED pin 210 (PG18): GPIO 2000000.pinctrl:210 root@TinaLinux:/# root@TinaLinux:/# root@TinaLinux:/# root@TinaLinux:/#
-
@whycan 即使改成了rgb18_20_pins_a ,也没能将io初始化
-
@lbuque lcd rgb gpio是在你们屏驱动st7701s_rgb中调用sunxi_lcd_pin_cfg(sel, 1);初始化的,可以跟下调用流程
-
pin 140 (PE12): UNCLAIMED pin 141 (PE13): UNCLAIMED pin 142 (PE14): UNCLAIMED pin 143 (PE15): UNCLAIMED
感觉你的 st7701s_rgb.c 没有编译,你看下
find . -name st7701s_rgb.o
-
@whycan
编译进去了
-
@anruliu
连这个printk都没有打印,好像都没有进入probe -
-
@yuzukitsuru 使用你的仓库,编译不通过
也尝试针对你仓库的代码,修改以下文件tina-d1-h/device/config/chips/d1-h/configs/nezha/linux-5.4/board.dts tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/Makefile tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/Kconfig tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/panels.c tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/panels.h tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/st7701s_rgb.c tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/st7701s_rgb.h
结果 lcd的io也是没有初始化
-
@lbuque 开机过程中在uboot初始化lcd后,kernel是不是走lcd初始化流程的,进入内核后,休眠唤醒一下lcd,看看pin脚状态有没有变化
mount -t debugfs none /sys/kernel/debug cd /sys/kernel/debug/dispdbg //休眠 echo suspend > command; echo disp0 > name; echo 1 > start //唤醒 echo resume > command; echo disp0 > name; echo 1 > start
-
@anruliu 感谢你的回复!
使用你提供的指令,lcd部分管脚配置成功了。lcd_gpio_0、lcd_gpio_1、lcd_gpio_2、lcd_gpio_3,这四个gpio没有初始化正常。
以下是执行唤醒lcd的log
lcd的显示情况如下:
-
-
将uboot-board.dts的lcd注释掉,colorbar不在闪屏。
-
lcd_gpio_0、lcd_gpio_1、lcd_gpio_2、lcd_gpio_3,依旧没能初始化。原因未知。
目前显示效果如下:
以下是完整的patch, 在tina v2.0验证成功。
Index: tina-d1-h/device/config/chips/d1-h/configs/nezha/linux-5.4/board.dts =================================================================== --- tina-d1-h.orig/device/config/chips/d1-h/configs/nezha/linux-5.4/board.dts +++ tina-d1-h/device/config/chips/d1-h/configs/nezha/linux-5.4/board.dts @@ -15,7 +15,6 @@ aliases { dsp0 = &dsp0; dsp0_gpio_int= &dsp0_gpio_int; - gmac0 = &gmac0; }; dsp0: dsp0 { @@ -31,7 +30,7 @@ reg_vdd_cpu: vdd-cpu { compatible = "sunxi-pwm-regulator"; - pwms = <&pwm 0 5000 1>; + pwms = <&pwm 0 5000 0>; regulator-name = "vdd_cpu"; regulator-min-microvolt = <810000>; regulator-max-microvolt = <1160000>; @@ -47,7 +46,15 @@ regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; regulator-enable-ramp-delay = <1000>; - gpio = <&pio PD 19 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + reg_3v3: vdd_3v3 { + compatible = "regulator-fixed"; + regulator-name = "vdd_3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-enable-ramp-delay = <1000>; enable-active-high; }; }; @@ -58,8 +65,7 @@ &pio { sdc0_pins_a: sdc0@0 { - allwinner,pins = "PF0", "PF1", "PF2", - "PF3", "PF4", "PF5"; + allwinner,pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5"; allwinner,function = "sdc0"; allwinner,muxsel = <2>; allwinner,drive = <3>; @@ -74,8 +80,7 @@ sdc0_pins_b: sdc0@1 { - pins = "PF0", "PF1", "PF2", - "PF3", "PF4", "PF5"; + pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5"; function = "sdc0"; drive-strength = <30>; bias-pull-up; @@ -83,8 +88,7 @@ }; sdc0_pins_c: sdc0@2 { - pins = "PF0", "PF1", "PF2", - "PF3", "PF4", "PF5"; + pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5"; function = "gpio_in"; }; @@ -97,8 +101,7 @@ }; sdc0_pins_e: sdc0@4 { - pins = "PF0", "PF1", "PF3", - "PF5"; + pins = "PF0", "PF1", "PF3", "PF5"; function = "jtag"; drive-strength = <10>; bias-pull-up; @@ -106,36 +109,31 @@ sdc1_pins_a: sdc1@0 { - pins = "PG0", "PG1", "PG2", - "PG3", "PG4", "PG5"; + pins = "PG0", "PG1", "PG2", "PG3", "PG4", "PG5"; function = "sdc1"; drive-strength = <30>; bias-pull-up; }; sdc1_pins_b: sdc1@1 { - pins = "PG0", "PG1", "PG2", - "PG3", "PG4", "PG5"; + pins = "PG0", "PG1", "PG2", "PG3", "PG4", "PG5"; function = "gpio_in"; }; sdc2_pins_a: sdc2@0 { - allwinner,pins = "PC2", "PC3", "PC4", - "PC5", "PC6", "PC7"; + allwinner,pins = "PC2", "PC3", "PC4", "PC5", "PC6", "PC7"; allwinner,function = "sdc2"; allwinner,muxsel = <3>; allwinner,drive = <3>; allwinner,pull = <1>; - pins = "PC2", "PC3", "PC4", - "PC5", "PC6", "PC7"; + pins = "PC2", "PC3", "PC4", "PC5", "PC6", "PC7"; function = "sdc2"; drive-strength = <30>; bias-pull-up; }; sdc2_pins_b: sdc2@1 { - pins = "PC2", "PC3", "PC4", - "PC5", "PC6", "PC7"; + pins = "PC2", "PC3", "PC4", "PC5", "PC6", "PC7"; function = "gpio_in"; }; @@ -234,62 +232,42 @@ gmac_pins_a: gmac@0 { pins = "PE0", "PE1", "PE2", "PE3", - "PE4", "PE5", "PE6", "PE7", - "PE8", "PE9", "PE10", "PE11", - "PE12", "PE13", "PE14", "PE15"; + "PE4", "PE5", "PE6", "PE7", + "PE8", "PE9"; function = "gmac0"; - muxsel = <8>; /* for uboot driver */ drive-strength = <10>; }; gmac_pins_b: gmac@1 { pins = "PE0", "PE1", "PE2", "PE3", - "PE4", "PE5", "PE6", "PE7", - "PE8", "PE9", "PE10", "PE11", - "PE12", "PE13", "PE14", "PE15"; + "PE4", "PE5", "PE6", "PE7", + "PE8", "PE9"; function = "gpio_in"; }; dmic_pins_a: dmic@0 { /* DMIC_PIN: CLK, DATA0, DATA1, DATA2 */ - pins = "PE17", "PB11", "PB10", "PD17"; + pins = "PE17", "PB11"; function = "dmic"; drive-strength = <20>; bias-disable; }; dmic_pins_b: dmic@1 { - pins = "PE17", "PB11", "PB10", "PD17"; + pins = "PE17", "PB11"; function = "io_disabled"; drive-strength = <20>; bias-disable; }; daudio0_pins_a: daudio0@0 { - /* MCLK, BCLK, LRCK */ - pins = "PE17", "PE16", "PE15"; + pins = "PE17", "PE16", "PE15", "PE14", "PE13"; function = "i2s0"; drive-strength = <20>; bias-disable; }; - daudio0_pins_b: daudio0@1 { - /* DIN0 */ - pins = "PE14"; - function = "i2s0_din"; - drive-strength = <20>; - bias-disable; - }; - - daudio0_pins_c: daudio0@2 { - /* DOUT0 */ - pins = "PE13"; - function = "i2s0_dout"; - drive-strength = <20>; - bias-disable; - }; - - daudio0_pins_d: daudio0_sleep@0 { + daudio0_pins_b: daudio0_sleep@0 { pins = "PE17", "PE16", "PE15", "PE14", "PE13"; function = "io_disabled"; drive-strength = <20>; @@ -297,30 +275,13 @@ }; daudio1_pins_a: daudio1@0 { - /* MCLK, LRCK, BCLK */ - pins = "PG11", "PG12", "PG13"; + pins = "PG11", "PG12", "PG13", "PG14", "PG15"; function = "i2s1"; drive-strength = <20>; bias-disable; }; - daudio1_pins_b: daudio1@1 { - /* DIN0 */ - pins = "PG14"; - function = "i2s1_din"; - drive-strength = <20>; - bias-disable; - }; - - daudio1_pins_c: daudio1@2 { - /* DOUT0 */ - pins = "PG15"; - function = "i2s1_dout"; - drive-strength = <20>; - bias-disable; - }; - - daudio1_pins_d: daudio1_sleep@0 { + daudio1_pins_b: daudio1_sleep@0 { pins = "PG11", "PG12", "PG13", "PG14", "PG15"; function = "io_disabled"; drive-strength = <20>; @@ -374,7 +335,7 @@ }; spi0_pins_a: spi0@0 { - pins = "PC2", "PC4", "PC5"; /* clk, mosi, miso */ + pins = "PC2", "PC4", "PC5","PC7", "PC6"; /*clk mosi miso hold wp*/ function = "spi0"; muxsel = <2>; drive-strength = <10>; @@ -385,7 +346,7 @@ function = "spi0"; muxsel = <2>; drive-strength = <10>; - bias-pull-up; /* cs, hold, wp should be pulled up */ + bias-pull-up; /* only CS should be pulled up */ }; spi0_pins_c: spi0@2 { @@ -396,16 +357,16 @@ }; spi1_pins_a: spi1@0 { - pins = "PD11", "PD12", "PD13"; /* clk, mosi, miso */ + pins = "PD11", "PD12", "PD13","PD14", "PD15"; /*clk mosi miso hold wp*/ function = "spi1"; drive-strength = <10>; }; spi1_pins_b: spi1@1 { - pins = "PD10", "PD14", "PD15"; + pins = "PD10"; function = "spi1"; drive-strength = <10>; - bias-pull-up; /* cs, hold, wp should be pulled up */ + bias-pull-up; // only CS should be pulled up }; spi1_pins_c: spi1@2 { @@ -447,9 +408,9 @@ pwm2_pin_b: pwm2@1 { pins = "PD18"; - function = "gpio_out"; + function = "gpio_in"; }; -/* + pwm7_pin_a: pwm7@0 { pins = "PD22"; function = "pwm7"; @@ -461,7 +422,6 @@ pins = "PD22"; function = "gpio_in"; }; -*/ s_cir0_pins_a: s_cir@0 { pins = "PB12"; @@ -486,6 +446,45 @@ pins = "PB0"; function = "gpio_in"; }; + + rgb18_20_pins_a: rgb18_20@0 { + pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", \ + "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", \ + "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", \ + "PD18", "PD19", "PD20", "PD21"; + function = "lcd0"; + drive-strength = <20>; + bias-disable; + }; + + rgb18_20_pins_b: rgb18_20@1 { + pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", \ + "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", \ + "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", \ + "PD18", "PD19", "PD20", "PD21"; + function = "io_disabled"; + bias-disable; + }; + + rgb18_10_pins_a: rgb18_10@0 { + pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", \ + "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", \ + "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", \ + "PD18", "PD19", "PD20", "PD21"; + function = "lcd0"; + drive-strength = <10>; + bias-disable; + }; + + rgb18_10_pins_b: rgb18_10@1 { + pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", \ + "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", \ + "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", \ + "PD18", "PD19", "PD20", "PD21"; + function = "io_disabled"; + bias-disable; + }; + }; &uart0 { @@ -510,11 +509,11 @@ }; &uart3 { - compatible = "allwinner,sun20iw1-dsp-uart"; + /*compatible = "allwinner,sun20iw1-dsp-uart";*/ pinctrl-names = "default", "sleep"; pinctrl-0 = <&uart3_pins_a>; pinctrl-1 = <&uart3_pins_a>; - status = "okay"; + status = "disabled"; }; &soc { @@ -557,12 +556,12 @@ compatible = "allwinner,sunxi-rfkill"; chip_en; power_en; - pinctrl-0 = <&wlan_pins_a>; - pinctrl-names = "default"; status = "okay"; wlan: wlan@0 { compatible = "allwinner,sunxi-wlan"; + pinctrl-0 = <&wlan_pins_a>; + pinctrl-names = "default"; clock-names = "32k-fanout1"; clocks = <&ccu CLK_FANOUT1_OUT>; wlan_busnum = <0x1>; @@ -578,6 +577,8 @@ bt: bt@0 { compatible = "allwinner,sunxi-bt"; + pinctrl-0 = <&wlan_pins_a>; + pinctrl-names = "default"; clock-names = "32k-fanout1"; clocks = <&ccu CLK_FANOUT1_OUT>; /*bt_power_num = <0x01>;*/ @@ -590,13 +591,13 @@ }; }; - btlpm: btlpm@0 { + /*btlpm: btlpm@0 { compatible = "allwinner,sunxi-btlpm"; uart_index = <0x1>; bt_wake = <&pio PG 16 GPIO_ACTIVE_HIGH>; bt_hostwake = <&pio PG 17 GPIO_ACTIVE_HIGH>; status = "okay"; - }; + };*/ addr_mgt: addr_mgt@0 { compatible = "allwinner,sunxi-addr_mgt"; @@ -750,7 +751,7 @@ tvd_row*tvd_column is the total tvd chan mic2gain = <0x13>; mic3gain = <0x13>; /* ADC/DAC DRC/HPF func enabled */ - /* 0x1:DAP_HP_EN; 0x2:DAP_SPK_EN; 0x3:DAP_HPSPK_EN */ + /* 0x1:DAP_HP_EN; 0x2:DAP_SPK_EN; 0x3:DAP_HPSPK_EN */ adcdrc_cfg = <0x0>; adchpf_cfg = <0x1>; dacdrc_cfg = <0x0>; @@ -826,8 +827,8 @@ tvd_row*tvd_column is the total tvd chan pcm_lrck_period = <0x80>; slot_width_select = <0x20>; pinctrl-names = "default", "sleep"; - pinctrl-0 = <&daudio0_pins_a &daudio0_pins_b &daudio0_pins_c>; - pinctrl-1 = <&daudio0_pins_d>; + pinctrl-0 = <&daudio0_pins_a>; + pinctrl-1 = <&daudio0_pins_b>; pinctrl_used = <0x0>; status = "disabled"; }; @@ -853,18 +854,18 @@ tvd_row*tvd_column is the total tvd chan }; &daudio1 { - mclk_div = <0x01>; - frametype = <0x00>; - tdm_config = <0x01>; - sign_extend = <0x00>; - msb_lsb_first = <0x00>; - pcm_lrck_period = <0x80>; + mclk_div = <0x01>; + frametype = <0x00>; + tdm_config = <0x01>; + sign_extend = <0x00>; + msb_lsb_first = <0x00>; + pcm_lrck_period = <0x80>; slot_width_select = <0x20>; - pinctrl-names = "default", "sleep"; - pinctrl-0 = <&daudio1_pins_a &daudio1_pins_b &daudio1_pins_c>; - pinctrl-1 = <&daudio1_pins_d>; - pinctrl_used = <0x0>; - status = "disabled"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&daudio1_pins_a>; + pinctrl-1 = <&daudio1_pins_b>; + pinctrl_used = <0x0>; + status = "disabled"; }; &sounddaudio1 { @@ -930,12 +931,10 @@ tvd_row*tvd_column is the total tvd chan */ &usbc0 { device_type = "usbc0"; - usb_port_type = <0x2>; + usb_port_type = <0x0>; usb_detect_type = <0x1>; usb_detect_mode = <0>; - usb_id_gpio = <&pio PD 21 GPIO_ACTIVE_HIGH>; enable-active-high; - usb_det_vbus_gpio = <&pio PD 20 GPIO_ACTIVE_HIGH>; usb_wakeup_suspend = <0>; usb_serial_unique = <0>; usb_serial_number = "20080411"; @@ -997,43 +996,20 @@ tvd_row*tvd_column is the total tvd chan dma-names = "tx", "rx"; status = "okay"; - /* pcf8574-usage: - * only use gpio0~7, 0 means PP0. - * pin set: - * gpios = <&pcf8574 0 GPIO_ACTIVE_LOW>; - * interrupt set: - * interrupt-parent = <&pcf8574>; - * interrupts = <0 IRQ_TYPE_EDGE_FALLING>; - */ - pcf8574: gpio@38 { - compatible = "nxp,pcf8574"; - reg = <0x38>; - gpio_base = <2020>; - gpio-controller; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - interrupt-parent = <&pio>; - interrupts = <PB 2 IRQ_TYPE_EDGE_FALLING>; + focaltech@48{ + compatible = "focaltech,fts"; status = "okay"; + reg = <0x48>; + interrupt-parent = <&pio>; + interrupts = <PG 14 IRQ_TYPE_LEVEL_LOW>; + focaltech,reset-gpio = <&pio PG 15 GPIO_ACTIVE_HIGH>; + focaltech,irq-gpio = <&pio PG 14 IRQ_TYPE_LEVEL_LOW>; + focaltech,max-touch-number = <2>; + focaltech,display-coords = <0 0 480 480>; + focaltech,reg_vdd = <®_3v3>; + focaltech,reg_avdd = <®_3v3>; }; - ctp@14 { - compatible = "allwinner,goodix"; - device_type = "ctp"; - reg = <0x14>; - status = "disabled"; - ctp_name = "gt9xxnew_ts"; - ctp_twi_id = <0x2>; - ctp_twi_addr = <0x14>; - ctp_screen_max_x = <0x320>; - ctp_screen_max_y = <0x500>; - ctp_revert_x_flag = <0x0>; - ctp_revert_y_flag = <0x1>; - ctp_exchange_x_y_flag = <0x0>; - ctp_int_port = <&pio PG 14 GPIO_ACTIVE_HIGH>; - ctp_wakeup = <&pio PG 15 GPIO_ACTIVE_HIGH>; - }; }; &twi3 { @@ -1045,14 +1021,12 @@ tvd_row*tvd_column is the total tvd chan }; &gmac0 { - phy-mode = "rgmii"; + phy-mode = "rmii"; use_ephy25m = <1>; pinctrl-0 = <&gmac_pins_a>; pinctrl-1 = <&gmac_pins_b>; pinctrl-names = "default", "sleep"; phy-rst = <&pio PE 16 GPIO_ACTIVE_HIGH>; - tx-delay = <3>; /*2~4*/ - rx-delay = <0>; status = "okay"; }; @@ -1064,7 +1038,7 @@ tvd_row*tvd_column is the total tvd chan /*spi-supply = <®_dcdc1>;*/ spi_slave_mode = <0>; spi0_cs_number = <1>; - spi0_cs_bitmap = <1>; + spi0_cs_bitmap = <1>; status = "disabled"; spi-nand@0 { @@ -1083,21 +1057,9 @@ tvd_row*tvd_column is the total tvd chan pinctrl-1 = <&spi1_pins_c>; pinctrl-names = "default", "sleep"; spi_slave_mode = <0>; - spi1_cs_number = <1>; - spi1_cs_bitmap = <1>; - spi_dbi_enable = <1>; status = "disabled"; spi_board1@0 { - device_type = "spi-dbi"; - compatible = "sunxi,spidbi"; - spi-max-frequency = <0x5f5e100>; - reg = <0x0>; - spi-rx-bus-width = <0x4>; - spi-tx-bus-width = <0x4>; - status = "okay"; - }; - /* spi_board1@0 { device_type = "spi_board1"; compatible = "rohm,dh2228fv"; spi-max-frequency = <0x5f5e100>; @@ -1105,7 +1067,7 @@ tvd_row*tvd_column is the total tvd chan spi-rx-bus-width = <0x4>; spi-tx-bus-width = <0x4>; status = "disabled"; - }; */ + }; }; &ledc { @@ -1279,55 +1241,54 @@ pull up or pull down(default 0), driver ;For lvds0: use lvds0_pins_a and lvds0_pins_b instead ;----------------------------------------------------------------------------------*/ &lcd0 { - lcd_used = <1>; + lcd_used = <1>; + lcd_driver_name = "st7701s_rgb"; + + lcd_if = <0>; + lcd_hv_if = <0>; - lcd_driver_name = "tft08006"; - lcd_backlight = <100>; - lcd_if = <4>; - - lcd_x = <800>; - lcd_y = <1280>; - lcd_width = <52>; - lcd_height = <52>; - lcd_dclk_freq = <70>; - - lcd_pwm_used = <1>; - lcd_pwm_ch = <2>; - lcd_pwm_freq = <1000>; - lcd_pwm_pol = <0>; - lcd_pwm_max_limit = <255>; - - lcd_hbp = <32>; - lcd_ht = <868>; - lcd_hspw = <4>; - lcd_vbp = <12>; - lcd_vt = <1311>; - lcd_vspw = <4>; - - lcd_dsi_if = <0>; - lcd_dsi_lane = <4>; - lcd_lvds_if = <0>; - lcd_lvds_colordepth = <0>; - lcd_lvds_mode = <0>; - lcd_frm = <0>; - lcd_hv_clk_phase = <0>; - lcd_hv_sync_polarity= <0>; - lcd_io_phase = <0x0000>; - lcd_gamma_en = <0>; - lcd_bright_curve_en = <0>; - lcd_cmap_en = <0>; - lcd_fsync_en = <0>; - lcd_fsync_act_time = <1000>; - lcd_fsync_dis_time = <1000>; - lcd_fsync_pol = <0>; - - deu_mode = <0>; - lcdgamma4iep = <22>; - smart_color = <90>; - - lcd_gpio_0 = <&pio PG 13 GPIO_ACTIVE_HIGH>; - pinctrl-0 = <&dsi4lane_pins_a>; - pinctrl-1 = <&dsi4lane_pins_b>; + lcd_width = <70>; + lcd_height = <72>; + lcd_x = <480>; + lcd_y = <480>; + lcd_dclk_freq = <19>; + lcd_hbp = <60>; + lcd_ht = <612>; + lcd_hspw = <12>; + lcd_vbp = <18>; + lcd_vt = <520>; + lcd_vspw = <4>; + + lcd_backlight = <50>; + lcd_pwm_used = <1>; + lcd_pwm_ch = <7>; + lcd_pwm_freq = <20000>; + lcd_pwm_pol = <1>; + lcd_bright_curve_en = <0>; + + lcd_frm = <1>; + lcd_io_phase = <0x0000>; + lcd_gamma_en = <0>; + lcd_cmap_en = <0>; + lcd_hv_clk_phase = <0>; + lcd_hv_sync_polarity = <0>; + lcd_rb_swap = <0>; + + lcd_power = "vcc-lcd"; + lcd_pin_power = "vcc-pd"; + lcd_gpio_0 = <&pio PG 13 GPIO_ACTIVE_HIGH>; + lcd_gpio_1 = <&pio PE 14 GPIO_ACTIVE_HIGH>; + lcd_gpio_2 = <&pio PE 12 GPIO_ACTIVE_HIGH>; + lcd_gpio_3 = <&pio PE 15 GPIO_ACTIVE_HIGH>; + /* + lcd_gpio_0 = <&pio PG 13 1 1 1 1>; + lcd_gpio_1 = <&pio PE 14 1 1 1 1>; + lcd_gpio_2 = <&pio PE 12 1 1 1 1>; + lcd_gpio_3 = <&pio PE 15 1 1 1 1>; + */ + pinctrl-0 = <&rgb18_pins_a>; + pinctrl-1 = <&rgb18_pins_b>; + status = "okay"; }; &hdmi { @@ -1357,14 +1318,12 @@ pull up or pull down(default 0), driver status = "okay"; }; -/* &pwm7 { pinctrl-names = "active", "sleep"; pinctrl-0 = <&pwm7_pin_a>; pinctrl-1 = <&pwm7_pin_b>; status = "okay"; }; -*/ &rtp { allwinner,tp-sensitive-adjust = <0xf>; @@ -1400,60 +1359,3 @@ pull up or pull down(default 0), driver pinctrl-1 = <&ir1_pins_b>; status = "disabled"; }; - -/* &lcd_fb0 { - lcd_used = <1>; - lcd_driver_name = "kld35512"; - lcd_if = <1>; - lcd_dbi_if = <4>; - lcd_data_speed = <60>; - lcd_spi_bus_num = <1>; - lcd_x = <320>; - lcd_y = <480>; - lcd_pixel_fmt = <10>; - lcd_dbi_fmt = <2>; - lcd_rgb_order = <0>; - lcd_width = <60>; - lcd_height = <95>; - lcd_pwm_used = <1>; - lcd_pwm_ch = <7>; - lcd_pwm_freq = <5000>; - lcd_pwm_pol = <1>; - lcd_frm = <1>; - lcd_gamma_en = <1>; - fb_buffer_num = <2>; - lcd_backlight = <100>; - lcd_fps = <40>; - lcd_dbi_te = <1>; - lcd_dbi_clk_mode = <1>; - lcd_gpio_0 = <&pio PC 0 GPIO_ACTIVE_HIGH>; - status = "okay"; -}; */ - -/* &lcd_fb0 { - lcd_used = <1>; - lcd_driver_name = "kld2844b"; - lcd_if = <1>; - lcd_dbi_if = <4>; - lcd_data_speed = <60>; - lcd_spi_bus_num = <1>; - lcd_x = <240>; - lcd_y = <320>; - lcd_width = <60>; - lcd_height = <95>; - lcd_pwm_used = <1>; - lcd_pwm_ch = <7>; - lcd_pwm_freq = <5000>; - lcd_pwm_pol = <0>; - lcd_pixel_fmt = <0>; - lcd_dbi_fmt = <3>; - lcd_rgb_order = <0>; - lcd_frm = <1>; - lcd_gamma_en = <1>; - fb_buffer_num = <2>; - lcd_backlight = <100>; - lcd_dbi_te = <1>; - lcd_fps = <60>; - lcd_gpio_0 = <&pio PC 0 GPIO_ACTIVE_HIGH>; - status = "okay"; -}; */ Index: tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/Makefile =================================================================== --- tina-d1-h.orig/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/Makefile +++ tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/Makefile @@ -45,6 +45,7 @@ disp-$(CONFIG_LCD_SUPPORT_LH219WQ1) += l disp-$(CONFIG_LCD_SUPPORT_ST7789V) += lcd/st7789v.o disp-$(CONFIG_LCD_SUPPORT_ST7796S) += lcd/st7796s.o disp-$(CONFIG_LCD_SUPPORT_ST7701S) += lcd/st7701s.o +disp-$(CONFIG_LCD_SUPPORT_ST7701S_RGB) += lcd/st7701s_rgb.o disp-$(CONFIG_LCD_SUPPORT_WTL096601G03) += lcd/wtl096601g03.o disp-$(CONFIG_LCD_SUPPORT_T30P106) += lcd/t30p106.o disp-$(CONFIG_LCD_SUPPORT_TO20T20000) += lcd/to20t20000.o Index: tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/Kconfig =================================================================== --- tina-d1-h.orig/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/Kconfig +++ tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/Kconfig @@ -103,6 +103,12 @@ config LCD_SUPPORT_ST7701S ---help--- If you want to support ST7701S panel for display driver, select it. +config LCD_SUPPORT_ST7701S_RGB + bool "LCD support ST7701S RGB panel" + default n + ---help--- + If you want to support ST7701S_RGB panel for display driver, select it. + config LCD_SUPPORT_T30P106 bool "LCD support T30P106 panel" default n @@ -210,4 +216,3 @@ config LCD_SUPPORT_K080_IM2HYL802R_800X1 default y ---help--- If you want to support K080_IM2HYL802R_800X1280 panel for display driver, select it. - Index: tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/panels.c =================================================================== --- tina-d1-h.orig/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/panels.c +++ tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/panels.c @@ -80,6 +80,9 @@ struct __lcd_panel *panel_array[] = { #ifdef CONFIG_LCD_SUPPORT_ST7701S &st7701s_panel, #endif +#ifdef CONFIG_LCD_SUPPORT_ST7701S_RGB + &st7701s_rgb_panel, +#endif #ifdef CONFIG_LCD_SUPPORT_T30P106 &t30p106_panel, #endif @@ -136,6 +139,7 @@ void lcd_set_panel_funs(void) int i; for (i = 0; panel_array[i] != NULL; i++) { + printk("panel name: %s\n", panel_array[i]->name); sunxi_lcd_set_panel_funs(panel_array[i]->name, &panel_array[i]->func); } Index: tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/panels.h =================================================================== --- tina-d1-h.orig/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/panels.h +++ tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/panels.h @@ -125,6 +125,9 @@ extern struct __lcd_panel st7796s_panel; #ifdef CONFIG_LCD_SUPPORT_ST7701S extern struct __lcd_panel st7701s_panel; #endif +#ifdef CONFIG_LCD_SUPPORT_ST7701S_RGB +extern struct __lcd_panel st7701s_rgb_panel; +#endif #ifdef CONFIG_LCD_SUPPORT_T30P106 extern struct __lcd_panel t30p106_panel; #endif Index: tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/st7701s_rgb.c =================================================================== --- /dev/null +++ tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/st7701s_rgb.c @@ -0,0 +1,517 @@ +/* + * drivers/video/fbdev/sunxi/disp2/disp/lcd/st7701s_rgb.c + * + * Copyright (c) 2018-2021 Allwinnertech Co., Ltd. + * Author: zepan <zepan@sipeed.com> + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + +&lcd0 { + lcd_used = <1>; + + lcd_driver_name = "st7701s_rgb"; + lcd_backlight = <100>; + lcd_if = <2>; + + lcd_x = <480>; + lcd_y = <480>; + lcd_width = <70>; + lcd_height = <72>; + lcd_dclk_freq = <30>; + + lcd_pwm_used = <1>; + lcd_pwm_ch = <7>; + lcd_pwm_freq = <19000>; + lcd_pwm_pol = <0>; + lcd_pwm_max_limit = <255>; + + lcd_hbp = <60>; + lcd_ht = <612>; + lcd_hspw = <12>; + lcd_vbp = <18>; + lcd_vt = <520>; + lcd_vspw = <4>; + + lcd_dsi_if = <0>; + lcd_dsi_lane = <4>; + lcd_lvds_if = <0>; + lcd_lvds_colordepth = <0>; + lcd_lvds_mode = <0>; + lcd_frm = <0>; + lcd_hv_clk_phase = <0>; + lcd_hv_sync_polarity= <0>; + lcd_io_phase = <0x0000>; + lcd_gamma_en = <0>; + lcd_bright_curve_en = <0>; + lcd_cmap_en = <0>; + lcd_fsync_en = <0>; + lcd_fsync_act_time = <1000>; + lcd_fsync_dis_time = <1000>; + lcd_fsync_pol = <0>; + + deu_mode = <0>; + lcdgamma4iep = <22>; + smart_color = <90>; + + lcd_gpio_0 = <&pio PG 13 GPIO_ACTIVE_HIGH>;RST + lcd_gpio_1 = <&pio PE 14 GPIO_ACTIVE_HIGH>;CS + lcd_gpio_2 = <&pio PE 12 GPIO_ACTIVE_HIGH>;SDA + lcd_gpio_3 = <&pio PE 15 GPIO_ACTIVE_HIGH>;SCK + pinctrl-0 = <&rgb18_pins_a>; + pinctrl-1 = <&rgb18_pins_b>; +}; + */ +#include "st7701s_rgb.h" +#include "default_panel.h" + +//s32 sunxi_lcd_gpio_set_value(u32 screen_id, u32 io_index, u32 value) + +#define st7701s_spi_scl_1 sunxi_lcd_gpio_set_value(0, 3, 1) +#define st7701s_spi_scl_0 sunxi_lcd_gpio_set_value(0, 3, 0) +#define st7701s_spi_sdi_1 sunxi_lcd_gpio_set_value(0, 2, 1) +#define st7701s_spi_sdi_0 sunxi_lcd_gpio_set_value(0, 2, 0) +#define st7701s_spi_cs_1 sunxi_lcd_gpio_set_value(0, 1, 1) +#define st7701s_spi_cs_0 sunxi_lcd_gpio_set_value(0, 1, 0) +#define st7701s_spi_reset_1 sunxi_lcd_gpio_set_value(0, 0, 1) +#define st7701s_spi_reset_0 sunxi_lcd_gpio_set_value(0, 0, 0) + +static void LCD_power_on(u32 sel); +static void LCD_power_off(u32 sel); +static void LCD_bl_open(u32 sel); +static void LCD_bl_close(u32 sel); + +static void LCD_panel_init(u32 sel); +static void LCD_panel_exit(u32 sel); + +static void LCD_cfg_panel_info(struct panel_extend_para *info) +{ + u32 i = 0, j = 0; + u32 items; + u8 lcd_gamma_tbl[][2] = { + /* {input value, corrected value} */ + {0, 0}, + {15, 15}, + {30, 30}, + {45, 45}, + {60, 60}, + {75, 75}, + {90, 90}, + {105, 105}, + {120, 120}, + {135, 135}, + {150, 150}, + {165, 165}, + {180, 180}, + {195, 195}, + {210, 210}, + {225, 225}, + {240, 240}, + {255, 255}, + }; + + u32 lcd_cmap_tbl[2][3][4] = { + { + {LCD_CMAP_G0, LCD_CMAP_B1, LCD_CMAP_G2, LCD_CMAP_B3}, + {LCD_CMAP_B0, LCD_CMAP_R1, LCD_CMAP_B2, LCD_CMAP_R3}, + {LCD_CMAP_R0, LCD_CMAP_G1, LCD_CMAP_R2, LCD_CMAP_G3}, + }, + { + {LCD_CMAP_B3, LCD_CMAP_G2, LCD_CMAP_B1, LCD_CMAP_G0}, + {LCD_CMAP_R3, LCD_CMAP_B2, LCD_CMAP_R1, LCD_CMAP_B0}, + {LCD_CMAP_G3, LCD_CMAP_R2, LCD_CMAP_G1, LCD_CMAP_R0}, + }, + }; + + items = sizeof(lcd_gamma_tbl) / 2; + for (i = 0; i < items - 1; i++) { + u32 num = lcd_gamma_tbl[i + 1][0] - lcd_gamma_tbl[i][0]; + + for (j = 0; j < num; j++) { + u32 value = 0; + + value = lcd_gamma_tbl[i][1] + ((lcd_gamma_tbl[i + 1][1] - lcd_gamma_tbl[i][1]) * j) / num; + info->lcd_gamma_tbl[lcd_gamma_tbl[i][0] + j] = (value << 16) + (value << 8) + value; + } + } + info->lcd_gamma_tbl[255] = (lcd_gamma_tbl[items - 1][1] << 16) + (lcd_gamma_tbl[items - 1][1] << 8) + lcd_gamma_tbl[items - 1][1]; + + memcpy(info->lcd_cmap_tbl, lcd_cmap_tbl, sizeof(lcd_cmap_tbl)); +} + +static s32 LCD_open_flow(u32 sel) +{ + printk("=====================LCD_open_flow\n"); + /* open lcd power, and delay 50ms */ + LCD_OPEN_FUNC(sel, LCD_power_on, 20); + /* open lcd power, than delay 200ms */ + LCD_OPEN_FUNC(sel, LCD_panel_init, 20); + /* open lcd controller, and delay 100ms */ + LCD_OPEN_FUNC(sel, sunxi_lcd_tcon_enable, 100); + /* open lcd backlight, and delay 0ms */ + LCD_OPEN_FUNC(sel, LCD_bl_open, 0); + + return 0; +} + +static s32 LCD_close_flow(u32 sel) +{ + /* close lcd backlight, and delay 0ms */ + LCD_CLOSE_FUNC(sel, LCD_bl_close, 0); + /* close lcd controller, and delay 0ms */ + LCD_CLOSE_FUNC(sel, sunxi_lcd_tcon_disable, 0); + /* open lcd power, than delay 200ms */ + LCD_CLOSE_FUNC(sel, LCD_panel_exit, 200); + /* close lcd power, and delay 500ms */ + LCD_CLOSE_FUNC(sel, LCD_power_off, 500); + + return 0; +} + +static void LCD_power_on(u32 sel) +{ + printk("=====================LCD_power_on\n"); + /* config lcd_power pin to open lcd power0 */ + sunxi_lcd_power_enable(sel, 0); + sunxi_lcd_pin_cfg(sel, 1); + +} + +static void LCD_power_off(u32 sel) +{ + sunxi_lcd_pin_cfg(sel, 0); + /* config lcd_power pin to close lcd power0 */ + sunxi_lcd_power_disable(sel, 0); +} + +static void LCD_bl_open(u32 sel) +{ + printk("=====================LCD_bl_open\n"); + sunxi_lcd_pwm_enable(sel); + sunxi_lcd_backlight_enable(sel); +} + +static void LCD_bl_close(u32 sel) +{ + /* config lcd_bl_en pin to close lcd backlight */ + sunxi_lcd_backlight_disable(sel); + sunxi_lcd_pwm_disable(sel); +} + +//three line 9bit mode +static void LCD_WRITE_DATA(u32 value) +{ + u32 i; + st7701s_spi_cs_0; + st7701s_spi_sdi_1; + st7701s_spi_scl_0; + sunxi_lcd_delay_us(10); + st7701s_spi_scl_1; + for (i = 0; i < 8; i++) { + sunxi_lcd_delay_us(10); + if (value & 0x80) + st7701s_spi_sdi_1; + else + st7701s_spi_sdi_0; + value <<= 1; + sunxi_lcd_delay_us(10); + st7701s_spi_scl_0; + st7701s_spi_scl_1; + } + sunxi_lcd_delay_us(10); + st7701s_spi_cs_1; +} + +static void LCD_WRITE_COMMAND(u32 value) +{ + u32 i; + st7701s_spi_cs_0; + st7701s_spi_sdi_0; + st7701s_spi_scl_0; + sunxi_lcd_delay_us(10); + st7701s_spi_scl_1; + for (i = 0; i < 8; i++) { + sunxi_lcd_delay_us(10); + if (value & 0x80) + st7701s_spi_sdi_1; + else + st7701s_spi_sdi_0; + st7701s_spi_scl_0; + sunxi_lcd_delay_us(10); + st7701s_spi_scl_1; + value <<= 1; + } + sunxi_lcd_delay_us(10); + st7701s_spi_cs_1; +} + + +static void LCD_panel_init(u32 sel) +{ + printk("=====================LCD_panel_init\n"); + LCD_WRITE_COMMAND(0xFF); + LCD_WRITE_DATA(0x77); + LCD_WRITE_DATA(0x01); + LCD_WRITE_DATA(0x00); + LCD_WRITE_DATA(0x00); + LCD_WRITE_DATA(0x10); + + LCD_WRITE_COMMAND(0xC0); + LCD_WRITE_DATA(0x3B); + LCD_WRITE_DATA(0x00); + + LCD_WRITE_COMMAND(0xC1); + LCD_WRITE_DATA(0x0D); + LCD_WRITE_DATA(0x02); + + LCD_WRITE_COMMAND(0xC2); + LCD_WRITE_DATA(0x21); + LCD_WRITE_DATA(0x08); + + // RGB Interface Setting + // LCD_WRITE_COMMAND(0xC3); + // LCD_WRITE_DATA(0x02); + + LCD_WRITE_COMMAND(0xCD); + LCD_WRITE_DATA(0x18);//0F 08-OK D0-D18 + + LCD_WRITE_COMMAND(0xB0); + LCD_WRITE_DATA(0x00); + LCD_WRITE_DATA(0x11); + LCD_WRITE_DATA(0x18); + LCD_WRITE_DATA(0x0E); + LCD_WRITE_DATA(0x11); + LCD_WRITE_DATA(0x06); + LCD_WRITE_DATA(0x07); + LCD_WRITE_DATA(0x08); + LCD_WRITE_DATA(0x07); + LCD_WRITE_DATA(0x22); + LCD_WRITE_DATA(0x04); + LCD_WRITE_DATA(0x12); + LCD_WRITE_DATA(0x0F); + LCD_WRITE_DATA(0xAA); + LCD_WRITE_DATA(0x31); + LCD_WRITE_DATA(0x18); + + LCD_WRITE_COMMAND(0xB1); + LCD_WRITE_DATA(0x00); + LCD_WRITE_DATA(0x11); + LCD_WRITE_DATA(0x19); + LCD_WRITE_DATA(0x0E); + LCD_WRITE_DATA(0x12); + LCD_WRITE_DATA(0x07); + LCD_WRITE_DATA(0x08); + LCD_WRITE_DATA(0x08); + LCD_WRITE_DATA(0x08); + LCD_WRITE_DATA(0x22); + LCD_WRITE_DATA(0x04); + LCD_WRITE_DATA(0x11); + LCD_WRITE_DATA(0x11); + LCD_WRITE_DATA(0xA9); + LCD_WRITE_DATA(0x32); + LCD_WRITE_DATA(0x18); + + LCD_WRITE_COMMAND(0xFF); + LCD_WRITE_DATA(0x77); + LCD_WRITE_DATA(0x01); + LCD_WRITE_DATA(0x00); + LCD_WRITE_DATA(0x00); + LCD_WRITE_DATA(0x11); + + LCD_WRITE_COMMAND(0xB0); + LCD_WRITE_DATA(0x60); + + LCD_WRITE_COMMAND(0xB1); + LCD_WRITE_DATA(0x30); + + LCD_WRITE_COMMAND(0xB2); + LCD_WRITE_DATA(0x87); + + LCD_WRITE_COMMAND(0xB3); + LCD_WRITE_DATA(0x80); + + LCD_WRITE_COMMAND(0xB5); + LCD_WRITE_DATA(0x49); + + LCD_WRITE_COMMAND(0xB7); + LCD_WRITE_DATA(0x85); + + LCD_WRITE_COMMAND(0xB8); + LCD_WRITE_DATA(0x21); + + LCD_WRITE_COMMAND(0xC1); + LCD_WRITE_DATA(0x78); + + LCD_WRITE_COMMAND(0xC2); + LCD_WRITE_DATA(0x78); + sunxi_lcd_delay_ms(20); + + LCD_WRITE_COMMAND(0xE0); + LCD_WRITE_DATA(0x00); + LCD_WRITE_DATA(0x1B); + LCD_WRITE_DATA(0x02); + + LCD_WRITE_COMMAND(0xE1); + LCD_WRITE_DATA(0x08); + LCD_WRITE_DATA(0xA0); + LCD_WRITE_DATA(0x00); + LCD_WRITE_DATA(0x00); + LCD_WRITE_DATA(0x07); + LCD_WRITE_DATA(0xA0); + LCD_WRITE_DATA(0x00); + LCD_WRITE_DATA(0x00); + LCD_WRITE_DATA(0x00); + LCD_WRITE_DATA(0x44); + LCD_WRITE_DATA(0x44); + + LCD_WRITE_COMMAND(0xE2); + LCD_WRITE_DATA(0x11); + LCD_WRITE_DATA(0x11); + LCD_WRITE_DATA(0x44); + LCD_WRITE_DATA(0x44); + LCD_WRITE_DATA(0xED); + LCD_WRITE_DATA(0xA0); + LCD_WRITE_DATA(0x00); + LCD_WRITE_DATA(0x00); + LCD_WRITE_DATA(0xEC); + LCD_WRITE_DATA(0xA0); + LCD_WRITE_DATA(0x00); + LCD_WRITE_DATA(0x00); + + LCD_WRITE_COMMAND(0xE3); + LCD_WRITE_DATA(0x00); + LCD_WRITE_DATA(0x00); + LCD_WRITE_DATA(0x11); + LCD_WRITE_DATA(0x11); + + LCD_WRITE_COMMAND(0xE4); + LCD_WRITE_DATA(0x44); + LCD_WRITE_DATA(0x44); + + LCD_WRITE_COMMAND(0xE5); + LCD_WRITE_DATA(0x0A); + LCD_WRITE_DATA(0xE9); + LCD_WRITE_DATA(0xD8); + LCD_WRITE_DATA(0xA0); + LCD_WRITE_DATA(0x0C); + LCD_WRITE_DATA(0xEB); + LCD_WRITE_DATA(0xD8); + LCD_WRITE_DATA(0xA0); + LCD_WRITE_DATA(0x0E); + LCD_WRITE_DATA(0xED); + LCD_WRITE_DATA(0xD8); + LCD_WRITE_DATA(0xA0); + LCD_WRITE_DATA(0x10); + LCD_WRITE_DATA(0xEF); + LCD_WRITE_DATA(0xD8); + LCD_WRITE_DATA(0xA0); + + LCD_WRITE_COMMAND(0xE6); + LCD_WRITE_DATA(0x00); + LCD_WRITE_DATA(0x00); + LCD_WRITE_DATA(0x11); + LCD_WRITE_DATA(0x11); + + LCD_WRITE_COMMAND(0xE7); + LCD_WRITE_DATA(0x44); + LCD_WRITE_DATA(0x44); + + LCD_WRITE_COMMAND(0xE8); + LCD_WRITE_DATA(0x09); + LCD_WRITE_DATA(0xE8); + LCD_WRITE_DATA(0xD8); + LCD_WRITE_DATA(0xA0); + LCD_WRITE_DATA(0x0B); + LCD_WRITE_DATA(0xEA); + LCD_WRITE_DATA(0xD8); + LCD_WRITE_DATA(0xA0); + LCD_WRITE_DATA(0x0D); + LCD_WRITE_DATA(0xEC); + LCD_WRITE_DATA(0xD8); + LCD_WRITE_DATA(0xA0); + LCD_WRITE_DATA(0x0F); + LCD_WRITE_DATA(0xEE); + LCD_WRITE_DATA(0xD8); + LCD_WRITE_DATA(0xA0); + + LCD_WRITE_COMMAND(0xEB); + LCD_WRITE_DATA(0x02); + LCD_WRITE_DATA(0x00); + LCD_WRITE_DATA(0xE4); + LCD_WRITE_DATA(0xE4); + LCD_WRITE_DATA(0x88); + LCD_WRITE_DATA(0x00); + LCD_WRITE_DATA(0x40); + + LCD_WRITE_COMMAND(0xEC); + LCD_WRITE_DATA(0x3C); + LCD_WRITE_DATA(0x00); + + LCD_WRITE_COMMAND(0xED); + LCD_WRITE_DATA(0xAB); + LCD_WRITE_DATA(0x89); + LCD_WRITE_DATA(0x76); + LCD_WRITE_DATA(0x54); + LCD_WRITE_DATA(0x02); + LCD_WRITE_DATA(0xFF); + LCD_WRITE_DATA(0xFF); + LCD_WRITE_DATA(0xFF); + LCD_WRITE_DATA(0xFF); + LCD_WRITE_DATA(0xFF); + LCD_WRITE_DATA(0xFF); + LCD_WRITE_DATA(0x20); + LCD_WRITE_DATA(0x45); + LCD_WRITE_DATA(0x67); + LCD_WRITE_DATA(0x98); + LCD_WRITE_DATA(0xBA); + + LCD_WRITE_COMMAND(0xFF); + LCD_WRITE_DATA(0x77); + LCD_WRITE_DATA(0x01); + LCD_WRITE_DATA(0x00); + LCD_WRITE_DATA(0x00); + LCD_WRITE_DATA(0x00); + + LCD_WRITE_COMMAND(0x3A); + LCD_WRITE_DATA(0x66); + + LCD_WRITE_COMMAND(0x36); + LCD_WRITE_DATA(0x00); + + LCD_WRITE_COMMAND(0x21); + + LCD_WRITE_COMMAND(0x11); + sunxi_lcd_delay_ms(120); + + LCD_WRITE_COMMAND(0x29); + sunxi_lcd_delay_ms(20); + return; +} + +static void LCD_panel_exit(u32 sel) +{ + return; +} + +/* sel: 0:lcd0; 1:lcd1 */ +static s32 LCD_user_defined_func(u32 sel, u32 para1, u32 para2, u32 para3) +{ + return 0; +} + +struct __lcd_panel st7701s_rgb_panel = { + /* panel driver name, must mach the lcd_drv_name in sys_config.fex */ + .name = "st7701s_rgb", + .func = { + .cfg_panel_info = LCD_cfg_panel_info, + .cfg_open_flow = LCD_open_flow, + .cfg_close_flow = LCD_close_flow, + .lcd_user_defined_func = LCD_user_defined_func, + }, +}; \ No newline at end of file Index: tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/st7701s_rgb.h =================================================================== --- /dev/null +++ tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/st7701s_rgb.h @@ -0,0 +1,18 @@ +/* + * Allwinner SoCs display driver. + * + * Copyright (C) 2021 Sipeed. + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#ifndef __ST7701S_RGB_PANEL_H__ +#define __ST7701S_RGB_PANEL_H__ + +#include "panels.h" + +extern struct __lcd_panel st7701s_rgb_panel; + +#endif \ No newline at end of file Index: tina-d1-h/device/config/chips/d1-h/configs/nezha/linux-5.4/config-5.4 =================================================================== --- tina-d1-h.orig/device/config/chips/d1-h/configs/nezha/linux-5.4/config-5.4 +++ tina-d1-h/device/config/chips/d1-h/configs/nezha/linux-5.4/config-5.4 @@ -2517,6 +2517,7 @@ CONFIG_LCD_SUPPORT_HE0801A068=y # CONFIG_LCD_SUPPORT_ST7789V is not set # CONFIG_LCD_SUPPORT_ST7796S is not set # CONFIG_LCD_SUPPORT_ST7701S is not set +CONFIG_LCD_SUPPORT_ST7701S_RGB=y # CONFIG_LCD_SUPPORT_T30P106 is not set # CONFIG_LCD_SUPPORT_TO20T20000 is not set # CONFIG_LCD_SUPPORT_FRD450H40014 is not set Index: tina-d1-h/device/config/chips/d1-h/configs/nezha/uboot-board.dts =================================================================== --- tina-d1-h.orig/device/config/chips/d1-h/configs/nezha/uboot-board.dts +++ tina-d1-h/device/config/chips/d1-h/configs/nezha/uboot-board.dts @@ -42,7 +42,7 @@ &pwm2_pin_b { pins = "PD18"; muxsel = <0>; - function = "gpio_out"; + function = "gpio_in"; }; &pwm2 { @@ -260,57 +260,50 @@ /* dcdc1-supply = <®_dcdc1>;*/ }; +/* &lcd0 { - lcd_used = <1>; + lcd_used = <1>; + lcd_driver_name = "st7701s_rgb"; - lcd_driver_name = "tft08006"; - lcd_backlight = <100>; - lcd_if = <4>; - - lcd_x = <800>; - lcd_y = <1280>; - lcd_width = <52>; - lcd_height = <52>; - lcd_dclk_freq = <70>; - - lcd_pwm_used = <1>; - lcd_pwm_ch = <2>; - lcd_pwm_freq = <1000>; - lcd_pwm_pol = <0>; - lcd_pwm_max_limit = <255>; - - lcd_hbp = <32>; - lcd_ht = <868>; - lcd_hspw = <4>; - lcd_vbp = <12>; - lcd_vt = <1311>; - lcd_vspw = <4>; - - lcd_dsi_if = <0>; - lcd_dsi_lane = <4>; - lcd_lvds_if = <0>; - lcd_lvds_colordepth = <0>; - lcd_lvds_mode = <0>; - lcd_frm = <0>; - lcd_hv_clk_phase = <0>; - lcd_hv_sync_polarity= <0>; - lcd_io_phase = <0x0000>; - lcd_gamma_en = <0>; + lcd_if = <0>; + lcd_hv_if = <0>; + + lcd_width = <70>; + lcd_height = <72>; + lcd_x = <480>; + lcd_y = <480>; + lcd_dclk_freq = <19>; + lcd_hbp = <60>; + lcd_ht = <612>; + lcd_hspw = <12>; + lcd_vbp = <18>; + lcd_vt = <520>; + lcd_vspw = <4>; + + lcd_backlight = <50>; + lcd_pwm_used = <1>; + lcd_pwm_ch = <7>; + lcd_pwm_freq = <20000>; + lcd_pwm_pol = <1>; lcd_bright_curve_en = <0>; - lcd_cmap_en = <0>; - lcd_fsync_en = <0>; - lcd_fsync_act_time = <1000>; - lcd_fsync_dis_time = <1000>; - lcd_fsync_pol = <0>; - - deu_mode = <0>; - lcdgamma4iep = <22>; - smart_color = <90>; - - lcd_gpio_0 = <&pio PG 13 GPIO_ACTIVE_HIGH>; - pinctrl-0 = <&dsi4lane_pins_a>; - pinctrl-1 = <&dsi4lane_pins_b>; + + lcd_frm = <1>; + lcd_io_phase = <0x0000>; + lcd_gamma_en = <0>; + lcd_cmap_en = <0>; + lcd_hv_clk_phase= <0>; + lcd_hv_sync_polarity= <0>; + + lcd_power = "vcc-lcd"; + lcd_pin_power = "vcc-pd"; + lcd_gpio_0 = <&pio PG 13 GPIO_ACTIVE_HIGH>; + lcd_gpio_1 = <&pio PE 14 GPIO_ACTIVE_HIGH>; + lcd_gpio_2 = <&pio PE 12 GPIO_ACTIVE_HIGH>; + lcd_gpio_3 = <&pio PE 15 GPIO_ACTIVE_HIGH>; + pinctrl-0 = <&rgb18_pins_a>; + pinctrl-1 = <&rgb18_pins_b>; }; +*/ &hdmi { hdmi_used = <1>;
请使用quilt应用该patch
-
-
@anruliu 为什么开机不显示,休眠唤醒一下就能显示呢?请问这个问题要到哪里查?
-
@lbuque 这样也是只能休眠唤醒之后能正常显示吧?开机默认能正常显示吗?
-
@ming899 官方的视频教程提到tina sdk uboot 开启lcd的显示,内核就不走开屏流程了,进内核后可以休眠唤醒打开屏
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号