&qupv3_se10_i2c {
	status = "disabled";
};

&qupv3_se10_spi{
	/delete-property/ pinctrl-0;
	/delete-property/ pinctrl-1;
	pinctrl-0 = <&qupv3_se10_spi_mosi_active>, <&qupv3_se10_spi_miso_active>,
				<&qupv3_se10_spi_clk_active>, <&qupv3_se10_spi_cs_active>;
	pinctrl-1 = <&qupv3_se10_spi_sleep>, <&qupv3_se10_spi_cs_sleep>;
};

&soc {
    devinfo {
        status = "disabled";
    };

	devinfo_xueying {
		compatible = "oplus-devinfo";

		pinctrl-names = "default", "sleep", "active", "idle";
		pinctrl-0 = <&hw_pins_default>;
		pinctrl-1 = <&aboard_pin_gpio0_sleep>;
		pinctrl-2 = <&aboard_pin_gpio0_active>;
		pinctrl-3 = <&aboard_pin_gpio0_idle>;

		main-sub {
			compatible = "hw-match, main-sub";
			use_tristate_gpio;
			aboard-gpio0 = <&tlmm 126 0>;
			aboard-patterns = <0 0 0>;	/*0[high-resistance] 1[pull-down] 2[pull-up]*/
			/*main board*/
			match-projects = <22003 22203 22899>;
		};
	};
};

&tlmm {
//#ifdef OPLUS_FEATURE_TP_BASIC
//#ifdef OPLUS_FEATURE_ABOARD
	hw_pins_default:hw_pins_default {
	};
	aboard_pin_gpio0_sleep:aboard_pin_gpio0_sleep {
		mux {
			pins = "gpio126";
			function = "gpio";
		};
		config {
			pins = "gpio126";
			drive-strength = <2>;
			bias-pull-down;
			input-enable;
		};
	};

	aboard_pin_gpio0_active:aboard_pin_gpio0_active {
		mux {
			pins = "gpio126";
			function = "gpio";
		};
		config {
			pins = "gpio126";
			drive-strength = <2>;
			bias-pull-up;
			input-enable;
		};
	};

	aboard_pin_gpio0_idle:aboard_pin_gpio0_idle {
		mux {
			pins = "gpio126";
			function = "gpio";
		};
		config {
			pins = "gpio126";
			bias-disable;
			input-enable;
		};
	};

//#ifdef OPLUS_FEATURE_TRI_KEY
	uphall_tri_state_key_active: uphall_tri_state_key_active {
		mux {
			pins = "gpio17";
			function = "gpio";
		};
		config {
			pins = "gpio17";
			drive-strength = <2>;
			bias-pull-up;
		};
	};

	downhall_tri_state_key_active: downhall_tri_state_key_active {
		mux {
			pins = "gpio14";
			function = "gpio";
		};
		config {
			pins = "gpio14";
			drive-strength = <2>;
			bias-pull-up;
		};
	};

	/*gpio_wakeup: gpio_wakeup {
		compatible = "gpio_wakeup";
		gpio_table = <4 5 7 10 11 42 57 64 67 68
				70 71 92 98 117 126 144 145
				151 152 153 155 159 160 161
				171 172 173 178 181 194 195
				205 206 207>;
	};
	*/

	/* add primary for touchscreen */

	pmx_ts_int_active_primary {
		ts_int_active_primary: ts_int_active_primary {
			mux {
				pins = "gpio25";
				function = "gpio";
			};

			config {
				pins = "gpio25";
				drive-strength = <8>;
				bias-disable;
				input-enable;
			};
		};
	};

	pmx_ts_int_suspend_primary {
		ts_int_suspend_primary: ts_int_suspend_primary {
			mux {
				pins = "gpio25";
				function = "gpio";
			};

			config {
				pins = "gpio25";
				drive-strength = <8>;
				//bias-pull-down;
				bias-pull-up;
				input-enable;
			};
		};
	};

	pmx_ts_reset_active_primary {
		ts_reset_active_primary: ts_reset_active_primary {
			mux {
				pins = "gpio24";
				function = "gpio";
			};

			config {
				pins = "gpio24";
				drive-strength = <8>;
				output-low;
				bias-disable;
			};
		};
	};

	pmx_ts_reset_suspend_primary {
		ts_reset_suspend_primary: ts_reset_suspend_primary {
			mux {
				pins = "gpio24";
				function = "gpio";
			};

			config {
				pins = "gpio24";
				drive-strength = <2>;
				bias-pull-down;
			};
		};
	};
	//#endif

	pmx_ts_int_active_secondary {
		ts_int_active_secondary: ts_int_active_secondary {
			mux {
				pins = "gpio174";
				function = "gpio";
			};

			config {
				pins = "gpio174";
				drive-strength = <8>;
				bias-pull-up;
				input-enable;
			};
		};
	};

	qupv3_se10_spi_pins: qupv3_se10_spi_pins {
		qupv3_se10_spi_miso_active: qupv3_se10_spi_miso_active {
			mux {
				pins = "gpio64";
				function = "qup2_se2_l0";
			};

			config {
				pins = "gpio64";
				drive-strength = <6>;
				bias-disable;
			};
		};

		qupv3_se10_spi_mosi_active: qupv3_se10_spi_mosi_active {
			mux {
				pins = "gpio65";
				function = "qup2_se2_l1";
			};

			config {
				pins = "gpio65";
				drive-strength = <6>;
				bias-disable;
			};
		};

		qupv3_se10_spi_clk_active: qupv3_se10_spi_clk_active {
			mux {
				pins = "gpio66";
				function = "qup2_se2_l2";
			};

			config {
				pins = "gpio66";
				drive-strength = <6>;
				bias-disable;
			};
		};

		qupv3_se10_spi_cs_active: qupv3_se10_spi_cs_active {
			mux {
				pins = "gpio67";
				function = "qup2_se2_l3";
			};

			config {
				pins = "gpio67";
				drive-strength = <6>;
				bias-disable;
			};
		};

		qupv3_se10_spi_sleep: qupv3_se10_spi_sleep {
			mux {
				pins = "gpio64", "gpio65",
								"gpio66";
				function = "gpio";
			};

			config {
				pins = "gpio64", "gpio65",
								"gpio66";
				drive-strength = <6>;
				bias-disable;
			};
		};

		qupv3_se10_spi_cs_sleep: qupv3_se10_spi_cs_sleep {
			mux {
				pins = "gpio67";
				function = "gpio";
			};

			config {
				pins = "gpio67";
				drive-strength = <6>;
				bias-disable;
				output-high;
			};
		};
	};
};

