2023-01-17 03:12:12

by Bryan O'Donoghue

[permalink] [raw]
Subject: [PATCH v3 0/8] Add MSM8939 SoC support with two devices

V3:
- Happily I don't currently depend on any other series to be merged.
Bjorn and Chanwoo picked up everything I need to unblock this series. \(^o^)/

- Moves xo_board to RPM/PMIC clock gated CXO, not including rpmcc: obvs - Konrad/Bjorn
- qcom,msm-id = <239 0> - left as in V2 valid according to Sony references - bod
- cpu-release-addr - as stated below we rely on lk2nd to take the second cluster
out of reset - bod
- smem child node update - Konrad
- Whitespace updates - Konrad
- gpu no interconnect - Konrad - No bod
- 19.2 MHz dropped from timer@b020000 - Konrad
- Added vreg_dummy comment - Konrad
- sdc_pins grouped - Konrad
- startup-delay-us = <0> - left as is
- bias - added no-bias - Konrad
- :g/msmgpio/s//tlmm/g - Konrad
- mdss/s//display-controller - Konrad
- l11 set-load - Korad

- l12 upper voltage raised to 3.3v since this is what the
downstream kernel says when I boot and interrogate it - bod

- sdhc@address - Discussed with Krzysztof and implemented as discussed
- snoc-mm fix - Discussed with Krzysztof implemented if:then:else:not
- dtc -I dtb -fs apq8039-t2.dtb prodcues
/soc@0/i2c@78b5000: duplicate unit-address
as does every other component that uses this polymorphic dts node
- Renamed type-c i2c port manager IC to "typec" - Krzysztof

/smsm/hexagon@1: Missing #address-cells in interrupt provider
Same output as other upstream and recently upstreamed SoCs
I left these alone for now

link: https://lore.kernel.org/lkml/[email protected]/T/
bootable: https://git.linaro.org/people/bryan.odonoghue/kernel.git/log/?h=linux-next-23-01-16-msm8939-nocpr

V2:
- Sorts core dtsi node list by address followed by alpahbetical sorting
within address sorted nodes - Bjorn
- Drops use of 8916-pins - Bjorn
- Adds msm8939-pm8916.dtsi - Stephan
- Fixes every dts splat from previous submission minus non-converted
.txt compat strings [1] and one yaml error in Bjorn's tree not in -next yet
- I haven't applied Dmitry's change for tsens since that's not been
picked up yet
- Picks up a number of suggestions and fixes from Stephan Gerhold and Vincent Knecht

- Depends on

Applied:
[PATCH v4 0/7] remoteproc: qcom_q6v5_mss: Add MSM8909 and MSM8953
https://lore.kernel.org/linux-arm-msm/[email protected]/

[PATCH v6 0/5] remoteproc: qcom: Add support for pronto-v3
https://lore.kernel.org/linux-arm-msm/[email protected]/

[PATCH v6 00/18] mdss-dsi-ctrl binding and dts fixes
https://lore.kernel.org/linux-arm-msm/[email protected]/

Awaiting application:
https://lore.kernel.org/linux-arm-msm/[email protected]/

- Previous
https://lore.kernel.org/linux-arm-msm/[email protected]/

- Bootable tree
https://git.linaro.org/people/bryan.odonoghue/kernel.git/log/?h=linux-next-23-01-03-msm8939-no-cpr

- [1] DTC_CHK arch/arm64/boot/dts/qcom/apq8039-t2.dtb

Documentation/devicetree/bindings/arm/msm/qcom,idle-state.txt
qcom/apq8039-t2.dtb: idle-states: cpu-sleep-0:compatible:0: 'qcom,idle-state-spc' is not one of ['arm,idle-state', 'riscv,idle-state']
From schema: Documentation/devicetree/bindings/cpu/idle-states.yaml
qcom/apq8039-t2.dtb: idle-states: cpu-sleep-0:compatible: ['qcom,idle-state-spc', 'arm,idle-state'] is too long
From schema: Documentation/devicetree/bindings/cpu/idle-states.yaml
arch/arm64/boot/dts/qcom/apq8039-t2.dtb:0:0: /cpus/idle-states/cpu-sleep-0: failed to match any schema with compatible: ['qcom,idle-state-spc', 'arm,idle-state']

Documentation/devicetree/bindings/iommu/qcom,iommu.txt
arch/arm64/boot/dts/qcom/apq8039-t2.dtb:0:0: /soc@0/iommu@1ef0000: failed to match any schema with compatible: ['qcom,msm8916-iommu', 'qcom,msm-iommu-v1']
arch/arm64/boot/dts/qcom/apq8039-t2.dtb:0:0: /soc@0/iommu@1ef0000/iommu-ctx@4000: failed to match any schema with compatible: ['qcom,msm-iommu-v1-ns']
arch/arm64/boot/dts/qcom/apq8039-t2.dtb:0:0: /soc@0/iommu@1ef0000/iommu-ctx@5000: failed to match any schema with compatible: ['qcom,msm-iommu-v1-sec']
arch/arm64/boot/dts/qcom/apq8039-t2.dtb:0:0: /soc@0/iommu@1f08000: failed to match any schema with compatible: ['qcom,msm8916-iommu', 'qcom,msm-iommu-v1']
arch/arm64/boot/dts/qcom/apq8039-t2.dtb:0:0: /soc@0/iommu@1f08000/iommu-ctx@1000: failed to match any schema with compatible: ['qcom,msm-iommu-v1-ns']
arch/arm64/boot/dts/qcom/apq8039-t2.dtb:0:0: /soc@0/iommu@1f08000/iommu-ctx@2000: failed to match any schema with compatible: ['qcom,msm-iommu-v1-ns']

arch/arm64/boot/dts/qcom/pm8916.dtsi f5d7bca55425c8
qcom/apq8039-t2.dtb: pmic@0: 'extcon@1300' does not match any of the regexes: '(.*)?(wled|leds)@[0-9a-f]+$', '^adc-tm@[0-9a-f]+$', '^adc@[0-9a-f]+$', '^audio-codec@[0-9a-f]+$', '^charger@[0-9a-f]+$', '^mpps@[0-9a-f]+$', '^rtc@[0-9a-f]+$', '^temp-alarm@[0-9a-f]+$', '^usb-detect@[0-9a-f]+$', '^usb-vbus-regulator@[0-9a-f]+$', '^vibrator@[0-9a-f]+$', 'gpio@[0-9a-f]+$', 'pinctrl-[0-9]+', 'pon@[0-9a-f]+$'
From schema: Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml

Documentation/devicetree/bindings/sound/qcom,msm8916-wcd-analog.txt
arch/arm64/boot/dts/qcom/apq8039-t2.dtb:0:0: /soc@0/spmi@200f000/pmic@1/audio-codec@f000: failed to match any schema with compatible: ['qcom,pm8916-wcd-analog-codec']

