From patchwork Fri Jan 20 16:10:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dwivedi, Avaneesh Kumar (avani)" X-Patchwork-Id: 9528899 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 167AF601AE for ; Fri, 20 Jan 2017 16:10:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 09B9828687 for ; Fri, 20 Jan 2017 16:10:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F2B49286B4; Fri, 20 Jan 2017 16:10:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 175F928687 for ; Fri, 20 Jan 2017 16:10:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752738AbdATQKy (ORCPT ); Fri, 20 Jan 2017 11:10:54 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:45470 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752373AbdATQKx (ORCPT ); Fri, 20 Jan 2017 11:10:53 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id CBC2760866; Fri, 20 Jan 2017 16:10:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1484928652; bh=tFpwHjLbMnIs7fa2xC7cVmx+u6KyzgHosRp7QLnzw8g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oKXyqXJ0uDjM5c/SP9OqO1y8piO12DmARqt7W+/Zz5vyB/JSCw/7cPq8xKd019+ZE KtujZ05yRtVPtiuyCXrovMTkCqJ11Lgp7iX84n4OkzlHXYllSNQSkT2T5lMhW8L5AS Slx3zgjtgpY/urUbKzoN3o2FkaCf1lkPmUBSbX2Y= Received: from akdwived-linux.qualcomm.com (unknown [202.46.23.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: akdwived@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 0ED5B60819; Fri, 20 Jan 2017 16:10:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1484928652; bh=tFpwHjLbMnIs7fa2xC7cVmx+u6KyzgHosRp7QLnzw8g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oKXyqXJ0uDjM5c/SP9OqO1y8piO12DmARqt7W+/Zz5vyB/JSCw/7cPq8xKd019+ZE KtujZ05yRtVPtiuyCXrovMTkCqJ11Lgp7iX84n4OkzlHXYllSNQSkT2T5lMhW8L5AS Slx3zgjtgpY/urUbKzoN3o2FkaCf1lkPmUBSbX2Y= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 0ED5B60819 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=akdwived@codeaurora.org From: Avaneesh Kumar Dwivedi To: bjorn.andersson@linaro.org Cc: sboyd@codeaurora.org, agross@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, Avaneesh Kumar Dwivedi Subject: [RFC PATCH v2 2/3] remoteproc: qcom: Add slpi boot support in adsp rproc driver. Date: Fri, 20 Jan 2017 21:40:35 +0530 Message-Id: <1484928636-27351-3-git-send-email-akdwived@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1484928636-27351-1-git-send-email-akdwived@codeaurora.org> References: <1484928636-27351-1-git-send-email-akdwived@codeaurora.org> Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch add support to boot slpi processor in existing adsp rproc driver. Resource differentitation is done based on compatible string. Signed-off-by: Avaneesh Kumar Dwivedi --- .../devicetree/bindings/remoteproc/qcom,adsp.txt | 29 ++++++++++++++++++++++ drivers/remoteproc/qcom_adsp_pil.c | 23 +++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,adsp.txt b/Documentation/devicetree/bindings/remoteproc/qcom,adsp.txt index b85885a..274bc8d 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,adsp.txt +++ b/Documentation/devicetree/bindings/remoteproc/qcom,adsp.txt @@ -9,6 +9,7 @@ on the Qualcomm ADSP Hexagon core. Definition: must be one of: "qcom,msm8974-adsp-pil" "qcom,msm8996-adsp-pil" + "qcom,msm8996-slpi-pil" - interrupts-extended: Usage: required @@ -96,3 +97,31 @@ ADSP, as it is found on MSM8974 boards. qcom,smd-edge = <1>; }; }; + +The following example describes the resources needed to boot control the +SLPI, as it is found on MSM8996 boards. + + slpi { + compatible = "qcom,msm8996-slpi-pil"; + interrupts-extended = <&intc 0 390 IRQ_TYPE_EDGE_RISING>, + <&slpi_smp2p_in 0 IRQ_TYPE_EDGE_RISING>, + <&slpi_smp2p_in 1 IRQ_TYPE_EDGE_RISING>, + <&slpi_smp2p_in 2 IRQ_TYPE_EDGE_RISING>, + <&slpi_smp2p_in 3 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "wdog", + "fatal", + "ready", + "handover", + "stop-ack"; + + clocks = <&rpmcc MSM8996_RPM_SMD_XO_CLK_SRC>, + <&rpmcc MSM8996_RPM_SMD_AGGR2_NOC_CLK>; + clock-names = "xo", + "aggre2"; + vdd_cx-supply = <&pm8994_l26_corner>; + vdd_px-supply = <&pm8994_lvs2>; + memory-region = <&slpi_region>; + qcom,smem-states = <&slpi_smp2p_out 0>; + qcom,smem-state-names = "stop"; + }; + diff --git a/drivers/remoteproc/qcom_adsp_pil.c b/drivers/remoteproc/qcom_adsp_pil.c index ab2632b..47b2a29 100644 --- a/drivers/remoteproc/qcom_adsp_pil.c +++ b/drivers/remoteproc/qcom_adsp_pil.c @@ -564,9 +564,32 @@ static int adsp_remove(struct platform_device *pdev) NULL }, }; + +static const struct generic_rproc_res slpi_resource_init = { + .crash_reason_smem = 424, + .firmware_name = "slpi.mdt", + .fw_pas_id = 12, + .reg_res = (struct regulator_res[]) { + { + .supply = "vdd_cx", + .uV = 5, + }, + { + .supply = "vdd_px", + }, + {} + }, + .clocks_name = (char*[]){ + "xo", + "aggre2", + NULL + }, +}; + static const struct of_device_id adsp_of_match[] = { { .compatible = "qcom,msm8974-adsp-pil", .data = &adsp_resource_init}, { .compatible = "qcom,msm8996-adsp-pil", .data = &adsp_resource_init}, + { .compatible = "qcom,msm8996-slpi-pil", .data = &slpi_resource_init}, { }, }; MODULE_DEVICE_TABLE(of, adsp_of_match);