From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29B27C636CC for ; Mon, 13 Feb 2023 16:11:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229819AbjBMQLB (ORCPT ); Mon, 13 Feb 2023 11:11:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229783AbjBMQLA (ORCPT ); Mon, 13 Feb 2023 11:11:00 -0500 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19A821F480 for ; Mon, 13 Feb 2023 08:10:59 -0800 (PST) Received: by mail-ej1-x632.google.com with SMTP id sb24so9171488ejb.8 for ; Mon, 13 Feb 2023 08:10:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ragnatech-se.20210112.gappssmtp.com; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=zDVfwvFSS8VJ1hXNKdD4Fk6lUNif8eaxpztOBA00pq8=; b=UzMY9Jb6/w+2sI+xuELNwlp0VLzvhyo00S1kY/JgKVTeRXd0g+NKkV2peL3XAdFdxy Qb4ULglTrGW1/BCDTIdHkekJ8s6VLVhnG2XOwngOEJB7z5N87vK8ONdhqnQxvMArjT2u a3BhsuA+hsLJnEjU/k3uKuEYuHRid9vZO5bEBZ4pYHv3n6JYgSbaC8mStHvZrMqTodMJ wKkiB3ZH+eyySkjg5O9Gv1Gnn7Afpd6SEeLIu5RiuwEg4oyBmesxjAX8AoI5nEZ/VeUP jEuQtYRWZYH3bypiBiI7aHhpnt+7jPvx+TSaclP26HlkWbzgw9qMBD6jxBXqGXl6cYs3 OTKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zDVfwvFSS8VJ1hXNKdD4Fk6lUNif8eaxpztOBA00pq8=; b=nG/Q87gNJAYxPbXc2MBhovr7WDOU9Zoxr2spC0KsMod7zpxoTi6nvzEHuxk0FwEar9 Y2q07acpYO35K2IcWWp1td9JCPi782YswDMMpOBFcp7MvuCSttjM4Zo2j+SNWHB7HgGe xVOujh9vwmBq6MfR3vFr6PKIKJQyJt5D9QqwMfW36X3922rvVKp6uwsuFz2FrGhuonXJ d9KWVJMqdoy4o1++a0Q+gS2hR8wtRz+5a7b8+zfy2jSvmWtysblJTrbvoDH0pZp2u0Dd hriyZsDyBinbO2ORFhSGC1odfHbpQ3beJa3e+Kt2kLGvhrZUasiufOBfOanE9hVqiRBx oXlw== X-Gm-Message-State: AO0yUKWg2Cg/JYmVB7tnrAc5+/pl2HU+41xjJfoa/r0eUzawaaCQTJbW GS4wgLZdA/YvEG4rlzI1Kf41uw== X-Google-Smtp-Source: AK7set/33YBrEtdyXyOpC22woKTcLm3Q0MFElqVoHN9LjkLAGhZfTDQ88py0bNCJCKfL/ziABy0/dg== X-Received: by 2002:a17:907:d28:b0:8af:433d:5383 with SMTP id gn40-20020a1709070d2800b008af433d5383mr19717523ejc.9.1676304657722; Mon, 13 Feb 2023 08:10:57 -0800 (PST) Received: from localhost (h-46-59-89-207.A463.priv.bahnhof.se. [46.59.89.207]) by smtp.gmail.com with ESMTPSA id m10-20020a170906580a00b0086f4b8f9e42sm6906326ejq.65.2023.02.13.08.10.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 08:10:57 -0800 (PST) Date: Mon, 13 Feb 2023 17:10:56 +0100 From: Niklas =?utf-8?Q?S=C3=B6derlund?= To: Geert Uytterhoeven Cc: Hans Verkuil , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: Re: [PATCH 3/3] media: rcar-csi2: Add support for C-PHY on R-Car V4H Message-ID: References: <20230211145310.3819989-1-niklas.soderlund+renesas@ragnatech.se> <20230211145310.3819989-4-niklas.soderlund+renesas@ragnatech.se> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Hi Geert, Thanks for your feedback. On 2023-02-13 16:45:18 +0100, Geert Uytterhoeven wrote: > Hi Niklas, > > On Sat, Feb 11, 2023 at 4:06 PM Niklas Söderlund > wrote: > > Add support for C-PHY on R-Car V4H. While the V4H supports both D-PHY > > and C-PHY this patch only adds support for the C-PHY mode due to lack of > > documentation and hardware to test on. > > > > The V4H is the first Gen4 device that is enabled in the rcar-csi2 > > driver. There is much overlap with the Gen3 driver, the primary > > difference is in how the receiver is started. The V4H have a much larger > > register space and some addresses overlap with Gen3. > > > > Signed-off-by: Niklas Söderlund > > Thanks for your patch! > > > --- a/drivers/media/platform/renesas/rcar-vin/rcar-csi2.c > > +++ b/drivers/media/platform/renesas/rcar-vin/rcar-csi2.c > > > @@ -1503,6 +1781,12 @@ static const struct rcar_csi2_info rcar_csi2_info_r8a779a0 = { > > .support_dphy = true, > > }; > > > > +static const struct rcar_csi2_info rcar_csi2_info_r8a779g0 = { > > + .start_receiver = rcsi2_start_receiver_v4h, > > The description of "[PATCH 1/3] media: rcar-csi2: Prepare for Gen4 > support" suggests you also need a different procedure for > .enter_standby()? But perhaps not doing the procedure is just the right > thing to do? They are indeed different, but doing nothing in enter_standby() for V4H is the correct thing. Maybe the function enter_standby(), could have been better named as enter_standby_extra() or pre_enter_standby(). As for both on Gen3 and V4H after enter_standby(), if present, have been called the rest controller is asserted and the module is powers off. Only that on Gen3 which have more documentation an extra step to poke some registers before asserting the reset controller is documented, so this is what happens in rcsi2_enter_standby_gen3(). I would not be surprised as we get more documentation for V4H we will add a rcsi2_enter_standby_gen4() to match updates in the datasheet. > > > + .use_isp = true, > > + .support_cphy = true, > > +}; > > + > > static const struct of_device_id rcar_csi2_of_table[] = { > > { > > .compatible = "renesas,r8a774a1-csi2", > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds -- Kind Regards, Niklas Söderlund