From patchwork Wed Jun 12 21:58:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 13695612 Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2D1212C49B for ; Wed, 12 Jun 2024 21:58:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718229525; cv=none; b=kxRLuPatNqbmyGoiWC1fQ8Dbchs3bRFpKKMEx4YLgtzgEwdMDShu2xSlrDyHyG0zrxN9OZ1+0BNYhOmX55z7BGelytLs42sxd+ZHrBlU9u2E+UIVVYn6vCMNyMvstjMs/sNUI+agl3dmah2Oi7cekxOwJvaPAT40MPCrdanCKBk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718229525; c=relaxed/simple; bh=G6XTvSuj37xQn5XAtPEjne+iCrlyKdzRtRY2VG3Spfg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=dU2v/sp0752QQAs89cVPLmqPVPnJiPPOySGUvBODk/ItZgIzA3Kb5T9Wb/BvMcehMYBsxbBqrVtf6jRmKC+vBmv8UosNt7XdCkenZ7VvAVMu3vPJwxoPXCM9ckLSe1YC0Oy76w13CUADy67C1EY2hjXZjNPD/yuadxryTZzBtpA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=f7DeH4Fg; arc=none smtp.client-ip=209.85.167.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="f7DeH4Fg" Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-52a559e4429so42350e87.0 for ; Wed, 12 Jun 2024 14:58:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718229522; x=1718834322; darn=vger.kernel.org; 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=9YJqmcUpCgszbEXBb1yjqNo24h9hCm0qzl+KtkkTNq0=; b=f7DeH4FggoMunskdr50+BjiNrgk12kuHKXia8SZ64K/0B6gxrEdLyF3BQlslc0IA4j tORxqxkGduEenihEP9uYMi/00LvJiG0OqyDXd3ACLQFUYT+gkMc5h7V6lzvYeqPFcpKQ vruF+EYIJ/3Jpiscj256EI5OfBThT1fgczUfGzE5QdyBiDJz6GzI/gcWexzikOBGs8HH mBgS7oHtGcei8d2SNq/1DnB2F5ennIA+bDuG4bqKSdCUDnKNFjBvQYfFddhgItUUYObj hKYx/dqWLeQJrZ0eB2EugBfTQuqoA87iZs/dWmYakwTPp6bLW8YKowz9uRdHZRI0uW3V BoHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718229522; x=1718834322; 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=9YJqmcUpCgszbEXBb1yjqNo24h9hCm0qzl+KtkkTNq0=; b=B9cpVrVnAAZmB9XGJ8Ji2jR+WDCzR+PYzBc9LJ4xOGFdOUXuUAKqO4CSfHpOHSoPoE AI14yadfG6nQEYVDRUuVIyIgzhaCGn4nr8ye29Cn/T+WMBiN+K1zS3mLhnubbe9XduR+ Xl0+ek2gkRQZ5635MfHe+/vAb3ICDqKA1x8zZSYspJVUgXyk/ih1NC7+pW+GZfdwTQsR LQDSnOVzUTpR4+kkqIIjKppnPbeTpoG0vMgMyQRCIJbAgze8k2QGKzrdGOLhXBaPh8VG CnKcel/GepDasjjfvVsLAG58AeWeUBgzzis7dts743VD1KjxlHkIxFNoC888FM6/61zY 28ww== X-Forwarded-Encrypted: i=1; AJvYcCWyqVy82bedC9ZVmZq8hx3F36qNRDqQJESP8/N6J0zdgUBTe1anUjEt4LtU02XjBhp6g8lsTGzDqnZh62s3@vger.kernel.org X-Gm-Message-State: AOJu0Ywh4xgqv7jUBM6AGr2pBk4rDpgYNib0mkxvt/Lls6q+KJhMLJkk qdPMJ+hh3V2s1bgUyK4FWT5oXUHSnepO4TkrKlra6qz6wf1QwKHlqlOyVg1Pq8Y= X-Google-Smtp-Source: AGHT+IG3VGVDBGr1b+HKHu/huZ28nKWzP5XWdypiFftpnPPo4z3LiUAxGhQoLJ3zxCQ3npPEEUkH2w== X-Received: by 2002:a2e:2ac3:0:b0:2eb:db54:202 with SMTP id 38308e7fff4ca-2ebfc8e12acmr16989001fa.1.1718229521966; Wed, 12 Jun 2024 14:58:41 -0700 (PDT) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2ec05c179c5sm57011fa.67.2024.06.12.14.58.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 14:58:41 -0700 (PDT) From: Vladimir Zapolskiy To: Bjorn Andersson , Konrad Dybcio , Neil Armstrong , Jagadeesh Kona , Rob Herring , Krzysztof Kozlowski Cc: Loic Poulain , Robert Foss , Andi Shyti , Conor Dooley , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-i2c@vger.kernel.org Subject: [PATCH v2 3/4] arm64: dts: qcom: sm8550: add description of CCI controllers Date: Thu, 13 Jun 2024 00:58:34 +0300 Message-Id: <20240612215835.1149199-4-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20240612215835.1149199-1-vladimir.zapolskiy@linaro.org> References: <20240612215835.1149199-1-vladimir.zapolskiy@linaro.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Qualcomm SM8550 SoC contains 3 Camera Control Interface controllers very similar to the ones found on other Qualcomm SoCs. One noticeable difference is that cci@ac16000 controller provides only one I2C bus and has an additional control over AON CCI pins gpio208 and gpio209, but this feature is not yet supported in the CCI driver. Signed-off-by: Vladimir Zapolskiy --- arch/arm64/boot/dts/qcom/sm8550.dtsi | 252 +++++++++++++++++++++++++++ 1 file changed, 252 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi index a429115524a6..b62bb47cb043 100644 --- a/arch/arm64/boot/dts/qcom/sm8550.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi @@ -2747,6 +2747,98 @@ videocc: clock-controller@aaf0000 { #power-domain-cells = <1>; }; + cci0: cci@ac15000 { + compatible = "qcom,sm8550-cci", "qcom,msm8996-cci"; + reg = <0 0x0ac15000 0 0x1000>; + interrupts = ; + power-domains = <&camcc CAM_CC_TITAN_TOP_GDSC>; + clocks = <&camcc CAM_CC_CAMNOC_AXI_CLK>, + <&camcc CAM_CC_CPAS_AHB_CLK>, + <&camcc CAM_CC_CCI_0_CLK>; + clock-names = "camnoc_axi", + "cpas_ahb", + "cci"; + pinctrl-0 = <&cci0_0_default &cci0_1_default>; + pinctrl-1 = <&cci0_0_sleep &cci0_1_sleep>; + pinctrl-names = "default", "sleep"; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + + 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@ac16000 { + compatible = "qcom,sm8550-cci", "qcom,msm8996-cci"; + reg = <0 0x0ac16000 0 0x1000>; + interrupts = ; + power-domains = <&camcc CAM_CC_TITAN_TOP_GDSC>; + clocks = <&camcc CAM_CC_CAMNOC_AXI_CLK>, + <&camcc CAM_CC_CPAS_AHB_CLK>, + <&camcc CAM_CC_CCI_1_CLK>; + clock-names = "camnoc_axi", + "cpas_ahb", + "cci"; + pinctrl-0 = <&cci1_0_default>; + pinctrl-1 = <&cci1_0_sleep>; + pinctrl-names = "default", "sleep"; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + + cci1_i2c0: i2c-bus@0 { + reg = <0>; + clock-frequency = <1000000>; + #address-cells = <1>; + #size-cells = <0>; + }; + }; + + cci2: cci@ac17000 { + compatible = "qcom,sm8550-cci", "qcom,msm8996-cci"; + reg = <0 0x0ac17000 0 0x1000>; + interrupts = ; + power-domains = <&camcc CAM_CC_TITAN_TOP_GDSC>; + clocks = <&camcc CAM_CC_CAMNOC_AXI_CLK>, + <&camcc CAM_CC_CPAS_AHB_CLK>, + <&camcc CAM_CC_CCI_2_CLK>; + clock-names = "camnoc_axi", + "cpas_ahb", + "cci"; + pinctrl-0 = <&cci2_0_default &cci2_1_default>; + pinctrl-1 = <&cci2_0_sleep &cci2_1_sleep>; + pinctrl-names = "default", "sleep"; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + + cci2_i2c0: i2c-bus@0 { + reg = <0>; + clock-frequency = <1000000>; + #address-cells = <1>; + #size-cells = <0>; + }; + + cci2_i2c1: i2c-bus@1 { + reg = <1>; + clock-frequency = <1000000>; + #address-cells = <1>; + #size-cells = <0>; + }; + }; + camcc: clock-controller@ade0000 { compatible = "qcom,sm8550-camcc"; reg = <0 0x0ade0000 0 0x20000>; @@ -3393,6 +3485,166 @@ tlmm: pinctrl@f100000 { gpio-ranges = <&tlmm 0 0 211>; wakeup-parent = <&pdc>; + cci0_0_default: cci0-0-default-state { + sda-pins { + pins = "gpio110"; + function = "cci_i2c_sda"; + drive-strength = <2>; + bias-pull-up = <2200>; + }; + + scl-pins { + pins = "gpio111"; + function = "cci_i2c_scl"; + drive-strength = <2>; + bias-pull-up = <2200>; + }; + }; + + cci0_0_sleep: cci0-0-sleep-state { + sda-pins { + pins = "gpio110"; + function = "cci_i2c_sda"; + drive-strength = <2>; + bias-pull-down; + }; + + scl-pins { + pins = "gpio111"; + function = "cci_i2c_scl"; + drive-strength = <2>; + bias-pull-down; + }; + }; + + cci0_1_default: cci0-1-default-state { + sda-pins { + pins = "gpio112"; + function = "cci_i2c_sda"; + drive-strength = <2>; + bias-pull-up = <2200>; + }; + + scl-pins { + pins = "gpio113"; + function = "cci_i2c_scl"; + drive-strength = <2>; + bias-pull-up = <2200>; + }; + }; + + cci0_1_sleep: cci0-1-sleep-state { + sda-pins { + pins = "gpio112"; + function = "cci_i2c_sda"; + drive-strength = <2>; + bias-pull-down; + }; + + scl-pins { + pins = "gpio113"; + function = "cci_i2c_scl"; + drive-strength = <2>; + bias-pull-down; + }; + }; + + cci1_0_default: cci1-0-default-state { + sda-pins { + pins = "gpio114"; + function = "cci_i2c_sda"; + drive-strength = <2>; + bias-pull-up = <2200>; + }; + + scl-pins { + pins = "gpio115"; + function = "cci_i2c_scl"; + drive-strength = <2>; + bias-pull-up = <2200>; + }; + }; + + cci1_0_sleep: cci1-0-sleep-state { + sda-pins { + pins = "gpio114"; + function = "cci_i2c_sda"; + drive-strength = <2>; + bias-pull-down; + }; + + scl-pins { + pins = "gpio115"; + function = "cci_i2c_scl"; + drive-strength = <2>; + bias-pull-down; + }; + }; + + cci2_0_default: cci2-0-default-state { + sda-pins { + pins = "gpio74"; + function = "cci_i2c_sda"; + drive-strength = <2>; + bias-pull-up = <2200>; + }; + + scl-pins { + pins = "gpio75"; + function = "cci_i2c_scl"; + drive-strength = <2>; + bias-pull-up = <2200>; + }; + }; + + cci2_0_sleep: cci2-0-sleep-state { + sda-pins { + pins = "gpio74"; + function = "cci_i2c_sda"; + drive-strength = <2>; + bias-pull-down; + }; + + scl-pins { + pins = "gpio75"; + function = "cci_i2c_scl"; + drive-strength = <2>; + bias-pull-down; + }; + }; + + cci2_1_default: cci2-1-default-state { + sda-pins { + pins = "gpio0"; + function = "cci_i2c_sda"; + drive-strength = <2>; + bias-pull-up = <2200>; + }; + + scl-pins { + pins = "gpio1"; + function = "cci_i2c_scl"; + drive-strength = <2>; + bias-pull-up = <2200>; + }; + }; + + cci2_1_sleep: cci2-1-sleep-state { + sda-pins { + pins = "gpio0"; + function = "cci_i2c_sda"; + drive-strength = <2>; + bias-pull-down; + }; + + scl-pins { + pins = "gpio1"; + function = "cci_i2c_scl"; + drive-strength = <2>; + bias-pull-down; + }; + }; + hub_i2c0_data_clk: hub-i2c0-data-clk-state { /* SDA, SCL */ pins = "gpio16", "gpio17";