yaml documentation error not yet in -next
arm64/boot/dts/qcom/apq8039-t2.dtb: remoteproc@4080000: qcom,halt-regs:0: [33] is too short
From schema: Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml

Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
arch/arm64/boot/dts/qcom/apq8039-t2.dtb:0:0: /soc@0/usb@78d9000: failed to match any schema with compatible: ['qcom,ci-hdrc']

Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.txt: compatible = "qcom,kpss-acc-v2";
arch/arm64/boot/dts/qcom/apq8039-t2.dtb:0:0: /soc@0/clock-controller@b088000: failed to match any schema with compatible: ['qcom,kpss-acc-v2']
arch/arm64/boot/dts/qcom/apq8039-t2.dtb:0:0: /soc@0/clock-controller@b098000: failed to match any schema with compatible: ['qcom,kpss-acc-v2']
arch/arm64/boot/dts/qcom/apq8039-t2.dtb:0:0: /soc@0/clock-controller@b0a8000: failed to match any schema with compatible: ['qcom,kpss-acc-v2']
arch/arm64/boot/dts/qcom/apq8039-t2.dtb:0:0: /soc@0/clock-controller@b0b8000: failed to match any schema with compatible: ['qcom,kpss-acc-v2']
arch/arm64/boot/dts/qcom/apq8039-t2.dtb:0:0: /soc@0/clock-controller@b188000: failed to match any schema with compatible: ['qcom,kpss-acc-v2']
arch/arm64/boot/dts/qcom/apq8039-t2.dtb:0:0: /soc@0/clock-controller@b198000: failed to match any schema with compatible: ['qcom,kpss-acc-v2']
arch/arm64/boot/dts/qcom/apq8039-t2.dtb:0:0: /soc@0/clock-controller@b1a8000: failed to match any schema with compatible: ['qcom,kpss-acc-v2']
arch/arm64/boot/dts/qcom/apq8039-t2.dtb:0:0: /soc@0/clock-controller@b1b8000: failed to match any schema with compatible: ['qcom,kpss-acc-v2']

V1:
This series adds in MSM8939 SoC support with two supported devices.

- CPU
MSM8939 is a non-PSCI compliant device. As such in the downstreaming
shipped image custom code is used to bring non-boot cores out of reset.

This drop specifies the boot-method as spin-table instead and is
completely standard. To accomplish this, we rely on lk2nd.

https://github.com/msm8916-mainline/lk2nd/pull/142

- Serial
- i2c
- USB
- eMMC
- MDP/DSI
- WiFi
- Bluetooth

What's not included

- CPR
We have CPR working in a 4.19 kernel quite well but for now it feels like
putting the cart before the horse to gate the SoC and boards on CPR.

- Venus
I've been told this works but I haven't tried it myself and right now
consider it maybe working but probably not 100%.

- Sound
We have a copy-exactly from the 4.19 kernel here in the DTS.
I haven't run the sound through any sort of reasonable test.
Vincent Knecht has some PostmarketOS kernels which use a 5.17 version of
this DTS to get sound up so, I think sound is in good shape.

- CAMSS
There are slight differences between msm8916 and msm8939 for CAMSS. It
doesn't feel like tons of work but, right now it is work we haven't even
started.

- Devices
I've booted on the Square device obviously and this is my regular
hardware for upstream development. I've also booted on the Sony Xperia M4
Aqua including mutli-core bring-up, WiFi and ADB.

Dependencies for this drop:

qcom-cpufreq-nvmem: Add msm8939 with some fixups
link: https://lore.kernel.org/linux-arm-msm/[email protected]/T/#t

Fix apq8016 compat string
link: https://lore.kernel.org/linux-arm-msm/[email protected]/T/#t

dt-bindings: soc: qcom: smd-rpm: Fix missing MSM8936 compatible
link: https://lore.kernel.org/linux-arm-msm/[email protected]/T/#u

Bootable tree here:
https://git.linaro.org/people/bryan.odonoghue/kernel.git/log/?h=v5.18-rc2%2bapq8039-without-cpr

Bryan O'Donoghue (7):
dt-bindings: arm: qcom: Document MSM8939 SoC binding
dt-bindings: soc: qcom: smd-rpm: Exclude MSM8936 from glink-channels
dt-bindings: interconnect: Exclude all non msm8939 from snoc-mm
clk: qcom: smd-rpm: msm8936: Add PMIC gated RPM_SMD_XO_*
arm64: dts: qcom: Add msm8939 SoC
arm64: dts: qcom: Add Square apq8039-t2 board
arm64: dts: qcom: Add msm8939 Sony Xperia M4 Aqua

Stephan Gerhold (1):
arm64: dts: qcom: Add msm8939-pm8916.dtsi include

.../devicetree/bindings/arm/qcom.yaml | 8 +
.../bindings/interconnect/qcom,rpm.yaml | 73 +-
.../bindings/soc/qcom/qcom,smd-rpm.yaml | 1 +
arch/arm64/boot/dts/qcom/Makefile | 2 +
arch/arm64/boot/dts/qcom/apq8039-t2.dts | 555 ++++
arch/arm64/boot/dts/qcom/msm8939-pm8916.dtsi | 82 +
.../qcom/msm8939-sony-xperia-kanuti-tulip.dts | 466 ++++
arch/arm64/boot/dts/qcom/msm8939.dtsi | 2393 +++++++++++++++++
drivers/clk/qcom/clk-smd-rpm.c | 2 +
9 files changed, 3551 insertions(+), 31 deletions(-)
create mode 100644 arch/arm64/boot/dts/qcom/apq8039-t2.dts
create mode 100644 arch/arm64/boot/dts/qcom/msm8939-pm8916.dtsi
create mode 100644 arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts
create mode 100644 arch/arm64/boot/dts/qcom/msm8939.dtsi

--
2.38.1


2023-01-17 03:15:24

by Bryan O'Donoghue

[permalink] [raw]
Subject: [PATCH v3 8/8] arm64: dts: qcom: Add msm8939 Sony Xperia M4 Aqua

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 <[email protected]>
---
arch/arm64/boot/dts/qcom/Makefile | 1 +
arch/arm64/boot/dts/qcom/apq8039-t2.dts | 2 -
.../qcom/msm8939-sony-xperia-kanuti-tulip.dts | 466 ++++++++++++++++++
3 files changed, 467 insertions(+), 2 deletions(-)
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 5c47d1fb50b01..8b9fa1deadbe0 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -24,6 +24,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) += msm8953-motorola-potter.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8953-xiaomi-daisy.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8953-xiaomi-mido.dtb
diff --git a/arch/arm64/boot/dts/qcom/apq8039-t2.dts b/arch/arm64/boot/dts/qcom/apq8039-t2.dts
index 21f5a21f76135..ee04cf294179f 100644
--- a/arch/arm64/boot/dts/qcom/apq8039-t2.dts
+++ b/arch/arm64/boot/dts/qcom/apq8039-t2.dts
@@ -491,8 +491,6 @@ pm8916_l18: l18 {
};

