From patchwork Sun Jul 16 22:05:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markuss Broks X-Patchwork-Id: 703570 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1471FC001DE for ; Sun, 16 Jul 2023 22:08:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230351AbjGPWIT (ORCPT ); Sun, 16 Jul 2023 18:08:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231163AbjGPWIE (ORCPT ); Sun, 16 Jul 2023 18:08:04 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 591F1FE; Sun, 16 Jul 2023 15:08:03 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-4fb7373dd35so6304751e87.1; Sun, 16 Jul 2023 15:08:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689545281; x=1692137281; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iHngaqCrQ0FneY3+XbEOWJuLApZy3bmRMZLz2KpBf1c=; b=ENfeZFXfbFdTAhHwUcejne2kgnWjt3QCatDMZAiOB2QmHQlzV4Z+D1gkXDNMlOG0Q4 uFWkgIPCHB7NvnvtCzok7p2/ab2kPauN8lo+YYW2Yr9R0LYspHiabBHAU259sMKB/0Kj x6EzoWabJ7KNZ4LykRU69cNs/4/JiDvV0vTl0Z/2Mn1JcQYpLSjtBcChdZkptYaoeunT yG7cv4Bk5WGQGXkGBHg0aLzbz3uzF/OjoKLdJURDweImnTUOj1kA42+ZGy6A+akX7kMh Kpw77Y1ovClJS2glWrrQpsuoRk2mKCMM4rg6UZRq+Yx+9/c6JOqfalg3A7rdnyW7qEpA B+4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689545281; x=1692137281; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iHngaqCrQ0FneY3+XbEOWJuLApZy3bmRMZLz2KpBf1c=; b=JcaeszZZskNBU5uyP0i5P16pbXnHjsNOs5F8tKjJ1AxIxJ6Zoz/sn2WWvQjr4ZEWQf aMydI04w+vtNRyTaOi5Erfq6HDoJo55tKipF1ddIqIkMnKQtxlPEhhHBM+MrPvqvFQsp fH1kd9dVGomi7MSWYYI1Oo6NUVmqy+etRVWlDZZZGOOx1Wh9iy7tU1RC5jS3Z4WBfK+H Xsc9V9bZh9FUARHDrI2iZYYMpQlTozectA7SLeAOtRfiRlY9l3p0G/9DEUEZja8tvtJq mg3M7heL874GwqovAJA2DJRhKJM6cKascGKrVvu3j1/1dBbU8weS/hCwfevDvj2JaM8Z 7fbQ== X-Gm-Message-State: ABy/qLYw3RFFmO7D7mRJOAyv9ISY8Xjm+CV/r7SXuVoOjISA35R0rREW Bm1o4Yx88fdZVQ5Ocdq378g= X-Google-Smtp-Source: APBJJlFdTGOJjV77YehFgSdWX+e70CQdgXv1R+rqWI4JKHgHA4XS20L0eqPhcB7MSYeWuOglrIGX0w== X-Received: by 2002:a05:6512:1590:b0:4f8:453f:732f with SMTP id bp16-20020a056512159000b004f8453f732fmr3584726lfb.2.1689545281527; Sun, 16 Jul 2023 15:08:01 -0700 (PDT) Received: from localhost.localdomain ([62.122.67.26]) by smtp.gmail.com with ESMTPSA id h24-20020a197018000000b004fb9c625b4asm2464091lfc.210.2023.07.16.15.08.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Jul 2023 15:08:01 -0700 (PDT) From: Markuss Broks To: Krzysztof Kozlowski Cc: Markuss Broks , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/7] ARM: dts: exynos: Add GPIO keys support for k3g Date: Mon, 17 Jul 2023 01:05:03 +0300 Message-ID: <20230716220644.22158-3-markuss.broks@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230716220644.22158-1-markuss.broks@gmail.com> References: <20230716220644.22158-1-markuss.broks@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add the four physical buttons support, volume buttons have external pull-up resistors. Signed-off-by: Markuss Broks --- arch/arm/boot/dts/exynos5422-samsung-k3g.dts | 60 ++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/arch/arm/boot/dts/exynos5422-samsung-k3g.dts b/arch/arm/boot/dts/exynos5422-samsung-k3g.dts index 1a11a6993ba7..c3e006dc34ea 100644 --- a/arch/arm/boot/dts/exynos5422-samsung-k3g.dts +++ b/arch/arm/boot/dts/exynos5422-samsung-k3g.dts @@ -8,6 +8,7 @@ /dts-v1/; #include #include +#include #include #include "exynos5800.dtsi" #include "exynos5422-cpus.dtsi" @@ -21,6 +22,45 @@ / { aliases { mmc0 = &mmc_0; + mmc1 = &mmc_1; + }; + + gpio-keys { + compatible = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&power_gpio &volume_up_gpio &volume_down_gpio &home_gpio>; + + key-volume-up { + label = "Volume Up"; + gpios = <&gpx0 2 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = ; + debounce-interval = <15>; + }; + + key-volume-down { + label = "Volume Down"; + gpios = <&gpx0 3 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <15>; + }; + + key-home { + label = "Home"; + gpios = <&gpx0 5 GPIO_ACTIVE_LOW>; + linux,code = ; + wakeup-source; + debounce-interval = <15>; + }; + + key-power { + label = "Power"; + gpios = <&gpx2 2 GPIO_ACTIVE_LOW>; + linux,code = ; + wakeup-source; + debounce-interval = <15>; + }; }; memory@20000000 { @@ -641,6 +681,21 @@ &mmc_1 { }; &pinctrl_0 { + volume_up_gpio: volume-up-pins { + samsung,pins = "gpx0-2"; + samsung,pin-pud = ; /* External pull up */ + }; + + volume_down_gpio: volume-down-pins { + samsung,pins = "gpx0-3"; + samsung,pin-pud = ; /* External pull up */ + }; + + home_gpio: home-key-pins { + samsung,pins = "gpx0-5"; + samsung,pin-pud = ; + }; + s2mps11_irq: s2mps11-irq-pins { samsung,pins = "gpx0-7"; samsung,pin-function = ; @@ -653,6 +708,11 @@ touch_irq: touch-irq-pins { samsung,pin-pud = ; }; + power_gpio: power-key-pins { + samsung,pins = "gpx2-2"; + samsung,pin-pud = ; + }; + wlan_reset: wlan-reset { samsung,pins = "gpy7-7"; samsung,pin-pud = ; From patchwork Sun Jul 16 22:05:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markuss Broks X-Patchwork-Id: 703571 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6209C04FE2 for ; Sun, 16 Jul 2023 22:08:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230229AbjGPWIT (ORCPT ); Sun, 16 Jul 2023 18:08:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231395AbjGPWII (ORCPT ); Sun, 16 Jul 2023 18:08:08 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B0BAD9; Sun, 16 Jul 2023 15:08:07 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2b6ff1a637bso54690981fa.3; Sun, 16 Jul 2023 15:08:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689545285; x=1692137285; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ugXpMr+bRzbd6kwqs4nSMZRO9LhGaT1WWKpkMn+sESs=; b=J902K7sDSU4Rt4aB4MsWvcY7K4BoVpmEOVfKM068i+rc9mkd96UlUVOF4S/Z7c5SIO d30NDPEq+6evbgh0oGShHZWunL6Mi+GlBhHkvxZnAlXhfHLG35Jh6PuKnJvqOvBwbfG1 JCEg+vg5y8ml4AtGDXo/+/S0S/QSwZYmRCVaMk5UEduEpjik0h7Fl8PUAjWTKSolNAfT eXoZujNz1peqDAWrcO9ZzCzetS9S4Xu+YeHwLxHr35g14wH1GGTQ06BdHaZU4mMhNsxX BsDTKjJJ14L0CkmBbW0Q2xFbkBzaPrxTLHhfNVVM+1+AUU8Jcpsf9yj3NOkZe8EScnV/ LJEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689545285; x=1692137285; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ugXpMr+bRzbd6kwqs4nSMZRO9LhGaT1WWKpkMn+sESs=; b=NhUgVPo51445ZbyTp0TqO6eeXTHqB4XqaOnh5HlUUbvpTzSfffGr9yOKX2r3BfkFQ8 HgqhsoXD+GM9a4+t8BnVUp+7yE0Ou3Aznpdv7Hg05jrH3YfWaw6mIeQBbDT5gxXNh6XB XI6McukeBynoWFnEjvz7ItgS7zfSMc1BAOYIcz083JC/HeA5lnowZBaaVoU6JLgQhY1b SzxaY7vH3CDbDS3u+WzhYtyoumfHRq79QMW0l4g8zhT9UbWopp+oPU1jiGJmsk0cHjk8 1DG/B1sr3draBy11duHd+SXy2fBpVcHRO1hdlaA2whq1fp3eOjMMfFvMsjz6q8cRSj4A gItw== X-Gm-Message-State: ABy/qLZ1xgqujRHtLWw18h+zYZG9AKpS+I3BcZSIoDAOXeh0v0fUpzCy l6UpPSA1lRfxHrctjBNLaFY= X-Google-Smtp-Source: APBJJlFAXsafN5wXf769iQpJt4tz/9VY6FOtsLGjhkgPZIU8mp5Jeyq1oC/JxcKV8bqnZFNFtp8OOQ== X-Received: by 2002:a05:6512:3c92:b0:4fa:5e76:7ad4 with SMTP id h18-20020a0565123c9200b004fa5e767ad4mr8282328lfv.10.1689545285145; Sun, 16 Jul 2023 15:08:05 -0700 (PDT) Received: from localhost.localdomain ([62.122.67.26]) by smtp.gmail.com with ESMTPSA id h24-20020a197018000000b004fb9c625b4asm2464091lfc.210.2023.07.16.15.08.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Jul 2023 15:08:04 -0700 (PDT) From: Markuss Broks To: Krzysztof Kozlowski Cc: Markuss Broks , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/7] ARM: dts: exynos: k3g: Add touchkeys support Date: Mon, 17 Jul 2023 01:05:06 +0300 Message-ID: <20230716220644.22158-6-markuss.broks@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230716220644.22158-1-markuss.broks@gmail.com> References: <20230716220644.22158-1-markuss.broks@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This device has touch keys that are compatible with those installed on Samsung TM2 dev board. Signed-off-by: Markuss Broks --- arch/arm/boot/dts/exynos5422-samsung-k3g.dts | 32 ++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/arch/arm/boot/dts/exynos5422-samsung-k3g.dts b/arch/arm/boot/dts/exynos5422-samsung-k3g.dts index 582faedd6aab..b3576a745054 100644 --- a/arch/arm/boot/dts/exynos5422-samsung-k3g.dts +++ b/arch/arm/boot/dts/exynos5422-samsung-k3g.dts @@ -104,6 +104,33 @@ battery@36 { }; }; + i2c-touchkey { + compatible = "i2c-gpio"; + + sda-gpios = <&gpd1 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpd1 5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us = <2>; + + #address-cells = <1>; + #size-cells = <0>; + + touchkey@20 { + compatible = "cypress,tm2-touchkey"; + reg = <0x20>; + + interrupt-parent = <&gpy7>; + interrupts = <1 IRQ_TYPE_EDGE_FALLING>; + + pinctrl-names = "default"; + pinctrl-0 = <&touchkey_irq>; + + vcc-supply = <&ldo38_reg>; + vdd-supply = <&ldo30_reg>; + + linux,keycodes = ; + }; + }; + tsp_vdd: regulator-tsp-vdd-en { compatible = "regulator-fixed"; regulator-name = "tsp_vdd_en"; @@ -742,6 +769,11 @@ power_gpio: power-key-pins { samsung,pin-pud = ; }; + touchkey_irq: touchkey-irq-pins { + samsung,pins = "gpy7-1"; + samsung,pin-pud = ; + }; + wlan_reset: wlan-reset { samsung,pins = "gpy7-7"; samsung,pin-pud = ; From patchwork Sun Jul 16 22:05:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markuss Broks X-Patchwork-Id: 703573 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7113AC001DE for ; Sun, 16 Jul 2023 22:08:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229787AbjGPWIQ (ORCPT ); Sun, 16 Jul 2023 18:08:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232186AbjGPWIK (ORCPT ); Sun, 16 Jul 2023 18:08:10 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53C05DF; Sun, 16 Jul 2023 15:08:09 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-4fbbfaacfc1so6038361e87.1; Sun, 16 Jul 2023 15:08:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689545287; x=1692137287; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BRuqOpK0EekPSITqQINTY+JRczLmYXbl+EYLdJCsn+M=; b=U7Ty7kCIUKc+y0mYLry2J3cBRyWd44XiBd7tgbCbFJUBnviG+Im4Fq7j732oX/W2kb Hyr9GxBO9tO7hPPKABuN4PLaJpDIisAl6JTCpaXPZGz1bIMKsUFrP+FVXNBy7+R3TEUQ T3nbSwqP35BicPN6cBn+eyqSBkhnLn3RZrvhIqqyyc3NEhvUYTFGoweO+ahaQc58K7PW 41WDoiwBJmqbTLIasqkEOGsYFILarVxHaIKVCREgZ7uryuRNP8+VewgKFUB0yQr1kzZq s+7bJM1FvFH7cBWPT1lKX+pV8Ky3KGhfQ+yG+qVXOKWs2ehRt+euEZ+P4AN1Oxa4YjFs O4Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689545287; x=1692137287; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BRuqOpK0EekPSITqQINTY+JRczLmYXbl+EYLdJCsn+M=; b=BmnYNIRDcDIDOiSpChKgC4JnRNgHf5eeb49HdtJ9BFNFlGoKNApq1ByuVzfwJz9LVO ChHckj6Zn2/LfSS1+/s9iKiw3QJIBhSkHUvhAxDR65AHSZ4nnR8p0MkSDCXavziTxS/F 7tDoxw10BL7N5UtrwRWMp01a9mcg9c+amn3bEWlIWyTq0/Owlfd4KhFyQDSTTRumK4H0 n/F48R3gu+8E95tu6XKS+YKnfkufFALyhFjBzMgCcrtJcg3lcAFlNZ4ta1cgXjVBDO2n Sp3y4suDHs1S/81tjvRCGYna1q3eZlTCR3G1giHfxYO2GvQEOuHm4ZK3XSynFKKSzitp 9j2Q== X-Gm-Message-State: ABy/qLbucMKaPgUdn+ULi/cttS4by7kf2ZWR/V5e31ojYpNmUZHd1Boh fioJOP1foLacvkyjiV9rEzk= X-Google-Smtp-Source: APBJJlEGrMjcsJb1IJWGNtvK7PtPxfRlh2ETvy31xSMPdNilQykqlVigCiLS59PbC2LH3XWryooYIw== X-Received: by 2002:a05:6512:2249:b0:4fa:79da:ca8a with SMTP id i9-20020a056512224900b004fa79daca8amr9543736lfu.7.1689545287499; Sun, 16 Jul 2023 15:08:07 -0700 (PDT) Received: from localhost.localdomain ([62.122.67.26]) by smtp.gmail.com with ESMTPSA id h24-20020a197018000000b004fb9c625b4asm2464091lfc.210.2023.07.16.15.08.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Jul 2023 15:08:07 -0700 (PDT) From: Markuss Broks To: Krzysztof Kozlowski Cc: Markuss Broks , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/7] ARM: dts: exynos: k3g: Document the devices which are not supported Date: Mon, 17 Jul 2023 01:05:08 +0300 Message-ID: <20230716220644.22158-8-markuss.broks@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230716220644.22158-1-markuss.broks@gmail.com> References: <20230716220644.22158-1-markuss.broks@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add placeholders for peripherals which we currently lack support for. This includes Maxim MAX86900 heart rate sensor and oximeter, which seems to be similar to other health sensors by Maxim, but it is not fully compatible; STM32F401 MCU which acts like a sensor hub, which can be flashed and controlled via the SPI bus, for which I made some simple firmware to check if it's possible to program with custom code, and it appears you can do so, but at the moment kernel lacks the APIs to either control sensors directly through the MCU or any standards for a sensor hub, so it's laid off; WM5110 audio codec which fails to communicate for some reason. Signed-off-by: Markuss Broks --- arch/arm/boot/dts/exynos5422-samsung-k3g.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm/boot/dts/exynos5422-samsung-k3g.dts b/arch/arm/boot/dts/exynos5422-samsung-k3g.dts index 813dbf0438de..e019b630db94 100644 --- a/arch/arm/boot/dts/exynos5422-samsung-k3g.dts +++ b/arch/arm/boot/dts/exynos5422-samsung-k3g.dts @@ -743,6 +743,24 @@ rmi4-f12@12 { }; }; +&i2c_3 { + status = "okay"; + + /* Maxim MAX86900 heart rate sensor and oximeter on address 0x57 */ +}; + +&spi_0 { + status = "okay"; + + /* STMicroelectronics STM32F401 MCU to which sensors are connected */ +}; + +&spi_2 { + status = "okay"; + + /* Wolfson WM5110 audio codec */ +}; + /* eMMC flash */ &mmc_0 { status = "okay";