From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 15D7052BE3A for ; Tue, 13 Oct 2026 15:17:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791904678; cv=none; b=t78RiBR6MhYhaLtimMCqbumKyf0/BrFOvQK+QYx2Pm2wwtdLPJ4C5O8P6Ab3vzY+4ZpiCv9X1Q1CJnUoc4uTugBB3bCr6z18xV/f16sRy9hQKYwZbn1SdCsB0dZ67OCAEPNJJVi+rAY9/2LAw7WTJXcHha/a8QjBKlWnzzbM32M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791904678; c=relaxed/simple; bh=12OGU20wVFWATYA2kfvxhJWWeinn6SJ4znCsidxX95o=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=h9+qV7fU2RlGnqVOZvKy6etA68xD1MNNQ6CAP9WzLYzMHqedKiCv4Pw4XZQri1B6FQNs3TH2BDROsw5Dq34ob9xNTf1vLfl7cwGVbzoLLMFs0Kp7PV7yhzfGK/jAK0zV2Dx7q0hR3kJ0S9h1k7ZImi5LAl6zgOwrReOyjkqEdbc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=raspberrypi.com; spf=pass smtp.mailfrom=raspberrypi.com; dkim=pass (2048-bit key) header.d=raspberrypi.com header.i=@raspberrypi.com header.b=HIkDc7RW; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=raspberrypi.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=raspberrypi.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="HIkDc7RW" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4a061a13884so27238785e9.3 for ; Tue, 13 Oct 2026 08:17:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1791904673; x=1792509473; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=IBSuaiNNdjAj6bHlEm/9ZPffT+jwzHXl+a5THJBnQMM=; b=HIkDc7RW6tsSHTmMoCiLOqRsxzFhfzZSbHduKzCZv4/nXfvBxEjxz71AoYgASxi1Su XutPjvLBI1GCMUAesHcDe5+Np4M7SfedgHRb7peGBNqTkbZkKInyuwKys4lsHcEpmMuo xG2bTOoVYD+U5V83OAkU+AIDwpDMZYWaY5exMtcwF+oP6tnyrXYhxmf+PYi3hu77Xwhc PAaOOcigPcSLn57Wx4fLrnQblS6YWbQaRpweVvJrt+/m/sxe+KxGYPDTCwS0CfTYx6r2 9ed/7l86y/EcARW/Aiyi1CS3OpzivJS4pbRpGciNPlv71Ai5BBa8R5zDm3kR1lqNWU0L ug4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791904673; x=1792509473; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=IBSuaiNNdjAj6bHlEm/9ZPffT+jwzHXl+a5THJBnQMM=; b=uZbNNlwsfJW7iHXDaG8nBC/GJ6nY+Pf8d++V95IDsKe9d8XIMVb2XgPCTiybLwDIA5 VAPz8qnTwTUvjOylLp6m5gkH08TRvuKb1Yqf/ALtim/RT1gFs+WmrAagh3tOkGMnSIcL mzFR+BaaZbPVYt6Iy+/rympGr6q9t/zeBSyksmYLw/ekGFdIfzaXRbgiZeY4E3WBIJ4y j4IFKhKIJm1pPM5Zbdtml/6Z9YsqA5ZF67VzLRD9hwWROpdJOttqZEn+78YZhvmOa467 cjkWk1PuZK1F9fpgnSJNTVP/tiWUMwtPnlwgxDOqY4JTAiSX1z0Jse5WB8+WUQignu5W BuFg== X-Forwarded-Encrypted: i=1; AKwUvByMnPlN2p/SoDEHjHjxVOuW2wP/HMUtNV7AWuj34CFFq1C/mSpCPF6DmQimdFXwYIK4xfps6mZnRdi2FTI=@vger.kernel.org X-Gm-Message-State: AFq9FYIqbquAMejeRHAwmpjoEeDi/QmHkHs7tnlUIrNBSHByeTvveip4 iCROXhUtF0RRmeTtT3raM/tc29ajqSgs4TKiyYVw2DE09N6bAlVHQUWQTgfW2e/zcxs= X-Gm-Gg: AYBFou2t2kFQnEoIeXHsuhKOoiDWfyN8/PaAZcIv4ZvCuA/YaSaK5iUtCA0lkLn0HqS cpwSCLbjb6AkZPR3SU3nT41QFC7VRda5aHeUiwpqDY3sUsd+J98OOdcKbZmV/2L0T72pP1qWtF9 rSMk5KFdZ1lOzAjq+2sadyu0FZLZJrY8vQbIvaDCQnXd1ekPHnIlkNq8NAZUuNQnKL42TuBqLUB o+rQs7fp6hUq6VtCz2fD3p2382UG5T+ZSfzYpLHoYt63FkY9hCAkQOTM2sPsShKR5TLy7b+oSl3 P3ZOAAnN58VY0vXget4QT1C3FkG7wUy2xMoSHM7rB4CAEYbUtvybW5oyU0cnw9wzoGshmKIhZXl /JjuOvn+IZa+dUFGMTftonszbTPs8ikPyhCRlELjS4TMTIBs1D9v5coJJS/N9d4Rs1z0rhJnkwe uFLegaqHsAu2ME/vgXk9gldOI3Q/t/YxkvrG+qSMFHrEM9MqTbZSmTHUJVURn7l65QVGMYdVBOE vwnueKCuw5DMjzcm3/Z9asKdZQ0RcDeGY4Q3jvrXuriUo4ZkBQ= X-Received: by 2002:a05:600c:4e55:b0:49f:fe39:5bc8 with SMTP id 5b1f17b1804b1-4a18e49c008mr228788875e9.12.1791904673179; Tue, 13 Oct 2026 08:17:53 -0700 (PDT) Received: from [127.0.1.1] ([2a00:1098:3142:e::8]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-48de0aaabb8sm6529743f8f.15.2026.10.13.08.17.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Oct 2026 08:17:52 -0700 (PDT) From: Dave Stevenson Date: Tue, 13 Oct 2026 16:17:12 +0100 Subject: [PATCH v2 13/13] media: sony-starvis2: Add support for IMX585 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261013-media-starvis2-v2-13-3670722d250a@raspberrypi.com> References: <20261013-media-starvis2-v2-0-3670722d250a@raspberrypi.com> In-Reply-To: <20261013-media-starvis2-v2-0-3670722d250a@raspberrypi.com> To: Sakari Ailus , Jai Luthra , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Laurent Pinchart , Alexander Shiyan , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Dave Stevenson X-Mailer: b4 0.14.1 IMX585 is an 8MPix Starvis 2 sensor, so add support for it. Signed-off-by: Dave Stevenson --- drivers/media/i2c/sony-starvis2.c | 302 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 302 insertions(+) diff --git a/drivers/media/i2c/sony-starvis2.c b/drivers/media/i2c/sony-starvis2.c index 1ce2b86c57ac..c9a3dd4fe529 100644 --- a/drivers/media/i2c/sony-starvis2.c +++ b/drivers/media/i2c/sony-starvis2.c @@ -14,6 +14,8 @@ * pixels. * IMX832: Diagonal 6.45mm (Type 1/2.8) CMOS image sensor with 2.12 M effective * pixels. + * IMX585: Diagonal 12.84 mm (Type 1/1.2) CMOS image sensor with 8.40 M effective + * pixels. * * Copyright (C) 2026 Ideas On Board Oy. * @@ -1078,6 +1080,283 @@ const struct starvis2_variant imx832_variant_def = { .hmax_min_pixel_array = 990, }; +static const struct cci_reg_sequence imx585_common_regs[] = { + { STARVIS2_REG_THIN_V_EN, 0x00 }, + { STARVIS2_REG_VCMODE, 0x01 }, + { CCI_REG8(0x306b), 0x00 }, + { STARVIS2_REG_GAIN_PGC_FIDMD, 0x01 }, + + { CCI_REG8(0x3460), 0x21 }, + { CCI_REG8(0x3478), 0xa1 }, + { CCI_REG8(0x347c), 0x01 }, + { CCI_REG8(0x3480), 0x01 }, + { CCI_REG8(0x3930), 0x0c }, + { CCI_REG8(0x3931), 0x01 }, + { CCI_REG8(0x3a4c), 0x39 }, + { CCI_REG8(0x3a4d), 0x01 }, + { CCI_REG8(0x3a4e), 0x14 }, + { CCI_REG8(0x3a50), 0x48 }, + { CCI_REG8(0x3a51), 0x01 }, + { CCI_REG8(0x3a52), 0x14 }, + { CCI_REG8(0x3a56), 0x00 }, + { CCI_REG8(0x3a5a), 0x00 }, + { CCI_REG8(0x3a5e), 0x00 }, + { CCI_REG8(0x3a62), 0x00 }, + { CCI_REG8(0x3a6a), 0x20 }, + { CCI_REG8(0x3a6c), 0x42 }, + { CCI_REG8(0x3a6e), 0xa0 }, + { CCI_REG8(0x3b2c), 0x0c }, + { CCI_REG8(0x3b30), 0x1c }, + { CCI_REG8(0x3b34), 0x0c }, + { CCI_REG8(0x3b38), 0x1c }, + { CCI_REG8(0x3ba0), 0x0c }, + { CCI_REG8(0x3ba4), 0x1c }, + { CCI_REG8(0x3ba8), 0x0c }, + { CCI_REG8(0x3bac), 0x1c }, + { CCI_REG8(0x3d3c), 0x11 }, + { CCI_REG8(0x3d46), 0x0b }, + { CCI_REG8(0x3de0), 0x3f }, + { CCI_REG8(0x3de1), 0x08 }, + { CCI_REG8(0x3e10), 0x10 }, + { CCI_REG8(0x3e14), 0x87 }, + { CCI_REG8(0x3e16), 0x91 }, + { CCI_REG8(0x3e18), 0x91 }, + { CCI_REG8(0x3e1a), 0x87 }, + { CCI_REG8(0x3e1c), 0x78 }, + { CCI_REG8(0x3e1e), 0x50 }, + { CCI_REG8(0x3e20), 0x50 }, + { CCI_REG8(0x3e22), 0x50 }, + { CCI_REG8(0x3e24), 0x87 }, + { CCI_REG8(0x3e26), 0x91 }, + { CCI_REG8(0x3e28), 0x91 }, + { CCI_REG8(0x3e2a), 0x87 }, + { CCI_REG8(0x3e2c), 0x78 }, + { CCI_REG8(0x3e2e), 0x50 }, + { CCI_REG8(0x3e30), 0x50 }, + { CCI_REG8(0x3e32), 0x50 }, + { CCI_REG8(0x3e34), 0x87 }, + { CCI_REG8(0x3e36), 0x91 }, + { CCI_REG8(0x3e38), 0x91 }, + { CCI_REG8(0x3e3a), 0x87 }, + { CCI_REG8(0x3e3c), 0x78 }, + { CCI_REG8(0x3e3e), 0x50 }, + { CCI_REG8(0x3e40), 0x50 }, + { CCI_REG8(0x3e42), 0x50 }, + { CCI_REG8(0x4054), 0x64 }, + { CCI_REG8(0x4148), 0xfe }, + { CCI_REG8(0x4149), 0x05 }, + { CCI_REG8(0x414a), 0xff }, + { CCI_REG8(0x414b), 0x05 }, + { CCI_REG8(0x420a), 0x03 }, + { CCI_REG8(0x4231), 0x08 }, + { CCI_REG8(0x423d), 0x9c }, + { CCI_REG8(0x4242), 0xb4 }, + { CCI_REG8(0x4246), 0xb4 }, + { CCI_REG8(0x424e), 0xb4 }, + { CCI_REG8(0x425c), 0xb4 }, + { CCI_REG8(0x425e), 0xb6 }, + { CCI_REG8(0x426c), 0xb4 }, + { CCI_REG8(0x426e), 0xb6 }, + { CCI_REG8(0x428c), 0xb4 }, + { CCI_REG8(0x428e), 0xb6 }, + { CCI_REG8(0x4708), 0x00 }, + { CCI_REG8(0x4709), 0x00 }, + { CCI_REG8(0x470a), 0xff }, + { CCI_REG8(0x470b), 0x03 }, + { CCI_REG8(0x470c), 0x00 }, + { CCI_REG8(0x470d), 0x00 }, + { CCI_REG8(0x470e), 0xff }, + { CCI_REG8(0x470f), 0x03 }, + { CCI_REG8(0x47eb), 0x1c }, + { CCI_REG8(0x47f0), 0xa6 }, + { CCI_REG8(0x47f2), 0xa6 }, + { CCI_REG8(0x47f4), 0xa0 }, + { CCI_REG8(0x47f6), 0x96 }, + { CCI_REG8(0x4808), 0xa6 }, + { CCI_REG8(0x480a), 0xa6 }, + { CCI_REG8(0x480c), 0xa0 }, + { CCI_REG8(0x480e), 0x96 }, + { CCI_REG8(0x492c), 0xb2 }, + { CCI_REG8(0x4930), 0x03 }, + { CCI_REG8(0x4932), 0x03 }, + { CCI_REG8(0x4936), 0x5b }, + { CCI_REG8(0x4938), 0x82 }, + { CCI_REG8(0x493c), 0x23 }, + { CCI_REG8(0x493e), 0x23 }, + { CCI_REG8(0x4940), 0x23 }, + { CCI_REG8(0x4ba8), 0x1c }, + { CCI_REG8(0x4ba9), 0x03 }, + { CCI_REG8(0x4bac), 0x1c }, + { CCI_REG8(0x4bad), 0x1c }, + { CCI_REG8(0x4bae), 0x1c }, + { CCI_REG8(0x4baf), 0x1c }, + { CCI_REG8(0x4bb0), 0x1c }, + { CCI_REG8(0x4bb1), 0x1c }, + { CCI_REG8(0x4bb2), 0x1c }, + { CCI_REG8(0x4bb3), 0x1c }, + { CCI_REG8(0x4bb4), 0x1c }, + { CCI_REG8(0x4bb8), 0x03 }, + { CCI_REG8(0x4bb9), 0x03 }, + { CCI_REG8(0x4bba), 0x03 }, + { CCI_REG8(0x4bbb), 0x03 }, + { CCI_REG8(0x4bbc), 0x03 }, + { CCI_REG8(0x4bbd), 0x03 }, + { CCI_REG8(0x4bbe), 0x03 }, + { CCI_REG8(0x4bbf), 0x03 }, + { CCI_REG8(0x4bc0), 0x03 }, + { CCI_REG8(0x4c14), 0x87 }, + { CCI_REG8(0x4c16), 0x91 }, + { CCI_REG8(0x4c18), 0x91 }, + { CCI_REG8(0x4c1a), 0x87 }, + { CCI_REG8(0x4c1c), 0x78 }, + { CCI_REG8(0x4c1e), 0x50 }, + { CCI_REG8(0x4c20), 0x50 }, + { CCI_REG8(0x4c22), 0x50 }, + { CCI_REG8(0x4c24), 0x87 }, + { CCI_REG8(0x4c26), 0x91 }, + { CCI_REG8(0x4c28), 0x91 }, + { CCI_REG8(0x4c2a), 0x87 }, + { CCI_REG8(0x4c2c), 0x78 }, + { CCI_REG8(0x4c2e), 0x50 }, + { CCI_REG8(0x4c30), 0x50 }, + { CCI_REG8(0x4c32), 0x50 }, + { CCI_REG8(0x4c34), 0x87 }, + { CCI_REG8(0x4c36), 0x91 }, + { CCI_REG8(0x4c38), 0x91 }, + { CCI_REG8(0x4c3a), 0x87 }, + { CCI_REG8(0x4c3c), 0x78 }, + { CCI_REG8(0x4c3e), 0x50 }, + { CCI_REG8(0x4c40), 0x50 }, + { CCI_REG8(0x4c42), 0x50 }, + { CCI_REG8(0x4d12), 0x1f }, + { CCI_REG8(0x4d13), 0x1e }, + { CCI_REG8(0x4d26), 0x33 }, + { CCI_REG8(0x4e0e), 0x59 }, + { CCI_REG8(0x4e14), 0x55 }, + { CCI_REG8(0x4e16), 0x59 }, + { CCI_REG8(0x4e1e), 0x3b }, + { CCI_REG8(0x4e20), 0x47 }, + { CCI_REG8(0x4e22), 0x54 }, + { CCI_REG8(0x4e26), 0x81 }, + { CCI_REG8(0x4e2c), 0x7d }, + { CCI_REG8(0x4e2e), 0x81 }, + { CCI_REG8(0x4e36), 0x63 }, + { CCI_REG8(0x4e38), 0x6f }, + { CCI_REG8(0x4e3a), 0x7c }, + { CCI_REG8(0x4f3a), 0x3c }, + { CCI_REG8(0x4f3c), 0x46 }, + { CCI_REG8(0x4f3e), 0x59 }, + { CCI_REG8(0x4f42), 0x64 }, + { CCI_REG8(0x4f44), 0x6e }, + { CCI_REG8(0x4f46), 0x81 }, + { CCI_REG8(0x4f4a), 0x82 }, + { CCI_REG8(0x4f5a), 0x81 }, + { CCI_REG8(0x4f62), 0xaa }, + { CCI_REG8(0x4f72), 0xa9 }, + { CCI_REG8(0x4f78), 0x36 }, + { CCI_REG8(0x4f7a), 0x41 }, + { CCI_REG8(0x4f7c), 0x61 }, + { CCI_REG8(0x4f7d), 0x01 }, + { CCI_REG8(0x4f7e), 0x7c }, + { CCI_REG8(0x4f7f), 0x01 }, + { CCI_REG8(0x4f80), 0x77 }, + { CCI_REG8(0x4f82), 0x7b }, + { CCI_REG8(0x4f88), 0x37 }, + { CCI_REG8(0x4f8a), 0x40 }, + { CCI_REG8(0x4f8c), 0x62 }, + { CCI_REG8(0x4f8d), 0x01 }, + { CCI_REG8(0x4f8e), 0x76 }, + { CCI_REG8(0x4f8f), 0x01 }, + { CCI_REG8(0x4f90), 0x5e }, + { CCI_REG8(0x4f91), 0x02 }, + { CCI_REG8(0x4f92), 0x69 }, + { CCI_REG8(0x4f93), 0x02 }, + { CCI_REG8(0x4f94), 0x89 }, + { CCI_REG8(0x4f95), 0x02 }, + { CCI_REG8(0x4f96), 0xa4 }, + { CCI_REG8(0x4f97), 0x02 }, + { CCI_REG8(0x4f98), 0x9f }, + { CCI_REG8(0x4f99), 0x02 }, + { CCI_REG8(0x4f9a), 0xa3 }, + { CCI_REG8(0x4f9b), 0x02 }, + { CCI_REG8(0x4fa0), 0x5f }, + { CCI_REG8(0x4fa1), 0x02 }, + { CCI_REG8(0x4fa2), 0x68 }, + { CCI_REG8(0x4fa3), 0x02 }, + { CCI_REG8(0x4fa4), 0x8a }, + { CCI_REG8(0x4fa5), 0x02 }, + { CCI_REG8(0x4fa6), 0x9e }, + { CCI_REG8(0x4fa7), 0x02 }, + { CCI_REG8(0x519e), 0x79 }, + { CCI_REG8(0x51a6), 0xa1 }, + { CCI_REG8(0x51f0), 0xac }, + { CCI_REG8(0x51f2), 0xaa }, + { CCI_REG8(0x51f4), 0xa5 }, + { CCI_REG8(0x51f6), 0xa0 }, + { CCI_REG8(0x5200), 0x9b }, + { CCI_REG8(0x5202), 0x91 }, + { CCI_REG8(0x5204), 0x87 }, + { CCI_REG8(0x5206), 0x82 }, + { CCI_REG8(0x5208), 0xac }, + { CCI_REG8(0x520a), 0xaa }, + { CCI_REG8(0x520c), 0xa5 }, + { CCI_REG8(0x520e), 0xa0 }, + { CCI_REG8(0x5210), 0x9b }, + { CCI_REG8(0x5212), 0x91 }, + { CCI_REG8(0x5214), 0x87 }, + { CCI_REG8(0x5216), 0x82 }, + { CCI_REG8(0x5218), 0xac }, + { CCI_REG8(0x521a), 0xaa }, + { CCI_REG8(0x521c), 0xa5 }, + { CCI_REG8(0x521e), 0xa0 }, + { CCI_REG8(0x5220), 0x9b }, + { CCI_REG8(0x5222), 0x91 }, + { CCI_REG8(0x5224), 0x87 }, + { CCI_REG8(0x5226), 0x82 }, + { CCI_REG8(0x5b3c), 0x07 }, + + { STARVIS2_REG_WDMODE, 0x00 }, + { STARVIS2_REG_MDBIT, 0x01 }, + { STARVIS2_REG_XXS_DRV, 0x00 }, +}; + +static const u16 imx585_min_hmax_2lane[] = { + [STARVIS2_LINK_FREQ_297MHZ] = 2984, + [STARVIS2_LINK_FREQ_360MHZ] = 2464, + [STARVIS2_LINK_FREQ_445MHZ] = 2004, + [STARVIS2_LINK_FREQ_594MHZ] = 1512, + [STARVIS2_LINK_FREQ_720MHZ] = 1260, + [STARVIS2_LINK_FREQ_891MHZ] = 996, + [STARVIS2_LINK_FREQ_1039MHZ] = 856, + [STARVIS2_LINK_FREQ_1188MHZ] = 856, +}; + +const struct starvis2_variant imx585_variant_def = { + .name = "imx585", + .id_reg = CCI_REG16_LE(0x5a1d), + .id_mask = 0x3ff, + .id_value = 0x259, + .active_area = { + .top = 0, + .left = 0, + .width = 3857, + .height = 2201, + }, + .active_area = { + .top = 20, + .left = 0, + .width = 3856, + .height = 2180, + }, + .pixel_rate = 594000000, + .pix_per_clk = 8, + .common_regs = imx585_common_regs, + .num_common_regs = ARRAY_SIZE(imx585_common_regs), + .vmax_default = 2250, + .hmax_min_link_freq = imx585_min_hmax_2lane, + .hmax_min_pixel_array = 550, +}; + struct starvis2_model_info { enum starvis2_type type; const u32 *codes; @@ -1168,6 +1447,26 @@ static const struct starvis2_model_info imx832_autodetect_info = { .auto_detect_mono = &imx832_amr_info, }; +static const struct starvis2_model_info imx585_aaqj_info = { + .type = STARVIS2_COLOR, + .codes = codes_bayer, + .num_codes = ARRAY_SIZE(codes_bayer), + .variant = &imx585_variant_def, +}; + +static const struct starvis2_model_info imx585_aamj_info = { + .type = STARVIS2_MONOCHROME, + .codes = codes_monochrome, + .num_codes = ARRAY_SIZE(codes_monochrome), + .variant = &imx585_variant_def, +}; + +static const struct starvis2_model_info imx585_autodetect_info = { + .variant = &imx585_variant_def, + .auto_detect_colour = &imx585_aaqj_info, + .auto_detect_mono = &imx585_aamj_info, +}; + static const char * const starvis2_supply_name[] = { "avdd", /* Analog (3.3V) supply */ "dvdd", /* Digital Core (1.1V) supply */ @@ -1983,11 +2282,14 @@ static const struct of_device_id starvis2_of_match[] = { { .compatible = "sony,imx662-aaqr", .data = &imx662_aaqr_info }, { .compatible = "sony,imx832-amr", .data = &imx832_amr_info }, { .compatible = "sony,imx832-aqr", .data = &imx832_aqr_info }, + { .compatible = "sony,imx585-aamj", .data = &imx585_aamj_info }, + { .compatible = "sony,imx585-aaqj", .data = &imx585_aaqj_info }, /* for non-conforming DTs that rely on runtime check */ { .compatible = "sony,imx678", .data = &imx678_autodetect_info }, { .compatible = "sony,imx675", .data = &imx675_autodetect_info }, { .compatible = "sony,imx662", .data = &imx662_autodetect_info }, { .compatible = "sony,imx832", .data = &imx832_autodetect_info }, + { .compatible = "sony,imx585", .data = &imx585_autodetect_info }, { /* sentinel */ } }; -- 2.34.1