From patchwork Tue Dec 19 16:04:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 755931 Delivered-To: patch@linaro.org Received: by 2002:adf:b181:0:b0:336:6142:bf13 with SMTP id q1csp1502366wra; Tue, 19 Dec 2023 08:08:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IF8ek/oAusr3p+yHSQN6/YuTDk8TQ+91M70h4EKZlH6ztWDcLfVz9n1l+5TwBxoP9wsJpA8 X-Received: by 2002:a05:600c:4707:b0:40d:2bef:3f9d with SMTP id v7-20020a05600c470700b0040d2bef3f9dmr587643wmo.99.1703002111654; Tue, 19 Dec 2023 08:08:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703002111; cv=none; d=google.com; s=arc-20160816; b=aqOvc1MfD3MqxGQpbAwpCGS9jMU5oL+11aAF9AAtjLo0yYdEjERWzcUVhdo/1m0htl 8ZGQylFmDRFNMy7bmcFyhCQ2xdIOoC7y/cAiIZM4FdmR+bgv1ypPZkyF8h+b+5nybV9h JcbN0uKxjIfnbDX7qXv/fP0CKEefG/hq6KRKuP32LYvRDXsBk2wGRtaykfF7FpZdTN+h uZWmLQf1QnQgMsp2lI3VRATPOPnfOJOST1L+tMYRBJ3Gt544GDaq4mdIwJovslYaHVcO leKb/WcKecs+SzLi5oVcq4GHisBMBuAcXNIcaqh7RniEKSXNyCveK0eALKYul53gbQuc NKVw== 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=7DlRCcUoEIvW/sNuGC8yavuGq03NoOc9Dcd5RhswoBo=; fh=GB9E9KzRIiNXhkRWIZbZpSMjbCjxnqnvE8nYuQxq8UI=; b=Z70eCROBwcVyOvXRVVRL/+MMV5LQtLy9Bt4WLMaPSmL8ReU2HuFnLxhdh6Mf97T0ka wAu0hUCXm11rXjCkY6SMU4xnZhAAveYt0YXUmUNVsmLXoAdzoHCtrriCj4CZa0qBtgJU TQDcR85Pc8s3YtLBV2WayXyye0YIvGuvHE4+k6LFW9PlDbOH/tvu/P5n2m73eEnEQMio UYhAdmXrXtF/xnb5JlccnQvfXoncpWGOTOKXwCakHL5poLHqkTZahTNjX65AR93VYAZQ W9dfhkadUm4gnFdyQTbxL9uqy5iGnYaEx53mDLq7ZAFxMsAInbpQ3V+5HjLRBCn9pLe/ bpDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="VOJc/MmM"; 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 d7-20020adffd87000000b003365dc7cb6csi3848605wrr.674.2023.12.19.08.08.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 08:08:31 -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="VOJc/MmM"; 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 37C1A87767; Tue, 19 Dec 2023 17:05:17 +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="VOJc/MmM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B18D987767; Tue, 19 Dec 2023 17:05:14 +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-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) (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 C92D18786F for ; Tue, 19 Dec 2023 17:04:48 +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-x131.google.com with SMTP id 2adb3069b0e04-50e3845abdaso3352200e87.3 for ; Tue, 19 Dec 2023 08:04:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703001887; x=1703606687; 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=7DlRCcUoEIvW/sNuGC8yavuGq03NoOc9Dcd5RhswoBo=; b=VOJc/MmMvCcLG+ARuBtRyz8ZKeqHwPRhk/VH2S0T9PPoNaB1OoRvxatFEHor1w2qvG Wiuj7Hqx2bAANaALAxzXvBnFQLcbva/yzK+lG8IVNL8HT2SM0BdA2z7SSpCp+4TGO2T/ nc0hCQNy8I/fMZWF9lMj36471Px9py6l5IxcIJVRvn03XNkMUBjJ9SLU7W4GQV/03x8F idZzVnJFOfReXcNwB6/rA75rlYeWxT3CJ44tuQYJJ/EyY8xtYdD2SBW/U4QKn60CeUXd MRUFP4anBG1tVcyzNqmsIBbP2BtXeNTRHb25DhQGZJk9xc3/zgaD5QBzXEQGqDI79y5T rXrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703001887; x=1703606687; 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=7DlRCcUoEIvW/sNuGC8yavuGq03NoOc9Dcd5RhswoBo=; b=HFytEI+UrSlUMXxZV1RCv0C4VPQYaJ+EvFPMuJB45UaZ9tHRlYxU2pbok1UEkVv0BB ZYDJ8ebEkGaVg1okLnEu1YQ4vZDCEH7IQ4nA8yoke9Ou029ZaX/haLyJz/ewCL4w0/7M LqPAQOKjjJtmwup1UusdKOSOAlmJJE1oRh7efftZJYeHp/EnXhsvSX39vpa71umM2k3r h6kuRBjcCxsIrEFFYVpkzcgSjMwvzL7hNgoCJabHzwrZXkT5OSlwGFtt5fmL7h8FFGer HBgUUZ0xvgCP2zWcLw6QdpswEj4bLhvL7r63LZdCQZa9U3sK1Yox4PiX1LoCSIC3msUD e2zA== X-Gm-Message-State: AOJu0YwzWI+6S3bnExc0mruGAHDMyjJoGjt4tPhHe0ozP2A2XV1R2NPD E4YZQUqLTTJh4Hx/mrh4s9Qukw== X-Received: by 2002:ac2:4e07:0:b0:50e:1943:e8e5 with SMTP id e7-20020ac24e07000000b0050e1943e8e5mr5334641lfr.136.1703001882907; Tue, 19 Dec 2023 08:04:42 -0800 (PST) Received: from lion.localdomain (host-92-17-96-230.as13285.net. [92.17.96.230]) by smtp.gmail.com with ESMTPSA id je17-20020a05600c1f9100b0040d1450ca7esm3429723wmb.7.2023.12.19.08.04.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 08:04:42 -0800 (PST) From: Caleb Connolly Date: Tue, 19 Dec 2023 16:04:21 +0000 Subject: [PATCH v2 20/32] dts: sdm845: import supporting dtsi files MIME-Version: 1.0 Message-Id: <20231219-b4-qcom-common-target-v2-20-b6dd9704219e@linaro.org> References: <20231219-b4-qcom-common-target-v2-0-b6dd9704219e@linaro.org> In-Reply-To: <20231219-b4-qcom-common-target-v2-0-b6dd9704219e@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=8748; i=caleb.connolly@linaro.org; h=from:subject:message-id; bh=kG8ufA5EIYsWeqBixz+7vyGKY02FEtpp3QrG2nnX2eA=; b=owGbwMvMwCFYaeA6f6eBkTjjabUkhtTG/czVgbXbKyXzNh848vL5BOPf0dMq7ntlCe/qOZi48 UVxnmNIRykLgyAHg6yYIov4iWWWTWsv22tsX3ABZg4rE8gQBi5OAZhIvhbDb1bxNx4ZJmkzUo45 xVsv+uSVuynmiJv6A4+j4ia/5/9V82dk6Go23x29Yl99WaiFPBfDRelj3Os8yvcVZrmvVWuOZTl qCwA= 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 6.7-rc3 as well as the common audio codec in preperation for replacing board DTS files with upstream. Signed-off-by: Caleb Connolly Reviewed-by: Neil Armstrong --- 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>; + }; +};