Received: by 10.192.165.148 with SMTP id m20csp4528104imm; Tue, 24 Apr 2018 04:26:08 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+xarN7L7xvZyTwaUybCKft1uOoihHwk9vG9qw7OA+I8O8Guq4mEhAvLJnXSyCQRwJTzRD6 X-Received: by 2002:a17:902:60cd:: with SMTP id k13-v6mr25075534pln.44.1524569168334; Tue, 24 Apr 2018 04:26:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524569168; cv=none; d=google.com; s=arc-20160816; b=zOC1hpWfGhYVMlf23y0c1NE296BFeVpcMn9tJBEB0YJtVup+WpnXnU0Lrqk64eLCSU +r6YSzA50R6T6+/pTjdlu4JhyGPmyLTah+Y9mGcTCm9nHyhj6Ne8IHFdS0q2rs3zgSe6 s55lWI8ndC4mAqOniEa/H5f6KTWURugeG6OjU71auZpw6Ngkv15yoqoo7M0eu2ZgyUQ9 fzR/76cbw3mmJxdMQWLD7mB/YLbosCEWL7Ee5a5Ocr0Lni9lbVbvtke/UAE89vqUQZY6 TTBeTcEKXKKbs9NgbjJYM2v3OvwP1D8lK/QBfK8dbjZiJ6MTGXIT5pRTy3QtqbD0p1Za vxeA== 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=dC0Z4R1xf46kH+zfW9FeL5mGZqA3LuQ6bTMkY5Ce2I8=; b=BaFTK9UnwjBaryEhNyQpCVWo2rjsVjudcvjXzmwrG4VmCKYa8nMl8iCm0yZlcprSsN cLMRG0lHIWm102Xey3Hoouwz0GJWBJftvOSqQ9FLTI0iKsvjrwafj9S3AOF5Xtj+s41M Aa1fH3+zeG35yV4YIjnZELMCCbRhTE6c9dwakrjaKELNUndhiDVfuEQ7l0pu1QtTdN9F YeMPa1GLpuXSvJM9HQvVM/Eczk1sHOTz8YM6NtgQn3oUmhF6+7Avsb3uoWsFly7FK/0b L0CWp1ZbMgGeJWL3shFHp6DwxCZz7acF6KLSkspQ2feSY85iB/4W3IHsl8DGsViHPso6 4asg== 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 q124si11652586pgq.215.2018.04.24.04.25.53; Tue, 24 Apr 2018 04:26:08 -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 S1756324AbeDXJrZ (ORCPT + 99 others); Tue, 24 Apr 2018 05:47:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:47554 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751519AbeDXJrV (ORCPT ); Tue, 24 Apr 2018 05:47:21 -0400 Received: from ziggy.de (144.pool85-56-49.dynamic.orange.es [85.56.49.144]) (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 B42E721717; Tue, 24 Apr 2018 09:47:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B42E721717 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, pi-cheng.chen@linaro.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: [v2 resend 00/10] arm/arm64: mediatek: Fix mmsys device probing Date: Tue, 24 Apr 2018 11:46:57 +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 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 | 17 +++- 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, 189 insertions(+), 59 deletions(-) create mode 100644 Documentation/devicetree/bindings/mfd/mediatek,mmsys.txt create mode 100644 drivers/mfd/mtk-mmsys.c -- 2.16.3