[PORT] linux kernel source for Xiaomi Redmi 3S (land) (Snapdragon 430 msm8937)

BlueFlame4

Retired Recognized Developer
Mar 10, 2011
1,864
4,398
0
29
Dresden, Germany
You might wanna take a look at this: https://github.com/nicknitewolf/and...mmit/675738623bc16aaf29758a12aee63b2110c670a8

This should likely fix the Goodix FP, though GPIO ports have to be remapped quite likely. Do you know stock Fingerprint ports?

Background: nicknitewolf and alex9yust ported ZUK Z2 Pro's Goodix driver to the Redmi Note 3 Pro AFAIK. It usually only supports the FPC1020 fingerprint driver in Xiaomi's code. Good luck!
 

rilego

New member
Oct 21, 2016
1
0
0
I've got a tgz archive looks like the manufacture using for test.
This includes many origin files. I don't know whether it is useful or not.
The link is pan.baidu.com/s/1bpkbdcr
I am new XDA user so can't link outside img,plesase download attachments.
out\target\product\land\symbols\system\lib\libexif.so
out\target\product\land\symbols\system\lib\libmtp.so
out\target\product\land\symbols\system\lib\libresourcemanagerservice.so
out\target\product\land\symbols\system\lib\libRecoFace.so
out\target\product\land\symbols\system\lib\libmiuiclassproxy.so
out\target\product\land\symbols\system\lib\libc.so
out\target\product\land\symbols\system\lib\libbcinfo.so
out\target\product\land\symbols\system\lib\libstagefright_soft_mpeg4dec.so
out\target\product\land\symbols\system\lib\libsysutils.so
out\target\product\land\obj\KERNEL_OBJ\vmlinux
wingcust\land\base\wt_overlay\vendor\wingtech\build\tools\symbol\SBL1_ASIC.elf
wingcust\land\base\wt_overlay\vendor\wingtech\build\tools\symbol\PROG_EMMC_FIREHOSE_8937_DDR_ASIC.elf
wingcust\land\base\wt_overlay\vendor\wingtech\build\tools\symbol\qsee.elf
wingcust\land\base\wt_overlay\vendor\wingtech\build\tools\symbol\devcfg.elf
wingcust\land\base\wt_overlay\vendor\wingtech\build\tools\symbol\RPM_AAAAANAAR_rpm.elf
wingcust\land\base\vendor\qmss_bin\msg_hash.txt
wingcust\land\base\vendor\qmss_bin\M89378937.genns.prodQ0000.elf
wingcust\land\base\vendor\qmss_bin\M8937AAAAAAAAQ1234.elf
wingcust\land\base\vendor\qmss_bin\M8937AAAAAAAAQ1234_SENSOR.elf
The file list please download the attachment.
英语不好请见谅:)
 

Attachments

yangyangnau

Senior Member
Sep 25, 2016
54
144
0
Hanzhong
You might wanna take a look at this: https://github.com/nicknitewolf/and...mmit/675738623bc16aaf29758a12aee63b2110c670a8

This should likely fix the Goodix FP, though GPIO ports have to be remapped quite likely. Do you know stock Fingerprint ports?

Background: nicknitewolf and alex9yust ported ZUK Z2 Pro's Goodix driver to the Redmi Note 3 Pro AFAIK. It usually only supports the FPC1020 fingerprint driver in Xiaomi's code. Good luck!
Thanks!

From Redmi 3/3s kernel's config:
Code:
CONFIG_FINGERPRINT_FPC1020=y
CONFIG_FINGERPRINT_GOODIX_GF3208=y
I forgot to check redmi 3/3s dts file's diff.
From Redmi 3 msm8939-qrd-wt88509_64.dtsi:
Code:
        goodix_fp {
                status = "ok";
                compatible = "goodix,fingerprint";
                spi-max-frequency = <8000000>;
                input-device-name = "gf3208";
                interrupt-parent = <&msm_gpio>;
                interrupts = <49 0x0>;
                spi-qup-id = <1>;

                goodix,gpio_reset = <&msm_gpio 52 0>;
                goodix,gpio_irq = <&msm_gpio 49 0>;

                clock-names = "iface_clk","core_clk";
                clocks = <&clock_gcc clk_gcc_blsp1_ahb_clk>,
                        <&clock_gcc clk_gcc_blsp1_qup1_spi_apps_clk>;

                pinctrl-names = "goodix_irq_active";
                pinctrl-0 = <&goodix_irq_active>;

        };
