Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1056478rwn; Thu, 8 Sep 2022 12:40:40 -0700 (PDT) X-Google-Smtp-Source: AA6agR7lA280wGUgrJ5OjtC5x8olenB0SEvmRqqJk8RRf8SAvmf+3zqPAwIRxMArA0CjMcDjTpZB X-Received: by 2002:a17:902:7d86:b0:176:a6eb:1758 with SMTP id a6-20020a1709027d8600b00176a6eb1758mr10715478plm.90.1662666040332; Thu, 08 Sep 2022 12:40:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662666040; cv=none; d=google.com; s=arc-20160816; b=ejahnPIukfHnVqL3TGMRxiRK93rED2vsDGEs+4s1PbB84iQ6+Z81cGbpAQ2DMvf6p+ EcA1ljjc/4ikiL2u0WiSseStKOmWP2iq8v/NPSuEfEqCypDx1lcBu11JJIIibK0W+65S d/Y2iJUtHVEvQDp0c/Xm2FCfsLPZcsHkkc8DoNfZm1FabwaeVoLGuh/SKVnqr3QnzS4N 2kPAGPfvMjCxKRG1uI1t5dIsnJ6jasecGtmjr9yInC+3py7qqZla664tt3Ct6owLqmpR y2j/f8IA+Kaz4OkRyBekn9Bqu7CS/8WYWOHM0lqHZ95MF0FdrWeuT8tL4deP0wyXMadu G48w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=3S3TgS7iK2ozBJhM8YAZns0sUBBeIKf5Pkpn/yRLzAY=; b=KecctJ8YaOs0QsbPXy/d6bVSDqvtav/OVgdHhamC6omFDyLv/6vh6NulgQa652QMRH HxdzVgK84pFrWTLDursk/K+nFUrFSPACJD4ns5L3uuzHu3nhbEZ9Tk4vgd/o8wInxKCk Phz9X5XgNmU8IL1eUyHbk2XsPGKfj43F8aK7xqnphtZqE33OGdnU6hp5ay0nNc2d8q0l 5t9aCB1MbgMpJeQB6Sgq5oE2agG608WmkQqGbnk4IMU3niBd9zrZeG+iFmn6+Nk7EDyT WPf8fdUJgf8EINdSFGPt7RkcgJpmmG6CmPUV/XUjk6G0wMnX7nNL0H16LGkzCjkaY5IC sosw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gateworks-com.20210112.gappssmtp.com header.s=20210112 header.b=SKPprRfm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bd32-20020a056a0027a000b0052f44beb0d1si19010791pfb.291.2022.09.08.12.40.28; Thu, 08 Sep 2022 12:40:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gateworks-com.20210112.gappssmtp.com header.s=20210112 header.b=SKPprRfm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231641AbiIHT0B (ORCPT + 99 others); Thu, 8 Sep 2022 15:26:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229491AbiIHTZ7 (ORCPT ); Thu, 8 Sep 2022 15:25:59 -0400 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 802809E13C for ; Thu, 8 Sep 2022 12:25:58 -0700 (PDT) Received: by mail-pf1-x42c.google.com with SMTP id 65so8702221pfx.0 for ; Thu, 08 Sep 2022 12:25:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gateworks-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=3S3TgS7iK2ozBJhM8YAZns0sUBBeIKf5Pkpn/yRLzAY=; b=SKPprRfmTseF3CsTo59H6bxctE0pyajXRQU3GYANwXMdu/9lBtYeyi/eJpx3z8lja/ Ba/ttJlp4vrZ862EamZswK8DWSgZHQ6eKf0lzS2EYpFBfYMZlQlEzhRNqLg1MbCCw8uE TxRWyhXPs/9p+ZAceve/fKsfEUTozyOPNWVMEtstHPcYXCnU4EHQUv67kdxogNzzKvcz bi1zdWpxcB/13pHFBmHaq23lYJkeYPGsHCDZ50DAqWvLVefAjssqZcirOts8oikdTMSz d/xX6qFWGTYvfu9s9s/feCD7miZ/pJtKRUwwpgc7EKFlbHDYrhD7hcMsGF35qVO4v0E2 fXnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=3S3TgS7iK2ozBJhM8YAZns0sUBBeIKf5Pkpn/yRLzAY=; b=q387ilrkXYA9eRmRhexIgzLHv+FjQrfTLB6zvscovNgZwIfL1lf0a6eV5PZT8tlu3j NlqnoFgKE8/ZAQa3blGsgTGGJJD3Wzh7SU0LFkHvFV7PjezPFKNPW6ACPyc2I+WlltAf 3if9A4wYOCtLBrgYr4ogkqrZ9NJnbNlSFRdKRGH4xDDAVTslqYwlX7bsBlWyr/A4O78L f7J/+CJOggCdP6mN7CxHsGP05ygwyD9F7G+Ea5/+jq00qAjSbyoAlM6K7dYpFb3tgU/o q+rC/+48SY/BQ1tnoKpfJrIly0GNTg50E2D2IDdfLRewzlUNpEx5KgESXzqLH0RkA8xx 1WuA== X-Gm-Message-State: ACgBeo3a+3Z8QRrrsK04ncFqDPjT06huc8v8JAuxBVWXQ5JjD59uahel QEqDumfhzJzlP2c38mHQImHICmXWk/GXHXL5b/2ndg== X-Received: by 2002:a63:4c03:0:b0:431:58b8:cb91 with SMTP id z3-20020a634c03000000b0043158b8cb91mr8956475pga.440.1662665157887; Thu, 08 Sep 2022 12:25:57 -0700 (PDT) MIME-Version: 1.0 References: <59b6dd0a-7cbb-5dbd-8da0-57baeba3327e@gmail.com> <2ab24cc4-4aa2-d364-9b29-55f5d6b23626@denx.de> In-Reply-To: <2ab24cc4-4aa2-d364-9b29-55f5d6b23626@denx.de> From: Tim Harvey Date: Thu, 8 Sep 2022 12:25:46 -0700 Message-ID: Subject: Re: BD71847 clk driver disables clk-32k-out causing RTC/WDT failure To: Marek Vasut , Stephen Boyd Cc: Matti Vaittinen , linux-clk , open list , Fabio Estevam , Shawn Guo , NXP Linux Team , Michael Turquette Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 8, 2022 at 9:55 AM Marek Vasut wrote: > > On 9/8/22 18:00, Tim Harvey wrote: > > On Thu, Sep 1, 2022 at 9:14 PM Matti Vaittinen wrote: > >> > >> Hi Tim, > >> > >> On 9/2/22 01:23, Tim Harvey wrote: > >>> Greetings, > >>> > >>> I've found that the bd71847 clk driver (CONFIG_COMMON_CLK_BD718XX > >>> drivers/clk/clk-bd718x7.c) disables clk-32k-out (the BD71847 C32K_OUT > >>> pin) which is connected IMX8MM RTC_XTALI which ends up disabling the > >>> IMX RTC as well as the IMX WDOG functionality. > >> > >> //snip > >> > >>> This happens via clk_unprepare_unused() as nothing is flagging the > >>> clk-32k-out as being used. What should be added to the device-tree to > >>> signify that this clk is indeed necessary and should not be disabled? > >> > >> I have seen following proposal from Marek Vasut: > >> > >> https://lore.kernel.org/all/20220517235919.200375-1-marex@denx.de/T/#m52d6d0831bf43d5f293e35cb27f3021f278d0564 > >> > >> I am not sure if the discussion is completed though. I guess it was > >> agreed this was needed/usefull and maybe the remaining thing to decide > >> was just the property naming. > >> > >> Best Regards > >> -- Matti > >> > > > > Thanks Matti, > > > > Marek - has there been any progress on determining how best to keep > > certain clocks from being disabled? > > No. You can read the discussion above. Marek, I wasn't on the linux-clk list at that time so can't respond to the thread but the discussion seems to have died out a couple of months ago with no agreement between you or Stephen on how to deal with it. So where do we take this from here? It looks like there are about 18 boards with dt's using "rohm,bd718*" which would all have non working RTC/WDOG with CONFIG_COMMON_CLK_BD718XX enabled (which it is in arch/arm64/configs/defconfig) right? $ git grep "rohm,bd718" arch/ | cut -d: -f1 arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc.dts arch/arm64/boot/dts/freescale/imx8mm-emcon.dtsi arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi arch/arm64/boot/dts/freescale/imx8mm-var-som.dtsi arch/arm64/boot/dts/freescale/imx8mm-venice-gw7901.dts arch/arm64/boot/dts/freescale/imx8mm-venice-gw7902.dts arch/arm64/boot/dts/freescale/imx8mm-venice-gw7903.dts arch/arm64/boot/dts/freescale/imx8mm-venice-gw7904.dts arch/arm64/boot/dts/freescale/imx8mn-beacon-som.dtsi arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi arch/arm64/boot/dts/freescale/imx8mn-venice-gw7902.dts arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi arch/arm64/boot/dts/freescale/imx8mq-phanbell.dts arch/arm64/boot/dts/freescale/imx8mq-pico-pi.dts Best Regards, Tim