Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 262a5d84 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'sunxi-dt-for-4.8-2-bis' of...

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

Merge "Allwinner DT changes for 4.8, take 2" from Maxime Ripard:

Another set of changes for the 4.8 merge window, among which:
  - Reworking of the DT for the tablets based on Allwinner reference design
    and q8 designs to avoid duplication as much as possible
  - Renaming a DT merged in the first PR for consistency
  - Enable a few devices on some boards
  - New boards: Polaroid MID2407PXE03, inet86dz

* tag 'sunxi-dt-for-4.8-2-bis' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: (21 commits)
  ARM: dts: sun8i: Add dts file for inet86dz board
  ARM: dts: sun8i: Add dts file for Polaroid MID2407PXE03 tablet
  ARM: dts: sun8i: Use sun8i-reference-design-tablet for ga10h dts
  ARM: dts: sun8i: Use sun8i-reference-design-tablet for polaroid mid2809pxe04
  ARM: dts: sun8i: reference-design-tablet: Add drivevbus-supply
  ARM: dts: Copy sun8i-q8-common.dtsi sun8i-reference-design-tablet.dtsi
  ARM: dts: sun5i: Use sun5i-reference-design-tablet.dtsi for utoo p66 dts
  ARM: dts: sun5i: Use sun5i-reference-design-tablet.dtsi for dit4350 dts
  ARM: dts: sun5i: reference-design-tablet: Remove mention of q8
  ARM: dts: sun5i: reference-design-tablet: Set lradc vref to avcc
  ARM: dts: sun5i: Rename sun5i-q8-common.dtsi sun5i-reference-design-tablet.dtsi
  ARM: dts: sun5i: Move q8 display bits to sun5i-a13-q8-tablet.dts
  ARM: dts: sunxi: Rename sunxi-q8-common.dtsi sunxi-reference-design-tablet.dtsi
  ARM: dts: sun7i: bananapi-m1-plus: red LED is power LED
  ARM: dts: sun7i: bananapi-m1-plus: Unify suffix for board specific labels
  ARM: dts: sun7i: bananapi-m1-plus: Reindent whole file using tabs
  ARM: dts: sun7i: lamobo-r1: Enable audio codec
  ARM: dts: sun7i: lamobo-r1: Fix GPIO flags in reg_ahci_5v
  ARM: dts: sun8i-h3: Rename sinovoip-bpi-m2-plus to bananapi-m2-plus
  ARM: dts: sun7i: lamobo-r1: Remove usb1 vbus regulator
  ...
parents cd06b2a5 de427ad2
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -773,8 +773,10 @@ dtb-$(CONFIG_MACH_SUN7I) += \
dtb-$(CONFIG_MACH_SUN8I) += \
	sun8i-a23-evb.dtb \
	sun8i-a23-gt90h-v4.dtb \
	sun8i-a23-inet86dz.dtb \
	sun8i-a23-ippo-q8h-v5.dtb \
	sun8i-a23-ippo-q8h-v1.2.dtb \
	sun8i-a23-polaroid-mid2407pxe03.dtb \
	sun8i-a23-polaroid-mid2809pxe04.dtb \
	sun8i-a23-q8-tablet.dtb \
	sun8i-a33-et-q8-v1.6.dtb \
@@ -784,11 +786,11 @@ dtb-$(CONFIG_MACH_SUN8I) += \
	sun8i-a33-sinlinx-sina33.dtb \
	sun8i-a83t-allwinner-h8homlet-v2.dtb \
	sun8i-a83t-cubietruck-plus.dtb \
	sun8i-h3-bananapi-m2-plus.dtb \
	sun8i-h3-orangepi-2.dtb \
	sun8i-h3-orangepi-one.dtb \
	sun8i-h3-orangepi-pc.dtb \
	sun8i-h3-orangepi-plus.dtb \
	sun8i-h3-sinovoip-bpi-m2-plus.dtb \
	sun8i-r16-parrot.dtb
dtb-$(CONFIG_MACH_SUN9I) += \
	sun9i-a80-optimus.dtb \
+1 −177
Original line number Diff line number Diff line
@@ -42,185 +42,9 @@

/dts-v1/;
#include "sun5i-a13.dtsi"
#include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#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>
#include "sun5i-reference-design-tablet.dtsi"

/ {
	model = "Difrnce DIT4350";
	compatible = "difrnce,dit4350", "allwinner,sun5i-a13";

	aliases {
		serial0 = &uart1;
	};

	backlight: backlight {
		compatible = "pwm-backlight";
		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
		default-brightness-level = <8>;
		/* TODO: backlight uses axp gpio1 as enable pin */
	};

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

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

&ehci0 {
	status = "okay";
};

&i2c0 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c0_pins_a>;
	status = "okay";

	axp209: pmic@34 {
		reg = <0x34>;
		interrupts = <0>;
	};
};

#include "axp209.dtsi"

&i2c1 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c1_pins_a>;
	status = "okay";

	pcf8563: rtc@51 {
		compatible = "nxp,pcf8563";
		reg = <0x51>;
	};
};

