Message ID | 1690970366-30982-4-git-send-email-quic_rohiagar@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp399639vqx; Wed, 2 Aug 2023 05:00:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlHz5ut3nwGJYmYDjWc/XR6YrO5k9S948CYotSLId/Axjso6Pk420GA42LoOy2GGECqPzAA1 X-Received: by 2002:a05:6402:3452:b0:522:7db8:993b with SMTP id l18-20020a056402345200b005227db8993bmr4767382edc.31.1690977601323; Wed, 02 Aug 2023 05:00:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690977601; cv=none; d=google.com; s=arc-20160816; b=G7yrHCFKKCD7IEbvV+fjzK9jpVJz7i6Z65mpNElxCD3UiK7eu/nOcW2kENnW/ltMrk xdiazRUTTBW1Onf1pyYKWqb4wSWQHMiWHkdTyOgmqiiT80hUdpuOFVkFQ02EXAMBWpBU syLCA95b8nC8nZnEIJMpylr3Jd8/4tAJuvy/8TwvZSrRo4DH0083cPPuRIo8JLeiSLnP 8MWqMr8+SGcl9CWRT/aW83TXQ2YXXy2TViR+BiOh7JFwmroJsF9yDFpKIbR/99DGljl+ /OIO1yqHg7jBsLuw2sRA3e3FWMs/oBrbF+dQBWScH+WlTYy9EkdAkRmpePUZxxuXyw1a 5QAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=wHJuMwuZ/Vw4MXbbd2L5abyoDfmMeHqb93P6phcpxac=; fh=FqIaZmJRa7M15GQeKUdLg2SE2zbDk9BBzU6UB9zaVuw=; b=jaEvQxkJUIdPwH+8m44w4a20Qxh4E4zTHXm0uWyMqtpQcZPexIsUoWyyYDSdRSJyD2 JiIwnioeQkAikG5vl5Myr7ZqCvn++v8HxHR3bJ07GvnvnkibVwDJD3cZhx6h/Y2siTSh WJkODSvLsL5ELoSVE9uhEkTmRxLpjn2Pk2/YejjjEgJtVEfJqtOJ4gn6XS3Ly9PZVsqV wyR/NzeyBM83jgdDW76v5CJeOhnZQ5kSMpWGoHzUWRDT008rq4Xhvqm7DSwTaZlglaIZ 0hq0gym2hSXqPTpmkppNIy8MFmbuqldLWtpnXczvd93SWibiFOlXB/BUcn8ELIXBR5B5 gwtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=oCIKa8qC; 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=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f14-20020a056402150e00b00522ab2a485dsi7123853edw.579.2023.08.02.04.59.37; Wed, 02 Aug 2023 05:00:01 -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=@quicinc.com header.s=qcppdkim1 header.b=oCIKa8qC; 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=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233181AbjHBKOR (ORCPT <rfc822;maxi.paulin@gmail.com> + 99 others); Wed, 2 Aug 2023 06:14:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232818AbjHBKOM (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 2 Aug 2023 06:14:12 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 187B8132; Wed, 2 Aug 2023 03:14:09 -0700 (PDT) Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3729tOBF003946; Wed, 2 Aug 2023 09:59:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=qcppdkim1; bh=wHJuMwuZ/Vw4MXbbd2L5abyoDfmMeHqb93P6phcpxac=; b=oCIKa8qCW/DXn3eb3RbSVqjUZfm8ewjBoY8wfU9poC7ew319TtPpD/fyD5dQ/7UZ3R1X CLfipKC2VOmdyAYaclE615UZpT0Mw8at5DN48VqXm/e1MBlaJDxZe/wpk2ML6rxkXXvN ztzIG3wfgbrBtXvjd/Q4VG/GyGAljQDpceYhvy53So365s4D4J3qSDIWQqkn/ZtRGoQI nkV+GTC3pwgZwDfEBAeopo0l7Not/GkGXUKQ28qX7w19VOclqdgzaSNvqfuucyBeOLrJ joHev+rcvaCrV7q4BFumf03jyzGTNZ8VONqMk5AN/4+GVnyaWX1mbhPf1+JLVbUV+Nm5 Ug== Received: from apblrppmta02.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3s760c204j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Aug 2023 09:59:32 +0000 Received: from pps.filterd (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 3729xTt3006625; Wed, 2 Aug 2023 09:59:29 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 3s4uuke10b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 02 Aug 2023 09:59:29 +0000 Received: from APBLRPPMTA02.qualcomm.com (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3729xSVR006579; Wed, 2 Aug 2023 09:59:28 GMT Received: from hu-sgudaval-hyd.qualcomm.com (hu-rohiagar-hyd.qualcomm.com [10.213.106.138]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTP id 3729xSPB006594; Wed, 02 Aug 2023 09:59:28 +0000 Received: by hu-sgudaval-hyd.qualcomm.com (Postfix, from userid 3970568) id 1CB471B01; Wed, 2 Aug 2023 15:29:28 +0530 (+0530) From: Rohit Agarwal <quic_rohiagar@quicinc.com> To: agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Rohit Agarwal <quic_rohiagar@quicinc.com> Subject: [PATCH 3/8] arm64: dts: qcom: Add PMIC pm7550ba dtsi Date: Wed, 2 Aug 2023 15:29:21 +0530 Message-Id: <1690970366-30982-4-git-send-email-quic_rohiagar@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1690970366-30982-1-git-send-email-quic_rohiagar@quicinc.com> References: <1690970366-30982-1-git-send-email-quic_rohiagar@quicinc.com> X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: uzh62-bBGn8GrMF7oa_4y8k1XQp8dTCc X-Proofpoint-ORIG-GUID: uzh62-bBGn8GrMF7oa_4y8k1XQp8dTCc X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-02_04,2023-08-01_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 suspectscore=0 adultscore=0 mlxlogscore=443 impostorscore=0 mlxscore=0 phishscore=0 clxscore=1015 bulkscore=0 priorityscore=1501 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2308020087 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773118529322472719 X-GMAIL-MSGID: 1773118529322472719 |
Series |
Add pmics supported in Qualcomm's SDX75 platform
|
|
Commit Message
Rohit Agarwal
Aug. 2, 2023, 9:59 a.m. UTC
Add dtsi for PMIC pm7550ba found in Qualcomm platforms.
Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
---
arch/arm64/boot/dts/qcom/pm7550ba.dtsi | 70 ++++++++++++++++++++++++++++++++++
1 file changed, 70 insertions(+)
create mode 100644 arch/arm64/boot/dts/qcom/pm7550ba.dtsi
Comments
On 2.08.2023 11:59, Rohit Agarwal wrote: > Add dtsi for PMIC pm7550ba found in Qualcomm platforms. > > Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com> > --- Subject: "PMIC pm7550ba" -> "pm7550ba PMIC" [...] > + > + pm7550ba_eusb2_repeater: phy@fd00 { > + compatible = "qcom,pm8550b-eusb2-repeater"; A new compatible should be introduced, so that it goes like this: compatible = "qcom,pm7550ba-eusb2-repeater", "qcom,pm8550b-eusb2-repeater"; Konrad
On 8/2/2023 6:12 PM, Konrad Dybcio wrote: > On 2.08.2023 11:59, Rohit Agarwal wrote: >> Add dtsi for PMIC pm7550ba found in Qualcomm platforms. >> >> Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com> >> --- > Subject: "PMIC pm7550ba" -> "pm7550ba PMIC" > > [...] > >> + >> + pm7550ba_eusb2_repeater: phy@fd00 { >> + compatible = "qcom,pm8550b-eusb2-repeater"; > A new compatible should be introduced, so that it goes like this: > > compatible = "qcom,pm7550ba-eusb2-repeater", "qcom,pm8550b-eusb2-repeater"; Just a doubt, Since the compatible can be same why we need to introduce a new compatible. Should every soc have a compatible string? Thanks, Rohit. > > Konrad
On 2.08.2023 15:13, Rohit Agarwal wrote: > > On 8/2/2023 6:12 PM, Konrad Dybcio wrote: >> On 2.08.2023 11:59, Rohit Agarwal wrote: >>> Add dtsi for PMIC pm7550ba found in Qualcomm platforms. >>> >>> Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com> >>> --- >> Subject: "PMIC pm7550ba" -> "pm7550ba PMIC" >> >> [...] >> >>> + >>> + pm7550ba_eusb2_repeater: phy@fd00 { >>> + compatible = "qcom,pm8550b-eusb2-repeater"; >> A new compatible should be introduced, so that it goes like this: >> >> compatible = "qcom,pm7550ba-eusb2-repeater", "qcom,pm8550b-eusb2-repeater"; > Just a doubt, Since the compatible can be same why we need to introduce a new compatible. > Should every soc have a compatible string? If it turns out that we need to add a quirk for PM7550BA 3 years down the line, this approach lets us fix it for users that never updated their device trees. Konrad
On 8/2/2023 6:44 PM, Konrad Dybcio wrote: > On 2.08.2023 15:13, Rohit Agarwal wrote: >> On 8/2/2023 6:12 PM, Konrad Dybcio wrote: >>> On 2.08.2023 11:59, Rohit Agarwal wrote: >>>> Add dtsi for PMIC pm7550ba found in Qualcomm platforms. >>>> >>>> Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com> >>>> --- >>> Subject: "PMIC pm7550ba" -> "pm7550ba PMIC" >>> >>> [...] >>> >>>> + >>>> + pm7550ba_eusb2_repeater: phy@fd00 { >>>> + compatible = "qcom,pm8550b-eusb2-repeater"; >>> A new compatible should be introduced, so that it goes like this: >>> >>> compatible = "qcom,pm7550ba-eusb2-repeater", "qcom,pm8550b-eusb2-repeater"; >> Just a doubt, Since the compatible can be same why we need to introduce a new compatible. >> Should every soc have a compatible string? > If it turns out that we need to add a quirk for PM7550BA 3 years down > the line, this approach lets us fix it for users that never updated > their device trees. Yes. Got it. Thanks, Rohit > > Konrad
On Wed, Aug 02, 2023 at 03:14:19PM +0200, Konrad Dybcio wrote: > On 2.08.2023 15:13, Rohit Agarwal wrote: > > > > On 8/2/2023 6:12 PM, Konrad Dybcio wrote: > >> On 2.08.2023 11:59, Rohit Agarwal wrote: > >>> Add dtsi for PMIC pm7550ba found in Qualcomm platforms. > >>> > >>> Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com> > >>> --- > >> Subject: "PMIC pm7550ba" -> "pm7550ba PMIC" > >> > >> [...] > >> > >>> + > >>> + pm7550ba_eusb2_repeater: phy@fd00 { > >>> + compatible = "qcom,pm8550b-eusb2-repeater"; > >> A new compatible should be introduced, so that it goes like this: > >> > >> compatible = "qcom,pm7550ba-eusb2-repeater", "qcom,pm8550b-eusb2-repeater"; > > Just a doubt, Since the compatible can be same why we need to introduce a new compatible. > > Should every soc have a compatible string? > If it turns out that we need to add a quirk for PM7550BA 3 years down > the line, this approach lets us fix it for users that never updated > their device trees. > Trying to make my understanding clear. eUSB repeater is a peripheral in the PMIC. Do we need a separate compatible even if the peripheral is same in two different PMIC chips? I believe eUSB peripheral has some identification registers to apply any quirks in future. Adding Jack who would know more about any deltas between the PMICs in sdx75 and sm8550. Thanks, Pavan
On 3.08.2023 07:06, Pavan Kondeti wrote: > > On Wed, Aug 02, 2023 at 03:14:19PM +0200, Konrad Dybcio wrote: >> On 2.08.2023 15:13, Rohit Agarwal wrote: >>> >>> On 8/2/2023 6:12 PM, Konrad Dybcio wrote: >>>> On 2.08.2023 11:59, Rohit Agarwal wrote: >>>>> Add dtsi for PMIC pm7550ba found in Qualcomm platforms. >>>>> >>>>> Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com> >>>>> --- >>>> Subject: "PMIC pm7550ba" -> "pm7550ba PMIC" >>>> >>>> [...] >>>> >>>>> + >>>>> + pm7550ba_eusb2_repeater: phy@fd00 { >>>>> + compatible = "qcom,pm8550b-eusb2-repeater"; >>>> A new compatible should be introduced, so that it goes like this: >>>> >>>> compatible = "qcom,pm7550ba-eusb2-repeater", "qcom,pm8550b-eusb2-repeater"; >>> Just a doubt, Since the compatible can be same why we need to introduce a new compatible. >>> Should every soc have a compatible string? >> If it turns out that we need to add a quirk for PM7550BA 3 years down >> the line, this approach lets us fix it for users that never updated >> their device trees. >> > > Trying to make my understanding clear. > > eUSB repeater is a peripheral in the PMIC. Do we need a separate > compatible even if the peripheral is same in two different PMIC chips? > I believe eUSB peripheral has some identification registers to apply any > quirks in future. Perhaps, but keeping the compatible tied to the specific hardware is the way to go with the device tree. Most components don't have such information avaiable, and since at introduction time there wasn't any better name for it, "pm8550b-eusb2-repeater" was chosen. Konrad
On Fri, Aug 04, 2023 at 06:58:34PM +0200, Konrad Dybcio wrote: > On 3.08.2023 07:06, Pavan Kondeti wrote: > > > > On Wed, Aug 02, 2023 at 03:14:19PM +0200, Konrad Dybcio wrote: > >> On 2.08.2023 15:13, Rohit Agarwal wrote: > >>> > >>> On 8/2/2023 6:12 PM, Konrad Dybcio wrote: > >>>> On 2.08.2023 11:59, Rohit Agarwal wrote: > >>>>> Add dtsi for PMIC pm7550ba found in Qualcomm platforms. > >>>>> > >>>>> Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com> > >>>>> --- > >>>> Subject: "PMIC pm7550ba" -> "pm7550ba PMIC" > >>>> > >>>> [...] > >>>> > >>>>> + > >>>>> + pm7550ba_eusb2_repeater: phy@fd00 { > >>>>> + compatible = "qcom,pm8550b-eusb2-repeater"; > >>>> A new compatible should be introduced, so that it goes like this: > >>>> > >>>> compatible = "qcom,pm7550ba-eusb2-repeater", "qcom,pm8550b-eusb2-repeater"; > >>> Just a doubt, Since the compatible can be same why we need to introduce a new compatible. > >>> Should every soc have a compatible string? > >> If it turns out that we need to add a quirk for PM7550BA 3 years down > >> the line, this approach lets us fix it for users that never updated > >> their device trees. > >> > > > > Trying to make my understanding clear. > > > > eUSB repeater is a peripheral in the PMIC. Do we need a separate > > compatible even if the peripheral is same in two different PMIC chips? > > I believe eUSB peripheral has some identification registers to apply any > > quirks in future. > Perhaps, but keeping the compatible tied to the specific hardware is > the way to go with the device tree. Most components don't have such > information avaiable, and since at introduction time there wasn't > any better name for it, "pm8550b-eusb2-repeater" was chosen. > Thanks for the clarification and guidance. We can introduce a new compatible and use qcom,pm8550b-eusb2-repeater as generic binding. Thanks, Pavan
diff --git a/arch/arm64/boot/dts/qcom/pm7550ba.dtsi b/arch/arm64/boot/dts/qcom/pm7550ba.dtsi new file mode 100644 index 0000000..97b28bb --- /dev/null +++ b/arch/arm64/boot/dts/qcom/pm7550ba.dtsi @@ -0,0 +1,70 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +#include <dt-bindings/interrupt-controller/irq.h> +#include <dt-bindings/spmi/spmi.h> + +/ { + thermal-zones { + pm7550ba-thermal { + polling-delay-passive = <100>; + polling-delay = <0>; + + thermal-sensors = <&pm7550ba_temp>; + + trips { + trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + trip1 { + temperature = <115000>; + hysteresis = <0>; + type = "hot"; + }; + + trip2 { + temperature = <145000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + }; +}; + +&spmi_bus { + pm7550ba: pmic@7 { + compatible = "qcom,pm7550ba", "qcom,spmi-pmic"; + reg = <7 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + pm7550ba_temp: temp-alarm@a00 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0xa00>; + interrupts = <0x7 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; + #thermal-sensor-cells = <0>; + }; + + pm7550ba_gpios: gpio@8800 { + compatible = "qcom,pm7550ba-gpio", "qcom,spmi-gpio"; + reg = <0x8800>; + gpio-controller; + gpio-ranges = <&pm7550ba_gpios 0 0 8>; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + pm7550ba_eusb2_repeater: phy@fd00 { + compatible = "qcom,pm8550b-eusb2-repeater"; + reg = <0xfd00>; + #phy-cells = <0>; + }; + }; +};