#include <dt-bindings/clock/qcom,rpmh.h>

&soc {
    //add for nfc_chipset
    nfc_chipset {
        compatible = "oplus-nfc-chipset";
        chipset-22003 = "SN220T";//china
        chipset-22899 = "SN220U";//oversea
        chipset-22203 = "SN220U";//oversea
    };
};

&tlmm {
	nfc {
		nfc_int_active: nfc_int_active {
			/* active state */
			mux {
				/* GPIO 155 NFC Read Interrupt */
				pins = "gpio155";
				function = "gpio";
			};

			config {
				pins = "gpio155";
				drive-strength = <2>; /* 2 MA */
				bias-pull-up;
			};
		};

		nfc_int_suspend: nfc_int_suspend {
			/* sleep state */
			mux {
				/* GPIO 155 NFC Read Interrupt */
				pins = "gpio155";
				function = "gpio";
			};

			config {
				pins = "gpio155";
				drive-strength = <2>; /* 2 MA */
				bias-pull-up;
			};
		};

		nfc_enable_active: nfc_enable_active {
			mux {
				pins = "gpio30";
				function = "gpio";
			};

			config {
				pins = "gpio30";
				drive-strength = <2>; /* 2 MA */
				bias-pull-up;
			};
		};

		nfc_enable_suspend: nfc_enable_suspend {
			mux {
				pins = "gpio30";
				function = "gpio";
			};

			config {
				pins = "gpio30";
				drive-strength = <2>; /* 2 MA */
				bias-disable;
			};
		};
		
				nfc_clk_req_active: nfc_clk_req_active {
			/* active state */
			mux {
				/* GPIO 31: NFC CLOCK REQUEST */
				pins = "gpio31";
				function = "gpio";
			};

			config {
				pins = "gpio31";
				drive-strength = <2>; /* 2 MA */
				bias-pull-up;
			};
		};

		nfc_clk_req_suspend: nfc_clk_req_suspend {
			/* sleep state */
			mux {
				/* GPIO 31: NFC CLOCK REQUEST */
				pins = "gpio31";
				function = "gpio";
			};

			config {
				pins = "gpio31";
				drive-strength = <2>; /* 2 MA */
				bias-disable;
			};
		};

	};
};



&qupv3_se0_i2c {
	status = "ok";
	qcom,clk-freq-out = <400000>;
	#address-cells = <1>;
	#size-cells = <0>;
	nq@28 {
		compatible = "qcom,sn-nci";
		reg = <0x28>;
		qcom,sn-irq = <&tlmm 155 0x00>;
		qcom,sn-ven = <&tlmm 30 0x00>;
                qcom,sn-clkreq = <&tlmm 31 0x00>;
                qcom,sn-vdd-1p8-supply = <&L15B>;
                qcom,sn-vdd-1p8-voltage = <1760000 1800000>;
                qcom,sn-vdd-1p8-current = <157000>;
		interrupt-parent = <&tlmm>;
		interrupts = <155 0>;
		interrupt-names = "nfc_irq";
		pinctrl-names = "nfc_active", "nfc_suspend";
		pinctrl-0 = <&nfc_int_active &nfc_enable_active
			     &nfc_clk_req_active >;
		pinctrl-1 = <&nfc_int_suspend &nfc_enable_suspend
			     &nfc_clk_req_suspend  >;
	};
};
