Re: [PATCH v2 3/3] arm64: dts: qcom: Add support for SONY Xperia X Performance/XZ/XZs

From: Bjorn Andersson
Date: Mon May 31 2021 - 13:10:49 EST


On Thu 27 May 12:04 CDT 2021, Konrad Dybcio wrote:
> diff --git a/arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi b/arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi
[..]
> +&pm8994_gpios {
> + pinctrl-names = "default";
> + pinctrl-0 = <&pm8994_gpios_defaults>;
> + gpio-line-names =
> + "NC",
> + "VOL_DOWN_N",
> + "VOL_UP_N",
> + "SNAPSHOT_N",
> + "FOCUS_N",
> + "NC",
> + "NFC_VEN",
> + "NC",
> + "NC",
> + "NC",
> + "NC",
> + "NC",
> + "EAR_EN",
> + "NC",
> + "PM_DIVCLK1",
> + "PMI_CLK",
> + "NC",
> + "WL_SLEEP_CLK",
> + "NC",
> + "PMIC_SPON",
> + "UIM_BATT_ALARM",
> + "PMK_SLEEP_CLK";
> +
> + /*
> + * We don't yet know for sure which GPIOs are of our interest, but what
> + * we do know is that if a vendor sets the pins to a non-default state, there's
> + * probably a reason for it, and just to be on the safe side, we follow suit.
> + */
> + pm8994_gpios_defaults: pm8994-gpios-default-state {
> + pm8994_gpio1_n: pm8994-gpio1-nc {

Is there a reason for keeping pm8994_gpios_defaults? I presume you won't
be able to select it, because the associated pins are already busy?

> + pins = "gpio1";
> + function = PMIC_GPIO_FUNC_NORMAL;
> + drive-push-pull;
> + bias-high-impedance;
> + };
> +
[..]
> +&pmi8994_gpios {
> + pinctrl-names = "default";
> + pinctrl-0 = <&pmi8994_gpios_defaults>;
> +
> + gpio-line-names =
> + "VIB_LDO_EN",
> + "NC",
> + "NC",
> + "NC",
> + "NC",
> + "NC",
> + "NC",
> + "NC",
> + "USB_SWITCH_SEL",
> + "NC";
> +
> + pmi8994_gpios_defaults: pmi8994-gpios-default-state {
> + pmi8994_vib_ldo_en: vib-ldo-en-gpio {

Ditto.

> + pins = "gpio1";
> + function = PMIC_GPIO_FUNC_NORMAL;
> + drive-push-pull;
> + output-low;
> + bias-disable;
> + power-source = <PM8994_GPIO_S4>;
> + };

Regards,
Bjorn