486 lines
10 KiB
Plaintext
486 lines
10 KiB
Plaintext
|
// SPDX-License-Identifier: BSD-3-Clause
|
||
|
/*
|
||
|
* Copyright (c) 2021, Luca Weiss <luca@z3ntu.xyz>
|
||
|
*/
|
||
|
|
||
|
/dts-v1/;
|
||
|
|
||
|
#include <dt-bindings/gpio/gpio.h>
|
||
|
#include <dt-bindings/input/input.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"
|
||
|
|
||
|
/ {
|
||
|
model = "Fairphone 4";
|
||
|
compatible = "fairphone,fp4", "qcom,sm7225";
|
||
|
chassis-type = "handset";
|
||
|
|
||
|
/* required for bootloader to select correct board */
|
||
|
qcom,msm-id = <434 0x10000>, <459 0x10000>;
|
||
|
qcom,board-id = <8 32>;
|
||
|
|
||
|
aliases {
|
||
|
serial0 = &uart9;
|
||
|
};
|
||
|
|
||
|
chosen {
|
||
|
#address-cells = <2>;
|
||
|
#size-cells = <2>;
|
||
|
ranges;
|
||
|
|
||
|
stdout-path = "serial0:115200n8";
|
||
|
|
||
|
framebuffer0: framebuffer@a000000 {
|
||
|
compatible = "simple-framebuffer";
|
||
|
reg = <0 0xa0000000 0 (2340 * 1080 * 4)>;
|
||
|
width = <1080>;
|
||
|
height = <2340>;
|
||
|
stride = <(1080 * 4)>;
|
||
|
format = "a8r8g8b8";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
gpio-keys {
|
||
|
compatible = "gpio-keys";
|
||
|
pinctrl-names = "default";
|
||
|
pinctrl-0 = <&gpio_keys_pin>;
|
||
|
|
||
|
key-volume-up {
|
||
|
label = "volume_up";
|
||
|
linux,code = <KEY_VOLUMEUP>;
|
||
|
gpios = <&pm6350_gpios 2 GPIO_ACTIVE_LOW>;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
reserved-memory {
|
||
|
/*
|
||
|
* The rmtfs memory region in downstream is 'dynamically allocated'
|
||
|
* but given the same address every time. Hard code it as this address is
|
||
|
* where the modem firmware expects it to be.
|
||
|
*/
|
||
|
memory@efe01000 {
|
||
|
compatible = "qcom,rmtfs-mem";
|
||
|
reg = <0 0xefe01000 0 0x600000>;
|
||
|
no-map;
|
||
|
|
||
|
qcom,client-id = <1>;
|
||
|
qcom,vmid = <15>;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
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";
|
||
|
};
|
||
|
|
||
|
&apps_rsc {
|
||
|
pm6350-rpmh-regulators {
|
||
|
compatible = "qcom,pm6350-rpmh-regulators";
|
||
|
qcom,pmic-id = "a";
|
||
|
|
||
|
vreg_s1a: smps1 {
|
||
|
regulator-min-microvolt = <1000000>;
|
||
|
regulator-max-microvolt = <1200000>;
|
||
|
};
|
||
|
|
||
|
vreg_s2a: smps2 {
|
||
|
regulator-min-microvolt = <1503000>;
|
||
|
regulator-max-microvolt = <2048000>;
|
||
|
};
|
||
|
|
||
|
vreg_l2a: ldo2 {
|
||
|
regulator-min-microvolt = <1503000>;
|
||
|
regulator-max-microvolt = <1980000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l3a: ldo3 {
|
||
|
regulator-min-microvolt = <2700000>;
|
||
|
regulator-max-microvolt = <3300000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l4a: ldo4 {
|
||
|
regulator-min-microvolt = <352000>;
|
||
|
regulator-max-microvolt = <801000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l5a: ldo5 {
|
||
|
regulator-min-microvolt = <1503000>;
|
||
|
regulator-max-microvolt = <1980000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l6a: ldo6 {
|
||
|
regulator-min-microvolt = <1710000>;
|
||
|
regulator-max-microvolt = <3544000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l7a: ldo7 {
|
||
|
regulator-min-microvolt = <1620000>;
|
||
|
regulator-max-microvolt = <1980000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l8a: ldo8 {
|
||
|
regulator-min-microvolt = <2800000>;
|
||
|
regulator-max-microvolt = <2800000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l9a: ldo9 {
|
||
|
regulator-min-microvolt = <1650000>;
|
||
|
regulator-max-microvolt = <3401000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l11a: ldo11 {
|
||
|
regulator-min-microvolt = <1800000>;
|
||
|
regulator-max-microvolt = <2000000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l12a: ldo12 {
|
||
|
regulator-min-microvolt = <1620000>;
|
||
|
regulator-max-microvolt = <1980000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l13a: ldo13 {
|
||
|
regulator-min-microvolt = <570000>;
|
||
|
regulator-max-microvolt = <650000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l14a: ldo14 {
|
||
|
regulator-min-microvolt = <1700000>;
|
||
|
regulator-max-microvolt = <1900000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l15a: ldo15 {
|
||
|
regulator-min-microvolt = <1100000>;
|
||
|
regulator-max-microvolt = <1305000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l16a: ldo16 {
|
||
|
regulator-min-microvolt = <830000>;
|
||
|
regulator-max-microvolt = <921000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l18a: ldo18 {
|
||
|
regulator-min-microvolt = <788000>;
|
||
|
regulator-max-microvolt = <1049000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l19a: ldo19 {
|
||
|
regulator-min-microvolt = <1080000>;
|
||
|
regulator-max-microvolt = <1305000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l20a: ldo20 {
|
||
|
regulator-min-microvolt = <530000>;
|
||
|
regulator-max-microvolt = <801000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l21a: ldo21 {
|
||
|
regulator-min-microvolt = <751000>;
|
||
|
regulator-max-microvolt = <825000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l22a: ldo22 {
|
||
|
regulator-min-microvolt = <1080000>;
|
||
|
regulator-max-microvolt = <1305000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
pm6150l-rpmh-regulators {
|
||
|
compatible = "qcom,pm6150l-rpmh-regulators";
|
||
|
qcom,pmic-id = "e";
|
||
|
|
||
|
vreg_s8e: smps8 {
|
||
|
regulator-min-microvolt = <313000>;
|
||
|
regulator-max-microvolt = <1395000>;
|
||
|
};
|
||
|
|
||
|
vreg_l1e: ldo1 {
|
||
|
regulator-min-microvolt = <1620000>;
|
||
|
regulator-max-microvolt = <1980000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l2e: ldo2 {
|
||
|
regulator-min-microvolt = <1170000>;
|
||
|
regulator-max-microvolt = <1305000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l3e: ldo3 {
|
||
|
regulator-min-microvolt = <1100000>;
|
||
|
regulator-max-microvolt = <1299000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l4e: ldo4 {
|
||
|
regulator-min-microvolt = <1620000>;
|
||
|
regulator-max-microvolt = <3300000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l5e: ldo5 {
|
||
|
regulator-min-microvolt = <1620000>;
|
||
|
regulator-max-microvolt = <3300000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l6e: ldo6 {
|
||
|
regulator-min-microvolt = <1700000>;
|
||
|
regulator-max-microvolt = <3544000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l7e: ldo7 {
|
||
|
regulator-min-microvolt = <2700000>;
|
||
|
regulator-max-microvolt = <3544000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l8e: ldo8 {
|
||
|
regulator-min-microvolt = <1620000>;
|
||
|
regulator-max-microvolt = <2000000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l9e: ldo9 {
|
||
|
regulator-min-microvolt = <2700000>;
|
||
|
regulator-max-microvolt = <3544000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l10e: ldo10 {
|
||
|
regulator-min-microvolt = <3000000>;
|
||
|
regulator-max-microvolt = <3401000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_l11e: ldo11 {
|
||
|
regulator-min-microvolt = <3000000>;
|
||
|
regulator-max-microvolt = <3401000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||
|
};
|
||
|
|
||
|
vreg_bob: bob {
|
||
|
regulator-min-microvolt = <1620000>;
|
||
|
regulator-max-microvolt = <5492000>;
|
||
|
regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
|
||
|
regulator-allow-bypass;
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
&cdsp {
|
||
|
status = "okay";
|
||
|
firmware-name = "qcom/sm7225/fairphone4/cdsp.mdt";
|
||
|
};
|
||
|
|
||
|
&i2c10 {
|
||
|
status = "okay";
|
||
|
clock-frequency = <400000>;
|
||
|
|
||
|
haptics@5a {
|
||
|
compatible = "awinic,aw8695";
|
||
|
reg = <0x5a>;
|
||
|
interrupts-extended = <&tlmm 85 IRQ_TYPE_EDGE_FALLING>;
|
||
|
reset-gpios = <&tlmm 90 GPIO_ACTIVE_HIGH>;
|
||
|
|
||
|
awinic,f0-preset = <2350>;
|
||
|
awinic,f0-coefficient = <260>;
|
||
|
awinic,f0-calibration-percent = <7>;
|
||
|
awinic,drive-level = <125>;
|
||
|
|
||
|
awinic,f0-detection-play-time = <5>;
|
||
|
awinic,f0-detection-wait-time = <3>;
|
||
|
awinic,f0-detection-repeat = <2>;
|
||
|
awinic,f0-detection-trace = <15>;
|
||
|
|
||
|
awinic,boost-debug = /bits/ 8 <0x30 0xeb 0xd4>;
|
||
|
awinic,tset = /bits/ 8 <0x12>;
|
||
|
awinic,r-spare = /bits/ 8 <0x68>;
|
||
|
|
||
|
awinic,bemf-upper-threshold = <4104>;
|
||
|
awinic,bemf-lower-threshold = <1016>;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
&mpss {
|
||
|
status = "okay";
|
||
|
firmware-name = "qcom/sm7225/fairphone4/modem.mdt";
|
||
|
};
|
||
|
|
||
|
&pm6150l_wled {
|
||
|
status = "okay";
|
||
|
|
||
|
qcom,switching-freq = <800>;
|
||
|
qcom,current-limit-microamp = <20000>;
|
||
|
qcom,num-strings = <2>;
|
||
|
};
|
||
|
|
||
|
&pm6350_gpios {
|
||
|
gpio_keys_pin: gpio-keys-state {
|
||
|
pins = "gpio2";
|
||
|
function = PMIC_GPIO_FUNC_NORMAL;
|
||
|
bias-pull-up;
|
||
|
input-enable;
|
||
|
power-source = <0>;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
&pm6350_resin {
|
||
|
status = "okay";
|
||
|
linux,code = <KEY_VOLUMEDOWN>;
|
||
|
};
|
||
|
|
||
|
&pm7250b_adc {
|
||
|
adc-chan@4d {
|
||
|
reg = <ADC5_AMUX_THM1_100K_PU>;
|
||
|
qcom,ratiometric;
|
||
|
qcom,hw-settle-time = <200>;
|
||
|
qcom,pre-scaling = <1 1>;
|
||
|
label = "charger_skin_therm";
|
||
|
};
|
||
|
|
||
|
adc-chan@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>;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
&qupv3_id_1 {
|
||
|
status = "okay";
|
||
|
};
|
||
|
|
||
|
&tlmm {
|
||
|
gpio-reserved-ranges = <13 4>, <56 2>;
|
||
|
};
|
||
|
|
||
|
&uart9 {
|
||
|
status = "okay";
|
||
|
};
|
||
|
|
||
|
&ufs_mem_hc {
|
||
|
status = "okay";
|
||
|
|
||
|
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";
|
||
|
|
||
|
vdda-phy-supply = <&vreg_l18a>;
|
||
|
vdda-pll-supply = <&vreg_l22a>;
|
||
|
};
|
||
|
|
||
|
&usb_1 {
|
||
|
status = "okay";
|
||
|
};
|
||
|
|
||
|
&usb_1_dwc3 {
|
||
|
maximum-speed = "super-speed";
|
||
|
dr_mode = "peripheral";
|
||
|
};
|
||
|
|
||
|
&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";
|
||
|
|
||
|
vdda-phy-supply = <&vreg_l22a>;
|
||
|
vdda-pll-supply = <&vreg_l16a>;
|
||
|
};
|
||
|
|
||
|
&wifi {
|
||
|
status = "okay";
|
||
|
|
||
|
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>;
|
||
|
};
|