From patchwork Fri Oct 6 04:53:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Devi Priya X-Patchwork-Id: 149113 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp89867vqo; Thu, 5 Oct 2023 21:54:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFzLNP+dxG5wL4qTEFkyTqmlciqUgisphKj+PziNEQGiu525LeD5RHpM7rmi7lEEZipjLx6 X-Received: by 2002:a17:90a:74cc:b0:267:ffcf:e9e3 with SMTP id p12-20020a17090a74cc00b00267ffcfe9e3mr7214324pjl.46.1696568053103; Thu, 05 Oct 2023 21:54:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696568053; cv=none; d=google.com; s=arc-20160816; b=UOmzX0J+iP3xYwSAkoV848vz5auM5/DY/2xEFmO6cR96bliarTCVqRfZtqx0h+/EXC z909ktYBLrrbFuJe/KR77QqQ+5IWuiYnQV5kQMXeBpk68KmvK8nkS684WQxElcO9n6z1 NRjcM9/3Iw+PEHCS645ZkUqKiIdpo2c+MCMbDrOUpG0AeTPzMEmO7rwh6H0vYMBnomyU htNpgdmXHPYHRGUyo+LuHK+qYdr/3Tf0iGEwfLiQtaZKqLrU6Gs1ueQQkg8fYjtI9j+q OZJ2RX9PvVLwoi23c9ImPyAmNRmiwjj8VL73hK1WUs/gJPI1jneN2Ncl/aIdBxBqi2OU zRSQ== 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:to:from :dkim-signature; bh=/YzFw6eLuWOFuO8DOa3u8Qh2Yhef99sBkmqbC6T9aB4=; fh=BGg2PSAwcb00RrQ07Euwfa4ayWe/TDr8NrCDDushnUg=; b=hXIHCOk/JZmp7USNLYYwdBKxQanzJNDXaY0I4fdE0H1zJk/eIy842ReXFXafjZlIA+ FtdvLO8JbKlynilO8350mbHo6J/ypTx8ReB8CfpP8Lv6yjzQHxFVdr1NsrDDbJVCrGRQ s7RIt7oTHmASWPrtTM/rcRW/B4eyzC1euKCWpbY8oY/wyRjIbDHw8Nw+kZI3JrrsIpsg hvxJEbg50nZ2lMwkh4VcL0PrASn8CFrOsGlAVqarrPaidUFUlSjwLPkClqZCXXOOVBgA nhc/t5O35tqDWhaUngYb68asohXALDvPcqsAOke0rfBCK6xI/5zD85Pz0qU1LeCVMmmv 4wwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=f2TSgLq4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id pi14-20020a17090b1e4e00b00276bf69ac44si3380906pjb.5.2023.10.05.21.54.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 21:54:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=f2TSgLq4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 3A0DA83AC0DD; Thu, 5 Oct 2023 21:54:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230077AbjJFEyI (ORCPT + 18 others); Fri, 6 Oct 2023 00:54:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230072AbjJFEyE (ORCPT ); Fri, 6 Oct 2023 00:54:04 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37C61FA; Thu, 5 Oct 2023 21:54:02 -0700 (PDT) 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 3964WfWP018286; Fri, 6 Oct 2023 04:53:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=/YzFw6eLuWOFuO8DOa3u8Qh2Yhef99sBkmqbC6T9aB4=; b=f2TSgLq4cDwV6SwCgPZdKA5FiHG1EPrVhKJQLk6TUxsELqJLI9yCTqdTaH67Ja1difqS 1ijSmQ5O7F9DJAmAnW4c0Buv1lN0FbqXtbk2xWxDyXBgt99BDZl+gvfJb3OxblFTaq16 YytTGVrCuBf9O8hAz1HuTZL2uuk61ZNVi1LSOazBzkS3rSGffA9WI6GlrR/kXQtVSHbL Z3BaykuuWy9fnD6r6t8eZyRpsfpKZbgNnWLtK4NLMBBjxRmFi836WmTSvBrwWYHtAU0l MfmekmqrqEC2NReOOI/wmNKssmR7I2hYTAy578HRNK0T0hzQV/EahHsU1zZ8zK275xL2 kA== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3tj38n8rem-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 06 Oct 2023 04:53:52 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3964rpB6028876 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 6 Oct 2023 04:53:51 GMT Received: from hu-devipriy-blr.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.36; Thu, 5 Oct 2023 21:53:46 -0700 From: Devi Priya To: , , , , , , , , , , , , , Subject: [PATCH 3/4] arm64: dts: qcom: ipq9574: Add pwm support Date: Fri, 6 Oct 2023 10:23:16 +0530 Message-ID: <20231006045317.1056625-4-quic_devipriy@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231006045317.1056625-1-quic_devipriy@quicinc.com> References: <20231006045317.1056625-1-quic_devipriy@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: ywQB6DyHy_-d6w311jCjYxZQKtgkmhtz X-Proofpoint-GUID: ywQB6DyHy_-d6w311jCjYxZQKtgkmhtz X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-06_01,2023-10-05_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxlogscore=870 mlxscore=0 suspectscore=0 impostorscore=0 adultscore=0 spamscore=0 clxscore=1015 malwarescore=0 priorityscore=1501 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310060036 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 05 Oct 2023 21:54:12 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778980542665392014 X-GMAIL-MSGID: 1778980542665392014 The PWM is in the TCSR area. Make tcsr "simple-mfd" compatible and add pwm as a child of tcsr. Also, Enable pwm support in RDP418 of IPQ9574 SoC. Signed-off-by: Devi Priya Reviewed-by: Krzysztof Kozlowski --- arch/arm64/boot/dts/qcom/ipq9574-rdp418.dts | 12 ++++++++++++ arch/arm64/boot/dts/qcom/ipq9574.dtsi | 15 ++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/ipq9574-rdp418.dts b/arch/arm64/boot/dts/qcom/ipq9574-rdp418.dts index 2b093e02637b..d275c98b4df7 100644 --- a/arch/arm64/boot/dts/qcom/ipq9574-rdp418.dts +++ b/arch/arm64/boot/dts/qcom/ipq9574-rdp418.dts @@ -43,6 +43,12 @@ &blsp1_uart2 { status = "okay"; }; +&pwm { + pinctrl-0 = <&pwm_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + &rpm_requests { regulators { compatible = "qcom,rpm-mp5496-regulators"; @@ -79,6 +85,12 @@ &sleep_clk { }; &tlmm { + pwm_pins: pwm-state { + pins = "gpio57"; + function = "pwm"; + drive-strength = <8>; + }; + sdc_default_state: sdc-default-state { clk-pins { pins = "gpio5"; diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi index 8a72ad4afd03..5465254fbdde 100644 --- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi @@ -296,8 +296,21 @@ tcsr_mutex: hwlock@1905000 { }; tcsr: syscon@1937000 { - compatible = "qcom,tcsr-ipq9574", "syscon"; + compatible = "qcom,tcsr-ipq9574", "syscon", "simple-mfd"; reg = <0x01937000 0x21000>; + ranges = <0x0 0x01937000 0x21000>; + #address-cells = <1>; + #size-cells = <1>; + + pwm: pwm@a010 { + compatible = "qcom,ipq9574-pwm", "qcom,ipq6018-pwm"; + reg = <0xa010 0x20>; + clocks = <&gcc GCC_ADSS_PWM_CLK>; + assigned-clocks = <&gcc GCC_ADSS_PWM_CLK>; + assigned-clock-rates = <100000000>; + #pwm-cells = <2>; + status = "disabled"; + }; }; sdhc_1: mmc@7804000 {