devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: sun8i: Add dts file for inet86dz board
@ 2016-06-12 17:55 Hans de Goede
       [not found] ` <1465754150-16753-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Hans de Goede @ 2016-06-12 17:55 UTC (permalink / raw)
  To: Chen-Yu Tsai, Maxime Ripard
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
	Hans de Goede

The inet86dz board is a board used in 7" tablets from various oems.

These tablets are a23 based 7" tablets featuring a 1024x600 LCD,
512MB RAM, 4G NAND, rtl8188etv usb wifi, gsl1680 touchschreen,
micro-sd slot, 3.5mm headphone jack and a micro-usb otg connector
which doubles as charging port.

Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/Makefile               |   1 +
 arch/arm/boot/dts/sun8i-a23-inet86dz.dts | 293 +++++++++++++++++++++++++++++++
 2 files changed, 294 insertions(+)
 create mode 100644 arch/arm/boot/dts/sun8i-a23-inet86dz.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 8223602..1ff5434 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -751,6 +751,7 @@ 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 \
diff --git a/arch/arm/boot/dts/sun8i-a23-inet86dz.dts b/arch/arm/boot/dts/sun8i-a23-inet86dz.dts
new file mode 100644
index 0000000..0405258
--- /dev/null
+++ b/arch/arm/boot/dts/sun8i-a23-inet86dz.dts
@@ -0,0 +1,293 @@
+/*
+ * Copyright 2016 Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file 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.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "sun8i-a23.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
+#include <dt-bindings/pwm/pwm.h>
+
+/ {
+	model = "INet-86DZ Rev 01";
+	compatible = "primux,inet86dz", "allwinner,sun8i-a23";
+
+	aliases {
+		serial0 = &r_uart;
+	};
+
+	backlight: backlight {
+		compatible = "pwm-backlight";
+		pinctrl-names = "default";
+		pinctrl-0 = <&bl_en_pin_inet86dz>;
+		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 6 GPIO_ACTIVE_HIGH>; /* PH6 */
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&ehci0 {
+	status = "okay";
+};
+
+&i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_pins_a>;
+	status = "okay";
+	/*
+	 * The gsl1680 is rated at 400KHz and it will not work reliable at
+	 * 100KHz, this has been confirmed on multiple different tablets.
+	 * The gsl1680 is the only device on this bus.
+	 */
+	clock-frequency = <400000>;
+
+	gsl1680: touchscreen@40 {
+		compatible = "silead,gsl1680";
+		reg = <0x40>;
+		interrupt-parent = <&pio>;
+		interrupts = <1 5 IRQ_TYPE_EDGE_FALLING>; /* PB5 */
+		pinctrl-names = "default";
+		pinctrl-0 = <&ts_power_pin_inet86dz>;
+		power-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
+		touchscreen-size-x = <960>;
+		touchscreen-size-y = <640>;
+		touchscreen-max-fingers = <5>;
+		touchscreen-fw-name = "silead/gsl1680-inet86dz.fw";
+	};
+};
+
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pins_a>;
+	status = "okay";
+};
+
+&lradc {
+	vref-supply = <&reg_vcc3v0>;
+	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_inet86dz>;
+	vmmc-supply = <&reg_dcdc1>;
+	bus-width = <4>;
+	cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
+	cd-inverted;
+	status = "okay";
+};
+
+&pio {
+	bl_en_pin_inet86dz: bl_en_pin@0 {
+		allwinner,pins = "PH6";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+	};
+
+	mmc0_cd_pin_inet86dz: mmc0_cd_pin@0 {
+		allwinner,pins = "PB4";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+	};
+
+	ts_power_pin_inet86dz: ts_power_pin@0 {
+		allwinner,pins = "PH1";
+		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 = "PH8";
+		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";
+};
+
+&r_rsb {
+	status = "okay";
+
+	axp22x: pmic@3a3 {
+		compatible = "x-powers,axp223";
+		reg = <0x3a3>;
+		interrupt-parent = <&nmi_intc>;
+		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+		eldoin-supply = <&reg_dcdc1>;
+		x-powers,drive-vbus-en;
+	};
+};
+
+&r_uart {
+	pinctrl-names = "default";
+	pinctrl-0 = <&r_uart_pins_a>;
+	status = "okay";
+};
+
+#include "axp22x.dtsi"
+
+&reg_aldo1 {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "vcc-io";
+};
+
+&reg_aldo2 {
+	regulator-always-on;
+	regulator-min-microvolt = <2350000>;
+	regulator-max-microvolt = <2650000>;
+	regulator-name = "vdd-dll";
+};
+
+&reg_aldo3 {
+	regulator-always-on;
+	regulator-min-microvolt = <2700000>;
+	regulator-max-microvolt = <3300000>;
+	regulator-name = "vcc-pll-avcc";
+};
+
+&reg_dc1sw {
+	regulator-name = "vcc-lcd";
+};
+
+&reg_dc5ldo {
+	regulator-always-on;
+	regulator-min-microvolt = <900000>;
+	regulator-max-microvolt = <1400000>;
+	regulator-name = "vdd-cpus";
+};
+
+&reg_dcdc1 {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "vcc-3v0";
+};
+
+&reg_dcdc2 {
+	regulator-always-on;
+	regulator-min-microvolt = <900000>;
+	regulator-max-microvolt = <1400000>;
+	regulator-name = "vdd-sys";
+};
+
+&reg_dcdc3 {
+	regulator-always-on;
+	regulator-min-microvolt = <900000>;
+	regulator-max-microvolt = <1400000>;
+	regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc5 {
+	regulator-always-on;
+	regulator-min-microvolt = <1500000>;
+	regulator-max-microvolt = <1500000>;
+	regulator-name = "vcc-dram";
+};
+
+&reg_dldo1 {
+	regulator-min-microvolt = <3300000>;
+	regulator-max-microvolt = <3300000>;
+	regulator-name = "vcc-wifi";
+};
+
+&reg_drivevbus {
+	regulator-name = "usb0-vbus";
+	status = "okay";
+};
+
+&reg_rtc_ldo {
+	regulator-name = "vcc-rtc";
+};
+
+&simplefb_lcd {
+	vcc-lcd-supply = <&reg_dc1sw>;
+};
+
+&usb_otg {
+	dr_mode = "otg";
+	status = "okay";
+};
+
+&usb_power_supply {
+	status = "okay";
+};
+
+&usbphy {
+	pinctrl-names = "default";
+	pinctrl-0 = <&usb0_id_detect_pin>;
+	usb0_id_det-gpio = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
+	usb0_vbus_power-supply = <&usb_power_supply>;
+	usb0_vbus-supply = <&reg_drivevbus>;
+	usb1_vbus-supply = <&reg_dldo1>;
+	status = "okay";
+};
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] ARM: dts: sun8i: Add dts file for inet86dz board
       [not found] ` <1465754150-16753-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2016-06-13  3:16   ` Chen-Yu Tsai
       [not found]     ` <CAGb2v66cbx0jta1unrKeYm1t9JKO9Unw8z75rXbW3JSi2=NuMw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Chen-Yu Tsai @ 2016-06-13  3:16 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Chen-Yu Tsai, Maxime Ripard, linux-arm-kernel, devicetree

