Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp9430088ioo; Sun, 5 Jun 2022 14:15:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBOKFfEjLjBuWg225TDQO30MEIY8Rzgd2j8tUSAmpQk00b4nOO/lpQCg7vVAmS9ID5YGz9 X-Received: by 2002:a17:907:7fa9:b0:711:d214:36cd with SMTP id qk41-20020a1709077fa900b00711d21436cdmr670360ejc.600.1654463752484; Sun, 05 Jun 2022 14:15:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654463752; cv=none; d=google.com; s=arc-20160816; b=nibu+QEPaLdgriOHdfFjG1yYrbI9H9PhtXiugZ5vzaUjWd/GmbHF5yn+y4tV4XDxPk jSbAjukKMhMFhDfly/NDzVtxX4xZDDmJ+sHMnLR/75D54TofnVfyiKc3jv3Az+wRAzL/ x8x1oSvi5chR+vQ7sfwD3eikbHybT4LUIANXhSyvrC9nhL3V/CamF8CbIYzV2eZ44BHL cRAaDElSBCs27QOJij5SeBxHbpLwv9wltRVqhd+pydxdNNgUYhsxhmfIKx2yiZS7rfeU jO6ulr9QXeE6AeT233ieY2NykvN8Mf7/6J01QCT0DDoydNE9Zn5rcKxtkops8ed2Nacv u1RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=t40w8M/0e+7jzPaXKU8sHRs+0HYfLIpNt+JXgYblSMg=; b=zPqKWjXjDJ5BtfIjElnnyE0AtkSVR/mxAvs/LDKNxpNDn1jnL8rIjVUqsi690knOIv c+hLCRgZbb37z1dkUol12Q0uZhXrnbOmmziQ4P0XH9smJqoShGXw1mZ5pPRpn7gaiZsF siQ0EeXUQnNqAGj4VgIErX6lK0FYTg+GhZQZNbjNs/Qler35ZrYCqIsQJP/Vulv9PA45 vskeLiiK0jY+fbRmo16d8QFdbpYxFcMiX1CxJDdYQMKgrMi+9BkPtat1ZiCJ83NrmSm2 cvBAEbTcFbtelUaD0DvnE1LZRIsswEzPkBPjd5LSW+WrloMliUZljEQp7LXztoPwL52J vQNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ocyh0GC0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r18-20020a05640251d200b0042dcd5ba905si5835520edd.18.2022.06.05.14.15.02; Sun, 05 Jun 2022 14:15:52 -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=@amarulasolutions.com header.s=google header.b=ocyh0GC0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350901AbiFEJNs (ORCPT + 99 others); Sun, 5 Jun 2022 05:13:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229816AbiFEJNp (ORCPT ); Sun, 5 Jun 2022 05:13:45 -0400 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9998518377 for ; Sun, 5 Jun 2022 02:13:44 -0700 (PDT) Received: by mail-pf1-x432.google.com with SMTP id w21so10547186pfc.0 for ; Sun, 05 Jun 2022 02:13:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=t40w8M/0e+7jzPaXKU8sHRs+0HYfLIpNt+JXgYblSMg=; b=ocyh0GC00EAoaldlX1NjY7vXM7LbDtFDCA/7kXfCx1Ot+WKDvRO2xAoQE4IatRDfQE iggeZJFMvcTXFNuSAHi269fFf0Y7FYT/7p7FgnjfU/0uYk4Y3dcrKAX1+i2bUYqFHOSa nx9ZzclCH+yphK8vDpAp1cpBhgTl+ZyCbBuFE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=t40w8M/0e+7jzPaXKU8sHRs+0HYfLIpNt+JXgYblSMg=; b=hEunNdHkQzHb/XeU/zHxLyfA3ZqDseGWQXAFS/RRiGsOa3tjn48GACz/VrqRVOxziU VYlV0zqh/z8HYxCRc/jn0t+aWDplTVDRZOIzXmBMPPNp2TXGQMNmfBPJYi4cWHCcm6+r 8fP7hLKwuwQZbpb8wujNfiXTSqzN3aN8Uje6XqTsgt6+TrKhMwsU0s5pCLAQbDOsd4ku OWcbV1tmJAXy5Z1EMRUNsO+9GNRY5+ug+oejozj2v3g2muPVNrkQ6sO1bOeuOPQp6Y3+ 2/ewU5tuPnKdN5GJtopxCcGhCujTCOI3EH7or5vah24y8GIQYGLVza8ACqd8DJtjbyAG W2XQ== X-Gm-Message-State: AOAM531xNyNP4hgjViUCYbZIWRsfXUP+9AtX2YFO4fEXZcFvkNsoyE4u 6tiEf/6NjTyMDGuhL1P/RmWGOOLz9hyOnq59y5oJwg== X-Received: by 2002:a05:6a00:2402:b0:4e1:3df2:5373 with SMTP id z2-20020a056a00240200b004e13df25373mr85499945pfh.40.1654420423926; Sun, 05 Jun 2022 02:13:43 -0700 (PDT) MIME-Version: 1.0 References: <20220604183905.1025201-1-michael@amarulasolutions.com> In-Reply-To: <20220604183905.1025201-1-michael@amarulasolutions.com> From: Michael Nazzareno Trimarchi Date: Sun, 5 Jun 2022 11:13:31 +0200 Message-ID: Subject: Re: [PATCH] arm64: dts: imx8mn-bsh-smm-s2/pro: Add pmic clock connection To: Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , "Ariel D'Alessandro" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , open list Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Hi I have some problems here. Open to suggestion: On Sat, Jun 4, 2022 at 8:39 PM Michael Trimarchi wrote: > > pmic clock is connected to svns_rtc using RTC_XTALI pin, > and wifi/bluetooth chipset > > Signed-off-by: Michael Trimarchi > --- > .../boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi > index c11895d9d582..a21ec0d1d003 100644 > --- a/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi > +++ b/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi > @@ -28,6 +28,8 @@ usdhc2_pwrseq: usdhc2-pwrseq { > pinctrl-names = "default"; > pinctrl-0 = <&pinctrl_usdhc2_pwrseq>; > reset-gpios = <&gpio4 27 GPIO_ACTIVE_LOW>; > + clocks = <&bd71847>; > + clock-names = "ext_clock"; > }; > }; > > @@ -214,6 +216,11 @@ &i2c4 { > status = "okay"; > }; > > +&snvs_rtc { > + clocks = <&bd71847>; > + clock-names = "snvs-rtc"; > +}; > + > &uart2 { > pinctrl-names = "default"; > pinctrl-0 = <&pinctrl_uart2>; > @@ -235,6 +242,8 @@ bluetooth { > shutdown-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; > device-wakeup-gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>; > host-wakeup-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; > + clocks = <&bd71847>; > + clock-names = "lpo"; > max-speed = <3000000>; > }; > }; I've done more testing in suspend/resume and it can not work. I have modelled differently and extended the svns block to receive an external clock and make it always enabled. The problem here is the cpu takes the clock from the pmic that is enabled by default and the pmic clock even wifi and bluetooth. If I want to register the driver I would like to connect all of them but it seems that osc_32k is the basic clock of the cpu and can be modelled using pmic easily. Even I have created the ext clock on the snvs block so should be always enabled suspend/resume. The device can not resume from suspend. Michael > -- > 2.25.1 > -- Michael Nazzareno Trimarchi Co-Founder & Chief Executive Officer M. +39 347 913 2170 michael@amarulasolutions.com __________________________________ Amarula Solutions BV Joop Geesinkweg 125, 1114 AB, Amsterdam, NL T. +31 (0)85 111 9172 info@amarulasolutions.com www.amarulasolutions.com