&sdhc_1 {
- vmmc-supply = <&pm8916_l8>;
- vqmmc-supply = <&pm8916_l5>;
pinctrl-names = "default", "sleep";
pinctrl-0 = <&sdc1_default_state>;
pinctrl-1 = <&sdc1_sleep_state>;
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..ffe3ea17dcae2
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts
@@ -0,0 +1,466 @@
+// 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>;
+ qcom,msm-id = <239 0>, <239 0x30000>, <241 0x30000>, <263 0x30000>;
+
+ aliases {
+ mmc0 = &sdhc_1; /* SDC1 eMMC slot */
+ mmc1 = &sdhc_2; /* SDC2 SD card slot */
+ serial0 = &blsp1_uart2;
+ };
+
+ 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 = <&tlmm 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 = <&tlmm 114 GPIO_ACTIVE_LOW>;
+ startup-delay-us = <0>;
+ };
+
+ usb_id: usb-id {
+ compatible = "linux,extcon-usb-gpio";
+ id-gpio = <&tlmm 110 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&usb_id_default>;
+ };
+};
+
+&blsp_dma {
+ status = "okay";
+};
+
+&dsi0 {
+ vdda-supply = <&pm8916_l2>;
+ vddio-supply = <&pm8916_l16>;
+ status = "okay";
+
+ panel@0 {
+ compatible = "sony,tulip-truly-nt35521";
+ reg = <0>;
+ positive5-supply = <&positive5_reg>;
+ negative5-supply = <&negative5_reg>;
+ reset-gpios = <&tlmm 25 GPIO_ACTIVE_LOW>;
+ enable-gpios = <&tlmm 10 GPIO_ACTIVE_LOW>;
+
+ ports {
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&dsi0_out>;
+ };
+ };
+ };
+
+ };
+};
+
+&dsi0_out {
+ remote-endpoint = <&panel_in>;
+ data-lanes = <0 1 2 3>;
+};
+
+&dsi_phy0 {
+ vddio-supply = <&pm8916_l16>;
+ qcom,dsi-phy-regulator-ldo-mode;
+ status = "okay";
+};
+
+&tlmm {
+ 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>;
+ bias-pull-down;
+ output-low;
+ };
+
+ 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>;
+ bias-disable;
+ };
+
+ 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;
+ };
+
+ 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 = <3300000>;
+ regulator-allow-set-load;
+ regulator-system-load = <200000>;
+ };
+
+ pm8916_l12: l12 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ 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_default_state>;
+ pinctrl-1 = <&sdc1_sleep_state>;
+ status = "okay";
+};
+
+&sdhc_2 {
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&sdc2_default_state>;
+ pinctrl-1 = <&sdc2_sleep_state>;
+ cd-gpios = <&tlmm 38 GPIO_ACTIVE_HIGH>;
+ status = "okay";
+};
+
+&usb {
+ extcon = <&usb_id>, <&usb_id>;
+ status = "okay";
+
+ ulpi {
+ usb_hs_phy: phy {
+ v1p8-supply = <&pm8916_l7>;
+ v3p3-supply = <&pm8916_l13>;
+ };
+ };
+};
+
+&usb_hs_phy {
+ extcon = <&usb_id>;
+};
--
2.38.1

2023-01-17 03:16:15

by Bryan O'Donoghue

[permalink] [raw]
Subject: [PATCH v3 4/8] clk: qcom: smd-rpm: msm8936: Add PMIC gated RPM_SMD_XO_*

The XO crystal input is buffered through the PMIC and controlled by RPM.
Create the relevant clock gate representation in the RPM clock definitions.

Signed-off-by: Bryan O'Donoghue <[email protected]>
---
drivers/clk/qcom/clk-smd-rpm.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/clk/qcom/clk-smd-rpm.c b/drivers/clk/qcom/clk-smd-rpm.c
index 8f6e274c60301..6f23ca4828f44 100644
--- a/drivers/clk/qcom/clk-smd-rpm.c
+++ b/drivers/clk/qcom/clk-smd-rpm.c
@@ -574,6 +574,8 @@ static const struct rpm_smd_clk_desc rpm_clk_msm8916 = {
};

