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: 13704105 X-Patchwork-Delegate: kieran@bingham.xyz 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-renesas-soc@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 */ }, };