From patchwork Thu Apr 21 17:20:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 8902941 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8939FBF29F for ; Thu, 21 Apr 2016 17:23:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 83D512034A for ; Thu, 21 Apr 2016 17:23:14 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7932120340 for ; Thu, 21 Apr 2016 17:23:13 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1atII8-0007eC-A6; Thu, 21 Apr 2016 17:21:24 +0000 Received: from mail-pa0-x22c.google.com ([2607:f8b0:400e:c03::22c]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1atII5-0007bY-C6 for linux-arm-kernel@lists.infradead.org; Thu, 21 Apr 2016 17:21:22 +0000 Received: by mail-pa0-x22c.google.com with SMTP id r5so28074323pag.1 for ; Thu, 21 Apr 2016 10:21:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to; bh=XIo/mrIdmHEn1kwX8bzEJ7lmYZwbKql04fvA6g0q/ns=; b=YVL9WzZPinqn/eEeGVP2v9zl/39CaDpbiVBs68Q3TVQeakOZOmUFK57R+iMz+03lD8 to1HozfQS3xGmb4aJKqbZz2rN7ZlC7kTBFtq+OIQYAXFcDM8+ogw18cGu/JowO6KSVIV SY92ijwD18+hw8YH+KGsnQtqIxXRgX/0hLjZY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to; bh=XIo/mrIdmHEn1kwX8bzEJ7lmYZwbKql04fvA6g0q/ns=; b=atiaMjHSS4PA6IDu89XX32aVWoryTiGWmZNKkTZYw+us85Xd79jVWJ8cwYq64g6GY2 JyhsdnYCLWWwPevjCBstLUFNvarSuVl2nmKLD3GMOalh619VD6ZdAwHsDoVGdifUDsMn GpkyPAyyp2a3OGFF2dI9GKNzZZx72qRo7UCwwcbTHZ83P93dWbXxS6fvamdvIJ2NQGkr dF0vmYxAm8A6CHJ6HTnA0eMvsZEg82SKmvk5WXW6iDosHey3127Uxz40A0eHrDJ++Xtd i8dwR/7lZMLEj+24/w713lBza/otQjkR57YAsunNw+KbEe4INfKWX2E/KGmFmL/bUyOE jPuw== X-Gm-Message-State: AOPr4FWkdrFk7i4ESrZ+1QWNtFbGeUdDWa+Znt1LB1cmA2BVxGbzLcEKl2Y799Nr673BXA7Q X-Received: by 10.66.66.46 with SMTP id c14mr22148528pat.79.1461259260147; Thu, 21 Apr 2016 10:21:00 -0700 (PDT) Received: from localhost.localdomain (ip68-111-223-48.sd.sd.cox.net. [68.111.223.48]) by smtp.gmail.com with ESMTPSA id 184sm2459927pfd.43.2016.04.21.10.20.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Apr 2016 10:20:59 -0700 (PDT) From: Bjorn Andersson To: Rob Herring Subject: [PATCH v2.1 1/9] dt-binding: remoteproc: Introduce Qualcomm WCNSS loader binding Date: Thu, 21 Apr 2016 10:20:56 -0700 Message-Id: <1461259256-28529-1-git-send-email-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1459222625-11440-2-git-send-email-bjorn.andersson@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160421_102121_456558_B4EBFC63 X-CRM114-Status: GOOD ( 21.59 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Pawel Moll , Ian Campbell , linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, John Stultz , Bjorn Andersson , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bjorn Andersson The document defines the binding for a component that loads firmware for and boots the Qualcomm WCNSS core. Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson --- Rob, I got your Ack on v2, but I would like to make a small amendment before merging this. As we discussed related to the WiFi binding I should reference the mmio registers by a phandle to a DT node specifying the two necessary register blocks (ccu & dxe). These two register blocks are part of the riva/pronto (the two major versions) subsystem, that also contains the "pmu" register block, which is what I access here. Further more, the ccu block contains valuable information for debugging purposes that the implementation of this binding would find useful. I would therefor like to double this node (in the dts) as both the riva/pronto-pil and the target for the mmio phandle reference from the WiFi node. This works fine, but unless using reg-names for defining the order or the regs I get a messy ordering dependency between the two bindings. I do not know which of the other 7-8 register blocks we will add for debugging, but with the below change I can keep them in block order regardless of the order we implement them in. So, can I update the "reg" and add "reg-names" as below to the binding and depend on reg-names for the ordering of reg? Or should I speculatively add all ranges I know of to keep the order sane? Regards, Bjorn Changes since v2: - Modify definition of "reg" - Add "reg-names" - Update example .../bindings/remoteproc/qcom,wcnss-pil.txt | 124 +++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt b/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt new file mode 100644 index 000000000000..2ddca9be893e --- /dev/null +++ b/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt @@ -0,0 +1,124 @@ +Qualcomm WCNSS Peripheral Image Loader + +This document defines the binding for a component that loads and boots firmware +on the Qualcomm WCNSS core. + +- compatible: + Usage: required + Value type: + Definition: must be one of: + "qcom,riva-pil", + "qcom,pronto-v1-pil", + "qcom,pronto-v2-pil" + +- reg: + Usage: required + Value type: + Definition: must contain base address and size of riva/pronto PMU + registers + +- reg-names: + Usage: required + Value type: + Definition: must contain "pmu" + +- interrupts-extended: + Usage: required + Value type: + Definition: must list the watchdog and fatal IRQs and may specify the + ready, handover and stop-ack IRQs + +- interrupt-names: + Usage: required + Value type: + Definition: should be "wdog", "fatal", optionally followed by "ready", + "handover", "stop-ack" + +- vddmx-supply: +- vddcx-supply: +- vddpx-supply: + Usage: required + Value type: + Definition: reference to the regulators to be held on behalf of the + booting of the WCNSS core + +- qcom,state: + Usage: optional + Value type: + Definition: reference to the SMEM state used to indicate to WCNSS that + it should shut down + +- qcom,state-names: + Usage: optional + Value type: + Definition: should be "stop" + += SUBNODES +A single subnode of the WCNSS PIL describes the attached rf module and its +resource dependencies. + +- compatible: + Usage: required + Value type: + Definition: must be one of: + "qcom,wcn3620", + "qcom,wcn3660", + "qcom,wcn3680" + +- clocks: + Usage: required + Value type: + Definition: should specify the xo clock and optionally the rf clock + +- clock-names: + Usage: required + Value type: + Definition: should be "xo", optionally followed by "rf" + +- vddxo-supply: +- vddrfa-supply: +- vddpa-supply: +- vdddig-supply: + Usage: required + Value type: + Definition: reference to the regulators to be held on behalf of the + booting of the WCNSS core + += EXAMPLE +The following example describes the resources needed to boot control the WCNSS, +with attached WCN3680, as it is commonly found on MSM8974 boards. + +pronto@fb21b000 { + compatible = "qcom,pronto-v2-pil"; + reg = <0xfb21b000 0x3000>; + reg-names = "pmu"; + + interrupts-extended = <&intc 0 149 1>, + <&wcnss_smp2p_slave 0 0>, + <&wcnss_smp2p_slave 1 0>, + <&wcnss_smp2p_slave 2 0>, + <&wcnss_smp2p_slave 3 0>; + interrupt-names = "wdog", "fatal", "ready", "handover", "stop-ack"; + + vddmx-supply = <&pm8841_s1>; + vddcx-supply = <&pm8841_s2>; + vddpx-supply = <&pm8941_s3>; + + qcom,state = <&wcnss_smp2p_out 0>; + qcom,state-names = "stop"; + + pinctrl-names = "default"; + pinctrl-0 = <&wcnss_pin_a>; + + iris { + compatible = "qcom,wcn3680"; + + clocks = <&rpmcc RPM_CXO_CLK_SRC>, <&rpmcc RPM_CXO_A2>; + clock-names = "xo", "rf"; + + vddxo-supply = <&pm8941_l6>; + vddrfa-supply = <&pm8941_l11>; + vddpa-supply = <&pm8941_l19>; + vdddig-supply = <&pm8941_s3>; + }; +};