arm-sdk

os build toolkit for various embedded devices
git clone https://git.parazyd.org/arm-sdk
Log | Files | Refs | Submodules | README | LICENSE

0010-ARM-dts-N9-Add-support-for-apds990x-ALS-PS.patch (2105B)


      1 From ad23767da90b149a650ebb38a797056f81728507 Mon Sep 17 00:00:00 2001
      2 From: filippz <filip.matijevic.pz@gmail.com>
      3 Date: Thu, 28 Dec 2017 07:00:11 +0100
      4 Subject: [PATCH 10/11] ARM: dts: N9: Add support for apds990x ALS/PS
      5 
      6 Signed-off-by: filippz <filip.matijevic.pz@gmail.com>
      7 ---
      8  arch/arm/boot/dts/omap3-n9.dts       | 24 ++++++++++++++++++++++++
      9  arch/arm/boot/dts/omap3-n950-n9.dtsi | 14 ++++++++++++++
     10  2 files changed, 38 insertions(+)
     11 
     12 diff --git a/arch/arm/boot/dts/omap3-n9.dts b/arch/arm/boot/dts/omap3-n9.dts
     13 index 613ada9a982a..1143a6eef736 100644
     14 --- a/arch/arm/boot/dts/omap3-n9.dts
     15 +++ b/arch/arm/boot/dts/omap3-n9.dts
     16 @@ -57,6 +57,30 @@
     17  			};
     18  		};
     19  	};
     20 +
     21 +	als_ps@39 {
     22 +		compatible = "avago,apds990x";
     23 +		reg = <0x39>;
     24 +
     25 +		pinctrl-names = "default";
     26 +		pinctrl-0 = <&als_ps_gpio>;
     27 +
     28 +		interrupt-parent = <&gpio3>;
     29 +		interrupts = <19 (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_LEVEL_LOW)>; /* gpio_83 */
     30 +
     31 +		vdd-supply = <&vaux1>;
     32 +		vled-supply = <&vbat>;
     33 +
     34 +		avago,ga	= <168834>;
     35 +		avago,cf1	= <4096>;
     36 +		avago,irf1	= <7824>;
     37 +		avago,cf2	= <877>;
     38 +		avago,irf2	= <1575>;
     39 +		avago,df	= <52>;
     40 +
     41 +		avago,pdrive	= /bits/ 8 <2>; /* APDS_IRLED_CURR_25mA */
     42 +		avago,ppcount	= /bits/ 8 <5>;
     43 +	};
     44  };
     45  
     46  &isp {
     47 diff --git a/arch/arm/boot/dts/omap3-n950-n9.dtsi b/arch/arm/boot/dts/omap3-n950-n9.dtsi
     48 index 219519812050..7ac45b833d1d 100644
     49 --- a/arch/arm/boot/dts/omap3-n950-n9.dtsi
     50 +++ b/arch/arm/boot/dts/omap3-n950-n9.dtsi
     51 @@ -39,6 +39,14 @@
     52  		enable-active-high;
     53  	};
     54  
     55 +	vbat: fixedregulator1 {
     56 +		compatible = "regulator-fixed";
     57 +		regulator-name = "VBAT";
     58 +		regulator-min-microvolt = <3700000>;
     59 +		regulator-max-microvolt = <3700000>;
     60 +		regulator-boot-on;
     61 +	};
     62 +
     63  	vwlan_fixed: fixedregulator2 {
     64  		compatible = "regulator-fixed";
     65  		regulator-name = "VWLAN";
     66 @@ -157,6 +165,12 @@
     67  			OMAP3630_CORE2_IOPAD(0x25ec, PIN_OUTPUT | MUX_MODE4)         /* gpio_23 (cmt_en) */
     68  		>;
     69  	};
     70 +
     71 +	als_ps_gpio: pinmux_als_ps_gpio {
     72 +		pinctrl-single,pins = <
     73 +			OMAP3_CORE1_IOPAD(0x20f6, PIN_INPUT | MUX_MODE4)	/* dss_data13.gpio_83 -> APDS990X/BHSFH IRQ */
     74 +		>;
     75 +	};
     76  };
     77  
     78  &i2c1 {
     79 -- 
     80 2.14.1
     81