lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <22b599d2-57a4-54d1-c68f-015e201a7415@samsung.com>
Date:   Mon, 31 Aug 2020 11:49:25 +0200
From:   Marek Szyprowski <m.szyprowski@...sung.com>
To:     Krzysztof Kozlowski <krzk@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Kukjin Kim <kgene@...nel.org>, devicetree@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
        Denis GNUtoo Carikli <GNUtoo@...erdimension.org>,
        Simon Shields <simon@...eageos.org>
Cc:     Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        Sylwester Nawrocki <snawrocki@...nel.org>
Subject: Re: [PATCH 05/33] ARM: dts: exynos: Correct S3C RTC bindings and
 enable it in Trats


On 30.08.2020 15:51, Krzysztof Kozlowski wrote:
> 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@...70000: clocks: [[5, 346]] is too short
>    arch/arm/boot/dts/exynos4210-trats.dt.yaml: rtc@...70000: clock-names: ['rtc'] is too short
>
> Signed-off-by: Krzysztof Kozlowski <krzk@...nel.org>

Confirmed, this workaround enables s3c-rtc driver operation on this board.

Tested-by: Marek Szyprowski <m.szyprowski@...sung.com>

> ---
>   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;

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