/*
 * Generated by MTK SP Drv_CodeGen Version 03.13.6  for MT6735M. Copyright MediaTek Inc. (C) 2013.
 * Sun Feb 19 13:59:47 2023
 * Do Not Modify the File.
 */

#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>

/*************************
 * EINT DTSI File
*************************/

&nfc {
	interrupt-parent = <&eintc>;
	interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
	debounce = <2 0>;
	status = "okay";
};
&msdc1_ins {
	interrupt-parent = <&eintc>;
	interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
	debounce = <5 1000>;
	status = "okay";
};
&accdet {
	interrupt-parent = <&eintc>;
	interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
	debounce = <6 256000>;
	status = "okay";
};
&touch {
	interrupt-parent = <&eintc>;
	interrupts = <10 IRQ_TYPE_EDGE_FALLING>;
	debounce = <10 0>;
	status = "okay";
};
&als {
	interrupt-parent = <&eintc>;
	interrupts = <65 IRQ_TYPE_LEVEL_LOW>;
	debounce = <65 0>;
	status = "okay";
};
&gse_1 {
	interrupt-parent = <&eintc>;
	interrupts = <66 IRQ_TYPE_LEVEL_LOW>;
	debounce = <66 0>;
	status = "okay";
};
&gyro {
	interrupt-parent = <&eintc>;
	interrupts = <67 IRQ_TYPE_LEVEL_LOW>;
	debounce = <67 0>;
	status = "okay";
};
&ext_buck_oc {
	interrupt-parent = <&eintc>;
	interrupts = <78 IRQ_TYPE_LEVEL_HIGH>;
	debounce = <78 0>;
	status = "okay";
};


/********************
 * GPIO USAGE MAPPING DTSI File
****************/

&gpio_usage_mapping {
	GPIO_SIM1_HOT_PLUG = <8>;
	GPIO_SIM2_HOT_PLUG = <9>;
	GPIO_CMDAT1 = <43>;
	GPIO_SIM2_SCLK = <160>;
	GPIO_SIM2_SRST = <161>;
	GPIO_SIM2_SIO = <162>;
	GPIO_SIM1_SCLK = <163>;
	GPIO_SIM1_SRST = <164>;
	GPIO_SIM1_SIO = <165>;
};


&eintc {
	MD1_SIM1_HOT_PLUG_EINT@0 {
		compatible = "mediatek,MD1_SIM1_HOT_PLUG_EINT-eint";
		interrupts = <0 4>;
		debounce = <0 100000>;
		dedicated = <0 0>;
		src_pin = <0 1>;
		sockettype=<0 0>;
		status = "okay";
	};
	MD1_SIM2_HOT_PLUG_EINT@1 {
		compatible = "mediatek,MD1_SIM2_HOT_PLUG_EINT-eint";
		interrupts = <1 4>;
		debounce = <1 100000>;
		dedicated = <1 0>;
		src_pin = <1 2>;
		sockettype=<1 0>;
		status = "okay";
	};
};


/*************************
 * PMIC DTSI File
*************************/

&mt_pmic_vcama_ldo_reg {
	regulator-name = "vcama";
	regulator-default-on = <0>; /* 0:skip, 1: off, 2:on */
	status = "okay";
};
&mt_pmic_vsim1_ldo_reg {
	regulator-name = "vsim1";
	regulator-default-on = <0>; /* 0:skip, 1: off, 2:on */
	status = "okay";
};
&mt_pmic_vsim2_ldo_reg {
	regulator-name = "vsim2";
	regulator-default-on = <0>; /* 0:skip, 1: off, 2:on */
	status = "okay";
};
&mt_pmic_vcam_af_ldo_reg {
	regulator-name = "vcamaf";
	regulator-default-on = <0>; /* 0:skip, 1: off, 2:on */
	status = "okay";
};
&mt_pmic_vgp1_ldo_reg {
	regulator-name = "vgp1";
	regulator-default-on = <0>; /* 0:skip, 1: off, 2:on */
	status = "okay";
};
&mt_pmic_vibr_ldo_reg {
	regulator-name = "vibr";
	regulator-default-on = <0>; /* 0:skip, 1: off, 2:on */
	status = "okay";
};
&mt_pmic_vcamd_ldo_reg {
	regulator-name = "vcamd";
	regulator-default-on = <0>; /* 0:skip, 1: off, 2:on */
	status = "okay";
};
&mt_pmic_vcam_io_ldo_reg {
	regulator-name = "vcamio";
	regulator-default-on = <0>; /* 0:skip, 1: off, 2:on */
	status = "okay";
};

