Message ID | 20230103010904.3201835-8-bryan.odonoghue@linaro.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Add MSM8939 SoC support with two devices | expand |
On 3.01.2023 02:09, Bryan O'Donoghue wrote: > Add a basic booting DTS for the Sony Xperia M4 Aqua aka "tulip". > > Tulip is paired with: > > - wcn3660 > - smb1360 battery charger > - 720p Truly NT35521 Panel > > Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> > --- > arch/arm64/boot/dts/qcom/Makefile | 1 + > .../qcom/msm8939-sony-xperia-kanuti-tulip.dts | 472 ++++++++++++++++++ > 2 files changed, 473 insertions(+) > create mode 100644 arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts > > diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile > index 8d8dab62c66df..7056036351df8 100644 > --- a/arch/arm64/boot/dts/qcom/Makefile > +++ b/arch/arm64/boot/dts/qcom/Makefile > @@ -22,6 +22,7 @@ dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-grandmax.dtb > dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-j5.dtb > dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-serranove.dtb > dtb-$(CONFIG_ARCH_QCOM) += msm8916-wingtech-wt88047.dtb > +dtb-$(CONFIG_ARCH_QCOM) += msm8939-sony-xperia-kanuti-tulip.dtb > dtb-$(CONFIG_ARCH_QCOM) += msm8956-sony-xperia-loire-kugo.dtb > dtb-$(CONFIG_ARCH_QCOM) += msm8956-sony-xperia-loire-suzu.dtb > dtb-$(CONFIG_ARCH_QCOM) += msm8992-lg-bullhead-rev-10.dtb > diff --git a/arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts b/arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts > new file mode 100644 > index 0000000000000..ff93b69bda679 > --- /dev/null > +++ b/arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts > @@ -0,0 +1,472 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Copyright (c) 2015, The Linux Foundation. All rights reserved. > + * Copyright (c) 2022-2023, Bryan O'Donoghue. > + * > + */ > + > +/dts-v1/; > + > +#include "msm8939.dtsi" > +#include "msm8939-pm8916.dtsi" > +#include <dt-bindings/gpio/gpio.h> > +#include <dt-bindings/pinctrl/qcom,pmic-gpio.h> > + > +/ { > + model = "Sony Xperia M4 Aqua"; > + compatible = "sony,kanuti-tulip", "qcom,msm8939"; > + qcom,board-id = <8 0>; > + > + aliases { > + serial0 = &blsp1_uart2; > + mmc0 = &sdhc_1; /* SDC1 eMMC slot */ > + mmc1 = &sdhc_2; /* SDC2 SD card slot */ > + }; > + > + chosen { > + stdout-path = "serial0:115200n8"; > + }; > + > + negative5_reg: negative5-regulator { > + compatible = "regulator-fixed"; > + pinctrl-names = "default"; > + pinctrl-0 = <&negative5_reg_default>; > + regulator-name = "negative5_reg"; > + gpio = <&msmgpio 17 GPIO_ACTIVE_LOW>; > + startup-delay-us = <0>; > + }; > + > + positive5_reg: positive5-regulator { > + compatible = "regulator-fixed"; > + pinctrl-names = "default"; > + pinctrl-0 = <&positive5_reg_default>; > + regulator-name = "positive5_reg"; > + gpio = <&msmgpio 114 GPIO_ACTIVE_LOW>; > + startup-delay-us = <0>; Isn't that the default value? > + }; > + > + usb_id: usb-id { > + compatible = "linux,extcon-usb-gpio"; > + id-gpio = <&msmgpio 110 GPIO_ACTIVE_HIGH>; > + pinctrl-names = "default"; > + pinctrl-0 = <&usb_id_default>; > + }; > +}; > + > +&blsp_dma { > + status = "okay"; > +}; > + > +&dsi0 { > + #address-cells = <1>; > + #size-cells = <0>; These already exist in the SoC dtsi. > + vdda-supply = <&pm8916_l2>; > + vddio-supply = <&pm8916_l16>; > + status = "okay"; > + > + ports { > + port@1 { > + endpoint { You have a label, dsi0_out: pointing at this endpoint. > + remote-endpoint = <&panel_in>; > + data-lanes = <0 1 2 3>; > + }; > + }; > + }; > + > + panel@0 { > + compatible = "sony,tulip-truly-nt35521"; > + reg = <0>; > + positive5-supply = <&positive5_reg>; > + negative5-supply = <&negative5_reg>; > + reset-gpios = <&msmgpio 25 GPIO_ACTIVE_LOW>; > + enable-gpios = <&msmgpio 10 GPIO_ACTIVE_LOW>; > + > + ports { > + #address-cells = <1>; > + #size-cells = <0>; > + > + port@0 { > + reg = <0>; > + panel_in: endpoint { > + remote-endpoint = <&dsi0_out>; > + }; > + }; > + }; > + > + }; > +}; > + > +&dsi_phy0 { > + vddio-supply = <&pm8916_l16>; > + status = "okay"; > +}; > + > +&msmgpio { > + Stray newline, please remove. > + ak8963_default: ak8963-default-state { > + pins = "gpio69"; > + function = "gpio"; > + drive-strength = <6>; > + bias-pull-up; > + }; > + > + ak8963_sleep: ak8963-sleep-state { > + pins = "gpio69"; > + function = "gpio"; > + drive-strength = <2>; > + bias-pull-down; > + }; > + > + /* Ambient light and proximity sensor apds9930 and apds9900 */ > + apds99xx_default: apds99xx-default-state { > + pins = "gpio113"; > + function = "gpio"; > + drive-strength = <6>; > + bias-pull-up; > + }; > + > + apds99xx_sleep: apds99xx-sleep-state { > + pins = "gpio113"; > + function = "gpio"; > + drive-strength = <2>; > + bias-pull-down; > + }; > + > + cam_sensor_flash_default: cam-sensor-flash-default-state { > + pins = "gpio98", "gpio97"; > + function = "gpio"; > + bias-disable; > + drive-strength = <2>; > + }; > + > + cci1_default: cci1-default-state { > + pins = "gpio31", "gpio32"; > + function = "cci_i2c"; > + drive-strength = <2>; > + bias-disable; > + }; > + > + cdc_ext_spk_pa_active: cdc-ext-spk-pa-on-state { > + pins = "gpio0"; > + function = "gpio"; > + drive-strength = <8>; > + output-low; > + }; > + > + cdc_ext_spk_pa_sus: cdc-ext-spk-pa-off-state { > + pins = "gpio0"; > + function = "gpio"; > + drive-strength = <2>; > + bias-disable; > + }; > + > + cdc_slim_lines_act: lines-on-state { > + pins = "gpio63"; > + function = "cdc_pdm0"; > + drive-strength = <8>; > + output-high; > + }; > + > + cdc_slim_lines_sus: lines-off-state { > + pins = "gpio63"; > + function = "cdc_pdm0"; > + drive-strength = <2>; > + bias-disable; > + }; > + > + cross_conn_det_act: lines-on-state { > + pins = "gpio120"; > + function = "gpio"; > + drive-strength = <8>; > + output-low; > + bias-pull-down; Generally the following order is preferred: pins function drive-strength bias- output/input/somethingelse- > + }; > + > + cross_conn_det_sus: lines-off-state { > + pins = "gpio120"; > + function = "gpio"; > + drive-strength = <2>; > + bias-pull-down; > + }; > + > + ext_buck_vsel: vsel0-state { > + pins = "gpio111"; > + function = "gpio"; > + drive-strength = <2>; > + }; > + > + ext_cdc_tlmm_lines_act: tlmm-lines-on-state { > + pins = "gpio116", "gpio112", "gpio117", "gpio118", "gpio119"; > + function = "gpio"; > + drive-strength = <8>; No bias? > + }; > + > + ext_cdc_tlmm_lines_sus: tlmm-lines-off-state { > + pins = "gpio116", "gpio112", "gpio117", "gpio118", "gpio119"; > + function = "gpio"; > + drive-strength = <2>; > + bias-disable; > + }; > + > + gpio_key_suspend: gpio-key-suspend-state { > + pins = "gpio107", "gpio108", "gpio109"; > + function = "gpio"; > + drive-strength = <2>; > + bias-pull-up; > + }; > + > + negative5_reg_default: negative5-reg-default-state { > + pins = "gpio17"; > + function = "gpio"; > + output-low; > + }; > + > + positive5_reg_default: positive5-reg-default-state { > + pins = "gpio114"; > + function = "gpio"; > + output-low; > + }; > + > + /* Gyroscope and accelerometer sensor combo */ > + mpu6050_default: mpu6050-default-state { > + pins = "gpio115"; > + function = "gpio"; > + drive-strength = <6>; > + bias-pull-up; > + }; > + > + mpu6050_sleep: mpu6050-sleep-state { > + pins = "gpio115"; > + function = "gpio"; > + drive-strength = <2>; > + bias-pull-down; > + }; > + > + nfc_disable_active: nfc-disable-active-state { > + pins = "gpio20"; > + function = "gpio"; > + drive-strength = <6>; > + bias-pull-up; > + }; > + > + nfc_disable_suspend: nfc-disable-suspend-state { > + pins = "gpio20"; > + function = "gpio"; > + drive-strength = <6>; > + bias-disable; > + }; > + > + nfc_int_active: nfc-int-active-state { > + pins = "gpio21"; > + function = "gpio"; > + drive-strength = <6>; > + bias-pull-up; > + }; > + > + nfc_int_suspend: nfc-int-suspend-state { > + pins = "gpio21"; > + function = "gpio"; > + drive-strength = <6>; > + bias-pull-up; > + }; > + > + nt35521_te_default: nt35521-te-default-state { > + pins = "gpio24"; > + function = "gpio"; > + drive-strength = <6>; > + bias-pull-down; > + }; > + > + nt35521_backlight: nt35521-backlight-default-state { > + pins = "gpio10"; > + function = "gpio"; > + drive-strength = <6>; > + bias-pull-down; > + }; > + > + smb_int: smb-int-default-state { > + pins = "gpio62"; > + function = "gpio"; > + drive-strength = <2>; > + bias-pull-up; > + }; > + > + /* add pingrp for touchscreen */ This comment is rather dubious. > + ts_int_active: ts-int-active-state { > + pins = "gpio13"; > + function = "gpio"; > + drive-strength = <16>; > + bias-pull-up; > + }; > + > + ts_int_suspend: ts-int-suspend-state { > + pins = "gpio13"; > + function = "gpio"; > + drive-strength = <2>; > + bias-pull-down; > + }; > + > + ts_reset_active: ts-reset-active-state { > + pins = "gpio12"; > + function = "gpio"; > + drive-strength = <16>; > + bias-pull-up; > + }; > + > + ts_reset_suspend: ts-reset-suspend-state { > + pins = "gpio12"; > + function = "gpio"; > + drive-strength = <2>; > + bias-pull-down; > + }; > + > + ts_release: ts-release-default-state { > + pins = "gpio13", "gpio12"; 12, 13? Also, why does this node exist in the first place? Is it going to be used for some non-standard touchpanel-off-flipping? Konrad > + function = "gpio"; > + drive-strength = <2>; > + bias-pull-down; > + }; > + > + usb_id_default: usb-id-default-state { > + pins = "gpio110"; > + function = "gpio"; > + > + drive-strength = <8>; > + bias-pull-up; > + }; > +}; > + > +&pronto { > + status = "okay"; Add a newline, please. > + iris { > + compatible = "qcom,wcn3660"; > + }; > +}; > + > +&smd_rpm_regulators { No `regulator-allow-set-load` on sdhcN_vmmc/vqmmc? > + vdd_l1_l2_l3-supply = <&pm8916_s3>; > + vdd_l4_l5_l6-supply = <&pm8916_s4>; > + vdd_l7-supply = <&pm8916_s4>; > + > + pm8916_s3: s3 { > + regulator-min-microvolt = <1200000>; > + regulator-max-microvolt = <1300000>; > + }; > + > + pm8916_s4: s4 { > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <2100000>; > + }; > + > + pm8916_l2: l2 { > + regulator-min-microvolt = <1200000>; > + regulator-max-microvolt = <1200000>; > + }; > + > + pm8916_l4: l4 { > + regulator-min-microvolt = <2050000>; > + regulator-max-microvolt = <2050000>; > + }; > + > + pm8916_l5: l5 { > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + }; > + > + pm8916_l6: l6 { > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + regulator-always-on; > + }; > + > + pm8916_l7: l7 { > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + }; > + > + pm8916_l8: l8 { > + regulator-min-microvolt = <2850000>; > + regulator-max-microvolt = <2900000>; > + }; > + > + pm8916_l9: l9 { > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + }; > + > + pm8916_l10: l10 { > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + }; > + > + pm8916_l11: l11 { > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <2950000>; > + }; > + > + pm8916_l12: l12 { > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <2950000>; > + }; > + > + pm8916_l13: l13 { > + regulator-min-microvolt = <3075000>; > + regulator-max-microvolt = <3075000>; > + }; > + > + pm8916_l14: l14 { > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <3300000>; > + }; > + > + pm8916_l15: l15 { > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <3300000>; > + }; > + > + pm8916_l16: l16 { > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <3300000>; > + }; > + > + pm8916_l17: l17 { > + regulator-min-microvolt = <2850000>; > + regulator-max-microvolt = <2850000>; > + }; > + > + pm8916_l18: l18 { > + regulator-min-microvolt = <2700000>; > + regulator-max-microvolt = <2700000>; > + }; > +}; > + > +&sdhc_1 { > + pinctrl-names = "default", "sleep"; > + pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>; > + pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>; > + status = "okay"; > +}; > + > +&sdhc_2 { > + pinctrl-names = "default", "sleep"; > + pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>; > + pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>; > + cd-gpios = <&msmgpio 38 GPIO_ACTIVE_HIGH>; > + status = "okay"; > +}; > + > +&usb { > + status = "okay"; > + extcon = <&usb_id>, <&usb_id>; status last, please. Konrad > + > + ulpi { > + usb_hs_phy: phy { > + v1p8-supply = <&pm8916_l7>; > + v3p3-supply = <&pm8916_l13>; > + }; > + }; > +}; > + > +&usb_hs_phy { > + extcon = <&usb_id>; > +};
On 03/01/2023 02:09, Bryan O'Donoghue wrote: > Add a basic booting DTS for the Sony Xperia M4 Aqua aka "tulip". > > Tulip is paired with: > > - wcn3660 > - smb1360 battery charger > - 720p Truly NT35521 Panel > (...) > +&dsi_phy0 { > + vddio-supply = <&pm8916_l16>; > + status = "okay"; > +}; > + > +&msmgpio { > + Drop blank line. > + ak8963_default: ak8963-default-state { > + pins = "gpio69"; > + function = "gpio"; > + drive-strength = <6>; > + bias-pull-up; > + }; > + > + ak8963_sleep: ak8963-sleep-state { > + pins = "gpio69"; > + function = "gpio"; > + drive-strength = <2>; > + bias-pull-down; > + }; > + > + /* Ambient light and proximity sensor apds9930 and apds9900 */ > + apds99xx_default: apds99xx-default-state { > + pins = "gpio113"; > + function = "gpio"; > + drive-strength = <6>; > + bias-pull-up; > + }; > + > + apds99xx_sleep: apds99xx-sleep-state { > + pins = "gpio113"; > + function = "gpio"; > + drive-strength = <2>; > + bias-pull-down; > + }; > + > + cam_sensor_flash_default: cam-sensor-flash-default-state { > + pins = "gpio98", "gpio97"; > + function = "gpio"; > + bias-disable; > + drive-strength = <2>; > + }; > + > + cci1_default: cci1-default-state { > + pins = "gpio31", "gpio32"; > + function = "cci_i2c"; > + drive-strength = <2>; > + bias-disable; > + }; > + > + cdc_ext_spk_pa_active: cdc-ext-spk-pa-on-state { > + pins = "gpio0"; > + function = "gpio"; > + drive-strength = <8>; > + output-low; > + }; > + > + cdc_ext_spk_pa_sus: cdc-ext-spk-pa-off-state { > + pins = "gpio0"; > + function = "gpio"; > + drive-strength = <2>; > + bias-disable; > + }; > + > + cdc_slim_lines_act: lines-on-state { > + pins = "gpio63"; > + function = "cdc_pdm0"; > + drive-strength = <8>; > + output-high; > + }; > + > + cdc_slim_lines_sus: lines-off-state { > + pins = "gpio63"; > + function = "cdc_pdm0"; > + drive-strength = <2>; > + bias-disable; > + }; > + > + cross_conn_det_act: lines-on-state { > + pins = "gpio120"; > + function = "gpio"; > + drive-strength = <8>; > + output-low; > + bias-pull-down; > + }; > + > + cross_conn_det_sus: lines-off-state { > + pins = "gpio120"; > + function = "gpio"; > + drive-strength = <2>; > + bias-pull-down; > + }; > + > + ext_buck_vsel: vsel0-state { > + pins = "gpio111"; > + function = "gpio"; > + drive-strength = <2>; > + }; > + > + ext_cdc_tlmm_lines_act: tlmm-lines-on-state { > + pins = "gpio116", "gpio112", "gpio117", "gpio118", "gpio119"; > + function = "gpio"; > + drive-strength = <8>; > + }; > + > + ext_cdc_tlmm_lines_sus: tlmm-lines-off-state { > + pins = "gpio116", "gpio112", "gpio117", "gpio118", "gpio119"; > + function = "gpio"; > + drive-strength = <2>; > + bias-disable; > + }; > + > + gpio_key_suspend: gpio-key-suspend-state { > + pins = "gpio107", "gpio108", "gpio109"; > + function = "gpio"; > + drive-strength = <2>; > + bias-pull-up; > + }; > + > + negative5_reg_default: negative5-reg-default-state { > + pins = "gpio17"; > + function = "gpio"; > + output-low; > + }; > + > + positive5_reg_default: positive5-reg-default-state { > + pins = "gpio114"; > + function = "gpio"; > + output-low; > + }; > + > + /* Gyroscope and accelerometer sensor combo */ > + mpu6050_default: mpu6050-default-state { > + pins = "gpio115"; > + function = "gpio"; > + drive-strength = <6>; > + bias-pull-up; > + }; > + > + mpu6050_sleep: mpu6050-sleep-state { > + pins = "gpio115"; > + function = "gpio"; > + drive-strength = <2>; > + bias-pull-down; > + }; > + > + nfc_disable_active: nfc-disable-active-state { > + pins = "gpio20"; > + function = "gpio"; > + drive-strength = <6>; > + bias-pull-up; > + }; > + > + nfc_disable_suspend: nfc-disable-suspend-state { > + pins = "gpio20"; > + function = "gpio"; > + drive-strength = <6>; > + bias-disable; > + }; > + > + nfc_int_active: nfc-int-active-state { > + pins = "gpio21"; > + function = "gpio"; > + drive-strength = <6>; > + bias-pull-up; > + }; > + > + nfc_int_suspend: nfc-int-suspend-state { > + pins = "gpio21"; > + function = "gpio"; > + drive-strength = <6>; > + bias-pull-up; > + }; > + > + nt35521_te_default: nt35521-te-default-state { > + pins = "gpio24"; > + function = "gpio"; > + drive-strength = <6>; > + bias-pull-down; > + }; > + > + nt35521_backlight: nt35521-backlight-default-state { > + pins = "gpio10"; > + function = "gpio"; > + drive-strength = <6>; > + bias-pull-down; > + }; > + > + smb_int: smb-int-default-state { > + pins = "gpio62"; > + function = "gpio"; > + drive-strength = <2>; > + bias-pull-up; > + }; > + > + /* add pingrp for touchscreen */ > + ts_int_active: ts-int-active-state { > + pins = "gpio13"; > + function = "gpio"; > + drive-strength = <16>; > + bias-pull-up; > + }; > + > + ts_int_suspend: ts-int-suspend-state { > + pins = "gpio13"; > + function = "gpio"; > + drive-strength = <2>; > + bias-pull-down; > + }; > + > + ts_reset_active: ts-reset-active-state { > + pins = "gpio12"; > + function = "gpio"; > + drive-strength = <16>; > + bias-pull-up; > + }; > + > + ts_reset_suspend: ts-reset-suspend-state { > + pins = "gpio12"; > + function = "gpio"; > + drive-strength = <2>; > + bias-pull-down; > + }; > + > + ts_release: ts-release-default-state { > + pins = "gpio13", "gpio12"; > + function = "gpio"; > + drive-strength = <2>; > + bias-pull-down; > + }; > + > + usb_id_default: usb-id-default-state { > + pins = "gpio110"; > + function = "gpio"; > + > + drive-strength = <8>; > + bias-pull-up; > + }; > +}; > + > +&pronto { > + status = "okay"; Blank line. > + iris { > + compatible = "qcom,wcn3660"; > + }; > +}; > + Best regards, Krzysztof
On 03/01/2023 02:29, Konrad Dybcio wrote: > 12, 13? > > Also, why does this node exist in the first place? Is it > going to be used for some non-standard touchpanel-off-flipping? For most of your comments here the answer is "because that's what the incoming dts does" from Sony's downstream. For V3 I will see if I can get some better insight on the gpio bias and what this entry here is intended for. --- bod
diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index 8d8dab62c66df..7056036351df8 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -22,6 +22,7 @@ dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-grandmax.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-j5.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-serranove.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-wingtech-wt88047.dtb +dtb-$(CONFIG_ARCH_QCOM) += msm8939-sony-xperia-kanuti-tulip.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8956-sony-xperia-loire-kugo.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8956-sony-xperia-loire-suzu.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8992-lg-bullhead-rev-10.dtb diff --git a/arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts b/arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts new file mode 100644 index 0000000000000..ff93b69bda679 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts @@ -0,0 +1,472 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2015, The Linux Foundation. All rights reserved. + * Copyright (c) 2022-2023, Bryan O'Donoghue. + * + */ + +/dts-v1/; + +#include "msm8939.dtsi" +#include "msm8939-pm8916.dtsi" +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/pinctrl/qcom,pmic-gpio.h> + +/ { + model = "Sony Xperia M4 Aqua"; + compatible = "sony,kanuti-tulip", "qcom,msm8939"; + qcom,board-id = <8 0>; + + aliases { + serial0 = &blsp1_uart2; + mmc0 = &sdhc_1; /* SDC1 eMMC slot */ + mmc1 = &sdhc_2; /* SDC2 SD card slot */ + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + negative5_reg: negative5-regulator { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&negative5_reg_default>; + regulator-name = "negative5_reg"; + gpio = <&msmgpio 17 GPIO_ACTIVE_LOW>; + startup-delay-us = <0>; + }; + + positive5_reg: positive5-regulator { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&positive5_reg_default>; + regulator-name = "positive5_reg"; + gpio = <&msmgpio 114 GPIO_ACTIVE_LOW>; + startup-delay-us = <0>; + }; + + usb_id: usb-id { + compatible = "linux,extcon-usb-gpio"; + id-gpio = <&msmgpio 110 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&usb_id_default>; + }; +}; + +&blsp_dma { + status = "okay"; +}; + +&dsi0 { + #address-cells = <1>; + #size-cells = <0>; + vdda-supply = <&pm8916_l2>; + vddio-supply = <&pm8916_l16>; + status = "okay"; + + ports { + port@1 { + endpoint { + remote-endpoint = <&panel_in>; + data-lanes = <0 1 2 3>; + }; + }; + }; + + panel@0 { + compatible = "sony,tulip-truly-nt35521"; + reg = <0>; + positive5-supply = <&positive5_reg>; + negative5-supply = <&negative5_reg>; + reset-gpios = <&msmgpio 25 GPIO_ACTIVE_LOW>; + enable-gpios = <&msmgpio 10 GPIO_ACTIVE_LOW>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + panel_in: endpoint { + remote-endpoint = <&dsi0_out>; + }; + }; + }; + + }; +}; + +&dsi_phy0 { + vddio-supply = <&pm8916_l16>; + status = "okay"; +}; + +&msmgpio { + + ak8963_default: ak8963-default-state { + pins = "gpio69"; + function = "gpio"; + drive-strength = <6>; + bias-pull-up; + }; + + ak8963_sleep: ak8963-sleep-state { + pins = "gpio69"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + + /* Ambient light and proximity sensor apds9930 and apds9900 */ + apds99xx_default: apds99xx-default-state { + pins = "gpio113"; + function = "gpio"; + drive-strength = <6>; + bias-pull-up; + }; + + apds99xx_sleep: apds99xx-sleep-state { + pins = "gpio113"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + + cam_sensor_flash_default: cam-sensor-flash-default-state { + pins = "gpio98", "gpio97"; + function = "gpio"; + bias-disable; + drive-strength = <2>; + }; + + cci1_default: cci1-default-state { + pins = "gpio31", "gpio32"; + function = "cci_i2c"; + drive-strength = <2>; + bias-disable; + }; + + cdc_ext_spk_pa_active: cdc-ext-spk-pa-on-state { + pins = "gpio0"; + function = "gpio"; + drive-strength = <8>; + output-low; + }; + + cdc_ext_spk_pa_sus: cdc-ext-spk-pa-off-state { + pins = "gpio0"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + cdc_slim_lines_act: lines-on-state { + pins = "gpio63"; + function = "cdc_pdm0"; + drive-strength = <8>; + output-high; + }; + + cdc_slim_lines_sus: lines-off-state { + pins = "gpio63"; + function = "cdc_pdm0"; + drive-strength = <2>; + bias-disable; + }; + + cross_conn_det_act: lines-on-state { + pins = "gpio120"; + function = "gpio"; + drive-strength = <8>; + output-low; + bias-pull-down; + }; + + cross_conn_det_sus: lines-off-state { + pins = "gpio120"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + + ext_buck_vsel: vsel0-state { + pins = "gpio111"; + function = "gpio"; + drive-strength = <2>; + }; + + ext_cdc_tlmm_lines_act: tlmm-lines-on-state { + pins = "gpio116", "gpio112", "gpio117", "gpio118", "gpio119"; + function = "gpio"; + drive-strength = <8>; + }; + + ext_cdc_tlmm_lines_sus: tlmm-lines-off-state { + pins = "gpio116", "gpio112", "gpio117", "gpio118", "gpio119"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + gpio_key_suspend: gpio-key-suspend-state { + pins = "gpio107", "gpio108", "gpio109"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + + negative5_reg_default: negative5-reg-default-state { + pins = "gpio17"; + function = "gpio"; + output-low; + }; + + positive5_reg_default: positive5-reg-default-state { + pins = "gpio114"; + function = "gpio"; + output-low; + }; + + /* Gyroscope and accelerometer sensor combo */ + mpu6050_default: mpu6050-default-state { + pins = "gpio115"; + function = "gpio"; + drive-strength = <6>; + bias-pull-up; + }; + + mpu6050_sleep: mpu6050-sleep-state { + pins = "gpio115"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + + nfc_disable_active: nfc-disable-active-state { + pins = "gpio20"; + function = "gpio"; + drive-strength = <6>; + bias-pull-up; + }; + + nfc_disable_suspend: nfc-disable-suspend-state { + pins = "gpio20"; + function = "gpio"; + drive-strength = <6>; + bias-disable; + }; + + nfc_int_active: nfc-int-active-state { + pins = "gpio21"; + function = "gpio"; + drive-strength = <6>; + bias-pull-up; + }; + + nfc_int_suspend: nfc-int-suspend-state { + pins = "gpio21"; + function = "gpio"; + drive-strength = <6>; + bias-pull-up; + }; + + nt35521_te_default: nt35521-te-default-state { + pins = "gpio24"; + function = "gpio"; + drive-strength = <6>; + bias-pull-down; + }; + + nt35521_backlight: nt35521-backlight-default-state { + pins = "gpio10"; + function = "gpio"; + drive-strength = <6>; + bias-pull-down; + }; + + smb_int: smb-int-default-state { + pins = "gpio62"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + + /* add pingrp for touchscreen */ + ts_int_active: ts-int-active-state { + pins = "gpio13"; + function = "gpio"; + drive-strength = <16>; + bias-pull-up; + }; + + ts_int_suspend: ts-int-suspend-state { + pins = "gpio13"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + + ts_reset_active: ts-reset-active-state { + pins = "gpio12"; + function = "gpio"; + drive-strength = <16>; + bias-pull-up; + }; + + ts_reset_suspend: ts-reset-suspend-state { + pins = "gpio12"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + + ts_release: ts-release-default-state { + pins = "gpio13", "gpio12"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + + usb_id_default: usb-id-default-state { + pins = "gpio110"; + function = "gpio"; + + drive-strength = <8>; + bias-pull-up; + }; +}; + +&pronto { + status = "okay"; + iris { + compatible = "qcom,wcn3660"; + }; +}; + +&smd_rpm_regulators { + vdd_l1_l2_l3-supply = <&pm8916_s3>; + vdd_l4_l5_l6-supply = <&pm8916_s4>; + vdd_l7-supply = <&pm8916_s4>; + + pm8916_s3: s3 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1300000>; + }; + + pm8916_s4: s4 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2100000>; + }; + + pm8916_l2: l2 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; + + pm8916_l4: l4 { + regulator-min-microvolt = <2050000>; + regulator-max-microvolt = <2050000>; + }; + + pm8916_l5: l5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + pm8916_l6: l6 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + }; + + pm8916_l7: l7 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + pm8916_l8: l8 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2900000>; + }; + + pm8916_l9: l9 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + pm8916_l10: l10 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + pm8916_l11: l11 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + }; + + pm8916_l12: l12 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + }; + + pm8916_l13: l13 { + regulator-min-microvolt = <3075000>; + regulator-max-microvolt = <3075000>; + }; + + pm8916_l14: l14 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + }; + + pm8916_l15: l15 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + }; + + pm8916_l16: l16 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + }; + + pm8916_l17: l17 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; + + pm8916_l18: l18 { + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2700000>; + }; +}; + +&sdhc_1 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>; + pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>; + status = "okay"; +}; + +&sdhc_2 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>; + pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>; + cd-gpios = <&msmgpio 38 GPIO_ACTIVE_HIGH>; + status = "okay"; +}; + +&usb { + status = "okay"; + extcon = <&usb_id>, <&usb_id>; + + ulpi { + usb_hs_phy: phy { + v1p8-supply = <&pm8916_l7>; + v3p3-supply = <&pm8916_l13>; + }; + }; +}; + +&usb_hs_phy { + extcon = <&usb_id>; +};
Add a basic booting DTS for the Sony Xperia M4 Aqua aka "tulip". Tulip is paired with: - wcn3660 - smb1360 battery charger - 720p Truly NT35521 Panel Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> --- arch/arm64/boot/dts/qcom/Makefile | 1 + .../qcom/msm8939-sony-xperia-kanuti-tulip.dts | 472 ++++++++++++++++++ 2 files changed, 473 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts