Received: by 10.192.165.148 with SMTP id m20csp489613imm; Fri, 27 Apr 2018 02:28:34 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqmb/tLj4bRO3SolJ29ZfCLSRO/f1cdi64dxUquP24fTux7Ud9kUsfKhv/jB6nhxeuRMbKo X-Received: by 2002:a17:902:bd0a:: with SMTP id p10-v6mr1612512pls.69.1524821314087; Fri, 27 Apr 2018 02:28:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524821314; cv=none; d=google.com; s=arc-20160816; b=FPvIVrYr4FhrB1QpVjE4lWvlk2W03785BQ7S+lneaMUlTLzIgV95UHCxjDCPCSeP/2 8GRbHh1ErjVAfXb8ztNrinaOKo7kePlR9KLwspLbchZOyxyps4SoyTjNu3MVFJvpN0Ok pAQ52EZlcjxQT/izP//GU5EQk/LJH5NP7drL8NBHRlXiILiHiRcMeVgeOonrEses161E WqGdBId6/KnU1E8EWKIthns2FUB5mHsV+grvsirwcXK5197U4DQQYkOkPXjVqvzcBEHi KTT+/QJYi9iIT86ycd4uWD3LVdiS5zQzRiWsVQ13hxbLe+oapimI5X7JJkDdR7nNPLUK vwOQ== 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 :dmarc-filter:arc-authentication-results; bh=5a5O0+Lkd56EHQ35aJhKdgawOA58XKyiJ2GGnthWoak=; b=zickagbScArGwo57c5Rh8P8FZ3KzOCkRZDoTPBtpNgvm+TbPBp6LMqhV01gA9VPAu1 DZSWFq+WzrBrZBoOmMhhWKuwCO2J92HEHx6N+Kaq6ThDdkG7johDCREqHZ95AiNapJ7g c8I2JU9/qK/Y07MXkyJ0rc4FqNI8R3MyBJxA/c7EPgOfC/4bpmd2TukYqrBlVmj0GEK1 CA04vaTIQ6rbRW770s5Xcb+fltXL4Zx6zYCouxkVmyjVFeu0eAo6+5N9q84zzeIK7ZFv jhV0JiodQpPKstA/6BWKa/lONGuXXtCzbhzOLIAup/RXNppkoOAWF9WDq9s9kGK5MMjo 2Xiw== ARC-Authentication-Results: i=1; mx.google.com; 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 132-v6si880704pgb.470.2018.04.27.02.28.20; Fri, 27 Apr 2018 02:28:34 -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; 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 S1757869AbeD0JY0 (ORCPT + 99 others); Fri, 27 Apr 2018 05:24:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:36538 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757657AbeD0JYV (ORCPT ); Fri, 27 Apr 2018 05:24:21 -0400 Received: from ziggy.de (unknown [37.223.140.222]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 901DB2185C; Fri, 27 Apr 2018 09:24:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 901DB2185C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=matthias.bgg@kernel.org From: matthias.bgg@kernel.org To: ulrich.hecht+renesas@gmail.com, laurent.pinchart@ideasonboard.com, ck.hu@mediatek.com, p.zabel@pengutronix.de, airlied@linux.ie, robh+dt@kernel.org, mark.rutland@arm.com, mturquette@baylibre.com, sboyd@codeaurora.org, lee.jones@linaro.org Cc: davem@davemloft.net, gregkh@linuxfoundation.org, mchehab@kernel.org, rdunlap@infradead.org, sean.wang@mediatek.com, linux-clk@vger.kernel.org, linux@armlinux.org.uk, matthias.bgg@gmail.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Matthias Brugger Subject: [v3 00/10] arm/arm64: mediatek: Fix mmsys device probing Date: Fri, 27 Apr 2018 11:23:52 +0200 Message-Id: X-Mailer: git-send-email 2.16.3 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Matthias Brugger Changes since v2: - fix kconfig typo (shame on me) - delete __initconst from mm_clocks as converted to a platform driver Changes since v1: - add binding documentation - ddp: use regmap_update_bits - ddp: ignore EPROBE_DEFER on clock probing - mfd: delete mmsys_private - add Reviewed-by and Acked-by tags --- MMSYS in Mediatek SoCs has some registers to control clock gates (which is used in the clk driver) and some registers to set the routing and enable the differnet blocks of the display subsystem. Up to now both drivers, clock and drm are probed with the same device tree compatible. But only the first driver get probed, which in effect breaks graphics on mt8173 and mt2701. This patch set introduces a new mfd device, which binds against the mmsys compatible and takes care of probing the needed devices. It was tested on the bananapi-r2 and the Acer R13 Chromebook. Matthias Brugger (10): dt-bindings: mediatek: mmsys: Add support for mfd drm/mediatek: Use regmap for register access mfd: mtk-mmsys: Add mmsys driver drm/mediatek: mt2701: switch to mfd probing. clk: mediatek: mt2701-mm: switch to mfd device mfd: mtk-mmsys: Add mt8173 nodes drm/mediatek: Add mfd support for mt8173 clk: mediatek: mt8173-mm: switch to mfd device drm: mediatek: Omit warning on probe defers MAINTAINERS: update Mediatek Soc entry .../bindings/arm/mediatek/mediatek,mmsys.txt | 2 - .../bindings/display/mediatek/mediatek,disp.txt | 2 +- .../devicetree/bindings/mfd/mediatek,mmsys.txt | 27 +++++++ MAINTAINERS | 2 + drivers/clk/mediatek/clk-mt2701-mm.c | 10 +-- drivers/clk/mediatek/clk-mt8173.c | 19 ++++- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 4 +- drivers/gpu/drm/mediatek/mtk_drm_ddp.c | 41 ++++------ drivers/gpu/drm/mediatek/mtk_drm_ddp.h | 4 +- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 33 ++++---- drivers/gpu/drm/mediatek/mtk_drm_drv.h | 2 +- drivers/mfd/Kconfig | 9 +++ drivers/mfd/Makefile | 2 + drivers/mfd/mtk-mmsys.c | 93 ++++++++++++++++++++++ 14 files changed, 190 insertions(+), 60 deletions(-) create mode 100644 Documentation/devicetree/bindings/mfd/mediatek,mmsys.txt create mode 100644 drivers/mfd/mtk-mmsys.c -- 2.16.3