From nobody Mon Feb 9 22:39:59 2026 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 E13382F8BC5 for ; Wed, 29 Oct 2025 05:44:37 +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=1761716679; cv=none; b=r1y5pJ1pPSjlR+rbipE3fLveQ8PdUHquGz47ietMg7148YV6Ex8LYYUsavfflc2FimY30bQ7o3dhUY34r51RA4pc6qT39HZgrSX3rnXQ6qwZpfFaG8USjH29IDKeCpJACWSxJguzOhRCCr3EpnlTgBcaXS9+T1lRYA8ZIL9aV2A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761716679; c=relaxed/simple; bh=bZnoqdyFY3pu65TwtNZzfCsh30CpB8ikyYZgkjinaCI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=KurcEjDk6fAcQbccOlMdeXuQXKuQJTxifYG7OWG0aNP5Nhdj9J990DXhBtbxWqSM6Mpq0YTwYLKjkA9OA5whbnV2VtxapgGJBDSGlqR2rWVtCbM0BWp27+lIg0PPwdOrZL8G+3BM25kkjV8cKJdSifI8yCkokZgtL5/pqeNH9pI= 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=T9iu5U/t; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Q0+1Zafs; 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="T9iu5U/t"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Q0+1Zafs" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 59T4uxnu3676883 for ; Wed, 29 Oct 2025 05:44:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= LipVLE24QMA8YmFHCyk8Jk9meuXazMzb1E+JswV0knE=; b=T9iu5U/tYAD9ZY6p zbJX/Pu+o30ClNdz3mXyCw0qXCz52cNIkpirvawVcxCmCjFTBGK+of6TRHc1s8vG 2laP3V+jKbvKPRIDnM6fIprtsHxogo30YIjoRDaU2zvdjpSb5Bznj4HTwRwGocZS xc6EejKnsmcu/f1cgStlmXQ7RExQrdetvli6ip87DIbX3mzvxCCxczesUllMtLca tD2wRNWz/8trrl1tMtijbqGJ90X64e5UGIBU4+LQf+DmBLPF3vdN4XurYMXXty39 MsmvijhN7GEOHw7lYJbDuYSxPlM09YWIyZBDPdZAdW4PIiDCgZ9k0p+PLsWJgukC 91lA1w== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4a34a1ha69-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 29 Oct 2025 05:44:36 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-33d75897745so16049023a91.0 for ; Tue, 28 Oct 2025 22:44:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1761716676; x=1762321476; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=LipVLE24QMA8YmFHCyk8Jk9meuXazMzb1E+JswV0knE=; b=Q0+1Zafs5QfRI2YDSI5CcssQ9X/kop4IvhC+FJr+Q0yXl+3jybRP/iNYR3Nf4TD4JX LHTceAevpA9IhuXXCyoh2w7dukDnJCCOSgbGajm7qQkHo5bv3DcLdcaUUAYINQ652Bv/ RNA07OHI2RE6jNG0notPa6MakclJ8xOUprUPVM3o8G8GV8Lj+ITH9KeAeUTcJbKVMXWG IIEWO9dUNloIa730Gz993+suifYyJIyQNvrQSz2pcCJqVv2RSc9B6buih4xt8gMhq1wx UrXgXGJIUYDvve+8T8HiRrNOH7Z71+eyfDINCIQZ+c1NMi316IHv/nWmHm3BGS+Akhwb vcKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761716676; x=1762321476; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LipVLE24QMA8YmFHCyk8Jk9meuXazMzb1E+JswV0knE=; b=ZN4mD0kHXQdKL7pfFwbSOVPOq5cmp1ogyXYd7QA2+aAiwYe9JY8IxDGaIsjp0C36UC mXMypPNOM/Zd1hmaKKE72prGlFsfirE07QymRmz7g4nGEVOT7ixBI7wZ/pP7j0dvPXCV 7sg4AZCFvCsfKYz9Ug2JhaLAMHDWvhQhE4fZJY4w1jb7e/u6jdfwEnZrdoElWQDQEMZT SmMwhjG1jtpnRMiqVg3QuZEhwNX1MfD2KJqhJh45uTBjXrfh8BV9/FINGrbaWNCjPbNj eshrUR3VX2EAfnq+3AcIctKFCPxrapt1D/XrFdI42h/BUx/4/8BO1kk32nfmmhoOD6Lh lFZw== X-Forwarded-Encrypted: i=1; AJvYcCWEKWlCK7JoWT7WJ1r6zazS/IIKDQmhgwi1LIY4JXEsH7NXwsXs7b/KSiTsnbjpueZkFNZxEEK4xRIBNt4=@vger.kernel.org X-Gm-Message-State: AOJu0YxpPYFbKtW00y6QqicQG+X/GZakcyLYjd0vFvLPGh/x6VQjCIGA XcjoXHv4Z8ViEnzwSGQbwHboPFhOknTCC9X2aDhf+7t/OhbBOEgM0dtN9dKkNcdyuUYUOUYtply rADxrvyRVHdb4B0nL3RHFUmambItV+FHforUOTk35ikvP61Qt7oAWzoF7sqi4wggyzAM= X-Gm-Gg: ASbGncsmKMbYM/FI6ObivYe6G87KQlMbLIRbFW2obtkdzfoapgNPJHHARWuOOOa5ZGN 9OfW6IGzni5i900UVBKKObrq5joOn8JfIJgaorVUuBC27NRppV3uMrlfa73ct+t8MLN8DQAI4ZV d/8dnLZMBwQ0arYC3vzALKoUbfQQsI2onzGEl9xOgwM9qNQan3QhBMRkffD9xwqnNiF4aBhB5Bz lHneJcr1yz9TeGjrzyxGR8CF8MHjuo2ox0OsW7wGa5GQdm5lIFF+JX3i+XtID0s850pCHCl0Po9 jeOXRE1wLTqkN0CoH4Xpw5oLCW846jbbns3urtDba8c9B20Feg6n6+YHF0vqunyHJVRmn1Ii5mt CYg99SlLEsiZe26ap4pAUKXa8YPVnwgofs4vxNsIh8Z18OxtkdtXR8Q== X-Received: by 2002:a17:90b:4b09:b0:32e:e3af:45f6 with SMTP id 98e67ed59e1d1-3403a265529mr2007788a91.10.1761716675797; Tue, 28 Oct 2025 22:44:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEh8rloteq7WeuPBaOFrjDmh+ZqqPoQGP+YRbt29wqi8injOzt+ncXOlRtdj7cS1pR/EjlmQw== X-Received: by 2002:a17:90b:4b09:b0:32e:e3af:45f6 with SMTP id 98e67ed59e1d1-3403a265529mr2007753a91.10.1761716675284; Tue, 28 Oct 2025 22:44:35 -0700 (PDT) Received: from hu-hangxian-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-33fed7d1fdesm14280643a91.5.2025.10.28.22.44.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Oct 2025 22:44:34 -0700 (PDT) From: Hangxiang Ma Date: Tue, 28 Oct 2025 22:44:10 -0700 Subject: [PATCH v4 1/6] dt-bindings: i2c: qcom-cci: Document Kaanapali compatible Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251028-add-support-for-camss-on-kaanapali-v4-1-7eb484c89585@oss.qualcomm.com> References: <20251028-add-support-for-camss-on-kaanapali-v4-0-7eb484c89585@oss.qualcomm.com> In-Reply-To: <20251028-add-support-for-camss-on-kaanapali-v4-0-7eb484c89585@oss.qualcomm.com> To: Loic Poulain , Robert Foss , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Todor Tomov , Vladimir Zapolskiy , Mauro Carvalho Chehab , Bryan O'Donoghue Cc: linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, aiqun.yu@oss.qualcomm.com, tingwei.zhang@oss.qualcomm.com, trilok.soni@oss.qualcomm.com, yijie.yang@oss.qualcomm.com, Jingyi Wang , Atiya Kailany , Hangxiang Ma X-Mailer: b4 0.14.3 X-Authority-Analysis: v=2.4 cv=Nu/cssdJ c=1 sm=1 tr=0 ts=6901a9c4 cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=x6icFKpwvdMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=j9zjN4cs5acD8dv8RPMA:9 a=QEXdDO2ut3YA:10 a=rl5im9kqc5Lf4LNbBjHf:22 X-Proofpoint-GUID: qvT50wOkFLJpSYESlcLG2pL0ZGJspBUg X-Proofpoint-ORIG-GUID: qvT50wOkFLJpSYESlcLG2pL0ZGJspBUg X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMDI5MDA0MSBTYWx0ZWRfX8T82GTNdUvTE Xnj6WkTyXDcqtJ07obFz4yUc46smR1z5KcZ85ggPyZtaOaOgzKAe8a+R9Eh097unr4ixx49s4R7 BQPdsPdxrbBXwqLx3yHP0rYob9hUDxxFiiiVzHg3gsiy5GasMndBXxv7p6SJCSAHANCHqKf7Rmo pS3YRQcykS906vKPrNNDaMf/L1qTB2asZCpzeKlsDg/YCtQFsr99cMtbsAzqm0SmL1fjuW7fIUg LLpuASoI7voJOTezs8xvW1E/H10EXfP3S5IGsoeunPV/lFmQTcItQkfZzzTdk6mr6+DIv3p+sUU RQvlGG9c3c0kOGQkBa9P4RAA+6eF3ei+Xe31HQi+ec/jAZjaxHiuHxqqWjGfK02jriPn8tdXruq x3f5MIj88zWf93rPyehoosFxEocgCg== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-10-29_02,2025-10-22_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 priorityscore=1501 adultscore=0 suspectscore=0 clxscore=1015 lowpriorityscore=0 phishscore=0 impostorscore=0 bulkscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2510290041 Add Kaanapali compatible consistent with CAMSS CCI interfaces. Signed-off-by: Hangxiang Ma --- Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml b/Docu= mentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml index 9bc99d736343..9b83ec63e124 100644 --- a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml +++ b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml @@ -25,6 +25,7 @@ properties: =20 - items: - enum: + - qcom,kaanapali-cci - qcom,qcm2290-cci - qcom,sa8775p-cci - qcom,sc7280-cci @@ -128,6 +129,7 @@ allOf: compatible: contains: enum: + - qcom,kaanapali-cci - qcom,qcm2290-cci then: properties: --=20 2.34.1 From nobody Mon Feb 9 22:39:59 2026 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 E0E632FB08F for ; Wed, 29 Oct 2025 05:44:39 +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=1761716682; cv=none; b=gc97myQ5lKnXyMkhhO25H7z1FPuItnBgvnj7vSJ/N2KIb0/FLwk+pBF+/8+h8AKBCTBAE3LTl06H5xzQPVftc/hJ/cOhCjN/0k9uK1VHIsFr9AqPRzfM0d5UF9NJblPXWtc8FUVjwQKdfHRhl/aaBB5hRPmCB//+Fb3NeuTExmU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761716682; c=relaxed/simple; bh=8EYw4Z/xo44OuLOyMYzMxoyH1Vg1YfWbDmeqootUJ2Q=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Cf0Kk4/UQBBSffaIWnGy3NNCl6AsHfS41WlbMQZAP1DF734YqOv3Ym42FG19TGKfgDIHW8cIJ6OyP1IeEXdRMrZ+iICxLG18t/8L+JPbhRWMuk0BilQPY+CdmoAJAbdxuKasYy10iGV2/3kMzuxv7FOWJwxIJxYomtgo+hNvOos= 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=kdIXPXdg; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=hd6zmdD5; 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="kdIXPXdg"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="hd6zmdD5" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 59T4usAe3692101 for ; Wed, 29 Oct 2025 05:44:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= XTxmlmdDSChoSRSdcE+3TPbG38v/AJn219b18ubKG3g=; b=kdIXPXdg675R7nLw eNA3k2CWFJGOjt4VyGxz77QnitMcmcjHh05HeNq2KQ3wnQ8lqjIp/KG+zXWBTI/h MzhSU7sSq5w4n0OR1nubjIlTNc+iqlXEtRiV3sOMvR+9Kv6xvriuqX0iyZX6pSvm QTKaWs1G2MWInlIfI8PnFzP7pnSEVegV0zy5n777ryIZeIkADnEVd6KddEqalslI IRvuwhQtLF1sJxsVti9WyQDyOhpIt+GhyKF1VhXV7xKKybQqvuk7MYR/eBNBITc5 X9dlflBh2CgQyAMIMmZpw2ddGO2kUuG7noIcs2NcraP2py3mLRRF+/ult//kNAnH malvZw== Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4a34a2haqd-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 29 Oct 2025 05:44:38 +0000 (GMT) Received: by mail-pf1-f199.google.com with SMTP id d2e1a72fcca58-7a27837ead0so4539153b3a.3 for ; Tue, 28 Oct 2025 22:44:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1761716678; x=1762321478; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=XTxmlmdDSChoSRSdcE+3TPbG38v/AJn219b18ubKG3g=; b=hd6zmdD5k5DTzL0DQj2T9A5LqRBtlHo0kxQbKmFq1JfIKX0NhVR7tuBjHkpcfbZUiW gFcWoG/cnVp1Z1qDJnwDwxKjDKNLeissYP+df+9afqS2uQxOTlC8p9HPUVc88ykFRNcf s4tGHPYC4JpEHwF/8BY4frC0RIW8AnrgiCpK9iLTm9j2fos8X2pa516CwHmuK1foCz3V F48p73ulxShEJ3zpD90Qa1CEK9lEu9F9W/bVb6U0fxXMufMw9F9PVEP8FhUppGGlDGQ0 SHq8PQ8OtnJ/bI24XseWL2ePsYDC5/GgeWHX1SsFDE5EXwMD1L1DKKm2iHThv/br2cMT 0gKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761716678; x=1762321478; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XTxmlmdDSChoSRSdcE+3TPbG38v/AJn219b18ubKG3g=; b=m5W4ILyYjkTTHKxLp7nzzyRgVaC3Jsuby6Up/KYkP71YuGUFsFm5EbmuU0EdwRjaXG Hbh3s1M1tJto8pQxtrkHNON7H4N1HSeGUbLt9gR5zXKW35dAZTEgU41reF4DW14Tnapk h50bDzkGezwQMQg5DC7mRZH04xNSAzkW3V/okRUDCMW3iaDwqmLWAy8geqQR82Y4RBKH O4ZcOE5aXTAf2GBo9P8wxRtIsMlKib2YriWWof223Kx9Ts6wisCvTqfHhZ6YfOo6UsHt gux8Hu+N+Wghpr7AvGzEUY9tXD0e/1Zl5SY8uEStlem+ld65n7ux6K6mkXyEhOTEakpM OcTg== X-Forwarded-Encrypted: i=1; AJvYcCUCPTrxBlecRfcyOB8bhEokvEniGmIZDl6DxR281B66+KN8Ur+bcKjNKfasUBB/3ocyf9Rj8KLKGwqeAEA=@vger.kernel.org X-Gm-Message-State: AOJu0Yy/sGA9MMrnHnwNX/Xnu3hj7CoilxVPIp5OqV6nAyKFIixcg+6x 2thnHm6qjcH/gAtn+hlW1Wh7eI1fHw58x7oC/1drR73ZaQnUj7GjU5Egi+Hu5G722tsPBMVXUy8 6XP7ghr2fr12sxDvWLV0ssz5PajVqLlrGw9rVdShrqITwkWd4SsQ3j/q34lhiWqGMaL0= X-Gm-Gg: ASbGnctnlq/qRcHpsanP7qIEjUUXF1IjwqXXqAppDPmIuPOmZDt6BemAQ0tVCw19L6y MlAnmkHhYwx1g3uzz2ZvJyANLe0GJYCMjhi5EzkMjnHS0p1Rz3n3/LQ9tUO2qtSmo01ifNzQL08 GBkmFujuNFVto3tkHIDmvZdD13UhPwN8Il0NdkB+Ty5mScsAQ/HhnSOH9H5TbMpqKbBReAZLWP2 Oi8K70BqXSdtBYyR/LWPeT5G1Kv7zQeyoghGQHMAK6Jp0ej56Rmoilb7YUn+e2khasOZcs5/rlm QpVEr7bgDXKuUa68QZw3gamCX0lpYRIFEHfv5/uxDFSa7iD1LjIWjyG3qUuSjoy1n0loNZVXsBx yLN01WZ/4hnummMYnRxK3CuHkAH0QNPQIp8FDBHU+PfEgPvPb/gURLg== X-Received: by 2002:a05:6a20:7484:b0:33e:6885:2bb8 with SMTP id adf61e73a8af0-3465194d36amr2031610637.19.1761716677665; Tue, 28 Oct 2025 22:44:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHovUlmrVJkkaucwDBUohnxJ2/8kIowbroT51EdTdDwL3bnqzoNBt7zdt8B8WwFJ7LGIRS24Q== X-Received: by 2002:a05:6a20:7484:b0:33e:6885:2bb8 with SMTP id adf61e73a8af0-3465194d36amr2031566637.19.1761716677050; Tue, 28 Oct 2025 22:44:37 -0700 (PDT) Received: from hu-hangxian-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-33fed7d1fdesm14280643a91.5.2025.10.28.22.44.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Oct 2025 22:44:36 -0700 (PDT) From: Hangxiang Ma Date: Tue, 28 Oct 2025 22:44:11 -0700 Subject: [PATCH v4 2/6] media: dt-bindings: Add CAMSS device for Kaanapali Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251028-add-support-for-camss-on-kaanapali-v4-2-7eb484c89585@oss.qualcomm.com> References: <20251028-add-support-for-camss-on-kaanapali-v4-0-7eb484c89585@oss.qualcomm.com> In-Reply-To: <20251028-add-support-for-camss-on-kaanapali-v4-0-7eb484c89585@oss.qualcomm.com> To: Loic Poulain , Robert Foss , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Todor Tomov , Vladimir Zapolskiy , Mauro Carvalho Chehab , Bryan O'Donoghue Cc: linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, aiqun.yu@oss.qualcomm.com, tingwei.zhang@oss.qualcomm.com, trilok.soni@oss.qualcomm.com, yijie.yang@oss.qualcomm.com, Jingyi Wang , Atiya Kailany , Hangxiang Ma X-Mailer: b4 0.14.3 X-Proofpoint-GUID: Wig-PYkJ_pJfCvYv3PXLPeJJvFW-Bmzw X-Proofpoint-ORIG-GUID: Wig-PYkJ_pJfCvYv3PXLPeJJvFW-Bmzw X-Authority-Analysis: v=2.4 cv=PcvyRyhd c=1 sm=1 tr=0 ts=6901a9c6 cx=c_pps a=WW5sKcV1LcKqjgzy2JUPuA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=x6icFKpwvdMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=gEfo2CItAAAA:8 a=EUspDBNiAAAA:8 a=7Lj6VqmjGphfb2gh5wsA:9 a=_yrEaYCZQzJ1sirS:21 a=QEXdDO2ut3YA:10 a=OpyuDcXvxspvyRM73sMx:22 a=sptkURWiP4Gy88Gu7hUp:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMDI5MDA0MSBTYWx0ZWRfX0lm2mdpQDi2v bU7ihl2lFRzJ820leCqDoYfb82Byrz4YRlx/ONha/QLOkSqpNIteyWaQldAGrID6ZJbyb9diu6x yfDa/RtmkgI5IJn8xzqziff/jfNgnbrIWyl3EMg1BFcchswio7NGLzmZatgLfpdT7pi6a51TK6Q Rf3UnDP7L1bq9y8caCWPu85F84HJ0OIYaYsih0i0r0R7aE0D8ffm4cotQbwPEXTyhb0oI/p8Z29 u17zbkbtwWGhN1l5jAGKPxrfFcH6PezjHed4TQgYcWTLIQpNEy4nY1UvmL3RIH7tn9r8U/T5Dnr vT8lXXyJI9kSddijd9VHpG9RcaikuO7Bp4eZbHCt7GPCVTsn/DHoVLu2A0kUbfP+H43ZoyW2zvi Do3Hym3lBf8qhVTDuuJ6ePY+UUP+wA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-10-29_02,2025-10-22_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 clxscore=1015 spamscore=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 malwarescore=0 suspectscore=0 impostorscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2510290041 Add the compatible string "qcom,kaanapali-camss" to support the Camera Subsystem (CAMSS) on the Qualcomm Kaanapali platform. The Kaanapali (SM8550) platform provides: - 3 x VFE, 5 RDI per VFE - 2 x VFE Lite, 4 RDI per VFE Lite - 3 x CSID - 2 x CSID Lite - 6 x CSIPHY Signed-off-by: Hangxiang Ma --- .../bindings/media/qcom,kaanapali-camss.yaml | 406 +++++++++++++++++= ++++ 1 file changed, 406 insertions(+) diff --git a/Documentation/devicetree/bindings/media/qcom,kaanapali-camss.y= aml b/Documentation/devicetree/bindings/media/qcom,kaanapali-camss.yaml new file mode 100644 index 000000000000..c34867022fd1 --- /dev/null +++ b/Documentation/devicetree/bindings/media/qcom,kaanapali-camss.yaml @@ -0,0 +1,406 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/qcom,kaanapali-camss.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Kaanapali Camera Subsystem (CAMSS) + +maintainers: + - Hangxiang Ma + +description: + The CAMSS IP is a CSI decoder and ISP present on Qualcomm platforms. + +properties: + compatible: + const: qcom,kaanapali-camss + + reg: + maxItems: 16 + + reg-names: + items: + - const: csid0 + - const: csid1 + - const: csid2 + - const: csid_lite0 + - const: csid_lite1 + - const: csiphy0 + - const: csiphy1 + - const: csiphy2 + - const: csiphy3 + - const: csiphy4 + - const: csiphy5 + - const: vfe0 + - const: vfe1 + - const: vfe2 + - const: vfe_lite0 + - const: vfe_lite1 + + clocks: + maxItems: 34 + + clock-names: + items: + - const: camnoc_nrt_axi + - const: camnoc_rt_axi + - const: camnoc_rt_vfe0 + - const: camnoc_rt_vfe1 + - const: camnoc_rt_vfe2 + - const: camnoc_rt_vfe_lite + - const: cam_top_ahb + - const: cam_top_fast_ahb + - const: csid + - const: csid_csiphy_rx + - const: csiphy0 + - const: csiphy0_timer + - const: csiphy1 + - const: csiphy1_timer + - const: csiphy2 + - const: csiphy2_timer + - const: csiphy3 + - const: csiphy3_timer + - const: csiphy4 + - const: csiphy4_timer + - const: csiphy5 + - const: csiphy5_timer + - const: gcc_hf_axi + - const: vfe0 + - const: vfe0_fast_ahb + - const: vfe1 + - const: vfe1_fast_ahb + - const: vfe2 + - const: vfe2_fast_ahb + - const: vfe_lite + - const: vfe_lite_ahb + - const: vfe_lite_cphy_rx + - const: vfe_lite_csid + - const: qdss_debug_xo + + interrupts: + maxItems: 16 + + interrupt-names: + items: + - const: csid0 + - const: csid1 + - const: csid2 + - const: csid_lite0 + - const: csid_lite1 + - const: csiphy0 + - const: csiphy1 + - const: csiphy2 + - const: csiphy3 + - const: csiphy4 + - const: csiphy5 + - const: vfe0 + - const: vfe1 + - const: vfe2 + - const: vfe_lite0 + - const: vfe_lite1 + + interconnects: + maxItems: 2 + + interconnect-names: + items: + - const: ahb + - const: hf_mnoc + + iommus: + maxItems: 1 + + power-domains: + items: + - description: + IFE0 GDSC - Image Front End, Global Distributed Switch Controlle= r. + - description: + IFE1 GDSC - Image Front End, Global Distributed Switch Controlle= r. + - description: + IFE2 GDSC - Image Front End, Global Distributed Switch Controlle= r. + - description: + Titan GDSC - Titan ISP Block Global Distributed Switch Controlle= r. + + power-domain-names: + items: + - const: ife0 + - const: ife1 + - const: ife2 + - const: top + + vdd-csiphy0-0p8-supply: + description: + Phandle to a 0.8V regulator supply to CSIPHY0 core block. + + vdd-csiphy0-1p2-supply: + description: + Phandle to a 1.2V regulator supply to CSIPHY0 pll block. + + vdd-csiphy1-0p8-supply: + description: + Phandle to a 0.8V regulator supply to CSIPHY1 core block. + + vdd-csiphy1-1p2-supply: + description: + Phandle to a 1.2V regulator supply to CSIPHY1 pll block. + + vdd-csiphy2-0p8-supply: + description: + Phandle to a 0.8V regulator supply to CSIPHY2 core block. + + vdd-csiphy2-1p2-supply: + description: + Phandle to a 1.2V regulator supply to CSIPHY2 pll block. + + vdd-csiphy3-0p8-supply: + description: + Phandle to a 0.8V regulator supply to CSIPHY3 core block. + + vdd-csiphy3-1p2-supply: + description: + Phandle to a 1.2V regulator supply to CSIPHY3 pll block. + + vdd-csiphy4-0p8-supply: + description: + Phandle to a 0.8V regulator supply to CSIPHY4 core block. + + vdd-csiphy4-1p2-supply: + description: + Phandle to a 1.2V regulator supply to CSIPHY4 pll block. + + vdd-csiphy5-0p8-supply: + description: + Phandle to a 0.8V regulator supply to CSIPHY5 core block. + + vdd-csiphy5-1p2-supply: + description: + Phandle to a 1.2V regulator supply to CSIPHY5 pll block. + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + description: + CSI input ports. + + patternProperties: + "^port@[0-5]$": + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: + Input ports for receiving CSI data on CSIPHY 0-5. + + 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 + - power-domain-names + +additionalProperties: false + +examples: + - | + #include + #include + #include + + soc { + #address-cells =3D <2>; + #size-cells =3D <2>; + + isp@9253000 { + compatible =3D "qcom,kaanapali-camss"; + + reg =3D <0x0 0x09253000 0x0 0x5e80>, + <0x0 0x09263000 0x0 0x5e80>, + <0x0 0x09273000 0x0 0x5e80>, + <0x0 0x092d3000 0x0 0x3880>, + <0x0 0x092e7000 0x0 0x3880>, + <0x0 0x09523000 0x0 0x2000>, + <0x0 0x09525000 0x0 0x2000>, + <0x0 0x09527000 0x0 0x2000>, + <0x0 0x09529000 0x0 0x2000>, + <0x0 0x0952b000 0x0 0x2000>, + <0x0 0x0952d000 0x0 0x2000>, + <0x0 0x09151000 0x0 0x20000>, + <0x0 0x09171000 0x0 0x20000>, + <0x0 0x09191000 0x0 0x20000>, + <0x0 0x092dc000 0x0 0x1300>, + <0x0 0x092f0000 0x0 0x1300>; + reg-names =3D "csid0", + "csid1", + "csid2", + "csid_lite0", + "csid_lite1", + "csiphy0", + "csiphy1", + "csiphy2", + "csiphy3", + "csiphy4", + "csiphy5", + "vfe0", + "vfe1", + "vfe2", + "vfe_lite0", + "vfe_lite1"; + + clocks =3D <&camcc_cam_cc_camnoc_nrt_axi_clk>, + <&camcc_cam_cc_camnoc_rt_axi_clk>, + <&camcc_cam_cc_camnoc_rt_tfe_0_main_clk>, + <&camcc_cam_cc_camnoc_rt_tfe_1_main_clk>, + <&camcc_cam_cc_camnoc_rt_tfe_2_main_clk>, + <&camcc_cam_cc_camnoc_rt_ife_lite_clk>, + <&camcc_cam_cc_cam_top_ahb_clk>, + <&camcc_cam_cc_cam_top_fast_ahb_clk>, + <&camcc_cam_cc_csid_clk>, + <&camcc_cam_cc_csid_csiphy_rx_clk>, + <&camcc_cam_cc_csiphy0_clk>, + <&camcc_cam_cc_csi0phytimer_clk>, + <&camcc_cam_cc_csiphy1_clk>, + <&camcc_cam_cc_csi1phytimer_clk>, + <&camcc_cam_cc_csiphy2_clk>, + <&camcc_cam_cc_csi2phytimer_clk>, + <&camcc_cam_cc_csiphy3_clk>, + <&camcc_cam_cc_csi3phytimer_clk>, + <&camcc_cam_cc_csiphy4_clk>, + <&camcc_cam_cc_csi4phytimer_clk>, + <&camcc_cam_cc_csiphy5_clk>, + <&camcc_cam_cc_csi5phytimer_clk>, + <&gcc_gcc_camera_hf_axi_clk>, + <&camcc_cam_cc_tfe_0_main_clk>, + <&camcc_cam_cc_tfe_0_main_fast_ahb_clk>, + <&camcc_cam_cc_tfe_1_main_clk>, + <&camcc_cam_cc_tfe_1_main_fast_ahb_clk>, + <&camcc_cam_cc_tfe_2_main_clk>, + <&camcc_cam_cc_tfe_2_main_fast_ahb_clk>, + <&camcc_cam_cc_ife_lite_clk>, + <&camcc_cam_cc_ife_lite_ahb_clk>, + <&camcc_cam_cc_ife_lite_cphy_rx_clk>, + <&camcc_cam_cc_ife_lite_csid_clk>, + <&camcc_cam_cc_qdss_debug_xo_clk>; + + clock-names =3D "camnoc_nrt_axi", + "camnoc_rt_axi", + "camnoc_rt_vfe0", + "camnoc_rt_vfe1", + "camnoc_rt_vfe2", + "camnoc_rt_vfe_lite", + "cam_top_ahb", + "cam_top_fast_ahb", + "csid", + "csid_csiphy_rx", + "csiphy0", + "csiphy0_timer", + "csiphy1", + "csiphy1_timer", + "csiphy2", + "csiphy2_timer", + "csiphy3", + "csiphy3_timer", + "csiphy4", + "csiphy4_timer", + "csiphy5", + "csiphy5_timer", + "gcc_hf_axi", + "vfe0", + "vfe0_fast_ahb", + "vfe1", + "vfe1_fast_ahb", + "vfe2", + "vfe2_fast_ahb", + "vfe_lite", + "vfe_lite_ahb", + "vfe_lite_cphy_rx", + "vfe_lite_csid", + "qdss_debug_xo"; + + interrupts =3D , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + interrupt-names =3D "csid0", + "csid1", + "csid2", + "csid_lite0", + "csid_lite1", + "csiphy0", + "csiphy1", + "csiphy2", + "csiphy3", + "csiphy4", + "csiphy5", + "vfe0", + "vfe1", + "vfe2", + "vfe_lite0", + "vfe_lite1"; + + interconnects =3D <&gem_noc_master_appss_proc QCOM_ICC_TAG_ACT= IVE_ONLY + &config_noc_slave_camera_cfg QCOM_ICC_TAG_ACT= IVE_ONLY>, + <&mmss_noc_master_camnoc_hf QCOM_ICC_TAG_ALWAYS + &mc_virt_slave_ebi1 QCOM_ICC_TAG_ALWAYS>; + interconnect-names =3D "ahb", + "hf_mnoc"; + + iommus =3D <&apps_smmu 0x1c00 0x00>; + + power-domains =3D <&camcc_cam_cc_tfe_0_gdsc>, + <&camcc_cam_cc_tfe_1_gdsc>, + <&camcc_cam_cc_tfe_2_gdsc>, + <&camcc_cam_cc_titan_top_gdsc>; + power-domain-names =3D "ife0", + "ife1", + "ife2", + "top"; + + vdd-csiphy0-0p8-supply =3D <&vreg_0p8_supply>; + vdd-csiphy0-1p2-supply =3D <&vreg_1p2_supply>; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + + csiphy_ep0: endpoint { + data-lanes =3D <0 1>; + remote-endpoint =3D <&sensor_ep>; + }; + }; + }; + }; + }; --=20 2.34.1 From nobody Mon Feb 9 22:39:59 2026 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 9FF172FBE13 for ; Wed, 29 Oct 2025 05:44:40 +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=1761716682; cv=none; b=a8oKUEpp/zaJqqS3Gu9K8f+oMX1VjrREH+Lp3Ijo8lFUpXJ062X/NUPaZEc6bVJEDn5yUyKRgo9Tx/yP+IR3LW8HflvYC6g1wqH/fxcxnxTJjqXuZ8va/3MVg3y30c6oT7DwvTUlcAjQwkMKvsJ6NeqOIQZAf4QlX0yZuGWEfiA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761716682; c=relaxed/simple; bh=p8ySBPeMhhgOjthdspe7wrGny1MNgnBjciz9CWlWZqQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=uexZ95Ed49p7uhKgJbozZJf2MtzTJvYynIf1QrCbiacYTXJDF70ZAmzLWUhLl59Vvl+yeMVnTsBKE/cdlfwj1JnuNe3sgn9UkZJwBgET0xEmWXzh6lP0nUJvc2B4L+xenKIbljLZbl4DakhP2jKI/RQxW9uXTq8UJ4n8nSUGk8c= 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=EMjgnXd0; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=kW12P2lR; 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="EMjgnXd0"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="kW12P2lR" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 59T4v1l03664620 for ; Wed, 29 Oct 2025 05:44:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= rGA6jyIhggMQN7nzJCboVgsPOrhbc0c0lh6rLgR6WNM=; b=EMjgnXd0HAQlHGtN GTy4vq4OMP3OlqZJL5apjN46DL5MlifMlyRhSCu0/AxWHetMLSeqQXN+Q27Mxhqr htgTahxy6uYnQCL2DGBJKUUULNeTUowtVregN2HDD81KcC+v0uov1QGSSBcL3vpp G6jVV8/NkoyT8EqWHdnoxfAvP3vlnvF5S1gY0Ls3nsjZCy5IoI0EAHWbl7vhtuJn Be7eIqRBmNOoKkHuRj2yXImvrd4wo2HaIy8M31bs4YVl9cVLJiRC++AS+a7c0XZb MqrtwAM6XuYJnce+LKgtVXoG46XiGqIVPuj64YO6Aw7zFVvVchz8xRr1xCjDQMSB 8Ou9vw== Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4a34a3sans-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 29 Oct 2025 05:44:39 +0000 (GMT) Received: by mail-pg1-f198.google.com with SMTP id 41be03b00d2f7-b6d53016548so10313194a12.3 for ; Tue, 28 Oct 2025 22:44:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1761716679; x=1762321479; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=rGA6jyIhggMQN7nzJCboVgsPOrhbc0c0lh6rLgR6WNM=; b=kW12P2lRpoo7JB+eF/Xu1LmeXd8nxvhZnNCQmgn+0U7lDtuN19pc/SJ1aVHvcs8PSL Xhjlg1V1C9a/EUxHWp0cUdv1s0HQEjuTiGAdhbrHZBdoYzWo+/a1wLq6dKuOraPlzngU kzXchWlz0w2KLiKDbE2+eWimvofh2fLrXgiUn1qQwO1ryH95E9e/r1c68DyyjSv90b2u vxpeTFtLzxecA0G/IDl50cBW3om0x8Po34ntdFn94E06o31v8fdSgE/WSnhaETAt/Mfy 73TfMyue7i6/mGFD6yJbkZnh8ZtfopIHXXt9UKszSTfqsc9E3pOYDNrj5aX6s3/sL1CF V+uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761716679; x=1762321479; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rGA6jyIhggMQN7nzJCboVgsPOrhbc0c0lh6rLgR6WNM=; b=mI/Aq1aEloX1AlShhzUdXbwUjkCPLXJ5QV57qyWSYOuQ0rsqtuW1gQ2wAsnGny4jXl 6NgG9s10Ig3n9pjdFobdAs/sv7xrdNtAHt6zL1y1eb+F1+H1PL/tljTez/3ZCm1dVrqd 3tmVFbmNqbxgbyX+8eIPKfGubr5xxVsU98td3Z0E1fhtDZ8oygQzwmyOXk1zfEarGFa6 nZa+qV/5wG/HXTUX6HawgpxtkgsEiUZPKrjDJRlzgeX5nD8oW5iQtVQoOOIcWm340S+O hveEAl0O3/VW88aGgJ+SQVO+IQwY2xv7MvRj7BvSOqhkvDx5qUMYrU78ve7P9LhlSJV7 oyOg== X-Forwarded-Encrypted: i=1; AJvYcCWmZRGR/cDEUHnBaYH4zhvtYGq+4f8aJ8AqwT2fPZHooCwPWg4Dj2QmOHr8I2Htfp6jhN4UjGcXZq+HkuY=@vger.kernel.org X-Gm-Message-State: AOJu0YzuvLYaoIduRM2BfPGmehuvSG0LlwnwmcUY2sLn84t4Iwfri2kS kZKzwkxmdEKcLTXJqAONQ9r2kHWrmaKzfdDHkB7Cuy6ce4C4mX+0KAI3bQkroiCeQh86y2SpL1g /KsbAtpASv2SFEL+ZqCleELca3xcfll4eBVHbG5ikDRb5Z3RU38/7e67acdK7Gv+gTcA= X-Gm-Gg: ASbGncvZWBCccj54kMIENFpiDHqVNTvJalotGsH4T+Q1pm/i2otRshczhDmVe3Az/U+ nW5niZlxpLqh7pldTV6tVTCBA9XGPticpJWIJQAa6XEHYlQf+Pe6s9Cve6lhA19doN1gPdQTZbK v1Owu+gamosLGvXdQAY7ZPSXAbde4WkoHdt+5blLGfjR+CeE0/fGYhEvVRunGXDqvMR0ghXhcU7 KMLsT9IpDuguL+qDRF3VRG6z8p4gm/5HjEZIH/TpTkDg4LnbLrfIyZkCVnzu/Mdd/8qzsbB7NqD AI1X3GYo61NVlwCj5LRqws+h8wLPYJyLMF8cyLTRDCG6Sm7S940E/um5e1bLpJsl1g6GEekQP9i F04wUzMR0hJgZ2J85Idwaems4xPaTteHnn3nBfu4YklQqYIYPr74YQQ== X-Received: by 2002:a05:6a21:3384:b0:343:70a2:bca9 with SMTP id adf61e73a8af0-34654128d42mr2160053637.53.1761716679194; Tue, 28 Oct 2025 22:44:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFHL/mDvAsHrsYqZ3mKEmdPc4gs2fnr0PGSPRIa+7ron2IPWKz1ls32Vwt7lsvJWtlBKEzRPA== X-Received: by 2002:a05:6a21:3384:b0:343:70a2:bca9 with SMTP id adf61e73a8af0-34654128d42mr2160019637.53.1761716678692; Tue, 28 Oct 2025 22:44:38 -0700 (PDT) Received: from hu-hangxian-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-33fed7d1fdesm14280643a91.5.2025.10.28.22.44.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Oct 2025 22:44:38 -0700 (PDT) From: Hangxiang Ma Date: Tue, 28 Oct 2025 22:44:12 -0700 Subject: [PATCH v4 3/6] media: qcom: camss: Add Kaanapali compatible camss driver Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251028-add-support-for-camss-on-kaanapali-v4-3-7eb484c89585@oss.qualcomm.com> References: <20251028-add-support-for-camss-on-kaanapali-v4-0-7eb484c89585@oss.qualcomm.com> In-Reply-To: <20251028-add-support-for-camss-on-kaanapali-v4-0-7eb484c89585@oss.qualcomm.com> To: Loic Poulain , Robert Foss , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Todor Tomov , Vladimir Zapolskiy , Mauro Carvalho Chehab , Bryan O'Donoghue Cc: linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, aiqun.yu@oss.qualcomm.com, tingwei.zhang@oss.qualcomm.com, trilok.soni@oss.qualcomm.com, yijie.yang@oss.qualcomm.com, Jingyi Wang , Atiya Kailany , Hangxiang Ma X-Mailer: b4 0.14.3 X-Proofpoint-ORIG-GUID: St1ctxPzjUJx7RbjgzzeuBuY8HV-Yv0u X-Authority-Analysis: v=2.4 cv=HM3O14tv c=1 sm=1 tr=0 ts=6901a9c7 cx=c_pps a=Qgeoaf8Lrialg5Z894R3/Q==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=x6icFKpwvdMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=Eph36bqoL6-XvbZcx_wA:9 a=QEXdDO2ut3YA:10 a=x9snwWr2DeNwDh03kgHS:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMDI5MDA0MSBTYWx0ZWRfX09I73Ezi96Gi YQfqq0m43+BKElOgQw6467H4jZIgbMPkVajy+K1+CMs9vW+KHB4P4hbjVV2QY2BCfVcoisXy0u3 avmSvH+JLInjflhx54enQNnyOrGRW3g99UVu+8KYLdPHjwx5ta4KTTuFXIVM2mmw2WxYVnAR0JY Xi/X6MZzVMMrfSr9Z5sV4dDfRINOUtTbbXHKic2pu6xNijTCyBvQu1q2cCEgrplkaEA7mfa3gnt oNvMuOFopPPOtb31De/K8ZRpHV8BF/5mKXxqOYudS0jRCqT+cWrpji35I4XHldlPc2IqTdeAgRv SRq7qNnU8ljJmrMwKob1k3I3JHXdOVd+i7hNuBv6k4I8KHdQtmbvJWRA1fBZWgmhgJDCg5hNs38 a7OeVmtvYZbPq2eSfZAMCUmlT7TSBQ== X-Proofpoint-GUID: St1ctxPzjUJx7RbjgzzeuBuY8HV-Yv0u X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-10-29_02,2025-10-22_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 priorityscore=1501 malwarescore=0 adultscore=0 phishscore=0 spamscore=0 lowpriorityscore=0 impostorscore=0 clxscore=1015 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2510290041 Add support for kaanapali in the camss driver. Add high level resource information along with the bus bandwidth votes. Module level detailed resource information will be enumerated in the following patches of the series. Signed-off-by: Hangxiang Ma --- drivers/media/platform/qcom/camss/camss.c | 22 ++++++++++++++++++++++ drivers/media/platform/qcom/camss/camss.h | 1 + 2 files changed, 23 insertions(+) diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/plat= form/qcom/camss/camss.c index 2fbcd0e343aa..658d9c9183d4 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -34,6 +34,20 @@ =20 static const struct parent_dev_ops vfe_parent_dev_ops; =20 +static const struct resources_icc icc_res_kaanapali[] =3D { + { + .name =3D "ahb", + .icc_bw_tbl.avg =3D 150000, + .icc_bw_tbl.peak =3D 300000, + }, + /* Based on 4096 x 3072 30 FPS 2496 Mbps mode */ + { + .name =3D "hf_mnoc", + .icc_bw_tbl.avg =3D 471860, + .icc_bw_tbl.peak =3D 925857, + }, +}; + static const struct camss_subdev_resources csiphy_res_8x16[] =3D { /* CSIPHY0 */ { @@ -4291,6 +4305,13 @@ static void camss_remove(struct platform_device *pde= v) camss_genpd_cleanup(camss); } =20 +static const struct camss_resources kaanapali_resources =3D { + .version =3D CAMSS_KAANAPALI, + .pd_name =3D "top", + .icc_res =3D icc_res_kaanapali, + .icc_path_num =3D ARRAY_SIZE(icc_res_kaanapali), +}; + static const struct camss_resources msm8916_resources =3D { .version =3D CAMSS_8x16, .csiphy_res =3D csiphy_res_8x16, @@ -4467,6 +4488,7 @@ static const struct camss_resources x1e80100_resource= s =3D { }; =20 static const struct of_device_id camss_dt_match[] =3D { + { .compatible =3D "qcom,kaanapali-camss", .data =3D &kaanapali_resources = }, { .compatible =3D "qcom,msm8916-camss", .data =3D &msm8916_resources }, { .compatible =3D "qcom,msm8953-camss", .data =3D &msm8953_resources }, { .compatible =3D "qcom,msm8996-camss", .data =3D &msm8996_resources }, diff --git a/drivers/media/platform/qcom/camss/camss.h b/drivers/media/plat= form/qcom/camss/camss.h index 901f84efaf7d..876cd2a64cbe 100644 --- a/drivers/media/platform/qcom/camss/camss.h +++ b/drivers/media/platform/qcom/camss/camss.h @@ -90,6 +90,7 @@ enum camss_version { CAMSS_845, CAMSS_8550, CAMSS_8775P, + CAMSS_KAANAPALI, CAMSS_X1E80100, }; =20 --=20 2.34.1 From nobody Mon Feb 9 22:39:59 2026 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 1D541301006 for ; Wed, 29 Oct 2025 05:44:43 +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=1761716685; cv=none; b=LvzLeE/JA7f1iEo2Ck1FmGDGDKqyMDLZVWsFYOvqaLpKOaJ4QPxWLV4291G4s2r/bOWSpfSdkFBvjm8+Epnwnm0pdmQm7FzmPxvfUSud/hI4PGt2WKwQ6oiyk6620VOetD3BouO99JK1j3Af5e5jdNN0QH8BBc8aTwWEub95w24= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761716685; c=relaxed/simple; bh=/VFxNDC/+4OXwxjw+fC1cxECcAHmPyYEYL69YEwsaDs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=o6G4EPI3oL6UEP6jGGfNVzobxEbyC/kCdrtBEnJc4vaCa7J3sCv7Va0xVkH10XsY5w1fuOQhkDpcibhieBYt2hBa3jCB7UdgK3qneZwLUVEEPbN+8oItwO3hmyT6M4cWYYWMWoAKe062hlFCtmi6/iIHhD3XnZDnbe7w6WXN5rI= 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=d5mQWjvH; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=jyqFhGf3; 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="d5mQWjvH"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="jyqFhGf3" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 59T4v3Qh3755372 for ; Wed, 29 Oct 2025 05:44:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= H9VzPj0s+32E8DN794i60/pMz7ADIqRLAIP3bBDi3+Y=; b=d5mQWjvHB56wWmuJ FjBM9wICvbCfLqE80VRcX3kDHH86zjjmTp7kDd09/Ar2H90qJpsirsioP2YzZ09X 2d6WBFIygcoqOUl5cq/W+hENBP5ZR3ETR4vkQMBwA72Z7Gug3seHLCXR7ucs6baU 0pUtLIWUPbJn/6XMB/7DQGCjLdNHGm5KiVqk1a8iLD8AlbtuMCS/6JDEBVKjb/xH 7GqeAM/UXpL8nuope7/Zfj2PtQT3x7ohzO9MMhrern3hqlpJPucnfcVY4hrJKQhB ueY8tXSElSGZuzaX1mt9mrdfr5Sim/WTWY0rEMhvR9/0omqRpzXHywWl1fn1OI57 VovErw== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4a34a0hafx-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 29 Oct 2025 05:44:42 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-33bdd0479a9so6974186a91.2 for ; Tue, 28 Oct 2025 22:44:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1761716681; x=1762321481; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=H9VzPj0s+32E8DN794i60/pMz7ADIqRLAIP3bBDi3+Y=; b=jyqFhGf3IypS+6NxBYLouXt5nJ7TKsZrlwDJQnhvznM1RlDR7GtzOzhz20Zu7iAGrl Og2T5hOFC44Mov8RDGCYin6/1utW/LJOx9tBZ5dXVcaAvljANTjH1iTLk4MJYAvRIbXJ v2YSfmy/1iyKXelWtCVzrAksMYbxxCRAXi6TEz2zf8TK5LT0oRXgVx8v0yexctVG31fY sZnu0CvwUwHc81HYmo13/eTLxpWsNgm1uZXj9t3LZbFmQBb6ACfq3jy8wbYmigH2iXBn nJsSyMyFBuOIqLd3xXDaQvtIDIH/k+0L3GPmMR0opL5pHuJgMh954BF/Z4aWnz5XTx3R F+Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761716681; x=1762321481; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H9VzPj0s+32E8DN794i60/pMz7ADIqRLAIP3bBDi3+Y=; b=ZknRB26THk42qAkkNv/y8hl/aYKLrqKVjVGz4UN9Lp0HemKW04Zka8b/1IyHAB3Iii T9nIn+YLshApXR7GevHwN5dI5u3suiwgtZ8vrddl8fl9EfFJ2tKg7cAlmpt8uGeuzKxI yRRQ9OOkkoiD+yq4Py+xRMqP5NZKcG3AhG0jBFFGdrACNJI8kmmYgmEyQ8pX85gnPKlJ Xla98Wv7UP4Lkhi2XGjp1rsBL0MoZS7qeD8lPezos6OAiTWur01j0aXkjVhC3NSUzak+ 9r3kFzyU9kBMlUm6DfQMGOIuq1HvxjdAgADzvOgJVNtb/cQWpiLy21RVo/bAs9WRyavy WNWQ== X-Forwarded-Encrypted: i=1; AJvYcCXTE+H0SB8uwv/DqAW59pkqTaCY5DiyxQQ+v7HR7CRQvXERAQtomygnsYrNt71H+ZW6vQu8bFU8/KNdV+s=@vger.kernel.org X-Gm-Message-State: AOJu0YwnWg6XUfG38Q2H4c8bQbwJ6J20ZPaTODKu9cWUlxlrcXI2UkJg cXAcB6W0HjxSXkg6Xnvj4kw5Pml+rw2ld0u+sEPt3C55K9VRn8UbfKaBZ8BRfdZo4Z8b/PDKSk8 Yqepqe2GNSbHJHhUzhYXrEHo1EcZCGlElRmwHOyyVGt7jGuRcX7r/CTtiSau8DDXLa+g= X-Gm-Gg: ASbGnct1TQg10FuuHQIZXHEwVjGJuXhKBgukUjgS2iJCeL/bhwOVuXFOv9pOQZbjVBX gve3CmY5zJlBYgFwR1P7wV9DDUzT0+QXheqDv5siMbXXa3uRax6ZSJINPItcXtZ3QqBRYFFMZqy RkVISGvRYMfHZrNw/9hPKKSmimhVVBoG0/AKszg9dPTVtcgTNraxcTsZBGFQpU9Oi5qk86o5tON nG+eGZmnF+Y0dZcTgTgsV4PU+rI7UHokPbIBS+6uubqxEDPx7SGvtLZeoeoto0z/y8gGBNX9Ura q5cp4Jk1060czAl57/wlShG4/uMXcpUCi2Xyr9ho/tpLbA//RbpQlnl+2C9qmUPTwTYWPOGIxXA tcmWTmBEXifwI05HoFZ4ZTUDvi8AdE0Ee5tyzqIQV2BAa7a1yuRuIqQ== X-Received: by 2002:a17:90b:54c6:b0:33f:ebeb:d7ef with SMTP id 98e67ed59e1d1-3403a2a420cmr2073859a91.35.1761716680952; Tue, 28 Oct 2025 22:44:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHzfEuTIE1jVRkFzqPFhzivFdBpuUbTiEOw0R2cYts0wEW6nDPF9VtTIPlgNXUmW0SUGcuGNg== X-Received: by 2002:a17:90b:54c6:b0:33f:ebeb:d7ef with SMTP id 98e67ed59e1d1-3403a2a420cmr2073820a91.35.1761716680359; Tue, 28 Oct 2025 22:44:40 -0700 (PDT) Received: from hu-hangxian-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-33fed7d1fdesm14280643a91.5.2025.10.28.22.44.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Oct 2025 22:44:39 -0700 (PDT) From: Hangxiang Ma Date: Tue, 28 Oct 2025 22:44:13 -0700 Subject: [PATCH v4 4/6] media: qcom: camss: csiphy: Add support for v2.4.0 two-phase CSIPHY Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251028-add-support-for-camss-on-kaanapali-v4-4-7eb484c89585@oss.qualcomm.com> References: <20251028-add-support-for-camss-on-kaanapali-v4-0-7eb484c89585@oss.qualcomm.com> In-Reply-To: <20251028-add-support-for-camss-on-kaanapali-v4-0-7eb484c89585@oss.qualcomm.com> To: Loic Poulain , Robert Foss , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Todor Tomov , Vladimir Zapolskiy , Mauro Carvalho Chehab , Bryan O'Donoghue Cc: linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, aiqun.yu@oss.qualcomm.com, tingwei.zhang@oss.qualcomm.com, trilok.soni@oss.qualcomm.com, yijie.yang@oss.qualcomm.com, Jingyi Wang , Atiya Kailany , Hangxiang Ma X-Mailer: b4 0.14.3 X-Authority-Analysis: v=2.4 cv=HvZ72kTS c=1 sm=1 tr=0 ts=6901a9ca cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=x6icFKpwvdMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=fxCOb-bM6HI3QnfcwHgA:9 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9:22 X-Proofpoint-GUID: fBUWLZANKB57MzKoCyB2H8k1JGz_DNvE X-Proofpoint-ORIG-GUID: fBUWLZANKB57MzKoCyB2H8k1JGz_DNvE X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMDI5MDA0MSBTYWx0ZWRfXxgogcmkSYo4s Hw8GwnfRcJcOAVMttL56k4UnABBk6LecKgy5rVGV9MB8eOpisjx9MGOW8JpfU1ewA5IwRqU+vqK Vp+mBZhK+3olxIzXyMZSXamaQfVDmyQkObNVk1BP4rwR/5g+MYYwRL1tUQz4IlKxJKBKabIPqtC Ujk8VR5wSDN7fjcHqORes1PXRho5jFIF8y/fyUgUrQ9t9bTAlqnuCoUdgK5KercxJvRNybGbWDH 6cV50xkIzix+tldoYGABqh+fUgRuBxQTFywZlLL0tw7c5e3LkxyaK4agYOxYWz+w+iEY0lmhUg5 lP6cGcEhMUN/LCKzk7imEoaQj/4UXecLMqabnJcoqXTyWL8/IaPouSOd/FCK4Fky+WZpEp14Tgl 1ejGP+5D8T+AzbT+JZq5GxTVmylHDA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-10-29_02,2025-10-22_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 malwarescore=0 adultscore=0 impostorscore=0 lowpriorityscore=0 phishscore=0 bulkscore=0 spamscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2510290041 Add more detailed resource information for CSIPHY devices in the camss driver along with the support for v2.4.0 in the 2 phase CSIPHY driver that is responsible for the PHY lane register configuration, module reset and interrupt handling. Signed-off-by: Hangxiang Ma --- .../platform/qcom/camss/camss-csiphy-3ph-1-0.c | 124 +++++++++++++++++= ++++ drivers/media/platform/qcom/camss/camss.c | 107 ++++++++++++++++++ 2 files changed, 231 insertions(+) diff --git a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c b/dri= vers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c index 9b6a0535cdf8..5499f4141294 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 @@ -588,6 +588,123 @@ csiphy_lane_regs lane_regs_sm8550[] =3D { {0x0C64, 0x7F, 0x00, CSIPHY_DEFAULT_PARAMS}, }; =20 +/* 3nm 2PH v 2.4.0 2p5Gbps 4 lane DPHY mode */ +static const struct +csiphy_lane_regs lane_regs_kaanapali[] =3D { + /* LN 0 */ + {0x0094, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x00A0, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0090, 0x0F, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0098, 0x08, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0094, 0x07, 0xd1, CSIPHY_DEFAULT_PARAMS}, + {0x0030, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0000, 0x8C, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0038, 0xFE, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x002C, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0034, 0x0F, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x001C, 0x0A, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0014, 0x60, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x003C, 0xB8, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0004, 0x0C, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0020, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0008, 0x19, 0x00, CSIPHY_SETTLE_CNT_LOWER_BYTE}, + {0x0010, 0x52, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0094, 0xD7, 0x00, CSIPHY_SKEW_CAL}, + {0x005C, 0x54, 0x00, CSIPHY_SKEW_CAL}, + {0x0060, 0xFD, 0x00, CSIPHY_SKEW_CAL}, + {0x0064, 0x7F, 0x00, CSIPHY_SKEW_CAL}, + + /* LN 2 */ + {0x0494, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x04A0, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0490, 0x0F, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0498, 0x08, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0494, 0x07, 0xd1, CSIPHY_DEFAULT_PARAMS}, + {0x0430, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0400, 0x8C, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0438, 0xFE, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x042C, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0434, 0x0F, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x041C, 0x0A, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0414, 0x60, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x043C, 0xB8, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0404, 0x0C, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0420, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0408, 0x19, 0x00, CSIPHY_SETTLE_CNT_LOWER_BYTE}, + {0x0410, 0x52, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0494, 0xD7, 0x00, CSIPHY_SKEW_CAL}, + {0x045C, 0x54, 0x00, CSIPHY_SKEW_CAL}, + {0x0460, 0xFD, 0x00, CSIPHY_SKEW_CAL}, + {0x0464, 0x7F, 0x00, CSIPHY_SKEW_CAL}, + + /* LN 4 */ + {0x0894, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x08A0, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0890, 0x0F, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0898, 0x08, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0894, 0x07, 0xd1, CSIPHY_DEFAULT_PARAMS}, + {0x0830, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0800, 0x8C, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0838, 0xFE, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x082C, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0834, 0x0F, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x081C, 0x0A, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0814, 0x60, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x083C, 0xB8, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0804, 0x0C, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0820, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0808, 0x19, 0x00, CSIPHY_SETTLE_CNT_LOWER_BYTE}, + {0x0810, 0x52, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0894, 0xD7, 0x00, CSIPHY_SKEW_CAL}, + {0x085C, 0x54, 0x00, CSIPHY_SKEW_CAL}, + {0x0860, 0xFD, 0x00, CSIPHY_SKEW_CAL}, + {0x0864, 0x7F, 0x00, CSIPHY_SKEW_CAL}, + + /* LN 6 */ + {0x0C94, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0CA0, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0C90, 0x0F, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0C98, 0x08, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0C94, 0x07, 0xd1, CSIPHY_DEFAULT_PARAMS}, + {0x0C30, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0C00, 0x8C, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0C38, 0xFE, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0C2C, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0C34, 0x0F, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0C1C, 0x0A, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0C14, 0x60, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0C3C, 0xB8, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0C04, 0x0C, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0C20, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0C08, 0x19, 0x00, CSIPHY_SETTLE_CNT_LOWER_BYTE}, + {0x0C10, 0x52, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0C94, 0xD7, 0x00, CSIPHY_SKEW_CAL}, + {0x0C5C, 0x54, 0x00, CSIPHY_SKEW_CAL}, + {0x0C60, 0xFD, 0x00, CSIPHY_SKEW_CAL}, + {0x0C64, 0x7F, 0x00, CSIPHY_SKEW_CAL}, + + /* LN CLK */ + {0x0E94, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0EA0, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0E90, 0x0F, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0E98, 0x08, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0E94, 0x07, 0xd1, CSIPHY_DEFAULT_PARAMS}, + {0x0E30, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0E28, 0x04, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0E00, 0x80, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0E0C, 0xFF, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0E38, 0x1F, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0E2C, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0E34, 0x0F, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0E1C, 0x0A, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0E14, 0x60, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0E3C, 0xB8, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0E04, 0x0C, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0E20, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0E08, 0x19, 0x00, CSIPHY_SETTLE_CNT_LOWER_BYTE}, + {0x0E10, 0x52, 0x00, CSIPHY_DEFAULT_PARAMS}, +}; + /* 4nm 2PH v 2.1.2 2p5Gbps 4 lane DPHY mode */ static const struct csiphy_lane_regs lane_regs_x1e80100[] =3D { @@ -921,6 +1038,7 @@ static bool csiphy_is_gen2(u32 version) case CAMSS_845: case CAMSS_8550: case CAMSS_8775P: + case CAMSS_KAANAPALI: case CAMSS_X1E80100: ret =3D true; break; @@ -1030,6 +1148,12 @@ static int csiphy_init(struct csiphy_device *csiphy) regs->lane_regs =3D &lane_regs_sa8775p[0]; regs->lane_array_size =3D ARRAY_SIZE(lane_regs_sa8775p); break; + case CAMSS_KAANAPALI: + regs->lane_regs =3D &lane_regs_kaanapali[0]; + regs->lane_array_size =3D ARRAY_SIZE(lane_regs_kaanapali); + regs->offset =3D 0x1000; + regs->common_status_offset =3D 0x138; + break; default: break; } diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/plat= form/qcom/camss/camss.c index 658d9c9183d4..b12e79e40e97 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -34,6 +34,111 @@ =20 static const struct parent_dev_ops vfe_parent_dev_ops; =20 +static const struct camss_subdev_resources csiphy_res_kaanapali[] =3D { + /* CSIPHY0 */ + { + .regulators =3D { "vdd-csiphy0-0p8", "vdd-csiphy0-1p2" }, + .clock =3D { "csiphy0", "csiphy0_timer", + "cam_top_ahb", "cam_top_fast_ahb" }, + .clock_rate =3D { { 400000000, 480000000 }, + { 400000000 }, + { 0 }, + { 0 } }, + .reg =3D { "csiphy0" }, + .interrupt =3D { "csiphy0" }, + .csiphy =3D { + .id =3D 0, + .hw_ops =3D &csiphy_ops_3ph_1_0, + .formats =3D &csiphy_formats_sdm845 + } + }, + /* CSIPHY1 */ + { + .regulators =3D { "vdd-csiphy1-0p8", "vdd-csiphy1-1p2" }, + .clock =3D { "csiphy1", "csiphy1_timer", + "cam_top_ahb", "cam_top_fast_ahb" }, + .clock_rate =3D { { 400000000, 480000000 }, + { 400000000 }, + { 0 }, + { 0 } }, + .reg =3D { "csiphy1" }, + .interrupt =3D { "csiphy1" }, + .csiphy =3D { + .id =3D 1, + .hw_ops =3D &csiphy_ops_3ph_1_0, + .formats =3D &csiphy_formats_sdm845 + } + }, + /* CSIPHY2 */ + { + .regulators =3D { "vdd-csiphy2-0p8", "vdd-csiphy2-1p2" }, + .clock =3D { "csiphy2", "csiphy2_timer", + "cam_top_ahb", "cam_top_fast_ahb" }, + .clock_rate =3D { { 400000000, 480000000 }, + { 400000000 }, + { 0 }, + { 0 } }, + .reg =3D { "csiphy2" }, + .interrupt =3D { "csiphy2" }, + .csiphy =3D { + .id =3D 2, + .hw_ops =3D &csiphy_ops_3ph_1_0, + .formats =3D &csiphy_formats_sdm845 + } + }, + /* CSIPHY3 */ + { + .regulators =3D { "vdd-csiphy3-0p8", "vdd-csiphy3-1p2" }, + .clock =3D { "csiphy3", "csiphy3_timer", + "cam_top_ahb", "cam_top_fast_ahb" }, + .clock_rate =3D { { 400000000, 480000000 }, + { 400000000 }, + { 0 }, + { 0 } }, + .reg =3D { "csiphy3" }, + .interrupt =3D { "csiphy3" }, + .csiphy =3D { + .id =3D 3, + .hw_ops =3D &csiphy_ops_3ph_1_0, + .formats =3D &csiphy_formats_sdm845 + } + }, + /* CSIPHY4 */ + { + .regulators =3D { "vdd-csiphy4-0p8", "vdd-csiphy4-1p2" }, + .clock =3D { "csiphy4", "csiphy4_timer", + "cam_top_ahb", "cam_top_fast_ahb" }, + .clock_rate =3D { { 400000000, 480000000 }, + { 400000000 }, + { 0 }, + { 0 } }, + .reg =3D { "csiphy4" }, + .interrupt =3D { "csiphy4" }, + .csiphy =3D { + .id =3D 4, + .hw_ops =3D &csiphy_ops_3ph_1_0, + .formats =3D &csiphy_formats_sdm845 + } + }, + /* CSIPHY5 */ + { + .regulators =3D { "vdd-csiphy5-0p8", "vdd-csiphy5-1p2" }, + .clock =3D { "csiphy5", "csiphy5_timer", + "cam_top_ahb", "cam_top_fast_ahb" }, + .clock_rate =3D { { 400000000, 480000000 }, + { 400000000 }, + { 0 }, + { 0 } }, + .reg =3D { "csiphy5" }, + .interrupt =3D { "csiphy5" }, + .csiphy =3D { + .id =3D 5, + .hw_ops =3D &csiphy_ops_3ph_1_0, + .formats =3D &csiphy_formats_sdm845 + } + }, +}; + static const struct resources_icc icc_res_kaanapali[] =3D { { .name =3D "ahb", @@ -4308,8 +4413,10 @@ static void camss_remove(struct platform_device *pde= v) static const struct camss_resources kaanapali_resources =3D { .version =3D CAMSS_KAANAPALI, .pd_name =3D "top", + .csiphy_res =3D csiphy_res_kaanapali, .icc_res =3D icc_res_kaanapali, .icc_path_num =3D ARRAY_SIZE(icc_res_kaanapali), + .csiphy_num =3D ARRAY_SIZE(csiphy_res_kaanapali), }; =20 static const struct camss_resources msm8916_resources =3D { --=20 2.34.1 From nobody Mon Feb 9 22:39:59 2026 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 AF49B30499B for ; Wed, 29 Oct 2025 05:44:44 +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=1761716687; cv=none; b=RnFZRXN7J7tCVXPK7lYdI5j1EbScM8mb/N1U/s9b1VinLPA6+C+/F5UbA4BFnCrjiGZbLeM8/06hR/TkAYIfxKQL/AZmoceoHL+rh75AvS2leY3elx/wA5dwzFDXS4uhOy4sZBRJ2xkEEwUc+rPVHN9iU6itONxoFjTrO406Zb0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761716687; c=relaxed/simple; bh=y1LIvIc70PAvTWWiRzQR0rbjPEsYb2IZkyFatDV0w5U=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=uGMH30gPIFt9zsM/I10FibAYdcewMtFhkFoUG3+aufk8gh0s6Uo+A4oBAXmgkrH9g4ihgMupm/FWKU5MCAh8l6FV3PCyn6IVI9kxSrZ34fI+EfgZpJe27ljq2N6pyRLe2c2O+sqgwlrnMl7lnIdeTyHHHG8cJbWazWFyx9ldwoM= 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=lJI97GwX; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=SjQfiAA8; 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="lJI97GwX"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="SjQfiAA8" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 59T4vKs33643374 for ; Wed, 29 Oct 2025 05:44:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Lk04vi4J0vQTpKzdGrLcz4xqSI3Kmz9/i2aLYpXCqLw=; b=lJI97GwXVNDiHbAt 6xsxtTssC4pVn2XAoUYvEq8pAC4iPYQW8E/z2gFMhwxH6tiYZIXIGp6ybwE+N2pg YRU1ccLsqnIfpV+ZffNeuQoHNp4xWOM8TANmDG2G3WDf46QVr27Rr9AXwTwn32As q3VYvT4kwdEmxVANOdHNC7F7eEkb/CYZah5qvghmaBQ83FKfMRyMQL003m1Zgc0I zImum9Qu76xSV5sjR9rnJV4et+3RiRCo0iPrFvsnR6sMnbn7C9Rz00a4SwZNrwnD WrzW5pMMKl84ymivO339lIR1fK5hjZSSQOsH+aPk/89BpqMdISVD5g0aCOcyZZal pxIdLQ== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4a34a1hapn-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 29 Oct 2025 05:44:43 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-32eb18b5500so11014749a91.2 for ; Tue, 28 Oct 2025 22:44:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1761716683; x=1762321483; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Lk04vi4J0vQTpKzdGrLcz4xqSI3Kmz9/i2aLYpXCqLw=; b=SjQfiAA8MvZQfaRvZKvr2ZM4xbvQmKjkq+9qNemeJZlrPdJPDCyTSFNqAGkTduYFT4 hwrc4X/TnIFJwdhcGKafjhM6pZMvvdrNi7JnFfK9JAijiB03Aj6aYxQ5k/TSvr3k/0td cln1Xla9HLE0Rfzw73wqYS/IvaC0eahBLnFVKBPPpDvWW+htLbxeMAKmpXvXpLm8WnfO cJBaF1UoWYm7BHPjc7vSX9iE5fO/R7cIwXuFq2CcBbKNQhJ0UVvlVdjq/3ohNH00tDs+ 1c53dugn7RAfVwwt/rMsFLtCqJpqj0M6XKsS14E0Xv+TZmH8qFaxJrBvT+hHL6RexaYk 8C+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761716683; x=1762321483; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Lk04vi4J0vQTpKzdGrLcz4xqSI3Kmz9/i2aLYpXCqLw=; b=sOckDCCzOVgBdgECl8YWfcZXXKS8HCHvFslksbi6Sj14+JaA54mk6g07S2QDT2FkAF hFW8ywM9wiyWqkih9XBtEBWQflJ8fDatrkQ9RKwGBJoJCo1p829jVPDHGMIsoVT65DLF a/Hn85xtKuWrpbGg4MVMwPQhi9SiOXIv1ZCULi12njENd/cCByxOKkrJ4NABOBaleExn FpHihUHjnGHatMqklHXonVT19qtuFQAHpmSg5NLvnUMuik8ztzsOanXeWU4+kZfQW3m0 +vSP8LO/1P+S7tf6vQrlpmuSEV6deYMYcoY1ZQfvJhHMUP9cPNSU5Fmo97QEeymqU2Ps Kksg== X-Forwarded-Encrypted: i=1; AJvYcCVoHThXlOBG8ZEGtFAZRLEKnAeDOaX1ND/J1hLnVT78W3+5tEku13ITuqhgOpRWCu1mGOdaWephVBqIf2c=@vger.kernel.org X-Gm-Message-State: AOJu0YxdcmauiVAggOZ+5QWaxUhuV8HnAVWjbGWdd3Ub8bvbvkru6ZVg BF1hswnpUFqltvP8qhx9QDwmqfOSqk/+pu1vA7dwLg/5g7eUTJ8nuD8u0xNXepVEr/2fGoqU2v1 QtIrDOfCDCqa1YfO9FnhVn1meV7yxL1IunNjLasEvPvmrwDT+XWKoeqFpSYrBBejk91g= X-Gm-Gg: ASbGncuaocXqTDu6fgQ3bLFhyLc6KBCcGHHtpgD0qJWtGATS1pRiyUWGpyWvSbSMx+z us/OhCGmwMd/r72UVjusJVtZBwc+bjy5q161d9AcbZ12f3gFuXJw5oWVxZ0uw3BYoNM0FYDwncB ZGuwHdWQ7jvVUGPj4XlQOstc8O18zkr5W2T7RI8eyaqdrA7TQqS4rS8dDayvRozQgP3htq9BvqN SgVmHNZPDmJ5nZJ2CrVSLjXTFMxlDZ1xva+iZofFZ1V0ixoGkg3Qsz51Y0FaJIYNrke9bW4PCpT +mFZSnFVo+4GjEjewM9TcPhY6osOf/JtD0NQ9TdVsgyh6jRm+D0oMb479ihkMBhSpyKgINrqlIJ KMrGurUkYYnD0I13GtjAlCjeFk+V4LTovf6Hj/ejcyJzPu9rUjaEHBA== X-Received: by 2002:a17:90a:e18d:b0:33f:ebc2:645 with SMTP id 98e67ed59e1d1-3403a283b25mr2060320a91.20.1761716682537; Tue, 28 Oct 2025 22:44:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IENT51gikU479+eesWxj4Q4Vgwi46wl/x8bp1KBbebV97MTL4RZKsrcBDjwLs3iBs7mewZYOA== X-Received: by 2002:a17:90a:e18d:b0:33f:ebc2:645 with SMTP id 98e67ed59e1d1-3403a283b25mr2060270a91.20.1761716681919; Tue, 28 Oct 2025 22:44:41 -0700 (PDT) Received: from hu-hangxian-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-33fed7d1fdesm14280643a91.5.2025.10.28.22.44.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Oct 2025 22:44:41 -0700 (PDT) From: Hangxiang Ma Date: Tue, 28 Oct 2025 22:44:14 -0700 Subject: [PATCH v4 5/6] media: qcom: camss: csid: Add support for CSID 1080 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251028-add-support-for-camss-on-kaanapali-v4-5-7eb484c89585@oss.qualcomm.com> References: <20251028-add-support-for-camss-on-kaanapali-v4-0-7eb484c89585@oss.qualcomm.com> In-Reply-To: <20251028-add-support-for-camss-on-kaanapali-v4-0-7eb484c89585@oss.qualcomm.com> To: Loic Poulain , Robert Foss , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Todor Tomov , Vladimir Zapolskiy , Mauro Carvalho Chehab , Bryan O'Donoghue Cc: linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, aiqun.yu@oss.qualcomm.com, tingwei.zhang@oss.qualcomm.com, trilok.soni@oss.qualcomm.com, yijie.yang@oss.qualcomm.com, Jingyi Wang , Atiya Kailany , Hangxiang Ma X-Mailer: b4 0.14.3 X-Authority-Analysis: v=2.4 cv=dbiNHHXe c=1 sm=1 tr=0 ts=6901a9cb cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=x6icFKpwvdMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=FsTJpaSC_kWcQGXz8SoA:9 a=4Q4zU7iZy6iiv8wZ:21 a=QEXdDO2ut3YA:10 a=rl5im9kqc5Lf4LNbBjHf:22 X-Proofpoint-ORIG-GUID: 76PBRvUvo0fK7z4ZSDJWV6HBkrgKjX8n X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMDI5MDA0MSBTYWx0ZWRfX9xFc6QlRNLmO 5iohXU3LYqiHI5VnszQjWh41yttUbslqQL904J4uaEsYpTXrg2GHFoAL7kW/PkZcu6gQY66zcCa vFf3PMND4epTMm/wlFMe8WcUUTXVhdNmXiWPicye486iRK00VcYq4ta2ypitMtMLyXIDwMoBNeO D+Blk/hNhx/61U62ReQe/SKv8HE/S2Q4PpLeVu7zudABbJJ/E4bmxgxLZx+b1DHAiapZubLrggU V0+3yrtPIZh1eJLV+njFaaNWVT4IHI4l7tJKYuu8xokiMtVBchqyI0R1Z9JLRXuK2507OiUa9+5 im1pIk9C5m48HUIfwUss+1j7KlscX7KqWnyIs9/qU/vdGA98sqHvsn15eQRZC/Jy8w7EE4t3fkK qSCYXCrdrqH7mCodjbEA4j4J5/SiOQ== X-Proofpoint-GUID: 76PBRvUvo0fK7z4ZSDJWV6HBkrgKjX8n X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-10-29_02,2025-10-22_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 lowpriorityscore=0 impostorscore=0 adultscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 clxscore=1015 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2510290041 Add more detailed resource information for CSID devices along with the driver for CSID 1080 that is responsible for CSID register configuration, module reset and IRQ handling for BUF_DONE events. And aggregate a common definition 'CSI2_RX_CFG0_PHY_SEL_BASE_IDX' into csid header file. In this CSID version, RUP and AUP update values are split into two registers along with a SET register. Accordingly, enhance the CSID interface to accommodate both the legacy combined reg_update and the split RUP and AUP updates. Co-developed-by: Atiya Kailany Signed-off-by: Atiya Kailany Signed-off-by: Hangxiang Ma --- drivers/media/platform/qcom/camss/Makefile | 1 + .../media/platform/qcom/camss/camss-csid-1080.c | 382 +++++++++++++++++= ++++ drivers/media/platform/qcom/camss/camss-csid-680.c | 1 - .../media/platform/qcom/camss/camss-csid-gen3.c | 1 - drivers/media/platform/qcom/camss/camss-csid.h | 11 +- drivers/media/platform/qcom/camss/camss.c | 80 +++++ 6 files changed, 473 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/qcom/camss/Makefile b/drivers/media/pla= tform/qcom/camss/Makefile index 23960d02877d..3a7ed4f5a004 100644 --- a/drivers/media/platform/qcom/camss/Makefile +++ b/drivers/media/platform/qcom/camss/Makefile @@ -8,6 +8,7 @@ qcom-camss-objs +=3D \ camss-csid-4-7.o \ camss-csid-340.o \ camss-csid-680.o \ + camss-csid-1080.o \ camss-csid-gen2.o \ camss-csid-gen3.o \ camss-csiphy-2ph-1-0.o \ diff --git a/drivers/media/platform/qcom/camss/camss-csid-1080.c b/drivers/= media/platform/qcom/camss/camss-csid-1080.c new file mode 100644 index 000000000000..85441425c52f --- /dev/null +++ b/drivers/media/platform/qcom/camss/camss-csid-1080.c @@ -0,0 +1,382 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * camss-csid-1080.c + * + * Qualcomm MSM Camera Subsystem - CSID (CSI Decoder) Module + * + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. + */ +#include +#include +#include +#include +#include +#include + +#include "camss.h" +#include "camss-csid.h" +#include "camss-csid-gen3.h" + +/* Reset and Command Registers */ +#define CSID_RST_CFG 0x108 +#define RST_MODE BIT(0) +#define RST_LOCATION BIT(4) + +/* Reset and Command Registers */ +#define CSID_RST_CMD 0x10C +#define SELECT_HW_RST BIT(0) +#define SELECT_IRQ_RST BIT(2) +#define CSID_IRQ_CMD 0x110 +#define IRQ_CMD_CLEAR BIT(0) + +/* Register Update Commands, RUP/AUP */ +#define CSID_RUP_CMD 0x114 +#define CSID_AUP_CMD 0x118 +#define CSID_RUP_AUP_RDI(rdi) (BIT(8) << (rdi)) +#define CSID_RUP_AUP_CMD 0x11C +#define RUP_SET BIT(0) +#define MUP BIT(4) + +/* Top level interrupt registers */ +#define CSID_TOP_IRQ_STATUS 0x180 +#define CSID_TOP_IRQ_MASK 0x184 +#define CSID_TOP_IRQ_CLEAR 0x188 +#define INFO_RST_DONE BIT(0) +#define CSI2_RX_IRQ_STATUS BIT(2) +#define BUF_DONE_IRQ_STATUS BIT(3) + +/* Buffer done interrupt registers */ +#define CSID_BUF_DONE_IRQ_STATUS 0x1A0 +#define BUF_DONE_IRQ_STATUS_RDI_OFFSET 16 +#define CSID_BUF_DONE_IRQ_MASK 0x1A4 +#define CSID_BUF_DONE_IRQ_CLEAR 0x1A8 +#define CSID_BUF_DONE_IRQ_SET 0x1AC + +/* CSI2 RX interrupt registers */ +#define CSID_CSI2_RX_IRQ_STATUS 0x1B0 +#define CSID_CSI2_RX_IRQ_MASK 0x1B4 +#define CSID_CSI2_RX_IRQ_CLEAR 0x1B8 +#define CSID_CSI2_RX_IRQ_SET 0x1BC + +/* CSI2 RX Configuration */ +#define CSID_CSI2_RX_CFG0 0x880 +#define CSI2_RX_CFG0_NUM_ACTIVE_LANES 0 +#define CSI2_RX_CFG0_DL0_INPUT_SEL 4 +#define CSI2_RX_CFG0_PHY_NUM_SEL 20 +#define CSID_CSI2_RX_CFG1 0x884 +#define CSI2_RX_CFG1_ECC_CORRECTION_EN BIT(0) +#define CSI2_RX_CFG1_VC_MODE BIT(2) + +#define MSM_CSID_MAX_SRC_STREAMS_1080 (csid_is_lite(csid) ? 4 : 5) + +/* RDI Configuration */ +#define CSID_RDI_CFG0(rdi) \ + ((csid_is_lite(csid) ? 0x3080 : 0x5480) + 0x200 * (rdi)) +#define RDI_CFG0_RETIME_BS BIT(5) +#define RDI_CFG0_TIMESTAMP_EN BIT(6) +#define RDI_CFG0_TIMESTAMP_STB_SEL BIT(8) +#define RDI_CFG0_DECODE_FORMAT 12 +#define RDI_CFG0_DT 16 +#define RDI_CFG0_VC 22 +#define RDI_CFG0_EN BIT(31) + +/* RDI Control and Configuration */ +#define CSID_RDI_CTRL(rdi) \ + ((csid_is_lite(csid) ? 0x3088 : 0x5488) + 0x200 * (rdi)) +#define RDI_CTRL_START_CMD BIT(0) + +#define CSID_RDI_CFG1(rdi) \ + ((csid_is_lite(csid) ? 0x3094 : 0x5494) + 0x200 * (rdi)) +#define RDI_CFG1_DROP_H_EN BIT(5) +#define RDI_CFG1_DROP_V_EN BIT(6) +#define RDI_CFG1_CROP_H_EN BIT(7) +#define RDI_CFG1_CROP_V_EN BIT(8) +#define RDI_CFG1_PACKING_FORMAT_MIPI BIT(15) + +/* RDI Pixel Store Configuration */ +#define CSID_RDI_PIX_STORE_CFG0(rdi) (0x5498 + 0x200 * (rdi)) +#define RDI_PIX_STORE_CFG0_EN BIT(0) +#define RDI_PIX_STORE_CFG0_MIN_HBI 1 + +/* RDI IRQ Status in wrapper */ +#define CSID_CSI2_RDIN_IRQ_STATUS(rdi) (0x224 + (0x10 * (rdi))) +#define CSID_CSI2_RDIN_IRQ_MASK(rdi) (0x228 + (0x10 * (rdi))) +#define CSID_CSI2_RDIN_IRQ_CLEAR(rdi) (0x22C + (0x10 * (rdi))) +#define INFO_RUP_DONE BIT(23) + +static void __csid_aup_rup_trigger(struct csid_device *csid) +{ + /* trigger SET in combined register */ + writel(RUP_SET, csid->base + CSID_RUP_AUP_CMD); +} + +static void __csid_aup_rup_clear(struct csid_device *csid, int port_id) +{ + /* Hardware clears the registers upon consuming the settings */ + csid->aup_update &=3D ~CSID_RUP_AUP_RDI(port_id); + csid->rup_update &=3D ~CSID_RUP_AUP_RDI(port_id); +} + +static void __csid_aup_update(struct csid_device *csid, int port_id) +{ + csid->aup_update |=3D CSID_RUP_AUP_RDI(port_id); + writel(csid->aup_update, csid->base + CSID_AUP_CMD); + + __csid_aup_rup_trigger(csid); +} + +static void __csid_reg_update(struct csid_device *csid, int port_id) +{ + csid->rup_update |=3D CSID_RUP_AUP_RDI(port_id); + writel(csid->rup_update, csid->base + CSID_RUP_CMD); + + __csid_aup_rup_trigger(csid); +} + +static void __csid_configure_rx(struct csid_device *csid, + struct csid_phy_config *phy) +{ + int val; + + val =3D (phy->lane_cnt - 1) << CSI2_RX_CFG0_NUM_ACTIVE_LANES; + val |=3D phy->lane_assign << CSI2_RX_CFG0_DL0_INPUT_SEL; + val |=3D (phy->csiphy_id + CSI2_RX_CFG0_PHY_SEL_BASE_IDX) + << CSI2_RX_CFG0_PHY_NUM_SEL; + writel(val, csid->base + CSID_CSI2_RX_CFG0); + + val =3D CSI2_RX_CFG1_ECC_CORRECTION_EN; + writel(val, csid->base + CSID_CSI2_RX_CFG1); +} + +static void __csid_configure_rx_vc(struct csid_device *csid, int vc) +{ + int val; + + if (vc > 3) { + val =3D readl(csid->base + CSID_CSI2_RX_CFG1); + val |=3D CSI2_RX_CFG1_VC_MODE; + writel(val, csid->base + CSID_CSI2_RX_CFG1); + } +} + +static void __csid_ctrl_rdi(struct csid_device *csid, int enable, u8 rdi) +{ + int val =3D 0; + + if (enable) + val =3D RDI_CTRL_START_CMD; + + writel(val, csid->base + CSID_RDI_CTRL(rdi)); +} + +static void __csid_configure_rdi_pix_store(struct csid_device *csid, u8 rd= i) +{ + u32 val; + + /* Configure pixel store to allow absorption of hblanking or idle time. + * This helps with horizontal crop and prevents line buffer conflicts. + * Reset state is 0x8 which has MIN_HBI=3D4, we keep the default MIN_HBI + * and just enable the pixel store functionality. + */ + val =3D (4 << RDI_PIX_STORE_CFG0_MIN_HBI) | RDI_PIX_STORE_CFG0_EN; + writel(val, csid->base + CSID_RDI_PIX_STORE_CFG0(rdi)); +} + +static void __csid_configure_rdi_stream(struct csid_device *csid, u8 enabl= e, u8 vc) +{ + u32 val; + u8 lane_cnt =3D csid->phy.lane_cnt; + + /* Source pads matching RDI channels on hardware. + * E.g. Pad 1 -> RDI0, Pad 2 -> RDI1, etc. + */ + struct v4l2_mbus_framefmt *input_format =3D &csid->fmt[MSM_CSID_PAD_FIRST= _SRC + vc]; + const struct csid_format_info *format =3D csid_get_fmt_entry(csid->res->f= ormats->formats, + csid->res->formats->nformats, + input_format->code); + + if (!lane_cnt) + lane_cnt =3D 4; + + val =3D RDI_CFG0_TIMESTAMP_EN; + val |=3D RDI_CFG0_TIMESTAMP_STB_SEL; + val |=3D RDI_CFG0_RETIME_BS; + + /* note: for non-RDI path, this should be format->decode_format */ + val |=3D DECODE_FORMAT_PAYLOAD_ONLY << RDI_CFG0_DECODE_FORMAT; + val |=3D vc << RDI_CFG0_VC; + val |=3D format->data_type << RDI_CFG0_DT; + writel(val, csid->base + CSID_RDI_CFG0(vc)); + + val =3D RDI_CFG1_PACKING_FORMAT_MIPI; + writel(val, csid->base + CSID_RDI_CFG1(vc)); + + /* Configure pixel store using dedicated register in 1080 */ + if (!csid_is_lite(csid)) + __csid_configure_rdi_pix_store(csid, vc); + + val =3D 0; + writel(val, csid->base + CSID_RDI_CTRL(vc)); + + val =3D readl(csid->base + CSID_RDI_CFG0(vc)); + + if (enable) + val |=3D RDI_CFG0_EN; + + writel(val, csid->base + CSID_RDI_CFG0(vc)); +} + +static void csid_configure_stream_1080(struct csid_device *csid, u8 enable) +{ + u8 i; + u8 vc; + + __csid_configure_rx(csid, &csid->phy); + + for (vc =3D 0; vc < MSM_CSID_MAX_SRC_STREAMS_1080; vc++) { + if (csid->phy.en_vc & BIT(vc)) { + __csid_configure_rdi_stream(csid, enable, vc); + __csid_configure_rx_vc(csid, vc); + + for (i =3D 0; i < CAMSS_INIT_BUF_COUNT; i++) + __csid_aup_update(csid, vc); + + __csid_reg_update(csid, vc); + + __csid_ctrl_rdi(csid, enable, vc); + } + } +} + +static int csid_configure_testgen_pattern_1080(struct csid_device *csid, + s32 val) +{ + return 0; +} + +static void csid_subdev_reg_update_1080(struct csid_device *csid, int port= _id, + bool clear) +{ + if (clear) + __csid_aup_rup_clear(csid, port_id); + else + __csid_aup_update(csid, port_id); +} + +/** + * csid_isr - CSID module interrupt service routine + * @irq: Interrupt line + * @dev: CSID device + * + * Return IRQ_HANDLED on success + */ +static irqreturn_t csid_isr_1080(int irq, void *dev) +{ + struct csid_device *csid =3D dev; + u32 val, buf_done_val; + u8 reset_done; + int i; + + val =3D readl(csid->base + CSID_TOP_IRQ_STATUS); + writel(val, csid->base + CSID_TOP_IRQ_CLEAR); + + reset_done =3D val & INFO_RST_DONE; + + buf_done_val =3D readl(csid->base + CSID_BUF_DONE_IRQ_STATUS); + writel(buf_done_val, csid->base + CSID_BUF_DONE_IRQ_CLEAR); + + for (i =3D 0; i < MSM_CSID_MAX_SRC_STREAMS_1080; i++) { + if (csid->phy.en_vc & BIT(i)) { + val =3D readl(csid->base + CSID_CSI2_RDIN_IRQ_STATUS(i)); + writel(val, csid->base + CSID_CSI2_RDIN_IRQ_CLEAR(i)); + + if (val & INFO_RUP_DONE) + csid_subdev_reg_update_1080(csid, i, true); + + if (buf_done_val & BIT(BUF_DONE_IRQ_STATUS_RDI_OFFSET + i)) { + /* + * buf done and RUP IRQ have been moved to CSID from VFE. + * Once CSID received buf done, need notify VFE of this + * event and trigger VFE to handle buf done process. + */ + camss_buf_done(csid->camss, csid->id, i); + } + } + } + + val =3D IRQ_CMD_CLEAR; + writel(val, csid->base + CSID_IRQ_CMD); + + if (reset_done) + complete(&csid->reset_complete); + + return IRQ_HANDLED; +} + +/** + * csid_reset - Trigger reset on CSID module and wait to complete + * @csid: CSID device + * + * Return 0 on success or a negative error code otherwise + */ +static int csid_reset_1080(struct csid_device *csid) +{ + unsigned long time; + u32 val; + int i; + + reinit_completion(&csid->reset_complete); + + val =3D INFO_RST_DONE | BUF_DONE_IRQ_STATUS; + writel(val, csid->base + CSID_TOP_IRQ_CLEAR); + writel(val, csid->base + CSID_TOP_IRQ_MASK); + + val =3D 0; + for (i =3D 0; i < MSM_CSID_MAX_SRC_STREAMS_1080; i++) { + if (csid->phy.en_vc & BIT(i)) { + /* Only need to clear buf done IRQ status here, + * RUP done IRQ status will be cleared once isr + * strobe generated by CSID_RST_CMD + */ + val |=3D BIT(BUF_DONE_IRQ_STATUS_RDI_OFFSET + i); + } + } + writel(val, csid->base + CSID_BUF_DONE_IRQ_CLEAR); + writel(val, csid->base + CSID_BUF_DONE_IRQ_MASK); + + /* Clear all IRQ status with CLEAR bits set */ + val =3D IRQ_CMD_CLEAR; + writel(val, csid->base + CSID_IRQ_CMD); + + val =3D RST_LOCATION | RST_MODE; + writel(val, csid->base + CSID_RST_CFG); + + val =3D SELECT_HW_RST | SELECT_IRQ_RST; + writel(val, csid->base + CSID_RST_CMD); + + time =3D wait_for_completion_timeout(&csid->reset_complete, + msecs_to_jiffies(CSID_RESET_TIMEOUT_MS)); + + if (!time) { + dev_err(csid->camss->dev, "CSID reset timeout\n"); + return -EIO; + } + + return 0; +} + +static void csid_subdev_init_1080(struct csid_device *csid) +{ + csid->testgen.nmodes =3D CSID_PAYLOAD_MODE_DISABLED; +} + +const struct csid_hw_ops csid_ops_1080 =3D { + .configure_stream =3D csid_configure_stream_1080, + .configure_testgen_pattern =3D csid_configure_testgen_pattern_1080, + .hw_version =3D csid_hw_version, + .isr =3D csid_isr_1080, + .reset =3D csid_reset_1080, + .src_pad_code =3D csid_src_pad_code, + .subdev_init =3D csid_subdev_init_1080, + .reg_update =3D csid_subdev_reg_update_1080, +}; diff --git a/drivers/media/platform/qcom/camss/camss-csid-680.c b/drivers/m= edia/platform/qcom/camss/camss-csid-680.c index 3ad3a174bcfb..86134a23cd4e 100644 --- a/drivers/media/platform/qcom/camss/camss-csid-680.c +++ b/drivers/media/platform/qcom/camss/camss-csid-680.c @@ -101,7 +101,6 @@ #define CSI2_RX_CFG0_DL2_INPUT_SEL 12 #define CSI2_RX_CFG0_DL3_INPUT_SEL 16 #define CSI2_RX_CFG0_PHY_NUM_SEL 20 -#define CSI2_RX_CFG0_PHY_SEL_BASE_IDX 1 #define CSI2_RX_CFG0_PHY_TYPE_SEL 24 =20 #define CSID_CSI2_RX_CFG1 0x204 diff --git a/drivers/media/platform/qcom/camss/camss-csid-gen3.c b/drivers/= media/platform/qcom/camss/camss-csid-gen3.c index 664245cf6eb0..f09b5575572a 100644 --- a/drivers/media/platform/qcom/camss/camss-csid-gen3.c +++ b/drivers/media/platform/qcom/camss/camss-csid-gen3.c @@ -103,7 +103,6 @@ #define CSID_RDI_IRQ_SUBSAMPLE_PERIOD(rdi) (csid_is_lite(csid) && IS_CSID_= 690(csid) ?\ (0x34C + 0x100 * (rdi)) :\ (0x54C + 0x100 * (rdi))) -#define CSI2_RX_CFG0_PHY_SEL_BASE_IDX 1 =20 static void __csid_configure_rx(struct csid_device *csid, struct csid_phy_config *phy, int vc) diff --git a/drivers/media/platform/qcom/camss/camss-csid.h b/drivers/media= /platform/qcom/camss/camss-csid.h index aedc96ed84b2..6c214b487003 100644 --- a/drivers/media/platform/qcom/camss/camss-csid.h +++ b/drivers/media/platform/qcom/camss/camss-csid.h @@ -27,6 +27,8 @@ /* CSID hardware can demultiplex up to 4 outputs */ #define MSM_CSID_MAX_SRC_STREAMS 4 =20 +/* CSIPHY to hardware PHY selector mapping */ +#define CSI2_RX_CFG0_PHY_SEL_BASE_IDX 1 #define CSID_RESET_TIMEOUT_MS 500 =20 enum csid_testgen_mode { @@ -154,7 +156,13 @@ struct csid_device { void __iomem *base; u32 irq; char irq_name[30]; - u32 reg_update; + union { + u32 reg_update; + struct { + u32 rup_update; + u32 aup_update; + }; + }; struct camss_clock *clock; int nclocks; struct regulator_bulk_data *supplies; @@ -215,6 +223,7 @@ 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_1080; extern const struct csid_hw_ops csid_ops_gen2; extern const struct csid_hw_ops csid_ops_gen3; =20 diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/plat= form/qcom/camss/camss.c index b12e79e40e97..30e58aeea310 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -139,6 +139,84 @@ static const struct camss_subdev_resources csiphy_res_= kaanapali[] =3D { }, }; =20 +static const struct camss_subdev_resources csid_res_kaanapali[] =3D { + /* CSID0 */ + { + .regulators =3D {}, + .clock =3D { "csid", "csid_csiphy_rx" }, + .clock_rate =3D { { 400000000, 480000000 }, + { 400000000, 480000000 } }, + .reg =3D { "csid0" }, + .interrupt =3D { "csid0" }, + .csid =3D { + .is_lite =3D false, + .parent_dev_ops =3D &vfe_parent_dev_ops, + .hw_ops =3D &csid_ops_1080, + .formats =3D &csid_formats_gen2 + } + }, + /* CSID1 */ + { + .regulators =3D {}, + .clock =3D { "csid", "csid_csiphy_rx" }, + .clock_rate =3D { { 400000000, 480000000 }, + { 400000000, 480000000 } }, + .reg =3D { "csid1" }, + .interrupt =3D { "csid1" }, + .csid =3D { + .is_lite =3D false, + .parent_dev_ops =3D &vfe_parent_dev_ops, + .hw_ops =3D &csid_ops_1080, + .formats =3D &csid_formats_gen2 + } + }, + /* CSID2 */ + { + .regulators =3D {}, + .clock =3D { "csid", "csid_csiphy_rx" }, + .clock_rate =3D { { 400000000, 480000000 }, + { 400000000, 480000000 } }, + .reg =3D { "csid2" }, + .interrupt =3D { "csid2" }, + .csid =3D { + .is_lite =3D false, + .parent_dev_ops =3D &vfe_parent_dev_ops, + .hw_ops =3D &csid_ops_1080, + .formats =3D &csid_formats_gen2 + } + }, + /* CSID_LITE0 */ + { + .regulators =3D {}, + .clock =3D { "vfe_lite_csid", "vfe_lite_cphy_rx" }, + .clock_rate =3D { { 400000000, 480000000 }, + { 400000000, 480000000 } }, + .reg =3D { "csid_lite0" }, + .interrupt =3D { "csid_lite0" }, + .csid =3D { + .is_lite =3D true, + .parent_dev_ops =3D &vfe_parent_dev_ops, + .hw_ops =3D &csid_ops_1080, + .formats =3D &csid_formats_gen2 + } + }, + /* CSID_LITE1 */ + { + .regulators =3D {}, + .clock =3D { "vfe_lite_csid", "vfe_lite_cphy_rx" }, + .clock_rate =3D { { 400000000, 480000000 }, + { 400000000, 480000000 } }, + .reg =3D { "csid_lite1" }, + .interrupt =3D { "csid_lite1" }, + .csid =3D { + .is_lite =3D true, + .parent_dev_ops =3D &vfe_parent_dev_ops, + .hw_ops =3D &csid_ops_1080, + .formats =3D &csid_formats_gen2 + } + } +}; + static const struct resources_icc icc_res_kaanapali[] =3D { { .name =3D "ahb", @@ -4414,9 +4492,11 @@ static const struct camss_resources kaanapali_resour= ces =3D { .version =3D CAMSS_KAANAPALI, .pd_name =3D "top", .csiphy_res =3D csiphy_res_kaanapali, + .csid_res =3D csid_res_kaanapali, .icc_res =3D icc_res_kaanapali, .icc_path_num =3D ARRAY_SIZE(icc_res_kaanapali), .csiphy_num =3D ARRAY_SIZE(csiphy_res_kaanapali), + .csid_num =3D ARRAY_SIZE(csid_res_kaanapali), }; =20 static const struct camss_resources msm8916_resources =3D { --=20 2.34.1 From nobody Mon Feb 9 22:39:59 2026 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 BF2F8306B0D for ; Wed, 29 Oct 2025 05:44:46 +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=1761716689; cv=none; b=IRL2XtLAMCx8gPtPrxohicdjn6C/Vl7iJvBfxOb0RY5E83L8nGmABr/Lm2DSmS6gB5fPUFI8b2ExG3p1id1P4yNz1xwZ+zJIxaoiHC5IOhfrVEGP+XO1OFqRudDlfrreasvWOgQct8i9qs0/3B7QPCW5QCgBVGaXWIUWZuSrTwc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761716689; c=relaxed/simple; bh=1nU1lrdRW1yuVIaocGxK/RlI0gI7Vw9FhM4QiYYCVoo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=LoZfsANrmotgD7dZ8kkuKdTzwsby6q7q2b+czAcFZRVhjKhiyiGXDgg2OAY2L/9LSG3WMq1FzOZ8Irghle9AoTJv/5B0nmoQc0JXF3lcKPGbmqzQmiemCEtU2Tm+ZaZLwFk2M06NVd4nTcGqoOjemBuQc+KJjeu7iJZBNUPWqps= 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=g8ujAxdM; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=VGlB4W5n; 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="g8ujAxdM"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="VGlB4W5n" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 59T4uttm3692111 for ; Wed, 29 Oct 2025 05:44:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= XS3BV/8ZtwssKrgQ7eOnqbDlws27RABIFqzboUi8Kbk=; b=g8ujAxdMr8LhWAMg Hb1dOMPrhRqF+CxSgnDXwhIr1f3quL3ObBgEJmZXbC05qCe32HU736utwwCQ01E5 sOB+mlK2x4N4FUDthKUtcFzEpYGkGVAAjz3/0HNBJj8YwO8jkcTZE5THWrsZMTJ9 a6BqQuh8Wmv5emCiaMKU8hsSpQlZt4vj2P8IdOTornNhKmp3Lld8Znfrr36wWXBq HsLFykezuw8V0EsFr0t3Qmhl0gJIiAJtOuW8a6uRAP6q5nnCXYS32dUTyuTSRRzy H0tJBYFVb+tn3s6A4ObZ1arcJYoCIVfRI6yL8wLR2P9M+HPseUPfQcCRWc7yEiiU S3TkSQ== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4a34a2har8-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 29 Oct 2025 05:44:45 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-32ee157b9c9so5265332a91.2 for ; Tue, 28 Oct 2025 22:44:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1761716685; x=1762321485; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=XS3BV/8ZtwssKrgQ7eOnqbDlws27RABIFqzboUi8Kbk=; b=VGlB4W5nkw4CYX0tRepgxHlD1i6kZDRIaP9hbF6D8OqEp0rJ4XEQJOUncshJN7b23R +2NK3yxjrC4RwSouV683eOwF22aLhnfTa/UdeduZ318ubawrMkrXxXLLeZSPyYGRbS/D anRQZSHHJ7kGnwyJ0CBJCl6SBg+6DMvFQrx/uSVEILHmz82LcNZNfZAn6ZOrW43hqhZw mKsMzruoj9Hhz2v0cO0F3xb69VbHOTFIqKtiZTlGvYrnBJd4pAR/EaGTAJ0IipB5/zZB rKf/7JQuuADgqaQfXI0V6Gxiev2/KuTelrF/mwaw9TMy5WYosQBcceqQfxjt1Bnwd8ab y4oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761716685; x=1762321485; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XS3BV/8ZtwssKrgQ7eOnqbDlws27RABIFqzboUi8Kbk=; b=CFESOso0vtf2DPZ0TQ1p9vyXi1ktD8vg83bokz/O3fE/W4+znbwXIWw1x6g6iZ1Gop 3D+jKgzvidmktDnDF3YxyUkrjMcU/fkst4bqS1oTyCn4ZuWYANzBuxOyHY5b4JwSDq4B drfPIYBhMHvZ7QUIEBkvj/5F+uP12iEUWGNjhV2sHAjllowSRxvPwkIDDJGeWNiB9xV1 pBuFkV/4lqZMITCNpLoMX3PWQu2vqLrBglI7WaDbw1tOvWNDskJWEQhQTGaba6WXhREO 9qdGZomxaEVhb9MMaH+4lT812o4WoicaJ5Kgiq4AatTFDA6RBwRiDPOb6vxohYq5jTOv jm8A== X-Forwarded-Encrypted: i=1; AJvYcCWP7EGYKehmFoDxWqyvwtOi1bhcQW3WaPV2tCbhA4WRJGugCudfLq1Z8Dx26IgqWN7tWMeMG/uJj+xvdvc=@vger.kernel.org X-Gm-Message-State: AOJu0YyiP+t66OgMpmCoTpcmkcpiKeJmVsV++vm0xi2WQwwl9BKE1ZNs O0GMIALEvDROOuLafLUW+r2EqKAoaJF9fUCuwHsurKpfkEyw2U8KZzA1hqAvPCIDJeTehaY+GRO kX1zkp85DHBpAm7eOWX/L4oCUq6feJdL3zUaYm67z78gxKTGgqkqm/4ELTHkef8nOXqM= X-Gm-Gg: ASbGnctYFCc34FVFfRv+c9MkksVA3gTyA6LG5XFYguXbS446Tm67CfxfafXB7rZlLHM +kGUVPYak+wW9iRjVCVdf05RHP8/1TAtp4GABS8jPbHfFoiQuGR1mW/0JwLOe+2Aa/HHW0F97Dc R9GFiJSGTMNiumnKBwOrtc/zZ0OCKyNe2Y43B2D2xq0SSrc/p/n9cTbS1tkom+y2ndT5CU9+Qcm ABicdx9kE7t9LB+AEzcTvzSLdx6JviAKSlJfgGVTygzMY6HLtEyvFCoGSBU/y/pfAroR4sAh787 ZEGSkxmYWh3GAR/XvHDNtPCXrH0eqG2NCIxRDeNEGXNyuUkk7i0u+qlmCNRxrMgMfHzmFnvrygM n85MmZKmk0Jhf1Wi9EthUztImp5qVQXC5VlaLwxe12wblSsr8VVzveA== X-Received: by 2002:a17:90b:3c44:b0:330:7ff5:2c58 with SMTP id 98e67ed59e1d1-3403a15e7efmr2032561a91.7.1761716684389; Tue, 28 Oct 2025 22:44:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEwrQTb+oPrIvxf8ME/4QIHIMkld3a3BgFYLq6y4lfwbFLCm56797/nkXjxMkPPFudHS98poQ== X-Received: by 2002:a17:90b:3c44:b0:330:7ff5:2c58 with SMTP id 98e67ed59e1d1-3403a15e7efmr2032515a91.7.1761716683708; Tue, 28 Oct 2025 22:44:43 -0700 (PDT) Received: from hu-hangxian-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-33fed7d1fdesm14280643a91.5.2025.10.28.22.44.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Oct 2025 22:44:43 -0700 (PDT) From: Hangxiang Ma Date: Tue, 28 Oct 2025 22:44:15 -0700 Subject: [PATCH v4 6/6] media: qcom: camss: vfe: Add support for VFE 1080 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251028-add-support-for-camss-on-kaanapali-v4-6-7eb484c89585@oss.qualcomm.com> References: <20251028-add-support-for-camss-on-kaanapali-v4-0-7eb484c89585@oss.qualcomm.com> In-Reply-To: <20251028-add-support-for-camss-on-kaanapali-v4-0-7eb484c89585@oss.qualcomm.com> To: Loic Poulain , Robert Foss , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Todor Tomov , Vladimir Zapolskiy , Mauro Carvalho Chehab , Bryan O'Donoghue Cc: linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, aiqun.yu@oss.qualcomm.com, tingwei.zhang@oss.qualcomm.com, trilok.soni@oss.qualcomm.com, yijie.yang@oss.qualcomm.com, Jingyi Wang , Atiya Kailany , Hangxiang Ma X-Mailer: b4 0.14.3 X-Proofpoint-GUID: hBRh0u4QIIMkP11CRDqkPP7LQkfhd5lo X-Proofpoint-ORIG-GUID: hBRh0u4QIIMkP11CRDqkPP7LQkfhd5lo X-Authority-Analysis: v=2.4 cv=PcvyRyhd c=1 sm=1 tr=0 ts=6901a9cd cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=x6icFKpwvdMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=GN7SP73KILfmbvmHGyoA:9 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMDI5MDA0MSBTYWx0ZWRfX1NbMowQrIxPQ R6QF/gKRta+cv4mpi6yqCRO1wy7wACKtnGfuQ4AeW1F7HX1IRd6QaFEY2ahEEwvZ193AUi19KH5 YEhDrEAgShjaVpBLKh/ydggllVftZ5CSvTeHiayEcclRiDtKjw4RhTwtcDw61OzkhdN10ZvoglS cpMX6/UN68VibhlhVcH0ByuKlBcYP4ve8WWMwGWhoGvureIwTinPWsPVNFAQDFnJc7tFYBbMiUf ArWgcj8uza4xbYAv88/njlmXx2BjzHoKojywqBeOFWCkyqJuyb1eRL7hHMIIFShhEEdpkYo0ikp m5cMgegOkxfpdebNvd/y6NcSUvI69w1162TbNLz21DDlwHGOyFBMRt6DxFw38n3SGjsG6npqiXg dPp1senFZRlYxTIAOpD0kkMOE1m2Aw== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-10-29_02,2025-10-22_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 clxscore=1015 spamscore=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 malwarescore=0 suspectscore=0 impostorscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2510290041 Add Video Front End (VFE) version 1080 as found on the Kaanapali SoC. The FULL front end modules in Kaanapali camera subsystem are called TFEs (Thin Front End), however, retaining the name VFE at places to maintain consistency and avoid unnecessary code changes. This change limits the VFE output lines to 3 for now as constrained by the CAMSS driver framework. Kaanapali architecture requires for the REG_UPDATE and AUP_UPDATE to be issued after all of the CSID configuration has been done. Additionally, the number of AUP_UPDATEs should match the number of buffers enqueued to the write master while it's being enabled. Although the real time data from TFE goes through the RT_CAMNOC, we are required to enable both the camnoc_rt_axi and camnoc_nrt_axi clocks for the PDX_NOC, that follows both the RT and NRT NOCs in this architecture, to ensure that both of the latter are idle after reset. Co-developed-by: Atiya Kailany Signed-off-by: Atiya Kailany Signed-off-by: Hangxiang Ma --- drivers/media/platform/qcom/camss/Makefile | 1 + drivers/media/platform/qcom/camss/camss-vfe-1080.c | 197 +++++++++++++++++= ++++ drivers/media/platform/qcom/camss/camss-vfe.c | 10 +- drivers/media/platform/qcom/camss/camss-vfe.h | 2 + drivers/media/platform/qcom/camss/camss.c | 143 +++++++++++++++ 5 files changed, 351 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/qcom/camss/Makefile b/drivers/media/pla= tform/qcom/camss/Makefile index 3a7ed4f5a004..dc41b0d6dc21 100644 --- a/drivers/media/platform/qcom/camss/Makefile +++ b/drivers/media/platform/qcom/camss/Makefile @@ -22,6 +22,7 @@ qcom-camss-objs +=3D \ camss-vfe-340.o \ camss-vfe-480.o \ camss-vfe-680.o \ + camss-vfe-1080.o \ camss-vfe-gen3.o \ camss-vfe-gen1.o \ camss-vfe.o \ diff --git a/drivers/media/platform/qcom/camss/camss-vfe-1080.c b/drivers/m= edia/platform/qcom/camss/camss-vfe-1080.c new file mode 100644 index 000000000000..03938759c57b --- /dev/null +++ b/drivers/media/platform/qcom/camss/camss-vfe-1080.c @@ -0,0 +1,197 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * camss-vfe-1080.c + * + * Qualcomm MSM Camera Subsystem - VFE (Video Front End) Module v1080 + * + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. + */ +#include +#include +#include + +#include "camss.h" +#include "camss-vfe.h" + +/* VFE-1080 Bus Register Base Addresses */ +#define BUS_REG_BASE (vfe_is_lite(vfe) ? 0x800 : 0x1000) + +#define VFE_BUS_WM_CGC_OVERRIDE (BUS_REG_BASE + 0x08) +#define WM_CGC_OVERRIDE_ALL (0x7FFFFFF) + +#define VFE_BUS_WM_TEST_BUS_CTRL (BUS_REG_BASE + 0x128) + +#define VFE_BUS_WM_CFG(n) (BUS_REG_BASE + 0x500 + (n) * 0x100) +#define WM_CFG_EN BIT(0) +#define WM_VIR_FRM_EN BIT(1) +#define WM_CFG_MODE BIT(16) +#define VFE_BUS_WM_IMAGE_ADDR(n) (BUS_REG_BASE + 0x504 + (n) * 0x100) +#define VFE_BUS_WM_FRAME_INCR(n) (BUS_REG_BASE + 0x508 + (n) * 0x100) +#define VFE_BUS_WM_IMAGE_CFG_0(n) (BUS_REG_BASE + 0x50c + (n) * 0x100) +#define WM_IMAGE_CFG_0_DEFAULT_WIDTH (0xFFFF) +#define VFE_BUS_WM_IMAGE_CFG_2(n) (BUS_REG_BASE + 0x514 + (n) * 0x100) +#define WM_IMAGE_CFG_2_DEFAULT_STRIDE (0xFFFF) +#define VFE_BUS_WM_PACKER_CFG(n) (BUS_REG_BASE + 0x518 + (n) * 0x100) + +#define VFE_BUS_WM_IRQ_SUBSAMPLE_PERIOD(n) (BUS_REG_BASE + 0x530 + (n) * 0= x100) +#define VFE_BUS_WM_IRQ_SUBSAMPLE_PATTERN(n) (BUS_REG_BASE + 0x534 + (n) * = 0x100) + +/* VFE lite has no such registers */ +#define VFE_BUS_WM_FRAMEDROP_PERIOD(n) (BUS_REG_BASE + 0x538 + (n) * 0x10= 0) +#define VFE_BUS_WM_FRAMEDROP_PATTERN(n) (BUS_REG_BASE + 0x53c + (n) * 0x1= 00) + +#define VFE_BUS_WM_MMU_PREFETCH_CFG(n) (BUS_REG_BASE + 0x560 + (n) * 0x10= 0) +#define VFE_BUS_WM_MMU_PREFETCH_MAX_OFFSET(n) (BUS_REG_BASE + 0x564 + (n) = * 0x100) + +/* + * IFE write master client IDs + * + * VIDEO_FULL 0 + * VIDEO_DC4_Y 1 + * VIDEO_DC4_C 2 + * VIDEO_DC16_Y 3 + * VIDEO_DC16_C 4 + * DISPLAY_DS2_Y 5 + * DISPLAY_DS2_C 6 + * FD_Y 7 + * FD_C 8 + * PIXEL_RAW 9 + * STATS_AEC_BG 10 + * STATS_AEC_BHIST 11 + * STATS_TINTLESS_BG 12 + * STATS_AWB_BG 13 + * STATS_AWB_BFW 14 + * STATS_AF_BHIST 15 + * STATS_ALSC_BG 16 + * STATS_FLICKER_BAYERRS 17 + * STATS_TMC_BHIST 18 + * PDAF_0 19 + * PDAF_1 20 + * PDAF_2 21 + * PDAF_3 22 + * RDI0 23 + * RDI1 24 + * RDI2 25 + * RDI3 26 + * RDI4 27 + * + * IFE Lite write master client IDs + * + * RDI0 0 + * RDI1 1 + * RDI2 2 + * RDI3 3 + * GAMMA 4 + * STATES_BE 5 + */ +#define RDI_WM(n) ((vfe_is_lite(vfe) ? 0x0 : 0x17) + (n)) + +static void vfe_wm_start_1080(struct vfe_device *vfe, u8 wm, struct vfe_li= ne *line) +{ + struct v4l2_pix_format_mplane *pix =3D + &line->video_out.active_fmt.fmt.pix_mp; + + wm =3D RDI_WM(wm); + + /* no clock gating at bus input */ + writel(WM_CGC_OVERRIDE_ALL, vfe->base + VFE_BUS_WM_CGC_OVERRIDE); + + writel(0x0, vfe->base + VFE_BUS_WM_TEST_BUS_CTRL); + + writel(ALIGN(pix->plane_fmt[0].bytesperline, 16) * pix->height >> 8, + vfe->base + VFE_BUS_WM_FRAME_INCR(wm)); + writel((WM_IMAGE_CFG_0_DEFAULT_WIDTH & 0xFFFF), + vfe->base + VFE_BUS_WM_IMAGE_CFG_0(wm)); + writel(WM_IMAGE_CFG_2_DEFAULT_STRIDE, + vfe->base + VFE_BUS_WM_IMAGE_CFG_2(wm)); + writel(0, vfe->base + VFE_BUS_WM_PACKER_CFG(wm)); + + /* no dropped frames, one irq per frame */ + if (!vfe_is_lite(vfe)) { + writel(0, vfe->base + VFE_BUS_WM_FRAMEDROP_PERIOD(wm)); + writel(1, vfe->base + VFE_BUS_WM_FRAMEDROP_PATTERN(wm)); + } + + writel(0, vfe->base + VFE_BUS_WM_IRQ_SUBSAMPLE_PERIOD(wm)); + writel(1, vfe->base + VFE_BUS_WM_IRQ_SUBSAMPLE_PATTERN(wm)); + + writel(1, vfe->base + VFE_BUS_WM_MMU_PREFETCH_CFG(wm)); + writel(0xFFFFFFFF, vfe->base + VFE_BUS_WM_MMU_PREFETCH_MAX_OFFSET(wm)); + + writel(WM_CFG_EN | WM_CFG_MODE, vfe->base + VFE_BUS_WM_CFG(wm)); +} + +static void vfe_wm_stop_1080(struct vfe_device *vfe, u8 wm) +{ + wm =3D RDI_WM(wm); + writel(0, vfe->base + VFE_BUS_WM_CFG(wm)); +} + +static void vfe_wm_update_1080(struct vfe_device *vfe, u8 wm, u32 addr, + struct vfe_line *line) +{ + wm =3D RDI_WM(wm); + writel((addr >> 8) & 0xFFFFFFFF, vfe->base + VFE_BUS_WM_IMAGE_ADDR(wm)); + + dev_dbg(vfe->camss->dev, "wm:%d, image buf addr:0x%x\n", wm, addr); +} + +static void vfe_reg_update_1080(struct vfe_device *vfe, enum vfe_line_id l= ine_id) +{ + int port_id =3D line_id; + + camss_reg_update(vfe->camss, vfe->id, port_id, false); +} + +static inline void vfe_reg_update_clear_1080(struct vfe_device *vfe, + enum vfe_line_id line_id) +{ + int port_id =3D line_id; + + camss_reg_update(vfe->camss, vfe->id, port_id, true); +} + +static const struct camss_video_ops vfe_video_ops_1080 =3D { + .queue_buffer =3D vfe_queue_buffer_v2, + .flush_buffers =3D vfe_flush_buffers, +}; + +static void vfe_subdev_init_1080(struct device *dev, struct vfe_device *vf= e) +{ + vfe->video_ops =3D vfe_video_ops_1080; +} + +static void vfe_global_reset_1080(struct vfe_device *vfe) +{ + vfe_isr_reset_ack(vfe); +} + +static irqreturn_t vfe_isr_1080(int irq, void *dev) +{ + /* nop */ + return IRQ_HANDLED; +} + +static int vfe_halt_1080(struct vfe_device *vfe) +{ + /* rely on vfe_disable_output() to stop the VFE */ + return 0; +} + +const struct vfe_hw_ops vfe_ops_1080 =3D { + .global_reset =3D vfe_global_reset_1080, + .hw_version =3D vfe_hw_version, + .isr =3D vfe_isr_1080, + .pm_domain_off =3D vfe_pm_domain_off, + .pm_domain_on =3D vfe_pm_domain_on, + .reg_update =3D vfe_reg_update_1080, + .reg_update_clear =3D vfe_reg_update_clear_1080, + .subdev_init =3D vfe_subdev_init_1080, + .vfe_disable =3D vfe_disable, + .vfe_enable =3D vfe_enable_v2, + .vfe_halt =3D vfe_halt_1080, + .vfe_wm_start =3D vfe_wm_start_1080, + .vfe_wm_stop =3D vfe_wm_stop_1080, + .vfe_buf_done =3D vfe_buf_done, + .vfe_wm_update =3D vfe_wm_update_1080, +}; diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/= platform/qcom/camss/camss-vfe.c index 2753c2bb6c04..0084a1a1e71d 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe.c +++ b/drivers/media/platform/qcom/camss/camss-vfe.c @@ -349,6 +349,7 @@ static u32 vfe_src_pad_code(struct vfe_line *line, u32 = sink_code, case CAMSS_845: case CAMSS_8550: case CAMSS_8775P: + case CAMSS_KAANAPALI: case CAMSS_X1E80100: switch (sink_code) { case MEDIA_BUS_FMT_YUYV8_1X16: @@ -521,7 +522,8 @@ int vfe_enable_output_v2(struct vfe_line *line) =20 spin_lock_irqsave(&vfe->output_lock, flags); =20 - ops->reg_update_clear(vfe, line->id); + if (ops->reg_update_clear) + ops->reg_update_clear(vfe, line->id); =20 if (output->state > VFE_OUTPUT_RESERVED) { dev_err(vfe->camss->dev, @@ -548,7 +550,10 @@ int vfe_enable_output_v2(struct vfe_line *line) output->gen2.active_num++; ops->vfe_wm_update(vfe, output->wm_idx[0], output->buf[i]->addr[0], line); - ops->reg_update(vfe, line->id); + + /* Deferring the reg update until after CSID config */ + if (!vfe->camss->res->vfe_res[vfe->id].vfe.is_deferred) + ops->reg_update(vfe, line->id); } =20 spin_unlock_irqrestore(&vfe->output_lock, flags); @@ -1998,6 +2003,7 @@ static int vfe_bpl_align(struct vfe_device *vfe) case CAMSS_845: case CAMSS_8550: case CAMSS_8775P: + case CAMSS_KAANAPALI: case CAMSS_X1E80100: ret =3D 16; break; diff --git a/drivers/media/platform/qcom/camss/camss-vfe.h b/drivers/media/= platform/qcom/camss/camss-vfe.h index 0300efdb1c46..47851362edd4 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe.h +++ b/drivers/media/platform/qcom/camss/camss-vfe.h @@ -133,6 +133,7 @@ struct vfe_isr_ops { =20 struct vfe_subdev_resources { bool is_lite; + bool is_deferred; u8 line_num; bool has_pd; char *pd_name; @@ -245,6 +246,7 @@ 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_1080; extern const struct vfe_hw_ops vfe_ops_gen3; =20 int vfe_get(struct vfe_device *vfe); diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/plat= form/qcom/camss/camss.c index 30e58aeea310..767aa26f4391 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -217,6 +217,147 @@ static const struct camss_subdev_resources csid_res_k= aanapali[] =3D { } }; =20 +/* In Kaanapali, CAMNOC requires all CAMNOC_RT_TFEX clocks + * to operate on any TFE Full. + */ +static const struct camss_subdev_resources vfe_res_kaanapali[] =3D { + /* VFE0 - TFE Full */ + { + .regulators =3D {}, + .clock =3D { "gcc_hf_axi", "vfe0_fast_ahb", "vfe0", + "camnoc_rt_vfe0", "camnoc_rt_vfe1", "camnoc_rt_vfe2", + "camnoc_rt_axi", "camnoc_nrt_axi", "qdss_debug_xo" }, + .clock_rate =3D { { 0 }, + { 0 }, + { 360280000, 480000000, 630000000, 716000000, + 833000000 }, + { 0 }, + { 0 }, + { 0 }, + { 200000000, 300000000, 400000000, 480000000 }, + { 0 }, + { 0 } }, + .reg =3D { "vfe0" }, + .interrupt =3D { "vfe0" }, + .vfe =3D { + .line_num =3D 3, + .is_lite =3D false, + .is_deferred =3D true, + .has_pd =3D true, + .pd_name =3D "ife0", + .hw_ops =3D &vfe_ops_1080, + .formats_rdi =3D &vfe_formats_rdi_845, + .formats_pix =3D &vfe_formats_pix_845 + } + }, + /* VFE1 - TFE Full */ + { + .regulators =3D {}, + .clock =3D { "gcc_hf_axi", "vfe1_fast_ahb", "vfe1", + "camnoc_rt_vfe0", "camnoc_rt_vfe1", "camnoc_rt_vfe2", + "camnoc_rt_axi", "camnoc_nrt_axi", "qdss_debug_xo" }, + .clock_rate =3D { { 0 }, + { 0 }, + { 360280000, 480000000, 630000000, 716000000, + 833000000 }, + { 0 }, + { 0 }, + { 0 }, + { 200000000, 300000000, 400000000, 480000000 }, + { 0 }, + { 0 } }, + .reg =3D { "vfe1" }, + .interrupt =3D { "vfe1" }, + .vfe =3D { + .line_num =3D 3, + .is_lite =3D false, + .is_deferred =3D true, + .has_pd =3D true, + .pd_name =3D "ife1", + .hw_ops =3D &vfe_ops_1080, + .formats_rdi =3D &vfe_formats_rdi_845, + .formats_pix =3D &vfe_formats_pix_845 + } + }, + /* VFE2 - TFE Full */ + { + .regulators =3D {}, + .clock =3D { "gcc_hf_axi", "vfe2_fast_ahb", "vfe2", + "camnoc_rt_vfe0", "camnoc_rt_vfe1", "camnoc_rt_vfe2", + "camnoc_rt_axi", "camnoc_nrt_axi", "qdss_debug_xo" }, + .clock_rate =3D { { 0 }, + { 0 }, + { 360280000, 480000000, 630000000, 716000000, + 833000000 }, + { 0 }, + { 0 }, + { 0 }, + { 200000000, 300000000, 400000000, 480000000 }, + { 0 }, + { 0 } }, + .reg =3D { "vfe2" }, + .interrupt =3D { "vfe2" }, + .vfe =3D { + .line_num =3D 3, + .is_lite =3D false, + .is_deferred =3D true, + .has_pd =3D true, + .pd_name =3D "ife2", + .hw_ops =3D &vfe_ops_1080, + .formats_rdi =3D &vfe_formats_rdi_845, + .formats_pix =3D &vfe_formats_pix_845 + } + }, + /* VFE3 - IFE Lite */ + { + .regulators =3D {}, + .clock =3D { "gcc_hf_axi", "vfe_lite_ahb", "vfe_lite", + "camnoc_rt_vfe_lite", "camnoc_rt_axi", + "camnoc_nrt_axi", "qdss_debug_xo" }, + .clock_rate =3D { { 0 }, + { 0 }, + { 266666667, 400000000, 480000000 }, + { 0 }, + { 200000000, 300000000, 400000000, 480000000 }, + { 0 }, + { 0 } }, + .reg =3D { "vfe_lite0" }, + .interrupt =3D { "vfe_lite0" }, + .vfe =3D { + .line_num =3D 4, + .is_lite =3D true, + .is_deferred =3D true, + .hw_ops =3D &vfe_ops_1080, + .formats_rdi =3D &vfe_formats_rdi_845, + .formats_pix =3D &vfe_formats_pix_845 + } + }, + /* VFE4 - IFE Lite */ + { + .regulators =3D {}, + .clock =3D { "gcc_hf_axi", "vfe_lite_ahb", "vfe_lite", + "camnoc_rt_vfe_lite", "camnoc_rt_axi", + "camnoc_nrt_axi", "qdss_debug_xo" }, + .clock_rate =3D { { 0 }, + { 0 }, + { 266666667, 400000000, 480000000 }, + { 0 }, + { 200000000, 300000000, 400000000, 480000000 }, + { 0 }, + { 0 } }, + .reg =3D { "vfe_lite1" }, + .interrupt =3D { "vfe_lite1" }, + .vfe =3D { + .line_num =3D 4, + .is_lite =3D true, + .is_deferred =3D true, + .hw_ops =3D &vfe_ops_1080, + .formats_rdi =3D &vfe_formats_rdi_845, + .formats_pix =3D &vfe_formats_pix_845 + } + }, +}; + static const struct resources_icc icc_res_kaanapali[] =3D { { .name =3D "ahb", @@ -4493,10 +4634,12 @@ static const struct camss_resources kaanapali_resou= rces =3D { .pd_name =3D "top", .csiphy_res =3D csiphy_res_kaanapali, .csid_res =3D csid_res_kaanapali, + .vfe_res =3D vfe_res_kaanapali, .icc_res =3D icc_res_kaanapali, .icc_path_num =3D ARRAY_SIZE(icc_res_kaanapali), .csiphy_num =3D ARRAY_SIZE(csiphy_res_kaanapali), .csid_num =3D ARRAY_SIZE(csid_res_kaanapali), + .vfe_num =3D ARRAY_SIZE(vfe_res_kaanapali), }; =20 static const struct camss_resources msm8916_resources =3D { --=20 2.34.1