&pm8550ve_f_gpios {
	ts_reset_active_secondary: ts_reset_active_secondary {
		pins = "gpio7";
		function = "normal";
		bias-disable;
		output-low;
		power-source = <1>;
	};
};

&pm8550b_gpios {
	ts_avdd_active_secondary: ts_avdd_active_secondary {
		pins = "gpio12";
		function = "normal";
		bias-disable;
		input-disable;
		output-enable;
		output-high;
		power-source = <0>;
	};
};

&qupv3_se9_i2c {
	status = "ok";
	qcom,clk-freq-out = <400000>;
	magnachip@0C {
		compatible = "oplus,hall-mxm1120,up";
		reg = <0x0C>;
		vdd-supply = <&L2B>;
		vio-supply = <&L1B>;
		magnachip,init-interval = <200>;
		interrupt-parent = <&tlmm>;
		interrups = <17 0x02>;
		dhall,irq-gpio = <&tlmm 17 0x2008>;
		pinctrl-names = "uphall_tri_state_key_active";
		pinctrl-0 = <&uphall_tri_state_key_active>;
	};

	magnachip@0D {
		compatible = "oplus,hall-mxm1120,down";
		reg = <0x0D>;
		vdd-supply = <&L2B>;
		vio-supply = <&L1B>;
		magnachip,init-interval = <200>;
		interrupt-parent = <&tlmm>;
		interrups = <14 0x02>;
		dhall,irq-gpio = <&tlmm 14 0x2008>;
		pinctrl-names = "downhall_tri_state_key_active";
		pinctrl-0 = <&downhall_tri_state_key_active>;
	};
};

