From patchwork Thu Nov 11 16:15:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 12615395 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D993C433FE for ; Thu, 11 Nov 2021 16:13:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1CAD56124C for ; Thu, 11 Nov 2021 16:13:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234033AbhKKQQg (ORCPT ); Thu, 11 Nov 2021 11:16:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233153AbhKKQQe (ORCPT ); Thu, 11 Nov 2021 11:16:34 -0500 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D530BC061767 for ; Thu, 11 Nov 2021 08:13:44 -0800 (PST) Received: by mail-wr1-x42d.google.com with SMTP id c4so10634656wrd.9 for ; Thu, 11 Nov 2021 08:13:44 -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=iZFkSyMOYMoA/M4Pau8Inli7XTuAKmnmnC8zhLOnfYU=; b=ZG/lkOK7WE2uVZO9e/gDSnYtRsWMaAqZVGGRV7U0T67DxlEoPbSDrnWouGlDr2XWAQ urtPgeNzzcCoqWc64R7FSSpxxps7w2F4dW53hsq6QPsRf7wxwrp4fwj2Bba0SVmUOkdw y4BM9DP0NMreqzBOFEWbcinzuJ2OfEHWi7sz6lDPPFfkC8Er/9QKZvYKpm6V3O82SE1k 8cGBUKeRORQJQlUiAF48HNDAXpHpv6S51dV0tRYN4t3vNS7+12VUQSbOQMZiiaAkKQk1 wEUXsLIsWR+y+OH66GACzj9kb6rdHJbV/mKaEXztloP2zrg4sEpzXUDUhpBhNtxF21nq vFOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=iZFkSyMOYMoA/M4Pau8Inli7XTuAKmnmnC8zhLOnfYU=; b=IqcopzvFcgfB8ueGS7iyBdBF9CThWOu4OO6OENryltp96UqbhP3MF30IE6BcZMZuNS 0ZxLuTlWbXS7wz2lFwRmGhkJPzeXKBJsmFGsR/6h1b8QUsUnYa1GfSlH18QujZKgbvVL y2s3Oai4zunz0tcmnAJT5tyfc3W9aiJDWQVqUa9eoum4C37TmAVpTEPfm5ilUWf+254J OMj9k2vNZfYmi2P1HZf6ZnKi8yQWHipCqMC+attY2rh/i1tOPKU0Q/QmELAHnTC98IIm iR2k1yAAwx1p5Oq8//1mXvukXn6Z2pk7a2X347h0EVXAVykrbEvMACc9KvwpxTSHkn8g PwGA== X-Gm-Message-State: AOAM533mtgEerzsCFdj+ovs5Wn7hSontg3Vi7ZNVNgF6AKrUjQegkyR6 TG3xsCL8dzXYttTnYtSUpqLfAPwQCTVu9Q== X-Google-Smtp-Source: ABdhPJyJoNM44r9Zix+aTQKl3IbJHUohGqcI6PWmZBLm9kHjkot0cJIQQ5EmUTighS8OKIWelRycaA== X-Received: by 2002:a5d:534b:: with SMTP id t11mr10057798wrv.75.1636647222938; Thu, 11 Nov 2021 08:13:42 -0800 (PST) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id o1sm3441451wrn.63.2021.11.11.08.13.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Nov 2021 08:13:42 -0800 (PST) From: Bryan O'Donoghue To: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, robert.foss@linaro.org, jonathan@marek.ca Cc: andrey.konovalov@linaro.org, todor.too@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, jgrahsl@snap.com, hfink@snap.com, bryan.odonoghue@linaro.org Subject: [RESEND PATCH 00/18] CAMSS: Add SM8250 support Date: Thu, 11 Nov 2021 16:15:24 +0000 Message-Id: <20211111161542.3936425-1-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org RESEND: git send-email --to=inux-arm-msm@vger.kernel.org -> --to=linux-arm-msm@vger.kernel.org This series is imported from excellent enabling work contributed by Jonathan Marek which we have picked up in Linaro for the RB5 project. Link: https://patchwork.kernel.org/project/linux-arm-msm/patch/20210511180728.23781-2-jonathan@marek.ca/ Link: https://www.qualcomm.com/products/robotics-rb5-platform Link: https://www.96boards.org/product/qualcomm-robotics-rb5 Link: https://www.thundercomm.com/app_en/product/1590131656070623?index=1&categoryId=category0&tabIndex=1 The RB5 has a slightly different sku I think to Jonathan's platform - QRB5165 in our case with a different version of LK the relevant bootloader for the board. As a result we needed to make some additional updates to the provided patcheset, included here. The most notable changes are: - Addition of clocks. - Addition of bandwidth settings. - Representing the dependency on a VFE for a given CSID so that V4L subdevs will come out of reset right when poked. A full tree which is bootable and capable of producing pixel data from the imx577 main sensor is availble here, with this series being a sub-set of the necessary patches on the SoC side only. Link: https://git.linaro.org/people/bryan.odonoghue/kernel.git/log/?h=v5.16-rc1-sm8250-camss-imx577-only media-ctl --reset media-ctl -v -d /dev/media0 -V '"imx412 '20-001a'":0[fmt:SRGGB10/4056x3040 field:none]' media-ctl -V '"msm_csiphy2":0[fmt:SRGGB10/4056x3040]' media-ctl -V '"msm_csid0":0[fmt:SRGGB10/4056x3040]' media-ctl -V '"msm_vfe0_rdi0":0[fmt:SRGGB10/4056x3040]' media-ctl -l '"msm_csiphy2":1->"msm_csid0":0[1]' media-ctl -l '"msm_csid0":1->"msm_vfe0_rdi0":0[1]' yavta -B capture-mplane -c -I -n 5 -f SRGGB10P -s 4056x3040 -F /dev/video0 Bryan O'Donoghue (2): media: camss: Add SM8250 bandwdith configuration support media: camss: Do vfe_get/vfe_put for csid on sm8250 Jonathan Marek (16): media: dt-bindings: media: camss: Add qcom,sm8250-camss binding media: camss: csiphy-3ph: don't print HW version as an error media: camss: csiphy-3ph: disable interrupts media: camss: csiphy-3ph: add support for SM8250 CSI DPHY media: camss: csid-170: fix non-10bit formats media: camss: csid-170: don't enable unused irqs media: camss: csid-170: remove stray comment media: camss: csid-170: support more than one lite vfe media: camss: csid-170: set the right HALT_CMD when disabled media: camss: csid: allow csid to work without a regulator media: camss: remove vdda-csiN from sdm845 resources media: camss: fix VFE irq name media: camss: vfe-170: fix "VFE halt timeout" error media: camss: Add initial support for VFE hardware version Titan 480 media: camss: add support for V4L2_PIX_FMT_GREY for sdm845 HW media: camss: add support for SM8250 camss .../bindings/media/qcom,sm8250-camss.yaml | 450 ++++++++++++++ drivers/media/platform/qcom/camss/Makefile | 3 +- .../{camss-csid-170.c => camss-csid-gen2.c} | 32 +- .../media/platform/qcom/camss/camss-csid.c | 55 +- .../media/platform/qcom/camss/camss-csid.h | 2 +- .../qcom/camss/camss-csiphy-3ph-1-0.c | 184 ++++-- .../media/platform/qcom/camss/camss-csiphy.c | 9 +- .../media/platform/qcom/camss/camss-vfe-170.c | 12 +- .../media/platform/qcom/camss/camss-vfe-480.c | 548 ++++++++++++++++++ drivers/media/platform/qcom/camss/camss-vfe.c | 17 +- drivers/media/platform/qcom/camss/camss-vfe.h | 4 + .../media/platform/qcom/camss/camss-video.c | 5 +- drivers/media/platform/qcom/camss/camss.c | 298 +++++++++- drivers/media/platform/qcom/camss/camss.h | 18 + 14 files changed, 1533 insertions(+), 104 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/qcom,sm8250-camss.yaml rename drivers/media/platform/qcom/camss/{camss-csid-170.c => camss-csid-gen2.c} (95%) create mode 100644 drivers/media/platform/qcom/camss/camss-vfe-480.c Tested-by: Julian Grahsl