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

&soc {
    //add for nfc_chipset
    nfc_chipset {
        compatible = "oplus-nfc-chipset";
        chipset-21131 = "SN110T";
        chipset-21321 = "SN100T";
    };
};


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

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

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

			config {
				pins = "gpio55";
				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_fwdl_active: nfc_fwdl_active {
			mux {
				/* 59: Firmware */
				pins = "gpio59";
				function = "gpio";
			};

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

		nfc_fwdl_suspend: nfc_fwdl_suspend {
			mux {
				/*59: Firmware */
				pins = "gpio59";
				function = "gpio";
			};

			config {
				pins = "gpio59";
				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 55 0x00>;
		qcom,sn-ven = <&tlmm 30 0x00>;
                qcom,sn-firm = <&tlmm 59 0x00>;
		qcom,clk-src = "BBCLK2";
                qcom,sn-vdd-1p8-supply = <&L15B>;
                qcom,sn-vdd-1p8-voltage = <1760000 1800000>;
                qcom,sn-vdd-1p8-current = <157000>;
		interrupt-parent = <&tlmm>;
		interrupts = <55 0>;
		interrupt-names = "nfc_irq";
		pinctrl-names = "nfc_active", "nfc_suspend";
		pinctrl-0 = <&nfc_int_active &nfc_enable_active
				&nfc_fwdl_active>;
		pinctrl-1 = <&nfc_int_suspend &nfc_enable_suspend
				&nfc_fwdl_suspend>;
                clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
                clock-names = "nfc_ref_clk";
	};
};


