Verified Commit 817de9fd authored by JuniorJPDJ's avatar JuniorJPDJ Committed by Alexey Min
Browse files

temp/u-boot-goclever-gcta741l: split to separate packages (MR 2064)

[ci:skip-vercheck] bugged subpackage version
parent bb12ca14
Pipeline #277795853 passed with stages
in 13 minutes and 30 seconds
From d5935188b0ceb58682acfa8961e76118bb15ac1b Mon Sep 17 00:00:00 2001
From: JuniorJPDJ <git@juniorjpdj.pl>
Date: Sun, 28 Mar 2021 01:59:27 +0100
Subject: [PATCH] dts: add sun6i-a31s-goclever-gcta741l
---
arch/arm/dts/Makefile | 1 +
arch/arm/dts/sun6i-a31s-goclever-gcta741l.dts | 103 ++++++++++++++++++
2 files changed, 104 insertions(+)
create mode 100644 arch/arm/dts/sun6i-a31s-goclever-gcta741l.dts
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index fd47e408f8..88b32ce74a 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -504,6 +504,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
sun6i-a31-mixtile-loftq.dtb \
sun6i-a31s-colorfly-e708-q1.dtb \
sun6i-a31s-cs908.dtb \
+ sun6i-a31s-goclever-gcta741l.dtb \
sun6i-a31s-inet-q972.dtb \
sun6i-a31s-primo81.dtb \
sun6i-a31s-sina31s.dtb \
diff --git a/arch/arm/dts/sun6i-a31s-goclever-gcta741l.dts b/arch/arm/dts/sun6i-a31s-goclever-gcta741l.dts
new file mode 100644
index 0000000000..7fb95aef4c
--- /dev/null
+++ b/arch/arm/dts/sun6i-a31s-goclever-gcta741l.dts
@@ -0,0 +1,103 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR X11)
+// Copyright 2021 Jacek Pruciak <linux@juniorjpdj.pl>
+
+/dts-v1/;
+#include "sun6i-a31s.dtsi"
+#include "sun6i-reference-design-tablet.dtsi"
+//#include <dt-bindings/pwm/pwm.h>
+
+/ {
+ model = "GoClever Orion 70L";
+ compatible = "goclever,gcta741l", "allwinner,sun6i-a31s";
+
+ panel {
+ compatible = "hannstar,tqtm070cb501";
+ power-supply = <&reg_dc1sw>;
+ //backlight = <&backlight>;
+
+ port {
+ panel_input: endpoint {
+ remote-endpoint = <&tcon0_out_lcd>;
+ };
+ };
+ };
+
+ // PWM not supported by sun6i at the moment
+ //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>;
+ // enable-gpios = <&pio 0 25 GPIO_ACTIVE_HIGH>; /* PA25 */
+ //};
+};
+
+&usb_otg {
+ dr_mode = "otg";
+};
+
+&battery_power_supply {
+ status = "okay";
+};
+
+&lradc {
+ vref-supply = <&reg_aldo3>;
+ status = "okay";
+
+ button-1000 {
+ label = "Home";
+ linux,code = <KEY_HOMEPAGE>;
+ channel = <0>;
+ voltage = <1000000>;
+ };
+};
+
+&i2c2 {
+ status = "okay";
+
+ accelerometer@4c {
+ compatible = "fsl,mma7660";
+ reg = <0x4c>;
+ interrupt-parent = <&pio>;
+ interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>; /* PA9 */
+
+ mount-matrix = "0", "1", "0",
+ "1", "0", "0",
+ "0", "0", "1";
+ };
+};
+
+&tcon0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&lcd0_rgb888_pins>;
+ status = "okay";
+};
+
+&tcon0_out {
+ tcon0_out_lcd: endpoint@0 {
+ reg = <0>;
+ remote-endpoint = <&panel_input>;
+ };
+};
+
+&de {
+ status = "okay";
+};
+
+&simplefb_lcd {
+ status = "okay";
+};
+
+&codec {
+ // This still doesn't work
+ allwinner,audio-routing =
+ /* sink, source */
+ "Headphone", "HP",
+ "Speaker", "LINEOUT",
+ "MIC1", "Mic",
+ "MIC2", "Headset Mic",
+ "Mic", "MBIAS",
+ "Headset Mic", "HBIAS";
+ allwinner,pa-gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
+ status = "okay";
+};
--
2.31.0
From 4ae995b8dbef63a3253c40aa08e09b16c3008425 Mon Sep 17 00:00:00 2001
From: JuniorJPDJ <git@juniorjpdj.pl>
Date: Sun, 28 Mar 2021 03:05:32 +0200
Subject: [PATCH] configs: add goclever-gcta741l
---
configs/goclever-gcta741l_defconfig | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 configs/goclever-gcta741l_defconfig
diff --git a/configs/goclever-gcta741l_defconfig b/configs/goclever-gcta741l_defconfig
new file mode 100644
index 0000000000..0c23d3ab04
--- /dev/null
+++ b/configs/goclever-gcta741l_defconfig
@@ -0,0 +1,27 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_SPL=y
+CONFIG_MACH_SUN6I=y
+CONFIG_DRAM_CLK=360
+CONFIG_DRAM_ZQ=251
+CONFIG_MMC0_CD_PIN="PA8"
+CONFIG_USB0_VBUS_PIN="AXP0-VBUS-ENABLE"
+CONFIG_USB0_VBUS_DET="AXP0-VBUS-DETECT"
+CONFIG_USB0_ID_DET="PA15"
+CONFIG_AXP_GPIO=y
+CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:33000,le:14,ri:240,up:3,lo:35,hs:30,vs:13,sync:3,vmode:0"
+# le=-14,up=-3
+CONFIG_VIDEO_LCD_DCLK_PHASE=0
+CONFIG_VIDEO_LCD_BL_EN="PA25"
+CONFIG_VIDEO_LCD_BL_PWM="PH13"
+CONFIG_NR_DRAM_BANKS=1
+CONFIG_SPL_TEXT_BASE=0x60
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31s-goclever-gcta741l"
+CONFIG_AXP_DLDO1_VOLT=3300
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_MUSB_HOST=y
+CONFIG_USB_KEYBOARD=y
+CONFIG_USB_STORAGE=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
--
2.31.0
# Maintainer Jacek Pruciak <pmos@juniorjpdj.pl>
# Forked from Alpine, add external boards
# Maintainer: Jacek Pruciak <pmos@juniorjpdj.pl>
pkgname=u-boot-goclever-gcta741l
pkgver=2021.01
pkgrel=0
pkgdesc="u-boot for goclever-gcta741l"
pkgrel=1
pkgdesc="u-boot for GoClever Orion 70L"
url="https://www.denx.de/wiki/U-Boot/"
arch="armv7"
license="GPL-2.0-or-later OFL-1.1 BSD-2-Clause BSD-3-Clause eCos-2.0 IBM-pibs
......@@ -15,104 +14,26 @@ makedepends="$depends_dev bc dtc python3-dev swig bison flex openssl-dev
source="
https://ftp.denx.de/pub/u-boot/u-boot-${pkgver//_/-}.tar.bz2
0001-sunxi-h3-Fix-PLL1-setup-to-never-use-dividers.patch
add-dtbs-to-makefile.patch
sun4i-a10-lark-freeme-70-2s.dts
sun5i-a13-prestigio-per5574bc.dts
sun6i-a31s-goclever-gcta741l.dts
goclever-gcta741l_defconfig
lark-freeme-70-2s_defconfig
prestigio-per5574bc_defconfig
0002-dts-add-sun6i-a31s-goclever-gcta741l.patch
0003-configs-add-goclever-gcta741l.patch
"
builddir="$srcdir"/u-boot-${pkgver//_/-}
board_configs="
prestigio-per5574bc:prestigio-per5574bc
lark-freeme-70-2s:lark-freeme-70-2s
"
subpackages=""
for board_config in $board_configs; do
_board="${board_config%%:*}"
subpackages="$subpackages u-boot-$_board:${_board//-/_}"
done
prepare() {
default_prepare
cp "$srcdir"/*.dts "$builddir"/arch/arm/dts/
cp "$srcdir"/*_defconfig "$builddir"/configs/
}
build() {
cd "$builddir"
touch include/config.h
LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > include/timestamp_autogenerated.h
LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> include/timestamp_autogenerated.h
local board_config board
for board_config in "goclever-gcta741l:goclever-gcta741l" $board_configs; do
local configs="${board_config#*:}"
for board in ${configs//,/ }; do
msg "Building u-boot for $board"
export BUILD_DIR="$builddir"/build/$board
mkdir -p "$BUILD_DIR"
make O="$BUILD_DIR" ${board}_config || return 1
make O="$BUILD_DIR" all || return 1
done
done
msg "Building u-boot-tools"
make tools-only_defconfig
make tools-all
}
_split_boards() {
cd "$builddir"/build
pkgdesc="u-boot for $1"
depends=""
shift
local board
for board; do
msg "Including board $board"
mkdir -p "$subpkgdir"/usr/share/u-boot/$board
export BUILD_DIR="$builddir"/build/$board
local ok=no
for image in u-boot-sunxi-with-spl.bin -- MLO SPL u-boot.img -- u-boot.bin; do
if [ "$image" = "--" ]; then
[ "$ok" = yes ] && break
continue
fi
if [ -e "$BUILD_DIR"/$image ]; then
cp "$BUILD_DIR"/$image "$subpkgdir"/usr/share/u-boot/$board \
|| return 1
ok=yes
fi
done
[ "$ok" = yes ] || return 1
done
make goclever-gcta741l_config
make all
}
package() {
_board="goclever-gcta741l"
_configs="goclever-gcta741l"
export subpkgdir="$pkgdir"
_split_boards $_board ${_configs//,/ }
install -D -m644 "$builddir"/u-boot-sunxi-with-spl.bin \
"$pkgdir"/usr/share/u-boot/goclever-gcta741l/u-boot-sunxi-with-spl.bin
}
for board_config in $board_configs; do
_board="${board_config%%:*}"
_configs="${board_config#*:}"
eval "${_board//-/_}() { _split_boards $_board ${_configs//,/ }; }"
done
sha512sums="40dd4d9ef87a1829158658c433d46a047a39c0d8c314ad8d133f7240343ee3a75b060f009dd2efe598cfb8a766773f6cd773ea7f7745ee88e52a771c77eb1c6e u-boot-2021.01.tar.bz2
9478a5b46414139212a11d29e05dd973c4c866e8970b25021517d47b7177a03c910dbe761ae9c5acee0e4f1a5a8db76f24e168b83a5ebd9034d9cb640350604e 0001-sunxi-h3-Fix-PLL1-setup-to-never-use-dividers.patch
37808f4c2651405b848f3072ebd6355db46e3b36d616763317d3e2f35e848aaeca34de05c57150742db018054c4661d71be6df1276c3d34171d6c758ff1a3698 add-dtbs-to-makefile.patch
205966445a09c391945fc0d93ff97297f75782ac57df65c23e2ae8076f0341370031d028d07c39235dfd81fe7e340c19c3ce0ab7594d6a3cd81622683c97db6a sun4i-a10-lark-freeme-70-2s.dts
4913803d7d0e9a97ff75ce3b3c791c89e450beb8320cc8354f8af172af7648823b4b20e3d068662080934351211232fb0827e76124461d4de9f74335c640dcc3 sun5i-a13-prestigio-per5574bc.dts
63ee02f1791c1cc388495bfac87a2b30565d8b70970fa4aa890c3a9edf0fabfb3245895378b269446ba1dd32808f9c2dde416b0bc857c10969023bda5d94770d sun6i-a31s-goclever-gcta741l.dts
b66b916360aae9af41ef161a854420f8dffefc5d50dca833366fed2a6d9cf7509ee12baffd87cd78af1dc350b42fcde80c12e4ed4c92990e0821e656192ad0f6 goclever-gcta741l_defconfig
73d6bfc743c893d295c46b6a2ebcf7fb07f57bf776158e3a41c715d47b8e9890bf9037bdc654ee65b90f7b1596428fb63229264e2d1176ca725d6cc0fc95e6b2 lark-freeme-70-2s_defconfig
b16feabad9944c0ae52394478ccf45034226c7e619f8bf97d8096577291567a6328a70ee9f590e8b260a7f83fad0cbfe12f4b9ff55e8697b52ca264fdbca7395 prestigio-per5574bc_defconfig"
26a3da78f3a0c3d6552334a83121aa318fa187b716e5a2b92a330a12c37c2a74aa319faa7e4c06be4918c4de6c28a5c8b909c39a5e3aa64b2960c7e2648799a2 0002-dts-add-sun6i-a31s-goclever-gcta741l.patch
60bebb229e26e574b49f79470b0b6717a510eec69dd27835da0c6c9c10ccf1b8908fb4095f177a48b68bae1674187549bc5a9cbf26525b8242e4a82c94f1733d 0003-configs-add-goclever-gcta741l.patch"
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index fd47e408f8..d35341d893 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -451,6 +451,7 @@ dtb-$(CONFIG_STM32H7) += stm32h743i-disco.dtb \
stm32h743i-eval.dtb
dtb-$(CONFIG_MACH_SUN4I) += \
+ sun4i-a10-lark-freeme-70-2s.dtb \
sun4i-a10-a1000.dtb \
sun4i-a10-ba10-tvbox.dtb \
sun4i-a10-chuwi-v7-cw0825.dtb \
@@ -475,6 +476,7 @@ dtb-$(CONFIG_MACH_SUN4I) += \
sun4i-a10-pcduino2.dtb \
sun4i-a10-pov-protab2-ips9.dtb
dtb-$(CONFIG_MACH_SUN5I) += \
+ sun5i-a13-prestigio-per5574bc.dtb \
sun5i-a10s-auxtek-t003.dtb \
sun5i-a10s-auxtek-t004.dtb \
sun5i-a10s-mk802.dtb \
@@ -495,6 +497,7 @@ dtb-$(CONFIG_MACH_SUN5I) += \
sun5i-gr8-chip-pro.dtb \
sun5i-r8-chip.dtb
dtb-$(CONFIG_MACH_SUN6I) += \
+ sun6i-a31s-goclever-gcta741l.dtb \
sun6i-a31-app4-evb1.dtb \
sun6i-a31-colombus.dtb \
sun6i-a31-hummingbird.dtb \
CONFIG_ARM=y
CONFIG_ARCH_SUNXI=y
CONFIG_SPL=y
CONFIG_MACH_SUN6I=y
CONFIG_DRAM_CLK=360
CONFIG_DRAM_ZQ=251
CONFIG_MMC0_CD_PIN="PA8"
CONFIG_USB0_VBUS_PIN="AXP0-VBUS-ENABLE"
CONFIG_USB0_VBUS_DET="AXP0-VBUS-DETECT"
CONFIG_USB0_ID_DET="PA15"
CONFIG_AXP_GPIO=y
CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:33000,le:14,ri:240,up:3,lo:35,hs:30,vs:13,sync:3,vmode:0"
# le=-14,up=-3
CONFIG_VIDEO_LCD_DCLK_PHASE=0
CONFIG_VIDEO_LCD_BL_EN="PA25"
CONFIG_VIDEO_LCD_BL_PWM="PH13"
CONFIG_NR_DRAM_BANKS=1
CONFIG_SPL_TEXT_BASE=0x60
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31s-goclever-gcta741l"
CONFIG_AXP_DLDO1_VOLT=3300
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_MUSB_HOST=y
CONFIG_USB_KEYBOARD=y
CONFIG_USB_STORAGE=y
CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
CONFIG_ARM=y
CONFIG_ARCH_SUNXI=y
CONFIG_SPL=y
CONFIG_MACH_SUN4I=y
CONFIG_DRAM_CLK=360
CONFIG_DRAM_EMR1=4
CONFIG_MMC0_CD_PIN="PH1"
CONFIG_USB0_VBUS_DET="PH5"
CONFIG_USB0_VBUS_PIN="PB9"
CONFIG_USB0_ID_DET="PH4"
# CONFIG_VIDEO_HDMI is not set
CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:33000,le:87,ri:40,up:31,lo:13,hs:1,vs:1,sync:3,vmode:0"
CONFIG_VIDEO_LCD_POWER="PH8"
CONFIG_VIDEO_LCD_BL_EN="PH7"
CONFIG_VIDEO_LCD_BL_PWM="PB2"
CONFIG_NR_DRAM_BANKS=1
CONFIG_SPL_TEXT_BASE=0x60
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL_I2C_SUPPORT=y
CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-lark-freeme-70-2s"
CONFIG_USB_MUSB_HOST=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_KEYBOARD=y
CONFIG_USB_STORAGE=y
CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
CONFIG_ARM=y
CONFIG_ARCH_SUNXI=y
CONFIG_NR_DRAM_BANKS=1
CONFIG_SPL=y
CONFIG_MACH_SUN5I=y
CONFIG_DRAM_CLK=408
CONFIG_DRAM_EMR1=0
CONFIG_MMC0_CD_PIN="PG0"
CONFIG_USB0_VBUS_PIN="PG12"
CONFIG_USB0_VBUS_DET="PG1"
CONFIG_USB0_ID_DET="PG2"
CONFIG_AXP_GPIO=y
# CONFIG_VIDEO_HDMI is not set
CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:30000,le:45,ri:79,up:22,lo:13,hs:1,vs:1,sync:3,vmode:0"
CONFIG_VIDEO_LCD_POWER="AXP0-0"
CONFIG_VIDEO_LCD_BL_EN="AXP0-1"
CONFIG_VIDEO_LCD_BL_PWM="PB2"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL_TEXT_BASE=0x60
CONFIG_SPL_I2C_SUPPORT=y
CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-prestigio-per5574bc"
CONFIG_CONS_INDEX=2
CONFIG_USB_MUSB_HOST=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_KEYBOARD=y
CONFIG_USB_STORAGE=y
CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
// SPDX-License-Identifier: (GPL-2.0+ OR X11)
// Copyright 2021 Jacek Pruciak <linux@juniorjpdj.pl>
// Copyright 2020 Adam Słaboń <asaillen456esx@gmail.com>
// Copyright 2015 Hans de Goede <hdegoede@redhat.com>
/dts-v1/;
#include "sun4i-a10.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/pwm/pwm.h>
/ {
model = "Lark FreeMe 70.2S";
compatible = "lark,freeme-70-2s", "allwinner,sun4i-a10";
aliases {
serial0 = &uart0;
};
chosen {
stdout-path = "serial0:115200n8";
};
hdmi-connector {
compatible = "hdmi-connector";
type = "c";
port {
hdmi_con_in: endpoint {
remote-endpoint = <&hdmi_out_con>;
};
};
};
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>;
enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
};
panel: panel {
compatible = "hannstar,hsd070idw1-a";
power-supply = <&reg_vcc3v3>;
enable-gpios = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
backlight = <&backlight>;
port {
panel_input: endpoint {
remote-endpoint = <&tcon0_out_lcd>;
};
};
};
};
&tcon0 {
pinctrl-names = "default";
pinctrl-0 = <&lcd_rgb666_pins>;
status = "okay";
};
&tcon0_out {
tcon0_out_lcd: endpoint@0 {
reg = <0>;
remote-endpoint = <&panel_input>;
};
};
&pio {
lcd_rgb666_pins: lcd-rgb666-pins {
pins = "PD2", "PD3", "PD4", "PD5", "PD6", "PD7",
"PD10", "PD11", "PD12", "PD13", "PD14", "PD15",
"PD18", "PD19", "PD20", "PD21", "PD22", "PD23",
"PD24", "PD25", "PD26", "PD27";
function = "lcd0";
};
};
&pwm {
pinctrl-names = "default";
pinctrl-0 = <&pwm0_pin>;
status = "okay";
};
&ehci1 {
/* WiFi card */
status = "okay";
};
&ohci0 {
/* Full USB port - USB1.1 */
status = "okay";
};
&ehci0 {
/* Full USB port - USB2 */
status = "okay";
};
&i2c0 {
status = "okay";
axp209: pmic@34 {
reg = <0x34>;
interrupts = <0>;
};
};
&i2c1 {
status = "okay";
accelerometer@1c {
compatible = "domintech,dmard06";
reg = <0x1c>;
};
};
#include "axp209.dtsi"
&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 = <1000000>;
regulator-max-microvolt = <1400000>;
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";
};
&ac_power_supply {
status = "okay";
};
&battery_power_supply {
status = "okay";
};
&usb_power_supply {
status = "okay";
};
&i2c1 {
status = "okay";
};
&lradc {
vref-supply = <&reg_vcc3v0>;
status = "okay";
button-400 {
label = "Key Esc";
linux,code = <KEY_ESC>;
channel = <0>;
voltage = <400000>;
};
button-800 {
label = "Key Menu