&lradc {
	vref-supply = <&reg_ldo2>;
	status = "okay";

	button@200 {
		label = "Volume Up";
		linux,code = <KEY_VOLUMEUP>;
		channel = <0>;
		voltage = <200000>;
	};

	button@400 {
		label = "Volume Down";
		linux,code = <KEY_VOLUMEDOWN>;
		channel = <0>;
		voltage = <400000>;
	};
};

&mmc0 {
	pinctrl-names = "default";
	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_d709>;
	vmmc-supply = <&reg_vcc3v3>;
	bus-width = <4>;
	cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
	cd-inverted;
	status = "okay";
};

&otg_sram {
	status = "okay";
};

&pio {
	mmc0_cd_pin_d709: mmc0_cd_pin@0 {
		allwinner,pins = "PG0";
		allwinner,function = "gpio_in";
		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
	};

	usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
		allwinner,pins = "PG1";
		allwinner,function = "gpio_in";
		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
		allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
	};

	usb0_id_detect_pin: usb0_id_detect_pin@0 {
		allwinner,pins = "PG2";
		allwinner,function = "gpio_in";
		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
	};
};

&pwm {
	pinctrl-names = "default";
	pinctrl-0 = <&pwm0_pins>;
	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-pll";
};

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

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

&reg_ldo3 {
	regulator-min-microvolt = <3300000>;
	regulator-max-microvolt = <3300000>;
	regulator-name = "vcc-wifi";
};

&reg_usb0_vbus {
	gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
	status = "okay";
};

&uart1 {
	pinctrl-names = "default";
	pinctrl-0 = <&uart1_pins_b>;
	status = "okay";
};

&usb_otg {
	dr_mode = "otg";
	status = "okay";
};

&usb0_vbus_pin_a {
	allwinner,pins = "PG12";
};

&usbphy {
	pinctrl-names = "default";
	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
	usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
	usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
	usb0_vbus-supply = <&reg_usb0_vbus>;
	usb1_vbus-supply = <&reg_ldo3>;
	status = "okay";
};
+37 −1
Original line number Diff line number Diff line
@@ -42,9 +42,45 @@

/dts-v1/;
#include "sun5i-a13.dtsi"
#include "sun5i-q8-common.dtsi"
#include "sun5i-reference-design-tablet.dtsi"

/ {
	model = "Q8 A13 Tablet";
	compatible = "allwinner,q8-a13", "allwinner,sun5i-a13";

	panel: panel {
		compatible = "urt,umsh-8596md-t", "simple-panel";
		#address-cells = <1>;
		#size-cells = <0>;

		port@0 {
			reg = <0>;
			/* TODO: lcd panel uses axp gpio0 as enable pin */
			backlight = <&backlight>;
			#address-cells = <1>;
			#size-cells = <0>;

			panel_input: endpoint@0 {
				reg = <0>;
				remote-endpoint = <&tcon0_out_lcd>;
			};
		};
	};
};

&be0 {
	status = "okay";
};

&tcon0 {
	pinctrl-names = "default";
	pinctrl-0 = <&lcd_rgb666_pins>;
	status = "okay";
};

&tcon0_out {
	tcon0_out_lcd: endpoint@0 {
		reg = <0>;
		remote-endpoint = <&panel_input>;
	};
};
+21 −159
Original line number Diff line number Diff line
@@ -42,24 +42,20 @@

/dts-v1/;
#include "sun5i-a13.dtsi"
#include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "sun5i-reference-design-tablet.dtsi"
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
#include <dt-bindings/pwm/pwm.h>

