From patchwork Mon May 12 09:37:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 29960 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f72.google.com (mail-pa0-f72.google.com [209.85.220.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 18D6F2054B for ; Mon, 12 May 2014 09:39:22 +0000 (UTC) Received: by mail-pa0-f72.google.com with SMTP id rd3sf39551937pab.11 for ; Mon, 12 May 2014 02:39:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id:cc :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=yr4Mv0/D+MMeexLsePSKycX3CmUxioXvLa25WwJ26Cg=; b=kNRJWAlGHEGikbXaKkZygcJ2VwN3OfQtf3D7GRdB/nUJl40uSPvCr3rQmo8Y1ANcB1 MgI2CGQsngEKLKDQZ1qIGBl1DPHHeHoPvfGiiF8iS6wimvDXFffK9GuKq0pRbxa2d+S5 WbvKdZZ8o9vf2qW7jppInkD0mEeMVWTk4WK20dj+p9xsFxGJnADWSOm7wUFwntQBy6ZZ /YyiDXTuP536mJx46YMgtZhlQpaSr3f0b4tNsWM2VKyMbQx/92tdPBzQNkn2tDGWHLqa J1Bu961sxvkGFuVwuNS1bdIDtVC6XM3YI3hn+JfovsgVFioYzVEAl+YVvmeR98aq+lVR 8T1w== X-Gm-Message-State: ALoCoQnIvird1RDbs6hrukJ+1el9v6NiyD6Im6MxcSw3trLNfjeC3usGFVdBuJl6xy1TScq7HoGJ X-Received: by 10.66.190.202 with SMTP id gs10mr13721732pac.0.1399887562338; Mon, 12 May 2014 02:39:22 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.97.200 with SMTP id m66ls1205679qge.83.gmail; Mon, 12 May 2014 02:39:22 -0700 (PDT) X-Received: by 10.58.201.5 with SMTP id jw5mr21877220vec.6.1399887562200; Mon, 12 May 2014 02:39:22 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id t5si1988995vcp.40.2014.05.12.02.39.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 May 2014 02:39:22 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id lf12so8396413vcb.15 for ; Mon, 12 May 2014 02:39:22 -0700 (PDT) X-Received: by 10.58.195.231 with SMTP id ih7mr592930vec.32.1399887562121; Mon, 12 May 2014 02:39:22 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp54697vcb; Mon, 12 May 2014 02:39:21 -0700 (PDT) X-Received: by 10.140.92.200 with SMTP id b66mr33644412qge.41.1399887561598; Mon, 12 May 2014 02:39:21 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id di5si5697642qcb.20.2014.05.12.02.39.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 May 2014 02:39:21 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; 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 1Wjmg9-0007SY-DY; Mon, 12 May 2014 09:37:49 +0000 Received: from mail-wi0-f175.google.com ([209.85.212.175]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wjmg6-0007FN-TQ for linux-arm-kernel@lists.infradead.org; Mon, 12 May 2014 09:37:47 +0000 Received: by mail-wi0-f175.google.com with SMTP id f8so4115326wiw.8 for ; Mon, 12 May 2014 02:37:23 -0700 (PDT) X-Received: by 10.180.184.167 with SMTP id ev7mr14624232wic.55.1399887443465; Mon, 12 May 2014 02:37:23 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id w6sm17171977wjq.29.2014.05.12.02.37.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 May 2014 02:37:22 -0700 (PDT) From: Linus Walleij To: devicetree-discuss@lists.ozlabs.org, Grant Likely , Rob Herring Subject: [PATCH v2] ARM: dt: fix up PL011 device tree bindings Date: Mon, 12 May 2014 11:37:17 +0200 Message-Id: <1399887437-32154-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.9.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140512_023747_101049_3D7634B3 X-CRM114-Status: GOOD ( 16.66 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.2 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.212.175 listed in list.dnswl.org] Cc: Linus Walleij , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Make the map match the reality, the current binding text is nonsense: - The clock required for the clocking of the serial port must come first and is not optional (as the driver will otherwise proceed to grab and use the apb_pclk as uartclk), and the apb_pclk that clocks the logic must come second as the code will retrieve the first clock by index, whereas the PrimeCell but will explicitly look for "apb_pclk" so this can be specified later, as it is looked up by name. - The pin control state "default" is the only mandated state, the sleep state is entirely optional. We also add an example to avoid further confusion. Reported-by: Arnd Bergmann Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Rename amba_pclk to apb_pclk - Split clock/clocks properties and indicate that listin one clock only is deprecated --- Documentation/devicetree/bindings/serial/pl011.txt | 28 +++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/serial/pl011.txt b/Documentation/devicetree/bindings/serial/pl011.txt index 5d2e840ae65c..52464918cfe2 100644 --- a/Documentation/devicetree/bindings/serial/pl011.txt +++ b/Documentation/devicetree/bindings/serial/pl011.txt @@ -6,12 +6,34 @@ Required properties: - interrupts: exactly one interrupt specifier Optional properties: -- pinctrl: When present, must have one state named "sleep" - and one state named "default" -- clocks: When present, must refer to exactly one clock named +- pinctrl: When present, must have one state named "default", + and may contain a second name named "sleep". The former + state sets up pins for ordinary operation whereas + the latter state will put the associated pins to sleep + when the UART is unused +- clocks: When present, the first clock listed must correspond to + the clock named UARTCLK on the IP block, i.e. the clock + to the external serial line, whereas the second clock + must correspond to the PCLK clocking the internal logic + of the block. Just listing one clock (the first one) is + deprecated. +- clocks-names: When present, the first clock listed must be named + "uartclk" and the second clock listed must be named "apb_pclk" - dmas: When present, may have one or two dma channels. The first one must be named "rx", the second one must be named "tx". See also bindings/arm/primecell.txt + +Example: + +uart@80120000 { + compatible = "arm,pl011", "arm,primecell"; + reg = <0x80120000 0x1000>; + interrupts = <0 11 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&dma 13 0 0x2>, <&dma 13 0 0x0>; + dma-names = "rx", "tx"; + clocks = <&foo_clk>, <&bar_clk>; + clock-names = "uartclk", "apb_pclk"; +};