From patchwork Thu Apr 6 17:34:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 672000 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 6BCCFC76196 for ; Thu, 6 Apr 2023 17:36:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239286AbjDFRgC (ORCPT ); Thu, 6 Apr 2023 13:36:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239223AbjDFRf6 (ORCPT ); Thu, 6 Apr 2023 13:35:58 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54960AF0A for ; Thu, 6 Apr 2023 10:35:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680802535; x=1712338535; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=cx4hJ5DRhTiFqQAPxUDHiiimx5je5rn1rrZ/kTHSHJY=; b=dOkNncmcpvWLPunCH8gqrnCy1iN/Nm0zdi49TTkODbRVYB/KXThaibOG PbYHvY40w1aAdgazt1KlcMxLRSUz2mnudUBMHOfgRfygQIuzd8Omb//Kr eN1ABS8mjjFPm9udX0xlFwch5hEloXB8asQr/aYjw00Vncr4s9Kcnf77j LGyIr/pIV1KDrVG0zwu6M6rNSbCVZfVzOpjXviUzMzsskq4/g1SGcYtF5 BPH8rASE6Q/AGVsv4JG4FPvXiB4mtuHBxN08TJJvLaul1spI5LwxqHVVG nImLGpCO9pDVUao6Laank3ujYjm/yfPCqblgQTiPkcpjjQOkUWFD7v0tu A==; X-IronPort-AV: E=McAfee;i="6600,9927,10672"; a="370629611" X-IronPort-AV: E=Sophos;i="5.98,323,1673942400"; d="scan'208";a="370629611" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2023 10:34:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10672"; a="664558662" X-IronPort-AV: E=Sophos;i="5.98,323,1673942400"; d="scan'208";a="664558662" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2023 10:34:32 -0700 Received: from svinhufvud.ger.corp.intel.com (localhost [IPv6:::1]) by kekkonen.fi.intel.com (Postfix) with ESMTP id C41331228AB for ; Thu, 6 Apr 2023 20:34:30 +0300 (EEST) From: Sakari Ailus To: linux-media@vger.kernel.org Subject: [PATCH 1/4] media: ccs: Support 16-bit sensor revision number register Date: Thu, 6 Apr 2023 20:34:25 +0300 Message-Id: <20230406173428.19855-2-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230406173428.19855-1-sakari.ailus@linux.intel.com> References: <20230406173428.19855-1-sakari.ailus@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Read 16-bit sensor revision number if the 8-bit register has value 0. Signed-off-by: Sakari Ailus --- drivers/media/i2c/ccs/ccs-core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c index daee36c1f545..4adb2da34066 100644 --- a/drivers/media/i2c/ccs/ccs-core.c +++ b/drivers/media/i2c/ccs/ccs-core.c @@ -2834,6 +2834,10 @@ static int ccs_identify_module(struct ccs_sensor *sensor) rval = ccs_read_addr_8only(sensor, CCS_R_SENSOR_REVISION_NUMBER, &minfo->sensor_revision_number); + if (!rval && !minfo->sensor_revision_number) + rval = ccs_read_addr_8only(sensor, + CCS_R_SENSOR_REVISION_NUMBER_16, + &minfo->sensor_revision_number); if (!rval) rval = ccs_read_addr_8only(sensor, CCS_R_SENSOR_FIRMWARE_VERSION, @@ -2876,7 +2880,7 @@ static int ccs_identify_module(struct ccs_sensor *sensor) minfo->sensor_model_id); dev_dbg(&client->dev, - "sensor revision 0x%2.2x firmware version 0x%2.2x\n", + "sensor revision 0x%4.4x firmware version 0x%2.2x\n", minfo->sensor_revision_number, minfo->sensor_firmware_version); if (minfo->ccs_version) { From patchwork Thu Apr 6 17:34:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 670929 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 EDBC5C7618D for ; Thu, 6 Apr 2023 17:36:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239393AbjDFRgD (ORCPT ); Thu, 6 Apr 2023 13:36:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229927AbjDFRf7 (ORCPT ); Thu, 6 Apr 2023 13:35:59 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 010D19768 for ; Thu, 6 Apr 2023 10:35:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680802537; x=1712338537; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=EGAnERw9wu6igTvBuTfIcoLxjvuZfNqDfYfVy72b5KY=; b=eXosQZXreLE0X3LK+WPTqpxVn8q4V9i3XVmoIJ3EpyNy+/Rk6SYLB3Mq txlnxu+M4sP6a8FqVpIgf1hhWdgCrmm5f1uCe0nnuCEZGqeDEljoBS/gX Py9LVk0WCzootu0E1jPnj3dhH+LpsPZKCqOIVsNdMDWzIISIc/dstLjpK UaYY86XIHFGB749LsAitWojmAloFsJBYPOI8dgoSdV16KCxytYqpgekEA wjpBDLjgNCuvjAxHuOcAftugrmw1GamIIwS06kLh6x2cPU+YycR9eHA42 T1hfb4Y0VAQrLSy7Xi0jUvWs9ZJSQhxzSScc5tX/aXE+2LGAsvDU0qukx A==; X-IronPort-AV: E=McAfee;i="6600,9927,10672"; a="370629616" X-IronPort-AV: E=Sophos;i="5.98,323,1673942400"; d="scan'208";a="370629616" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2023 10:34:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10672"; a="664558668" X-IronPort-AV: E=Sophos;i="5.98,323,1673942400"; d="scan'208";a="664558668" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2023 10:34:33 -0700 Received: from svinhufvud.ger.corp.intel.com (localhost [IPv6:::1]) by kekkonen.fi.intel.com (Postfix) with ESMTP id AB42D122C27 for ; Thu, 6 Apr 2023 20:34:31 +0300 (EEST) From: Sakari Ailus To: linux-media@vger.kernel.org Subject: [PATCH 2/4] media: ccs: Apply module manufacturer hack on non-CCS devices only Date: Thu, 6 Apr 2023 20:34:26 +0300 Message-Id: <20230406173428.19855-3-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230406173428.19855-1-sakari.ailus@linux.intel.com> References: <20230406173428.19855-1-sakari.ailus@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Some modules don't have any model identification information in the register address space. The driver as a SMIA++ driver attempted to use sensor information in this case. This workaround is definitely not for CCS devices. Signed-off-by: Sakari Ailus --- drivers/media/i2c/ccs/ccs-core.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c index 4adb2da34066..20c3974f5ac7 100644 --- a/drivers/media/i2c/ccs/ccs-core.c +++ b/drivers/media/i2c/ccs/ccs-core.c @@ -2894,19 +2894,18 @@ static int ccs_identify_module(struct ccs_sensor *sensor) "smia version %2.2d smiapp version %2.2d\n", minfo->smia_version, minfo->smiapp_version); minfo->name = SMIAPP_NAME; - } - - /* - * Some modules have bad data in the lvalues below. Hope the - * rvalues have better stuff. The lvalues are module - * parameters whereas the rvalues are sensor parameters. - */ - if (minfo->sensor_smia_manufacturer_id && - !minfo->smia_manufacturer_id && !minfo->model_id) { - minfo->smia_manufacturer_id = - minfo->sensor_smia_manufacturer_id; - minfo->model_id = minfo->sensor_model_id; - minfo->revision_number = minfo->sensor_revision_number; + /* + * Some modules have bad data in the lvalues below. Hope the + * rvalues have better stuff. The lvalues are module + * parameters whereas the rvalues are sensor parameters. + */ + if (minfo->sensor_smia_manufacturer_id && + !minfo->smia_manufacturer_id && !minfo->model_id) { + minfo->smia_manufacturer_id = + minfo->sensor_smia_manufacturer_id; + minfo->model_id = minfo->sensor_model_id; + minfo->revision_number = minfo->sensor_revision_number; + } } for (i = 0; i < ARRAY_SIZE(ccs_module_idents); i++) { From patchwork Thu Apr 6 17:34:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 670928 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 5FD02C7618D for ; Thu, 6 Apr 2023 17:36:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239069AbjDFRgG (ORCPT ); Thu, 6 Apr 2023 13:36:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237436AbjDFRgA (ORCPT ); Thu, 6 Apr 2023 13:36:00 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E7CE9EF3 for ; Thu, 6 Apr 2023 10:35:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680802538; x=1712338538; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=gC/Ucm8/SfzwrvDVHjphzEdakh4YMcJbWGFE3d1nKYc=; b=QmJi/0pwawNPDIf3kLmMNuOhTpgMwzVjIDbmQkXTx/dVXXg40U3QWlwj h1XCtkp5WXfs1K20A4iyhp+YYynmO3DxQBGQ89bv1/H6mE6Vqy+Ghlb+H YQVKKscMOj0rzUOm70kTowLJrEHRyY3vcMjtaicw81bEaj4D+/CT/5Naq 7mr+jd42vzsvZ/fvbnVPDgM89EyDUlT5HgHpNH0lcFdeuRs5R+GzkBdy9 hN1fHvGWbMhgO+k2MOcwjqtNOi5ZhO4yMwwG9rG1QvRTcgjS5ee7avDmJ txi6tEYgp2E8GA+3G6mEBEv9RYkVvVbw/hQHh+L37TEQwBFFPjqu4C5ai w==; X-IronPort-AV: E=McAfee;i="6600,9927,10672"; a="370629623" X-IronPort-AV: E=Sophos;i="5.98,323,1673942400"; d="scan'208";a="370629623" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2023 10:34:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10672"; a="664558673" X-IronPort-AV: E=Sophos;i="5.98,323,1673942400"; d="scan'208";a="664558673" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2023 10:34:34 -0700 Received: from svinhufvud.ger.corp.intel.com (localhost [IPv6:::1]) by kekkonen.fi.intel.com (Postfix) with ESMTP id CE61C122D3A for ; Thu, 6 Apr 2023 20:34:32 +0300 (EEST) From: Sakari Ailus To: linux-media@vger.kernel.org Subject: [PATCH 3/4] media: ccs: Differentiate SMIA and MIPI vendors in static data Date: Thu, 6 Apr 2023 20:34:27 +0300 Message-Id: <20230406173428.19855-4-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230406173428.19855-1-sakari.ailus@linux.intel.com> References: <20230406173428.19855-1-sakari.ailus@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org MIPI CCS uses a 16-bit MIPI manufacturer identifier for firmware filenames compared to older 8-bit identifier used by SMIA. The requested firmware files used the MIPI manufacturer ID even for SMIA compliant devices, effectively making the manufacturer ID 0. While CCS static data is a feature of CCS 1.1, it has no hardware dependencies. Making this feature available for SMIA devices helps adding support for them and avoids requesting ill-generated CCS static data file names. The files are named as: ccs/smiapp-module-vv-mmmm-rrrr.fw, ccs/smiapp-sensor-vv-mmmm-rr.fw and ccs/smia-sensor-vv-mmmm-rr.fw where vv is the manufacturer ID, mmmm is the model ID and rr or rrrr is the revision number. Signed-off-by: Sakari Ailus --- drivers/media/i2c/ccs/ccs-core.c | 73 +++++++++++++++++++++++--------- 1 file changed, 54 insertions(+), 19 deletions(-) diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c index 20c3974f5ac7..672e471bd39f 100644 --- a/drivers/media/i2c/ccs/ccs-core.c +++ b/drivers/media/i2c/ccs/ccs-core.c @@ -3271,8 +3271,46 @@ static int ccs_get_hwconfig(struct ccs_sensor *sensor, struct device *dev) return rval; } +static int ccs_firmware_name(struct i2c_client *client, + struct ccs_sensor *sensor, char *filename, + size_t filename_size, bool is_module) +{ + const struct ccs_device *ccsdev = device_get_match_data(&client->dev); + bool is_ccs = !(ccsdev->flags & CCS_DEVICE_FLAG_IS_SMIA); + bool is_smiapp = sensor->minfo.smiapp_version; + u16 manufacturer_id; + u16 model_id; + u16 revision_number; + + /* + * Old SMIA is module-agnostic. Its sensor identification is based on + * what now are those of the module. + */ + if (is_module || (!is_ccs && !is_smiapp)) { + manufacturer_id = is_ccs ? + sensor->minfo.mipi_manufacturer_id : + sensor->minfo.smia_manufacturer_id; + model_id = sensor->minfo.model_id; + revision_number = sensor->minfo.revision_number; + } else { + manufacturer_id = is_ccs ? + sensor->minfo.sensor_mipi_manufacturer_id : + sensor->minfo.sensor_smia_manufacturer_id; + model_id = sensor->minfo.sensor_model_id; + revision_number = sensor->minfo.sensor_revision_number; + } + + return snprintf(filename, filename_size, + "ccs/%s-%s-%0*x-%4.4x-%0*x.fw", + is_ccs ? "ccs" : is_smiapp ? "smiapp" : "smia", + is_module || (!is_ccs && !is_smiapp) ? "module" : "sensor", + is_ccs ? 4 : 2, manufacturer_id, model_id, + !is_ccs && !is_module ? 2 : 4, revision_number); +} + static int ccs_probe(struct i2c_client *client) { + const struct ccs_device *ccsdev = device_get_match_data(&client->dev); struct ccs_sensor *sensor; const struct firmware *fw; char filename[40]; @@ -3381,11 +3419,8 @@ static int ccs_probe(struct i2c_client *client) goto out_power_off; } - rval = snprintf(filename, sizeof(filename), - "ccs/ccs-sensor-%4.4x-%4.4x-%4.4x.fw", - sensor->minfo.sensor_mipi_manufacturer_id, - sensor->minfo.sensor_model_id, - sensor->minfo.sensor_revision_number); + rval = ccs_firmware_name(client, sensor, filename, sizeof(filename), + false); if (rval >= sizeof(filename)) { rval = -ENOMEM; goto out_power_off; @@ -3398,21 +3433,21 @@ static int ccs_probe(struct i2c_client *client) release_firmware(fw); } - rval = snprintf(filename, sizeof(filename), - "ccs/ccs-module-%4.4x-%4.4x-%4.4x.fw", - sensor->minfo.mipi_manufacturer_id, - sensor->minfo.model_id, - sensor->minfo.revision_number); - if (rval >= sizeof(filename)) { - rval = -ENOMEM; - goto out_release_sdata; - } + if (!(ccsdev->flags & CCS_DEVICE_FLAG_IS_SMIA) || + sensor->minfo.smiapp_version) { + rval = ccs_firmware_name(client, sensor, filename, + sizeof(filename), true); + if (rval >= sizeof(filename)) { + rval = -ENOMEM; + goto out_release_sdata; + } - rval = request_firmware(&fw, filename, &client->dev); - if (!rval) { - ccs_data_parse(&sensor->mdata, fw->data, fw->size, &client->dev, - true); - release_firmware(fw); + rval = request_firmware(&fw, filename, &client->dev); + if (!rval) { + ccs_data_parse(&sensor->mdata, fw->data, fw->size, &client->dev, + true); + release_firmware(fw); + } } rval = ccs_read_all_limits(sensor); From patchwork Thu Apr 6 17:34:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 671999 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 DDD25C77B6C for ; Thu, 6 Apr 2023 17:36:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238761AbjDFRgF (ORCPT ); Thu, 6 Apr 2023 13:36:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238941AbjDFRgA (ORCPT ); Thu, 6 Apr 2023 13:36:00 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A52A6AF34 for ; Thu, 6 Apr 2023 10:35:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680802539; x=1712338539; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=zvXshHIa3YjXSGNNCAC9emMeIMc0az5Ire1m5X/tLaI=; b=XjrV6dn5eBPe5DXT3sbJCZPlAwY1gDmjlbdbmdX57CSDVHB4oZx3GeDJ bdo+r8JGpfnETsEqzODhzcDX3Ys/6OBFUoEjDXbZlFTGAUdAU5t0IfJcg xpEiAXAlzGTGr8SOYABXY43IkyEqbU0+6V7ebMa10tXnKPmR6dVzdaNgI xK5q2yGOG/RPgQKeqoijaX/5Mr6F5k5V83eAKH3FjHbqtCMBVjA2yHkvN tHUVyi59IeVgOIDBuipeH5jgEM+7pBKrfSPN16032aSpoU94y7lNZ0dl5 BjpBzmkTyoBSbXLRmsMuuVpCxDnFqOT0B5Dhn4s3Evw/UHghAPTd2zcm8 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10672"; a="370629625" X-IronPort-AV: E=Sophos;i="5.98,323,1673942400"; d="scan'208";a="370629625" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2023 10:34:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10672"; a="664558678" X-IronPort-AV: E=Sophos;i="5.98,323,1673942400"; d="scan'208";a="664558678" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2023 10:34:35 -0700 Received: from svinhufvud.ger.corp.intel.com (localhost [IPv6:::1]) by kekkonen.fi.intel.com (Postfix) with ESMTP id D6C56122DD4 for ; Thu, 6 Apr 2023 20:34:33 +0300 (EEST) From: Sakari Ailus To: linux-media@vger.kernel.org Subject: [PATCH 4/4] media: ccs: Document CCS static data file names Date: Thu, 6 Apr 2023 20:34:28 +0300 Message-Id: <20230406173428.19855-5-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230406173428.19855-1-sakari.ailus@linux.intel.com> References: <20230406173428.19855-1-sakari.ailus@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Document the firmware file names for CCS static data for CCS, SMIA++ and SMIA devices. Signed-off-by: Sakari Ailus --- .../driver-api/media/drivers/ccs/ccs.rst | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Documentation/driver-api/media/drivers/ccs/ccs.rst b/Documentation/driver-api/media/drivers/ccs/ccs.rst index b461c8aa2a16..7389204afcb8 100644 --- a/Documentation/driver-api/media/drivers/ccs/ccs.rst +++ b/Documentation/driver-api/media/drivers/ccs/ccs.rst @@ -56,6 +56,28 @@ analogue data is never read from the pixel matrix that are outside the configured selection rectangle that designates crop. The difference has an effect in device timing and likely also in power consumption. +CCS static data +--------------- + +The MIPI CCS driver supports CCS static data for all compliant devices, +including not just those compliant with CCS 1.1 but also CCS 1.0 and SMIA(++). +For CCS the file names are formed as + + ccs/ccs-sensor-vvvv-mmmm-rrrr.fw (sensor) and + ccs/ccs-module-vvvv-mmmm-rrrr.fw (module). + +For SMIA++ compliant devices the corresponding file names are + + ccs/smiapp-sensor-vv-mmmm-rr.fw (sensor) and + ccs/smiapp-module-vv-mmmm-rrrr.fw (module). + +For SMIA (non-++) compliant devices the static data file name is + + ccs/smia-sensor-vv-mmmm-rr.fw (sensor). + +vvvv or vv denotes MIPI and SMIA manufacturer IDs respectively, mmmm model ID +and rrrr or rr revision number. + Register definition generator -----------------------------