From b8a46eea52fce1de30b2c4d0c9438d2a011a86ba Mon Sep 17 00:00:00 2001 From: David Lechner Date: Tue, 11 Apr 2017 16:05:23 -0500 Subject: ARM: dts: da850-lego-ev3: Add node for LEGO MINDSTORMS EV3 Battery This adds a new node to the LEGO MINDSTORMS EV3 device tree for the battery. Signed-off-by: David Lechner [nsekhar@ti.com: minor headline fix] Signed-off-by: Sekhar Nori --- arch/arm/boot/dts/da850-lego-ev3.dts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'arch/arm/boot') diff --git a/arch/arm/boot/dts/da850-lego-ev3.dts b/arch/arm/boot/dts/da850-lego-ev3.dts index 512604ad8b71..45983c04a8a7 100644 --- a/arch/arm/boot/dts/da850-lego-ev3.dts +++ b/arch/arm/boot/dts/da850-lego-ev3.dts @@ -172,6 +172,18 @@ gpio = <&gpio 111 GPIO_ACTIVE_HIGH>; enable-active-high; }; + + /* + * The EV3 can use 6-AA batteries or a rechargeable Li-ion battery pack. + */ + battery { + pinctrl-names = "default"; + pintctrl-0 = <&battery_pins>; + compatible = "lego,ev3-battery"; + io-channels = <&adc 4>, <&adc 3>; + io-channel-names = "voltage", "current"; + rechargeable-gpios = <&gpio 136 GPIO_ACTIVE_LOW>; + }; }; &pmx_core { @@ -228,6 +240,15 @@ 0x34 0x00000008 0x0000000f >; }; + + battery_pins: pinmux_battery_pins { + pinctrl-single,bits = < + /* GP0[6] */ + 0x04 0x00000080 0x000000f0 + /* GP8[8] */ + 0x4c 0x00000080 0x000000f0 + >; + }; }; &pinconf { @@ -342,6 +363,13 @@ &gpio { status = "okay"; + + /* Don't pull down battery voltage adc io channel */ + batt_volt_en { + gpio-hog; + gpios = <6 GPIO_ACTIVE_HIGH>; + output-low; + }; }; &usb_phy { -- cgit v1.2.3 From 775448ce274a58bb8b5fa49795dc808446434dae Mon Sep 17 00:00:00 2001 From: Alexandre Bailon Date: Fri, 19 May 2017 15:33:36 +0200 Subject: ARM: dts: da850: Add CPPI 4.1 DMA to USB OTG controller This adds CPPI 4.1 DMA controller to USB OTG controller. Changes since v2: - Fixed the the property reg-names (had glue register defined) - Removed few useless property Signed-off-by: Alexandre Bailon Signed-off-by: Sekhar Nori --- arch/arm/boot/dts/da850.dtsi | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'arch/arm/boot') diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi index 941d455000a7..0bd048e0049f 100644 --- a/arch/arm/boot/dts/da850.dtsi +++ b/arch/arm/boot/dts/da850.dtsi @@ -446,13 +446,38 @@ }; usb0: usb@200000 { compatible = "ti,da830-musb"; - reg = <0x200000 0x10000>; + reg = <0x200000 0x1000>; + ranges; interrupts = <58>; interrupt-names = "mc"; dr_mode = "otg"; phys = <&usb_phy 0>; phy-names = "usb-phy"; status = "disabled"; + + #address-cells = <1>; + #size-cells = <1>; + + dmas = <&cppi41dma 0 0 &cppi41dma 1 0 + &cppi41dma 2 0 &cppi41dma 3 0 + &cppi41dma 0 1 &cppi41dma 1 1 + &cppi41dma 2 1 &cppi41dma 3 1>; + dma-names = + "rx1", "rx2", "rx3", "rx4", + "tx1", "tx2", "tx3", "tx4"; + + cppi41dma: dma-controller@201000 { + compatible = "ti,da830-cppi41"; + reg = <0x201000 0x1000 + 0x202000 0x1000 + 0x204000 0x4000>; + reg-names = "controller", + "scheduler", "queuemgr"; + interrupts = <58>; + #dma-cells = <2>; + #dma-channels = <4>; + status = "okay"; + }; }; sata: sata@218000 { compatible = "ti,da850-ahci"; -- cgit v1.2.3 From 3c4ec0f9b3a1cd0365c33e53936274f81d536b94 Mon Sep 17 00:00:00 2001 From: Keerthy Date: Wed, 24 May 2017 19:31:41 +0530 Subject: ARM: dts: da850: Add interrupt-controller property to gpio node The gpio node has 144 gpios. Each gpio is capable of generating an interrupt. Hence add interrupt-controller property to the gpio node. With this in place one can use interrupts property in device tree to request for the gpio interrupts. Signed-off-by: Keerthy Signed-off-by: Sekhar Nori --- arch/arm/boot/dts/da850.dtsi | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/arm/boot') diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi index 0bd048e0049f..af68ef7b0caa 100644 --- a/arch/arm/boot/dts/da850.dtsi +++ b/arch/arm/boot/dts/da850.dtsi @@ -528,6 +528,8 @@ ti,ngpio = <144>; ti,davinci-gpio-unbanked = <0>; status = "disabled"; + interrupt-controller; + #interrupt-cells = <2>; }; pinconf: pin-controller@22c00c { compatible = "ti,da850-pupd"; -- cgit v1.2.3 From 65878b126c8f2d761273241cf778b1c6aa50c500 Mon Sep 17 00:00:00 2001 From: Kevin Hilman Date: Tue, 30 May 2017 18:21:25 -0700 Subject: ARM: dts: da850-evm: fix tca6416 for use with GPIO hogs In order GPIOS from this controller to be used with the "gpio-hogs" property, the tca6416 node has to properly labeled as a gpio-controller, and use #gpio-cells. With that, the SEL_A, SEL_B, SEL_C lines that are used to select VPIF input can be configured using GPIO hogs. As an example, example, the configuration below selects the analog video input on the da850-evm UI board: &tca6416 { status = "okay"; sel_a { gpio-hog; gpios = <7 GPIO_ACTIVE_HIGH>; output-high; line-name = "ADC_ENn"; }; sel_b { gpio-hog; gpios = <6 GPIO_ACTIVE_HIGH>; output-high; line-name = "CAMERA_ENn"; }; sel_c { gpio-hog; gpios = <5 GPIO_ACTIVE_HIGH>; output-low; line-name = "VIDEO_IN_ENn"; }; }; Signed-off-by: Kevin Hilman Signed-off-by: Sekhar Nori --- arch/arm/boot/dts/da850-evm.dts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/arm/boot') diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts index 8d244cd76c36..a423e8ebfb37 100644 --- a/arch/arm/boot/dts/da850-evm.dts +++ b/arch/arm/boot/dts/da850-evm.dts @@ -82,6 +82,8 @@ tca6416: gpio@20 { compatible = "ti,tca6416"; reg = <0x20>; + gpio-controller; + #gpio-cells = <2>; }; }; wdt: wdt@21000 { -- cgit v1.2.3