diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index 6d951fbdd44f94..88ef959737ca28 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -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 diff --git a/arch/arm64/boot/dts/qcom/msm8916-fy-mf800.dts b/arch/arm64/boot/dts/qcom/msm8916-fy-mf800.dts new file mode 100644 index 00000000000000..c0d038efd30dcb --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-fy-mf800.dts @@ -0,0 +1,266 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "msm8916-pm8916.dtsi" + +#include +#include +#include +#include +#include + +/ { + 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>; + + label = "GPIO Buttons"; + + button-volume-up { + label = "Volume Up"; + gpios = <&tlmm 107 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + pinctrl-names = "default"; + pinctrl-0 = <&gpio_leds_default>; + + wifi { + gpios = <&tlmm 8 GPIO_ACTIVE_HIGH>; + color = ; + default-state = "off"; + function = LED_FUNCTION_WLAN; + }; + + sms { + gpios = <&tlmm 9 GPIO_ACTIVE_HIGH>; + color = ; + default-state = "off"; + function = LED_FUNCTION_MAIL; + }; + + red { + gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>; + color = ; + default-state = "off"; + function = LED_FUNCTION_WAN; + }; + + green { + gpios = <&tlmm 18 GPIO_ACTIVE_HIGH>; + color = ; + default-state = "off"; + function = LED_FUNCTION_WAN_ONLINE; + }; + + blue { + gpios = <&tlmm 19 GPIO_ACTIVE_HIGH>; + color = ; + default-state = "on"; + function = LED_FUNCTION_STATUS; + }; + + bat-red { + gpios = <&tlmm 24 GPIO_ACTIVE_HIGH>; + color = ; + retain-state-suspended; + function = LED_FUNCTION_CHARGING; + }; + + bat-green { + gpios = <&tlmm 25 GPIO_ACTIVE_HIGH>; + color = ; + 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 + * 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>; + }; +}; + +&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>; +}; + +&pm8916_charger { + status = "okay"; + + monitored-battery = <&battery>; + + qcom,fast-charge-safe-current = <900000>; + qcom,fast-charge-safe-voltage = <4300000>; +}; + +&pm8916_pwm { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pwm_out>; +}; + +&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>; +}; + +&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 = ; + output-low; + qcom,dtest = <1>; + }; +};