static struct clk_smd_rpm *msm8936_clks[] = {
+ [RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
+ [RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
[RPM_SMD_PCNOC_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
[RPM_SMD_PCNOC_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
[RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_1_snoc_clk,
--
2.38.1

2023-01-17 03:56:53

by Bryan O'Donoghue

[permalink] [raw]
Subject: [PATCH v3 7/8] arm64: dts: qcom: Add Square apq8039-t2 board

The apq8039-t2 is an apq8039 based board paired with a wcn3680b WiFi
chipset.

Co-developed-by: Shawn Guo <[email protected]>
Signed-off-by: Shawn Guo <[email protected]>
Co-developed-by: Jun Nie <[email protected]>
Signed-off-by: Jun Nie <[email protected]>
Co-developed-by: Benjamin Li <[email protected]>
Signed-off-by: Benjamin Li <[email protected]>
Co-developed-by: James Willcox <[email protected]>
Signed-off-by: James Willcox <[email protected]>
Co-developed-by: Leo Yan <[email protected]>
Signed-off-by: Leo Yan <[email protected]>
Co-developed-by: Joseph Gates <[email protected]>
Signed-off-by: Joseph Gates <[email protected]>
Co-developed-by: Max Chen <[email protected]>
Signed-off-by: Max Chen <[email protected]>
Co-developed-by: Zac Crosby <[email protected]>
Signed-off-by: Zac Crosby <[email protected]>
Signed-off-by: Bryan O'Donoghue <[email protected]>
---
arch/arm64/boot/dts/qcom/Makefile | 1 +
arch/arm64/boot/dts/qcom/apq8039-t2.dts | 557 ++++++++++++++++++++++++
2 files changed, 558 insertions(+)
create mode 100644 arch/arm64/boot/dts/qcom/apq8039-t2.dts

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index e442a81895d04..5c47d1fb50b01 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
dtb-$(CONFIG_ARCH_QCOM) += apq8016-sbc.dtb
+dtb-$(CONFIG_ARCH_QCOM) += apq8039-t2.dtb
dtb-$(CONFIG_ARCH_QCOM) += apq8094-sony-xperia-kitakami-karin_windy.dtb
dtb-$(CONFIG_ARCH_QCOM) += apq8096-db820c.dtb
dtb-$(CONFIG_ARCH_QCOM) += apq8096-ifc6640.dtb
diff --git a/arch/arm64/boot/dts/qcom/apq8039-t2.dts b/arch/arm64/boot/dts/qcom/apq8039-t2.dts
new file mode 100644
index 0000000000000..21f5a21f76135
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/apq8039-t2.dts
@@ -0,0 +1,557 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2020-2023, Linaro Ltd.
+ *
+ */
+
+/dts-v1/;
+
+#include "msm8939.dtsi"
+#include "msm8939-pm8916.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
+#include <dt-bindings/sound/apq8016-lpass.h>
+
+/ {
+ model = "Square, Inc. T2 Devkit";
+ compatible = "square,apq8039-t2", "qcom,msm8939";
+
+ qcom,board-id = <0x53 0x54>;
+ qcom,msm-id = <239 0>, <239 0x30000>, <241 0x30000>, <263 0x30000>;
+
+ aliases {
+ mmc0 = &sdhc_1;
+ mmc1 = &sdhc_2;
+ serial0 = &blsp1_uart1;
+ serial1 = &blsp1_uart2;
+ };
+
+ bl: backlight {
+ compatible = "gpio-backlight";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_backlight>;
+ gpios = <&tlmm 98 GPIO_ACTIVE_HIGH>;
+ };
+
+ chosen {
+ stdout-path = "serial1:115200n8";
+ };
+
+ lcd_iovcc_reg: lcd-iovcc-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "lcd_iovcc";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_lcd_iovcc_reg>;
+ gpio = <&tlmm 9 GPIO_ACTIVE_HIGH>;
+ startup-delay-us = <300>;
+ enable-active-high;
+ };
+
+ lcd_avdd_reg: lcd-avdd-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "lcd_avdd";
+ regulator-min-microvolt = <5600000>;
+ regulator-max-microvolt = <5600000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_lcd_avdd_reg>;
+ gpio = <&tlmm 86 GPIO_ACTIVE_HIGH>;
+ startup-delay-us = <300>;
+ enable-active-high;
+ };
+
+ lcd_avee_reg: lcd-avee-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "lcd_avee";
+ regulator-min-microvolt = <5600000>;
+ regulator-max-microvolt = <5600000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_lcd_avee_reg>;
+ gpio = <&tlmm 87 GPIO_ACTIVE_HIGH>;
+ startup-delay-us = <300>;
+ enable-active-high;
+ };
+
+ pp_spe_3v3_reg: pp-spe-3v3-regulator {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&tlmm_spe_reg>;
+ regulator-name = "pp_spe_3v3";
+ gpio = <&tlmm 108 GPIO_ACTIVE_HIGH>;
+ startup-delay-us = <0>;
+ enable-active-high;
+ };
+
+ pp_crq_3v3_reg: pp-crq-3v3-regulator {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&tlmm_crq_reg>;
+ regulator-name = "pp_crq_3v3";
+ gpio = <&tlmm 12 GPIO_ACTIVE_HIGH>;
+ startup-delay-us = <0>;
+ enable-active-high;
+ };
+};
+
+&blsp_dma {
+ status = "okay";
+};
+
+&blsp_i2c1 {
+ status = "okay";
+};
+
+&blsp_i2c2 {
+ status = "okay";
+};
+
+&blsp_i2c3 {
+ status = "okay";
+
+ typec: tps6598x@38 {
+ compatible = "ti,tps6598x";
+ reg = <0x38>;
+
+ interrupt-parent = <&tlmm>;
+ interrupts = <107 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-names = "irq";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&typec_irq>;
+
+ typec_con: connector {
+ compatible = "usb-c-connector";
+ label = "USB-C";
+ port {
+ typec_ep: endpoint {
+ remote-endpoint = <&otg_ep>;
+ };
+ };
+ };
+ };
+};
+
+&blsp_i2c5 {
+ status = "okay";
+};
+
+&blsp1_uart1 {
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&blsp1_uart1_default>;
+ pinctrl-1 = <&blsp1_uart1_sleep>;
+ status = "okay";
+};
+
+&blsp1_uart2 {
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&blsp1_uart2_default>;
+ pinctrl-1 = <&blsp1_uart2_sleep>;
+ status = "okay";
+};
+
+&lpass {
+ status = "okay";
+};
+
+/*
+ * Line names are taken from the schematic of T2, Ver X03.
+ * July 14, 2018. Page 4 in particular.
+ */
+
+&tlmm {
+ gpio-line-names =
+ "APQ_UART1_TX", /* GPIO_0 */
+ "APQ_UART1_RX",
+ "APQ_I2C1_SDA",
+ "APQ_I2C1_SCL",
+ "APQ_UART2_TX_1V8",
+ "APQ_UART2_RX_1V8",
+ "APQ_I2C2_SDA",
+ "APQ_I2C2_SCL",
+ "NC",
+ "APQ_LCD_IOVCC_EN",
+ "APQ_I2C3_SDA", /* GPIO_10 */
+ "APQ_I2C3_SCL",
+ "TOUCH_RST_1V8_L",
+ "NC",
+ "APQ_I2C4_SDA",
+ "APQ_I2C4_SCL",
+ "APQ_ID5",
+ "USB_DISCONNECT",
+ "APQ_I2C5_SDA",
+ "APQ_I2C5_SCL",
+ "APQ_USBC_SPI_MOSI", /* GPIO_20 */
+ "APQ_USBC_SPI_MISO",
+ "APQ_USBC_SPI_SS_L",
+ "APQ_USBC_SPI_CLK",
+ "APQ_LCD_TE0",
+ "APQ_LCD_RST_L",
+ "NC",
+ "NC",
+ "ACCELEROMETER_INT1",
+ "APQ_CAM_I2C0_SDA",
+ "APQ_CAM_I2C0_SCL", /* GPIO_30 */
+ "ACCELEROMETER_INT2",
+ "NC",
+ "NC",
+ "NC",
+ "APQ_K21_RST_1V8_L",
+ "NC",
+ "APQ_EDL_1V8",
+ "TP145",
+ "BT_SSBI",
+ "NC", /* GPIO_40 */
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "BT_CTRL",
+ "BT_DAT",
+ "PWR_GPIO_IN",
+ "PWR_GPIO_OUT", /* GPIO_50 */
+ "CARD_DET_MLB_L",
+ "HALL_SENSOR",
+ "TP63",
+ "TP64",
+ "TP65",
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "NC", /* GPIO_60 */
+ "NC",
+ "APQ_K21_GPIO0_1V8",
+ "CDC_PDM_CLK",
+ "CDC_PDM_SYNC",
+ "CDC_PDM_TX",
+ "CDC_PDM_RX0",
+ "CDC_PDM_RX1",
+ "CDC_PDM_RX2",
+ "APQ_K21_GPIO1_1V8",
+ "NC", /* GPIO_70 */
+ "APQ_HUB_SEL_1V8",
+ "APQ_K21_GPIO2_1V8",
+ "APQ_K21_GPIO3_1V8",
+ "APQ_ID0",
+ "APQ_ID1",
+ "APQ_ID2",
+ "APQ_ID3",
+ "APQ_ID4",
+ "APQ_HUB_SUSP_IND",
+ "BOOT_CONFIG_0", /* GPIO_80 */
+ "BOOT_CONFIG_1",
+ "BOOT_CONFIG_2",
+ "BOOT_CONFIG_3",
+ "NC",
+ "NC",
+ "APQ_LCD_AVDD_EN",
+ "APQ_LCD_AVEE_EN",
+ "TP70",
+ "NC",
+ "APQ_DEBUG0", /* GPIO_90 */
+ "APQ_DEBUG1",
+ "APQ_DEBUG2",
+ "APQ_DEBUG3",
+ "TP165",
+ "NC",
+ "APQ_LNA_PWR_EN",
+ "NC",
+ "APQ_LCD_BL_EN",
+ "NC",
+ "APQ_LCD_ID0", /* GPIO_100 */
+ "APQ_LCD_ID1",
+ "USBC_GPIO5_1V8",
+ "NC",
+ "NC",
+ "NC",
+ "APQ_HUB_RST_1V8_L",
+ "USBC_I2C_IRQ_1V8_L",
+ "SPE_PWR_EN",
+ "NC",
+ "APQ_USB_ID", /* GPIO_110 */
+ "APQ_EXT_BUCK_VSEL",
+ "APQ_USB_ID_OUT",
+ "NC",
+ "PRNT_RST_L",
+ "APQ_CRQ_I2C_RDY_1V8",
+ "TYPEC_RST_1V8_H",
+ "CHG_BACKPWR_EN",
+ "CHG_PROCHOT_L",
+ "NC",
+ "USBC_GPIO7_1V8", /* GPIO_120 */
+ "NC";
+
+ blsp1_uart1_default: blsp1-uart1-default-state {
+ pins = "gpio0", "gpio1";
+ function = "blsp_uart1";
+ drive-strength = <16>;
+ bias-disable;
+ };
+
+ blsp1_uart1_sleep: blsp1-uart1-sleep-state {
+ pins = "gpio0", "gpio1";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ pinctrl_lcd_iovcc_reg: lcd-iovcc-reg-state {
+ pins = "gpio9";
+ function = "gpio";
+ };
+
+ tlmm_crq_reg: tlmm-crq-reg-state {
+ function = "gpio";
+ pins = "gpio12";
+ output-high;
+ };
+
+ pinctrl_otg_host: otg-host-state {
+ function = "gpio";
+ pins = "gpio17";
+ output-low;
+ };
+
+ pinctrl_otg_device: otg-device-state {
+ function = "gpio";
+ pins = "gpio17";
+ output-low;
+ };
+
+ pinctrl_otg_default: otg-default-state {
+ function = "gpio";
+ pins = "gpio17";
+ output-high;
+ };
+
+ pinctrl_lcd_rst: lcd-rst-state {
+ pins = "gpio25";
+ function = "gpio";
+ };
+
+ sq_spe_enable: sq-spe-enable-state {
+ pins = "gpio35";
+ function = "gpio";
+ output-low;
+ };
+
+ pinctrl_lcd_avdd_reg: lcd-avdd-reg-state {
+ pins = "gpio86";
+ function = "gpio";
+ };
+
+ pinctrl_lcd_avee_reg: lcd-avee-reg-state {
+ pins = "gpio87";
+ function = "gpio";
+ };
+
+ pinctrl_backlight: backlight-state {
+ pins = "gpio98";
+ function = "gpio";
+ };
+
+ typec_irq: typec-irq-state {
+ function = "gpio";
+ pins = "gpio107";
+ bias-pull-up;
+ input-enable;
+ };
+
+ tlmm_spe_reg: tlmm-spe-reg-state {
+ pins = "gpio108";
+ function = "gpio";
+ output-high;
+ };
+
+ ext_buck_vsel_reg: ext-buck-vsel-reg-state {
+ function = "gpio";
+ pins = "gpio111";
+ drive-strength = <2>;
+ };
+};
+
+&pm8916_gpios {
+ gpio-line-names =
+ "PM_GPIO1", /* WIFI_GPIO1_PRE */
+ "PM_GPIO2", /* WIFI_GPIO2_PRE */
+ "PM_GPIO3",
+ "PM_GPIO4";
+};
+
+&pronto {
+ pinctrl-names = "default";
+ pinctrl-0 = <&wcnss_pin_a>;
+ status = "okay";
+
+ iris {
+ compatible = "qcom,wcn3680";
+ };
+};
+
+&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>;
+ };
+
+ /* l1 is fixed to 1225000, but not connected in schematic */
+
+ 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>;
+ };
+
+ 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 {
+ vmmc-supply = <&pm8916_l8>;
+ vqmmc-supply = <&pm8916_l5>;
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&sdc1_default_state>;
+ pinctrl-1 = <&sdc1_sleep_state>;
+ status = "okay";
+};
+
+&sound {
+ model = "apq8039-square-sndcard";
+ audio-routing = "AMIC2", "MIC BIAS Internal2";
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&cdc_pdm_lines_default>;
+ pinctrl-1 = <&cdc_pdm_lines_sleep>;
+
+ internal-codec-playback-dai-link {
+ link-name = "WCD";
+ cpu {
+ sound-dai = <&lpass MI2S_PRIMARY>;
+ };
+ codec {
+ sound-dai = <&lpass_codec 0>, <&wcd_codec 0>;
+ };
+ };
+
+ internal-codec-capture-dai-link {
+ link-name = "WCD-Capture";
+ cpu {
+ sound-dai = <&lpass MI2S_TERTIARY>;
+ };
+ codec {
+ sound-dai = <&lpass_codec 1>, <&wcd_codec 1>;
+ };
+ };
+};
+
+&usb {
+ pinctrl-names = "default", "host", "device";
+ pinctrl-0 = <&pinctrl_otg_default>;
+ pinctrl-1 = <&pinctrl_otg_host>;
+ pinctrl-2 = <&pinctrl_otg_device>;
+ pin-switch-delay-us = <100000>;
+ usb-role-switch;
+ status = "okay";
+
+ ulpi {
+ usb_hs_phy: phy {
+ v1p8-supply = <&pm8916_l7>;
+ v3p3-supply = <&pm8916_l13>;
+ };
+ };
+ port {
+ otg_ep: endpoint {
+ remote-endpoint = <&typec_ep>;
+ };
+ };
+};
+
+&wcd_codec {
+ qcom,hphl-jack-type-normally-open;
+ qcom,mbhc-vthreshold-low = <75 150 237 450 500>;
+ qcom,mbhc-vthreshold-high = <75 150 237 450 500>;
+ status = "okay";
+};
--
2.38.1

2023-01-17 04:09:18

by Bryan O'Donoghue

[permalink] [raw]
Subject: [PATCH v3 6/8] arm64: dts: qcom: Add msm8939-pm8916.dtsi include

From: Stephan Gerhold <[email protected]>

The msm8939-pm8916.dtsi include configures the regulator supplies of
MSM8939 used together with PM8916, as recommended by Qualcomm. In rare
cases where boards deviate from the recommended design they can just
avoid using this include.

Signed-off-by: Stephan Gerhold <[email protected]>
Signed-off-by: Bryan O'Donoghue <[email protected]>
---
arch/arm64/boot/dts/qcom/msm8939-pm8916.dtsi | 82 ++++++++++++++++++++
1 file changed, 82 insertions(+)
create mode 100644 arch/arm64/boot/dts/qcom/msm8939-pm8916.dtsi

diff --git a/arch/arm64/boot/dts/qcom/msm8939-pm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8939-pm8916.dtsi
new file mode 100644
index 0000000000000..18a1b3cca01d6
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8939-pm8916.dtsi
@@ -0,0 +1,82 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "msm8939.dtsi"
+#include "pm8916.dtsi"
+
+&dsi0 {
+ vdda-supply = <&pm8916_l2>;
+ vddio-supply = <&pm8916_l6>;
+};
+
+&dsi1 {
+ vdda-supply = <&pm8916_l2>;
+ vddio-supply = <&pm8916_l6>;
+};
+
+&dsi_phy0 {
+ vddio-supply = <&pm8916_l6>;
+};
+
+&dsi_phy1 {
+ vddio-supply = <&pm8916_l6>;
+};
+
+&mpss {
+ pll-supply = <&pm8916_l7>;
+};
+
+&pronto {
+ vddpx-supply = <&pm8916_l7>;
+
+ iris {
+ vddxo-supply = <&pm8916_l7>;
+ vddrfa-supply = <&pm8916_s3>;
+ vddpa-supply = <&pm8916_l9>;
+ vdddig-supply = <&pm8916_l5>;
+ };
+};
+
+&sdhc_1 {
+ vmmc-supply = <&pm8916_l8>;
+ vqmmc-supply = <&pm8916_l5>;
+};
+
+&sdhc_2 {
+ vmmc-supply = <&pm8916_l11>;
+ vqmmc-supply = <&pm8916_l12>;
+};
+
+&usb_hs_phy {
+ v1p8-supply = <&pm8916_l7>;
+ v3p3-supply = <&pm8916_l13>;
+};
+
+&rpm_requests {
+ smd_rpm_regulators: regulators {
+ compatible = "qcom,rpm-pm8916-regulators";
+
+ /* pm8916_s1 is managed by rpmpd (MSM8939_VDDMDCX) */
+ /* pm8916_s2 is managed by rpmpd (MSM8939_VDDCX) */
+ pm8916_s3: s3 {};
+ pm8916_s4: s4 {};
+
+ pm8916_l1: l1 {};
+ pm8916_l2: l2 {};
+ /* pm8916_l3 is managed by rpmpd (MSM8939_VDDMX) */
+ pm8916_l4: l4 {};
+ pm8916_l5: l5 {};
+ pm8916_l6: l6 {};
+ pm8916_l7: l7 {};
+ pm8916_l8: l8 {};
+ pm8916_l9: l9 {};
+ pm8916_l10: l10 {};
+ pm8916_l11: l11 {};
+ pm8916_l12: l12 {};
+ pm8916_l13: l13 {};
+ pm8916_l14: l14 {};
+ pm8916_l15: l15 {};
+ pm8916_l16: l16 {};
+ pm8916_l17: l17 {};
+ pm8916_l18: l18 {};
+ };
+};
--
2.38.1

2023-01-18 00:26:49

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH v3 7/8] arm64: dts: qcom: Add Square apq8039-t2 board

On Tue, Jan 17, 2023 at 02:48:45AM +0000, Bryan O'Donoghue wrote:
> The apq8039-t2 is an apq8039 based board paired with a wcn3680b WiFi
> chipset.
>
> Co-developed-by: Shawn Guo <[email protected]>
> Signed-off-by: Shawn Guo <[email protected]>
> Co-developed-by: Jun Nie <[email protected]>
> Signed-off-by: Jun Nie <[email protected]>
> Co-developed-by: Benjamin Li <[email protected]>
> Signed-off-by: Benjamin Li <[email protected]>
> Co-developed-by: James Willcox <[email protected]>
> Signed-off-by: James Willcox <[email protected]>
> Co-developed-by: Leo Yan <[email protected]>
> Signed-off-by: Leo Yan <[email protected]>
> Co-developed-by: Joseph Gates <[email protected]>
> Signed-off-by: Joseph Gates <[email protected]>
> Co-developed-by: Max Chen <[email protected]>
> Signed-off-by: Max Chen <[email protected]>
> Co-developed-by: Zac Crosby <[email protected]>
> Signed-off-by: Zac Crosby <[email protected]>
> Signed-off-by: Bryan O'Donoghue <[email protected]>
> ---
> arch/arm64/boot/dts/qcom/Makefile | 1 +
> arch/arm64/boot/dts/qcom/apq8039-t2.dts | 557 ++++++++++++++++++++++++
> 2 files changed, 558 insertions(+)
> create mode 100644 arch/arm64/boot/dts/qcom/apq8039-t2.dts
>
> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
> index e442a81895d04..5c47d1fb50b01 100644
> --- a/arch/arm64/boot/dts/qcom/Makefile
> +++ b/arch/arm64/boot/dts/qcom/Makefile
> @@ -1,5 +1,6 @@
> # SPDX-License-Identifier: GPL-2.0
> dtb-$(CONFIG_ARCH_QCOM) += apq8016-sbc.dtb
> +dtb-$(CONFIG_ARCH_QCOM) += apq8039-t2.dtb
> dtb-$(CONFIG_ARCH_QCOM) += apq8094-sony-xperia-kitakami-karin_windy.dtb
> dtb-$(CONFIG_ARCH_QCOM) += apq8096-db820c.dtb
> dtb-$(CONFIG_ARCH_QCOM) += apq8096-ifc6640.dtb
> diff --git a/arch/arm64/boot/dts/qcom/apq8039-t2.dts b/arch/arm64/boot/dts/qcom/apq8039-t2.dts
> new file mode 100644
> index 0000000000000..21f5a21f76135
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/apq8039-t2.dts
> @@ -0,0 +1,557 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (c) 2015, The Linux Foundation. All rights reserved.
> + * Copyright (c) 2020-2023, Linaro Ltd.
> + *
> + */
> +
> +/dts-v1/;
> +
> +#include "msm8939.dtsi"
> +#include "msm8939-pm8916.dtsi"
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
> +#include <dt-bindings/sound/apq8016-lpass.h>
> +
> +/ {
> + model = "Square, Inc. T2 Devkit";
> + compatible = "square,apq8039-t2", "qcom,msm8939";
> +
> + qcom,board-id = <0x53 0x54>;
> + qcom,msm-id = <239 0>, <239 0x30000>, <241 0x30000>, <263 0x30000>;

Would it be possible to include and use dt-bindings/arm/qcom,ids.h here?

> +
> + aliases {
> + mmc0 = &sdhc_1;
> + mmc1 = &sdhc_2;
> + serial0 = &blsp1_uart1;
> + serial1 = &blsp1_uart2;
> + };
[..]
> +&pm8916_gpios {
> + gpio-line-names =
> + "PM_GPIO1", /* WIFI_GPIO1_PRE */
> + "PM_GPIO2", /* WIFI_GPIO2_PRE */
> + "PM_GPIO3",
> + "PM_GPIO4";
> +};
> +
> +&pronto {

As mentioned in the dtsi patch, please sort your nodes by label,
alphabetically. You may choose to group the pinctrl nodes last in the
file...

Regards,
Bjorn

> + pinctrl-names = "default";
> + pinctrl-0 = <&wcnss_pin_a>;
> + status = "okay";
> +
> + iris {
> + compatible = "qcom,wcn3680";
> + };
> +};

2023-01-18 14:26:06

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH v3 6/8] arm64: dts: qcom: Add msm8939-pm8916.dtsi include



On 17.01.2023 03:48, Bryan O'Donoghue wrote:
> From: Stephan Gerhold <[email protected]>
>
> The msm8939-pm8916.dtsi include configures the regulator supplies of
> MSM8939 used together with PM8916, as recommended by Qualcomm. In rare
> cases where boards deviate from the recommended design they can just
> avoid using this include.
>
> Signed-off-by: Stephan Gerhold <[email protected]>
> Signed-off-by: Bryan O'Donoghue <[email protected]>
> ---
Reviewed-by: Konrad Dybcio <[email protected]>

Konrad
> arch/arm64/boot/dts/qcom/msm8939-pm8916.dtsi | 82 ++++++++++++++++++++
> 1 file changed, 82 insertions(+)
> create mode 100644 arch/arm64/boot/dts/qcom/msm8939-pm8916.dtsi
>
> diff --git a/arch/arm64/boot/dts/qcom/msm8939-pm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8939-pm8916.dtsi
> new file mode 100644
> index 0000000000000..18a1b3cca01d6
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/msm8939-pm8916.dtsi
> @@ -0,0 +1,82 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +
> +#include "msm8939.dtsi"
> +#include "pm8916.dtsi"
> +
> +&dsi0 {
> + vdda-supply = <&pm8916_l2>;
> + vddio-supply = <&pm8916_l6>;
> +};
> +
> +&dsi1 {
> + vdda-supply = <&pm8916_l2>;
> + vddio-supply = <&pm8916_l6>;
> +};
> +
> +&dsi_phy0 {
> + vddio-supply = <&pm8916_l6>;
> +};
> +
> +&dsi_phy1 {
> + vddio-supply = <&pm8916_l6>;
> +};
> +
> +&mpss {
> + pll-supply = <&pm8916_l7>;
> +};
> +
> +&pronto {
> + vddpx-supply = <&pm8916_l7>;
> +
> + iris {
> + vddxo-supply = <&pm8916_l7>;
> + vddrfa-supply = <&pm8916_s3>;
> + vddpa-supply = <&pm8916_l9>;
> + vdddig-supply = <&pm8916_l5>;
> + };
> +};
> +
> +&sdhc_1 {
> + vmmc-supply = <&pm8916_l8>;
> + vqmmc-supply = <&pm8916_l5>;
> +};
> +
> +&sdhc_2 {
> + vmmc-supply = <&pm8916_l11>;
> + vqmmc-supply = <&pm8916_l12>;
> +};
> +
> +&usb_hs_phy {
> + v1p8-supply = <&pm8916_l7>;
> + v3p3-supply = <&pm8916_l13>;
> +};
> +
> +&rpm_requests {
> + smd_rpm_regulators: regulators {
> + compatible = "qcom,rpm-pm8916-regulators";
> +
> + /* pm8916_s1 is managed by rpmpd (MSM8939_VDDMDCX) */
> + /* pm8916_s2 is managed by rpmpd (MSM8939_VDDCX) */
> + pm8916_s3: s3 {};
> + pm8916_s4: s4 {};
> +
> + pm8916_l1: l1 {};
> + pm8916_l2: l2 {};
> + /* pm8916_l3 is managed by rpmpd (MSM8939_VDDMX) */
> + pm8916_l4: l4 {};
> + pm8916_l5: l5 {};
> + pm8916_l6: l6 {};
> + pm8916_l7: l7 {};
> + pm8916_l8: l8 {};
> + pm8916_l9: l9 {};
> + pm8916_l10: l10 {};
> + pm8916_l11: l11 {};
> + pm8916_l12: l12 {};
> + pm8916_l13: l13 {};
> + pm8916_l14: l14 {};
> + pm8916_l15: l15 {};
> + pm8916_l16: l16 {};
> + pm8916_l17: l17 {};
> + pm8916_l18: l18 {};
> + };
> +};

2023-01-18 14:33:59

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH v3 4/8] clk: qcom: smd-rpm: msm8936: Add PMIC gated RPM_SMD_XO_*



