Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp10245108rwd; Wed, 21 Jun 2023 19:23:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ71+B8eqXXw9L6HeRFSa3chQSA0bYjmyA4VY0xvuGCnuPdur0saelcFNUGpPsYHDcyq5QIm X-Received: by 2002:a05:6359:6783:b0:130:df70:b9cf with SMTP id sq3-20020a056359678300b00130df70b9cfmr8901539rwb.14.1687400631282; Wed, 21 Jun 2023 19:23:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687400631; cv=none; d=google.com; s=arc-20160816; b=l97UELq+eLC/L/xLZE6lshDlVNuZTxsQLEC1+jcnOb9ybdRT4XHb5HIIZfRslkiNjM xwzMvILf9MguZkRoDA2J/zrXSmVizcYZcj1OoIWMlZBgn5zh2dRVkJuM2GWkHeMyfTBU ptD6VvDqoLZWQiU7qv+m2qg6U8IBnjYHO8zSyH0jlUQFr4o+Brge2FCCmKJ/FcHQwVO9 yFUTnKrvBpVJTLaX5eQN+IJtkBly4Y7+XdfueYbitGoMJiB3ta6/2zk498FMLrC6AnjU ixdn0eJyBDrrGIWV9/NmKrvaZ7CzoTAP5DxpY36oFD1T2+57/fWUJ4pfZ0gjIK8qZjqN sK/Q== 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 :feedback-id:references:in-reply-to:message-id:subject:cc:from:to :dkim-signature:date; bh=FCm+LLmKGdTwYZa44TvNge6VPclbxNgOtwQ/JZjfxVg=; b=JXC78GCLNnDDMbI6r0l+ZE2r0hMxswskFA9KsNld9H8bY5B2kmYQGp7gUNsBQRLV+q Ecl1YeVgOfwEiDdlzC2CWl/0F9dwa+Pv/DgJxg+9SaD0+jDmQ9j/jYibMwxDtqLFCWJ/ AP/nSZd+be1B9mF88XCZI9BLh3SVuU27arz3WqxTxQV3honNC5cRPsuZe7Y9GuvMkVa6 Q4XFFElzadHEncYwwpOX5wp06gkqAKUuKQ0LVxdZ6x6EyEx6OSy2fbRQqaLswmebLP27 ePocCL0SHDhLp3qmdtbuncbGGS7uoCEHN7l3jAPMg8dQLhcLbAg9ZWTop2Y15ncP+bF7 y+pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=vQSOl7Ld; 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=protonmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m1-20020a638c01000000b00553939d6a6dsi5186337pgd.44.2023.06.21.19.23.39; Wed, 21 Jun 2023 19:23:51 -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=@protonmail.com header.s=protonmail3 header.b=vQSOl7Ld; 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=protonmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230253AbjFVCFT (ORCPT + 99 others); Wed, 21 Jun 2023 22:05:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230244AbjFVCFP (ORCPT ); Wed, 21 Jun 2023 22:05:15 -0400 Received: from mail-4325.protonmail.ch (mail-4325.protonmail.ch [185.70.43.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFDBA1BE5 for ; Wed, 21 Jun 2023 19:05:09 -0700 (PDT) Date: Thu, 22 Jun 2023 02:04:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1687399508; x=1687658708; bh=FCm+LLmKGdTwYZa44TvNge6VPclbxNgOtwQ/JZjfxVg=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=vQSOl7LdADyVUI/tt9Oocyp5M0iV2Byv+zwXhGBqN9bFfpBXGcMtu+5z+/9ucUNbF WhJwUeEQT0KvlaL6H6j1Pjvig2ZdxktOp2lkJ36BGPkgvVCKCsCVxW1+9ZEQLGCGIq 4i3dzWJii+CWxO9Rj2F/bkx4tJ57rzboNw7ggJxWzEFQ1vRAxd5vnijySSbFOSMRkp jvhsD+L+N+3MUchrZPzeEp8mPkozyjyzPQATql86gGtoShf7bIs5J31wf8R0fSaGJL vSV+cVuv+NMDdtBJHbMyE+rcbbiRLOXKOc39JF3uig5wBEFmVMaoYbqk3RGAv1kCYP OVjtWvUwvd8vA== To: linux-kernel@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stephan Gerhold , Nikita Travkin , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Subject: [PATCH 3/8] arm64: dts: qcom: msm8939-samsung-a7: Add touch key Message-ID: <20230622020448.65791-1-linmengbo0689@protonmail.com> In-Reply-To: <20230622020344.65745-1-linmengbo0689@protonmail.com> References: <20230622020344.65745-1-linmengbo0689@protonmail.com> Feedback-ID: 40467236:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Add the CORERIVER TC360 touch key together with the necessary fixed regulator for it. Note that for some reason Samsung decided to connect this to GPIOs where no hardware I2C bus is available, so we need to fall back to software bit-banging using i2c-gpio. Signed-off-by: Lin, Meng-Bo --- .../boot/dts/qcom/msm8939-samsung-a7.dts | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts b/arch/arm64/b= oot/dts/qcom/msm8939-samsung-a7.dts index cf2738bc3313..98a2738eb8ea 100644 --- a/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts +++ b/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts @@ -68,6 +68,63 @@ button-home { =09=09=09linux,code =3D ; =09=09}; =09}; + +=09i2c-tkey { +=09=09compatible =3D "i2c-gpio"; +=09=09sda-gpios =3D <&tlmm 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; +=09=09scl-gpios =3D <&tlmm 17 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + +=09=09pinctrl-0 =3D <&tkey_i2c_default>; +=09=09pinctrl-names =3D "default"; + +=09=09#address-cells =3D <1>; +=09=09#size-cells =3D <0>; + +=09=09touchkey@20 { +=09=09=09/* Note: Actually an ABOV MCU that implements same interface */ +=09=09=09compatible =3D "coreriver,tc360-touchkey"; +=09=09=09reg =3D <0x20>; + +=09=09=09interrupt-parent =3D <&tlmm>; +=09=09=09interrupts =3D <20 IRQ_TYPE_EDGE_FALLING>; + +=09=09=09vcc-supply =3D <®_touch_key>; +=09=09=09vdd-supply =3D <®_keyled>; +=09=09=09vddio-supply =3D <&pm8916_l6>; + +=09=09=09linux,keycodes =3D ; + +=09=09=09pinctrl-0 =3D <&tkey_default>; +=09=09=09pinctrl-names =3D "default"; +=09=09}; +=09}; + +=09reg_keyled: regulator-keyled { +=09=09compatible =3D "regulator-fixed"; +=09=09regulator-name =3D "keyled"; +=09=09regulator-min-microvolt =3D <3300000>; +=09=09regulator-max-microvolt =3D <3300000>; + +=09=09/* NOTE: On some variants e.g. SM-A700FD it's GPIO 91 */ +=09=09gpio =3D <&tlmm 100 GPIO_ACTIVE_HIGH>; +=09=09enable-active-high; + +=09=09pinctrl-0 =3D <&tkey_led_en_default>; +=09=09pinctrl-names =3D "default"; +=09}; + +=09reg_touch_key: regulator-touch-key { +=09=09compatible =3D "regulator-fixed"; +=09=09regulator-name =3D "touch_key"; +=09=09regulator-min-microvolt =3D <2800000>; +=09=09regulator-max-microvolt =3D <2800000>; + +=09=09gpio =3D <&tlmm 56 GPIO_ACTIVE_HIGH>; +=09=09enable-active-high; + +=09=09pinctrl-0 =3D <&tkey_en_default>; +=09=09pinctrl-names =3D "default"; +=09}; }; =20 &blsp_i2c1 { @@ -160,4 +217,32 @@ sdc2_cd_default: sdc2-cd-default-state { =09=09drive-strength =3D <2>; =09=09bias-pull-up; =09}; + +=09tkey_default: tkey-default-state { +=09=09pins =3D "gpio20"; +=09=09function =3D "gpio"; +=09=09drive-strength =3D <2>; +=09=09bias-disable; +=09}; + +=09tkey_en_default: tkey-en-default-state { +=09=09pins =3D "gpio56"; +=09=09function =3D "gpio"; +=09=09drive-strength =3D <2>; +=09=09bias-disable; +=09}; + +=09tkey_i2c_default: tkey-i2c-default-state { +=09=09pins =3D "gpio16", "gpio17"; +=09=09function =3D "gpio"; +=09=09drive-strength =3D <2>; +=09=09bias-disable; +=09}; + +=09tkey_led_en_default: tkey-led-en-default-state { +=09=09pins =3D "gpio100"; +=09=09function =3D "gpio"; +=09=09drive-strength =3D <2>; +=09=09bias-disable; +=09}; }; --=20 2.39.2