From patchwork Sat Feb 11 20:47:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alain Volmat X-Patchwork-Id: 55864 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1656485wrn; Sat, 11 Feb 2023 13:08:37 -0800 (PST) X-Google-Smtp-Source: AK7set/kd1mevNKqdVKYVoZw2Wr/caMoyh3tD/QDZdZLJOrzjzsZoWRNiwPtATjia5NDO0piKmoA X-Received: by 2002:a17:90a:1da:b0:233:c704:d808 with SMTP id 26-20020a17090a01da00b00233c704d808mr3258956pjd.27.1676149717000; Sat, 11 Feb 2023 13:08:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676149716; cv=none; d=google.com; s=arc-20160816; b=TTdRRe+MgOOUnN1wVfztj5JbgoRleULi/+NG9bwht2h9mxwl+/iblK/0EqhjFA9gc7 kEDfP1lj+644Y2jmcWP29JcglWmSqxABIs6YMx4X/iLRWg37dc8SuHS5oM8FMz1jVUkF 8r9+43IGczTpBFMszlPTYSDQIM51BK62BjcAtRpyMRtBUVK4QRwdyhMgZcFx/vK6gUuf AhL6m7ig8OvOm8UgkocbFv3PW+K5P4bfboBGfVtu+STObZoaN9duKtZ9qonj5UcJUb3O zHjhWjA3ZW0eugpobz/ZTyX/W2EMRHrFJ6GWsH/txhgPXNTfVP+ctc+5fWdzv8z28Ire +NWQ== 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=ipWlGnh3MW1Vz3Ivsi+SHRp2lRJTeFpeE+MicgoNRTM=; b=GxX9ILOvGrvDPw0Z++wlYOD3Xj45btlvJH3VjfirMPa7Xih3rkuC+tIVU3EBX8Y5Nm G0UHMybwB/PbJA9gPemYPz0fPG5Q7bq9IhF8vk9yc4LDn0oPq0/dqyLnFDW9GgkKoHhn WOFGQ/mA7qVg8XRvnt5s47KPfKQO5nDSBKZ3yoEDta6BdtTqW3DlVFk0f7vmKk2pmj9W fqPHHP5AHBD7i8k/4UMB0cabGzcn150swXrZd0Y6dMOHuG66N5x3H6BmdS22RwkQrHxa MJWmJ+LkfYLc/VjHKElGKcJbCgx8qRQzH68KKu3b62SL+3hYzfF0GI5eJzh/Vnw1J81+ ezLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@me.com header.s=1a1hai header.b=JfMlIIyT; 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 95-20020a17090a0fe800b00229791d2de9si7720636pjz.80.2023.02.11.13.08.23; Sat, 11 Feb 2023 13:08:36 -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=JfMlIIyT; 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 S229775AbjBKUt4 (ORCPT + 99 others); Sat, 11 Feb 2023 15:49:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbjBKUty (ORCPT ); Sat, 11 Feb 2023 15:49:54 -0500 Received: from mr85p00im-hyfv06021301.me.com (mr85p00im-hyfv06021301.me.com [17.58.23.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12FFC17CE7 for ; Sat, 11 Feb 2023 12:49:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1676148592; bh=ipWlGnh3MW1Vz3Ivsi+SHRp2lRJTeFpeE+MicgoNRTM=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=JfMlIIyTeDQ/f5BHzmcDDlfJzGbSwZhs/uB76fCH2v+DBSNb4R+D9dptTKcAGyKNO PA68sVIl/BE7XnypZ8J76uAcUtOfL2maHxE7QOJacelK/fIuoVVnW1c4QbLUuCes36 5+1TEdh/OVniKZonFu0q0OdHCjoBR5zmqh1mJLUocWkQgelrkx3K3sAjjUh0SrUY5M btNLabDByExuZt3uZ2r/sQh/SL63PQLvHhBdq64YRXt/L5N+v4Kgvb9v4YYwKnUEAP XkygDCgP0CzG0He2ipZ5LPikoJUqqz3gtNntvOtlMUftGRSgllFzdnCm0afWi6znmi AKXMKmxRFaagw== Received: from localhost (mr38p00im-dlb-asmtp-mailmevip.me.com [17.57.152.18]) by mr85p00im-hyfv06021301.me.com (Postfix) with ESMTPSA id BA7E221510B9; Sat, 11 Feb 2023 20:49:51 +0000 (UTC) From: Alain Volmat To: Bjorn Andersson , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Patrice Chotard Cc: Alain Volmat , linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] dt-bindings: remoteproc: sti: convert st-rproc into dt-schema Date: Sat, 11 Feb 2023 21:47:50 +0100 Message-Id: <20230211204751.9149-1-avolmat@me.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Proofpoint-GUID: MDdap3thiMhZKujSL1PA1Ox-Q2HonM5A X-Proofpoint-ORIG-GUID: MDdap3thiMhZKujSL1PA1Ox-Q2HonM5A 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=2E11=2E62=2E513=2E0000000_definitions=3D2020-02-14=5F?= =?utf-8?q?11=3A2020-02-14=5F02=2C2020-02-14=5F11=2C2021-12-02=5F01_signatur?= =?utf-8?q?es=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 mlxlogscore=999 malwarescore=0 phishscore=0 mlxscore=0 clxscore=1011 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2302110195 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?1757570365131017911?= X-GMAIL-MSGID: =?utf-8?q?1757570365131017911?= Convert the st-rproc.txt binding into dt-schema YAML st,sti-rproc.yaml Signed-off-by: Alain Volmat --- .../bindings/remoteproc/st,sti-rproc.yaml | 101 ++++++++++++++++++ .../bindings/remoteproc/st-rproc.txt | 41 ------- 2 files changed, 101 insertions(+), 41 deletions(-) create mode 100644 Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml delete mode 100644 Documentation/devicetree/bindings/remoteproc/st-rproc.txt diff --git a/Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml new file mode 100644 index 000000000000..b9d84dfbcb58 --- /dev/null +++ b/Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml @@ -0,0 +1,101 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/remoteproc/st,sti-rproc.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: STMicroelectronics STi remote processor controller + +description: + This binding provides support for adjunct processors found on ST SoCs. + + Co-processors can be controlled from the bootloader or the primary OS. If + the bootloader starts a co-processor, the primary OS must detect its state + and act accordingly. + +maintainers: + - Patrice Chotard + +properties: + compatible: + enum: + - st,st231-rproc + - st,st40-rproc + + memory-region: + description: + List of phandles to the reserved memory regions associated with the + remoteproc device. This is variable and describes the memories shared with + the remote processor (e.g. remoteproc firmware and carveouts, rpmsg + vrings, ...). + (see ../reserved-memory/reserved-memory.txt) + + resets: + maxItems: 1 + + reset-names: + maxItems: 1 + + st,syscfg: + description: + System configuration register which holds the boot vector for the co-processor + $ref: "/schemas/types.yaml#/definitions/phandle-array" + items: + - items: + - description: Phandle of syscon block + - description: Boot vector register offset + + clocks: + maxItems: 1 + + clock-frequency: + description: + Frequency of the processing clock of the remote processor + $ref: "/schemas/types.yaml#/definitions/uint32" + + "#mbox-cells": + const: 1 + + mboxes: + maxItems: 4 + + mbox-names: + items: + - const: vq0_rx + - const: vq0_tx + - const: vq1_rx + - const: vq1_tx + +required: + - compatible + - memory-region + - resets + - reset-names + - st,syscfg + - clocks + - clock-frequency + +additionalProperties: false + +examples: + - | + #include + #include + #include + audio_reserved: rproc@42000000 { + compatible = "shared-dma-pool"; + reg = <0x42000000 0x01000000>; + no-map; + }; + + st231-audio { + compatible = "st,st231-rproc"; + memory-region = <&audio_reserved>; + resets = <&softreset STIH407_ST231_AUD_SOFTRESET>; + reset-names = "sw_reset"; + clocks = <&clk_s_c0_flexgen CLK_ST231_AUD_0>; + clock-frequency = <600000000>; + st,syscfg = <&syscfg_core 0x228>; + }; + +... diff --git a/Documentation/devicetree/bindings/remoteproc/st-rproc.txt b/Documentation/devicetree/bindings/remoteproc/st-rproc.txt deleted file mode 100644 index 1031bcd90a79..000000000000 --- a/Documentation/devicetree/bindings/remoteproc/st-rproc.txt +++ /dev/null @@ -1,41 +0,0 @@ -STMicroelectronics Co-Processor Bindings ----------------------------------------- - -This binding provides support for adjunct processors found on ST SoCs. - -Co-processors can be controlled from the bootloader or the primary OS. If -the bootloader starts a co-processor, the primary OS must detect its state -and act accordingly. - -Required properties: -- compatible Should be one of: - "st,st231-rproc" - "st,st40-rproc" -- memory-region Reserved memory (See: ../reserved-memory/reserved-memory.txt) -- resets Reset lines (See: ../reset/reset.txt) -- reset-names Must be "sw_reset" and "pwr_reset" -- clocks Clock for co-processor (See: ../clock/clock-bindings.txt) -- clock-frequency Clock frequency to set co-processor at if the bootloader - hasn't already done so -- st,syscfg System configuration register which holds the boot vector - for the co-processor - 1st cell: Phandle to syscon block - 2nd cell: Boot vector register offset - -Example: - - audio_reserved: rproc@42000000 { - compatible = "shared-dma-pool"; - reg = <0x42000000 0x01000000>; - no-map; - }; - - st231-audio { - compatible = "st,st231-rproc"; - memory-region = <&audio_reserved>; - resets = <&softreset STIH407_ST231_AUD_SOFTRESET>; - reset-names = "sw_reset"; - clocks = <&clk_s_c0_flexgen CLK_ST231_AUD_0>; - clock-frequency = <600000000>; - st,syscfg = <&syscfg_core 0x228>; - };