On 17.01.2023 03:48, Bryan O'Donoghue wrote:
> The XO crystal input is buffered through the PMIC and controlled by RPM.
> Create the relevant clock gate representation in the RPM clock definitions.
>
> Signed-off-by: Bryan O'Donoghue <[email protected]>
> ---
Reviewed-by: Konrad Dybcio <[email protected]>

Konrad
> drivers/clk/qcom/clk-smd-rpm.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/clk/qcom/clk-smd-rpm.c b/drivers/clk/qcom/clk-smd-rpm.c
> index 8f6e274c60301..6f23ca4828f44 100644
> --- a/drivers/clk/qcom/clk-smd-rpm.c
> +++ b/drivers/clk/qcom/clk-smd-rpm.c
> @@ -574,6 +574,8 @@ static const struct rpm_smd_clk_desc rpm_clk_msm8916 = {
> };
>
> static struct clk_smd_rpm *msm8936_clks[] = {
> + [RPM_SMD_XO_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo,
> + [RPM_SMD_XO_A_CLK_SRC] = &clk_smd_rpm_branch_bi_tcxo_a,
> [RPM_SMD_PCNOC_CLK] = &clk_smd_rpm_bus_0_pcnoc_clk,
> [RPM_SMD_PCNOC_A_CLK] = &clk_smd_rpm_bus_0_pcnoc_a_clk,
> [RPM_SMD_SNOC_CLK] = &clk_smd_rpm_bus_1_snoc_clk,

2023-01-18 15:07:22

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH v3 8/8] arm64: dts: qcom: Add msm8939 Sony Xperia M4 Aqua



On 17.01.2023 03:48, 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 <[email protected]>
> ---
> arch/arm64/boot/dts/qcom/Makefile | 1 +
> arch/arm64/boot/dts/qcom/apq8039-t2.dts | 2 -
> .../qcom/msm8939-sony-xperia-kanuti-tulip.dts | 466 ++++++++++++++++++
> 3 files changed, 467 insertions(+), 2 deletions(-)
> 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 5c47d1fb50b01..8b9fa1deadbe0 100644
> --- a/arch/arm64/boot/dts/qcom/Makefile
> +++ b/arch/arm64/boot/dts/qcom/Makefile
> @@ -24,6 +24,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) += msm8953-motorola-potter.dtb
> dtb-$(CONFIG_ARCH_QCOM) += msm8953-xiaomi-daisy.dtb
> dtb-$(CONFIG_ARCH_QCOM) += msm8953-xiaomi-mido.dtb
> diff --git a/arch/arm64/boot/dts/qcom/apq8039-t2.dts b/arch/arm64/boot/dts/qcom/apq8039-t2.dts
> index 21f5a21f76135..ee04cf294179f 100644
> --- a/arch/arm64/boot/dts/qcom/apq8039-t2.dts
> +++ b/arch/arm64/boot/dts/qcom/apq8039-t2.dts
> @@ -491,8 +491,6 @@ pm8916_l18: l18 {
> };
>
> &sdhc_1 {
> - vmmc-supply = <&pm8916_l8>;
> - vqmmc-supply = <&pm8916_l5>;
> pinctrl-names = "default", "sleep";
> pinctrl-0 = <&sdc1_default_state>;
> pinctrl-1 = <&sdc1_sleep_state>;
This hunk doesn't belong in this patch..


> 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..ffe3ea17dcae2
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/msm8939-sony-xperia-kanuti-tulip.dts
> @@ -0,0 +1,466 @@
> +// 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>;
> + qcom,msm-id = <239 0>, <239 0x30000>, <241 0x30000>, <263 0x30000>;
> +
> + aliases {
> + mmc0 = &sdhc_1; /* SDC1 eMMC slot */
> + mmc1 = &sdhc_2; /* SDC2 SD card slot */
> + serial0 = &blsp1_uart2;
> + };
> +
> + 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 = <&tlmm 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 = <&tlmm 114 GPIO_ACTIVE_LOW>;
> + startup-delay-us = <0>;
> + };
> +
> + usb_id: usb-id {
> + compatible = "linux,extcon-usb-gpio";
> + id-gpio = <&tlmm 110 GPIO_ACTIVE_HIGH>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&usb_id_default>;
> + };
> +};
> +
> +&blsp_dma {
> + status = "okay";
> +};
> +
> +&dsi0 {
> + vdda-supply = <&pm8916_l2>;
> + vddio-supply = <&pm8916_l16>;
#include "msm8939-pm8916.dtsi"

> + status = "okay";
> +
> + panel@0 {
> + compatible = "sony,tulip-truly-nt35521";
> + reg = <0>;
> + positive5-supply = <&positive5_reg>;
> + negative5-supply = <&negative5_reg>;
> + reset-gpios = <&tlmm 25 GPIO_ACTIVE_LOW>;
> + enable-gpios = <&tlmm 10 GPIO_ACTIVE_LOW>;
> +
> + ports {
> + port {
> + panel_in: endpoint {
> + remote-endpoint = <&dsi0_out>;
> + };
> + };
> + };
> +
> + };
> +};
> +
> +&dsi0_out {
> + remote-endpoint = <&panel_in>;
> + data-lanes = <0 1 2 3>;
> +};
> +
> +&dsi_phy0 {
> + vddio-supply = <&pm8916_l16>;
That sounds strange.. you sure it's this one?

> + qcom,dsi-phy-regulator-ldo-mode;
> + status = "okay";
> +};
> +
> +&tlmm {
> + 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>;
> + bias-pull-down;
> + output-low;
> + };
> +
> + 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>;
> + bias-disable;
> + };
> +
> + 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;
> + };
> +
> + 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 = <3300000>;
> + regulator-allow-set-load;
Please put this below regulator-system-load for consistency with
other DTs.

