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

[ci:skip-vercheck] bugged subpackage version
This commit is contained in:
JuniorJPDJ 2021-03-28 04:47:32 +02:00 committed by Alexey Minnekhanov
parent bb12ca1424
commit 817de9fd0a
No known key found for this signature in database
GPG key ID: EBF5ECFFFEE34DED
14 changed files with 587 additions and 607 deletions

View file

@ -0,0 +1,135 @@
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

View file

@ -0,0 +1,46 @@
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

View file

@ -1,9 +1,8 @@
# 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"

View file

@ -1,28 +0,0 @@
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 \

View file

@ -1,27 +0,0 @@
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

View file

@ -1,26 +0,0 @@
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

View file

@ -1,28 +0,0 @@
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

View file

@ -1,246 +0,0 @@
// 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";
linux,code = <KEY_MENU>;
channel = <0>;
voltage = <800000>;
};
};
&mmc0 {
vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>;
cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
status = "okay";
};
&otg_sram {
status = "okay";
};
&reg_usb0_vbus {
status = "okay";
};
&reg_usb1_vbus {
status = "okay";
};
&reg_usb2_vbus {
/* WiFi */
gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>; /* PH12 */
status = "okay";
};
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pb_pins>;
status = "okay";
};
&usb_otg {
dr_mode = "otg";
status = "okay";
};
&codec {
allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
status = "okay";
};
&de {
status = "okay";
};
&hdmi {
status = "okay";
};
&hdmi_out {
hdmi_out_con: endpoint {
remote-endpoint = <&hdmi_con_in>;
};
};
&usbphy {
usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
usb0_vbus_power-supply = <&usb_power_supply>;
usb0_vbus-supply = <&reg_usb0_vbus>;
usb1_vbus-supply = <&reg_usb1_vbus>;
usb2_vbus-supply = <&reg_usb2_vbus>;
status = "okay";
};

View file

@ -1,59 +0,0 @@
/*
* Copyright 2018 Jacek Pruciak <linux@juniorjpdj.pl>
*
* 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 "sun5i-a13.dtsi"
#include "sun5i-reference-design-tablet.dtsi"
/ {
model = "Prestigio Multireader Stream PER5574BC";
compatible = "prestigio,per5574bc", "allwinner,sun5i-a13";
};
&usb_otg {
// Also doesn't work when set to "otg"
dr_mode = "host";
};
&battery_power_supply {
status = "okay";
};

View file

@ -1,103 +0,0 @@
// 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";
};

View file

@ -0,0 +1,33 @@
From 1af79995443ac2ed092391561fe93c8b70c5bd9f Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megous@megous.com>
Date: Tue, 20 Dec 2016 11:25:12 +0100
Subject: [PATCH] sunxi: h3: Fix PLL1 setup to never use dividers
Kernel would lower the divider on first CLK change and cause the
lock up.
---
arch/arm/mach-sunxi/clock_sun6i.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-sunxi/clock_sun6i.c b/arch/arm/mach-sunxi/clock_sun6i.c
index 8e84062bd7..8705fa5fc5 100644
--- a/arch/arm/mach-sunxi/clock_sun6i.c
+++ b/arch/arm/mach-sunxi/clock_sun6i.c
@@ -117,11 +117,10 @@ void clock_set_pll1(unsigned int clk)
int k = 1;
int m = 1;
- if (clk > 1152000000) {
+ if (clk >= 1368000000) {
+ k = 3;
+ } else if (clk >= 768000000) {
k = 2;
- } else if (clk > 768000000) {
- k = 4;
- m = 2;
}
/* Switch to 24MHz clock while changing PLL1 */
--
2.31.0

View file

