From patchwork Tue Feb 20 09:39:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Riesch X-Patchwork-Id: 13563765 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 621CEC48BC4 for ; Tue, 20 Feb 2024 09:40:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To:Message-Id:Date: Subject:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=hHS7QMAckCZYMYDGKFr1FvwqwfQVrNUf5ZGsWsKQaoE=; b=PoMELjMyFgim9G 8OF3IlnP8wT1qKYFzQv9yxGCsM5NaCRVfv4K7OL0N1aJDUnzzTKh6Nrreg4eylNts7QSXWcwVh9mY xHq9/4rf/Kqa6FC49NPXbKP0YXKP7I3AYYoVhyRWonkkXnB9XqqGh96c60tIi9CWdZLizK08FSgr/ XoFXT7uLZvNMU3Yu3GXY0CzKyb33JDcuhst1z3VQWuhaEXr4BsiJ4mnG7KDuPEhZFY86E7LiIKUC3 DtFj+zteeJqsO9QUQyPiI6L7GzRwQ2FdzFFl9ZilSk8hwCKIlM/6wswGntW6dGy18x7wjI8sd0e7A L63Sl7BtyRljoYpreOvQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcMbg-0000000E25o-0zXA; Tue, 20 Feb 2024 09:40:08 +0000 Received: from mail-he1eur04on20700.outbound.protection.outlook.com ([2a01:111:f403:260f::700] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcMbb-0000000E230-3bY1; Tue, 20 Feb 2024 09:40:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DPCDV78F9jqojCELD2ld+FCEbVWb0qfIBuDwLRsaWOF01kDX0wXxlhL+WbuXrpnh2rV8YK4SOyuIWIt5EljJpklutgzmBpgIfXL1KgErKNSCWD47SMBcZ7VpdCCYrwrA+6oXa87R7+P9+v0FfsuWQrYmmR+gp4ufkkeLXBuYPbdAepunz4Boetzs2SLf+nc34uB1k9kPCQ1OIzFcMeWNYPypnl7VU/6of0lONlszr6FNHCvJzDxp4+UXe1Un+PH1tR7r/1lhYEI5zHt9CUDZQMObgXngszNjMsBvwLKLFwxJhbXcn+mqkTEkHry0obmivMfdtLbPzzDliqTBAcOqgw== 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=AiaN7W5eiyPC5VUvBvlFHU/wq4/L3G2u5D+qOHcU4BU=; b=O2kSNE0GCcWDHhY48XpOKfmaXaRUnSJ8i7HWuV/Dqgizo1XSPvCl2qVcY0GYa+kH4q14ewSpwcaHsRqOMJEUZxyFswdREG9AFZLKt5bS/Qhi3/JG2J9kz2fPPfVbD4c6IYZCxEi/5Rzsk/gUFTMlocfWmdxOr2pYcz9zzDoyX2tNImq6yLdvLouAJ7c5VN5wRNhOALZEQTg/qYK076uThDIzujUBTrxoqbWr83pqXLvfb///senZkE0pJlpADZ/mLSSeK9gl1grGWJ9NJpRG7PcHE8Ys3XbRULLa4wr4+j4ppK3zZfZaLcIzZvP6axoDkg2nKKpuM2Qh0Y9wzSWxXA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AiaN7W5eiyPC5VUvBvlFHU/wq4/L3G2u5D+qOHcU4BU=; b=iRZ64pifm7lqhFysipYQG+gx3yR9FsLL3Zj0z6DJVEeCyDP64H0AOzq238Y3mok7kIKicuPRFlGTpNnXD+SWT9rdRIwGsJvGrViftsHRs2FVG8E0Xx9TcTyRbFUN+WSHLg99q84XWN8y/EyMQMc/IqWg9+6lSMvUfzWyRza2els= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from DU0PR08MB9155.eurprd08.prod.outlook.com (2603:10a6:10:416::5) by DB9PR08MB6763.eurprd08.prod.outlook.com (2603:10a6:10:2af::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.39; Tue, 20 Feb 2024 09:39:56 +0000 Received: from DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::7409:db60:8209:c9f4]) by DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::7409:db60:8209:c9f4%6]) with mapi id 15.20.7270.043; Tue, 20 Feb 2024 09:39:56 +0000 From: Michael Riesch Subject: [PATCH 00/14] media: rockchip: cif: add support for rk3568 vicap Date: Tue, 20 Feb 2024 10:39:10 +0100 Message-Id: <20240220-v6-8-topic-rk3568-vicap-v1-0-2680a1fa640b@wolfvision.net> X-B4-Tracking: v=1; b=H4sIAD5z1GUC/x2NQQrDIBAAvxL23AWjJsR+pfSgZq1LqRENUgj5e 02PwzDMAZUKU4X7cEChxpW31GG8DeCjTS9CXjuDFFILKQW2GRfct8wey1tN84KNvc3ojFPBGDk FraHXzlZCV2zy8eo/FFfGNqrL5UKBv//r43mePxv7mtOFAAAA To: Mehdi Djait , =?utf-8?q?Th=C3=A9o_Lebrun?= , Thomas Petazzoni , Laurent Pinchart , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Sakari Ailus Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Michael Riesch X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708421995; l=2934; i=michael.riesch@wolfvision.net; s=20230803; h=from:subject:message-id; bh=SSsiyR5F+baV5Wa4Kxv1QNdEidSQJbzpUuAR4CTA43w=; b=4Gt2zT7H8uLDKAB1s7mcmlCld+BsMMgsMSMLMdVL0jA9wOav2Nx4y/HzJ/o+7OSLNr9MqSrlp DERkXmFTThEAuviKmHOqoC5o2nUovK/blJsbu6CZVTaJEOong60CFIm X-Developer-Key: i=michael.riesch@wolfvision.net; a=ed25519; pk=9ral3sulLe95bLcbaiNXTgUTRiBayRBEFZ5OVIEHp+0= X-ClientProxiedBy: VI1PR04CA0128.eurprd04.prod.outlook.com (2603:10a6:803:f0::26) To DU0PR08MB9155.eurprd08.prod.outlook.com (2603:10a6:10:416::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR08MB9155:EE_|DB9PR08MB6763:EE_ X-MS-Office365-Filtering-Correlation-Id: a4661655-c3f3-4491-77f8-08dc31f7e5bd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: t19GDH34ejbyJn9s/RmngRzYVgJbXgkWU2sJa9vzgGcocEunlRoNet4sIZk+PnEVAG20dWJB4ty5TQqJsT9dYKIfsK8oR+bokVJ4Yi6BckAvc5HflmSRzEfkq+wW4WQ/WxdF1JxmarGW32KFiln5NKrgPBUXd0buRPH6W+W76dtZKO1FKC1kry7as5A6YdFXWy2lxuLTpglILvI8I21QB9kpRn3gW6As1xhCdZZIuLTPuZXmaHS0dVGllZEQAHgI/ibe8ow4qkGql3HICfvmcoImUItgC2GyIjjDi8oQdkqKjZfJGtxQygPHqrfXRh2Tw/9iE4A3O4ABtCc/jOjQmW6YSpm2u3KlK42bWKR0x9powmuodsFaai7Ou7eAgvuRZECymQ6kAcNxbLL05gc+7czBfOzIJz2SEwocyNWJSMcRJ/j7fU9YSiKxE130n3lbl2vShMQvv8qfx+xeZh6GNsTxLxUWPClfyr32DeBBU3fl2JYv2smqO3Vo16TqrnDvFIo3jMi9mFmJvfaJ4Ce3KpDo0FFaV/p/Dpoa1KlG6oeJU7MlVw+HOqHV3qlHtZvOTCn54QiB2F1xdIMXMxyfJgNUTt5VhYDcHOPV8EkEI5Tjtbe6DEW9JPNY8OPOB2no X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR08MB9155.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(921011)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?YYB4CNRrGHXtGeULI+CMfuUYVVEV?= =?utf-8?q?a9wSZC7LcXVYE5jwnt4xsniQh4efx11Wku2rDUH/w/1bkXemfCp7SWwYxpt1es50I?= =?utf-8?q?gm73iKyTK1YQfmF9akOoBZudUg0ujvYdcZoCA1P7BQfKWOIyZdNTk5vmFWr7m4y3b?= =?utf-8?q?klSxjcof57iYPMWaVxYYbotJVzG1LqnOu08l0YW6GgP/BZUhZMCQOzKbe/ujgf+iE?= =?utf-8?q?d59fTfzT/Vl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fosYzJpytjhrgWXYVjeMT1WyN2eQg3cfgZo?= =?utf-8?q?/pFb9hAtcMDAR+RGjzXy1ieqw9OK71GVpV7Bz6zZqfyj+BeKq3BROR85PHRm6JMVo?= =?utf-8?q?9H5dd2xJN1lC4PgtJTnc/FUlXt+GE3w+6xf+BU95izNKb6E90y+cJCT9H/EOScehT?= =?utf-8?q?+ytDPNkVcw0buyG7MJT/Aczj6ENIKTWneb4oIA1BwI6BBuhg4AEyCFn7Ig8HFZQc9?= =?utf-8?q?EdObK1zMz3Bb1QavGGEl6h6dGiFHgP6yZirx6AffnrsHX9BBkvtu+jw3XcEX5QFBU?= =?utf-8?q?xglRQi4aYC4Ax7yixKZsOOKnaP/1E+30pHgahuMPR3cOGWEag6+0sZGddJB4FGtGC?= =?utf-8?q?ydsjh5AJOigkwDCnF9qWhXwTCGotkhWOXJztJi+0df9QWKcU6UaT1ywNrIzAzvY20?= =?utf-8?q?tnfFyZddfD6aw6QSobxNwRCYtgpetcZj3w=3D=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: a4661655-c3f3-4491-77f8-08dc31f7e5bd X-MS-Exchange-CrossTenant-AuthSource: DU0PR08MB9155.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Feb 2024 09:39:56.1474 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ezrTDzn7lypNij9mtyqJgOPbIdHNs2bZWUkaEtWT9O74z8U8g4/OvvGKOjB6hDWuN/pETlxx3SmRKjCGwkXTXUzsp7KOWHyrvfa+f0qDUTk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6763 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240220_014003_961046_2F12B725 X-CRM114-Status: GOOD ( 10.97 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Habidere, This series introduces support for the Rockchip RK3568 Video Capture (VICAP) block. It bases on the work of several Bootlin developers who have been tirelessly submitting support for the PX30 Video Input Processor (VIP) block for inclusion in mainline. The most recent iteration is Mehdi Djait's v13 [0], which is a prerequisite for the patches of this series. The PX30 VIP and the RK3568 VICAP are similar enough to share a common driver, but there are some subtle differences that require some tweaks in the submitted code. Although the v13 patches are still WIP and need some revision, I have decided to push the current state of the art in order to gather a first round of reviews and comments. The patches are functional and have been tested successfully on a custom RK3568 board including the ITE Tech. IT6801 HDMI receiver as attached subdevice. The IT6801 driver still needs some loving care but shall be submitted as well at some point. Looking forward to your comments! [0] https://lore.kernel.org/linux-media/cover.1707677804.git.mehdi.djait.k@gmail.com/ Signed-off-by: Michael Riesch --- Michael Riesch (14): media: dt-bindings: media: video-interfaces: add defines for sampling modes media: dt-bindings: media: rockchip-cif: add port definitions media: dt-bindings: media: rockchip,px30-vip: add optional property iommus media: dt-bindings: media: rockchip,px30-vip: allow for different variants media: dt-bindings: media: rockchip,px30-vip: add rk3568-vicap compatible media: rockchip: cif: store endpoint information in private data media: rockchip: cif: fix formatting of find_output_fmt media: rockchip: cif: use port definitions from new header file media: rockchip: cif: add support for grf media: rockchip: cif: add variant specific input format list media: rockchip: cif: make scaler support variant specific media: rockchip: cif: make register access variant specific media: rockchip: cif: add support for rk3568 vicap arm64: dts: rockchip: add vicap node to rk356x .../bindings/media/rockchip,px30-vip.yaml | 110 ++++-- arch/arm64/boot/dts/rockchip/rk356x.dtsi | 45 +++ drivers/media/platform/rockchip/cif/cif-capture.c | 172 +------- drivers/media/platform/rockchip/cif/cif-common.h | 33 +- drivers/media/platform/rockchip/cif/cif-dev.c | 434 ++++++++++++++++++++- drivers/media/platform/rockchip/cif/cif-regs.h | 56 +-- include/dt-bindings/media/rockchip-cif.h | 12 + include/dt-bindings/media/video-interfaces.h | 4 + 8 files changed, 652 insertions(+), 214 deletions(-) --- base-commit: b465b3c117718e5b8f4f3100d6ee780f7dc7b59d change-id: 20240220-v6-8-topic-rk3568-vicap-b9b3f9925f44 Best regards,