Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1293215rwe; Thu, 1 Sep 2022 16:13:44 -0700 (PDT) X-Google-Smtp-Source: AA6agR6NohE9Cth8rERtHG/v9xlj8824t5wie8DOozBqVuIdNtNbribF6P4aCeLnnJsqaGRdWq8F X-Received: by 2002:a05:6402:1d55:b0:440:7104:240c with SMTP id dz21-20020a0564021d5500b004407104240cmr31359872edb.207.1662074024155; Thu, 01 Sep 2022 16:13:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662074024; cv=none; d=google.com; s=arc-20160816; b=pHVAeAwA4kqx77aByuNRsHxI6ZD1fgcbmXli8MCUolsJ3Rw4rnF3MdkxWB4p0/r6Bp WT4/09UgUyEIeua2LwTa5sptPIConxuw5ELpTeTvVhEPKReqtASw5pBiZi6vLwXiVdz2 jX1EEclDqCChRi1EBeX/gaAY+2XqZ+4s6xRW3DcaoZLqmpOUPQCknL9PAqSArj02Miyt VzZkvjoynMnaX525mYA82j8kLyYReNE+Hr1/+PlAvEaKZHsIHh+G3ttI5S/GJDy6bLa/ CO6h9kytzd2qV6+ACQ7LFoJd28iE9nBYL9IO+BfZTBcbapwzPh3G2eHIwFr6+7y3t7vh UQLA== 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:mime-version :dkim-signature; bh=H6ognOyqgR63Qc5uxwtLsdJe5XquKuPnICVqa9a8AKs=; b=O8BSKad/mYZ10LdK+H1xy7KvL55GRTkItO+fHJ60fdrFUbmjBccgLNUGhCncMnFnGx 0WaAQanh1yB8/au/4BM/03W78BrZHlM1cgMP4WAc97Mj/jAZfe2oDFdkEHKx4KPLkFUl QDEOP/lh1OtNbMaApoIT9nWrsqCtu7ChjJaPL5ugqZvdNBPbPUClKJGu9o33ny2Ayuw1 3qWdPqOeqRwvqudWKXdZq57r9Bzwo4DUwoGszpEVdh/UT9sdSecbtKeh9GQJtOSktYEu 2bLjZ+eRjET/1jsOnPeuWqMFYO4DlE0k5zzffBUY3mpChdHP4Qz7WYXCUZcsrsD3PJYG gOVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gateworks-com.20210112.gappssmtp.com header.s=20210112 header.b=Yjx+TGhJ; 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 ji1-20020a170907980100b0073d9ea386d4si408451ejc.983.2022.09.01.16.13.18; Thu, 01 Sep 2022 16:13:44 -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=Yjx+TGhJ; 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 S233729AbiIAWct (ORCPT + 99 others); Thu, 1 Sep 2022 18:32:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233057AbiIAWcd (ORCPT ); Thu, 1 Sep 2022 18:32:33 -0400 Received: from mail-vs1-xe2b.google.com (mail-vs1-xe2b.google.com [IPv6:2607:f8b0:4864:20::e2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54FFC1092 for ; Thu, 1 Sep 2022 15:32:32 -0700 (PDT) Received: by mail-vs1-xe2b.google.com with SMTP id c3so334330vsc.6 for ; Thu, 01 Sep 2022 15:32:32 -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:mime-version:from:to:cc:subject :date; bh=H6ognOyqgR63Qc5uxwtLsdJe5XquKuPnICVqa9a8AKs=; b=Yjx+TGhJgVa88DDNYKa0fjVNTMlJaMO/tyUZU6y3og+6nYzwev4neOE97zwDXbETHB fF8xoIuqF5Tvstqbf0dU8zyUh2QMzGkB6U6gEOucvqJ/Oies13jEAaSE2lmhVxwnLR/D bAW/WmZGGvKCxuD3kEv5YwNQilRT+kwbX7WTSn74VQayUDRZcOF4cfE2AEVwO90bCsTK A5/53sGWlHQ6U3RTWPd5dUpH7BdUy9SM+IbMOlPIzsVeFYdpRlsfMPlplnQM0wH/e3lZ BrgbmP5weBThNZuaevXlt9J7GkkCohcjr0ngBG3AWCQOOmt1ZxtrV0Nqf3q/E0MU9443 opuA== 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:mime-version:x-gm-message-state :from:to:cc:subject:date; bh=H6ognOyqgR63Qc5uxwtLsdJe5XquKuPnICVqa9a8AKs=; b=noHhDdM/r2ah98N4DpRU31FDLb2i2BfBQojXAz1wp/F3ZrrCENKuerHTuL+9Bdx9Kc XO1EFK4Vk9IC/IgBuJbdl1DOdMMPGfVQRsOxNmeGV8CZO9QA3A+cl0qx+CFvWofm91Bg OPvoyys69JQQaXDBD4Z/8DckrYjtMwI55pa0YWSF+/pTax8zX8z3Gcq/q0tLRNS7KgGo AGM5Hin9u7CGbmyNjZDI6aY57jfjQVLGNQNsEr++XseHb9Mp9C4MPYKXonVrtIzHveWG mItajogwuMQUtkU5LobDk8XIL5uIlGATGQ5m+HdJlMVDOXZyWscRCKNEN9jzmtPXqh/8 GgeQ== X-Gm-Message-State: ACgBeo25hQhnA4B9zw4CXLPB9kjyQP4E9wkJt4PRw+nevH9iKj7BXqiC ZycIMCRsnnXDIPuchr+Sa9mQzJ/l3Ym7bWJ6Rj+eUGKhHKjJgBVv X-Received: by 2002:a17:903:41c6:b0:174:3acf:8294 with SMTP id u6-20020a17090341c600b001743acf8294mr32176674ple.118.1662071024760; Thu, 01 Sep 2022 15:23:44 -0700 (PDT) MIME-Version: 1.0 From: Tim Harvey Date: Thu, 1 Sep 2022 15:23:33 -0700 Message-ID: Subject: BD71847 clk driver disables clk-32k-out causing RTC/WDT failure To: linux-clk , open list , Fabio Estevam , Shawn Guo Cc: NXP Linux Team , Stephen Boyd , Matti Vaittinen , 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=unavailable 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 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. You can see this with: # cat /sys/kernel/debug/clk/clk-32k-out/clk_rate 32768 # cat /sys/kernel/debug/clk/clk-32k-out/clk_enable_count 0 # cat /sys/class/rtc/rtc0/name snvs_rtc 30370000.snvs:snvs-rtc-lp # cat /sys/class/rtc/rtc0/time 00:00:03 ^^^ time never changes 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? Best Regards, Tim