//#ifdef /*OPLUS_FEATURE_TP_BASIC*/
&qupv3_se4_i2c {
	status = "disabled";
};
&qupv3_se4_spi {
	status = "ok";
	#address-cells = <1>;
	#size-cells = <0>;

	qcom,spi-touch-active = "goodix-gt9966";
	//qcom,la-vm;

	/delete-node/ focaltech@0;
	focaltech@0 {
		status = "disabled";
	};
	st_fts@49 {
		status = "disabled";
	};
	focaltech@38 {
		status = "disabled";
	};
	novatek@0 {
		status = "disabled";
	};

	goodix_gt9966@0 {
		status = "ok";
		compatible = "goodix-gt9966";
		reg = <0x0>;
		spi-max-frequency = <12000000>;
		chip-name = "GT9966";

		/* Interrupt && Irq-gpio */
		irq-gpio = <&tlmm 25 0x2002>;
		interrupt-parent = <&tlmm>;
		interrupts = <25 0x2002>;
		reset-gpio = <&tlmm 24 0x1>;

		/* Power Config */
		enable2v8_gpio = <&tlmm 10 0x1>;
		vcc_1v8-supply = <&L4B>;

		/* Other HW Resource */
		pinctrl-names = "default";
		pinctrl-0 = <&ts_int_active_primary &ts_reset_active_primary>;

		touchpanel,max-num-support = <10>;
		touchpanel,tx-rx-num = <36 38>;
		earsense,tx-rx-num = <36 38>;
		touchpanel,panel-coords = <24400 22680>;
		touchpanel,display-coords = <2440 2268>;
		touchpanel,touchmajor-limit = <128 216>;
		touchpanel,single-optimized-time = <8>;
		touchpanel,high-frame-rate-time = <60>;

		project_id = <22003>;
		vid_len = <2>;
		touchpanel,tp-index = <0>;
		touchpanel,tp_ic_type = <2>;
		panel_type = <3>; // type of tp_dev ,TP-BOE = 3;
		firmware_name = "AC052", "AC052", "AC052";
		platform_support_project = <22003 22203 22899>;
		platform_support_project_dir = <22003 22003 22003>;
		platform_support_project_commandline = "default_commandline", "default_commandline", "default_commandline";

		//black_gesture_support;
		pressure_report_support;
		charger_pump_support;
		//game_switch_support;
		//smart_gesture_support;
		spi_port_support;
		fw_update_app_support;
		//fingerprint_underscreen_support;
		//freq_hop_simulate_support;
		report_flow_unlock_support;
		//screenoff_fingerprint_info_support;
		irq_need_dev_resume_ok;
		//enable_point_auto_change;
		//report_rate_white_list_support;
		//kernel_grip_support;
		exception_upload_support;
		//grip_no_driver_support;
		//health_monitor_support;
		//black_gesture_indep_support;
		//algorithm_support;
		//snr_read_support;
		//touchpanel,get_motor_coord = <0 370 70>;
		//sportify_aod_gesture_support;
		//pen_support;

		/*
		 *Virtual Key Config:
		 *1:touchpanel,button-type: <virtualkey_type  supportted_button-map>
		 *virtualkey_type:
		 *Type 1: using board_properties
		 *Type 2: using same IC (button zone&& touch zone are seprate)
		 *Type 3: using diffrent IC (button zone&& touch zone are seprate)
		 *Type 4: No need of virtual key process
		 *supportted_button-map:select|menu|home|back
		 *
		 *2:touchpanel,button-map
		 *type (X1,Y1)(X2,Y2)(X3,Y3)(Width_X,Hight_Y)--Only when button-type is 0
		 */
		touchpanel,button-type = <4>;
		touchpanel.button-TRx = <0 0>;

		GT9966 {
			support_gesture_type = <0x10002>;
			support_disp_rate = <60 120>;
		};

	};
//#endif /*OPLUS_FEATURE_TP_BASIC*/
};

