summaryrefslogtreecommitdiffstats
path: root/dts/src/arm64/qcom/sm7225-fairphone-fp4.dts
diff options
context:
space:
mode:
Diffstat (limited to 'dts/src/arm64/qcom/sm7225-fairphone-fp4.dts')
-rw-r--r--dts/src/arm64/qcom/sm7225-fairphone-fp4.dts368
1 files changed, 326 insertions, 42 deletions
diff --git a/dts/src/arm64/qcom/sm7225-fairphone-fp4.dts b/dts/src/arm64/qcom/sm7225-fairphone-fp4.dts
index 61925216f5..ade6198055 100644
--- a/dts/src/arm64/qcom/sm7225-fairphone-fp4.dts
+++ b/dts/src/arm64/qcom/sm7225-fairphone-fp4.dts
@@ -5,13 +5,25 @@
/dts-v1/;
+/* PM7250B is configured to use SID2/3 */
+#define PM7250B_SID 2
+#define PM7250B_SID1 3
+
+/* PMK8350 (in reality a PMK8003) is configured to use SID6 instead of 0 */
+#define PMK8350_SID 6
+
+#include <dt-bindings/firmware/qcom,scm.h>
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include "sm7225.dtsi"
#include "pm6150l.dtsi"
#include "pm6350.dtsi"
+#include "pm7250b.dtsi"
+#include "pmk8350.dtsi"
/ {
model = "Fairphone 4";
@@ -24,6 +36,7 @@
aliases {
serial0 = &uart9;
+ serial1 = &uart1;
};
chosen {
@@ -48,7 +61,7 @@
pinctrl-names = "default";
pinctrl-0 = <&gpio_keys_pin>;
- volume-up {
+ key-volume-up {
label = "volume_up";
linux,code = <KEY_VOLUMEUP>;
gpios = <&pm6350_gpios 2 GPIO_ACTIVE_LOW>;
@@ -67,18 +80,48 @@
no-map;
qcom,client-id = <1>;
- qcom,vmid = <15>;
+ qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
+ };
+ };
+
+ thermal-zones {
+ chg-skin-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&pm7250b_adc_tm 0>;
+
+ trips {
+ active-config0 {
+ temperature = <125000>;
+ hysteresis = <1000>;
+ type = "passive";
+ };
+ };
+ };
+
+ conn-thermal {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&pm7250b_adc_tm 1>;
+
+ trips {
+ active-config0 {
+ temperature = <125000>;
+ hysteresis = <1000>;
+ type = "passive";
+ };
+ };
};
};
};
&adsp {
- status = "okay";
firmware-name = "qcom/sm7225/fairphone4/adsp.mdt";
+ status = "okay";
};
&apps_rsc {
- pm6350-rpmh-regulators {
+ regulators-0 {
compatible = "qcom,pm6350-rpmh-regulators";
qcom,pmic-id = "a";
@@ -207,7 +250,7 @@
};
};
- pm6150l-rpmh-regulators {
+ regulators-1 {
compatible = "qcom,pm6150l-rpmh-regulators";
qcom,pmic-id = "e";
@@ -248,8 +291,11 @@
vreg_l6e: ldo6 {
regulator-min-microvolt = <1700000>;
- regulator-max-microvolt = <3544000>;
+ regulator-max-microvolt = <2950000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
};
vreg_l7e: ldo7 {
@@ -266,8 +312,11 @@
vreg_l9e: ldo9 {
regulator-min-microvolt = <2700000>;
- regulator-max-microvolt = <3544000>;
+ regulator-max-microvolt = <2960000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-allow-set-load;
+ regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+ RPMH_REGULATOR_MODE_HPM>;
};
vreg_l10e: ldo10 {
@@ -291,55 +340,107 @@
};
};
-&cdsp {
+&cci0 {
status = "okay";
+};
+
+&cci0_i2c0 {
+ /* IMX582 @ 0x1a */
+};
+
+&cci0_i2c1 {
+ /* IMX582 @ 0x1a */
+};
+
+&cci1 {
+ status = "okay";
+};
+
+&cci1_i2c0 {
+ /* IMX576 @ 0x10 */
+};
+
+&cdsp {
firmware-name = "qcom/sm7225/fairphone4/cdsp.mdt";
+ status = "okay";
};
-&i2c10 {
+&gpi_dma0 {
+ status = "okay";
+};
+
+&gpi_dma1 {
status = "okay";
+};
+
+&i2c0 {
clock-frequency = <400000>;
+ status = "okay";
- haptics@5a {
- compatible = "awinic,aw8695";
- reg = <0x5a>;
- interrupts-extended = <&tlmm 85 IRQ_TYPE_EDGE_FALLING>;
- reset-gpios = <&tlmm 90 GPIO_ACTIVE_HIGH>;
+ /* ST21NFCD NFC @ 8 */
+ /* VL53L3 ToF @ 29 */
+ /* AW88264A amplifier @ 34 */
+ /* AW88264A amplifier @ 35 */
+};
- awinic,f0-preset = <2350>;
- awinic,f0-coefficient = <260>;
- awinic,f0-calibration-percent = <7>;
- awinic,drive-level = <125>;
+&i2c8 {
+ clock-frequency = <400000>;
+ status = "okay";
- awinic,f0-detection-play-time = <5>;
- awinic,f0-detection-wait-time = <3>;
- awinic,f0-detection-repeat = <2>;
- awinic,f0-detection-trace = <15>;
+ /* HX83112A touchscreen @ 48 */
+};
- awinic,boost-debug = /bits/ 8 <0x30 0xeb 0xd4>;
- awinic,tset = /bits/ 8 <0x12>;
- awinic,r-spare = /bits/ 8 <0x68>;
+&i2c10 {
+ /* PM8008 PMIC @ 8 and 9 */
+ /* PX8618 @ 26 */
+ /* SMB1395 PMIC @ 34 */
+ /* awinic,aw8695 @ 5a */
+};
- awinic,bemf-upper-threshold = <4104>;
- awinic,bemf-lower-threshold = <1016>;
- };
+&ipa {
+ qcom,gsi-loader = "self";
+ memory-region = <&pil_ipa_fw_mem>;
+ firmware-name = "qcom/sm7225/fairphone4/ipa_fws.mdt";
+ status = "okay";
};
&mpss {
- status = "okay";
firmware-name = "qcom/sm7225/fairphone4/modem.mdt";
+ status = "okay";
};
-&pm6150l_wled {
+&pm6150l_flash {
status = "okay";
+ led-0 {
+ function = LED_FUNCTION_FLASH;
+ color = <LED_COLOR_ID_YELLOW>;
+ led-sources = <1>;
+ led-max-microamp = <180000>;
+ flash-max-microamp = <1000000>;
+ flash-max-timeout-us = <1280000>;
+ };
+
+ led-1 {
+ function = LED_FUNCTION_FLASH;
+ color = <LED_COLOR_ID_WHITE>;
+ led-sources = <2>;
+ led-max-microamp = <180000>;
+ flash-max-microamp = <1000000>;
+ flash-max-timeout-us = <1280000>;
+ };
+};
+
+&pm6150l_wled {
qcom,switching-freq = <800>;
qcom,current-limit-microamp = <20000>;
qcom,num-strings = <2>;
+
+ status = "okay";
};
&pm6350_gpios {
- gpio_keys_pin: gpio-keys-pin {
+ gpio_keys_pin: gpio-keys-state {
pins = "gpio2";
function = PMIC_GPIO_FUNC_NORMAL;
bias-pull-up;
@@ -349,38 +450,221 @@
};
&pm6350_resin {
- status = "okay";
linux,code = <KEY_VOLUMEDOWN>;
+ status = "okay";
+};
+
+&pm7250b_adc {
+ channel@4d {
+ reg = <ADC5_AMUX_THM1_100K_PU>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ qcom,pre-scaling = <1 1>;
+ label = "charger_skin_therm";
+ };
+
+ channel@4f {
+ reg = <ADC5_AMUX_THM3_100K_PU>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ qcom,pre-scaling = <1 1>;
+ label = "conn_therm";
+ };
+};
+
+&pm7250b_adc_tm {
+ status = "okay";
+
+ charger-skin-therm@0 {
+ reg = <0>;
+ io-channels = <&pm7250b_adc ADC5_AMUX_THM1_100K_PU>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+
+ conn-therm@1 {
+ reg = <1>;
+ io-channels = <&pm7250b_adc ADC5_AMUX_THM3_100K_PU>;
+ qcom,ratiometric;
+ qcom,hw-settle-time-us = <200>;
+ };
+};
+
+&pmk8350_rtc {
+ status = "okay";
+};
+
+&pmk8350_vadc {
+ channel@644 {
+ reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
+ qcom,ratiometric;
+ qcom,hw-settle-time = <200>;
+ qcom,pre-scaling = <1 1>;
+ label = "xo_therm";
+ };
+};
+
+&qup_uart1_cts {
+ /*
+ * Configure a bias-bus-hold on CTS to lower power
+ * usage when Bluetooth is turned off. Bus hold will
+ * maintain a low power state regardless of whether
+ * the Bluetooth module drives the pin in either
+ * direction or leaves the pin fully unpowered.
+ */
+ bias-bus-hold;
+};
+
+&qup_uart1_rts {
+ /* We'll drive RTS, so no pull */
+ drive-strength = <2>;
+ bias-disable;
+};
+
+&qup_uart1_rx {
+ /*
+ * Configure a pull-up on RX. This is needed to avoid
+ * garbage data when the TX pin of the Bluetooth module is
+ * in tri-state (module powered off or not driving the
+ * signal yet).
+ */
+ bias-pull-up;
+};
+
+&qup_uart1_tx {
+ /* We'll drive TX, so no pull */
+ drive-strength = <2>;
+ bias-disable;
+};
+
+&qupv3_id_0 {
+ status = "okay";
};
&qupv3_id_1 {
status = "okay";
};
+&sdc2_off_state {
+ sd-cd-pins {
+ pins = "gpio94";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+};
+
+&sdc2_on_state {
+ sd-cd-pins {
+ pins = "gpio94";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+};
+
+&sdhc_2 {
+ vmmc-supply = <&vreg_l9e>;
+ vqmmc-supply = <&vreg_l6e>;
+
+ cd-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>;
+
+ status = "okay";
+};
+
&tlmm {
gpio-reserved-ranges = <13 4>, <56 2>;
+
+ qup_uart1_sleep_cts: qup-uart1-sleep-cts-state {
+ pins = "gpio61";
+ function = "gpio";
+ /*
+ * Configure a bias-bus-hold on CTS to lower power
+ * usage when Bluetooth is turned off. Bus hold will
+ * maintain a low power state regardless of whether
+ * the Bluetooth module drives the pin in either
+ * direction or leaves the pin fully unpowered.
+ */
+ bias-bus-hold;
+ };
+
+ qup_uart1_sleep_rts: qup-uart1-sleep-rts-state {
+ pins = "gpio62";
+ function = "gpio";
+ /*
+ * Configure pull-down on RTS. As RTS is active low
+ * signal, pull it low to indicate the BT SoC that it
+ * can wakeup the system anytime from suspend state by
+ * pulling RX low (by sending wakeup bytes).
+ */
+ bias-pull-down;
+ };
+
+ qup_uart1_sleep_rx: qup-uart1-sleep-rx-state {
+ pins = "gpio64";
+ function = "gpio";
+ /*
+ * Configure a pull-up on RX. This is needed to avoid
+ * garbage data when the TX pin of the Bluetooth module
+ * is floating which may cause spurious wakeups.
+ */
+ bias-pull-up;
+ };
+
+ qup_uart1_sleep_tx: qup-uart1-sleep-tx-state {
+ pins = "gpio63";
+ function = "gpio";
+ /*
+ * Configure pull-up on TX when it isn't actively driven
+ * to prevent BT SoC from receiving garbage during sleep.
+ */
+ bias-pull-up;
+ };
};
-&uart9 {
+&uart1 {
+ /delete-property/ interrupts;
+ interrupts-extended = <&intc GIC_SPI 602 IRQ_TYPE_LEVEL_HIGH>,
+ <&tlmm 64 IRQ_TYPE_EDGE_FALLING>;
+
+ pinctrl-names = "default", "sleep";
+ pinctrl-1 = <&qup_uart1_sleep_cts>, <&qup_uart1_sleep_rts>, <&qup_uart1_sleep_tx>, <&qup_uart1_sleep_rx>;
+
status = "okay";
+
+ bluetooth {
+ compatible = "qcom,wcn3988-bt";
+
+ vddio-supply = <&vreg_l11a>;
+ vddxo-supply = <&vreg_l7a>;
+ vddrf-supply = <&vreg_l2e>;
+ vddch0-supply = <&vreg_l10e>;
+ swctrl-gpios = <&tlmm 69 GPIO_ACTIVE_HIGH>;
+
+ max-speed = <3200000>;
+ };
};
-&ufs_mem_hc {
+&uart9 {
status = "okay";
+};
+&ufs_mem_hc {
reset-gpios = <&tlmm 156 GPIO_ACTIVE_LOW>;
vcc-supply = <&vreg_l7e>;
vcc-max-microamp = <800000>;
vccq2-supply = <&vreg_l12a>;
vccq2-max-microamp = <800000>;
-};
-&ufs_mem_phy {
status = "okay";
+};
+&ufs_mem_phy {
vdda-phy-supply = <&vreg_l18a>;
vdda-pll-supply = <&vreg_l22a>;
+
+ status = "okay";
};
&usb_1 {
@@ -393,26 +677,26 @@
};
&usb_1_hsphy {
- status = "okay";
-
vdd-supply = <&vreg_l18a>;
vdda-pll-supply = <&vreg_l2a>;
vdda-phy-dpdm-supply = <&vreg_l3a>;
-};
-&usb_1_qmpphy {
status = "okay";
+};
+&usb_1_qmpphy {
vdda-phy-supply = <&vreg_l22a>;
vdda-pll-supply = <&vreg_l16a>;
-};
-&wifi {
status = "okay";
+};
+&wifi {
vdd-0.8-cx-mx-supply = <&vreg_l4a>;
vdd-1.8-xo-supply = <&vreg_l7a>;
vdd-1.3-rfa-supply = <&vreg_l2e>;
vdd-3.3-ch0-supply = <&vreg_l10e>;
vdd-3.3-ch1-supply = <&vreg_l11e>;
+
+ status = "okay";
};