Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions arch/arm64/boot/dts/qcom/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ dtb-$(CONFIG_ARCH_QCOM) += msm8916-alcatel-idol347.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8916-ark-peach.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8916-asus-z00l.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8916-asus-z010d.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8916-fy-mf800.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8916-gplus-fl8005a.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8916-huawei-g7.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8916-huawei-y635.dtb
Expand Down
266 changes: 266 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8916-fy-mf800.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,266 @@
// SPDX-License-Identifier: GPL-2.0-only

/dts-v1/;

#include "msm8916-pm8916.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/qcom,pmic-mpp.h>

/ {
model = "MF800 4G Pocket WiFi Router";
compatible = "fy,mf800", "qcom,msm8916";
chassis-type = "embedded";

aliases {
mmc0 = &sdhc_1; /* eMMC */
serial0 = &blsp_uart2;
};

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

battery: battery {
compatible = "simple-battery";
voltage-min-design-microvolt = <3400000>;
voltage-max-design-microvolt = <4350000>;
energy-full-design-microwatt-hours = <7980000>;
charge-full-design-microamp-hours = <2100000>;

ocv-capacity-celsius = <25>;
ocv-capacity-table-0 = <4330000 100>, <4265000 95>,
<4208000 90>, <4153000 85>, <4100000 80>, <4049000 75>,
<4001000 70>, <3962000 65>, <3919000 60>, <3872000 55>,
<3839000 50>, <3817000 45>, <3798000 40>, <3783000 35>,
<3767000 30>, <3747000 25>, <3729000 20>, <3709000 16>,
<3688000 13>, <3681000 11>, <3680000 10>, <3679000 9>,
<3677000 8>, <3674000 7>, <3666000 6>, <3641000 5>,
<3597000 4>, <3537000 3>, <3457000 2>, <3336000 1>,
<3000000 0>;
};

gpio-keys {
compatible = "gpio-keys";

pinctrl-names = "default";
pinctrl-0 = <&gpio_keys_default>;
Comment on lines +49 to +50

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pinctrl-names = "default";
pinctrl-0 = <&gpio_keys_default>;
pinctrl-0 = <&gpio_keys_default>;
pinctrl-names = "default";


label = "GPIO Buttons";

button-volume-up {
label = "Volume Up";
gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEUP>;
};
};

leds {
compatible = "gpio-leds";

pinctrl-names = "default";
pinctrl-0 = <&gpio_leds_default>;
Comment on lines +64 to +65

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pinctrl-names = "default";
pinctrl-0 = <&gpio_leds_default>;
pinctrl-0 = <&gpio_leds_default>;
pinctrl-names = "default";


wifi {
gpios = <&tlmm 8 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_GREEN>;
default-state = "off";
function = LED_FUNCTION_WLAN;
};

sms {
gpios = <&tlmm 9 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_GREEN>;
default-state = "off";
function = LED_FUNCTION_MAIL;
};

red {
gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_RED>;
default-state = "off";
function = LED_FUNCTION_WAN;
};

green {
gpios = <&tlmm 18 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_GREEN>;
default-state = "off";
function = LED_FUNCTION_WAN_ONLINE;
};

blue {
gpios = <&tlmm 19 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_BLUE>;
default-state = "on";
function = LED_FUNCTION_STATUS;
};

bat-red {
gpios = <&tlmm 24 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_RED>;
retain-state-suspended;
function = LED_FUNCTION_CHARGING;
};

bat-green {
gpios = <&tlmm 25 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_GREEN>;
retain-state-suspended;
function = LED_FUNCTION_CHARGING;
};
};

usb_otg_hack: usb-otg-hack {
compatible = "linux,extcon-usb-gpio";

/*
* NOTE: This allows detection of custom-made OTG adapters
*
* Since L8150 doesn't support OTG it's impossible to use normal OTG
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not L8150. Is this true? Did you test this?

* adapters. However since USB_ID is in fact connected to GPIO it's
* possible to detect custom-made OTG adapters that connect USB_ID
* to 5v instead of GND and provie external power.
*
* Downside of this approach is that USB_ID pin is used to change boot
* order of SoC and if device will be powered on with adapter attached
* and powered, it will boot into USB BOOT mode.
*/
id-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&usb_id_default>;
Comment on lines +133 to +134

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pinctrl-names = "default";
pinctrl-0 = <&usb_id_default>;
pinctrl-0 = <&usb_id_default>;
pinctrl-names = "default";

};
};

&bam_dmux {
status = "okay";
};

&bam_dmux_dma {
status = "okay";
};

&blsp_uart2 {
status = "okay";
};

/* Remove &mdss_dsi0_phy from clocks to make sure that gcc probes with display disabled */
&gcc {
clocks = <&xo_board>, <&sleep_clk>, <0>, <0>, <0>, <0>, <0>;
};

&mba_mem {
status = "okay";
};

&mpss {
status = "okay";
};

&mpss_mem {
reg = <0x0 0x86800000 0x0 0x5500000>;
status = "okay";
};

&gpu {
status = "okay";
};

&pm8916_bms {
status = "okay";

monitored-battery = <&battery>;
power-supplies = <&pm8916_charger>;
Comment on lines +173 to +176

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
status = "okay";
monitored-battery = <&battery>;
power-supplies = <&pm8916_charger>;
monitored-battery = <&battery>;
power-supplies = <&pm8916_charger>;
status = "okay";

};

&pm8916_charger {
status = "okay";

monitored-battery = <&battery>;

qcom,fast-charge-safe-current = <900000>;
qcom,fast-charge-safe-voltage = <4300000>;
Comment on lines +180 to +185

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
status = "okay";
monitored-battery = <&battery>;
qcom,fast-charge-safe-current = <900000>;
qcom,fast-charge-safe-voltage = <4300000>;
monitored-battery = <&battery>;
qcom,fast-charge-safe-current = <900000>;
qcom,fast-charge-safe-voltage = <4300000>;
status = "okay";

};

&pm8916_pwm {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pwm_out>;
Comment on lines +189 to +191

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pwm_out>;
pinctrl-0 = <&pwm_out>;
pinctrl-names = "default";
status = "okay";

};

&pm8916_rpm_regulators {
pm8916_l17: l17 {
regulator-min-microvolt = <2850000>;
regulator-max-microvolt = <2850000>;
};
};

&sdhc_1 {
status = "okay";
};

&usb {
status = "okay";
extcon = <&pm8916_charger>, <&usb_otg_hack>;
Comment on lines +206 to +207

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
status = "okay";
extcon = <&pm8916_charger>, <&usb_otg_hack>;
extcon = <&pm8916_charger>, <&usb_otg_hack>;
status = "okay";

};

&usb_hs_phy {
extcon = <&pm8916_charger>;
};

&venus {
status = "okay";
};

&venus_mem {
status = "okay";
};

&wcnss {
status = "okay";
};

&wcnss_iris {
compatible = "qcom,wcn3620";
};

&wcnss_mem {
status = "okay";
};

&tlmm {
gpio_leds_default: gpio-leds-default-state {
function = "gpio";
drive-strength = <2>;
bias-disable;
};

gpio_keys_default: gpio-keys-default-state {
pins = "gpio107";
function = "gpio";

drive-strength = <2>;
bias-pull-up;
};

usb_id_default: usb-id-default-state {
pins = "gpio37";
function = "gpio";

drive-strength = <2>;
bias-pull-down;
};
};

&pm8916_mpps {
pwm_out: mpp4-state {
pins = "mpp4";
function = "digital";
power-source = <PM8916_MPP_VPH>;
output-low;
qcom,dtest = <1>;
};
};
Loading