From Redmi 3s redmi3s-msm8937-38.dts:
Code:
                        goodix_spi_active {
                                linux,phandle = <0x189>;
                                phandle = <0x189>;

                                mux {
                                        pins = "gpio20", "gpio21", "gpio22", "gpio23";
                                        function = "blsp_spi6";
                                };

                                config {
                                        pins = "gpio20", "gpio21", "gpio22", "gpio23";
                                        drive-strength = <0x2>;
                                        bias-disable = <0x0>;
                                };
                        };

                        goodix_reset_reset {
                                linux,phandle = <0x18a>;
                                phandle = <0x18a>;

                                mux {
                                        pins = "gpio8";
                                        function = "gpio";
                                };

                                config {
                                        pins = "gpio8";
                                        drive-strength = <0x2>;
                                        bias-disable = <0x0>;
                                        output-low;
                                };
                        };

                        goodix_reset_active {
                                linux,phandle = <0x18b>;
                                phandle = <0x18b>;

                                mux {
                                        pins = "gpio8";
                                        function = "gpio";
                                };

                                config {
                                        pins = "gpio8";
                                        drive-strength = <0x2>;
                                        bias-disable = <0x0>;
                                        output-high;
                                };
                        };

                        goodix_irq_active {
                                linux,phandle = <0x18c>;
                                phandle = <0x18c>;

                                mux {
                                        pins = "gpio9";
                                        function = "gpio";
                                };

                                config {
                                        pins = "gpio9";
                                        drive-strength = <0x2>;
                                        bias-disable = <0x0>;
                                        input-enable;
                                };
                        };
Code:
                goodix_fp {
                        compatible = "goodix,fingerprint";
                        spi-max-frequency = <0xf4240>;
                        input-device-name = "gf3208";
                        interrupt-parent = <0x97>;
                        interrupts = <0x9 0x0>;
                        goodix,gpio_reset = <0x97 0x8 0x0>;
                        goodix,gpio_irq = <0x97 0x9 0x0>;
                        clock-names = "iface_clk", "core_clk";
                        clocks = <0x1b 0x8caa5b4f 0x1b 0x759a76b0>;
                        pinctrl-names = "goodixfp_spi_active", "goodixfp_reset_reset", "goodixfp_reset_active", "goodixfp_irq_active";
                        pinctrl-0 = <0x189>;
                        pinctrl-1 = <0x18a>;
                        pinctrl-2 = <0x18b>;
                        pinctrl-3 = <0x18c>;
                };
 
Last edited:
  • Like
Reactions: sheshuvadrevu

yangyangnau

Senior Member
Sep 25, 2016
54
144
0
Hanzhong
Fingerprint Goodix 3208:

From stock kernel dmesg:
Code:
[    3.045708] gf:gf_init, entry
[    3.045714] --------gf_init start.--------
[    3.046260] gf:gf_probe, entry
[    3.046266] --------gf_probe start.--------
[    3.046502] input: gf3208 as /devices/virtual/input/input3
[    3.046620] --------gf_probe end---OK.--------
[    3.046707]  status = 0x0
[    3.046713] gf:gf_init, exit
[    3.046718] --------gf_init end---OK.--------
[    3.047243] fpc1020 soc:fpc1020: parse_cmldine_for_fingerprint: is ok S88537AA1:bo 
[    3.047276] fpc1020 soc:fpc1020: fpc1020_probe: ok
[    3.047347] fpc1020_init OK
From my kernel #5d5fa78 dmesg:
Code:
[    2.997594] gf:gf_init, entry
[    2.997599] --------gf_init start.--------
[    2.997989]  status = 0x0
[    2.997994] gf:gf_init, exit
[    2.997997] --------gf_init end---OK.--------
Change drivers/fingerprint/goodix/gf_spi.c
Code:
status = platform_driver_register(&gf_driver);
to
Code:
status = platform_driver_probe(&gf_driver, gf_driver.probe);
pr_warn("redmi3s: force probe goodix_fp.\n");
or
Code:
status = platform_driver_probe(&gf_driver, &gf_probe);
pr_warn("redmi3s: force probe goodix_fp.\n");
Get dmesg below:
Code:
[    3.060181] gf:gf_init, entry
[    3.060186] --------gf_init start.--------
[    3.060559] redmi3s: force probe goodix_fp.
[    3.060577] Failed to register SPI driver.
[    3.060598]  status = 0xffffffed
[    3.060602] gf:gf_init, exit
[    3.060605] --------gf_init end---OK.--------
And change drivers/fingerprint/goodix/gf_spi.h
Code:
#define AP_CONTROL_CLK       1
#define  USE_PLATFORM_BUS    1
to
Code:
#define  USE_PLATFORM_BUS    1
or
Code:
#define  USE_PLATFORM_BUS    1
#define GF_FASYNC   1 /*If support fasync mechanism.*/
Get same dmesg as the above.
 

