Commit 74386da4 authored by Olof Johansson's avatar Olof Johansson
Browse files

Merge tag 'sunxi-dt-for-4.5' of...

Merge tag 'sunxi-dt-for-4.5' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into next/dt

Allwinner DT changes for 4.5

Allwinner device-tree related patches for the 4.5 merge window.
  * Support for the H3
  * Addition of the RSB to the relevant devices (sun8i, sun9i)
  * Addition of the Video Engine clocks for the older SoCs (sun4i, sun7i)
  * Addition of the DRAM gates for the older SoCs (sun4i, sun7i)
  * Addition of the audio codec to a bunch of boards
  * New board: ICNova SWAC

* tag 'sunxi-dt-for-4.5' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux

: (40 commits)
  ARM: dts: sun7i: Olimex A20-SOM-EVB: Enable mmc3 (baseboard SD socket)
  ARM: dts: sun7i: Olimex A20-SOM-EVB: Add LRADC keys
  ARM: dts: sun9i: cubieboard4: Enable Reduced Serial Bus controller
  ARM: dts: sun9i: cubieboard4: Enable consumer IR receiver
  ARM: dts: sun9i: cubieboard4: Enable LEDs
  ARM: dts: sun7i: Add VE (Video Engine) module clock node
  ARM: dts: sun4i: Add VE (Video Engine) module clock node
  ARM: dts: sun8i: Add Orange Pi Plus support
  ARM: dts: sunxi: Add Allwinner H3 DTSI
  ARM: dts: sun7i: Add DRAM gates
  ARM: dts: sun4i: Add DRAM gates
  ARM: dts: sun9i: Add NMI controller device node
  ARM: dts: sun9i: optimus: Enable Reduced Serial Bus controller
  ARM: dts: sun9i: Add Reduced Serial Bus controller device node to A80 dtsi
  ARM: dts: sun9i: optimus: Enable consumer IR receiver
  ARM: dts: sun9i: Add consumer IR receiver device node and pinmux settings
  ARM: dts: sun9i: optimus: Enable LED3
  ARM: dts: sun9i: Add A80 R_PIO pin controller device node
  ARM: dts: sun9i: Add TODO comments for the main and low power clocks
  ARM: dts: sun9i: Add A80 PRCM clocks and reset control nodes
  ...

Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents 69c8e667 2367cee5
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -651,6 +651,7 @@ dtb-$(CONFIG_MACH_SUN7I) += \
	sun7i-a20-cubietruck.dtb \
	sun7i-a20-hummingbird.dtb \
	sun7i-a20-i12-tvbox.dtb \
	sun7i-a20-icnova-swac.dtb \
	sun7i-a20-m3.dtb \
	sun7i-a20-mk808c.dtb \
	sun7i-a20-olimex-som-evb.dtb \
@@ -673,7 +674,8 @@ dtb-$(CONFIG_MACH_SUN8I) += \
	sun8i-a33-ga10h-v1.1.dtb \
	sun8i-a33-ippo-q8h-v1.2.dtb \
	sun8i-a33-q8-tablet.dtb \
	sun8i-a33-sinlinx-sina33.dtb
	sun8i-a33-sinlinx-sina33.dtb \
	sun8i-h3-orangepi-plus.dtb
dtb-$(CONFIG_MACH_SUN9I) += \
	sun9i-a80-optimus.dtb \
	sun9i-a80-cubieboard4.dtb
+36 −6
Original line number Diff line number Diff line
@@ -65,12 +65,19 @@
/*
 * TODO:
 *   2x cameras via CSI
 *   audio
 *   audio input
 *   AXP battery management
 *   NAND
 *   OTG
 *   Touchscreen - gt801_2plus1 @ i2c adapter 2 @ 0x48
 */
&codec {
	status = "okay";
};

&cpu0 {
	cpu-supply = <&reg_dcdc2>;
};

&ehci0 {
	status = "okay";
@@ -86,15 +93,13 @@
	status = "okay";

	axp209: pmic@34 {
		compatible = "x-powers,axp209";
		reg = <0x34>;
		interrupts = <0>;

		interrupt-controller;
		#interrupt-cells = <1>;
	};
};

#include "axp209.dtsi"

&i2c1 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c1_pins_a>;
@@ -110,7 +115,7 @@
};

&lradc {
	vref-supply = <&reg_vcc3v0>;
	vref-supply = <&reg_ldo2>;

	status = "okay";

@@ -146,6 +151,31 @@
	status = "okay";
};

&reg_dcdc2 {
	regulator-always-on;
	regulator-min-microvolt = <1000000>;
	regulator-max-microvolt = <1400000>;
	regulator-name = "vdd-cpu";
};

&reg_dcdc3 {
	regulator-always-on;
	regulator-min-microvolt = <1250000>;
	regulator-max-microvolt = <1250000>;
	regulator-name = "vdd-int-dll";
};

&reg_ldo1 {
	regulator-name = "vdd-rtc";
};

&reg_ldo2 {
	regulator-always-on;
	regulator-min-microvolt = <3000000>;
	regulator-max-microvolt = <3000000>;
	regulator-name = "avcc";
};

