Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4507748ybb; Tue, 7 Apr 2020 08:48:51 -0700 (PDT) X-Google-Smtp-Source: APiQypLDCB3WUH9rtVJjPaLEx4aqL5dQbqcHAmkG3pVY6WBhBAh+eKRIepfwp1GW1/2dAhImzT9u X-Received: by 2002:a05:6830:146:: with SMTP id j6mr2084426otp.117.1586274531172; Tue, 07 Apr 2020 08:48:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586274531; cv=none; d=google.com; s=arc-20160816; b=aNsEHaQ4J9A0cjogsFuCGNrG4HbefkvOhSzIhuxKI3JJ0I28JpTqZavyxbLLgL609Z fp72huexvlKH2XYSLRgdd0esAXl4n2RJn/+WamsUxxnAMRd0W1hAG/ECpUMza/7SAleq xOnKl4VmOqB+gacbOTiV3WBksLK8PK9tE+I6VxFndZkvk7OOjmUKSnmC8ve5MhcnAQUN 5fqBvBGY/0qw5nndwl5J4zqgfQLp8681/ZS9iCOBRThchghrkAUWvlxzyNKcjm/cdenG z+DmgUjyhVGYyPtrOyj8culPtwiVKZma9uTilb0t/wKBJB6VhrF08J+JCuO/PpAer7Ay 9Uxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=C5+Tj/x0seqvn19MWhPZoKn+VlDCEMR9Hc+Aq3tkzY8=; b=P2+qxgs4lv8PRJPatn0gEM2Apq7NP4yUkSk0Y+oXKz0TGNiqWOAVRUFJWY/JODGykC 7LZmINmdRjDf+1kz3w2E6w9MnzQ8Qon2QYtFC4ojkGfl5KFa+WE2UiC9MCOIHK5kei8a Ha7YQA4jIyw2IaQwpK0VoLzH49BvMNfFj5yjtkC7v5SlGHGXEupNz9aZy4fYYVJDmzWk bP4pbYiOvVEAyVUeUfmQVgFUkOV0RrTcy946DO5pRTxIPBzI+RA/HYHK26k2GcrndRMI nCGfnMmpU3agdc1oEZYZuANUYSCpDefO9VJeoBhL8zZQpyazb276hx/oTiX6SkADsLLO VA3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AqvyHOEK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j15si1377935ots.187.2020.04.07.08.48.38; Tue, 07 Apr 2020 08:48:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AqvyHOEK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727582AbgDGPrz (ORCPT + 99 others); Tue, 7 Apr 2020 11:47:55 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:47054 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727481AbgDGPry (ORCPT ); Tue, 7 Apr 2020 11:47:54 -0400 Received: by mail-oi1-f196.google.com with SMTP id q204so1879952oia.13 for ; Tue, 07 Apr 2020 08:47:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=C5+Tj/x0seqvn19MWhPZoKn+VlDCEMR9Hc+Aq3tkzY8=; b=AqvyHOEKa5D4KldSTXCJnWs49QR2eXk+zF16yQDJ/jO2g384gpvbB+mCb9j8OEA43m A6MJ5P+j9YHQ9ALT8li8x+DrQzx4FYzIUF4jzdSTBguXP75zfrh9l/P+mR2yC9oUFmbh Yn8a9rA4p42mGrhMH+ty00/pUaHnx9ZPa4dmFBsdcEWiR/R8eLwj7ps7YItEsiliVj9x hc7+ZDQQTkrx9SU1xDncAFv/vXs+HvkGPU5/2aEF17mo20t2DhLi36900gUTcWnRYfiV 5jI4l5PaOBVH08bwik0C/yypiQ4cZP+kcrCOPLy8/Bm/UM9YAF3+Nh+1nBPDRQ+FHO80 SCBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=C5+Tj/x0seqvn19MWhPZoKn+VlDCEMR9Hc+Aq3tkzY8=; b=A6hqcLjpoTCTdFvQ92yserX0yrfqBs6SeWgzxEz7CNHEkCsvuh8eacFRo0ZpZpc/PU UH360z6HUGXbQKzHCXEeTiz4xkHfVBxrkF/ftcWNgMIzfEiPw7W0qkaC+NRZ2C/4StBv 4KlPU0d/95bMO2SEuAlidAWjVUOGverFvFUEKuB4dppw34M04GzFrmud34g6csD7ydWE GoIfAM7h2VNttPGbZw8rk4z2FwGICH0cfYoFSYm9sFEgULfjkiwrEtbRRGlIsJBHXM9D HCsW/ExeU/kN0ZBeI4uKNyNyHJYaJylX7ZVKGJkqTeCnTaEhLuglp5dkovhWCjRwGoVy P0Hg== X-Gm-Message-State: AGi0PuaxQ4QZcnulxUj7r1Ne8nI7kVW8bYST4biaHeMwXw9J4APno6BV 8JITPTPkg18P5bVrWOHanwDL3dOev7dm8ZVFTo+OfA== X-Received: by 2002:aca:ab16:: with SMTP id u22mr2087293oie.133.1586274473098; Tue, 07 Apr 2020 08:47:53 -0700 (PDT) MIME-Version: 1.0 References: <20200331133346.372517-1-robert.foss@linaro.org> <20200331133346.372517-2-robert.foss@linaro.org> <20200401080705.j4goeqcqhoswhx4u@gilmour.lan> <20200403232736.GA6127@valkosipuli.retiisi.org.uk> <20200404093446.vuvwrhn5436h4d3s@gilmour.lan> <20200406083506.GE6127@valkosipuli.retiisi.org.uk> <20200407083647.4mocdl7aqa3x737q@gilmour.lan> <20200407123232.ktvaifhqntgzvkap@gilmour.lan> In-Reply-To: <20200407123232.ktvaifhqntgzvkap@gilmour.lan> From: Robert Foss Date: Tue, 7 Apr 2020 17:47:41 +0200 Message-ID: Subject: Re: [PATCH v6 1/3] media: dt-bindings: ov8856: Document YAML bindings To: Maxime Ripard Cc: Sakari Ailus , Dongchun Zhu , Fabio Estevam , Andy Shevchenko , Tomasz Figa , linux-media , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , linux-kernel , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 7 Apr 2020 at 14:32, Maxime Ripard wrote: > > Hi Robert, > > On Tue, Apr 07, 2020 at 01:29:05PM +0200, Robert Foss wrote: > > On Tue, 7 Apr 2020 at 10:36, Maxime Ripard wrote: > > > On Mon, Apr 06, 2020 at 11:35:07AM +0300, Sakari Ailus wrote: > > > > > But that 19.2MHz is not a limitation of the device itself, it's a > > > > > limitation of our implementation, so we can instead implement > > > > > something equivalent in Linux using a clk_set_rate to 19.2MHz (to make > > > > > sure that our parent clock is configured at the right rate) and the > > > > > clk_get_rate and compare that to 19.2MHz (to make sure that it's not > > > > > been rounded too far apart from the frequency we expect). > > > > > > > > > > This is doing exactly the same thing, except that we don't encode our > > > > > implementation limitations in the DT, but in the driver instead. > > > > > > > > What I really wanted to say that a driver that doesn't get the clock > > > > frequency from DT but still sets that frequency is broken. > > > > > > > > This frequency is highly system specific, and in many cases only a certain > > > > frequency is usable, for a few reasons: On many SoCs, not all common > > > > frequencies can be used (e.g. 9,6 MHz, 19,2 MHz and 24 MHz; while others > > > > are being used as well), and then that frequency affects the usable CSI-2 > > > > bus frequencies directly --- and of those, only safe, known-good ones > > > > should be used. IOW, getting the external clock frequency wrong typically > > > > has an effect that that none of the known-good CSI-2 bus clock frequencies > > > > are available. > > > > > > So clock-frequency is not about the "Frequency of the xvclk clock in > > > Hertz", but the frequency at which that clock must run on this > > > particular SoC / board to be functional? > > > > > > If so, then yeah, we should definitely keep it, but the documentation > > > of the binding should be made clearer as well. > > > > Alright so, let me summarise the desired approach then. > > There's a separate discussion on the same topic here: > https://lore.kernel.org/linux-media/20200407122106.GD4751@pendragon.ideasonboard.com/ Thanks for the link. > > > ACPI: > > - Fetch the "clock-frequency" property > > - Verify it to be 19.2Mhz > > > > DT: > > - Fetch the "clock-frequency" property > > - Verify it to be 19.2Mhz > > - Get xvclk clock > > - Get xvclk clock rate > > - Verify xvclk clock rate to be 19.2Mhz > > The current status is that you should > 's/clock-frequency/link-frequencies/', and in order to replace > assigned-clock-rates, you'll want to have a clk_set_rate to 19.2MHz > between steps 3 and 4 Would we want to 's/clock-frequency/link-frequencies/' for ACPI too? I imagine that would cause some breakage.