From patchwork Thu Aug 31 21:21:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 719069 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 321F3C88CB2 for ; Thu, 31 Aug 2023 21:21:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347522AbjHaVVc (ORCPT ); Thu, 31 Aug 2023 17:21:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344470AbjHaVVb (ORCPT ); Thu, 31 Aug 2023 17:21:31 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0BD211B for ; Thu, 31 Aug 2023 14:21:28 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-500bb392ab7so2355067e87.1 for ; Thu, 31 Aug 2023 14:21:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693516886; x=1694121686; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=C0OzPy7KKMoqMhNMJWRq7SaDsIGmS+NZYE/XfvpI7LI=; b=ujySdFgiGjnSDQQhTsS8WYSgEFYaikdr0h8QMyhuNEAzlt0xaZ21ht/pxLlvq3QjNq JVKi1EAwUM1B8QYbiLVOdsVjXr4o4ceRkcYacaBUOAO+lAcfTCID3USxrYxXdpdGwtWC zjo4X+BF2z/arEzYeriLeffWGm4bsRpWRv+twWuyD+aDNCs0vyzJh/qjLcWztcsGugZ+ yFb/rnyjCpPBott5YS6IOxrUDtPYBcfmylN+f7dWW7EQEAdPagrGx11dAjDUsWW9t2v5 Q7EKZRmbEg6l5rjZUc7nGKzuBJl4sukhyA4lV/o671B5UQPjuhM9KEa0Cx/E0ATtKI+A 94tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693516886; x=1694121686; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=C0OzPy7KKMoqMhNMJWRq7SaDsIGmS+NZYE/XfvpI7LI=; b=eZ2XEMMWgR71BIvmY4MhLud2GRinqwFEEkUyXZ+b2lRdMv5Qn5zTa5ZJam4Ox55dpS Jh8to0kc6oXckT2ep2i3fBmEWuaJmQKWkxe2r4eKNe5YcZj9R5YHfOj7LYdyvGyc6tBR lnXpTY7ooPBKlTOtsZzaJj9vEEII7tzPkFhDY2Q3w5CqueRQ+RH/xujIY/D1STle89W8 DZ3r8ltUvWoYD3E+hwsO9OSxN9D0/wJ6HGyozW2lr5QgFBByAOVcf9EwouGAoDFhFl1M grI3q0XoC2+c4safW4/JiVJZsY9Lpn2yisMoxjQoGEiSyv+NbGGPtQLWjRwme1a8FIYP McMQ== X-Gm-Message-State: AOJu0Yx/qNlhCgQBIQdXkRZ8eiZX9Gavaf76yWm+Vqw6LPGW1cJtmF/D mGdjaKkDpbfrUdOU9CF/anqdBg== X-Google-Smtp-Source: AGHT+IFFz02rQw2ty8kyHs10Ue+NvQj62FxymrVwT63vS223FUbAVT51OAf/BjB4OXgRXDz4dvwjHw== X-Received: by 2002:ac2:5383:0:b0:500:ac3:dd77 with SMTP id g3-20020ac25383000000b005000ac3dd77mr300192lfh.10.1693516886409; Thu, 31 Aug 2023 14:21:26 -0700 (PDT) Received: from [192.168.1.101] (abxh154.neoplus.adsl.tpnet.pl. [83.9.1.154]) by smtp.gmail.com with ESMTPSA id eo4-20020a056512480400b004fbc0c7218bsm414866lfb.118.2023.08.31.14.21.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Aug 2023 14:21:25 -0700 (PDT) From: Konrad Dybcio Date: Thu, 31 Aug 2023 23:21:22 +0200 Subject: [PATCH v2 1/4] pinctrl: qcom: msm8996: Add MPM pin mappings MIME-Version: 1.0 Message-Id: <20230809-topic-mpm_mappings-v2-1-4c2b4495e654@linaro.org> References: <20230809-topic-mpm_mappings-v2-0-4c2b4495e654@linaro.org> In-Reply-To: <20230809-topic-mpm_mappings-v2-0-4c2b4495e654@linaro.org> To: Andy Gross , Bjorn Andersson , Linus Walleij Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1693516884; l=1978; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=y+HxWBisjasmptzHCoZUfO307q4p8IY/42ufI9xwDHE=; b=iApaShKJu5gKXLEYLvOKO2GrNWHSHVvqAWTwja+PzdG1FnIgqF3v5BOy9ZUud8wxM+Bxjsd9Y b5GhTfDRsIcC5h7daPtaSyxEr/FK83itlvYKbf81KXRewPlb751cDSs X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add pin <-> wakeirq mappings to allow for waking up the AP from sleep through MPM-connected pins. Signed-off-by: Konrad Dybcio --- drivers/pinctrl/qcom/pinctrl-msm8996.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/pinctrl/qcom/pinctrl-msm8996.c b/drivers/pinctrl/qcom/pinctrl-msm8996.c index 46cc0b49dbab..1b5d80eaab83 100644 --- a/drivers/pinctrl/qcom/pinctrl-msm8996.c +++ b/drivers/pinctrl/qcom/pinctrl-msm8996.c @@ -1880,6 +1880,18 @@ static const struct msm_pingroup msm8996_groups[] = { SDC_QDSD_PINGROUP(sdc1_rclk, 0x12c000, 15, 0), }; +static const struct msm_gpio_wakeirq_map msm8996_mpm_map[] = { + { 1, 3 }, { 5, 4 }, { 9, 5 }, { 11, 6 }, { 66, 7 }, { 22, 8 }, { 24, 9 }, { 26, 10 }, + { 34, 11 }, { 36, 12 }, { 37, 13 }, { 38, 14 }, { 40, 15 }, { 42, 16 }, { 46, 17 }, + { 50, 18 }, { 53, 19 }, { 54, 20 }, { 56, 21 }, { 57, 22 }, { 58, 23 }, { 59, 24 }, + { 60, 25 }, { 61, 26 }, { 62, 27 }, { 63, 28 }, { 64, 29 }, { 71, 30 }, { 73, 31 }, + { 77, 32 }, { 78, 33 }, { 79, 34 }, { 80, 35 }, { 82, 36 }, { 86, 37 }, { 91, 38 }, + { 92, 39 }, { 95, 40 }, { 97, 41 }, { 101, 42 }, { 104, 43 }, { 106, 44 }, { 108, 45 }, + { 112, 46 }, { 113, 47 }, { 110, 48 }, { 127, 50 }, { 115, 51 }, { 116, 54 }, { 117, 55 }, + { 118, 56 }, { 119, 57 }, { 120, 58 }, { 121, 59 }, { 122, 60 }, { 123, 61 }, { 124, 62 }, + { 125, 63 }, { 126, 64 }, { 129, 65 }, { 131, 66 }, { 132, 67 }, { 133, 68 }, { 145, 69 }, +}; + static const struct msm_pinctrl_soc_data msm8996_pinctrl = { .pins = msm8996_pins, .npins = ARRAY_SIZE(msm8996_pins), @@ -1888,6 +1900,8 @@ static const struct msm_pinctrl_soc_data msm8996_pinctrl = { .groups = msm8996_groups, .ngroups = ARRAY_SIZE(msm8996_groups), .ngpios = 150, + .wakeirq_map = msm8996_mpm_map, + .nwakeirq_map = ARRAY_SIZE(msm8996_mpm_map), }; static int msm8996_pinctrl_probe(struct platform_device *pdev) From patchwork Thu Aug 31 21:21:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 719580 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 CE03CC83F37 for ; Thu, 31 Aug 2023 21:21:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347556AbjHaVVh (ORCPT ); Thu, 31 Aug 2023 17:21:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347537AbjHaVVc (ORCPT ); Thu, 31 Aug 2023 17:21:32 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45628CD6 for ; Thu, 31 Aug 2023 14:21:29 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-50078eba7afso2523525e87.0 for ; Thu, 31 Aug 2023 14:21:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693516887; x=1694121687; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=2STMuo5K4qFq5jgAxZCjN/B7yzobUMbdyNQ8KrypW4c=; b=OvklatLXNn3tSuO3FFDp1Kg/32EVYB8WmroIsGXESZNbG+Nu+KWmJlkO77mgdKCJ8w pdRKCSuTQZ2nnkWKhMQYYiXV+nZFQh10Xd2ojJD7WyhNudgz1Fi4FFBKXj4WmM3EPXYp W3V8zwE7lpvIkRyCLHAprIo8YNM0x3WRrkuCOGdvp2v0W8D0vm2CPq5W5LBmvaDe9/94 Oal99HOYin+gyCfM/liyCGlL9UXPld2/OhBzECO+6nYYKVMq7EzLxWCXdX0aVb9IdJTV x5cnbMWrjZ7Y6aALwcrZ5dk1WDf390wHnwAjpv1FtTry5J4Eh8S1BcDNg3sLsZ2Nc66g NYRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693516887; x=1694121687; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2STMuo5K4qFq5jgAxZCjN/B7yzobUMbdyNQ8KrypW4c=; b=IUCkbI0+5iFNEw35vIw+I7LgC8Ngv9M3TeuaYFgzjPveK6OUONPkqlFEN0ybTZdQC7 XlHFucqVj/WBjBUykW7N2o2nWbUatrm992L2QbDmKLpHH8fZbuejl+8q1lRdOPf5ZQbx Ne6iFZOdKfz62sizOhYxnIUJ7Ujk+Oj/I7RS9grMpKVc4nySXTF9Uz0wyoi9aJa3f7bW Sj2kN3quPaAAs9d1u/KlKM/+OLSN2ZngGHTXmXbXB5V7OAwRrpT+C68esUihnUQT7Ii+ wf++Bp1KLmY2YH2p+vs6A1J8et0LM2RcsgYnAgN6Ov/mN1h7JHZqq+b6tz2s73kTHa2b 3glw== X-Gm-Message-State: AOJu0YwjRqWvwDlZy1rOq6L4KV9bG4azFHs8ax/ifep7cDag+xF5PXmi 4qzGGoo2fTQr8WkMduk4NsgEfg== X-Google-Smtp-Source: AGHT+IH5oCWzHqwNvMG+N+3PhajpCiw6c+Ce/Q0cFv3KqmAFkH4G6f7rbYNaiOmIXFVbypycZg0lAA== X-Received: by 2002:a05:6512:34c4:b0:500:79f7:1738 with SMTP id w4-20020a05651234c400b0050079f71738mr287094lfr.17.1693516887595; Thu, 31 Aug 2023 14:21:27 -0700 (PDT) Received: from [192.168.1.101] (abxh154.neoplus.adsl.tpnet.pl. [83.9.1.154]) by smtp.gmail.com with ESMTPSA id eo4-20020a056512480400b004fbc0c7218bsm414866lfb.118.2023.08.31.14.21.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Aug 2023 14:21:27 -0700 (PDT) From: Konrad Dybcio Date: Thu, 31 Aug 2023 23:21:23 +0200 Subject: [PATCH v2 2/4] pinctrl: qcom: sm6115: Add MPM pin mappings MIME-Version: 1.0 Message-Id: <20230809-topic-mpm_mappings-v2-2-4c2b4495e654@linaro.org> References: <20230809-topic-mpm_mappings-v2-0-4c2b4495e654@linaro.org> In-Reply-To: <20230809-topic-mpm_mappings-v2-0-4c2b4495e654@linaro.org> To: Andy Gross , Bjorn Andersson , Linus Walleij Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1693516884; l=1748; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=rE9bSf4wp2vzKQ+tQr4HglWzMe5L975B07F8Yc/C25Q=; b=7FZhf4tVSpwiLfhIftWHigm+xG+pKpKULLg/CylFRVdIS0lFIpD1gMQ07QYeVQFzg7Y07wU8N 0vItGzr1lkCAcEmoksZBWP5wVLTKrsZ9pygvOkCwwt5VhvmoLJX73/q X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add pin <-> wakeirq mappings to allow for waking up the AP from sleep through MPM-connected pins. Signed-off-by: Konrad Dybcio --- drivers/pinctrl/qcom/pinctrl-sm6115.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/pinctrl/qcom/pinctrl-sm6115.c b/drivers/pinctrl/qcom/pinctrl-sm6115.c index 2a06025f4885..4e91c75ad952 100644 --- a/drivers/pinctrl/qcom/pinctrl-sm6115.c +++ b/drivers/pinctrl/qcom/pinctrl-sm6115.c @@ -867,6 +867,16 @@ static const struct msm_pingroup sm6115_groups[] = { [120] = SDC_QDSD_PINGROUP(sdc2_data, SOUTH, 0x73000, 9, 0), }; +static const struct msm_gpio_wakeirq_map sm6115_mpm_map[] = { + { 0, 84 }, { 3, 75 }, { 4, 16 }, { 6, 59 }, { 8, 63 }, { 11, 17 }, { 13, 18 }, + { 14, 51 }, { 17, 20 }, { 18, 52 }, { 19, 53 }, { 24, 6 }, { 25, 71 }, { 27, 73 }, + { 28, 41 }, { 31, 27 }, { 32, 54 }, { 33, 55 }, { 34, 56 }, { 35, 57 }, { 36, 58 }, + { 39, 28 }, { 46, 29 }, { 62, 60 }, { 63, 61 }, { 64, 62 }, { 65, 30 }, { 66, 31 }, + { 67, 32 }, { 69, 33 }, { 70, 34 }, { 72, 72 }, { 75, 35 }, { 79, 36 }, { 80, 21 }, + { 81, 38 }, { 83, 9 }, { 84, 39 }, { 85, 40 }, { 86, 19 }, { 87, 42 }, { 88, 43 }, + { 89, 45 }, { 91, 74 }, { 93, 46 }, { 94, 47 }, { 95, 48 }, { 96, 49 }, { 97, 50 }, +}; + static const struct msm_pinctrl_soc_data sm6115_tlmm = { .pins = sm6115_pins, .npins = ARRAY_SIZE(sm6115_pins), @@ -877,6 +887,8 @@ static const struct msm_pinctrl_soc_data sm6115_tlmm = { .ngpios = 114, .tiles = sm6115_tiles, .ntiles = ARRAY_SIZE(sm6115_tiles), + .wakeirq_map = sm6115_mpm_map, + .nwakeirq_map = ARRAY_SIZE(sm6115_mpm_map), }; static int sm6115_tlmm_probe(struct platform_device *pdev) From patchwork Thu Aug 31 21:21:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 719068 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 D9994C88CB2 for ; Thu, 31 Aug 2023 21:21:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347547AbjHaVVk (ORCPT ); Thu, 31 Aug 2023 17:21:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347550AbjHaVVj (ORCPT ); Thu, 31 Aug 2023 17:21:39 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 545DCE58 for ; Thu, 31 Aug 2023 14:21:30 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-500cd6261fdso2468916e87.3 for ; Thu, 31 Aug 2023 14:21:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693516888; x=1694121688; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Q0bWHTXL+4QRcQrRHlmD0fTfqFT8JCeDR4CO9AOQbuY=; b=PBfnTGM1/q4hlFEOvLKd0hHDPfQsE9eUCUsXJWKzZmKuox20BGoFndI0m/BSrTR0X4 dGTT/LMp1JgvXWzcu+3sAXSDnBS8VXo7XGx7LQDDqyUGjKxV7KCK48bT+8Q+Puain3NX HzA45GqKsrTCGq/CTdKi3+vMyaZgU7GAXSWYTHE0/fbws7/61Q7Nbik40plnIp3eZ+fO USYV8bWbh5swh47AXYRIKN21Pch//9wxKK9ahZbvHvDY3xRqbgs5olr8cGlaKMowdF5U 13DJzh0aoABnInr43zKnshoKYi+iWqf6BU3sPcjeTmNdEOa5iYCByBmIAoapszceknOc gvmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693516888; x=1694121688; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Q0bWHTXL+4QRcQrRHlmD0fTfqFT8JCeDR4CO9AOQbuY=; b=cozYD/QrTc4ENZIKcQl8Dm61S06IJ4vxu9Om3d6mQyH69gav6HqxVmjDYJuXcCqui4 4KZonBdTPfqL0AYCcb3QgCouOYtPaG+lHk6CazPwypt+yO+RkywZ0/XcWLoLd/jT3RRi XF845hCaKw3uCxLEMs+67g1sFZihPDR3zkaHOBzq03gXAbeyZIh6YDCJWsKHiCBFFELi Fc6tzQSgN8XFVZIfBHS13OOzxCIk86UchloRxqsVEvjxGvyMueEOT/RnGwhUlF0aiUcE WKFUKfC/zey2Y+tX11NenUvknlB1lHwyjOmMPmICYXnCT5dVp0SCWXijWZq/tg2cJvgx 4xyQ== X-Gm-Message-State: AOJu0YybMtpez0YO/D8J0KgOh471xpsMD+dGPxIp+C7NeZWSLcvew2gW jN0iVU1kP20uZAhz/p7vmauzhQ== X-Google-Smtp-Source: AGHT+IHVSiQiM85q3IbETcBSXQoqctNfDNEC15ZmC2yBAk8NkeOeNGQnVR56hsAkmTGlp7ja7v/W/g== X-Received: by 2002:ac2:4d92:0:b0:4fe:49d:6ae2 with SMTP id g18-20020ac24d92000000b004fe049d6ae2mr288528lfe.0.1693516888668; Thu, 31 Aug 2023 14:21:28 -0700 (PDT) Received: from [192.168.1.101] (abxh154.neoplus.adsl.tpnet.pl. [83.9.1.154]) by smtp.gmail.com with ESMTPSA id eo4-20020a056512480400b004fbc0c7218bsm414866lfb.118.2023.08.31.14.21.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Aug 2023 14:21:28 -0700 (PDT) From: Konrad Dybcio Date: Thu, 31 Aug 2023 23:21:24 +0200 Subject: [PATCH v2 3/4] pinctrl: qcom: sm6125: Add MPM pin mappings MIME-Version: 1.0 Message-Id: <20230809-topic-mpm_mappings-v2-3-4c2b4495e654@linaro.org> References: <20230809-topic-mpm_mappings-v2-0-4c2b4495e654@linaro.org> In-Reply-To: <20230809-topic-mpm_mappings-v2-0-4c2b4495e654@linaro.org> To: Andy Gross , Bjorn Andersson , Linus Walleij Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1693516884; l=1958; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=O9Ab/UwGaIALgE5LA4+UIkYrc1yECgLTNAXWCWFygtw=; b=XptMR6ma9JNxOeUZstKaARQ/0TgGa/9j5sGBTzesLceaT/Bt8gcBLRiynSto6aMR0yDjUreqt OEXn2zsrLr1AmhWjcz6odYJW0oetqHzBa0cRqp6oCipyBy9etJWLWJl X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add pin <-> wakeirq mappings to allow for waking up the AP from sleep through MPM-connected pins. Signed-off-by: Konrad Dybcio --- drivers/pinctrl/qcom/pinctrl-sm6125.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/pinctrl/qcom/pinctrl-sm6125.c b/drivers/pinctrl/qcom/pinctrl-sm6125.c index d5e2b896954c..c188842047aa 100644 --- a/drivers/pinctrl/qcom/pinctrl-sm6125.c +++ b/drivers/pinctrl/qcom/pinctrl-sm6125.c @@ -1221,6 +1221,21 @@ static const struct msm_pingroup sm6125_groups[] = { [140] = SDC_QDSD_PINGROUP(sdc2_data, SOUTH, 0x58b000, 9, 0), }; +static const struct msm_gpio_wakeirq_map sm6125_mpm_map[] = { + { 1, 14 }, { 3, 15 }, { 4, 16 }, { 9, 17 }, { 13, 18 }, { 14, 23 }, + { 15, 19 }, { 17, 20 }, { 19, 21 }, { 21, 22 }, { 22, 84 }, { 25, 24 }, + { 26, 25 }, { 27, 26 }, { 29, 27 }, { 33, 28 }, { 36, 29 }, { 42, 30 }, + { 43, 5 }, { 44, 31 }, { 45, 6 }, { 47, 32 }, { 50, 33 }, { 59, 7 }, + { 70, 34 }, { 72, 8 }, { 75, 35 }, { 79, 36 }, { 80, 37 }, { 81, 38 }, + { 82, 39 }, { 83, 9 }, { 85, 40 }, { 86, 41 }, { 88, 42 }, { 89, 43 }, + { 91, 44 }, { 92, 45 }, { 93, 46 }, { 94, 47 }, { 95, 48 }, { 96, 49 }, + { 97, 70 }, { 98, 50 }, { 99, 51 }, { 100, 64 }, { 101, 52 }, + { 102, 53 }, { 105, 54 }, { 107, 55 }, { 110, 56 }, { 111, 57 }, + { 112, 58 }, { 118, 59 }, { 120, 71 }, { 122, 60 }, { 123, 61 }, + { 124, 13 }, { 126, 62 }, { 128, 63 }, { 130, 65 }, { 131, 66 }, + { 132, 67 }, +}; + static const struct msm_pinctrl_soc_data sm6125_tlmm = { .pins = sm6125_pins, .npins = ARRAY_SIZE(sm6125_pins), @@ -1231,6 +1246,8 @@ static const struct msm_pinctrl_soc_data sm6125_tlmm = { .ngpios = 134, .tiles = sm6125_tiles, .ntiles = ARRAY_SIZE(sm6125_tiles), + .wakeirq_map = sm6125_mpm_map, + .nwakeirq_map = ARRAY_SIZE(sm6125_mpm_map), }; static int sm6125_tlmm_probe(struct platform_device *pdev) From patchwork Thu Aug 31 21:21:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 719579 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 82E19EE49A3 for ; Thu, 31 Aug 2023 21:21:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347558AbjHaVVk (ORCPT ); Thu, 31 Aug 2023 17:21:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347555AbjHaVVj (ORCPT ); Thu, 31 Aug 2023 17:21:39 -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 53E7AE7E for ; Thu, 31 Aug 2023 14:21:31 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-5008faf4456so2472736e87.3 for ; Thu, 31 Aug 2023 14:21:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693516889; x=1694121689; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=f03J+hriVH4eEcJ1UVn8Kn+RGwYWltcYClmfj1VG8vM=; b=miKJzmuCkPok8wYbR2DhC+YScfgqoumFouwmasqcAmIT2H6pXWkagq6sCIdCVA3wIj 1gkmApTIXhyJqRwn/ULjlCu0q3UDUD5fI7Vd4dtosCMZ8fRnK5+argcoHo0W7nvmjiBJ ojEYb9+9xp7qUoUP8V36KUMJB93rBGnbMTOQffuJpW9KcfZ9S0YP1qU5evudXbQG06Je mr59xipAbiV4deh3lVPA5Da4exQ0NaTVKdj8H02K4y1UQU6Ba05G563JA5HHGVYWueF+ RQPE08vm/CXcGMeWqf5kL+HmwSZq7dnVGV4WYbzCtEM8p2sP8kl4BRzkQaSsWcemkecP cQ3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693516889; x=1694121689; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=f03J+hriVH4eEcJ1UVn8Kn+RGwYWltcYClmfj1VG8vM=; b=J8iNT8ETfvtOfDtsmRrpmzposCm/DzWf5HELw+M24PCJduTCC3CxOTekpj2pDPTOwu XUqJ6X+mGBS9IZwX69Hn+9GhpEzCr2M59qBDI1Y4/vwqOPsg+79tzt6D/W9rnidohG+R V0KiyFD0eMgFsqywwYXgKoFAH6hsb8mwU8bi695MSby+YcsbM+uqi0FGn/+sT8w3FRqB JwD/hZXcCW3CX09m+sFw+5E+QPcIPUY36nqdtGQvWE1dLyxINMJxxvmRStXGdbGbegS9 +OpnzT6KcHCyY0qZk182EK1gDRtLS+mnGAakqGzbYcTKCs0ASvRK6F0PlWK1BDtYZDwW lucw== X-Gm-Message-State: AOJu0YzDdka9yMwNdXSdP1NP8x0FH5ASTKVSLHuqrBgWlPGgs8UovEB0 9Tx0t1Gqn7Ubbe1CgOyImfyYyw== X-Google-Smtp-Source: AGHT+IGLiBwba1zhQZ808r8i0aGzDCFmT5SLup/IPAolVReEDuDZMcU3o3+xo22GLWE5gK8pYzz1VQ== X-Received: by 2002:a05:6512:110a:b0:500:979e:8d8b with SMTP id l10-20020a056512110a00b00500979e8d8bmr296161lfg.34.1693516889654; Thu, 31 Aug 2023 14:21:29 -0700 (PDT) Received: from [192.168.1.101] (abxh154.neoplus.adsl.tpnet.pl. [83.9.1.154]) by smtp.gmail.com with ESMTPSA id eo4-20020a056512480400b004fbc0c7218bsm414866lfb.118.2023.08.31.14.21.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Aug 2023 14:21:29 -0700 (PDT) From: Konrad Dybcio Date: Thu, 31 Aug 2023 23:21:25 +0200 Subject: [PATCH v2 4/4] pinctrl: qcom: sdm660: Add MPM pin mappings MIME-Version: 1.0 Message-Id: <20230809-topic-mpm_mappings-v2-4-4c2b4495e654@linaro.org> References: <20230809-topic-mpm_mappings-v2-0-4c2b4495e654@linaro.org> In-Reply-To: <20230809-topic-mpm_mappings-v2-0-4c2b4495e654@linaro.org> To: Andy Gross , Bjorn Andersson , Linus Walleij Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1693516884; l=1937; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=k5LKYIcpbh6ocaiq5muqaTuGlrYwN+Wr1d1SJTM+cGU=; b=izPENaTegqkgQKsWPGcUOFHHiUftUxiYjLI32q4BhTgrdwmYXA+ySOa3hhF3CECKfq/XX4Vt8 dvZYcC+s97mALvZRxekocb0B4696lLWqLxuU0dfplSMid3dDh1en6vc X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add pin <-> wakeirq mappings to allow for waking up the AP from sleep through MPM-connected pins. Signed-off-by: Konrad Dybcio --- drivers/pinctrl/qcom/pinctrl-sdm660.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/pinctrl/qcom/pinctrl-sdm660.c b/drivers/pinctrl/qcom/pinctrl-sdm660.c index c2e0d5c034ac..907e4ffca5e7 100644 --- a/drivers/pinctrl/qcom/pinctrl-sdm660.c +++ b/drivers/pinctrl/qcom/pinctrl-sdm660.c @@ -1399,6 +1399,18 @@ static const struct msm_pingroup sdm660_groups[] = { SDC_QDSD_PINGROUP(sdc1_rclk, 0x9a000, 15, 0), }; +static const struct msm_gpio_wakeirq_map sdm660_mpm_map[] = { + { 1, 3 }, { 5, 4 }, { 9, 5 }, { 10, 6 }, { 66, 7 }, { 22, 8 }, { 25, 9 }, { 28, 10 }, + { 58, 11 }, { 41, 13 }, { 43, 14 }, { 40, 15 }, { 42, 16 }, { 46, 17 }, { 50, 18 }, + { 44, 19 }, { 56, 21 }, { 45, 22 }, { 68, 23 }, { 69, 24 }, { 70, 25 }, { 71, 26 }, + { 72, 27 }, { 73, 28 }, { 64, 29 }, { 2, 30 }, { 13, 31 }, { 111, 32 }, { 74, 33 }, + { 75, 34 }, { 76, 35 }, { 82, 36 }, { 17, 37 }, { 77, 38 }, { 47, 39 }, { 54, 40 }, + { 48, 41 }, { 101, 42 }, { 49, 43 }, { 51, 44 }, { 86, 45 }, { 90, 46 }, { 91, 47 }, + { 52, 48 }, { 55, 50 }, { 6, 51 }, { 65, 53 }, { 67, 55 }, { 83, 56 }, { 84, 57 }, + { 85, 58 }, { 87, 59 }, { 21, 63 }, { 78, 64 }, { 113, 65 }, { 60, 66 }, { 98, 67 }, + { 30, 68 }, { 31, 70 }, { 29, 71 }, { 107, 76 }, { 109, 83 }, { 103, 84 }, { 105, 85 }, +}; + static const struct msm_pinctrl_soc_data sdm660_pinctrl = { .pins = sdm660_pins, .npins = ARRAY_SIZE(sdm660_pins), @@ -1409,6 +1421,8 @@ static const struct msm_pinctrl_soc_data sdm660_pinctrl = { .ngpios = 114, .tiles = sdm660_tiles, .ntiles = ARRAY_SIZE(sdm660_tiles), + .wakeirq_map = sdm660_mpm_map, + .nwakeirq_map = ARRAY_SIZE(sdm660_mpm_map), }; static int sdm660_pinctrl_probe(struct platform_device *pdev)