Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1891728ybi; Mon, 1 Jul 2019 02:16:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxMzxrkAVei1Cfr4PtKRr7RhjoB4a61SuhgLxmAaR9TDzZXqJNcoBnOPqstCwrn5yh8lc05 X-Received: by 2002:a63:61cb:: with SMTP id v194mr22297322pgb.95.1561972596956; Mon, 01 Jul 2019 02:16:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561972596; cv=none; d=google.com; s=arc-20160816; b=sV3DCzXPOSOvnJo7OcqA3R7LL7U6qCClNrKQXY48h3LPxedOBJh6O2xFDBIDRNyQFM /GOe1qoMDvu5pGlxkCEszkMPkroqw94YLkDVgqIImzRGfmylaQ05P8wmPoTahNWj5Dtd R3KAg6eDHdIn6F3xyrq55MwHc6Bb6OjPIMNY4y5DRQ3rX7tWHGhQc03h1imMkxY3X/Hz It/1ktaTDUWa+rAY/9LhtYqlllyZFzv0/i4OZjBPvGjDzMlv+iqIUyg4b8qjmBo27yUL XNV28Ywta0m4Vxa1YomT2Rc68LDRdwdnVt+5YwGa+1qM7+gwgRu7SfT3c+eCOxCMrFIY AXrQ== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=h5u4pWU3fhpBiHxumPv/qTZvnc0aCekcJz77EzSTwqA=; b=uV8QeC2RaWsbduS1uEsEpJPuuO4OCXi8QqhjF3USRfaIouSYIcGoWVHEd2tqZWPHxI Mh5d144Re6t7F7x9xumLoY03VbAEEUoKNtmz83FPjs2Cb5YqOEECZ+e+FoDW4ExIB/KT JzutolzCFwoYi/+0ycdi2lD4tT+boch7aRZHy5Fk6afHyV8WaSMsRVTq0KKOllDgTW0Z RtB5XNhuChdPyqSVbjHdh5r+9I27kCFt5XauvY4BPbdIRq41JhEAhmgUi/h/3WqIgRcI q+QuaqT4KaXO4KP1d/yjpHGm5u1yegFDbPx7T33xVlNoxWz/h+0zQV8xGzAayHHCdNRt Y4sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b="Y/+nvdVS"; 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 l89si10357152pje.59.2019.07.01.02.16.21; Mon, 01 Jul 2019 02:16:36 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b="Y/+nvdVS"; 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 S1728353AbfGAJNN (ORCPT + 99 others); Mon, 1 Jul 2019 05:13:13 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:37292 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728246AbfGAJNN (ORCPT ); Mon, 1 Jul 2019 05:13:13 -0400 Received: by mail-wm1-f66.google.com with SMTP id f17so15009243wme.2 for ; Mon, 01 Jul 2019 02:13:11 -0700 (PDT) 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:mime-version :content-transfer-encoding; bh=h5u4pWU3fhpBiHxumPv/qTZvnc0aCekcJz77EzSTwqA=; b=Y/+nvdVSW313vqjXZLRZxPJSbMTY9V5q7d9kbNc707FQ5DLekBH9JBsqxcqQSdcpsG fa9fbsfFISHQYuSag01PKjhD83+23p8PsdwbCp6pLzymoDUwiIVRvK4/+jpO8JTVE1+a VvVSu1ae4DHEwx1lAL0LzX6VXG4GNQybC3ts7Z2vwR2gFq4KUWAJMLBjtMaGjD6NVTdv OLEZU+KjrXbbZtizvbXrdIf3H1cn0/yYeD4OJUF9i7JYk1covruE8wiu3q+SvWM7oq1l b38IsjfQaAtcb9JYO7ZSRG5G0gWBlvmfIWH+SxRWLqT1JkrWBCVlFXlw0AkG+l+Tc+88 +p3g== 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:mime-version :content-transfer-encoding; bh=h5u4pWU3fhpBiHxumPv/qTZvnc0aCekcJz77EzSTwqA=; b=rxECGquohLRAMVZSH/12hmiWlLMrwk3w9NFU+X1oAMM+YmyoQwv+TmDJv4ryI6FEB6 1AO/HvYhm/YZJpgOizbRQo0CPfbB9rWF9rGhiflk0Kffv+K6KFFJ548qKSO2o6GfrtpF n6ddLLH6j8OSBONjdEhtj61+jDuNhIxHQGHdKyGUZ3WxZHzB5wIJfRHwKUcippVaCEV5 COfzI4nWYM+B4ElIi/Ye3l0Hv2a7rzvddeFiAWiw5oyoObKlo85yWwaSwtxS8mw/8glb VRSH0AevLWBktM30IW8KUslq44XPj8QzZkr3UadV1Yv9yuggZQFv8QrGm5eqnyZYrp8h b+4Q== X-Gm-Message-State: APjAAAWQeLCNtXuUQ+j1wnUt0ihzLjvj50ZqDMqEg8xieI9nXLkRuRqR fZ399SADILgoUwXMwFI/8qEfP/bXinI= X-Received: by 2002:a1c:df46:: with SMTP id w67mr15810427wmg.69.1561972390865; Mon, 01 Jul 2019 02:13:10 -0700 (PDT) Received: from localhost.localdomain (176-150-251-154.abo.bbox.fr. [176.150.251.154]) by smtp.gmail.com with ESMTPSA id i16sm6305659wrm.37.2019.07.01.02.13.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Jul 2019 02:13:10 -0700 (PDT) From: Neil Armstrong To: jbrunet@baylibre.com, khilman@baylibre.com Cc: linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, martin.blumenstingl@googlemail.com, linux-gpio@vger.kernel.org, Neil Armstrong Subject: [RFC/RFT v3 00/14] arm64: g12a: add support for DVFS Date: Mon, 1 Jul 2019 11:12:44 +0200 Message-Id: <20190701091258.3870-1-narmstrong@baylibre.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The G12A/G12B Socs embeds a specific clock tree for each CPU cluster : cpu_clk / cpub_clk | \- cpu_clk_dyn | | \- cpu_clk_premux0 | | |- cpu_clk_postmux0 | | | |- cpu_clk_dyn0_div | | | \- xtal/fclk_div2/fclk_div3 | | \- xtal/fclk_div2/fclk_div3 | \- cpu_clk_premux1 | |- cpu_clk_postmux1 | | |- cpu_clk_dyn1_div | | \- xtal/fclk_div2/fclk_div3 | \- xtal/fclk_div2/fclk_div3 \ sys_pll / sys1_pll This patchset adds notifiers on cpu_clk / cpub_clk, cpu_clk_dyn, cpu_clk_premux0 and sys_pll / sys1_pll to permit change frequency of the CPU clock in a safe way as recommended by the vendor Documentation and reference code. This patchset : - introduces needed core and meson clk changes - adds support for the G12B second cluster clock measurer ids - protects clock measurer from cooncurent measures - adds the clock notifiers - moves the G12A DT to a common g12a-common dtsi - adds the G12A and G12B OPPs - enables DVFS on all supported boards Dependencies: - PWM AO input order fix at [1] - PWM enhancements from Martin at [2] Changes since RFT/RFC v2 at [4]: - Rebased on linux-amlogic v5.3/dt64 and clk-meson v5.3/drivers trees - fixed mesure/measure in patch 5 - added Kevin's review tags Changes since RFT/RFC v1 at [3]: - Added EXPORT_SYMBOL_GPL() to clk_hw_set_parent - Added missing static to g12b_cpub_clk_mux0_div_ops and g12a_cpu_clk_mux_nb - Simplified g12a_cpu_clk_mux_notifier_cb() without switch/case - Fixed typo in "this the current path" in g12a.c - Fixed G12B dtsi by adding back the sdio quirk - Fixed G12A dtsi unwanted sdio quirk removal - Fixed various checkpatch errors [1] https://patchwork.kernel.org/patch/11006835/ [2] https://patchwork.kernel.org/patch/11006835/ [3] https://patchwork.kernel.org/cover/11006929/ [4] https://patchwork.kernel.org/cover/11017273/ Neil Armstrong (14): pinctrl: meson-g12a: add pwm_a on GPIOE_2 pinmux clk: core: introduce clk_hw_set_parent() clk: meson: regmap: export regmap_div ops functions clk: meson: eeclk: add setup callback soc: amlogic: meson-clk-measure: protect measure with a mutex soc: amlogic: meson-clk-measure: add G12B second cluster cpu clk clk: meson: g12a: add notifiers to handle cpu clock change clk: meson: g12a: expose CPUB clock ID for G12B arm64: dts: move common G12A & G12B modes to meson-g12-common.dtsi arm64: dts: meson-g12-common: add pwm_a on GPIOE_2 pinmux arm64: dts: meson-g12a: add cpus OPP table arm64: dts: meson-g12a: enable DVFS on G12A boards arm64: dts: meson-g12b: add cpus OPP tables arm64: dts: meson-g12b-odroid-n2: enable DVFS .../boot/dts/amlogic/meson-g12-common.dtsi | 2416 ++++++++++++++++ .../boot/dts/amlogic/meson-g12a-sei510.dts | 55 + .../boot/dts/amlogic/meson-g12a-u200.dts | 54 + .../boot/dts/amlogic/meson-g12a-x96-max.dts | 52 + arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 2455 +---------------- .../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 96 + arch/arm64/boot/dts/amlogic/meson-g12b.dtsi | 145 +- drivers/clk/clk.c | 6 + drivers/clk/meson/clk-regmap.c | 10 +- drivers/clk/meson/clk-regmap.h | 5 + drivers/clk/meson/g12a.c | 500 +++- drivers/clk/meson/meson-eeclk.c | 6 + drivers/clk/meson/meson-eeclk.h | 1 + drivers/pinctrl/meson/pinctrl-meson-g12a.c | 9 + drivers/soc/amlogic/meson-clk-measure.c | 14 +- include/dt-bindings/clock/g12a-clkc.h | 1 + include/linux/clk-provider.h | 1 + 17 files changed, 3390 insertions(+), 2436 deletions(-) create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi -- 2.21.0