Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1244873rwd; Wed, 7 Jun 2023 13:19:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7bd49cf/jY0OqQBx4QjG8GhOTog/FVIKqBgyM6hAgPzkngRteTcs58VjP/sSBTxAj0dx7U X-Received: by 2002:a05:6a20:12d1:b0:111:d03c:2bf9 with SMTP id v17-20020a056a2012d100b00111d03c2bf9mr2884582pzg.12.1686169139969; Wed, 07 Jun 2023 13:18:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686169139; cv=none; d=google.com; s=arc-20160816; b=ODWkOYkqqozhXmXYPlOJ9htXopIvdE7ZoHj+RSaGmqG6TfRW4gdAgLnGQb6tn40aWJ QYJLLIrPD0jOwmr+cCWORUnTA/lhZ/iJySc14kKMzmdNNdwdYKNRlm85Ly5YPN00/UDx CocNCrDxSZOiXz2Ge9zteCYBz0VUs6IflFK3EdPz+mvqurJ8DZKrZUnsCv1jJFxh32G9 TqZW2dLlls7/Q/uK0OOp70VneOBq8LWG8pjlYqOkKHj0+FQNiXAJVaWfjOu+zjKxFcnt xxXYpENLOkoggSSszGrAPXWKbuqVis3RaLHbZDyLrSM5/NiDQ8LZ38TAdLCFuhEugsD5 cytQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xinSIPtLD9mwv6iuhS8dp2Mw0+vZbIWYEl17ISiKBzY=; b=09tRVrIuLT1CA9gOi63r3wxlfGstCl4dzyuvnoSteUaYsn0n89pJNsYPhvLwGVnL+L kfVk7/2BO8Peol8nhEDxykgHdZF2+CGbuHMvQLnhEy4yGtTaler0wLO/lx3uqO9kMdO8 OgkovF5EGgueYmO0tUGMIvmKe84xNh13gQ+xNjynWqf3J0y97TtpXINnkOV7RaUOOsTa cYQq5wUXxr9xikr0mnlzS6E09vOnkec7UnwEoiXQGUA3IPLqNGOFJu+KrF64FhJfIIku unruDi/UY1IC4XHLX+7GMM7JEpkOAB2H339u8zgdQMySkGgDnIZvKaZIzZmkiSAQXYMO Iyng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=dOdS7D9m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f128-20020a625186000000b006535a72d26csi8875312pfb.152.2023.06.07.13.18.44; Wed, 07 Jun 2023 13:18:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=dOdS7D9m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230043AbjFGTt0 (ORCPT + 99 others); Wed, 7 Jun 2023 15:49:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229514AbjFGTtZ (ORCPT ); Wed, 7 Jun 2023 15:49:25 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAEBA101; Wed, 7 Jun 2023 12:49:23 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-5149b63151aso2126633a12.3; Wed, 07 Jun 2023 12:49:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686167362; x=1688759362; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=xinSIPtLD9mwv6iuhS8dp2Mw0+vZbIWYEl17ISiKBzY=; b=dOdS7D9mdTOTI4/O6vOazPPGD41iGTYB4VUnC1iqk9W3iU4Lai37jfNsir3uj85PFK vstexSTg1M5jq+qrBUu2eeMkikoTpazeSUG+pEchU+pnv/SRFz4QR2qzl/oTKo9m+9Tr u47t2VMJwZpqK7vgCa0sQHxuZmS10nfCZ94SAEgrwS83MMMWP8JUxx0uc26+KZI/+uq2 f1X7LwKjvbeNNxwkgyQYYJXwml6l/GpWZuAdC9z/SUMoiQevRZUjX+wRBWKAUTxdLDJH /oto9aD89wCtR8ItJUTgm+DmYAxA7m4v9nEwgtRqKMEbjI2JWnthU+Dd5B7OVoySMKfe yyMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686167362; x=1688759362; h=in-reply-to: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=xinSIPtLD9mwv6iuhS8dp2Mw0+vZbIWYEl17ISiKBzY=; b=hKi4sYGYqezDE/IWd2hWpLv33rbP31fCfMWM2tgta8dCLZk3ts9+FMNviOu0rT0H56 ROtrLa7cWHlQCxLiRfDqa+t9rWRTsRQwoYE2n5rWEpiEWt2op8MCObr3JDf6wEeHrVb8 fY2knMUwyrr4+2GDDMYWzFpaw8SKLiqo4P6CQ3fHornfQCyexv1WsNVzTGD5+IXUXt2N fOzpTvTkt2rY2RG+c46S1S8NAWwjEpQNYEbmHsLkpw4mslfOjXV+TM+n4PZtIf8iR7FG 9vD33NxM759Lq8U0zgnCJh3qr7Pv2k8B0GNmG1E234/5oVtPXrQLE97ya8YTADetggcb Fo9w== X-Gm-Message-State: AC+VfDzBo9by3ggCNlr2uBWOODFpt744hi8miixHoV16nzGAQU+VLz3W IYS58jbZmEP8t4JO2YMpQUAw2YCxsWbZfQ== X-Received: by 2002:aa7:ca4e:0:b0:514:78d4:ec48 with SMTP id j14-20020aa7ca4e000000b0051478d4ec48mr5436642edt.2.1686167361955; Wed, 07 Jun 2023 12:49:21 -0700 (PDT) Received: from tom-HP-ZBook-Fury-15-G7-Mobile-Workstation (net-188-217-50-121.cust.vodafonedsl.it. [188.217.50.121]) by smtp.gmail.com with ESMTPSA id n2-20020aa7c682000000b00514b3a2008esm6533877edq.2.2023.06.07.12.49.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 12:49:21 -0700 (PDT) Date: Wed, 7 Jun 2023 21:49:18 +0200 From: Tommaso Merciai To: Conor Dooley Cc: jacopo.mondi@ideasonboard.com, laurent.pinchart@ideasonboard.com, martin.hecht@avnet.eu, michael.roeder@avnet.eu, linuxfancy@googlegroups.com, Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Liam Girdwood , Mark Brown , Sakari Ailus , Hans Verkuil , Marco Felsch , Gerald Loacker , Mikhail Rudenko , Nicholas Roth , Linus Walleij , Michael Riesch , Benjamin Mugnier , Krzysztof =?utf-8?Q?Ha=C5=82asa?= , Shawn Tu , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 2/3] media: dt-bindings: alvium: add document YAML binding Message-ID: References: <20230607131936.382406-1-tomm.merciai@gmail.com> <20230607131936.382406-3-tomm.merciai@gmail.com> <20230607-pyromania-germinate-b5e3dbd54632@spud> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230607-pyromania-germinate-b5e3dbd54632@spud> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Conor, On Wed, Jun 07, 2023 at 06:16:19PM +0100, Conor Dooley wrote: > Hey Tommaso, > > On Wed, Jun 07, 2023 at 03:19:24PM +0200, Tommaso Merciai wrote: > > > + alliedvision,lp2hs-delay-us: > > + maximum: 150000 > > + description: | > > + Low power to high speed delay time. > > + > > + If the value is larger than 0, the camera forces a reset of all > > + D-PHY lanes for the duration specified by this property. All lanes > > + will transition to the low-power state and back to the high-speed > > + state after the delay. Otherwise the lanes will transition to and > > + remain in the high-speed state immediately after power on. > > + > > + This is meant to help CSI-2 receivers synchronizing their D-PHY > > + RX. > > Since this new version was posted before I got a chance to reply, I > still don't think it makes sense to allow 0 & then special case it, > when testing for the presence of a property is trivial. My bad, sry. My keyboard is too quick :P > The property should describe some behaviour/property of the hardware, > not be a mechanism to convey what you want to write into registers. > > I don't really get why you'd not do: > If present, the camera forces a reset of all D-PHY lanes, for the > duration specified by this property. All lanes will transition to > the low-power state and back to the high-speed state after the > delay. > Otherwise the lanes will transition to and remain in the high-speed > state immediately after power on. > You are suggesting the following solution: minimum: 1 maximum: 150000 Right? Personally I prefer to keep also 0 but never mind is ok also this solution. :) Let me know if I have understood correctly pls. Thanks in advance :) > > +static int alvium_get_dt_data(struct alvium_dev *alvium) > > +{ > > + struct device *dev = &alvium->i2c_client->dev; > > + struct device_node *node = dev->of_node; > > + struct fwnode_handle *endpoint; > > + int ret = 0; > > + > > + if (!node) > > + return -EINVAL; > > + > > + ret = fwnode_property_read_u32(dev_fwnode(dev), > > + "alliedvision,lp2hs-delay-us", > > + &alvium->lp2hs_delay); > > + if (ret) > > + dev_info(dev, "lp2hs-delay-us not found\n"); > > And this print, which I also don't understand the presence of as > well behaving driver should be quiet, goes away. Then you are suggesting to drop this print right? Thanks for your review! Regards, Tommaso > > Cheers, > Conor. > > > + > > + endpoint = fwnode_graph_get_next_endpoint(dev_fwnode(dev), NULL); > > + if (!endpoint) { > > + dev_err(dev, "endpoint node not found\n"); > > + return -EINVAL; > > + } > > + > > + if (v4l2_fwnode_endpoint_alloc_parse(endpoint, &alvium->ep)) { > > + dev_err(dev, "could not parse endpoint\n"); > > + return 0; > > + } > > + > > + if (alvium->ep.bus_type != V4L2_MBUS_CSI2_DPHY) { > > + dev_err(dev, "unsupported bus type\n"); > > + return -EINVAL; > > + } > > + > > + if (!alvium->ep.nr_of_link_frequencies) { > > + dev_err(dev, "no link frequencies defined"); > > + return -EINVAL; > > + } > > + > > + dev_info(dev, "freq: %llu\n", > > + alvium->ep.link_frequencies[0]); > > + dev_info(dev, "lanes: %d\n", > > + alvium->ep.bus.mipi_csi2.num_data_lanes); > > + > > + return 0; > > +}