From patchwork Wed Nov 14 08:51:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cho KyongHo X-Patchwork-Id: 1739931 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 097F2DF264 for ; Wed, 14 Nov 2012 08:53:38 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TYYh3-0002zo-8u; Wed, 14 Nov 2012 08:51:33 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TYYgf-0002x1-RR for linux-arm-kernel@lists.infradead.org; Wed, 14 Nov 2012 08:51:12 +0000 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MDG00KPHZ8TJXN0@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 14 Nov 2012 17:51:08 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.50]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 8E.83.01231.C7B53A05; Wed, 14 Nov 2012 17:51:08 +0900 (KST) X-AuditID: cbfee61a-b7fa66d0000004cf-8f-50a35b7c762c Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id ED.83.01231.C7B53A05; Wed, 14 Nov 2012 17:51:08 +0900 (KST) Received: from DOPULLIPCHO06 ([12.23.118.152]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MDG00HNXZ98QG40@mmp2.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 14 Nov 2012 17:51:08 +0900 (KST) From: Cho KyongHo To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] ARM: EXYNOS: add System MMU definition to DT Date: Wed, 14 Nov 2012 17:51:08 +0900 Message-id: <002301cdc245$307eca00$917c5e00$%cho@samsung.com> MIME-version: 1.0 X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac3CRTBipmveUOsnSsuuVE6J/qZztg== Content-language: ko DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrIIsWRmVeSWpSXmKPExsVy+t8zI92a6MUBBk2vTCw2Pb7G6sDosXlJ fQBjFJdNSmpOZllqkb5dAlfGtM7JbAVPkyqmfZrD2sC42beLkZNDQsBE4tavC6wQtpjEhXvr 2boYuTiEBJYxSlyaOZsVpuhUw2NGiMR0RokfHTfYIZzlTBIbl99nBqliE9CSWD33OFiViEAv o8SF/q9MIA6zwANGiRWHHzKBVAkLOEocO/CCEcRmEVCVePx2OQuIzStgK7Hr1QsoW1Dix+R7 YDYz0NT1O48zQdjyEpvXvAXaxgF0k7rEo7+6IGERAT2Jw7d+s0KUiEjse/EOaryAxLfJh1gg ymUlNh1gBjlHQqCbXWLe6UlMEK9JShxccYNlAqPYLCSbZyHZPAvJ5llIVixgZFnFKJpakFxQ nJSea6hXnJhbXJqXrpecn7uJERIvUjsYVzZYHGIU4GBU4uH92LooQIg1say4MvcQowQHs5II b6zV4gAh3pTEyqrUovz4otKc1OJDjD5Al09klhJNzgfGcl5JvKGxsYmZiamJuaWpuSkOYSVx 3maPlAAhgfTEktTs1NSC1CKYcUwcnFINjInqIRkFy/LLb6goXvP/uEN5e7dVpdpCz1WHtj3r vFR8oeSqesChOX9ub7Rxmr35hvyyTauXLvuuUxjqIOLzmM0nqsDNJJp72q3fqw6bX7e+kKFY bGqWVLya0+NVqcllgQ+71+/+4r9gv9Sion8RugovM/K36c69GbJsn+uuvw/1J2rKrPTy/ajE UpyRaKjFXFScCABzYJjAxAIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrAIsWRmVeSWpSXmKPExsVy+t9jQd2a6MUBBgsO6VlsenyN1YHRY/OS +gDGqAZGm4zUxJTUIoXUvOT8lMy8dFsl7+B453hTMwNDXUNLC3MlhbzE3FRbJRefAF23zByg qUoKZYk5pUChgMTiYiV9O0wTQkPcdC1gGiN0fUOC4HqMDNBAwjrGjGmdk9kKniZVTPs0h7WB cbNvFyMnh4SAicSphseMELaYxIV769m6GLk4hASmM0r86LjBDuEsZ5LYuPw+M0gVm4CWxOq5 xxlBEiICvYwSF/q/MoE4zAIPGCVWHH7IBFIlLOAocezAC7C5LAKqEo/fLmcBsXkFbCV2vXoB ZQtK/Jh8D8xmBpq6fudxJghbXmLzmrdA2ziAblKXePRXFyQsIqAncfjWb1aIEhGJfS/eMU5g FJiFZNIsJJNmIZk0C0nLAkaWVYyiqQXJBcVJ6bmGesWJucWleel6yfm5mxjB0fhMagfjygaL Q4wCHIxKPLwfWxcFCLEmlhVX5h5ilOBgVhLhjbVaHCDEm5JYWZValB9fVJqTWnyI0Qfo0YnM UqLJ+cBEkVcSb2hsYmZkaWRmYWRibo5DWEmct9kjJUBIID2xJDU7NbUgtQhmHBMHp1QDY3+2 3BY/s4WmxqffepxJmcuzfZ/Z+7snmyLq+9wNyiYxhr/u3OO0TPxD51fpXxNWLOX+Hl3ybHZM 6JrK/OziRXFuVcG7rhw/cfj+l7ql+vPcrfqzBFTjFcyda+o7u+XiuBUtshSNVvRrqtZ78XFf jV/4NCuyfnHdOt6Td8ruBny6MFvo11pWJZbijERDLeai4kQA1LNhMPMCAAA= X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121114_035110_467815_5D807AF5 X-CRM114-Status: GOOD ( 11.79 ) X-Spam-Score: -7.6 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.25 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 T_MANY_HDRS_LCASE Odd capitalization of multiple message headers Cc: 'Kukjin Kim' , prathyush.k@samsung.com, 'Joerg Roedel' , 'Subash Patel' , 'Sanghyun Lee' , rahul.sharma@samsung.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This commit adds System MMU nodes to DT of Exynos SoCs. Signed-off-by: KyongHo Cho --- .../devicetree/bindings/arm/samsung/system-mmu.txt | 42 ++++++ arch/arm/boot/dts/exynos4210.dtsi | 96 ++++++++++++++ arch/arm/boot/dts/exynos4x12.dtsi | 124 +++++++++++++++++ arch/arm/boot/dts/exynos5250.dtsi | 147 ++++++++++++++++++++- 4 files changed, 407 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/samsung/system-mmu.txt diff --git a/Documentation/devicetree/bindings/arm/samsung/system-mmu.txt b/Documentation/devicetree/bindings/arm/samsung/system-mmu.txt new file mode 100644 index 0000000..5115c39 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/samsung/system-mmu.txt @@ -0,0 +1,42 @@ +* Samsung Exynos System MMU + +Samsung's Exynos architecture includes System MMU that enables scattered +physical chunks to be visible as a contiguous region to DMA-capabile peripheral +devices like MFC, FIMC, FIMD, GScaler, FIMC-IS and so forth. + +System MMU is a sort of IOMMU and support identical translation table format to +ARMv7 translation tables with minimum set of page properties including access +permissions, shareability and security protection. In addition System MMU has +another capabilities like L2 TLB or block-fetch buffers to minimize translation +latency + +Each System MMU is included in the H/W block of a peripheral device. Thus, it is +important to specify that a System MMU is dedicated to which peripheral device +before using System MMU. System initialization must specify the relationships +between a System MMU and a peripheral device that owns the System MMU. + +Some device drivers may control several peripheral devices with a single device +descriptor like MFC. Since handling a System MMU with IOMMU API requires a +device descriptor that needs the System MMU, it is best to combine the System +MMUs of the peripheral devices and control them with a single System MMU device +descriptor. If it is unable to combine them into a single device descriptor, +they can be linked with each other by the means of device.parent relationship. + +Required properties: +- compatible: Should be "samsung,exynos-sysmmu". +- reg: Tuples of base address and size of System MMU registers. The number of + tuples can be more than one if two or more System MMUs are controlled + by a single device descriptor. +- interrupt-parent: The phandle of the interrupt controller of System MMU +- interrupts: Tuples of numbers that indicates the interrupt source. The + number of elements in the tuple is dependent upon + 'interrupt-parent' property. The number of tuples in this property + must be the same with 'reg' property. + +Optional properties: +- mmuname: Strings of the name of System MMU for debugging purpose. The number + of strings must be the same with the number of tuples in 'reg' + property. +- mmu-master: phandle to the device node that owns System MMU. Only the device + that is specified whith this property can control System MMU with + IOMMU API. diff --git a/arch/arm/boot/dts/exynos4210.dtsi b/arch/arm/boot/dts/exynos4210.dtsi index 939f639..d7a7a06 100644 --- a/arch/arm/boot/dts/exynos4210.dtsi +++ b/arch/arm/boot/dts/exynos4210.dtsi @@ -71,4 +71,100 @@ reg = <0x100C0000 0x100>; interrupts = <2 4>; }; + + sysmmu-mfcL { + mmuname = "mfc_l"; + reg = <0x13620000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <5 5>; + }; + + sysmmu-mfcR { + mmuname = "mfc_r"; + reg = <0x13630000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <5 6>; + }; + + sysmmu-tv { + mmuname = "tv"; + reg = <0x13E20000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <5 4>; + }; + + sysmmu-fimc0 { + mmuname = "fimc0"; + reg = <0x11A20000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <4 2>; + }; + + sysmmu-fimc1 { + mmuname = "fimc1"; + reg = <0x11A30000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <4 3>; + }; + + sysmmu-fimc2 { + mmuname = "fimc2"; + reg = <0x11A40000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <4 4>; + }; + + sysmmu-fimc3 { + mmuname = "fimc3"; + reg = <0x11A50000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <4 5>; + }; + + sysmmu-jpeg { + mmuname = "jpeg"; + reg = <0x11A60000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <4 6>; + }; + + sysmmu-g2d { + mmuname = "g2d"; + reg = <0x12A20000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <4 7>; + }; + + sysmmu-rotator { + mmuname = "rotator"; + reg = <0x12A30000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <5 0>; + }; + + sysmmu-fimd0 { + mmuname = "fimd0"; + reg = <0x11E20000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <5 2>; + }; + + sysmmu-fimd1 { + mmuname = "fimd1"; + reg = <0x12220000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <5 3>; + }; }; diff --git a/arch/arm/boot/dts/exynos4x12.dtsi b/arch/arm/boot/dts/exynos4x12.dtsi index 179a62e..0490836 100644 --- a/arch/arm/boot/dts/exynos4x12.dtsi +++ b/arch/arm/boot/dts/exynos4x12.dtsi @@ -66,4 +66,128 @@ reg = <0x106E0000 0x1000>; interrupts = <0 72 0>; }; + + sysmmu-mfcL { + mmuname = "mfc_l"; + reg = <0x13620000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <5 5>; + }; + + sysmmu-mfcR { + mmuname = "mfc_r"; + reg = <0x13630000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <5 6>; + }; + + sysmmu-tv { + mmuname = "tv"; + reg = <0x13E20000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <5 4>; + }; + + sysmmu-fimc0 { + mmuname = "fimc0"; + reg = <0x11A20000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <4 2>; + }; + + sysmmu-fimc1 { + mmuname = "fimc1"; + reg = <0x11A30000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <4 3>; + }; + + sysmmu-fimc2 { + mmuname = "fimc2"; + reg = <0x11A40000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <4 4>; + }; + + sysmmu-fimc3 { + mmuname = "fimc3"; + reg = <0x11A50000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <4 5>; + }; + + sysmmu-jpeg { + mmuname = "jpeg"; + reg = <0x11A60000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <4 6>; + }; + + sysmmu-g2d { + mmuname = "g2d"; + reg = <0x10A40000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <4 7>; + }; + + sysmmu-rotator { + mmuname = "rotator"; + reg = <0x12A30000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <5 0>; + }; + + sysmmu-fimd0 { + mmuname = "fimd0"; + reg = <0x11E20000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <5 2>; + }; + + sysmmu-is0 { + mmuname = "isp", "drc", "fd"; + reg = <0x12260000 0x1000 + 0x12270000 0x1000 + 0x122A0000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <16 2 + 16 3 + 16 4>; + }; + + sysmmu-is1 { + mmuname = "ispcpu"; + reg = <0x122B0000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <16 5>; + }; + + sysmmu-flite0 { + mmuname = "fimc-lite0"; + reg = <0x123B0000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <16 0>; + }; + + sysmmu-flite1 { + mmuname = "fimc-lite1"; + reg = <0x123C0000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <16 1>; + }; }; diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index cf6a02d..7d1eaa3 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -62,7 +62,7 @@ interrupts = <0 42 0>; }; - codec@11000000 { + mfc: codec@11000000 { compatible = "samsung,mfc-v6"; reg = <0x11000000 0x10000>; interrupts = <0 96 0>; @@ -547,9 +547,152 @@ interrupts = <0 95 0>; }; - mixer { + mixer: mixer { compatible = "samsung,exynos5-mixer"; reg = <0x14450000 0x10000>; interrupts = <0 94 0>; }; + + sysmmu-mfcL { + mmuname = "mfc_l"; + reg = <0x11210000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <8 5>; + mmu-master = <&mfc>; + }; + + sysmmu-mfcR { + mmuname = "mfc_r"; + reg = <0x11200000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <6 2>; + mmu-master = <&mfc>; + }; + + sysmmu-tv { + mmuname = "tv"; + reg = <0x14650000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <7 4>; + mmu-master = <&mixer>; + }; + + sysmmu-gsc0 { + mmuname = "gsc0"; + reg = <0x13E80000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <2 0>; + mmu-master = <&gsc_0>; + }; + + sysmmu-gsc1 { + mmuname = "gsc1"; + reg = <0x13E90000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <2 2>; + mmu-master = <&gsc_1>; + }; + + sysmmu-gsc2 { + mmuname = "gsc2"; + reg = <0x13EA0000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <2 4>; + mmu-master = <&gsc_2>; + }; + + sysmmu-gsc3 { + mmuname = "gsc3"; + reg = <0x13EB0000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <2 6>; + mmu-master = <&gsc_3>; + }; + + sysmmu-fimd1 { + mmuname = "fimd1"; + reg = <0x14640000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <3 2>; + }; + + sysmmu-rotator { + mmuname = "rotator"; + reg = <0x11D40000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <4 0>; + }; + + sysmmu-is0 { + mmuname = "isp", "drc", "scalerc", "scalerp", "fd", "mcu"; + reg = < 0x13260000 0x1000 + 0x13270000 0x1000 + 0x13280000 0x1000 + 0x13290000 0x1000 + 0x132A0000 0x1000 + 0x132B0000 0x1000 >; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <10 6 + 11 6 + 5 2 + 3 6 + 5 0 + 5 4>; + }; + + sysmmu-is1 { + mmuname = "odc", "dis0", "dis1", "3dnr"; + reg = < 0x132C0000 0x1000 + 0x132D0000 0x1000 + 0x132E0000 0x1000 + 0x132F0000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <11 0 + 10 4 + 9 4 + 5 6>; + }; + + sysmmu-2d { + mmuname = "2d"; + reg = <0x10A60000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <24 5>; + }; + + sysmmu-jpeg { + mmuname = "jpeg"; + reg = <0x11F20000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <4 2>; + }; + + sysmmu-flite0 { + mmuname = "flite0"; + reg = <0x13C40000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <3 4>; + }; + + sysmmu-flite1 { + mmuname = "flite1"; + reg = <0x13C50000 0x1000>; + compatible = "samsung,exynos-sysmmu"; + interrupt-parent = <&combiner>; + interrupts = <24 1>; + }; };