@ -0,0 +1,278 @@
From ab3eccac0c3384eb545b5568406d6e94d866331c Mon Sep 17 00:00:00 2001
From: JuniorJPDJ <git@juniorjpdj.pl>
Date: Sun, 28 Mar 2021 01:57:21 +0100
Subject: [PATCH] dts: add sun4i-a10-lark-freeme-70-2s
---
arch/arm/dts/Makefile | 1 +
arch/arm/dts/sun4i-a10-lark-freeme-70-2s.dts | 246 +++++++++++++++++++
2 files changed, 247 insertions(+)
create mode 100644 arch/arm/dts/sun4i-a10-lark-freeme-70-2s.dts
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index fd47e408f8..512d830726 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -466,6 +466,7 @@ dtb-$(CONFIG_MACH_SUN4I) += \
sun4i-a10-inet9f-rev03.dtb \
sun4i-a10-itead-iteaduino-plus.dtb \
sun4i-a10-jesurun-q5.dtb \
+ sun4i-a10-lark-freeme-70-2s.dtb \
sun4i-a10-marsboard.dtb \
sun4i-a10-mini-xplus.dtb \
sun4i-a10-mk802.dtb \
diff --git a/arch/arm/dts/sun4i-a10-lark-freeme-70-2s.dts b/arch/arm/dts/sun4i-a10-lark-freeme-70-2s.dts
new file mode 100644
index 0000000000..fcba874976
--- /dev/null
+++ b/arch/arm/dts/sun4i-a10-lark-freeme-70-2s.dts
@@ -0,0 +1,246 @@
+// 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";
+ linux,code = <KEY_MENU>;
+ channel = <0>;
+ voltage = <800000>;
+ };
+};
+
+&mmc0 {
+ vmmc-supply = <&reg_vcc3v3>;
+ bus-width = <4>;
+ cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
+ status = "okay";
+};
+
+&otg_sram {
+ status = "okay";
+};
+
+&reg_usb0_vbus {
+ status = "okay";
+};
+
+&reg_usb1_vbus {
+ status = "okay";
+};
+
+&reg_usb2_vbus {
+ /* WiFi */
+ gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>; /* PH12 */
+ status = "okay";
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_pb_pins>;
+ status = "okay";
+};
+
+&usb_otg {
+ dr_mode = "otg";
+ status = "okay";
+};
+
+&codec {
+ allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
+ status = "okay";
+};
+
+&de {
+ status = "okay";
+};
+
+&hdmi {
+ status = "okay";
+};
+
+&hdmi_out {
+ hdmi_out_con: endpoint {
+ remote-endpoint = <&hdmi_con_in>;
+ };
+};
+
+&usbphy {
+ usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
+ usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
+ usb0_vbus_power-supply = <&usb_power_supply>;
+ usb0_vbus-supply = <&reg_usb0_vbus>;
+ usb1_vbus-supply = <&reg_usb1_vbus>;
+ usb2_vbus-supply = <&reg_usb2_vbus>;
+ status = "okay";
+};
--
2.31.0

View file

@ -0,0 +1,45 @@
From 788a8f664a92e775fa61f03dfe312e4a482c5242 Mon Sep 17 00:00:00 2001
From: JuniorJPDJ <git@juniorjpdj.pl>
Date: Sun, 28 Mar 2021 03:07:12 +0200
Subject: [PATCH] configs: add lark-freeme-70-2s
---
configs/lark-freeme-70-2s_defconfig | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
create mode 100644 configs/lark-freeme-70-2s_defconfig
diff --git a/configs/lark-freeme-70-2s_defconfig b/configs/lark-freeme-70-2s_defconfig
new file mode 100644
index 0000000000..c6687f632a
--- /dev/null
+++ b/configs/lark-freeme-70-2s_defconfig
@@ -0,0 +1,26 @@
+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
--
2.31.0

View file

@ -0,0 +1,39 @@
# Maintainer: Jacek Pruciak <pmos@juniorjpdj.pl>
pkgname=u-boot-lark-freeme-70-2s
pkgver=2021.01
pkgrel=1
pkgdesc="u-boot for Lark FreeMe 70.2s"
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
ISC LGPL-2.0-only LGPL-2.1-only X11"
options="!check" # no tests in upstream
makedepends="$depends_dev bc dtc python3-dev swig bison flex openssl-dev
py3-setuptools linux-headers"
# https://github.com/megous/linux/tree/orange-pi-5.12#kernel-lockup-issues
source="
https://ftp.denx.de/pub/u-boot/u-boot-${pkgver//_/-}.tar.bz2
0001-sunxi-h3-Fix-PLL1-setup-to-never-use-dividers.patch
0002-dts-add-sun4i-a10-lark-freeme-70-2s.patch
0003-configs-add-lark-freeme-70-2s.patch
"
builddir="$srcdir"/u-boot-${pkgver//_/-}
build() {
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
make lark-freeme-70-2s_config
make all
}
package() {
install -D -m644 "$builddir"/u-boot-sunxi-with-spl.bin \
"$pkgdir"/usr/share/u-boot/lark-freeme-70-2s/u-boot-sunxi-with-spl.bin
}
sha512sums="40dd4d9ef87a1829158658c433d46a047a39c0d8c314ad8d133f7240343ee3a75b060f009dd2efe598cfb8a766773f6cd773ea7f7745ee88e52a771c77eb1c6e u-boot-2021.01.tar.bz2
9478a5b46414139212a11d29e05dd973c4c866e8970b25021517d47b7177a03c910dbe761ae9c5acee0e4f1a5a8db76f24e168b83a5ebd9034d9cb640350604e 0001-sunxi-h3-Fix-PLL1-setup-to-never-use-dividers.patch
e1317ba266d8d615dfae41e6d57056b8cbb7a84df910b80f39b9b1e7737e0b1769943259ddd4637ded7412a18097a565b12b359313b566d85799ac28bf141c23 0002-dts-add-sun4i-a10-lark-freeme-70-2s.patch
113ca6677fc6bf30f95b830f4da962a6acf7e64a7b7e0ffd76f5a3e1a861f7fdd68d8cecd61eda9b438612a9e165228eb061b9e7b2b02f38a41eedd831c83f37 0003-configs-add-lark-freeme-70-2s.patch"