From: Giulio Benetti Date: Thu, 22 Mar 2018 21:40:01 +0100 Subject: [U-Boot] [PATCH] sunxi: Add support for LiNova1 CTP 7" HMI In-Reply-To: <1521751084-2727-1-git-send-email-giulio.benetti@micronovasrl.com> References: <1521751084-2727-1-git-send-email-giulio.benetti@micronovasrl.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de Hi, please drop this patch, I've made confusion on sending. Sorry --=20 Giulio Benetti CTO MICRONOVA SRL Sede: Via A. Niedda 3 - 35010 Vigonza (PD) Tel. 049/8931563 - Fax 049/8931346 Cod.Fiscale - P.IVA 02663420285 Capitale Sociale =E2=82=AC 26.000 i.v. Iscritta al Reg. Imprese di Padova N. 02663420285 Numero R.E.A. 258642 Il 22/03/2018 21:38, Giulio Benetti ha scritto: > The A20-Linova1-7 HMI, also called Q027_2_F which is printed on production > label, is an industrial Human Machine Interface. > It features: > - 512MB DDR RAM > - 1 Sd-card >=3D 4GB > - 1 Usb otg(programmable via software) with A-Usb Connector > - 1 Usb host > - 1 Buzzer > - 1 Input for LiPo > - 1 Relay to signal absence of power supply > - 1 External Rtc with 56 bytes of ram + CR2032 battery > - 1 7" 24-bits Tft 800x480 with PCap on > - 1 Mono audio 1-watt amplifier > - 1 RS485 port > - 1 Power On Line through +12Vdc reaching 57.600baud, > from where it can be supplied and placed in a network of 50 units > - exposed jtag pins >=20 > HMI is supplied from +12Vdc. > It comes in different flavours for connector types and can be found with > umounted features as requested by customers. >=20 > Signed-off-by: Giulio Benetti > --- > arch/arm/dts/sun7i-a20-linova1-ctp-7i.dts | 213 +++++++++++++++++++++++= +++++++ > configs/A20-LiNova1-CTP-7i_defconfig | 32 +++++ > 2 files changed, 245 insertions(+) > create mode 100644 arch/arm/dts/sun7i-a20-linova1-ctp-7i.dts > create mode 100644 configs/A20-LiNova1-CTP-7i_defconfig >=20 > diff --git a/arch/arm/dts/sun7i-a20-linova1-ctp-7i.dts b/arch/arm/dts/sun= 7i-a20-linova1-ctp-7i.dts > new file mode 100644 > index 0000000..8a0e437 > --- /dev/null > +++ b/arch/arm/dts/sun7i-a20-linova1-ctp-7i.dts > @@ -0,0 +1,213 @@ > +/* > + * This is based on sun7i-a20-linova1-ctp-7i.dts > + * > + * Copyright 2014 - Hans de Goede > + * Copyright (c) 2014 FUKAUMI Naoki > + * > + * 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 "sun7i-a20.dtsi" > +#include "sunxi-common-regulators.dtsi" > + > +#include > +#include > + > +/ { > + model =3D "Micronova srl LiNova1 CTP 7i"; > + compatible =3D "micronova,a20-linova1-ctp-7i", "allwinner,sun7i-a20"; > + > + aliases { > + serial0 =3D &uart0; > + }; > + > + chosen { > + stdout-path =3D "serial0:115200n8"; > + }; > + > + panel: panel { > + compatible =3D "cdtech,s070wv95-ct16", "simple-panel"; > + power-supply =3D <®_vcc3v3>; > + #address-cells =3D <1>; > + #size-cells =3D <0>; > + > + port at 0 { > + reg =3D <0>; > + #address-cells =3D <1>; > + #size-cells =3D <0>; > + > + panel_input: endpoint at 0 { > + reg =3D <0>; > + remote-endpoint =3D <&tcon0_out_panel>; > + }; > + }; > + }; > + > + reserved-memory { > + #address-cells =3D <1>; > + #size-cells =3D <1>; > + ranges; > + > + display_pool: cma { > + compatible =3D "shared-dma-pool"; > + size =3D <0x8000000>; > + alignment =3D <0x2000>; > + reusable; > + linux,cma-default; > + }; > + }; > +}; > + > +&ehci0 { > + status =3D "okay"; > +}; > + > +&ehci1 { > + status =3D "okay"; > +}; > + > +&i2c0 { > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&i2c0_pins_a>; > + status =3D "okay"; > + > + axp209: pmic at 34 { > + compatible =3D "x-powers,axp209"; > + reg =3D <0x34>; > + interrupt-parent =3D <&nmi_intc>; > + interrupts =3D <0 IRQ_TYPE_LEVEL_LOW>; > + > + interrupt-controller; > + #interrupt-cells =3D <1>; > + }; > +}; > + > +&i2c2 { > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&i2c2_pins_a>; > + status =3D "okay"; > + > + ft5x: touchscreen at 38 { > + compatible =3D "edt,edt-ft5206"; > + reg =3D <0x38>; > + interrupt-parent =3D <&pio>; > + interrupts =3D <7 2 IRQ_TYPE_EDGE_FALLING>; /* PH2 */ > + reset-gpios =3D <&pio 7 3 GPIO_ACTIVE_LOW>; /* PH3 */ > + touchscreen-size-x =3D <800>; > + touchscreen-size-y =3D <480>; > + }; > +}; > + > +&mmc0 { > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&mmc0_pins_a>; > + vmmc-supply =3D <®_vcc3v3>; > + bus-width =3D <4>; > + cd-gpios =3D <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */ > + cd-inverted; > + status =3D "okay"; > +}; > + > +&ohci0 { > + status =3D "okay"; > +}; > + > +&ohci1 { > + status =3D "okay"; > +}; > + > +&otg_sram { > + status =3D "okay"; > +}; > + > +®_usb0_vbus { > + status =3D "okay"; > +}; > + > +®_usb1_vbus { > + status =3D "okay"; > +}; > + > +&uart0 { > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&uart0_pins_a>; > + status =3D "okay"; > +}; > + > +&usb_otg { > + dr_mode =3D "host"; > + status =3D "okay"; > +}; > + > +&usbphy { > + pinctrl-names =3D "default"; > + usb0_vbus-supply =3D <®_usb0_vbus>; > + usb1_vbus-supply =3D <®_usb1_vbus>; > + status =3D "okay"; > +}; > + > +&be0 { > + status =3D "okay"; > +}; > + > +&de { > + status =3D "okay"; > +}; > + > +&fe0 { > + status =3D "okay"; > +}; > + > +&tcon0 { > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&lcd_rgb888_pins>; > + status =3D "okay"; > +}; > + > +&tcon0_out { > + tcon0_out_panel: endpoint at 0 { > + reg =3D <0>; > + remote-endpoint =3D <&panel_input>; > + }; > +}; > + > +&mali { > + memory-region =3D <&display_pool>; > +}; > diff --git a/configs/A20-LiNova1-CTP-7i_defconfig b/configs/A20-LiNova1-C= TP-7i_defconfig > new file mode 100644 > index 0000000..4c4d9e1 > --- /dev/null > +++ b/configs/A20-LiNova1-CTP-7i_defconfig > @@ -0,0 +1,32 @@ > +CONFIG_ARM=3Dy > +CONFIG_ARCH_SUNXI=3Dy > +CONFIG_IDENT_STRING=3D" Micronova srl" > +CONFIG_MACH_SUN7I=3Dy > +CONFIG_DRAM_CLK=3D396 > +CONFIG_MMC0_CD_PIN=3D"PH1" > +CONFIG_USB1_VBUS_PIN=3D"" > +CONFIG_USB2_VBUS_PIN=3D"" > +# CONFIG_VIDEO_HDMI is not set > +CONFIG_VIDEO_LCD_MODE=3D"x:800,y:480,depth:24,pclk_khz:35000,le:40,ri:40= ,up:29,lo:13,hs:48,vs:3,sync:3,vmode:0" > +CONFIG_VIDEO_LCD_POWER=3D"PH0" > +CONFIG_VIDEO_LCD_BL_EN=3D"PH27" > +CONFIG_VIDEO_LCD_BL_PWM=3D"PB2" > +# CONFIG_VIDEO_LCD_BL_PWM_ACTIVE_LOW is not set > +CONFIG_DEFAULT_DEVICE_TREE=3D"sun7i-a20-linova1-ctp-7i" > +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set > +CONFIG_BOOTDELAY=3D1 > +# CONFIG_DISPLAY_CPUINFO is not set > +# CONFIG_DISPLAY_BOARDINFO is not set > +CONFIG_SPL=3Dy > +CONFIG_SPL_I2C_SUPPORT=3Dy > +# CONFIG_CMD_FLASH is not set > +# CONFIG_CMD_FPGA is not set > +# CONFIG_SPL_DOS_PARTITION is not set > +# CONFIG_SPL_ISO_PARTITION is not set > +# CONFIG_SPL_EFI_PARTITION is not set > +# CONFIG_NETDEVICES is not set > +CONFIG_AXP_ALDO3_VOLT=3D2800 > +CONFIG_AXP_ALDO4_VOLT=3D2800 > +CONFIG_USB_EHCI_HCD=3Dy > +CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=3Dy > +# CONFIG_USB_GADGET is not set >=20