From patchwork Mon Nov 14 10:42:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 19671 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2074813wru; Mon, 14 Nov 2022 02:43:24 -0800 (PST) X-Google-Smtp-Source: AA0mqf5Je0JiUXfSXoewzF86V4YU2mdSeCw/NesaNqggtHr3ItjVEZNHAFJcOMwkrniNRigqDRHR X-Received: by 2002:aa7:da98:0:b0:463:a83c:d762 with SMTP id q24-20020aa7da98000000b00463a83cd762mr10279606eds.44.1668422604515; Mon, 14 Nov 2022 02:43:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668422604; cv=none; d=google.com; s=arc-20160816; b=SyrnHf/hI3RRDOF6eI8ziI6K59YRYJId81/kdvdY+Zmg/yNh/7Y/HVxSlVpJcXMX+0 rbouMEDTt8qea1I/5WVecNuFvjoVmGdTULy/dX8rOYPhniVqjFZifNPjS7v+CbeyD5Cw WiP8J3/kIsYGYiMz8s3hAtvmmmONxGk42NuZ04Ypx0tTFgvXi6RWGXQUen62VMRA6iv5 AKnxumvUwKyJbRg8aygNxylwLn8fJQA6wC1WxE2zCGMr4BDIwbhO5ENNsUwuckIXMLk+ sdVz6aOEZnv5jHy8HoTJ76mEoCBEs1WsC9wOJCsY4CQnFz2qVmvjEyhCDWTcatrsl4l8 cqvQ== 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=pefehE5o4ZbEpfgRDd+vWut5SWgW8/RYnVz1s2zWHXE=; b=eXLrJZLMFyq6x6DVSGGfkIAOElrCQsrcbg22muBRc+zgK/FAto+2dAPDwSW2799Kw0 YGw/mcftJ/8NPsUKz9XKEjEjtIAzByi+ji95oEJgZrHTvovrsAkepdb3eYCL4rv9e5Dy tVgVFf/qDRPpxZ3ZfOU68oQ68qkH2j0FQxmXqZ0awXXpbi1iUCQLjFNqcgUNvTGtPhdm SmPwo4RPyTFam0PZw2F3CxaZhKCuMTIx/Z5AWKV3zM0dFNllvc6+HSZN+xNhqccbcrk0 USwPHjmh7q4ErwO5BEwmdq1qSLtA8zjX9R7SxTKzzSOWlLjkDfSS7APwTTKtC/xU0Zd9 nrug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uZuLqwtg; 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=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hc10-20020a170907168a00b007add0c2ee2csi9207984ejc.924.2022.11.14.02.43.01; Mon, 14 Nov 2022 02:43:24 -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=@linaro.org header.s=google header.b=uZuLqwtg; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236230AbiKNKmm (ORCPT + 99 others); Mon, 14 Nov 2022 05:42:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236111AbiKNKmi (ORCPT ); Mon, 14 Nov 2022 05:42:38 -0500 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 682D81EADB for ; Mon, 14 Nov 2022 02:42:37 -0800 (PST) Received: by mail-lj1-x234.google.com with SMTP id l8so12559900ljh.13 for ; Mon, 14 Nov 2022 02:42:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pefehE5o4ZbEpfgRDd+vWut5SWgW8/RYnVz1s2zWHXE=; b=uZuLqwtgmf+J1MWVvHIF9VmWJb6tLA0c/U0YPCM+7e/Uzfzb5lPasX+IC3yfp2iNKh uVtkvGdNj2j7jTGo+dI+dxfd8wpCOJXuSxYnZ8TGMs/oObT6unEB2szR5Zt9iuaXvcKO Y0y6cWkeUbTl/hSMoDgVU+QC+0OLIDR5o0J4I7jHRNgYSDo31yYydomF4DjwHxLmMw7G 5aF0w6g8YhcbliXFeZ/CVEBdt57OAkXRW1tFbBjptCwMr5BQVzKuRjjazaZDFx5zvP/4 74rLHZc6hiVV32ghjXANyOpaqURNX5Mba7WlDr+Zj+ArfBcX5phE+xtssV35aT/JTtnn UUjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pefehE5o4ZbEpfgRDd+vWut5SWgW8/RYnVz1s2zWHXE=; b=NntiYb7qkZLDX/PhTxBqHPnR6qIwvX33Q8BbrBUKyCG3S3DG/aeUE1TGwdmX7lrE5P dGeO8xqMXnD66hIPbnE/GgVd2jzhdP7ZmVJLXFaXMCegATUgblaOabE5nxVJhMh+bFKh koku2v/PsucobTOWHn4mhTbelsraFKNb4DJf0oUWMvWpOZL09rcrt1alQlkVOj4ENL1v YNrcOXlJDM0dPrN7Ucd6IdKhuv3ZvqjftVh4CifhFS+kPRQEJkLrgNawlLGIf/rZYQRP noMs0TiQpwRORsIHLURHRz8CelX4HYhT8MDYmjzNmVsihoxW+70pFkZLPoQlvhzf3SfT ufUQ== X-Gm-Message-State: ANoB5pncUlgq+Njh1B4M+DTV3Ziw2TZN1wiUAyqKXI/dzgZoNpNmeBo8 Io0+X1YD3SAbZNDhsPw1qakFmA== X-Received: by 2002:a05:651c:104e:b0:26f:bf09:2f57 with SMTP id x14-20020a05651c104e00b0026fbf092f57mr3642094ljm.180.1668422555818; Mon, 14 Nov 2022 02:42:35 -0800 (PST) Received: from localhost.localdomain ([194.29.137.22]) by smtp.gmail.com with ESMTPSA id bs21-20020a05651c195500b0026c4e922fb2sm1946486ljb.48.2022.11.14.02.42.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 14 Nov 2022 02:42:35 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: patches@linaro.org, Konrad Dybcio , Dmitry Baryshkov , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/9] arm64: dts: qcom: pmk8350: Allow specifying arbitrary SID Date: Mon, 14 Nov 2022 11:42:15 +0100 Message-Id: <20221114104222.36329-3-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.32.0 (Apple Git-132) In-Reply-To: <20221114104222.36329-1-konrad.dybcio@linaro.org> References: <20221114104222.36329-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 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 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?1749467901239811238?= X-GMAIL-MSGID: =?utf-8?q?1749467901239811238?= PMK8350 is shipped on SID6 with some SoCs, for example with SM6375. Add some preprocessor logic to allow changing the SID in cases like this. While I am not in favour of adding #if's into the device tree, this is the least messy way to handle this. If one isn't specified, it will default to 0 (as it has been previously). Suggested-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio --- Changes since v1: - take a different approach; patch substituted arch/arm64/boot/dts/qcom/pmk8350.dtsi | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/pmk8350.dtsi b/arch/arm64/boot/dts/qcom/pmk8350.dtsi index a7ec9d11946d..2730d97ab213 100644 --- a/arch/arm64/boot/dts/qcom/pmk8350.dtsi +++ b/arch/arm64/boot/dts/qcom/pmk8350.dtsi @@ -8,10 +8,15 @@ #include #include +/* (Sadly) this PMIC can be configured to be at different SIDs */ +#ifndef PMK8350_SID + #define PMK8350_SID 0 +#endif + &spmi_bus { - pmk8350: pmic@0 { + pmk8350: pmic@PMK8350_SID { compatible = "qcom,pmk8350", "qcom,spmi-pmic"; - reg = <0x0 SPMI_USID>; + reg = ; #address-cells = <1>; #size-cells = <0>; @@ -21,14 +26,14 @@ pmk8350_pon: pon@1300 { pon_pwrkey: pwrkey { compatible = "qcom,pmk8350-pwrkey"; - interrupts = <0x0 0x13 0x7 IRQ_TYPE_EDGE_BOTH>; + interrupts = ; linux,code = ; status = "disabled"; }; pon_resin: resin { compatible = "qcom,pmk8350-resin"; - interrupts = <0x0 0x13 0x6 IRQ_TYPE_EDGE_BOTH>; + interrupts = ; status = "disabled"; }; }; @@ -38,14 +43,14 @@ pmk8350_vadc: adc@3100 { reg = <0x3100>; #address-cells = <1>; #size-cells = <0>; - interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; + interrupts = ; #io-channel-cells = <1>; }; pmk8350_adc_tm: adc-tm@3400 { compatible = "qcom,adc-tm7"; reg = <0x3400>; - interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>; + interrupts = ; #address-cells = <1>; #size-cells = <0>; #thermal-sensor-cells = <1>; @@ -56,7 +61,7 @@ pmk8350_rtc: rtc@6100 { compatible = "qcom,pmk8350-rtc"; reg = <0x6100>, <0x6200>; reg-names = "rtc", "alarm"; - interrupts = <0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>; + interrupts = ; status = "disabled"; };