&qupv3_se10_spi {
	status = "ok";

	qcom,spi-touch-active = "goodix-gt9916";

	#address-cells = <1>;
	#size-cells = <0>;

	/delete-node/ focaltech@0;

	goodix-berlin@5d {
		status = "disabled";
	};

	focaltech@0 {
		status = "disabled";
	};

	synaptics_tcm@0{
		compatible = "goodix-gt9916";
		reg = <0x0>;
		chip-name = "GT9916";
		status = "ok";
		spi-max-frequency = <12000000>;

		/* Interrupt && Irq-gpio */
		interrupt-parent = <&tlmm>;
		interrupts = <174 0x2008>;

		/* Power Config */
		enable2v8_gpio = <&pm8550b_gpios 12 0x1>;
		vcc_1v8-supply = <&L4B>;

		/* Other HW Resource */
		irq-gpio = <&tlmm 174 0x2008>;
		reset-gpio = <&pm8550ve_f_gpios 7 0x1>;

		pinctrl-names = "default";
		pinctrl-0 = <&ts_avdd_active_secondary &ts_int_active_secondary &ts_reset_active_secondary>;

		touchpanel,max-num-support = <10>;
		touchpanel,tx-rx-num = <18 40>;
		earsense,tx-rx-num = <18 40>;
		touchpanel,panel-coords = <11160 24840>;
		touchpanel,display-coords = <1116 2484>;
		touchpanel,touchmajor-limit = <256 256>;
		touchpanel,int-mode = <1>; /*0: interrupt and disable, 1:interrupt and not disable*/
		touchpanel,curved-size = <45>;

		touchpanel,single-optimized-time = <8>;
		touchpanel,high-frame-rate-time = <60>;

		project_id = <22003>;
		vid_len = <2>;
		touchpanel,tp-index = <1>;
		touchpanel,tp_ic_type = <2>;
		panel_type = <3>; // type of tp_dev ,TP-BOE = 3;
		firmware_name = "AC052", "AC052", "AC052";
		platform_support_project = <22003 22203 22899>;
		platform_support_project_dir = <22003 22003 22003>;
		platform_support_project_commandline = "default_commandline", "default_commandline", "default_commandline";

		/* SW Support Feature Control */
		//black_gesture_support;
		//fw_edge_limit_support;
		pressure_report_support;
		//charger_pump_support;
		//game_switch_support;
		//smart_gesture_support;
		fw_update_app_support;
		freq_hop_simulate_support;
		report_flow_unlock_support;
		irq_need_dev_resume_ok;
		//firmware_in_dts;
		enable_point_auto_change;
		//grip_no_driver_support;
		//health_monitor_support;
		//black_gesture_indep_support;
		spi_port_support;

		/*
		 *Virtual Key Config:
		 *1:touchpanel,button-type: <virtualkey_type  supportted_button-map>
		 *virtualkey_type:
		 *Type 1: using board_properties
		 *Type 2: using same IC (button zone&& touch zone are seprate)
		 *Type 3: using diffrent IC (button zone&& touch zone are seprate)
		 *Type 4: No need of virtual key process
		 *supportted_button-map:select|menu|home|back
		 *
		 *2:touchpanel,button-map
		 *type (X1,Y1)(X2,Y2)(X3,Y3)(Width_X,Hight_Y)--Only when button-type is 0
		 */
		touchpanel,button-type = <4>;
		touchpanel.button-TRx = <0 0>;

		S3910 {
			switch_report_rate;
			report_rate_default = <60>;
			report_rate_game_value = <1>;
			fps_report_rate = <60 2 90 1 120 3>;//1:360Hz 2:125Hz 3:240Hz
			default_gesture_mask = <8191>;
			fwupdate_bootloader = <1>;
			normal_config_version = <2>;
		};
	};

};
//#endif /*OPLUS_FEATURE_TP_BASIC*/
