Skip to content

Commit

Permalink
WIP: ARM: dts: qcom: Add basic DT for mdm9607 + Waveshare 4G HAT
Browse files Browse the repository at this point in the history
Mostly an adjusted version of my device tree for MSM8909.

Working functionality on the Waveshare 4G HAT:
  - UART
  - Boots into postmarketOS installed on SD card
  - USB
  - NAND (with some quirks)
  - Modem (mobile data works with ModemManager)

Signed-off-by: Stephan Gerhold <[email protected]>
  • Loading branch information
stephan-gh committed Nov 24, 2024
1 parent 3d6166a commit 70d7022
Show file tree
Hide file tree
Showing 5 changed files with 1,428 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/boot/dts/qcom/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ dtb-$(CONFIG_ARCH_QCOM) += \
qcom-msm8974pro-sony-xperia-shinano-aries.dtb \
qcom-msm8974pro-sony-xperia-shinano-castor.dtb \
qcom-msm8974pro-sony-xperia-shinano-leo.dtb \
qcom-mdm9607-waveshare-4g-hat.dtb \
qcom-mdm9615-wp8548-mangoh-green.dtb \
qcom-sdx55-mtp.dtb \
qcom-sdx55-t55.dtb \
Expand Down
172 changes: 172 additions & 0 deletions arch/arm/boot/dts/qcom/qcom-mdm9607-waveshare-4g-hat.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
// SPDX-License-Identifier: GPL-2.0-only
#include "qcom-mdm9607.dtsi"
#include "qcom-pm8019.dtsi"

/ {
model = "Waveshare SIM7600 4G HAT";
compatible = "waveshare,mdm9607-4g-hat", "qcom,mdm9607";

aliases {
serial0 = &blsp_uart2;
mmc0 = &sdhc_2;
};

chosen {
stdout-path = "serial0";
};

reg_5v: regulator-5v {
compatible = "regulator-fixed";
regulator-name = "5V";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-boot-on;
regulator-always-on;
};
reg_3p3v: regulator-3p3v {
compatible = "regulator-fixed";
regulator-name = "VDD_3.3V";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
regulator-always-on;
vin-supply = <&reg_5v>;
};
reg_3p0v: regulator-3p0v {
compatible = "regulator-fixed";
regulator-name = "VDD_3.0V";
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
regulator-boot-on;
regulator-always-on;
vin-supply = <&reg_5v>;
};

usb_id: usb-id {
compatible = "linux,extcon-usb-gpio";
id-gpio = <&pm8019_mpps 1 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usb_id>;
};
};

&blsp_uart2 {
status = "okay";
};

&mpss {
status = "okay";
pll-supply = <&pm8019_l3>;
};

&qpic_dma {
status = "okay";
};

&qpic_nand {
status = "okay";

nand: nand@0 {
reg = <0>;
/* MIBIB partition fails with "failed to copy last codeword" */
secure-regions = /bits/ 64 <0x140000 0x140000>;
};
};

&sdhc_2 {
status = "okay";
vmmc-supply = <&reg_3p0v>;
vqmmc-supply = <&pm8019_l13>;
};

&usb {
status = "okay";
extcon = <&usb_id>, <&usb_id>;
};

&usb_hs_phy {
extcon = <&usb_id>;
v1p8-supply = <&pm8019_l2>;
v3p3-supply = <&pm8019_l4>;
};

&rpm_requests {
pm8019-regulators {
compatible = "qcom,rpm-pm8019-regulators";

/* pm8019_s1 is managed via SPMI (CPR) */
pm8019_s2: s2 {
regulator-min-microvolt = <750000>;
regulator-max-microvolt = <1275000>;
};
/* pm8019_s3 is managed by rpmpd (MDM9607_VDDCX) */
pm8019_s4: s4 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1950000>;
};

pm8019_l1: l1 {
regulator-min-microvolt = <1250000>;
regulator-max-microvolt = <1250000>;
};
pm8019_l2: l2 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};
pm8019_l3: l3 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};
pm8019_l4: l4 {
regulator-min-microvolt = <3075000>;
regulator-max-microvolt = <3075000>;
};
pm8019_l5: l5 {
regulator-min-microvolt = <1700000>;
regulator-max-microvolt = <3050000>;
};
pm8019_l6: l6 {
regulator-min-microvolt = <1700000>;
regulator-max-microvolt = <3050000>;
};
pm8019_l7: l7 {
regulator-min-microvolt = <1700000>;
regulator-max-microvolt = <1900000>;
};
pm8019_l8: l8 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};
pm8019_l9: l9 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1250000>;
};
pm8019_l10: l10 {
regulator-min-microvolt = <1050000>;
regulator-max-microvolt = <1050000>;
};
pm8019_l11: l11 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};
/* pm8019_l12 is managed by rpmpd (MSM8909_VDDMX) */
pm8019_l13: l13 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <2850000>;
};
pm8019_l14: l14 {
regulator-min-microvolt = <2650000>;
regulator-max-microvolt = <3000000>;
};
};
};

&pm8019_mpps {
pinctrl_usb_id: usb-id-state {
pins = "mpp1";
function = "digital";
power-source = <3>;
bias-pull-up = <10000>;
input-enable;
};
};
Loading

0 comments on commit 70d7022

Please sign in to comment.