&reg_usb1_vbus {
	status = "okay";
};
+48 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
#include <dt-bindings/pwm/pwm.h>

/ {
	model = "iNet-1";
@@ -56,11 +57,25 @@
		serial0 = &uart0;
	};

	backlight: backlight {
		compatible = "pwm-backlight";
		pinctrl-names = "default";
		pinctrl-0 = <&bl_en_pin_inet>;
		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
		default-brightness-level = <8>;
		enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
	};

	chosen {
		stdout-path = "serial0:115200n8";
	};
};

&codec {
	status = "okay";
};

&cpu0 {
	cpu-supply = <&reg_dcdc2>;
};
@@ -104,6 +119,19 @@
	pinctrl-names = "default";
	pinctrl-0 = <&i2c2_pins_a>;
	status = "okay";

	ft5x: touchscreen@38 {
		compatible = "edt,edt-ft5406";
		reg = <0x38>;
		interrupt-parent = <&pio>;
		interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
		pinctrl-names = "default";
		pinctrl-0 = <&touchscreen_wake_pin>;
		wake-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* PB13 */
		touchscreen-size-x = <600>;
		touchscreen-size-y = <1024>;
		touchscreen-swapped-x-y;
	};
};

&lradc {
@@ -151,6 +179,20 @@
};

&pio {
	bl_en_pin_inet: bl_en_pin@0 {
		allwinner,pins = "PH7";
		allwinner,function = "gpio_out";
		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
	};

	touchscreen_wake_pin: touchscreen_wake_pin@0 {
		allwinner,pins = "PB13";
		allwinner,function = "gpio_out";
		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
	};

	usb0_id_detect_pin: usb0_id_detect_pin@0 {
		allwinner,pins = "PH4";
		allwinner,function = "gpio_in";
@@ -166,6 +208,12 @@
	};
};

&pwm {
	pinctrl-names = "default";
	pinctrl-0 = <&pwm0_pins_a>;
	status = "okay";
};

&reg_dcdc2 {
	regulator-always-on;
	regulator-min-microvolt = <1000000>;
+164 −0
Original line number Diff line number Diff line
@@ -59,6 +59,159 @@
	chosen {
		stdout-path = "serial0:115200n8";
	};

	gpio_keys {
		compatible = "gpio-keys-polled";
		pinctrl-names = "default";
		pinctrl-0 = <&key_pins_inet9f>;
		#address-cells = <1>;
		#size-cells = <0>;
		poll-interval = <20>;

		button@0 {
			label = "Left Joystick Left";
			linux,code = <ABS_X>;
			linux,input-type = <EV_ABS>;
			linux,input-value = <0xffffffff>; /* -1 */
			gpios = <&pio 0 6 GPIO_ACTIVE_LOW>; /* PA6 */
		};

		button@1 {
			label = "Left Joystick Right";
			linux,code = <ABS_X>;
			linux,input-type = <EV_ABS>;
			linux,input-value = <1>;
			gpios = <&pio 0 5 GPIO_ACTIVE_LOW>; /* PA5 */
		};

		button@2 {
			label = "Left Joystick Up";
			linux,code = <ABS_Y>;
			linux,input-type = <EV_ABS>;
			linux,input-value = <0xffffffff>; /* -1 */
			gpios = <&pio 0 8 GPIO_ACTIVE_LOW>; /* PA8 */
		};

		button@3 {
			label = "Left Joystick Down";
			linux,code = <ABS_Y>;
			linux,input-type = <EV_ABS>;
			linux,input-value = <1>;
			gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */
		};

		button@4 {
			label = "Right Joystick Left";
			linux,code = <ABS_Z>;
			linux,input-type = <EV_ABS>;
			linux,input-value = <0xffffffff>; /* -1 */
			gpios = <&pio 0 1 GPIO_ACTIVE_LOW>; /* PA1 */
		};

		button@5 {
			label = "Right Joystick Right";
			linux,code = <ABS_Z>;
			linux,input-type = <EV_ABS>;
			linux,input-value = <1>;
			gpios = <&pio 0 0 GPIO_ACTIVE_LOW>; /* PA0 */
		};

		button@6 {
			label = "Right Joystick Up";
			linux,code = <ABS_RZ>;
			linux,input-type = <EV_ABS>;
			linux,input-value = <0xffffffff>; /* -1 */
			gpios = <&pio 0 3 GPIO_ACTIVE_LOW>; /* PA3 */
		};

		button@7 {
			label = "Right Joystick Down";
			linux,code = <ABS_RZ>;
			linux,input-type = <EV_ABS>;
			linux,input-value = <1>;
			gpios = <&pio 0 4 GPIO_ACTIVE_LOW>; /* PA4 */
		};

		button@8 {
			label = "DPad Left";
			linux,code = <ABS_HAT0X>;
			linux,input-type = <EV_ABS>;
			linux,input-value = <0xffffffff>; /* -1 */
			gpios = <&pio 7 23 GPIO_ACTIVE_LOW>; /* PH23 */
		};

		button@9 {
			label = "DPad Right";
			linux,code = <ABS_HAT0X>;
			linux,input-type = <EV_ABS>;
			linux,input-value = <1>;
			gpios = <&pio 7 24 GPIO_ACTIVE_LOW>; /* PH24 */
		};

		button@10 {
			label = "DPad Up";
			linux,code = <ABS_HAT0Y>;
			linux,input-type = <EV_ABS>;
			linux,input-value = <0xffffffff>; /* -1 */
			gpios = <&pio 7 25 GPIO_ACTIVE_LOW>; /* PH25 */
		};

		button@11 {
			label = "DPad Down";
			linux,code = <ABS_HAT0Y>;
			linux,input-type = <EV_ABS>;
			linux,input-value = <1>;
			gpios = <&pio 7 26 GPIO_ACTIVE_LOW>; /* PH26 */
		};

		button@12 {
			label = "Button X";
			linux,code = <BTN_X>;
			gpios = <&pio 0 16 GPIO_ACTIVE_LOW>; /* PA16 */
		};

		button@13 {
			label = "Button Y";
			linux,code = <BTN_Y>;
			gpios = <&pio 0 14 GPIO_ACTIVE_LOW>; /* PA14 */
		};

		button@14 {
			label = "Button A";
			linux,code = <BTN_A>;
			gpios = <&pio 0 17 GPIO_ACTIVE_LOW>; /* PA17 */
		};

		button@15 {
			label = "Button B";
			linux,code = <BTN_B>;
			gpios = <&pio 0 15 GPIO_ACTIVE_LOW>; /* PA15 */
		};

		button@16 {
			label = "Select Button";
			linux,code = <BTN_SELECT>;
			gpios = <&pio 0 11 GPIO_ACTIVE_LOW>; /* PA11 */
		};

		button@17 {
			label = "Start Button";
			linux,code = <BTN_START>;
			gpios = <&pio 0 12 GPIO_ACTIVE_LOW>; /* PA12 */
		};

		button@18 {
			label = "Top Left Button";
			linux,code = <BTN_TL>;
			gpios = <&pio 7 22 GPIO_ACTIVE_LOW>; /* PH22 */
		};

		button@19 {
			label = "Top Right Button";
			linux,code = <BTN_TR>;
			gpios = <&pio 0 13 GPIO_ACTIVE_LOW>; /* PA13 */
		};
	};
};

