pocketbook-614-plus: new device (MR 4901)

[ci:skip-build]: already built successfully in CI
This commit is contained in:
Denis Burkov 2024-03-11 19:11:39 +05:00 committed by Stefan Hansson
parent f133310c02
commit 59f889ceb7
No known key found for this signature in database
GPG key ID: 8A700086A9FE41FD
9 changed files with 747 additions and 4 deletions

View file

@ -0,0 +1,295 @@
From 8edf667c34a621274fc684b4f002b80937b5d4c8 Mon Sep 17 00:00:00 2001
From: Denis Burkov <hitechshell@mail.ru>
Date: Mon, 11 Mar 2024 18:23:39 +0500
Subject: [PATCH] ARM: dts: allwinner: sun5i-a13-pocketbook-614-plus: Add
initial devicetree
---
arch/arm/boot/dts/allwinner/Makefile | 2 +
.../sun5i-a13-pocketbook-614-plus.dts | 254 ++++++++++++++++++
2 files changed, 256 insertions(+)
create mode 100644 arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts
diff --git a/arch/arm/boot/dts/allwinner/Makefile b/arch/arm/boot/dts/allwinner/Makefile
index 7c7fb94d2..c9945b6df 100644
--- a/arch/arm/boot/dts/allwinner/Makefile
+++ b/arch/arm/boot/dts/allwinner/Makefile
@@ -61,6 +61,7 @@ dtb-$(CONFIG_MACH_SUN5I) += \
sun5i-a13-olinuxino.dtb \
sun5i-a13-olinuxino-micro.dtb \
sun5i-a13-pocketbook-touch-lux-3.dtb \
+ sun5i-a13-pocketbook-614-plus.dtb \
sun5i-a13-q8-tablet.dtb \
sun5i-a13-utoo-p66.dtb \
sun5i-gr8-chip-pro.dtb \
@@ -82,6 +83,7 @@ dtb-$(CONFIG_MACH_SUN5I) += \
sun5i-a13-olinuxino.dtb \
sun5i-a13-olinuxino-micro.dtb \
sun5i-a13-pocketbook-touch-lux-3.dtb \
+ sun5i-a13-pocketbook-614-plus.dtb \
sun5i-a13-q8-tablet.dtb \
sun5i-a13-utoo-p66.dtb \
sun5i-gr8-chip-pro.dtb \
diff --git a/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts b/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts
new file mode 100644
index 000000000..cad9ce5f2
--- /dev/null
+++ b/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts
@@ -0,0 +1,254 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2024 Denis Burkov <hitechshell@mail.ru>
+ */
+
+/dts-v1/;
+#include "sun5i-a13.dtsi"
+#include "sunxi-common-regulators.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+ model = "PocketBook 614 Plus";
+ compatible = "pocketbook,614-plus", "allwinner,sun5i-a13";
+
+ aliases {
+ serial0 = &uart1;
+ i2c0 = &i2c0;
+ i2c1 = &i2c1;
+ i2c2 = &i2c2;
+ rtc0 = &pcf8563;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&led_pins_pocketbook>;
+
+ led {
+ gpios = <&pio 4 8 GPIO_ACTIVE_LOW>; /* PE8 */
+ default-state = "on";
+ };
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+ autorepeat;
+ label = "GPIO Keys";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pocketbook_btn_pins>;
+
+ key-right {
+ label = "Right";
+ linux,code = <KEY_NEXT>;
+ gpios = <&pio 6 9 GPIO_ACTIVE_LOW>; /* PG9 */
+ };
+
+ key-left {
+ label = "Left";
+ linux,code = <KEY_PREVIOUS>;
+ gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 */
+ };
+ };
+
+ reg_3v3_mmc0: regulator-mmc0 {
+ compatible = "regulator-fixed";
+ regulator-name = "vdd-mmc0";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pocketbook_reg_mmc0_pin>;
+ gpio = <&pio 4 4 GPIO_ACTIVE_LOW>; /* PE4 */
+ vin-supply = <&reg_vcc3v3>;
+ };
+};
+
+&cpu0 {
+ cpu-supply = <&reg_dcdc2>;
+};
+
+&ehci0 {
+ status = "okay";
+};
+
+&i2c0 {
+ status = "okay";
+
+ axp209: pmic@34 {
+ compatible = "x-powers,axp209";
+ reg = <0x34>;
+ interrupts = <0>;
+ };
+};
+
+#include "axp209.dtsi"
+
+&i2c1 {
+ status = "okay";
+
+ pcf8563: rtc@51 {
+ compatible = "nxp,pcf8563";
+ reg = <0x51>;
+ #clock-cells = <0>;
+ };
+};
+
+&i2c2 {
+ status = "okay";
+
+ /* Touchpanel is connected here. */
+};
+
+&lradc {
+ vref-supply = <&reg_ldo2>;
+ status = "okay";
+
+ button-300 {
+ label = "Down";
+ linux,code = <KEY_DOWN>;
+ channel = <0>;
+ voltage = <300000>;
+ };
+
+ button-700 {
+ label = "Up";
+ linux,code = <KEY_UP>;
+ channel = <0>;
+ voltage = <700000>;
+ };
+
+ button-1000 {
+ label = "Left";
+ linux,code = <KEY_LEFT>;
+ channel = <0>;
+ voltage = <1000000>;
+ };
+
+ button-1200 {
+ label = "Menu";
+ linux,code = <KEY_MENU>;
+ channel = <0>;
+ voltage = <1200000>;
+ };
+
+ button-1500 {
+ label = "Right";
+ linux,code = <KEY_RIGHT>;
+ channel = <0>;
+ voltage = <1500000>;
+ };
+};
+
+&mmc0 {
+ vmmc-supply = <&reg_3v3_mmc0>;
+ bus-width = <4>;
+ cd-gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */
+ status = "okay";
+};
+
+&mmc2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc2_4bit_pc_pins>;
+ vmmc-supply = <&reg_vcc3v3>;
+ bus-width = <4>;
+ non-removable;
+ status = "okay";
+};
+
+&ohci0 {
+ status = "okay";
+};
+
+&otg_sram {
+ status = "okay";
+};
+
+&pio {
+ led_pins_pocketbook: led-pin {
+ pins = "PE8";
+ function = "gpio_out";
+ };
+ pocketbook_btn_pins: pocketbook_btn_pins {
+ pins = "PG9", "PG10";
+ function = "gpio_in";
+ bias-pull-up;
+ };
+ pocketbook_reg_mmc0_pin: pocketbook_reg_mmc0_pin {
+ pins = "PE4";
+ function = "gpio_out";
+ };
+};
+
+&reg_dcdc2 {
+ regulator-always-on;
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1500000>;
+ regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+ regulator-always-on;
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+ regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+ regulator-always-on;
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-name = "avcc";
+};
+
+&reg_ldo3 {
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc-wifi";
+};
+
+&reg_usb0_vbus {
+ status = "okay";
+ gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
+};
+
+&reg_usb1_vbus {
+ gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
+ status = "okay";
+};
+
+&uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart1_pg_pins>;
+ status = "okay";
+};
+
+&usb_otg {
+ dr_mode = "otg";
+ status = "okay";
+};
+
+&usb_power_supply {
+ status = "okay";
+};
+
+&battery_power_supply {
+ status = "okay";
+};
+
+&usbphy {
+ usb0_id_det-gpios = <&pio 6 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PG2 */
+ usb0_vbus_det-gpios = <&axp_gpio 1 GPIO_ACTIVE_HIGH>;
+ usb0_vbus-supply = <&reg_usb0_vbus>;
+ usb1_vbus-supply = <&reg_usb1_vbus>;
+ status = "okay";
+};
--
2.43.0

