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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3EA0C04E30 for ; Mon, 9 Dec 2019 19:34:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A2E26214AF for ; Mon, 9 Dec 2019 19:34:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726495AbfLITeO (ORCPT ); Mon, 9 Dec 2019 14:34:14 -0500 Received: from mail-oi1-f193.google.com ([209.85.167.193]:35003 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726354AbfLITeO (ORCPT ); Mon, 9 Dec 2019 14:34:14 -0500 Received: by mail-oi1-f193.google.com with SMTP id k196so7477121oib.2; Mon, 09 Dec 2019 11:34:13 -0800 (PST) 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=gPj5BnCRFlVLAcTocdSdKOif0Ppf6lvvauzu7g3ZWKw=; b=TGBAOSU73tA20LO5J0gKwaJsLh7g8tzWmTqEPLKkjtv5IWhrf4Wcmv0TXnjxqgL1jF yBC1O9bdvqMQq33RimLfL/ksA1Cmyr9qX8HizrOeGMJgCGR+VypKI90KWVIoUC19NG/A LxhIOMr49DTnR+kFuE1K+xhQo/h3YX60NAmSqfVkq+5yGWjSLz8cPG2muk7XT+RGrvE6 aGpiRRBDspUMs+FPalSct5iyOLq7ynW6eGQViB/TzVqd5+aYS9ddd2PDvQ4NUzUTgQCg EElt3hH8q9QNFd9+31jFkmAGqM/x10Mo7GsOHgGzf8cyenhvU58jyvRwLv8GNEU0lGxg y52A== X-Gm-Message-State: APjAAAW1d5eON/a4zDieha6S1Uq4P/Zz08jbswp223vrkwFt8ShnqxtS 59S1XLycvi56/e6LdB5kPojw8B+KYykPdKELydY= X-Google-Smtp-Source: APXvYqwJ0Yps000beZiYNpb0g4ISSQQDOIbeEGH4u9DT8U2zSZ93q58ESvoZEPACv8jSmyP8+1aFBlobGs4verKHE88= X-Received: by 2002:aca:4e87:: with SMTP id c129mr624324oib.153.1575920053160; Mon, 09 Dec 2019 11:34:13 -0800 (PST) MIME-Version: 1.0 References: <20191206134202.18784-1-chris.brandt@renesas.com> <20191206134202.18784-3-chris.brandt@renesas.com> In-Reply-To: From: Geert Uytterhoeven Date: Mon, 9 Dec 2019 20:34:02 +0100 Message-ID: Subject: Re: [PATCH v2 2/6] dt-bindings: spi: Document Renesas SPIBSC bindings To: Chris Brandt Cc: Mark Brown , Rob Herring , Mark Rutland , Geert Uytterhoeven , Michael Turquette , Stephen Boyd , linux-spi , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux-Renesas , linux-clk , Mason Yang , Sergei Shtylyov Content-Type: text/plain; charset="UTF-8" Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Hi Chris, On Mon, Dec 9, 2019 at 4:45 PM Chris Brandt wrote: > On Mon, Dec 9, 2019, Geert Uytterhoeven wrote: > > > + # This example is for "External Address Space Read Mode" > > > + spibsc: spi@1f800000 { > > > + compatible = "renesas,r7s9210-spibsc"; > > > + reg = <0x1f800000 0x100>, <0x20000000 0x10000000>; > > > + clocks = <&cpg CPG_MOD 83>; > > > + power-domains = <&cpg>; > > > + interrupts = ; > > > + #address-cells = <1>; > > > + #size-cells = <0>; > > > + }; > > > + flash@20000000 { > > > > This does not describe the hardware topology: the flash node should be a > > subnode of the spibsc node, as it relies on the spibsc being clocked. > > So for the "XIP" case, I originally tried adding an "mtd-rom" flash node > under the spibsc node, but then the mtd-rom part never got probed. I > guess that was because it didn't register a SPI controller. To probe subnodes, your node needs to either be compatible with e.g. "simple-bus", or have its own driver that calls of_platform_populate(). > But, I guess if we go your method... > > spibsc: spi@1f800000 { > > compatible = "renesas,r7s9210-spibsc", "simple-pm-bus"; > > Then after the spibsc driver fails and the "simple-pm-bus" driver tries, > it will succeed and the simple-pm-bus driver will start probing the > subnodes (in my case, the mtd-rom). Yes, and unlike "simple-bus", "simple-pm-bus" does handle Runtime PM, so the clock will be enabled when needed. BTW, I still think "simple-bus" should handle Runtime PM, and "simple-pm-bus" should not exist. > > and applying "[PATCH] mtd: maps: physmap: Add minimal Runtime PM support"[1], > > the memory-mapped case should work, without your spibsc driver. > > Good. > So we can add the SPI-BSC clocks for RZ/A1 and RZ/A2 (even without the > SPI-BSC driver) and still have a working solution for XIP_KERNEL. > > So in the end, this all seems like a very simple solution to get > everything I wanted with minimal complexity. Exactly. > But, if Sergei is going a completely different route for R-Car, I guess > I need to understand that first what he is trying to do before I really > push for this driver getting in. > Again, this driver was only when using the SPI-BSC HW, not the full > (different) R/W HyperFlash controller HW. That would be a separate driver. Yeah, the "real" serial FLASH functionality needs its own driver. How to fit all the SPI/QSPI/HF pieces together in a working driver is still TBD. 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