Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp461899imu; Sat, 17 Nov 2018 03:19:37 -0800 (PST) X-Google-Smtp-Source: AJdET5dA494tRmatky4NHenwqBTlDwaO29+rdDloX6Yp9+/U74AGNehhSGaarSHctwHUyhuLnGim X-Received: by 2002:a65:48c4:: with SMTP id o4mr12918603pgs.371.1542453577192; Sat, 17 Nov 2018 03:19:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542453577; cv=none; d=google.com; s=arc-20160816; b=gzqlxjEYjPQTyQZwoHEpONmlo3REgYbaBSyc1w5+rpH+Ufj00TeSGIBHTAWU5wOyX1 iuMhmzJDkVeMVncsFNDQVMagJaberIl0h6Y3e157P9c8fBds4geJldSluP6pyD+7NCUn sId4lR1f5jgN4vI4aRhMVdXYHzINUAtyZL7cCbtUhqnU+KkyWe48zQryvLbPdkiP2Q0G wim3XIqDeJ/0a4SXc7fPYadInc9Hg7Ag46bq1Gp8hHqngUfjSvZVgTQsaQtLQnLd+9LP HaByTTZEhhxJGbJ5u4P8UUJZDxImVSTgOcGSzod2Rhjn22zpH6J7g6tURMXibBqnFAm+ Xx2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=DeOKk2L7bKLXteIWSWMcRk/7avbZnCJV7cFfKOmdHmE=; b=k/Uhik2DJddZRhEDDm0G2IoYnz2v5+e7R+HChUtys9mFHUgGp+B0u4ZgYrEXQy21eA QAsqLNm4/E19S7/52wZ1ban/IsNn3AxeEnaqL3b9PsuFWIn10hfDX5vsVK3ny4k8YzEz lF+CQMIJY7zoE1t+iRE5J6JU5kBpEDP4gJ5QDmWOXFQYX19bKwvEyMQraRl60ECXv543 +d5GC6LMX9ahlhLIMLOgN3pYmL9/vy2w6rXT2dB637Om4tEjbKgCVWthiEKsYqIXeknW DuiVZ1QtilDQVZoRO4J5arY9sHXSR1QeijHT7rp0Y0vpbcEsU0Ta85XgE+WJMBtDUQDS kc/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=NWSwkeHW; 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 u11si106354plq.287.2018.11.17.03.19.19; Sat, 17 Nov 2018 03:19:37 -0800 (PST) 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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=NWSwkeHW; 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 S1726205AbeKQVe6 (ORCPT + 99 others); Sat, 17 Nov 2018 16:34:58 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:40285 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726003AbeKQVe6 (ORCPT ); Sat, 17 Nov 2018 16:34:58 -0500 Received: by mail-wr1-f65.google.com with SMTP id p4so18202644wrt.7 for ; Sat, 17 Nov 2018 03:18:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=DeOKk2L7bKLXteIWSWMcRk/7avbZnCJV7cFfKOmdHmE=; b=NWSwkeHWqvIRMj7qPqrWicJ2ilNlAekfBTHMvUV4dbVEY1ymvv8kJ+JupJP523LDrP 9TBOoaR/Ko0/DFKTb65EcvbB02EqtQRC9XKkeb4O9z9AKqnP1o75AIVuDbH39w6Tl9fN Vl0+UCfwyUXmVLUkwy/CnkkNaRLx4QE1HYvPsNWL01nC1HbkfP9Ad34C+k8uYCxWRlGV isTG02T6C1HHuzELyZIn2MPd7/phxRRnw2iNa+PmpjQF3kHKHezkvGC1sxvIG3ZT/m/D CSROXxgro8CAEUlno924e1Vfm94hwXyt6Gm4dLLg+1CI9zv8+UFmGd3skBPoycO5730i iQ1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=DeOKk2L7bKLXteIWSWMcRk/7avbZnCJV7cFfKOmdHmE=; b=gyRlI8326JrG9kRqigv6QNMes0OAb/EjF802hM9ksVD1NHVNaptI7cgCMh+wtjXZfM oerqlYtu3YrR/DNMCfLBInvxoSUclLiPGfsm8io2IyhYFFCoV80HHPjBuWTflTq4s5gk Gnk9FrjANl/UJUSF6tN36l8MQU0bmmZ+DbQljfz9xwlBkqKHIANpMtMxtOx/9B8advPn NNHAeDVTM9pVuagFurg1AzL0cnQuLP6AG5YX/wfY0TGfOFtnM/sSysbFl9s6r7pTN+AN fhBfmsTa2fQw6NdG0QcOX2Cdaoih0V/NXl/6xf4qPwu0kfTdTUhjzlFHQUsFyvTThtBB klPQ== X-Gm-Message-State: AGRZ1gLgbiqS1jd2RSOKZMkaC0jbLJ4sfOjS5KhLk1g+GQt5+qojFSUJ jUCcAuAL3DGUM0MuQXmjxO1++A== X-Received: by 2002:adf:8b0a:: with SMTP id n10-v6mr11791416wra.282.1542453514380; Sat, 17 Nov 2018 03:18:34 -0800 (PST) Received: from localhost.localdomain (176-137-58-115.abo.bbox.fr. [176.137.58.115]) by smtp.gmail.com with ESMTPSA id k5-v6sm50797646wre.82.2018.11.17.03.18.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Nov 2018 03:18:33 -0800 (PST) From: abailon@baylibre.com To: georgi.djakov@linaro.org Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Alexandre Bailon Subject: [RFC PATCH 0/2] iMX7ULP interconnect framework Date: Sat, 17 Nov 2018 12:19:03 +0100 Message-Id: <20181117111905.29091-1-abailon@baylibre.com> X-Mailer: git-send-email 2.18.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexandre Bailon The goal of this patchset is to use the interconnect framework for iMX7ULP SoC. This is sent as a RFC because I think the driver could be more generic, and, I had some issues with the clocks and I know the way I dealt with it is probably not the best one. In addition, this patchset has been written and tested on older kernel (4.9), and I don't expect it to applies / works on upstream kernel (the support of SoC itself is still not there). There are two interconnects, NIC0 and NIC1: //==============================\\ || -------------------- || \\=|m0 s0|= || =|m1 s1|===\\ || =|m2 NIC0 s2|= || || =|m3 | || || =|m4 | || || -------------------- || || //=================// || || -------------------- || \\==|m0 s0|=// =|m1 s1|= =|m2 NIC1 s2|= =|m3 s4|= =|m4 s5|= =|m5 | -------------------- ------- ------- NIC0 | DIV | NIC0 DIV | DIV | NIC1 DIV -----| |----------| |--------- ------- ------- Although NIC0 and NIC1 are interconnected, some requests could apply to only one of them. This could cause some issues with clock. Basically, scaling the frequency of NIC0 will also scale the frequency of NIC1, so we have to update both of them. Simillarly, updating the frequency of NIC1 may also require to change NIC0 frequency. In order to easily deal with it, the driver create only one device for the two interconnects, and update clock frequency of both interconnects at same time, when the last node is reached. Ideally, we would have two device, which would make the driver more generic, but currently, I'm not sure how to make sure that the clocks are always at the expected frequency. Doing that would give us the possiblity to use the driver for other iMX SoC (would just require to add the bus topology for that SoC). Alexandre Bailon (2): Add support of imx7ulp to interconnect framework dt-bindings: interconnect: Document imx7ulp interconnect bindings .../bindings/interconnect/imx7ulp.txt | 17 + drivers/interconnect/Kconfig | 1 + drivers/interconnect/Makefile | 1 + drivers/interconnect/imx/Kconfig | 9 + drivers/interconnect/imx/Makefile | 1 + drivers/interconnect/imx/imx7ulp.c | 369 ++++++++++++++++++ 6 files changed, 398 insertions(+) create mode 100644 Documentation/devicetree/bindings/interconnect/imx7ulp.txt create mode 100644 drivers/interconnect/imx/Kconfig create mode 100644 drivers/interconnect/imx/Makefile create mode 100644 drivers/interconnect/imx/imx7ulp.c -- 2.18.1