Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp34964145rwd; Mon, 10 Jul 2023 00:06:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlGzNHj2+Cm0MK3SLGHRKk8oWNLzJVaU8QBUdK7oWbAk1dTxTyXNQ8zrQUcCHwr4yOs4/Ncx X-Received: by 2002:a17:906:dc94:b0:98e:3dac:6260 with SMTP id cs20-20020a170906dc9400b0098e3dac6260mr17547932ejc.13.1688972806344; Mon, 10 Jul 2023 00:06:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688972806; cv=none; d=google.com; s=arc-20160816; b=cjBa1Ce5lNEBzT/ajc6L2+TBNxztXswbH/+83gYyQS57LrCkKQwe2G7lH3MWOBTUYw 4k+bzJyNLEAK5kBj3awRUJIqqbg3092uEQZZMeFRAw4FAUra8CAZER1O0iZJInDhVuvP 4brO6jjK22kFcycbhiNLDcYWGDDTVYTsh4t/vnZwXktEMdxDPfIFWgFYoVh0ZP+VEGOB hfstIvI6DbXLmJ6TKTuDeydb+AmD34sHWOVEdyUnysTon64Y8Wp2SgvzwN23ldZBCkwd rZdk0IV72I9ziif8hOZw4RrwUpg9s+y9zuCePnPvyW0i8JrT6p5+DGslUc59XxWD161H TCuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:references :in-reply-to:subject:cc:to:from:date:mime-version:dkim-signature; bh=7ZIDGIq1rK9Z5Sg64bU7gXB7fy673hVqBAuYb7n90wg=; fh=fCwKCM2Y9FDPxJsLrapGfech/a1q6HNCYACAj00TEas=; b=xw53uQkzidzI1wj4LZO9JAorhETQaTGRMobGOgcJLFkBjiofDD5uT4bAg2Y/wnStED YzfXmQMYOfVRm+44j+eNsr0cJKlW8xeeUIwu4n73TC+FtMDzLNy6U4eyjcTRIatFo2uq HvqP3ed8MJkMM1vZTlXdzCbXUVDKqqytJpR2tW4Ol14LHQX6rREMt3/TU4pYy3UWKmAV gI9uGuE+CbuAHt/YwpsNpFCr2tgf8yWhBZ3AB6wanyPG5dxy2EmbHjfCZY3EL0JF0Lec NElXJzO8z+vOSeKyQTkInLtw7lvR3NfBWn7EDxgwKWZ62MLjAsXRztYWjFwNYtztjlzu RQgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=VatCx4zN; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=trvn.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t19-20020a1709066bd300b00992765dcbd1si8918719ejs.866.2023.07.10.00.06.22; Mon, 10 Jul 2023 00:06:46 -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=@trvn.ru header.s=mail header.b=VatCx4zN; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=trvn.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230349AbjGJGxN (ORCPT + 99 others); Mon, 10 Jul 2023 02:53:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230187AbjGJGxK (ORCPT ); Mon, 10 Jul 2023 02:53:10 -0400 X-Greylist: delayed 599 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sun, 09 Jul 2023 23:53:09 PDT Received: from box.trvn.ru (box.trvn.ru [194.87.146.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0D23B8; Sun, 9 Jul 2023 23:53:08 -0700 (PDT) Received: from authenticated-user (box.trvn.ru [194.87.146.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.trvn.ru (Postfix) with ESMTPSA id 0BBDC400F4; Mon, 10 Jul 2023 11:34:05 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1688970846; bh=DND5rpm/wmgsLveMaPobuACP8Vr/HQmeyKyeNsCd8+o=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VatCx4zNsH8XVhtDNxxMbWubQSaBJWHv2qOvFQJfQjjrrc3MiDS/75JNYt2c/uQhW FUYY5uJ5wlFRyEE7nF1sA/j7HnSqWPm5MMOVYXydradsjlibExvSNRV/SI20ifKLH/ DQJteOgLnHvSyWw6LLYJ9oIvKwRNlkFHdz0aRv+FIuIFsBq7/Q/TS7Upn2Uaqz2+Bq zkD7Lu/LMJOT33H6ev6pRbawd3rV+/nQKyCQVlV2Kimam72MCdEbuTm+EzFWJzE36r LKio3U6j2EfMhcnWp/eCEG1bsoUZKATUp0nQUFr5OHtNG6FfOqZcllcfOrsrtbe333 KpyTN0MGCxVQA== MIME-Version: 1.0 Date: Mon, 10 Jul 2023 11:34:04 +0500 From: Nikita Travkin To: David Wronek Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Michael Turquette , Stephen Boyd , Taniya Das , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, cros-qcom-dts-watchers@chromium.org Subject: Re: [PATCH v2 5/7] arm64: dts: qcom: pm6150: Add resin and rtc nodes In-Reply-To: <20230706124339.134272-6-davidwronek@gmail.com> References: <20230706124339.134272-1-davidwronek@gmail.com> <20230706124339.134272-6-davidwronek@gmail.com> Message-ID: X-Sender: nikita@trvn.ru Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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 David Wronek писал(а) 06.07.2023 17:40: > Add support for the RTC which is the same as on other PMICs and add the > resin child node to the PM6150 PON device and disable it by default. > > Signed-off-by: David Wronek Actually... (+CC CROS watchers) Doug, this would enable a somewhat dubious RTC for trogdor devices. On qcom firmware the rtc is forever write-protected but you run TF-A so maybe it's more cooperative and you can add "allow-set-time" prop for trogdor, in case qtiseclib doesn't mess with it? Or, alternatively, disable this rtc for trogdor completely so it doesn't cause trouble? In any case, on the WoA firmware and with userspace offset handling, this works beautifully, so: Tested-by: Nikita Travkin # sc7180, Aspire 1 Thanks! > --- > arch/arm64/boot/dts/qcom/pm6150.dtsi | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/pm6150.dtsi b/arch/arm64/boot/dts/qcom/pm6150.dtsi > index 2e6afa296141..43c50f890e8b 100644 > --- a/arch/arm64/boot/dts/qcom/pm6150.dtsi > +++ b/arch/arm64/boot/dts/qcom/pm6150.dtsi > @@ -53,6 +53,14 @@ pm6150_pwrkey: pwrkey { > bias-pull-up; > linux,code = ; > }; > + > + pm6150_resin: resin { > + compatible = "qcom,pm8941-resin"; > + interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>; > + debounce = <15625>; > + bias-pull-up; > + status = "disabled"; > + }; > }; > > pm6150_temp: temp-alarm@2400 { > @@ -88,6 +96,13 @@ pm6150_adc_tm: adc-tm@3500 { > status = "disabled"; > }; > > + rtc@6000 { > + compatible = "qcom,pm8941-rtc"; > + reg = <0x6000>, <0x6100>; > + reg-names = "rtc", "alarm"; > + interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>; > + }; > + > pm6150_gpios: gpio@c000 { > compatible = "qcom,pm6150-gpio", "qcom,spmi-gpio"; > reg = <0xc000>;