From patchwork Tue Feb 14 20:49:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alain Volmat X-Patchwork-Id: 57196 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3201240wrn; Tue, 14 Feb 2023 13:10:04 -0800 (PST) X-Google-Smtp-Source: AK7set9NCd98YUemLy+aqzuPeEhPBGdaozS/QYIWDhsyZDQxIlWu2zWm78DijzmYk7eWp+aFXGh6 X-Received: by 2002:a17:906:5781:b0:7c0:e30a:d3e5 with SMTP id k1-20020a170906578100b007c0e30ad3e5mr4284533ejq.18.1676409003929; Tue, 14 Feb 2023 13:10:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676409003; cv=none; d=google.com; s=arc-20160816; b=XN2iprT1J++P95RobjFt68lPqebxQ+CvroYSDDJgJZHHDcMQVIf9e0zia41FabN5u7 44i+s5M3RbL0dca+IL5+wSkskHgJdbCm4jclSAbF8vrNt1iQqmtSmBMqOVMfeiE48n6A CHMrbz1ZTBjrigq+jQ0X0dcSapEw713AW7tjrnCI7p6Sy4Ys4toi6FRpJXMBLDKCUEF7 As8LeTfunFIPHi5YsdSjfXNJ/xmzcCQT/zz9CSzgRiJSuImwEb8MPPsFTS7nsRUEKwsw YJx2ZAUHjTDu9TTtZzL7uP98ND4f/WCqF+6psavQuvPLrNwt89I3aE2/MFRjoQ67377e QMIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=lu3iz8boaJE5hBM4PrvJdMVuK1QqN72tUsmqt9Hu/rY=; b=VSpopT6Cfbrz+goSprM4q0H63mNAnwaul0xwLoRRYmup720pqJPM9Adg/9g5yyuKBp aG+HUMy8iG84HmHtAhUM+47kDnMg2YDHeghkYllk3n8Y+psQ/scKCSrqb+WIWDQ2xYjv 2AlU2wkniZgTzdvpTDUguLHS2UA25Jq3X0lBawrxcM1MhIhqyEK86g+nJAzWfiiRQ2ds ZcRInIlz0mmWzfybsuKELi5t9bUq2HDDcwugaNynPc7kZ3kXv+c0G2sV7ot2UCF3lKzR olQHDmbiBdCcxc0lu2ILYIUlfS8iV8oaJTPYWTXZ9RKxr92fNaUdPuLc6FNCYW11VMsv cjMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@me.com header.s=1a1hai header.b=H3cr8FVB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=me.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 18-20020a17090600d200b008845c668413si22100173eji.191.2023.02.14.13.09.40; Tue, 14 Feb 2023 13:10:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@me.com header.s=1a1hai header.b=H3cr8FVB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=me.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229848AbjBNUuK (ORCPT + 99 others); Tue, 14 Feb 2023 15:50:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229518AbjBNUuI (ORCPT ); Tue, 14 Feb 2023 15:50:08 -0500 Received: from mr85p00im-hyfv06011401.me.com (mr85p00im-hyfv06011401.me.com [17.58.23.191]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB44823859 for ; Tue, 14 Feb 2023 12:50:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1676407806; bh=lu3iz8boaJE5hBM4PrvJdMVuK1QqN72tUsmqt9Hu/rY=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=H3cr8FVBF3lJbW3/8sQ88eAyp+QmM3qSZ4VkCu3WCFMy0g3wSyoVFR2FvzwftLFza fcQfAZfy1NZjBXTHHlDr2j6P9xPAaLZ00Vni9skpON+fgFTEEbCyD5SKahenyq5E3K yFEW4ZrQCmq7gA/xh0eFwtweOAJsHJHX3lHglKVSvzfu5GuVAuqQOAAZqHa9E8ViUT Ill/cZ7GL2U1gNHVPIYod7XDRmEEV7XAkL+cedlB012tIOD/ezYDd063JUi8U2parF ELyQbwORxh1uqmyZ1I1W6XzaArQt3aBijlnArCu34mFZXh6MleMPWgvruApPDh/MZ3 IgHcpq0w3NS7g== Received: from localhost (mr38p00im-dlb-asmtp-mailmevip.me.com [17.57.152.18]) by mr85p00im-hyfv06011401.me.com (Postfix) with ESMTPSA id E038C357D231; Tue, 14 Feb 2023 20:50:05 +0000 (UTC) From: Alain Volmat To: Jassi Brar , Rob Herring , Krzysztof Kozlowski , Patrice Chotard Cc: Alain Volmat , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v3] dt-bindings: mailbox: sti-mailbox: convert to DT schema Date: Tue, 14 Feb 2023 21:49:44 +0100 Message-Id: <20230214204945.4215-1-avolmat@me.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Proofpoint-GUID: -_KukQB_Mf3ClW8_I2YgINTJ_jkX0ZaC X-Proofpoint-ORIG-GUID: -_KukQB_Mf3ClW8_I2YgINTJ_jkX0ZaC X-Proofpoint-Virus-Version: =?utf-8?q?vendor=3Dfsecure_engine=3D1=2E1=2E170-?= =?utf-8?q?22c6f66c430a71ce266a39bfe25bc2903e8d5c8f=3A6=2E0=2E138=2C18=2E0?= =?utf-8?q?=2E572=2C17=2E0=2E605=2E474=2E0000000_definitions=3D2020-02-14=5F?= =?utf-8?q?11=3A2020-02-14=5F02=2C2020-02-14=5F11=2C2020-01-23=5F02_signatur?= =?utf-8?q?es=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 adultscore=0 clxscore=1015 malwarescore=0 bulkscore=0 phishscore=0 suspectscore=0 mlxlogscore=999 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2302140180 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757842247623058781?= X-GMAIL-MSGID: =?utf-8?q?1757842247623058781?= Convert the sti-mailbox.txt file into st,sti-mailbox.yaml Signed-off-by: Alain Volmat Reviewed-by: Krzysztof Kozlowski --- v3: remove quotes around $ref v2: update commit log remove quotes around urls add mbox-name $ref remove mbox-name from required properties since not mandatory in the driver fix IRQ type in example .../bindings/mailbox/st,sti-mailbox.yaml | 53 +++++++++++++++++++ .../bindings/mailbox/sti-mailbox.txt | 51 ------------------ 2 files changed, 53 insertions(+), 51 deletions(-) create mode 100644 Documentation/devicetree/bindings/mailbox/st,sti-mailbox.yaml delete mode 100644 Documentation/devicetree/bindings/mailbox/sti-mailbox.txt diff --git a/Documentation/devicetree/bindings/mailbox/st,sti-mailbox.yaml b/Documentation/devicetree/bindings/mailbox/st,sti-mailbox.yaml new file mode 100644 index 000000000000..a023c28dff49 --- /dev/null +++ b/Documentation/devicetree/bindings/mailbox/st,sti-mailbox.yaml @@ -0,0 +1,53 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mailbox/st,sti-mailbox.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics Mailbox Driver for STi platform + +description: + Each ST Mailbox IP currently consists of 4 instances of 32 channels. + Messages are passed between Application and Remote processors using + shared memory. + +maintainers: + - Patrice Chotard + +properties: + compatible: + const: st,stih407-mailbox + + reg: + maxItems: 1 + + mbox-name: + $ref: /schemas/types.yaml#/definitions/string + description: name of the mailbox IP + + interrupts: + description: the irq line for the RX mailbox + maxItems: 1 + + "#mbox-cells": + const: 2 + +required: + - compatible + - reg + - "#mbox-cells" + +additionalProperties: false + +examples: + - | + #include + mailbox0: mailbox@8f00000 { + compatible = "st,stih407-mailbox"; + reg = <0x8f00000 0x1000>; + interrupts = ; + #mbox-cells = <2>; + mbox-name = "a9"; + }; + +... diff --git a/Documentation/devicetree/bindings/mailbox/sti-mailbox.txt b/Documentation/devicetree/bindings/mailbox/sti-mailbox.txt deleted file mode 100644 index 351f612673fc..000000000000 --- a/Documentation/devicetree/bindings/mailbox/sti-mailbox.txt +++ /dev/null @@ -1,51 +0,0 @@ -ST Microelectronics Mailbox Driver - -Each ST Mailbox IP currently consists of 4 instances of 32 channels. Messages -are passed between Application and Remote processors using shared memory. - -Controller ----------- - -Required properties: -- compatible : Should be "st,stih407-mailbox" -- reg : Offset and length of the device's register set -- mbox-name : Name of the mailbox -- #mbox-cells: : Must be 2 - <&phandle instance channel direction> - phandle : Label name of controller - instance : Instance number - channel : Channel number - -Optional properties -- interrupts : Contains the IRQ line for a Rx mailbox - -Example: - -mailbox0: mailbox@0 { - compatible = "st,stih407-mailbox"; - reg = <0x08f00000 0x1000>; - interrupts = ; - #mbox-cells = <2>; - mbox-name = "a9"; -}; - -Client ------- - -Required properties: -- compatible : Many (See the client docs) -- reg : Shared (between Application and Remote) memory address -- mboxes : Standard property to specify a Mailbox (See ./mailbox.txt) - Cells must match 'mbox-cells' (See Controller docs above) - -Optional properties -- mbox-names : Name given to channels seen in the 'mboxes' property. - -Example: - -mailbox_test { - compatible = "mailbox-test"; - reg = <0x[shared_memory_address], [shared_memory_size]>; - mboxes = <&mailbox2 0 1>, <&mailbox0 2 1>; - mbox-names = "tx", "rx"; -};