Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp385340imm; Wed, 13 Jun 2018 01:54:41 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK+XJIaColRx97SAjHVEIyI6ZgMdW7+RRCtOvB2UzsUtzmPLqIsLf5fS7kd5WxoglzyRlBq X-Received: by 2002:a62:ae06:: with SMTP id q6-v6mr3993344pff.17.1528880081033; Wed, 13 Jun 2018 01:54:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528880081; cv=none; d=google.com; s=arc-20160816; b=QKscNWl+6lo5xoR4UBWjaTNayJlbCi77IS1tBZO9yQe6HF/PLj+jLzhE12U5U7wiNV TyBgUaDURTyLkEjSBuVaQxeMoJRo6TjVfeYpTEf2sOzUl9MKIJfTsyj/LunAfLOiSJB3 /y0HghmbAYbWkOD88Qb1K2Gx/eyLssrzjSaLii7h7rLtikXKOtTwu0UdfqyGn2VcCIH0 MKYFCo9hB41GgT/WTpUhKHV60cfZ0g+HbkArJnYkDdr9KhtFqJKchc4SN35qSS4te1hj AbjeAiAMTg2ufBkv8hI7HAUyNWpa4PyZW9zPZ0NasgGltlkvisaI+vwGAUV7fHIdLoPx yUWw== 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 :arc-authentication-results; bh=dRAwUrqCAvTvutnolJbHOaHl55SyhMZEFEXZmfjbNLQ=; b=ZDDV/8aUsHcLOwDQPdRVIPaXNOdKG+j89JINLoStXNG6om8N5h3FDC+R8U6szhYmsI Eyf+6NbpYfXtUzbU3FNnq53D+smHHDhlRHRrg33Vnmfjv9XI04QkEOD9FGTd8ONbSgft VQy7piE/g8LhdBj7IcuGICi6V4KiXjeKTiVrW7w4t39oVkQj8rRO6q6BZFHrskVGspKq zZXYeyA1b9hWW+I5dwW+JtUftqDSx5q43z6P+BcbzHwJTNmq1fg5/MUu144BOv/OxmLx zoNLvgFlXDSIjw0mNWotC/fXu3bCZB/NUYIwvSpNYWFzNthdl1KQwdPWx7IvdYX/UFiC btFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KFP+T55r; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p9-v6si2370617plo.208.2018.06.13.01.54.26; Wed, 13 Jun 2018 01:54:41 -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=@gmail.com header.s=20161025 header.b=KFP+T55r; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935041AbeFMIxv (ORCPT + 99 others); Wed, 13 Jun 2018 04:53:51 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:39388 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933732AbeFMIxr (ORCPT ); Wed, 13 Jun 2018 04:53:47 -0400 Received: by mail-pl0-f65.google.com with SMTP id f1-v6so1141712plt.6; Wed, 13 Jun 2018 01:53:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dRAwUrqCAvTvutnolJbHOaHl55SyhMZEFEXZmfjbNLQ=; b=KFP+T55rqBRa4J2UMgswmTtCeyx7/1U+7zFapgADCM1e5PxVn3jZkjLDPLgH2TThzw IzQDz7Xhfht6CEmakfDHqZSmwV0yFOLdaHzgGejNuSuPj2WMICSCP38uv6iSjP6q6ZDZ mWJYaE5SYe8D6cwdh4wK86lUX1pfT0OQ4egvXE148dY6XPBQ5S4V50zvo6gHFbvmpnrH W5dh/2vF8xT0pw8l402+zZ2QH7+NdenI6QrHMQc4/ZKdiIemmBJkyM/kejdhcT08/GJz k2ZsRLkzTxo0rziIJBmQs4M+IRbVDqHCsQjSldEYnCYnBYHi9lV5WrNUsyN0H/RPyYhj FoJQ== 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=dRAwUrqCAvTvutnolJbHOaHl55SyhMZEFEXZmfjbNLQ=; b=iGK6d5OtQmkYHFXJbKPuZY9jLclP5dtFBJPoE+Y0/R1VuuH594fSwfRBoLHaGbtsuf GbZGYZFexWNy2EA/QPuVX12vC4ZCS3I4kJkvXc7GXzZ1lj6HA2PAAsjAilANaA79ua4L KRkKnbsqnEDV6ycToPijCR+vVKwXSXm51j/Du9cPZefs2ZnKi0gQFf5lyM008vkez1CL laiRrdvUg6nNzEPUJu41awgqdLIKCpTYPm7brOJW1KgjElZDr4lVshJ5i99uxNjdX3QM ibvtBIx87aJTKLFB3NgD2uIKiQweRHqpEm6o691o1B6utz17jJKMYFbL0uAqlo9U4qw+ d5og== X-Gm-Message-State: APt69E2EzkkcXd/XosTq5NHjCIyvJ3kRBrmA2/mcROvl1kBZR5qdgjzB RewwCXoHovlgNZ+Ws+bY+caz9pqmPjGjiumiMao= X-Received: by 2002:a17:902:43a4:: with SMTP id j33-v6mr4242750pld.118.1528880026661; Wed, 13 Jun 2018 01:53:46 -0700 (PDT) MIME-Version: 1.0 References: <1528187462-47093-1-git-send-email-michel.pollet@bp.renesas.com> <1528187462-47093-3-git-send-email-michel.pollet@bp.renesas.com> In-Reply-To: From: M P Date: Wed, 13 Jun 2018 09:53:35 +0100 Message-ID: Subject: Re: [PATCH v8 2/5] dt-bindings: clock: renesas,r9a06g032-sysctrl: documentation To: Geert Uytterhoeven Cc: michel.pollet@bp.renesas.com, linux-renesas-soc@vger.kernel.org, Simon Horman , Phil Edworthy , buserror+upstream@gmail.com, Michael Turquette , sboyd@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, geert+renesas@glider.be, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org 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 hi Geert, On Wed, 13 Jun 2018 at 08:17, Geert Uytterhoeven wrote: > > Hi Michel, > > On Wed, Jun 13, 2018 at 8:38 AM Michel Pollet > wrote: > > On 11 June 2018 11:01, Geert wrote: > > > On Tue, Jun 5, 2018 at 10:36 AM Michel Pollet > > > wrote: > > > > The Renesas R9A06G032 SYSCTRL node description. > > > > > > > > Signed-off-by: Michel Pollet > > > > > > > --- /dev/null > > > > +++ b/Documentation/devicetree/bindings/clock/renesas,r9a06g032- > > > sysctr > > > > +++ l.txt > > > > @@ -0,0 +1,32 @@ > > > > +* Renesas R9A06G032 SYSCTRL > > > > + > > > > +Required Properties: > > > > + > > > > + - compatible: Must be: > > > > + - "renesas,r9a06g032-sysctrl" > > > > + - reg: Base address and length of the SYSCTRL IO block. > > > > + - #clock-cells: Must be 1 > > > > > > (repeating myself) No clocks/clock-names for the external clock inputs? > > > > > > "RZ/N1 has 3 clock sources, 1 reference clock inputs for RGMII, and 2 > > > reference clock outputs for RMII/MII." > > > > Well, I'm trying to keep the binding as simple as possible, to dodge any > > further discussion. Adding these will be possible later, I don't need them > > for the moment anyway. > > Don't you? The external clock inputs are at the root of the clock tree, so I'd > say you need them. Bolting them on later may become complicated, especially > if you care about DTB backwards compatibility. Well the input is fixed frequency -- and there is a clock (gate) created for it in the driver (CLK_RGMII_REF) so you can turn it on/off if you like... The only configurable bit is a *nightmare* as the selection bit for whether it is coming from CLKOUT_D8 or from an external input is in a *completely different IP block*. I'd need another iomap() and all that stuff, and a custom driver for it. If I were to implement it, I'd have to add a custom driver for that clock, use the current gate as a parent, iomap the selection bit register etc -- basically. All of that for a use case of *none ever* as most people would probably tweak that bit in the bootloader anyway -- also, I'd have zero capability for testing it. As far as the output, they also have their own gates (already created). They are also fixed frequency and the only thing that matters to them is the pinmux settings. So (soon) with the pinmux driver, you can enable that clock properly without a special driver, just by adding that gate to your ethernet, and add the pinmux config for it. So what do I go with that? > > The reset controller subsystem is optional anyway, and used only by a small > number of drivers, so support for resets can definitely be postponed. > > > Did you have a chance to review the clock driver proper? I'm pondering > > sending a v9 since it's been a week (with very minor changes) -- but I > > don't want to interrupt if you were in the process of reviewing... > > I had a quick glance. Looks OK mostly, so it's definitely heading for the right > direction! > One remaining question: do you need CLK_OF_DECLARE()? > Is there any reason your clock driver cannot be a platform driver, which is > the recommended way? I copied it straight out of clk-rcar-gen2.c -- I don't 'need' anything more than instantiating my driver; does it make a difference? ie a one liner macro vs adding an extra struct, 2 functions to do the same thing? Just curious, sometime I lose track of that the goalpost is -- for years I understood that having OF was simpler and better all around? Thanks! Michel