From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 588BBC4332F for ; Tue, 13 Dec 2022 14:48:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235467AbiLMOs5 (ORCPT ); Tue, 13 Dec 2022 09:48:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235574AbiLMOsc (ORCPT ); Tue, 13 Dec 2022 09:48:32 -0500 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB288110B for ; Tue, 13 Dec 2022 06:48:30 -0800 (PST) Received: by mail-lf1-x130.google.com with SMTP id x28so5276564lfn.6 for ; Tue, 13 Dec 2022 06:48:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=12/6BmOhRQtkOACZ0Csfo8o5YslC75aSQ1sUnCFEdqM=; b=CBVln09sOZEFYyYJR7Wb8th4jx3ulHFz/EDuoetDAhaZv2B8QBOWVBJCYpHuDOm0Ui zN/8InFPOmeM83z9WzgNDyjfRAqxdXvdUyo6CO++MkbAApGUz6eIRGhTH6xw4P5DxFpC LjN4oCnHLVEDMzV619DJGb0hchoM3oN4wsY4rGWPlDGcMd7Vy+rMJ2O0VURYmbVva5lA A6xCYEKyMtiklETUtNi947Yr+RfIRNWaT5p/wQmERVd6t2XWOlimNXpF7/L9DSAnBD7V lZDhsQ7CExX9hwsAU/rxHIVwX2rO+foaAbCXq+EQPes+B/kZHu3GrrjBzII4q/JUQzXt YfAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=12/6BmOhRQtkOACZ0Csfo8o5YslC75aSQ1sUnCFEdqM=; b=7GX5Cf9TPmiUG8/Iy69RKBycP1bUykbf60iwWSprBL5SrXiMZRXT0FRBbInnLvDOJJ Mpl2hbxvbbbJcjKhlK9HbAHQzo6+4RWA9W/ii+R4S+RMzqWeO8QaoPPMm+9ALjHOkMDB WPPVp5Apd+nTSwGbtV2xMRxvP2S1IqK5H8XoD9iygyyKT4T0aVedyB9LV/MmKGTpB2Yq Ev6TxrnZwWkKdVVVrdbyKt9tHSK5v6NIpib9Uw2h4cVjbz77y+bPUXGDVNH+E4mP/Tgm b5b+IBOqDMhBySDV15ZFY3od+Yj9kX0msyWWcFdkKr1b47iEIV3v3HFySUAS0jN4YBY+ eNgg== X-Gm-Message-State: ANoB5pmOHchqjabbHx72z7WjJTNufzbcBlw+CR0v6CmyCjL2KLMN5YWR nvoZz+aixHIGlfeqeRi+WLXpfA== X-Google-Smtp-Source: AA0mqf6XcaD3Q9O8tTx3t7Ouoa+VcUybXP7OmV19cGf/61eUdjet6ipxLVzB2c1e5zGWd4zOPCPtnQ== X-Received: by 2002:a05:6512:22d2:b0:4a4:68b9:66b8 with SMTP id g18-20020a05651222d200b004a468b966b8mr6687562lfu.3.1670942909161; Tue, 13 Dec 2022 06:48:29 -0800 (PST) Received: from [192.168.1.101] (abxh44.neoplus.adsl.tpnet.pl. [83.9.1.44]) by smtp.gmail.com with ESMTPSA id s21-20020a056512203500b004a2c3fd32edsm392757lfs.144.2022.12.13.06.48.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Dec 2022 06:48:28 -0800 (PST) Message-ID: <309b3fad-933c-6c45-5cd7-4e082da62c15@linaro.org> Date: Tue, 13 Dec 2022 15:48:27 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH 3/4] arm64: dts: qcom: sa8540p-ride: add qup1_i2c15 and qup2_i2c18 nodes Content-Language: en-US To: Brian Masney , andersson@kernel.org, krzysztof.kozlowski+dt@linaro.org Cc: robh+dt@kernel.org, johan+linaro@kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ahalaney@redhat.com, echanude@redhat.com, quic_shazhuss@quicinc.com References: <20221212182314.1902632-1-bmasney@redhat.com> <20221212182314.1902632-4-bmasney@redhat.com> From: Konrad Dybcio In-Reply-To: <20221212182314.1902632-4-bmasney@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On 12.12.2022 19:23, Brian Masney wrote: > Add the necessary nodes in order to get qup1_i2c15 and qup2_i2c18 > functioning on the automotive board and exposed to userspace. > > This work was derived from various patches that Qualcomm delivered > to Red Hat in a downstream kernel. This change was validated by using > i2c-tools 4.3.3 on CentOS Stream 9: > > [root@localhost ~]# i2cdetect -l > i2c-15 i2c Geni-I2C I2C adapter > i2c-18 i2c Geni-I2C I2C adapter > > [root@localhost ~]# i2cdetect -a -y 15 > Warning: Can't use SMBus Quick Write command, will skip some addresses > 0 1 2 3 4 5 6 7 8 9 a b c d e f > 00: > 10: > 20: > 30: -- -- -- -- -- -- -- -- > 40: > 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > 60: > 70: > > Bus 18 has the same output. I validated that we get the same output on > the downstream kernel. > > Signed-off-by: Brian Masney > --- > arch/arm64/boot/dts/qcom/sa8540p-ride.dts | 46 +++++++++++++++++++++++ > 1 file changed, 46 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > index d70859803fbd..6dc3f3ff8ece 100644 > --- a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > +++ b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > @@ -17,6 +17,8 @@ / { > compatible = "qcom,sa8540p-ride", "qcom,sa8540p"; > > aliases { > + i2c15 = &qup1_i2c15; > + i2c18 = &qup2_i2c18; > serial0 = &qup2_uart17; > }; > > @@ -188,10 +190,28 @@ &pcie3a_phy { > status = "okay"; > }; > > +&qup1 { > + status = "okay"; > +}; > + > +&qup1_i2c15 { > + pinctrl-names = "default"; > + pinctrl-0 = <&qup1_i2c15_default>; > + > + status = "okay"; > +}; > + > &qup2 { > status = "okay"; > }; > > +&qup2_i2c18 { > + pinctrl-names = "default"; > + pinctrl-0 = <&qup2_i2c18_default>; > + > + status = "okay"; > +}; > + > &qup2_uart17 { > compatible = "qcom,geni-debug-uart"; > status = "okay"; > @@ -313,4 +333,30 @@ wake-pins { > bias-pull-up; > }; > }; > + > + qup1_i2c15_default: qup1-i2c15-state { You can drop mux/config-pins and have the pin properties live directly under the qup1-i2cN-state node. Konrad > + mux-pins { > + pins = "gpio36", "gpio37"; > + function = "qup15"; > + }; > + > + config-pins { > + pins = "gpio36", "gpio37"; > + drive-strength = <0x02>; > + bias-pull-up; > + }; > + }; > + > + qup2_i2c18_default: qup2-i2c18-state { > + mux-pins { > + pins = "gpio66", "gpio67"; > + function = "qup18"; > + }; > + > + config-pins { > + pins = "gpio66", "gpio67"; > + drive-strength = <0x02>; > + bias-pull-up; > + }; > + }; > };