diff options
author | Alice Sheng <alicesheng@google.com> | 2021-02-17 17:30:50 -0800 |
---|---|---|
committer | Alice Sheng <alicesheng@google.com> | 2021-03-02 18:23:55 +0000 |
commit | ac9cd2221084a710e98c3cb6a738ea8fa54f7aff (patch) | |
tree | 4996686d792c5599ba9dee83e849c92417816438 | |
parent | 78449e59c08587cc5c6d5fb849894ae526e514db (diff) | |
download | devicetree-ac9cd2221084a710e98c3cb6a738ea8fa54f7aff.tar.gz |
Add initial EVT devicetree files
Also, fix some bugs where the dev2 battery parameters got the wrong
values (those bugs already are fixed on 4.9)
Bug: 179930185
Change-Id: Ica3d8b7ee471de9afff7f92eb819e0d26dcab0da
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | r11_dev1_battery_root.dtsi | 6 | ||||
-rw-r--r-- | r11_dev1_common.dtsi | 2 | ||||
-rw-r--r-- | r11_dev2_boe_overlay.dts | 2 | ||||
-rw-r--r-- | r11_dev2_btwifi_overlay.dts | 2 | ||||
-rw-r--r-- | r11_dev2_overlay.dts | 2 | ||||
-rw-r--r-- | r11_evt1_battery_root.dtsi | 287 | ||||
-rw-r--r-- | r11_evt1_btwifi_overlay.dts | 48 | ||||
-rw-r--r-- | r11_evt1_common.dtsi | 65 | ||||
-rw-r--r-- | r11_evt1_overlay.dts | 45 | ||||
-rw-r--r-- | r11_evt1_wlc.dtsi | 39 | ||||
-rw-r--r-- | r11_proto1_btwifi_overlay.dts | 2 | ||||
-rw-r--r-- | r11_proto1_common.dtsi | 2 | ||||
-rw-r--r-- | r11_proto1_overlay.dts | 2 | ||||
-rw-r--r-- | r11_spi0_nanohub.dtsi (renamed from r11_nanohub.dtsi) | 0 | ||||
-rw-r--r-- | r11_spi0_st54_ese.dtsi | 45 | ||||
-rw-r--r-- | r11_spi4_nanohub.dtsi | 85 | ||||
-rw-r--r-- | r11_spi4_st54_ese.dtsi (renamed from r11_st54_ese.dtsi) | 0 |
18 files changed, 626 insertions, 10 deletions
@@ -6,6 +6,8 @@ dtbo-y += r11_dev2_btwifi_overlay.dtbo dtbo-y += r11_proto1_overlay.dtbo dtbo-y += r11_proto1_btwifi_overlay.dtbo dtbo-y += r11_proto11_no_nfc_overlay.dtbo +dtbo-y += r11_evt1_overlay.dtbo +dtbo-y += r11_evt1_btwifi_overlay.dtbo always := $(dtb-y) $(dtbo-y) subdir-y := $(dts-dirs) diff --git a/r11_dev1_battery_root.dtsi b/r11_dev1_battery_root.dtsi index 3d7ca8c..fcf7692 100644 --- a/r11_dev1_battery_root.dtsi +++ b/r11_dev1_battery_root.dtsi @@ -32,12 +32,12 @@ google_battery: battery { 90 0 >; battery,chg_temp_limits = <0 100 200 420 460 480 550>; - battery,topoff_current = <15>; + battery,topoff_current = <30>; battery,full_check_type = <7>; // used by s2mpw02_charger battery,full_check_type_2nd = <7>; // used by s2mpw02_charger battery,full_check_count = <1>; - battery,chg_recharge_vcell = <4250>; + battery,chg_recharge_vcell = <4175>; battery,full_check_condition_soc = <90>; battery,temp_hysteresis = <10>; // 1 degree @@ -229,7 +229,7 @@ thermal-zones { thermal-sensors = <&tsmab104_ntc 0>; }; BATT_NTC { - polling-delay = <15000>; /* milliseconds */ + polling-delay = <1000>; /* milliseconds */ polling-delay-passive = <0>; /* milliseconds */ thermal-sensors = <&tsmab104_ntc 1>; }; diff --git a/r11_dev1_common.dtsi b/r11_dev1_common.dtsi index 4216b18..b262e01 100644 --- a/r11_dev1_common.dtsi +++ b/r11_dev1_common.dtsi @@ -20,7 +20,7 @@ #include "r11_bcm47765_gnss.dtsi" #include "r11_dev1_audio_haptics.dtsi" #include "r11_dev1_wlc.dtsi" -#include "r11_nanohub.dtsi" +#include "r11_spi0_nanohub.dtsi" #include "r11_dev1_crown.dtsi" #include "r11_adc.dtsi" diff --git a/r11_dev2_boe_overlay.dts b/r11_dev2_boe_overlay.dts index 31d2c08..ff63c2c 100644 --- a/r11_dev2_boe_overlay.dts +++ b/r11_dev2_boe_overlay.dts @@ -21,7 +21,7 @@ #include <dt-bindings/interrupt-controller/exynos9110.h> #include "r11_st21_nfc.dtsi" -#include "r11_st54_ese.dtsi" +#include "r11_spi4_st54_ese.dtsi" #include "r11_cp.dtsi" #include "r11_dev1_common.dtsi" #include "r11_boe_display_lcd.dtsi" diff --git a/r11_dev2_btwifi_overlay.dts b/r11_dev2_btwifi_overlay.dts index 3a5837a..66e7580 100644 --- a/r11_dev2_btwifi_overlay.dts +++ b/r11_dev2_btwifi_overlay.dts @@ -23,7 +23,7 @@ /* kernel crashes without this. need to investigate */ #include "r11_cp.dtsi" #include "r11_st21_nfc.dtsi" -#include "r11_st54_ese.dtsi" +#include "r11_spi4_st54_ese.dtsi" #include "r11_dev1_common.dtsi" #include "r11_auo_display_lcd.dtsi" #include "r11_raydium_touchscreen.dtsi" diff --git a/r11_dev2_overlay.dts b/r11_dev2_overlay.dts index 0b023c5..d758810 100644 --- a/r11_dev2_overlay.dts +++ b/r11_dev2_overlay.dts @@ -21,7 +21,7 @@ #include <dt-bindings/interrupt-controller/exynos9110.h> #include "r11_st21_nfc.dtsi" -#include "r11_st54_ese.dtsi" +#include "r11_spi4_st54_ese.dtsi" #include "r11_cp.dtsi" #include "r11_dev1_common.dtsi" #include "r11_auo_display_lcd.dtsi" diff --git a/r11_evt1_battery_root.dtsi b/r11_evt1_battery_root.dtsi new file mode 100644 index 0000000..36cbe74 --- /dev/null +++ b/r11_evt1_battery_root.dtsi @@ -0,0 +1,287 @@ +/* +* Google R11 battery root DTSI file +* +* Copyright 2020 Google LLC +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 and +* only version 2 as published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +google_battery: battery { + status = "okay"; + compatible = "google,battery"; + battery,charger_name = "s2mpw02-charger"; + battery,fuelgauge_name = "s2mpw02-fuelgauge"; + battery,wlc_name = "hl6111-charger"; + battery,bat_tz_name = "BATT_NTC"; + battery,wlc_tz_name = "PPG_NTC"; + battery,wlc_cdev_name = "wlc_cool_dev"; + + battery,vendor = "Desay"; + battery,chg_volt_limits = <4200 4300>; + battery,chg_cc_limits = < + 90 30 + 150 90 + 300 210 + 240 150 + 150 150 + 90 0 + >; + battery,chg_temp_limits = <0 100 200 420 460 480 550>; + battery,topoff_current = <30>; + battery,wlc_vout_headroom = <170>; + battery,wlc_vout_min = <4150>; + + battery,full_check_type = <7>; // used by s2mpw02_charger + battery,full_check_type_2nd = <7>; // used by s2mpw02_charger + battery,full_check_count = <1>; + battery,chg_recharge_vcell = <4175>; + battery,full_check_condition_soc = <90>; + + battery,temp_hysteresis = <10>; // 1 degree + battery,voltage_hysteresis = <100>; // 100 mV + battery,max_rawsoc = <10000>; /* In units of 0.001% */ +}; + +wlc_cool_dev: wlc_cool_dev { + #cooling-cells = <2>; +}; + +tsmab104_ntc: thermal-sensor { + compatible = "google,ntc-thermal"; + #thermal-sensor-cells = <1>; + io-channels = <&exynos_adc 0>, <&exynos_adc 1>, <&exynos_adc 2>, <&exynos_adc 4>, <&exynos_adc 6>; + io-channel-names = "soc-ntc", "batt-ntc", "lte-ntc", "audio-ntc", "ppg-ntc"; + enable-gpio = <&gpg2 0 0>; + ref-voltage = <1800000>; + + temperature-lookup-table = < + (-40000) 1759597 + (-39000) 1756791 + (-38000) 1753807 + (-37000) 1750636 + (-36000) 1747271 + (-35000) 1743701 + (-34000) 1739916 + (-33000) 1735904 + (-32000) 1731658 + (-31000) 1727161 + (-30000) 1722404 + (-29000) 1717374 + (-28000) 1712058 + (-27000) 1706450 + (-26000) 1700525 + (-25000) 1694286 + (-24000) 1687711 + (-23000) 1680795 + (-22000) 1673533 + (-21000) 1665892 + (-20000) 1657887 + (-19000) 1649498 + (-18000) 1640722 + (-17000) 1631543 + (-16000) 1621955 + (-15000) 1611952 + (-14000) 1601528 + (-13000) 1590676 + (-12000) 1579393 + (-11000) 1567667 + (-10000) 1555505 + (-9000) 1542890 + (-8000) 1529831 + (-7000) 1516321 + (-6000) 1502361 + (-5000) 1487944 + (-4000) 1473084 + (-3000) 1457775 + (-2000) 1442019 + (-1000) 1425826 + 0 1409197 + 1000 1392142 + 2000 1374679 + 3000 1356803 + 4000 1338533 + 5000 1319885 + 6000 1300873 + 7000 1281522 + 8000 1261835 + 9000 1241843 + 10000 1221557 + 11000 1200998 + 12000 1180208 + 13000 1159203 + 14000 1138016 + 15000 1116655 + 16000 1095168 + 17000 1073549 + 18000 1051870 + 19000 1030111 + 20000 1008339 + 21000 986588 + 22000 964849 + 23000 943143 + 24000 921566 + 25000 900090 + 26000 878714 + 27000 857513 + 28000 836490 + 29000 815667 + 30000 795065 + 31000 774704 + 32000 754595 + 33000 734760 + 34000 715218 + 35000 695970 + 36000 677035 + 37000 658426 + 38000 640146 + 39000 622213 + 40000 604622 + 41000 587389 + 42000 570517 + 43000 553998 + 44000 537852 + 45000 522072 + 46000 506655 + 47000 491604 + 48000 476918 + 49000 462605 + 50000 448649 + 51000 435050 + 52000 421809 + 53000 408932 + 54000 396393 + 55000 384193 + 56000 372335 + 57000 360817 + 58000 349627 + 59000 338759 + 60000 328197 + 61000 317957 + 62000 308019 + 63000 298373 + 64000 289020 + 65000 279948 + 66000 271169 + 67000 262642 + 68000 254392 + 69000 246401 + 70000 238666 + 71000 231167 + 72000 223901 + 73000 216873 + 74000 210077 + 75000 203505 + 76000 197136 + 77000 190975 + 78000 185013 + 79000 179254 + 80000 173675 + 81000 168279 + 82000 163072 + 83000 158033 + 84000 153161 + 85000 148450 + 86000 143896 + 87000 139494 + 88000 135239 + 89000 131125 + 90000 127150 + 91000 123307 + 92000 119593 + 93000 116002 + 94000 112532 + 95000 109178 + 96000 105935 + 97000 102799 + 98000 99770 + 99000 96840 + 100000 94007 + 101000 91268 + 102000 88620 + 103000 86060 + 104000 83584 + 105000 81190 + 106000 78872 + 107000 76631 + 108000 74464 + 109000 72365 + 110000 70337 + 111000 68372 + 112000 66470 + 113000 64630 + 114000 62850 + 115000 61125 + 116000 59454 + 117000 57836 + 118000 56270 + 119000 54752 + 120000 53282 + 121000 51855 + 122000 50476 + 123000 49136 + 124000 47839 + 125000 46580 >; +}; + +thermal-zones { + SOC_NTC { + polling-delay = <15000>; /* milliseconds */ + polling-delay-passive = <0>; /* milliseconds */ + thermal-sensors = <&tsmab104_ntc 0>; + }; + BATT_NTC { + polling-delay = <1000>; /* milliseconds */ + polling-delay-passive = <0>; /* milliseconds */ + thermal-sensors = <&tsmab104_ntc 1>; + trips { + battery_shutdown: battery-shutdown { + temperature = <60000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + LTE_PA_NTC { + polling-delay = <15000>; /* milliseconds */ + polling-delay-passive = <0>; /* milliseconds */ + thermal-sensors = <&tsmab104_ntc 2>; + }; + AUDIO_NTC { + polling-delay = <15000>; /* milliseconds */ + polling-delay-passive = <0>; /* milliseconds */ + thermal-sensors = <&tsmab104_ntc 3>; + }; + PPG_NTC { + polling-delay = <1000>; /* milliseconds */ + polling-delay-passive = <0>; /* milliseconds */ + thermal-sensors = <&tsmab104_ntc 4>; + governor = "bang_bang"; + trips { + // TODO: Adjust these thresholds using EVT data + // Because the NTC location has changed + wlc_throttle: wlc-throttle { + temperature = <49000>; + hysteresis = <2000>; + type = "passive"; + }; + skin_backup_shutdown: skin-backup-shutdown { + temperature = <53000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + cooling-maps { + wireless-charge-disabled { + trip = <&wlc_throttle>; + cooling-device = <&wlc_cool_dev (~0) (~0) >; /* THERMAL_NO_LIMIT THERMAL_NO_LIMIT */ + }; + }; + }; +}; diff --git a/r11_evt1_btwifi_overlay.dts b/r11_evt1_btwifi_overlay.dts new file mode 100644 index 0000000..2db3668 --- /dev/null +++ b/r11_evt1_btwifi_overlay.dts @@ -0,0 +1,48 @@ +/* + * Google R11 DTSO file + * + * Copyright 2020 Google LLC + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/dts-v1/; +/plugin/; + +#include <dt-bindings/clock/exynos9110.h> +#include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/interrupt-controller/exynos9110.h> + +/* kernel crashes without this. need to investigate */ +#include "r11_cp.dtsi" +#include "r11_st21_nfc.dtsi" +#include "r11_spi0_st54_ese.dtsi" +#include "r11_proto1_common.dtsi" + +/ { + compatible = "google,r11"; + board_id = <0x010203>; + board_rev = <0x010000>; + + fragment@common { + target-path = "/"; + __overlay__ { + #address-cells = <2>; + #size-cells = <1>; + model = "Google R11 BtWifi Proto1"; + + chosen { + bootargs = "console=ttySAC0,115200 ecd_setup=disable sec_debug.cp=0 androidboot.selinux=permissive"; + }; + /include/ "r11_evt1_battery_root.dtsi" + /include/ "r11_common_root.dtsi" + }; + }; +}; diff --git a/r11_evt1_common.dtsi b/r11_evt1_common.dtsi new file mode 100644 index 0000000..54bff36 --- /dev/null +++ b/r11_evt1_common.dtsi @@ -0,0 +1,65 @@ +/* + * Google R11 common DTSI file + * + * Copyright 2020 Google LLC + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include "r11_common.dtsi" +#include "r11_adc.dtsi" +#include "r11_bcm430132_bluetooth.dtsi" +#include "r11_bcm430132_wifi.dtsi" +#include "r11_bcm47765_gnss.dtsi" +#include "r11_proto1_audio_haptics.dtsi" +#include "r11_boe_display_lcd.dtsi" +#include "r11_evt1_wlc.dtsi" +#include "r11_spi4_nanohub.dtsi" +#include "r11_proto1_crown.dtsi" +#include "r11_novatek_touchscreen.dtsi" +#include "r11_adc.dtsi" + +®ulators { + ldo15_reg: LDO15 { + regulator-name = "vdd_ldo15"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1300000>; + regulator-ramp-delay = <12000>; + regulator-initial-mode = <0>; + }; + ldo22_reg: LDO22 { + regulator-name = "vdd_ldo22"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3375000>; + regulator-ramp-delay = <12000>; + regulator-initial-mode = <0>; + }; + ldo28_reg: LDO28 { + regulator-name = "vdd_ldo28"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1300000>; + regulator-ramp-delay = <12000>; + regulator-initial-mode = <0>; + }; + ldo29_reg: LDO29 { + regulator-name = "vdd_ldo29"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3375000>; + regulator-ramp-delay = <12000>; + regulator-initial-mode = <0>; + }; + ldo30_reg: LDO30 { + regulator-name = "vdd_ldo30"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1300000>; + regulator-ramp-delay = <12000>; + regulator-initial-mode = <0>; + }; +}; diff --git a/r11_evt1_overlay.dts b/r11_evt1_overlay.dts new file mode 100644 index 0000000..7db981e --- /dev/null +++ b/r11_evt1_overlay.dts @@ -0,0 +1,45 @@ +/* + * Google R11 DTSO file + * + * Copyright 2020 Google LLC + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/dts-v1/; +/plugin/; + +#include <dt-bindings/clock/exynos9110.h> +#include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/interrupt-controller/exynos9110.h> + +#include "r11_st21_nfc.dtsi" +#include "r11_spi0_st54_ese.dtsi" +#include "r11_cp.dtsi" +#include "r11_proto1_common.dtsi" + +/ { + compatible = "google,r11"; + board_id = <0x010103>; + board_rev = <0x010000>; + + fragment@common { + target-path = "/"; + __overlay__ { + model = "Google R11 Proto1"; + + chosen { + bootargs = "console=ttySAC0,115200 ecd_setup=disable sec_debug.cp=0 androidboot.selinux=permissive"; + }; + /include/ "r11_evt1_battery_root.dtsi" + /include/ "r11_common_root.dtsi" + }; + }; +}; diff --git a/r11_evt1_wlc.dtsi b/r11_evt1_wlc.dtsi new file mode 100644 index 0000000..d04c5a5 --- /dev/null +++ b/r11_evt1_wlc.dtsi @@ -0,0 +1,39 @@ +#include <dt-bindings/pinctrl/samsung.h> + +&i2c_1 { + #address-cells = <1>; + #size-cells = <0>; + status = "ok"; /* Enable I2C1 */ + hl6111@25 { + compatible = "halo,hl6111"; + reg = <0x25>; + halo,int-gpio = <&gpa1 3 0>; + halo,det-gpio = <&gpm21 0 0>; + halo,clm-vth = <0x07>; + halo,bypass = <0x00>; //5.0V + halo,ldop = <0x00>; //1.8V + halo,vout-range = <0x03>; //16mV step + halo,trgt-vout = <0x26>; //4.56V + halo,trgt-vrect = <0x02>; //6V + halo,temp-limit = <0x17>; // default + + pinctrl-names = "default"; + pinctrl-0 = <&wlc_irq &wlc_det>; + }; +}; + +&pinctrl_0 { + wlc_irq: wlc_irq { + samsung,pins = "gpa1-3"; + samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + }; +}; + +&pinctrl_1 { + wlc_det: wlc_det { + samsung,pins = "gpm21-0"; + samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + }; +}; diff --git a/r11_proto1_btwifi_overlay.dts b/r11_proto1_btwifi_overlay.dts index 21b0307..5c4d2a7 100644 --- a/r11_proto1_btwifi_overlay.dts +++ b/r11_proto1_btwifi_overlay.dts @@ -23,7 +23,7 @@ /* kernel crashes without this. need to investigate */ #include "r11_cp.dtsi" #include "r11_st21_nfc.dtsi" -#include "r11_st54_ese.dtsi" +#include "r11_spi4_st54_ese.dtsi" #include "r11_proto1_common.dtsi" / { diff --git a/r11_proto1_common.dtsi b/r11_proto1_common.dtsi index 217c523..7500123 100644 --- a/r11_proto1_common.dtsi +++ b/r11_proto1_common.dtsi @@ -21,7 +21,7 @@ #include "r11_proto1_audio_haptics.dtsi" #include "r11_boe_display_lcd.dtsi" #include "r11_proto1_wlc.dtsi" -#include "r11_nanohub.dtsi" +#include "r11_spi0_nanohub.dtsi" #include "r11_proto1_crown.dtsi" #include "r11_novatek_touchscreen.dtsi" diff --git a/r11_proto1_overlay.dts b/r11_proto1_overlay.dts index a7dd4f0..baf28f7 100644 --- a/r11_proto1_overlay.dts +++ b/r11_proto1_overlay.dts @@ -21,7 +21,7 @@ #include <dt-bindings/interrupt-controller/exynos9110.h> #include "r11_st21_nfc.dtsi" -#include "r11_st54_ese.dtsi" +#include "r11_spi4_st54_ese.dtsi" #include "r11_cp.dtsi" #include "r11_proto1_common.dtsi" diff --git a/r11_nanohub.dtsi b/r11_spi0_nanohub.dtsi index 2eca070..2eca070 100644 --- a/r11_nanohub.dtsi +++ b/r11_spi0_nanohub.dtsi diff --git a/r11_spi0_st54_ese.dtsi b/r11_spi0_st54_ese.dtsi new file mode 100644 index 0000000..1e3d99c --- /dev/null +++ b/r11_spi0_st54_ese.dtsi @@ -0,0 +1,45 @@ +/* + * Device Tree config for the ST54J/ST33 NFC eSE chip + */ + +#include <dt-bindings/pinctrl/samsung.h> + +/*******/ +/* eSE */ +/*******/ + +&spi_0 { + #address-cells = <1>; + #size-cells = <0>; + status = "ok"; + pinctrl-names = "default"; + pinctrl-0 = <&spi0_bus &spi0_cs>; + + ese: ese@0 { + compatible = "st,st54j_se"; + reg = <0>; + spi-max-frequency = <8000000>; /* Arbitrary SPI CLK FREQ */ + esereset-gpios = <&gpg0 0 0x00>; /* SOC_NFC_ESE_RST_L */ + pinctrl-names = "default"; + pinctrl-0 = <&ese_nreset>; + status = "ok"; + + controller-data { + cs-gpio = <&gpm3 0 0>; + cs-clock-delay = <10>; + samsung,spi-chip-select-mode = <0>; + }; + }; +}; + +&pinctrl_5 { + /* SOC_NFC_ESE_RST_L */ + ese_nreset: ese-nreset { + samsung,pins = "gpg0-0"; + samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + samsung,pin-drv = <0>; /* LVL1 DRV */ + samsung,pin-con-pdn = <EXYNOS_PIN_PDN_PREV>; + samsung,pin-pud-pdn = <EXYNOS_PIN_PULL_NONE>; + }; +}; diff --git a/r11_spi4_nanohub.dtsi b/r11_spi4_nanohub.dtsi new file mode 100644 index 0000000..8fe1b5c --- /dev/null +++ b/r11_spi4_nanohub.dtsi @@ -0,0 +1,85 @@ +/* + * Device Tree config for nanohub + */ + +#include <dt-bindings/pinctrl/samsung.h> + +&spi_4 { + #address-cells = <1>; + #size-cells = <0>; + status = "ok"; + pinctrl-names = "default"; + pinctrl-0 = <&spi4_bus>; + + sensorhub@0 { + compatible = "nanohub"; + reg = <0>; + spi-max-frequency = <33333333>; + spi-cpol; + spi-cpha; + sensorhub,wakeup-gpio = <&gpg4 0 0>; + sensorhub,nreset-gpio = <&gpg3 0 0>; + sensorhub,boot0-gpio = <&gpg7 2 0>; + sensorhub,irq1-gpio = <&gpa0 7 0>; + sensorhub,irq2-gpio = <&gpa0 6 0>; + sensorhub,spi-cs-gpio = <&gpp4 3 0>; + pinctrl-names = "default"; + pinctrl-0 = <&sensorhub_nreset &sensorhub_boot0 &sensorhub_wakeup &sensorhub_irq1 &sensorhub_irq2 &sensorhub_spi_cs>; + status = "ok"; + + controller-data { + samsung,spi-chip-select-mode = <0>; + }; + }; +}; + +&pinctrl_0 { + sensorhub_irq1: sensorhub-irq1 { + samsung,pins = "gpa0-7"; + samsung,pin-function = <EXYNOS_PIN_FUNC_F>; + samsung,pin-pud = <EXYNOS_PIN_PULL_UP>; + }; + sensorhub_irq2: sensorhub-irq2 { + samsung,pins = "gpa0-6"; + samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>; + samsung,pin-pud = <EXYNOS_PIN_PULL_UP>; + }; +}; + +&pinctrl_1 { + sensorhub_spi_cs: sensorhub-spi-cs { + samsung,pins = "gpm3-0"; + samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + samsung,pin-drv = <0>; /* LVL1 DRV */ + samsung,pin-con-pdn = <EXYNOS_PIN_PDN_PREV>; + samsung,pin-pud-pdn = <EXYNOS_PIN_PULL_NONE>; + }; +}; + +&pinctrl_5 { + sensorhub_nreset: sensorhub-nreset { + samsung,pins = "gpg3-0"; + samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + samsung,pin-drv = <0>; /* LVL1 DRV */ + samsung,pin-con-pdn = <EXYNOS_PIN_PDN_PREV>; + samsung,pin-pud-pdn = <EXYNOS_PIN_PULL_NONE>; + }; + sensorhub_wakeup: sensorhub-wakeup { + samsung,pins = "gpg4-0"; + samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + samsung,pin-drv = <0>; /* LVL1 DRV */ + samsung,pin-con-pdn = <EXYNOS_PIN_PDN_PREV>; + samsung,pin-pud-pdn = <EXYNOS_PIN_PULL_NONE>; + }; + sensorhub_boot0: sensorhub-boot0 { + samsung,pins = "gpg7-2"; + samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + samsung,pin-drv = <0>; /* LVL1 DRV */ + samsung,pin-con-pdn = <EXYNOS_PIN_PDN_PREV>; + samsung,pin-pud-pdn = <EXYNOS_PIN_PULL_NONE>; + }; +}; diff --git a/r11_st54_ese.dtsi b/r11_spi4_st54_ese.dtsi index 6db7cee..6db7cee 100644 --- a/r11_st54_ese.dtsi +++ b/r11_spi4_st54_ese.dtsi |