Repository navigation
arm64: dts: qcom: msm8916-asus-z010d: hardware support and panel fix #450
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
base: wip/msm8916/7.0
Are you sure you want to change the base?
Changes from all commits
aaf4a0b
7f394ed
13cae28
db78e8b
dc13bb8
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,74 @@ | ||
| # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
| %YAML 1.2 | ||
| --- | ||
| $id: http://devicetree.org/schemas/iio/light/dynaimage,ap3216c.yaml# | ||
| $schema: http://devicetree.org/schemas/meta-schemas/core.yaml# | ||
|
|
||
| title: DynaImage AP3216C / AP3426 Ambient Light and Proximity Sensor | ||
|
|
||
| maintainers: | ||
| - Vladislav Dubrovin <foxy9855@gmail.com> | ||
|
|
||
| description: | | ||
| DynaImage AP3216C and AP3426 are integrated digital ambient light, | ||
| proximity, and IR sensor. | ||
|
|
||
| Specifications about the devices can be found at: | ||
| https://github.com/RT-Thread-packages/ap3216c/blob/master/ap3216c_datasheet.pdf | ||
|
|
||
| properties: | ||
| compatible: | ||
| oneOf: | ||
| - items: | ||
| - const: dynaimage,ap3426 | ||
| - const: dynaimage,ap3216c | ||
| - enum: | ||
| - dynaimage,ap3216c | ||
| - dynaimage,ap3426 | ||
|
|
||
| reg: | ||
| maxItems: 1 | ||
|
|
||
| interrupts: | ||
| maxItems: 1 | ||
|
|
||
| vdd-supply: | ||
| description: Regulator powering the sensor VDD pin. | ||
|
|
||
| vddio-supply: | ||
| description: Regulator powering the sensor VDDIO pin. | ||
|
Comment on lines
+38
to
+39
Member
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. which pin in the datasheet is this? Otherwise, required reading: |
||
|
|
||
|
Comment on lines
+35
to
+40
Member
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. intentionally not implemented in the driver? |
||
| proximity-near-level: | ||
| $ref: /schemas/types.yaml#/definitions/uint32 | ||
| description: | ||
| Raw proximity threshold level above which an object is considered "near". | ||
| default: 300 | ||
|
|
||
| required: | ||
| - compatible | ||
| - reg | ||
|
|
||
| additionalProperties: false | ||
|
|
||
| examples: | ||
| - | | ||
| #include <dt-bindings/interrupt-controller/irq.h> | ||
|
|
||
| i2c { | ||
| #address-cells = <1>; | ||
| #size-cells = <0>; | ||
|
|
||
| light-sensor@1e { | ||
| compatible = "dynaimage,ap3426", "dynaimage,ap3216c"; | ||
| reg = <0x1e>; | ||
|
|
||
| interrupt-parent = <&tlmm>; | ||
| interrupts = <113 IRQ_TYPE_EDGE_FALLING>; | ||
| vdd-supply = <&pm8916_l17>; | ||
| vddio-supply = <&pm8916_l6>; | ||
| proximity-near-level = <300>; | ||
|
|
||
| pinctrl-0 = <&als_int_default>; | ||
| pinctrl-names = "default"; | ||
| }; | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,8 @@ | |
|
|
||
| #include <dt-bindings/gpio/gpio.h> | ||
| #include <dt-bindings/input/input.h> | ||
| #include <dt-bindings/interrupt-controller/irq.h> | ||
| #include <dt-bindings/pinctrl/qcom,pmic-gpio.h> | ||
| #include <dt-bindings/leds/common.h> | ||
|
|
||
| / { | ||
|
|
@@ -26,51 +28,50 @@ | |
|
|
||
| gpio-keys { | ||
| compatible = "gpio-keys"; | ||
| label = "GPIO Buttons"; | ||
|
Member
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. a lot of churn happening in this file, is this intentional? |
||
|
|
||
| pinctrl-0 = <&gpio_keys_default>; | ||
| pinctrl-names = "default"; | ||
|
|
||
| label = "GPIO Buttons"; | ||
|
|
||
| volume-up-button { | ||
| label = "Volume Up"; | ||
| gpios = <&tlmm 107 GPIO_ACTIVE_LOW>; | ||
| linux,code = <KEY_VOLUMEUP>; | ||
| gpios = <&tlmm 107 GPIO_ACTIVE_LOW>; | ||
| debounce-interval = <15>; | ||
| }; | ||
| }; | ||
|
|
||
| gpio-hall-sensor { | ||
| compatible = "gpio-keys"; | ||
| label = "GPIO Hall Effect Sensor"; | ||
|
|
||
| pinctrl-0 = <&gpio_hall_sensor_default>; | ||
| pinctrl-names = "default"; | ||
|
|
||
| label = "GPIO Hall Effect Sensor"; | ||
|
|
||
| hall-sensor-switch { | ||
| label = "Hall Effect Sensor"; | ||
| gpios = <&tlmm 115 GPIO_ACTIVE_LOW>; | ||
| linux,input-type = <EV_SW>; | ||
| linux,code = <SW_LID>; | ||
| linux,can-disable; | ||
| gpios = <&tlmm 115 GPIO_ACTIVE_LOW>; | ||
| }; | ||
| }; | ||
|
|
||
| speaker_amp: audio-amplifier { | ||
| compatible = "awinic,aw8738"; | ||
| sound-name-prefix = "Speaker Amp"; | ||
| mode-gpios = <&tlmm 112 GPIO_ACTIVE_HIGH>; | ||
|
|
||
| pinctrl-0 = <&spk_ext_pa_default>; | ||
| pinctrl-names = "default"; | ||
|
|
||
| mode-gpios = <&tlmm 112 GPIO_ACTIVE_HIGH>; | ||
| awinic,mode = <2>; | ||
| sound-name-prefix = "Speaker Amp"; | ||
| }; | ||
|
|
||
| usb_id: usb-id { | ||
| compatible = "linux,extcon-usb-gpio"; | ||
| id-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>; | ||
|
|
||
| pinctrl-0 = <&usb_id_default>; | ||
| pinctrl-names = "default"; | ||
| }; | ||
|
|
@@ -89,6 +90,10 @@ | |
| vdd-supply = <&pm8916_l17>; | ||
| vddio-supply = <&pm8916_l6>; | ||
|
|
||
| mount-matrix = "-1", "0", "0", | ||
| "0", "-1", "0", | ||
| "0", "0", "1"; | ||
|
|
||
| pinctrl-0 = <&accel_int_default>; | ||
| pinctrl-names = "default"; | ||
| }; | ||
|
|
@@ -97,15 +102,28 @@ | |
| compatible = "asahi-kasei,ak09911"; | ||
| reg = <0x0c>; | ||
|
|
||
| reset-gpios = <&tlmm 36 GPIO_ACTIVE_LOW>; | ||
| vdd-supply = <&pm8916_l17>; | ||
| vid-supply = <&pm8916_l6>; | ||
|
|
||
| reset-gpios = <&tlmm 36 GPIO_ACTIVE_LOW>; | ||
|
|
||
| pinctrl-0 = <&mag_reset_default>; | ||
| pinctrl-names = "default"; | ||
| }; | ||
|
|
||
| light-sensor@1e { | ||
| compatible = "dynaimage,ap3426", "dynaimage,ap3216c"; | ||
| reg = <0x1e>; | ||
|
|
||
| interrupt-parent = <&tlmm>; | ||
| interrupts = <113 IRQ_TYPE_EDGE_FALLING>; | ||
| vdd-supply = <&pm8916_l17>; | ||
| vddio-supply = <&pm8916_l6>; | ||
| proximity-near-level = <300>; | ||
|
|
||
| pinctrl-0 = <&als_int_default>; | ||
| pinctrl-names = "default"; | ||
| }; | ||
|
|
||
| led-controller@45 { | ||
| compatible = "awinic,aw2013"; | ||
| reg = <0x45>; | ||
|
|
@@ -117,16 +135,39 @@ | |
|
|
||
| led@0 { | ||
| reg = <0>; | ||
| led-max-microamp = <5000>; | ||
| function = LED_FUNCTION_INDICATOR; | ||
| color = <LED_COLOR_ID_GREEN>; | ||
| led-max-microamp = <5000>; | ||
| }; | ||
|
|
||
| led@1 { | ||
| reg = <1>; | ||
| led-max-microamp = <5000>; | ||
| function = LED_FUNCTION_INDICATOR; | ||
| color = <LED_COLOR_ID_RED>; | ||
| led-max-microamp = <5000>; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| &blsp_i2c4 { | ||
| status = "okay"; | ||
|
|
||
| charger@14 { | ||
| compatible = "qcom,smb1360"; | ||
|
Member
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'm in general confused by this commit trying to do many things at once, but specifically this change with adding the charger should be separate since the driver is not upstream, rest could be --squash into the file that introduces the file (and your either Co-developed-by or [Vladislav: changed blah blah]+ sob. Are you by chance planning to pick up this dts for upstreaming? |
||
| reg = <0x14>; | ||
|
|
||
| interrupt-parent = <&tlmm>; | ||
| interrupts = <62 IRQ_TYPE_LEVEL_LOW>; | ||
|
|
||
| qcom,float-voltage-mv = <4380>; | ||
| qcom,iterm-ma = <200>; | ||
| qcom,recharge-thresh-mv = <100>; | ||
|
|
||
| pinctrl-0 = <&smb1360_default>; | ||
| pinctrl-names = "default"; | ||
|
|
||
| usb-otg-vbus { | ||
| regulator-name = "smb1360_otg_vreg"; | ||
| }; | ||
| }; | ||
|
FoxWind-coder marked this conversation as resolved.
Resolved
|
||
| }; | ||
|
|
@@ -142,11 +183,10 @@ | |
| interrupt-parent = <&tlmm>; | ||
| interrupts = <13 IRQ_TYPE_EDGE_FALLING>; | ||
|
|
||
| reset-gpios = <&tlmm 12 GPIO_ACTIVE_LOW>; | ||
| vcc-supply = <&pm8916_l17>; | ||
| iovcc-supply = <&pm8916_l6>; | ||
|
|
||
| reset-gpios = <&tlmm 12 GPIO_ACTIVE_LOW>; | ||
|
|
||
| touchscreen-size-x = <720>; | ||
| touchscreen-size-y = <1280>; | ||
|
|
||
|
|
@@ -176,8 +216,8 @@ | |
| compatible = "asus,z010d-r69339"; | ||
| reg = <0>; | ||
|
|
||
| power-supply = <&pm8916_l17>; | ||
| reset-gpios = <&tlmm 25 GPIO_ACTIVE_LOW>; | ||
| power-supply = <&pm8916_l17>; | ||
|
|
||
| port { | ||
| panel_in: endpoint { | ||
|
|
@@ -228,21 +268,18 @@ | |
| }; | ||
|
|
||
| &sdhc_2 { | ||
| cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>; | ||
|
|
||
| pinctrl-0 = <&sdc2_default &sdc2_cd_default>; | ||
| pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>; | ||
| pinctrl-names = "default", "sleep"; | ||
|
|
||
| cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>; | ||
|
|
||
| status = "okay"; | ||
| }; | ||
|
|
||
| &sound { | ||
| model = "bq-paella"; | ||
| widgets = | ||
| "Speaker", "Speaker", | ||
| "Headphone", "Headphones"; | ||
| pin-switches = "Speaker"; | ||
|
|
||
| audio-routing = | ||
| "Speaker", "Speaker Amp OUT", | ||
| "Speaker Amp IN", "HPH_R", | ||
|
|
@@ -252,6 +289,10 @@ | |
| "AMIC2", "MIC BIAS Internal2", | ||
| "AMIC3", "MIC BIAS Internal3"; | ||
| aux-devs = <&speaker_amp>; | ||
| pin-switches = "Speaker"; | ||
| widgets = | ||
| "Speaker", "Speaker", | ||
| "Headphone", "Headphones"; | ||
| }; | ||
|
|
||
| &usb { | ||
|
|
@@ -284,6 +325,20 @@ | |
| }; | ||
|
|
||
| &tlmm { | ||
| als_int_default: als-int-default-state { | ||
| pins = "gpio113"; | ||
| function = "gpio"; | ||
| drive-strength = <2>; | ||
| bias-disable; | ||
| }; | ||
|
|
||
| smb1360_default: smb1360-default-state { | ||
| pins = "gpio62"; | ||
| function = "gpio"; | ||
| drive-strength = <2>; | ||
| bias-pull-up; | ||
| }; | ||
|
|
||
| accel_int_default: accel-int-default-state { | ||
| pins = "gpio114"; | ||
| function = "gpio"; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -460,3 +460,4 @@ CONFIG_DYNAMIC_DEBUG=y | |
| CONFIG_MAGIC_SYSRQ=y | ||
| CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x0 | ||
| CONFIG_DEBUG_FS=y | ||
| CONFIG_AP3216C=m | ||
|
Member
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. please generate the config from this defconfig, enable the option and then savedefconfig over it to get the new autogenerated defconfig, and make it a |
||
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.
intentionally not implemented? not sure if there's some event stuff to allow userspace be more efficient with not polling the sensor all the time...