From patchwork Fri Oct 30 01:07:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 11868133 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 E867A139F for ; Fri, 30 Oct 2020 01:07:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BFDA220729 for ; Fri, 30 Oct 2020 01:07:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="je1ZvvYr" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726100AbgJ3BHY (ORCPT ); Thu, 29 Oct 2020 21:07:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726053AbgJ3BHX (ORCPT ); Thu, 29 Oct 2020 21:07:23 -0400 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2FCBC0613D2 for ; Thu, 29 Oct 2020 18:07:21 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id y16so5191264ljk.1 for ; Thu, 29 Oct 2020 18:07:21 -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=zzF+iD2bQtsVAEAnO2ufhYknySXRFrdpCxNsou50eyA=; b=je1ZvvYry/NJgExvAEw0TUT67uPAXNEHkdvRgMqiDF3uVrrHeogsZaPoApMb68NJf9 0OFBiT/WqDdXCYscYN6HlZwzFVRbZklDMfkA/ZSG/9gOPavBVZlG7NcuwxZReGGS650G 0J13WH7ozOrQ62sSjGPOeNuZlF99yIcHA5IXJACPgOrQ7ijHnqeUmJ3Mh17/QAHgtMSk aobnEO/qWNmJfnKKmwU5jSQuMISh6J5HKJm7UTn6lpv+C3PqFx4wdvuy3k9WNYgNUngh l0A2LD/Shm/gH4Qyuc3yNnIK4HZ4o1BegAlGWQ06O7vqvVGSQtfegfZCicua2ss6d/Lh o9RQ== 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=zzF+iD2bQtsVAEAnO2ufhYknySXRFrdpCxNsou50eyA=; b=rK4dSmHxFau9cx4hlOwuCTXlpftLUDt4Qlw63i37OIVJ4OgMLVuPYvmdkV9cPSupFr j7DYMXUWe4eZdilqIL196RCImkoR+zJbccs5hPgQwgm3SAG/SScQWRZblbAnGj+Ni77c yYV6zTueoE7vyK/vMh9yT/ST6HyUYvl31lY/eE19rzm9QQKlIoHaoitnSYy/k1go6yns KYC+0eHvN4IgMdG/c+Z8WWGxcy7HeYWBOdDrjeiX+OPCXLRpnW/uMb2R/RNDej95M66w Kc+JcJ/4rewYQ6eKXBp6YK6WoetyJVaBrGYX/KaKjxsEKetVZpuFSxJAA2dvX/tr/Q/p ALnA== X-Gm-Message-State: AOAM532+fcV4INUhHu58Afzsr6j8n3gZ6JM5z0egbC+Ezx+HHYgyb1wy wu76KQUNXKnDQ8jbMfm5PWVmOQ== X-Google-Smtp-Source: ABdhPJzbX8Mvkqnvj67XhvIU50pcIFgdBIpv9KZgdQFiTDPX9pqlOfzMvB+26ALvTYx8NS9UQ4u8Wg== X-Received: by 2002:a2e:b0e4:: with SMTP id h4mr2708905ljl.119.1604020040402; Thu, 29 Oct 2020 18:07:20 -0700 (PDT) Received: from eriador.lan ([188.162.64.219]) by smtp.gmail.com with ESMTPSA id c6sm447130lfm.226.2020.10.29.18.07.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2020 18:07:19 -0700 (PDT) From: Dmitry Baryshkov To: Bjorn Andersson , Pavel Machek , Dan Murphy Cc: linux-leds@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, Rob Herring Subject: [PATCH v2 1/5] dt-bindings: leds: leds-qcom-lpg: add pm8150[bl] compatible strings Date: Fri, 30 Oct 2020 04:07:09 +0300 Message-Id: <20201030010713.247009-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201030010713.247009-1-dmitry.baryshkov@linaro.org> References: <20201030010713.247009-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 Fri Oct 30 01:07:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 11868137 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 56F321130 for ; Fri, 30 Oct 2020 01:07:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2D2A920747 for ; Fri, 30 Oct 2020 01:07:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="YsM5NGvj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725379AbgJ3BHZ (ORCPT ); Thu, 29 Oct 2020 21:07:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726053AbgJ3BHZ (ORCPT ); Thu, 29 Oct 2020 21:07:25 -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 49B94C0613D4 for ; Thu, 29 Oct 2020 18:07:23 -0700 (PDT) Received: by mail-lf1-x144.google.com with SMTP id 141so5754733lfn.5 for ; Thu, 29 Oct 2020 18:07:23 -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=svkaYU6ajBWIQXRUuQi7TLrUgDBVVF7XT8RieFVwa5U=; b=YsM5NGvjfQTAwilWsl3WGjGM5nIrqb2xs0GpR5M/nggqTK31ASTMPivCMunXBhJDFc nIVVfviYGA7kr8STx0QRbSHnsxaB3Ntz7bxgrBHa4RcBG4mRp8z6dwXn8i+FRW8FCYbd WhBMO/l/5KtfgWKQz/iCQou4XNNuftoJBuOQeUkF0QUGQuHbmT5bYylATbvNxWRJAWkT iNqn/3xrO4w0FsiJO12d6eWoLTOT2ZZFuLKYyxSu6hTXbaLaiZVpt+vDLTig1WVTn2r5 LNo5FYjCoXu1Rx0YlhjPIB30r2ExP3IwrxRkohvANR0p8cFBq56+XOIVE3l31gZY07w0 /7Ow== 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=svkaYU6ajBWIQXRUuQi7TLrUgDBVVF7XT8RieFVwa5U=; b=lKQBjqWMd9njiAGwHXbK5jilvuga0wmL/4PZD52tqjeSVfde61odv/n3HCKC90vvef EuQGDo6nxEN6pkOU2+td2QSYTiERed9UpXVkTmpVSESXDH6hlCO+Al4q+vEzOW0V7Pr2 xiynl5H3iiyxF1nIzIBsOR0BH1WHjgjBTEotuDlUsQ+MQa2q/ZjrwlXbAol/mFsmU0gd K4Aggves/xJR9ot8CJZk4KCZF6wpYkE1JWT7gCbe88rJNfBZf8ia2q+Ccgi7t9byKB3L e6J+ObjuMOGOb6nIwh5Nw6VhFWq1n6rbvkfkCZVQ63Dd3lQRibnOtOt1hEQoTiilUih2 Jl6g== X-Gm-Message-State: AOAM531iymvZ2sWw0xi9vmMvHcpw4MPDdm6817R7tgpfvfSex3kw30nX ROOiJPS5PNLi+h9t25f3yidExg== X-Google-Smtp-Source: ABdhPJwMvsOIbT034PQyb3jOThXAm6KgIhvi9Vu+Ryv+A2byeW8wYOnhg/4P67PaGuZ5tcul8vhYag== X-Received: by 2002:a05:6512:2098:: with SMTP id t24mr2756947lfr.116.1604020041764; Thu, 29 Oct 2020 18:07:21 -0700 (PDT) Received: from eriador.lan ([188.162.64.219]) by smtp.gmail.com with ESMTPSA id c6sm447130lfm.226.2020.10.29.18.07.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2020 18:07:21 -0700 (PDT) From: Dmitry Baryshkov To: Bjorn Andersson , Pavel Machek , Dan Murphy Cc: linux-leds@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v2 2/5] leds: qcom-lpg: add support for pm8150[bl] leds Date: Fri, 30 Oct 2020 04:07:10 +0300 Message-Id: <20201030010713.247009-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201030010713.247009-1-dmitry.baryshkov@linaro.org> References: <20201030010713.247009-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..4770fc46f312 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_has_atc_ctl: true if there is TRI_LED_ATC_CTL register + * @triled_has_src_sel: true if there is 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_has_atc_ctl; + bool triled_has_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_has_atc_ctl: true if there is TRI_LED_ATC_CTL register + * @triled_has_src_sel: true if there is 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_has_atc_ctl; + bool triled_has_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_has_atc_ctl = lpg->data->triled_has_atc_ctl; + lpg->triled_has_src_sel = lpg->data->triled_has_src_sel; + + if (lpg->triled_has_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_has_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_has_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); @@ -1099,6 +1113,8 @@ static const struct lpg_data pm8941_lpg_data = { .lut_size = 64, .triled_base = 0xd000, + .triled_has_atc_ctl = true, + .triled_has_src_sel = true, .pwm_9bit_mask = 3 << 4, @@ -1137,6 +1153,8 @@ static const struct lpg_data pmi8994_lpg_data = { .lut_size = 24, .triled_base = 0xd000, + .triled_has_atc_ctl = true, + .triled_has_src_sel = true, .pwm_9bit_mask = BIT(4), @@ -1166,12 +1184,48 @@ 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, + + .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, + + .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 Fri Oct 30 01:07:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 11868135 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 13E9D139F for ; Fri, 30 Oct 2020 01:07:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DD4FA2072C for ; Fri, 30 Oct 2020 01:07:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="aZyFNJB8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726109AbgJ3BHZ (ORCPT ); Thu, 29 Oct 2020 21:07:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725379AbgJ3BHY (ORCPT ); Thu, 29 Oct 2020 21:07:24 -0400 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91A3BC0613CF for ; Thu, 29 Oct 2020 18:07:24 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id 23so5136708ljv.7 for ; Thu, 29 Oct 2020 18:07:24 -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=aZyFNJB8da1k2pfCYzco1TTbsjCFiv8Gvrhvf+dokA9bi9ZwJSTXcZLrCzC1jZIE77 nN+51GLd/uTe+fqkk67784XDB+QxBJH6D7+wocH6K2C7aqgXB0EVmuR7g7wX9vOCVtVX rOlGABMtk3f7WWHw0+5MTgF9j1k5MXe4hoqvFBoMCLDYdoRi7xfY0fr0gUmZh39UdyKb AZ/nbj8M5DXsJpTtbtOXEw1Kgz8P9fHwra3oG+i7hHXK61MsBloD2mJ/ouQdIt/6b0Mv DFQjYjSteSUnUt1hYlKcul4jKEajEG0jTY/kdH/HogdcW66w5KPkcWtvtoxmHAdFqKUQ RHwA== 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=hppWrJLv7cINpgZxZGZHMJH7VrWvo4yUwcYkvYe0xMgcvx4G9nDc+yIDxPcDtffqqa Oc2Ea/UzpR3UqAhD53AZPyR+FGSRDuXFcJPacOB0JcDJAKSHW68e7aYc2Wxdsi+sKXCK Raq04SRpZVAd71Xup3fgn0n7LmzaSlSnFLazUhuk+6XOZQOQeXbtaNyN0dUv+q4k57bq 9bc9wJ3qWqrCNREDslvZtLp7aj55FeEHtpx48sL1JAtC+x7Ik+2ysFfmOTAZhTB7kpkp qJ/V631C5WY4wMfzX2zdCYeIMATlZoSlHHY1oWbw0ix2PEamAamSNdLUSVNuryEzH0C5 rgDg== X-Gm-Message-State: AOAM532iIAP9uxTu3t2yiHaILfSaiTT//Cs2ecVpv218ue2uItXGDmQV wt4vo+tz3POJ6m+gFkXg2iR1lA== X-Google-Smtp-Source: ABdhPJx4//2VJE2i01TQOxJzPGp6fxZJabT1/zncubmKp651pgiNQxMNSiEThV/1hG2iyvDpPWRCwA== X-Received: by 2002:a2e:8702:: with SMTP id m2mr2624598lji.21.1604020043137; Thu, 29 Oct 2020 18:07:23 -0700 (PDT) Received: from eriador.lan ([188.162.64.219]) by smtp.gmail.com with ESMTPSA id c6sm447130lfm.226.2020.10.29.18.07.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2020 18:07:22 -0700 (PDT) From: Dmitry Baryshkov To: Bjorn Andersson , Pavel Machek , Dan Murphy Cc: linux-leds@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v2 3/5] arm64: dts: pm8150b: add Light Pulse Generator device node Date: Fri, 30 Oct 2020 04:07:11 +0300 Message-Id: <20201030010713.247009-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201030010713.247009-1-dmitry.baryshkov@linaro.org> References: <20201030010713.247009-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 Fri Oct 30 01:07:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 11868139 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 799D61130 for ; Fri, 30 Oct 2020 01:07:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4FE842072C for ; Fri, 30 Oct 2020 01:07:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="EiSlkpd0" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725771AbgJ3BH0 (ORCPT ); Thu, 29 Oct 2020 21:07:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726053AbgJ3BH0 (ORCPT ); Thu, 29 Oct 2020 21:07:26 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDE39C0613CF for ; Thu, 29 Oct 2020 18:07:25 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id l2so5799002lfk.0 for ; Thu, 29 Oct 2020 18:07:25 -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=EiSlkpd0XH2unr8aJvY/q6JTRASNiATl26sdbbRIjuwr/d5hZJP6EdRnKQYTegfrpm 0mKW9u4t9m8mXIbG8sycs74KNYqwfLoHQkQ3k5GJNkUiB7a8zxQfCqG1jyrS6/qBvaTK HGx0w+GlihSwPT08jKop1iZe4IsurKZXEZXMbGeRRsHfodMn1LxmUYq4sVwXH44OfzTO LY1Ct0OJZckvjhjK+FQpKViA1g44z2XVzpAPw2qZjb8/WraH89RxrWDrwL0H8CbH6Fnw P7WieOfF9Oe5Xd25P5PA/irE3DKZ2H8knSpkok3DdgIRYTvQPj0DOXHsRPUc1sBIJnaz ZUlw== 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=CrFKFOMLj9Qkj4svZdZbpQOuGfY1S9A/hRpChZDsDU15yMtTFYlLH9IRk5Vt67zveB 2twCb6NUanMSZh4yK8u0P6WG+/UOuVQmnUa1eYrY3bGGckTn03uecxqSn9UgRchajiYw i/00tAEhozUuPrm0/2S/odauAbCApTFhbRunxrApKwTaK4fwOg2o6X9KbHmYwh4Ps8De XmHFPEhKwFzL223R7TidOTUrSMa1FqnwF/wSYOboQuaU1CUJCEa45/danIbGCAmqIIUv gbx4oxboDOXjDcQuqbIDJPlBURJbkvgjmQp+lEcP9LXEwemA8fTlSB14JQKmS7AluLL0 erVw== X-Gm-Message-State: AOAM530IsUguX5VSZFH7OQYmxqtXgxqa4hF7TjBHWaVUB0nG/rIn9hxl us+daVTTolKyjcIgRfImCzZy5Q== X-Google-Smtp-Source: ABdhPJyyl9s5LApPFxXLIlRSqMYgSw7DuZRZYl7P1j6O1xPT1cHbru5qAA46BRXkKwMt9T4WVysPIQ== X-Received: by 2002:a05:6512:2154:: with SMTP id s20mr2819398lfr.467.1604020044443; Thu, 29 Oct 2020 18:07:24 -0700 (PDT) Received: from eriador.lan ([188.162.64.219]) by smtp.gmail.com with ESMTPSA id c6sm447130lfm.226.2020.10.29.18.07.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2020 18:07:23 -0700 (PDT) From: Dmitry Baryshkov To: Bjorn Andersson , Pavel Machek , Dan Murphy Cc: linux-leds@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v2 4/5] arm64: dts: pm8150l: add Light Pulse Generator device node Date: Fri, 30 Oct 2020 04:07:12 +0300 Message-Id: <20201030010713.247009-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201030010713.247009-1-dmitry.baryshkov@linaro.org> References: <20201030010713.247009-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 Fri Oct 30 01:07:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 11868141 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 32780139F for ; Fri, 30 Oct 2020 01:07:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0A4E920729 for ; Fri, 30 Oct 2020 01:07:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="orT0AVb6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726152AbgJ3BH3 (ORCPT ); Thu, 29 Oct 2020 21:07:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726122AbgJ3BH3 (ORCPT ); Thu, 29 Oct 2020 21:07:29 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3943FC0613D2 for ; Thu, 29 Oct 2020 18:07:27 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id a9so5761499lfc.7 for ; Thu, 29 Oct 2020 18:07:27 -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=QViQgAeoKYf7Iu82LVxWPMaTDwhUZNQ6uzFRhsBC9QQ=; b=orT0AVb6wpcbaB4cOcZktemGwXtEtIn/5F1pze6EHOAx0GlUohuWeJuHku2NIHldlC 7eOvKhbw/DSo7MFXJRJIT0H6fQ4SZINbpNEL6EMLjcMHxsWxnxZ/bLiTkFpgLgvCDNUM DgyLdFNuvtPpy0kuG8U/wOEBgkzF4rULDSecF3vhFqtARelgCh7Wmhd7y/y+S5DWcvZS dWbHR9XoK2Gjv50dr10G0zsSfMWz69EgkzOAT74h14EL0t98Jx+dLN30rL6SOyMUiNUJ k2bFyzmG2A2LCm/SdzuTckV0MpKDJ/yvxUobX9UiShs8FgtHQTCuN1ic87bbVcoYxTfM 8iaA== 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=QViQgAeoKYf7Iu82LVxWPMaTDwhUZNQ6uzFRhsBC9QQ=; b=ZNMcu09zv29UDH1MsEXZ7fZZRGVrvEHKAeL4g2LDKL7WBw249akVr3iyNUo6m0miW/ bIEOiJ32U21E5btQWjEuvbvS146R2A/K1MTJ6l64JahWbSVloWSgCpzLrgYgNgeI6rz+ xCSa5GYFSu4dzMYuSfGbx1sRC8Le1YgO814ULQVOj/r1peyS6cGla+hGwlBA7UnJxPv3 XqGSKQKU1PkNlaZvqSASqtX9vW+Mx25/fVja9Td8KTqtNaEY1aHuDHnJc6DcYBQVWdz1 rf0ea3r7vXJHn+lrLH1LtKbIxmDklxx3ldo759N6W5nOWlXNjCBwP0/6UbIVXc64WJY6 cgRA== X-Gm-Message-State: AOAM533JY7zwLQ9TYOSKMX8w+XCOTzeqey7Imo+3ScfrRuJmjnbIYQsV zIQGEXy0ReXrNRUM/Xa0N8T+yg== X-Google-Smtp-Source: ABdhPJwMQ8mJJAIEFq0SK4wnTzMtVGJRlDwOXQuWiFM0xv0axvzuANNoVT/IEg+GpH9yYT4AVxFN5w== X-Received: by 2002:a05:6512:3490:: with SMTP id v16mr2432620lfr.61.1604020045762; Thu, 29 Oct 2020 18:07:25 -0700 (PDT) Received: from eriador.lan ([188.162.64.219]) by smtp.gmail.com with ESMTPSA id c6sm447130lfm.226.2020.10.29.18.07.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2020 18:07:25 -0700 (PDT) From: Dmitry Baryshkov To: Bjorn Andersson , Pavel Machek , Dan Murphy Cc: linux-leds@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v2 5/5] arm64: dts: qrb5165-rb5: declare tri-led user leds Date: Fri, 30 Oct 2020 04:07:13 +0300 Message-Id: <20201030010713.247009-6-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201030010713.247009-1-dmitry.baryshkov@linaro.org> References: <20201030010713.247009-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 df2d01f915c9..bf3d3f44016e 100644 --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts @@ -1017,6 +1017,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"; };