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: 11849927 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8137A14B2 for ; Wed, 21 Oct 2020 22:51:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4812C221FE for ; Wed, 21 Oct 2020 22:51:10 +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 S2506926AbgJUWvJ (ORCPT ); Wed, 21 Oct 2020 18:51:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2506925AbgJUWvJ (ORCPT ); Wed, 21 Oct 2020 18:51:09 -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 0E894C0613D4 for ; Wed, 21 Oct 2020 15:51:09 -0700 (PDT) Received: by mail-lf1-x144.google.com with SMTP id j30so5198757lfp.4 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=k90lTEWMmrdXL71sEczMX45N4E6OXJy9x0IC1uedvwp2EBTJ35MO65hadwDz2yCoJW knzLsyY6HvOsrzXmnIJ0jyhE0++tO2UectQ5i5MYY0Sknu24XlSn3VqTtUIwvpPgXojL qGfl0jr522QnLpXDWurKcjJTkZQRaXCWPD0CBhgFM9r9K1UAUcq0uRy08s50lhHkECb9 eL299Worv0XLwC0ynJnOMaXwnq91Y+GRQKS+uPqY3eD2Sid2kXmPWSkxhFaSOdaXubcS B5Oaxlb5quVzaYGA9mCzt3c3V0bKPwdcF4K6eScsA4sy3AfCbEGK+74ZQVKaf9KsSrot +3kA== X-Gm-Message-State: AOAM531fcaJj64oTWM6P0agcHwsO0YGbmLbTvqz2Hni+eVn9HYyZ80ki qq1fQqsaCtOTtjlCNJWGEP+V/A== 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-arm-msm@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: 11849931 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 27C0161C 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 05DB5221FB for ; Wed, 21 Oct 2020 22:51:12 +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 S2506933AbgJUWvM (ORCPT ); Wed, 21 Oct 2020 18:51:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2506927AbgJUWvM (ORCPT ); Wed, 21 Oct 2020 18:51:12 -0400 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61920C0613CE for ; Wed, 21 Oct 2020 15:51:10 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id 184so5170964lfd.6 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=Rcmbq4FTC0Kr9agQ6gjbyaRRzW/USZpMbx3gLxT1BFOPNwq9Ktsbjpj4ud8G0Gmo8G HpBMohJLxjZIJ4Pzp33PgpzXmmwu/CQ5qki0/R3ZRemKWoDTcuWhZ4+2ktuhvMSpdQVS bxPquFB7jugQ5YPablR2kAgqvU7tPocZvWMMpc0iO+nhOyKI+LlUAHPrU0dASbvdSXCv kcOPTO0EzkjDpekl5zcT4L9VClvLKve1AccLYYAIulavrcSEngWPQkI+00KwhzHCB6Jm QwNEDz/C2un7Q+Lse/ZBA4Jw+dR4nm9PI4/XgRBwQMTPLiXD/yQ0EPjq91nL8lKRM7Bl 4TOA== X-Gm-Message-State: AOAM532xrLyG70lSs00Lk3vPnmkq96ejKqmZKb+Wdicf/URyOREvWvFU R7Gq7vc9DRBKXZYboFNKZ1txVg== 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-arm-msm@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: 11849933 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 37B3461C for ; Wed, 21 Oct 2020 22:51:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 118CD221FE 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 S2506935AbgJUWvM (ORCPT ); Wed, 21 Oct 2020 18:51:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2506928AbgJUWvM (ORCPT ); Wed, 21 Oct 2020 18:51:12 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07BECC0613CF for ; Wed, 21 Oct 2020 15:51:12 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id b1so5114922lfp.11 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=IAIRxfFoz9DfuQaltS69CknwSvdaMs8Vs4oZ33tko0hXfrSk1ZHp9ffuFDydyhvn0b Zp0gO0jGk15l3VQbgVggyRxqern69fT9Z6xBh8OXs8tbbZ6gTp7LNlcJ3VqlAnmJlZNY TpThzEry23INL6V2S9FEhCdVKkJcXfPkWPi7HrIWfNBuH+fvP71b3GpV8b1OCPHcEfkh P0MkGI6FK2sagn4tlhuOF5MVrP6U1Ca4ZjlxaM9EqZ+Z1oFsbh4erDzhd3+PtFrEKnlE gKo8A6mzCgg1iyTBvq/T2rlTM229ssxhkQp2mdCgci6paO3bUJjwHKgwuyh9F2t8aYQC EC9w== X-Gm-Message-State: AOAM5325H496UWbAQcuaIQWjp1LVydgd2MOc6M6vWcf+xmB2KKTmJ5tl //p8dWRo60aSzrSUlC4toGsyLeMTg8vfBDKm 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-arm-msm@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: 11849935 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5DAB314B2 for ; Wed, 21 Oct 2020 22:51:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3B7DF2462E for ; Wed, 21 Oct 2020 22:51:15 +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 S2506936AbgJUWvO (ORCPT ); Wed, 21 Oct 2020 18:51:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2506928AbgJUWvO (ORCPT ); Wed, 21 Oct 2020 18:51:14 -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 9E451C0613CF for ; Wed, 21 Oct 2020 15:51:13 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id c141so5184022lfg.5 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=T7ebsEInO7nyjOc1wQ5/lFVkcDCtBERGoG+ZI00MKkzlYSRcmntHdF8q+o98S+Jejt WUnUNXTI+1PILEMWAmqfTkChzA3WV+hjaFJE/9XKVgTqlP9H7oTvJjH2NlClvLEoTWiB Rm5mNoRSheeRHPmigYAF2mrn+OoEI2Q3n/Tnbnkfu2W4M7N2mn7Fj2rDjIvuXSC0YZza YDaRlBGDQvb7UI7AzDaaInujMKtC7omF/77jOAu05GbxPbvh+1t12UdJmlhdQk3c0ms5 WNmJyJADzLhQytj+uM58tBBkOV4J/x8hOS5kh1Klzc5aZ3R1dc9j72X+ehw5Zmg0OMob WypQ== X-Gm-Message-State: AOAM531vbqTBZDy9NlgXH32h31maXlOV4kK/huQHwKfbSswccu3rCM8P 1y/+UGvjPkx0y+4LSXErrGF8Ig== 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-arm-msm@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: 11849937 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1129214B2 for ; Wed, 21 Oct 2020 22:51:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DF96A221FB for ; Wed, 21 Oct 2020 22:51:17 +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 S2506940AbgJUWvR (ORCPT ); Wed, 21 Oct 2020 18:51:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2506938AbgJUWvQ (ORCPT ); Wed, 21 Oct 2020 18:51:16 -0400 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AE56C0613CF for ; Wed, 21 Oct 2020 15:51:15 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id b1so5115043lfp.11 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=ddVOSRsEzT5oJaFpk+kkraKRfmrb784lNdVZbBf/A2whCNCcDNM6gBoXA0cbEOcXGN TTiSEepcNEn9hzpetKNe0EiCEfd5I9cppDkCc8lE0aY/mTi4FjmPEtrlnRWuV7XUh+EQ PodkqYeDA3fPK4Gnf6NZUJS+aEf8J+NyRz2/Sxm23EqviZb8ReaUU8jF9ohqYCRnSdpc I3luQJ8LNkAqAFJy0GV5HTMiNDC1H/nnS+wF4L0ZbTUu5Hw8Ewvji8sHkfBSC+aZfy5w sVg9caUpS44rEJfs8sZ4A5NIoueRDYdDG//0Jr0B4S661WWxlhuDOPN73alE02HbJ2cg HpfQ== X-Gm-Message-State: AOAM532PsWP729gCS9BMmwnnTEAhYqIe8/7rZOSDK3v58cCUg0KCcqWM 9vkSfDN5L5xmM7PgeRPpeWZvPw== 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-arm-msm@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"; };