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: 20649 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp293213dyc; Tue, 20 Feb 2024 01:53:38 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVEC/wxTtCrvwiThgkWVuBzVr13K4xqD5mXaSS+bswtWqf+ESRhciXYxdZFmlowpDvL3tluUwkdjXQlwsHY9HUSc5RDsQ== X-Google-Smtp-Source: AGHT+IHtlJY+FZ015ZWya8zuPfjJpANctyBNYZorPN86XG2kd+2BMEMMQFb6QvmOzjjM/+MjsDkd X-Received: by 2002:a05:6358:8aa:b0:176:5c73:393b with SMTP id m42-20020a05635808aa00b001765c73393bmr17068503rwj.18.1708422817843; Tue, 20 Feb 2024 01:53:37 -0800 (PST) Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id p22-20020a639516000000b005d7957d53e6si5871538pgd.678.2024.02.20.01.53.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 01:53:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-72708-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@wolfvision.net header.s=selector2 header.b=iRZ64pif; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-72708-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72708-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wolfvision.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id A7494B21647 for ; Tue, 20 Feb 2024 09:40:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 081F760ECD; Tue, 20 Feb 2024 09:40:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=wolfvision.net header.i=@wolfvision.net header.b="iRZ64pif" Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2128.outbound.protection.outlook.com [40.107.21.128]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 216F75FDB2; Tue, 20 Feb 2024 09:39:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.128 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708422001; cv=fail; b=Q0FGNE29RA1oZiW5t8Me+s5R3GNq7jLLjBLOBk/44uH48jQkb/bYeta4VXbbl4CgkUDqVLrXNlL0LaUKgzUEp9BpY/Aiqxuns6ZaC6L31/DbYRtqO9Knw4dvbMn4DcMVy6rQgwOKaZuRg92cUQWh0jcMIJrYzs7K4THznizxRHs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708422001; c=relaxed/simple; bh=SSsiyR5F+baV5Wa4Kxv1QNdEidSQJbzpUuAR4CTA43w=; h=From:Subject:Date:Message-Id:Content-Type:To:Cc:MIME-Version; b=Ux8tNuIo3t4i8A9FWy0VtlUMfxqp2JL7a7qL9XRnj3z1Hc2WobKb96ZLnTfE902HzU9+APJpWxB1C5E8al3MAVTkqUqZYPpVgbz4M0QwJRwOtmMuD7g1GRAAKRyrQj08+Gd1wLpBPjpgoOae3h+HjlEFpIq+P76Zx9Xi1pb00w0= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wolfvision.net; spf=pass smtp.mailfrom=wolfvision.net; dkim=pass (1024-bit key) header.d=wolfvision.net header.i=@wolfvision.net header.b=iRZ64pif; arc=fail smtp.client-ip=40.107.21.128 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wolfvision.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wolfvision.net 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) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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/1bkXemfCp7SWwYxpt1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q?J5yXNzEbbXnveO2G6ETTbPFYkWdyzYiUAxE4iKp2mFq4iS1ny8Ga9/May1jB/BRes?= =?utf-8?q?itsF73BzziqsbasQjwFDOwzmFzRUioWTULL0mh6rDE+iqzriQCWgCykhLVoBqaR/H?= =?utf-8?q?2ngB7412H1++mMrqMc/6vtjANPDiiQfosYzJpytjhrgWXYVjeMT1WyN2eQg3cfgZo?= =?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-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791410670789554382 X-GMAIL-MSGID: 1791411164929926851 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,