Hi,

On Mon, Jun 13, 2016 at 1:55 AM, Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> The inet86dz board is a board used in 7" tablets from various oems.
>
> These tablets are a23 based 7" tablets featuring a 1024x600 LCD,
> 512MB RAM, 4G NAND, rtl8188etv usb wifi, gsl1680 touchschreen,
> micro-sd slot, 3.5mm headphone jack and a micro-usb otg connector
> which doubles as charging port.

This seems awfully similar to the sun8i-a23-q8-tablet, any reason
not to include that or sun8i-q8-common.dtsi?

> Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
>  arch/arm/boot/dts/Makefile               |   1 +
>  arch/arm/boot/dts/sun8i-a23-inet86dz.dts | 293 +++++++++++++++++++++++++++++++
>  2 files changed, 294 insertions(+)
>  create mode 100644 arch/arm/boot/dts/sun8i-a23-inet86dz.dts
>
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 8223602..1ff5434 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -751,6 +751,7 @@ 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 \
> diff --git a/arch/arm/boot/dts/sun8i-a23-inet86dz.dts b/arch/arm/boot/dts/sun8i-a23-inet86dz.dts
> new file mode 100644
> index 0000000..0405258
> --- /dev/null
> +++ b/arch/arm/boot/dts/sun8i-a23-inet86dz.dts
> @@ -0,0 +1,293 @@
> +/*
> + * Copyright 2016 Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> + *
> + * This file is dual-licensed: you can use it either under the terms
> + * of the GPL or the X11 license, at your option. Note that this dual
> + * licensing only applies to this file, and not this project as a
> + * whole.
> + *
> + *  a) This file is free software; you can redistribute it and/or
> + *     modify it under the terms of the GNU General Public License as
> + *     published by the Free Software Foundation; either version 2 of the
> + *     License, or (at your option) any later version.
> + *
> + *     This file 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.
> + *
> + * Or, alternatively,
> + *
> + *  b) Permission is hereby granted, free of charge, to any person
> + *     obtaining a copy of this software and associated documentation
> + *     files (the "Software"), to deal in the Software without
> + *     restriction, including without limitation the rights to use,
> + *     copy, modify, merge, publish, distribute, sublicense, and/or
> + *     sell copies of the Software, and to permit persons to whom the
> + *     Software is furnished to do so, subject to the following
> + *     conditions:
> + *
> + *     The above copyright notice and this permission notice shall be
> + *     included in all copies or substantial portions of the Software.
> + *
> + *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> + *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> + *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> + *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> + *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
> + *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + *     OTHER DEALINGS IN THE SOFTWARE.
> + */
> +
> +/dts-v1/;
> +#include "sun8i-a23.dtsi"
> +#include "sunxi-common-regulators.dtsi"
> +
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/pinctrl/sun4i-a10.h>
> +#include <dt-bindings/pwm/pwm.h>
> +
> +/ {
> +       model = "INet-86DZ Rev 01";
> +       compatible = "primux,inet86dz", "allwinner,sun8i-a23";
> +
> +       aliases {
> +               serial0 = &r_uart;
> +       };
> +
> +       backlight: backlight {
> +               compatible = "pwm-backlight";
> +               pinctrl-names = "default";
> +               pinctrl-0 = <&bl_en_pin_inet86dz>;
> +               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 6 GPIO_ACTIVE_HIGH>; /* PH6 */
> +       };
> +
> +       chosen {
> +               stdout-path = "serial0:115200n8";
> +       };
> +};
> +
> +&ehci0 {
> +       status = "okay";
> +};
> +
> +&i2c0 {
> +       pinctrl-names = "default";
> +       pinctrl-0 = <&i2c0_pins_a>;
> +       status = "okay";
> +       /*
> +        * The gsl1680 is rated at 400KHz and it will not work reliable at
> +        * 100KHz, this has been confirmed on multiple different tablets.
> +        * The gsl1680 is the only device on this bus.
> +        */
> +       clock-frequency = <400000>;
> +
> +       gsl1680: touchscreen@40 {
> +               compatible = "silead,gsl1680";

Do we already have a driver for this? I don't see one in linux-next.

> +               reg = <0x40>;
> +               interrupt-parent = <&pio>;
> +               interrupts = <1 5 IRQ_TYPE_EDGE_FALLING>; /* PB5 */
> +               pinctrl-names = "default";
> +               pinctrl-0 = <&ts_power_pin_inet86dz>;
> +               power-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
> +               touchscreen-size-x = <960>;
> +               touchscreen-size-y = <640>;
> +               touchscreen-max-fingers = <5>;
> +               touchscreen-fw-name = "silead/gsl1680-inet86dz.fw";
> +       };
> +};
> +
> +&i2c1 {
> +       pinctrl-names = "default";
> +       pinctrl-0 = <&i2c1_pins_a>;
> +       status = "okay";
> +};
> +
> +&lradc {
> +       vref-supply = <&reg_vcc3v0>;
> +       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_inet86dz>;
> +       vmmc-supply = <&reg_dcdc1>;
> +       bus-width = <4>;
> +       cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
> +       cd-inverted;
> +       status = "okay";
> +};
> +
> +&pio {
> +       bl_en_pin_inet86dz: bl_en_pin@0 {
> +               allwinner,pins = "PH6";
> +               allwinner,function = "gpio_in";
> +               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> +       };
> +
> +       mmc0_cd_pin_inet86dz: mmc0_cd_pin@0 {
> +               allwinner,pins = "PB4";
> +               allwinner,function = "gpio_in";
> +               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
> +       };
> +
> +       ts_power_pin_inet86dz: ts_power_pin@0 {
> +               allwinner,pins = "PH1";
> +               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 = "PH8";
> +               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";
> +};
> +
> +&r_rsb {
> +       status = "okay";
> +
> +       axp22x: pmic@3a3 {
> +               compatible = "x-powers,axp223";
> +               reg = <0x3a3>;
> +               interrupt-parent = <&nmi_intc>;
> +               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
> +               eldoin-supply = <&reg_dcdc1>;

Adding a drivevbus-supply referencing vcc_5v0 so it doesn't
show 0V would be nice.

ChenYu

> +               x-powers,drive-vbus-en;
> +       };
> +};
> +
> +&r_uart {
> +       pinctrl-names = "default";
> +       pinctrl-0 = <&r_uart_pins_a>;
> +       status = "okay";
> +};
> +
> +#include "axp22x.dtsi"
> +
> +&reg_aldo1 {
> +       regulator-always-on;
> +       regulator-min-microvolt = <3000000>;
> +       regulator-max-microvolt = <3000000>;
> +       regulator-name = "vcc-io";
> +};
> +
> +&reg_aldo2 {
> +       regulator-always-on;
> +       regulator-min-microvolt = <2350000>;
> +       regulator-max-microvolt = <2650000>;
> +       regulator-name = "vdd-dll";
> +};
> +
> +&reg_aldo3 {
> +       regulator-always-on;
> +       regulator-min-microvolt = <2700000>;
> +       regulator-max-microvolt = <3300000>;
> +       regulator-name = "vcc-pll-avcc";
> +};
> +
> +&reg_dc1sw {
> +       regulator-name = "vcc-lcd";
> +};
> +
> +&reg_dc5ldo {
> +       regulator-always-on;
> +       regulator-min-microvolt = <900000>;
> +       regulator-max-microvolt = <1400000>;
> +       regulator-name = "vdd-cpus";
> +};
> +
> +&reg_dcdc1 {
> +       regulator-always-on;
> +       regulator-min-microvolt = <3000000>;
> +       regulator-max-microvolt = <3000000>;
> +       regulator-name = "vcc-3v0";
> +};
> +
> +&reg_dcdc2 {
> +       regulator-always-on;
> +       regulator-min-microvolt = <900000>;
> +       regulator-max-microvolt = <1400000>;
> +       regulator-name = "vdd-sys";
> +};
> +
> +&reg_dcdc3 {
> +       regulator-always-on;
> +       regulator-min-microvolt = <900000>;
> +       regulator-max-microvolt = <1400000>;
> +       regulator-name = "vdd-cpu";
> +};
> +
> +&reg_dcdc5 {
> +       regulator-always-on;
> +       regulator-min-microvolt = <1500000>;
> +       regulator-max-microvolt = <1500000>;
> +       regulator-name = "vcc-dram";
> +};
> +
> +&reg_dldo1 {
> +       regulator-min-microvolt = <3300000>;
> +       regulator-max-microvolt = <3300000>;
> +       regulator-name = "vcc-wifi";
> +};
> +
> +&reg_drivevbus {
> +       regulator-name = "usb0-vbus";
> +       status = "okay";
> +};
> +
> +&reg_rtc_ldo {
> +       regulator-name = "vcc-rtc";
> +};
> +
> +&simplefb_lcd {
> +       vcc-lcd-supply = <&reg_dc1sw>;
> +};
> +
> +&usb_otg {
> +       dr_mode = "otg";
> +       status = "okay";
> +};
> +
> +&usb_power_supply {
> +       status = "okay";
> +};
> +
> +&usbphy {
> +       pinctrl-names = "default";
> +       pinctrl-0 = <&usb0_id_detect_pin>;
> +       usb0_id_det-gpio = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
> +       usb0_vbus_power-supply = <&usb_power_supply>;
> +       usb0_vbus-supply = <&reg_drivevbus>;
> +       usb1_vbus-supply = <&reg_dldo1>;
> +       status = "okay";
> +};
> --
> 2.7.4
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ARM: dts: sun8i: Add dts file for inet86dz board
       [not found]     ` <CAGb2v66cbx0jta1unrKeYm1t9JKO9Unw8z75rXbW3JSi2=NuMw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-06-13  9:35       ` Hans de Goede
       [not found]         ` <f080dda9-6410-ec79-f083-29a20d147d61-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  2016-06-13  9:37       ` Hans de Goede
  1 sibling, 1 reply; 7+ messages in thread
From: Hans de Goede @ 2016-06-13  9:35 UTC (permalink / raw)
  To: Chen-Yu Tsai; +Cc: Maxime Ripard, linux-arm-kernel, devicetree, Hans de Goede

Hi

On 13-06-16 05:16, Chen-Yu Tsai wrote:
> Hi,
>
> On Mon, Jun 13, 2016 at 1:55 AM, Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
>> The inet86dz board is a board used in 7" tablets from various oems.
>>
>> These tablets are a23 based 7" tablets featuring a 1024x600 LCD,
>> 512MB RAM, 4G NAND, rtl8188etv usb wifi, gsl1680 touchschreen,
>> micro-sd slot, 3.5mm headphone jack and a micro-usb otg connector
>> which doubles as charging port.
>
> This seems awfully similar to the sun8i-a23-q8-tablet, any reason
> not to include that or sun8i-q8-common.dtsi?

So to answer this both for this board and for the Polaroid MID2407PXE03
one, these are not q8 tablets, they are not using the standard q8 casing
at least. So using q8 for them would seem to be a bit confusing to users
and figuring out how to do proper autodetect is already hard enough without
throwing these into the mix too.

OTOH you are right that there is a lot of code duplication here. Since I
plan to start working on touchscreen autodetect soon-ish, let me see how
that goes first.

Maxime can you drop the Polaroid MID2407PXE03 patch for now ?

Regards,

Hans



>
>> Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>> ---
>>  arch/arm/boot/dts/Makefile               |   1 +
>>  arch/arm/boot/dts/sun8i-a23-inet86dz.dts | 293 +++++++++++++++++++++++++++++++
>>  2 files changed, 294 insertions(+)
>>  create mode 100644 arch/arm/boot/dts/sun8i-a23-inet86dz.dts
>>
>> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
>> index 8223602..1ff5434 100644
>> --- a/arch/arm/boot/dts/Makefile
>> +++ b/arch/arm/boot/dts/Makefile
>> @@ -751,6 +751,7 @@ 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 \
>> diff --git a/arch/arm/boot/dts/sun8i-a23-inet86dz.dts b/arch/arm/boot/dts/sun8i-a23-inet86dz.dts
>> new file mode 100644
>> index 0000000..0405258
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/sun8i-a23-inet86dz.dts
>> @@ -0,0 +1,293 @@
>> +/*
>> + * Copyright 2016 Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>> + *
>> + * This file is dual-licensed: you can use it either under the terms
>> + * of the GPL or the X11 license, at your option. Note that this dual
>> + * licensing only applies to this file, and not this project as a
>> + * whole.
>> + *
>> + *  a) This file is free software; you can redistribute it and/or
>> + *     modify it under the terms of the GNU General Public License as
>> + *     published by the Free Software Foundation; either version 2 of the
>> + *     License, or (at your option) any later version.
>> + *
>> + *     This file 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.
>> + *
>> + * Or, alternatively,
>> + *
>> + *  b) Permission is hereby granted, free of charge, to any person
>> + *     obtaining a copy of this software and associated documentation
>> + *     files (the "Software"), to deal in the Software without
>> + *     restriction, including without limitation the rights to use,
>> + *     copy, modify, merge, publish, distribute, sublicense, and/or
>> + *     sell copies of the Software, and to permit persons to whom the
>> + *     Software is furnished to do so, subject to the following
>> + *     conditions:
>> + *
>> + *     The above copyright notice and this permission notice shall be
>> + *     included in all copies or substantial portions of the Software.
>> + *
>> + *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
>> + *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
>> + *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
>> + *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
>> + *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
>> + *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
>> + *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
>> + *     OTHER DEALINGS IN THE SOFTWARE.
>> + */
>> +
>> +/dts-v1/;
>> +#include "sun8i-a23.dtsi"
>> +#include "sunxi-common-regulators.dtsi"
>> +
>> +#include <dt-bindings/gpio/gpio.h>
>> +#include <dt-bindings/input/input.h>
>> +#include <dt-bindings/pinctrl/sun4i-a10.h>
>> +#include <dt-bindings/pwm/pwm.h>
>> +
>> +/ {
>> +       model = "INet-86DZ Rev 01";
>> +       compatible = "primux,inet86dz", "allwinner,sun8i-a23";
>> +
>> +       aliases {
>> +               serial0 = &r_uart;
>> +       };
>> +
>> +       backlight: backlight {
>> +               compatible = "pwm-backlight";
>> +               pinctrl-names = "default";
>> +               pinctrl-0 = <&bl_en_pin_inet86dz>;
>> +               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 6 GPIO_ACTIVE_HIGH>; /* PH6 */
>> +       };
>> +
>> +       chosen {
>> +               stdout-path = "serial0:115200n8";
>> +       };
>> +};
>> +
>> +&ehci0 {
>> +       status = "okay";
>> +};
>> +
>> +&i2c0 {
>> +       pinctrl-names = "default";
>> +       pinctrl-0 = <&i2c0_pins_a>;
>> +       status = "okay";
>> +       /*
>> +        * The gsl1680 is rated at 400KHz and it will not work reliable at
>> +        * 100KHz, this has been confirmed on multiple different tablets.
>> +        * The gsl1680 is the only device on this bus.
>> +        */
>> +       clock-frequency = <400000>;
>> +
>> +       gsl1680: touchscreen@40 {
>> +               compatible = "silead,gsl1680";
>
> Do we already have a driver for this? I don't see one in linux-next.
>
>> +               reg = <0x40>;
>> +               interrupt-parent = <&pio>;
>> +               interrupts = <1 5 IRQ_TYPE_EDGE_FALLING>; /* PB5 */
>> +               pinctrl-names = "default";
>> +               pinctrl-0 = <&ts_power_pin_inet86dz>;
>> +               power-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
>> +               touchscreen-size-x = <960>;
>> +               touchscreen-size-y = <640>;
>> +               touchscreen-max-fingers = <5>;
>> +               touchscreen-fw-name = "silead/gsl1680-inet86dz.fw";
>> +       };
>> +};
>> +
>> +&i2c1 {
>> +       pinctrl-names = "default";
>> +       pinctrl-0 = <&i2c1_pins_a>;
>> +       status = "okay";
>> +};
>> +
>> +&lradc {
>> +       vref-supply = <&reg_vcc3v0>;
>> +       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_inet86dz>;
>> +       vmmc-supply = <&reg_dcdc1>;
>> +       bus-width = <4>;
>> +       cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
>> +       cd-inverted;
>> +       status = "okay";
>> +};
>> +
>> +&pio {
>> +       bl_en_pin_inet86dz: bl_en_pin@0 {
>> +               allwinner,pins = "PH6";
>> +               allwinner,function = "gpio_in";
>> +               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
>> +               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
>> +       };
>> +
>> +       mmc0_cd_pin_inet86dz: mmc0_cd_pin@0 {
>> +               allwinner,pins = "PB4";
>> +               allwinner,function = "gpio_in";
>> +               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
>> +               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
>> +       };
>> +
>> +       ts_power_pin_inet86dz: ts_power_pin@0 {
>> +               allwinner,pins = "PH1";
>> +               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 = "PH8";
>> +               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";
>> +};
>> +
>> +&r_rsb {
>> +       status = "okay";
>> +
>> +       axp22x: pmic@3a3 {
>> +               compatible = "x-powers,axp223";
>> +               reg = <0x3a3>;
>> +               interrupt-parent = <&nmi_intc>;
>> +               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
>> +               eldoin-supply = <&reg_dcdc1>;
>
> Adding a drivevbus-supply referencing vcc_5v0 so it doesn't
> show 0V would be nice.
>
> ChenYu
>
>> +               x-powers,drive-vbus-en;
>> +       };
>> +};
>> +
>> +&r_uart {
>> +       pinctrl-names = "default";
>> +       pinctrl-0 = <&r_uart_pins_a>;
>> +       status = "okay";
>> +};
>> +
>> +#include "axp22x.dtsi"
>> +
>> +&reg_aldo1 {
>> +       regulator-always-on;
>> +       regulator-min-microvolt = <3000000>;
>> +       regulator-max-microvolt = <3000000>;
>> +       regulator-name = "vcc-io";
>> +};
>> +
>> +&reg_aldo2 {
>> +       regulator-always-on;
>> +       regulator-min-microvolt = <2350000>;
>> +       regulator-max-microvolt = <2650000>;
>> +       regulator-name = "vdd-dll";
>> +};
>> +
>> +&reg_aldo3 {
>> +       regulator-always-on;
>> +       regulator-min-microvolt = <2700000>;
>> +       regulator-max-microvolt = <3300000>;
>> +       regulator-name = "vcc-pll-avcc";
>> +};
>> +
>> +&reg_dc1sw {
>> +       regulator-name = "vcc-lcd";
>> +};
>> +
>> +&reg_dc5ldo {
>> +       regulator-always-on;
>> +       regulator-min-microvolt = <900000>;
>> +       regulator-max-microvolt = <1400000>;
>> +       regulator-name = "vdd-cpus";
>> +};
>> +
>> +&reg_dcdc1 {
>> +       regulator-always-on;
>> +       regulator-min-microvolt = <3000000>;
>> +       regulator-max-microvolt = <3000000>;
>> +       regulator-name = "vcc-3v0";
>> +};
>> +
>> +&reg_dcdc2 {
>> +       regulator-always-on;
>> +       regulator-min-microvolt = <900000>;
>> +       regulator-max-microvolt = <1400000>;
>> +       regulator-name = "vdd-sys";
>> +};
>> +
>> +&reg_dcdc3 {
>> +       regulator-always-on;
>> +       regulator-min-microvolt = <900000>;
>> +       regulator-max-microvolt = <1400000>;
>> +       regulator-name = "vdd-cpu";
>> +};
>> +
>> +&reg_dcdc5 {
>> +       regulator-always-on;
>> +       regulator-min-microvolt = <1500000>;
>> +       regulator-max-microvolt = <1500000>;
>> +       regulator-name = "vcc-dram";
>> +};
>> +
>> +&reg_dldo1 {
>> +       regulator-min-microvolt = <3300000>;
>> +       regulator-max-microvolt = <3300000>;
>> +       regulator-name = "vcc-wifi";
>> +};
>> +
>> +&reg_drivevbus {
>> +       regulator-name = "usb0-vbus";
>> +       status = "okay";
>> +};
>> +
>> +&reg_rtc_ldo {
>> +       regulator-name = "vcc-rtc";
>> +};
>> +
>> +&simplefb_lcd {
>> +       vcc-lcd-supply = <&reg_dc1sw>;
>> +};
>> +
>> +&usb_otg {
>> +       dr_mode = "otg";
>> +       status = "okay";
>> +};
>> +
>> +&usb_power_supply {
>> +       status = "okay";
>> +};
>> +
>> +&usbphy {
>> +       pinctrl-names = "default";
>> +       pinctrl-0 = <&usb0_id_detect_pin>;
>> +       usb0_id_det-gpio = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
>> +       usb0_vbus_power-supply = <&usb_power_supply>;
>> +       usb0_vbus-supply = <&reg_drivevbus>;
>> +       usb1_vbus-supply = <&reg_dldo1>;
>> +       status = "okay";
>> +};
>> --
>> 2.7.4
>>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ARM: dts: sun8i: Add dts file for inet86dz board
       [not found]     ` <CAGb2v66cbx0jta1unrKeYm1t9JKO9Unw8z75rXbW3JSi2=NuMw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2016-06-13  9:35       ` Hans de Goede
@ 2016-06-13  9:37       ` Hans de Goede
  1 sibling, 0 replies; 7+ messages in thread
From: Hans de Goede @ 2016-06-13  9:37 UTC (permalink / raw)
  To: Chen-Yu Tsai; +Cc: Maxime Ripard, linux-arm-kernel, devicetree

Hi,

And to also answer another question I missed before:

On 13-06-16 05:16, Chen-Yu Tsai wrote:

<snip>

>> +&i2c0 {
>> +       pinctrl-names = "default";
>> +       pinctrl-0 = <&i2c0_pins_a>;
>> +       status = "okay";
>> +       /*
>> +        * The gsl1680 is rated at 400KHz and it will not work reliable at
>> +        * 100KHz, this has been confirmed on multiple different tablets.
>> +        * The gsl1680 is the only device on this bus.
>> +        */
>> +       clock-frequency = <400000>;
>> +
>> +       gsl1680: touchscreen@40 {
>> +               compatible = "silead,gsl1680";
>
> Do we already have a driver for this? I don't see one in linux-next.

I've a bunch of students form the local university working on a driver
for this, they should submit it real soon now. That does mean that
including this node is a bit premature as the bindings my change, sorry
I overlooked this.

Regards,

Hans



>
>> +               reg = <0x40>;
>> +               interrupt-parent = <&pio>;
>> +               interrupts = <1 5 IRQ_TYPE_EDGE_FALLING>; /* PB5 */
>> +               pinctrl-names = "default";
>> +               pinctrl-0 = <&ts_power_pin_inet86dz>;
>> +               power-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
>> +               touchscreen-size-x = <960>;
>> +               touchscreen-size-y = <640>;
>> +               touchscreen-max-fingers = <5>;
>> +               touchscreen-fw-name = "silead/gsl1680-inet86dz.fw";
>> +       };
>> +};
>> +
>> +&i2c1 {
>> +       pinctrl-names = "default";
>> +       pinctrl-0 = <&i2c1_pins_a>;
>> +       status = "okay";
>> +};
>> +
>> +&lradc {
>> +       vref-supply = <&reg_vcc3v0>;
>> +       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_inet86dz>;
>> +       vmmc-supply = <&reg_dcdc1>;
>> +       bus-width = <4>;
>> +       cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
>> +       cd-inverted;
>> +       status = "okay";
>> +};
>> +
>> +&pio {
>> +       bl_en_pin_inet86dz: bl_en_pin@0 {
>> +               allwinner,pins = "PH6";
>> +               allwinner,function = "gpio_in";
>> +               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
>> +               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
>> +       };
>> +
>> +       mmc0_cd_pin_inet86dz: mmc0_cd_pin@0 {
>> +               allwinner,pins = "PB4";
>> +               allwinner,function = "gpio_in";
>> +               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
>> +               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
>> +       };
>> +
>> +       ts_power_pin_inet86dz: ts_power_pin@0 {
>> +               allwinner,pins = "PH1";
>> +               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 = "PH8";
>> +               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";
>> +};
>> +
>> +&r_rsb {
>> +       status = "okay";
>> +
>> +       axp22x: pmic@3a3 {
>> +               compatible = "x-powers,axp223";
>> +               reg = <0x3a3>;
>> +               interrupt-parent = <&nmi_intc>;
>> +               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
>> +               eldoin-supply = <&reg_dcdc1>;
>
> Adding a drivevbus-supply referencing vcc_5v0 so it doesn't
> show 0V would be nice.
>
> ChenYu
>
>> +               x-powers,drive-vbus-en;
>> +       };
>> +};
>> +
>> +&r_uart {
>> +       pinctrl-names = "default";
>> +       pinctrl-0 = <&r_uart_pins_a>;
>> +       status = "okay";
>> +};
>> +
>> +#include "axp22x.dtsi"
>> +
>> +&reg_aldo1 {
>> +       regulator-always-on;
>> +       regulator-min-microvolt = <3000000>;
>> +       regulator-max-microvolt = <3000000>;
>> +       regulator-name = "vcc-io";
>> +};
>> +
>> +&reg_aldo2 {
>> +       regulator-always-on;
>> +       regulator-min-microvolt = <2350000>;
>> +       regulator-max-microvolt = <2650000>;
>> +       regulator-name = "vdd-dll";
>> +};
>> +
>> +&reg_aldo3 {
>> +       regulator-always-on;
>> +       regulator-min-microvolt = <2700000>;
>> +       regulator-max-microvolt = <3300000>;
>> +       regulator-name = "vcc-pll-avcc";
>> +};
>> +
>> +&reg_dc1sw {
>> +       regulator-name = "vcc-lcd";
>> +};
>> +
>> +&reg_dc5ldo {
>> +       regulator-always-on;
>> +       regulator-min-microvolt = <900000>;
>> +       regulator-max-microvolt = <1400000>;
>> +       regulator-name = "vdd-cpus";
>> +};
>> +
>> +&reg_dcdc1 {
>> +       regulator-always-on;
>> +       regulator-min-microvolt = <3000000>;
>> +       regulator-max-microvolt = <3000000>;
>> +       regulator-name = "vcc-3v0";
>> +};
>> +
>> +&reg_dcdc2 {
>> +       regulator-always-on;
>> +       regulator-min-microvolt = <900000>;
>> +       regulator-max-microvolt = <1400000>;
>> +       regulator-name = "vdd-sys";
>> +};
>> +
>> +&reg_dcdc3 {
>> +       regulator-always-on;
>> +       regulator-min-microvolt = <900000>;
>> +       regulator-max-microvolt = <1400000>;
>> +       regulator-name = "vdd-cpu";
>> +};
>> +
>> +&reg_dcdc5 {
>> +       regulator-always-on;
>> +       regulator-min-microvolt = <1500000>;
>> +       regulator-max-microvolt = <1500000>;
>> +       regulator-name = "vcc-dram";
>> +};
>> +
>> +&reg_dldo1 {
>> +       regulator-min-microvolt = <3300000>;
>> +       regulator-max-microvolt = <3300000>;
>> +       regulator-name = "vcc-wifi";
>> +};
>> +
>> +&reg_drivevbus {
>> +       regulator-name = "usb0-vbus";
>> +       status = "okay";
>> +};
>> +
>> +&reg_rtc_ldo {
>> +       regulator-name = "vcc-rtc";
>> +};
>> +
>> +&simplefb_lcd {
>> +       vcc-lcd-supply = <&reg_dc1sw>;
>> +};
>> +
>> +&usb_otg {
>> +       dr_mode = "otg";
>> +       status = "okay";
>> +};
>> +
>> +&usb_power_supply {
>> +       status = "okay";
>> +};
>> +
>> +&usbphy {
>> +       pinctrl-names = "default";
>> +       pinctrl-0 = <&usb0_id_detect_pin>;
>> +       usb0_id_det-gpio = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
>> +       usb0_vbus_power-supply = <&usb_power_supply>;
>> +       usb0_vbus-supply = <&reg_drivevbus>;
>> +       usb1_vbus-supply = <&reg_dldo1>;
>> +       status = "okay";
>> +};
>> --
>> 2.7.4
>>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ARM: dts: sun8i: Add dts file for inet86dz board
       [not found]         ` <f080dda9-6410-ec79-f083-29a20d147d61-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2016-06-17  5:46           ` Maxime Ripard
  2016-06-22  6:40             ` Chen-Yu Tsai
  0 siblings, 1 reply; 7+ messages in thread
From: Maxime Ripard @ 2016-06-17  5:46 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Chen-Yu Tsai, linux-arm-kernel, devicetree

[-- Attachment #1: Type: text/plain, Size: 1626 bytes --]

On Mon, Jun 13, 2016 at 11:35:15AM +0200, Hans de Goede wrote:
> Hi
> 
> On 13-06-16 05:16, Chen-Yu Tsai wrote:
> >Hi,
> >
> >On Mon, Jun 13, 2016 at 1:55 AM, Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> >>The inet86dz board is a board used in 7" tablets from various oems.
> >>
> >>These tablets are a23 based 7" tablets featuring a 1024x600 LCD,
> >>512MB RAM, 4G NAND, rtl8188etv usb wifi, gsl1680 touchschreen,
> >>micro-sd slot, 3.5mm headphone jack and a micro-usb otg connector
> >>which doubles as charging port.
> >
> >This seems awfully similar to the sun8i-a23-q8-tablet, any reason
> >not to include that or sun8i-q8-common.dtsi?
> 
> So to answer this both for this board and for the Polaroid MID2407PXE03
> one, these are not q8 tablets, they are not using the standard q8 casing
> at least. So using q8 for them would seem to be a bit confusing to users
> and figuring out how to do proper autodetect is already hard enough without
> throwing these into the mix too.
> 
> OTOH you are right that there is a lot of code duplication here. Since I
> plan to start working on touchscreen autodetect soon-ish, let me see how
> that goes first.

For reference, I'm not really against having similar boards having
similar-yet-duplicated DT. This is just data, and sometimes trying to
factorise things also make it less trivial and easy to understand.

> Maxime can you drop the Polaroid MID2407PXE03 patch for now ?

Done.

Thanks,
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ARM: dts: sun8i: Add dts file for inet86dz board
  2016-06-17  5:46           ` Maxime Ripard
@ 2016-06-22  6:40             ` Chen-Yu Tsai
       [not found]               ` <CAGb2v67TUUZSj2bCQPvogG8rNfdxBcnZwRVLVLxw6Tjg4o+kDA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Chen-Yu Tsai @ 2016-06-22  6:40 UTC (permalink / raw)
  To: Maxime Ripard; +Cc: Hans de Goede, Chen-Yu Tsai, linux-arm-kernel, devicetree

On Fri, Jun 17, 2016 at 1:46 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> On Mon, Jun 13, 2016 at 11:35:15AM +0200, Hans de Goede wrote:
>> Hi
>>
>> On 13-06-16 05:16, Chen-Yu Tsai wrote:
>> >Hi,
>> >
>> >On Mon, Jun 13, 2016 at 1:55 AM, Hans de Goede <hdegoede@redhat.com> wrote:
>> >>The inet86dz board is a board used in 7" tablets from various oems.
>> >>
>> >>These tablets are a23 based 7" tablets featuring a 1024x600 LCD,
>> >>512MB RAM, 4G NAND, rtl8188etv usb wifi, gsl1680 touchschreen,
>> >>micro-sd slot, 3.5mm headphone jack and a micro-usb otg connector
>> >>which doubles as charging port.
>> >
>> >This seems awfully similar to the sun8i-a23-q8-tablet, any reason
>> >not to include that or sun8i-q8-common.dtsi?
>>
>> So to answer this both for this board and for the Polaroid MID2407PXE03
>> one, these are not q8 tablets, they are not using the standard q8 casing
>> at least. So using q8 for them would seem to be a bit confusing to users
>> and figuring out how to do proper autodetect is already hard enough without
>> throwing these into the mix too.
>>
>> OTOH you are right that there is a lot of code duplication here. Since I
>> plan to start working on touchscreen autodetect soon-ish, let me see how
>> that goes first.
>
> For reference, I'm not really against having similar boards having
> similar-yet-duplicated DT. This is just data, and sometimes trying to
> factorise things also make it less trivial and easy to understand.

It seems most if not all Allwinner based tablets use the reference design
Allwinner provides. The design specifies how components are connected,
what models could be used, etc.. Maybe we could rename sun*i-q8-common to
sun*i-reference-design and use that? We'd still have board.dts files
including it, and providing the board name.

ChenYu

>> Maxime can you drop the Polaroid MID2407PXE03 patch for now ?
>
> Done.
>
> Thanks,
> Maxime
>
> --
> Maxime Ripard, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ARM: dts: sun8i: Add dts file for inet86dz board
       [not found]               ` <CAGb2v67TUUZSj2bCQPvogG8rNfdxBcnZwRVLVLxw6Tjg4o+kDA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-06-22 16:09                 ` Hans de Goede
  0 siblings, 0 replies; 7+ messages in thread
From: Hans de Goede @ 2016-06-22 16:09 UTC (permalink / raw)
  To: Chen-Yu Tsai, Maxime Ripard; +Cc: linux-arm-kernel, devicetree

Hi,

On 22-06-16 08:40, Chen-Yu Tsai wrote:
> On Fri, Jun 17, 2016 at 1:46 PM, Maxime Ripard
> <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:
>> On Mon, Jun 13, 2016 at 11:35:15AM +0200, Hans de Goede wrote:
>>> Hi
>>>
>>> On 13-06-16 05:16, Chen-Yu Tsai wrote:
>>>> Hi,
>>>>
>>>> On Mon, Jun 13, 2016 at 1:55 AM, Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
>>>>> The inet86dz board is a board used in 7" tablets from various oems.
>>>>>
>>>>> These tablets are a23 based 7" tablets featuring a 1024x600 LCD,
>>>>> 512MB RAM, 4G NAND, rtl8188etv usb wifi, gsl1680 touchschreen,
>>>>> micro-sd slot, 3.5mm headphone jack and a micro-usb otg connector
>>>>> which doubles as charging port.
>>>>
>>>> This seems awfully similar to the sun8i-a23-q8-tablet, any reason
>>>> not to include that or sun8i-q8-common.dtsi?
>>>
>>> So to answer this both for this board and for the Polaroid MID2407PXE03
>>> one, these are not q8 tablets, they are not using the standard q8 casing
>>> at least. So using q8 for them would seem to be a bit confusing to users
>>> and figuring out how to do proper autodetect is already hard enough without
>>> throwing these into the mix too.
>>>
>>> OTOH you are right that there is a lot of code duplication here. Since I
>>> plan to start working on touchscreen autodetect soon-ish, let me see how
>>> that goes first.
>>
>> For reference, I'm not really against having similar boards having
>> similar-yet-duplicated DT. This is just data, and sometimes trying to
>> factorise things also make it less trivial and easy to understand.
>
> It seems most if not all Allwinner based tablets use the reference design
> Allwinner provides. The design specifies how components are connected,
> what models could be used, etc.. Maybe we could rename sun*i-q8-common to
> sun*i-reference-design and use that? We'd still have board.dts files
> including it, and providing the board name.

Ok, so as the thread I started on this shows, doing auto-detect is actually
more or less impossible when it comes to the touchscreens, so I do believe
that having separate dts files for clearly identifiable non q8 boards is
best.

I do like the idea of sharing some more stuff though, I'll do a v2 of
the Polaroid MID2407PXE03 and inet86dz dts additions based on first
introducing a sun8i-reference-design-tablet.dtsi which will take most
of the content currently in sun8i-q8-common.dtsi

Regards,

Hans
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-06-22 16:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-12 17:55 [PATCH] ARM: dts: sun8i: Add dts file for inet86dz board Hans de Goede
     [not found] ` <1465754150-16753-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-13  3:16   ` Chen-Yu Tsai
     [not found]     ` <CAGb2v66cbx0jta1unrKeYm1t9JKO9Unw8z75rXbW3JSi2=NuMw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-13  9:35       ` Hans de Goede
     [not found]         ` <f080dda9-6410-ec79-f083-29a20d147d61-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-17  5:46           ` Maxime Ripard
2016-06-22  6:40             ` Chen-Yu Tsai
     [not found]               ` <CAGb2v67TUUZSj2bCQPvogG8rNfdxBcnZwRVLVLxw6Tjg4o+kDA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-22 16:09                 ` Hans de Goede
2016-06-13  9:37       ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).