-
Notifications
You must be signed in to change notification settings - Fork 128
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
arm64: dts: qcom: msm8939-huawei-rio: Add initial device tree #385
base: msm8916/6.12.1
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,328 @@ | ||||||||||||
// SPDX-License-Identifier: GPL-2.0-only | ||||||||||||
|
||||||||||||
/* | ||||||||||||
*Copyright (c) 2024 Zhiyuan Bai<[email protected]> | ||||||||||||
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. nit
Suggested change
|
||||||||||||
*/ | ||||||||||||
/dts-v1/; | ||||||||||||
|
||||||||||||
#include "msm8939-pm8916.dtsi" | ||||||||||||
#include <dt-bindings/gpio/gpio.h> | ||||||||||||
#include <dt-bindings/leds/common.h> | ||||||||||||
#include <dt-bindings/sound/apq8016-lpass.h> | ||||||||||||
|
||||||||||||
/ { | ||||||||||||
model = "Huawei G7 Plus / G8 / GX8 / Maimang 4"; | ||||||||||||
compatible = "huawei,rio", "qcom,msm8939"; | ||||||||||||
chassis-type = "handset"; | ||||||||||||
|
||||||||||||
aliases { | ||||||||||||
mmc0 = &sdhc_1; /* SDC1 eMMC slot */ | ||||||||||||
mmc1 = &sdhc_2; /* SDC2 SD card slot */ | ||||||||||||
serial0 = &blsp_uart2; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
chosen { | ||||||||||||
stdout-path = "serial0"; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
reserved-memory { | ||||||||||||
qseecom_mem: qseecom@84a00000 { | ||||||||||||
reg = <0x0 0x84a00000 0x0 0x1600000>; | ||||||||||||
no-map; | ||||||||||||
}; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
gpio-hall-sensor { | ||||||||||||
compatible = "gpio-keys"; | ||||||||||||
|
||||||||||||
pinctrl-0 = <&gpio_hall_sensor_default>; | ||||||||||||
pinctrl-names = "default"; | ||||||||||||
|
||||||||||||
label = "GPIO Hall Effect Sensor"; | ||||||||||||
|
||||||||||||
event-hall-sensor { | ||||||||||||
label = "Hall Effect Sensor"; | ||||||||||||
gpios = <&tlmm 69 GPIO_ACTIVE_LOW>; | ||||||||||||
linux,input-type = <EV_SW>; | ||||||||||||
linux,code = <SW_LID>; | ||||||||||||
linux,can-disable; | ||||||||||||
}; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
gpio-keys { | ||||||||||||
compatible = "gpio-keys"; | ||||||||||||
|
||||||||||||
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>; | ||||||||||||
}; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
gpio-leds { | ||||||||||||
compatible = "gpio-leds"; | ||||||||||||
|
||||||||||||
pinctrl-0 = <&gpio_leds_default>; | ||||||||||||
pinctrl-names = "default"; | ||||||||||||
|
||||||||||||
led-0 { | ||||||||||||
gpios = <&tlmm 8 GPIO_ACTIVE_HIGH>; | ||||||||||||
color = <LED_COLOR_ID_RED>; | ||||||||||||
default-state = "off"; | ||||||||||||
function = LED_FUNCTION_INDICATOR; | ||||||||||||
retain-state-suspended; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
led-1 { | ||||||||||||
gpios = <&tlmm 9 GPIO_ACTIVE_HIGH>; | ||||||||||||
color = <LED_COLOR_ID_GREEN>; | ||||||||||||
default-state = "off"; | ||||||||||||
function = LED_FUNCTION_INDICATOR; | ||||||||||||
retain-state-suspended; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
led-2 { | ||||||||||||
gpios = <&tlmm 10 GPIO_ACTIVE_HIGH>; | ||||||||||||
color = <LED_COLOR_ID_BLUE>; | ||||||||||||
default-state = "off"; | ||||||||||||
function = LED_FUNCTION_INDICATOR; | ||||||||||||
retain-state-suspended; | ||||||||||||
}; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
usb_id: usb-id { | ||||||||||||
compatible = "linux,extcon-usb-gpio"; | ||||||||||||
id-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>; | ||||||||||||
pinctrl-0 = <&usb_id_default>; | ||||||||||||
pinctrl-names = "default"; | ||||||||||||
}; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
&blsp_i2c2 { | ||||||||||||
status = "okay"; | ||||||||||||
|
||||||||||||
regulator@3e { | ||||||||||||
compatible = "ti,tps65132"; | ||||||||||||
reg = <0x3e>; | ||||||||||||
|
||||||||||||
pinctrl-0 = <®_lcd_en_default>; | ||||||||||||
pinctrl-names = "default"; | ||||||||||||
|
||||||||||||
reg_lcd_pos: outp { | ||||||||||||
regulator-name = "outp"; | ||||||||||||
regulator-min-microvolt = <5400000>; | ||||||||||||
regulator-max-microvolt = <5400000>; | ||||||||||||
enable-gpios = <&tlmm 97 GPIO_ACTIVE_HIGH>; | ||||||||||||
regulator-active-discharge = <1>; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
reg_lcd_neg: outn { | ||||||||||||
regulator-name = "outn"; | ||||||||||||
regulator-min-microvolt = <5400000>; | ||||||||||||
regulator-max-microvolt = <5400000>; | ||||||||||||
enable-gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>; | ||||||||||||
regulator-active-discharge = <1>; | ||||||||||||
}; | ||||||||||||
}; | ||||||||||||
}; | ||||||||||||
&blsp_i2c5 { | ||||||||||||
Comment on lines
+132
to
+133
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. nit
Suggested change
|
||||||||||||
status = "okay"; | ||||||||||||
|
||||||||||||
touchscreen@1c { | ||||||||||||
compatible = "cypress,tt21000"; | ||||||||||||
|
||||||||||||
reg = <0x1c>; | ||||||||||||
Comment on lines
+137
to
+139
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.
Suggested change
|
||||||||||||
|
||||||||||||
interrupts-extended = <&tlmm 13 IRQ_TYPE_EDGE_FALLING>; | ||||||||||||
reset-gpios = <&tlmm 12 GPIO_ACTIVE_LOW>; | ||||||||||||
|
||||||||||||
vdd-supply = <&pm8916_l17>; | ||||||||||||
vddio-supply = <&pm8916_l16>; | ||||||||||||
|
||||||||||||
pinctrl-0 = <&touchscreen_default>; | ||||||||||||
pinctrl-names = "default"; | ||||||||||||
}; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
&blsp_uart2 { | ||||||||||||
status = "okay"; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
&gpu { | ||||||||||||
status = "okay"; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
&lpass { | ||||||||||||
status = "okay"; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
&lpass_codec { | ||||||||||||
status = "okay"; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
&mdss { | ||||||||||||
status = "okay"; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
&mdss_dsi0 { | ||||||||||||
pinctrl-0 = <&mdss_default>; | ||||||||||||
pinctrl-1 = <&mdss_sleep>; | ||||||||||||
pinctrl-names = "default", "sleep"; | ||||||||||||
status = "okay"; | ||||||||||||
|
||||||||||||
panel@0 { | ||||||||||||
compatible = "huawei,rio-panel"; | ||||||||||||
reg = <0>; | ||||||||||||
|
||||||||||||
vsp-supply = <®_lcd_pos>; | ||||||||||||
vsn-supply = <®_lcd_neg>; | ||||||||||||
reset-gpios = <&tlmm 25 GPIO_ACTIVE_LOW>; | ||||||||||||
|
||||||||||||
port { | ||||||||||||
panel_in: endpoint { | ||||||||||||
remote-endpoint = <&mdss_dsi0_out>; | ||||||||||||
}; | ||||||||||||
}; | ||||||||||||
}; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
&mdss_dsi0_out { | ||||||||||||
data-lanes = <0 1 2 3>; | ||||||||||||
remote-endpoint = <&panel_in>; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
&mdss_dsi0_phy { | ||||||||||||
qcom,dsi-phy-regulator-ldo-mode; | ||||||||||||
status = "okay"; | ||||||||||||
}; | ||||||||||||
Comment on lines
+168
to
+202
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. This is optional but if you split up display into a separate commit (i.e. like 3e3d375) then you can upstream most of the other changes already, which I'd greatly appreciate |
||||||||||||
|
||||||||||||
&pm8916_l8 { | ||||||||||||
regulator-min-microvolt = <2950000>; | ||||||||||||
regulator-max-microvolt = <2950000>; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
&pm8916_resin { | ||||||||||||
linux,code = <KEY_VOLUMEDOWN>; | ||||||||||||
status = "okay"; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
&pm8916_rpm_regulators { | ||||||||||||
pm8916_l16: l16 { | ||||||||||||
regulator-min-microvolt = <1800000>; | ||||||||||||
regulator-max-microvolt = <1800000>; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
pm8916_l17: l17 { | ||||||||||||
regulator-min-microvolt = <2850000>; | ||||||||||||
regulator-max-microvolt = <2850000>; | ||||||||||||
}; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
&pm8916_vib { | ||||||||||||
status = "okay"; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
&sdhc_1 { | ||||||||||||
status = "okay"; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
&sdhc_2 { | ||||||||||||
pinctrl-0 = <&sdc2_default &sdc2_cd_default>; | ||||||||||||
pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>; | ||||||||||||
pinctrl-names = "default", "sleep"; | ||||||||||||
|
||||||||||||
cd-gpios = <&tlmm 38 GPIO_ACTIVE_HIGH>; | ||||||||||||
|
||||||||||||
status = "okay"; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
&usb { | ||||||||||||
extcon = <&usb_id>, <&usb_id>; | ||||||||||||
status = "okay"; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
&usb_hs_phy { | ||||||||||||
extcon = <&usb_id>; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
&wcnss { | ||||||||||||
status = "okay"; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
&wcnss_iris { | ||||||||||||
compatible = "qcom,wcn3620"; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
&wcnss_mem { | ||||||||||||
status = "okay"; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
&tlmm { | ||||||||||||
gpio_hall_sensor_default: gpio-hall-sensor-default-state { | ||||||||||||
pins = "gpio69"; | ||||||||||||
function = "gpio"; | ||||||||||||
drive-strength = <2>; | ||||||||||||
bias-disable; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
gpio_keys_default: gpio-keys-default-state { | ||||||||||||
pins = "gpio107"; | ||||||||||||
function = "gpio"; | ||||||||||||
drive-strength = <2>; | ||||||||||||
bias-pull-up; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
gpio_leds_default: gpio-leds-default-state { | ||||||||||||
pins = "gpio8", "gpio9", "gpio10"; | ||||||||||||
function = "gpio"; | ||||||||||||
drive-strength = <2>; | ||||||||||||
bias-disable; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
mdss_default: mdss-default-state { | ||||||||||||
pins = "gpio25"; | ||||||||||||
function = "gpio"; | ||||||||||||
drive-strength = <8>; | ||||||||||||
bias-disable; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
mdss_sleep: mdss-sleep-state { | ||||||||||||
pins = "gpio25"; | ||||||||||||
function = "gpio"; | ||||||||||||
drive-strength = <2>; | ||||||||||||
bias-pull-down; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
reg_lcd_en_default: reg-lcd-en-default-state { | ||||||||||||
pins = "gpio32", "gpio97"; | ||||||||||||
function = "gpio"; | ||||||||||||
drive-strength = <2>; | ||||||||||||
bias-disable; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
sdc2_cd_default: sdc2-cd-default-state { | ||||||||||||
pins = "gpio38"; | ||||||||||||
function = "gpio"; | ||||||||||||
drive-strength = <2>; | ||||||||||||
bias-disable; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
touchscreen_default: touchscreen-default-state { | ||||||||||||
pins = "gpio12", "gpio13"; | ||||||||||||
function = "gpio"; | ||||||||||||
drive-strength = <2>; | ||||||||||||
bias-disable; | ||||||||||||
}; | ||||||||||||
|
||||||||||||
usb_id_default: usb-id-default-state { | ||||||||||||
pins = "gpio110"; | ||||||||||||
function = "gpio"; | ||||||||||||
drive-strength = <8>; | ||||||||||||
bias-pull-up; | ||||||||||||
}; | ||||||||||||
}; |
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.
Commit message: the prefix is wrong, I'd also appreciate if you could fill in the message like it's done for other device introduction commits.