-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dts: qcom: msm8916-mf601: initial support #310
base: msm8916/6.4-rc3
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// SPDX-License-Identifier: GPL-2.0-only | ||
|
||
/dts-v1/; | ||
|
||
#include "msm8916-thwc-mf601xx.dtsi" | ||
|
||
/ { | ||
model = "Tong Heng Wei Chuang 4G Modem Stick MF601SL_CT_V07"; | ||
compatible = "thwc,mf601sl-v7", "qcom,msm8916"; | ||
}; | ||
|
||
&button_wps { | ||
// This button does not exist on this model. | ||
status = "disabled"; | ||
}; | ||
|
||
&leds { | ||
led-wan-green { | ||
color = <LED_COLOR_ID_GREEN>; | ||
function = LED_FUNCTION_WAN; | ||
gpios = <&msmgpio 116 GPIO_ACTIVE_HIGH>; | ||
}; | ||
|
||
led-wan-red { | ||
color = <LED_COLOR_ID_RED>; | ||
function = LED_FUNCTION_WAN; | ||
gpios = <&msmgpio 115 GPIO_ACTIVE_HIGH>; | ||
}; | ||
|
||
led-battery-green { | ||
color = <LED_COLOR_ID_GREEN>; | ||
function = LED_FUNCTION_POWER; | ||
gpios = <&msmgpio 112 GPIO_ACTIVE_HIGH>; | ||
}; | ||
|
||
led-battery-red { | ||
color = <LED_COLOR_ID_RED>; | ||
function = LED_FUNCTION_POWER; | ||
gpios = <&msmgpio 110 GPIO_ACTIVE_HIGH>; | ||
}; | ||
|
||
led-message-green { | ||
color = <LED_COLOR_ID_GREEN>; | ||
function = LED_FUNCTION_INDICATOR; | ||
gpios = <&msmgpio 22 GPIO_ACTIVE_HIGH>; | ||
}; | ||
|
||
led-message-red { | ||
color = <LED_COLOR_ID_RED>; | ||
function = LED_FUNCTION_INDICATOR; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suggest to use |
||
gpios = <&msmgpio 121 GPIO_ACTIVE_HIGH>; | ||
}; | ||
|
||
led-wifi-green { | ||
color = <LED_COLOR_ID_GREEN>; | ||
function = LED_FUNCTION_WLAN; | ||
gpios = <&msmgpio 120 GPIO_ACTIVE_HIGH>; | ||
}; | ||
|
||
led-wifi-red { | ||
color = <LED_COLOR_ID_RED>; | ||
function = LED_FUNCTION_WLAN; | ||
gpios = <&msmgpio 119 GPIO_ACTIVE_HIGH>; | ||
}; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,309 @@ | ||
// SPDX-License-Identifier: GPL-2.0-only | ||
// A common dtsi for MF601xx series LTE modem dongles. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you actually know someone who has and could test this dtsi on a different model? It usually doesn't make sense to create share common properties in a .dtsi when it's not clear yet which models actually exist and what their differences are. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I got the infomation from the photos and EDL-dumped vendor Android images for them(At least 3 variants, such as mf601_mb_v05, mf601_s_v02, mf601_sl_v02(7) and so on) and tested on one. All of the stuff except the naming and usage of the LEDs looks identical. There's also a MF32xx series that should also be able to share this dtsi. There are many people owning other models, maybe i can contact with them. I'll just let it hang there for some time to wait for some others who might be interested in. |
||
|
||
#include "msm8916-pm8916.dtsi" | ||
|
||
#include <dt-bindings/gpio/gpio.h> | ||
#include <dt-bindings/leds/common.h> | ||
|
||
/ { | ||
chassis-type = "embedded"; | ||
|
||
aliases { | ||
serial0 = &blsp1_uart2; | ||
}; | ||
|
||
chosen { | ||
stdout-path = "serial0"; | ||
}; | ||
|
||
reserved-memory { | ||
mpss_mem: mpss@86800000 { | ||
reg = <0x0 0x86800000 0x0 0x5500000>; | ||
no-map; | ||
}; | ||
|
||
gps_mem: gps@8bd00000 { | ||
reg = <0x0 0x8bd00000 0x0 0x200000>; | ||
no-map; | ||
}; | ||
}; | ||
|
||
battery: battery { | ||
compatible = "simple-battery"; | ||
voltage-min-design-microvolt = <3400000>; | ||
voltage-max-design-microvolt = <4200000>; | ||
energy-full-design-microwatt-hours = <7770000>; | ||
charge-full-design-microamp-hours = <2100000>; | ||
|
||
ocv-capacity-celsius = <25>; | ||
ocv-capacity-table-0 = <4189000 100>, <4073000 95>, | ||
<4044000 90>, <4039000 85>, <4032000 80>, <4025000 75>, | ||
<4008000 70>, <3974000 65>, <3953000 60>, <3912000 55>, | ||
<3884000 50>, <3858000 45>, <3849000 40>, <3839000 35>, | ||
<3816000 30>, <3774000 25>, <3690000 20>, <3647000 16>, | ||
<3611000 13>, <3539000 11>, <3477000 10>, <3421000 9>, | ||
<3388000 8>, <3364000 7>, <3328000 6>, <3235000 5>, | ||
<3174000 4>, <3096000 3>, <3062000 2>, <3035000 1>, | ||
<3000000 0>; | ||
}; | ||
|
||
gpio-keys { | ||
compatible = "gpio-keys"; | ||
|
||
pinctrl-0 = <&button_default>; | ||
pinctrl-names = "default"; | ||
|
||
label = "GPIO Buttons"; | ||
|
||
button-restart { | ||
label = "Restart"; | ||
gpios = <&msmgpio 34 GPIO_ACTIVE_LOW>; | ||
linux,code = <KEY_RESTART>; | ||
}; | ||
|
||
button_wps: button-wps { | ||
label = "WPS"; | ||
gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>; | ||
linux,code = <KEY_WPS_BUTTON>; | ||
}; | ||
}; | ||
|
||
leds: leds { | ||
compatible = "gpio-leds"; | ||
|
||
pinctrl-0 = <&gpio_leds_default>; | ||
pinctrl-names = "default"; | ||
|
||
/* LEDs are board-specific */ | ||
}; | ||
}; | ||
|
||
&bam_dmux { | ||
status = "okay"; | ||
}; | ||
|
||
&bam_dmux_dma { | ||
status = "okay"; | ||
}; | ||
|
||
&blsp1_uart2 { | ||
status = "okay"; | ||
}; | ||
|
||
/* Remove &dsi_phy0 from clocks to make sure that gcc probes with display disabled */ | ||
&gcc { | ||
clocks = <&xo_board>, <&sleep_clk>, <0>, <0>, <0>, <0>, <0>; | ||
}; | ||
|
||
&mpss { | ||
pinctrl-0 = <&sim_ctrl_default>; | ||
pinctrl-names = "default"; | ||
|
||
status = "okay"; | ||
}; | ||
|
||
&pm8916_bms { | ||
monitored-battery = <&battery>; | ||
power-supplies = <&pm8916_charger>; | ||
|
||
status = "okay"; | ||
}; | ||
|
||
&pm8916_charger { | ||
qcom,vdd-safe = <4200000>; | ||
qcom,ibat-safe = <500000>; | ||
|
||
monitored-battery = <&battery>; | ||
|
||
status = "okay"; | ||
}; | ||
|
||
#if 0 | ||
&pm8916_usbin { | ||
status = "okay"; | ||
}; | ||
#endif | ||
|
||
&sdhc_1 { | ||
pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>; | ||
pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>; | ||
pinctrl-names = "default", "sleep"; | ||
|
||
status = "okay"; | ||
}; | ||
|
||
&sdhc_2 { | ||
pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>; | ||
pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>; | ||
pinctrl-names = "default", "sleep"; | ||
|
||
status = "okay"; | ||
}; | ||
|
||
&usb { | ||
extcon = <&pm8916_charger>; | ||
usb-role-switch; | ||
|
||
status = "okay"; | ||
}; | ||
|
||
&usb_hs_phy { | ||
extcon = <&pm8916_charger>; | ||
}; | ||
|
||
&wcnss { | ||
status = "okay"; | ||
}; | ||
|
||
&wcnss_iris { | ||
compatible = "qcom,wcn3620"; | ||
}; | ||
|
||
&smd_rpm_regulators { | ||
vdd_l1_l2_l3-supply = <&pm8916_s3>; | ||
vdd_l4_l5_l6-supply = <&pm8916_s4>; | ||
vdd_l7-supply = <&pm8916_s4>; | ||
|
||
s3 { | ||
regulator-min-microvolt = <1200000>; | ||
regulator-max-microvolt = <1300000>; | ||
}; | ||
|
||
s4 { | ||
regulator-min-microvolt = <1800000>; | ||
regulator-max-microvolt = <2100000>; | ||
}; | ||
|
||
l1 { | ||
regulator-min-microvolt = <1225000>; | ||
regulator-max-microvolt = <1225000>; | ||
}; | ||
|
||
l2 { | ||
regulator-min-microvolt = <1200000>; | ||
regulator-max-microvolt = <1200000>; | ||
}; | ||
|
||
l4 { | ||
regulator-min-microvolt = <2050000>; | ||
regulator-max-microvolt = <2050000>; | ||
}; | ||
|
||
l5 { | ||
regulator-min-microvolt = <1800000>; | ||
regulator-max-microvolt = <1800000>; | ||
}; | ||
|
||
l6 { | ||
regulator-min-microvolt = <1800000>; | ||
regulator-max-microvolt = <1800000>; | ||
}; | ||
|
||
l7 { | ||
regulator-min-microvolt = <1800000>; | ||
regulator-max-microvolt = <1800000>; | ||
}; | ||
|
||
l8 { | ||
regulator-min-microvolt = <2850000>; | ||
regulator-max-microvolt = <2900000>; | ||
}; | ||
|
||
l9 { | ||
regulator-min-microvolt = <3300000>; | ||
regulator-max-microvolt = <3300000>; | ||
}; | ||
|
||
l10 { | ||
regulator-min-microvolt = <2700000>; | ||
regulator-max-microvolt = <2800000>; | ||
}; | ||
|
||
l11 { | ||
regulator-min-microvolt = <1800000>; | ||
regulator-max-microvolt = <2950000>; | ||
regulator-system-load = <200000>; | ||
regulator-allow-set-load; | ||
}; | ||
|
||
l12 { | ||
regulator-min-microvolt = <1800000>; | ||
regulator-max-microvolt = <2950000>; | ||
}; | ||
|
||
l13 { | ||
regulator-min-microvolt = <3075000>; | ||
regulator-max-microvolt = <3075000>; | ||
}; | ||
|
||
l14 { | ||
regulator-min-microvolt = <1800000>; | ||
regulator-max-microvolt = <3300000>; | ||
}; | ||
|
||
l15 { | ||
regulator-min-microvolt = <1800000>; | ||
regulator-max-microvolt = <3300000>; | ||
}; | ||
|
||
l16 { | ||
regulator-min-microvolt = <1800000>; | ||
regulator-max-microvolt = <3300000>; | ||
}; | ||
|
||
l17 { | ||
regulator-min-microvolt = <2850000>; | ||
regulator-max-microvolt = <2850000>; | ||
}; | ||
|
||
l18 { | ||
regulator-min-microvolt = <2700000>; | ||
regulator-max-microvolt = <2700000>; | ||
}; | ||
}; | ||
|
||
&msmgpio { | ||
button_default: button-default-state { | ||
function = "gpio"; | ||
drive-strength = <2>; | ||
pins = "gpio34", "gpio107"; | ||
bias-pull-up; | ||
}; | ||
|
||
gpio_leds_default: gpio-leds-default-state { | ||
function = "gpio"; | ||
drive-strength = <2>; | ||
pins = "gpio20", "gpio21", "gpio22", "gpio110", "gpio112", | ||
"gpio113", "gpio114", "gpio115", "gpio116", "gpio117", | ||
"gpio118", "gpio119", "gpio120", "gpio121"; | ||
bias-disable; | ||
}; | ||
|
||
/* This selects the external SIM card slot by default */ | ||
sim_ctrl_default: sim-ctrl-default-state { | ||
esim-sel-pins { | ||
function = "gpio"; | ||
drive-strength = <2>; | ||
pins = "gpio50", "gpio51"; | ||
bias-disable; | ||
output-low; | ||
}; | ||
|
||
sim-en-pins { | ||
function = "gpio"; | ||
drive-strength = <2>; | ||
pins = "gpio24"; | ||
bias-disable; | ||
output-low; | ||
}; | ||
|
||
sim-sel-pins { | ||
function = "gpio"; | ||
drive-strength = <2>; | ||
pins = "gpio49"; | ||
bias-disable; | ||
output-high; | ||
}; | ||
}; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also applies to MF601SL_CT_V02,maybe common across all MF601SL-xxx?