View file

@ -4,7 +4,7 @@ _flavor=postmarketos-allwinner
_config="config-$_flavor.$CARCH"
pkgname=linux-$_flavor
pkgver=6.7.9_git20240306
pkgrel=0
pkgrel=1
_tag="orange-pi-6.7-20240306-2359"
pkgdesc="Kernel fork with Pine64 patches (megi's tree, slightly patched)"
arch="aarch64 armv7"
@ -46,6 +46,7 @@ source="$pkgname-$_tag.tar.gz::https://codeberg.org/megi/linux/archive/$_tag.tar
0012-arm64-dts-allwinner-orangepi-3-fix-ethernet.patch
0013-Revert-usb-quirks-Add-USB_QUIRK_RESET-for-Quectel-EG25G-Modem.patch
0014-usb-serial-option-add-reset-resume-callback-for-WWAN.patch
0015-ARM-dts-allwinner-sun5i-a13-pocketbook-614-plus-Add-.patch
"
builddir="$srcdir/linux"
@ -85,7 +86,7 @@ package() {
sha512sums="
96f0ccb0b5f702ff8784f860ea7cce9a2aba3d041b84f9195772da4a70b8e8f904b9bd0af90e3cbcb5a322d25858d247e2dba6902a351fe75bdf9ba25d2c8a81 linux-postmarketos-allwinner-orange-pi-6.7-20240306-2359.tar.gz
aff5475c53de530dfe66d756bc1abdfcdc9f26b3d95d72fe378f3157f90a39f51ff9c1db8f0a147cfc62d7c846584d5909f3e6b720b3800e3bbde2d7ca4bb1a1 config-postmarketos-allwinner.aarch64
9ff80747f81b6de3d323cb9d6f45f7d956026b9d97e067f2bf3f3ec36ccc1a01d07890da95cc503b6806470b8aa23f1eca0b0fbe253cc2dc8d239586ad659435 config-postmarketos-allwinner.armv7
283d80b7470109ce602190a741114d138736b41e7660a008782c136a569999751eec427edeef19e5b0f79cd3e1314fff729105e8267cac8aad912b285a8386af config-postmarketos-allwinner.armv7
126e0a65e04f22f14eac1281a69000d9d5b107ed8fd1b52f37e812751f55e6c45b0240ceac61c9d95ae7f0543aaf9d96b85a8532baf59283c077b9945e615367 0001-dts-add-dontbeevil-pinephone-devkit.patch
99edeccdee7beae5dc7337d78ba92de2f3d724b7648ede30ab040a66bdac0e38a6595e212e26011d608ccb8a92ffa9e393965f936dfead65ffe9b7eb31dfa345 0002-dts-add-pinetab-dev-old-display-panel.patch
82c0203b02c671934d62e52311827ac1cc5b358e0843715ea2235117e4b47d6de63b29fdfc7c1adfc550cc7eb363c384de8276be1ca17da6e48916020124022d 0003-dts-pinetab-add-missing-bma223-ohci1.patch
@ -100,4 +101,5 @@ b7c084bb32cfc18defcec77966f1944fd3b33bb48769a4c0e257709d0f3898c5e0ca2a50c39a5d45
370e963805a4c984dc501a6a6f686cac059485a275370c5f55de0841e227c5f6652abb38ad935c8dd046014e632e70129d3f8fbeae9650fe7de6f0d10e9cdc3a 0012-arm64-dts-allwinner-orangepi-3-fix-ethernet.patch
c766911f76d36b997582533707d7d7a089ed1272e49a79dbe75f7c1eafef0ba3f1417d6c66f25e12e56124e0cd4bb9f443d400236e252ef1c43d53def9392a87 0013-Revert-usb-quirks-Add-USB_QUIRK_RESET-for-Quectel-EG25G-Modem.patch
382e6e8785235788101459ae47c940ec85831007c61e3f14c4e3a43abfa21b95cdaa6bdd1b7fdd6fd26944f4c629d41b9ab776e89d9a18778fbc9f6a7785444b 0014-usb-serial-option-add-reset-resume-callback-for-WWAN.patch
81801c25733299fe4a45154ce27ab70a80f19a00dcb7c6c67d0e6ba6bd369dbfa1b43e09b066ddaec9144e0e3f956baf2fed26d1c52f23faad33101662728e53 0015-ARM-dts-allwinner-sun5i-a13-pocketbook-614-plus-Add-.patch
"

View file

@ -2180,7 +2180,7 @@ CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_QT2160 is not set
# CONFIG_KEYBOARD_DLINK_DIR685 is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_GPIO is not set
CONFIG_KEYBOARD_GPIO=m
# CONFIG_KEYBOARD_GPIO_POLLED is not set
# CONFIG_KEYBOARD_TCA6416 is not set
# CONFIG_KEYBOARD_TCA8418 is not set
@ -4568,7 +4568,7 @@ CONFIG_RTC_DRV_AC100=y
# CONFIG_RTC_DRV_PCF8523 is not set
# CONFIG_RTC_DRV_PCF85063 is not set
# CONFIG_RTC_DRV_PCF85363 is not set
# CONFIG_RTC_DRV_PCF8563 is not set
CONFIG_RTC_DRV_PCF8563=m
# CONFIG_RTC_DRV_PCF8583 is not set
# CONFIG_RTC_DRV_M41T80 is not set
# CONFIG_RTC_DRV_BQ32K is not set

View file

@ -0,0 +1,31 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-pocketbook-614-plus
pkgdesc="PocketBook 614 Plus"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="
linux-postmarketos-allwinner
u-boot-pocketbook-614-plus
postmarketos-base>=25-r1
"
makedepends="devicepkg-dev"
source="
deviceinfo
modules-initfs
"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
sha512sums="
d3111d23a9161825628cc7f8eb52ddd0e7665e89031500a5ab4f4ae9408fa23e76d3c34dbe18be4e48f356c77bc1d1deb1940a1cc38900ec15f5fc62dab627a9 deviceinfo
bccead09b413637b2ef20bf6eed96e29998b85c40b6c3250ac5ecad1b7529e1ad54ea490cd4b29c457d30cd7fdc1e5b30811903c228b1df07145f18cb96739cf modules-initfs
"

View file

@ -0,0 +1,27 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell
# scripts.
deviceinfo_format_version="0"
deviceinfo_name="PocketBook 614 Plus"
deviceinfo_manufacturer="PocketBook"
deviceinfo_codename="pocketbook-614-plus"
deviceinfo_year="2017"
deviceinfo_arch="armv7"
# Device related
deviceinfo_chassis="tablet"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
# There is no driver for electronic paper used in this device yet.
deviceinfo_no_framebuffer="true"
deviceinfo_getty="ttyS0;115200"
# Bootloader related
deviceinfo_flash_method="none"
deviceinfo_append_dtb="false"
deviceinfo_dtb="sun5i-a13-pocketbook-614-plus"
deviceinfo_kernel_cmdline="PMOS_NO_OUTPUT_REDIRECT console=ttyS0,115200 earlycon"
deviceinfo_generate_extlinux_config="true"
deviceinfo_sd_embed_firmware="u-boot/pocketbook-614-plus/u-boot-sunxi-with-spl.bin:8"
deviceinfo_boot_part_start="8192"

View file

@ -0,0 +1,5 @@
sunxi
musb_hdrc
usb_f_ncm
u_ether
libcomposite

View file

@ -0,0 +1,287 @@
From b6d967dfb8bc88de88595ad1d36d3ddd3a9c3df1 Mon Sep 17 00:00:00 2001
From: Denis Burkov <hitechshell@mail.ru>
Date: Wed, 13 Mar 2024 19:53:35 +0500
Subject: [PATCH] ARM: dts: allwinner: sun5i-a13-pocketbook-614-plus: Add
initial devicetree
---
arch/arm/dts/Makefile | 1 +
.../arm/dts/sun5i-a13-pocketbook-614-plus.dts | 254 ++++++++++++++++++
2 files changed, 255 insertions(+)
create mode 100644 arch/arm/dts/sun5i-a13-pocketbook-614-plus.dts
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index b102ffb5f6..e0a1c0c136 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -695,6 +695,7 @@ dtb-$(CONFIG_MACH_SUN5I) += \
sun5i-a13-olinuxino.dtb \
sun5i-a13-olinuxino-micro.dtb \
sun5i-a13-pocketbook-touch-lux-3.dtb \
+ sun5i-a13-pocketbook-614-plus.dtb \
sun5i-a13-q8-tablet.dtb \
sun5i-a13-utoo-p66.dtb \
sun5i-gr8-chip-pro.dtb \
diff --git a/arch/arm/dts/sun5i-a13-pocketbook-614-plus.dts b/arch/arm/dts/sun5i-a13-pocketbook-614-plus.dts
new file mode 100644
index 0000000000..cad9ce5f2a
--- /dev/null
+++ b/arch/arm/dts/sun5i-a13-pocketbook-614-plus.dts
@@ -0,0 +1,254 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2024 Denis Burkov <hitechshell@mail.ru>
+ */
+
+/dts-v1/;
+#include "sun5i-a13.dtsi"
+#include "sunxi-common-regulators.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+ model = "PocketBook 614 Plus";
+ compatible = "pocketbook,614-plus", "allwinner,sun5i-a13";
+
+ aliases {
+ serial0 = &uart1;
+ i2c0 = &i2c0;
+ i2c1 = &i2c1;
+ i2c2 = &i2c2;
+ rtc0 = &pcf8563;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&led_pins_pocketbook>;
+
+ led {
+ gpios = <&pio 4 8 GPIO_ACTIVE_LOW>; /* PE8 */
+ default-state = "on";
+ };
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+ autorepeat;
+ label = "GPIO Keys";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pocketbook_btn_pins>;
+
+ key-right {
+ label = "Right";
+ linux,code = <KEY_NEXT>;
+ gpios = <&pio 6 9 GPIO_ACTIVE_LOW>; /* PG9 */
+ };
+
+ key-left {
+ label = "Left";
+ linux,code = <KEY_PREVIOUS>;
+ gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 */
+ };
+ };
+
+ reg_3v3_mmc0: regulator-mmc0 {
+ compatible = "regulator-fixed";
+ regulator-name = "vdd-mmc0";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pocketbook_reg_mmc0_pin>;
+ gpio = <&pio 4 4 GPIO_ACTIVE_LOW>; /* PE4 */
+ vin-supply = <&reg_vcc3v3>;
+ };
+};
+
+&cpu0 {
+ cpu-supply = <&reg_dcdc2>;
+};
+
+&ehci0 {
+ status = "okay";
+};
+
+&i2c0 {
+ status = "okay";
+
+ axp209: pmic@34 {
+ compatible = "x-powers,axp209";
+ reg = <0x34>;
+ interrupts = <0>;
+ };
+};
+
+#include "axp209.dtsi"
+
+&i2c1 {
+ status = "okay";
+
+ pcf8563: rtc@51 {
+ compatible = "nxp,pcf8563";
+ reg = <0x51>;
+ #clock-cells = <0>;
+ };
+};
+
+&i2c2 {
+ status = "okay";
+
+ /* Touchpanel is connected here. */
+};
+
+&lradc {
+ vref-supply = <&reg_ldo2>;
+ status = "okay";
+
+ button-300 {
+ label = "Down";
+ linux,code = <KEY_DOWN>;
+ channel = <0>;
+ voltage = <300000>;
+ };
+
+ button-700 {
+ label = "Up";
+ linux,code = <KEY_UP>;
+ channel = <0>;
+ voltage = <700000>;
+ };
+
+ button-1000 {
+ label = "Left";
+ linux,code = <KEY_LEFT>;
+ channel = <0>;
+ voltage = <1000000>;
+ };
+
+ button-1200 {
+ label = "Menu";
+ linux,code = <KEY_MENU>;
+ channel = <0>;
+ voltage = <1200000>;
+ };
+
+ button-1500 {
+ label = "Right";
+ linux,code = <KEY_RIGHT>;
+ channel = <0>;
+ voltage = <1500000>;
+ };
+};
+
+&mmc0 {
+ vmmc-supply = <&reg_3v3_mmc0>;
+ bus-width = <4>;
+ cd-gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */
+ status = "okay";
+};
+
+&mmc2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc2_4bit_pc_pins>;
+ vmmc-supply = <&reg_vcc3v3>;
+ bus-width = <4>;
+ non-removable;
+ status = "okay";
+};
+
+&ohci0 {
+ status = "okay";
+};
+
+&otg_sram {
+ status = "okay";
+};
+
+&pio {
+ led_pins_pocketbook: led-pin {
+ pins = "PE8";
+ function = "gpio_out";
+ };
+ pocketbook_btn_pins: pocketbook_btn_pins {
+ pins = "PG9", "PG10";
+ function = "gpio_in";
+ bias-pull-up;
+ };
+ pocketbook_reg_mmc0_pin: pocketbook_reg_mmc0_pin {
+ pins = "PE4";
+ function = "gpio_out";
+ };
+};
+
+&reg_dcdc2 {
+ regulator-always-on;
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1500000>;
+ regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+ regulator-always-on;
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+ regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+ regulator-always-on;
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-name = "avcc";
+};
+
+&reg_ldo3 {
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc-wifi";
+};
+
+&reg_usb0_vbus {
+ status = "okay";
+ gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
+};
+
+&reg_usb1_vbus {
+ gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
+ status = "okay";
+};
+
+&uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart1_pg_pins>;
+ status = "okay";
+};
+
+&usb_otg {
+ dr_mode = "otg";
+ status = "okay";
+};
+
+&usb_power_supply {
+ status = "okay";
+};
+
+&battery_power_supply {
+ status = "okay";
+};
+
+&usbphy {
+ usb0_id_det-gpios = <&pio 6 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PG2 */
+ usb0_vbus_det-gpios = <&axp_gpio 1 GPIO_ACTIVE_HIGH>;
+ usb0_vbus-supply = <&reg_usb0_vbus>;
+ usb1_vbus-supply = <&reg_usb1_vbus>;
+ status = "okay";
+};
--
2.43.0

