From patchwork Wed Apr 5 15:50:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 79784 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp421550vqo; Wed, 5 Apr 2023 09:09:21 -0700 (PDT) X-Google-Smtp-Source: AKy350bATufgNx7/T+eRt3mJigRnQm3h/0OoUq0stXFNjtxYuoCZaBccFBM0KtXDY5b7UM/5/aBw X-Received: by 2002:a17:902:dac1:b0:19c:f80c:df90 with SMTP id q1-20020a170902dac100b0019cf80cdf90mr8738293plx.45.1680710961077; Wed, 05 Apr 2023 09:09:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680710961; cv=none; d=google.com; s=arc-20160816; b=XGJHSklfKfWkBnZZAAz7reThlmLH2NRbU2RWG0ZfWnUKFhvhUgne5CuukV3XSY8C7y CDrQXVtBpOvh7HiXppJZnbcBcrYJSWtJcbPcPb3Dwp+guXqrSbBeibb7PPpjsBJyZpL+ eLMW9bd8BtZGet0jv7cUkhB3vo6h509fWOdgPi7qK/FmFYib1ILgS9ouAcCB+TFD2ZgN t1/sjw0+htPa8qqVK2zXxYcZKEVq0AI4PNLr6wLpTezuGn4Nc9EeMnMSoWbCrdQc5mX/ phB1GEzV+19CsUzVUvFqNGvVAtpgpwNmOpPQrCQ3mtlj7V6DrAoSdYW8gZruk9EWYHee TsKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=1Jq2avB28NPHNddAO0QR7tlYd/NjJsIY90TgGhkA/74=; b=w+XpcsZbskyxLxhxYy/It4UQZyNaQ1WQEJGlImrln6+B6M7ipnYi1whAPjo/LxFYhT I8Kyw6DC/mPG4uAHmfTlUHxfD4zkhVk7BLSWtzDdqn6XY5NESLB6konFveVvAq+XsJ8Z orkskk9ltmvhgj1H4wIMkSB8EEIZ0tEA9ZaxySQG7eebT8bYbgv2rd1uvZrh3wX3Bo9w VKdOMYeBW25hyVn4uI4YIrc1qEFM6e0+z+A4TioK2Ixv/j7yG0CjgEQcYs+aSkdq9RVC TYeSgx2kZ39E8CWAaRseeL/QAwXbann6N7ta5WKuQzPn+YrvzxSQ5CjTqRslFAoonZb/ gdfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XPgwlUHM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o17-20020a170903301100b001a1c690e190si11917515pla.44.2023.04.05.09.09.08; Wed, 05 Apr 2023 09:09:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XPgwlUHM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S239185AbjDEPvb (ORCPT + 99 others); Wed, 5 Apr 2023 11:51:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239126AbjDEPvK (ORCPT ); Wed, 5 Apr 2023 11:51:10 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C11EBC0 for ; Wed, 5 Apr 2023 08:51:02 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id y15so47236276lfa.7 for ; Wed, 05 Apr 2023 08:51:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680709861; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=1Jq2avB28NPHNddAO0QR7tlYd/NjJsIY90TgGhkA/74=; b=XPgwlUHM18x/KrRkTMpXMslOgHHHIhLSovEDCYrXnK5+JX2o0TqWqrH+lm6NLFf9Gb GKJBLwe6rWefqV+fpoqdhldJ7ZwyY2Y+wFW3+rVTG4O+OMl3LSfcIrMEJ5XGxrSiP8ZW gJwvwQ6cI19pqubUhX4dlrNImaMjHnmBonadP+LpDwtj+9BKffAnbhQAx163wMjqpkOC MchevxkEnb1aKXY4Tn8c2J1MILRyszyC4htIGK1oVxWqQsQGZxpwQGIZv0gFP2hMvoou orF/X5EwxG90GY0Rg2UkcBrBjsIQAbHdk6fhOSh4fVG+Z42V2c/YEA9IRZhWMIiuE8Ng nt+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680709861; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1Jq2avB28NPHNddAO0QR7tlYd/NjJsIY90TgGhkA/74=; b=AtSrLJKV328ETLCLW03FsJWQ7G81X/Ru4d/ucCBhHZZ1FRqBSKzU49PILnACTTRz6s AZCC9GyN06aMHLZwSKDKjXtg9t1rhE3pjxu3e629ZIN8FES+NJju0/Gslcd3JbxktvQ2 tFlSQ9m/dzd1wlk8hZv2MJB0Uxl7Qi9SMxoCyrtzW41WsVXCNFvWbM23VYqlhFcLc9MS cbwV5Ti93x+AI6SxXKdDrkwvdnrBUUJ2whoNds2rss1wTfg4qwyMTGO9Uz/uCG5Tglm4 cIJwhETajFVJPQyLd6kGsYNKyrl4xTQwn+lkuD/XehQDq7twsR4Jxc8Y8rgAvZw0qpsN ogXA== X-Gm-Message-State: AAQBX9fj+aq3+1Sfq6dLJ59h3wFpzdsCVBfUROs+gadS9ESLqDQGD51V C7LC1TqVoY6P08l6XZNvZuZhpg== X-Received: by 2002:a19:ae10:0:b0:4e9:afb3:d56a with SMTP id f16-20020a19ae10000000b004e9afb3d56amr1885235lfc.7.1680709860966; Wed, 05 Apr 2023 08:51:00 -0700 (PDT) Received: from [192.168.1.101] (abxh37.neoplus.adsl.tpnet.pl. [83.9.1.37]) by smtp.gmail.com with ESMTPSA id o28-20020ac2495c000000b004eb2db994e7sm2869344lfi.239.2023.04.05.08.50.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 08:51:00 -0700 (PDT) From: Konrad Dybcio Date: Wed, 05 Apr 2023 17:50:33 +0200 Subject: [PATCH v2 4/5] arm64: dts: qcom: Add initial PM2250 device tree MIME-Version: 1.0 Message-Id: <20230403-topic-rb1_qcm-v2-4-dae06f8830dc@linaro.org> References: <20230403-topic-rb1_qcm-v2-0-dae06f8830dc@linaro.org> In-Reply-To: <20230403-topic-rb1_qcm-v2-0-dae06f8830dc@linaro.org> To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Robert Marko , Das Srinagesh Cc: Bhupesh Sharma , Vladimir Zapolskiy , Marijn Suijten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1680709854; l=2091; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=XmYfveQ8qrj0CLWV3Vu/9OMSY6RU4NB/qR/vQb3iO3s=; b=cR6VOomLQzZGKc6BgTbCdvKPXWiONH+/uNHL6VACgn/+XF2iFq2QOCVRhIib6rje6FFcLTWbhgaa PPWAcf/2CCvUA24LuC1Yt8WSe7AiGl+mhIDSrFXmwj1yYED0k10u X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762353176560044122?= X-GMAIL-MSGID: =?utf-8?q?1762353176560044122?= Introduce an initial device tree for the PM2250 (sometimes known as PM4125) PMIC. Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/pm2250.dtsi | 63 ++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/pm2250.dtsi b/arch/arm64/boot/dts/qcom/pm2250.dtsi new file mode 100644 index 000000000000..5f1d15db5c99 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/pm2250.dtsi @@ -0,0 +1,63 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (c) 2023, Linaro Ltd + */ + +#include +#include +#include +#include + +&spmi_bus { + pmic@0 { + compatible = "qcom,pm2250", "qcom,spmi-pmic"; + reg = <0x0 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + pon@800 { + compatible = "qcom,pm8916-pon"; + reg = <0x800>; + + pm2250_pwrkey: pwrkey { + compatible = "qcom,pm8941-pwrkey"; + interrupts-extended = <&spmi_bus 0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>; + linux,code = ; + debounce = <15625>; + bias-pull-up; + }; + + pm2250_resin: resin { + compatible = "qcom,pm8941-resin"; + interrupts-extended = <&spmi_bus 0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>; + debounce = <15625>; + bias-pull-up; + status = "disabled"; + }; + }; + + rtc@6000 { + compatible = "qcom,pm8941-rtc"; + reg = <0x6000>, <0x6100>; + reg-names = "rtc", "alarm"; + interrupts-extended = <&spmi_bus 0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>; + }; + + pm2250_gpios: gpio@c000 { + compatible = "qcom,pm2250-gpio", "qcom,spmi-gpio"; + reg = <0xc000>; + gpio-controller; + gpio-ranges = <&pm2250_gpios 0 0 10>; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + }; + + pmic@1 { + compatible = "qcom,pm2250", "qcom,spmi-pmic"; + reg = <0x1 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + }; +};