/ {
	model = "Utoo P66";
	compatible = "utoo,p66", "allwinner,sun5i-a13";

	backlight: backlight {
		compatible = "pwm-backlight";
		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
		/* Note levels of 10 / 20% result in backlight off */
		brightness-levels = <0 30 40 50 60 70 80 90 100>;
		default-brightness-level = <6>;
		/* TODO: backlight uses axp gpio1 as enable pin */
	/* The P66 uses the uart pins as gpios */
	aliases {
		/delete-property/serial0;
	};

	chosen {
		/delete-property/stdout-path;
	};

	i2c_lcd: i2c@0 {
@@ -73,39 +69,21 @@
	};
};

&codec {
	pinctrl-names = "default";
	pinctrl-0 = <&codec_pa_pin>;
	allwinner,pa-gpios = <&pio 6 3 GPIO_ACTIVE_HIGH>; /* PG3 */
	status = "okay";
};

&cpu0 {
	cpu-supply = <&reg_dcdc2>;
&backlight {
	/* Note levels of 10 / 20% result in backlight off */
	brightness-levels = <0 30 40 50 60 70 80 90 100>;
	default-brightness-level = <6>;
};

&ehci0 {
	status = "okay";
&codec {
	allwinner,pa-gpios = <&pio 6 3 GPIO_ACTIVE_HIGH>; /* PG3 */
};

&i2c0 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c0_pins_a>;
	status = "okay";

	axp209: pmic@34 {
		reg = <0x34>;
		interrupts = <0>;
	};
&codec_pa_pin {
	allwinner,pins = "PG3";
};

#include "axp209.dtsi"

&i2c1 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c1_pins_a>;
	status = "okay";

	icn8318: touchscreen@40 {
		compatible = "chipone,icn8318";
		reg = <0x40>;
@@ -119,40 +97,6 @@
		touchscreen-inverted-x;
		touchscreen-swapped-x-y;
	};

	pcf8563: rtc@51 {
		compatible = "nxp,pcf8563";
		reg = <0x51>;
	};
};

&lradc {
	vref-supply = <&reg_ldo2>;
	status = "okay";

	button@200 {
		label = "Volume Up";
		linux,code = <KEY_VOLUMEUP>;
		channel = <0>;
		voltage = <200000>;
	};

	button@400 {
		label = "Volume Down";
		linux,code = <KEY_VOLUMEDOWN>;
		channel = <0>;
		voltage = <400000>;
	};
};

&mmc0 {
	pinctrl-names = "default";
	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_p66>;
	vmmc-supply = <&reg_vcc3v3>;
	bus-width = <4>;
	cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
	cd-inverted;
	status = "okay";
};

&mmc2 {
@@ -170,39 +114,7 @@
	};
};

&otg_sram {
	status = "okay";
};

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

	mmc0_cd_pin_p66: mmc0_cd_pin@0 {
		allwinner,pins = "PG0";
		allwinner,function = "gpio_in";
		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
	};

	usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
		allwinner,pins = "PG1";
		allwinner,function = "gpio_in";
		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
		allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
	};

	usb0_id_detect_pin: usb0_id_detect_pin@0 {
		allwinner,pins = "PG2";
		allwinner,function = "gpio_in";
		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
	};

	i2c_lcd_pins: i2c_lcd_pin@0 {
		allwinner,pins = "PG10", "PG12";
		allwinner,function = "gpio_out";
@@ -217,67 +129,17 @@
		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
	};

	usb0_vbus_pin_a: usb0_vbus_pin@0 {
		allwinner,pins = "PB4";
		allwinner,function = "gpio_out";
		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
	};
};

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

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

&reg_dcdc3 {
	regulator-always-on;
	regulator-min-microvolt = <1000000>;
	regulator-max-microvolt = <1400000>;
	regulator-name = "vdd-int-pll";
};

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

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

&reg_ldo3 {
	regulator-min-microvolt = <3300000>;
	regulator-max-microvolt = <3300000>;
	regulator-name = "vcc-wifi";
};

&reg_usb0_vbus {
	gpio = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
	status = "okay";
};

&usb_otg {
	dr_mode = "otg";
	status = "okay";
&uart1 {
	/* The P66 uses the uart pins as gpios */
	status = "disabled";
};

&usbphy {
	pinctrl-names = "default";
	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
	usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
	usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
	usb0_vbus-supply = <&reg_usb0_vbus>;
	usb1_vbus-supply = <&reg_ldo3>;
	status = "okay";
&usb0_vbus_pin_a {
	allwinner,pins = "PB4";
};
+7 −39
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@
 *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 *     OTHER DEALINGS IN THE SOFTWARE.
 */
#include "sunxi-q8-common.dtsi"
#include "sunxi-reference-design-tablet.dtsi"

#include <dt-bindings/pwm/pwm.h>

@@ -59,29 +59,6 @@
	chosen {
		stdout-path = "serial0:115200n8";
	};

	panel: panel {
		compatible = "urt,umsh-8596md-t", "simple-panel";
		#address-cells = <1>;
		#size-cells = <0>;

		port@0 {
			reg = <0>;
			/* TODO: lcd panel uses axp gpio0 as enable pin */
			backlight = <&backlight>;
			#address-cells = <1>;
			#size-cells = <0>;

			panel_input: endpoint@0 {
				reg = <0>;
				remote-endpoint = <&tcon0_out_lcd>;
			};
		};
	};
};

&be0 {
	status = "okay";
};

&codec {
@@ -115,9 +92,13 @@

#include "axp209.dtsi"

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

&mmc0 {
	pinctrl-names = "default";
	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_q8>;
	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
	vmmc-supply = <&reg_vcc3v0>;
	bus-width = <4>;
	cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
@@ -137,7 +118,7 @@
		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
	};

	mmc0_cd_pin_q8: mmc0_cd_pin@0 {
	mmc0_cd_pin: mmc0_cd_pin@0 {
		allwinner,pins = "PG0";
		allwinner,function = "gpio_in";
		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
@@ -202,19 +183,6 @@
	status = "okay";
};

&tcon0 {
	pinctrl-names = "default";
	pinctrl-0 = <&lcd_rgb666_pins>;
	status = "okay";
};

&tcon0_out {
	tcon0_out_lcd: endpoint@0 {
		reg = <0>;
		remote-endpoint = <&panel_input>;
	};
};

&uart1 {
	pinctrl-names = "default";
	pinctrl-0 = <&uart1_pins_b>;
Loading