yangyangnau

Senior Member
Sep 25, 2016
54
144
0
Hanzhong
Fingerprint Goodix 3208:
From redmi 3 arch/arm64/boot/dts/qcom/msm8939-pinctrl.dtsi
Code:
                goodix_reset {
                        qcom,num-grp-pins = <1>;
                        qcom,pins = <&gp 52>;
                        qcom,pin-func = <0>;
                        label = "goodix_reset";
                        goodix_reset_active: active {
                                drive-strength = <2>;
                                bias-disable;
                                output-high;
                        };
                        goodix_reset_reset: reset {
                                drive-strength = <2>;
                                bias-disable;
                                output-low;
                        };
                };

                goodix_irq {
                        qcom,pins = <&gp 49>;
                        qcom,num-grp-pins = <1>;
                        qcom,pin-func = <0>;
                        label = "goodix_irq";
                        goodix_irq_active: active {
                                drive-strength = <2>;
                                bias-pull-down;
                                input-enable;
                        };
                };
 

yangyangnau

Senior Member
Sep 25, 2016
54
144
0
Hanzhong
For cameras: @assusdan Suslov Danila is working on it.
https://github.com/yangyangnau/android_kernel_xiaomi_msm8937/issues/2
https://github.com/assusdan/android_kernel_xiaomi_msm8937
75% of camera works in Footej. Preview - work. Front can take photos (not sure about saving them). Rear can't take photos.
Also we can take photo in Footej when we are using low resolution (2.1 MP)
While testers test camera, successfully start builded cm13!
 

yangyangnau

Senior Member
Sep 25, 2016
54
144
0
Hanzhong
Fingerprint Goodix 3208:
From Redmi 3s redmi3s-msm8937-38.dts:
Code:
			spi3 {

				spi3_default {
					linux,phandle = <0xcd>;
					phandle = <0xcd>;

					mux {
						pins = "gpio8", "gpio9", "gpio11";
						function = "blsp_spi3";
					};

					config {
						pins = "gpio8", "gpio9", "gpio11";
						drive-strength = <0xc>;
						bias-disable = <0x0>;
					};
				};

				spi3_sleep {
					linux,phandle = <0xcf>;
					phandle = <0xcf>;

					mux {
						pins = "gpio8", "gpio9", "gpio11";
						function = "gpio";
					};

					config {
						pins = "gpio8", "gpio9", "gpio11";
						drive-strength = <0x2>;
						bias-pull-down;
					};
				};

				cs0_active {
					linux,phandle = <0xce>;
					phandle = <0xce>;

					mux {
						pins = "gpio10";
						function = "blsp_spi3";
					};

					config {
						pins = "gpio10";
						drive-strength = <0x2>;
						bias-disable = <0x0>;
					};
				};

				cs0_sleep {
					linux,phandle = <0xd0>;
					phandle = <0xd0>;

					mux {
						pins = "gpio10";
						function = "gpio";
					};

					config {
						pins = "gpio10";
						drive-strength = <0x2>;
						bias-disable = <0x0>;
					};
				};
			};
goodix,gpio_reset = <0x97 0x8 0x0>; //gpio8
goodix,gpio_irq = <0x97 0x9 0x0>; //gpio9
spi3
pins = "gpio8", "gpio9", "gpio11"; //gpio11? for power?
cs0_active
pins = "gpio10"; //gpio10