diff --git a/Kbuild b/Kbuild index 30c9ad8e..3efff8ae 100644 --- a/Kbuild +++ b/Kbuild @@ -13,6 +13,13 @@ dtbo-y += st/sun-nfc.dtbo \ st/sun-nfc-rcm.dtbo endif +ifeq ($(CONFIG_ARCH_PARROT),y) +dtbo-y += nxp/parrot-nfc.dtbo \ + nxp/parrot-nfc-qrd.dtbo \ + nxp/parrot-nfc-idp.dtbo \ + nxp/parrot-nfc-atp.dtbo +endif + always-y := $(dtb-y) $(dtbo-y) subdir-y := $(dts-dirs) clean-files := *.dtb *.dtbo diff --git a/nxp/parrot-nfc-atp.dts b/nxp/parrot-nfc-atp.dts new file mode 100644 index 00000000..51ca0813 --- /dev/null +++ b/nxp/parrot-nfc-atp.dts @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: BSD-3-Clause + +/* + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +/dts-v1/; +/plugin/; + +#include "parrot-nfc-common.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. Parrot ATP"; + compatible = "qcom,parrot-atp", "qcom,parrot", "qcom,atp"; + qcom,msm-id = <663 0x10000>; + qcom,board-id = <33 0>; +}; diff --git a/nxp/parrot-nfc-common.dtsi b/nxp/parrot-nfc-common.dtsi new file mode 100644 index 00000000..5080a9f7 --- /dev/null +++ b/nxp/parrot-nfc-common.dtsi @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: BSD-3-Clause + +/* + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +&qupv3_se6_i2c { + status = "ok"; + qcom,clk-freq-out = <1000000>; + #address-cells = <1>; + #size-cells = <0>; + nq@28 { + compatible = "qcom,sn-nci"; + reg = <0x28>; + qcom,sn-irq = <&tlmm 9 0x00>; + qcom,sn-ven = <&tlmm 6 0x00>; + qcom,sn-clkreq = <&tlmm 7 0x00>; + qcom,sn-vdd-1p8-supply = <&L21B>; + qcom,sn-vdd-1p8-voltage = <1800000 1800000>; + qcom,sn-vdd-1p8-current = <157000>; + interrupt-parent = <&tlmm>; + interrupts = <9 0>; + interrupt-names = "nfc_irq"; + pinctrl-names = "nfc_active", "nfc_suspend"; + pinctrl-0 = <&nfc_int_active &nfc_enable_active>; + pinctrl-1 = <&nfc_int_suspend &nfc_enable_suspend>; + }; +}; diff --git a/nxp/parrot-nfc-idp.dts b/nxp/parrot-nfc-idp.dts new file mode 100644 index 00000000..dacd8178 --- /dev/null +++ b/nxp/parrot-nfc-idp.dts @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: BSD-3-Clause + +/* + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +/dts-v1/; +/plugin/; + +#include "parrot-nfc-common.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. Parrot IDP"; + compatible = "qcom,parrot-idp", "qcom,parrot", "qcom,idp"; + qcom,msm-id = <663 0x10000>; + qcom,board-id = <34 0>; +}; diff --git a/nxp/parrot-nfc-pinctrl.dtsi b/nxp/parrot-nfc-pinctrl.dtsi new file mode 100644 index 00000000..90ddf11e --- /dev/null +++ b/nxp/parrot-nfc-pinctrl.dtsi @@ -0,0 +1,66 @@ +// SPDX-License-Identifier: BSD-3-Clause + +/* + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +&tlmm { + nfc { + nfc_int_active: nfc_int_active { + /* active state */ + mux { + /* NFC Read Interrupt */ + pins = "gpio9"; + function = "gpio"; + }; + + config { + pins = "gpio9"; + drive-strength = <2>; /* 2 MA */ + bias-pull-down; + }; + }; + + nfc_int_suspend: nfc_int_suspend { + /* sleep state */ + mux { + /* NFC Read Interrupt */ + pins = "gpio9"; + function = "gpio"; + }; + + config { + pins = "gpio9"; + drive-strength = <2>; /* 2 MA */ + bias-pull-down; + }; + }; + + nfc_enable_active: nfc_enable_active { + mux { + /* Enable and Clock request gpios */ + pins = "gpio6", "gpio7"; + function = "gpio"; + }; + + config { + pins = "gpio6", "gpio7"; + drive-strength = <2>; /* 2 MA */ + bias-disable; + }; + }; + + nfc_enable_suspend: nfc_enable_suspend { + mux { + pins = "gpio6", "gpio7"; + function = "gpio"; + }; + + config { + pins = "gpio6", "gpio7"; + drive-strength = <2>; /* 2 MA */ + bias-disable; + }; + }; + }; //nfc +}; //tlmm diff --git a/nxp/parrot-nfc-qrd.dts b/nxp/parrot-nfc-qrd.dts new file mode 100644 index 00000000..4f0c3fd4 --- /dev/null +++ b/nxp/parrot-nfc-qrd.dts @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: BSD-3-Clause + +/* + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +/dts-v1/; +/plugin/; + +#include "parrot-nfc-common.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. Parrot QRD"; + compatible = "qcom,parrot-qrd", "qcom,parrot", "qcom,qrd"; + qcom,msm-id = <663 0x10000>; + qcom,board-id = <0x1000B 0>; +}; + diff --git a/nxp/parrot-nfc.dts b/nxp/parrot-nfc.dts new file mode 100644 index 00000000..132ee52d --- /dev/null +++ b/nxp/parrot-nfc.dts @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: BSD-3-Clause + +/* + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +/dts-v1/; +/plugin/; + +#include "parrot-nfc-pinctrl.dtsi" +/ { + model = "Qualcomm Technologies, Inc. Parrot SoC"; + compatible = "qcom,parrot"; + qcom,msm-id = <663 0x10000>; + qcom,board-id = <0 0>; +};