From patchwork Fri Jan 8 12:04:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Foss X-Patchwork-Id: 358934 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp481918jai; Fri, 8 Jan 2021 04:06:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJwV84XV1Rmd26GgfGg1QYo7JHjSmqAt87uum9dwJJIVMn03Yix4riKI5GYDBv36kLLIhVXH X-Received: by 2002:a05:6402:310f:: with SMTP id dc15mr4982389edb.225.1610107612368; Fri, 08 Jan 2021 04:06:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610107612; cv=none; d=google.com; s=arc-20160816; b=y58+PR5DqO4sx6z8Dm022oVjdKQaLu1nNFkcp71/r64DyDYABFUMpfJ20vVawiRVaA WnIhfwwdnmBQwjG5hrIDgvd6Mm+rwQxlqugNKSAJwMHbkgKFe12wqgZBzI6SkfxWqWVg qqqlTiTLg58FxePqF0tmy0aFptv3w/NE2PQdKcFnGx5PtoT2l7pbdJSiHbve/uWZozgx 5yzGQ5lxSrck6YvP0eEKACv1gjUEWaZebt353xtu/EnBhXdZeGvB71AQWe8B/Oew7Ijz TTNewSyqwRN+QfjPsNOSQRuDZxJrTyLDonsLehVca/35EiVJP1hZJTAQJPhkBzYkSyC+ cUuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=asWxFY0f6/Inx6rPHpsAJiBWcsPrumNhnqo0mf0c6II=; b=A47bFdzgAls9+wDKFwmb6XYen2GjlLsWdlLI+AlYWIZJfQsg4S1e6Ws6vbRVmsLCyz HAs1AYwcyyatIu4JcI3wAWoSiLBU8kBZg0ThZxjoauLDxwIrzckP9aCORbQ1oStpWxFe WQnHqeBqvHHqZqV8DFQT4ln82SBrqMou6I02O5CXJszySGFOPMBUFepCP0rTJiYi+Z/i s/QjpErNV78Il/ybl7wEI6RgKUrI/1gxQwFVMyGb6GZ/xv3tAvAEkBujQRfVSbA+MSBr H20TP8j0SQGxXW4GnR9xxr6+OzznbP1dqFbINply+erj3zNp9t2J8V3cKEsnnmMfRief Ay0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M1ZgjcdX; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w10si3797218edv.243.2021.01.08.04.06.52; Fri, 08 Jan 2021 04:06:52 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M1ZgjcdX; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726745AbhAHMFb (ORCPT + 6 others); Fri, 8 Jan 2021 07:05:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726736AbhAHMFa (ORCPT ); Fri, 8 Jan 2021 07:05:30 -0500 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23D7FC0612F8 for ; Fri, 8 Jan 2021 04:04:50 -0800 (PST) Received: by mail-ej1-x62a.google.com with SMTP id jx16so14142265ejb.10 for ; Fri, 08 Jan 2021 04:04:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=asWxFY0f6/Inx6rPHpsAJiBWcsPrumNhnqo0mf0c6II=; b=M1ZgjcdXul7+t7ICsKkbmaoMBiD4b4XCGxZuVkFJH8EdCSKwvBEPKMaElX/fWGSbWd MwyosPhwS/oQhskLw76mxJWRDizhPRJP70Qb1X7rlCfr6pLS4FvJXGtdav+RtKN6/4Ru ZY4Z6OC04j32hDVcYeDYMsIGw6/OsdRXTBktKkyVd3PxKHcNu5ut9csR4rNdN0DuwsIx AJorSzYlN14yLSpIh+vJNSrobLHWBaSCdCnvFc2qlzr8teEyWUorR+xhq9ndtUWDYxam K0ER8LxRH7OtDkytmgk2uDTUZVVodOFn01HWOQeaGex2xeBhyXpEAJU7vSW/9bPq7+nB 4Hiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=asWxFY0f6/Inx6rPHpsAJiBWcsPrumNhnqo0mf0c6II=; b=d+H32xK9KRRVz/xONGIvantLadAKxREPn9AY21BUN27JffHqtBfoVEIKtcAT5YG79t jKkZ8DITT8lthDjWCr43ky73KVYZAmJXR+Mye8bGudLX7h8GyJUioo9NuLv6H8LEF9Yc ySFYMk5XYmX17MuEIeZH33KaDsAtKNnikMO0BYa8jOOoRIx+1FlpZZ0BzFOBLanTpMhz zxcNXBhm32KHFAmWYV4OOmSvTWBxhXc4WKk6Zz7HQksXeEXOUS8czTRQABVm3H8dBSVu ibA3nP1e8i7ZVh6eTyx4o0oBxICM07EZHNdJYkDZ46j2ogsYwIzv7720KcuMu2OUjUxH Ujrw== X-Gm-Message-State: AOAM530lWyTSn5B7oApAM7Ay2m6tEyEBXKBpfQnk3T+e3NJqbmbAthhJ GSV6pCwnpulIYEbjR/2WJb5+ZQ== X-Received: by 2002:a17:906:c83b:: with SMTP id dd27mr2518214ejb.356.1610107488699; Fri, 08 Jan 2021 04:04:48 -0800 (PST) Received: from localhost.localdomain ([2a02:2450:102f:d6a:bb2e:8b50:322a:1b9a]) by smtp.gmail.com with ESMTPSA id i18sm3674498edt.68.2021.01.08.04.04.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jan 2021 04:04:47 -0800 (PST) From: Robert Foss To: agross@kernel.org, bjorn.andersson@linaro.org, robert.foss@linaro.org, todor.too@gmail.com, mchehab@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, will@kernel.org, shawnguo@kernel.org, leoyang.li@nxp.com, geert+renesas@glider.be, arnd@arndb.de, Anson.Huang@nxp.com, michael@walle.cc, agx@sigxcpu.org, max.oss.09@gmail.com, linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, AngeloGioacchino Del Regno , Andrey Konovalov Cc: Tomasz Figa , Azam Sadiq Pasha Kapatrala Syed , Sarvesh Sridutt , Laurent Pinchart Subject: [PATCH v1 00/17] Add support for SDM845 Camera Subsystem Date: Fri, 8 Jan 2021 13:04:12 +0100 Message-Id: <20210108120429.895046-1-robert.foss@linaro.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This series implements support for the camera subsystem found in the SDM845 SOCs and the Titan 170 ISP. The support is partial in that it implements CSIPHY, CSID, and partial VFE support. The Titan generation of the ISP diverges a fair amount from the design of the previous architecture generation, CAMSS. As a result some pretty invasive refactoring is done in this series. It also means that at this time we're unable to implement support for all of the IP blocks contained. This is due to a combination of legal considerations with respect to the IP and its owner Qualcomm and time & man hour constrains on the Linaro side. The CSIPHY (CSI Physical Layer) & CSID (CSI Decoder) support is complete, but the VFE (Video Front End, which is referred to as IFE (Image Front End) in the Titan generation of ISPs) only has support for the RDI (Raw Dump Interface) which allows the raw output of the CSID to be written to memory. The 2nd interface implemented in the VFE silicon is the PIX interface, and camss does not support it for this generation of ISPs. The reason for this is that the PIX interface is used for sending image data to the BPS (Bayer Processing Section) & IPE (Image Processing Engine), but both of these units are beyond the scope of enabling basic ISP functionality for the SDM845. Since the Titan architecture generation diverges quite a bit from the CAMSS generation, a lot of pretty major refactoring is carried out in this series. Both the CSID & VFE core paths are made more general and hardware version specific parts are broken out. The CSIPHY didn't require quite as radical changes and therefore keeps its current form. Tested on: - Qcom RB3 / db845c + camera mezzanine, which is SDM845 based - db410c + D3 Camera mezzanine, which is APQ8016 based Branch: - https://git.linaro.org/people/robert.foss/linux.git/log/?h=camss_sdm845_v1 Robert Foss (17): media: camss: Fix comment using wrong function name media: camss: Fix vfe_isr comment typo media: camss: Add CAMSS_845 camss version media: camss: Make ISPIF subdevice optional media: camss: Refactor VFE HW version support media: camss: Add support for VFE hardware version Titan 170 media: camss: Add missing format identifiers media: camss: Refactor CSID HW version support media: camss: Add support for CSID hardware version Titan 170 media: camss: Add support for CSIPHY hardware version Titan 170 media: camss: Remove per VFE power domain toggling media: dt-bindings: media: qcom,camss: Add bindings for SDM845 camss media: camss: Enable SDM845 arm64: defconfig: Build Qcom CAMSS as module arm64: dts: sdm845: Add CAMSS ISP node arm64: dts: sdm845-db845c: Add CAMSS ISP node arm64: dts: sdm845-db845c: Enable ov8856 sensor and connect to ISP .../devicetree/bindings/media/qcom,camss.txt | 51 +- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 28 +- arch/arm64/boot/dts/qcom/sdm845.dtsi | 151 +++ arch/arm64/configs/defconfig | 1 + drivers/media/platform/qcom/camss/Makefile | 6 + .../platform/qcom/camss/camss-csid-170.c | 602 +++++++++ .../platform/qcom/camss/camss-csid-4-1.c | 338 +++++ .../platform/qcom/camss/camss-csid-4-7.c | 406 ++++++ .../media/platform/qcom/camss/camss-csid.c | 620 +-------- .../media/platform/qcom/camss/camss-csid.h | 177 ++- .../qcom/camss/camss-csiphy-3ph-1-0.c | 182 ++- .../media/platform/qcom/camss/camss-csiphy.c | 66 +- .../media/platform/qcom/camss/camss-ispif.c | 147 ++- .../media/platform/qcom/camss/camss-ispif.h | 3 +- .../media/platform/qcom/camss/camss-vfe-170.c | 808 ++++++++++++ .../media/platform/qcom/camss/camss-vfe-4-1.c | 119 +- .../media/platform/qcom/camss/camss-vfe-4-7.c | 240 ++-- .../media/platform/qcom/camss/camss-vfe-4-8.c | 1166 +++++++++++++++++ .../platform/qcom/camss/camss-vfe-gen1.c | 760 +++++++++++ .../platform/qcom/camss/camss-vfe-gen1.h | 110 ++ drivers/media/platform/qcom/camss/camss-vfe.c | 838 +----------- drivers/media/platform/qcom/camss/camss-vfe.h | 118 +- .../media/platform/qcom/camss/camss-video.c | 100 ++ drivers/media/platform/qcom/camss/camss.c | 421 ++++-- drivers/media/platform/qcom/camss/camss.h | 17 +- 25 files changed, 5630 insertions(+), 1845 deletions(-) create mode 100644 drivers/media/platform/qcom/camss/camss-csid-170.c create mode 100644 drivers/media/platform/qcom/camss/camss-csid-4-1.c create mode 100644 drivers/media/platform/qcom/camss/camss-csid-4-7.c create mode 100644 drivers/media/platform/qcom/camss/camss-vfe-170.c create mode 100644 drivers/media/platform/qcom/camss/camss-vfe-4-8.c create mode 100644 drivers/media/platform/qcom/camss/camss-vfe-gen1.c create mode 100644 drivers/media/platform/qcom/camss/camss-vfe-gen1.h -- 2.27.0