From patchwork Thu Feb 15 20:52:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 773032 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp1037232wre; Thu, 15 Feb 2024 13:00:30 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWgpYUfpSP3PtfFtyXS9Lrczwdof5Qd4tgYyUQV5mnIOqfihEHsm7rygIPD9RAb7b/n8dGlSlSv1S2ylF2Xsz1w X-Google-Smtp-Source: AGHT+IGzQoXRf8crta7Ke+mawHuZOyZJ2IjOVWGCYnLd1OvVDqkeqE+N/U5lpoOSS/nlLBdGCxSN X-Received: by 2002:a17:906:1186:b0:a39:6c07:d31c with SMTP id n6-20020a170906118600b00a396c07d31cmr2131496eja.25.1708030829932; Thu, 15 Feb 2024 13:00:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708030829; cv=none; d=google.com; s=arc-20160816; b=Jl0aFvXbVMeRawJK6i99TNHaMHfIargB19M34rWK23foRfpbCKo7IXVfM15nWIPdVs cVQ2UoLgPEOuWlRuiIz4eJI/Va4A3+M0Kk49y6UDKqdx8LRe/OXeWUDbJze0BPIt6lT5 NSCUEDowECFQqOwL55ccAXGQSbvr9ydnMn/9CiuKiCIE3/CNtAPMo0MNl3TLDd1teFh0 wqoP1qMLnnMb9quBh0B5hYuAdjI65s5KNvxFyvI26keK2GZjfeKbeIfzLxpmHyntkxEp WKSGWwzdLcOplI/kLefHT/HhBL3ncURArjWbTteSNvHOatr7MnAIgkMTOJ/txjvdntWH pRNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=/Pn2CbclRZ2iDH7xRNCYe6hR7Kz1RBtG9UI97nWJtYQ=; fh=8ucVNYl96gyld2fY5tPm9VnoohV6AlTJHSzVsj5Ucw8=; b=NaA6PFE+JBAx5cGLY3EFhiamAZzTOapTTI6uFhOnlnWUFGFsGwGPcJpoPFHIBST1hq qfK+V5h5341qGTZ3Bu/Afn8oVWL26HVFuwfqAyHXEDGzu3IkjOfekcdLgfFI+ulINkuO 8OaZFKKdw+iyKcp3KKzPqUJmD2DiohUKJPIxu1sbtKCY+E2JXTYdUD73dg0cTobIzQKH 1VDBS1h/J1LeuYnhHSCkH1Ivb6ozwjKLoZGKnN8NCfi/CWIv1Jp8LZqxN4016uz0pRBJ BZpMJdNPjPkHWcN2G+xfA64tWPyusHHPVn9/U1HNmmmbdK7CNmLQIJBtPPIpInM5PfeZ GcGA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mp+6HxjS; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id u26-20020a1709064ada00b00a3d12453f11si1010869ejt.522.2024.02.15.13.00.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 13:00:29 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mp+6HxjS; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5AD3D87F15; Thu, 15 Feb 2024 21:54:07 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="mp+6HxjS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DB85287E49; Thu, 15 Feb 2024 21:54:03 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3C7F487E44 for ; Thu, 15 Feb 2024 21:53:01 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=caleb.connolly@linaro.org Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-33cddf4b4b5so960884f8f.0 for ; Thu, 15 Feb 2024 12:53:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708030380; x=1708635180; darn=lists.denx.de; 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=/Pn2CbclRZ2iDH7xRNCYe6hR7Kz1RBtG9UI97nWJtYQ=; b=mp+6HxjSvXCk5V85AvwLGkXgFJiEX2gcYzNfzxmZ3mcYfe4zUj0e/9VWiWcrYoSIRj 5oxv0UTixbHuC5rJz0+iDyzQYALSe5LlqOrJEBAtx5mZhm2vMO1vwxiJrsyygJIFJV3J DiDc7M8BC6AQx7wD+gt3UWvyJe1p+XKfZylH28lWo9tDuNRA+hzaDwoCvjPSIs5W2bgS 8xV20aDhqEyD4SeqmOcLrgwQnj/+l8oiV+Knlq/SO/8LiKWImWTC2yc4z3ihnZIRBmfi PF5lQwwhrbi8araKsIiQAG6464AQETwez/hVjQWjrHQktSuQ+Fh5zxGafbXfEtB/hJYL KlTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708030380; x=1708635180; 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=/Pn2CbclRZ2iDH7xRNCYe6hR7Kz1RBtG9UI97nWJtYQ=; b=QivR0oFB68zJTykJU9chzFIRScIhBbPnTgK6LMwcHkEpdtDbZ+B4naTZbm3J70R/k8 7OGvgsJYyXbuI+ON29UeJlB2QYiigYYQj5Ta6pkj44kDyKfwqIk9r/2h3O5U6KLRiV43 bkX36Nl1eDJP9rTYgECxtS+2ZQGJX96ySavhWK09ZTs1Vhmt8PozlhNXFda3CoeOBVLX jJCB5pDljFCldGER4ltDP5f7hIDwQs8p2MEzhu4w/QEP9tZfCXe+sneB4m4lmm4WL3RI f6WMBlbfINki+YDD2wa4ct3mQRuJLj/fPHVp3ilAYqBs5c9QlcTgtLjjV8i/qSADahs0 ihLw== X-Forwarded-Encrypted: i=1; AJvYcCUEQXc9I9BCbJPGnDTGvd3QFU6LCfzWuVFwLsAbT/Qr3fgLucjJuYSztglCy8XdFO5Otmac560Lbqe9rmMrpjiUsur4cQ== X-Gm-Message-State: AOJu0YxJhkOowzvpMPch84vjUQG54kqnfujJTM+SDlm6PXW0asrd8QZP 7KVljcqfAjlHbjMhymi740r5Ivs6Zspltn6Y+OSyP9yT5cJl5TF8FaV1EGdj5l76LG9UESU9tcj 4 X-Received: by 2002:a5d:49c6:0:b0:33b:6942:df07 with SMTP id t6-20020a5d49c6000000b0033b6942df07mr2006002wrs.21.1708030380441; Thu, 15 Feb 2024 12:53:00 -0800 (PST) Received: from lion.localdomain (host-92-17-96-232.as13285.net. [92.17.96.232]) by smtp.gmail.com with ESMTPSA id e4-20020adfe384000000b0033cfa00e497sm194025wrm.64.2024.02.15.12.52.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 12:52:59 -0800 (PST) From: Caleb Connolly Date: Thu, 15 Feb 2024 20:52:52 +0000 Subject: [PATCH v4 34/39] dts: msm8996: import PMIC dtsi files MIME-Version: 1.0 Message-Id: <20240215-b4-qcom-common-target-v4-34-ed06355c634a@linaro.org> References: <20240215-b4-qcom-common-target-v4-0-ed06355c634a@linaro.org> In-Reply-To: <20240215-b4-qcom-common-target-v4-0-ed06355c634a@linaro.org> To: Neil Armstrong , Sumit Garg , Ramon Fried , Dzmitry Sankouski , Caleb Connolly , Peng Fan , Jaehoon Chung , Rayagonda Kokatanur , Lukasz Majewski , Sean Anderson , Jorge Ramirez-Ortiz , Stephan Gerhold Cc: Marek Vasut , u-boot@lists.denx.de X-Mailer: b4 0.13-dev-4bd13 X-Developer-Signature: v=1; a=openpgp-sha256; l=5871; i=caleb.connolly@linaro.org; h=from:subject:message-id; bh=LeYYoVpYYH96rFUcUGmN4Z1DRV1VtQiFod+6f9MXCNU=; b=owGbwMvMwCFYaeA6f6eBkTjjabUkhtRzle1Zi6NXLa95GfxI7dzTsxu0LOedvLC6MO6xFlf+z B/7FgREdZSyMAhyMMiKKbKIn1hm2bT2sr3G9gUXYOawMoEMYeDiFICJ8LEy/Pc6eUHFcsmFducC g+t8VZVVNZ9uS278Nbfo7+OMMN4/N64w/A9K/dTYFXf/VfnrkKcv/ga/PndqV9Y63qPpJxZcNDU y+PgMAA== X-Developer-Key: i=caleb.connolly@linaro.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Import PM8994 and PMI8994 DTSI files in preparation for switching MSM8996 boards to upstream DTS. Taken from kernel tag v6.7 Reviewed-by: Neil Armstrong Signed-off-by: Caleb Connolly Reviewed-by: Sumit Garg --- arch/arm/dts/pm8994.dtsi | 152 ++++++++++++++++++++++++++++++++++++++++++++++ arch/arm/dts/pmi8994.dtsi | 65 ++++++++++++++++++++ 2 files changed, 217 insertions(+) diff --git a/arch/arm/dts/pm8994.dtsi b/arch/arm/dts/pm8994.dtsi new file mode 100644 index 000000000000..d44a95caf04a --- /dev/null +++ b/arch/arm/dts/pm8994.dtsi @@ -0,0 +1,152 @@ +// SPDX-License-Identifier: GPL-2.0 +#include +#include +#include +#include + +/ { + thermal-zones { + pm8994-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&pm8994_temp>; + + trips { + pm8994_alert0: pm8994-alert0 { + temperature = <95000>; + hysteresis = <2000>; + type = "passive"; + }; + pm8994_crit: pm8994-crit { + temperature = <125000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + }; +}; + +&spmi_bus { + + pmic@0 { + compatible = "qcom,pm8994", "qcom,spmi-pmic"; + reg = <0x0 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + rtc@6000 { + compatible = "qcom,pm8941-rtc"; + reg = <0x6000>, <0x6100>; + reg-names = "rtc", "alarm"; + interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>; + }; + + pm8994_pon: pon@800 { + compatible = "qcom,pm8916-pon"; + reg = <0x800>; + mode-bootloader = <0x2>; + mode-recovery = <0x1>; + + pwrkey { + compatible = "qcom,pm8941-pwrkey"; + interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>; + debounce = <15625>; + bias-pull-up; + linux,code = ; + }; + + pm8994_resin: resin { + compatible = "qcom,pm8941-resin"; + interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>; + debounce = <15625>; + bias-pull-up; + status = "disabled"; + }; + }; + + pm8994_temp: temp-alarm@2400 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0x2400>; + interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>; + io-channels = <&pm8994_vadc VADC_DIE_TEMP>; + io-channel-names = "thermal"; + #thermal-sensor-cells = <0>; + }; + + pm8994_vadc: adc@3100 { + compatible = "qcom,spmi-vadc"; + reg = <0x3100>; + interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; + #address-cells = <1>; + #size-cells = <0>; + #io-channel-cells = <1>; + + channel@7 { + reg = ; + qcom,pre-scaling = <1 3>; + label = "vph_pwr"; + }; + channel@8 { + reg = ; + label = "die_temp"; + }; + channel@9 { + reg = ; + label = "ref_625mv"; + }; + channel@a { + reg = ; + label = "ref_1250mv"; + }; + channel@e { + reg = ; + }; + channel@f { + reg = ; + }; + }; + + pm8994_gpios: gpio@c000 { + compatible = "qcom,pm8994-gpio", "qcom,spmi-gpio"; + reg = <0xc000>; + gpio-controller; + gpio-ranges = <&pm8994_gpios 0 0 22>; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + pm8994_mpps: mpps@a000 { + compatible = "qcom,pm8994-mpp", "qcom,spmi-mpp"; + reg = <0xa000>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pm8994_mpps 0 0 8>; + interrupt-controller; + #interrupt-cells = <2>; + }; + }; + + pmic@1 { + compatible = "qcom,pm8994", "qcom,spmi-pmic"; + reg = <0x1 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + pm8994_lpg: pwm { + compatible = "qcom,pm8994-lpg"; + + #address-cells = <1>; + #size-cells = <0>; + #pwm-cells = <2>; + + status = "disabled"; + }; + + pm8994_spmi_regulators: regulators { + compatible = "qcom,pm8994-regulators"; + }; + }; +}; diff --git a/arch/arm/dts/pmi8994.dtsi b/arch/arm/dts/pmi8994.dtsi new file mode 100644 index 000000000000..36d6a1fb553a --- /dev/null +++ b/arch/arm/dts/pmi8994.dtsi @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-2.0 +#include +#include + +&spmi_bus { + + pmic@2 { + compatible = "qcom,pmi8994", "qcom,spmi-pmic"; + reg = <0x2 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + pmi8994_gpios: gpio@c000 { + compatible = "qcom,pmi8994-gpio", "qcom,spmi-gpio"; + reg = <0xc000>; + gpio-controller; + gpio-ranges = <&pmi8994_gpios 0 0 10>; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + pmi8994_mpps: mpps@a000 { + compatible = "qcom,pmi8994-mpp", "qcom,spmi-mpp"; + reg = <0xa000>; + gpio-controller; + gpio-ranges = <&pmi8994_mpps 0 0 4>; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + }; + + pmic@3 { + compatible = "qcom,pmi8994", "qcom,spmi-pmic"; + reg = <0x3 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + pmi8994_lpg: pwm { + compatible = "qcom,pmi8994-lpg"; + + #address-cells = <1>; + #size-cells = <0>; + #pwm-cells = <2>; + + status = "disabled"; + }; + + pmi8994_spmi_regulators: regulators { + compatible = "qcom,pmi8994-regulators"; + }; + + pmi8994_wled: wled@d800 { + compatible = "qcom,pmi8994-wled"; + reg = <0xd800>, <0xd900>; + interrupts = <0x3 0xd8 0x1 IRQ_TYPE_EDGE_RISING>, + <0x3 0xd8 0x2 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "ovp", "short"; + qcom,cabc; + qcom,external-pfet; + status = "disabled"; + }; + }; +};