From patchwork Thu Jan 19 21:47:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 46029 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp570940wrn; Thu, 19 Jan 2023 14:14:27 -0800 (PST) X-Google-Smtp-Source: AMrXdXvLO6G6Vk9umNeioAQMmgDcVtl2ANtYxHDckAQh1ze2dh9sBeKQKnItkVzLjKHVDb1kBGhy X-Received: by 2002:a05:6a20:b925:b0:9d:efbf:8156 with SMTP id fe37-20020a056a20b92500b0009defbf8156mr36182907pzb.31.1674166467641; Thu, 19 Jan 2023 14:14:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674166467; cv=none; d=google.com; s=arc-20160816; b=qgM4WwBWlnHu2Tv6CggcM7wQp3RU5QG8NpZhzoxeLsc5WSH6MMWrmKeVoX+EqlftFi K7WEfo81QLuDCNnMvjXOfaNTy6bWN5S5UKpGQBVsLq4QnVQNXOFFc7S+UyZxdXiyhFiZ pojj4gHwsKKbhUo8cyc/S6bxK+pH54L6Ux1l11vPUR6c6U5IMTzUvUjeHs3tADtvCKqi CO+i+KsvudJowQSllrSvlv2m3f8s3Hq7eY3Zzvo7oQSiPAiCurBZnoyTHvQ05rGC20hU Eadbf52yuUuyrYefTOnUl0yGlqtXVr+wSdVEVKDF6KBiUgHIvBAEZq6LN2QzVfulLLkJ 7LbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yIOZfy4VWsUhlTa3vEv8YxnNHLpzxL4zqV3VNj42y0k=; b=Th/nNb6xIWZuHiAWyA3+KNW+uMPdtLrnb2bWHH2OhuxKLVK9Y40kT4hXF+R6Gxy8lR Gz626Nr+T3DH+PlRzkMSiVscXiUCDHU9GQ/szTr+FHkIBCXZEPZf4LxVZFc200gdrCZH alS/pzjhKXS+MxU8ltvnZ9CDFQiBVBcJfawPC/N2KAGjq+nZw19kODjqJk/ZwY6wXdNZ Xhog5DoHTaMtmkfJ5mJmGF1YlaLAUSR/BPFaTxP2folafbHhKGRQztNsktY/O543oq3s i88vZWgAWxx3deZewpveE6qkGYl/J1KI6l6lQspfRm6PYS0wsNnfXwiAkxuTG1XEn1le SwuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Gy1ve9f9; 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 bm18-20020a656e92000000b004ace066f533si38166388pgb.177.2023.01.19.14.14.15; Thu, 19 Jan 2023 14:14:27 -0800 (PST) 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=Gy1ve9f9; 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 S230024AbjASWL6 (ORCPT + 99 others); Thu, 19 Jan 2023 17:11:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229728AbjASWLG (ORCPT ); Thu, 19 Jan 2023 17:11:06 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1903DB792; Thu, 19 Jan 2023 13:48:05 -0800 (PST) Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30JKpuxk009329; Thu, 19 Jan 2023 21:47:56 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 : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=yIOZfy4VWsUhlTa3vEv8YxnNHLpzxL4zqV3VNj42y0k=; b=Gy1ve9f9jXqwo5HKLdXkjWoKiJiXqsSs3DFdozu7ur7e0VluWd2Bz5nrRhZTNtcxIxfY JK+m40xrTbrPX687sOiwHTS6fW19envAOS4BHm48rst9IqpVfLqUzaX2ySPgd0syqvIs jAzPgR8o1SpTssE2pW94OBwY5nnuhIf5JXa/5XTCKOV7+XmExPtiEsUV/eXt0giQrNdF oNppQywTeexZsyccG1yf2F1g7DQEVziha8T/CM3LTSlVUJgG1O0T7fo0yYTzS02gFSpk Od2hkhqAvcrzcW3N5FtU7IoNHND665wo4x0YPQ4X+X7NBIu5wIqEyvpPniBZ9fmUcFvu Ug== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3n7c28ga28-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 21:47:56 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 30JLlt6L012606 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 21:47:55 GMT Received: from hu-bjorande-lv.qualcomm.com (10.49.16.6) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Thu, 19 Jan 2023 13:47:54 -0800 From: Bjorn Andersson To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski CC: Andy Gross , Bjorn Andersson , Konrad Dybcio , , , Subject: [PATCH 1/4] dt-bindings: regulator: Describe Maxim MAX20411 Date: Thu, 19 Jan 2023 13:47:46 -0800 Message-ID: <20230119214749.4048933-2-quic_bjorande@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230119214749.4048933-1-quic_bjorande@quicinc.com> References: <20230119214749.4048933-1-quic_bjorande@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: tqx9Wg_ciZ-vTdFRdKn4F14ZUCp78_6o X-Proofpoint-ORIG-GUID: tqx9Wg_ciZ-vTdFRdKn4F14ZUCp78_6o X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-19_14,2023-01-19_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 spamscore=0 priorityscore=1501 adultscore=0 lowpriorityscore=0 mlxlogscore=999 clxscore=1015 mlxscore=0 suspectscore=0 malwarescore=0 bulkscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301190183 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_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755490777999228090?= X-GMAIL-MSGID: =?utf-8?q?1755490777999228090?= Add binding for the Maxim MAX20411 step-down DC-DC converter. Signed-off-by: Bjorn Andersson Reviewed-by: Krzysztof Kozlowski --- .../bindings/regulator/maxim,max20411.yaml | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/maxim,max20411.yaml diff --git a/Documentation/devicetree/bindings/regulator/maxim,max20411.yaml b/Documentation/devicetree/bindings/regulator/maxim,max20411.yaml new file mode 100644 index 000000000000..3d1ba6139370 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/maxim,max20411.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/maxim,max20411.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim Integrated MAX20411 Step-Down DC-DC Converter + +maintainers: + - Bjorn Andersson + +description: + The MAX20411 is a high-efficiency, DC-DC step-down converter. It provides + configurable output voltage in the range of 0.5V to 1.275V, configurable over + I2C. + +allOf: + - $ref: regulator.yaml# + +properties: + compatible: + const: maxim,max20411 + + reg: + maxItems: 1 + + enable-gpios: + maxItems: 1 + description: GPIO connected to the EN pin, active high + + vdd-supply: + description: Input supply for the device (VDD pin, 3.0V to 5.5V) + +required: + - compatible + - reg + - enable-gpios + +unevaluatedProperties: false + +examples: + - | + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + regulator@39 { + compatible = "maxim,max20411"; + reg = <0x39>; + + enable-gpios = <&gpio 2 GPIO_ACTIVE_HIGH>; + + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <1000000>; + }; + }; +... From patchwork Thu Jan 19 21:47:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 46026 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp570670wrn; Thu, 19 Jan 2023 14:13:46 -0800 (PST) X-Google-Smtp-Source: AMrXdXttt0JCXu7mCGNyjU6xbrhd/yQJ5LPcJFCZNR2ndUp463gAr10oSs5WoX4B2pt5kRkFrrCw X-Received: by 2002:a05:6a20:6a93:b0:b8:7b76:b168 with SMTP id bi19-20020a056a206a9300b000b87b76b168mr12627458pzb.23.1674166426545; Thu, 19 Jan 2023 14:13:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674166426; cv=none; d=google.com; s=arc-20160816; b=gzw5eR5Pb4eGMUKuILm2M086wYeaOb3b+U1+t2heZoebHl5fC4A3Ul+fcuOoiAtrXb iBW1nf3IR238Zo/iI8H/nBxyxbp4APtW3NuCYJmGzX8mPwNeq5whUj0efkUUDuZtdtwg 2kNJ4s+htZQdqv+q1tYufIPZ5t8swuH98HpORqPWSJAbC4cg3jvAYYT+ARxZb1PvC95h GhLZ4IyKgnWeCFwUo9YhB1N2z1KL40oBy2CQstK+2aXv588msje4Kv/1MG9JxLeA2+qI nzVtQ6AOHlgYhadUB3skMoGXzj/o9ijg5AyY78x0ZmRC92wVJ8Fj3eUsRoGSjaVB9XXW rWjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pMM55Ju181dle18LqM06bzYA1IAzgBsYxm2Y3C5SHAc=; b=AMlYBt7T0Sv4vbttJmQb+r4SoS63AnzGvlLeasd+kG71AdJG6mcdSoJN4kP7YwCnVK w1G8nrtarCeebeVIDE9Ob0GnqX/3RAYIlAor55n8tDzON+wv589YWlAL14LCxUa7vb9p ZqihqQOnCbZnNqbgXK+muB4RwkEvvZjfvtpYFuR2Jiw12HwO8qdRpsBLsC+TTvwAxWQl 03hyvyARt3Z9ssT/syoW9J+FcTjscsNM0AKyUVbwgKPnj7RGOlDrzhmdPDB4+Oc2nZKD JZd+23NbxR/sU3H92Xq8teRcvJeSWjIbN35OMxtZmsji1jUVrBOCC7LEc1r+HhRAZMQk 2t1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=k6JtfgUD; 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 x24-20020a63db58000000b004d10708700fsi5098408pgi.106.2023.01.19.14.13.31; Thu, 19 Jan 2023 14:13:46 -0800 (PST) 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=k6JtfgUD; 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 S230112AbjASWL0 (ORCPT + 99 others); Thu, 19 Jan 2023 17:11:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229819AbjASWKv (ORCPT ); Thu, 19 Jan 2023 17:10:51 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BD73DA8E6; Thu, 19 Jan 2023 13:48:05 -0800 (PST) Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30JKhe0C028026; Thu, 19 Jan 2023 21:47:56 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 : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=pMM55Ju181dle18LqM06bzYA1IAzgBsYxm2Y3C5SHAc=; b=k6JtfgUDef8Smp4ok0b0tIAGSHLQqeveVg8znnorMvyWuPTQHWqDD50oi9DZdSzbjAc/ G1JeZSIZJwVbexbRCRVKChiPZDgjjYihNlBALz+PmHVnZlvoEKov0c8mR6lXzn95TQNW 7+ERdywroztL65DJwA7SE27ZGYtUlCM9vPyb7oM7d1GFC5s8spvjQqnX+tsucIWsZpqB wvibe3BLRDUyfJYqBZjCNkM4t14NWmv43QDKgi12uIEOq1yIpl2dmkzqOJONT7hRQqte urbn1FF8LoPddzJvQJwQ3QsZcfwPTWtVVaCdwM7l4EEujw6LuA+/Ssobo0mlDbe1yIHk HA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3n6ya2tcfx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 21:47:56 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 30JLltlu012606 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 21:47:55 GMT Received: from hu-bjorande-lv.qualcomm.com (10.49.16.6) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Thu, 19 Jan 2023 13:47:55 -0800 From: Bjorn Andersson To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski CC: Andy Gross , Bjorn Andersson , Konrad Dybcio , , , Subject: [PATCH 2/4] regulator: Introduce Maxim MAX20411 Step-Down converter Date: Thu, 19 Jan 2023 13:47:47 -0800 Message-ID: <20230119214749.4048933-3-quic_bjorande@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230119214749.4048933-1-quic_bjorande@quicinc.com> References: <20230119214749.4048933-1-quic_bjorande@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 4yAtqMay91m6nqCd3DXsYqkubUMOrf0v X-Proofpoint-GUID: 4yAtqMay91m6nqCd3DXsYqkubUMOrf0v X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-19_14,2023-01-19_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 bulkscore=0 mlxscore=0 priorityscore=1501 lowpriorityscore=0 suspectscore=0 impostorscore=0 adultscore=0 mlxlogscore=999 malwarescore=0 phishscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301190183 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755490734833510282?= X-GMAIL-MSGID: =?utf-8?q?1755490734833510282?= From: Bjorn Andersson Introduce a driver to control the Maxim MAX20411 family of high-efficiency, syncrhonous step-down converters. Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson --- drivers/regulator/Kconfig | 8 ++ drivers/regulator/Makefile | 1 + drivers/regulator/max20411-regulator.c | 163 +++++++++++++++++++++++++ 3 files changed, 172 insertions(+) create mode 100644 drivers/regulator/max20411-regulator.c diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index 820c9a0788e5..aae28d0a489c 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -655,6 +655,14 @@ config REGULATOR_MAX20086 protectorvia I2C bus. The regulator has 2 or 4 outputs depending on the device model. This driver is only capable to turn on/off them. +config REGULATOR_MAX20411 + tristate "Maxim MAX20411 High-Efficiency Single Step-Down Converter" + depends on I2C + select REGMAP_I2C + help + This driver controls the Maxim MAX20411 family of high-efficiency, + syncrhonous step-down converters. + config REGULATOR_MAX77686 tristate "Maxim 77686 regulator" depends on MFD_MAX77686 || COMPILE_TEST diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile index b9f5eb35bf5f..ee383d8fc835 100644 --- a/drivers/regulator/Makefile +++ b/drivers/regulator/Makefile @@ -80,6 +80,7 @@ obj-$(CONFIG_REGULATOR_MAX8973) += max8973-regulator.o obj-$(CONFIG_REGULATOR_MAX8997) += max8997-regulator.o obj-$(CONFIG_REGULATOR_MAX8998) += max8998.o obj-$(CONFIG_REGULATOR_MAX20086) += max20086-regulator.o +obj-$(CONFIG_REGULATOR_MAX20411) += max20411-regulator.o obj-$(CONFIG_REGULATOR_MAX77686) += max77686-regulator.o obj-$(CONFIG_REGULATOR_MAX77693) += max77693-regulator.o obj-$(CONFIG_REGULATOR_MAX77802) += max77802-regulator.o diff --git a/drivers/regulator/max20411-regulator.c b/drivers/regulator/max20411-regulator.c new file mode 100644 index 000000000000..a5139ddc7a84 --- /dev/null +++ b/drivers/regulator/max20411-regulator.c @@ -0,0 +1,163 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2021, The Linux Foundation. All rights reserved. + * Copyright (c) 2022, Linaro Ltd. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define MAX20411_UV_STEP 6250 +#define MAX20411_BASE_UV 243750 +#define MAX20411_MIN_SEL 41 /* 0.5V */ +#define MAX20411_MAX_SEL 165 /* 1.275V */ +#define MAX20411_VID_OFFSET 0x7 +#define MAX20411_VID_MASK 0xff +#define MAX20411_SLEW_OFFSET 0x6 +#define MAX20411_SLEW_DVS_MASK 0xc +#define MAX20411_SLEW_SR_MASK 0x3 + +struct max20411 { + struct device *dev; + struct device_node *of_node; + struct regulator_desc desc; + struct regulator_dev *rdev; + struct regmap *regmap; +}; + +static const unsigned int max20411_slew_rates[] = { 13100, 6600, 3300, 1600 }; + +static int max20411_enable_time(struct regulator_dev *rdev) +{ + int voltage, rate, ret; + unsigned int val; + + /* get voltage */ + ret = regmap_read(rdev->regmap, rdev->desc->vsel_reg, &val); + if (ret) + return ret; + + val &= rdev->desc->vsel_mask; + voltage = regulator_list_voltage_linear(rdev, val); + + /* get rate */ + ret = regmap_read(rdev->regmap, MAX20411_SLEW_OFFSET, &val); + if (ret) + return ret; + + val = FIELD_GET(MAX20411_SLEW_SR_MASK, val); + rate = max20411_slew_rates[val]; + + return DIV_ROUND_UP(voltage, rate); +} + +static const struct regmap_config max20411_regmap_config = { + .reg_bits = 8, + .val_bits = 8, + .max_register = 0xe, +}; + +static const struct regulator_ops max20411_ops = { + .get_voltage_sel = regulator_get_voltage_sel_regmap, + .set_voltage_sel = regulator_set_voltage_sel_regmap, + .list_voltage = regulator_list_voltage_linear, + .enable_time = max20411_enable_time, +}; + +static int max20411_probe(struct i2c_client *client, + const struct i2c_device_id *id) +{ + struct regulator_init_data *init_data; + struct device *dev = &client->dev; + struct regulator_config cfg = {}; + struct regulator_desc *desc; + struct max20411 *max20411; + + max20411 = devm_kzalloc(dev, sizeof(*max20411), GFP_KERNEL); + if (!max20411) + return -ENOMEM; + + max20411->regmap = devm_regmap_init_i2c(client, &max20411_regmap_config); + if (IS_ERR(max20411->regmap)) { + dev_err(dev, "Failed to allocate regmap!\n"); + return PTR_ERR(max20411->regmap); + } + + max20411->dev = dev; + max20411->of_node = dev->of_node; + + init_data = of_get_regulator_init_data(max20411->dev, max20411->of_node, &max20411->desc); + if (!init_data) + return -ENODATA; + + desc = &max20411->desc; + + desc->ops = &max20411_ops; + desc->owner = THIS_MODULE; + desc->type = REGULATOR_VOLTAGE; + desc->supply_name = "vin"; + desc->name = "max20411"; + + /* + * voltage = 0.24375V + selector * 6.25mV + * with valid selector between 41 to 165 (0.5V to 1.275V) + */ + desc->min_uV = MAX20411_BASE_UV; + desc->uV_step = MAX20411_UV_STEP; + desc->linear_min_sel = MAX20411_MIN_SEL; + desc->n_voltages = MAX20411_MAX_SEL; + + desc->vsel_reg = MAX20411_VID_OFFSET; + desc->vsel_mask = MAX20411_VID_MASK; + + desc->ramp_reg = MAX20411_SLEW_OFFSET; + desc->ramp_mask = MAX20411_SLEW_DVS_MASK; + desc->ramp_delay_table = max20411_slew_rates; + desc->n_ramp_values = ARRAY_SIZE(max20411_slew_rates); + + cfg.dev = max20411->dev; + cfg.init_data = init_data; + cfg.of_node = max20411->of_node; + cfg.driver_data = max20411; + + cfg.ena_gpiod = gpiod_get(max20411->dev, "enable", GPIOD_ASIS); + if (IS_ERR(cfg.ena_gpiod)) + return dev_err_probe(dev, PTR_ERR(cfg.ena_gpiod), + "unable to acquire enable gpio\n"); + + max20411->rdev = devm_regulator_register(max20411->dev, desc, &cfg); + if (IS_ERR(max20411->rdev)) + dev_err(max20411->dev, "Failed to register regulator\n"); + + return PTR_ERR_OR_ZERO(max20411->rdev); +} + +static const struct of_device_id of_max20411_match_tbl[] = { + { .compatible = "maxim,max20411", }, + { }, +}; +MODULE_DEVICE_TABLE(of, of_max20411_match_tbl); + +static const struct i2c_device_id max20411_id[] = { + { "max20411", 0 }, + { }, +}; +MODULE_DEVICE_TABLE(i2c, max20411_id); + +static struct i2c_driver max20411_i2c_driver = { + .driver = { + .name = "max20411", + .of_match_table = of_max20411_match_tbl, + }, + .probe = max20411_probe, + .id_table = max20411_id, +}; +module_i2c_driver(max20411_i2c_driver); + +MODULE_LICENSE("GPL"); From patchwork Thu Jan 19 21:47:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 46027 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp570814wrn; Thu, 19 Jan 2023 14:14:08 -0800 (PST) X-Google-Smtp-Source: AMrXdXuz0rUGIw3tdGk2ilFefL9TFYtf9B/SCj+Ya4j5KF68Bcxp9w5QMtYWhVQ6p2gCZAoi5hU2 X-Received: by 2002:a17:90b:70f:b0:228:dc6f:fae0 with SMTP id s15-20020a17090b070f00b00228dc6ffae0mr12536276pjz.30.1674166447816; Thu, 19 Jan 2023 14:14:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674166447; cv=none; d=google.com; s=arc-20160816; b=qcRgtNKeRjTNIpn6BBvD9qIKSJCpVIGjsboXKo11aCpDiWfGMHvuL1fVmLflU+b1+y /7CCyQXs1esAVGheOmjns/4revoPm+mtVA8cbRWIiTbzJH/is8GpUde9U2J/xn4TkDE3 UAZsgFsbrknWZbQxulGOZ4Q3eplKG0JSjQ7rf5DqZmU95FupiZcw5t99ZsKyI5+8ZoVy H/2Fj6D6cdBje/UDNTT3DAQLJtfdfSioojADKk1xlyMzsBgWZ52jOGl8urhrVg1uClqQ ZppV9uVZM3U5QaKRHextxq/nnPajtD2zTBjc0El6BsT8XPoY/t1/dV1KMlpFeubWsHjr yH1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lYzOAd+21NbrmryORLRk8QjiUhqNoeZd2MzPEd2fM4g=; b=M57NvzN4WtsiyCEH7Ft+lUzLDaH99VqBb9HbrBBuGFa4gxtpaP1G3glgLXB0FgMMwc LjNHSFau1Bc+E/6Dv8uX1ABBu8FCnnCOfHqkZgAVSO9vd97JyvVfolTN8QDmxw8B/lPj YCpd+Gzt8LCST8pgIxVZIC3+juuPkQLy50kRRssSCJLOx18bqQxGpWqBIAqGLpi5hTIE EWfQiGq/LrrOyc3d/fvXANeF+ddUUN6dPMvYkJWtDDmH4UAXv4quvW9kzmJk0AJFMPRK JAy8TqRgRzDO4KXehr1KpUani9qy7A8bOtPsjSgPx4A++51cZkiOa21KMVC3Nxw/fK0D SWIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ctnSZsse; 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 kx14-20020a17090b228e00b00229bf39a1ecsi389941pjb.76.2023.01.19.14.13.55; Thu, 19 Jan 2023 14:14:07 -0800 (PST) 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=ctnSZsse; 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 S230152AbjASWL3 (ORCPT + 99 others); Thu, 19 Jan 2023 17:11:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229886AbjASWKx (ORCPT ); Thu, 19 Jan 2023 17:10:53 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89048DB78F; Thu, 19 Jan 2023 13:48:05 -0800 (PST) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30JLeGWg021677; Thu, 19 Jan 2023 21:47:57 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 : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=lYzOAd+21NbrmryORLRk8QjiUhqNoeZd2MzPEd2fM4g=; b=ctnSZssemAR5EyaytBahlLlpb005m6qBR1cTAonDecW/Mg4YuZggAqsyM4hg/ZlDC1on +1i0OfWrfhJDgdssmtvWn9kJdpPkoy9FHNqE357CuXxWR2BLDiKM2CVtKijEwcRdLbBF u4kSZyq4QffRXCecH5K5wMAlZAQ0S6t8/QUhGgVgK5Oab2fIgyU/R3vUqJnYujmn0Eb4 ZoDWYgw+Qal3nez8vGcGrGxcMwAFBVbfu8Skcy/MikJoDzPsNPN8luc8gcMAKZyG8PYi sb7eVQGXbxPY0raZ5RSI5N7SE5fMhy0oCh5bp7EummCAZlkC6K/e64xDc6JGxw1jF157 uw== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3n7593s97v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 21:47:56 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 30JLltHa018389 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 21:47:55 GMT Received: from hu-bjorande-lv.qualcomm.com (10.49.16.6) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Thu, 19 Jan 2023 13:47:55 -0800 From: Bjorn Andersson To: Andy Gross , Bjorn Andersson , Konrad Dybcio CC: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , , , Subject: [PATCH 3/4] arm64: dts: qcom: sc8280xp: Add qup1_i2c4 Date: Thu, 19 Jan 2023 13:47:48 -0800 Message-ID: <20230119214749.4048933-4-quic_bjorande@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230119214749.4048933-1-quic_bjorande@quicinc.com> References: <20230119214749.4048933-1-quic_bjorande@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: gZ-7jBHhJjnXdyewvFtIssb8G2mHLAL_ X-Proofpoint-ORIG-GUID: gZ-7jBHhJjnXdyewvFtIssb8G2mHLAL_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-19_14,2023-01-19_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxlogscore=999 spamscore=0 suspectscore=0 mlxscore=0 adultscore=0 clxscore=1015 impostorscore=0 priorityscore=1501 bulkscore=0 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301190183 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_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755490757141616246?= X-GMAIL-MSGID: =?utf-8?q?1755490757141616246?= From: Bjorn Andersson Add description of i2c4 on qup1. Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson --- arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi index ea2c8ad37ccb..f971c4176686 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi @@ -901,6 +901,22 @@ qup1: geniqup@ac0000 { ranges; status = "disabled"; + + qup1_i2c4: i2c@a90000 { + compatible = "qcom,geni-i2c"; + reg = <0 0x00a90000 0 0x4000>; + clock-names = "se"; + clocks = <&gcc GCC_QUPV3_WRAP1_S4_CLK>; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + power-domains = <&rpmhpd SC8280XP_CX>; + interconnects = <&clk_virt MASTER_QUP_CORE_1 0 &clk_virt SLAVE_QUP_CORE_1 0>, + <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_1 0>, + <&aggre1_noc MASTER_QUP_1 0 &mc_virt SLAVE_EBI1 0>; + interconnect-names = "qup-core", "qup-config", "qup-memory"; + status = "disabled"; + }; }; pcie4: pcie@1c00000 { From patchwork Thu Jan 19 21:47:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 46028 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp570938wrn; Thu, 19 Jan 2023 14:14:27 -0800 (PST) X-Google-Smtp-Source: AMrXdXuWuSdfOH59dJTZG6+72Xr6CssAX7bZHg4lzeQ7BI0qG28X068jhPfjTJtpvduc2PG06RzC X-Received: by 2002:a17:90a:d258:b0:227:1fa4:4aa1 with SMTP id o24-20020a17090ad25800b002271fa44aa1mr11985175pjw.47.1674166467166; Thu, 19 Jan 2023 14:14:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674166467; cv=none; d=google.com; s=arc-20160816; b=YXHBgJzbpb+VcgxeI0MSc84bW8JKSPXtYooXrSmdTpFSYwdBRO45J9xQHdRPL0Ja0F OWME6SLdCvMP8CulecBsKm8NwgbH444jeMqVhX4LnmAlZ34uaAbIMBxEivEj2XA0cAQe E9f0rOHZHfywhs5rBK7j0sMjSKB+H/Ujzipe2CunU7nkFGjtITWbhfjKaX5sRsMEK22a qJBxmiCQVktHwel1M0xs3NAC+1LccPcmuglJ79Tk1+iC6SfaiUkZQUvPN1HF9bETyYxW IyXv2o/OU0QI8zVhfgW20HyqsPk6tP2oE6fsrOPAhZluYyByGnCiR7ScQIIdePU0RQ+c 0+eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HXXCRVF2FwY71rw98hwl77+52Lu2DXlFUJQMFapEEcw=; b=tRcZz03/b9acJL6j0QGa57BcLuV5Dufi+VD+8jq9mSssV6zHuM/VSdhukP81hB5EbS aUlhetZqVUmQeI9DKwHLJHf0C3eYINRrCAVFv1B3Pmkjw5xLxvo6aFSBtEym7mMCd5da Fvew8MyJGNx0wijuCXRMTRrjUAuLfbfaerVitvZjSKfOscoJ2hp9C++TbP71wtUocBWz njYfTMMtBSPhLKuTH1EtbaYaa4ML3nsT/SIfWDOs1iNxY945TFs3/tVYNGqE3+sYPptf 4N0EQ6SkZdTw+Vs6hyKO369gG13Dlvu4TJlNbvUtzKNY+BgzGUf7kFy3LDvG1+USDhe5 Ca9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=MunURtua; 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 d23-20020a17090ab31700b00225a7fb0dbdsi412834pjr.111.2023.01.19.14.14.13; Thu, 19 Jan 2023 14:14:27 -0800 (PST) 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=MunURtua; 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 S229973AbjASWLw (ORCPT + 99 others); Thu, 19 Jan 2023 17:11:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229961AbjASWK7 (ORCPT ); Thu, 19 Jan 2023 17:10:59 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C24EDB784; Thu, 19 Jan 2023 13:48:05 -0800 (PST) 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 30JFcsWK014949; Thu, 19 Jan 2023 21:47:57 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 : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=HXXCRVF2FwY71rw98hwl77+52Lu2DXlFUJQMFapEEcw=; b=MunURtuaLBBQyFPCe4Zys3R8SVa5fvz16FcqB5k4w5RXlANzBs5R59Medcgb7LoS9cct a03NO+ETAyGyi1pvKgGBXm0NVYZc+6Xupexz1NsRc0BeWlZQ7oyQLPzE+ZtCOnCP9PR9 KWTyaBxx69sSky6+xbaCfvDoiwW2SRMRLufN+UNLZR0isw9iKpCB5cDDfGYR+SC4vfL2 XXcVCyNqPVSLtmZ6FpnkACFBMpigW7OI1Io5oH3oDZDDMLxHYAw5F+OKKUKCfB1ph2HM l2QAevuNwPlyBsv0et20LWzZ/7wyUgs8mNgcEOg06oIxKK/f9q5jrHB7W+jfbu06PdXz 9w== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3n75w3h63m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 21:47:57 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 30JLlupr012619 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 21:47:56 GMT Received: from hu-bjorande-lv.qualcomm.com (10.49.16.6) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Thu, 19 Jan 2023 13:47:55 -0800 From: Bjorn Andersson To: Andy Gross , Bjorn Andersson , Konrad Dybcio CC: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , , , Subject: [PATCH 4/4] arm64: dts: qcom: sa8295p-adp: Add max20411 on i2c4 Date: Thu, 19 Jan 2023 13:47:49 -0800 Message-ID: <20230119214749.4048933-5-quic_bjorande@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230119214749.4048933-1-quic_bjorande@quicinc.com> References: <20230119214749.4048933-1-quic_bjorande@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: RsohjFyHt0Bl2LQ85x3OS_dgJPh2oqko X-Proofpoint-GUID: RsohjFyHt0Bl2LQ85x3OS_dgJPh2oqko X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-19_14,2023-01-19_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=936 impostorscore=0 lowpriorityscore=0 adultscore=0 clxscore=1015 mlxscore=0 spamscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301190183 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_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755490777553675187?= X-GMAIL-MSGID: =?utf-8?q?1755490777553675187?= From: Bjorn Andersson The SA8295P ADP has a Maxim max20411 step-down converter on i2c4. Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson --- arch/arm64/boot/dts/qcom/sa8295p-adp.dts | 41 ++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sa8295p-adp.dts b/arch/arm64/boot/dts/qcom/sa8295p-adp.dts index 80cb18d9e481..cdb296569d46 100644 --- a/arch/arm64/boot/dts/qcom/sa8295p-adp.dts +++ b/arch/arm64/boot/dts/qcom/sa8295p-adp.dts @@ -476,6 +476,31 @@ &pcie4_phy { status = "okay"; }; +&qup1 { + status = "okay"; +}; + +&qup1_i2c4 { + pinctrl-names = "default"; + pinctrl-0 = <&qup1_i2c4_state>; + + status = "okay"; + + vdd_gfx: regulator@39 { + compatible = "maxim,max20411"; + reg = <0x39>; + + regulator-name = "vdd_gfx"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <968750>; + + enable-gpios = <&pmm8540a_gpios 2 GPIO_ACTIVE_HIGH>; + + pinctrl-names = "default"; + pinctrl-0 = <&vdd_gfx_enable_state>; + }; +}; + &qup2 { status = "okay"; }; @@ -636,6 +661,14 @@ &xo_board_clk { /* PINCTRL */ +&pmm8540a_gpios { + vdd_gfx_enable_state: vdd-gfx-enable-state { + pins = "gpio2"; + function = "normal"; + output-enable; + }; +}; + &tlmm { pcie2a_default: pcie2a-default-state { clkreq-n-pins { @@ -728,4 +761,12 @@ wake-n-pins { bias-pull-up; }; }; + + qup1_i2c4_state: qup1-i2c4-state { + pins = "gpio0", "gpio1"; + function = "qup12"; + + drive-strength = <2>; + bias-pull-up; + }; };