> + regulator-system-load = <200000>;
> + };
> +
> + pm8916_l12: l12 {
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <3300000>;
> + };
> +
> + 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_default_state>;
> + pinctrl-1 = <&sdc1_sleep_state>;
> + status = "okay";
> +};
> +
> +&sdhc_2 {
> + pinctrl-names = "default", "sleep";
> + pinctrl-0 = <&sdc2_default_state>;
> + pinctrl-1 = <&sdc2_sleep_state>;
> + cd-gpios = <&tlmm 38 GPIO_ACTIVE_HIGH>;
> + status = "okay";
> +};
> +
> +&usb {
> + extcon = <&usb_id>, <&usb_id>;
> + status = "okay";
> +
> + ulpi {
> + usb_hs_phy: phy {
> + v1p8-supply = <&pm8916_l7>;
> + v3p3-supply = <&pm8916_l13>;
#include "msm8939-pm8916.dtsi"

Konrad
> + };
> + };
> +};
> +
> +&usb_hs_phy {
> + extcon = <&usb_id>;
> +};

2023-01-18 15:41:38

by Bryan O'Donoghue

[permalink] [raw]
Subject: Re: [PATCH v3 8/8] arm64: dts: qcom: Add msm8939 Sony Xperia M4 Aqua

On 18/01/2023 14:42, Konrad Dybcio wrote:
>> &sdhc_1 {
>> - vmmc-supply = <&pm8916_l8>;
>> - vqmmc-supply = <&pm8916_l5>;
>> pinctrl-names = "default", "sleep";
>> pinctrl-0 = <&sdc1_default_state>;
>> pinctrl-1 = <&sdc1_sleep_state>;
> This hunk doesn't belong in this patch..
>
>

bah.

squashing

2023-01-18 23:05:21

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH v3 0/8] Add MSM8939 SoC support with two devices

