This is continued work on Samsung S9(SM-9600) starqltechn
v6 cover This is continued work on Samsung S9(SM-9600) starqltechn
Contains starqltechn device tree changes.
Add support for new features:
- sound (headphones and mics only)
- gpu
- panel
- buttons
- MAX77705 MFD:
- charger
- fuelgauge
- haptic
- led
Binding Dependencies:
- s2dos05: https://lore.kernel.org/r/20241007-starqltechn_integration_upstream-v6-0-264309aa66de@gmail.com
- max77705: https://lore.kernel.org/r/20241007-starqltechn_integration_upstream-v6-0-0d38b5090c57@gmail.com
- s6e3ha8 panel: https://lore.kernel.org/r/20241006-starqltechn_integration_upstream-v6-0-8336b9cd6c34@gmail.com
Runtime Dependencies:
- gcc845 gp clock: https://lore.kernel.org/r/20241007-starqltechn_integration_upstream-v6-0-dd75c06c708d@gmail.com
---
Changes in v6:
- refactor: no space between tags in commit message
- rename starqltechn to sdm845-starqltechn in commit summaries
- Link to v5: https://lore.kernel.org/r/20240926-starqltechn_integration_upstream-v5-0-d2084672ff2f@gmail.com
Changes in v5:
- Split patchset per subsystem
- Add links to subsystem patchsets in description
- Link to v4: https://lore.kernel.org/r/20240913-starqltechn_integration_upstream-v4-0-2d2efd5c5877@gmail.com
Changes in v4:
- Rewrite max77705, max77705_charger, max77705_fuel_gauge from scratch
- Reorder patches:
- squash max77705 subdevice bindings in core file because
no resources there
- split device tree changes
- Use _ as space for filenames in power/supply like the majority
- Replace gcc-845 freq_tbl frequencies patch with new approach,
based on automatic m/n/pre_div value generation
- Link to v3: https://lore.kernel.org/r/20240618-starqltechn_integration_upstream-v3-0-e3f6662017ac@gmail.com
Changes in version 3:
- disable crypto patch removed(disabled on distro level)
- dts framebuffer node along with related patches removed, because panel driver added
- fix 'make O=.output_arm64 CHECK_DTBS=y qcom/sdm845-samsung-starqltechn.dtb' errors, but it still complains on 'monitored-battery' and 'power-supplies' though I have 'power-supply.yaml' link in charger and fuel gauge bindings.
---
Dzmitry Sankouski (12):
arm64: dts: qcom: sdm845: enable gmu
arm64: dts: qcom: sdm845-starqltechn: remove wifi
arm64: dts: qcom: sdm845-starqltechn: fix usb regulator mistake
arm64: dts: qcom: sdm845-starqltechn: refactor node order
arm64: dts: qcom: sdm845-starqltechn: remove excess reserved gpios
arm64: dts: qcom: sdm845-starqltechn: add gpio keys
arm64: dts: qcom: sdm845-starqltechn: add max77705 PMIC
arm64: dts: qcom: sdm845-starqltechn: add display PMIC
arm64: dts: qcom: sdm845-starqltechn: add touchscreen support
arm64: dts: qcom: sdm845-starqltechn: add initial sound support
arm64: dts: qcom: sdm845-starqltechn: add graphics support
arm64: dts: qcom: sdm845-starqltechn: add modem support
arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 4 - arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 4 - arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 4 - arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 4 - arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 573 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts | 4 - arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama.dtsi | 4 - arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi | 4 - arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts | 4 - arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 - arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 4 - 11 files changed, 564 insertions(+), 47 deletions(-)
---
base-commit: 58ca61c1a866bfdaa5e19fb19a2416764f847d75
change-id: 20240617-starqltechn_integration_upstream-bc86850b2fe3
Best regards,
Signature · 1 line
Dzmitry Sankouski <[email protected]>
PATCH v6 1/12 arm64: dts: qcom: sdm845: enable gmu
Leave gmu enabled, because it's only probed when
GPU is.
---
Changes in v5:
- delete gmu node from sdm850-lenovo-yoga-c630
(it's imported from sdm845.dtsi)
--- arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 4 ---- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 4 ---- arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 4 ---- arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 4 ---- arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts | 4 ---- arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama.dtsi | 4 ---- arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi | 4 ---- arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts | 4 ---- arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 -- arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 4 ---- 10 files changed, 38 deletions(-)
arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi +0 -4
@@ -741,10 +741,6 @@ touchscreen@10 { }; }; -&gmu { - status = "okay"; -}; - &gpu { status = "okay"; };
arch/arm64/boot/dts/qcom/sdm845-db845c.dts +0 -4
@@ -444,10 +444,6 @@ &gcc { <GCC_LPASS_SWAY_CLK>; }; -&gmu { - status = "okay"; -}; - &gpi_dma0 { status = "okay"; };
arch/arm64/boot/dts/qcom/sdm845-mtp.dts +0 -4
@@ -414,10 +414,6 @@ &gcc { <GCC_LPASS_SWAY_CLK>; }; -&gmu { - status = "okay"; -}; - &gpu { status = "okay";
arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi +0 -4
@@ -345,10 +345,6 @@ &gcc { <GCC_LPASS_SWAY_CLK>; }; -&gmu { - status = "okay"; -}; - &gpu { status = "okay";
arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts +0 -4
@@ -419,10 +419,6 @@ &gcc { <GCC_LPASS_SWAY_CLK>; }; -&gmu { - status = "okay"; -}; - &gpu { status = "okay";
arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama.dtsi +0 -4
@@ -415,10 +415,6 @@ &gcc { <GCC_LPASS_SWAY_CLK>; }; -&gmu { - status = "okay"; -}; - &gpi_dma0 { status = "okay"; };
arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi +0 -4
@@ -239,10 +239,6 @@ &gcc { <GCC_LPASS_SWAY_CLK>; }; -&gmu { - status = "okay"; -}; - &gpu { status = "okay";
arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts +0 -4
@@ -381,10 +381,6 @@ &gcc { <GCC_LPASS_SWAY_CLK>; }; -&gmu { - status = "okay"; -}; - &gpi_dma0 { status = "okay"; };
arch/arm64/boot/dts/qcom/sdm845.dtsi +0 -2
@@ -4948,8 +4948,6 @@ gmu: gmu@506a000 { operating-points-v2 = <&gmu_opp_table>; - status = "disabled"; - gmu_opp_table: opp-table { compatible = "operating-points-v2";
arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts +0 -4
@@ -355,10 +355,6 @@ &gcc { <GCC_LPASS_SWAY_CLK>; }; -&gmu { - status = "okay"; -}; - &gpu { status = "okay"; zap-shader {
Signature · 1 line
2.39.2
PATCH v6 2/12 arm64: dts: qcom: sdm845-starqltechn: remove wifi
In reply to Dzmitry SankouskiStarqltechn has broadcom chip for wifi, so sdm845 wifi part can be disabled.
---
Changes in v6:
- refactor: no space between tag in commit message.
- refactor: s/starqltechn/sdm845-starqltechn in subject.
--- arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 8 -------- 1 file changed, 8 deletions(-)
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +0 -8
@@ -418,14 +418,6 @@ &usb_1_qmpphy { status = "okay"; }; -&wifi { - vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>; - vdd-1.8-xo-supply = <&vreg_l7a_1p8>; - vdd-1.3-rfa-supply = <&vreg_l17a_1p3>; - vdd-3.3-ch0-supply = <&vreg_l25a_3p3>; - status = "okay"; -}; - &tlmm { gpio-reserved-ranges = <0 4>, <27 4>, <81 4>, <85 4>;
Signature · 1 line
2.39.2
PATCH v6 3/12 arm64: dts: qcom: sdm845-starqltechn: fix usb regulator mistake
In reply to Dzmitry SankouskiUsb regulator was wrongly pointed to vreg_l1a_0p875. However, on starqltechn it's powered from vreg_l5a_0p8.
---
Changes in v6:
- refactor: no space between tag in commit message.
- refactor: s/starqltechn/sdm845-starqltechn in subject.
--- arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +1 -2
@@ -135,8 +135,6 @@ vdda_pll_cc_ebi23: vdda_sp_sensor: vdda_ufs1_core: vdda_ufs2_core: - vdda_usb1_ss_core: - vdda_usb2_ss_core: vreg_l1a_0p875: ldo1 { regulator-min-microvolt = <880000>; regulator-max-microvolt = <880000>;
@@ -157,6 +155,7 @@ vreg_l3a_1p0: ldo3 { regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; }; + vdda_usb1_ss_core: vdd_wcss_cx: vdd_wcss_mx: vdda_wcss_pll:
Signature · 1 line
2.39.2
PATCH v6 4/12 arm64: dts: qcom: sdm845-starqltechn: refactor node order
In reply to Dzmitry Sankouski---
Changes in v6:
- refactor: no space between tag in commit message.
- refactor: s/starqltechn/sdm845-starqltechn in subject.
--- arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +1 -1
@@ -382,8 +382,8 @@ &ufs_mem_phy { }; &sdhc_2 { - pinctrl-names = "default"; pinctrl-0 = <&sdc2_clk_state &sdc2_cmd_state &sdc2_data_state &sd_card_det_n_state>; + pinctrl-names = "default"; cd-gpios = <&tlmm 126 GPIO_ACTIVE_LOW>; vmmc-supply = <&vreg_l21a_2p95>; vqmmc-supply = <&vddpx_2>;
Signature · 1 line
2.39.2
PATCH v6 5/12 arm64: dts: qcom: sdm845-starqltechn: remove excess reserved gpios
In reply to Dzmitry SankouskiStarqltechn has 2 reserved gpio ranges <27 4>, <85 4>. <27 4> is spi for eSE(embedded Secure Element). <85 4> is spi for fingerprint.
Remove excess reserved gpio regions.
---
Changes in v6:
- refactor: no space between tag in commit message.
- refactor: s/starqltechn/sdm845-starqltechn in subject.
--- arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +2 -1
@@ -418,7 +418,8 @@ &usb_1_qmpphy { }; &tlmm { - gpio-reserved-ranges = <0 4>, <27 4>, <81 4>, <85 4>; + gpio-reserved-ranges = <27 4>, /* SPI (eSE - embedded Secure Element) */ + <85 4>; /* SPI (fingerprint reader) */ sdc2_clk_state: sdc2-clk-state { pins = "sdc2_clk";
Signature · 1 line
2.39.2
PATCH v6 6/12 arm64: dts: qcom: sdm845-starqltechn: add gpio keys
In reply to Dzmitry SankouskiAdd support for phone buttons.
---
Changes in v6:
- refactor: s/starqltechn/sdm845-starqltechn in subject.
--- arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+)
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +36 -0
@@ -7,9 +7,11 @@ /dts-v1/; +#include <dt-bindings/input/linux-event-codes.h> #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/regulator/qcom,rpmh-regulator.h> #include "sdm845.dtsi" +#include "pm8998.dtsi" / { chassis-type = "handset";
@@ -69,6 +71,25 @@ memory@a1300000 { pmsg-size = <0x40000>; }; }; + + gpio_keys { + compatible = "gpio-keys"; + autorepeat; + + key-vol-up { + label = "volume_up"; + gpios = <&pm8998_gpios 6 GPIO_ACTIVE_LOW>; + linux,code = <KEY_VOLUMEUP>; + debounce-interval = <15>; + }; + + key-wink { + label = "key_wink"; + gpios = <&pm8998_gpios 19 GPIO_ACTIVE_LOW>; + linux,code = <KEY_ENTER>; + debounce-interval = <15>; + }; + }; };
@@ -417,6 +438,21 @@ &usb_1_qmpphy { status = "okay"; }; +&pm8998_resin { + linux,code = <KEY_VOLUMEDOWN>; + status = "okay"; +}; + +&pm8998_gpios { + chg_int_default: chg-int-default-state { + pins = "gpio11"; + function = "normal"; + input-enable; + bias-disable; + power-source = <0>; + }; +}; + &tlmm { gpio-reserved-ranges = <27 4>, /* SPI (eSE - embedded Secure Element) */ <85 4>; /* SPI (fingerprint reader) */
Signature · 1 line
2.39.2
PATCH v6 7/12 arm64: dts: qcom: sdm845-starqltechn: add max77705 PMIC
In reply to Dzmitry SankouskiAdd support for max77705 MFD device. Supported sub-devices:
charger, fuelgauge, haptic, led
---
Changes in v6:
- refactor: s/starqltechn/sdm845-starqltechn in subject
- refactor: 'm' < 's', so putting motor tlmm nodes first
Changes in v5:
- fix according to binding changes
- reorder vib_pwm node
--- arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+)
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +103 -0
@@ -18,6 +18,16 @@ / { model = "Samsung Galaxy S9 SM-G9600"; compatible = "samsung,starqltechn", "qcom,sdm845"; + battery: battery { + compatible = "simple-battery"; + constant-charge-current-max-microamp = <2150000>; + charge-full-design-microamp-hours = <3000000>; + + over-voltage-threshold-microvolt = <4500000>; + voltage-min-design-microvolt = <3400000>; + voltage-max-design-microvolt = <4350000>; + }; + chosen { #address-cells = <2>; #size-cells = <2>;
@@ -90,6 +100,27 @@ key-wink { debounce-interval = <15>; }; }; + + vib_regulator: gpio-regulator { + compatible = "regulator-fixed"; + regulator-name = "haptic"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + enable-active-high; + gpio = <&pm8998_gpios 18 GPIO_ACTIVE_HIGH>; + }; + + vib_pwm: pwm { + compatible = "clk-pwm"; + #pwm-cells = <2>; + assigned-clock-parents = <&rpmhcc RPMH_CXO_CLK>; + assigned-clocks = <&gcc GCC_GP1_CLK_SRC>; + clocks = <&gcc GCC_GP1_CLK>; + pinctrl-0 = <&motor_pwm_default_state>; + pinctrl-1 = <&motor_pwm_suspend_state>; + pinctrl-names = "default", "suspend"; + }; };
@@ -385,10 +416,66 @@ &qupv3_id_1 { status = "okay"; }; +&gpi_dma1 { + status = "okay"; +}; + &uart9 { status = "okay"; }; +&i2c14 { + status = "okay"; + + pmic@66 { + compatible = "maxim,max77705"; + reg = <0x66>; + interrupt-parent = <&pm8998_gpios>; + interrupts = <11 IRQ_TYPE_LEVEL_LOW>; + pinctrl-0 = <&chg_int_default>; + pinctrl-names = "default"; + + leds { + compatible = "maxim,max77705-led"; + #address-cells = <1>; + #size-cells = <0>; + + led@1 { + reg = <1>; + label = "red:usr1"; + }; + + led@2 { + reg = <2>; + label = "green:usr2"; + }; + + led@3 { + reg = <3>; + label = "blue:usr3"; + }; + }; + + max77705_charger: charger { + compatible = "maxim,max77705-charger"; + monitored-battery = <&battery>; + }; + + fuel-gauge { + compatible = "maxim,max77705-fuel-gauge"; + monitored-battery = <&battery>; + power-supplies = <&max77705_charger>; + shunt-resistor-micro-ohms = <5000>; + }; + + haptic { + compatible = "maxim,max77705-haptic"; + haptic-supply = <&vib_regulator>; + pwms = <&vib_pwm 0 100000>; + }; + }; +}; + &ufs_mem_hc { reset-gpios = <&tlmm 150 GPIO_ACTIVE_LOW>; vcc-supply = <&vreg_l20a_2p95>;
@@ -457,6 +544,22 @@ &tlmm { gpio-reserved-ranges = <27 4>, /* SPI (eSE - embedded Secure Element) */ <85 4>; /* SPI (fingerprint reader) */ + motor_pwm_default_state: motor-pwm-active-state { + pins = "gpio57"; + function = "gcc_gp1"; + drive-strength = <2>; + bias-disable; + output-high; + }; + + motor_pwm_suspend_state: motor-pwm-suspend-state { + pins = "gpio57"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + output-low; + }; + sdc2_clk_state: sdc2-clk-state { pins = "sdc2_clk"; bias-disable;
Signature · 1 line
2.39.2
PATCH v6 8/12 arm64: dts: qcom: sdm845-starqltechn: add display PMIC
In reply to Dzmitry SankouskiAdd support for s2dos05 display / touchscreen PMIC
---
Changes in v6:
- refactor: s/starqltechn/sdm845-starqltechn in subject
- refactor: 'i' < 'm', so put tlmm i2c node before motor*
Changes in v5:
- simplify regulator names
- remove single buck index
--- arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+)
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +77 -0
@@ -39,6 +39,9 @@ framebuffer: framebuffer@9d400000 { height = <2960>; stride = <(1440 * 4)>; format = "a8r8g8b8"; + vci-supply = <&s2dos05_ldo4>; + vddr-supply = <&s2dos05_buck>; + vdd3-supply = <&s2dos05_ldo1>; }; };
@@ -101,6 +104,66 @@ key-wink { }; }; + i2c21 { + compatible = "i2c-gpio"; + sda-gpios = <&tlmm 127 GPIO_ACTIVE_HIGH>; + scl-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>; + i2c-gpio,delay-us = <2>; + pinctrl-0 = <&i2c21_sda_state &i2c21_scl_state>; + pinctrl-names = "default"; + #address-cells = <1>; + #size-cells = <0>; + + pmic@60 { + compatible = "samsung,s2dos05"; + reg = <0x60>; + + regulators { + s2dos05_ldo1: ldo1 { + regulator-active-discharge = <1>; + regulator-enable-ramp-delay = <12000>; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <2000000>; + regulator-name = "ldo1"; + }; + + s2dos05_ldo2: ldo2 { + regulator-active-discharge = <1>; + regulator-boot-on; + regulator-enable-ramp-delay = <12000>; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "ldo2"; + }; + + s2dos05_ldo3: ldo3 { + regulator-active-discharge = <1>; + regulator-boot-on; + regulator-enable-ramp-delay = <12000>; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "ldo3"; + }; + + s2dos05_ldo4: ldo4 { + regulator-active-discharge = <1>; + regulator-enable-ramp-delay = <12000>; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <3775000>; + regulator-name = "ldo4"; + }; + + s2dos05_buck: buck { + regulator-active-discharge = <1>; + regulator-enable-ramp-delay = <12000>; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <2100000>; + regulator-name = "buck"; + }; + }; + }; + }; + vib_regulator: gpio-regulator { compatible = "regulator-fixed"; regulator-name = "haptic";
@@ -544,6 +607,20 @@ &tlmm { gpio-reserved-ranges = <27 4>, /* SPI (eSE - embedded Secure Element) */ <85 4>; /* SPI (fingerprint reader) */ + i2c21_sda_state: i2c21-sda-state { + pins = "gpio127"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + i2c21_scl_state: i2c21-scl-state { + pins = "gpio128"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + motor_pwm_default_state: motor-pwm-active-state { pins = "gpio57"; function = "gcc_gp1";
Signature · 1 line
2.39.2
PATCH v6 9/12 arm64: dts: qcom: sdm845-starqltechn: add touchscreen support
In reply to Dzmitry SankouskiAdd support for samsung,s6sy761 touchscreen.
---
Changes in v6:
- refactor: s/starqltechn/sdm845-starqltechn in subject
--- arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +28 -0
@@ -561,6 +561,23 @@ &sdhc_2 { status = "okay"; }; +&i2c11 { + clock-frequency = <400000>; + status = "okay"; + + touchscreen@48 { + compatible = "samsung,s6sy761"; + reg = <0x48>; + interrupt-parent = <&tlmm>; + interrupts = <120 IRQ_TYPE_LEVEL_HIGH>; + vdd-supply = <&s2dos05_ldo2>; + avdd-supply = <&s2dos05_ldo3>; + + pinctrl-0 = <&touch_irq_state>; + pinctrl-names = "default"; + }; +}; + &usb_1 { status = "okay"; };
@@ -665,4 +682,15 @@ sd_card_det_n_state: sd-card-det-n-state { function = "gpio"; bias-pull-up; }; + + touch_irq_state: touch-irq-state { + pins = "gpio120"; + function = "gpio"; + bias-disable; + }; +}; + +&qup_i2c11_default { + drive-strength = <2>; + bias-disable; };
Signature · 1 line
2.39.2
PATCH v6 10/12 arm64: dts: qcom: sdm845-starqltechn: add initial sound support
In reply to Dzmitry SankouskiAdd support for sound (headphones and mics only)
Also redefine slpi reserved memory, because adsp_mem overlaps with slpi_mem inherited from sdm845.dtsi.
---
Changes in v6:
- refactor: s/starqltechn/sdm845-starqltechn in subject.
--- arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 213 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 213 insertions(+)
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +213 -0
@@ -10,8 +10,15 @@ #include <dt-bindings/input/linux-event-codes.h> #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/regulator/qcom,rpmh-regulator.h> +#include <dt-bindings/sound/qcom,q6afe.h> +#include <dt-bindings/sound/qcom,q6asm.h> + #include "sdm845.dtsi" #include "pm8998.dtsi" +#include "sdm845-wcd9340.dtsi" + +/delete-node/ &adsp_mem; +/delete-node/ &slpi_mem; / { chassis-type = "handset";
@@ -83,6 +90,16 @@ memory@a1300000 { ftrace-size = <0x40000>; pmsg-size = <0x40000>; }; + + slpi_mem: slpi@96700000 { + reg = <0 0x96700000 0 0xf00000>; + no-map; + }; + + adsp_mem: memory@97800000 { + reg = <0 0x97800000 0 0x2000000>; + no-map; + }; }; gpio_keys {
@@ -578,6 +595,202 @@ touchscreen@48 { }; }; +&adsp_pas { + firmware-name = "qcom/sdm845/starqltechn/adsp.mbn"; + status = "okay"; +}; + +&lpasscc { + status = "okay"; +}; + +&wcd9340 { + reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>; + vdd-buck-supply = <&vreg_s4a_1p8>; + vdd-buck-sido-supply = <&vreg_s4a_1p8>; + vdd-tx-supply = <&vreg_s4a_1p8>; + vdd-rx-supply = <&vreg_s4a_1p8>; + vdd-io-supply = <&vreg_s4a_1p8>; + qcom,micbias1-microvolt = <1800000>; + qcom,micbias2-microvolt = <2700000>; + qcom,micbias3-microvolt = <1800000>; + qcom,micbias4-microvolt = <1800000>; +}; + +&sound { + compatible = "qcom,sdm845-sndcard"; + model = "Samsung Galaxy S9"; + pinctrl-0 = <&quat_mi2s_active &quat_mi2s_sd0_active &quat_mi2s_sd1_active>; + pinctrl-names = "default"; + status = "okay"; + + audio-routing = "RX_BIAS", "MCLK", + "AMIC2", "MIC BIAS2", /* Headset Mic */ + "AMIC3", "MIC BIAS2", /* FMLeft Tx */ + "AMIC4", "MIC BIAS2", /* FMRight Tx */ + "DMIC0", "MIC BIAS1", /* Digital Mic0 */ + "DMIC5", "MIC BIAS4", /* Digital Mic1 */ + "DMIC4", "MIC BIAS4", /* Digital Mic2 */ + "DMIC3", "MIC BIAS3", /* Digital Mic3 */ + "DMIC2", "MIC BIAS3", /* Digital Mic4 */ + "DMIC1", "MIC BIAS1"; /* Digital Mic5 */ + + mm1-dai-link { + link-name = "MultiMedia1"; + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>; + }; + }; + + mm2-dai-link { + link-name = "MultiMedia2"; + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>; + }; + }; + + mm3-dai-link { + link-name = "MultiMedia3"; + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>; + }; + }; + + mm4-dai-link { + link-name = "MultiMedia4"; + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA4>; + }; + }; + + mm5-dai-link { + link-name = "MultiMedia5"; + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA5>; + }; + }; + + mm6-dai-link { + link-name = "MultiMedia6"; + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA6>; + }; + }; + + slim-dai-link { + link-name = "SLIM Playback 1"; + cpu { + sound-dai = <&q6afedai SLIMBUS_0_RX>; + }; + + platform { + sound-dai = <&q6routing>; + }; + + codec { + sound-dai = <&wcd9340 0>; + }; + }; + + slimcap-dai-link { + link-name = "SLIM Capture 1"; + cpu { + sound-dai = <&q6afedai SLIMBUS_0_TX>; + }; + + platform { + sound-dai = <&q6routing>; + }; + + codec { + sound-dai = <&wcd9340 1>; + }; + }; + + slim2-dai-link { + link-name = "SLIM Playback 2"; + cpu { + sound-dai = <&q6afedai SLIMBUS_1_RX>; + }; + + platform { + sound-dai = <&q6routing>; + }; + + codec { + sound-dai = <&wcd9340 2>; /* AIF2_PB */ + }; + }; + + slimcap2-dai-link { + link-name = "SLIM Capture 2"; + cpu { + sound-dai = <&q6afedai SLIMBUS_1_TX>; + }; + + platform { + sound-dai = <&q6routing>; + }; + + codec { + sound-dai = <&wcd9340 3>; /* AIF2_CAP */ + }; + }; + + slimcap3-dai-link { + link-name = "SLIM Capture 3"; + cpu { + sound-dai = <&q6afedai SLIMBUS_2_TX>; + }; + + platform { + sound-dai = <&q6routing>; + }; + + codec { + sound-dai = <&wcd9340 5>; /* AIF3_CAP */ + }; + }; +}; + +&q6afedai { + dai@22 { + reg = <22>; + qcom,sd-lines = <1>; + }; + + dai@23 { + reg = <23>; + qcom,sd-lines = <0>; + }; +}; + +&q6asmdai { + dai@0 { + reg = <0>; + }; + + dai@1 { + reg = <1>; + }; + + dai@2 { + reg = <2>; + }; + + dai@3 { + reg = <3>; + }; + + dai@4 { + reg = <4>; + }; + + dai@5 { + reg = <5>; + }; +}; + &usb_1 { status = "okay"; };
Signature · 1 line
2.39.2
PATCH v6 11/12 arm64: dts: qcom: sdm845-starqltechn: add graphics support
In reply to Dzmitry SankouskiAdd support for gpu and panel.
---
Changes for v6:
- refactor: s/starqltechn/sdm845-starqltechn in subject
- refactor: remove 'sde' prefix in tlmm dsi nodes
- refactor: place tlmm dsi nodes alphabetically
Changes for v5:
- fix label names
--- arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+)
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +67 -0
@@ -203,6 +203,52 @@ vib_pwm: pwm { }; }; +&gpu { + status = "okay"; + + zap-shader { + memory-region = <&gpu_mem>; + firmware-name = "qcom/sdm845/starqltechn/a630_zap.mbn"; + }; +}; + +&mdss { + status = "okay"; +}; + +&mdss_dsi0 { + vdda-supply = <&vreg_l26a_1p2>; + status = "okay"; + + panel@0 { + compatible = "samsung,s6e3ha8"; + reg = <0>; + vci-supply = <&s2dos05_ldo4>; + vddr-supply = <&s2dos05_buck>; + vdd3-supply = <&s2dos05_ldo1>; + te-gpios = <&tlmm 10 GPIO_ACTIVE_HIGH>; + reset-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>; + pinctrl-0 = <&dsi_default &dsi_te>; + pinctrl-1 = <&dsi_suspend &dsi_te>; + pinctrl-names = "default", "suspend"; + + port { + panel_in: endpoint { + remote-endpoint = <&mdss_dsi0_out>; + }; + }; + }; +}; + +&mdss_dsi0_out { + data-lanes = <0 1 2 3>; + remote-endpoint = <&panel_in>; +}; + +&mdss_dsi0_phy { + vdds-supply = <&vdda_mipi_dsi0_pll>; + status = "okay"; +}; &apps_rsc { regulators-0 {
@@ -837,6 +883,27 @@ &tlmm { gpio-reserved-ranges = <27 4>, /* SPI (eSE - embedded Secure Element) */ <85 4>; /* SPI (fingerprint reader) */ + dsi_default: dsi-default-state { + pins = "gpio6"; + function = "gpio"; + drive-strength = <8>; + bias-disable; + }; + + dsi_suspend: dsi-suspend-state { + pins = "gpio6"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + + dsi_te: dsi-te-state { + pins = "gpio10"; + function = "mdp_vsync"; + drive-strength = <2>; + bias-pull-down; + }; + i2c21_sda_state: i2c21-sda-state { pins = "gpio127"; function = "gpio";
Signature · 1 line
2.39.2
PATCH v6 12/12 arm64: dts: qcom: sdm845-starqltechn: add modem support
In reply to Dzmitry SankouskiAdd support for modem and ipa(IP Accelerator).
Add spss reserved memory node.
---
Changes in v6:
- refactor: s/starqltechn/sdm845-starqltechn in subject.
--- arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+)
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +39 -0
@@ -17,6 +17,8 @@ #include "pm8998.dtsi" #include "sdm845-wcd9340.dtsi" +/delete-node/ &rmtfs_mem; +/delete-node/ &spss_mem; /delete-node/ &adsp_mem; /delete-node/ &slpi_mem;
@@ -91,15 +93,39 @@ memory@a1300000 { pmsg-size = <0x40000>; }; + /* + * It seems like reserving the old rmtfs_mem region is also needed to prevent + * random crashes which are most likely modem related, more testing needed. + */ + removed_region: removed-region@88f00000 { + reg = <0 0x88f00000 0 0x1c00000>; + no-map; + }; + slpi_mem: slpi@96700000 { reg = <0 0x96700000 0 0xf00000>; no-map; }; + spss_mem: spss@97700000 { + reg = <0 0x97700000 0 0x100000>; + no-map; + }; + adsp_mem: memory@97800000 { reg = <0 0x97800000 0 0x2000000>; no-map; }; + + rmtfs_mem: rmtfs-mem@fde00000 { + compatible = "qcom,rmtfs-mem"; + reg = <0 0xfde00000 0 0x202000>; + qcom,use-guard-pages; + no-map; + + qcom,client-id = <1>; + qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>; + }; }; gpio_keys {
@@ -837,6 +863,19 @@ dai@5 { }; }; +&mss_pil { + firmware-name = "qcom/sdm845/starqltechn/mba.mbn", + "qcom/sdm845/starqltechn/modem.mbn"; + status = "okay"; +}; + +&ipa { + qcom,gsi-loader = "self"; + memory-region = <&ipa_fw_mem>; + firmware-name = "qcom/sdm845/starqltechn/ipa_fws.mbn"; + status = "okay"; +}; + &usb_1 { status = "okay"; };
Signature · 1 line
2.39.2
Re: [PATCH v6 01/12] arm64: dts: qcom: sdm845: enable gmu
In reply to Dzmitry SankouskiQuoted 5 lines · Dzmitry Sankouski
Leave gmu enabled, because it's only probed when
GPU is.Signed-off-by Dzmitry Sankouski <[email protected]>---
Konrad
Re: [PATCH v6 05/12] arm64: dts: qcom: sdm845-starqltechn: remove excess reserved gpios
In reply to Dzmitry SankouskiQuoted 9 lines · Dzmitry Sankouski
Starqltechn has 2 reserved gpio ranges <27 4>, <85 4>. <27 4> is spi for eSE(embedded Secure Element). <85 4> is spi for fingerprint.
Remove excess reserved gpio regions.
Fixes d711b22eee55 ("arm64: dts: qcom: starqltechn: add initial device tree for starqltechn")Signed-off-by Dzmitry Sankouski <[email protected]>
Konrad
Re: [PATCH v6 12/12] arm64: dts: qcom: sdm845-starqltechn: add modem support
In reply to Dzmitry SankouskiQuoted 6 lines · Dzmitry Sankouski
Add support for modem and ipa(IP Accelerator).
Add spss reserved memory node.Signed-off-by Dzmitry Sankouski <[email protected]>---
Konrad
Re: [PATCH v6 10/12] arm64: dts: qcom: sdm845-starqltechn: add initial sound support
In reply to Dzmitry SankouskiQuoted 7 lines · Dzmitry Sankouski
Add support for sound (headphones and mics only)
Also redefine slpi reserved memory, becauseadsp_memoverlaps withslpi_meminherited fromsdm845.dtsi.Signed-off-by Dzmitry Sankouski <[email protected]>---
[...]
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts touchscreen@48 { · line 622
Quoted 3 lines
+&sound {
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +2
-0+ compatible = "qcom,sdm845-sndcard"; + model = "Samsung Galaxy S9";
Are spaces cool with userspace?
Quoted 8 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +8
-0+ pinctrl-0 = <&quat_mi2s_active &quat_mi2s_sd0_active &quat_mi2s_sd1_active>; + pinctrl-names = "default"; + status = "okay"; + + audio-routing = "RX_BIAS", "MCLK", + "AMIC2", "MIC BIAS2", /* Headset Mic */ + "AMIC3", "MIC BIAS2", /* FMLeft Tx */ + "AMIC4", "MIC BIAS2", /* FMRight Tx */
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts touchscreen@48 { · line 640
Quoted 10 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +10
-0+ "DMIC0", "MIC BIAS1", /* Digital Mic0 */ + "DMIC5", "MIC BIAS4", /* Digital Mic1 */ + "DMIC4", "MIC BIAS4", /* Digital Mic2 */ + "DMIC3", "MIC BIAS3", /* Digital Mic3 */ + "DMIC2", "MIC BIAS3", /* Digital Mic4 */ + "DMIC1", "MIC BIAS1"; /* Digital Mic5 */ + + mm1-dai-link { + link-name = "MultiMedia1"; + cpu {
Please add a newline before subnodes
[...]
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts touchscreen@48 { · line 721
Quoted 3 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +3
-0+ + codec { + sound-dai = <&wcd9340 2>; /* AIF2_PB */
It would be nice to create a binding for wcd9340, like include/dt-bindings/sound/qcom,wcd9335.h
Konrad
Re: [PATCH v6 07/12] arm64: dts: qcom: sdm845-starqltechn: add max77705 PMIC
In reply to Dzmitry SankouskiQuoted 5 lines · Dzmitry Sankouski
Add support for max77705 MFD device. Supported sub-devices:
charger, fuelgauge, haptic, ledSigned-off-by Dzmitry Sankouski <[email protected]>---
[...]
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts key-wink { · line 112
Quoted 9 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +9
-0+ vib_regulator: gpio-regulator { + compatible = "regulator-fixed"; + regulator-name = "haptic"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + enable-active-high; + gpio = <&pm8998_gpios 18 GPIO_ACTIVE_HIGH>; + };
Please try to match the property order in the newest DTs, e.g. vreg_wwan in x1e80100-crd.dts
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts key-wink { · line 117
Quoted 5 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +5
-0+ + vib_pwm: pwm { + compatible = "clk-pwm"; + #pwm-cells = <2>; + assigned-clock-parents = <&rpmhcc RPMH_CXO_CLK>;
Don't you want to set assigned-clock-rates instead?
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts key-wink { · line 124
Quoted 7 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +6
-0+ assigned-clocks = <&gcc GCC_GP1_CLK_SRC>; + clocks = <&gcc GCC_GP1_CLK>; + pinctrl-0 = <&motor_pwm_default_state>; + pinctrl-1 = <&motor_pwm_suspend_state>; + pinctrl-names = "default", "suspend"; + }; };
Looks good otherwise
Konrad
Re: [PATCH v6 06/12] arm64: dts: qcom: sdm845-starqltechn: add gpio keys
In reply to Dzmitry SankouskiQuoted 28 lines · Dzmitry Sankouski
Add support for phone buttons.
Signed-off-by Dzmitry Sankouski <[email protected]>---
Changes in v6:
- refactor: s/starqltechn/sdm845-starqltechn in subject.--- arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+)arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +2
-0@@ -7,9 +7,11 @@ /dts-v1/; +#include <dt-bindings/input/linux-event-codes.h> #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/regulator/qcom,rpmh-regulator.h> #include "sdm845.dtsi" +#include "pm8998.dtsi" / { chassis-type = "handset";
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts memory@a1300000 { · line 75
Quoted 5 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +2
-0@@ -69,6 +71,25 @@ memory@a1300000 { pmsg-size = <0x40000>; }; }; + + gpio_keys {
Node names must not contain underscores, use '-' instead
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts memory@a1300000 { · line 80
Quoted 5 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +5
-0+ compatible = "gpio-keys"; + autorepeat; + + key-vol-up { + label = "volume_up";
This is passed on to userspace, many DTs use a less programmer-y style, like "Volume Up"
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts memory@a1300000 { · line 87
Quoted 7 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +7
-0+ gpios = <&pm8998_gpios 6 GPIO_ACTIVE_LOW>; + linux,code = <KEY_VOLUMEUP>; + debounce-interval = <15>; + }; + + key-wink { + label = "key_wink";
What's this key? Bixby?
Konrad
Re: [PATCH v6 03/12] arm64: dts: qcom: sdm845-starqltechn: fix usb regulator mistake
In reply to Dzmitry SankouskiQuoted 7 lines · Dzmitry Sankouski
Usb regulator was wrongly pointed to
vreg_l1a_0p875. However, on starqltechn it's powered fromvreg_l5a_0p8.Fixes d711b22eee55 ("arm64: dts: qcom: starqltechn: add initial device tree for starqltechn")Signed-off-by Dzmitry Sankouski <[email protected]>---
I really really doubt that the supplies for on-SoC PHYs were altered, given these regulators are assigned based on their specific characteristics
Konrad
Re: [PATCH v6 08/12] arm64: dts: qcom: sdm845-starqltechn: add display PMIC
In reply to Dzmitry SankouskiQuoted 7 lines · Dzmitry Sankouski
Add support for s2dos05 display / touchscreen PMIC
Signed-off-by Dzmitry Sankouski <[email protected]>---
Changes in v6:
- refactor: s/starqltechn/sdm845-starqltechn in subject
- refactor: 'i' < 'm', so put tlmm i2c node before motor*
Now you have 'i'2c21 before 'g'pio-regulator :/
Quoted 5 lines
Changes in v5:
- simplify regulator names
- remove single buck index
---
[...]
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts key-wink { · line 108
Quoted 3 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +2
-0+ i2c21 { + compatible = "i2c-gpio";
I'm not sure this has been asked before - is the GENI SE for I2C21 disabled? Or are there reasons to use i2c-gpio instead?
Konrad
Re: [PATCH v6 07/12] arm64: dts: qcom: sdm845-starqltechn: add max77705 PMIC
In reply to Konrad Dybcioсб, 26 окт. 2024 г. в 13:36, Konrad Dybcio <[email protected]>:
Quoted 8 lines · Dzmitry Sankouski
Quoted 5 lines
Add support for max77705 MFD device. Supported sub-devices:
charger, fuelgauge, haptic, ledSigned-off-by Dzmitry Sankouski <[email protected]>---
Quoted 8 lines
[...]
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts key-wink { · line 117
Quoted 5 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +5
-0+ + vib_pwm: pwm { + compatible = "clk-pwm"; + #pwm-cells = <2>; + assigned-clock-parents = <&rpmhcc RPMH_CXO_CLK>;Don't you want to set assigned-clock-rates instead?
assigned-clock-rates would set GCC_GP1_CLK_SRC rate, and automatically select the proper parent clock best suited for rate.
However, as per discussion in
https://patchwork.kernel.org/project/linux-samsung-soc/patch/20240618-starqltechn_integration_upstream-v3-2-e3f6662017ac@gmail.com
the old approach with additional freq_tbl entries was criticised. New approach, introduced in
https://lore.kernel.org/all/20241007-starqltechn_integration_upstream-v6-0-dd75c06c708d@gmail.com/
automatically calculates m/n/d values for GP clock, but it cannot select best suited parent - it's user responsibility.
Quoted 9 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts key-wink { · line 124
Quoted 8 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +6
-0+ assigned-clocks = <&gcc GCC_GP1_CLK_SRC>; + clocks = <&gcc GCC_GP1_CLK>; + pinctrl-0 = <&motor_pwm_default_state>; + pinctrl-1 = <&motor_pwm_suspend_state>; + pinctrl-names = "default", "suspend"; + }; };
Quoted 3 lines
Looks good otherwise
Konrad
--
Best regards and thanks for review,
Dzmitry
Re: [PATCH v6 06/12] arm64: dts: qcom: sdm845-starqltechn: add gpio keys
In reply to Konrad Dybcioсб, 26 окт. 2024 г. в 13:38, Konrad Dybcio <[email protected]>:
Quoted 7 lines · Dzmitry Sankouski
Quoted 5 lines
Add support for phone buttons.
Signed-off-by Dzmitry Sankouski <[email protected]>---
(...)
Quoted 9 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts memory@a1300000 { · line 87
Quoted 7 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +7
-0+ gpios = <&pm8998_gpios 6 GPIO_ACTIVE_LOW>; + linux,code = <KEY_VOLUMEUP>; + debounce-interval = <15>; + }; + + key-wink { + label = "key_wink";What's this key? Bixby?
Yes, I'll rename to 'Bixby'
Quoted 2 lines
Konrad
Signature · 2 lines
Best regards and thanks for review, Dzmitry
Re: [PATCH v6 10/12] arm64: dts: qcom: sdm845-starqltechn: add initial sound support
In reply to Konrad Dybcioсб, 26 окт. 2024 г. в 13:32, Konrad Dybcio <[email protected]>:
Quoted 10 lines · Dzmitry Sankouski
Quoted 7 lines
Add support for sound (headphones and mics only)
Also redefine slpi reserved memory, becauseadsp_memoverlaps withslpi_meminherited fromsdm845.dtsi.Signed-off-by Dzmitry Sankouski <[email protected]>---
Quoted 7 lines
[...]
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts touchscreen@48 { · line 622
Quoted 3 lines
+&sound {
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +2
-0+ compatible = "qcom,sdm845-sndcard"; + model = "Samsung Galaxy S9";Are spaces cool with userspace?
Yes. Oneplus enchilada is the same.
Signature · 2 lines
Best regards and thanks for review, Dzmitry
Re: [PATCH v6 08/12] arm64: dts: qcom: sdm845-starqltechn: add display PMIC
In reply to Konrad Dybcioпн, 4 нояб. 2024 г. в 17:15, Konrad Dybcio <[email protected]>:
Quoted 11 lines · Dzmitry Sankouski
Quoted 7 lines
Add support for s2dos05 display / touchscreen PMIC
Signed-off-by Dzmitry Sankouski <[email protected]>---
Changes in v6:
- refactor: s/starqltechn/sdm845-starqltechn in subject
- refactor: 'i' < 'm', so put tlmm i2c node before motor*Now you have 'i'2c21 before 'g'pio-regulator :/
That refactor was about tlmm inner nodes. For soc nodes
rule nodes of the same type can be grouped together should apply I guess. I think I should move it to regulators.
Quoted 9 lines
[...]
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts key-wink { · line 108
Quoted 3 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +2
-0+ i2c21 { + compatible = "i2c-gpio";I'm not sure this has been asked before - is the GENI SE for I2C21 disabled? Or are there reasons to use i2c-gpio instead?
I2c21 is wired on pins 127, 128, and those pins don't have a GENI SE function.
--
Best regards and thanks for review,
Dzmitry
Re: [PATCH v6 08/12] arm64: dts: qcom: sdm845-starqltechn: add display PMIC
In reply to Konrad Dybcioпн, 4 нояб. 2024 г. в 17:15, Konrad Dybcio <[email protected]>:
Quoted 12 lines · Dzmitry Sankouski
Quoted 7 lines
Add support for s2dos05 display / touchscreen PMIC
Signed-off-by Dzmitry Sankouski <[email protected]>---
Changes in v6:
- refactor: s/starqltechn/sdm845-starqltechn in subject
- refactor: 'i' < 'm', so put tlmm i2c node before motor*Now you have 'i'2c21 before 'g'pio-regulator :/
WIll move i2c21 node before gpio-keys, too
--
Best regards and thanks for review,
Dzmitry
Re: [PATCH v6 03/12] arm64: dts: qcom: sdm845-starqltechn: fix usb regulator mistake
In reply to Konrad Dybcioсб, 26 окт. 2024 г. в 13:41, Konrad Dybcio <[email protected]>:
Quoted 13 lines · Dzmitry Sankouski
Quoted 7 lines
Usb regulator was wrongly pointed to
vreg_l1a_0p875. However, on starqltechn it's powered fromvreg_l5a_0p8.Fixes d711b22eee55 ("arm64: dts: qcom: starqltechn: add initial device tree for starqltechn")Signed-off-by Dzmitry Sankouski <[email protected]>---
I really really doubt that the supplies for on-SoC PHYs were altered, given these regulators are assigned based on their specific characteristics
From rooted android system from klabit87 on starqltechn:
``` starqltechn:/ # cat /proc/cpuinfo | grep Hardware Hardware : Qualcomm Technologies, Inc SDM845 starqltechn:/ # uname -a Linux localhost 4.9.186-klabitV6.5 #1 SMP PREEMPT Thu Dec 10 19:42:53 CST 2020 aarch64 starqltechn:/ # cat /sys/kernel/debug/regulator/soc:rpmh-regulator-ldoa1-pm8998_l1/consumers Device-Supply EN Min_uV Max_uV load_uA ae90000.qcom,dp_display-vdda-0p9 N 880000 880000 0 1d87000.ufsphy_mem-vdda-phy Y 880000 880000 62900 ae96400.qcom,mdss_dsi_phy0-vdda-0p9 N 0 0 0 ae94400.qcom,mdss_dsi_phy0-vdda-0p9 Y 880000 880000 36000 1c00000.qcom,pcie-vreg-0.9 Y 880000 880000 24000 pm8998_l1 N 0 0 0 starqltechn:/ # cat /sys/kernel/debug/regulator/soc:rpmh-regulator-ldoa5-pm8998_l5/consumers Device-Supply EN Min_uV Max_uV load_uA ae90000.qcom,dp_display-vdda-usb1-ss-core N 0 0 0 88e2000.qusb-vdd Y 800000 800000 0 88e8000.ssphy-vdd Y 800000 800000 0 pm8998_l5 N 0 0 0 ```
I also downloaded kernel source from Samsung, to check its dts, and it also powers qusb@88e2000 and ssphy@88e8000 from 'pm8998_l5' regulator.
Signature · 2 lines
Best regards and thanks for review, Dzmitry
Re: [PATCH v6 08/12] arm64: dts: qcom: sdm845-starqltechn: add display PMIC
In reply to Dzmitry SankouskiQuoted 20 lines · Dzmitry Sankouski
пн, 4 нояб. 2024 г. в 17:15, Konrad Dybcio <[email protected]>:
Quoted 11 lines · Dzmitry Sankouski
Quoted 7 lines
Add support for s2dos05 display / touchscreen PMIC
Signed-off-by Dzmitry Sankouski <[email protected]>---
Changes in v6:
- refactor: s/starqltechn/sdm845-starqltechn in subject
- refactor: 'i' < 'm', so put tlmm i2c node before motor*Now you have 'i'2c21 before 'g'pio-regulator :/
That refactor was about tlmm inner nodes. For soc nodes
rulenodes of the same type can be grouped togethershould apply I guess. I think I should move it to regulators.Quoted 3 lines
[...]
Quoted 1 line
Quoted 8 lines
Quoted 6 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts key-wink { · line 108
Quoted 2 lines
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +2
-0+ i2c21 { + compatible = "i2c-gpio";I'm not sure this has been asked before - is the GENI SE for I2C21 disabled? Or are there reasons to use i2c-gpio instead?
I2c21 is wired on pins 127, 128, and those pins don't have a GENI SE function.
Right, I was able to confirm that's the case in general, not only in the Linux pinctrl driver
Konrad
Re: [PATCH v6 03/12] arm64: dts: qcom: sdm845-starqltechn: fix usb regulator mistake
In reply to Dzmitry SankouskiQuoted 41 lines · Dzmitry Sankouski
сб, 26 окт. 2024 г. в 13:41, Konrad Dybcio <[email protected]>:
Quoted 13 lines · Dzmitry Sankouski
Quoted 7 lines
Usb regulator was wrongly pointed to
vreg_l1a_0p875. However, on starqltechn it's powered fromvreg_l5a_0p8.Fixes d711b22eee55 ("arm64: dts: qcom: starqltechn: add initial device tree for starqltechn")Signed-off-by Dzmitry Sankouski <[email protected]>---
I really really doubt that the supplies for on-SoC PHYs were altered, given these regulators are assigned based on their specific characteristics
From rooted android system from klabit87 on starqltechn:
``` starqltechn:/ # cat /proc/cpuinfo | grep Hardware Hardware : Qualcomm Technologies, Inc SDM845 starqltechn:/ # uname -a Linux localhost 4.9.186-klabitV6.5 #1 SMP PREEMPT Thu Dec 10 19:42:53 CST 2020 aarch64 starqltechn:/ # cat /sys/kernel/debug/regulator/soc:rpmh-regulator-ldoa1-pm8998_l1/consumers Device-Supply EN Min_uV Max_uV load_uA ae90000.qcom,dp_display-vdda-0p9 N 880000 880000 0 1d87000.ufsphy_mem-vdda-phy Y 880000 880000 62900 ae96400.qcom,mdss_dsi_phy0-vdda-0p9 N 0 0 0 ae94400.qcom,mdss_dsi_phy0-vdda-0p9 Y 880000 880000 36000 1c00000.qcom,pcie-vreg-0.9 Y 880000 880000 24000 pm8998_l1 N 0 0 0 starqltechn:/ # cat /sys/kernel/debug/regulator/soc:rpmh-regulator-ldoa5-pm8998_l5/consumers Device-Supply EN Min_uV Max_uV load_uA ae90000.qcom,dp_display-vdda-usb1-ss-core N 0 0 0 88e2000.qusb-vdd Y 800000 800000 0 88e8000.ssphy-vdd Y 800000 800000 0 pm8998_l5 N 0 0 0 ```
Quoted 2 lines
I also downloaded kernel source from Samsung, to check its dts, and it also powers qusb@88e2000 and ssphy@88e8000 from '
pm8998_l5' regulator.
Interesting.. could you try to forcefully shut down L5A (I doubt you'll be able to do so with L1A given it powers so much digital logic), or set its regulator-min&max-microvolt to a way-too-low voltage (vmin seems to be 312000)?
You should then be able to tell fairly easily, depending on whether usb2 still works after a replug
Konrad
Re: [PATCH v6 03/12] arm64: dts: qcom: sdm845-starqltechn: fix usb regulator mistake
пн, 2 дек. 2024 г. в 18:09, Konrad Dybcio <[email protected]>:
Quoted 46 lines · Dzmitry Sankouski
Quoted 41 lines
сб, 26 окт. 2024 г. в 13:41, Konrad Dybcio <[email protected]>:
Quoted 13 lines · Dzmitry Sankouski
Quoted 7 lines
Usb regulator was wrongly pointed to
vreg_l1a_0p875. However, on starqltechn it's powered fromvreg_l5a_0p8.Fixes d711b22eee55 ("arm64: dts: qcom: starqltechn: add initial device tree for starqltechn")Signed-off-by Dzmitry Sankouski <[email protected]>---
I really really doubt that the supplies for on-SoC PHYs were altered, given these regulators are assigned based on their specific characteristics
From rooted android system from klabit87 on starqltechn:
``` starqltechn:/ # cat /proc/cpuinfo | grep Hardware Hardware : Qualcomm Technologies, Inc SDM845 starqltechn:/ # uname -a Linux localhost 4.9.186-klabitV6.5 #1 SMP PREEMPT Thu Dec 10 19:42:53 CST 2020 aarch64 starqltechn:/ # cat /sys/kernel/debug/regulator/soc:rpmh-regulator-ldoa1-pm8998_l1/consumers Device-Supply EN Min_uV Max_uV load_uA ae90000.qcom,dp_display-vdda-0p9 N 880000 880000 0 1d87000.ufsphy_mem-vdda-phy Y 880000 880000 62900 ae96400.qcom,mdss_dsi_phy0-vdda-0p9 N 0 0 0 ae94400.qcom,mdss_dsi_phy0-vdda-0p9 Y 880000 880000 36000 1c00000.qcom,pcie-vreg-0.9 Y 880000 880000 24000 pm8998_l1 N 0 0 0 starqltechn:/ # cat /sys/kernel/debug/regulator/soc:rpmh-regulator-ldoa5-pm8998_l5/consumers Device-Supply EN Min_uV Max_uV load_uA ae90000.qcom,dp_display-vdda-usb1-ss-core N 0 0 0 88e2000.qusb-vdd Y 800000 800000 0 88e8000.ssphy-vdd Y 800000 800000 0 pm8998_l5 N 0 0 0 ```Quoted 2 lines
I also downloaded kernel source from Samsung, to check its dts, and it also powers qusb@88e2000 and ssphy@88e8000 from '
pm8998_l5' regulator.
Quoted 8 lines
Interesting.. could you try to forcefully shut down L5A (I doubt you'll be able to do so with L1A given it powers so much digital logic), or set its regulator-min&max-microvolt to a way-too-low voltage (vmin seems to be 312000)?
You should then be able to tell fairly easily, depending on whether usb2 still works after a replug
Usb doesn't worked in such experiment:
Here's the log:
``` [ 3.541733] ldo5: Setting 312000-312000uV ...... [ 3.808224] dwc3 a600000.usb: Adding to iommu group 5 [ 3.823116] qcom-qmp-combo-phy 88e8000.phy: phy initialization timed-out [ 3.824323] phy phy-88e8000.phy.0: phy init failed --> -110 [ 3.825916] dwc3 a600000.usb: error -ETIMEDOUT: failed to initialize core [ 3.827208] dwc3 a600000.usb: probe with driver dwc3 failed with error -110 [ 3.828548] probe of a600000.usb returned 110 after 20399 usecs ```
Re: [PATCH v6 03/12] arm64: dts: qcom: sdm845-starqltechn: fix usb regulator mistake
Quoted 59 lines · Dzmitry Sankouski
пн, 2 дек. 2024 г. в 18:09, Konrad Dybcio <[email protected]>:
Quoted 46 lines · Dzmitry Sankouski
Quoted 41 lines
сб, 26 окт. 2024 г. в 13:41, Konrad Dybcio <[email protected]>:
Quoted 13 lines · Dzmitry Sankouski
Quoted 7 lines
Usb regulator was wrongly pointed to
vreg_l1a_0p875. However, on starqltechn it's powered fromvreg_l5a_0p8.Fixes d711b22eee55 ("arm64: dts: qcom: starqltechn: add initial device tree for starqltechn")Signed-off-by Dzmitry Sankouski <[email protected]>---
I really really doubt that the supplies for on-SoC PHYs were altered, given these regulators are assigned based on their specific characteristics
From rooted android system from klabit87 on starqltechn:
``` starqltechn:/ # cat /proc/cpuinfo | grep Hardware Hardware : Qualcomm Technologies, Inc SDM845 starqltechn:/ # uname -a Linux localhost 4.9.186-klabitV6.5 #1 SMP PREEMPT Thu Dec 10 19:42:53 CST 2020 aarch64 starqltechn:/ # cat /sys/kernel/debug/regulator/soc:rpmh-regulator-ldoa1-pm8998_l1/consumers Device-Supply EN Min_uV Max_uV load_uA ae90000.qcom,dp_display-vdda-0p9 N 880000 880000 0 1d87000.ufsphy_mem-vdda-phy Y 880000 880000 62900 ae96400.qcom,mdss_dsi_phy0-vdda-0p9 N 0 0 0 ae94400.qcom,mdss_dsi_phy0-vdda-0p9 Y 880000 880000 36000 1c00000.qcom,pcie-vreg-0.9 Y 880000 880000 24000 pm8998_l1 N 0 0 0 starqltechn:/ # cat /sys/kernel/debug/regulator/soc:rpmh-regulator-ldoa5-pm8998_l5/consumers Device-Supply EN Min_uV Max_uV load_uA ae90000.qcom,dp_display-vdda-usb1-ss-core N 0 0 0 88e2000.qusb-vdd Y 800000 800000 0 88e8000.ssphy-vdd Y 800000 800000 0 pm8998_l5 N 0 0 0 ```Quoted 2 lines
I also downloaded kernel source from Samsung, to check its dts, and it also powers qusb@88e2000 and ssphy@88e8000 from '
pm8998_l5' regulator.Quoted 8 lines
Interesting.. could you try to forcefully shut down L5A (I doubt you'll be able to do so with L1A given it powers so much digital logic), or set its regulator-min&max-microvolt to a way-too-low voltage (vmin seems to be 312000)?
You should then be able to tell fairly easily, depending on whether usb2 still works after a replug
Usb doesn't worked in such experiment:
Here's the log:
```
Quoted 8 lines
[ 3.541733] ldo5: Setting 312000-312000uV ...... [ 3.808224] dwc3 a600000.usb: Adding to iommu group 5 [ 3.823116] qcom-qmp-combo-phy 88e8000.phy: phy initialization timed-out [ 3.824323] phy phy-88e8000.phy.0: phy init failed --> -110 [ 3.825916] dwc3 a600000.usb: error -ETIMEDOUT: failed to initialize core [ 3.827208] dwc3 a600000.usb: probe with driver dwc3 failed with error -110 [ 3.828548] probe of a600000.usb returned 110 after 20399 usecs
Wow, I'm really surprised
That said, thank you for confirming
Konrad