&cpu0 {
@@ -157,6 +310,17 @@
};

&pio {
	key_pins_inet9f: key_pins@0 {
		allwinner,pins = "PA0", "PA1", "PA3", "PA4",
				 "PA5", "PA6", "PA8", "PA9",
				 "PA11", "PA12", "PA13",
				 "PA14", "PA15", "PA16", "PA17",
				 "PH22", "PH23", "PH24", "PH25", "PH26";
		allwinner,function = "gpio_in";
		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
	};

	usb0_id_detect_pin: usb0_id_detect_pin@0 {
		allwinner,pins = "PH4";
		allwinner,function = "gpio_in";
+47 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
#include <dt-bindings/pwm/pwm.h>

/ {
	model = "Point of View Protab2-IPS9";
@@ -56,6 +57,16 @@
		serial0 = &uart0;
	};

	backlight: backlight {
		compatible = "pwm-backlight";
		pinctrl-names = "default";
		pinctrl-0 = <&bl_en_pin_protab>;
		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
		default-brightness-level = <8>;
		enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
	};

	chosen {
		stdout-path = "serial0:115200n8";
	};
@@ -93,6 +104,22 @@
	pinctrl-names = "default";
	pinctrl-0 = <&i2c2_pins_a>;
	status = "okay";

	pixcir_ts@5c {
		pinctrl-names = "default";
		pinctrl-0 = <&touchscreen_pins>;
		compatible = "pixcir,pixcir_tangoc";
		reg = <0x5c>;
		interrupt-parent = <&pio>;
		interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */
		attb-gpio = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* PH21 */
		enable-gpios = <&pio 0 5 GPIO_ACTIVE_LOW>;
		wake-gpios = <&pio 1 13 GPIO_ACTIVE_LOW>;
		touchscreen-size-x = <1024>;
		touchscreen-size-y = <768>;
		touchscreen-inverted-x;
		touchscreen-inverted-y;
	};
};

&lradc {
@@ -129,6 +156,20 @@
};

&pio {
	bl_en_pin_protab: bl_en_pin@0 {
		allwinner,pins = "PH7";
		allwinner,function = "gpio_out";
		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
	};

	touchscreen_pins: touchscreen_pins@0 {
		allwinner,pins = "PA5", "PB13";
		allwinner,function = "gpio_out";
		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
	};

	usb0_id_detect_pin: usb0_id_detect_pin@0 {
		allwinner,pins = "PH4";
		allwinner,function = "gpio_in";
@@ -144,6 +185,12 @@
	};
};

&pwm {
	pinctrl-names = "default";
	pinctrl-0 = <&pwm0_pins_a>;
	status = "okay";
};

&reg_dcdc2 {
	regulator-always-on;
	regulator-min-microvolt = <1000000>;
Loading