From patchwork Tue Jan 30 14:05:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 768086 Delivered-To: patch@linaro.org Received: by 2002:adf:ee41:0:b0:33a:e5bd:fedd with SMTP id w1csp1387740wro; Tue, 30 Jan 2024 06:09:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IGfjwmQNJBaZYuTBBFXxbWt0PdeDcQEgYVCjFrKgQABzk9/Qf9b0WqhlxUBgSfy2pX+eMUP X-Received: by 2002:adf:f407:0:b0:33a:ef43:40fb with SMTP id g7-20020adff407000000b0033aef4340fbmr4534589wro.36.1706623791055; Tue, 30 Jan 2024 06:09:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706623791; cv=none; d=google.com; s=arc-20160816; b=mjk4B5/GePFHyuvp4MS8psRkXaUZlhj79s4EAzfDkYdJ7hILpRPYiuvNFBYpu/mZkq D9EZ6DI/A04UgPpUosQF8eU9WZidla0Hd/HFYq2czhB2f7JiM7AnTe+n0xuoU7JP+peq JLEF7Ja7YarNmF4PEqg/A4+zKV3b2UMolvgzLaE5ZGmKG+EtS6S1YUQsKiLGux47xbd5 Q1NwsyKfLyZJXyHTUJuxUUmDvSzGbKGU40i59wXl6FfZjLEMeGuFxxCv2HRtknFkt4GB 4NpOWux3J/SQ/FXVSKRMZFUZiQBTYLSwKDA8ZRrsC+PZb5nFidiRvXj8UT84f388TBth +bRw== 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=66yU70ECYdCMS9kTRM+DZegJUAioLFAJ+53XUo6yhRY=; fh=GB9E9KzRIiNXhkRWIZbZpSMjbCjxnqnvE8nYuQxq8UI=; b=JpoxyXA3SxP4X0K1jC4Y3SP/6vMyMqYcjIw+ltjzf+N2q32UNH35Lzi7Ps+ux1QhE/ son6naBfVHwEKSVQ2dJJdbn0I5mP2RYKymStNvvOYTqwgqMkNeRC0CDB9BvEGECV1zGl KpJaZMuTN9zz3MIQqld0DIOByKK2SquOlF8J1LlNTNa3pVY7r3LsL7T0BPJcydDF89er 183Y1HhnLd4BeU0sL5t5pmJgfQOdN0pnMueoEYFezYLiVAxPc1d/abWvA9Mm0u7sDeMr tGRokfeWIOOMInRbd3SkIrtfFuwQxj0+pXuz6ZIGZvQ9jxZ0trDrPT0U0cSFccbjuf72 ex/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AanB4pxY; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id w8-20020a5d4b48000000b0033ae6a16d33si3588532wrs.42.2024.01.30.06.09.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 06:09:51 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AanB4pxY; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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 C533087E02; Tue, 30 Jan 2024 15:05:50 +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="AanB4pxY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DB39887E4D; Tue, 30 Jan 2024 15:05:47 +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=unavailable autolearn_force=no version=3.4.2 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) (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 2490C87E02 for ; Tue, 30 Jan 2024 15:05:34 +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-lf1-x12a.google.com with SMTP id 2adb3069b0e04-51109060d6aso3592333e87.2 for ; Tue, 30 Jan 2024 06:05:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706623533; x=1707228333; 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=66yU70ECYdCMS9kTRM+DZegJUAioLFAJ+53XUo6yhRY=; b=AanB4pxY0lPftxXLLRYig/OCJb38JwY7og0ESmxYovr5YyMZWWVkZPGul53hvnJKLa oFRFVhr3hb+I2Gk0aFvvyYPwdXGLFf5nbBs+BEX1n1Mu3TCYdRUDAv7Qu09qv7sgg4e6 chwzQUblK1PPt41DzP/TKqsu6BroKs4hzvIKlUO7r63m3ZQgXr9dzX4sLpGD/vMmRK9b Dy2bk+tzQhtt9pwBNYJDLeTG4QRCznP4IrUdACL8Kg3jZ3vC7YrUga6R8wBrRCWW9Ofb dat9wnf1NGPxagpB/DweiQYH4VjJm8cKmiWsSRuvHNe/PylnwbTSMnYevBY5yh23CDXn qiAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706623533; x=1707228333; 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=66yU70ECYdCMS9kTRM+DZegJUAioLFAJ+53XUo6yhRY=; b=bOihDoVwxR1yoSCYrSXxR8qpMfC9q740KMC2cWeHxlk+/fZFl3FTWWMz9vki7SP13Q 9LZO+6ldlA77K0n03ngksZlMHdDvZj/jf0lxegb9ud3f4s1FcTCubBF3ZBmUtOs4rboN GMt6xrp+Yv55iMVbuguulrkPSmEI4OhBA+uHVFToZ4g+ZeekSXjV2bpOOEeweFImGD29 zrxvng2RgSnDRb6HrJIEwVqvtKrjYZkNYLkr83n1BCGaQlCxzsJzbIgosdi34Z1hhhHe rVKhRgG8NnxJUHNrA73Fyy/i8Br8PKg25f3yWY+Lk0iap1wLRmwn5HTfeuXqQHNfZppE m48A== X-Gm-Message-State: AOJu0YzI0/E5bgTAm0ZUYJBXJ0QqEdLgJD4m9SaLx0lGaf15fTYTpVi5 YGburme1+PCeXypxk26Tn3LjFL/wCNqcpbHXto9JQpPLefYfoZt8Rq+8JFwnGyI= X-Received: by 2002:ac2:4342:0:b0:510:67c:34f3 with SMTP id o2-20020ac24342000000b00510067c34f3mr5754392lfl.35.1706623533476; Tue, 30 Jan 2024 06:05:33 -0800 (PST) Received: from lion.localdomain (host-92-17-96-232.as13285.net. [92.17.96.232]) by smtp.gmail.com with ESMTPSA id g11-20020a05600c310b00b0040f035bebfcsm1799017wmo.12.2024.01.30.06.05.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 06:05:32 -0800 (PST) From: Caleb Connolly Date: Tue, 30 Jan 2024 14:05:11 +0000 Subject: [PATCH v3 23/36] dts: sdm845: import supporting dtsi files MIME-Version: 1.0 Message-Id: <20240130-b4-qcom-common-target-v3-23-e523cbf9e556@linaro.org> References: <20240130-b4-qcom-common-target-v3-0-e523cbf9e556@linaro.org> In-Reply-To: <20240130-b4-qcom-common-target-v3-0-e523cbf9e556@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=8827; i=caleb.connolly@linaro.org; h=from:subject:message-id; bh=3bYFKM87oLd/f/MZ3LQPbzItpEfkLE2krkkUkCoZWKk=; b=owGbwMvMwCFYaeA6f6eBkTjjabUkhtSdTIInT8+efZCfKdU++Mphm228SquLOypma5dbrLtzc ve8oGMNHaUsDIIcDLJiiiziJ5ZZNq29bK+xfcEFmDmsTCBDGLg4BWAivHYM/8wssuZ1uW4xjF0/ X+Jdx5kDz7Xmv7euW/aON0pg586FB64zMsxVDnOdsrws8/AvBh7tlczVYkvXbJ4yXyTxY7of54V nzhcB 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 the PM8998 and PMI8998 PMIC DTSI files from Linux as well as the common audio codec in preperation for replacing board DTS files with upstream. Taken from kernel tag v6.7 Reviewed-by: Neil Armstrong Signed-off-by: Caleb Connolly --- arch/arm/dts/pm8998.dtsi | 130 +++++++++++++++++++++++++++++++++++++++ arch/arm/dts/pmi8998.dtsi | 98 +++++++++++++++++++++++++++++ arch/arm/dts/sdm845-wcd9340.dtsi | 86 ++++++++++++++++++++++++++ 3 files changed, 314 insertions(+) diff --git a/arch/arm/dts/pm8998.dtsi b/arch/arm/dts/pm8998.dtsi new file mode 100644 index 000000000000..3f82715392c6 --- /dev/null +++ b/arch/arm/dts/pm8998.dtsi @@ -0,0 +1,130 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* Copyright 2018 Google LLC. */ + +#include +#include +#include +#include +#include + +/ { + thermal-zones { + pm8998-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&pm8998_temp>; + + trips { + pm8998_alert0: pm8998-alert0 { + temperature = <105000>; + hysteresis = <2000>; + type = "passive"; + }; + pm8998_crit: pm8998-crit { + temperature = <125000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + }; +}; + +&spmi_bus { + pm8998_lsid0: pmic@0 { + compatible = "qcom,pm8998", "qcom,spmi-pmic"; + reg = <0x0 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + pm8998_pon: pon@800 { + compatible = "qcom,pm8998-pon"; + + reg = <0x800>; + mode-bootloader = <0x2>; + mode-recovery = <0x1>; + + pm8998_pwrkey: pwrkey { + compatible = "qcom,pm8941-pwrkey"; + interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>; + debounce = <15625>; + bias-pull-up; + linux,code = ; + }; + + pm8998_resin: resin { + compatible = "qcom,pm8941-resin"; + interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>; + debounce = <15625>; + bias-pull-up; + status = "disabled"; + }; + }; + + pm8998_temp: temp-alarm@2400 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0x2400>; + interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>; + io-channels = <&pm8998_adc ADC5_DIE_TEMP>; + io-channel-names = "thermal"; + #thermal-sensor-cells = <0>; + }; + + pm8998_coincell: charger@2800 { + compatible = "qcom,pm8998-coincell", "qcom,pm8941-coincell"; + reg = <0x2800>; + + status = "disabled"; + }; + + pm8998_adc: adc@3100 { + compatible = "qcom,spmi-adc-rev2"; + reg = <0x3100>; + interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; + #address-cells = <1>; + #size-cells = <0>; + #io-channel-cells = <1>; + + channel@6 { + reg = ; + label = "die_temp"; + }; + }; + + pm8998_adc_tm: adc-tm@3400 { + compatible = "qcom,spmi-adc-tm-hc"; + reg = <0x3400>; + interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>; + #thermal-sensor-cells = <1>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + rtc@6000 { + compatible = "qcom,pm8941-rtc"; + reg = <0x6000>, <0x6100>; + reg-names = "rtc", "alarm"; + interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>; + }; + + pm8998_gpios: gpio@c000 { + compatible = "qcom,pm8998-gpio", "qcom,spmi-gpio"; + reg = <0xc000>; + gpio-controller; + gpio-ranges = <&pm8998_gpios 0 0 26>; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + }; + + pm8998_lsid1: pmic@1 { + compatible = "qcom,pm8998", "qcom,spmi-pmic"; + reg = <0x1 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + }; +}; diff --git a/arch/arm/dts/pmi8998.dtsi b/arch/arm/dts/pmi8998.dtsi new file mode 100644 index 000000000000..cd3f0790fd42 --- /dev/null +++ b/arch/arm/dts/pmi8998.dtsi @@ -0,0 +1,98 @@ +// SPDX-License-Identifier: GPL-2.0 +#include +#include + +&spmi_bus { + pmi8998_lsid0: pmic@2 { + compatible = "qcom,pmi8998", "qcom,spmi-pmic"; + reg = <0x2 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + pmi8998_charger: charger@1000 { + compatible = "qcom,pmi8998-charger"; + reg = <0x1000>; + + interrupts = <0x2 0x13 0x4 IRQ_TYPE_EDGE_BOTH>, + <0x2 0x12 0x2 IRQ_TYPE_EDGE_BOTH>, + <0x2 0x16 0x1 IRQ_TYPE_EDGE_RISING>, + <0x2 0x13 0x6 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "usb-plugin", + "bat-ov", + "wdog-bark", + "usbin-icl-change"; + + io-channels = <&pmi8998_rradc 3>, + <&pmi8998_rradc 4>; + io-channel-names = "usbin_i", "usbin_v"; + + status = "disabled"; + }; + + pmi8998_gpios: gpio@c000 { + compatible = "qcom,pmi8998-gpio", "qcom,spmi-gpio"; + reg = <0xc000>; + gpio-controller; + gpio-ranges = <&pmi8998_gpios 0 0 14>; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + pmi8998_rradc: adc@4500 { + compatible = "qcom,pmi8998-rradc"; + reg = <0x4500>; + #io-channel-cells = <1>; + }; + }; + + pmi8998_lsid1: pmic@3 { + compatible = "qcom,pmi8998", "qcom,spmi-pmic"; + reg = <0x3 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + labibb { + compatible = "qcom,pmi8998-lab-ibb"; + + ibb: ibb { + interrupts = <0x3 0xdc 0x2 IRQ_TYPE_EDGE_RISING>, + <0x3 0xdc 0x0 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "sc-err", "ocp"; + }; + + lab: lab { + interrupts = <0x3 0xde 0x1 IRQ_TYPE_EDGE_RISING>, + <0x3 0xde 0x0 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "sc-err", "ocp"; + }; + }; + + pmi8998_lpg: pwm { + compatible = "qcom,pmi8998-lpg"; + + #address-cells = <1>; + #size-cells = <0>; + #pwm-cells = <2>; + + status = "disabled"; + }; + + pmi8998_flash: led-controller@d300 { + compatible = "qcom,pmi8998-flash-led", "qcom,spmi-flash-led"; + reg = <0xd300>; + status = "disabled"; + }; + + pmi8998_wled: leds@d800 { + compatible = "qcom,pmi8998-wled"; + reg = <0xd800>, <0xd900>; + interrupts = <0x3 0xd8 0x1 IRQ_TYPE_EDGE_RISING>, + <0x3 0xd8 0x2 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "ovp", "short"; + label = "backlight"; + + status = "disabled"; + }; + }; +}; diff --git a/arch/arm/dts/sdm845-wcd9340.dtsi b/arch/arm/dts/sdm845-wcd9340.dtsi new file mode 100644 index 000000000000..c15d48860646 --- /dev/null +++ b/arch/arm/dts/sdm845-wcd9340.dtsi @@ -0,0 +1,86 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * SDM845 SoC device tree source + * + * Copyright (c) 2018, The Linux Foundation. All rights reserved. + */ + +&slim { + status = "okay"; + + slim@1 { + reg = <1>; + #address-cells = <2>; + #size-cells = <0>; + + wcd9340_ifd: ifd@0,0 { + compatible = "slim217,250"; + reg = <0 0>; + }; + + wcd9340: codec@1,0 { + compatible = "slim217,250"; + reg = <1 0>; + slim-ifc-dev = <&wcd9340_ifd>; + + #sound-dai-cells = <1>; + + interrupts-extended = <&tlmm 54 IRQ_TYPE_LEVEL_HIGH>; + interrupt-controller; + #interrupt-cells = <1>; + + clock-names = "extclk"; + clocks = <&rpmhcc RPMH_LN_BB_CLK2>; + + #clock-cells = <0>; + clock-frequency = <9600000>; + clock-output-names = "mclk"; + + pinctrl-0 = <&wcd_intr_default>; + pinctrl-names = "default"; + + qcom,micbias1-microvolt = <1800000>; + qcom,micbias2-microvolt = <1800000>; + qcom,micbias3-microvolt = <1800000>; + qcom,micbias4-microvolt = <1800000>; + + #address-cells = <1>; + #size-cells = <1>; + + wcdgpio: gpio-controller@42 { + compatible = "qcom,wcd9340-gpio"; + gpio-controller; + #gpio-cells = <2>; + reg = <0x42 0x2>; + }; + + swm: swm@c85 { + compatible = "qcom,soundwire-v1.3.0"; + reg = <0xc85 0x40>; + interrupts-extended = <&wcd9340 20>; + + qcom,dout-ports = <6>; + qcom,din-ports = <2>; + qcom,ports-sinterval-low = /bits/ 8 <0x07 0x1f 0x3f 0x7 0x1f 0x3f 0x0f 0x0f>; + qcom,ports-offset1 = /bits/ 8 <0x01 0x02 0x0c 0x6 0x12 0x0d 0x07 0x0a>; + qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x1f 0x00 0x00 0x1f 0x00 0x00>; + + #sound-dai-cells = <1>; + clocks = <&wcd9340>; + clock-names = "iface"; + #address-cells = <2>; + #size-cells = <0>; + }; + }; + }; +}; + +&tlmm { + wcd_intr_default: wcd-intr-default-state { + pins = "gpio54"; + function = "gpio"; + + bias-pull-down; + drive-strength = <2>; + }; +};