&kd_camera_hw1 {
	vcama-supply = <&mt_pmic_vcama_ldo_reg>;
	vcama_main2-supply = <&mt_pmic_vcama_ldo_reg>;
	vcama_sub-supply = <&mt_pmic_vcama_ldo_reg>;

	vcamaf-supply = <&mt_pmic_vcam_af_ldo_reg>;
	vcamaf_main2-supply = <&mt_pmic_vcam_af_ldo_reg>;
	vcamaf_sub-supply = <&mt_pmic_vcam_af_ldo_reg>;

	vcamd-supply = <&mt_pmic_vcamd_ldo_reg>;
	vcamd_main2-supply = <&mt_pmic_vcamd_ldo_reg>;
	vcamd_sub-supply = <&mt_pmic_vcamd_ldo_reg>;

	vcamio-supply = <&mt_pmic_vcam_io_ldo_reg>;
	vcamio_main2-supply = <&mt_pmic_vcam_io_ldo_reg>;
	vcamio_sub-supply = <&mt_pmic_vcam_io_ldo_reg>;

	status = "okay";
};

&touch {
	vtouch-supply = <&mt_pmic_vgp1_ldo_reg>;
	status = "okay";
};


/********************************************
 *ADC DTSI File
********************************************/

&auxadc {
	adc_channel@ {
		compatible = "mediatek,adc_channel";
		mediatek,temperature0 = <0>;
		mediatek,temperature1 = <1>;
		mediatek,adc_fdd_rf_params_dynamic_custom_ch = <12>;
		status = "okay";
	};
};


/**********************************************
 *CLK_BUF DTSI File
********************************************/

&rf_clock_buffer_ctrl {
	mediatek,clkbuf-quantity = <4>;
	mediatek,clkbuf-config = <2 2 2 2>;
	status = "okay";
};


/**********************************************
 *Keypad DTSI File
********************************************/

&keypad{
	mediatek,kpd-key-debounce = <1024>;
	mediatek,kpd-sw-pwrkey = <116>;
	mediatek,kpd-hw-pwrkey = <8>;
	mediatek,kpd-sw-rstkey  = <115>;
	mediatek,kpd-hw-rstkey = <17>;
	mediatek,kpd-use-extend-type = <0>;
	/*HW Keycode [0~71] -> Linux Keycode*/
	mediatek,kpd-hw-map-num = <72>;
	mediatek,kpd-hw-init-map = <114 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
				0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
				0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 >;
	mediatek,kpd-pwrkey-eint-gpio = <0>;
	mediatek,kpd-pwkey-gpio-din  = <0>;
	mediatek,kpd-hw-dl-key0 = <17>;
	mediatek,kpd-hw-dl-key1 = <0>;
	mediatek,kpd-hw-dl-key2 = <8>;
	mediatek,kpd-hw-recovery-key = <17>;
	mediatek,kpd-hw-factory-key = <0>;
	status = "okay";
};


/*************************
 * I2C DTSI File
*************************/

&i2c0 {
	#address-cells = <1>;
	#size-cells = <0>;
	camera_main@10 {
		compatible = "mediatek,camera_main";
		reg = <0x10>;
		status = "okay";
	};
	camera_main_af@0c {
		compatible = "mediatek,camera_main_af";
		reg = <0x0c>;
		status = "okay";
	};
	camera_sub@3c {
		compatible = "mediatek,camera_sub";
		reg = <0x3c>;
		status = "okay";
	};
};

&i2c1 {
	#address-cells = <1>;
	#size-cells = <0>;
	cap_touch@5d {
		compatible = "mediatek,cap_touch";
		reg = <0x5d>;
		status = "okay";
	};
	i2c_lcd_bias@3e {
		compatible = "mediatek,i2c_lcd_bias";
		reg = <0x3e>;
		status = "okay";
	};
};

&i2c2 {
	#address-cells = <1>;
	#size-cells = <0>;
	msensor@0d {
		compatible = "mediatek,msensor";
		reg = <0x0d>;
		status = "okay";
	};
	gyro@68 {
		compatible = "mediatek,gyro";
		reg = <0x68>;
		status = "okay";
	};
	gsensor@0e {
		compatible = "mediatek,gsensor";
		reg = <0x0e>;
		status = "okay";
	};
	alsps@60 {
		compatible = "mediatek,alsps";
		reg = <0x60>;
		status = "okay";
	};
	nfc@28 {
		compatible = "mediatek,nfc";
		reg = <0x28>;
		status = "okay";
	};
	strobe_main@63 {
		compatible = "mediatek,strobe_main";
		reg = <0x63>;
		status = "okay";
	};
};

&i2c3 {
	#address-cells = <1>;
	#size-cells = <0>;
	ext_buck@6b {
		compatible = "mediatek,ext_buck";
		reg = <0x6b>;
		status = "okay";
	};
};