From patchwork Tue Aug 2 03:58:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joy Zou X-Patchwork-Id: 12934218 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96D06C00140 for ; Tue, 2 Aug 2022 03:58:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235548AbiHBD6K (ORCPT ); Mon, 1 Aug 2022 23:58:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231849AbiHBD6G (ORCPT ); Mon, 1 Aug 2022 23:58:06 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2081.outbound.protection.outlook.com [40.107.20.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 105CF1A385; Mon, 1 Aug 2022 20:58:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e4uDRFy08cqnrTHXszfMt5nI3Eb1dz3jgbJobvpiOtqnCN4Q51NAMQJ2PmqH6nd9vPqly8N/2Ghv/YrZoHx86GfsEh4OX22qUnGsn+hcnYAe707mwPKQGc8RIV9wzy7ZZJ+VRvrgubnYWXUHUmKiup27Kf27CfjkHunUflFeOvczCkWuydKPJYd/O6G5HJHyZXJbe49V2SDvesApGZuEpyKbfRhpYsWlcTfJcJx7MpVWpeF3mKzn2dXHLq0nxKR8SHKB04zn6w1giGreJ8dZQvxSZr06kCIYGdHMxbk4tJ382pddqS/OHEb5QuGltotwwcFzucrFgkGNHYyQ8tjShA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=BdssSPeRC31YzRKU7ZAeKX6rKONLoGWfto8fNFZPSnQ=; b=BOoXj6oPG9L1oCggdhtDHTCP61S7k6dGEBlyKJ5HDtSwDK3r/SVotj0tecKiz3qy9oRPfzW3aEUe2dxCZhUXwbIifCRhM5nuJl0p31B8gjS+cUVDm4A5EVH11rxheLQQGSIGFaSohipHRCp7GBsn/whn7H7uB4e/cwXwYw8r3+mmGCnOQeXqiaK0UXUM5sDn6S1lF4ojxHJh9a3uq8gw6a/k0QF/1WPvtpXhZHwxICmD7bfRiiboWdAbTPfNtK1fytX11luyevfjRFyY4cY8REi1pj+c9aME/mXhadH83iHoubCGx5JLaMHH37QiAOTrwNrggIdDC9PhMEXHMXbPHg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BdssSPeRC31YzRKU7ZAeKX6rKONLoGWfto8fNFZPSnQ=; b=kE3aNyWplDmR9ZDcdb2jl2oebzQvwww3UT01HHnt2wMVHoce6pf7TcLNgPgX2I0NDRp/7QE0ZY3k4QhU1FZ5YKzeZ7SdgC9ERUBmevv+cSCz+mohvYGXsRotZcLviRjXGjRL+syA44hfPruRhMVMlsAXmZ6pmdzTamC61EYDb14= Received: from AM6PR04MB5925.eurprd04.prod.outlook.com (2603:10a6:20b:ab::19) by DBAPR04MB7334.eurprd04.prod.outlook.com (2603:10a6:10:1aa::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5482.16; Tue, 2 Aug 2022 03:58:02 +0000 Received: from AM6PR04MB5925.eurprd04.prod.outlook.com ([fe80::a88e:aa50:65d9:6206]) by AM6PR04MB5925.eurprd04.prod.outlook.com ([fe80::a88e:aa50:65d9:6206%3]) with mapi id 15.20.5482.016; Tue, 2 Aug 2022 03:58:02 +0000 From: Joy Zou To: "vkoul@kernel.org" CC: "S.J. Wang" , "robh+dt@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , dl-linux-imx , "dmaengine@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: FW: [PATCH V2 1/2] bindings: fsl-imx-sdma: Document 'HDMI Audio' transfer Thread-Topic: [PATCH V2 1/2] bindings: fsl-imx-sdma: Document 'HDMI Audio' transfer Thread-Index: AQHYb0Sbzg3yRatDsU+sUlyHgY6zya2baFlw Date: Tue, 2 Aug 2022 03:58:02 +0000 Message-ID: References: <20220524080337.1322240-1-joy.zou@nxp.com> In-Reply-To: <20220524080337.1322240-1-joy.zou@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5baaeada-075a-43b9-a625-08da743b326e x-ms-traffictypediagnostic: DBAPR04MB7334:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ccqrWy1qmIBaaMJqf6BhUp81QzsU4EzdJHjUAwVtSIo0bfVesyICEU+jEE9Pdd8hwuJp8m1X4OHTJFW/attFSc7LQWNFw/2T1dMmb0Y5u9oMRUsrbQOEAl4bw/j6gVRo/mxa5UAqcHMurnoyQ2T/cITeg7ECbOmrwoJJlEoK+HRHbv+6b0waQ38MuSFfNwMGv3Hs24pR+5RJKTk1hmvoQ4v2kWkuw8BbH7xLVn2Xat6wIXqAbbWpRMBd9qZ3kNIG5L8ebdTn/xXQ++pCEBYUAgsNl6hXbVftiHMF+c2w4Z8BsnMsMiHtSsGcQOT1be2m/oryOojG819+EVMGSqMxat7OnzJ+0QEn7hr5Px52BPYrIydxC18mtycHTpCJWeinqYO/6INMfbvefAw8xsyNqKw0ObUa1aX744FYQqxGBsDM1TswYzbKCzdcQ9l3+7OarRYtDPR0cJq12ac/v69zWLPyDdpZMUlmYUVx/EtKjF+tsu6SpgPT/8pqgoAqFSyJBG3bRfIelzkpNl2yJ8f1IobgNiSK9fovb1tiFq8ztFh6WB781DYmTg2DWpjwz7mmpo6NPDjjkqVPg4W56L399LgeAE8xNXENI6jsf+ISxNZqjFoCfMo4tjpkL7/TOcSgvwDCpFK57eNSoVB6iHTKp9IPHEQDa7gRCjaCtWTaUQgqUI8n8QxE06whH8KUrlxCYjASjgtIz7AegNhG4bZfrOF3/fajjhUaBqL+pVbkvFSuR8IeVZJWqnz63n2RPr9nTumdb8Wml2DJFH/hnMYAALBpHTpJH7TDR4f/WZ/KYRlT5llRXzSpWuTxY5qWUp1qom6lD8sfrpjIHdOoN3xyMGDpDD3XJsy2SSmHlwKhhOMmMoqG5tFyjnCPrz7fMw/d x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB5925.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(396003)(346002)(39860400002)(376002)(366004)(136003)(86362001)(38070700005)(38100700002)(122000001)(8676002)(66446008)(64756008)(66556008)(66476007)(4326008)(76116006)(66946007)(6916009)(54906003)(316002)(5660300002)(52536014)(44832011)(7416002)(2906002)(8936002)(53546011)(6506007)(26005)(9686003)(186003)(83380400001)(71200400001)(41300700001)(7696005)(478600001)(55016003)(966005)(33656002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?eucgb2312_cn?b?eklFSE9ydDJDT0tjeVdQRHU5?= =?eucgb2312_cn?b?UWE1MTlEV0RJUE9jaDNEL0VVWkRHNitZZXVHeWVtOUxPclc4bXpsdlNXWXgybCs4?= =?eucgb2312_cn?b?RXJsTlNYZVN5WG1tVk9BZmdPR1diZDZNcDgwakpzMzFNZEo3V1cxMEMvUkNVWmRM?= =?eucgb2312_cn?b?a2l2dlFxZmYvUmlyaXVBbExzOFNoUHM4dUd4WEh3TzRNancza04wSjFIb2o4REVq?= =?eucgb2312_cn?b?SExLZmRQVFYvamhVdXplaXhGaVlnL0p4d09ZOEs0aDZwSm9aUEQrMnF5ckNnZFEv?= =?eucgb2312_cn?b?dis0QkJDdHFzb3R5RXVSQy9mbE4wWENoYjhtdGVNaEVKTkZzY2FtOTZZeWhIeHFS?= =?eucgb2312_cn?b?cVlYOGNKVmx0cTl4dDBEVzlYN3IxcEg3a3BWWkphWnB5K3FqR0c4M1Q5UmpPSzFn?= =?eucgb2312_cn?b?eVdFcUhmWEhWWXZEQmZSWkhmb3RzREpTSUowWlRzbkxzazBzTDgzTHFSSlh6eWU2?= =?eucgb2312_cn?b?MzByMkI3Q1RmMkI1aXZ2OXRVMlNJYU5COGN5alN0WkpmNkd5aUh2UWdiM3FiTmZS?= =?eucgb2312_cn?b?cFg3MTYyOU9pRGY5YURWVWxwaDBxNWU4MXc3QkdzeEhYanVkY1Z4QTZFcDI5TnRm?= =?eucgb2312_cn?b?Wmo2SHRCdVNEZVNGU2JjbzcyQ0tqU1dwdXNQa3NmaWpEd2hDNmlvdmNseHFLZ2Nr?= =?eucgb2312_cn?b?dU9MUGdYdEF3cmNqbkRWc2s2L0x5N1p4VXV3VVU4WHpiZzByd2tUVG03a3ppMVdR?= =?eucgb2312_cn?b?TXZQNVYrQmowM1hEaUtvV0xiRGhlWlF0bzF5bjRsTUErbmlmckVOczVUY3ZIUDZh?= =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cn?b?TEc3anpzRG5ZNlhwM2Nmb0o3ZXk4Sisya01SMDlQWjEweTRDY0QyemFtRDNuTkd6?= =?eucgb2312_cn?b?SHRJSjhKVVhrWG1IKzJ3TVFHcFp0ZnFpVzUwMmRWc3Jad0dSQVVYZ3RPRzk1VUEv?= =?eucgb2312_cn?b?QW5RR3M0L2ZxZS9jR3pKVy9pVEdTa3k5bEN5dGdlZkxMSW9rTklzZjhUbS9aWDFX?= =?eucgb2312_cn?b?d2dkUml2MnpnanlrcXFFUk83dlhPRnd1MGlERzFIU0M5Wmk2ZVNacEkvSi9Wa2Jq?= =?eucgb2312_cn?b?ZXZmc1Ezai9jY3MxcjNhWEs0RjRXYTFTUGxwRDlzMWJsS05Xc3FMYll4b00wcWpr?= =?eucgb2312_cn?b?TlFJRFVtZGUxeXB1dDU0eUh3aW5BWldYUmtBTjdCbHhYZVhRdUtXd25GSERxcHhj?= =?eucgb2312_cn?b?Tk9VdUlkQU9rWkpuZ3hTWWYyRVpLUS93VHIwaUdGeTdKNDJBbDMra2g4NDdHN0R6?= =?eucgb2312_cn?b?ZVM2MWpxdWNLOUpxajlVb0hMV29lVzBhaz0=?= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB5925.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5baaeada-075a-43b9-a625-08da743b326e X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Aug 2022 03:58:02.3882 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 9iOlICAc1YVFXJoaeEZ2jUV02Jo8uKEOjhpZQztuOMhzwB1Evn6TFEDT5iJWnEOy X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7334 Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org Gentle ping... BR Joy Zou -----Original Message----- From: Joy Zou Sent: 2022年5月24日 16:02 To: vkoul@kernel.org Cc: S.J. Wang ; robh+dt@kernel.org; krzysztof.kozlowski+dt@linaro.org; shawnguo@kernel.org; s.hauer@pengutronix.de; kernel@pengutronix.de; festevam@gmail.com; dl-linux-imx ; dmaengine@vger.kernel.org; devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org Subject: [PATCH V2 1/2] bindings: fsl-imx-sdma: Document 'HDMI Audio' transfer Add HDMI Audio transfer type. convert the sdma bindings txt into yaml in v2. Signed-off-by: Joy Zou --- Changes since v1: convert the sdma bindings txt into yaml in v2. --- .../devicetree/bindings/dma/fsl-imx-sdma.yaml | 135 ++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 Documentation/devicetree/bindings/dma/fsl-imx-sdma.yaml diff --git a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.yaml b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.yaml new file mode 100644 index 000000000000..5b4f7a09a395 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.yaml @@ -0,0 +1,135 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause %YAML 1.2 +--- +$id: http://devicetree.org/schemas/dma/fsl-imx-sdma.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale Smart Direct Memory Access (SDMA) Controller for i.MX + +maintainers: + - Vinod Koul + +allOf: + - $ref: "dma-controller.yaml#" + +# Everything else is described in the common file + +properties: + compatible: + items: + - enum: + - fsl,imx25-sdma + - fsl,imx31-sdma + - fsl,imx31-to1-sdma + - fsl,imx31-to2-sdma + - fsl,imx35-to1-sdma + - fsl,imx35-to2-sdma + - fsl,imx51-sdma + - fsl,imx53-sdma + - fsl,imx6q-sdma + - fsl,imx7d-sdma + - fsl,imx6sx-sdma + - fsl,imx6ul-sdma + - fsl,imx8mm-sdma + - fsl,imx8mn-sdma + - fsl,imx8mp-sdma + - enum: + - fsl,imx35-sdma + - fsl,imx8mq-sdma + + reg: + description: Should contain SDMA registers location and length + + interrupts: + description: Should contain SDMA interrupt + + fsl,sdma-ram-script-name: + $ref: /schemas/types.yaml#/definitions/string + description: Should contain the full path of SDMA RAM scripts firmware. + + "#dma-cells": + const: 3 + description: | + The first cell: request/event ID + + The second cell: peripheral types ID + enum: + - MCU domain SSI: 0 + - Shared SSI: 1 + - MMC: 2 + - SDHC: 3 + - MCU domain UART: 4 + - Shared UART: 5 + - FIRI: 6 + - MCU domain CSPI: 7 + - Shared CSPI: 8 + - SIM: 9 + - ATA: 10 + - CCM: 11 + - External peripheral: 12 + - Memory Stick Host Controller: 13 + - Shared Memory Stick Host Controller: 14 + - DSP: 15 + - Memory: 16 + - FIFO type Memory: 17 + - SPDIF: 18 + - IPU Memory: 19 + - ASRC: 20 + - ESAI: 21 + - SSI Dual FIFO: 22 + description: needs firmware more than ver 2 + - Shared ASRC: 23 + - SAI: 24 + - HDMI Audio: 25 + + The third cell: transfer priority ID + enum: + - High: 0 + - Medium: 1 + - Low: 2 + + gpr: + description: The phandle to the General Purpose Register (GPR) node + + fsl,sdma-event-remap: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: | + Register bits of sdma event remap, the format is . + - reg: the GPR register offset + - shift: the bit position inside the GPR register + - val: the value of the bit (0 or 1) + +required: + - compatible + - reg + - interrupts + - fsl,sdma-ram-script-name + - "#dma-cells" + +unevaluatedProperties: false + +examples: + - | + sdma: dma-controller@83fb0000 { + compatible = "fsl,imx51-sdma", "fsl,imx35-sdma"; + reg = <0x83fb0000 0x4000>; + interrupts = <6>; + #dma-cells = <3>; + fsl,sdma-ram-script-name = "sdma-imx51.bin"; + }; + +#DMA clients connected to the i.MX SDMA controller must use the format +#described in the dma-controller.yaml file. + - | + ssi2: ssi@70014000 { + compatible = "fsl,imx51-ssi", "fsl,imx21-ssi"; + reg = <0x70014000 0x4000>; + interrupts = <30>; + clocks = <&clks 49>; + dmas = <&sdma 24 1 0>, + <&sdma 25 1 0>; + dma-names = "rx", "tx"; + fsl,fifo-depth = <15>; + }; + +... -- 2.25.1 From patchwork Tue Aug 2 03:58:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joy Zou X-Patchwork-Id: 12934219 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDE79C19F2D for ; Tue, 2 Aug 2022 03:58:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235528AbiHBD6M (ORCPT ); Mon, 1 Aug 2022 23:58:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232917AbiHBD6I (ORCPT ); Mon, 1 Aug 2022 23:58:08 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2081.outbound.protection.outlook.com [40.107.20.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 170481CB37; Mon, 1 Aug 2022 20:58:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IcRcAaBulbC6NmWkraxv0n2obpmVpG9lJUTmW0Aq8J1zKjC8ETgfItCHS4ee50oXqqoxYBHpv+LMoVPRyE1mOt40O0+Zdq/Wh62OyZg0DkXDZ4H5GhvUvMF99l/Rm0y6zBhxYk/oMnUsRXY2usM5oUAU2c1pfmg6GoAV+nxt1sakJ7g1a9juwia2t/h6mZYV4s2jSCuBYRbyib8PKnAjeZZvH/9a3ODGlXxtPRcxNKuXXrIYWUWQOqYLNXmJStFPmZxYuLw0cDDBCtpL+Cg3tuTFgPwV/b4W4bSIFamtvRr27pV32kUBvxKuHBYhGaMMb1bu0CjIoMd+Vmw5Z7RBYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bOBDvvQ4HlAvg23bMBoclAacQoI9NJ+GIerHnJCPz8c=; b=GZRBipmNuw7IGEWbCkbsOH3RJzqpF7QDJ0oF7TUK0bve7DplNztSsSL5xsYsnRE4un2U2fHGShvOq2lmSojmPKgilK3DkwUcDJQX+lPV/ItMqWoX3+KM28MxTTwxUb4JEwhOEh2dMht7apZjQIVP4eLD1aayutOVNNNMN0JHUVUfb2YFljxdkff1CYxQjwb0onCEuIIK/T14NOPcS+ILhxMj9/YV111zkfgzOv2ISObVoh4XrSw5kK+D2LNfT3HfDx95xwLX5/uGoqghQe4AHBN5TNeAV0I+/YeFyadAghYpMzZLSAc6PbWPqJWKGR0zD5EFM0JQnvEcILPXjYPptw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bOBDvvQ4HlAvg23bMBoclAacQoI9NJ+GIerHnJCPz8c=; b=IHq8RJdsIXVn7WiRZgcXfuSL54rTfLKny7ITPgmGo9luCMFVHN28eKVVWqXSnvKi12oTxeZn0aaqbua1baN5qk7RNHVM15jWvd0ciPBlOUoTlPcju0TsKlhUgaYVwaznzE7tjPZX/fMuHTqcywOqeJKR6fa/vtc7km5XvHEhkhU= Received: from AM6PR04MB5925.eurprd04.prod.outlook.com (2603:10a6:20b:ab::19) by DBAPR04MB7334.eurprd04.prod.outlook.com (2603:10a6:10:1aa::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5482.16; Tue, 2 Aug 2022 03:58:04 +0000 Received: from AM6PR04MB5925.eurprd04.prod.outlook.com ([fe80::a88e:aa50:65d9:6206]) by AM6PR04MB5925.eurprd04.prod.outlook.com ([fe80::a88e:aa50:65d9:6206%3]) with mapi id 15.20.5482.016; Tue, 2 Aug 2022 03:58:04 +0000 From: Joy Zou To: "vkoul@kernel.org" CC: "S.J. Wang" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , dl-linux-imx , "dmaengine@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: FW: [PATCH V2 2/2] dmaengine: imx-sdma: support hdmi audio Thread-Topic: [PATCH V2 2/2] dmaengine: imx-sdma: support hdmi audio Thread-Index: AQHYb0UDxQBEoTyE4k+etryTbMWZ662baA4Q Date: Tue, 2 Aug 2022 03:58:04 +0000 Message-ID: References: <20220524080640.1322388-1-joy.zou@nxp.com> In-Reply-To: <20220524080640.1322388-1-joy.zou@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5dbeea35-23de-45e8-697a-08da743b33bc x-ms-traffictypediagnostic: DBAPR04MB7334:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: vlw/N8rLWhJcb/UARxfXF9CTUbJPygDyMARVvSbx4VN+1hZKUTmCfpC9sxdL/7ge0uWMjQJa+yaJ4t0RYwWFbSD0i0xYtja96TDwU77X4s06AhuVXUWC8HXid2M3Lq1bXo143sMj5aQGOD/KqrhKzVuP16exiHhmcyUT7YWCeFVDCEEUjhqxzdR0K45P/nVJGuP/0ZSKYlJRGYXH1ioQFfhctERveiLOp7mJkDbJGKbCLmd9oeEUq6lsY0jLVQGS1xuBKJ5ugvy3fuYNoEucQcS3jepQLwsBCGdkuPVD9P1xllKBri0SvpiUBBP3l7jnSwkcWKK2rQfxQLWZUlfDm1Tfc67JD6dhAu9hbBsDjm6HykM2z/FTxxbt6celXQ3C0jLJjmrz9BEBkQOZww6LrvygG6H/PDspMKW39+YVarTXal47CiVyxPhUYO3BOYrOdBxYegLI+jLKYHEGRDM2Y+ZA5pQ5UuDrf/KsYbcvewy8mk+3xUJ5KwKjSAOOXYtEcFfbZREct2gz8fvwAfBgQXSy0o7T37cYNsl9TgdbvHmp8Qfg9SoOhPYHm9kHQE1duvEOcM+NJWemaZAyslqxP7yC+KlbLISptnimkoKYbiDsWhKb5M9OnxDNXnWieIISCvbgBQKsFucJprDbVyQFgpMQ7g4ymxdv8dggPlWeM3L51pfgR+Nm2e8e1EE4ZIM8tgoJuN6mY6hmgnFn2Dlokb4kUH0ny82YJ40uUwkRzofewgWPMqZTVoBvtW3hI8ISE5Y1oi6lh7CRUtOxskP+JLXJTWyB9425vtpu0qpx6wdQvak8FOpBtjil+ylL0C6c x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB5925.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(396003)(346002)(39860400002)(376002)(366004)(136003)(86362001)(38070700005)(38100700002)(122000001)(8676002)(66446008)(64756008)(66556008)(66476007)(4326008)(76116006)(66946007)(6916009)(54906003)(316002)(5660300002)(52536014)(44832011)(2906002)(8936002)(53546011)(6506007)(26005)(9686003)(186003)(83380400001)(71200400001)(41300700001)(7696005)(478600001)(55016003)(33656002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount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FTcEVYalpaRkQrTGxyd1NjejBmc3BTTkt1U3ViL2ZvM04yajUx?= =?eucgb2312_cn?b?UEowdzhmZjl6VHRhOHcrMWVTb3o4TGpwVGtWN0F6RkxOdkVpY1ZqREY1T1JSMlNV?= =?eucgb2312_cn?b?N1pha1JzQVNmY1ArNjFBRFo1NkVPaEkralY4elFtUHFCMkVOSlVZUnBnN0RCK1FQ?= =?eucgb2312_cn?b?Sm5TZUpHOVUyais5NUlyL3U3azFhMWtISmErbVF5VFN3QTF0SmlOaC92UUg1cGtv?= =?eucgb2312_cn?b?bStYK3dLVU82UHNxcyt2V2Nkbi9mbHNadStOMzRuQmhCSXlEVkd4OTRJUjZlN2Fa?= =?eucgb2312_cn?b?VUJVaXlUM04xYXpJVmtOTDVhTFFKSHUrUGQzTHFsQllLbHNjUGZHcWYzdFpnMlNW?= =?eucgb2312_cn?b?K2xCb3gzWXNmWlJibnQ0Mk5jM0xzcnBKZmNkSEdvbkNOcE53emsvQ2VWYWh5ZEtM?= =?eucgb2312_cn?b?a1pzR3FWQ0NzejVuSklCOGZQeTVCNDlJOD0=?= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB5925.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5dbeea35-23de-45e8-697a-08da743b33bc X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Aug 2022 03:58:04.5912 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: npd7slt3JtkHCHq7lpC5SxRwXFEuSOvGpRMA0dgdMq4BEQ7RIZP14RXOMfVhOmUi X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7334 Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org Gentle ping... BR Joy Zou -----Original Message----- From: Joy Zou Sent: 2022年5月24日 16:05 To: vkoul@kernel.org Cc: S.J. Wang ; shawnguo@kernel.org; s.hauer@pengutronix.de; kernel@pengutronix.de; festevam@gmail.com; dl-linux-imx ; dmaengine@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org Subject: [PATCH V2 2/2] dmaengine: imx-sdma: support hdmi audio Add hdmi audio support in sdma. Signed-off-by: Joy Zou --- Changes since v1: moved data type to include/linux/dma/imx-dma.h --- drivers/dma/imx-sdma.c | 38 +++++++++++++++++++++++++++++-------- include/linux/dma/imx-dma.h | 1 + 2 files changed, 31 insertions(+), 8 deletions(-) -- 2.25.1 diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 8535018ee7a2..e9b8b2e9f7c9 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -941,7 +941,10 @@ static irqreturn_t sdma_int_handler(int irq, void *dev_id) desc = sdmac->desc; if (desc) { if (sdmac->flags & IMX_DMA_SG_LOOP) { - sdma_update_channel_loop(sdmac); + if (sdmac->peripheral_type != IMX_DMATYPE_HDMI) + sdma_update_channel_loop(sdmac); + else + vchan_cyclic_callback(&desc->vd); } else { mxc_sdma_handle_channel_normal(sdmac); vchan_cookie_complete(&desc->vd); @@ -1061,6 +1064,10 @@ static int sdma_get_pc(struct sdma_channel *sdmac, per_2_emi = sdma->script_addrs->sai_2_mcu_addr; emi_2_per = sdma->script_addrs->mcu_2_sai_addr; break; + case IMX_DMATYPE_HDMI: + emi_2_per = sdma->script_addrs->hdmi_dma_addr; + sdmac->is_ram_script = true; + break; default: dev_err(sdma->dev, "Unsupported transfer type %d\n", peripheral_type); @@ -1112,11 +1119,16 @@ static int sdma_load_context(struct sdma_channel *sdmac) /* Send by context the event mask,base address for peripheral * and watermark level */ - context->gReg[0] = sdmac->event_mask[1]; - context->gReg[1] = sdmac->event_mask[0]; - context->gReg[2] = sdmac->per_addr; - context->gReg[6] = sdmac->shp_addr; - context->gReg[7] = sdmac->watermark_level; + if (sdmac->peripheral_type == IMX_DMATYPE_HDMI) { + context->gReg[4] = sdmac->per_addr; + context->gReg[6] = sdmac->shp_addr; + } else { + context->gReg[0] = sdmac->event_mask[1]; + context->gReg[1] = sdmac->event_mask[0]; + context->gReg[2] = sdmac->per_addr; + context->gReg[6] = sdmac->shp_addr; + context->gReg[7] = sdmac->watermark_level; + } bd0->mode.command = C0_SETDM; bd0->mode.status = BD_DONE | BD_WRAP | BD_EXTD; @@ -1488,7 +1500,7 @@ static struct sdma_desc *sdma_transfer_init(struct sdma_channel *sdmac, desc->sdmac = sdmac; desc->num_bd = bds; - if (sdma_alloc_bd(desc)) + if (bds && sdma_alloc_bd(desc)) goto err_desc_out; /* No slave_config called in MEMCPY case, so do here */ @@ -1653,13 +1665,16 @@ static struct dma_async_tx_descriptor *sdma_prep_dma_cyclic( { struct sdma_channel *sdmac = to_sdma_chan(chan); struct sdma_engine *sdma = sdmac->sdma; - int num_periods = buf_len / period_len; + int num_periods = 0; int channel = sdmac->channel; int i = 0, buf = 0; struct sdma_desc *desc; dev_dbg(sdma->dev, "%s channel: %d\n", __func__, channel); + if (sdmac->peripheral_type != IMX_DMATYPE_HDMI) + num_periods = buf_len / period_len; + sdma_config_write(chan, &sdmac->slave_config, direction); desc = sdma_transfer_init(sdmac, direction, num_periods); @@ -1676,6 +1691,9 @@ static struct dma_async_tx_descriptor *sdma_prep_dma_cyclic( goto err_bd_out; } + if (sdmac->peripheral_type == IMX_DMATYPE_HDMI) + return vchan_tx_prep(&sdmac->vc, &desc->vd, flags); + while (buf < buf_len) { struct sdma_buffer_descriptor *bd = &desc->bd[i]; int param; @@ -1736,6 +1754,10 @@ static int sdma_config_write(struct dma_chan *chan, sdmac->watermark_level |= (dmaengine_cfg->dst_maxburst << 16) & SDMA_WATERMARK_LEVEL_HWML; sdmac->word_size = dmaengine_cfg->dst_addr_width; + } else if (sdmac->peripheral_type == IMX_DMATYPE_HDMI) { + sdmac->per_address = dmaengine_cfg->dst_addr; + sdmac->per_address2 = dmaengine_cfg->src_addr; + sdmac->watermark_level = 0; } else { sdmac->per_address = dmaengine_cfg->dst_addr; sdmac->watermark_level = dmaengine_cfg->dst_maxburst * diff --git a/include/linux/dma/imx-dma.h b/include/linux/dma/imx-dma.h index 8887762360d4..ef72e00fb55e 100644 --- a/include/linux/dma/imx-dma.h +++ b/include/linux/dma/imx-dma.h @@ -40,6 +40,7 @@ enum sdma_peripheral_type { IMX_DMATYPE_ASRC_SP, /* Shared ASRC */ IMX_DMATYPE_SAI, /* SAI */ IMX_DMATYPE_MULTI_SAI, /* MULTI FIFOs For Audio */ + IMX_DMATYPE_HDMI, /* HDMI Audio */ }; enum imx_dma_prio {