From patchwork Fri Dec 20 12:35:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurentiu Palcu X-Patchwork-Id: 13916687 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2056.outbound.protection.outlook.com [40.107.247.56]) (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 93997215198; Fri, 20 Dec 2024 12:36:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.247.56 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734698169; cv=fail; b=PGbYoHH/5GeBf09O1WvJPbVPkCSjdWD+0P3gcVOPdNst9tDXOsaOz+bx12eUT5KaXu5J2cYl5wNHFc/cGv1MAo+3HQy0ThYrK2likviWLpG2Qp9LF73dpUrWmeQurnLA1kiKkm4q4U+5F1jT7EYM/wkinE6bD9i/8U0rOqQiluI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734698169; c=relaxed/simple; bh=fgmnUM5+DfxZ2551PiU1M1gvecssHhkodQh/F4aJlnc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=Fkfh24rxJ4VUbvzAc2k1VHOE198ckA7cgLRuV4+RIzPCxjT64zEHTW2pvjbtky+PcrIUIkJ8n2oRXz7qz/9f9UmkI0EGwBD2CXXw1kU/x2oQccMWly9pMGRnf3hiwx3c8V1VQIDodoKa+xzj0JDkb0KMGeF6f+Rcs71yonBHVjM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=cUJ4Ninj; arc=fail smtp.client-ip=40.107.247.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="cUJ4Ninj" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Vg6DWu/ypJvlIDUeUhen4UfrlAr7sKgt9TBovUuaaHiBSccznSSBFNKB0SlqTNcsjyaT1SoY6aJ2Av6GGIQjDc0GX0Dm4K8fVqklFh9NozFPggGugCmiJPNm3BOjG9XwiOrxzdniIIrxPs4ADoP1vvgifdNdduBueqKZtK5sQ+lEIelYpQyOeDXCjYV6cVYXNI1jQZthAPxB7nQ3uKJJ+KAdFYT0FvcVgXyW4fLN9WVx6LF4/n28uMoz5d1XoPI7xb66HVdcuZeVQ4LPbERSIWwVYdgh8KkYIzqEcdxqkFsZqFB4rTHQnnCA5HQgjbpUouWLbdUPOvWjXHEPFXOdAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=pQIpKB7yu3QVnJOnzy0O5IgwDdSSdcNr6tiwZ67nQpA=; b=N2wuYSbaEwdNNn/I4uWmaR7l/jtSLP/IdDmyi8zhT4RppbT94gte1pk+b+VSiEJHMW8TnQldlgjHS8kS6ZSWW4bHQQzvt6qtNDxJmn2uC0ZnHUz0sU8GNDKfW7xzYdICpGK7ckRoyIwWsuAxwSBerKPzilaGoFLr79zxTxomoxbCJi37sbMZoDm5HIYVg3UDq2HHJHoQUjkWh6UTWk3c2qWT4trR+h2YEpLKjg5X4OlZHa3NOtWmKwk2arlgDXFurOhHd8ysqMScXXA8HsQ4ydzIsua2W/+RoKbq+j+Y/eWDK6aWi47MUYK0Wex8V+i2In9HKSk6BoEtQOOqWYjzqg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pQIpKB7yu3QVnJOnzy0O5IgwDdSSdcNr6tiwZ67nQpA=; b=cUJ4Ninjx1T06C7mxIRqXCuggllzMgPEBWXVZxXk5HI3b38cSJDEi3XRFI2TGYBmTe6bnyg53gx8iZNcV/9MxKYhMwi+l6WEeeM9XfpmADmP7bA3He9QIv6jPEntjweqV29keHySZEhsXRQMLrhP++hiuuUw81q2ATjnVWgTmvc/kqFRMu9ftDZ5BMPiGelOATtnTY9UEBpxDbUF6mb0Dl8bse8Htk6JwLBN+ycHqFFWrnynajUIdtU7N5vjWL1YcrBQPATiUFgwoRYmEjXuCUs/YAcO8gliEdJTX6jtqje/+hGyJRJr97iFb7BpRSSrCW2G6e5tkpUiWRMiDTkMBA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AS4PR04MB9576.eurprd04.prod.outlook.com (2603:10a6:20b:4fe::12) by GVXPR04MB10047.eurprd04.prod.outlook.com (2603:10a6:150:117::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.14; Fri, 20 Dec 2024 12:36:04 +0000 Received: from AS4PR04MB9576.eurprd04.prod.outlook.com ([fe80::9cf2:8eae:c3d1:2f30]) by AS4PR04MB9576.eurprd04.prod.outlook.com ([fe80::9cf2:8eae:c3d1:2f30%4]) with mapi id 15.20.8272.005; Fri, 20 Dec 2024 12:36:03 +0000 From: Laurentiu Palcu To: =?utf-8?q?Niklas_S=C3=B6derlund?= , Mauro Carvalho Chehab , Greg Kroah-Hartman Cc: Laurentiu Palcu , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH v3 1/3] staging: media: max96712: fix typo Date: Fri, 20 Dec 2024 14:35:48 +0200 Message-Id: <20241220123551.696330-2-laurentiu.palcu@oss.nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241220123551.696330-1-laurentiu.palcu@oss.nxp.com> References: <20241220123551.696330-1-laurentiu.palcu@oss.nxp.com> X-ClientProxiedBy: AM0PR10CA0072.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:15::25) To AS4PR04MB9576.eurprd04.prod.outlook.com (2603:10a6:20b:4fe::12) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4PR04MB9576:EE_|GVXPR04MB10047:EE_ X-MS-Office365-Filtering-Correlation-Id: a246cd42-adb6-429a-efe3-08dd20f2de2b X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?CsRPn4hxYVY/Zfu2Qm/dOfgi/Wha5j/?= =?utf-8?q?mYhOZbY65R4QXIlxJ0OBfJgpO8UENOaZmTne8mTmsf2DM9ZmrUbBbljKQzSJiXvfs?= =?utf-8?q?lOApEZO0ODNnxaQLgueSIxHCCnFha1uvrkkMRbnvAg1nFxWhSNfGQDSSNsvUCq/+4?= =?utf-8?q?+VgMUMUUfkT+0HBVNmbnwROXS+mmPrRNAdTq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AB+GBMIgLypS5VyB17R4nNowqQLVOFA0h?= =?utf-8?q?1rM7AlpesWCM0vryJI+pmcbxqLPWvpRhzLOILW7AvZ0lyg1Ws/E6BqtX7ysGMngYI?= =?utf-8?q?P9/nWYQ9RWFssUn9yWs5TseqSd9O2K2r7o7nj/FrfPj0V62Dc0ZYIDEYuWABLXm1X?= =?utf-8?q?ws3ZIonssquLKPVcjCewORSN14Tjttqvh0s6Kg09NTswRomvDcifttUbC8lXOTkwT?= =?utf-8?q?vCLCCS3hoRVWaJPtz1hopoJnRtA7to/pjh4a7M/zIfMSSn6PPX4qQzY16VwmTaSNY?= =?utf-8?q?AZ748KXB4W8j?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS4PR04MB9576.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?QDgVHFgAYM3eW0L+X97AqMbK94r3?= =?utf-8?q?Il1TpnkQTP8mJnzjiGIniR+z7rAckq+EXmu9ASG7WqXXAfjRiLvVhpU6UBOJyTvcy?= =?utf-8?q?/U3PiPgcXj69RbMtod340wgR/6M0HwuOKU4DM7DFk+zgP3wZ4PQE/eo73zxD114Y4?= =?utf-8?q?S/67+T+D7gyZQJRORASKtcPY5/cieJcKkNnSDKpBVCMEDsQNFx/qLKc+1bjrvY8QV?= =?utf-8?q?Xlzm554Oh/EiEINyiCT7CqiMKXdVu9VwuaK/YpxMOWFr1ifrVwjhlOEV5ax5l8Tdh?= =?utf-8?q?yJFhQSS5hZgQyTeiHWg7z0zwQGzKHnRtykwxVnV/ZJpkpgybFDliwQ6mkwGbPPtGz?= =?utf-8?q?37FRyD1G7TH2cXCmaCEA5CpdeTFnNvGJr/0qgoSP96FBlvx6yJXhIIBuPkiQypfSE?= =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q?ejYJrRycKjiOXkCWc+mdBcmlhoBPW57i9m7goMXrqbtlMrkA2dtHY+mW+WG3Ea+LX?= =?utf-8?q?koszy4xQmd5rdvzmjviadFFhtusy4jmVVMzfBiANJN9PYTEp1EGhRgzDhMA94AsUD?= =?utf-8?q?hkmhQPSG8xe7/4IrJub+j8aNbotZh71MVof+MCJfInkHor3gD8KqS8G+5HasmXcWk?= =?utf-8?q?TOUCpKJJaoNO6h/vbSWIuATY4p5xessTNr+xhOAXSG2lW2PmS8xUk9Qji39iiK/or?= =?utf-8?q?Osezxz89ZMh3gcV8I1yVfy6Bw3HzeI61kA=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a246cd42-adb6-429a-efe3-08dd20f2de2b X-MS-Exchange-CrossTenant-AuthSource: AS4PR04MB9576.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2024 12:36:03.9418 (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: 7+kaJxoFyXNnyxsZSyz71oAWWlQ4Lo0GK1YAgKuNwOPE+khLysPvnJ4iSwh+VUayCATMRPv4vh/DwuStYOzexA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB10047 Fix a typo in VS_LOW expression. Signed-off-by: Laurentiu Palcu Reviewed-by: Niklas Söderlund --- drivers/staging/media/max96712/max96712.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/max96712/max96712.c b/drivers/staging/media/max96712/max96712.c index 0751b2e048958..5228f9ec60859 100644 --- a/drivers/staging/media/max96712/max96712.c +++ b/drivers/staging/media/max96712/max96712.c @@ -182,7 +182,7 @@ static void max96712_pattern_enable(struct max96712_priv *priv, bool enable) max96712_write_bulk_value(priv, 0x1052, 0, 3); max96712_write_bulk_value(priv, 0x1055, v_sw * h_tot, 3); max96712_write_bulk_value(priv, 0x1058, - (v_active + v_fp + + v_bp) * h_tot, 3); + (v_active + v_fp + v_bp) * h_tot, 3); max96712_write_bulk_value(priv, 0x105b, 0, 3); max96712_write_bulk_value(priv, 0x105e, h_sw, 2); max96712_write_bulk_value(priv, 0x1060, h_active + h_fp + h_bp, 2); From patchwork Fri Dec 20 12:35:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurentiu Palcu X-Patchwork-Id: 13916688 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2056.outbound.protection.outlook.com [40.107.247.56]) (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 C1DF32153F3; Fri, 20 Dec 2024 12:36:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.247.56 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734698171; cv=fail; b=KnUfsv3FtxDoEYJF7FMajt6mRKnDVR3LDbNCLWPjAiutK87i1OJjnotE6+bytg39YDKH0VJ8JIN4GVa3MsgYchwYGfEu40HxaF44eBRyIi04astpc7rmcttXTFxsy2Y4FoExQAnUe+meWxcQH6foUFpWK+fucGhAZY6Oeim45tQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734698171; c=relaxed/simple; bh=JDEjsM7wAChbeFdO2CG1vB7vCO/Q2PZe5Xo6Jlf4sqA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=ZqCwjKqCvYhcy+1ZeiOrREybaDqO40yBN4OuSeVIY3AEPauxj5UNrJHs4rZDYtkE+hFwlWnjUzfSjD1GAtU3FUmOpBSbK2YnQcWaXvL01gQfsErxWSuvO36TvxIKUDXCbSaNrguj5apl4L3ERz4f0BAshvADJ5TyDdenw0wCGys= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=Dt4QvuwI; arc=fail smtp.client-ip=40.107.247.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="Dt4QvuwI" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=e/zJ03Xn9y9EGtIuC/xP9XnGW/iXlTm6PcfTEelSatnRShuN6fDRGUZUH1+g63ux4GFqSGEhWPW2M0RIteYlHVm0QLGsYGo3boi74Kz8MIj31UDK41zCqlCeJIkRiTc9BY66OnRGifzC0LmxVPoGhso9ATiMu3spmlt6Xi9mn0cmLJuo1cl19tQdXhhj59SpMYVnP4Wegxj//6IZ3CuBWJjknGXxVF903/j8c40UiydV1N1XDDEhc/aPD5e+U6XfJSDKs7TJfmZ9JaVouLTXVfgeItDBAsHJBAnzFZxXUZTS7+X2InDynMozkLNfGktJv/t3MMA9OsW4wbyUIiiY3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=WCfbsqE3Rmf03txvCD4DMR0ugL2hywW2KxTwbvFn3Vw=; b=n7ZZsF0S8DtMdcgtavCrGbo3472gsn0r66NbJ8C+cWj4JxvtDufpLCZY+eVhjUnO3ddSDJae1vr2FdirIcPAaE/RI2cZda7PaY9vp1HCDGjFTicun97Amt/tcdMXVR8PLQ1mzNF516nzGL4Q/C89tRap1INebRqgcrWxEuxwvlWgBcsKiUOfUhbAC3TM1psKnMm/OcHirAjMiMiR0WV/Ocme/Pi18tHfbJUwdKKZ8Ec1Jnr460np1Gd+atMuY4lyl+kIwtUXZNzZ57ZmPSOVFhIo+T7ByeqYQe+jqpINohTHUwjX65K9zw4AYjfl7kNpdnT/SK6Ga+7DUy2fQxAMmA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WCfbsqE3Rmf03txvCD4DMR0ugL2hywW2KxTwbvFn3Vw=; b=Dt4QvuwI1kPltl+9B4W6sAFdBJnZYpHOXEV+ZBj6KVJFBoYPzI7kYm5hXXgC8jvXQylMbjnwhDpShw3t4dQhNEsv0kQq1JqooxrtUh5PGiSaHNr4QzcZY2tICgaZINq75BAFUoQsXdEzm3wipkxZSh73XIbFbgsJ2TSOEu8SgqdbXP3H5UJZRSfa7pPtYk4QKKD+3lqFoHu9YlDVD0R18Uw7RYOtaYhUujpix5xHRgaEKeDCcEe28mO9lVCtdpF+oiTNWxvlh4fKel6XfHUcjvSavsWzU8sj4k5vObSfin7D+2Se26LF7eMtLjcY/56qeGTyEf7UrVhvpk05nf9VFA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AS4PR04MB9576.eurprd04.prod.outlook.com (2603:10a6:20b:4fe::12) by GVXPR04MB10047.eurprd04.prod.outlook.com (2603:10a6:150:117::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.14; Fri, 20 Dec 2024 12:36:06 +0000 Received: from AS4PR04MB9576.eurprd04.prod.outlook.com ([fe80::9cf2:8eae:c3d1:2f30]) by AS4PR04MB9576.eurprd04.prod.outlook.com ([fe80::9cf2:8eae:c3d1:2f30%4]) with mapi id 15.20.8272.005; Fri, 20 Dec 2024 12:36:05 +0000 From: Laurentiu Palcu To: =?utf-8?q?Niklas_S=C3=B6derlund?= , Mauro Carvalho Chehab , Greg Kroah-Hartman Cc: Laurentiu Palcu , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH v3 2/3] staging: media: max96712: remove extra debug register flag Date: Fri, 20 Dec 2024 14:35:49 +0200 Message-Id: <20241220123551.696330-3-laurentiu.palcu@oss.nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241220123551.696330-1-laurentiu.palcu@oss.nxp.com> References: <20241220123551.696330-1-laurentiu.palcu@oss.nxp.com> X-ClientProxiedBy: AM0PR10CA0087.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:15::40) To AS4PR04MB9576.eurprd04.prod.outlook.com (2603:10a6:20b:4fe::12) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4PR04MB9576:EE_|GVXPR04MB10047:EE_ X-MS-Office365-Filtering-Correlation-Id: d44e4c08-d188-4091-5cdb-08dd20f2df60 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: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qGKs65iZtGQQUng7hBdDS4kJzUsO8Ok8V4kS1knJbPF/?= =?utf-8?q?E5DX5fTY0MW+xG+bEtpBpb7mMJYQJ2uRZYiRpeCiruT6/zX6B+UzwKnOucpROEytu?= =?utf-8?q?a7AWw7BGwmKHlHIaJ6POY4edzHewhD5wcx5HnynYKgw6GV1rPyYzvFSPb/5WPFvdb?= =?utf-8?q?doQ24lORDRO38xiwSWbTpi0aMjSQXusCQUQTU/OUoNTN07gzKKL65fYIeBkZmA4k9?= =?utf-8?q?FNENTkOjJtpvYR1D54Aj7WBu7bWa5G6p6q3gaz1pWCIIECISE+/89XIsNAToHTH2E?= =?utf-8?q?L4Q7gmmWoMMdJmRieZOODHgGMa4y7t+nNXmUy7qZF7d3A1TeJKUDlsMcf8G2x5AHv?= =?utf-8?q?Rese4R/F9+18xL52/v1H5TqWRcQ0aKXuJIGZWU7htkDrHLbYpiV4cOA+SfZsZcbeZ?= =?utf-8?q?xQA726FOsXbxXPoQam0xXiPItjjMnP6mtSmvrmVCcFqxZLT3QivEl2c+n4ABGZYqN?= =?utf-8?q?XF4q51P4owgf?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS4PR04MB9576.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?qX5mFIcNvTTAoMkJ1bl05bU5444p?= =?utf-8?q?5AoO3BzB4+WsSjBTAgguyi8zJopNMlHJFlYLqJF4CpS1ArMn/pbNnrF5Vx3ZGXwSy?= =?utf-8?q?d4qwcmz3fZWbB32U9ufBbvRL4w4eHEE8wB0/dQ+e+mIkllU/VCE9AUz/fLgLu66P9?= =?utf-8?q?/Iit/7ighnLuwkT1eb97n/f9KJd5ZaMNLHhbva0CX3P60eAfzB5vg7Uwj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oFdt?= =?utf-8?q?MNhmqK14M2xmz1SvTELaom96iC9oF+Dgw+yHs0NGTmiianJADwAmH9SETachtMhDv?= =?utf-8?q?lBZVyno2BaE9OVCRr0jDMLUa1JuOI0D7Gn+iRgfup1czi9KD3cLzQjXDZHO75t3F1?= =?utf-8?q?QrfSRV9dgLMrTnqETYTy/J20NAD2eWDtLeZIviY2gvYqjZy1AZrjBjNKAi4SbxNi8?= =?utf-8?q?3oSVEhLUERQ2o/iRkuXa+640U7+wf6SOV+Jyqx+acZz3NCRQUcC4UNUFnk+HiDrqR?= =?utf-8?q?QRkmtMTgp0u2bV0dT/7PGdboqmmsejfB1NINAjftjRfvvY8OnIjVZ8PyP+bd9eo2e?= =?utf-8?q?fJSUOzWrSzYWe6uRt1LB2qkgEDchfWGXkcyecN8asHRbHbR72zhpmagRlmAKXZRgO?= =?utf-8?q?TXazS1RCpB9tv+Cw6jI7MzQYHIRfMCwq7GgTe9pmUxkfI9MJFe+qkt1Zv8koIfpqY?= =?utf-8?q?61JpFw4ews0Cql0yARiEQ5XIY8EscqIGdw=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d44e4c08-d188-4091-5cdb-08dd20f2df60 X-MS-Exchange-CrossTenant-AuthSource: AS4PR04MB9576.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2024 12:36:05.9429 (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: rGtnrb7xwEHu3jgaBUAJBrV+XdbNYAp3jUc/LotHNgX8aq+P/9mu54E3GLxA4MeD89IJNQVdQ5ZdubjTwU3x/w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB10047 The current implementation has the register disabled since it is not documented in the MAX96724 RM. However, in the chip's user's guide [1], in the Video Pattern Generator section, the register is documented and it appears to work just fine. Before the change I was experiencing approx 10fps when streaming, after: 30.3fps. Hence, since both max96712 and max96724 have the register, we can remove the flag. [1] https://www.analog.com/media/en/technical-documentation/user-guides/max96724fr-user-guide.pdf Signed-off-by: Laurentiu Palcu Reviewed-by: Niklas Söderlund --- drivers/staging/media/max96712/max96712.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/media/max96712/max96712.c b/drivers/staging/media/max96712/max96712.c index 5228f9ec60859..ed4d5db1ff8d1 100644 --- a/drivers/staging/media/max96712/max96712.c +++ b/drivers/staging/media/max96712/max96712.c @@ -27,7 +27,6 @@ enum max96712_pattern { struct max96712_info { unsigned int dpllfreq; - bool have_debug_extra; }; struct max96712_priv { @@ -174,9 +173,7 @@ static void max96712_pattern_enable(struct max96712_priv *priv, bool enable) return; } - /* Set PCLK to 75MHz if device have DEBUG_EXTRA register. */ - if (priv->info->have_debug_extra) - max96712_write(priv, DEBUG_EXTRA_REG, DEBUG_EXTRA_PCLK_75MHZ); + max96712_write(priv, DEBUG_EXTRA_REG, DEBUG_EXTRA_PCLK_75MHZ); /* Configure Video Timing Generator for 1920x1080 @ 30 fps. */ max96712_write_bulk_value(priv, 0x1052, 0, 3); @@ -457,7 +454,6 @@ static void max96712_remove(struct i2c_client *client) static const struct max96712_info max96712_info_max96712 = { .dpllfreq = 1000, - .have_debug_extra = true, }; static const struct max96712_info max96712_info_max96724 = { From patchwork Fri Dec 20 12:35:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurentiu Palcu X-Patchwork-Id: 13916689 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2056.outbound.protection.outlook.com [40.107.247.56]) (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 0D09F215700; Fri, 20 Dec 2024 12:36:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.247.56 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734698174; cv=fail; b=MSeoXdJm3qO8wUeo4RzjHc6sXyRHdZZcFYfC0hUFLY9+XWOALHaDfRbEzn8gM3GIrdaPY6PfXqoyjTCOMyCMoO9ekw15o1fkAi61z84p1OxLxO6qPc6b5JRmKWzpRm24/pH2hO9HxPE7KlgZN0Kc8VEG1tdsyABdGv96gjTYnr0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734698174; c=relaxed/simple; bh=d7rx16iuunYyzwYqV5f76SdIYc6rma3RKAlhk1WP09Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=mREozNCkSNNOZZztiAyfwUH+qQP+nv7lBYPa/LTENa/yj+En6oQziM75je63iWUAjHdXDjnHDPrm6yrXfYTYYyF2AtBl0IpUws8tklNaz7A5cbVREe3Sr8dmEIxjw9MXAyRXqIbqdt5PhIFtY+EnqW2pJSf9wOst8yOl1CePQG8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=i1SdScFi; arc=fail smtp.client-ip=40.107.247.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="i1SdScFi" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=RqQQ68d7eYqtRJQZvyEh63W2yVWx1N/8YHrJHCBNAjTm9Bkppy8KSMbn9Am+c+9iasW+wgChtTk2XBXGebEBQrXcRW+JQwDcU08uXZNA00bO7hLo6St3FMzVnQwRBMJ4bh+/7CXa2st2EwNicSiS7KZ8H6xMswNK6HFSIr50vRqqldUzzjb0MrLebDB3Fp9MKcZwkIgfWIbrAGEAPnoa38R9xbPpecGAN87F4WGE67VJUJrhocKgkwZ/SJ8me3aufc6tw9gA8Rouc7sp6GHmbykDLe+w1jtV8s2sAZH4nwKFMQ3gOFaXZKI9SgfKUGEm36ZDhXrnUS7iAux/92xIbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=5mepgUvYk1Ss+E7HkK/KQ1om12+km3pIIRhGaSIFfhY=; b=SF/OpHsNthOi1eKOFy2AbEcl8/XWDHAV7wzv0C+5u2azJ1wX++F68v7EGJ0cjwQmFma2OeNWc8O0Er4HhM1DTXhCTmedoheajNBz/bRNBN0v8+5xJq+Zucy9Tn3qI57tznqfRsVM7grkUpk1o80kiuMEauf3ao0RE9yRG+CGHtPno2mvMipmuGX6wKVPhtkDnVF4PAWmunWwGs5P4em8gKXJvYb0ti27N5LtahNDRRttCPHxuB1jiMu83dJ+M11Pu109mn5ik5V3ce8q+SECyfCNWcWY+8i/BulCHELcEO4velKDnzsZYmBF7F23gRBT8FUZW2vJPvijsLw5pVXAsA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5mepgUvYk1Ss+E7HkK/KQ1om12+km3pIIRhGaSIFfhY=; b=i1SdScFinchwyzY/fAqdhJe7gx5XJNCegn/+2s2NkViyaVffhtc2OwwHLWWfbkprdIU29D7pEnzrECk+E2C+E++pIMca4rlEzRXkZZ9/sHn264e6pTuR2fnfFAOYOEUBgVQISiSsf0A0fkT8d8nsPNfsfVf9u2ov0vFjzkOcYxNo1SBE9IOf9DpKPorrMbOhYKrN6ozwPMpU5yDvd+BlUTsh1PyJNcjHOBF/+FKIXc+RkqRUbGVSNwmffOf6dUm9pxGWlcj37XDjpnUiZIGXhMDxhJR1P41Mj6ovKY+eFwYjPszytX6wWYSgdn7nK42JEoWOx7kF+9o6ti719CslTQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AS4PR04MB9576.eurprd04.prod.outlook.com (2603:10a6:20b:4fe::12) by GVXPR04MB10047.eurprd04.prod.outlook.com (2603:10a6:150:117::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.14; Fri, 20 Dec 2024 12:36:08 +0000 Received: from AS4PR04MB9576.eurprd04.prod.outlook.com ([fe80::9cf2:8eae:c3d1:2f30]) by AS4PR04MB9576.eurprd04.prod.outlook.com ([fe80::9cf2:8eae:c3d1:2f30%4]) with mapi id 15.20.8272.005; Fri, 20 Dec 2024 12:36:08 +0000 From: Laurentiu Palcu To: =?utf-8?q?Niklas_S=C3=B6derlund?= , Mauro Carvalho Chehab , Greg Kroah-Hartman Cc: Laurentiu Palcu , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH v3 3/3] staging: media: max96712: add some register and field definitions Date: Fri, 20 Dec 2024 14:35:50 +0200 Message-Id: <20241220123551.696330-4-laurentiu.palcu@oss.nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241220123551.696330-1-laurentiu.palcu@oss.nxp.com> References: <20241220123551.696330-1-laurentiu.palcu@oss.nxp.com> X-ClientProxiedBy: AM0PR10CA0094.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:15::47) To AS4PR04MB9576.eurprd04.prod.outlook.com (2603:10a6:20b:4fe::12) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4PR04MB9576:EE_|GVXPR04MB10047:EE_ X-MS-Office365-Filtering-Correlation-Id: 5255676f-3e32-44e2-eb22-08dd20f2e0a7 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?i5GtbyEKm+U+2IdOr3Z7y2aZ/IMZLir?= =?utf-8?q?9zSiv6g0H5fNomCsJ9j4OhWhROqiGJOcaNLooj9vB+7uZNa1+6yNRqrnbVcqGrAc9?= =?utf-8?q?d3pjt34PMMra3lTWbttn4B/iqBPSPf7ICgaS3jcpkmP0Ovca9YA+ru2KyJzD4RagA?= =?utf-8?q?VqKzALLy74tQnqtKn2V0s4aW64BJCeE2a4geuS1EuV7rXHJG0FeRg9K4XpVWoSmSS?= =?utf-8?q?oxgMSb51z9fWCUrjVDU0c+pPsX1jY68pzf19+HUG0s5YPVCmgENVxpq1h16yY3NJ1?= =?utf-8?q?G9RDCpltF8O3KaT11Ud3XLuj8UArwNm0gVN2Hpj2KxXoRoZRSTNdnNtdKlRGD9Saf?= =?utf-8?q?0zYUqQbC9fxFAaeILe8d2Jd5ZkAIlWfJuJGO4auRv8AEkuFvZTxe+qXX576n81b2P?= =?utf-8?q?5Rumz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julYHDYT0deTy06+jZyc/tNOLwAioUXjZlaOAK63Ljxke/EXI?= =?utf-8?q?LcZmnqyoSIJk?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS4PR04MB9576.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?f8g8a0R3OoY2EQqedBYmgKqEOBFS?= =?utf-8?q?ydkZyHSdctQDeBlEulpKja6u0Q0eOnaelV4/V7sGVyPFWnbDJ77NQtu2nHiuFeDMP?= =?utf-8?q?kLw7dLD1e9bN1l42rKMx32OvkV7OhAsIm5pTXCC6G/Ubm2z+1oH3CTluyhzICPXwo?= =?utf-8?q?pIcLh+qx/3mcmj1lF70c0ihdZfUlkugovf59uEwUd8Ng8RW6ZETM53VxFMhpQs0qa?= =?utf-8?q?vA5n0v7Jcqjh2YAeIQY58KbQIwU31sw1pt9/lh6RJOOXKAYtTqGLjKUSV8AavhZY9?= =?utf-8?q?d41/rik/JzvjDK1kyDzEkiS2aXembhjNLa7uGORC5/aiPdscpZeKENkzKQwEjB7Pj?= =?utf-8?q?E7DnSO8jp6z9vhDItli1NSmsFQNdFZ6tF5YFmoB+56JcJXCZoEZUWzSqSTuOuurq8?= =?utf-8?q?ix8btfJgUOM5xd2fvJtSd0r40udn/rU4xRGeXUWDQd3AfYud5lIMAgz1apGFk3RmW?= =?utf-8?q?biPvBZ3+HKRpR1t4zHrVg/4K1t/MloJxVKZ08QvkyO8Nl7/nxHphj5geApnDZ+SfP?= =?utf-8?q?4i9W18+s7AYnvZbL8eJaf2zWpPanpVgzybdTbUAB/lYU/H50MWSE4AfVMXBQG4ILx?= =?utf-8?q?svHFEhxt01N6J5g+cJFf5Rq1dy1vORxLgWjS8uULsgeYXtUYddMrtQqw48b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Qg9w4BRCPAwnwnugA9/LfM2v0CoiE?= =?utf-8?q?EyFiguPiE8K90VWQtxSwQQB9o/NIwrU/sA=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5255676f-3e32-44e2-eb22-08dd20f2e0a7 X-MS-Exchange-CrossTenant-AuthSource: AS4PR04MB9576.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2024 12:36:08.1294 (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: ye5iJTi/nGHVV3Z186I0aaAhEA6Fz7ZS/dTJttrFUnzWaYp5NnBp5wAxl6iyFfuDxBD0bHt80L4UxJ2AlS4lqQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB10047 Most of the registers in the driver, and their values, are hard-coded which makes the code rather difficult to read and maintain. Add register and field definitions and use them to replace the hard-coded values where possible. This patch does not change the driver functionality or its structure. Signed-off-by: Laurentiu Palcu Reviewed-by: Niklas Söderlund --- drivers/staging/media/max96712/max96712.c | 207 +++++++++++++++++----- 1 file changed, 163 insertions(+), 44 deletions(-) diff --git a/drivers/staging/media/max96712/max96712.c b/drivers/staging/media/max96712/max96712.c index ed4d5db1ff8d1..47842facec125 100644 --- a/drivers/staging/media/max96712/max96712.c +++ b/drivers/staging/media/max96712/max96712.c @@ -16,9 +16,118 @@ #include #include -#define DEBUG_EXTRA_REG 0x09 -#define DEBUG_EXTRA_PCLK_25MHZ 0x00 -#define DEBUG_EXTRA_PCLK_75MHZ 0x01 +/* TOP_CTRL */ +#define MAX96712_DEBUG_EXTRA_REG 0x0009 +#define DEBUG_EXTRA_PCLK_25MHZ 0x00 +#define DEBUG_EXTRA_PCLK_75MHZ 0x01 +#define MAX96724_TOP_CTRL_PWR1 0x0013 +#define RESET_ALL BIT(6) + +/* BACKTOP0 */ +#define MAX96712_BACKTOP0_12 0x040b +#define CSI_OUT_EN BIT(1) +#define SOFT_BPP_0_MASK GENMASK(7, 3) +#define SOFT_BPP_0_SHIFT 3 +#define MAX96712_BACKTOP0_22 0x0415 +#define MAX96712_BACKTOP0_25 0x0418 +#define PHY_CSI_TX_DPLL_PREDEF_FREQ_MASK GENMASK(4, 0) +#define PHY_CSI_TX_DPLL_PREDEF_FREQ_SHIFT 0 +#define PHY_CSI_TX_DPLL_FB_FRACTION_PREDEF_EN BIT(5) +#define OVERRIDE_BPP_VC_DT_0_2 BIT(6) +#define OVERRIDE_BPP_VC_DT_1_3 BIT(7) + +/* MIPI_PHY */ +#define MAX96712_MIPI_PHY_0 0x08a0 +#define PHY_4X2 BIT(0) +#define PHY_2X4 BIT(2) +#define PHY_1X4A_22 BIT(3) +#define PHY_1X4B_22 BIT(4) +#define FORCE_CLK0_EN BIT(5) +#define FORCE_CLK3_EN BIT(6) +#define FORCE_CSI_OUT_EN BIT(7) +#define MAX96712_MIPI_PHY_2 0x08a2 +#define T_HS_TRAIL_MASK GENMASK(1, 0) +#define T_HS_TRAIL_SHIFT 0 +#define T_LPX_MASK GENMASK(3, 2) +#define T_LPX_SHIFT 2 +#define PHY_STDBY_N_MASK GENMASK(7, 4) +#define PHY_STDBY_N_SHIFT 4 +#define PHY0_EN BIT(4) +#define PHY1_EN BIT(5) +#define PHY2_EN BIT(6) +#define PHY3_EN BIT(7) +#define MAX96712_MIPI_PHY_3 0x08a3 +#define PHY0_LANE_MAP_MASK GENMASK(3, 0) +#define PHY0_LANE_MAP_SHIFT 0 +#define PHY1_LANE_MAP_MASK GENMASK(7, 4) +#define PHY1_LANE_MAP_SHIFT 4 +#define MAX96712_MIPI_PHY_5 0x08a5 +#define PHY0_POL_MAP_MASK GENMASK(2, 0) +#define PHY0_POL_MAP_SHIFT 0 +#define PHY1_POL_MAP_MASK GENMASK(5, 3) +#define PHY1_POL_MAP_SHIFT 3 +#define T_CLK_PREP_MASK GENMASK(7, 6) +#define T_CLK_PREP_SHIFT 6 +#define MAX96712_MIPI_PHY_13 0x08ad +#define T_T3_PREBEGIN_MASK GENMASK(5, 0) +#define T_T3_PREBEGIN_SHIFT 0 +#define MAX96712_MIPI_PHY_14 0x08ae +#define T_T3_PREP_MASK GENMASK(1, 0) +#define T_T3_PREP_SHIFT 0 +#define T_T3_PREP_40NS 0 +#define T_T3_PREP_55NS 1 +#define T_T3_PREP_66_7NS 2 +#define T_T3_PREP_86_7NS 3 +#define T_T3_POST_MASK GENMASK(6, 2) +#define T_T3_POST_SHIFT 2 + +/* MIPI_TX: 0 <= phy < 4 */ +#define MAX96712_MIPI_TX_10(phy) (0x090a + (phy) * 0x40) +#define CSI2_TWAKEUP_H_MASK GENMASK(2, 0) +#define CSI2_TWAKEUP_H_SHIFT 0 +#define CSI2_VCX_EN BIT(4) +#define CSI2_CPHY_EN BIT(5) +#define CSI2_LANE_CNT_MASK GENMASK(7, 6) +#define CSI2_LANE_CNT_SHIFT 6 + +/* VRX_PATGEN */ +#define MAX96712_VRX_PATGEN_0 0x1050 +#define VTG_MODE_MASK GENMASK(1, 0) +#define VTG_MODE_SHIFT 0 +#define VTG_MODE_VS_TRACKING 0 +#define VTG_MODE_VS_TRIGGER 1 +#define VTG_MODE_AUTO_REPEAT 2 +#define VTG_MODE_FREE_RUNNING 3 +#define DE_INV BIT(2) +#define HS_INV BIT(3) +#define VS_INV BIT(4) +#define GEN_DE BIT(5) +#define GEN_HS BIT(6) +#define GEN_VS BIT(7) +#define MAX96712_VRX_PATGEN_1 0x1051 +#define VS_TRIG BIT(0) +#define PATGEN_MODE_MASK GENMASK(5, 4) +#define PATGEN_MODE_SHIFT 4 +#define PATGEN_MODE_CHECKERBOARD (1 << PATGEN_MODE_SHIFT) +#define PATGEN_MODE_GRADIENT (2 << PATGEN_MODE_SHIFT) +#define GRAD_MODE BIT(7) +#define MAX96712_VRX_PATGEN_VS_DLY 0x1052 +#define MAX96712_VRX_PATGEN_VS_HIGH 0x1055 +#define MAX96712_VRX_PATGEN_VS_LOW 0x1058 +#define MAX96712_VRX_PATGEN_V2H 0x105b +#define MAX96712_VRX_PATGEN_HS_HIGH 0x105e +#define MAX96712_VRX_PATGEN_HS_LOW 0x1060 +#define MAX96712_VRX_PATGEN_HS_CNT 0x1062 +#define MAX96712_VRX_PATGEN_V2D 0x1064 +#define MAX96712_VRX_PATGEN_DE_HIGH 0x1067 +#define MAX96712_VRX_PATGEN_DE_LOW 0x1069 +#define MAX96712_VRX_PATGEN_DE_CNT 0x106b +#define MAX96712_VRX_PATGEN_GRAD_INCR 0x106d +#define MAX96712_VRX_PATGEN_CHKR_COLOR_A 0x106e +#define MAX96712_VRX_PATGEN_CHKR_COLOR_B 0x1071 +#define MAX96712_VRX_PATGEN_CHKR_RPT_A 0x1074 +#define MAX96712_VRX_PATGEN_CHKR_RPT_B 0x1075 +#define MAX96712_VRX_PATGEN_CHKR_ALT 0x1076 enum max96712_pattern { MAX96712_PATTERN_CHECKERBOARD = 0, @@ -96,18 +205,18 @@ static int max96712_write_bulk_value(struct max96712_priv *priv, static void max96712_reset(struct max96712_priv *priv) { - max96712_update_bits(priv, 0x13, 0x40, 0x40); + max96712_update_bits(priv, MAX96724_TOP_CTRL_PWR1, RESET_ALL, RESET_ALL); msleep(20); } static void max96712_mipi_enable(struct max96712_priv *priv, bool enable) { if (enable) { - max96712_update_bits(priv, 0x40b, 0x02, 0x02); - max96712_update_bits(priv, 0x8a0, 0x80, 0x80); + max96712_update_bits(priv, MAX96712_BACKTOP0_12, CSI_OUT_EN, CSI_OUT_EN); + max96712_update_bits(priv, MAX96712_MIPI_PHY_0, FORCE_CSI_OUT_EN, FORCE_CSI_OUT_EN); } else { - max96712_update_bits(priv, 0x8a0, 0x80, 0x00); - max96712_update_bits(priv, 0x40b, 0x02, 0x00); + max96712_update_bits(priv, MAX96712_MIPI_PHY_0, FORCE_CSI_OUT_EN, 0x00); + max96712_update_bits(priv, MAX96712_BACKTOP0_12, CSI_OUT_EN, 0x00); } } @@ -119,39 +228,47 @@ static void max96712_mipi_configure(struct max96712_priv *priv) max96712_mipi_enable(priv, false); /* Select 2x4 mode. */ - max96712_write(priv, 0x8a0, 0x04); + max96712_write(priv, MAX96712_MIPI_PHY_0, PHY_2X4); /* TODO: Add support for 2-lane and 1-lane configurations. */ if (priv->cphy) { - /* Configure a 3-lane C-PHY using PHY0 and PHY1. */ - max96712_write(priv, 0x94a, 0xa0); + /* Configure a 3-lane C-PHY using PHY1. */ + max96712_write(priv, MAX96712_MIPI_TX_10(1), + (2 << CSI2_LANE_CNT_SHIFT) | CSI2_CPHY_EN); /* Configure C-PHY timings. */ - max96712_write(priv, 0x8ad, 0x3f); - max96712_write(priv, 0x8ae, 0x7d); + max96712_write(priv, MAX96712_MIPI_PHY_13, 0x3f); + max96712_write(priv, MAX96712_MIPI_PHY_14, + (0x1f << T_T3_POST_SHIFT) | T_T3_PREP_55NS); } else { - /* Configure a 4-lane D-PHY using PHY0 and PHY1. */ - max96712_write(priv, 0x94a, 0xc0); + /* Configure a 4-lane D-PHY using PHY1. */ + max96712_write(priv, MAX96712_MIPI_TX_10(1), 3 << CSI2_LANE_CNT_SHIFT); } /* Configure lane mapping for PHY0 and PHY1. */ /* TODO: Add support for lane swapping. */ - max96712_write(priv, 0x8a3, 0xe4); + max96712_write(priv, MAX96712_MIPI_PHY_3, 0xe4); /* Configure lane polarity for PHY0 and PHY1. */ for (i = 0; i < priv->mipi.num_data_lanes + 1; i++) if (priv->mipi.lane_polarities[i]) phy5 |= BIT(i == 0 ? 5 : i < 3 ? i - 1 : i); - max96712_write(priv, 0x8a5, phy5); + max96712_write(priv, MAX96712_MIPI_PHY_5, phy5); /* Set link frequency for PHY0 and PHY1. */ - max96712_update_bits(priv, 0x415, 0x3f, - ((priv->info->dpllfreq / 100) & 0x1f) | BIT(5)); - max96712_update_bits(priv, 0x418, 0x3f, - ((priv->info->dpllfreq / 100) & 0x1f) | BIT(5)); + max96712_update_bits(priv, MAX96712_BACKTOP0_22, + PHY_CSI_TX_DPLL_FB_FRACTION_PREDEF_EN | + PHY_CSI_TX_DPLL_PREDEF_FREQ_MASK, + PHY_CSI_TX_DPLL_FB_FRACTION_PREDEF_EN | + ((priv->info->dpllfreq / 100) & 0x1f)); + max96712_update_bits(priv, MAX96712_BACKTOP0_25, + PHY_CSI_TX_DPLL_FB_FRACTION_PREDEF_EN | + PHY_CSI_TX_DPLL_PREDEF_FREQ_MASK, + PHY_CSI_TX_DPLL_FB_FRACTION_PREDEF_EN | + ((priv->info->dpllfreq / 100) & 0x1f)); /* Enable PHY0 and PHY1 */ - max96712_update_bits(priv, 0x8a2, 0xf0, 0x30); + max96712_update_bits(priv, MAX96712_MIPI_PHY_2, PHY_STDBY_N_MASK, PHY0_EN | PHY1_EN); } static void max96712_pattern_enable(struct max96712_priv *priv, bool enable) @@ -169,49 +286,51 @@ static void max96712_pattern_enable(struct max96712_priv *priv, bool enable) const u32 v_tot = v_active + v_fp + v_sw + v_bp; if (!enable) { - max96712_write(priv, 0x1051, 0x00); + max96712_write(priv, MAX96712_VRX_PATGEN_1, 0x00); return; } - max96712_write(priv, DEBUG_EXTRA_REG, DEBUG_EXTRA_PCLK_75MHZ); + max96712_write(priv, MAX96712_DEBUG_EXTRA_REG, DEBUG_EXTRA_PCLK_75MHZ); /* Configure Video Timing Generator for 1920x1080 @ 30 fps. */ - max96712_write_bulk_value(priv, 0x1052, 0, 3); - max96712_write_bulk_value(priv, 0x1055, v_sw * h_tot, 3); - max96712_write_bulk_value(priv, 0x1058, + max96712_write_bulk_value(priv, MAX96712_VRX_PATGEN_VS_DLY, 0, 3); + max96712_write_bulk_value(priv, MAX96712_VRX_PATGEN_VS_HIGH, v_sw * h_tot, 3); + max96712_write_bulk_value(priv, MAX96712_VRX_PATGEN_VS_LOW, (v_active + v_fp + v_bp) * h_tot, 3); - max96712_write_bulk_value(priv, 0x105b, 0, 3); - max96712_write_bulk_value(priv, 0x105e, h_sw, 2); - max96712_write_bulk_value(priv, 0x1060, h_active + h_fp + h_bp, 2); - max96712_write_bulk_value(priv, 0x1062, v_tot, 2); - max96712_write_bulk_value(priv, 0x1064, + max96712_write_bulk_value(priv, MAX96712_VRX_PATGEN_V2H, 0, 3); + max96712_write_bulk_value(priv, MAX96712_VRX_PATGEN_HS_HIGH, h_sw, 2); + max96712_write_bulk_value(priv, MAX96712_VRX_PATGEN_HS_LOW, h_active + h_fp + h_bp, 2); + max96712_write_bulk_value(priv, MAX96712_VRX_PATGEN_HS_CNT, v_tot, 2); + max96712_write_bulk_value(priv, MAX96712_VRX_PATGEN_V2D, h_tot * (v_sw + v_bp) + (h_sw + h_bp), 3); - max96712_write_bulk_value(priv, 0x1067, h_active, 2); - max96712_write_bulk_value(priv, 0x1069, h_fp + h_sw + h_bp, 2); - max96712_write_bulk_value(priv, 0x106b, v_active, 2); + max96712_write_bulk_value(priv, MAX96712_VRX_PATGEN_DE_HIGH, h_active, 2); + max96712_write_bulk_value(priv, MAX96712_VRX_PATGEN_DE_LOW, h_fp + h_sw + h_bp, 2); + max96712_write_bulk_value(priv, MAX96712_VRX_PATGEN_DE_CNT, v_active, 2); /* Generate VS, HS and DE in free-running mode. */ - max96712_write(priv, 0x1050, 0xfb); + max96712_write(priv, MAX96712_VRX_PATGEN_0, + GEN_VS | GEN_HS | GEN_DE | VS_INV | HS_INV | + (VTG_MODE_FREE_RUNNING << VTG_MODE_SHIFT)); /* Configure Video Pattern Generator. */ if (priv->pattern == MAX96712_PATTERN_CHECKERBOARD) { /* Set checkerboard pattern size. */ - max96712_write(priv, 0x1074, 0x3c); - max96712_write(priv, 0x1075, 0x3c); - max96712_write(priv, 0x1076, 0x3c); + max96712_write(priv, MAX96712_VRX_PATGEN_CHKR_RPT_A, 0x3c); + max96712_write(priv, MAX96712_VRX_PATGEN_CHKR_RPT_B, 0x3c); + max96712_write(priv, MAX96712_VRX_PATGEN_CHKR_ALT, 0x3c); /* Set checkerboard pattern colors. */ - max96712_write_bulk_value(priv, 0x106e, 0xfecc00, 3); - max96712_write_bulk_value(priv, 0x1071, 0x006aa7, 3); + max96712_write_bulk_value(priv, MAX96712_VRX_PATGEN_CHKR_COLOR_A, 0xfecc00, 3); + max96712_write_bulk_value(priv, MAX96712_VRX_PATGEN_CHKR_COLOR_B, 0x006aa7, 3); /* Generate checkerboard pattern. */ - max96712_write(priv, 0x1051, 0x10); + max96712_write(priv, MAX96712_VRX_PATGEN_1, PATGEN_MODE_CHECKERBOARD); } else { /* Set gradient increment. */ - max96712_write(priv, 0x106d, 0x10); + max96712_write(priv, MAX96712_VRX_PATGEN_GRAD_INCR, 0x10); /* Generate gradient pattern. */ - max96712_write(priv, 0x1051, 0x20); + max96712_write(priv, MAX96712_VRX_PATGEN_1, PATGEN_MODE_GRADIENT); } }