From patchwork Mon Mar 27 08:36:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 75306 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1359483vqo; Mon, 27 Mar 2023 01:43:29 -0700 (PDT) X-Google-Smtp-Source: AKy350aIFYItirnHjysjy6DvZNv0Wu3OcpEYdmTKE4wQRBlUayKb7LNB9yeFIxikWNCft7QhAZpF X-Received: by 2002:a17:902:e810:b0:1a1:a531:460e with SMTP id u16-20020a170902e81000b001a1a531460emr13169959plg.63.1679906608777; Mon, 27 Mar 2023 01:43:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679906608; cv=none; d=google.com; s=arc-20160816; b=v0NJQ19VX9OQ8nLVCVqERUI7/qdilv2NhUsMzwCBViXI+DlXEvsVWCyR0wJiIZGI5y Sg/kKkGVrCP02ABCXAWRETMSHzf702aaJv1hbWj2RUgRsKcwd1HPr3viwB02pl8V6Oyn Nru0BUxhThdAEF2d798fDDaejJ+JMdajLaCwZ4pvSN3zlg0Co3KSRfapXv+jy6IUCZ0l N8f+911G6HvvzsFxzG6HLP1y6j0AS4dLtGNTeP3kb5TtXUlEkOqx5iXaqJSsE+Rk0bX0 7elWFK4ZmrkFC5PTX+XqJGHyFeBX2+7Ph++i57LKolWiZ81+o3d9QLFFYrR4cRSRe+sb fKow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HvD2GjUyC+OJf+V+Q+0aeoi4zClYZchENPXtjkdARBA=; b=RWxEHZQF3Pd5u6N+b3jLLZ32WRS94k7LD2bXQXocu29Xtse5tbRa5T7lyaRazt71pn n72sYJaZG3V8bENFYqT6D1IHYqS5d5Fi2yolrHgwShoWp/ci7wqKUK892LrmaG66lqH+ v4STjeNjqQvXVDkIIFS2y1XNOEyghj5JNEiEojRVcMN2mROrDVaEaSowqneYZdesg0Lg eFN9TEOO04c4RKuKtZTF5l9zHOQNukdVoSag8RcwvthuZDRk59F76B50oqHdUZd2GCj0 KKYEq7j5uK5hz9JOHu//oBlru+gZ10/5anfGTic8OAqdVZ6JVqIVRQiSivQ5sE9eW77U aiMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=dh3DyE+D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b6-20020a63d306000000b004d422660ffesi25818842pgg.393.2023.03.27.01.43.16; Mon, 27 Mar 2023 01:43:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=dh3DyE+D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232537AbjC0IlQ (ORCPT + 99 others); Mon, 27 Mar 2023 04:41:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232520AbjC0Ikh (ORCPT ); Mon, 27 Mar 2023 04:40:37 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA6234C10; Mon, 27 Mar 2023 01:37:10 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id F17726603100; Mon, 27 Mar 2023 09:37:08 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1679906229; bh=ucKptTRH40q7Kj2bw2zloSjqxJ0pG6yGrjzKJ5KlYwU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dh3DyE+D44Hnu3lYslkkV836PvJsUsswIKehfJ4XsNcNoMbBl7ZvgCDmo47pxkbCl 8B++vRrrhvIGdQTs1efvrFpxT32Zg1KImKqVuk+am61tMyfE1SIUfBcTIN01iROXXL iS2kG6A7avLyaeWV835WfssRgVn+PzSw0+XwhwiFJ+btHl4O/+ts40QsKBKvEjSFV2 X+1sXLOVLb5cICwYgG+9PD0eh4HVgStG9BLe5Tklejqql81HUDaR3OM4YPoLjDvue2 iVIlcDbbeYWLYr6EgoTbI9nsCAYChLOtYrW5eAB+ODl2Lpqzy9FMv7OL0a7hsvouT4 XGuZOCcz/w3vw== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: qii.wang@mediatek.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, jassisinghbrar@gmail.com, houlong.wei@mediatek.com, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@collabora.com, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno Subject: [PATCH v2 17/17] arm64: dts: mediatek: mt6795-xperia-m5: Add NXP PN547 NFC on I2C3 Date: Mon, 27 Mar 2023 10:36:47 +0200 Message-Id: <20230327083647.22017-18-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> References: <20230327083647.22017-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761509752508357863?= X-GMAIL-MSGID: =?utf-8?q?1761509752508357863?= Add support for the NXP PN547 NFC chip found on this smartphone and configure its pins. Signed-off-by: AngeloGioacchino Del Regno --- .../dts/mediatek/mt6795-sony-xperia-m5.dts | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts index bff0760cc1c8..8f00232e7348 100644 --- a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts +++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts @@ -5,6 +5,7 @@ */ /dts-v1/; +#include #include "mt6795.dtsi" / { @@ -112,6 +113,16 @@ magnetometer@0x12 { reg = <0x12>; }; + pn547: nfc@28 { + compatible = "nxp,pn544-i2c"; + reg = <0x28>; + interrupts-extended = <&pio 3 IRQ_TYPE_EDGE_RISING>; + pinctrl-names = "default"; + pinctrl-0 = <&nfc_pins>; + enable-gpios = <&pio 149 GPIO_ACTIVE_HIGH>; + firmware-gpios = <&pio 94 GPIO_ACTIVE_HIGH>; + }; + proximity@48 { compatible = "sensortek,stk3310"; reg = <0x48>; @@ -122,6 +133,19 @@ proximity@48 { }; &pio { + nfc_pins: nfc-pins { + pins-irq { + pinmux = ; + bias-pull-down; + input-enable; + }; + + pins-fw-ven { + pinmux = , + ; + }; + }; + ts_pins: touchscreen-pins { pins-irq { pinmux = ;