From patchwork Wed Jun 19 15:35:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 806167 Received: from fhigh7-smtp.messagingengine.com (fhigh7-smtp.messagingengine.com [103.168.172.158]) (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 899C221345; Wed, 19 Jun 2024 15:36:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.158 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718811395; cv=none; b=R0y4rs9zwhrYJ0it5OSKwhiDrub5jtKoikiRsts0Pe+kkj1jMoFKTLMPfgdWFN8Gc2bS7+MEX7PP+fwiykki3c8ljhmqyeiJ18r3doSFCk1A/u4nfE3IGKBJqqzlQlb56N64wFgkE1qgCv5+tP5HrbcYfwBwWvji30TY5DO3Elo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718811395; c=relaxed/simple; bh=KJFj5e+o7VpD9NNr3CchM8mAH05uZxhtzX7TKcYvdnY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=l75xiomvkesuhTsKSYOBeOM7T3eOyzRXjWIXNHXmYwiAyiizJKBD3kwcHBlJdenyO81fwWWEQCk4KbDbvcJtcHVi2Iu9FUQ5ffQniQo1GfW42s2PzkZLWJOpN0Dyypopcbj5Lm/4SwWFSsXAAQ0nuaU0SIvY1A6XPEmdhsZBj7g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ragnatech.se; spf=pass smtp.mailfrom=ragnatech.se; dkim=pass (2048-bit key) header.d=ragnatech.se header.i=@ragnatech.se header.b=Zqx/Jikj; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=ro2EA02L; arc=none smtp.client-ip=103.168.172.158 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ragnatech.se Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ragnatech.se Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ragnatech.se header.i=@ragnatech.se header.b="Zqx/Jikj"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="ro2EA02L" Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfhigh.nyi.internal (Postfix) with ESMTP id A8A1F11401E0; Wed, 19 Jun 2024 11:36:31 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 19 Jun 2024 11:36:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ragnatech.se; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1718811391; x=1718897791; bh=Nu/e/5QrvdFIKUx7T4lRBSEMjBYYsMhdUkhwPu9DOTg=; b= Zqx/JikjMn4FiVZgrNhn9kHTpxtvg4YNvJjphCadwNg7hc4SVArtuxX6lN5gSR3H g7jzktao1VFBg+SeStnZnUEPU4FIuHiiA3J5f1pmuQtdqRWg+W7fE1IbkJLdLDGN Xif5n67JWrlmM5/mIwkGnlaxmqpIToVZF8ipcnh8PRq/VE5HT+5YZ4gJzSyDBHin sHKqtOYM1Ruf9f170e2oC0osw5wy2yE9wWnrOM1DnzkWh5GeXbXSUJNuaYGM3XAO uX/GDHdUN9IQesi/MzAiqmqznfqso3lYCF0uWIve+NQmeAj0oI9oQbmpTE3hDrLU cAXSQsIcclf9gBa7p5Aw7g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1718811391; x= 1718897791; bh=Nu/e/5QrvdFIKUx7T4lRBSEMjBYYsMhdUkhwPu9DOTg=; b=r o2EA02L4qywVne8D9OEgyf4kZ4hIVZPc2h1FZggW1ksDtVfE8HlxpjP8jXRmjSIb 3zWs/ff9qzIX+VgWbJpVF7sh/LWzWi5zFjMRLrNaiiYtHYj53CDH/nEkdEZjMhNy TrI4iq8SHkGhMQ1YhZPjTYF8EPq4SliYwwL0oZlqZM4Csx9eaTkV0b9iNy8AXhdj TUpMtR/Euk19j9GIy4bOyG4vHHpABh0Vdp0ryJYvS+XhikMl5DhGvVmQB1CQ1S+K P+OrnyVt77EdDAj6o6uJYij2Nco7ndeo4TUrFsS2AhOMdT1cKhtrWkJ8R4YM1s2L jNPaiGHO6VSa3mz2ftyWA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeeftddgkeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpefpihhk lhgrshcuufpnuggvrhhluhhnugcuoehnihhklhgrshdrshhouggvrhhluhhnugdorhgvnh gvshgrshesrhgrghhnrghtvggthhdrshgvqeenucggtffrrghtthgvrhhnpeehiefgueev uedtfefhheegkeevtdelueeukeevfeduhefhhfejfffggeffleefgeenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehnihhklhgrshdrshhouggv rhhluhhnugesrhgrghhnrghtvggthhdrshgv X-ME-Proxy: Feedback-ID: i80c9496c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Jun 2024 11:36:31 -0400 (EDT) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: Mauro Carvalho Chehab , Laurent Pinchart , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , linux-media@vger.kernel.org, devicetree@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, =?utf-8?q?Niklas_S=C3=B6derlund?= Subject: [PATCH v3 1/2] dt-bindings: media: renesas,vin: Add binding for V4M Date: Wed, 19 Jun 2024 17:35:58 +0200 Message-ID: <20240619153559.1647957-2-niklas.soderlund+renesas@ragnatech.se> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240619153559.1647957-1-niklas.soderlund+renesas@ragnatech.se> References: <20240619153559.1647957-1-niklas.soderlund+renesas@ragnatech.se> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Document support for the VIN module in the Renesas V4M (r8a779h0) SoC. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven --- Documentation/devicetree/bindings/media/renesas,vin.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/media/renesas,vin.yaml b/Documentation/devicetree/bindings/media/renesas,vin.yaml index 5539d0f8e74d..168cb02f8abe 100644 --- a/Documentation/devicetree/bindings/media/renesas,vin.yaml +++ b/Documentation/devicetree/bindings/media/renesas,vin.yaml @@ -54,6 +54,7 @@ properties: - renesas,vin-r8a77995 # R-Car D3 - renesas,vin-r8a779a0 # R-Car V3U - renesas,vin-r8a779g0 # R-Car V4H + - renesas,vin-r8a779h0 # R-Car V4M reg: maxItems: 1 From patchwork Wed Jun 19 15:35:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 805829 Received: from fout1-smtp.messagingengine.com (fout1-smtp.messagingengine.com [103.168.172.144]) (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 35C6B150994; Wed, 19 Jun 2024 15:36:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.144 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718811397; cv=none; b=rv/mhqBbEKCTK9XYbSA6nPkOkCKuX41VBRrSDNUpUahyXV4I5JDq49MZoOnST8JSs6bqgSCZsAtV4bBf0+oXqo9IdB08t8IldnnqOwhQV9iN5q4uN+g2dCpt6tFGSIL6y3xwaQykMMkzOUvBEgF+TLHAC7kN8JcCHIg6SfbU9Wg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718811397; c=relaxed/simple; bh=sjmkIm1zsrC10eD2advKHDcjbqcq5pzS78G2inpOkvc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=WIXj8cCnsM+dLh88gQv2uW/oJHsoYhsBAmCxTmWU8kwHFu/Ningj+q4HbnpYsUAjuNa7/cJsPXjdU6Me9aVy+vyOK7anhzgsIB/JG5Q1oZAUGx2u++Fz7VMDOMpXOJwM4JAZ+deoWYpxPOWv5H0EFef+5IC87pKGji+e4qXZvG4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ragnatech.se; spf=pass smtp.mailfrom=ragnatech.se; dkim=pass (2048-bit key) header.d=ragnatech.se header.i=@ragnatech.se header.b=N7Dsri06; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=oIuFizL1; arc=none smtp.client-ip=103.168.172.144 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ragnatech.se Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ragnatech.se Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ragnatech.se header.i=@ragnatech.se header.b="N7Dsri06"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="oIuFizL1" Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailfout.nyi.internal (Postfix) with ESMTP id 4B23E138011B; Wed, 19 Jun 2024 11:36:34 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 19 Jun 2024 11:36:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ragnatech.se; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1718811394; x=1718897794; bh=mrgUJ9PZVo0mdAfnL1MC+I4cutj4Wk6Q3wuGf6mCjx0=; b= N7Dsri06/yLtXhvI3zFp7tEJ4tDSQrAR7GVhc7m0IFtfBYgZe6qPcLnZLxbDB7SR uxsfxDL83vkrWEVOuKZ2z/q7pn3fudFyLXd5mxBP1Hjl5pzUcnq2Z7OdEwLf5P9B WspR/sbH/izWhu1dnFxhigR9bFFWlWCuETzAXaM2DTOms99Yu9yA+jol1dyByC9C Fl8qzeJcUdh5OlHhl4MbveCylm9pcv9B4RuXHqo6hQ8Ii8xf+mpKiyluKdkXdweF d+ytI+a1TeDAbkgFyFMY5X+Uuwdv3u5QSrOYpy/b6txetQUajxk8mmuB2nBMJuy5 4LIl6JQfNF20ptSdqjfBHg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1718811394; x= 1718897794; bh=mrgUJ9PZVo0mdAfnL1MC+I4cutj4Wk6Q3wuGf6mCjx0=; b=o IuFizL1Op29pgYXfhxv0+Tcm/pSo/4+vGDYIbl5hBbGwrmg+k1SeWHcxQUhiJxJM VtsWPITyNXycCzOc1JpXWDlkEDUwqrcf5wh6pAeW6DhH3qu3byHTviK2OWLppXZd oYWkMX24NCeJUR/u7wvKMGF4K3CkiaCxfxdVNDF+fIRNxhoMULYdg7JptxlSOVFC BDP0VY/+B3yfadbsJdGs4jweKIZErOXbe9bfvn8UuYbiPeRrsdKMn1ofy2CLSNVa WPuJlebFhEaWFUrotFXLaPrdFrdXX8wRParn8gSDr6LZybYDTswDBUCczOAbc/HE LuvdrVF/FjIc0XFn6uW1w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeeftddgkeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpefpihhk lhgrshcuufpnuggvrhhluhhnugcuoehnihhklhgrshdrshhouggvrhhluhhnugdorhgvnh gvshgrshesrhgrghhnrghtvggthhdrshgvqeenucggtffrrghtthgvrhhnpeehiefgueev uedtfefhheegkeevtdelueeukeevfeduhefhhfejfffggeffleefgeenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehnihhklhgrshdrshhouggv rhhluhhnugesrhgrghhnrghtvggthhdrshgv X-ME-Proxy: Feedback-ID: i80c9496c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Jun 2024 11:36:33 -0400 (EDT) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: Mauro Carvalho Chehab , Laurent Pinchart , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , linux-media@vger.kernel.org, devicetree@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, =?utf-8?q?Niklas_S=C3=B6derlund?= , Laurent Pinchart Subject: [PATCH v3 2/2] media: rcar-vin: Add support for R-Car V4M Date: Wed, 19 Jun 2024 17:35:59 +0200 Message-ID: <20240619153559.1647957-3-niklas.soderlund+renesas@ragnatech.se> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240619153559.1647957-1-niklas.soderlund+renesas@ragnatech.se> References: <20240619153559.1647957-1-niklas.soderlund+renesas@ragnatech.se> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add support for R-Car V4M. The V4M is similar to the other Gen4 SoC supported V4H, and uses the ISP Channel Selector as its only possible video input source. The datasheet for the two SoCs have small nuances around the Pre-Clip registers ELPrC and EPPrC in three use-cases, interlaced images, embedded data and RAW8 input. On V4H the values written to the registers are based on odd numbers while on V4M they are even numbers, based on the input image size. No board that uses these SoCs which also have the external peripherals to test these nuances exists. Most likely this is an issue in the datasheet, but to make this easy to address in the future do not add a common Gen4 fallback compatible. Instead uses SoC specific compatibles for both SoCs. This is what was done for Gen3 SoCs, which also had similar nuances in the register documentation. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- * Changes since v2 - Extend commit message to explain why SoC specific compatibles are use in the driver instead of adding a new Gen4 fallback to cover both V4H and V4M. - Add review tags. * Changes since v1 - Create a shared Gen4 info strucutre. --- drivers/media/platform/renesas/rcar-vin/rcar-core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-core.c b/drivers/media/platform/renesas/rcar-vin/rcar-core.c index 809c3a38cc4a..6992b61f0d48 100644 --- a/drivers/media/platform/renesas/rcar-vin/rcar-core.c +++ b/drivers/media/platform/renesas/rcar-vin/rcar-core.c @@ -1283,7 +1283,7 @@ static const struct rvin_info rcar_info_r8a779a0 = { .max_height = 4096, }; -static const struct rvin_info rcar_info_r8a779g0 = { +static const struct rvin_info rcar_info_gen4 = { .model = RCAR_GEN3, .use_mc = true, .use_isp = true, @@ -1359,7 +1359,11 @@ static const struct of_device_id rvin_of_id_table[] = { }, { .compatible = "renesas,vin-r8a779g0", - .data = &rcar_info_r8a779g0, + .data = &rcar_info_gen4, + }, + { + .compatible = "renesas,vin-r8a779h0", + .data = &rcar_info_gen4, }, { /* Sentinel */ }, };