From patchwork Thu Feb 24 03:10:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Qian X-Patchwork-Id: 545730 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 AF074C433FE for ; Thu, 24 Feb 2022 03:12:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230336AbiBXDMl (ORCPT ); Wed, 23 Feb 2022 22:12:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230340AbiBXDMe (ORCPT ); Wed, 23 Feb 2022 22:12:34 -0500 Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30040.outbound.protection.outlook.com [40.107.3.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0254673FF; Wed, 23 Feb 2022 19:11:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YszLmKuGgga2CO1JfYCUgv6nadjoW/ptQs+qnJEFaIvuW2vjX1di0qYfht9RyM4XqKv7O7khoMxAivk8LPkgir5lyJLWhIYrGZspnVPwp6yt6Q3NA6dTkiX4bzXZO7Pee4nRm5tXv5fKgtrOMGz4lLbeA47wszVrA4+TfPCRoSfzdRZCTYhFgpOvgCkmKD+oi513Umdik+Ga+6gc66HbEtdi97reXqV7diNOmKnrYrKAmAN+8JOh77B0eyOKxN0zkEiKPcI85mg2aHkfPkIA6JHumrgIEZo8AMRy/qyKpz4Wlrt4CUcyg1OXe9ClUmzQSKSeOCGhNlLVe8XLWgPYKw== 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=vELxgDcf3paHloMBeM3iOwH8y8UnrFwSX/a8dQguHug=; b=enaBisK1M+bGssbFmpr9+rvbQ08H/iN5LmvBKbkySlyeZqWs/ybVBUXfQgxzXGFLmf+76szArcvtuAVlvFQAqKDqmsg62XFyDjhaFHlRgqQ783WvOUSqSucWJM+0jYm5Qo5S54doYtOS38ho08cteQ1+8w0YdbW8ECSbUJZpMwnV62+szPQNLZVfXaoHWDNmy3MAZJw81L1eIHvGVINyDUrStGczHO/T84smLcmsuyF11o0bAhVirXri8wJjkMyhZ4WoErM5ZU8p15IUArBym8J7PuepoDcpAbvLk4XdsmZ35zKkvEF5MZaGNDlDCT2hUTjoCZpNsHwpFwkWkje/BA== 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=vELxgDcf3paHloMBeM3iOwH8y8UnrFwSX/a8dQguHug=; b=OlGt6+oStnjXJ/NexRHRYCi0ET8uMWUXFV0A0LYgVS+tk6tyatPUxCZ/1ffyk4wp+xd0qBGDtMQZumUZgQsqz3ucD7rynn/UazXMCEs1iX+JyYDOeTdV5yxuDtf/zDlpCpyg+/5pSAURxDtSyV/1Q7dWFCL7Dwg/VxhhDn5Igos= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6341.eurprd04.prod.outlook.com (2603:10a6:20b:d8::14) by PA4PR04MB8013.eurprd04.prod.outlook.com (2603:10a6:102:c4::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.24; Thu, 24 Feb 2022 03:11:46 +0000 Received: from AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::c39:69cf:c4ea:967]) by AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::c39:69cf:c4ea:967%5]) with mapi id 15.20.5017.024; Thu, 24 Feb 2022 03:11:46 +0000 From: Ming Qian To: mchehab@kernel.org, shawnguo@kernel.org, robh+dt@kernel.org, s.hauer@pengutronix.de Cc: hverkuil-cisco@xs4all.nl, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, aisheng.dong@nxp.com, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v18 11/15] arm64: dts: freescale: imx8q: add imx vpu codec entries Date: Thu, 24 Feb 2022 11:10:09 +0800 Message-Id: X-Mailer: git-send-email 2.33.0 In-Reply-To: References: X-ClientProxiedBy: SG2P153CA0029.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::16) To AM6PR04MB6341.eurprd04.prod.outlook.com (2603:10a6:20b:d8::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5149b752-c697-49a2-a19a-08d9f7436407 X-MS-TrafficTypeDiagnostic: PA4PR04MB8013:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BjckppgQGyQ+XvOs6iGiJGsEuIkJ/PEqHcwL6mqQI26iceNUO38cVzsc2N3XgIACIgJnkNhK/7zN0C0XrtyX+DsFxgfcdGYTB8LtJIcBHD0geFmRwRrK2JIXO05//Lf4T5p+tAW940XOMrebc5yklAh2BcMFST/rndAQ9Z2DVEX3gAE56uNBy2NB2txbOruLFtImugWgRCFoGlcY5bgWJ4ECdGUeUwZFYpIOupp1RYarJqBigmVLl9Ilp1zSEqi2HfykpG2a8FIuhzqpCEX+BwVv+zOSNqBxB009BuQ1AhJQPVR4MT79uetRi4vaiJTwpwlqWR3rtOeN5NmW4EiUiQ264O+RTEHcGG+WevwBF9f/sj2qSS5ejCXCAdifSEG74nK1TPxGjs/20ynFsV/a9/LPc7BumWsSdREqP/557Pp4ZpNu+OfBht+/cZ5c8c++H5VAyi6gZhSFDjwFTZvy6G2diY2Zp7gPHvw2+Vu+8ZYOjvkPyX2v5o1ctzCe85E7RbOvvLDGu5XCEZDcLXIHAhy341XLTxg6KQtif64qn9lZB2YmSxKaudo3fob2QuHeq8BnKimcqOmgZCNUPsb9vaDIFteFwZbS0gq2968w5Wsm3Kaof0SO8S3kJpdoLDfLazylBeylAX5hqkOV0u9frv0K2lhfqEj4Mq1ZsM7+1rXDMeoNLLrv/s1xox6YNE+pnICzgyILoBkS4CiIojsWkokTZThqWt3Yk+6BgnEA4TxyvGdKKnVvHiFDg6VUNV4WP00H+z0QqtHkBCBup8ScEh/h3IE2nh7uKHuqkB/r2Jc= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB6341.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(316002)(2616005)(44832011)(6512007)(38100700002)(38350700002)(186003)(26005)(5660300002)(508600001)(6486002)(52116002)(6506007)(86362001)(6666004)(7416002)(66946007)(8936002)(2906002)(8676002)(4326008)(83380400001)(66476007)(66556008)(36756003)(32563001)(414714003)(473944003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: t9EC+EXUaUQKkEK9d5CZG8mEyZFYJZKxLAA5f4JDEaReFbVhDkYdzHEbApYyT93l7/Kxy58jP9a5RZ+rVEyeu8oRg+GWodpvumqFCvrKxZx/h1C2y3g40l8ZD8YlVlKVkt6/VPqb12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YYfCB/kaMBTJEMR+yEFPIk4u3I57Fte/m2Xs3Q8UtAuEwm2zOxea9TRKvCyaeLDHA4MC0AeZXVoeXn2O9sAi8089VUkLBkMOasKF5ADK6UXB35Soyyq+rZJUm3Twpy6W4ld/qMcaidJvF+AWk/mrolilMk/vT47S20xb5533hJHbv8bmDG74wlCP1SZGsbpwXgciTLEe1/sukEzGm45P0P9wGHKv3cgytQFbaWdSMDBLh3213PbFerg1GZvcuLdOgUzexicQDeYNyXyb9rmSJ3Yp7e7PUlqoKw0E2I6VsaDsVf4LPE8KwbUqqszYK1JTJvghWtxjePd7v+CJWvPYn601GxlAAni/sBbiyA8DNNmnDcUovyLkbaTOwEiI3RPexrBuWhNeuRo6ONQfl6jHS2hxpDqVc6PH+ubg= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5149b752-c697-49a2-a19a-08d9f7436407 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6341.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Feb 2022 03:11:46.4445 (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: EDYmKbccnryRPAjUICG7WxL+7jhktQjA3xnmDxayhMzTDJO22dZ6PWVNloh2uBhdqM8PahpuZr9+ahgTezJuDA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB8013 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Add the Video Processing Unit node for IMX8Q SoC. Signed-off-by: Ming Qian Signed-off-by: Shijie Qin Signed-off-by: Zhou Peng --- .../arm64/boot/dts/freescale/imx8-ss-vpu.dtsi | 73 +++++++++++++++++++ arch/arm64/boot/dts/freescale/imx8qxp-mek.dts | 25 +++++++ arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 24 ++++++ 3 files changed, 122 insertions(+) create mode 100644 arch/arm64/boot/dts/freescale/imx8-ss-vpu.dtsi diff --git a/arch/arm64/boot/dts/freescale/imx8-ss-vpu.dtsi b/arch/arm64/boot/dts/freescale/imx8-ss-vpu.dtsi new file mode 100644 index 000000000000..a08d796a8cd2 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8-ss-vpu.dtsi @@ -0,0 +1,73 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2021 NXP + * Dong Aisheng + */ + +vpu: vpu@2c000000 { + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x2c000000 0x0 0x2c000000 0x2000000>; + reg = <0 0x2c000000 0 0x1000000>; + power-domains = <&pd IMX_SC_R_VPU>; + status = "disabled"; + + mu_m0: mailbox@2d000000 { + compatible = "fsl,imx6sx-mu"; + reg = <0x2d000000 0x20000>; + interrupts = ; + #mbox-cells = <2>; + power-domains = <&pd IMX_SC_R_VPU_MU_0>; + status = "disabled"; + }; + + mu1_m0: mailbox@2d020000 { + compatible = "fsl,imx6sx-mu"; + reg = <0x2d020000 0x20000>; + interrupts = ; + #mbox-cells = <2>; + power-domains = <&pd IMX_SC_R_VPU_MU_1>; + status = "disabled"; + }; + + mu2_m0: mailbox@2d040000 { + compatible = "fsl,imx6sx-mu"; + reg = <0x2d040000 0x20000>; + interrupts = ; + #mbox-cells = <2>; + power-domains = <&pd IMX_SC_R_VPU_MU_2>; + status = "disabled"; + }; + + vpu_core0: vpu_core@2d080000 { + reg = <0x2d080000 0x10000>; + compatible = "nxp,imx8q-vpu-decoder"; + power-domains = <&pd IMX_SC_R_VPU_DEC_0>; + mbox-names = "tx0", "tx1", "rx"; + mboxes = <&mu_m0 0 0>, + <&mu_m0 0 1>, + <&mu_m0 1 0>; + status = "disabled"; + }; + + vpu_core1: vpu_core@2d090000 { + reg = <0x2d090000 0x10000>; + compatible = "nxp,imx8q-vpu-encoder"; + power-domains = <&pd IMX_SC_R_VPU_ENC_0>; + mbox-names = "tx0", "tx1", "rx"; + mboxes = <&mu1_m0 0 0>, + <&mu1_m0 0 1>, + <&mu1_m0 1 0>; + status = "disabled"; + }; + vpu_core2: vpu_core@2d0a0000 { + reg = <0x2d0a0000 0x10000>; + compatible = "nxp,imx8q-vpu-encoder"; + power-domains = <&pd IMX_SC_R_VPU_ENC_1>; + mbox-names = "tx0", "tx1", "rx"; + mboxes = <&mu2_m0 0 0>, + <&mu2_m0 0 1>, + <&mu2_m0 1 0>; + status = "disabled"; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts b/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts index 863232a47004..44347a076722 100644 --- a/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts +++ b/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts @@ -196,6 +196,31 @@ &usdhc2 { status = "okay"; }; +&vpu { + compatible = "nxp,imx8qxp-vpu"; + status = "okay"; +}; + +&mu_m0 { + status = "okay"; +}; + +&mu1_m0 { + status = "okay"; +}; + +&vpu_core0 { + reg = <0x2d040000 0x10000>; + memory-region = <&decoder_boot>, <&decoder_rpc>; + status = "okay"; +}; + +&vpu_core1 { + reg = <0x2d050000 0x10000>; + memory-region = <&encoder_boot>, <&encoder_rpc>; + status = "okay"; +}; + &iomuxc { pinctrl_fec1: fec1grp { fsl,pins = < diff --git a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi index dbec7c106e0b..a79ae33cbad2 100644 --- a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi @@ -46,6 +46,9 @@ aliases { serial1 = &lpuart1; serial2 = &lpuart2; serial3 = &lpuart3; + vpu_core0 = &vpu_core0; + vpu_core1 = &vpu_core1; + vpu_core2 = &vpu_core2; }; cpus { @@ -162,10 +165,30 @@ reserved-memory { #size-cells = <2>; ranges; + decoder_boot: decoder-boot@84000000 { + reg = <0 0x84000000 0 0x2000000>; + no-map; + }; + + encoder_boot: encoder-boot@86000000 { + reg = <0 0x86000000 0 0x200000>; + no-map; + }; + + decoder_rpc: decoder-rpc@92000000 { + reg = <0 0x92000000 0 0x100000>; + no-map; + }; + dsp_reserved: dsp@92400000 { reg = <0 0x92400000 0 0x2000000>; no-map; }; + + encoder_rpc: encoder-rpc@94400000 { + reg = <0 0x94400000 0 0x700000>; + no-map; + }; }; pmu { @@ -287,6 +310,7 @@ map0 { /* sorted in register address */ #include "imx8-ss-img.dtsi" + #include "imx8-ss-vpu.dtsi" #include "imx8-ss-adma.dtsi" #include "imx8-ss-conn.dtsi" #include "imx8-ss-ddr.dtsi"