arm64: dts: qcom: sm8250-samsung-r8q: Move common parts to dtsi

Move common parts of the device tree to a separate dtsi in preparation for
adding other Samsung devices from the S20, Tab S7 or Note 20 families,
creating sm8250-samsung-common.dtsi. Also add support for UFS, USB and
GPIO keys.

Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250905190931.27481-2-ghatto404@gmail.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
This commit is contained in:
Eric Gonçalves 2025-09-05 19:09:29 +00:00 committed by Bjorn Andersson
parent 473a19211c
commit 194c7636fa
2 changed files with 218 additions and 35 deletions

View File

@ -0,0 +1,204 @@
// SPDX-License-Identifier: GPL-2.0-only
/dts-v1/;
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include "sm8250.dtsi"
#include "pm8150.dtsi"
/ {
chosen {
#address-cells = <2>;
#size-cells = <2>;
ranges;
framebuffer: framebuffer@9c000000 {
compatible = "simple-framebuffer";
reg = <0x0 0x9c000000 0x0 0x2300000>;
width = <1080>;
height = <2400>;
stride = <(1080 * 4)>;
format = "a8r8g8b8";
};
};
gpio_keys: gpio-keys {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&vol_up_n>;
key-vol-up {
label = "Volume Up";
gpios = <&pm8150_gpios 3 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEUP>;
debounce-interval = <15>;
linux,can-disable;
wakeup-source;
};
};
reserved-memory {
cont_splash_mem: memory@9c000000 {
reg = <0x0 0x9c000000 0x0 0x2300000>;
no-map;
};
ramoops@9fa00000 {
compatible = "ramoops";
reg = <0x0 0x9fa00000 0x0 0x100000>;
record-size = <0x4000>;
console-size = <0x40000>;
ftrace-size = <0x40000>;
pmsg-size = <0x40000>;
no-map;
};
};
vph_pwr: vph-pwr-regulator {
compatible = "regulator-fixed";
regulator-name = "vph_pwr";
regulator-min-microvolt = <3700000>;
regulator-max-microvolt = <3700000>;
};
};
&apps_rsc {
regulators-0 {
compatible = "qcom,pm8150-rpmh-regulators";
qcom,pmic-id = "a";
vdd-s1-supply = <&vph_pwr>;
vdd-s2-supply = <&vph_pwr>;
vdd-s3-supply = <&vph_pwr>;
vdd-s4-supply = <&vph_pwr>;
vdd-s5-supply = <&vph_pwr>;
vdd-s6-supply = <&vph_pwr>;
vdd-s7-supply = <&vph_pwr>;
vdd-s8-supply = <&vph_pwr>;
vdd-s9-supply = <&vph_pwr>;
vdd-s10-supply = <&vph_pwr>;
vreg_s4a_1p8: smps4 {
regulator-name = "vreg_s4a_1p8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1920000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
regulator-allow-set-load;
regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
RPMH_REGULATOR_MODE_HPM>;
};
vreg_l2a_3p1: ldo2 {
regulator-name = "vreg_l2a_3p1";
regulator-min-microvolt = <3072000>;
regulator-max-microvolt = <3072000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l5a_0p88: ldo5 {
regulator-name = "vreg_l5a_0p88";
regulator-min-microvolt = <880000>;
regulator-max-microvolt = <880000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l6a_1p2: ldo6 {
regulator-name = "vreg_l6a_1p2";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
regulator-allow-set-load;
regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
RPMH_REGULATOR_MODE_HPM>;
};
vreg_l9a_1p2: ldo9 {
regulator-name = "vreg_l9a_1p2";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l12a_1p8: ldo12 {
regulator-name = "vreg_l12a_1p8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l17a_3p0: ldo17 {
regulator-name = "vreg_l17a_3p0";
regulator-min-microvolt = <2496000>;
regulator-max-microvolt = <3008000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
regulator-allow-set-load;
regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
RPMH_REGULATOR_MODE_HPM>;
};
};
};
&pm8150_gpios {
vol_up_n: vol-up-n-state {
pins = "gpio3";
function = "normal";
power-source = <0>;
input-enable;
bias-pull-up;
};
};
&pon_pwrkey {
status = "okay";
};
&pon_resin {
linux,code = <KEY_VOLUMEDOWN>;
status = "okay";
};
&tlmm {
gpio-reserved-ranges = <40 4>; /* I2C (Unused) */
};
&usb_1 {
/* Limit to USB 2.0 for now */
qcom,select-utmi-as-pipe-clk;
status = "okay";
};
&usb_1_dwc3 {
dr_mode = "peripheral";
maximum-speed = "high-speed";
/* Remove USB3 phy */
phys = <&usb_1_hsphy>;
phy-names = "usb2-phy";
};
&usb_1_hsphy {
vdda-pll-supply = <&vreg_l5a_0p88>;
vdda18-supply = <&vreg_l12a_1p8>;
vdda33-supply = <&vreg_l2a_3p1>;
status = "okay";
};
&ufs_mem_hc {
vcc-supply = <&vreg_l17a_3p0>;
vcc-max-microamp = <800000>;
vccq-supply = <&vreg_l6a_1p2>;
vccq-max-microamp = <800000>;
vccq2-supply = <&vreg_s4a_1p8>;
vccq2-max-microamp = <800000>;
status = "okay";
};
&ufs_mem_phy {
vdda-phy-supply = <&vreg_l5a_0p88>;
vdda-pll-supply = <&vreg_l9a_1p2>;
status = "okay";
};

View File

@ -2,46 +2,25 @@
/dts-v1/;
#include "sm8250.dtsi"
#include "sm8250-samsung-common.dtsi"
/ {
model = "Samsung Galaxy S20 FE";
compatible = "samsung,r8q", "qcom,sm8250";
chassis-type = "handset";
chosen {
#address-cells = <2>;
#size-cells = <2>;
ranges;
framebuffer: framebuffer@9c000000 {
compatible = "simple-framebuffer";
reg = <0x0 0x9c000000 0x0 (1080 * 2400 * 4)>;
width = <1080>;
height = <2400>;
stride = <(1080 * 4)>;
format = "a8r8g8b8";
};
};
reserved-memory {
cont_splash_mem: memory@9c000000 {
reg = <0x0 0x9c000000 0x0 (1080 * 2400 * 4)>;
no-map;
};
ramoops@9fa00000 {
compatible = "ramoops";
reg = <0x0 0x9fa00000 0x0 0x100000>;
record-size = <0x4000>;
console-size = <0x40000>;
pmsg-size = <0x40000>;
ecc-size = <16>;
no-map;
};
};
};
&tlmm {
gpio-reserved-ranges = <40 4>; /* I2C (not linked to anything) */
&adsp {
firmware-name = "qcom/sm8250/Samsung/r8q/adsp.mbn";
status = "okay";
};
&cdsp {
firmware-name = "qcom/sm8250/Samsung/r8q/cdsp.mbn";
status = "okay";
};
&slpi {
firmware-name = "qcom/sm8250/Samsung/r8q/slpi.mbn";
status = "okay";
};