From patchwork Thu Jun 12 01:15:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 896709 Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (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 7201C13C8EA for ; Thu, 12 Jun 2025 01:15:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749690943; cv=none; b=gfC1gmUvQm/2CAJj+8Xsu693yfdQtb1yLQktnTEYYESFMDcXJDva5aq58E0OA24FtlMVkTCEhYnCh7OKPwO+3d6+2KHBRVz0efx8WvuNAm8EIUSSzGIhsTKp2WzBML5Ism8qc5SqbGbp+tRqJsZQEk6lKwI+mr5bYijNQ71Vbz4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749690943; c=relaxed/simple; bh=cTiCvc3M5D7VQS/RPNZMBcUtmTqxxVJOMqLiNgpATFU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=g8Hx9Zz/if8zw8YECZUydWUQaV6pNlMrN0ohYJkO5kfZMfjmf/8eNhjdgWlwUfH9bwEJBCLQUnDnqs9uj/STi8q7pgyl9aTTELxx5KRdUQxAVKkjIoKdKio2NzaqnjbdJmmm6p/adlitQDuGxyHFWpEcg5jFBUZ9fwe9oEPY4RI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=GwSfncPl; arc=none smtp.client-ip=209.85.208.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="GwSfncPl" Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-32a6a607465so635461fa.3 for ; Wed, 11 Jun 2025 18:15:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749690938; x=1750295738; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MytdYQLPTBH+sqpGAkv07c7VyYUNYJf1+SknQylnEzo=; b=GwSfncPllO4TAQ5uNloUvjMaA3mS2eg8DKsjxYl058P5/p6Im6ZIOtBGo9qCLJIINZ /3lT+zApHwg+O36n8d/YDvCWUE2eIZ0VktH52OOHGcxmmasUsRzRLvj4xpzNAeitZzgz jEnIH68sb7cvID4bvEodXljSCKumGbhIQLViQLDYXaywVGPzRzLPEEjvStcqSLMcGYnT OYHx9WW2DdsmFQkSV+DedYpqtJ6+eMbHUw+24HP30PR+m7eef2gsAVnElIPhlu4HA8Ey obus20cBLOVKd6uf/1oOa+vjivHYXJemiAgKBKjqMTOz5QgiZbgmYK6cnzUPfjwVyYTR y96w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749690938; x=1750295738; 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=MytdYQLPTBH+sqpGAkv07c7VyYUNYJf1+SknQylnEzo=; b=CKtlJvgyHYWVzR0lR+JjrvD23eFCMLdum7oVPzDL/a+hsHpDdq/mMWGrJPgzxPMnxB DTwxbF0RX1zqrAfk3b90nLbo4/ZQlSkfcTkhF01z+s+t1KVn9satw8XlmM8ARgSFLCh3 mkCB24tVmk3LOmctXQUeYXTtZeJWMWZWmVzLCTtcQu0wu/u5/MUAaSebaxTpwaxGqLuM fzaWDsIFTOBfRK06inq+bkVjYTVdu+igLXi8xg1LNsUT8qKB+2ONPXKRDli6UqqiVBPX lBlUvur3kwiFFrqIgTZstApMI0rgFz4LzstjpynUUaAIMZIHeX1tJ1oCygN6DVMJW+BC sTMw== X-Forwarded-Encrypted: i=1; AJvYcCU00z/VjPNZ6bBoxBWuMXsCG1cwCSUP2sMG3HxP016flXO89e7bOAOSf3Dti55QV7cEoywnUT2wvoorIoCW@vger.kernel.org X-Gm-Message-State: AOJu0YwoRPaUHpRV0CqFxE3zIC3zLZ/tgVSywwv2jTSei53aXcVCOtov 3XLlmJZubkElwSq5G/+Udmj8LKD/0Ry0S8zZpJVjkWwt1E8mgsFU4UaNIKnk76jbsXg= X-Gm-Gg: ASbGncsXSnbP2GvHpR99MQOwRvDeeKKqxjkHTpBhdcqHbofj/1BHV9xb1p81j7Kcmrj USiBaXsb97wCrpuWkGjTuE4hM6fClBcsYCTmdyXmDQymf4v1bBQ/XF7YapaWKvoUZkoZSRrWLHm vhS1jeNacEneXM8+kdW0G8A7sEOyEVmSoRGBY9aV6yoJnt4nr8p0Vyg+Igw4RCSx7F3A9JMCrw7 yF0NjiREZjiapQXbRwbO0QAlw5uowYr4bSclr+ZYKe9Aj/1TKZW2YSMwvhzsxwc0uOLKznEEh9l 2+0Vftn8ky5pceFlQQ5MGS15i1klt11hU0+tYGXUclOeHe1cxXaE6Utd6rtD2SHWIJqrHXEy88r IyOrczNWbYUZDoHiXvAyVG29qtZkvMahaaD5NQr/4RULEYCC2bzw= X-Google-Smtp-Source: AGHT+IHoUp0rBCvyGGy7XmIPKelgT4UaUs9romhC0d9m5fZfQ3Q0Ot+dNcpGlYOwVncG8cNIP4xyaQ== X-Received: by 2002:a05:6512:68f:b0:553:1fee:4aaa with SMTP id 2adb3069b0e04-5539c247d66mr533854e87.16.1749690938552; Wed, 11 Jun 2025 18:15:38 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-553a7018069sm62808e87.157.2025.06.11.18.15.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jun 2025 18:15:37 -0700 (PDT) From: Vladimir Zapolskiy To: Krzysztof Kozlowski , Rob Herring , Bjorn Andersson , Konrad Dybcio , Bryan O'Donoghue Cc: Conor Dooley , Robert Foss , Todor Tomov , Mauro Carvalho Chehab , Neil Armstrong , Vinod Koul , linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 01/10] media: qcom: camss: remove never used camss_vfe_get()/camss_vfe_put() Date: Thu, 12 Jun 2025 04:15:22 +0300 Message-ID: <20250612011531.2923701-2-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250612011531.2923701-1-vladimir.zapolskiy@linaro.org> References: <20250612011531.2923701-1-vladimir.zapolskiy@linaro.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Two intended to be helpers camss_vfe_get()/camss_vfe_put() got their declarations in commit b1e6eef535df ("media: qcom: camss: Decouple VFE from CSID"), but the correspondent functions haven't beed even added. Remove the unused declarations. Signed-off-by: Vladimir Zapolskiy Reviewed-by: Bryan O'Donoghue --- drivers/media/platform/qcom/camss/camss.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/media/platform/qcom/camss/camss.h b/drivers/media/platform/qcom/camss/camss.h index 1d0f83e4a2c9..99831846ebb5 100644 --- a/drivers/media/platform/qcom/camss/camss.h +++ b/drivers/media/platform/qcom/camss/camss.h @@ -160,8 +160,6 @@ s64 camss_get_link_freq(struct media_entity *entity, unsigned int bpp, int camss_get_pixel_clock(struct media_entity *entity, u64 *pixel_clock); int camss_pm_domain_on(struct camss *camss, int id); void camss_pm_domain_off(struct camss *camss, int id); -int camss_vfe_get(struct camss *camss, int id); -void camss_vfe_put(struct camss *camss, int id); void camss_delete(struct camss *camss); void camss_buf_done(struct camss *camss, int hw_id, int port_id); void camss_reg_update(struct camss *camss, int hw_id, From patchwork Thu Jun 12 01:15:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 897045 Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (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 936CB13E41A for ; Thu, 12 Jun 2025 01:15:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749690944; cv=none; b=fek2R1b8LjyDW8UwpjgKgHNi0QY319+FlcJaFDRAi+42tUm6PRmQnidQGPbamCQZ7OQS7lAhG3KhDSGzcQSj2YLGdDcRgDkio+h4Q6FrTsmXWBT8nFCywv5ZU400VbWmjim27Wrerdqob8Jp6PNq5O+KSmoZfuS79s25rXiZtQo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749690944; c=relaxed/simple; bh=348Owfu8+NKEBcDAc1yCBm1UctAgEMq/YnSiv+q1CJY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=L31xyKVc7mWKGDW8cso3HKQrd2qR0AFYCuFPDZSodD4qU+8NltEpuRy4PPuh6CJWE92muiKuocvVD6z3fAF4u1xL2O6B0Am1iAZDq+QKbslvct0FsPvYUajP/iaCykHXXL1sOfEjYDIQfKaKS2v+IRThVSGDwRsFB5lpCksZ7Ds= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=pq1+Mgyb; arc=none smtp.client-ip=209.85.208.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="pq1+Mgyb" Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-32a65d1a966so504851fa.0 for ; Wed, 11 Jun 2025 18:15:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749690941; x=1750295741; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=C6NTxmPbc5uooQyom/INTaDK9H/lohg3U1Eew3ZB4b0=; b=pq1+MgybuJ5kznaUELk4li9ICdbZKSuCzAQWNV/bwGrm0CwUDtOfuBrkaw27qCVbWB b198Ia5UtejMDalAGXXqhszVbjDyDJm/mR6GkzEUR41Q1RHjbl/ZK7ext1sCoqozqq7o XZv1vmvTo5zW4M8vdjvgx+xi8Ca7v6+gR7XNoZeMvwp4lUsHGssJCmyVhPYe3LF0th0E 3cyEhwwri4rdCrWKVgvHt8S8oS0qpO+tP3w6jlLU4HYpWx16o3kYyNXPzGIUhIu/Kobt qxLJ3ihmgvkyctyrQ9h5ykVESkNi2RAu2fSeaKsKY0YDuyNAH3Du8EesSHaiclwY5SkL tyDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749690941; x=1750295741; 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=C6NTxmPbc5uooQyom/INTaDK9H/lohg3U1Eew3ZB4b0=; b=WdgQcItnjCRT326U4XmUcvz6MNs1uYEdirfNAt6hLf8FKoLmZonTyHGjj53RNxYomZ +x9JyRkzdYUlbJ+pey6ADPvWpxPKE4GbpL2RzH3GayMVziYflJpbVLNJwneQZMOuBZNJ OaZqoYY6qXjCZTK3EFWFC4l6uvjYWha2eeVmFWopPEE2bLFgEQxkQBLUPWNLvJxrEHHU P7Yoi3LPGgZtVyvnBzhceQmjD75vclI59i1H96SYhHvIsNQs/hPXz/+ugIvz0wzD500D 8LrRPnhn+nATCfG+MmkThiYIKtpqvEZ85XKn+iic2WYDuksyKOhlUxJ+N2ri85tu3oy8 M+pw== X-Forwarded-Encrypted: i=1; AJvYcCVeaMpeSdsFOH3ck2RuC9CIo74bxoKmeBVxra/Y/cd2kP7a4YQ9huKDUYV4OVZTqoa7poILXTyo10KkAso9@vger.kernel.org X-Gm-Message-State: AOJu0YzACeO29LX9/JB1VT4rdd/r5DXmn7qvrPQltm37kNg21zux/gvI LgrVYWNeLy/h1sxcucbVBwAVdUBL1RnrXHM/e5XM5BFJpXOjs8WRdpBHAxtAksf2Wcg= X-Gm-Gg: ASbGncvK9Mp7B+H48o7eZYhjQl0RGQ//AUmFptjkLO1HDZTcJwoWgA5ltNHMc5yXzTU VKCrziPfqzzH8/pE54Nu3D6pr/loLKEyvEpjmqd0pLqBBAyMT//CKrtEd0+NDdSrkC5LH6B0QhH Z1DtWQNnWhs3KpMPj8AotPBetfnIJkuDY8+lMEMdi6NrdTMztdtYIqMrHxMAXqlWw7RQiz66vWk JYKiSaBY2sI6N/Rjevy5BO5uXEcTA4Hg8ZYNXYkS63uzja0aXhQC+Tpl/GE+N2ekj/VyZYdRyxV ir4dMzULi71GL0iNKb+W8jsNa4ftkXyYoJTiBTUUjYLFUyZDAWUi3mBs4W5v3ehvgqH/UD5/gIc TyRWEN/8Fhf1y4MDgIdxslO0Mf8m7ayKZcpCE2yhtxrSsxxkX/+o= X-Google-Smtp-Source: AGHT+IFkAkj7pcBqvW8bpnlcAqEv/PlsD4qP9gZ18v5DQ1XdvO0ptkX6z7eUF8xz3puBqvAG72yuvw== X-Received: by 2002:a05:6512:33ca:b0:553:2c44:c259 with SMTP id 2adb3069b0e04-5539c246f64mr477988e87.9.1749690940689; Wed, 11 Jun 2025 18:15:40 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-553a7018069sm62808e87.157.2025.06.11.18.15.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jun 2025 18:15:40 -0700 (PDT) From: Vladimir Zapolskiy To: Krzysztof Kozlowski , Rob Herring , Bjorn Andersson , Konrad Dybcio , Bryan O'Donoghue Cc: Conor Dooley , Robert Foss , Todor Tomov , Mauro Carvalho Chehab , Neil Armstrong , Vinod Koul , linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 02/10] media: qcom: camss: remove subdev resource argument from msm_csiphy_subdev_init() Date: Thu, 12 Jun 2025 04:15:23 +0300 Message-ID: <20250612011531.2923701-3-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250612011531.2923701-1-vladimir.zapolskiy@linaro.org> References: <20250612011531.2923701-1-vladimir.zapolskiy@linaro.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The removed argument is directly and unambiguously derived from other ones. Signed-off-by: Vladimir Zapolskiy --- drivers/media/platform/qcom/camss/camss-csiphy.c | 6 +++--- drivers/media/platform/qcom/camss/camss-csiphy.h | 5 +---- drivers/media/platform/qcom/camss/camss.c | 1 - 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/media/platform/qcom/camss/camss-csiphy.c b/drivers/media/platform/qcom/camss/camss-csiphy.c index 2de97f58f9ae..1ba3fc2e33ac 100644 --- a/drivers/media/platform/qcom/camss/camss-csiphy.c +++ b/drivers/media/platform/qcom/camss/camss-csiphy.c @@ -569,16 +569,16 @@ static bool csiphy_match_clock_name(const char *clock_name, const char *format, /* * msm_csiphy_subdev_init - Initialize CSIPHY device structure and resources + * @camss: CAMSS device * @csiphy: CSIPHY device - * @res: CSIPHY module resources table * @id: CSIPHY module id * * Return 0 on success or a negative error code otherwise */ int msm_csiphy_subdev_init(struct camss *camss, - struct csiphy_device *csiphy, - const struct camss_subdev_resources *res, u8 id) + struct csiphy_device *csiphy, u8 id) { + const struct camss_subdev_resources *res = &camss->res->csiphy_res[id]; struct device *dev = camss->dev; struct platform_device *pdev = to_platform_device(dev); int i, j; diff --git a/drivers/media/platform/qcom/camss/camss-csiphy.h b/drivers/media/platform/qcom/camss/camss-csiphy.h index 895f80003c44..d82dafd1d270 100644 --- a/drivers/media/platform/qcom/camss/camss-csiphy.h +++ b/drivers/media/platform/qcom/camss/camss-csiphy.h @@ -113,11 +113,8 @@ struct csiphy_device { struct csiphy_device_regs *regs; }; -struct camss_subdev_resources; - int msm_csiphy_subdev_init(struct camss *camss, - struct csiphy_device *csiphy, - const struct camss_subdev_resources *res, u8 id); + struct csiphy_device *csiphy, u8 id); int msm_csiphy_register_entity(struct csiphy_device *csiphy, struct v4l2_device *v4l2_dev); diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c index 0d05f52a6e92..695f113472a5 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -3074,7 +3074,6 @@ static int camss_init_subdevices(struct camss *camss) for (i = 0; i < camss->res->csiphy_num; i++) { ret = msm_csiphy_subdev_init(camss, &camss->csiphy[i], - &res->csiphy_res[i], res->csiphy_res[i].csiphy.id); if (ret < 0) { dev_err(camss->dev, From patchwork Thu Jun 12 01:15:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 896708 Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (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 D004F135A53 for ; Thu, 12 Jun 2025 01:15:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749690946; cv=none; b=Gwf4gXlY/eOXny18bPVvDWXv5ZbHNVCylX+XRNfcWTsgezx/yJyR1gT4zD8F09lhG1q9MDmD3sKt7ipzApTZ+HHduZ6eqRLtDYaZSYUDQ1b9Cr+lXgqzHD8bNK2P79QOzttBfydig4+DVyz3+bN06tJgf0EVXwvtc/2JL7wryRw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749690946; c=relaxed/simple; bh=IMi0ADJmNFhdUTuPsCvNz20Avnzqg/FLQjL/Lp+bix4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EmFLcZ1ym9h9VDr6uD7u72iRLDTvHbZc2LWsewpmA7vDutwfPzOK9fG4tDf2NjkmFtdsOSxQ1MVVM8VpJt774e2PYuaelSFu8pFTSUHT9agbJqUweTsjX7XxJhzpLlEFDCjicY3n0JxSfZaj7HEX5wDfM4tzNG8NDKxevUz+PxQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=FVunQLJa; arc=none smtp.client-ip=209.85.208.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="FVunQLJa" Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-32a8abb1613so569281fa.2 for ; Wed, 11 Jun 2025 18:15:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749690943; x=1750295743; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+gi7OuH3v0fsslSod+wg7r1kDbClC/Q60uMP2imoSx0=; b=FVunQLJatUJOXwrKVTGxyqcSh6CqF2Xylkz0r4H1Yh7RrmG08sfTdH4u/g17hN0RDz hUNCgEGlHTSTLslibbSOEH7wsE9Y7bYpIDMdYfcPKp3OMyI0Uvq692z2Okoem72ALFmj XjchoJehTtXHBD9AMH0DQE1mMReCwrqeK4UnzT/mRz8NSNV0AGLxAHQr4epmQ92HILV4 3WEkxJudF/LLLwUhp1rcSNGWM6OoflunRXLSxUFyZDkj+oa4fj1teybLgWWkUexFIolo G8yuOZdV23GzjJQzqd5pdSJDSNVos9xlL4bOgLMr/WklERgNjGCcgL2Jsb0H4wbCz/rm vEPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749690943; x=1750295743; 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=+gi7OuH3v0fsslSod+wg7r1kDbClC/Q60uMP2imoSx0=; b=l767ZqR4GQcREVeLLaW0frzOfvmrSL/Rj2R7JO+D8L622sQgcgC6E9JNO4kPUkeaaX WD6g+Hyca5TYHdLJsbFfwnE70cXmJnu0pKzp+PjjeSvWS+xAQ2v0vm5A9EA7MhfYTgWY cnXZVUpfSv9I1/DUSMeccWHzkzdfrK52U2Hs5lJedWUArXGoPV0lmHYrtYvM4tbMBHQ5 6yK8ekWt+1ZahRWqsT9tahOVfDkZOfbPjBKOIPlOAKd55n+DSXb0JrI+MiaMIg5Js/IM EXmFQFcVbbK5goRP9TPO8HKAJsXQTN5/Ot3im+FuM23QJHvNEMBQwh3tk5fWD7dunDLm Q3Ug== X-Forwarded-Encrypted: i=1; AJvYcCWzQx/9vgGGhBAqmTmqZ09T7+pPYKDwjrCnkXHRLyLZN89PfeaNMEn0HeRBv88lVoryr71wbFfQKYmXrCz7@vger.kernel.org X-Gm-Message-State: AOJu0YyfjezbC7C45aIQC5vTxK6rIkHBYBo0MLPZEKC5SikbEXyPX+DG Cpjw4pPjiX4TajF/YbTIdbwN3dp4NjGXUbpjWobFqyII6q5/9tMtCu3Sywuxrc3/vmQ= X-Gm-Gg: ASbGncvDTMIGAILx3zRhjKRLfJ8RwHj4wix6uUYO6pXYMdiX7vQb1iXhMC1vW4e2DrB 8UnNG74Sbc3ZRnZUYOOCjRhMcc1O7d5QZTAkkssZyW4Lmxkp3pD6a9fTk1WSQ2rJnIYPZ0nJ8sh /zAsnfFPlsI8ETzjP2zOOSMSlgjh0TvZhp3XyT3CrxfZa096KIWLzXV5vnTCSUm2hTOC3u2xlbn FOUDSKnEgwfvBbN1CisN6xsjzQPPPL0fceBmYfobz2cV9Csr00zrOwgcO9w1T/hE6DXfJzn1WjO qEErwjqVT7k2uvH1NB5JisOklE6rhdCM0yd+/5RWVFiWydJfcJomRaed41CBr1U6hwxnbv6xr4n BuzQbX7gQ8bN/xCD6usOXS5EUWjQV4fzmIQS7faCrabs4PBiVzL4= X-Google-Smtp-Source: AGHT+IFPMkepThXh+hpHafQU+8mg6c4yfS3OBn21itTHnwbLfxR1NdOOPbci4HOxrZLuvpBH2+aJIw== X-Received: by 2002:a05:6512:33ca:b0:553:30fc:cedb with SMTP id 2adb3069b0e04-5539c11831amr554733e87.10.1749690942952; Wed, 11 Jun 2025 18:15:42 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-553a7018069sm62808e87.157.2025.06.11.18.15.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jun 2025 18:15:42 -0700 (PDT) From: Vladimir Zapolskiy To: Krzysztof Kozlowski , Rob Herring , Bjorn Andersson , Konrad Dybcio , Bryan O'Donoghue Cc: Conor Dooley , Robert Foss , Todor Tomov , Mauro Carvalho Chehab , Neil Armstrong , Vinod Koul , linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 03/10] media: qcom: camss: csiphy: simplify arguments of lanes_enable and lanes_disable Date: Thu, 12 Jun 2025 04:15:24 +0300 Message-ID: <20250612011531.2923701-4-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250612011531.2923701-1-vladimir.zapolskiy@linaro.org> References: <20250612011531.2923701-1-vladimir.zapolskiy@linaro.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In some of .lanes_enable and .lanes_disable functions the second argument of csiphy_config type is either unused or it can be derived from the main function argument, this lets to remove it from the list of arguments. Apart of being the simplification the change is needed for further updates to CSIPHY part of the CAMSS driver to get CSIPHY combo mode feature and a related to it management of non-statically assigned CSIPHY media pads. Signed-off-by: Vladimir Zapolskiy Reviewed-by: Bryan O'Donoghue --- .../media/platform/qcom/camss/camss-csiphy-2ph-1-0.c | 10 ++++------ .../media/platform/qcom/camss/camss-csiphy-3ph-1-0.c | 11 ++++------- drivers/media/platform/qcom/camss/camss-csiphy.c | 4 ++-- drivers/media/platform/qcom/camss/camss-csiphy.h | 4 +--- 4 files changed, 11 insertions(+), 18 deletions(-) diff --git a/drivers/media/platform/qcom/camss/camss-csiphy-2ph-1-0.c b/drivers/media/platform/qcom/camss/camss-csiphy-2ph-1-0.c index 9d67e7fa6366..d9735f61fffc 100644 --- a/drivers/media/platform/qcom/camss/camss-csiphy-2ph-1-0.c +++ b/drivers/media/platform/qcom/camss/camss-csiphy-2ph-1-0.c @@ -95,10 +95,9 @@ static u8 csiphy_settle_cnt_calc(s64 link_freq, u32 timer_clk_rate) } static void csiphy_lanes_enable(struct csiphy_device *csiphy, - struct csiphy_config *cfg, s64 link_freq, u8 lane_mask) { - struct csiphy_lanes_cfg *c = &cfg->csi2->lane_cfg; + struct csiphy_lanes_cfg *c = &csiphy->cfg.csi2->lane_cfg; u8 settle_cnt; u8 val, l = 0; int i = 0; @@ -114,7 +113,7 @@ static void csiphy_lanes_enable(struct csiphy_device *csiphy, val |= lane_mask << 1; writel_relaxed(val, csiphy->base + CAMSS_CSI_PHY_GLBL_PWR_CFG); - val = cfg->combo_mode << 4; + val = csiphy->cfg.combo_mode << 4; writel_relaxed(val, csiphy->base + CAMSS_CSI_PHY_GLBL_RESET); for (i = 0; i <= c->num_data; i++) { @@ -134,10 +133,9 @@ static void csiphy_lanes_enable(struct csiphy_device *csiphy, } } -static void csiphy_lanes_disable(struct csiphy_device *csiphy, - struct csiphy_config *cfg) +static void csiphy_lanes_disable(struct csiphy_device *csiphy) { - struct csiphy_lanes_cfg *c = &cfg->csi2->lane_cfg; + struct csiphy_lanes_cfg *c = &csiphy->cfg.csi2->lane_cfg; u8 l = 0; int i = 0; 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..69d95bfeb9d2 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 @@ -638,10 +638,9 @@ static u8 csiphy_settle_cnt_calc(s64 link_freq, u32 timer_clk_rate) } static void csiphy_gen1_config_lanes(struct csiphy_device *csiphy, - struct csiphy_config *cfg, u8 settle_cnt) { - struct csiphy_lanes_cfg *c = &cfg->csi2->lane_cfg; + struct csiphy_lanes_cfg *c = &csiphy->cfg.csi2->lane_cfg; int i, l = 0; u8 val; @@ -758,10 +757,9 @@ static bool csiphy_is_gen2(u32 version) } static void csiphy_lanes_enable(struct csiphy_device *csiphy, - struct csiphy_config *cfg, s64 link_freq, u8 lane_mask) { - struct csiphy_lanes_cfg *c = &cfg->csi2->lane_cfg; + struct csiphy_lanes_cfg *c = &csiphy->cfg.csi2->lane_cfg; struct csiphy_device_regs *regs = csiphy->regs; u8 settle_cnt; u8 val; @@ -791,7 +789,7 @@ static void csiphy_lanes_enable(struct csiphy_device *csiphy, if (csiphy_is_gen2(csiphy->camss->res->version)) csiphy_gen2_config_lanes(csiphy, settle_cnt); else - csiphy_gen1_config_lanes(csiphy, cfg, settle_cnt); + csiphy_gen1_config_lanes(csiphy, settle_cnt); /* IRQ_MASK registers - disable all interrupts */ for (i = 11; i < 22; i++) { @@ -800,8 +798,7 @@ static void csiphy_lanes_enable(struct csiphy_device *csiphy, } } -static void csiphy_lanes_disable(struct csiphy_device *csiphy, - struct csiphy_config *cfg) +static void csiphy_lanes_disable(struct csiphy_device *csiphy) { struct csiphy_device_regs *regs = csiphy->regs; diff --git a/drivers/media/platform/qcom/camss/camss-csiphy.c b/drivers/media/platform/qcom/camss/camss-csiphy.c index 1ba3fc2e33ac..f561811b7617 100644 --- a/drivers/media/platform/qcom/camss/camss-csiphy.c +++ b/drivers/media/platform/qcom/camss/camss-csiphy.c @@ -295,7 +295,7 @@ static int csiphy_stream_on(struct csiphy_device *csiphy) wmb(); } - csiphy->res->hw_ops->lanes_enable(csiphy, cfg, link_freq, lane_mask); + csiphy->res->hw_ops->lanes_enable(csiphy, link_freq, lane_mask); return 0; } @@ -308,7 +308,7 @@ static int csiphy_stream_on(struct csiphy_device *csiphy) */ static void csiphy_stream_off(struct csiphy_device *csiphy) { - csiphy->res->hw_ops->lanes_disable(csiphy, &csiphy->cfg); + csiphy->res->hw_ops->lanes_disable(csiphy); } diff --git a/drivers/media/platform/qcom/camss/camss-csiphy.h b/drivers/media/platform/qcom/camss/camss-csiphy.h index d82dafd1d270..3b73248f1364 100644 --- a/drivers/media/platform/qcom/camss/camss-csiphy.h +++ b/drivers/media/platform/qcom/camss/camss-csiphy.h @@ -72,10 +72,8 @@ struct csiphy_hw_ops { struct device *dev); void (*reset)(struct csiphy_device *csiphy); void (*lanes_enable)(struct csiphy_device *csiphy, - struct csiphy_config *cfg, s64 link_freq, u8 lane_mask); - void (*lanes_disable)(struct csiphy_device *csiphy, - struct csiphy_config *cfg); + void (*lanes_disable)(struct csiphy_device *csiphy); irqreturn_t (*isr)(int irq, void *dev); int (*init)(struct csiphy_device *csiphy); }; From patchwork Thu Jun 12 01:15:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 897044 Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (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 39F6014A62B for ; Thu, 12 Jun 2025 01:15:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749690949; cv=none; b=CEt4G25iiaC+HYkXb1nonOQmzk0WyP8BF7/NZWwVjzNfYpg2ANLXrsH2xot9DId/qCAJZpCKKuYETQmOsrXYAT4b58VpbAHiEerLBeeIo8D/fBj61sqAlDYE7c2M4dkOtMTlh73/N9D6v9ir21c0ObmfJDrN0XN64XHv5GdNtjY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749690949; c=relaxed/simple; bh=8LFRR6aw1kzUR2Mwvq9YmarBBuVI7fsD11sKv+PqvhI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nyqbIfIQVEnr4q+q93uh63SSe1siH/RD3EVjdHIjH0ZsSVTtoXCcsWC0ueTSkbGYfGg17iJd5axCUapCHerfAyUtetaECA6S1OdAx1lbKimr6ZkrM6P0C9onF+LfXVQI+Gqw6sYLyWzo1oDiN+Hqcn5dGjrG6XyADayZiys8yoQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=IP3v5LXw; arc=none smtp.client-ip=209.85.208.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="IP3v5LXw" Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-32a65d1a966so504961fa.0 for ; Wed, 11 Jun 2025 18:15:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749690945; x=1750295745; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7Hw07cXyVozJ7xLFB0976rzOhihiAuNg6d3ccF7eDVc=; b=IP3v5LXwKzgGtYh8UVDmSX/6lyLIJ+hBpOmM4xz7Y59Vyc1tRRltuXLMZw7ZbxvInE JQxwyEZk6Zyj6vH1r+RE5utqx5Fd9oonScExua2UT0ZaQICO71h/LK5Dfvk1cKwg7jSF Y0kov7u2fklrpaulCZBR4blj6vwQQtaLf8GLMDRdWjtI70LtvHrZCShR9UFmakSivi6S crXTalrIX+TpzTd9i3OPcGpSf4l8KOzomdKgIfEzns+QungaXhMPSFMjBoCIsuUTBXiI PEp8304jNbYJvae5z+ABUwPI2AFM6cDf9HbWJtQBtULQdA0I0wdDUbPKQIAWkOet6U4Z IvLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749690945; x=1750295745; 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=7Hw07cXyVozJ7xLFB0976rzOhihiAuNg6d3ccF7eDVc=; b=BYfW6UfREDxKzA+71jMk7pGS9qkmPxFUTXATsSmmKViCG/dFOerbb0bpEOpmEW7/U2 MPC6Y2UaobdE85C9Dj7M/eSHM+EGXTVS1FkyMtr355uW12TSqe5/W9GdNcmOwyuUn9JZ MZ7v4JYmE88jkjgRXsfpoBKlOPfhE+Bevb8mDgNYMWrZOpdRALVS6yolfmKRbXqmhaH1 SPNHIU0yaiVY8+lL57TOjbtdOtu6x6zNrkEIATh1K6CwcuxBk/jYbieOFU8qPkWBKj2m 1xmRk2DiblSaht0mAMNx7dE9AH+8na1gSqR49/xcjiq5nfwORce93nQCR0U1eo3iAtL7 KC/w== X-Forwarded-Encrypted: i=1; AJvYcCXwdkIEeopnt3+bjxPxAtivVTsr63dZAYJ+v9zsv7ir8OVm6crgaMxJ8+pVshuyMsyPuuH5ttUm/KEqWkbd@vger.kernel.org X-Gm-Message-State: AOJu0Yz/L7EgKMsauIa4iGmClC6KO7QfR95OFA2zWjaSKFjrKS2kfm5t BiSGjLgijjDkEkjfUw48zfVqL603XlmJVxCqoKuj6qn0wJB06Fv4fdaK8iVDwiayzdI= X-Gm-Gg: ASbGnctiGopCBAP+H/8u1ZWjZ4j0dpuC2uXQfcZxWWuk9SkJt1p6IhKmt7vRynCHLGZ y0HW/L8tPU8MPLzunaoMv1HKK4Yl+kiIFtC6Oply7jnCrHuPt2umiZW8TsU5vtHhguNTCEMRr/C 4PAsTPtPGTqdHKThN8dwSSNz7suc7I4JU0mdsV86k7tJ+bol+JRXg+k80Y2Sj10n5pmx1PiEwKr UzoSQGZZktIiu0/GsJOzgkDXzk7QKlOdglRZ8tROqVfwcNbCbC/KjiSJvQI42o4sqB84yO4+LXL YeOQ5nHr/eUSF0mPQn2vHm3EoUa4fBGk3Z4ntVCYJZnsUaeA47vACyGGKKmy7MUL2KmO+oCGKEK 6/KuOi6414fTct/j/4V/wsAnaBNlozIfT6Y2V4aBAUZ4ZzRAoc0w= X-Google-Smtp-Source: AGHT+IGekwp7EF+dtU4JS1ed4hOg7nluotXxCX3FAdah8xWHHrvdm7rQ2nqJB3VIiCQQDM/LY5MjbA== X-Received: by 2002:a05:6512:acf:b0:553:34fc:3bd5 with SMTP id 2adb3069b0e04-5539c2004a5mr587311e87.8.1749690945252; Wed, 11 Jun 2025 18:15:45 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-553a7018069sm62808e87.157.2025.06.11.18.15.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jun 2025 18:15:44 -0700 (PDT) From: Vladimir Zapolskiy To: Krzysztof Kozlowski , Rob Herring , Bjorn Andersson , Konrad Dybcio , Bryan O'Donoghue Cc: Conor Dooley , Robert Foss , Todor Tomov , Mauro Carvalho Chehab , Neil Armstrong , Vinod Koul , linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 04/10] media: qcom: camss: populate CAMSS children subdevices of CSIPHY IPs Date: Thu, 12 Jun 2025 04:15:25 +0300 Message-ID: <20250612011531.2923701-5-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250612011531.2923701-1-vladimir.zapolskiy@linaro.org> References: <20250612011531.2923701-1-vladimir.zapolskiy@linaro.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 To add a number of CSIPHY devices under CAMSS device tree node populate the children devices, if they are present, and exclude handling of such discovered CSIPHY devices in runtime from the CAMSS device driver. Signed-off-by: Vladimir Zapolskiy --- .../media/platform/qcom/camss/camss-csiphy.h | 1 + drivers/media/platform/qcom/camss/camss.c | 77 ++++++++++++++++++- 2 files changed, 74 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/qcom/camss/camss-csiphy.h b/drivers/media/platform/qcom/camss/camss-csiphy.h index 3b73248f1364..f092b7ff2f26 100644 --- a/drivers/media/platform/qcom/camss/camss-csiphy.h +++ b/drivers/media/platform/qcom/camss/camss-csiphy.h @@ -91,6 +91,7 @@ struct csiphy_device_regs { }; struct csiphy_device { + struct device *dev; struct camss *camss; u8 id; struct v4l2_subdev subdev; diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c index 695f113472a5..71a37447e17a 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -3059,6 +3060,47 @@ static int camss_parse_ports(struct camss *camss) return ret; } +static void camss_csiphy_put(struct camss *camss) +{ + unsigned int i; + + for (i = 0; i < camss->res->csiphy_num; i++) + put_device(camss->csiphy[i].dev); +} + +static void camss_csiphy_get(struct camss *camss) +{ + struct device_node *camss_node = dev_of_node(camss->dev); + unsigned int i; + int phys; + + phys = of_count_phandle_with_args(camss_node, "phys", NULL); + if (phys < 0) + return; + + if (phys != camss->res->csiphy_num) + dev_info(camss->dev, "Number of phys is unexpected\n"); + + for (i = 0; i < camss->res->csiphy_num; i++) { + struct platform_device *phy_pdev; + struct device_node *phy_node; + + phy_node = of_parse_phandle(camss_node, "phys", i); + if (!phy_node || + !of_node_name_eq(phy_node, "phy") || + !of_device_is_available(phy_node)) + continue; + + /* At this point it shall be possible to reference the phy */ + phy_pdev = of_find_device_by_node(phy_node); + of_node_put(phy_node); + if (!phy_pdev) + continue; + + camss->csiphy[i].dev = &phy_pdev->dev; + } +} + /* * camss_init_subdevices - Initialize subdev structures and resources * @camss: CAMSS device @@ -3073,6 +3115,10 @@ static int camss_init_subdevices(struct camss *camss) int ret; for (i = 0; i < camss->res->csiphy_num; i++) { + /* Initialize only non-registered CSIPHY subdevices */ + if (camss->csiphy[i].dev) + continue; + ret = msm_csiphy_subdev_init(camss, &camss->csiphy[i], res->csiphy_res[i].csiphy.id); if (ret < 0) { @@ -3155,6 +3201,9 @@ static int camss_link_entities(struct camss *camss) int ret; for (i = 0; i < camss->res->csiphy_num; i++) { + if (camss->csiphy[i].dev) + continue; + for (j = 0; j < camss->res->csid_num; j++) { ret = media_create_pad_link(&camss->csiphy[i].subdev.entity, MSM_CSIPHY_PAD_SRC, @@ -3265,6 +3314,9 @@ static int camss_register_entities(struct camss *camss) int ret; for (i = 0; i < camss->res->csiphy_num; i++) { + if (camss->csiphy[i].dev) + continue; + ret = msm_csiphy_register_entity(&camss->csiphy[i], &camss->v4l2_dev); if (ret < 0) { @@ -3321,7 +3373,8 @@ static int camss_register_entities(struct camss *camss) i = camss->res->csiphy_num; err_reg_csiphy: for (i--; i >= 0; i--) - msm_csiphy_unregister_entity(&camss->csiphy[i]); + if (!camss->csiphy[i].dev) + msm_csiphy_unregister_entity(&camss->csiphy[i]); return ret; } @@ -3337,7 +3390,8 @@ static void camss_unregister_entities(struct camss *camss) unsigned int i; for (i = 0; i < camss->res->csiphy_num; i++) - msm_csiphy_unregister_entity(&camss->csiphy[i]); + if (!camss->csiphy[i].dev) + msm_csiphy_unregister_entity(&camss->csiphy[i]); for (i = 0; i < camss->res->csid_num; i++) msm_csid_unregister_entity(&camss->csid[i]); @@ -3379,6 +3433,9 @@ static int camss_subdev_notifier_complete(struct v4l2_async_notifier *async) if (!csiphy) continue; + if (csiphy->dev) + continue; + input = &csiphy->subdev.entity; sensor = &sd->entity; @@ -3585,13 +3642,22 @@ static int camss_probe(struct platform_device *pdev) return ret; } + ret = devm_of_platform_populate(camss->dev); + if (ret) { + dev_err(camss->dev, + "Failed to populate camss children devices: %d\n", ret); + goto err_genpd_cleanup; + } + + camss_csiphy_get(camss); + ret = camss_init_subdevices(camss); if (ret < 0) - goto err_genpd_cleanup; + goto err_csiphy_put; ret = dma_set_mask_and_coherent(dev, 0xffffffff); if (ret) - goto err_genpd_cleanup; + goto err_csiphy_put; camss->media_dev.dev = camss->dev; strscpy(camss->media_dev.model, "Qualcomm Camera Subsystem", @@ -3648,6 +3714,8 @@ static int camss_probe(struct platform_device *pdev) pm_runtime_disable(dev); err_media_device_cleanup: media_device_cleanup(&camss->media_dev); +err_csiphy_put: + camss_csiphy_put(camss); err_genpd_cleanup: camss_genpd_cleanup(camss); @@ -3680,6 +3748,7 @@ static void camss_remove(struct platform_device *pdev) if (atomic_read(&camss->ref_count) == 0) camss_delete(camss); + camss_csiphy_put(camss); camss_genpd_cleanup(camss); } From patchwork Thu Jun 12 01:15:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 896707 Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (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 6445F15382E for ; Thu, 12 Jun 2025 01:15:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749690952; cv=none; b=bICFoUJ60elAm5oO2N6M2RoKjbDkWRikXOi06WsUIUynRlFOX3IS0TPz4HroaBEjGnps5xV0gzs5FYLezHiSAkj9gIfaviwfkQXRfqDJ1N9iY7qLVtGXzrEFaUL9BV2mChRmAfhiGdjkP605WMELCtZ6OLsPbNHd9WFig3Rwz7I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749690952; c=relaxed/simple; bh=Br2+sPECo0mbbnRGjEs+gcJ7Da6KTtHQtd0Iun2iP4g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=h+LDXk2IiqXqUXRXyBCjwWCR6x7eHhc0ryXgcBqLjLGlrI2Synaq4/ukXtyPgE1IKNCBOskYpmOJVtOyb/07drsVLATZ5b9pCypbwwvGhc9Z17ziptUSN8cKn++nyuNsTuC/2PjKDkPaDWW85i/YNwd1zJKqblcLffooP7E66Es= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=tV76yzRj; arc=none smtp.client-ip=209.85.208.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="tV76yzRj" Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-32ae0e2e4daso372881fa.2 for ; Wed, 11 Jun 2025 18:15:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749690948; x=1750295748; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mBPHq117dWQljJbOWkWsV8bZPt4ezjyADVBAza4ih8A=; b=tV76yzRjD0AcIgQ7aCrkcn8omiQifxA7P9fjX9C4rrRaFik8IXARUiOxgVoOFEVu5O wUEPSN3Io9oIWJKqiWMPWeaJLcWtulHZJy80aS5TkDGob7zDdc6OwQiHC1hrdpHwvLFU amHPNHzeaWAU0UUKcoLnVnfh5fi2a882nZdNhe/7Da/rtM9xhY1UAGjF90MPBmm1GU9B THJhUh7qyJcWiHu/Dx/TguFGUgHSh4TkDAgNQVangT7k5aY5hPJ5sJ2s0Ha9S3qVS4BP CTHAxSiAaFYBh/KVJhgkDwPcFBkml4niFaoLqSUWz/8HqGhjS/Wb6o6QJJJL9PCPqJWS nLDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749690948; x=1750295748; 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=mBPHq117dWQljJbOWkWsV8bZPt4ezjyADVBAza4ih8A=; b=f6qNCh1Ic4DNS1+K9wOClkNTi/1NDWGHcPk2sGzUR5FPJTgyAsmDXCV8hwZvq17YPy +feNFwDh7Lu/yaSDn24k8yqheAuzCUjdT3tWIyM92pVcDEmqr2xgBIhdU6WFLL3FnIe6 Y4QXKvp+G5/2gmSgDGWIZ+SgtRoUpYXGcwNFr4g8DzUk5xZ8MLUgbj2YS62OZctP7mG3 EZWdhoWf/UXt5F49megWK1woOrIZDM+DEjTMIfUs5WcnsiPtWpeej+AlkhIkTL4AJNgH BuEAD1dn2QuGdJWPzcPIrWySRwRvAHxJx5Lkx/1OoFgWu7dHGTXxtu8cgSE42jGgFvwF igpw== X-Forwarded-Encrypted: i=1; AJvYcCU7/rJRdVbLwVEm4X6hkw1EeI3Q4l0LGoEsDgNzG0uFluK37c2g/zl1Wo33a4dGw1y3KlNogA9s3A9b4A9j@vger.kernel.org X-Gm-Message-State: AOJu0Yx0hiahQbQCAOLfUlmxS5E5CQW18/mv4MVpbRxZ3uIu9MJhEr77 4cdDT5G5Yy4Pv3D3XYNCEiXEv1Ax1L7EQQ6qtcvufmKfNcXYfGOF9/I9vcmNgYRuBqo= X-Gm-Gg: ASbGnct/xqdEmKFM+9gIiXNtN2GZghhBzuNhomhtltZjj1RPCxXV1CbkMUfgRQfiJD/ vWHLelRpv8Rco4qr7iUsFm7r/Mw1ob8BiYWNxfPSlYLP0rIL8ie27UUX+B7rMsXfvGhIfTE1dZm jNVwXdFY1tj9dASMp+UeUGbKcv2ylc6lE5uZJ+kAKzRc3kJfsQn6DRUDOeLAZcZqwn9GzNKHDpt KiFjIdY85/YwBBKnxmVuTwHikZabp6gbPona9ACPIo4Ra9ppGcUgUmu1RaahbWZQ4aj6e5NbNUK cUHxLYq5+vgOh8Bzs38RjXmAUIMosIlIOqf0uoRJ8fl/HwU6vOdRoyLquO25rbN4a7TTmXM+XSa j/tmVcyR+A5TaEzgvNn97CR8g/OJDZxTEim2Hyy/c7d2acAX3w0g= X-Google-Smtp-Source: AGHT+IGjvJjUSGUrBTNd9Gheaxu65cY98U3D2htsFy57efkcRMWJJtiq8QTKRbMHsaxIiIbQ4v6Wfw== X-Received: by 2002:a05:6512:23a4:b0:553:a78d:2c44 with SMTP id 2adb3069b0e04-553a78d381bmr36548e87.7.1749690948390; Wed, 11 Jun 2025 18:15:48 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-553a7018069sm62808e87.157.2025.06.11.18.15.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jun 2025 18:15:46 -0700 (PDT) From: Vladimir Zapolskiy To: Krzysztof Kozlowski , Rob Herring , Bjorn Andersson , Konrad Dybcio , Bryan O'Donoghue Cc: Conor Dooley , Robert Foss , Todor Tomov , Mauro Carvalho Chehab , Neil Armstrong , Vinod Koul , linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 05/10] media: qcom: camss: unwrap platform driver registration Date: Thu, 12 Jun 2025 04:15:26 +0300 Message-ID: <20250612011531.2923701-6-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250612011531.2923701-1-vladimir.zapolskiy@linaro.org> References: <20250612011531.2923701-1-vladimir.zapolskiy@linaro.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 To be able to register new CSIPHY device drivers unfold module_platform_driver() into module_init()/module_exit(). Signed-off-by: Vladimir Zapolskiy --- drivers/media/platform/qcom/camss/camss.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c index 71a37447e17a..e03308d7a366 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -3953,7 +3953,17 @@ static struct platform_driver qcom_camss_driver = { }, }; -module_platform_driver(qcom_camss_driver); +static int __init qcom_camss_init(void) +{ + return platform_driver_register(&qcom_camss_driver); +} +module_init(qcom_camss_init); + +static void __exit qcom_camss_exit(void) +{ + platform_driver_unregister(&qcom_camss_driver); +} +module_exit(qcom_camss_exit); MODULE_ALIAS("platform:qcom-camss"); MODULE_DESCRIPTION("Qualcomm Camera Subsystem driver"); From patchwork Thu Jun 12 01:15:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 897043 Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (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 86BA3154BF5 for ; Thu, 12 Jun 2025 01:15:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749690954; cv=none; b=Z6IocNzT2pgTO+IiXgJPZEsAySpzWlP3LkDl7ECBP9ZCFxNnSypUYf46alDk3OtHS9qksqWOB49JejIWp/t34e77I6qKVkLyrvxRsDcaEFSq86mFoI7+uzQTCGVzflVVZoRXpR/1PdxcccKHY/8s51E3W8JykesLwNE5JdVOOFc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749690954; c=relaxed/simple; bh=LqRPAqNQlNO3zu9aKoKgeHnMk4rQEK/l7ENgXrCUZAI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IX6pFikU5xhyIq+hhPe56YAsfZ865a6HV63BZNhLImbacIXapsKEciBzQj+8z+6U4jCRM16G3o/4mIHi1DccIjJarVn6tfZE51fR5wcpoDLfMJugfQzM1sAOa3a9MIpu1WSPg6UQL8X2AgtYdlWOw7BogAlhTxzIN45SpZQ0kGo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=WubHWjMc; arc=none smtp.client-ip=209.85.208.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="WubHWjMc" Received: by mail-lj1-f172.google.com with SMTP id 38308e7fff4ca-32a65d1a966so505101fa.0 for ; Wed, 11 Jun 2025 18:15:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749690951; x=1750295751; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TGXO7XE6Zd1Vk08ChbQh+PqLJC+OLbKRi30oxb1Svek=; b=WubHWjMcdRXHWWKVCKOkjUI9SRv/lW6N1KGO85u30YHbhzoODvdJH7BFlrEYzbvB4U G7YGEQZp+azNp6ZXMNtdj4tvXmKNYCeT6cDgNPbv0VmmYn71/tusVC2r2X3lwbebRMQr J2w75gqIquc0E/ktDaOxSliwqYU3V+8OP8+5/7EaZ/7vvaWI9NS252GaHkJpcaJMzGG1 Az8jSBXRttrLgkWd/yfSsTCI6YeOoyBOvkiyJ7GGQND9ZdwvsJ0vXfhN5ejtuWzbti2X QfoF730eWa9M/4GdndiSw9zHd/UDD/E0kVJQSOc6QDoXLl9F7URI/fqYqKapOC6wdS9O D2Lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749690951; x=1750295751; 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=TGXO7XE6Zd1Vk08ChbQh+PqLJC+OLbKRi30oxb1Svek=; b=Aa1xX1CUrnXWdM2X3zaqG9VUqVCJqo5p2/i0xvM+l7qVOC6BOY/ZNFwZt6hf8N6znl CuecAK9ruJAtz1i9T7vo9YLvkmQotCMo8vSrQL2VlCAfipflyoD7TZ5RnUr2dSVvPqmC QkpGz85dMMn0r8fwgQpc+m/Y8Ggs4oRBwGsSIYAyAj3fQ8F5uQMM1KfZdDu6v1exbgYj Rs51ERSMRa9djgfT7EWHjvght01mtkGWdXVVUxTOhVTvI5T2xvt8HWVA8KEUiG5BeNXA aRU2KZy+qwak/kPMghlWQICpYyb66XVb/XBv5QszhxKU262evsDiBTfzIObnrOYMM5Ah wI2Q== X-Forwarded-Encrypted: i=1; AJvYcCWFvZeRZuTShM6bJJ+Rx7F5TIs+54txNcyJIY5m+7oYHXUTjTVu0g/CYSv5zi7qZ2nWtspspOcNLHGoGmuQ@vger.kernel.org X-Gm-Message-State: AOJu0Yye7H18rEPvbblCvaG5ubwU1xMtzvEvkRFKmk3u+QPFgILC+k3G xzsSle81wUqePX4C4+toq7dLnesGEaDoW+LLAgdtdzaOxeKe6YV5UwsRM3Y3vB5DYY4= X-Gm-Gg: ASbGncswy5/Jz3rAC+f2OEOq+kQoFJec5ayU9QC5cI2JRD9xTxxH9Cw7h2ieJG5Mbw6 RQ7dUeYwHD4D6VY2yv7wbGPPUFFxe8LhlA+rkjE8Rgn4aVkX7XWfrfP2U5ufSj3OuAoBVQ8559S W0nZZuv9BAsBr6DcOWKEnrSNKV4fHgCG5qPmYCS5rQs6M+pF9J154ozOL1sitfoykY4V8QmuQN6 sZO1XTNcJn/VEi4Sv4SXEXiK/eMd+MaquvGT0Aa6/hYS0Az7bHzLeIclIy8C/87AozZDD6n6ZSA wFVKFRvOR4c9rmfVyXFIBxAoN7I/9kNXQ2yI4L138Xjl5+DyJV9D+l+hwbZIQ5XFyOpcUijErwx LN1HYl9Kc0VtApUD9GoH8Lu6RHE2qNTIe4gPA/5wICMo5sUGvzpQ= X-Google-Smtp-Source: AGHT+IF6li0/wsba5vOcpZ+7hE86fPFgQ1nbQpeMNRGYiv+YLYSCoO8kXCjs4MSZkmCv4t6gWdR79A== X-Received: by 2002:a05:6512:acf:b0:553:34fc:3bd5 with SMTP id 2adb3069b0e04-5539c2004a5mr587329e87.8.1749690950543; Wed, 11 Jun 2025 18:15:50 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-553a7018069sm62808e87.157.2025.06.11.18.15.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jun 2025 18:15:50 -0700 (PDT) From: Vladimir Zapolskiy To: Krzysztof Kozlowski , Rob Herring , Bjorn Andersson , Konrad Dybcio , Bryan O'Donoghue Cc: Conor Dooley , Robert Foss , Todor Tomov , Mauro Carvalho Chehab , Neil Armstrong , Vinod Koul , linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 06/10] media: qcom: camss: export camss_parse_endpoint_node() to csiphy Date: Thu, 12 Jun 2025 04:15:27 +0300 Message-ID: <20250612011531.2923701-7-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250612011531.2923701-1-vladimir.zapolskiy@linaro.org> References: <20250612011531.2923701-1-vladimir.zapolskiy@linaro.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Export the function to reuse the remote endpoint node helper function from a CSIPHY driver. Signed-off-by: Vladimir Zapolskiy --- drivers/media/platform/qcom/camss/camss.c | 6 +++--- drivers/media/platform/qcom/camss/camss.h | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c index e03308d7a366..40bb20bbe8b4 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -2981,9 +2981,9 @@ static const struct parent_dev_ops vfe_parent_dev_ops = { * * Return 0 on success or a negative error code on failure */ -static int camss_parse_endpoint_node(struct device *dev, - struct fwnode_handle *ep, - struct camss_async_subdev *csd) +int camss_parse_endpoint_node(struct device *dev, + struct fwnode_handle *ep, + struct camss_async_subdev *csd) { struct csiphy_lanes_cfg *lncfg = &csd->interface.csi2.lane_cfg; struct v4l2_mbus_config_mipi_csi2 *mipi_csi2; diff --git a/drivers/media/platform/qcom/camss/camss.h b/drivers/media/platform/qcom/camss/camss.h index 99831846ebb5..c3eedeb87ddc 100644 --- a/drivers/media/platform/qcom/camss/camss.h +++ b/drivers/media/platform/qcom/camss/camss.h @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -150,6 +151,9 @@ struct parent_dev_ops { void __iomem *(*get_base_address)(struct camss *camss, int id); }; +int camss_parse_endpoint_node(struct device *dev, + struct fwnode_handle *ep, + struct camss_async_subdev *csd); void camss_add_clock_margin(u64 *rate); int camss_enable_clocks(int nclocks, struct camss_clock *clock, struct device *dev); From patchwork Thu Jun 12 01:15:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 896706 Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (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 A0EDB155C87 for ; Thu, 12 Jun 2025 01:15:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749690956; cv=none; b=DedrCrH9oQZI39GoMHsff3pmbEN9QU8wzdhwf7ZpyH/oTuSN0btzLAUDrxpRhEbPPavZTi3FlZLnaiZBKBQpuDGQC1S25WwNIHCqaEI98aQLRUvLyY2pRTA6ZionnxWS95JpGUt4l7Or+ZWTk6IE2UxpEMNpGAXQ8zVhuNCCYtM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749690956; c=relaxed/simple; bh=/XhbVM4wWSMUnltH22SqmYD67wEfCALUV37VwxYBKRA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BKHO9WzakGN8YJ6xYjCcz2dIuWpYiVLcFfkfQq29VxZDivZe0IKzFXCHpwQMApYxYPSISzMAXqVv/OGbl/xe5GRXUqK1/fRXJWUpLKXDtDaYi+XRKmln+cMZDxG24mkH4zs2i1j6yKN4ZjqkdPoH0MBVc65uopuLlNKXlXtLwvA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=sn+TuWXy; arc=none smtp.client-ip=209.85.167.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="sn+TuWXy" Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-5532bb8687dso18107e87.2 for ; Wed, 11 Jun 2025 18:15:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749690953; x=1750295753; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dZ2Yg+hw1/125iG7FYFyo2XHO42QFH1nZ0UWT9nVLTA=; b=sn+TuWXy5TcFuBJYENNxSMmOI4z3COBpKgtHUc5Ph4Hz05HqB2+u/e1hB0jCvdXQiR p89+q13PpjLXJZXbOsVsVdoKPh34EjD026dETAv2JmkMKb/3I8P6EAgYoNo6Y0s1mbj/ WSWqd2kQFgA5lezNs001H5LRA0yuSLQ7HuggS/QyQhaJi9SCbRCNqZoWYypY3KdNMbu8 4XBQKjZnvNCML/PAj8lbkMR/OMqRy4XX/UAvSMM9JxKWFwtTwoNnS9yA9rHH6Joz4PD7 KsJ+Z+ZjAP82ldTCV0RsnM9w8kAWeKoY6pPl8gcMDnhWgsvfEkHD5wUHim9A1VNExOYh 2x8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749690953; x=1750295753; 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=dZ2Yg+hw1/125iG7FYFyo2XHO42QFH1nZ0UWT9nVLTA=; b=G7U2gQIfzdU+ld3M3FlmyyU+E6jS0EIUcG2QYc16GESlM4CxP7DjgoIvkInOOmVTsw 4moUc5t2fH3Q4fHXVrNeI1imxDbHJ+S8a/X6r2MrKUf2byjluo3huGm3ZqEs/46VUoui s9j7tYeoPq/+1YZu2AKK82FLtb6cxbttj35/p9iOL/GLf2/m9IJuP1XrKjHm/MGEjiSY IzyoH6Qr4WsEzpUMoq8jh3xhtbhnbAQwHhbsDzZQTLtOGRc53EyX9UZHF4qIldnoiB87 tapjvU6ALuOp7JpP+OgSdV2JRst5Bfib3jr8EtdDs3NhTFY+PKpNC9+czNZhz0i//NQD mUfw== X-Forwarded-Encrypted: i=1; AJvYcCVHknLrzAX0ksLav+OE1eGo6pJY2z9cwfHrKQSAahxUhbIE/O2Dd5Qk/WsJJP7Aa+ZeOH4KJqRlHzIhBvbr@vger.kernel.org X-Gm-Message-State: AOJu0YzmiaHCfT9LE3AY5RF7rF9GXvml7OyyxRi6a6fcdLSBgR/OAtbW jAKMPipfqykeHZItjWUmulAOs8qIIQGZb6OB97nQCNaFXvivrGm28/gJHsa9NRZX++g= X-Gm-Gg: ASbGncvaWXb/yVLrbOLq5fJ0mUct3uVpcdbYtLAGpqrYLMtAdUNyB2Af0d2vAEZPT7D y3Qz9JwOwfsYTCgNIsniCA+BSO0XlcYVWmnAq2BULkpuXUT5IAOsPsefjvxr4BKwS7zFL6zp9wE wNLo4jNM7eYXEqVBQalclbu3xbuVVmXByaY8JO7MabUgD+LWugcfQdfkVXHLPPuzlQ+66Wxs5Vg 00Li7KB8jg29XkbXrUfGAFhOyw/c3pigNo+Hh7dukQzZtybqKvP2Wz2TCfDw9JXqjPZrhpmX1fh V/MdfOz8D0SBig8iIMc3q3DCJgpvJ70XEjpxVKcTsA5OFtPT2BseKqPwoMPRYnIY0KAyaYm1ndW Vi9ZSrjkWCPgSAkm1i9mfv6ZAaEeAXQagE8ZqpCokBKM3zgyL/z0= X-Google-Smtp-Source: AGHT+IHm91uAYi4NKW7xBMaxW2aWgQgZM3ryOzUpvaUBQco+HVLoDZFQ7XSw3K4U3HUpWMmUW8p0Bw== X-Received: by 2002:a05:6512:3d0d:b0:553:2bf7:77bf with SMTP id 2adb3069b0e04-5539c0d3b49mr633019e87.8.1749690952737; Wed, 11 Jun 2025 18:15:52 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-553a7018069sm62808e87.157.2025.06.11.18.15.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jun 2025 18:15:51 -0700 (PDT) From: Vladimir Zapolskiy To: Krzysztof Kozlowski , Rob Herring , Bjorn Andersson , Konrad Dybcio , Bryan O'Donoghue Cc: Conor Dooley , Robert Foss , Todor Tomov , Mauro Carvalho Chehab , Neil Armstrong , Vinod Koul , linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 07/10] media: qcom: camss: csiphy: probe any present children CSIPHY subdevices Date: Thu, 12 Jun 2025 04:15:28 +0300 Message-ID: <20250612011531.2923701-8-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250612011531.2923701-1-vladimir.zapolskiy@linaro.org> References: <20250612011531.2923701-1-vladimir.zapolskiy@linaro.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add CSIPHY driver routines to catch any possible csiphy subdevices under CAMSS device tree node. Signed-off-by: Vladimir Zapolskiy --- .../media/platform/qcom/camss/camss-csiphy.c | 248 ++++++++++++++++++ .../media/platform/qcom/camss/camss-csiphy.h | 3 + drivers/media/platform/qcom/camss/camss.c | 2 + 3 files changed, 253 insertions(+) diff --git a/drivers/media/platform/qcom/camss/camss-csiphy.c b/drivers/media/platform/qcom/camss/camss-csiphy.c index f561811b7617..3020f7d0f621 100644 --- a/drivers/media/platform/qcom/camss/camss-csiphy.c +++ b/drivers/media/platform/qcom/camss/camss-csiphy.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include "camss-csiphy.h" @@ -24,6 +25,17 @@ #define MSM_CSIPHY_NAME "msm_csiphy" +struct csiphy_priv { + struct device *dev; + unsigned int id; + struct camss *camss; + struct csiphy_device *csiphy; + + struct v4l2_async_notifier notifier; + + bool combo_mode; +}; + static const struct csiphy_format_info formats_8x16[] = { { MEDIA_BUS_FMT_UYVY8_1X16, 8 }, { MEDIA_BUS_FMT_VYUY8_1X16, 8 }, @@ -836,3 +848,239 @@ void msm_csiphy_unregister_entity(struct csiphy_device *csiphy) v4l2_device_unregister_subdev(&csiphy->subdev); media_entity_cleanup(&csiphy->subdev.entity); } + +static int csiphy_notify_bound(struct v4l2_async_notifier *notifier, + struct v4l2_subdev *subdev, + struct v4l2_async_connection *asd) +{ + struct csiphy_priv *csiphy_priv = container_of(notifier, + struct csiphy_priv, notifier); + struct camss_async_subdev *csd = container_of(asd, + struct camss_async_subdev, asd); + struct csiphy_device *csiphy = csiphy_priv->csiphy; + struct media_entity *sensor = &subdev->entity; + unsigned int i; + + /* Keep parsed media interface data, but set the correct port id */ + csiphy->id = csiphy_priv->id; + csiphy->cfg.csi2 = &csd->interface.csi2; + + for (i = 0; i < sensor->num_pads; i++) + if (sensor->pads[i].flags & MEDIA_PAD_FL_SOURCE) + break; + + if (i == sensor->num_pads) { + dev_err(csiphy_priv->dev, "No source pad in external entity\n"); + return -EINVAL; + } + + return media_create_pad_link(sensor, i, &csiphy->subdev.entity, + MSM_CSIPHY_PAD_SINK, + MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED); +} + +static int csiphy_notify_complete(struct v4l2_async_notifier *notifier) +{ + struct csiphy_priv *csiphy = container_of(notifier, struct csiphy_priv, + notifier); + struct camss *camss = csiphy->camss; + + return v4l2_device_register_subdev_nodes(&camss->v4l2_dev); +} + +static const struct v4l2_async_notifier_operations csiphy_notify_ops = { + .bound = csiphy_notify_bound, + .complete = csiphy_notify_complete, +}; + +static int msm_csiphy_parse_ports(struct csiphy_priv *csiphy) +{ + struct device *dev = csiphy->dev; + struct fwnode_handle *fwnode = dev_fwnode(dev), *ep; + unsigned int num_endpoints = fwnode_graph_get_endpoint_count(fwnode, + FWNODE_GRAPH_DEVICE_DISABLED); + int ret; + + switch (num_endpoints) { + case 0: + return 0; + case 1: + break; + case 2: + csiphy->combo_mode = true; + break; + default: + return -EINVAL; + } + + v4l2_async_nf_init(&csiphy->notifier, &csiphy->camss->v4l2_dev); + csiphy->notifier.ops = &csiphy_notify_ops; + + fwnode_graph_for_each_endpoint(fwnode, ep) { + struct camss_async_subdev *csd; + + csd = v4l2_async_nf_add_fwnode_remote(&csiphy->notifier, ep, + struct camss_async_subdev); + if (IS_ERR(csd)) { + ret = PTR_ERR(csd); + goto err_remote; + } + + ret = camss_parse_endpoint_node(dev, ep, csd); + if (ret < 0) + goto err_remote; + } + + ret = v4l2_async_nf_register(&csiphy->notifier); + if (ret) + goto err_cleanup; + + return 0; + +err_remote: + fwnode_handle_put(ep); +err_cleanup: + v4l2_async_nf_cleanup(&csiphy->notifier); + + return ret; +} + +static int msm_csiphy_init(struct csiphy_priv *csiphy) +{ + struct camss *camss = csiphy->camss; + unsigned int i = csiphy->id, j; + int ret; + + ret = msm_csiphy_subdev_init(camss, &camss->csiphy[i], i); + if (ret < 0) { + dev_err(csiphy->dev, "Failed to init csiphy%d sub-device: %d\n", + i, ret); + return ret; + } + + ret = msm_csiphy_register_entity(&camss->csiphy[i], &camss->v4l2_dev); + if (ret < 0) { + dev_err(csiphy->dev, "Failed to register csiphy%d entity: %d\n", + i, ret); + return ret; + } + + for (j = 0; j < camss->res->csid_num; j++) { + ret = media_create_pad_link(&camss->csiphy[i].subdev.entity, + 1 /* source */, + &camss->csid[j].subdev.entity, + 0 /* sink */, + 0); + if (ret < 0) { + dev_err(csiphy->dev, + "Failed to link csiphy%d to csid: %d\n", + i, ret); + msm_csiphy_unregister_entity(&camss->csiphy[i]); + return ret; + } + } + + return 0; +} + +static int msm_csiphy_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct device_node *phy_node = dev_of_node(dev), *camss_node; + struct csiphy_priv *csiphy_priv; + struct of_phandle_iterator it; + struct camss *camss; + unsigned int i = 0; + int ret; + + /* Bail out if camss device driver has not yet been registered */ + camss = dev_get_drvdata(dev->parent); + if (!camss || !camss->v4l2_dev.dev) + return -EPROBE_DEFER; + + camss_node = of_get_parent(phy_node); + if (!camss_node) + return -ENODEV; + + of_for_each_phandle(&it, ret, camss_node, "phys", "#phy-cells", -1) { + if (it.node != phy_node) { + i++; + continue; + } + + if (!of_node_name_eq(it.node, "phy") || + !of_device_is_available(it.node)) + ret = -ENODEV; + + of_node_put(it.node); + break; + } + of_node_put(camss_node); + + if (ret) + return ret; + + if (i >= camss->res->csiphy_num) + return -EINVAL; + + csiphy_priv = devm_kzalloc(dev, sizeof(*csiphy_priv), GFP_KERNEL); + if (!csiphy_priv) + return -ENOMEM; + + csiphy_priv->dev = dev; + csiphy_priv->camss = camss; + csiphy_priv->id = i; + csiphy_priv->csiphy = &camss->csiphy[i]; + + ret = msm_csiphy_init(csiphy_priv); + if (ret < 0) + goto err_parse; + + ret = msm_csiphy_parse_ports(csiphy_priv); + if (ret < 0) + goto err_cleanup; + + dev_set_drvdata(dev, csiphy_priv); + + return 0; + +err_cleanup: + msm_csiphy_unregister_entity(csiphy_priv->csiphy); +err_parse: + v4l2_async_nf_unregister(&csiphy_priv->notifier); + v4l2_async_nf_cleanup(&csiphy_priv->notifier); + + return ret; +} + +static void msm_csiphy_remove(struct platform_device *pdev) +{ + struct csiphy_priv *csiphy_priv = dev_get_drvdata(&pdev->dev); + + msm_csiphy_unregister_entity(csiphy_priv->csiphy); + + v4l2_async_nf_unregister(&csiphy_priv->notifier); + v4l2_async_nf_cleanup(&csiphy_priv->notifier); +} + +static const struct of_device_id csiphy_dt_match[] = { + { .compatible = "qcom,csiphy", }, + {} +}; + +static struct platform_driver csiphy_platform_driver = { + .probe = msm_csiphy_probe, + .remove = msm_csiphy_remove, + .driver = { + .name = "qcom-csiphy", + .of_match_table = csiphy_dt_match, + }, +}; + +void __init msm_csiphy_driver_register(void) { + platform_driver_register(&csiphy_platform_driver); +} + +void __exit msm_csiphy_driver_unregister(void) { + platform_driver_unregister(&csiphy_platform_driver); +} diff --git a/drivers/media/platform/qcom/camss/camss-csiphy.h b/drivers/media/platform/qcom/camss/camss-csiphy.h index f092b7ff2f26..b984aa745c78 100644 --- a/drivers/media/platform/qcom/camss/camss-csiphy.h +++ b/drivers/media/platform/qcom/camss/camss-csiphy.h @@ -120,6 +120,9 @@ int msm_csiphy_register_entity(struct csiphy_device *csiphy, void msm_csiphy_unregister_entity(struct csiphy_device *csiphy); +void msm_csiphy_driver_register(void); +void msm_csiphy_driver_unregister(void); + extern const struct csiphy_formats csiphy_formats_8x16; extern const struct csiphy_formats csiphy_formats_8x96; extern const struct csiphy_formats csiphy_formats_sdm845; diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c index 40bb20bbe8b4..57a522fcb8c0 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -3955,6 +3955,7 @@ static struct platform_driver qcom_camss_driver = { static int __init qcom_camss_init(void) { + msm_csiphy_driver_register(); return platform_driver_register(&qcom_camss_driver); } module_init(qcom_camss_init); @@ -3962,6 +3963,7 @@ module_init(qcom_camss_init); static void __exit qcom_camss_exit(void) { platform_driver_unregister(&qcom_camss_driver); + msm_csiphy_driver_unregister(); } module_exit(qcom_camss_exit); From patchwork Thu Jun 12 01:15:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 897042 Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (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 EB81715F41F for ; Thu, 12 Jun 2025 01:15:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749690958; cv=none; b=hZLTWFjWYNGM9XfrcAwx4WpdFqGDdl3bjviopmLa3mUTO8QfI2CHd2AJjSeh3FZcZI2XHKtQ4Q6giShy1wUgJry6YZKM1n0cFWXrfJw88xEZsk8nTGbTSaRjNG9SSakoaNtAXt2n1qob020EW3ky0/sursxebaijJpyMk7/0vS0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749690958; c=relaxed/simple; bh=0cru2kAWvYKw6WCg3XYK1+ZsVviC7rXpg9HjVd4qbsQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qVVOJxlBqLnLHzbm+c2PBHxVDIQK0bk4y/oDhuEl62XMuvsuTpuY+TWZJAB+kA6ssJWqkKHqkdK0S71Yka3UocYbg5okYmTFp9nk7mIEe7aiJT18y+p+tUOL0QT+8Du8ZcofZambetqbgE5P2z+9SUiTF+GoWwAmNhvh5pEIgbo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=LxNpb8/J; arc=none smtp.client-ip=209.85.208.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="LxNpb8/J" Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-32a8abb1613so569521fa.2 for ; Wed, 11 Jun 2025 18:15:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749690955; x=1750295755; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=svuLuiMu8pbZT5kif2pf6ZEnxJR7jTM6aK6jARjpg9E=; b=LxNpb8/JH1D7aExDOHRtXKmp17FPgPkiIsdqmw1OycAH4ds7yw09y3POLraxHYppSg inBYetoN2kjzNkehsLgqKZbyj9fy/zAkVYOCR4trabw9bFYOFAb8zDv8jUblSATUS2rU jp52Bl06NOI04AAocCBkAkWY48TBd0x+1DivrILcAWaFr95rCIV5SjJr9WVtfJ+d5iBZ dDQQQYw6rxz6i/fXIaf3l5ONf8EUNwues2FbEQTejaSnOHZeNgxpZOzx+qOBCFJkuCs2 P7gjr24kQrUJjdzTfhtrcTO/HzO830nZm8rMs8NOXbXDs3V2yBXREvJkpriWSGyOFRlY XdqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749690955; x=1750295755; 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=svuLuiMu8pbZT5kif2pf6ZEnxJR7jTM6aK6jARjpg9E=; b=oDbIE+XCxN9D/nTBq3BNh3tvI/nsReTZ0pq9GksCejlYhyDt/uEk8EzqeLQChLY++9 XN6L9nhrJnwWWjeGZCjedMP8e6vUVKTlfL6orZ+6bM3fmRQ/YxCXleoO++cXU6LB9T7K fhia9ubwCKvgea3A646b8HQ2T1sqiY+KNw5kQ6wGGiNfUV6vsbLOa8A43yPdCeUy1Noh pjExyGQ2ZuAUT/RxJ9/FPVJ1Xh7z9IxeAWxmFYlYjLmzEB7VRMtl5+dIgcajUfUuOf8m NZvIro8e+rcWv05puczb93q7IK4gA7tLLrLrHO2VQl1jOE4ca1GNXysL9hJEn5jsaTLQ oxtA== X-Forwarded-Encrypted: i=1; AJvYcCUIdn4JISuQneH12oZzlzJhF+IOFyhGDcMc23my08yLLP7kWOBEDcegX1KUklpfZWdamKG7MU3GH5vKYX5N@vger.kernel.org X-Gm-Message-State: AOJu0YxcGG3WRBUfnilSHjslZoqpOv8yf5PgoZuNpfQzZe0HrGQLDXnh jhHSaheXGx+YOoE+tMDkMHwmEpvZx275g4mWoRU+c5p4ReekoU1+LxWr+EtdPhcoSSA= X-Gm-Gg: ASbGncu1dEwtXM7ovq5LxtV9oCZx0CofuZTe2vfdGEof/vAvgpVVWnbaGYYkXrEHbg5 YMfzvDnbBRGgIr9kZt2gmJ6s6T6/CBG0JpwySU2DQbWWTC9Hoc1hD7upPee0DMtKW6gBngzDNYb RqW4Hi1mzHNwYGF2AYpanfRwGszClPcSha1lVz8Jht6kBrG/zFYKzddnlkLxwVLy3eldsPqnKN3 KDlEKOa3F5SvgiHKlrRXfyzLGejGxS5YFzPnMBz79xPBm5Du2x6CCmNBa2Tn3++FYHg2PMy2p0s bEaLFVxY69CWE4ebvPvonHuxtsqK5+QbRPAPAN+OaePhL4L0LRxRMLMK98HuDcvPc6TIfraYdol YRVvfNafpuaCapI75KhqYHQ4v+51+WDY6mcBmevU6xmpqYP+M72g= X-Google-Smtp-Source: AGHT+IGgDuIhk6kLqUQOtqUcf9o4lF+ryKrfZ0MJcisyaQ6E+RSt6I43VsukyU0JnCaimHg2/zQseg== X-Received: by 2002:a05:6512:1255:b0:553:241d:4e73 with SMTP id 2adb3069b0e04-5539c118325mr576829e87.11.1749690954994; Wed, 11 Jun 2025 18:15:54 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-553a7018069sm62808e87.157.2025.06.11.18.15.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jun 2025 18:15:53 -0700 (PDT) From: Vladimir Zapolskiy To: Krzysztof Kozlowski , Rob Herring , Bjorn Andersson , Konrad Dybcio , Bryan O'Donoghue Cc: Conor Dooley , Robert Foss , Todor Tomov , Mauro Carvalho Chehab , Neil Armstrong , Vinod Koul , linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 08/10] dt-bindings: media: qcom: Add Qualcomm MIPI C-/D-PHY schema for CSIPHY IPs Date: Thu, 12 Jun 2025 04:15:29 +0300 Message-ID: <20250612011531.2923701-9-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250612011531.2923701-1-vladimir.zapolskiy@linaro.org> References: <20250612011531.2923701-1-vladimir.zapolskiy@linaro.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add dt-binding schema for Qualcomm CAMSS CSIPHY IP, which provides MIPI C-PHY/D-PHY interfaces on Qualcomm SoCs. Signed-off-by: Vladimir Zapolskiy --- RFC verion of the change: * https://lore.kernel.org/all/20250513143918.2572689-1-vladimir.zapolskiy@linaro.org/ Changes from RFC to v1: * moved from phy/qcom,csiphy.yaml to media/qcom,csiphy.yaml, * added 'clock-names' property, * removed SM8250 CSIPHY specifics, a generic binding is good enough for now, * the above implies a removal of SM8250 specific supplies. .../bindings/media/qcom,csiphy.yaml | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/qcom,csiphy.yaml diff --git a/Documentation/devicetree/bindings/media/qcom,csiphy.yaml b/Documentation/devicetree/bindings/media/qcom,csiphy.yaml new file mode 100644 index 000000000000..699824e7c44d --- /dev/null +++ b/Documentation/devicetree/bindings/media/qcom,csiphy.yaml @@ -0,0 +1,96 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/qcom,csiphy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm CSI PHY + +maintainers: + - Vladimir Zapolskiy + +description: + Qualcomm SoCs equipped with a number of MIPI CSI PHY IPs, which + supports D-PHY or C-PHY interfaces to camera sensors. + +properties: + compatible: + enum: + - qcom,csiphy + + reg: + maxItems: 1 + + clocks: + maxItems: 2 + + clock-names: + items: + - const: csiphy + - const: csiphy_timer + + interrupts: + maxItems: 1 + + "#phy-cells": + const: 0 + + port: + $ref: /schemas/graph.yaml#/$defs/port-base + description: CAMSS CSIPHY input port + + patternProperties: + "^endpoint@[0-1]$": + $ref: /schemas/media/video-interfaces.yaml# + unevaluatedProperties: false + + properties: + data-lanes: + minItems: 1 + maxItems: 4 + + bus-type: + enum: + - 1 # MEDIA_BUS_TYPE_CSI2_CPHY + - 4 # MEDIA_BUS_TYPE_CSI2_DPHY + + required: + - data-lanes + + oneOf: + - required: + - endpoint + - required: + - endpoint@0 + +required: + - compatible + - reg + - clocks + - interrupts + - "#phy-cells" + +additionalProperties: true + +examples: + - | + #include + #include + #include + + phy@ac6e000 { + compatible = "qcom,csiphy"; + reg = <0x0ac6e000 0x1000>; + clocks = <&camcc CAM_CC_CSIPHY2_CLK>, + <&camcc CAM_CC_CSI2PHYTIMER_CLK>; + clock-names = "csiphy", "csiphy_timer"; + interrupts = ; + #phy-cells = <0>; + + port { + csiphy_in: endpoint { + data-lanes = <1 2 3 4>; + remote-endpoint = <&sensor_out>; + }; + }; + }; From patchwork Thu Jun 12 01:15:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 896705 Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) (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 1ED4015C158 for ; Thu, 12 Jun 2025 01:15:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749690959; cv=none; b=FLP/X0pJJSaMXwsbudPGWSG8gdz0y6UxAZmp0PPlpE5cvG7Jm/knIxeV8awuVFMpuVJcg7a4niKKEd2WLcAhNyFDOw42WGGnnMvzRd7LJVArly9+A9jXMdlurTNOMwu+WLIzqY7i9/BVVsz10yqapkftHt1M/BwyIopvVM0O7xs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749690959; c=relaxed/simple; bh=lRmpab9D7U7Xj9Gg2kKMV8W8QS5flFvrcHN5YkABJeY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oivNrmdg83sX2QhSlk4Jw+aXSFgr4iOD5RSnIPGVOnVhA75o2RMSqTmjw75/KQVUMyP2xFO5MAZKHNiQWQsixzVzY1bDBb5SryIqkRd1tPlrDgf/BHdX2YD8wxUyEkqyN3rrRmIjFz6TMSR23g1j7rI00/znzK9BbHlR6QpicV4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=K9psXQZ0; arc=none smtp.client-ip=209.85.208.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="K9psXQZ0" Received: by mail-lj1-f180.google.com with SMTP id 38308e7fff4ca-32a80cc8c88so688771fa.0 for ; Wed, 11 Jun 2025 18:15:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749690956; x=1750295756; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=z0iMkhzgEkgnzNz7VpgQGchMjTI01cfv7nEZTNImKIA=; b=K9psXQZ02X3RMtr2K1xrRUDPgchcMIla3HHmz8pgvDjpNouEInPDvXMsq7MOIuGQal LxswlFnOdpelfJEnXlaintvbtleAHzn+1X9/4wYF3+FFjcM/eW51qt+gY7gQDcSfhCid 1ad/30+6INPBZKmoqoFGy1KvNUSiIH51eU7FbMeuBdp4GZg/C7KtNoDNP18wHQf5u36R a69cJK+nqpc25GT7CXJSytIXEFbn9ux3/YeiyRO8kt6sUVHUg3iYfBZA+6ki+A69WpYf 0C9wlU+YmXw/9hvTg6uGuqi0CfpTZuTEa/bniRYQfxPdNOPBfparSvHvLPio/jHlQVdE NUaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749690956; x=1750295756; 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=z0iMkhzgEkgnzNz7VpgQGchMjTI01cfv7nEZTNImKIA=; b=rNxrT2kFM2gkvlSbcJEbDNHQXQz4WpDH4fw/E46MrM1HO+OKgyVsonewnuoGBJgL4G qWM4FRf7bmCp1IxDd9Z4HalqpJIwp4BypkXBQ6F3Eeq4pvvJBk9IqWkdkSEmj5YiHtro OAHUgjHmMPCktLII5RpjKCsfWdh0S4KI8NIUPAQECsS0guaXIiMbvQ+qv5fiNnE3Iuhj SWqMeKThCfO93lKnu1r70NTXKK0NrxhvHu0MpS3bH7d3eekhSW6XZzdEszlQLDQIB4ZN 6Sjoi0Oc32BX7YH3GhwWHWSTmv7zQDqDOob7WlY2c2nfFHapJxo5PFcgOlbuI8vAJPC1 vkLg== X-Forwarded-Encrypted: i=1; AJvYcCW5ysgUU/V0PCLh9sDlK2zTVvSeDXmVN/ylIp5G2IxTcliRp5WuQGnRnA8Yg1VpeOOrHdkGJQXVJn7Je65K@vger.kernel.org X-Gm-Message-State: AOJu0Yxag9mnhijSeJtVxxx4ye6H8I1Bcf7Qw7g9tq2sX+GzPhVYWahd bJ3+aJE/+5idm2OVdDccsRc8SjqI3OP6wGjb1OlE4eAlAF8kILIXcwWSZps4ah7pLao= X-Gm-Gg: ASbGncuHqJpA/ZJi7OZiv7EmPVV9HqNaRdw+aK5lmITfuaiQ6qiY6abECB8r8kJO7Q5 1oo91xbZnLwG2OdH6F83J+c4gdfxUIgcSQZYCmzMJ+4EYnXJ+lauOwvZe2eqAx570TjIadhrVls pYCHuD+yPYiVCXPNq4b3WHvaN34Niawf2VlagsdGEzRVrHoEG/SiSULTun5VdWLHxRant8oTeR9 o08SAFuTwdBYXD/u3QepM6Pm3e33Y7g1qJiWwGHK14MqY17JwDMNeoOvBNZF4dnFljzerubbYjs R62y+4sKjVxbrJtFF/wpkmFFQqpmsdFMHA9f4UoQlRPdHTFLwLHIxu549QVEHFPWGfA0Kl26PNC PLRSncCzG7PekzUCfBqm2NiTYI+xHdgOocS8p7Z4wrG4kSaS/j54= X-Google-Smtp-Source: AGHT+IH2ZVcSy/XT+P2sjhcrkyYbmgicFFUm992Rw/xmvLwsvTHEafUlWtKGMTeH3cdMFAbAsWhVRA== X-Received: by 2002:a05:6512:2206:b0:553:297b:3d41 with SMTP id 2adb3069b0e04-5539c140937mr563611e87.8.1749690956123; Wed, 11 Jun 2025 18:15:56 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-553a7018069sm62808e87.157.2025.06.11.18.15.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jun 2025 18:15:55 -0700 (PDT) From: Vladimir Zapolskiy To: Krzysztof Kozlowski , Rob Herring , Bjorn Andersson , Konrad Dybcio , Bryan O'Donoghue Cc: Conor Dooley , Robert Foss , Todor Tomov , Mauro Carvalho Chehab , Neil Armstrong , Vinod Koul , linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 09/10] [RFT] arm64: dts: qcom: sm8250: extend CAMSS with new CSIPHY subdevices Date: Thu, 12 Jun 2025 04:15:30 +0300 Message-ID: <20250612011531.2923701-10-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250612011531.2923701-1-vladimir.zapolskiy@linaro.org> References: <20250612011531.2923701-1-vladimir.zapolskiy@linaro.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Following the new device tree bindings for CAMSS IPs introduce csiphy2 device tree node under SM8250 CAMSS, which allows to perform camera tests of the model on an RB5 board with an attached vision mezzanine. Note that the optional 'phys' property is deliberately not added. Signed-off-by: Vladimir Zapolskiy --- For testing only, do not merge. arch/arm64/boot/dts/qcom/sm8250.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index f0d18fd37aaf..401a32679580 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -4613,6 +4613,10 @@ camss: camss@ac6a000 { "cam_sf_0_mnoc", "cam_sf_icp_mnoc"; + #address-cells = <2>; + #size-cells = <2>; + ranges; + ports { #address-cells = <1>; #size-cells = <0>; @@ -4641,6 +4645,16 @@ port@5 { reg = <5>; }; }; + + csiphy2: phy@ac6e000 { + compatible = "qcom,csiphy"; + reg = <0 0x0ac6e000 0 0x1000>; + clocks = <&camcc CAM_CC_CSIPHY2_CLK>, + <&camcc CAM_CC_CSI2PHYTIMER_CLK>; + clock-names = "csiphy", "csiphy_timer"; + interrupts = ; + #phy-cells = <0>; + }; }; camcc: clock-controller@ad00000 { From patchwork Thu Jun 12 01:15:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 897041 Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) (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 63F6115C158 for ; Thu, 12 Jun 2025 01:16:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749690962; cv=none; b=CUOUqg0vJtto6YDVfabZHceuZ2lT2h7DJlafEnHgvEEnfRS95txyhhRIwAnZ5NP/vGtjBvqlqU9cJWFOxHWKu5ySwQm29K9n0k7E9RUcCOUIeagvf34X6NGsdMFZAFYDlXirPYlH4mlzE8p4RroKDBlHdg8YP96aTOv+L8pirt0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749690962; c=relaxed/simple; bh=XYwKha3UeOCXy5MI8s9ICvr5AKzds6ClCI+fu8IvSMA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aKyYdNVSAKXfvqobGA+n1HZZaMi2nKuZTYa5ZAk9eEEaB0z1tXiRX0EGe7H+mwe827liZd+YvubJUeuZF79ZLJ32oMYLHOqNGAgkKl0Vz3jqrLaQqTFilAD6SQwTesxdjq+1hGpwenBeKvghyCp8RcFSBWwi/r3Vn50Hue6Wz6g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=dAXqvdJp; arc=none smtp.client-ip=209.85.208.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="dAXqvdJp" Received: by mail-lj1-f180.google.com with SMTP id 38308e7fff4ca-32a8abb1613so569631fa.2 for ; Wed, 11 Jun 2025 18:16:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749690958; x=1750295758; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JfMw7lCjvYKdcM5p3TAGjbMu4qQ11U0/d1S9yd9mYvA=; b=dAXqvdJp9q6L20EicYlT8phaRuYr06yQxS7WX3A15C/MJvTRIZ81hx1e89jbVLf/wl s4me8zIuDicwLjJ+t1YfapD+6B22L8H9l6nLX7F9qJrkJUwmccbbhyrHZDXc7HG5a82O siGKJpy8QXfDpB95JbkPFWNxc9yCNifMesW5ivYENQIUbqqCz3u6jhcNzASX+MuWVKZW WwZJpDAjUv3kM2gGaSyzyigDDQ5Rfc7D+DBUXWFj/5aeucK1yYRlnejATRTYBbXxlYSC MMtxlPWmP8KL4f9Ugr5XkEtHydr9skvlimRwYmViK6yNA5MQx2nieVB36YkP9z23I7ZL YbeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749690958; x=1750295758; 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=JfMw7lCjvYKdcM5p3TAGjbMu4qQ11U0/d1S9yd9mYvA=; b=BZ5KrvmJyS5pf5fCk/VoND12WIGHFQ5KmSGRBzhCAAhhnb5y8Q2HDlmGyNekpj4TpO 9GthJiJQfu440I48fZtQbITfud3XEo5PdDqan+fIliK24lAO+UKg0t7MFetidFrXpkvp cj1gOQ1BpPc174Yg0JP8fxROd7FMS7WzA6ryiHKryUwA5iAeOGZvreyieQvfHkzJgfvJ jVU7IViGs5xoI9PH4v8GeefHdGxKD7YkC64sxJaRf6XogT29y5HpBhi+v8tjnekbQpRu hkae6AwwnZXevwl/14/5jKSI5gyQ7x1I58jN/TgkvI/Jz26wAPmk0UwZSguSlU2qG5Uo PaVA== X-Forwarded-Encrypted: i=1; AJvYcCVpWMEgaH7/EkfZYlqj/+3tgt3941CdzPu18CEV54gUgtEn7VK/Flp8/f+rwQHq27F999v8hb1c4nQx5zlo@vger.kernel.org X-Gm-Message-State: AOJu0YzRTH+zN97FTJeMUF3dND7RWGgj4KzppI3JoEu5VZwf8Cni6yVd OZDnJvSNq5TrVqSgQUq2n/Tt87s7t9b8WLBOwkEqdVzOqMGQcHjaUNv7rStWK03qsrA= X-Gm-Gg: ASbGnctbbKc15Nv3TTxqZMr86wbFBPSkpYFYcK7CTcHHefLDV3mfmfKbP5CIOQ7Smjv whwgO4Sxjp8GWPM/5iyKy6zc2WZO3Mn2bgBm3EHdpYv8xys4csPWlxRbSd2ca6Xz83yPThd1Pc3 pk1ap2jx/AEegynxWY/BvIywFwsGrOVAOS69iA0L0RgiQ1UJsRB+sJmoQa1QJR+zFtfUAuVSA/4 GkVeRtp00bvgetZfY4kn33mWWuuo+WNsiZ227H+DZJGQprvNxd9+U/BwyVKc7ykvFmMGq3mH2+v SqJCn/pcdK/N0eOpg+zbp/blV5odtqHo9Bx1apZr16tR6QDjL6NgHQWpfyoKzoxSF9dUwvOhdwV FHXzSp7jTxC7ajfJvlaSIDUW+eHAuyUxQ2E0LXqfWVfYPQKyfgcc= X-Google-Smtp-Source: AGHT+IGeelyLNCfDUasPCOxCiFIpmwYhXzHyBgUxVTWvZiNU2GFAsGcklviFQwAc52LvrzaoCM1JTw== X-Received: by 2002:a05:6512:32c6:b0:553:35e6:af10 with SMTP id 2adb3069b0e04-5539c0d2457mr540666e87.7.1749690958367; Wed, 11 Jun 2025 18:15:58 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-553a7018069sm62808e87.157.2025.06.11.18.15.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jun 2025 18:15:57 -0700 (PDT) From: Vladimir Zapolskiy To: Krzysztof Kozlowski , Rob Herring , Bjorn Andersson , Konrad Dybcio , Bryan O'Donoghue Cc: Conor Dooley , Robert Foss , Todor Tomov , Mauro Carvalho Chehab , Neil Armstrong , Vinod Koul , linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 10/10] [RFT] arm64: dts: qcom: qrb5165-rb5-vision-mezzanine: switch to new CSIPHY scheme Date: Thu, 12 Jun 2025 04:15:31 +0300 Message-ID: <20250612011531.2923701-11-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250612011531.2923701-1-vladimir.zapolskiy@linaro.org> References: <20250612011531.2923701-1-vladimir.zapolskiy@linaro.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The change provides a working example of using a new scheme of describing CSIPHY devices under CAMSS. Signed-off-by: Vladimir Zapolskiy --- For testing only, do not merge. .../dts/qcom/qrb5165-rb5-vision-mezzanine.dtso | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dtso b/arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dtso index 5fe331923dd3..939eec7a039f 100644 --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dtso +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dtso @@ -14,18 +14,20 @@ &camcc { }; &camss { + status = "okay"; vdda-phy-supply = <&vreg_l5a_0p88>; vdda-pll-supply = <&vreg_l9a_1p2>; + + phys = <0>, <0>, <&csiphy2>, <0>, <0>, <0>; +}; + +&csiphy2 { status = "okay"; - ports { - /* The port index denotes CSIPHY id i.e. csiphy2 */ - port@2 { - csiphy2_ep: endpoint { - clock-lanes = <7>; - data-lanes = <0 1 2 3>; - remote-endpoint = <&imx577_ep>; - }; + port { + csiphy2_ep: endpoint { + data-lanes = <0 1 2 3>; + remote-endpoint = <&imx577_ep>; }; }; };