From patchwork Thu Apr 13 23:17:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 673722 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 54356C7EE20 for ; Thu, 13 Apr 2023 23:18:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230513AbjDMXSU (ORCPT ); Thu, 13 Apr 2023 19:18:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230388AbjDMXSR (ORCPT ); Thu, 13 Apr 2023 19:18:17 -0400 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53512BE; Thu, 13 Apr 2023 16:18:15 -0700 (PDT) Received: from [192.168.178.23] (unknown [62.108.10.64]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id 588C6D0C0E; Thu, 13 Apr 2023 23:18:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=z3ntu.xyz; s=z3ntu; t=1681427893; bh=TEj4vSyCxV9XVNVp48E4PxqwZCWlY48NmSsIQJyvDoU=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=kbyDhM9rAIcseg64MMtsyEfItSPVJ6H8WlReNSEnrr27OMZOHquwpokplsxckJO5B pTVawcV/PoAH4yms1ju8XKg3oUJPcMWE/kll7cI4y/viEAYCd6M+hFLl91lvn5Z6Yj aBmY3IEtsJvkvjP50WWd9hvsR1pJwj+pRuBeRjKw= From: Luca Weiss Date: Fri, 14 Apr 2023 01:17:45 +0200 Subject: [PATCH 1/8] dt-bindings: pinctrl: qcom,pmic-gpio: add PMI632 MIME-Version: 1.0 Message-Id: <20230414-pmi632-v1-1-fe94dc414832@z3ntu.xyz> References: <20230414-pmi632-v1-0-fe94dc414832@z3ntu.xyz> In-Reply-To: <20230414-pmi632-v1-0-fe94dc414832@z3ntu.xyz> To: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Andy Gross , Bjorn Andersson , Konrad Dybcio , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Pavel Machek , Lee Jones , Jonathan Cameron , Lars-Peter Clausen , Stephen Boyd Cc: linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, linux-iio@vger.kernel.org, Luca Weiss X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1127; i=luca@z3ntu.xyz; h=from:subject:message-id; bh=TEj4vSyCxV9XVNVp48E4PxqwZCWlY48NmSsIQJyvDoU=; b=owEBbQKS/ZANAwAIAXLYQ7idTddWAcsmYgBkOI2tzYzDKRMKxJfZ0gHjsAYTQS7WpTtVT2q6W 5pRxZ4Paw2JAjMEAAEIAB0WIQQ5utIvCCzakboVj/py2EO4nU3XVgUCZDiNrQAKCRBy2EO4nU3X VpDfD/97vIuZFpcGJP4e8ENH8R+GEqJ50DlaQIsPe50rNg2rjlV7SSHEpEwDvLlzA+Ei462AjXD kq6CHA/OsZ3tss8hH8hwc1l9o9kzPqAvoSXPqlXUEw5hLHo64Ij/8Q1SQuQFRVlEoZ9QqDDp5dt CH+QF9pvhW68GmOWxJQ/iDKI6b6uTXnSqBupb2NPkbifcgTRBGUfyeKGQGHdtlXCa+nqY0qrPm+ ohLu9N0ae9IwOU3o0z5hh6byFQdDYj57IiKIqmg/v8szKzX5LtjqMtk5ppNklrO+B/9FsUTNVmi RU16pFkATjAzaazVopIl82aSqv21mlSuIz8EN+6P5lEzKAcKvADWrV35t4TCYXniU1zu7MM4riX qufHBD5hQNGLXihqwcQ822YMWEt+GFv3YtG0SYu51NAYPrr8GgrLCPMgo+CtnoKGCQhMkrxfa9l 5ogEcGXdppEJsbbpLvLLwGCSb1h1P2zL8hFyZBaWaj3JLoaDLvoa68gwv1PIaG/opwgG97absrC viE/kvjSZtVZbdpBeigVWT0q+IsiugKB0D53da3KqacbyT9lkG3cr07qUffzy/vHZcL1AQ9tn74 9j2DXAMbNL51KsjtiHUegCgVMeH16ZELHXi31eI397sfg0tsNYM2SYXFxelhAZhf03PzIJYCyOJ hvo4xDhLYbFbz5w== X-Developer-Key: i=luca@z3ntu.xyz; a=openpgp; fpr=BD04DA24C971B8D587B2B8D7FAF69CF6CD2D02CD Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Document the 8 GPIOs found on PMI632. Signed-off-by: Luca Weiss --- Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml index 1096655961f7..2179444b7a83 100644 --- a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml +++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml @@ -52,6 +52,7 @@ properties: - qcom,pm8994-gpio - qcom,pm8998-gpio - qcom,pma8084-gpio + - qcom,pmi632-gpio - qcom,pmi8950-gpio - qcom,pmi8994-gpio - qcom,pmi8998-gpio @@ -434,6 +435,7 @@ $defs: - gpio1-gpio22 for pm8994 - gpio1-gpio26 for pm8998 - gpio1-gpio22 for pma8084 + - gpio1-gpio8 for pmi632 - gpio1-gpio2 for pmi8950 - gpio1-gpio10 for pmi8994 - gpio1-gpio4 for pmk8350 From patchwork Thu Apr 13 23:17:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 673031 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 C094FC77B7D for ; Thu, 13 Apr 2023 23:19:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229622AbjDMXT0 (ORCPT ); Thu, 13 Apr 2023 19:19:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229625AbjDMXTX (ORCPT ); Thu, 13 Apr 2023 19:19:23 -0400 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 655ADE42; Thu, 13 Apr 2023 16:18:57 -0700 (PDT) Received: from [192.168.178.23] (unknown [62.108.10.64]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id 9CC35D0C36; Thu, 13 Apr 2023 23:18:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=z3ntu.xyz; s=z3ntu; t=1681427893; bh=HcTHX83+QMV3YucT0aCNnzAc4Whibfo3LY2KHsCfrkI=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=OF8cWS53T+6066sujXfS0khXFCK9/Q68aY7+Ln7WIt4o8NII7KQfvcD2YyztWWIlM p+nE24H0OBf7FVpvt12xnnE/7k2H4/2ZPUd1RmlHBsxwUsTwQeU2c5Ohi3iNPaUNAI SMHcMY6l9kRAL2H+2iNqjUAe1kR2I61zyYyyd93g= From: Luca Weiss Date: Fri, 14 Apr 2023 01:17:46 +0200 Subject: [PATCH 2/8] pinctrl: qcom: spmi-gpio: Add PMI632 support MIME-Version: 1.0 Message-Id: <20230414-pmi632-v1-2-fe94dc414832@z3ntu.xyz> References: <20230414-pmi632-v1-0-fe94dc414832@z3ntu.xyz> In-Reply-To: <20230414-pmi632-v1-0-fe94dc414832@z3ntu.xyz> To: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Andy Gross , Bjorn Andersson , Konrad Dybcio , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Pavel Machek , Lee Jones , Jonathan Cameron , Lars-Peter Clausen , Stephen Boyd Cc: linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, linux-iio@vger.kernel.org, Luca Weiss X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=948; i=luca@z3ntu.xyz; h=from:subject:message-id; bh=HcTHX83+QMV3YucT0aCNnzAc4Whibfo3LY2KHsCfrkI=; b=owEBbQKS/ZANAwAIAXLYQ7idTddWAcsmYgBkOI2uXy+FWc8JZFlKj7GgodHPwBXGfBBiIo+83 NbtrIiQQRmJAjMEAAEIAB0WIQQ5utIvCCzakboVj/py2EO4nU3XVgUCZDiNrgAKCRBy2EO4nU3X VqBCD/92DOezFgvV5TKj9vXY7vZo3r0V+Lq9gP+TQIV3G79eFKyVzW+9kjK4HlzhsV6siORz3kG 5BHqoKgxbd75VHObVL1xUUc00r+UIr+ivLWxwTlv4I+IZiKvDIzqsJBgy8ey35kk6IyzhIjF/Tq Y0LLa+W8Fi5n2ux9eD6BQgxUOJFGi/FhPzktRjNRkEdsPVYC9mLvfFDtB6XBO0lSDvodoLrRKoD hRX6UfmPS54eErJV4Wh+umoIo5k6jIrbOKJzLna3fMPTnHhvWxSP3196+lijgHk/VFOXgwg8dqT YFMD14//gL233GjrwWSxDjHr9S1FqXJtPAquct3xWQmdIpLbxwPqUyBtQu0Jkwv8dhW1gO6NYPj JAJqZS0GHCiQ8yvwGxyU26YtZ0udCRS8eQFKJMbABHr8Ku8BEVpSJcaFlmEI9Qe/kTnNVapiY8t A0ImnoCH7n2g+Eg74zyMEQaQlFzs7jJdzlFRUo1x0V/7gPcpb6zRAuhbj8RwiDt3U9zXnTADDNc aOlbRx6PJ9f2GblUCcHfBkR9rlkxRL3aQV5MPfa+u+76uz0pasF5lqA9ECf19JA9agc11BldXT0 mgtettYih1H/hCSIub7prw1p3b9wFhGm/wVE8rCiAnHbsxMIr7HcRok6XovVLv9JMqNvsNB6IIv q+a3heyxiQWJhEw== X-Developer-Key: i=luca@z3ntu.xyz; a=openpgp; fpr=BD04DA24C971B8D587B2B8D7FAF69CF6CD2D02CD Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Add support for the 8 GPIOs found on PMI632. Signed-off-by: Luca Weiss --- drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c index ea3485344f06..40cab13e5a83 100644 --- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c +++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c @@ -1232,6 +1232,7 @@ static const struct of_device_id pmic_gpio_of_match[] = { { .compatible = "qcom,pm8994-gpio", .data = (void *) 22 }, { .compatible = "qcom,pm8998-gpio", .data = (void *) 26 }, { .compatible = "qcom,pma8084-gpio", .data = (void *) 22 }, + { .compatible = "qcom,pmi632-gpio", .data = (void *) 8 }, { .compatible = "qcom,pmi8950-gpio", .data = (void *) 2 }, { .compatible = "qcom,pmi8994-gpio", .data = (void *) 10 }, { .compatible = "qcom,pmi8998-gpio", .data = (void *) 14 }, From patchwork Thu Apr 13 23:17:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 673030 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 30592C77B76 for ; Thu, 13 Apr 2023 23:19:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229492AbjDMXT2 (ORCPT ); Thu, 13 Apr 2023 19:19:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229878AbjDMXTY (ORCPT ); Thu, 13 Apr 2023 19:19:24 -0400 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5225524E; Thu, 13 Apr 2023 16:18:57 -0700 (PDT) Received: from [192.168.178.23] (unknown [62.108.10.64]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id D6DB9D0C4C; Thu, 13 Apr 2023 23:18:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=z3ntu.xyz; s=z3ntu; t=1681427894; bh=LYMz5iebgYMxB7UcMUwq1v4MGuY1Nk+HgQvJiW6S+gI=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=Ou2g/TGI2qMapQZNPTM/dD//+2PFxhAmJ8zzWvxnf1u5EYrcjO2/itRX+luAb8aaN tX3TBCFkAxp7m4pyQrv3TnP6IgzSdV8QlOD9HQzNm6kUqsSXZl3Hc2wFlDmKBaIwRH iUjo3LdqkjIpid/EOznYpT9k01qsxC51D29xvnvU= From: Luca Weiss Date: Fri, 14 Apr 2023 01:17:47 +0200 Subject: [PATCH 3/8] dt-bindings: leds: qcom-lpg: Add compatible for PMI632 LPG block MIME-Version: 1.0 Message-Id: <20230414-pmi632-v1-3-fe94dc414832@z3ntu.xyz> References: <20230414-pmi632-v1-0-fe94dc414832@z3ntu.xyz> In-Reply-To: <20230414-pmi632-v1-0-fe94dc414832@z3ntu.xyz> To: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Andy Gross , Bjorn Andersson , Konrad Dybcio , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Pavel Machek , Lee Jones , Jonathan Cameron , Lars-Peter Clausen , Stephen Boyd Cc: linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, linux-iio@vger.kernel.org, Luca Weiss X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=782; i=luca@z3ntu.xyz; h=from:subject:message-id; bh=LYMz5iebgYMxB7UcMUwq1v4MGuY1Nk+HgQvJiW6S+gI=; b=owEBbQKS/ZANAwAIAXLYQ7idTddWAcsmYgBkOI2vPwkTy84ABrMChLCwmp8kCLbunVi+cqQxP 3jMBTnLLyGJAjMEAAEIAB0WIQQ5utIvCCzakboVj/py2EO4nU3XVgUCZDiNrwAKCRBy2EO4nU3X VjCFD/99xYzu+0uiAPIjuLt9KGf5Ppw1hQ+AwEYAt8Z4WHAyfjjV9l0ZygDZ9vJTiwGSguvLVjK 2m1zkMSKUqoBrmHGOEhXVNtxCg+tjfs3KVLBlOq4XpvqUfvDy0ABA5keSThBHhTX8MkkbAf9S+w r5sowliKsjQo0NQ4b5cwpKxFyWcvDzeZ2/d+5NNCt+NU67/XYQBwqc1y9ZEKduE7Cb8kcWsnmdV evMgzjplEzkELJKaUOdN/29bYU2R3sFUHLdu7zUehwNwuSTRnKMZScjIceuvUojWv1JxLa9zBCd kjiBTlLsYCAvKbtMx8pfx6vrvCsDqcZvzX3AFYO2gdN+vno03V9odvOHarkHWsfmYoHRL7XikOv daa1YU3vbN2YiEYfBJ/XBRjYeqimMHvgIeXPA5Laut0Cwd/VxH1f3C8vUV+CuotmgtuclZ3dC3n Fxm6vfrJCsuJRoABM7+UiV+bkfXEAhQlR/OPDvDYqY24ioyheYdXhiJ/FAjmFVptzhCjcNNb9GE Cg8CBU6Zx1XM3QH7AwmFlVYuk9KBQcc9CU8NJ/v6b7W4IL11N7O3lqpaf0CuIupWP0Vw/R2Moid RNik5qTYzUwnAU/Fiu+8ILO4akLBHwfj37SPHfO1+1prB1IN3YKXqkURhs/m8TZ2lCDgHgQhlYC mimWQqzjJFQpGjA== X-Developer-Key: i=luca@z3ntu.xyz; a=openpgp; fpr=BD04DA24C971B8D587B2B8D7FAF69CF6CD2D02CD Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Document the availability of an LPG configuration for the PMI632 PMIC in the Qualcomm Light Pulse Generator driver. Signed-off-by: Luca Weiss Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml index 1df837798249..2e4426894bed 100644 --- a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml +++ b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml @@ -25,6 +25,7 @@ properties: - qcom,pm8941-lpg - qcom,pm8994-lpg - qcom,pmc8180c-lpg + - qcom,pmi632-lpg - qcom,pmi8994-lpg - qcom,pmi8998-lpg From patchwork Thu Apr 13 23:17:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 673723 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 7B85AC77B7C for ; Thu, 13 Apr 2023 23:18:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230503AbjDMXST (ORCPT ); Thu, 13 Apr 2023 19:18:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229820AbjDMXSR (ORCPT ); Thu, 13 Apr 2023 19:18:17 -0400 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C908BE1; Thu, 13 Apr 2023 16:18:15 -0700 (PDT) Received: from [192.168.178.23] (unknown [62.108.10.64]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id 24979D0C50; Thu, 13 Apr 2023 23:18:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=z3ntu.xyz; s=z3ntu; t=1681427894; bh=4Q57cOxz+lYlEwmm+I38ufedAPx45aCnfTXWfnz7tmk=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=f7MmPelu/Wcs3poFCFUUu097g5/9nFwaDFVTgboDcju6vZdRrKVGG9m9gJnjgvbeZ uJPFt2bPIJd4j9eMdhzrZT+ic2amVkoK8G73P9taVa3Ltab9jLJaNKlZE2YNa/esEe JUxPDoOyOYgox8zDypDP7fbzGlTENRL9DdA+Cx90= From: Luca Weiss Date: Fri, 14 Apr 2023 01:17:48 +0200 Subject: [PATCH 4/8] leds: qcom-lpg: Add support for PMI632 LPG MIME-Version: 1.0 Message-Id: <20230414-pmi632-v1-4-fe94dc414832@z3ntu.xyz> References: <20230414-pmi632-v1-0-fe94dc414832@z3ntu.xyz> In-Reply-To: <20230414-pmi632-v1-0-fe94dc414832@z3ntu.xyz> To: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Andy Gross , Bjorn Andersson , Konrad Dybcio , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Pavel Machek , Lee Jones , Jonathan Cameron , Lars-Peter Clausen , Stephen Boyd Cc: linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, linux-iio@vger.kernel.org, Luca Weiss X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1771; i=luca@z3ntu.xyz; h=from:subject:message-id; bh=4Q57cOxz+lYlEwmm+I38ufedAPx45aCnfTXWfnz7tmk=; b=owEBbQKS/ZANAwAIAXLYQ7idTddWAcsmYgBkOI2w4ji/JSdN8pwMAx9rdvdxYBMkGFfcSN6T+ RbXbb6fs16JAjMEAAEIAB0WIQQ5utIvCCzakboVj/py2EO4nU3XVgUCZDiNsAAKCRBy2EO4nU3X Vu5xEACAExu0wzlBGq2iCUgTIGmn2DnQNk7ea59TuiJ2A0KhXIDascR0hbVtdKLJbEV1YNR813D FcuEOBioCmY+yMNpnm0RvBnbM1GMQH98Q4vCyxc79RD5itEFQAMmezyjlrohgBRXctoZxFrc9K4 FxWyf267gY2rOYEmplFo6bUD+qNfnzDySEV1K0a/6Y/RLHzt8vh7YwS7I7R/6O5xY6m+eiYDxSE VGsNAfd965WGdmXhCrrAI/VmrC6A7gwgKs01Xm7f4qulWROck+O6UwIi/AqD8DnO6AYvD9bYoGV rnf3J7ZvymqNX2ab21zlEZFNAoB18i4Ni57gV28Wijfaif1CFTeLM2NCX3zYYImtnlzGxwZkBKB ZTaclMDPVEgYHAkMVVHPwm0skb5Wu8r6yd4gaRhPbqJnwO31CKqyp5K36tONqEcKKgo1E9TofiE +FsHqY4QhoF1hw6OoPW9UguFDekvst6yR55tpGhfShND4HHTGgQqKtUr/MuD2x8sYUYq3+TCPxa rDNXprHv9j9gvem0nggjUiMcq6fidHdXdE6ReBdk6AwK+hn3MMWQgBT3k1tXN2uIS637eCWwv8n 1S8rlmTTXLn/C7qilIcv9VNkEHSgiQr73X3s5vXgxyjc1kxUU8RRttmujZuH1UqPOlxdNa2Tbzf EJPEzySAQu1fyQQ== X-Developer-Key: i=luca@z3ntu.xyz; a=openpgp; fpr=BD04DA24C971B8D587B2B8D7FAF69CF6CD2D02CD Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org The PMI632 PMIC contains 5 PWM channels, 3 of which can be used for LEDs. For the LED pattern it doesn't have LUT like other PMICs but uses SDAM instead. This is not currently implemented in the driver but since LPG works fine without it, add support for the PMIC now. Signed-off-by: Luca Weiss --- drivers/leds/rgb/leds-qcom-lpg.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/leds/rgb/leds-qcom-lpg.c b/drivers/leds/rgb/leds-qcom-lpg.c index 67f48f222109..51763ecb8c1e 100644 --- a/drivers/leds/rgb/leds-qcom-lpg.c +++ b/drivers/leds/rgb/leds-qcom-lpg.c @@ -1353,6 +1353,20 @@ static const struct lpg_data pm8994_lpg_data = { }, }; +/* PMI632 uses SDAM instead of LUT for pattern */ +static const struct lpg_data pmi632_lpg_data = { + .triled_base = 0xd000, + + .num_channels = 5, + .channels = (const struct lpg_channel_data[]) { + { .base = 0xb300, .triled_mask = BIT(7) }, + { .base = 0xb400, .triled_mask = BIT(6) }, + { .base = 0xb500, .triled_mask = BIT(5) }, + { .base = 0xb600 }, + { .base = 0xb700 }, + }, +}; + static const struct lpg_data pmi8994_lpg_data = { .lut_base = 0xb000, .lut_size = 24, @@ -1436,6 +1450,7 @@ static const struct of_device_id lpg_of_table[] = { { .compatible = "qcom,pm8916-pwm", .data = &pm8916_pwm_data }, { .compatible = "qcom,pm8941-lpg", .data = &pm8941_lpg_data }, { .compatible = "qcom,pm8994-lpg", .data = &pm8994_lpg_data }, + { .compatible = "qcom,pmi632-lpg", .data = &pmi632_lpg_data }, { .compatible = "qcom,pmi8994-lpg", .data = &pmi8994_lpg_data }, { .compatible = "qcom,pmi8998-lpg", .data = &pmi8998_lpg_data }, { .compatible = "qcom,pmc8180c-lpg", .data = &pm8150l_lpg_data }, From patchwork Thu Apr 13 23:17:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 673033 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 72FFEC7EE22 for ; Thu, 13 Apr 2023 23:18:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231127AbjDMXSV (ORCPT ); Thu, 13 Apr 2023 19:18:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230495AbjDMXST (ORCPT ); Thu, 13 Apr 2023 19:18:19 -0400 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0BE1BE; Thu, 13 Apr 2023 16:18:17 -0700 (PDT) Received: from [192.168.178.23] (unknown [62.108.10.64]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id 6862BD0C51; Thu, 13 Apr 2023 23:18:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=z3ntu.xyz; s=z3ntu; t=1681427894; bh=FCBw8XDNRhE4YdMQX9/OeTPh8F87PXGZsKt/roj2lZA=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=ElRyy3/eGjLjnPL9epuoPuvJamXadHbyXW9hsax22PdmfysDyA4OxOi48PZfQZhXE oTseleVrDue0VWBqM3etXSHC9KoUhgMl6lrUwynII7N4fbIHDfZoCYsFq9bI4CjPSG o/tN0hkw7IeHbPRjUxMZsQ0nA1J8Twuv1v8rqOok= From: Luca Weiss Date: Fri, 14 Apr 2023 01:17:49 +0200 Subject: [PATCH 5/8] dt-bindings: iio: adc: qcom,spmi-vadc: Allow 1/16 for pre-scaling MIME-Version: 1.0 Message-Id: <20230414-pmi632-v1-5-fe94dc414832@z3ntu.xyz> References: <20230414-pmi632-v1-0-fe94dc414832@z3ntu.xyz> In-Reply-To: <20230414-pmi632-v1-0-fe94dc414832@z3ntu.xyz> To: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Andy Gross , Bjorn Andersson , Konrad Dybcio , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Pavel Machek , Lee Jones , Jonathan Cameron , Lars-Peter Clausen , Stephen Boyd Cc: linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, linux-iio@vger.kernel.org, Luca Weiss X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=907; i=luca@z3ntu.xyz; h=from:subject:message-id; bh=FCBw8XDNRhE4YdMQX9/OeTPh8F87PXGZsKt/roj2lZA=; b=owEBbQKS/ZANAwAIAXLYQ7idTddWAcsmYgBkOI2xbIPcdKZh9IQXKUO+TxGTsdPhQSARWauW8 Ej3E04fojKJAjMEAAEIAB0WIQQ5utIvCCzakboVj/py2EO4nU3XVgUCZDiNsQAKCRBy2EO4nU3X Vi8ZD/9dRAJu9zCMylW34QTtL3TnwNl+kPTu/AcQwhYsqwJ/R6JlAVQ1yYk/jFOjpm7Li26+4AH BuVTQk/Rnc9lLE82C3GhZuW3juTiTOcGAzrANhaYVB/qoVmxmnAmYwypxV7nvSF6i+eeNpM07rk GCNHvQ8q2TPLSse+oFNk2vU5IEnXiCHIDbvvXRe/Ua/jWF21DCRiqDHw1n82BbIJhZu/BBwNtsU kd690cgY/5sYpdvvNrTl6Av31+XZbnjSm5WXKG9Wy27USIQHRhHMNipm/fLVTcBmYgx4Ktz+QQq 7nRDKLG4vNSQi/sqTK6DfG0r6NBvPK+XGJwyOGRonC76oSPf9SOwBUSOfzSke9Vbdzjn+KRoFoM hVyf1dAUgjMHYX7SrbJDAzAMpX4lFeGo/24z+hFf5YcDNlmgStiV8Y8t0+fWed97BRanni93HfT KJy2ywoxzng7sUW8SonyAXGSL/R4Bd/70stichwVYGXVsySlT0c6ui2t8XdAKJkdGfLkFvAmat7 TIbFIA2EOoyNUkYqj+yw6/VLdQZ6b2vFsnf8m8EUEJwz28wGYWTA/KEv/Z48nkrQiRdIC6wV0Iv WaqRNBUZbEt0aCTZLgt1Je0BlnO6I4yDeDgNDCc0xuPTw+KzKUl1e/cgauUzu5EeIYA5DeVw9eK wB+viIhCkaZoyqQ== X-Developer-Key: i=luca@z3ntu.xyz; a=openpgp; fpr=BD04DA24C971B8D587B2B8D7FAF69CF6CD2D02CD Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org The channel ADC5_USB_IN_V_16 is using 1/16 pre-scaling on at least pm7250b and pmi632. Allow that in the schema. Signed-off-by: Luca Weiss Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml index bd6e0d6f6e0c..365aa3528a87 100644 --- a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml +++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml @@ -101,7 +101,7 @@ patternProperties: oneOf: - items: - const: 1 - - enum: [ 1, 3, 4, 6, 20, 8, 10 ] + - enum: [ 1, 3, 4, 6, 20, 8, 10, 16 ] - items: - const: 10 - const: 81 From patchwork Thu Apr 13 23:17:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 673719 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 84D44C77B78 for ; Thu, 13 Apr 2023 23:19:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231181AbjDMXT3 (ORCPT ); Thu, 13 Apr 2023 19:19:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230284AbjDMXT1 (ORCPT ); Thu, 13 Apr 2023 19:19:27 -0400 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2E1155A6; Thu, 13 Apr 2023 16:18:59 -0700 (PDT) Received: from [192.168.178.23] (unknown [62.108.10.64]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id B60B6D0C52; Thu, 13 Apr 2023 23:18:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=z3ntu.xyz; s=z3ntu; t=1681427894; bh=mdBEwzgyTkn6OiQX8yDfJw3X7WbLKTich7Ekd7KwYOQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=ZGXKb5o2sU/8p9Z8YCDFMolWXSq8U9QaY4cOG3qFRfYEv/kZQ9nYG3eYbqPEpgpuQ CvYLyE3xNIaL5dRs4Zdj9ZZpOuMMVJ7D7fkJD66wFhBfukpGqZI/8hMAh8vvanKlwT ArPE5iLgeWQCx/uZ+trpn2TuOJQn9yqBC63CM70c= From: Luca Weiss Date: Fri, 14 Apr 2023 01:17:50 +0200 Subject: [PATCH 6/8] dt-bindings: mfd: qcom-spmi-pmic: Add PMI632 compatible MIME-Version: 1.0 Message-Id: <20230414-pmi632-v1-6-fe94dc414832@z3ntu.xyz> References: <20230414-pmi632-v1-0-fe94dc414832@z3ntu.xyz> In-Reply-To: <20230414-pmi632-v1-0-fe94dc414832@z3ntu.xyz> To: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Andy Gross , Bjorn Andersson , Konrad Dybcio , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Pavel Machek , Lee Jones , Jonathan Cameron , Lars-Peter Clausen , Stephen Boyd Cc: linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, linux-iio@vger.kernel.org, Luca Weiss X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=755; i=luca@z3ntu.xyz; h=from:subject:message-id; bh=mdBEwzgyTkn6OiQX8yDfJw3X7WbLKTich7Ekd7KwYOQ=; b=owEBbQKS/ZANAwAIAXLYQ7idTddWAcsmYgBkOI2yhdXz4/nLXnly1oi2QAFdZkaZqnwTAd9iT E0Jdt42JP6JAjMEAAEIAB0WIQQ5utIvCCzakboVj/py2EO4nU3XVgUCZDiNsgAKCRBy2EO4nU3X VmBCD/9Mxlr5zAlia3YXc8pS+dgsVr+lV0fcGqktZARJ8Ry26mAHBFpuW7gHwCKBRZlR6r3gT3v MolU2FyfQjQj9gOkd2FH3zTg9mFh7gGjhbsJH9h4ZlVsHhTQPiUe4xX0mXZZpjyGXf7kaRITeSc 3oeUuKQAxsfLNLD4F2fr9yy3zYB3qQZSPtViPm986bUf+/6xA+8eyJNZC1yGsYkGTR/9j7PSWER DU5wjA2catOtgSuT6iuFuseAXFpEkzfXYB9Xt5LtUBu8bXiTrQvnJ/cgxR1ooTk1B31vKoctSiZ H7oigK70Xrn0KUVPxdbg/BlfsUgeMErFy0N5zDnTh4WXgJ6qJ1tim/jq238kHajW7IgMXvhrPAk hALCjYCtsTpUyyDakb110WdMqrnX7LIb7qShjrBBISaVXcNGP/6/vOR5gRqRWzDxkTlkK+gDrKW c1QVX2/bLTQZaWqEt35n5lA/cwX5/5TS0S+8VjV3cVFBMIPXlOqjxFZ/XhNUg51lzdGVJBggkOL wxY9Q4qSWW2/Aa5bHFSq8lve0EodZKBLyUBGqa7e1UvpMh8Rwyao/xX44O8NqrYpCSfhSeg4q+e ZgkLENAT1cB2o2VSvSKXzraBFsasmPI2yUGxoC337s5JdXutX1PbWVzDXDEV6oarfkCo6RDQXCV fED8X7FH0LoO9Rg== X-Developer-Key: i=luca@z3ntu.xyz; a=openpgp; fpr=BD04DA24C971B8D587B2B8D7FAF69CF6CD2D02CD Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Document support for the pmi632, often found with the sdm632 SoC. Signed-off-by: Luca Weiss --- Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml index 84620ebc1efe..09e7195c622b 100644 --- a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml +++ b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml @@ -71,6 +71,7 @@ properties: - qcom,pm8998 - qcom,pma8084 - qcom,pmd9635 + - qcom,pmi632 - qcom,pmi8950 - qcom,pmi8962 - qcom,pmi8994 From patchwork Thu Apr 13 23:17:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 673721 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 123EDC77B7A for ; Thu, 13 Apr 2023 23:18:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231164AbjDMXSX (ORCPT ); Thu, 13 Apr 2023 19:18:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230506AbjDMXST (ORCPT ); Thu, 13 Apr 2023 19:18:19 -0400 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FE41E9; Thu, 13 Apr 2023 16:18:18 -0700 (PDT) Received: from [192.168.178.23] (unknown [62.108.10.64]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id 022C8D0C53; Thu, 13 Apr 2023 23:18:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=z3ntu.xyz; s=z3ntu; t=1681427895; bh=7RMg8Ln4xlJYycH7FzafrbQEIQWc5NsSasFf9SDAdbY=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=VDyx9eHqp2JLgDZHucvkJZ8JEIx/wjkgPsbQP9A2Is1bTrImgZYGVLo9QXbpxUiwT mbQ8JnSYIoVLy5vnUipo+gNOa+8MNTWIJSBVU1S2/QSzq/oXtTV6gXC5WTLdZgwD1Q aK0A733OUwwMn6sBkQKw/PP2p15UEaB3d0KXE5Uc= From: Luca Weiss Date: Fri, 14 Apr 2023 01:17:51 +0200 Subject: [PATCH 7/8] arm64: dts: qcom: Add PMI632 PMIC MIME-Version: 1.0 Message-Id: <20230414-pmi632-v1-7-fe94dc414832@z3ntu.xyz> References: <20230414-pmi632-v1-0-fe94dc414832@z3ntu.xyz> In-Reply-To: <20230414-pmi632-v1-0-fe94dc414832@z3ntu.xyz> To: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Andy Gross , Bjorn Andersson , Konrad Dybcio , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Pavel Machek , Lee Jones , Jonathan Cameron , Lars-Peter Clausen , Stephen Boyd Cc: linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, linux-iio@vger.kernel.org, Luca Weiss X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=4010; i=luca@z3ntu.xyz; h=from:subject:message-id; bh=7RMg8Ln4xlJYycH7FzafrbQEIQWc5NsSasFf9SDAdbY=; b=owEBbQKS/ZANAwAIAXLYQ7idTddWAcsmYgBkOI2zgSdTjIHoYDRO6LPIjBzipUFmmwaiQ01xu 8mIbAmYk2iJAjMEAAEIAB0WIQQ5utIvCCzakboVj/py2EO4nU3XVgUCZDiNswAKCRBy2EO4nU3X VrD7D/0TwQSNwSmG8BtNzuPejs0b6YeW84OrTUQJaZ3PetXVW9pG5R+Tdbj/WlfrfHlwqqExhjV GKE+36+onsSOHACTkd9AD386ir0Svh6mOyYo/sdPWVSEJjxL+mhjPv0RYh0EJD0kadjPL8bxXbi iLm1N0y1n1g6ZntjlLGQRxekfccAUGJXhfMsjYnEOE+LXVLcNjW3ziSTqr2RhhRizmeFatDI/84 UvZ9BkpUyWGzvSZp6kescihcHbdo/S3iPImXhzoalMOIdGt9OBR3+fC1+6AoQG/4FJxN+mw5R6s nIaSY6ViADK7gw++aR0MKfoIwdRMuXY82UQ9yBmIQFgoeh+7h4sAtNm7RL1z20jsmkZsJ3HK0DK HteVxKnzSTtETiuziiOlVeQeRYS0c4XSHWLbswWY9F1Rr0RwigcaqOw8pguAsGR3kq7HLuG0oms KjvDDCeZG/M7Jyk9aXKcIhWqvEfDvIe11pEuc6i8OZvbFmukGOUB0EDa09f6oOzKAgDQz1RmRkY apQJZGBlOC4Xe7wfplG6KN1niBWkfJONARZNwWJZVKOp1q1IDqGZiiug4GyQVRC/JMWTTNOkbGS 7HywTX5Rp36yWFWbUfxgi7jMEKalqrmUXXAtQU3SXFAgU4c9340T4L/kF8Tvjfbq4Nd4UaE2Oaz zogZINs/jPcUkYg== X-Developer-Key: i=luca@z3ntu.xyz; a=openpgp; fpr=BD04DA24C971B8D587B2B8D7FAF69CF6CD2D02CD Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org The PMI632, commonly found on SoCs with SDM632 has various standard functions like ADC, GPIOs, LPG and more. Signed-off-by: Luca Weiss --- arch/arm64/boot/dts/qcom/pmi632.dtsi | 165 +++++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/pmi632.dtsi b/arch/arm64/boot/dts/qcom/pmi632.dtsi new file mode 100644 index 000000000000..4eb79e0ce40a --- /dev/null +++ b/arch/arm64/boot/dts/qcom/pmi632.dtsi @@ -0,0 +1,165 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (C) 2023 Luca Weiss + */ + +#include +#include +#include + +/ { + thermal-zones { + pmi632-thermal { + polling-delay-passive = <100>; + polling-delay = <0>; + + thermal-sensors = <&pmi632_temp>; + + trips { + trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + trip1 { + temperature = <115000>; + hysteresis = <0>; + type = "hot"; + }; + + trip2 { + temperature = <125000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + }; +}; + +&spmi_bus { + pmic@2 { + compatible = "qcom,pmi632", "qcom,spmi-pmic"; + reg = <0x2 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + pmi632_temp: temp-alarm@2400 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0x2400>; + interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_BOTH>; + #thermal-sensor-cells = <0>; + }; + + pmi632_adc: adc@3100 { + compatible = "qcom,spmi-adc5"; + reg = <0x3100>; + #address-cells = <1>; + #size-cells = <0>; + #io-channel-cells = <1>; + interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>; + + channel@0 { + reg = ; + qcom,pre-scaling = <1 1>; + label = "ref_gnd"; + }; + + channel@1 { + reg = ; + qcom,pre-scaling = <1 1>; + label = "vref_1p25"; + }; + + channel@6 { + reg = ; + qcom,pre-scaling = <1 1>; + label = "die_temp"; + }; + + channel@7 { + reg = ; + qcom,pre-scaling = <1 1>; + label = "usb_in_i_uv"; + }; + + channel@8 { + reg = ; + qcom,pre-scaling = <1 16>; + label = "usb_in_v_div_16"; + }; + + channel@9 { + reg = ; + qcom,pre-scaling = <1 1>; + label = "chg_temp"; + }; + + channel@4b { + reg = ; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + qcom,ratiometric; + label = "bat_id"; + }; + + channel@83 { + reg = ; + qcom,pre-scaling = <1 3>; + label = "vph_pwr"; + }; + + channel@84 { + reg = ; + qcom,pre-scaling = <1 3>; + label = "vbat_sns"; + }; + }; + + pmi632_adc_tm: adc-tm@3500 { + compatible = "qcom,spmi-adc-tm5"; + reg = <0x3500>; + interrupts = <0x2 0x35 0x0 IRQ_TYPE_EDGE_RISING>; + #thermal-sensor-cells = <1>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + pmi632_sdam_7: nvram@b600 { + compatible = "qcom,spmi-sdam"; + reg = <0xb600>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0xb600 0x100>; + }; + + pmi632_gpios: gpio@c000 { + compatible = "qcom,pmi632-gpio", "qcom,spmi-gpio"; + reg = <0xc000>; + gpio-controller; + gpio-ranges = <&pmi632_gpios 0 0 8>; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + }; + + pmic@3 { + compatible = "qcom,pmi632", "qcom,spmi-pmic"; + reg = <0x3 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + pmi632_lpg: pwm { + compatible = "qcom,pmi632-lpg"; + + #address-cells = <1>; + #size-cells = <0>; + #pwm-cells = <2>; + + status = "disabled"; + }; + }; +}; From patchwork Thu Apr 13 23:17:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 673032 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 BD401C77B76 for ; Thu, 13 Apr 2023 23:18:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231144AbjDMXSW (ORCPT ); Thu, 13 Apr 2023 19:18:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230496AbjDMXST (ORCPT ); Thu, 13 Apr 2023 19:18:19 -0400 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10A2BE1; Thu, 13 Apr 2023 16:18:18 -0700 (PDT) Received: from [192.168.178.23] (unknown [62.108.10.64]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id 4364BD0C54; Thu, 13 Apr 2023 23:18:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=z3ntu.xyz; s=z3ntu; t=1681427895; bh=w9CMcpt8FL5D9w8gvtXVGIn+tTYwLetgcp8M0Diuyuc=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=GA3IvBxpJAo6GKEnnPNYlKRFUkbIsQmunIxLvJ75WuHm2ku1FsOaOjRJkljxzDczc KZt+DnRj5QkC8FdVou9jI55Hxnb5+mRT7+CQJmgMRSLb685c84gCM67ewZJ2FMhkwX KfNHfnqpak4Sp7t/Dx/NrdpBdH7NfoRmrKD5BA9s= From: Luca Weiss Date: Fri, 14 Apr 2023 01:17:52 +0200 Subject: [PATCH 8/8] arm64: dts: qcom: sdm632-fairphone-fp3: Add notification LED MIME-Version: 1.0 Message-Id: <20230414-pmi632-v1-8-fe94dc414832@z3ntu.xyz> References: <20230414-pmi632-v1-0-fe94dc414832@z3ntu.xyz> In-Reply-To: <20230414-pmi632-v1-0-fe94dc414832@z3ntu.xyz> To: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Andy Gross , Bjorn Andersson , Konrad Dybcio , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Pavel Machek , Lee Jones , Jonathan Cameron , Lars-Peter Clausen , Stephen Boyd Cc: linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, linux-iio@vger.kernel.org, Luca Weiss X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1288; i=luca@z3ntu.xyz; h=from:subject:message-id; bh=w9CMcpt8FL5D9w8gvtXVGIn+tTYwLetgcp8M0Diuyuc=; b=owEBbQKS/ZANAwAIAXLYQ7idTddWAcsmYgBkOI20vqSS20Hu+GzwUyPjrcf5yFn3OwoDcK3SW sCaPClRAjWJAjMEAAEIAB0WIQQ5utIvCCzakboVj/py2EO4nU3XVgUCZDiNtAAKCRBy2EO4nU3X VvGHEACde5l9XMhZEVg2BizwgTL7EgMa+l/mV+OnlBR0T1B8F5Z/mOM9azW5C1zJDKjzalN1uwT 2mRnvm6OhVPvbtxZei4j2QtPattb1X3aPgz3mqtN+vplnMx+gaAk7XK/0Hq2J9vRyNfmgWhzzC0 mV7gbGAHpnxPDjfnqIsX7rqfMPV4ZAP+ealRuPv/fo+H2tVzQC8UhgmX0ZBjHTDCWZDtWaiSkFz P7A2MqaHylCGawKs3U6rf1URhYIIM7EwWGkOcClWAyNPSb/oefqPUu6LYe5+wzzikG2b5zCsW46 a4I0s1OblXvu7CMETCM6DJ91OAMgN6Qip+cjRnUYW6oiBvkMve5y0u7FkwSN3iwTALZ7L3JtW/g YnEIickkiqu5R2JKvM4UJZHfgQXIVdKJNHirhUKFNxPsXYFzO/ohvWPhjKG0r+ymUyVqbYm6MpO XsVEzCGwnIOBitQEYnAyhyIwb5vINMLDSTR5f4bMgxaShAFQHu4Ht+7ofZouyhsEayoihq8C1yJ zZ0CBwEZYb9xUOOpQSqvWFqJqZqr4pRW+kL6zCTeJsSupgfXLApStp10r//gnLVSFPIS1TmP04s Hoa/fMA0zklHXUqdNQb3sBUSUJOFcEijJGc85k8us+qxKaQGRlanda3yuZrI+utIkUFVxJXs9Ia UZvTK1LJCYvXaVg== X-Developer-Key: i=luca@z3ntu.xyz; a=openpgp; fpr=BD04DA24C971B8D587B2B8D7FAF69CF6CD2D02CD Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org The phone features a notification LED connected to the pmi632. Configure the RGB led found on it. Signed-off-by: Luca Weiss --- arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts b/arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts index 70e683b7e4fc..301eca9a4f31 100644 --- a/arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts +++ b/arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts @@ -4,8 +4,10 @@ */ /dts-v1/; +#include #include "sdm632.dtsi" #include "pm8953.dtsi" +#include "pmi632.dtsi" / { model = "Fairphone 3"; @@ -83,6 +85,33 @@ &pm8953_resin { linux,code = ; }; +&pmi632_lpg { + status = "okay"; + + multi-led { + color = ; + function = LED_FUNCTION_STATUS; + + #address-cells = <1>; + #size-cells = <0>; + + led@1 { + reg = <1>; + color = ; + }; + + led@2 { + reg = <2>; + color = ; + }; + + led@3 { + reg = <3>; + color = ; + }; + }; +}; + &sdhc_1 { status = "okay"; vmmc-supply = <&pm8953_l8>;