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: 314329 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 6365FC4741F for ; Fri, 30 Oct 2020 01:07:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EED9D20725 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: 314328 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=-10.1 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, UNWANTED_LANGUAGE_BODY, 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 98D58C5517A 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 571C520739 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: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: 319967 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp972846ilc; Thu, 29 Oct 2020 18:07:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyx7+mvdW2Fha5A3OAaFTnhEgWBu+HiPgm0hXOYelYKf8uyzKNzVUIfC+Yz7GkH+yiGXTOH X-Received: by 2002:a50:dec5:: with SMTP id d5mr7083448edl.362.1604020051809; Thu, 29 Oct 2020 18:07:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604020051; cv=none; d=google.com; s=arc-20160816; b=CNwUsVjp50RMJvTvw3M6faAx6GIogRSWdS2J1cBFhVUyoeFspdGa54t8LlQdxTlruP RoaL4XKkFQwVkXoczHuCWicZLg+on7qFElxPxbBAsYfGSlUkx9VNfTIRmbXDM9iKDg1/ eSOziUm+cSh1EMPHz8n+uDggF7kC+kLn3VFeNuBys4lJzuL+XTDuZJlJ4GpYwJpAY8RX SK6w8jsn6UkYB/mZhB45ev/O4tjw7crcV3jUSl47/leT0sNUmZGzc7SsDslkDC8fEYX+ PNYyN2BUMtW+H957KKbLujMt+BmN6defKzz1nWPVuoMwhvUcrgIxzdb0R4tYYCOq5Zgj wMTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=y68c1c7Z13VLVISWQSjGtMfYfdgX0kCBgReV2FtuTdM=; b=uqUWWK39XnY+nni0HbFNNTPHO42x0FvO4CzTYlguToD0P4k2aUOtADjmOkz4vRs1GF 3szCo9pj+NGYTapQhfvg0Wto4H0Nyl6IVZpWVBJEPOP+AK9YE1Z2kBgkddwyZdGdIWeX eABUNKyk0fVx7BMCNgfe7miwkONjqND2e0gAGbVm+8hSuwhDeHIT9T+pAi0vXQCo0t6h Wa56N5YlXmstoHXDu4etg7o5oYsqQELCJTXituOguHvu9/j2p2CXoez/oy429/NMIeWh U5/6NCpWccsmoGWNatoCa/37C9RbQ/VYvMIveqmPJZ1yyyCw1vfEMKWR7EOvqhA6wiyA 5Lcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EiSlkpd0; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k25si3596923ejk.65.2020.10.29.18.07.31; Thu, 29 Oct 2020 18:07:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EiSlkpd0; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725771AbgJ3BH0 (ORCPT + 15 others); 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-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(+) -- 2.28.0 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: 314327 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 8E4ECC4742C 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 34E7220729 for ; Fri, 30 Oct 2020 01:07:31 +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"; };