From patchwork Thu Apr 17 14:58:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Poulain X-Patchwork-Id: 14055744 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 65FEB2528E1 for ; Thu, 17 Apr 2025 14:58:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744901912; cv=none; b=fMKpiAjBXT6oJXJUAxTHah5+0CJDLx/5Gk8C7sFoi0dJVe7e5rJdCcSfWLGGg/egBiQ7Q2R4Zh7YIE5m89Pn8MWnT7N/qwg7ALn/XSecAC9RwdFI97cgQy1Tmo9YHIXl2GGcDkR8ACZgW31WILIucCz/eXbu8j76XRFuzgHoe98= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744901912; c=relaxed/simple; bh=YCMGJIrbmVW1pNIZ0qJ0s5XePF4utvbRblzbX6HAhWU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=NUBwj2fty6HOhTPOHm9Uza/YiT47fXHkonPuS9P92vIZeCqRxOUisl2ZFBhrnPREytkhwbIfmYczlbY58c6MsYpOj0gqY5brqFw5lIS19QJ7xBNxYst54UNf5d7ykp/Wgqws2gNE/gsG2eNDTUij0Y2MW72GroEtLFTe/7rXNx8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=olKwDyjT; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="olKwDyjT" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 53HCldr2008818 for ; Thu, 17 Apr 2025 14:58:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=tgQf2ZIf6Jt g2wmouYbqqZnME7gpzSm3sUd7XK8DmwA=; b=olKwDyjT5hbZyVZW9USXm1m0PKS RjEstyTftEO8ofeBBz2oiDF9vPlp3eR/FNWsvfscvDzGDWHl07wyqtqsSofFw6+S x1Ih0H5n1nImKp9sCJ8esEgHlpmajOJa9vojRg0kAO2uz1xLYcgzYtu9QEH7xHg3 lgGWU2UTCLvMBW/PjUdYhGQ0HBtKI2ajyyDxcI12ae86xoAcNLYRLIjdwdsCNt97 9eRDSATzPOgJ6ZGW/unol8o7HgaQXtqDoxuyJasZRFEevqMCvsADJ0J/2r25xHJX Lwt5zRaFGisGGXMym56w8bS+D9hBepIYuqhq6BmDOkwkDsKLSIZDpnKplNg== Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 45ygxk76tb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 17 Apr 2025 14:58:28 +0000 (GMT) Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-6e8f4367446so10957456d6.0 for ; Thu, 17 Apr 2025 07:58:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744901907; x=1745506707; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tgQf2ZIf6Jtg2wmouYbqqZnME7gpzSm3sUd7XK8DmwA=; b=kZKBp/WDLreejafKXIAh9ZxfqaSs6xRiVz4WWy5kJghwnf4FkLB1zW0qqmqJKf8sIV gLxvW69CqGz7svP5PPH0qQZpODyTmBH3C7GB2SOTt+bugnbvcGvPJGywPBsRpqB/Fix+ DW7ZSP9iAFtHlYV+83MPQ02+xzhZDQTNF4fqrV0ezSMHknXnAgDQZfahOauL85pomV8r bwHgcu1x/xs5uEyvBqLX1vlWBby4sF5wdlLsIB34T4Cb4tLV96WY/cwy8a+Kfk4rVm1C AbWJO7ZpMjyfP2PAPkHe5+DkgdJqqvuGUEjB6v8fA1TBebmfAzPw+aaGuEgDeQF5jkEL OkuA== X-Forwarded-Encrypted: i=1; AJvYcCV/fBvH1h2Z+UXKogPMMJ1skVnSwZgTSPD1+TzLOEEs7GHKu+sxDpXpN0wGJlKfXgRSP1Quz2wBTlcnuw==@vger.kernel.org X-Gm-Message-State: AOJu0YxBZxJi0VqJ8ULwqehiJD0OzGom558+tkkRnBW6IMsRURMqfLZW 2S2YkQG5fKg5RDftG5jgiRXlkwbtEnWskystK8XnR2TV6h55KuG6vIwQ11bufQwa1OzE9I8X7KT bPyTnrXlXP+S4r0Vj8b+ycAHCzc3C9Y67UnjAL2lD3Z8AYtUZ6jcG2BPF4XVM+Q== X-Gm-Gg: ASbGncuy7kvTKKIEsKdd3AEc5VXUuW4UbjuL9fBhrk07zo02Cy2Q7h+0UR+sFI1UR5W VVyLUqbGt9vOVym2S9siVDGIs2cyawIWm1y8cqFIWaEeiww2aFN2OrRhbFp8prVNRMJi6COu8i7 SsKyTKHlMU2IyTlU1usnPax4E2TEbt2GxHtUrrLhvGdX1j3vHF1OtoxUP+QI0nqw4v5V80lPDAv XijG5ywbj9lfe7l/OlS8Ur/MJ2uJojSao2d6v0wDLg5O1qLuxtIOCKpWviRH0rFxMG1MvHHFf8N LmZAnvNWWMTwToLBQaxSuL87AwUFSUr0DM5a/qrUjPvmOBw= X-Received: by 2002:ad4:5bc7:0:b0:6ed:126b:a15e with SMTP id 6a1803df08f44-6f2b301b8d2mr88393746d6.33.1744901907092; Thu, 17 Apr 2025 07:58:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG1pAhdSZDqKQs6mT3c5qdWALjcb8bowo+1bd9gK7EPrPG/AiYhuP1MXmeQ3TJwRqLy8I9F9Q== X-Received: by 2002:ad4:5bc7:0:b0:6ed:126b:a15e with SMTP id 6a1803df08f44-6f2b301b8d2mr88393336d6.33.1744901906670; Thu, 17 Apr 2025 07:58:26 -0700 (PDT) Received: from QCOM-eG0v1AUPpu.qualcomm.com ([2a01:e0a:82c:5f0:15e4:d866:eb53:4185]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-acb6ef48e5csm3966166b.148.2025.04.17.07.58.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Apr 2025 07:58:26 -0700 (PDT) From: Loic Poulain To: bryan.odonoghue@linaro.org, rfoss@kernel.org, konradybcio@kernel.org, andersson@kernel.org, krzk+dt@kernel.org, robh@kernel.org Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, dmitry.baryshkov@oss.qualcomm.com, Loic Poulain Subject: [PATCH v2 1/6] media: qcom: camss: Add support for TFE (Spectra 340) Date: Thu, 17 Apr 2025 16:58:14 +0200 Message-Id: <20250417145819.626733-2-loic.poulain@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250417145819.626733-1-loic.poulain@oss.qualcomm.com> References: <20250417145819.626733-1-loic.poulain@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Authority-Analysis: v=2.4 cv=WecMa1hX c=1 sm=1 tr=0 ts=68011714 cx=c_pps a=UgVkIMxJMSkC9lv97toC5g==:117 a=xqWC_Br6kY4A:10 a=XR8D0OoHHMoA:10 a=QcRrIoSkKhIA:10 a=EUspDBNiAAAA:8 a=5YBWHmY6e4A8bI1BiDgA:9 a=IZ6BfI08DC7DjxxD:21 a=1HOtulTD9v-eNWfpl4qZ:22 X-Proofpoint-GUID: cV61_b5oozpPL37LrdtnsDccJsXNYLLL X-Proofpoint-ORIG-GUID: cV61_b5oozpPL37LrdtnsDccJsXNYLLL X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-04-17_04,2025-04-17_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 suspectscore=0 adultscore=0 clxscore=1015 lowpriorityscore=0 phishscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 spamscore=0 malwarescore=0 priorityscore=1501 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2502280000 definitions=main-2504170112 Add support for TFE (Thin Front End) found in QCM2290. Signed-off-by: Loic Poulain --- drivers/media/platform/qcom/camss/Makefile | 1 + .../media/platform/qcom/camss/camss-vfe-340.c | 320 ++++++++++++++++++ drivers/media/platform/qcom/camss/camss-vfe.h | 1 + 3 files changed, 322 insertions(+) create mode 100644 drivers/media/platform/qcom/camss/camss-vfe-340.c diff --git a/drivers/media/platform/qcom/camss/Makefile b/drivers/media/platform/qcom/camss/Makefile index d26a9c24a430..719898f5d32b 100644 --- a/drivers/media/platform/qcom/camss/Makefile +++ b/drivers/media/platform/qcom/camss/Makefile @@ -17,6 +17,7 @@ qcom-camss-objs += \ camss-vfe-4-7.o \ camss-vfe-4-8.o \ camss-vfe-17x.o \ + camss-vfe-340.o \ camss-vfe-480.o \ camss-vfe-680.o \ camss-vfe-780.o \ diff --git a/drivers/media/platform/qcom/camss/camss-vfe-340.c b/drivers/media/platform/qcom/camss/camss-vfe-340.c new file mode 100644 index 000000000000..0b137c04e92c --- /dev/null +++ b/drivers/media/platform/qcom/camss/camss-vfe-340.c @@ -0,0 +1,320 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Qualcomm MSM Camera Subsystem - VFE (Video Front End) Module 340 (TFE) + * + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +#include +#include +#include +#include + +#include "camss.h" +#include "camss-vfe.h" + +#define TFE_GLOBAL_RESET_CMD (0x014) +#define TFE_GLOBAL_RESET_CMD_CORE BIT(0) + +#define TFE_REG_UPDATE_CMD (0x02c) + +#define TFE_IRQ_CMD (0x030) +#define TFE_IRQ_CMD_CLEAR BIT(0) +#define TFE_IRQ_MASK_0 (0x034) +#define TFE_IRQ_MASK_0_RST_DONE BIT(0) +#define TFE_IRQ_MASK_0_BUS_WR BIT(1) +#define TFE_IRQ_MASK_1 (0x038) +#define TFE_IRQ_MASK_2 (0x03c) +#define TFE_IRQ_CLEAR_0 (0x040) + +#define TFE_IRQ_STATUS_0 (0x04c) + +#define BUS_REG(a) (0xa00 + (a)) + +#define TFE_BUS_IRQ_MASK_0 BUS_REG(0x18) +#define TFE_BUS_IRQ_MASK_RUP_DONE_MASK GENMASK(3, 0) +#define TFE_BUS_IRQ_MASK_RUP_DONE(sc) FIELD_PREP(TFE_BUS_IRQ_MASK_RUP_DONE_MASK, BIT(sc)) +#define TFE_BUS_IRQ_MASK_BUF_DONE_MASK GENMASK(15, 8) +#define TFE_BUS_IRQ_MASK_BUF_DONE(sg) FIELD_PREP(TFE_BUS_IRQ_MASK_BUF_DONE_MASK, BIT(sg)) +#define TFE_BUS_IRQ_MASK_0_CONS_VIOL BIT(28) +#define TFE_BUS_IRQ_MASK_0_VIOL BIT(30) +#define TFE_BUS_IRQ_MASK_0_IMG_VIOL BIT(31) + +#define TFE_BUS_IRQ_MASK_1 BUS_REG(0x1c) +#define TFE_BUS_IRQ_CLEAR_0 BUS_REG(0x20) +#define TFE_BUS_IRQ_STATUS_0 BUS_REG(0x28) +#define TFE_BUS_IRQ_CMD BUS_REG(0x30) +#define TFE_BUS_IRQ_CMD_CLEAR BIT(0) + +#define TFE_BUS_STATUS_CLEAR BUS_REG(0x60) +#define TFE_BUS_VIOLATION_STATUS BUS_REG(0x64) +#define TFE_BUS_OVERFLOW_STATUS BUS_REG(0x68) +#define TFE_BUS_IMAGE_SZ_VIOLATION_STATUS BUS_REG(0x70) + +#define TFE_BUS_CLIENT_CFG(c) BUS_REG(0x200 + (c) * 0x100) +#define TFE_BUS_CLIENT_CFG_EN BIT(0) +#define TFE_BUS_CLIENT_CFG_MODE_FRAME BIT(16) +#define TFE_BUS_IMAGE_ADDR(c) BUS_REG(0x204 + (c) * 0x100) +#define TFE_BUS_FRAME_INCR(c) BUS_REG(0x208 + (c) * 0x100) +#define TFE_BUS_IMAGE_CFG_0(c) BUS_REG(0x20c + (c) * 0x100) +#define TFE_BUS_IMAGE_CFG_0_DEFAULT 0xffff +#define TFE_BUS_IMAGE_CFG_1(c) BUS_REG(0x210 + (c) * 0x100) +#define TFE_BUS_IMAGE_CFG_2(c) BUS_REG(0x214 + (c) * 0x100) +#define TFE_BUS_IMAGE_CFG_2_DEFAULT 0xffff +#define TFE_BUS_PACKER_CFG(c) BUS_REG(0x218 + (c) * 0x100) +#define TFE_BUS_PACKER_CFG_FMT_PLAIN64 0xa +#define TFE_BUS_IRQ_SUBSAMPLE_CFG_0(c) BUS_REG(0x230 + (c) * 0x100) +#define TFE_BUS_IRQ_SUBSAMPLE_CFG_1(c) BUS_REG(0x234 + (c) * 0x100) +#define TFE_BUS_FRAMEDROP_CFG_0(c) BUS_REG(0x238 + (c) * 0x100) +#define TFE_BUS_FRAMEDROP_CFG_1(c) BUS_REG(0x23c + (c) * 0x100) + +/* + * TODO: differentiate the port id based on requested type of RDI, BHIST etc + * + * TFE write master IDs (clients) + * + * BAYER 0 + * IDEAL_RAW 1 + * STATS_TINTLESS_BG 2 + * STATS_BHIST 3 + * STATS_AWB_BG 4 + * STATS_AEC_BG 5 + * STATS_BAF 6 + * RDI0 7 + * RDI1 8 + * RDI2 9 + */ +#define RDI_WM(n) (7 + (n)) +#define TFE_WM_NUM 10 + +enum tfe_iface { + TFE_IFACE_PIX, + TFE_IFACE_RDI0, + TFE_IFACE_RDI1, + TFE_IFACE_RDI2, + TFE_IFACE_NUM +}; + +enum tfe_subgroups { + TFE_SUBGROUP_BAYER, + TFE_SUBGROUP_IDEAL_RAW, + TFE_SUBGROUP_HDR, + TFE_SUBGROUP_BG, + TFE_SUBGROUP_BAF, + TFE_SUBGROUP_RDI0, + TFE_SUBGROUP_RDI1, + TFE_SUBGROUP_RDI2, + TFE_SUBGROUP_NUM +}; + +enum tfe_iface tfe_line_iface_map[VFE_LINE_NUM_MAX] = { + [VFE_LINE_RDI0] = TFE_IFACE_RDI0, + [VFE_LINE_RDI1] = TFE_IFACE_RDI1, + [VFE_LINE_RDI2] = TFE_IFACE_RDI2, + [VFE_LINE_PIX] = TFE_IFACE_PIX, +}; + +enum vfe_line_id tfe_subgroup_line_map[TFE_SUBGROUP_NUM] = { + [TFE_SUBGROUP_BAYER] = VFE_LINE_PIX, + [TFE_SUBGROUP_IDEAL_RAW] = VFE_LINE_PIX, + [TFE_SUBGROUP_HDR] = VFE_LINE_PIX, + [TFE_SUBGROUP_BG] = VFE_LINE_PIX, + [TFE_SUBGROUP_BAF] = VFE_LINE_PIX, + [TFE_SUBGROUP_RDI0] = VFE_LINE_RDI0, + [TFE_SUBGROUP_RDI1] = VFE_LINE_RDI1, + [TFE_SUBGROUP_RDI2] = VFE_LINE_RDI2, +}; + +static inline enum tfe_iface __line_to_iface(enum vfe_line_id line_id) +{ + if (line_id <= VFE_LINE_NONE || line_id >= VFE_LINE_NUM_MAX) { + pr_warn("VFE: Invalid line %d\n", line_id); + return TFE_IFACE_RDI0; + } + + return tfe_line_iface_map[line_id]; +} + +static inline enum vfe_line_id __iface_to_line(unsigned int iface) +{ + int i; + + for (i = 0; i < VFE_LINE_NUM_MAX; i++) { + if (tfe_line_iface_map[i] == iface) + return i; + } + + return VFE_LINE_NONE; +} + +static inline enum vfe_line_id __subgroup_to_line(enum tfe_subgroups sg) +{ + if (sg >= TFE_SUBGROUP_NUM) + return VFE_LINE_NONE; + + return tfe_subgroup_line_map[sg]; +} + +static void vfe_global_reset(struct vfe_device *vfe) +{ + writel_relaxed(TFE_IRQ_MASK_0_RST_DONE, vfe->base + TFE_IRQ_MASK_0); + writel_relaxed(TFE_GLOBAL_RESET_CMD_CORE, vfe->base + TFE_GLOBAL_RESET_CMD); +} + +static irqreturn_t vfe_isr(int irq, void *dev) +{ + struct vfe_device *vfe = dev; + u32 status; + int i; + + status = readl_relaxed(vfe->base + TFE_IRQ_STATUS_0); + writel_relaxed(status, vfe->base + TFE_IRQ_CLEAR_0); + writel_relaxed(TFE_IRQ_CMD_CLEAR, vfe->base + TFE_IRQ_CMD); + + + if (status & TFE_IRQ_MASK_0_RST_DONE) { + dev_dbg(vfe->camss->dev, "VFE%u: Reset done!", vfe->id); + vfe_isr_reset_ack(vfe); + } + + if (status & TFE_IRQ_MASK_0_BUS_WR) { + u32 bus_status = readl_relaxed(vfe->base + TFE_BUS_IRQ_STATUS_0); + + writel_relaxed(bus_status, vfe->base + TFE_BUS_IRQ_CLEAR_0); + writel_relaxed(TFE_BUS_IRQ_CMD_CLEAR, vfe->base + TFE_BUS_IRQ_CMD); + + for (i = 0; i < TFE_IFACE_NUM; i++) { + if (bus_status & TFE_BUS_IRQ_MASK_RUP_DONE(i)) + vfe->res->hw_ops->reg_update_clear(vfe, __iface_to_line(i)); + } + + for (i = 0; i < TFE_SUBGROUP_NUM; i++) { + if (bus_status & TFE_BUS_IRQ_MASK_BUF_DONE(i)) + vfe_buf_done(vfe, __subgroup_to_line(i)); + } + + if (bus_status & TFE_BUS_IRQ_MASK_0_CONS_VIOL) + dev_err_ratelimited(vfe->camss->dev, "VFE%u: Bad config violation", + vfe->id); + + if (bus_status & TFE_BUS_IRQ_MASK_0_VIOL) + dev_err_ratelimited(vfe->camss->dev, "VFE%u: Input data violation", + vfe->id); + + if (bus_status & TFE_BUS_IRQ_MASK_0_IMG_VIOL) + dev_err_ratelimited(vfe->camss->dev, "VFE%u: Image size violation", + vfe->id); + } + + status = readl_relaxed(vfe->base + TFE_BUS_OVERFLOW_STATUS); + if (status) { + writel_relaxed(status, vfe->base + TFE_BUS_STATUS_CLEAR); + for (i = 0; i < TFE_WM_NUM; i++) { + if (status & BIT(i)) + dev_err_ratelimited(vfe->camss->dev, + "VFE%u: bus overflow for wm %u\n", + vfe->id, i); + } + } + + return IRQ_HANDLED; +} + +static int vfe_halt(struct vfe_device *vfe) +{ + /* rely on vfe_disable_output() to stop the VFE */ + return 0; +} + +static void vfe_enable_irq(struct vfe_device *vfe) +{ + writel_relaxed(TFE_IRQ_MASK_0_RST_DONE | TFE_IRQ_MASK_0_BUS_WR, + vfe->base + TFE_IRQ_MASK_0); + writel_relaxed(TFE_BUS_IRQ_MASK_RUP_DONE_MASK | TFE_BUS_IRQ_MASK_BUF_DONE_MASK | + TFE_BUS_IRQ_MASK_0_CONS_VIOL | TFE_BUS_IRQ_MASK_0_VIOL | + TFE_BUS_IRQ_MASK_0_IMG_VIOL, vfe->base + TFE_BUS_IRQ_MASK_0); +} + +static void vfe_wm_update(struct vfe_device *vfe, u8 rdi, u32 addr, + struct vfe_line *line) +{ + u8 wm = RDI_WM(rdi); + + writel_relaxed(addr, vfe->base + TFE_BUS_IMAGE_ADDR(wm)); +} + +static void vfe_wm_start(struct vfe_device *vfe, u8 rdi, struct vfe_line *line) +{ + struct v4l2_pix_format_mplane *pix = &line->video_out.active_fmt.fmt.pix_mp; + u32 stride = pix->plane_fmt[0].bytesperline; + u8 wm = RDI_WM(rdi); + + /* Configuration for plain RDI frames */ + writel_relaxed(TFE_BUS_IMAGE_CFG_0_DEFAULT, vfe->base + TFE_BUS_IMAGE_CFG_0(wm)); + writel_relaxed(0u, vfe->base + TFE_BUS_IMAGE_CFG_1(wm)); + writel_relaxed(TFE_BUS_IMAGE_CFG_2_DEFAULT, vfe->base + TFE_BUS_IMAGE_CFG_2(wm)); + writel_relaxed(stride * pix->height, vfe->base + TFE_BUS_FRAME_INCR(wm)); + writel_relaxed(TFE_BUS_PACKER_CFG_FMT_PLAIN64, vfe->base + TFE_BUS_PACKER_CFG(wm)); + + /* No dropped frames, one irq per frame */ + writel_relaxed(0, vfe->base + TFE_BUS_FRAMEDROP_CFG_0(wm)); + writel_relaxed(1, vfe->base + TFE_BUS_FRAMEDROP_CFG_1(wm)); + writel_relaxed(0, vfe->base + TFE_BUS_IRQ_SUBSAMPLE_CFG_0(wm)); + writel_relaxed(1, vfe->base + TFE_BUS_IRQ_SUBSAMPLE_CFG_1(wm)); + + vfe_enable_irq(vfe); + + writel_relaxed(TFE_BUS_CLIENT_CFG_EN | TFE_BUS_CLIENT_CFG_MODE_FRAME, + vfe->base + TFE_BUS_CLIENT_CFG(wm)); + + dev_dbg(vfe->camss->dev, "VFE%u: Started RDI%u width %u height %u stride %u\n", + vfe->id, rdi, pix->width, pix->height, stride); +} + +static void vfe_wm_stop(struct vfe_device *vfe, u8 rdi) +{ + u8 wm = RDI_WM(rdi); + + writel_relaxed(0, vfe->base + TFE_BUS_CLIENT_CFG(wm)); + + dev_dbg(vfe->camss->dev, "VFE%u: Stopped RDI%u\n", vfe->id, rdi); +} + +static const struct camss_video_ops vfe_video_ops_520 = { + .queue_buffer = vfe_queue_buffer_v2, + .flush_buffers = vfe_flush_buffers, +}; + +static void vfe_subdev_init(struct device *dev, struct vfe_device *vfe) +{ + vfe->video_ops = vfe_video_ops_520; +} + +static void vfe_reg_update(struct vfe_device *vfe, enum vfe_line_id line_id) +{ + vfe->reg_update |= BIT(__line_to_iface(line_id)); + writel_relaxed(vfe->reg_update, vfe->base + TFE_REG_UPDATE_CMD); +} + +static void vfe_reg_update_clear(struct vfe_device *vfe, enum vfe_line_id line_id) +{ + vfe->reg_update &= ~BIT(__line_to_iface(line_id)); +} + +const struct vfe_hw_ops vfe_ops_340 = { + .global_reset = vfe_global_reset, + .hw_version = vfe_hw_version, + .isr = vfe_isr, + .pm_domain_off = vfe_pm_domain_off, + .pm_domain_on = vfe_pm_domain_on, + .subdev_init = vfe_subdev_init, + .vfe_disable = vfe_disable, + .vfe_enable = vfe_enable_v2, + .vfe_halt = vfe_halt, + .vfe_wm_start = vfe_wm_start, + .vfe_wm_stop = vfe_wm_stop, + .vfe_buf_done = vfe_buf_done, + .vfe_wm_update = vfe_wm_update, + .reg_update = vfe_reg_update, + .reg_update_clear = vfe_reg_update_clear, +}; diff --git a/drivers/media/platform/qcom/camss/camss-vfe.h b/drivers/media/platform/qcom/camss/camss-vfe.h index a23f666be753..9b138849caca 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe.h +++ b/drivers/media/platform/qcom/camss/camss-vfe.h @@ -242,6 +242,7 @@ extern const struct vfe_hw_ops vfe_ops_4_1; extern const struct vfe_hw_ops vfe_ops_4_7; extern const struct vfe_hw_ops vfe_ops_4_8; extern const struct vfe_hw_ops vfe_ops_170; +extern const struct vfe_hw_ops vfe_ops_340; extern const struct vfe_hw_ops vfe_ops_480; extern const struct vfe_hw_ops vfe_ops_680; extern const struct vfe_hw_ops vfe_ops_780; From patchwork Thu Apr 17 14:58:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Poulain X-Patchwork-Id: 14055745 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 3A389253328 for ; Thu, 17 Apr 2025 14:58:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744901913; cv=none; b=tYv7ufxcm2QmDLpBaVmfHLwjNpxocSQL1RZ+sf6e1RKD1ylm+l82kMaGlpayFKvBW/NK6WaHFD2EUfbfPYxMf63BvFcNV8fNQa9AIh7uJw4yogIYaHyOeaebcyTzazUsnUhgaD6r9vNXjaCx7wNFlNfMVHsLzGMug6TO56okatY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744901913; c=relaxed/simple; bh=h2WszHLV5RBLnY9OzouOtqHpT7xeNxaUTENNIBLhvX4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=SvOIf4c5jVicM0IBenZNFrG1WWpbiAMVVP0shV8pSEm40j7r2FiEPjgVw2oPLLcWwYBBNHVmsxiYngHnzpbtSQOx/Eqv0lUpXyR+6Y+70n3GIUq61k6rlmxF6YOS0kVtp7nUwYVYwuvQGyrk39dtTBQE0uaF7aHvegIoPW5GMkQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=ieznMjOU; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="ieznMjOU" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 53HClOkV032034 for ; Thu, 17 Apr 2025 14:58:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=zCZTAZsCou4 fi+cdg23KsgMfKYpjnEdjfGU2P+0GKKA=; b=ieznMjOUQAho0SLn34sa8GNhdgd NIp9wSF0qJN54de0K+JONflF1XOfQNG0KYafBS+KkbuML0YMwf2mmL+rXVaoSoVI 3SQudImlWcHWWlVIlAxoeOcEWKrGAKaTY0Wo7nM4ZZF2zLoC+W45lh4uKpKsd/kN 5Nf+4KB8p04882eG3fe9eQU5jh2zCbftvHG8KYzbplUC8u8IsbBFEyiLiPbPc8Jm GU6ocDqQ5EeDuypq9lBto3Cs18k40Z1rn+tzc2P3HqVC1yT76UeX41fwxXaLalkR dhdJtoggcHEuWyOwmsVAJplleI7C4G8hGH6IKD8Knk6ILSADcPwlzeSdZLQ== Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 45yg8wqbgq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 17 Apr 2025 14:58:29 +0000 (GMT) Received: by mail-qv1-f69.google.com with SMTP id 6a1803df08f44-6e8f184b916so19860966d6.3 for ; Thu, 17 Apr 2025 07:58:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744901909; x=1745506709; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zCZTAZsCou4fi+cdg23KsgMfKYpjnEdjfGU2P+0GKKA=; b=aheNfzP0ef0dqihyP4R3PsTXcIaON0WFpLcGJ+KkjaATVZMqsDMXtFctjOjrATtY8F q7qbA+saWmBREEGCgIeMiq5Pg/ln/tlW+fNq9LcsJg+lB7GEJanxNT0VeOjH2OV1Enn8 rNDGRodvxD7YhckORbZR+sJPxRo0qXjEWDk62P4+hod8YwfV50Bsn9DKOWqkfNrwB5gI V5i61nwe4cE44xH5iG/f5MeAmgQ4miItlKD97w7RWyvHCY32AHbqJ+72FlIp1jvzYt8M al6o9zzVzsVhQMmi2cI5Lna8prsxegcYaagleESZ7YYUgBFa/yNAU2Cyfsd8wS2QFYrj MukA== X-Forwarded-Encrypted: i=1; AJvYcCU3vMrY/Rj1uKzBUU9G1PE5zdz3w6JcRFHB/vwgs8rX6p6kQhFeaYpSNY3pFBnAYYHZZvN4Kii3L8l44A==@vger.kernel.org X-Gm-Message-State: AOJu0YyY8Tbm8nm3rnXtTeBDcNDixH/g4gHG0JGsBNfr5KpuCPctWNls OY1BoLW8j8M18J3/QvKTG4xJm7tNBevdgnxudwHNdNg/sO/SiyLAkj034CTDNVj3FwY+8eNAqDA S2UFN69hZwaSSCeLyg4cDU6KBNywRvSM0hRiIVaG8mI5OvaUbiSmtlFjHAi0s0w== X-Gm-Gg: ASbGncusXePeN+29lbzGo3TLPqbM4JzMXt/fnjkm2/XoLGIgls5wsWdFlbKFO12J9SN /XHT3L/GU++2Do1b7m0C9LOYbcG8xsX3UPctIPZBODY/7AKbnvv5/Sph/YvNPK5dVUyvmGg+hPV yClpwdriGzkQ1X6XJEwugv9bDqnZro1diTrRPv3MQqZ15CP9D1R9ZlmZSbkAAbkgbvvPE84NYpn /mfHLyT9KoT5rPV1t7bo3rUXtJmG+luFyrDn9iXtK9hj+3Z6XYAdWGx24O6zZmHGh88ZJxuxoeQ jqtq6J6hr+gUQCZK4ervbTC2JS05OIhKVYKiUu4WYrDy/xs= X-Received: by 2002:a05:6214:19c8:b0:6e8:98a1:3694 with SMTP id 6a1803df08f44-6f2b2f22f33mr92204286d6.8.1744901908818; Thu, 17 Apr 2025 07:58:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGDTgIe+u3MQpYlzzQHhCEIzqdzLLxzH2ADzL3qs8lZFc05tIajUO4R0r5nYZn8VhYDDLGwdg== X-Received: by 2002:a05:6214:19c8:b0:6e8:98a1:3694 with SMTP id 6a1803df08f44-6f2b2f22f33mr92203826d6.8.1744901908466; Thu, 17 Apr 2025 07:58:28 -0700 (PDT) Received: from QCOM-eG0v1AUPpu.qualcomm.com ([2a01:e0a:82c:5f0:15e4:d866:eb53:4185]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-acb6ef48e5csm3966166b.148.2025.04.17.07.58.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Apr 2025 07:58:27 -0700 (PDT) From: Loic Poulain To: bryan.odonoghue@linaro.org, rfoss@kernel.org, konradybcio@kernel.org, andersson@kernel.org, krzk+dt@kernel.org, robh@kernel.org Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, dmitry.baryshkov@oss.qualcomm.com, Loic Poulain Subject: [PATCH v2 2/6] media: qcom: camss: Add CSID 340 support Date: Thu, 17 Apr 2025 16:58:15 +0200 Message-Id: <20250417145819.626733-3-loic.poulain@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250417145819.626733-1-loic.poulain@oss.qualcomm.com> References: <20250417145819.626733-1-loic.poulain@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Authority-Analysis: v=2.4 cv=E9TNpbdl c=1 sm=1 tr=0 ts=68011715 cx=c_pps a=wEM5vcRIz55oU/E2lInRtA==:117 a=xqWC_Br6kY4A:10 a=XR8D0OoHHMoA:10 a=QcRrIoSkKhIA:10 a=EUspDBNiAAAA:8 a=L3ROWYctCJYvUZd4tikA:9 a=OIgjcC2v60KrkQgK7BGD:22 X-Proofpoint-ORIG-GUID: qO4bhlr6T4Wib07Q0jgrYtCRZvOg5hrS X-Proofpoint-GUID: qO4bhlr6T4Wib07Q0jgrYtCRZvOg5hrS X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-04-17_04,2025-04-17_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 adultscore=0 mlxscore=0 bulkscore=0 clxscore=1015 phishscore=0 lowpriorityscore=0 suspectscore=0 mlxlogscore=999 spamscore=0 priorityscore=1501 impostorscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2502280000 definitions=main-2504170112 Add support for CSID found in QCM2290, it's a simplified gen-2 version. - There is no Test Pattern Generator (moved outside CSID) - There is no subsampling (moved to CAMIF module) Signed-off-by: Loic Poulain Reviewed-by: Bryan O'Donoghue --- drivers/media/platform/qcom/camss/Makefile | 1 + .../platform/qcom/camss/camss-csid-340.c | 190 ++++++++++++++++++ .../media/platform/qcom/camss/camss-csid.h | 1 + 3 files changed, 192 insertions(+) create mode 100644 drivers/media/platform/qcom/camss/camss-csid-340.c diff --git a/drivers/media/platform/qcom/camss/Makefile b/drivers/media/platform/qcom/camss/Makefile index 719898f5d32b..3217bf40976d 100644 --- a/drivers/media/platform/qcom/camss/Makefile +++ b/drivers/media/platform/qcom/camss/Makefile @@ -6,6 +6,7 @@ qcom-camss-objs += \ camss-csid.o \ camss-csid-4-1.o \ camss-csid-4-7.o \ + camss-csid-340.o \ camss-csid-680.o \ camss-csid-gen2.o \ camss-csid-780.o \ diff --git a/drivers/media/platform/qcom/camss/camss-csid-340.c b/drivers/media/platform/qcom/camss/camss-csid-340.c new file mode 100644 index 000000000000..92726de48514 --- /dev/null +++ b/drivers/media/platform/qcom/camss/camss-csid-340.c @@ -0,0 +1,190 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Qualcomm MSM Camera Subsystem - CSID (CSI Decoder) Module 340 + * + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +#include +#include +#include +#include + +#include "camss.h" +#include "camss-csid.h" +#include "camss-csid-gen2.h" + +#define CSID_RST_STROBES (0x010) +#define CSID_RST_SW_REGS BIT(0) +#define CSID_RST_IRQ BIT(1) +#define CSID_RST_IFE_CLK BIT(2) +#define CSID_RST_PHY_CLK BIT(3) +#define CSID_RST_CSID_CLK BIT(4) + +#define CSID_IRQ_STATUS (0x070) +#define CSID_IRQ_MASK (0x074) +#define CSID_IRQ_MASK_RST_DONE BIT(0) +#define CSID_IRQ_CLEAR (0x078) +#define CSID_IRQ_CMD (0x080) +#define CSID_IRQ_CMD_CLEAR BIT(0) + +#define CSID_CSI2_RX_CFG0 (0x100) +#define CSI2_RX_CFG0_NUM_ACTIVE_LANES_MASK GENMASK(1, 0) +#define CSI2_RX_CFG0_DLX_INPUT_SEL_MASK GENMASK(17, 4) +#define CSI2_RX_CFG0_PHY_NUM_SEL_MASK GENMASK(21, 20) +#define CSI2_RX_CFG0_PHY_NUM_SEL_BASE_IDX 1 +#define CSI2_RX_CFG0_PHY_TYPE_SEL BIT(24) + + +#define CSID_CSI2_RX_CFG1 (0x104) +#define CSI2_RX_CFG1_PACKET_ECC_CORRECTION_EN BIT(0) +#define CSI2_RX_CFG1_MISR_EN BIT(6) +#define CSI2_RX_CFG1_CGC_MODE BIT(7) + +#define CSID_RDI_CFG0(rdi) (0x300 + 0x100 * (rdi)) +#define CSID_RDI_CFG0_BYTE_CNTR_EN BIT(0) +#define CSID_RDI_CFG0_TIMESTAMP_EN BIT(1) +#define CSID_RDI_CFG0_DECODE_FORMAT_MASK GENMASK(15, 12) +#define CSID_RDI_CFG0_DECODE_FORMAT_NOP CSID_RDI_CFG0_DECODE_FORMAT_MASK +#define CSID_RDI_CFG0_DT_MASK GENMASK(21, 16) +#define CSID_RDI_CFG0_VC_MASK GENMASK(23, 22) +#define CSID_RDI_CFG0_DTID_MASK GENMASK(28, 27) +#define CSID_RDI_CFG0_ENABLE BIT(31) + +#define CSID_RDI_CTRL(rdi) (0x308 + 0x100 * (rdi)) +#define CSID_RDI_CTRL_HALT_AT_FRAME_BOUNDARY 0 +#define CSID_RDI_CTRL_RESUME_AT_FRAME_BOUNDARY 1 + +static void __csid_configure_rx(struct csid_device *csid, + struct csid_phy_config *phy, int vc) +{ + u32 val; + + val = FIELD_PREP(CSI2_RX_CFG0_NUM_ACTIVE_LANES_MASK, phy->lane_cnt - 1); + val |= FIELD_PREP(CSI2_RX_CFG0_DLX_INPUT_SEL_MASK, phy->lane_assign); + val |= FIELD_PREP(CSI2_RX_CFG0_PHY_NUM_SEL_MASK, + phy->csiphy_id + CSI2_RX_CFG0_PHY_NUM_SEL_BASE_IDX); + writel_relaxed(val, csid->base + CSID_CSI2_RX_CFG0); + + val = CSI2_RX_CFG1_PACKET_ECC_CORRECTION_EN; + writel_relaxed(val, csid->base + CSID_CSI2_RX_CFG1); +} + +static void __csid_ctrl_rdi(struct csid_device *csid, int enable, u8 rdi) +{ + writel_relaxed(!!enable, csid->base + CSID_RDI_CTRL(rdi)); +} + +static void __csid_configure_rdi_stream(struct csid_device *csid, u8 enable, u8 vc) +{ + struct v4l2_mbus_framefmt *input_format = &csid->fmt[MSM_CSID_PAD_FIRST_SRC + vc]; + const struct csid_format_info *format = csid_get_fmt_entry(csid->res->formats->formats, + csid->res->formats->nformats, + input_format->code); + u8 lane_cnt = csid->phy.lane_cnt; + u8 dt_id; + u32 val; + + if (!lane_cnt) + lane_cnt = 4; + + /* + * DT_ID is a two bit bitfield that is concatenated with + * the four least significant bits of the five bit VC + * bitfield to generate an internal CID value. + * + * CSID_RDI_CFG0(vc) + * DT_ID : 28:27 + * VC : 26:22 + * DT : 21:16 + * + * CID : VC 3:0 << 2 | DT_ID 1:0 + */ + dt_id = vc & 0x03; + + val = CSID_RDI_CFG0_DECODE_FORMAT_NOP; /* only for RDI path */ + val |= FIELD_PREP(CSID_RDI_CFG0_DT_MASK, format->data_type); + val |= FIELD_PREP(CSID_RDI_CFG0_VC_MASK, vc); + val |= FIELD_PREP(CSID_RDI_CFG0_DTID_MASK, dt_id); + + if (enable) + val |= CSID_RDI_CFG0_ENABLE; + + dev_dbg(csid->camss->dev, "CSID%u: Stream %s (dt:0x%x vc=%u)\n", + csid->id, enable ? "enable" : "disable", format->data_type, vc); + + writel_relaxed(val, csid->base + CSID_RDI_CFG0(vc)); +} + +static void csid_configure_stream(struct csid_device *csid, u8 enable) +{ + int i; + + for (i = 0; i < MSM_CSID_MAX_SRC_STREAMS; i++) { + if (csid->phy.en_vc & BIT(i)) { + __csid_configure_rdi_stream(csid, enable, i); + __csid_configure_rx(csid, &csid->phy, i); + __csid_ctrl_rdi(csid, enable, i); + } + } +} + +static int csid_reset(struct csid_device *csid) +{ + unsigned long time; + + writel_relaxed(CSID_IRQ_MASK_RST_DONE, csid->base + CSID_IRQ_MASK); + writel_relaxed(CSID_IRQ_MASK_RST_DONE, csid->base + CSID_IRQ_CLEAR); + writel_relaxed(CSID_IRQ_CMD_CLEAR, csid->base + CSID_IRQ_CMD); + + reinit_completion(&csid->reset_complete); + + /* Reset with registers preserved */ + writel(CSID_RST_IRQ | CSID_RST_IFE_CLK | CSID_RST_PHY_CLK | CSID_RST_CSID_CLK, + csid->base + CSID_RST_STROBES); + + time = wait_for_completion_timeout(&csid->reset_complete, + msecs_to_jiffies(CSID_RESET_TIMEOUT_MS)); + if (!time) { + dev_err(csid->camss->dev, "CSID%u: reset timeout\n", csid->id); + return -EIO; + } + + dev_dbg(csid->camss->dev, "CSID%u: reset done\n", csid->id); + + return 0; +} + +static irqreturn_t csid_isr(int irq, void *dev) +{ + struct csid_device *csid = dev; + u32 val; + + val = readl_relaxed(csid->base + CSID_IRQ_STATUS); + writel_relaxed(val, csid->base + CSID_IRQ_CLEAR); + writel_relaxed(CSID_IRQ_CMD_CLEAR, csid->base + CSID_IRQ_CMD); + + if (val & CSID_IRQ_MASK_RST_DONE) + complete(&csid->reset_complete); + else + dev_warn_ratelimited(csid->camss->dev, "Spurious CSID interrupt\n"); + + return IRQ_HANDLED; +} + +static int csid_configure_testgen_pattern(struct csid_device *csid, s32 val) +{ + return -EOPNOTSUPP; /* Not part of CSID */ +} + +static void csid_subdev_init(struct csid_device *csid) {} + +const struct csid_hw_ops csid_ops_340 = { + .configure_testgen_pattern = csid_configure_testgen_pattern, + .configure_stream = csid_configure_stream, + .hw_version = csid_hw_version, + .isr = csid_isr, + .reset = csid_reset, + .src_pad_code = csid_src_pad_code, + .subdev_init = csid_subdev_init, +}; diff --git a/drivers/media/platform/qcom/camss/camss-csid.h b/drivers/media/platform/qcom/camss/camss-csid.h index 9dc826d8c8f6..3399e92658d8 100644 --- a/drivers/media/platform/qcom/camss/camss-csid.h +++ b/drivers/media/platform/qcom/camss/camss-csid.h @@ -213,6 +213,7 @@ extern const struct csid_formats csid_formats_gen2; extern const struct csid_hw_ops csid_ops_4_1; extern const struct csid_hw_ops csid_ops_4_7; +extern const struct csid_hw_ops csid_ops_340; extern const struct csid_hw_ops csid_ops_680; extern const struct csid_hw_ops csid_ops_gen2; extern const struct csid_hw_ops csid_ops_780; From patchwork Thu Apr 17 14:58:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Poulain X-Patchwork-Id: 14055746 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 E54A3253344 for ; Thu, 17 Apr 2025 14:58:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744901914; cv=none; b=GG9nOoaMsrfocQYCf3Ew7GAPh7u6UdMU7l36ItNVQ4Y58q7WOXj2lP5/zIl3atGsD3oWGyurZeAZLGQx8ohfuvxOd454YylVuh6xMlzgNxL7XTpT/j5k6swno9t7SLupiGM0ktADVMuokIZTS95COhXVlatgjSTAAff2kreGvQ4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744901914; c=relaxed/simple; bh=bfK95sRCXFYLYssIDRzXAEZg4g00lcg+QaBzpu/w90U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=MksTGaDGrhdw+0PP2E34BVh94pnylFdb172IJDdvF8iwkPg3/J3IzYvZYLFVOvWDU7pKCSPVPqCPhpFOT/+yaf8isuTtIF3w076tScSaFUnyidoQusXM3CATCAQkatLV2FgMh/0DwN2B3CAhH3WBdEYHpF9vEKWDK4IJ86tuT4Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=ag39jdMt; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="ag39jdMt" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 53HClLDt001236 for ; Thu, 17 Apr 2025 14:58:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=Y4+sgo0GzWw +4hC+cP89F0qzytPA89yiK/U0gNQemvU=; b=ag39jdMt0EUEndyhSY3unrthFHA JeCT+kTvHi7DN+OA0ilEI4dsOSMVMCb4oEcGCST6IskOXYa2imDFdcp7e1pyyXDP eMd/0v7Q6OP+6vqA0roMcFRB3Y5ZZTrm5dDqS93Xo5ej5pMFG30a/pwDLdPooKMl qZxBcgwRsz1JapM8JkXPhYBg074srpYFhdBetxMW7InAEQC3UaDpiHm9UEm7YrIE kgDF7YgUqxuIMSIHFWfAqpF8a0F8Izq/D/MA9fSV7B5/BGHKtyJ7JbtbZBgi9LIo SEpy5vfSTlD8MfEDBYkaQgmECzzNBbFIxZKw2t238RoM6OguBQxUwyHPg2w== Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 45ydvjfjt2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 17 Apr 2025 14:58:31 +0000 (GMT) Received: by mail-qv1-f69.google.com with SMTP id 6a1803df08f44-6eeb5e86c5fso10057626d6.1 for ; Thu, 17 Apr 2025 07:58:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744901910; x=1745506710; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y4+sgo0GzWw+4hC+cP89F0qzytPA89yiK/U0gNQemvU=; b=C0HX5y4Z2FR7eGJEuhwFz2m5sBlrmtgjaeJ4IEynHXGZzVr+tcAcrWOZS4bdjhbNlo soWt6eac3MXXiGEylArzN1Ta2x7M0J6bxJj/lqAIbikBQiz+UxQ8OFjCb6T1slQD905x Am/WJTQP1470lt02UtRU1Z0v6eElRJ6rMQPsk/saf+9hvHgItfg9X0W0sRQ7L0mqI+GM 3lZG0uUYxA8XTuDUTL9pxYpYkar9QIgxODhL9z3uF0cqFXFPoC+L/6pc1h3Nug19o5wR bOIU4yMT93y85h/FMCOmP9/n48bLrv3Pbu5dMnchbDzUVxN3Q0QGK1a9JAWzTtTVdhoC iDBQ== X-Forwarded-Encrypted: i=1; AJvYcCUy9VhLG+hQz26dBwtLNLl/BvzjAYpdx8FfrTnDDx5R0qRoxb/ejVUbmMXEO9LutBvnfBKkErHV1iwWTA==@vger.kernel.org X-Gm-Message-State: AOJu0YzB0Rql+IvHSbliP8ZLx8xpOaTqxo3apH7i3qs/xMb6p3hY3ebD r9/Z+WPskW3NdqRr5jXHoEDeqoessFkjKEbCp4tD9peCF/9ftKtR21SsLYNKchP5aIXs6ojj45Z l/UUgmk5hvmTHo1DaB29ws83Nk+aUxT9uPYh/nWQESJ0OV0BkQlfqR963i0aMOQ== X-Gm-Gg: ASbGncum3ZQtneOukEYNyTGs4MSyLloDmJLtmw81K1KgcdTPbTL3w27PzSMLuYiXe5U v+7e3fiS07/dHm9TxciX/+Hbc4M5F8eks9fgxqLNyM+UNtiYYJFDwEyr4OCJJsD7Afux3KzzZCV 8N1tvBVjv8OeQtsuJy5QU5zrxwmbnjLqthJUE6mamBDihk7qS0mou2/zvlSMHHtoRC26nVpPjwi hl4rcNE7zRrIqcF31jm1RgosDOUWBXLs+HQ751d0HWNXX6ksq3/IfxzIiRvEhHlrbH2drMaqT5H +5mVxwVPyYqHiPhbgx0feH7NMYJrb74IvUAorYoGWDwPa14= X-Received: by 2002:a05:6214:20aa:b0:6e8:fcc6:35b6 with SMTP id 6a1803df08f44-6f2b2efa06emr87194716d6.2.1744901910569; Thu, 17 Apr 2025 07:58:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGaxqOu5iTDx1SjPtHucKQRbFVyDFSLS2/4qpVN1lRLVxsSF9QfjgDQFe/hrq+/ijOe/rI21A== X-Received: by 2002:a05:6214:20aa:b0:6e8:fcc6:35b6 with SMTP id 6a1803df08f44-6f2b2efa06emr87194416d6.2.1744901910231; Thu, 17 Apr 2025 07:58:30 -0700 (PDT) Received: from QCOM-eG0v1AUPpu.qualcomm.com ([2a01:e0a:82c:5f0:15e4:d866:eb53:4185]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-acb6ef48e5csm3966166b.148.2025.04.17.07.58.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Apr 2025 07:58:29 -0700 (PDT) From: Loic Poulain To: bryan.odonoghue@linaro.org, rfoss@kernel.org, konradybcio@kernel.org, andersson@kernel.org, krzk+dt@kernel.org, robh@kernel.org Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, dmitry.baryshkov@oss.qualcomm.com, Loic Poulain Subject: [PATCH v2 3/6] media: qcom: camss: csiphy-3ph: Add CSIPHY 2ph DPHY v2.0.1 init sequence Date: Thu, 17 Apr 2025 16:58:16 +0200 Message-Id: <20250417145819.626733-4-loic.poulain@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250417145819.626733-1-loic.poulain@oss.qualcomm.com> References: <20250417145819.626733-1-loic.poulain@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Authority-Analysis: v=2.4 cv=ZIrXmW7b c=1 sm=1 tr=0 ts=68011718 cx=c_pps a=wEM5vcRIz55oU/E2lInRtA==:117 a=xqWC_Br6kY4A:10 a=XR8D0OoHHMoA:10 a=QcRrIoSkKhIA:10 a=EUspDBNiAAAA:8 a=Z2TnqjxRs3nyLks1V8oA:9 a=OIgjcC2v60KrkQgK7BGD:22 X-Proofpoint-GUID: 6Lavg2nufZJjCEwX-eAKloiu8kPEIB-w X-Proofpoint-ORIG-GUID: 6Lavg2nufZJjCEwX-eAKloiu8kPEIB-w X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-04-17_04,2025-04-17_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 suspectscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 phishscore=0 mlxlogscore=999 spamscore=0 impostorscore=0 malwarescore=0 mlxscore=0 lowpriorityscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2502280000 definitions=main-2504170112 This is the CSI PHY version found in QCS2290/QCM2290 SoCs. The table is extracted from downstream camera driver. Signed-off-by: Loic Poulain Reviewed-by: Bryan O'Donoghue --- .../qcom/camss/camss-csiphy-3ph-1-0.c | 89 +++++++++++++++++++ drivers/media/platform/qcom/camss/camss.h | 1 + 2 files changed, 90 insertions(+) diff --git a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c b/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c index f732a76de93e..1857c802cf70 100644 --- a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c +++ b/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c @@ -319,6 +319,90 @@ csiphy_lane_regs lane_regs_sm8250[] = { {0x0884, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS}, }; +/* GEN2 2.0.1 2PH DPHY mode */ +static const struct +csiphy_lane_regs lane_regs_qcm2290[] = { + {0x0030, 0x02, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x002c, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0034, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0028, 0x04, 0x00, CSIPHY_DNP_PARAMS}, + {0x003c, 0xb8, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x001c, 0x0a, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0000, 0xd7, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0004, 0x08, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0020, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0008, 0x04, 0x00, CSIPHY_SETTLE_CNT_LOWER_BYTE}, + {0x000c, 0xff, 0x00, CSIPHY_DNP_PARAMS}, + {0x0010, 0x50, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0038, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0060, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0064, 0x3f, 0x00, CSIPHY_DEFAULT_PARAMS}, + + {0x0730, 0x02, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x072c, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0734, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0728, 0x04, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x073c, 0xb8, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x071c, 0x0a, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0700, 0xc0, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0704, 0x08, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0720, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0708, 0x04, 0x00, CSIPHY_SETTLE_CNT_LOWER_BYTE}, + {0x070c, 0xff, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0710, 0x50, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0738, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0760, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0764, 0x3f, 0x00, CSIPHY_DEFAULT_PARAMS}, + + {0x0230, 0x02, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x022c, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0234, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0228, 0x04, 0x00, CSIPHY_DNP_PARAMS}, + {0x023c, 0xb8, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x021c, 0x0a, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0200, 0xd7, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0204, 0x08, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0220, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0208, 0x04, 0x00, CSIPHY_SETTLE_CNT_LOWER_BYTE}, + {0x020c, 0xff, 0x00, CSIPHY_DNP_PARAMS}, + {0x0210, 0x50, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0238, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0260, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0264, 0x3f, 0x00, CSIPHY_DEFAULT_PARAMS}, + + {0x0430, 0x02, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x042c, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0434, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0428, 0x04, 0x00, CSIPHY_DNP_PARAMS}, + {0x043c, 0xb8, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x041c, 0x0a, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0400, 0xd7, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0404, 0x08, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0420, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0408, 0x04, 0x00, CSIPHY_SETTLE_CNT_LOWER_BYTE}, + {0x040C, 0xff, 0x00, CSIPHY_DNP_PARAMS}, + {0x0410, 0x50, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0438, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0460, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0464, 0x3f, 0x00, CSIPHY_DEFAULT_PARAMS}, + + {0x0630, 0x02, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x062c, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0634, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0628, 0x04, 0x00, CSIPHY_DNP_PARAMS}, + {0x063c, 0xb8, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x061c, 0x0a, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0600, 0xd7, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0604, 0x08, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0620, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0608, 0x04, 0x00, CSIPHY_SETTLE_CNT_LOWER_BYTE}, + {0x060C, 0xff, 0x00, CSIPHY_DNP_PARAMS}, + {0x0610, 0x50, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0638, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0660, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0664, 0x3f, 0x00, CSIPHY_DEFAULT_PARAMS}, +}; + /* GEN2 2.1.2 2PH DPHY mode */ static const struct csiphy_lane_regs lane_regs_sm8550[] = { @@ -744,6 +828,7 @@ static bool csiphy_is_gen2(u32 version) bool ret = false; switch (version) { + case CAMSS_2290: case CAMSS_7280: case CAMSS_8250: case CAMSS_8280XP: @@ -829,6 +914,10 @@ static int csiphy_init(struct csiphy_device *csiphy) regs->lane_regs = &lane_regs_sdm845[0]; regs->lane_array_size = ARRAY_SIZE(lane_regs_sdm845); break; + case CAMSS_2290: + regs->lane_regs = &lane_regs_qcm2290[0]; + regs->lane_array_size = ARRAY_SIZE(lane_regs_qcm2290); + break; case CAMSS_7280: case CAMSS_8250: regs->lane_regs = &lane_regs_sm8250[0]; diff --git a/drivers/media/platform/qcom/camss/camss.h b/drivers/media/platform/qcom/camss/camss.h index 63c0afee154a..377707d91ff2 100644 --- a/drivers/media/platform/qcom/camss/camss.h +++ b/drivers/media/platform/qcom/camss/camss.h @@ -78,6 +78,7 @@ enum pm_domain { enum camss_version { CAMSS_660, + CAMSS_2290, CAMSS_7280, CAMSS_8x16, CAMSS_8x53, From patchwork Thu Apr 17 14:58:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Poulain X-Patchwork-Id: 14055747 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 6BB1B25332A for ; Thu, 17 Apr 2025 14:58:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744901916; cv=none; b=AoIfb1PNzSYU1oWKsG95OB2fvBOV2RvDGLTgbPv25GPeebUKU8OUcuKVD6hzN28j7p8mOGob/SbGitgyu2T91YmkmoJUufRqYi7jD7auMtO8gIR5QpSUph4mzhmpFyTYnZItWrU+i2o6TW3bGuo99VH2Thrk5AYXlOB3W8W0Lts= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744901916; c=relaxed/simple; bh=npsp5Xkr4YuC0J7hudOOEeSBuP9AhNKswNrTxoxTqSk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=sVSDX9x4Zw1Nu1aJEGZ8Tk6poQvCxmr38kWYSdxDIO61aw/LCiO3UPiDXWPlFceDkpEZjM1/NFb5y4VlLJjDsvzpoHdGP0mEuProb0B8KTBIN0HqHD0Sf4svMAV+mk+Ddq0m5ABz3yWD0XXDsRAUqBE0n3ze3xUksP4+q/0B8fY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=fE2/W3sv; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="fE2/W3sv" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 53HCleTS005967 for ; Thu, 17 Apr 2025 14:58:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=SPiOSKlqHwq BBGgAZYKsxfVM4rvOqh3ReTcJLmh0jWI=; b=fE2/W3sv7VxBtDtu4IwAi9ovgDb +gFcUqDOfRdTXYEThqjxJyp5YZDPZd7ImiF5wuSnW8Lv3eEOQX3WtcwgYTmiTP3Q xYlMQKdMzBKnFVpJHHnU2yPFUwpfZC8lvQDGPe5vyARY2cBRpTnRW0afWV719OXT EktDrkwy71jkFlsoir1F6TP8nlVYhgUTWOGuimmNgVlcLz7UYAdgF5NurnGCOMUH gFv99d+cp+CrUfowAHwWMf+2ngyZi3G7ZFb98s+3WGkwirc1ATxDq2qJphh611gY aLltORsPeGBCkhwB7i8I57p02H8EcfOkspVYHUuoOX/YCuAeGM0jZcWmCSQ== Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 45yf69yb80-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 17 Apr 2025 14:58:33 +0000 (GMT) Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-6f0c089909aso14682226d6.2 for ; Thu, 17 Apr 2025 07:58:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744901912; x=1745506712; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SPiOSKlqHwqBBGgAZYKsxfVM4rvOqh3ReTcJLmh0jWI=; b=UGLJN4uNUg+IMv/LpZuyhasx5gsBOizUIsb2ZFCFozNFVxy5tPWgGe0RzTkM9ufyud Wef5NVrt3ximl/c5d3wIbWGqCzMoQ4T7/1JLyIuk3R/WS+ycktRPEjsL72rZkWaHfN6t sopuV/ewr3wKoAUPVq1xr2+tEaigIeECY2c+ftlMghxVCkf+u1F/j2Oxf2fzI8ZVeN77 qxTu0fOd/2a28mEI/DBb/Bc6cYQ7oJoVQOfdnLdZdNn3RJxHjXzDhvUqhr7tFc41pQWz jiUmgphQMpmwA5MAf8FgHfUF0RBCrPH2NqiYAfUFHA+YxLg//ZEah0ek/HZP8Gm+btPg ge+A== X-Forwarded-Encrypted: i=1; AJvYcCX1sFDLnCpwKZOYrLScrOtprtM22GSSWJOiQKxsWwKgqtvwpANHxdNG5xlBAAcfNn205UGK+8Ri4jdHZg==@vger.kernel.org X-Gm-Message-State: AOJu0YxlxA9i/Gx58E4VVcbM/EF5CqhgdZIlo1KR03057f9qsI3GvkC+ yuX1GdA4KoqeDnCrv5MOGrhlennzEoX9tu62FV/Fl39fclMV6iR9m+AqxGzsgLiPXJ4+kWC9/Lp 8tjZ7a/XaZLQAlgs/w8jhEVtLJIN9f9TJI7VoF/fQnqYwpPecqnNu9tinmN0AUQ== X-Gm-Gg: ASbGncsBWq3BYYEWKS8P2SxqLCIAagdfgQiBjGK23QZforZ8g4XL85mojFGT96nukSt M5f4gujg6lhUm0n2foYjvPtYA0eDoz8EgVYEv0Ich/Ryj0erhVIAZGYNXKY7dNNSJyjrFuYJpIa ZHzT5GY0wEODL+BrQRivlSUGDI1Y6NbTGLqNEfBJ7kBctnCJwV2hcp00+HvysqNvYw+p/HuKCCT WOkbpYqUHnPspjQeLGD8cFxuLLD7TNN0qUc04KBkk37nxKWxg9ZFsj2y9zBne4uPSiEXafmBeSe iMlO5+UxHd4qeoJRd/ULRykS+kh59Rhv8cBwKqZHAdTZsU8= X-Received: by 2002:a05:6214:20a2:b0:6e8:9525:2ac3 with SMTP id 6a1803df08f44-6f2b304ec27mr99290376d6.34.1744901912283; Thu, 17 Apr 2025 07:58:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFVJGP+skGmJ/evOqzRBSgg1meDa95jRVoVab6OBbSt7ZmSFoPQEA++LriRw0kQz1ZwWBPD3g== X-Received: by 2002:a05:6214:20a2:b0:6e8:9525:2ac3 with SMTP id 6a1803df08f44-6f2b304ec27mr99290036d6.34.1744901911964; Thu, 17 Apr 2025 07:58:31 -0700 (PDT) Received: from QCOM-eG0v1AUPpu.qualcomm.com ([2a01:e0a:82c:5f0:15e4:d866:eb53:4185]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-acb6ef48e5csm3966166b.148.2025.04.17.07.58.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Apr 2025 07:58:31 -0700 (PDT) From: Loic Poulain To: bryan.odonoghue@linaro.org, rfoss@kernel.org, konradybcio@kernel.org, andersson@kernel.org, krzk+dt@kernel.org, robh@kernel.org Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, dmitry.baryshkov@oss.qualcomm.com, Loic Poulain Subject: [PATCH v2 4/6] media: qcom: camss: add support for QCM2290 camss Date: Thu, 17 Apr 2025 16:58:17 +0200 Message-Id: <20250417145819.626733-5-loic.poulain@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250417145819.626733-1-loic.poulain@oss.qualcomm.com> References: <20250417145819.626733-1-loic.poulain@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-GUID: 192KAZGEdOM-lRmZFolL44eZZnP417uw X-Authority-Analysis: v=2.4 cv=JNc7s9Kb c=1 sm=1 tr=0 ts=68011719 cx=c_pps a=oc9J++0uMp73DTRD5QyR2A==:117 a=xqWC_Br6kY4A:10 a=XR8D0OoHHMoA:10 a=QcRrIoSkKhIA:10 a=EUspDBNiAAAA:8 a=c8dJUS_lH9wIvx9YmlQA:9 a=iYH6xdkBrDN1Jqds4HTS:22 X-Proofpoint-ORIG-GUID: 192KAZGEdOM-lRmZFolL44eZZnP417uw X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-04-17_04,2025-04-17_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 malwarescore=0 suspectscore=0 mlxlogscore=999 lowpriorityscore=0 bulkscore=0 impostorscore=0 clxscore=1015 phishscore=0 adultscore=0 priorityscore=1501 spamscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2502280000 definitions=main-2504170112 The camera subsystem for QCM2290 which is based on Spectra 340. Signed-off-by: Loic Poulain Reviewed-by: Bryan O'Donoghue --- drivers/media/platform/qcom/camss/camss-vfe.c | 2 + drivers/media/platform/qcom/camss/camss.c | 148 ++++++++++++++++++ 2 files changed, 150 insertions(+) diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/platform/qcom/camss/camss-vfe.c index 4bca6c3abaff..c575c9767492 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe.c +++ b/drivers/media/platform/qcom/camss/camss-vfe.c @@ -340,6 +340,7 @@ static u32 vfe_src_pad_code(struct vfe_line *line, u32 sink_code, } break; case CAMSS_660: + case CAMSS_2290: case CAMSS_7280: case CAMSS_8x96: case CAMSS_8250: @@ -1969,6 +1970,7 @@ static int vfe_bpl_align(struct vfe_device *vfe) int ret = 8; switch (vfe->camss->res->version) { + case CAMSS_2290: case CAMSS_7280: case CAMSS_8250: case CAMSS_8280XP: diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c index 06f42875702f..64f263b8065c 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -515,6 +515,140 @@ static const struct camss_subdev_resources vfe_res_8x96[] = { } }; +static const struct camss_subdev_resources csiphy_res_2290[] = { + /* CSIPHY0 */ + { + .regulators = { "vdda-phy", "vdda-pll" }, + .clock = { "top_ahb", "ahb", "csiphy0", "csiphy0_timer" }, + .clock_rate = { { 0 }, + { 0 }, + { 240000000, 341330000, 384000000 }, + { 100000000, 200000000, 268800000 } }, + .reg = { "csiphy0" }, + .interrupt = { "csiphy0" }, + .csiphy = { + .id = 0, + .hw_ops = &csiphy_ops_3ph_1_0, + .formats = &csiphy_formats_sdm845 + } + }, + + /* CSIPHY1 */ + { + .regulators = { "vdda-phy", "vdda-pll" }, + .clock = { "top_ahb", "ahb", "csiphy1", "csiphy1_timer" }, + .clock_rate = { { 0 }, + { 0 }, + { 240000000, 341330000, 384000000 }, + { 100000000, 200000000, 268800000 } }, + .reg = { "csiphy1" }, + .interrupt = { "csiphy1" }, + .csiphy = { + .id = 1, + .hw_ops = &csiphy_ops_3ph_1_0, + .formats = &csiphy_formats_sdm845 + } + } +}; + +static const struct camss_subdev_resources csid_res_2290[] = { + /* CSID0 */ + { + .regulators = {}, + .clock = { "top_ahb", "ahb", "csi0", "vfe0_cphy_rx", "vfe0" }, + .clock_rate = { { 0 }, + { 0 }, + { 192000000, 240000000, 384000000, 426400000 }, + { 0 }, + { 0 } }, + .reg = { "csid0" }, + .interrupt = { "csid0" }, + .csid = { + .hw_ops = &csid_ops_340, + .parent_dev_ops = &vfe_parent_dev_ops, + .formats = &csid_formats_gen2 + } + }, + + /* CSID1 */ + { + .regulators = {}, + .clock = { "top_ahb", "ahb", "csi1", "vfe1_cphy_rx", "vfe1" }, + .clock_rate = { { 0 }, + { 0 }, + { 192000000, 240000000, 384000000, 426400000 }, + { 0 }, + { 0 } }, + .reg = { "csid1" }, + .interrupt = { "csid1" }, + .csid = { + .hw_ops = &csid_ops_340, + .parent_dev_ops = &vfe_parent_dev_ops, + .formats = &csid_formats_gen2 + } + } +}; + +static const struct camss_subdev_resources vfe_res_2290[] = { + /* VFE0 */ + { + .regulators = {}, + .clock = { "top_ahb", "ahb", "axi", "vfe0", "camnoc_rt_axi", "camnoc_nrt_axi" }, + .clock_rate = { { 0 }, + { 0 }, + { 0 }, + { 19200000, 153600000, 192000000, 256000000, 384000000, 460800000 }, + { 0 }, + { 0 }, }, + .reg = { "vfe0" }, + .interrupt = { "vfe0" }, + .vfe = { + .line_num = 4, + .hw_ops = &vfe_ops_340, + .formats_rdi = &vfe_formats_rdi_845, + .formats_pix = &vfe_formats_pix_845 + } + }, + + /* VFE1 */ + { + .regulators = {}, + .clock = { "top_ahb", "ahb", "axi", "vfe1", "camnoc_rt_axi", "camnoc_nrt_axi" }, + .clock_rate = { { 0 }, + { 0 }, + { 0 }, + { 19200000, 153600000, 192000000, 256000000, 384000000, 460800000 }, + { 0 }, + { 0 }, }, + .reg = { "vfe1" }, + .interrupt = { "vfe1" }, + .vfe = { + .line_num = 4, + .hw_ops = &vfe_ops_340, + .formats_rdi = &vfe_formats_rdi_845, + .formats_pix = &vfe_formats_pix_845 + } + }, +}; + +static const struct resources_icc icc_res_2290[] = { + { + .name = "ahb", + .icc_bw_tbl.avg = 150000, + .icc_bw_tbl.peak = 300000, + }, + { + .name = "hf_mnoc", + .icc_bw_tbl.avg = 2097152, + .icc_bw_tbl.peak = 3000000, + }, + { + .name = "sf_mnoc", + .icc_bw_tbl.avg = 2097152, + .icc_bw_tbl.peak = 3000000, + }, +}; + static const struct camss_subdev_resources csiphy_res_660[] = { /* CSIPHY0 */ { @@ -3753,6 +3887,19 @@ static const struct camss_resources msm8996_resources = { .link_entities = camss_link_entities }; +static const struct camss_resources qcm2290_resources = { + .version = CAMSS_2290, + .csiphy_res = csiphy_res_2290, + .csid_res = csid_res_2290, + .vfe_res = vfe_res_2290, + .icc_res = icc_res_2290, + .icc_path_num = ARRAY_SIZE(icc_res_2290), + .csiphy_num = ARRAY_SIZE(csiphy_res_2290), + .csid_num = ARRAY_SIZE(csid_res_2290), + .vfe_num = ARRAY_SIZE(vfe_res_2290), + .link_entities = camss_link_entities +}; + static const struct camss_resources sdm660_resources = { .version = CAMSS_660, .csiphy_res = csiphy_res_660, @@ -3865,6 +4012,7 @@ static const struct of_device_id camss_dt_match[] = { { .compatible = "qcom,msm8916-camss", .data = &msm8916_resources }, { .compatible = "qcom,msm8953-camss", .data = &msm8953_resources }, { .compatible = "qcom,msm8996-camss", .data = &msm8996_resources }, + { .compatible = "qcom,qcm2290-camss", .data = &qcm2290_resources }, { .compatible = "qcom,sc7280-camss", .data = &sc7280_resources }, { .compatible = "qcom,sc8280xp-camss", .data = &sc8280xp_resources }, { .compatible = "qcom,sdm660-camss", .data = &sdm660_resources }, From patchwork Thu Apr 17 14:58:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Poulain X-Patchwork-Id: 14055748 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 70635253B4C for ; Thu, 17 Apr 2025 14:58:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744901918; cv=none; b=e/6DHMS1SQQBr4OD9eW70hfAgTM2m4i7zDp0hwhXfEvkQe1LRk8flUj3iNi9aCnTYURI7W1QxG/0qDpReJ5JP1iiitcp4DzEwNUdvNhustOs+BKsTjvPYX+n16kRIZfjwRQUbkyg/5UcUbVKNoH8k6mTguOiXpFXHMS+MqFkXYI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744901918; c=relaxed/simple; bh=Bo+ze+YyQOzphNiTgreRfKGT6ceskLXqm2txeq0K+LQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=MmEF/AdtxLq32LSv18DHFAzV7Hf2KQXF0hQL05BhF1FAwqvJ1ZM0wgz4cJZ9PMPuvPZuI9mdrkG1c9gxbZ8CWCeQfhvmz66AvKIE6Tu6n///gz9RkTWCazQnqQq9gN7uMKeTazl4ll9gYVoqYFoc+WZRaoSg/kZYpBVOroM0eyQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=bJxSOgkE; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="bJxSOgkE" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 53HClK8V011884 for ; Thu, 17 Apr 2025 14:58:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=VWpY4+uRax2 m/mnUMNZfhQl5Ox6GGJGk24ckn4FsZT4=; b=bJxSOgkEOvPJqbeOsER2QmEJElM 6ToXQk9R6MKmbjUAk5PmOvf4sDX4WlIf257WEn4VJtOOLKd+S346JQ/78yj6FIvb 7bobKibCgVTCxewoDG17Y4rtJdjmx+drD2JyqKacigIsi7xZN1a/ZY8u+s+Ih6Of 1YfKa5YTFEn4K7cTgQduw3iecAwXP3R5gQCppJHoE27UDXwzvtJTLk8md+L9+EOD PnViN3QtsnohNISw7Htaa8FKIPOhjefg7l9NXtLfHoIRIVQ4Z9qf5s9olVZefrjg kkLVeIekSRDHVRQtvdck+UwChby5Zw+lF1RJLY4cswt8EyK8s58NsfFk8Sg== Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 45yf4vqerh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 17 Apr 2025 14:58:35 +0000 (GMT) Received: by mail-qv1-f69.google.com with SMTP id 6a1803df08f44-6ecfbdaaee3so16096276d6.3 for ; Thu, 17 Apr 2025 07:58:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744901914; x=1745506714; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VWpY4+uRax2m/mnUMNZfhQl5Ox6GGJGk24ckn4FsZT4=; b=G+VOtui59DajGQjS3cVjlw1wBMjY0UVqK1mxvo6jPZlN8tWLVPJ+AK4wTXalzUa6wv eUHC1kTa0kuMIkbttWjpo5IhaelG6OPLjLJsTO/5yYIk0VsAtTz7FGhXrOhFKYRFRAYw wnFVwhLv11rsjdx+e4kIDHLL79e73Oj9H2OB4ab5oFsq7pzDIikEgMDOnh7fO2J9Cbs4 AoCz99UN6GxpRI0+nPZwYCrCyclXOC74vvNsm1K43RPkf+aOwEfImKdhG2+AN8ik850t 7gfF2b0AR+PBDXf1TQ6QoQYyDtyZo5SZ/LRWWZo+JWBA4e926hSODY56AAnTW1lAoahI Iz3A== X-Forwarded-Encrypted: i=1; AJvYcCU05B50N9KTnQYp+a6xwUJH8cSEOOmraESj8A4ID19bNuqlNNKUtoiAib6St4tCNkn6YsoUxPH3rSfl3A==@vger.kernel.org X-Gm-Message-State: AOJu0YwzwAAWqQ89GL2gpbAe2RAS3NPXnbsHAkPwE1yPO5snIeqOkex2 sTxUhSyDqMxroQBHSyTL7AUzAwVn2uB6HExIlHKa11AP7qVzu8LXpzISUKQ5WcomjDkuiA8gnzW FQeLfqxTpnc+MXRgkHOik85IFj2LD8iaahQIT8rwi4fXOk4AKL02N0N5UVlFNBA== X-Gm-Gg: ASbGncutYUiUGEvKq4vHXirLBcXZvFPwzJ4pM3jb6iZAPdGMqWpOMszYAvq6u5y+l1q ekaY1HjcgEwba3Xn2iawH+wefHYHfToou5OjJ1TqNKXp+k5e5BiYbwU03MkgVJCKtxs/waiDOW5 /pQIZ9eKwMKmDkjnotMsHP3DcWbmvWNc4kvegwfoUGcAFtgGwLJ4DBeespVbi1/C9LTqHFcbDie gcJqV79+ILaPkH0q51S31aeb3YeM4f1G0NMKx5QD7BpllC1DEdnxJUMLygEbaMB8vv4ZKsjZIcF ItzXWduEzQisrOdQN+U7NOICOoTWHFt+wwAVU/SBV1yBFhk= X-Received: by 2002:a05:6214:410e:b0:6e8:f464:c9a0 with SMTP id 6a1803df08f44-6f2b2f3e58cmr77387196d6.13.1744901914120; Thu, 17 Apr 2025 07:58:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHDWJWfJEpQ0v3xPPm3V9NntzaNWSytCeDPNAc7NMu2QmrsoAA0HpcUFuciEZHQp62F65YdHQ== X-Received: by 2002:a05:6214:410e:b0:6e8:f464:c9a0 with SMTP id 6a1803df08f44-6f2b2f3e58cmr77386816d6.13.1744901913687; Thu, 17 Apr 2025 07:58:33 -0700 (PDT) Received: from QCOM-eG0v1AUPpu.qualcomm.com ([2a01:e0a:82c:5f0:15e4:d866:eb53:4185]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-acb6ef48e5csm3966166b.148.2025.04.17.07.58.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Apr 2025 07:58:33 -0700 (PDT) From: Loic Poulain To: bryan.odonoghue@linaro.org, rfoss@kernel.org, konradybcio@kernel.org, andersson@kernel.org, krzk+dt@kernel.org, robh@kernel.org Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, dmitry.baryshkov@oss.qualcomm.com, Loic Poulain Subject: [PATCH v2 5/6] media: dt-bindings: media: camss: Add qcom,qcm2290-camss binding Date: Thu, 17 Apr 2025 16:58:18 +0200 Message-Id: <20250417145819.626733-6-loic.poulain@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250417145819.626733-1-loic.poulain@oss.qualcomm.com> References: <20250417145819.626733-1-loic.poulain@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: emtG85iDmpwANVIzi-BrQtkNfHTYCN8Z X-Authority-Analysis: v=2.4 cv=IZ6HWXqa c=1 sm=1 tr=0 ts=6801171b cx=c_pps a=wEM5vcRIz55oU/E2lInRtA==:117 a=xqWC_Br6kY4A:10 a=XR8D0OoHHMoA:10 a=QcRrIoSkKhIA:10 a=gEfo2CItAAAA:8 a=EUspDBNiAAAA:8 a=2DfPVCEIPBpRJJTYYFsA:9 a=OIgjcC2v60KrkQgK7BGD:22 a=sptkURWiP4Gy88Gu7hUp:22 X-Proofpoint-GUID: emtG85iDmpwANVIzi-BrQtkNfHTYCN8Z X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-04-17_04,2025-04-17_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 malwarescore=0 spamscore=0 adultscore=0 mlxlogscore=999 mlxscore=0 bulkscore=0 impostorscore=0 suspectscore=0 phishscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2502280000 definitions=main-2504170112 Add bindings for qcom,qcm2290-camss in order to support the camera subsystem found in the Qualcomm Robotics RB1 Platform (QRB2210). Signed-off-by: Loic Poulain --- .../bindings/media/qcom,qcm2290-camss.yaml | 261 ++++++++++++++++++ 1 file changed, 261 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/qcom,qcm2290-camss.yaml diff --git a/Documentation/devicetree/bindings/media/qcom,qcm2290-camss.yaml b/Documentation/devicetree/bindings/media/qcom,qcm2290-camss.yaml new file mode 100644 index 000000000000..1af6ed298c66 --- /dev/null +++ b/Documentation/devicetree/bindings/media/qcom,qcm2290-camss.yaml @@ -0,0 +1,261 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/qcom,qcm2290-camss.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm QCM2290 Camera Subsystem (CAMSS) + +maintainers: + - Loic Poulain + +description: + The CAMSS IP is a CSI decoder and ISP present on Qualcomm platforms. + +properties: + compatible: + const: qcom,qcm2290-camss + + reg: + maxItems: 9 + + reg-names: + items: + - const: csid0 + - const: csid1 + - const: csiphy0 + - const: csiphy1 + - const: vfe0 + - const: vfe1 + - const: tpg0 + - const: tpg1 + - const: top + + clocks: + maxItems: 15 + + clock-names: + items: + - const: ahb + - const: axi + - const: top_ahb + - const: csi0 + - const: csi1 + - const: csiphy0 + - const: csiphy1 + - const: csiphy0_timer + - const: csiphy1_timer + - const: vfe0 + - const: vfe1 + - const: vfe0_cphy_rx + - const: vfe1_cphy_rx + - const: camnoc_nrt_axi + - const: camnoc_rt_axi + + interrupts: + maxItems: 8 + + interrupt-names: + items: + - const: csid0 + - const: csid1 + - const: csiphy0 + - const: csiphy1 + - const: vfe0 + - const: vfe1 + - const: tpg0 + - const: tpg1 + + interconnects: + maxItems: 3 + + interconnect-names: + items: + - const: ahb + - const: hf_mnoc + - const: sf_mnoc + + iommus: + maxItems: 4 + + power-domains: + items: + - description: GDSC CAMSS Block, Global Distributed Switch Controller. + + vdda-phy-supply: + description: + Phandle to a 1.2V regulator supply to CSI PHYs. + + vdda-pll-supply: + description: + Phandle to 1.8V regulator supply to CAMSS refclk pll block. + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + description: + CSI input ports. + + properties: + port@0: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: + Input port for receiving CSI data on CSIPHY 0. + + properties: + endpoint: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + properties: + data-lanes: + minItems: 1 + maxItems: 4 + + required: + - data-lanes + + port@1: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: + Input port for receiving CSI data on CSIPHY 1. + + properties: + endpoint: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + properties: + data-lanes: + minItems: 1 + maxItems: 4 + + required: + - data-lanes + +required: + - compatible + - reg + - reg-names + - clocks + - clock-names + - interrupts + - interrupt-names + - interconnects + - interconnect-names + - iommus + - power-domains + - vdda-phy-supply + - vdda-pll-supply + +additionalProperties: false + +examples: + - | + #include + #include + #include + #include + + soc { + #address-cells = <2>; + #size-cells = <2>; + + camss: camss@5c6e000 { + compatible = "qcom,qcm2290-camss"; + + reg = <0 0x5c6e000 0 0x1000>, + <0 0x5c75000 0 0x1000>, + <0 0x5c52000 0 0x1000>, + <0 0x5c53000 0 0x1000>, + <0 0x5c6f000 0 0x4000>, + <0 0x5c76000 0 0x4000>, + <0 0x5c66000 0 0x400>, + <0 0x5c68000 0 0x400>, + <0 0x5c11000 0 0x1000>; + reg-names = "csid0", + "csid1", + "csiphy0", + "csiphy1", + "vfe0", + "vfe1", + "tpg0", + "tpg1", + "top"; + + clocks = <&gcc GCC_CAMERA_AHB_CLK>, + <&gcc GCC_CAMSS_AXI_CLK>, + <&gcc GCC_CAMSS_TOP_AHB_CLK>, + <&gcc GCC_CAMSS_TFE_0_CSID_CLK>, + <&gcc GCC_CAMSS_TFE_1_CSID_CLK>, + <&gcc GCC_CAMSS_CPHY_0_CLK>, + <&gcc GCC_CAMSS_CPHY_1_CLK>, + <&gcc GCC_CAMSS_CSI0PHYTIMER_CLK>, + <&gcc GCC_CAMSS_CSI1PHYTIMER_CLK>, + <&gcc GCC_CAMSS_TFE_0_CLK>, + <&gcc GCC_CAMSS_TFE_1_CLK>, + <&gcc GCC_CAMSS_TFE_0_CPHY_RX_CLK>, + <&gcc GCC_CAMSS_TFE_1_CPHY_RX_CLK>, + <&gcc GCC_CAMSS_NRT_AXI_CLK>, + <&gcc GCC_CAMSS_RT_AXI_CLK>; + clock-names = "ahb", + "axi", + "top_ahb", + "csi0", + "csi1", + "csiphy0", + "csiphy1", + "csiphy0_timer", + "csiphy1_timer", + "vfe0", + "vfe1", + "vfe0_cphy_rx", + "vfe1_cphy_rx", + "camnoc_nrt_axi", + "camnoc_rt_axi"; + + interrupts = , + , + , + , + , + , + , + ; + interrupt-names = "csid0", + "csid1", + "csiphy0", + "csiphy1", + "vfe0", + "vfe1", + "tpg0", + "tpg1"; + + interconnects = <&bimc MASTER_APPSS_PROC RPM_ACTIVE_TAG + &config_noc SLAVE_CAMERA_CFG RPM_ACTIVE_TAG>, + <&mmrt_virt MASTER_CAMNOC_HF RPM_ALWAYS_TAG + &bimc SLAVE_EBI1 RPM_ALWAYS_TAG>, + <&mmnrt_virt MASTER_CAMNOC_SF RPM_ALWAYS_TAG + &bimc SLAVE_EBI1 RPM_ALWAYS_TAG>; + interconnect-names = "ahb", + "hf_mnoc", + "sf_mnoc"; + + iommus = <&apps_smmu 0x400 0x0>, + <&apps_smmu 0x800 0x0>, + <&apps_smmu 0x820 0x0>, + <&apps_smmu 0x840 0x0>; + + power-domains = <&gcc GCC_CAMSS_TOP_GDSC>; + + vdda-phy-supply = <&pm4125_l5>; + vdda-pll-supply = <&pm4125_l13>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + }; + }; + }; From patchwork Thu Apr 17 14:58:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Poulain X-Patchwork-Id: 14055749 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 07704253B5B for ; Thu, 17 Apr 2025 14:58:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744901919; cv=none; b=Ip/So9jrhGv55VDRJ7dkcXI7gA+T9+aCThe4DVJQCP26VubWG2wWarm6V2NBuGlFefUhMV5JKh+4OfDnAxiXZn5YXxGYrXnjgg/Boev23MmavwbQDt2y6avB7nUnugeHUjQhoXxQQ3AzTkLSztNytdZCBqV62sFi8f/6S19APEE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744901919; c=relaxed/simple; bh=Eu20DIUB17YA5cywL+qoXmmFQoWk+ZkjXj7+0uv0r3c=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=b0QipSUIfLDaYnoqN/AHNo5NIQ9rpMls31lM7fBaf0DXZm8dUhs+noukHqLh2VAS1Q0TXbCrtyjN4FWf24g+rHbR5VBVDG4lKcmt7rOOckVP3CfgC2umNGgux2nTR5AZ5Ayxwb8x5dP07e5exkxBzE0uYklrdMHTpg84AF+r8fY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=QhnexUgW; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="QhnexUgW" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 53HClMCL001259 for ; Thu, 17 Apr 2025 14:58:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=+3IngJOEAw3 623HU6ko0Q/ihsVQ2h+g+6nJB2OaFR7Q=; b=QhnexUgW0AfiQHc6nxIRpPNKoPY A3N/mpIahSsqo4QS3YJd8pRcgdjvuzip8TtVE0F1YDZYBVnfTKNQ1dYIw9NOxqX4 NIs0phtRYfqk6hsVH2jUi7fFO8vdS/C2QsnTvW4UdqBO6xr3cVsbuw6P+sQnZtDw INmnoU0lwZx4XLyFSxXspZr6jVa1RXh/OcLZyLQ+XO4UN0uNFG9huoNq9WdfS/z3 fI3pMYPdrmFd8vsWcLZlmgIjsgQq0UvXkWBpzBJkaLEHAq/wgHJHJfX+tcpaJGkM 9sQ0R6cebuVLBZmlW7msfjBFtPM/flavxtbCELbxnZB+1EkkN9NYsN3+psQ== Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 45ydvjfjte-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 17 Apr 2025 14:58:37 +0000 (GMT) Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-6e8ec18a29aso9440346d6.2 for ; Thu, 17 Apr 2025 07:58:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744901916; x=1745506716; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+3IngJOEAw3623HU6ko0Q/ihsVQ2h+g+6nJB2OaFR7Q=; b=mKX3DA3pLrG/q1yBsGxtsBzOCI+iJYq00NK/tJnZCIBVRDL7NV04Rn5B/FqyXO12V5 4gAbG5Qw/oQUEGPySvk5e16l0QJ17ixhD6PTWY4rLEjR2Slz1K46rlwd+4f1tjHPrUV3 KUvGYZBvqfklJ2tByBFXmclvBzWCdaupsIdyEmAmXsVbwOV0iY62Q4D1tJLwCzfSC0YC MRs+1zEVvEs4afF/JN+NKi1Jd9y+jH7o9bQhQxNTW3mqCYT7f8glsdMIF3wjqSFcVefF HVBzo2AHdVMAxtrGkHFaTTxYa7yasgVaWrn68NaakKC22CW3GBVC5lpNhRLxvd6isklA OAhg== X-Forwarded-Encrypted: i=1; AJvYcCX+KLTKRw/HO8WY4XXJQ1FjmMjSuRRo5dhWzaWAmydGWBTxhH3ZJ9PaK1nNDHe6M1yedtv4aNd46oQE6A==@vger.kernel.org X-Gm-Message-State: AOJu0YyiESYdZYSlhm4RxUk5KOaJJXcLOavA8QgSBDyRvcta3hA9PHCA xF+C8LyWltyCPR415BE+T51z4QbGuI6iQ08EFshlTcqlpDwrr1CIuqnrPxUE1RBF7QZgLqwz0Ze 9Fe67tDyXVg6Nm5OsDMNUtZ5z0CbkaRCUmZrNTfJKCzd599HPYs99NcLssfGgFg== X-Gm-Gg: ASbGncvi+Kd77lz8ykrABCd+OlwNCDA3QkjRw+Tlbb17K1ax9VwjkK1S9Rui1gG8O1J wULA5S6UTq5mPv5ci11QPoPiznpL682Lhnf+OoAbrXN6EaSu+xI6ZK3vSdv/rJZMETimvrr8xw4 5ZeTU6azH3/4LKn5puAWjlV1gcp8x+sz39kTB8xDhOJfJ1Fn8WJsVLxSuQ0whMeC425QODIp5VX lwueJrxKOjiWhbnPR4ZdasluLFCSZaBfyJOyT//rDVw+gQPI6XO1r0xW5XmjZSutM/ZLrF4An2y vp3dpFI5JMmyTz+28HmLakp7QzbBkbSTikBglYLNfLdz628= X-Received: by 2002:a0c:ec0e:0:b0:6f2:ba27:61f5 with SMTP id 6a1803df08f44-6f2ba2764f5mr39856976d6.35.1744901915796; Thu, 17 Apr 2025 07:58:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGYEzC+4imV+ZZP89XGwx6XHE6bOBb0IBCJBMc6Wjmq/hnyGgzJNCju2FzMu8AOziBu4I/xYw== X-Received: by 2002:a0c:ec0e:0:b0:6f2:ba27:61f5 with SMTP id 6a1803df08f44-6f2ba2764f5mr39856686d6.35.1744901915471; Thu, 17 Apr 2025 07:58:35 -0700 (PDT) Received: from QCOM-eG0v1AUPpu.qualcomm.com ([2a01:e0a:82c:5f0:15e4:d866:eb53:4185]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-acb6ef48e5csm3966166b.148.2025.04.17.07.58.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Apr 2025 07:58:34 -0700 (PDT) From: Loic Poulain To: bryan.odonoghue@linaro.org, rfoss@kernel.org, konradybcio@kernel.org, andersson@kernel.org, krzk+dt@kernel.org, robh@kernel.org Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, dmitry.baryshkov@oss.qualcomm.com, Loic Poulain Subject: [PATCH v2 6/6] arm64: dts: qcom: qcm2290: Add CAMSS node Date: Thu, 17 Apr 2025 16:58:19 +0200 Message-Id: <20250417145819.626733-7-loic.poulain@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250417145819.626733-1-loic.poulain@oss.qualcomm.com> References: <20250417145819.626733-1-loic.poulain@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Authority-Analysis: v=2.4 cv=ZIrXmW7b c=1 sm=1 tr=0 ts=6801171d cx=c_pps a=UgVkIMxJMSkC9lv97toC5g==:117 a=xqWC_Br6kY4A:10 a=XR8D0OoHHMoA:10 a=QcRrIoSkKhIA:10 a=EUspDBNiAAAA:8 a=EzCDy3pf2FPqfMyO2-oA:9 a=1HOtulTD9v-eNWfpl4qZ:22 X-Proofpoint-GUID: i7-lVSYz50BauzNLSka8nk8V7o9sGxcc X-Proofpoint-ORIG-GUID: i7-lVSYz50BauzNLSka8nk8V7o9sGxcc X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-04-17_04,2025-04-17_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 suspectscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 phishscore=0 mlxlogscore=999 spamscore=0 impostorscore=0 malwarescore=0 mlxscore=0 lowpriorityscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2502280000 definitions=main-2504170112 Add node for the QCM2290 camera subsystem. Signed-off-by: Loic Poulain --- arch/arm64/boot/dts/qcom/qcm2290.dtsi | 103 ++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qcm2290.dtsi b/arch/arm64/boot/dts/qcom/qcm2290.dtsi index f0746123e594..36c569718da9 100644 --- a/arch/arm64/boot/dts/qcom/qcm2290.dtsi +++ b/arch/arm64/boot/dts/qcom/qcm2290.dtsi @@ -1579,6 +1579,109 @@ adreno_smmu: iommu@59a0000 { #iommu-cells = <2>; }; + camss: camss@5c6e000 { + compatible = "qcom,qcm2290-camss"; + + reg = <0 0x5c6e000 0 0x1000>, + <0 0x5c75000 0 0x1000>, + <0 0x5c52000 0 0x1000>, + <0 0x5c53000 0 0x1000>, + <0 0x5c6f000 0 0x4000>, + <0 0x5c76000 0 0x4000>, + <0 0x5c66000 0 0x400>, + <0 0x5c68000 0 0x400>, + <0 0x5c11000 0 0x1000>; + reg-names = "csid0", + "csid1", + "csiphy0", + "csiphy1", + "vfe0", + "vfe1", + "tpg0", + "tpg1", + "top"; + + clocks = <&gcc GCC_CAMERA_AHB_CLK>, + <&gcc GCC_CAMSS_AXI_CLK>, + <&gcc GCC_CAMSS_TOP_AHB_CLK>, + <&gcc GCC_CAMSS_TFE_0_CSID_CLK>, + <&gcc GCC_CAMSS_TFE_1_CSID_CLK>, + <&gcc GCC_CAMSS_CPHY_0_CLK>, + <&gcc GCC_CAMSS_CPHY_1_CLK>, + <&gcc GCC_CAMSS_CSI0PHYTIMER_CLK>, + <&gcc GCC_CAMSS_CSI1PHYTIMER_CLK>, + <&gcc GCC_CAMSS_TFE_0_CLK>, + <&gcc GCC_CAMSS_TFE_1_CLK>, + <&gcc GCC_CAMSS_TFE_0_CPHY_RX_CLK>, + <&gcc GCC_CAMSS_TFE_1_CPHY_RX_CLK>, + <&gcc GCC_CAMSS_NRT_AXI_CLK>, + <&gcc GCC_CAMSS_RT_AXI_CLK>; + clock-names = "ahb", + "axi", + "top_ahb", + "csi0", + "csi1", + "csiphy0", + "csiphy1", + "csiphy0_timer", + "csiphy1_timer", + "vfe0", + "vfe1", + "vfe0_cphy_rx", + "vfe1_cphy_rx", + "camnoc_nrt_axi", + "camnoc_rt_axi"; + + interrupts = , + , + , + , + , + , + , + ; + interrupt-names = "csid0", + "csid1", + "csiphy0", + "csiphy1", + "vfe0", + "vfe1", + "tpg0", + "tpg1"; + + interconnects = <&bimc MASTER_APPSS_PROC RPM_ACTIVE_TAG + &config_noc SLAVE_CAMERA_CFG RPM_ACTIVE_TAG>, + <&mmrt_virt MASTER_CAMNOC_HF RPM_ALWAYS_TAG + &bimc SLAVE_EBI1 RPM_ALWAYS_TAG>, + <&mmnrt_virt MASTER_CAMNOC_SF RPM_ALWAYS_TAG + &bimc SLAVE_EBI1 RPM_ALWAYS_TAG>; + interconnect-names = "ahb", + "hf_mnoc", + "sf_mnoc"; + + iommus = <&apps_smmu 0x400 0x0>, + <&apps_smmu 0x800 0x0>, + <&apps_smmu 0x820 0x0>, + <&apps_smmu 0x840 0x0>; + + power-domains = <&gcc GCC_CAMSS_TOP_GDSC>; + + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + }; + + port@1 { + reg = <1>; + }; + }; + }; + mdss: display-subsystem@5e00000 { compatible = "qcom,qcm2290-mdss"; reg = <0x0 0x05e00000 0x0 0x1000>;