From patchwork Wed Aug 28 12:10:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 172362 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp659601ily; Wed, 28 Aug 2019 05:10:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqxf1syGChlQ3hxfd7kA7bNv7RVX9vUibJxeUSWSNuGnE4RYw0WVx5aONfM6qwABq8Qd47hG X-Received: by 2002:aa7:90c1:: with SMTP id k1mr4205650pfk.46.1566994216583; Wed, 28 Aug 2019 05:10:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566994216; cv=none; d=google.com; s=arc-20160816; b=XvYMF64Y4fAEHlzFPJZszPVWzXeb9PISfs2tKSn7QxX8jSsLFJewvzkhUNUVOmWQko tZPSGqvWfleZGknQLUCNa80RO2VVvQhjPBksMws9Lnq2qUilBVnESdQCgzm9R0004s52 /RH8UwqEZKn4JAMY5b68vhGUXhB8GE/6PH/ExWnWwo5k9hZvairKWaBGON+x01a8CjcP gGst5ZtM/lqkPKUd91h6bhPpwFasrjM7B31GHBkGY25fvz/SH1qhXGWvvv2NbrzQDdfw nt5kqdyJawQxEM+mPDikUEJsctWa3xEEgorgqVn7EoGFHsyZ1lkcmj75EN4tLN+Ew74/ ANKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=cwl8LiQ3L23ajplbU6nEElKWlsR5T+hJrjuLNZahQM4=; b=c378ptQ+BKqlbE1vMCIdB7hIA83uOykAOHMONYWK6E+f2C5n0o6fwBXqVsi1irzMJe lYIdXQeKJD3JWnraJnlRUOQkCAQ8YZQ8zc04P9AGeWweM9hdadgFNExuoIbidGWyn903 /TWIDyvEglsHP1HqYEJsqLkXYCCcWvzjcac1Sc2twwRUstCEyevKqRgNcQPlapA2Whtp Qluq8NyXqoTznQJxdrucvi66KA6pGH5et7004dbhscH0gPe0uWBPoRGdWmqH4MSpDa6M FvkChPCUdJht2Wox7rZ5FrkUoalZ4sNtWMgJ/XezwUNp3sTSoXYn5FSBn7tNsIDE6+y8 12rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=Cr1a8fwO; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 26si1760124pja.6.2019.08.28.05.10.16; Wed, 28 Aug 2019 05:10:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-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=@samsung.com header.s=mail20170921 header.b=Cr1a8fwO; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726259AbfH1MKQ (ORCPT + 3 others); Wed, 28 Aug 2019 08:10:16 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:57131 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726253AbfH1MKP (ORCPT ); Wed, 28 Aug 2019 08:10:15 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190828121013euoutp015792a2af5d10b25ea4d071a3ab0e23d8~-FO9hU2jq2210822108euoutp01f for ; Wed, 28 Aug 2019 12:10:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190828121013euoutp015792a2af5d10b25ea4d071a3ab0e23d8~-FO9hU2jq2210822108euoutp01f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1566994213; bh=cwl8LiQ3L23ajplbU6nEElKWlsR5T+hJrjuLNZahQM4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cr1a8fwOe9fS2r71Z8Aej0c1YDppvVlLIrPSJ+LUee07UDyPb0EmB1biQvBPM/MSN hRk9sHtK9hnEXzHaic39IE7tTHuDoKs3/ErmCixOLjDXQWBXJk5OXm7ZoI8gvpAL8i p6YxDO/S23mlOrAeRg5dy0Ozzdv4Ut6xIZFn+F9Y= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190828121012eucas1p294596f4bc354c9a763530f886dcc0167~-FO8xMbEI1356313563eucas1p2l; Wed, 28 Aug 2019 12:10:12 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id EC.0D.04374.42F666D5; Wed, 28 Aug 2019 13:10:12 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190828121012eucas1p10bac7ebb742d968bca251f21dd3aad11~-FO8AdfJ12730927309eucas1p1U; Wed, 28 Aug 2019 12:10:12 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20190828121011eusmtrp2414f2f20728718b823ab82b9d166bf84~-FO7ycf1h1346013460eusmtrp2E; Wed, 28 Aug 2019 12:10:11 +0000 (GMT) X-AuditID: cbfec7f5-4f7ff70000001116-3b-5d666f242839 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 89.03.04166.32F666D5; Wed, 28 Aug 2019 13:10:11 +0100 (BST) Received: from AMDC2765.DIGITAL.local (unknown [106.120.51.73]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190828121011eusmtip1679343d1fe73ad3f1873b0802628d60b~-FO7cLPx32343323433eusmtip1V; Wed, 28 Aug 2019 12:10:11 +0000 (GMT) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Marek Szyprowski , Krzysztof Kozlowski , Chanwoo Choi , Bartlomiej Zolnierkiewicz , Marc Zyngier Subject: [PATCH v3 1/2] ARM: dts: exynos: Add support ARM architected timers on Exynos5 Date: Wed, 28 Aug 2019 14:10:04 +0200 Message-Id: <20190828121005.29368-2-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190828121005.29368-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrGIsWRmVeSWpSXmKPExsWy7djP87oq+WmxBn83KFlsnLGe1eL6l+es FufPb2C32PT4GqvFjPP7mCzWHrnLbrFzzklWB3aPTas62Tw2L6n36NuyitHj8ya5AJYoLpuU 1JzMstQifbsErowd/44yFjwQqmjpbGZsYLzF38XIwSEhYCIx80RhFyMXh5DACkaJn8deMkI4 Xxgltv2+ww7hfGaUWLRgO2sXIydYx7XG+WwQieWMEq9aD7DBtUzY8oYJpIpNwFCi620XG4gt IuAtMfnMX7BRzAJXGSWWXvvEApIQFoiU2PP6KSPIISwCqhJPJ4eAhHkFbCVmvZ/PDLFNXmL1 hgNgNqeAncShTZ0sIHMkBJ6zSWzY0sECUeQi0f75P9R5whKvjm9hh7BlJP7vnM8E0dDMKPHw 3Fp2CKeHUeJy0wxGiCpricPHL7KCXMEsoCmxfpc+RNhR4vWvTYyQUOKTuPFWECTMDGRO2jad GSLMK9HRJgRRrSYx6/g6uLUHL1yCut9D4sHe59Aw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SY/dxvLrj+M+k3/yK2rtX3lkZYdLd/q9qXtSYuJnmG6dl973 meOCRPXu4t32rqlXr3s1/hcvCdzUkH798om3lfs2bDoa4ajqeieKa0Ws25yljvWtigJsSizF GYmGWsxFxYkA3Si0sGkCAAA= X-CMS-MailID: 20190828121012eucas1p10bac7ebb742d968bca251f21dd3aad11 X-Msg-Generator: CA X-RootMTR: 20190828121012eucas1p10bac7ebb742d968bca251f21dd3aad11 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190828121012eucas1p10bac7ebb742d968bca251f21dd3aad11 References: <20190828121005.29368-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org All CortexA7/A15 based Exynos5 SoCs have ARM architected timers, so enable support for them directly in the base dtsi. None of the known firmware properly configures CNTFRQ arch timer register, so force clock frequency to 24MHz, which is the only configuration supported by the remaining clock drivers so far. Stock firmware for Peach Pit and Pi Chromebooks also doesn't reset properly other arch timer registers, so add respective properties indicating that. Other Exynos5-based boards behaves correctly in this area, what finally allows to enable support for KVM-based virtualization. Signed-off-by: Marek Szyprowski --- arch/arm/boot/dts/exynos5420-peach-pit.dts | 4 ++++ arch/arm/boot/dts/exynos54xx.dtsi | 9 +++++++++ arch/arm/boot/dts/exynos5800-peach-pi.dts | 4 ++++ 3 files changed, 17 insertions(+) -- 2.17.1 Tested-by: Chanwoo Choi Reviewed-by: Chanwoo Choi diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts index f78db6809cca..77e08a4c7300 100644 --- a/arch/arm/boot/dts/exynos5420-peach-pit.dts +++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts @@ -1064,6 +1064,10 @@ status = "okay"; }; +&timer { + arm,cpu-registers-not-fw-configured; +}; + &tmu_cpu0 { vtmu-supply = <&ldo10_reg>; }; diff --git a/arch/arm/boot/dts/exynos54xx.dtsi b/arch/arm/boot/dts/exynos54xx.dtsi index 9c3b63b7cac6..02d34957cd83 100644 --- a/arch/arm/boot/dts/exynos54xx.dtsi +++ b/arch/arm/boot/dts/exynos54xx.dtsi @@ -45,6 +45,15 @@ status = "disabled"; }; + timer: timer { + compatible = "arm,armv7-timer"; + interrupts = , + , + , + ; + clock-frequency = <24000000>; + }; + soc: soc { sysram@2020000 { compatible = "mmio-sram"; diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts index e0f470fe54c8..5e8cec736444 100644 --- a/arch/arm/boot/dts/exynos5800-peach-pi.dts +++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts @@ -1033,6 +1033,10 @@ status = "okay"; }; +&timer { + arm,cpu-registers-not-fw-configured; +}; + &tmu_cpu0 { vtmu-supply = <&ldo10_reg>; };