Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp2030674ima; Thu, 25 Oct 2018 08:32:53 -0700 (PDT) X-Google-Smtp-Source: AJdET5fNuWrcZxjlhWFwHbBtSNQjQkApuJzVHhJ8K6Ga7LkwJvdBq7nvJ+nzK8J4OTs+nhWhhErx X-Received: by 2002:a17:902:8347:: with SMTP id z7-v6mr1943464pln.111.1540481573553; Thu, 25 Oct 2018 08:32:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540481573; cv=none; d=google.com; s=arc-20160816; b=LbAJHPv3ZMup/6fIsMXmlJvpsClPTlUPJ9S+o4ybNhmaJhrfpkCOXEKfTo6CvGRNfy W4xgD1uA5JWcgtrCpkFdWNTPH9o15Ifos3pFSGe40bbppouihoeQAZJzXNLTnTm8syHi iDwRi5Lz4OjRIIvP2XqPxUV9zwnRYLevH3IGKUcHryEjHAHYwlvthIObGE1GF3FYi/+W JSsfqYHxrBfs2dOQKICThTsIZkNk19KegAwSYjlqGfJ2Dc+UX0Vsj1Mer8HPEgrEuUJG YlR4wG6nqqmSef+ReElU+E8n6tOgIaM3RMJY9w59ALABSpAct7//ej9Q4QWmx83T9MEc 3NjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=SQL/7z0T1FppHZ3MDprYYl9iB96lWCcenFVBmGSkzoQ=; b=smvROhDNTkWfJ1ahRbmQarFsqg6yThlfS79U60qn01Oj8oQr8lOgPP8gRWpxaRB2wP o1X+0Y51dq5sQzFIra2KxD5DYwFZiu2hbsu3B3hA2OZmMOvpwGYjhxhWXSidpeeHhnCa 4gib6C1KWs32u2COB6WKQ+HbYn7u7JUKjC5+Z7fC1QSiqoHJd2LnQ68NknbkSxV/J1Ys gljTXJDeJR/v+UH3wX2bVxncSGbD+mKZhWpl7DJnAGpu0CNJoPEvXqfQVaOHhddYUhzQ sSXzM4+NksSbGY/PoyjsYexa74L2C/M31dizHEYN7Aif3IDmwTvigtgJHc0Dp0KY6S0Z APYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=HBquxzpr; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d11-v6si8105490pgd.342.2018.10.25.08.32.37; Thu, 25 Oct 2018 08:32:53 -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=fail header.i=@lechnology.com header.s=default header.b=HBquxzpr; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727697AbeJZAEo (ORCPT + 99 others); Thu, 25 Oct 2018 20:04:44 -0400 Received: from vern.gendns.com ([206.190.152.46]:36550 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727411AbeJZAEo (ORCPT ); Thu, 25 Oct 2018 20:04:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=SQL/7z0T1FppHZ3MDprYYl9iB96lWCcenFVBmGSkzoQ=; b=HBquxzprUZlsuSIxaZREkFNVbV R6pTEfAizgjkR9HjxKyEAVJpfC1iRC9TD6rsniM82ezPM1Fa2F3t9nCwOPj/aF3QcsZcVAlbH4aB9 GxdOu+nj6eegwL3hHM+JZjwtJLANTqFBMfyPkHePKVKn1TYtMFZ2eSaZHOqusmPyV3r6/+/+plSV7 PSwxv8djvZEu1ga8NhrywOkOOSLaSuFesNzxHVwnl/BBcrWCfY2HzhNpjd7WQZLf0cX2gkO0fS9SR RnFSh8SBBjukeXNWsB6Do3xj7bQWgTSX1da0mKlULwGrGiTyd+n+3OPcvJuVbvaBeh9hU2X7mf9Hn B6mI8djg==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:48694 helo=[192.168.0.134]) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1gFhb0-007wD6-Dd; Thu, 25 Oct 2018 11:30:50 -0400 Subject: Re: [PATCH anybus v1 2/4] dt-bindings: anybus-bridge: document devicetree binding. To: thesven73@gmail.com, svendev@arcx.com, lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, afaerber@suse.de, treding@nvidia.com, noralf@tronnes.org, johan@kernel.org, monstr@monstr.eu, michal.vokac@ysoft.com, arnd@arndb.de, gregkh@linuxfoundation.org, john.garry@huawei.com, geert+renesas@glider.be, robin.murphy@arm.com, paul.gortmaker@windriver.com, sebastien.bourdelin@savoirfairelinux.com, icenowy@aosc.io, yuanzhichang@hisilicon.com, stuyoder@gmail.com, linus.walleij@linaro.org, maxime.ripard@bootlin.com, bogdan.purcareata@nxp.com Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <20181025135515.8397-1-TheSven73@googlemail.com> From: David Lechner Message-ID: <68f2d881-0c22-60e3-e79f-b8c7c2c02d06@lechnology.com> Date: Thu, 25 Oct 2018 10:30:49 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181025135515.8397-1-TheSven73@googlemail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/25/2018 08:55 AM, thesven73@gmail.com wrote: > Hi Linus, thank you for the patch review !! > >>> + - pwms : the pwm connected to the bridge's 'pwm input'. >> >> That is really unintuitive and needs a detailed explanation. What >> is a bridge doing with a PWM? Is it 100% certain this is a PWM, >> it's not just a .... clock? A pwm is a pule WIDTH modulator and >> I can't for my life understand why a bus bridge needs a signal >> with variable pulse width, but surprise me! :D > > You are 100% correct, this is a clock ! > The hardware designers attached the bridge's clock input to an iMX pwm output, > and instructed us to provide a clock with 50% duty cycle and a certain freq. > > The only way I know to activate a pwm is to connect it to a driver in the fdt, > then inside the driver enable the pwm, like so: > > + /* PWM */ > + pwm = devm_pwm_get(dev, NULL); > + if (IS_ERR(pwm)) { > + dev_err(dev, "pwm not found\n"); > + return -EINVAL; > + } > + pwm_get_args(pwm, &pargs); > + period = pargs.period; > + err = pwm_config(pwm, period/2, period); > + if (err) > + return err; > + err = pwm_enable(pwm); > + if (err) > + return err; > > This is why the bridge driver has a dependency on a pwm. > If the pwm could be enabled individually, I could drop this dependency. > Can you think of a way? How about using the pwm-clock device tree binding to turn the PWM into a clock? Documentation/devicetree/bindings/clock/pwm-clock.txt