On Tue, 17 Jan 2023 02:48:38 +0000, Bryan O'Donoghue wrote:
> V3:
> - Happily I don't currently depend on any other series to be merged.
> Bjorn and Chanwoo picked up everything I need to unblock this series. \(^o^)/
>
> - Moves xo_board to RPM/PMIC clock gated CXO, not including rpmcc: obvs - Konrad/Bjorn
> - qcom,msm-id = <239 0> - left as in V2 valid according to Sony references - bod
> - cpu-release-addr - as stated below we rely on lk2nd to take the second cluster
> out of reset - bod
> - smem child node update - Konrad
> - Whitespace updates - Konrad
> - gpu no interconnect - Konrad - No bod
> - 19.2 MHz dropped from timer@b020000 - Konrad
> - Added vreg_dummy comment - Konrad
> - sdc_pins grouped - Konrad
> - startup-delay-us = <0> - left as is
> - bias - added no-bias - Konrad
> - :g/msmgpio/s//tlmm/g - Konrad
> - mdss/s//display-controller - Konrad
> - l11 set-load - Korad
>
> [...]

Applied, thanks!

[4/8] clk: qcom: smd-rpm: msm8936: Add PMIC gated RPM_SMD_XO_*
commit: d03de4179540e9cee6e3f664e1b65178f07bb612

Best regards,
--
Bjorn Andersson <[email protected]>