From patchwork Sun Aug 30 13:51:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 11745033 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D5FA314E5 for ; Sun, 30 Aug 2020 13:56:11 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ADCAF2087D for ; Sun, 30 Aug 2020 13:56:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="R+EdiWl5"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Cg1JMBi4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ADCAF2087D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=DMrgmNevcHwsjuzqv6Vql8xrrCJDT5e/kLBjWe+tvgI=; b=R+EdiWl5+L8YIoBuffmxJNb8ED Bew2pj5+rQm3P9N4bFYQ+oQtRXGGRcWcwFIwjRgYHHrZyUrSLJcu/Q4I856/8JQE5tjbxnMixt2EZ hAu70lYBsuSsfy7fgdUVe9ZsG45AJMU5scGw5qsyGahDA4H5V8zkRUtbY/SCjnOMfDkoohtqeicVx M6WCsqmziiQICdDPtAVjjNuz0POCjFJZZdrEC5eXL8EWcT22GaNgehEcqQURM831bUtAB5oe7nkXH hI4q1KFghQt137vsIPIWeC+3ZIG55vSnsFe8P2WEl4N+U8hU/2aLkcTS0AUKuMbXIb/FnIRRNWYkV JdE446eQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kCNmi-0004ya-KJ; Sun, 30 Aug 2020 13:54:16 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kCNmb-0004wo-Sc for linux-arm-kernel@lists.infradead.org; Sun, 30 Aug 2020 13:54:10 +0000 Received: from localhost.localdomain (unknown [194.230.155.216]) (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 D8C8F21473; Sun, 30 Aug 2020 13:54:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598795649; bh=Jio1n7xy/55mksRDkpxMkV+Rs3q50jAeR+ojtYFWIPI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cg1JMBi4IgNDPCKYrm59+JRwCEIZen0DoonB3nCEaV8A+PXgRStDGRUKWi6NRRNVg L0F2C5Cko68GEwFql25ys0wLp4Eadhyzl/25QYwTNZ3X7QWWwZtDqHP5Oxvzo9Ue34 SmRh5eX6bqt68NkqF6VjHxxMxJHSrhTkduID4J54= From: Krzysztof Kozlowski To: Rob Herring , Kukjin Kim , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, "Denis GNUtoo Carikli" , Simon Shields Subject: [PATCH 05/33] ARM: dts: exynos: Correct S3C RTC bindings and enable it in Trats Date: Sun, 30 Aug 2020 15:51:32 +0200 Message-Id: <20200830135200.24304-5-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200830135200.24304-1-krzk@kernel.org> References: <20200830135200.24304-1-krzk@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200830_095410_025905_EC6FE931 X-CRM114-Status: GOOD ( 16.17 ) X-Spam-Score: -5.2 (-----) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-5.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [198.145.29.99 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sylwester Nawrocki , Bartlomiej Zolnierkiewicz , Marek Szyprowski MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The S3C RTC requires 32768 Hz clock as input which is provided by PMIC (Maxim MAX8997). However there is no clock provided for the PMIC and the driver registers the clock as regulator. This is an old driver which will not be updated so add a workaround: 1. Enable the "clock" regulator in PMIC, 2. Add a fixed-clock to fill missing clock phandle reference in S3C RTC. This allows to enable the S3C RTC and fixes dtbs_check warnings: arch/arm/boot/dts/exynos4210-trats.dt.yaml: rtc@10070000: clocks: [[5, 346]] is too short arch/arm/boot/dts/exynos4210-trats.dt.yaml: rtc@10070000: clock-names: ['rtc'] is too short Signed-off-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski --- arch/arm/boot/dts/exynos4210-trats.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm/boot/dts/exynos4210-trats.dts b/arch/arm/boot/dts/exynos4210-trats.dts index 5cc96f04a4fa..634f009b622e 100644 --- a/arch/arm/boot/dts/exynos4210-trats.dts +++ b/arch/arm/boot/dts/exynos4210-trats.dts @@ -132,6 +132,13 @@ compatible = "samsung,clock-xusbxti"; clock-frequency = <24000000>; }; + + pmic_ap_clk: pmic-ap-clk { + /* Workaround for missing clock on max8997 PMIC */ + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <32768>; + }; }; thermal-zones { @@ -444,10 +451,21 @@ regulator-name = "SAFEOUT2"; regulator-boot-on; }; + + EN32KHZ_AP { + regulator-name = "EN32KHZ_AP"; + regulator-always-on; + }; }; }; }; +&rtc { + status = "okay"; + clocks = <&clock CLK_RTC>, <&pmic_ap_clk>; + clock-names = "rtc", "rtc_src"; +}; + &sdhci_0 { bus-width = <8>; non-removable;