From patchwork Fri Dec 15 00:01:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 754050 Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B602810787 for ; Fri, 15 Dec 2023 00:01:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="NZ2OvACC" Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2c9efa1ab7fso1023181fa.0 for ; Thu, 14 Dec 2023 16:01:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702598475; x=1703203275; darn=vger.kernel.org; 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=yJcFyw95dyU2HKs4SKbZQ9m7j6jYu9nOsOQURiEgmsM=; b=NZ2OvACCogjRaGNCG7dzChxn+d3SAjSfRxtL4bn26R6g7tEBTxCLoxFSimA5i8/5jD CW+6s931oH0I4mAl7N8tpoPTgLkHoZwl9kIsNlRf0BAKr/QKSmOkQiRjTnYFKAFslI0O s/gaRIDE9mlPYbvIGhH0/BIEGjl2gYG0L7ACGpvVTKAXE87ogb1SxcP9OD7YSRytPoOY g41pUzpkLl8g9WdBpWDjhZByOLg66cON7lQoQ3HGwjseegivjXtMau8RVD0qqG+63eMB okv9thr0CdRiKNshyJ7GFZrrxyc9jfc9X6Op3EuxmLv7+NTraWb2L4DQgDDIRZumauUt Sadg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702598475; x=1703203275; 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=yJcFyw95dyU2HKs4SKbZQ9m7j6jYu9nOsOQURiEgmsM=; b=jlj7N1JI754RcQcvXCTUtlrx/R5qFORdj8GxPITfXpdSb3R4CdRpBzKei+wuNthg6x +t41F5OAJRMnWIp6QkUSeD22gpvbOT1Jp41oLAifNBZ4J5BKnJ7Opd+kdIRpXrl+n9EF MmgzwCno7IHhsnctfkEcZoDWrCrPqnsqW6FoB5WxYsaAU2mSrrgWGmZlT8AFw5+1Uf2a jIfQVzCHhBaZwnWayKDOVuWnNjcW06QJZ6BO8VuvrrwD6ZCOltIgf/8a5puAaNvbMSf3 R8Y/Z7MCgd9Dysmu2t/zatf6IhuYQVQZlqPJ0HcyUocvxx65wDU6dSIrdI7Rw7lELdZP iLGQ== X-Gm-Message-State: AOJu0YxCHu59qzOct/9cPSO9SlMnyCmjcBWe3741e3FlUZ7TK7quHiOd h9ae5FZlkiEfjoo4Egojb4OIgCJmTKbFF+Gvgs8plA== X-Google-Smtp-Source: AGHT+IFZZbXp/hoLZhBr+dxql5jwGryui+dSFOYgQD+KdblhhLDCJrClTqcDoVVF/bKSFL1lLnkqIA== X-Received: by 2002:a2e:a26f:0:b0:2cc:202b:11aa with SMTP id k15-20020a2ea26f000000b002cc202b11aamr1741742ljm.206.1702598475429; Thu, 14 Dec 2023 16:01:15 -0800 (PST) Received: from [127.0.1.1] (UNUSED.212-182-62-129.lubman.net.pl. [212.182.62.129]) by smtp.gmail.com with ESMTPSA id v6-20020a2e2f06000000b002c9f939598csm2184518ljv.70.2023.12.14.16.01.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 16:01:15 -0800 (PST) From: Konrad Dybcio Date: Fri, 15 Dec 2023 01:01:08 +0100 Subject: [PATCH 1/3] arm64: dts: qcom: sm6375: Hook up MPM Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20231215-topic-mpm_dt-v1-1-c6636fc75ce3@linaro.org> References: <20231215-topic-mpm_dt-v1-0-c6636fc75ce3@linaro.org> In-Reply-To: <20231215-topic-mpm_dt-v1-0-c6636fc75ce3@linaro.org> To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.13-dev-0438c Add a node for MPM and wire it up on consumers that use it. This also fixes a very bad and sad assumption I made when initially porting this SoC that the downstream MPM-TLMM mappings were 1-1. That apparently changed some time ago, so with this patch the MPM consumers will actually be hooked up to the correct interrupt lines. Fixes: 59d34ca97f91 ("arm64: dts: qcom: Add initial device tree for SM6375") Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm6375.dtsi | 41 ++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm6375.dtsi b/arch/arm64/boot/dts/qcom/sm6375.dtsi index 331bd98dbfde..7ac8bf26dda3 100644 --- a/arch/arm64/boot/dts/qcom/sm6375.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6375.dtsi @@ -311,6 +311,25 @@ scm { }; }; + mpm: interrupt-controller { + compatible = "qcom,mpm"; + qcom,rpm-msg-ram = <&apss_mpm>; + interrupts = ; + mboxes = <&ipcc IPCC_CLIENT_AOP IPCC_MPROC_SIGNAL_SMP2P>; + interrupt-controller; + #interrupt-cells = <2>; + #power-domain-cells = <0>; + interrupt-parent = <&intc>; + qcom,mpm-pin-count = <96>; + qcom,mpm-pin-map = <5 296>, /* Soundwire wake_irq */ + <12 422>, /* DWC3 ss_phy_irq */ + <86 183>, /* MPM wake, SPMI */ + <89 314>, /* TSENS0 0C */ + <90 315>, /* TSENS1 0C */ + <93 164>, /* DWC3 dm_hs_phy_irq */ + <94 165>; /* DWC3 dp_hs_phy_irq */ + }; + memory@80000000 { device_type = "memory"; /* We expect the bootloader to fill in the size */ @@ -486,6 +505,7 @@ CPU_PD7: power-domain-cpu7 { CLUSTER_PD: power-domain-cpu-cluster0 { #power-domain-cells = <0>; + power-domains = <&mpm>; domain-idle-states = <&CLUSTER_SLEEP_0>; }; }; @@ -808,7 +828,7 @@ tlmm: pinctrl@500000 { reg = <0 0x00500000 0 0x800000>; interrupts = ; gpio-ranges = <&tlmm 0 0 157>; - /* TODO: Hook up MPM as wakeup-parent when it's there */ + wakeup-parent = <&mpm>; interrupt-controller; gpio-controller; #interrupt-cells = <2>; @@ -960,7 +980,7 @@ spmi_bus: spmi@1c40000 { <0 0x01c0a000 0 0x26000>; reg-names = "core", "chnls", "obsrvr", "intr", "cnfg"; interrupt-names = "periph_irq"; - interrupts = ; + interrupts-extended = <&mpm 86 IRQ_TYPE_LEVEL_HIGH>; qcom,ee = <0>; qcom,channel = <0>; #address-cells = <2>; @@ -992,8 +1012,15 @@ tsens1: thermal-sensor@4413000 { }; rpm_msg_ram: sram@45f0000 { - compatible = "qcom,rpm-msg-ram"; + compatible = "qcom,rpm-msg-ram", "mmio-sram"; reg = <0 0x045f0000 0 0x7000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x0 0x045f0000 0x7000>; + + apss_mpm: sram@1b8 { + reg = <0x1b8 0x48>; + }; }; sram@4690000 { @@ -1403,10 +1430,10 @@ usb_1: usb@4ef8800 { <&gcc GCC_USB30_PRIM_MASTER_CLK>; assigned-clock-rates = <19200000>, <133333333>; - interrupts = , - , - , - ; + interrupts-extended = <&intc GIC_SPI 302 IRQ_TYPE_LEVEL_HIGH>, + <&mpm 12 IRQ_TYPE_LEVEL_HIGH>, + <&mpm 93 IRQ_TYPE_EDGE_BOTH>, + <&mpm 94 IRQ_TYPE_EDGE_BOTH>; interrupt-names = "hs_phy_irq", "ss_phy_irq", "dm_hs_phy_irq", From patchwork Fri Dec 15 00:01:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 754531 Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E3891BDD3 for ; Fri, 15 Dec 2023 00:01:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="G1E+NnNx" Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2cc3facf0c0so842771fa.0 for ; Thu, 14 Dec 2023 16:01:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702598477; x=1703203277; darn=vger.kernel.org; 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=2lGhZrUhVazmXqa8F42tLFaEnXfVDDi1b+3+IHxb9zY=; b=G1E+NnNxtO57smK8lwtTFP70KR2V3Jcr3Qy1mefArNfTs0mu+w4OMhwJ6xNOud7qmw T69zx2M6D0e2sigIrHw1O1OiFcUpHoQ3UpdJ2kCRClsu9c/YhPhUbOoSjGQjWNPSV6NB 5RTflhoPjTfDtBtAdcswWDrDiqTlq9lwOt07AZSWxHQa1T0KASHknum8asmjotEMC69s 4fEmeQqKZno45Z3dMdV/6McMizo314JMEz1FZtJjMungFLk8wj4fLezqH60AOldklQm0 yeOou/dNrLbXRTJL+e8FBMUNTePmQ+jqHxUCB8LLO1SjtGQ/XxmqqGKuKFpWgm5/QnTV jCWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702598477; x=1703203277; 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=2lGhZrUhVazmXqa8F42tLFaEnXfVDDi1b+3+IHxb9zY=; b=MRDyIQ1WJGLd28K9mTdmElMAGhqcnRoqOlISrvTNBhO/dZ9CNT2jQKy0q6tDvTifRW WWIx786fGQNzMWG+s6/Jj7J8roQDz4ovdAnqdWEg3fjaFYUQ2VMDQaq4m90ADMd4X9Wb m84hH5DGy7fdNtCInU2/hra1ppwSbSrsAIKkDvYMGR6TJE7Zh1Tcmfl2kgJuXyNXmnwi VYdbb6xUfhEDGrDxiqAPY/PYU7loGclF71zXpu/oG4kAXfIKUsY1SMXuNUDJOBdTMpn0 vdh1PVvCrI1xGRvc988MXUCcDpb7Rz/oX+330zNnW2TXajiGoIRZ00OWq34mOHR1qqM5 71PQ== X-Gm-Message-State: AOJu0YypQERRlVfAM3tKNxvJiNYHPUA7eoU8IftyYmopEQS17eWacIUe c5EHiakFxTDCcXB81XCtNH2oVIhUkib7/O39vZTQgw== X-Google-Smtp-Source: AGHT+IF3wspDpRFDamizOwIZkKCYntjaRgb3QV1L4zzDeXmgJdkZgcq+xw+AWJvAuXyZ+RXM2tHb2Q== X-Received: by 2002:a05:651c:2220:b0:2c9:f87e:deea with SMTP id y32-20020a05651c222000b002c9f87edeeamr7187593ljq.9.1702598477337; Thu, 14 Dec 2023 16:01:17 -0800 (PST) Received: from [127.0.1.1] (UNUSED.212-182-62-129.lubman.net.pl. [212.182.62.129]) by smtp.gmail.com with ESMTPSA id v6-20020a2e2f06000000b002c9f939598csm2184518ljv.70.2023.12.14.16.01.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 16:01:16 -0800 (PST) From: Konrad Dybcio Date: Fri, 15 Dec 2023 01:01:09 +0100 Subject: [PATCH 2/3] arm64: dts: qcom: msm8996: Hook up MPM Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20231215-topic-mpm_dt-v1-2-c6636fc75ce3@linaro.org> References: <20231215-topic-mpm_dt-v1-0-c6636fc75ce3@linaro.org> In-Reply-To: <20231215-topic-mpm_dt-v1-0-c6636fc75ce3@linaro.org> To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.13-dev-0438c Wire up MPM and the interrupts it provides. Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 39 +++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi index 35a0d2a69711..11e3fe4f342f 100644 --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi @@ -444,6 +444,25 @@ memory@80000000 { reg = <0x0 0x80000000 0x0 0x0>; }; + mpm: interrupt-controller { + compatible = "qcom,mpm"; + qcom,rpm-msg-ram = <&apss_mpm>; + interrupts = ; + mboxes = <&apcs_glb 1>; + interrupt-controller; + #interrupt-cells = <2>; + #power-domain-cells = <0>; + interrupt-parent = <&intc>; + qcom,mpm-pin-count = <96>; + qcom,mpm-pin-map = <2 184>, /* TSENS1 upper_lower_int */ + <52 243>, /* DWC3_PRI ss_phy_irq */ + <79 347>, /* DWC3_PRI hs_phy_irq */ + <80 352>, /* DWC3_SEC hs_phy_irq */ + <81 347>, /* QUSB2_PHY_PRI DP+DM */ + <82 352>, /* QUSB2_PHY_SEC DP+DM */ + <87 326>; /* SPMI */ + }; + psci { compatible = "arm,psci-1.0"; method = "smc"; @@ -733,8 +752,15 @@ pciephy_2: phy@3000 { }; rpm_msg_ram: sram@68000 { - compatible = "qcom,rpm-msg-ram"; + compatible = "qcom,rpm-msg-ram", "mmio-sram"; reg = <0x00068000 0x6000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x00068000 0x7000>; + + apss_mpm: sram@1b8 { + reg = <0x1b8 0x48>; + }; }; qfprom@74000 { @@ -820,8 +846,8 @@ tsens1: thermal-sensor@4ad000 { reg = <0x004ad000 0x1000>, /* TM */ <0x004ac000 0x1000>; /* SROT */ #qcom,sensors = <8>; - interrupts = , - ; + interrupts-extended = <&mpm 2 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "uplow", "critical"; #thermal-sensor-cells = <1>; }; @@ -1343,6 +1369,7 @@ tlmm: pinctrl@1010000 { interrupts = ; gpio-controller; gpio-ranges = <&tlmm 0 0 150>; + wakeup-parent = <&mpm>; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; @@ -1870,7 +1897,7 @@ spmi_bus: spmi@400f000 { <0x0400a000 0x002100>; reg-names = "core", "chnls", "obsrvr", "intr", "cnfg"; interrupt-names = "periph_irq"; - interrupts = ; + interrupts-extended = <&mpm 87 IRQ_TYPE_LEVEL_HIGH>; qcom,ee = <0>; qcom,channel = <0>; #address-cells = <2>; @@ -3026,8 +3053,8 @@ usb3: usb@6af8800 { #size-cells = <1>; ranges; - interrupts = , - ; + interrupts-extended = <&mpm 79 IRQ_TYPE_LEVEL_HIGH>, + <&mpm 52 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "hs_phy_irq", "ss_phy_irq"; clocks = <&gcc GCC_SYS_NOC_USB3_AXI_CLK>, From patchwork Fri Dec 15 00:01:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 754049 Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 65C3614290 for ; Fri, 15 Dec 2023 00:01:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="VoUPVUuS" Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-2c9f4bb2e5eso960841fa.1 for ; Thu, 14 Dec 2023 16:01:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702598479; x=1703203279; darn=vger.kernel.org; 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=DvYIncA4M4SGSh5JTnjhgY5sZtR0+qJcMKUor4G9V+0=; b=VoUPVUuSDhXbqWVprsKVMVdwCM9dTgMUGB1hhWaOl/xM76oroa/KHCkpw4qj18dyFC 7jpoYLNBYOvBfNiqrsaXR7nyqfFMFKByikiWqbqFns64o1lPVj5wJeCP84ax41OArm6P alQ0rrBSBfOBHBzCA7bCnw5nhnnFsGmE0pAlAm11CKxmV0l7a4AAoDzwirZD4WNcAyEW 3c+RXxwWj9hTVI0EgCBz5sUZz7tvbPEpJEjIbTpwMW/jS+zso6J9FLD6b2e3BONEn26i NOeXDs50TRW4F/3yUgbvauTKyTehq5zJIZ/dqLs0n5TszErAKDlJzqGfjWu0lsNESN4h fMMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702598479; x=1703203279; 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=DvYIncA4M4SGSh5JTnjhgY5sZtR0+qJcMKUor4G9V+0=; b=DCh1/gR+E0xywziV/+tUEenme93TZ7GkvmjSA6ADJ1z/pH4AOcJ716NhPLgLf+aES6 U27FnUcouZoL7RA3VdRbGm974x0bLQjVE04pFU0fsGtfczSUGE4Rm3caPRDZP0ltXILZ Ob3KrufmiEOwlyFpqNXFoxjGbsrOOqZyM4JmZ85pUiK+zsJuV0IuYP62V2uC7SuoEYVa IjRQmIa5YH0a28dD1jUce9o1WzWDWtWFBYtIWNUdD9bkQ4ftaHYp0b/5cMfgt2XluPqm fw0Rm+Sr+pgPsepe9qtt1klfuPBxnicxoqC7ZarN7CQmN2G0D99tgCl7UsOMsmmLbKyK XqdQ== X-Gm-Message-State: AOJu0YyUez/SOrUMXtbDTpW5QtY39C3Kz5C93K6Y6Btc8ZaUS1VShuZL xtTIHcedbGr3WIKCg0Hco3IpyFvKpSsr80AyknPcxQ== X-Google-Smtp-Source: AGHT+IFAHnBdYUR0+GTVfwY42CyzywNVvhh2x5WnkY31cQX8R3pIf0jwI2wauK1oBewOAmIJsg3csQ== X-Received: by 2002:a05:651c:220b:b0:2cc:304d:c3ee with SMTP id y11-20020a05651c220b00b002cc304dc3eemr2847351ljq.67.1702598479156; Thu, 14 Dec 2023 16:01:19 -0800 (PST) Received: from [127.0.1.1] (UNUSED.212-182-62-129.lubman.net.pl. [212.182.62.129]) by smtp.gmail.com with ESMTPSA id v6-20020a2e2f06000000b002c9f939598csm2184518ljv.70.2023.12.14.16.01.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 16:01:18 -0800 (PST) From: Konrad Dybcio Date: Fri, 15 Dec 2023 01:01:10 +0100 Subject: [PATCH 3/3] arm64: dts: qcom: qcm2290: Hook up MPM Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20231215-topic-mpm_dt-v1-3-c6636fc75ce3@linaro.org> References: <20231215-topic-mpm_dt-v1-0-c6636fc75ce3@linaro.org> In-Reply-To: <20231215-topic-mpm_dt-v1-0-c6636fc75ce3@linaro.org> To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.13-dev-0438c Wire up MPM and the interrupts it provides. Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/qcm2290.dtsi | 42 +++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/qcm2290.dtsi b/arch/arm64/boot/dts/qcom/qcm2290.dtsi index ce04d0acdede..0911fb08ed63 100644 --- a/arch/arm64/boot/dts/qcom/qcm2290.dtsi +++ b/arch/arm64/boot/dts/qcom/qcm2290.dtsi @@ -199,6 +199,7 @@ CPU_PD3: power-domain-cpu3 { CLUSTER_PD: power-domain-cpu-cluster { #power-domain-cells = <0>; + power-domains = <&mpm>; domain-idle-states = <&CLUSTER_SLEEP>; }; }; @@ -266,6 +267,24 @@ rpmpd_opp_turbo_plus: opp8 { }; }; }; + + mpm: interrupt-controller { + compatible = "qcom,mpm"; + qcom,rpm-msg-ram = <&apss_mpm>; + interrupts = ; + mboxes = <&apcs_glb 1>; + interrupt-controller; + #interrupt-cells = <2>; + #power-domain-cells = <0>; + interrupt-parent = <&intc>; + qcom,mpm-pin-count = <96>; + qcom,mpm-pin-map = <2 275>, /* TSENS0 uplow */ + <5 296>, /* Soundwire master_irq */ + <12 422>, /* DWC3 ss_phy_irq */ + <24 79>, /* Soundwire wake_irq */ + <86 183>, /* MPM wake, SPMI */ + <90 260>; /* QUSB2_PHY DP+DM */ + }; }; reserved_memory: reserved-memory { @@ -429,6 +448,7 @@ tlmm: pinctrl@500000 { interrupts = ; gpio-controller; gpio-ranges = <&tlmm 0 0 127>; + wakeup-parent = <&mpm>; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; @@ -778,7 +798,7 @@ spmi_bus: spmi@1c40000 { "obsrvr", "intr", "cnfg"; - interrupts = ; + interrupts-extended = <&mpm 86 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "periph_irq"; qcom,ee = <0>; qcom,channel = <0>; @@ -793,8 +813,8 @@ tsens0: thermal-sensor@4411000 { reg = <0x0 0x04411000 0x0 0x1ff>, <0x0 0x04410000 0x0 0x8>; #qcom,sensors = <10>; - interrupts = , - ; + interrupts-extended = <&mpm 2 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "uplow", "critical"; #thermal-sensor-cells = <1>; }; @@ -813,8 +833,15 @@ bimc: interconnect@4480000 { }; rpm_msg_ram: sram@45f0000 { - compatible = "qcom,rpm-msg-ram"; + compatible = "qcom,rpm-msg-ram", "mmio-sram"; reg = <0x0 0x045f0000 0x0 0x7000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x0 0x045f0000 0x7000>; + + apss_mpm: sram@1b8 { + reg = <0x1b8 0x48>; + }; }; sram@4690000 { @@ -1293,9 +1320,10 @@ &qup_virt SLAVE_QUP_CORE_0 RPM_ALWAYS_TAG>, usb: usb@4ef8800 { compatible = "qcom,qcm2290-dwc3", "qcom,dwc3"; reg = <0x0 0x04ef8800 0x0 0x400>; - interrupts = , - ; - interrupt-names = "hs_phy_irq", "ss_phy_irq"; + interrupts-extended = <&intc GIC_SPI 260 IRQ_TYPE_LEVEL_HIGH>, + <&mpm 12 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "hs_phy_irq", + "ss_phy_irq"; clocks = <&gcc GCC_CFG_NOC_USB3_PRIM_AXI_CLK>, <&gcc GCC_USB30_PRIM_MASTER_CLK>,