From: Stephan Gerhold <stephan.gerhold@linaro.org>
To: "Barnabás Czémán" <barnabas.czeman@mainlining.org>
Cc: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Amit Kucheria <amitk@kernel.org>,
Thara Gopinath <thara.gopinath@gmail.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Zhang Rui <rui.zhang@intel.com>,
Lukasz Luba <lukasz.luba@arm.com>, Joerg Roedel <joro@8bytes.org>,
Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
linux-pm@vger.kernel.org, iommu@lists.linux.dev
Subject: Re: [PATCH v6 10/10] arm64: dts: qcom: Add Xiaomi Redmi 5A
Date: Mon, 18 Nov 2024 11:21:45 +0100 [thread overview]
Message-ID: <ZzsVOV8GjCVtCi5Q@linaro.org> (raw)
In-Reply-To: <20241113-msm8917-v6-10-c348fb599fef@mainlining.org>
On Wed, Nov 13, 2024 at 04:11:51PM +0100, Barnabás Czémán wrote:
> Add initial support for Xiaomi Redmi 5A (riva).
>
> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
> ---
> arch/arm64/boot/dts/qcom/Makefile | 1 +
> arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts | 297 +++++++++++++++++++++++
> 2 files changed, 298 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
> index 9bb8b191aeb517e8f1e3a11bca98a3d0c39c5398..7562406843cfd82397c4844d14a22e8bcf4bba74 100644
> --- a/arch/arm64/boot/dts/qcom/Makefile
> +++ b/arch/arm64/boot/dts/qcom/Makefile
> @@ -62,6 +62,7 @@ dtb-$(CONFIG_ARCH_QCOM) += msm8916-wingtech-wt86518.dtb
> dtb-$(CONFIG_ARCH_QCOM) += msm8916-wingtech-wt86528.dtb
> dtb-$(CONFIG_ARCH_QCOM) += msm8916-wingtech-wt88047.dtb
> dtb-$(CONFIG_ARCH_QCOM) += msm8916-yiming-uz801v3.dtb
> +dtb-$(CONFIG_ARCH_QCOM) += msm8917-xiaomi-riva.dtb
> dtb-$(CONFIG_ARCH_QCOM) += msm8929-wingtech-wt82918hd.dtb
> dtb-$(CONFIG_ARCH_QCOM) += msm8939-huawei-kiwi.dtb
> dtb-$(CONFIG_ARCH_QCOM) += msm8939-longcheer-l9100.dtb
> diff --git a/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts
> new file mode 100644
> index 0000000000000000000000000000000000000000..81bb76f1773252be2f60777acf93d51d01981f86
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts
> @@ -0,0 +1,297 @@
> [...]
> + gpio-keys {
> + compatible = "gpio-keys";
> +
> + key-volup {
> + label = "Volume Up";
> + linux,code = <KEY_VOLUMEUP>;
> + gpios = <&tlmm 91 GPIO_ACTIVE_LOW>;
It's good practice to
> + debounce-interval = <15>;
> + };
> + };
> [...]
> +&blsp1_i2c3 {
> + status = "okay";
> +
> + touchscreen@38 {
> + compatible = "edt,edt-ft5306";
> + reg = <0x38>;
> + interrupts-extended = <&tlmm 65 IRQ_TYPE_LEVEL_LOW>;
add pinctrl
> + reset-gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;
for all
> + vcc-supply = <&pm8937_l10>;
> + iovcc-supply = <&pm8937_l5>;
> +
> + touchscreen-size-x = <720>;
> + touchscreen-size-y = <1280>;
> + };
> +};
> +
> +&blsp2_i2c1 {
> + status = "okay";
> +
> + bq27426@55 {
> + compatible = "ti,bq27426";
> + reg = <0x55>;
> + monitored-battery = <&battery>;
> + };
> +
> + bq25601@6b{
> + compatible = "ti,bq25601";
> + reg = <0x6b>;
> + monitored-battery = <&battery>;
> +
> + interrupt-parent = <&tlmm>;
> + interrupts = <61 IRQ_TYPE_EDGE_FALLING>;
GPIOs/pins
> +
> + input-voltage-limit-microvolt = <4400000>;
> + input-current-limit-microamp = <1000000>;
> + };
> +};
> [...]
> +&sdhc_2 {
> + cd-gpios = <&tlmm 67 GPIO_ACTIVE_LOW>;
that you use. :-)
Usually it can be something simple like function=gpio, bias-disable,
drive-strength = <2>, etc, plenty of examples exist upstream. Check
downstream or schematics (if you have them). Ideally you would check
what the peripheral requires.
E.g. for SD card the GPIO usually has external pull-up, so bias-pull-up
would be redundant and one can just use bias-disable:
pinctrl-0 = <&sdc2_default &sdc2_cd_default>;
pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>;
pinctrl-names = "default", "sleep";
&tlmm {
sdc2_cd_default: sdc2-cd-default-state {
pins = "gpio67";
function = "gpio";
drive-strength = <2>;
bias-disable;
};
};
> + vmmc-supply = <&pm8937_l11>;
> + vqmmc-supply = <&pm8937_l12>;
> +
> + status = "okay";
> +};
> +
> [...]
> +&rpm_requests {
> + regulators-0 {
> + compatible = "qcom,rpm-pm8937-regulators";
> +
> [...]
> + pm8937_l11: l11 {
> + regulator-min-microvolt = <2950000>;
> + regulator-max-microvolt = <2950000>;
> + };
You usually need/want regulator-allow-set-load and regulator-system-load
for the SD card regulator to avoid issues with certain SD
cards/operations, see
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=af61bef513ba179559e56908b8c465e587bc3890
Thanks,
Stephan
next prev parent reply other threads:[~2024-11-18 10:21 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-13 15:11 [PATCH v6 00/10] Add MSM8917/PM8937/Redmi 5A Barnabás Czémán
2024-11-13 15:11 ` [PATCH v6 01/10] arm64: dts: qcom: Add PM8937 PMIC Barnabás Czémán
2024-11-13 15:11 ` [PATCH v6 02/10] dt-bindings: pinctrl: qcom: Add MSM8917 pinctrl Barnabás Czémán
2024-11-13 15:11 ` [PATCH v6 03/10] pinctrl: qcom: Add MSM8917 tlmm pinctrl driver Barnabás Czémán
2024-11-13 15:11 ` [PATCH v6 04/10] dt-bindings: thermal: tsens: Add MSM8937 Barnabás Czémán
2024-11-13 15:21 ` Daniel Lezcano
2024-11-13 15:11 ` [PATCH v6 05/10] thermal/drivers/qcom/tsens-v1: Add support for MSM8937 tsens Barnabás Czémán
2024-11-13 15:22 ` Daniel Lezcano
2024-11-13 15:11 ` [PATCH v6 06/10] dt-bindings: iommu: qcom,iommu: Add MSM8917 IOMMU to SMMUv1 compatibles Barnabás Czémán
2024-11-13 15:11 ` [PATCH v6 07/10] dt-bindings: nvmem: Add compatible for MS8917 Barnabás Czémán
2024-11-13 15:11 ` [PATCH v6 08/10] arm64: dts: qcom: Add initial support for MSM8917 Barnabás Czémán
2024-11-13 15:11 ` [PATCH v6 09/10] dt-bindings: arm: qcom: Add Xiaomi Redmi 5A Barnabás Czémán
2024-11-13 15:11 ` [PATCH v6 10/10] arm64: dts: " Barnabás Czémán
2024-11-18 10:21 ` Stephan Gerhold [this message]
2024-11-15 15:13 ` [PATCH v6 00/10] Add MSM8917/PM8937/Redmi 5A Rob Herring (Arm)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZzsVOV8GjCVtCi5Q@linaro.org \
--to=stephan.gerhold@linaro.org \
--cc=amitk@kernel.org \
--cc=andersson@kernel.org \
--cc=barnabas.czeman@mainlining.org \
--cc=conor+dt@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=robin.murphy@arm.com \
--cc=rui.zhang@intel.com \
--cc=srinivas.kandagatla@linaro.org \
--cc=thara.gopinath@gmail.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).