View file

@ -0,0 +1,46 @@
From 2173a3cefb958508008cf6f8f9bdc2540b443465 Mon Sep 17 00:00:00 2001
From: Denis Burkov <hitechshell@mail.ru>
Date: Mon, 11 Mar 2024 19:24:48 +0500
Subject: [PATCH] ARM: add defconfig for PocketBook 614 Plus
---
configs/A13-pocketbook614plus_defconfig | 27 +++++++++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 configs/A13-pocketbook614plus_defconfig
diff --git a/configs/A13-pocketbook614plus_defconfig b/configs/A13-pocketbook614plus_defconfig
new file mode 100644
index 0000000000..2746b866ba
--- /dev/null
+++ b/configs/A13-pocketbook614plus_defconfig
@@ -0,0 +1,27 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-pocketbook-614-plus"
+CONFIG_SPL=y
+CONFIG_MACH_SUN5I=y
+CONFIG_DRAM_CLK=408
+CONFIG_DRAM_EMR1=0
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+CONFIG_AXP_GPIO=y
+CONFIG_REGULATOR_AXP_USB_POWER=y
+CONFIG_USB0_VBUS_PIN="AXP0-VBUS-ENABLE"
+CONFIG_USB0_ID_DET="PG02"
+CONFIG_USB1_VBUS_PIN="PG11"
+
+CONFIG_SPL_I2C=y
+CONFIG_CMD_DFU=y
+CONFIG_CMD_USB_MASS_STORAGE=y
+CONFIG_DFU_RAM=y
+CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
+CONFIG_SYS_I2C_MVTWSI=y
+CONFIG_SYS_I2C_SLAVE=0x7f
+CONFIG_SYS_I2C_SPEED=400000
+CONFIG_AXP_ALDO3_VOLT=3300
+CONFIG_CONS_INDEX=2
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_MUSB_GADGET=y
--
2.43.0

