Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2502015rwb; Fri, 20 Jan 2023 03:56:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXufc5M3Uadj3aLDR6KukwAciDgqU5Dlg8aaXSZmP7gJGXQtWsNxvgjczeVuYafNGttGc6W8 X-Received: by 2002:a05:6a20:4e18:b0:b8:7094:eb05 with SMTP id gk24-20020a056a204e1800b000b87094eb05mr3743669pzb.1.1674215797865; Fri, 20 Jan 2023 03:56:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674215797; cv=none; d=google.com; s=arc-20160816; b=lqL32YVZVlkq5Sb25sahJu4XLD84H2M41DNF5ax3OHKOoIKpbszqbAR+xKeIbEhw9t otwdubf/KiL2st++FXc5yVhlzckxrv5c9jzTX+fH6Ygk3ApBrjhyBz0RVruxOQU5+zW2 dfFk5ziu9WOApOHOT8SAC0BCwH+foL5epokjGClmGvMV6dCGpH+bEIGRf6q00RsUK33E JGu2lg7wVvSyOyd8kAqGTFXUU03ZEgw3y8/iLSJvYZt6maqTdGsCs6Hqu/5OcrF4L+Qs pfIEdI2iN+dPkVSPF85eLh1BWfgpfoNgucQAeneWHkoM9gJ/P4XHRPeBGVHPcfRluBNX IyJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=t9WLlPdieij4OuAezuKlLvHfYkHrpLddAFoHWcWPPXE=; b=vNKT4YvgKpLWLeYCl6zPAX8RXW/vrZn9StAfrJ7tuWtCoQ3mNOzbDJ4chrklNLcX1j 1pVY0m48MqZE0RhyNwuUioFqmOeVy4h3w01jNMRUWOOz6Gp2nyhky/YJpc5YmIgM2muC ZTqQla9daEmDQ7gwSgNygKKhNfTw0OU6Oa6wSBggSPN0tV6nZCkJ3ca2dNOqL4StLhLR CwWUFnrk3iXPn6fSayad/2p7OkdNhz2VJSolp3V6lWUc6uJ7oCMxeipj4AePBZA3IueA 5nW4qwQ9qNAJGX9HB8gDrpVX7jcdMfJJaP+/0HzRLtlwO8BVjZOb5O02eVhyhGCKOaDC uYFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fairphone.com header.s=fair header.b=3nR5nl2q; 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=fairphone.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w191-20020a6382c8000000b004cbb361aafcsi18218386pgd.155.2023.01.20.03.56.32; Fri, 20 Jan 2023 03:56:37 -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=@fairphone.com header.s=fair header.b=3nR5nl2q; 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=fairphone.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230099AbjATLMm (ORCPT + 49 others); Fri, 20 Jan 2023 06:12:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230007AbjATLMc (ORCPT ); Fri, 20 Jan 2023 06:12:32 -0500 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FE59B4E3D for ; Fri, 20 Jan 2023 03:12:29 -0800 (PST) Received: by mail-ej1-x62b.google.com with SMTP id u19so13018208ejm.8 for ; Fri, 20 Jan 2023 03:12:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=t9WLlPdieij4OuAezuKlLvHfYkHrpLddAFoHWcWPPXE=; b=3nR5nl2qOPfmf0muezQFGQzAG1VEB0NeSYa/15JuXXZ5b4aM472gLHhO1HjyhwaazP fUoF8AJpo/uosj3rl+3F/PijFG3TQ0+XHkTpZ1fcwFqNifirO5V43nFP/2e+2Sq9Zdux omIpvt3Jo0+cue6eav/ZiamT2pv8ZKzSmAnxIwt1WZy/UPxhTYZH4EhN9pHFTr2RycfH xYK4ZAVZz5wWz6n4mBhU4XoHxiUIuiGbRMKJ3uCKhQfTBSYENTBbRVl1pxnreT0+5Hbx BV2bCCGVb1o3M0NeYhc8Pwf4aNcD+HKUP8vPoZJrRyLJTvbKWYJ5OFJJwwS6oStYqyHU UWSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=t9WLlPdieij4OuAezuKlLvHfYkHrpLddAFoHWcWPPXE=; b=oaCd42i/nvJLsuuDDXHPDR1HRhE1kVWCxlyg2eYVb/k9DiBbBVydqIL3h8+1pvQVEI LIa+39tFl3LSxpOf5qKlBwrPRTms9ysuIn3drNRxbkGoVrMeWNYK2gDIcOGxSjMKdIAs BHqRq1AEH3oogEym87Mmy36JxkTAojtND5ieSFYaPMyuDqRQcEHAJPxUPqY9wu4sc7JP lCjr9sOMIJJKE96v1CMbBUOvQ9c+8Lxx6NiacQjRkDLAqLxJQXbSNIxI/astToqhPczz sLZ6k7jg1GrZc5y+fgG2536R86TOFK7G7HZ0HOuFfgVyVlW1dYfSbCTODEcEiKx10u7i MIZA== X-Gm-Message-State: AFqh2kpbr3AZgRrU5DG94jwaFpUfnZN5C5ve9qEZQFQAsXNecvcC3aXv 1Cxj2rKCfKxSp5DWddL0DzijMw== X-Received: by 2002:a17:907:1759:b0:85e:c4e4:cfbf with SMTP id lf25-20020a170907175900b0085ec4e4cfbfmr14943435ejc.15.1674213147775; Fri, 20 Jan 2023 03:12:27 -0800 (PST) Received: from [172.16.220.87] (144-178-202-138.static.ef-service.nl. [144.178.202.138]) by smtp.gmail.com with ESMTPSA id du1-20020a17090772c100b0084bfd56fb3bsm17667492ejc.162.2023.01.20.03.12.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Jan 2023 03:12:27 -0800 (PST) From: Luca Weiss Date: Fri, 20 Jan 2023 12:11:55 +0100 Subject: [PATCH 3/4] arm64: dts: qcom: sm6350: Add CCI nodes MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20221213-sm6350-cci-v1-3-e5d0c36e0c4f@fairphone.com> References: <20221213-sm6350-cci-v1-0-e5d0c36e0c4f@fairphone.com> In-Reply-To: <20221213-sm6350-cci-v1-0-e5d0c36e0c4f@fairphone.com> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Loic Poulain , Robert Foss , Rob Herring , Krzysztof Kozlowski Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Luca Weiss X-Mailer: b4 0.11.2 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=unavailable 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 Add nodes for the two CCI blocks found on SM6350. The first contains two i2c busses and while the second one might also contains two busses, the downstream kernel only has one configured, and some boards use the GPIOs for the potential cci1_i2c1 one other purposes, so leave that one unconfigured. Signed-off-by: Luca Weiss --- arch/arm64/boot/dts/qcom/sm6350.dtsi | 132 +++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi index 300ced5cda57..666c1c80e4e6 100644 --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -1435,6 +1436,95 @@ usb_1_dwc3: usb@a600000 { }; }; + cci0: cci@ac4a000 { + compatible = "qcom,sm6350-cci", "qcom,msm8996-cci"; + #address-cells = <1>; + #size-cells = <0>; + + reg = <0 0x0ac4a000 0 0x1000>; + interrupts = ; + power-domains = <&camcc TITAN_TOP_GDSC>; + + clocks = <&camcc CAMCC_CAMNOC_AXI_CLK>, + <&camcc CAMCC_SOC_AHB_CLK>, + <&camcc CAMCC_SLOW_AHB_CLK_SRC>, + <&camcc CAMCC_CPAS_AHB_CLK>, + <&camcc CAMCC_CCI_0_CLK>, + <&camcc CAMCC_CCI_0_CLK_SRC>; + clock-names = "camnoc_axi", + "soc_ahb", + "slow_ahb_src", + "cpas_ahb", + "cci", + "cci_src"; + + assigned-clocks = <&camcc CAMCC_CAMNOC_AXI_CLK>, + <&camcc CAMCC_CCI_0_CLK>; + assigned-clock-rates = <80000000>, <37500000>; + + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&cci0_default &cci1_default>; + pinctrl-1 = <&cci0_sleep &cci1_sleep>; + + status = "disabled"; + + cci0_i2c0: i2c-bus@0 { + reg = <0>; + clock-frequency = <1000000>; + #address-cells = <1>; + #size-cells = <0>; + }; + + cci0_i2c1: i2c-bus@1 { + reg = <1>; + clock-frequency = <1000000>; + #address-cells = <1>; + #size-cells = <0>; + }; + }; + + cci1: cci@ac4b000 { + compatible = "qcom,sm6350-cci", "qcom,msm8996-cci"; + #address-cells = <1>; + #size-cells = <0>; + + reg = <0 0x0ac4b000 0 0x1000>; + interrupts = ; + power-domains = <&camcc TITAN_TOP_GDSC>; + + clocks = <&camcc CAMCC_CAMNOC_AXI_CLK>, + <&camcc CAMCC_SOC_AHB_CLK>, + <&camcc CAMCC_SLOW_AHB_CLK_SRC>, + <&camcc CAMCC_CPAS_AHB_CLK>, + <&camcc CAMCC_CCI_1_CLK>, + <&camcc CAMCC_CCI_1_CLK_SRC>; + clock-names = "camnoc_axi", + "soc_ahb", + "slow_ahb_src", + "cpas_ahb", + "cci", + "cci_src"; + + assigned-clocks = <&camcc CAMCC_CAMNOC_AXI_CLK>, + <&camcc CAMCC_CCI_1_CLK>; + assigned-clock-rates = <80000000>, <37500000>; + + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&cci2_default>; + pinctrl-1 = <&cci2_sleep>; + + status = "disabled"; + + cci1_i2c0: i2c-bus@0 { + reg = <0>; + clock-frequency = <1000000>; + #address-cells = <1>; + #size-cells = <0>; + }; + + /* SM6350 seems to have cci1_i2c1 on gpio2 & gpio3 but unused downstream */ + }; + camcc: clock-controller@ad00000 { compatible = "qcom,sm6350-camcc"; reg = <0 0x0ad00000 0 0x16000>; @@ -1522,6 +1612,48 @@ tlmm: pinctrl@f100000 { #interrupt-cells = <2>; gpio-ranges = <&tlmm 0 0 157>; + cci0_default: cci0-default-state { + pins = "gpio39", "gpio40"; + function = "cci_i2c"; + bias-pull-up; + drive-strength = <2>; + }; + + cci0_sleep: cci0-sleep-state { + pins = "gpio39", "gpio40"; + function = "cci_i2c"; + bias-pull-down; + drive-strength = <2>; + }; + + cci1_default: cci1-default-state { + pins = "gpio41", "gpio42"; + function = "cci_i2c"; + bias-pull-up; + drive-strength = <2>; + }; + + cci1_sleep: cci1-sleep-state { + pins = "gpio41", "gpio42"; + function = "cci_i2c"; + bias-pull-down; + drive-strength = <2>; + }; + + cci2_default: cci2-default-state { + pins = "gpio43", "gpio44"; + function = "cci_i2c"; + bias-pull-up; + drive-strength = <2>; + }; + + cci2_sleep: cci2-sleep-state { + pins = "gpio43", "gpio44"; + function = "cci_i2c"; + bias-pull-down; + drive-strength = <2>; + }; + sdc2_off_state: sdc2-off-state { clk-pins { pins = "sdc2_clk"; -- 2.39.1