From patchwork Wed Oct 21 22:50:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 286014 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC873C2D0A3 for ; Wed, 21 Oct 2020 22:51:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6B1E6221FB for ; Wed, 21 Oct 2020 22:51:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="BLdNHBsk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2506929AbgJUWvL (ORCPT ); Wed, 21 Oct 2020 18:51:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2506924AbgJUWvK (ORCPT ); Wed, 21 Oct 2020 18:51:10 -0400 Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05436C0613D2 for ; Wed, 21 Oct 2020 15:51:09 -0700 (PDT) Received: by mail-lf1-x144.google.com with SMTP id a9so5169822lfc.7 for ; Wed, 21 Oct 2020 15:51:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XUajRf0deY0ybpth0h7755bmH20RWxud7qUm1cDBOWQ=; b=BLdNHBsk0bzhSHFYSUqNi1hqTF5D1yLj5g6uVYypoHoC2rBPrcMAMMVX3ZMntqDPGn vGRns97QNZBmNNeKykP88dy7j29AAjk6eTQ5jiUssnfd0uFJ8/bPSHCsS+uB9ZhmDX2b x2B5pZhhC86fONyjq0O2QKsA4dKici88ERecMmsiTQonHoH2YS161kkDw6LGexMprWJM ShOKMCLT3Clf5g9KCQqDNuQ0FgezMaKdnduSC1IRqy3AhVzRDVVQHANOulR7Hg4+UB30 4Wwu8yv/yrILWa77z4QBtEGI0qUXh31NjW69Fpy4WRuoDtEkkz7UVaqTBQNGlKWlsGUM aFMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XUajRf0deY0ybpth0h7755bmH20RWxud7qUm1cDBOWQ=; b=NHi2jbt0XRsJrQTbkFo6e9i/aDVhFDgw20UrRgLFcbXbwXwAZ8LmFuc4OmtzaiUUUT ZWjFtCLLA1IsrS/e86oh1vT4N55rsoGXu1Gao9RaLKuY+E7oFXry07WQluBKtAaVcV9I ALsTCQy6PQuDNTQ8Obl0dc4/gCC0kN7100RWBViCu1fuTtbUMg2/xNK5HS96deiDF0e3 LM+zQThdXc4ROUjeJQg3rdodXUCELCmZEl2e+49T8UnULbRTrhsyJtPsxmrFmrITHKvk V1DawZ804ywQL831EF/Zfp96D0HLI7gBjk69ZwUTT0tA++W7LDtgSKdXrFn7k3cRXfXV xatw== X-Gm-Message-State: AOAM5312+ltrCrt8lKX/JO1D6r564sVxJ4f+lAhHenZVI8At9tPJffxC +i+30zAS+k7Vt+MwobIDjnd5KQ== X-Google-Smtp-Source: ABdhPJxs1tCTj5XUaiigb6DjBHmi3vWNWrbq3CTTangd9VkMvzNz4GlTkZXByPWJ0vvNjotdjWf3ng== X-Received: by 2002:a19:5e5c:: with SMTP id z28mr1931658lfi.528.1603320667465; Wed, 21 Oct 2020 15:51:07 -0700 (PDT) Received: from eriador.lan ([188.162.64.195]) by smtp.gmail.com with ESMTPSA id h11sm652062ljc.21.2020.10.21.15.51.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Oct 2020 15:51:06 -0700 (PDT) From: Dmitry Baryshkov To: Bjorn Andersson , Pavel Machek , Dan Murphy Cc: Rob Herring , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH 1/5] dt-bindings: leds: leds-qcom-lpg: add pm8150[bl] compatible strings Date: Thu, 22 Oct 2020 01:50:56 +0300 Message-Id: <20201021225100.162795-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201021225100.162795-1-dmitry.baryshkov@linaro.org> References: <20201021225100.162795-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Add two more compatible strings for Light Pulse Generator blocks as found on PM8150B and PM8150A/L chips. Signed-off-by: Dmitry Baryshkov Acked-by: Rob Herring --- Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml index 5ccf0f3d8f1b..0474f1d998ff 100644 --- a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml +++ b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml @@ -17,6 +17,8 @@ description: > properties: compatible: enum: + - qcom,pm8150b-lpg + - qcom,pm8150l-lpg - qcom,pm8916-pwm - qcom,pm8941-lpg - qcom,pm8994-lpg From patchwork Wed Oct 21 22:50:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 294291 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 450B8C5DF9E for ; Wed, 21 Oct 2020 22:51:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E131B218AC for ; Wed, 21 Oct 2020 22:51:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="psxdaokV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2506924AbgJUWvL (ORCPT ); Wed, 21 Oct 2020 18:51:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2506928AbgJUWvK (ORCPT ); Wed, 21 Oct 2020 18:51:10 -0400 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 635BCC0613D4 for ; Wed, 21 Oct 2020 15:51:10 -0700 (PDT) Received: by mail-lf1-x142.google.com with SMTP id 77so5220823lfl.2 for ; Wed, 21 Oct 2020 15:51:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zpjsljtV36eW22jKsBjcgvjXKE5SZZrozCSm2JOo928=; b=psxdaokVACpNVNAhX4v+t51isYuTHK2+yjs70ohMFGLi0A/J6RuG4aQrBN2JEjUfuQ jUccs4hXrG/Cf17Pl8QaoJVKTz9hK4i2D9sTWVQo4+QvwwCZULhCZyHFLXA/OaCZc6L/ SifjOGkRULm6oCCcKkGQZt6onbxz4ylRNgr1AiTcPGP5D36sKgS0JOUTA+vwWfV7x4sC cuDFE6E1/+wETEoZQl1PvOPfHy8NfCkAtfb6QCWNiuE/OsdLDYt9uXKpwjIsOEeRSLZ8 V0HelwOprCGlE52v3Rv/cMBCBdpo+Du+ripzg+33RlAk7q/qFQV+AjeGE76F6vozJGVK HW6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zpjsljtV36eW22jKsBjcgvjXKE5SZZrozCSm2JOo928=; b=Ce+QNfCkM89U4T3SobaqCZrgZzHWJXkBvbRRBTZWg2S26BjYtxe7I+88JlTw7V0p7h 2O2ktNELDDuLofi3z6GWiGKt7aXq5vd6Hcc4JA1rldYO56IvGig6bAJOKSiG4ANMtDmO +ePfGT2uGGNCINetZcRS9+w8RmImIv+rYW3nKkjy6MCwDyVluIgJqiRg7Mzpy19wKQFz W7fslZJKddZQTQbddpYL41Kmh72FYiRFQCigkLd2k8gmAKOz3SZrlFro/636feTwx5LB 9MycmLIC9yA1ogbRE3RrMqqa2Ucv5Y4laxYAm+HJ3g2g3GsHriehSnGjTxfJveGm2woe rJVA== X-Gm-Message-State: AOAM531LHBWaBwN0t7cQQEqNx5cRO/SGjGAEfYOTRtfgtrnp2BfN+M0p xy9vsPVi/SWWoMKsfnT9bXM1aA== X-Google-Smtp-Source: ABdhPJxTqNZ/hzJwrwREs7O1h5n00wULbV3F6fZz2PcHNcdzyMzHzFibUkI/V1L+nt27wa3ZLgDliQ== X-Received: by 2002:a19:ee14:: with SMTP id g20mr2189420lfb.378.1603320668861; Wed, 21 Oct 2020 15:51:08 -0700 (PDT) Received: from eriador.lan ([188.162.64.195]) by smtp.gmail.com with ESMTPSA id h11sm652062ljc.21.2020.10.21.15.51.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Oct 2020 15:51:08 -0700 (PDT) From: Dmitry Baryshkov To: Bjorn Andersson , Pavel Machek , Dan Murphy Cc: Rob Herring , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH 2/5] leds: qcom-lpg: add support for pm8150[bl] leds Date: Thu, 22 Oct 2020 01:50:57 +0300 Message-Id: <20201021225100.162795-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201021225100.162795-1-dmitry.baryshkov@linaro.org> References: <20201021225100.162795-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Add support for the LPG/PWM block found on newer PMICs: PM8150B and PM8150A/L. Signed-off-by: Dmitry Baryshkov --- drivers/leds/leds-qcom-lpg.c | 68 ++++++++++++++++++++++++++++++++---- 1 file changed, 61 insertions(+), 7 deletions(-) diff --git a/drivers/leds/leds-qcom-lpg.c b/drivers/leds/leds-qcom-lpg.c index 86131a65d2c5..4d24e0c973d6 100644 --- a/drivers/leds/leds-qcom-lpg.c +++ b/drivers/leds/leds-qcom-lpg.c @@ -48,6 +48,8 @@ struct lpg_data; * @lut_bitmap: allocation bitmap for LUT entries * @triled_base: base address of the TRILED block (optional) * @triled_src: power-source for the TRILED + * @triled_no_atc_ctl: true if there is no TRI_LED_ATC_CTL register + * @triled_no_src_sel: true if there is no TRI_LED_SRC_SEL register * @channels: list of PWM channels * @num_channels: number of @channels */ @@ -65,6 +67,8 @@ struct lpg { u32 triled_base; u32 triled_src; + bool triled_no_atc_ctl; + bool triled_no_src_sel; struct lpg_channel *channels; unsigned int num_channels; @@ -165,6 +169,8 @@ struct lpg_channel_data { * @lut_base: base address of LUT block * @lut_size: number of entries in LUT * @triled_base: base address of TRILED + * @triled_no_atc_ctl: true if there is no TRI_LED_ATC_CTL register + * @triled_no_src_sel: true if there is no TRI_LED_SRC_SEL register * @pwm_9bit_mask: bitmask for switching from 6bit to 9bit pwm * @num_channels: number of channels in LPG * @channels: list of channel initialization data @@ -173,6 +179,8 @@ struct lpg_data { unsigned int lut_base; unsigned int lut_size; unsigned int triled_base; + bool triled_no_atc_ctl; + bool triled_no_src_sel; unsigned int pwm_9bit_mask; int num_channels; struct lpg_channel_data *channels; @@ -986,18 +994,24 @@ static int lpg_init_triled(struct lpg *lpg) return 0; lpg->triled_base = lpg->data->triled_base; - - ret = of_property_read_u32(np, "qcom,power-source", &lpg->triled_src); - if (ret || lpg->triled_src == 2 || lpg->triled_src > 3) { - dev_err(lpg->dev, "invalid power source\n"); - return -EINVAL; + lpg->triled_no_atc_ctl = lpg->data->triled_no_atc_ctl; + lpg->triled_no_src_sel = lpg->data->triled_no_src_sel; + + if (!lpg->triled_no_src_sel) { + ret = of_property_read_u32(np, "qcom,power-source", &lpg->triled_src); + if (ret || lpg->triled_src == 2 || lpg->triled_src > 3) { + dev_err(lpg->dev, "invalid power source\n"); + return -EINVAL; + } } /* Disable automatic trickle charge LED */ - regmap_write(lpg->map, lpg->triled_base + TRI_LED_ATC_CTL, 0); + if (!lpg->triled_no_atc_ctl) + regmap_write(lpg->map, lpg->triled_base + TRI_LED_ATC_CTL, 0); /* Configure power source */ - regmap_write(lpg->map, lpg->triled_base + TRI_LED_SRC_SEL, lpg->triled_src); + if (!lpg->triled_no_src_sel) + regmap_write(lpg->map, lpg->triled_base + TRI_LED_SRC_SEL, lpg->triled_src); /* Default all outputs to off */ regmap_write(lpg->map, lpg->triled_base + TRI_LED_EN_CTL, 0); @@ -1166,12 +1180,52 @@ static const struct lpg_data pmi8998_lpg_data = { }, }; +static const struct lpg_data pm8150b_lpg_data = { + .lut_base = 0xb000, + .lut_size = 49, + + .triled_base = 0xd000, + .triled_no_atc_ctl = true, + .triled_no_src_sel = true, + + .pwm_9bit_mask = BIT(4), + + .num_channels = 2, + .channels = (struct lpg_channel_data[]) { + { .base = 0xb100, .triled_mask = BIT(7) }, + { .base = 0xb200, .triled_mask = BIT(6) }, + }, +}; + +static const struct lpg_data pm8150l_lpg_data = { + .lut_base = 0xb000, + .lut_size = 49, + + .triled_base = 0xd000, + .triled_no_atc_ctl = true, + .triled_no_src_sel = true, + + .pwm_9bit_mask = BIT(4), + + .num_channels = 5, + .channels = (struct lpg_channel_data[]) { + { .base = 0xb100, .triled_mask = BIT(7) }, + { .base = 0xb200, .triled_mask = BIT(6) }, + { .base = 0xb300, .triled_mask = BIT(5) }, + { .base = 0xbc00 }, + { .base = 0xbd00 }, + + }, +}; + 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,pmi8994-lpg", .data = &pmi8994_lpg_data }, { .compatible = "qcom,pmi8998-lpg", .data = &pmi8998_lpg_data }, + { .compatible = "qcom,pm8150b-lpg", .data = &pm8150b_lpg_data }, + { .compatible = "qcom,pm8150l-lpg", .data = &pm8150l_lpg_data }, {} }; MODULE_DEVICE_TABLE(of, lpg_of_table); From patchwork Wed Oct 21 22:50:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 286013 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95F63C56201 for ; Wed, 21 Oct 2020 22:51:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 417A9221F9 for ; Wed, 21 Oct 2020 22:51:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="AFKXbTqT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2506927AbgJUWvM (ORCPT ); Wed, 21 Oct 2020 18:51:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2506932AbgJUWvM (ORCPT ); Wed, 21 Oct 2020 18:51:12 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08C57C0613D4 for ; Wed, 21 Oct 2020 15:51:12 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id a9so5169933lfc.7 for ; Wed, 21 Oct 2020 15:51:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BwMmGlmMLcmqzYJ99gKjkUq1Wudan5TSJn8Ws/0M4Fo=; b=AFKXbTqTffv34MWjRlmq6pP/YfSnDofZEm/D+KKLhKONbksIYGc1G2K56b5zCgeGup EVPUY8rg4NznWvX2KPOXW80tNfESY/SKNJnTNI9CsYhrF5I1XBRmZTOc7+XIgofphjD0 F2ss2OYFSFnbPZypuklUBpuVSUOL+2//a/NEjP9d9ZD3fAkkjm8EkM4NQw9bQkhRlf8l me/ZxasKFhzp1uHjwiSzh5jS5iJbd7Q84iHA+oJtSBvZ4/k+kyCknrWJjsSYqjK3PuFI pp6rTEB/4NjZXgC2X4Bf+wSg+bajD/4vemUKnhDXB1Ep5tUsgOnlBtN1bEQs6TDkk/af PG0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BwMmGlmMLcmqzYJ99gKjkUq1Wudan5TSJn8Ws/0M4Fo=; b=db7e1W9l2wq85ypP7zU+UGUJVPkC52WGGCGpXUhGC1D4RQDjZK9sfGZv2NJK07ltAl EoC5pDZE4QqVKy+6cYye2Zom/gShgUdORPPgeCmggcvUtDO1YCih6ctvSZMcQHZrDSUf azwdo/TMMH81SCJ3KtUKa1fTB36rcxAihUp7aS/k9jtm9S83msnTZbXbBoL+7NG2LAgy 9z5L0wz8w6jQNHOsyHCtz5qxXlyiDzgM1/S/yw30XqfCWxrD5v3COQ4/O2lPIYnLejmo zalmoBdISjU+BoA4fP00ZWoJ5SgjXgK9WWckm2RCtn87tJ5XiRvbCTRaGpNIjPQsAQ68 yNAA== X-Gm-Message-State: AOAM531YtdJk1lUxObhvEsPnrz4kYytJntl7ibusfzTKZ4ZVEQgu8TsN O6mJMigHAsK2V1xrDU5M+CmHSw== X-Google-Smtp-Source: ABdhPJzSukJqLpmqudb6P2NeiUqTrUtbcSdjoAloKGndrg3quWc/flHrhTJ4MbVvw19zpqIUezFR9w== X-Received: by 2002:a05:6512:3053:: with SMTP id b19mr2156595lfb.338.1603320670442; Wed, 21 Oct 2020 15:51:10 -0700 (PDT) Received: from eriador.lan ([188.162.64.195]) by smtp.gmail.com with ESMTPSA id h11sm652062ljc.21.2020.10.21.15.51.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Oct 2020 15:51:09 -0700 (PDT) From: Dmitry Baryshkov To: Bjorn Andersson , Pavel Machek , Dan Murphy Cc: Rob Herring , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH 3/5] arm64: dts: pm8150b: add Light Pulse Generator device node Date: Thu, 22 Oct 2020 01:50:58 +0300 Message-Id: <20201021225100.162795-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201021225100.162795-1-dmitry.baryshkov@linaro.org> References: <20201021225100.162795-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Add device node defining LPG/PWM block on PM8150B PMIC chip. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/pm8150b.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/pm8150b.dtsi b/arch/arm64/boot/dts/qcom/pm8150b.dtsi index d6e075f92b1e..30e7a5f19e5f 100644 --- a/arch/arm64/boot/dts/qcom/pm8150b.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8150b.dtsi @@ -133,5 +133,14 @@ pmic@3 { reg = <0x3 SPMI_USID>; #address-cells = <1>; #size-cells = <0>; + + pm8150b_lpg: lpg { + compatible = "qcom,pm8150b-lpg"; + + #address-cells = <1>; + #size-cells = <0>; + + status = "disabled"; + }; }; }; From patchwork Wed Oct 21 22:50:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 294290 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E7A2C4363A for ; Wed, 21 Oct 2020 22:51:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 37AEC221F9 for ; Wed, 21 Oct 2020 22:51:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="mMYojLC4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2506937AbgJUWvQ (ORCPT ); Wed, 21 Oct 2020 18:51:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2506928AbgJUWvP (ORCPT ); Wed, 21 Oct 2020 18:51:15 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DF04C0613CE for ; Wed, 21 Oct 2020 15:51:13 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id l2so5246147lfk.0 for ; Wed, 21 Oct 2020 15:51:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=y68c1c7Z13VLVISWQSjGtMfYfdgX0kCBgReV2FtuTdM=; b=mMYojLC4y7LhWFZ4HHoDPGU7gF894ny2E2sByf3XJyfbQ8dXJ5y50Py2imnmaBNCEl 2eHj/pu/bMM8PHskEfAJL/y6Q5T3LUqAyJh5FGnNsmT1gohNN+uLPByBNe7QLNcDWQgv KHFBNupcplqe6jduKdvG408ANXfIaU8aVe9hpvWpBRdXgCw123z1YP/b4d+fsY/SJHoF gCO3n/RonRvdNuUE7SLivYTwdtZfBPJagk8cH4PB6mZDVNW1RTSpxxxGOab0UvseG/ve t3PnoLVJHYoURRMrrRqfIzyDtSnV3crQtJckg9OpMU/wVvisE49a3wabkUgGohOrCzoq fXDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=y68c1c7Z13VLVISWQSjGtMfYfdgX0kCBgReV2FtuTdM=; b=EbXwxgvi2g/jPh4ddtK1lxQlt3bOG18FYuNfwu2F3xyvaxDKkFEDNOrPXR7Q+RIyy5 JudnPwGXYt/AmrtxTdTj7VoLJhPE+QqMTmnRNkTgsIqmdS+YApCIqTOjaNO0nhhS9cml rOeBY02qOeMclnn83+XQl6fLKXCbksTpFp+yyThesOh077HGGU+N1P8LXFM83WgZ08Ts 1haXjNyq/vC7eAz6pmvtflfT+YwIe7DmSvw2T5Sg2In6xQVxQQ+L/HbLHTyU9CHPZLab hw9iIp9bfiq776WjzAhXTwNNdlR7DMkKUjdZGY+YyFgBl4Bme0xyyakwPbZsfzbq/YY+ oZsw== X-Gm-Message-State: AOAM533h2oT4Y1uaC5TQcx3yWI/OxJkjLSKMcXth7eAwNe20fN7UQaHQ 8l2PoEmKKbjtdy78T/Krd2v5OA== X-Google-Smtp-Source: ABdhPJzSrFyWrEgkely2ncAXUZGPErChj9HT+aDia8Z+Kob9YWM/XyQlsxnRFfcuK16COCt/B/93BQ== X-Received: by 2002:a19:c3cf:: with SMTP id t198mr1831682lff.461.1603320672111; Wed, 21 Oct 2020 15:51:12 -0700 (PDT) Received: from eriador.lan ([188.162.64.195]) by smtp.gmail.com with ESMTPSA id h11sm652062ljc.21.2020.10.21.15.51.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Oct 2020 15:51:11 -0700 (PDT) From: Dmitry Baryshkov To: Bjorn Andersson , Pavel Machek , Dan Murphy Cc: Rob Herring , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH 4/5] arm64: dts: pm8150l: add Light Pulse Generator device node Date: Thu, 22 Oct 2020 01:50:59 +0300 Message-Id: <20201021225100.162795-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201021225100.162795-1-dmitry.baryshkov@linaro.org> References: <20201021225100.162795-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Add device node defining LPG/PWM block on PM8150L PMIC chip. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/pm8150l.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/pm8150l.dtsi b/arch/arm64/boot/dts/qcom/pm8150l.dtsi index 9f214ceec2b7..e8926d6c32cb 100644 --- a/arch/arm64/boot/dts/qcom/pm8150l.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8150l.dtsi @@ -114,5 +114,15 @@ pmic@5 { reg = <0x5 SPMI_USID>; #address-cells = <1>; #size-cells = <0>; + + pm8150l_lpg: lpg { + compatible = "qcom,pm8150l-lpg"; + + #address-cells = <1>; + #size-cells = <0>; + + status = "disabled"; + }; + }; }; From patchwork Wed Oct 21 22:51:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 286012 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA292C56201 for ; Wed, 21 Oct 2020 22:51:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 81F3D218AC for ; Wed, 21 Oct 2020 22:51:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="JvEnR4tR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2506928AbgJUWvQ (ORCPT ); Wed, 21 Oct 2020 18:51:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2506931AbgJUWvP (ORCPT ); Wed, 21 Oct 2020 18:51:15 -0400 Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CB8CC0613D4 for ; Wed, 21 Oct 2020 15:51:15 -0700 (PDT) Received: by mail-lf1-x144.google.com with SMTP id r127so5108248lff.12 for ; Wed, 21 Oct 2020 15:51:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ICAICiNyo+EcMXjUhGuIhiIEersvXHJzVxJKSGdteTM=; b=JvEnR4tRFXIYdCbHscJ9GWGxDi1dIvLHNzdffaWokQS90FA379cJx6I0wR6OTYc9MU LozDzCnTj1m1z1Lg4A7aeelciFHB2pX4jMoZOSL8TlKc0UQqZVqAn7U1HC8XAW2CKmww mwIOr6qRvdlu+UafFTCmErP8b7lily5r007/nvhIscJMpU1IIygLdFXFQDWKOcnNnEs0 wNezxZ02hf+8buYD8gsaeGnpsXDBfUdJmvoHwmdEsWERiPFXOxpOF8C9zau7gnckrDA8 kBhnv8N1HzgMPS0wUQQ3oy/Y6togiveG0YjjcHsYxRbvtpK1J7SllcM/OE6V0YO2jTmo RUjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ICAICiNyo+EcMXjUhGuIhiIEersvXHJzVxJKSGdteTM=; b=VAJDMkaMFnpAtJvwQfyEbfnADkOLzOmtwACKMQhWt1A7t3RmOVDSk3uuzaTI60HiYK hdeA/iomFJR7yDoHxp5v78iDb+uJqf3padIZh8EtSa3qbzgmfmDPOIv2v/YyCK74dqxr 9G+vS0a3Pk3KF4OgH1YO99yKSZbe+GF1Nug4Ku1JHpXS1Y2VxhXjOyMFZR9jCHXybHQM lprB5vN9gdmI1QRFjlAM8ZxMPN6r882/n9GCXr73Y+EfLSjqAO1ZgvkqqZzI6I12oq9A l6D6V8h8MRhcYkqaBJ78Kv4OZMxJxeIj4PMvt8aHgGaLseISz3QMpVDTUgVjj7yV1dae tvGQ== X-Gm-Message-State: AOAM532ZAY/6eoahUy6Yuaf3rcXzUzdxrIYrrQHZp7yp8hfRNzSTkxtl qOX9YCLyjUF31y0FgoJYJqctDQ== X-Google-Smtp-Source: ABdhPJzz/fJNgntQdkyZa7dPBtnccqsA/OUhtXZDmFk4rqyua01TQTFC5361SXrKHbvGEhnuT8xdCg== X-Received: by 2002:a19:f518:: with SMTP id j24mr1903146lfb.307.1603320673622; Wed, 21 Oct 2020 15:51:13 -0700 (PDT) Received: from eriador.lan ([188.162.64.195]) by smtp.gmail.com with ESMTPSA id h11sm652062ljc.21.2020.10.21.15.51.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Oct 2020 15:51:12 -0700 (PDT) From: Dmitry Baryshkov To: Bjorn Andersson , Pavel Machek , Dan Murphy Cc: Rob Herring , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH 5/5] arm64: dts: qrb5165-rb5: declare tri-led user leds Date: Thu, 22 Oct 2020 01:51:00 +0300 Message-Id: <20201021225100.162795-6-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201021225100.162795-1-dmitry.baryshkov@linaro.org> References: <20201021225100.162795-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Qualcomm RB5 platform uses Light Pulse Generator tri-led block to drive three green leds. Add device nodes defining those leds. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts index 01708d84fdf6..04eff24f9d71 100644 --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts @@ -1014,6 +1014,29 @@ &pm8150_rtc { status = "okay"; }; +&pm8150l_lpg { + status = "okay"; + + led@1 { + reg = <1>; + label = "green:user0"; + + linux,default-trigger = "heartbeat"; + default-state = "on"; + }; + + led@2 { + reg = <2>; + label = "green:user1"; + default-state = "on"; + }; + + led@3 { + reg = <3>; + label = "green:user2"; + }; +}; + &qupv3_id_0 { status = "okay"; };