View file

@ -0,0 +1,50 @@
# Contributor: Denis Burkov <hitechshell@mail.ru>
# Maintainer: Denis Burkov <hitechshell@mail.ru>
pkgname=u-boot-pocketbook-614-plus
pkgver=2024.01
pkgrel=0
pkgdesc="U-Boot bootloader for Pocketbook 614 Plus"
url="https://source.denx.de/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"
makedepends="$depends_dev
bc
bison
dtc
flex
openssl-dev
py3-setuptools
python3-dev
swig
"
options="!check"
source="
https://source.denx.de/u-boot/u-boot/-/archive/v$pkgver/u-boot-v$pkgver.tar.gz
0001-ARM-dts-allwinner-sun5i-a13-pocketbook-614-plus-Add-.patch
0002-ARM-add-defconfig-for-PocketBook-614-Plus.patch
"
builddir="$srcdir/u-boot-v$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
export BUILD_DIR="$builddir"/build
make O="$BUILD_DIR" A13-pocketbook614plus_defconfig
make O="$BUILD_DIR" all
sha512sum -b "$BUILD_DIR/u-boot-sunxi-with-spl.bin" > "$BUILD_DIR/u-boot-sunxi-with-spl.bin.sha512"
}
package() {
install -Dm644 "build/u-boot-sunxi-with-spl.bin" \
-t "$pkgdir/usr/share/u-boot/pocketbook-614-plus"
install -Dm644 "build/u-boot-sunxi-with-spl.bin.sha512" \
-t "$pkgdir/usr/share/u-boot/pocketbook-614-plus"
}
sha512sums="
82c78fc35ec1462c2f1d6193c8b8dfbf3cbabca905d043916d7ba55f5570fada87c32a4906b46b9af89ec1706308b21bb23281e7126f40e1ec57e0b431675fd8 u-boot-v2024.01.tar.gz
b1271dbb462c9cb6ea02baf3f954d0c09e7de1610086e7b95862538911465d0754b96a2e1be7048b5d3f6aeb314da5ef9eb290622cd6099266a8e3ba7e7609ca 0001-ARM-dts-allwinner-sun5i-a13-pocketbook-614-plus-Add-.patch
3447a3614499a7ffcfdabb70b1c2d33945c1ace258d87ad2ab013ad2c5501fcd030c6f9902246bfc2c91892437fc7e230a663887954c877fe9d404bba943582a 0002-ARM-add-defconfig-for-PocketBook-614-Plus.patch
"