Commit d591cd2a authored by Martijn Braam's avatar Martijn Braam Committed by Oliver Smith

device/pine-dontbeevil: Seperate version for longts (!407)

This adds a seperate dts for the longts version of the devkit (which was
the un-inverted version before) and adds a shortts version which was
inverted before, but didn't exist in pmaports yet because I manually
edited the dts for every release.

This MR abuses the kernel switching feature to switch the dtb instead so
shortts/longts can be selected in the init step.

[ci:skip-build]: build won't finish in time
parent 1b5e1e0d
Pipeline #67081867 passed with stages
in 1 minute and 43 seconds
......@@ -2,13 +2,19 @@
pkgname="device-pine-dontbeevil"
pkgdesc="PINE64 PinePhone Don't be evil devkit"
pkgver=0.1
pkgrel=6
pkgrel=7
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
subpackages="$pkgname-weston $pkgname-x11 $pkgname-nonfree-firmware:nonfree_firmware"
depends="postmarketos-base linux-postmarketos-allwinner u-boot-pine64 uboot-tools mesa mesa-dri-lima mesa-dri-kmsro"
subpackages="
$pkgname-weston
$pkgname-x11
$pkgname-nonfree-firmware:nonfree_firmware
$pkgname-kernel-shortts:kernel_shortts
$pkgname-kernel-longts:kernel_longts
"
depends="postmarketos-base u-boot-pine64 uboot-tools mesa mesa-dri-lima mesa-dri-kmsro"
makedepends="devicepkg-dev"
source="
deviceinfo
......@@ -53,6 +59,19 @@ nonfree_firmware() {
mkdir "$subpkgdir"
}
kernel_shortts() {
pkgdesc="Short touch cable version"
depends="linux-postmarketos-allwinner"
mkdir "$subpkgdir"
}
kernel_longts() {
pkgdesc="Long touch cable version"
depends="linux-postmarketos-allwinner"
install="$subpkgname.post-install"
mkdir "$subpkgdir"
}
sha512sums="3e903f578a5112ec171e09e13e331345f0bd8fee935d6658a48cd2d369085c909106329fc103678961189486956aed97da9ff0b3be59f587f773f57d51f2d1bd deviceinfo
2aabfeff137e6ecbbb2cf9353d6ae69a0c4fe3f75064164c5e9edde750b035b9d7ab9c10000bb93d1a71cc9b357d469c86d7b9b3ffa0466da8ee229ac59e6c56 uboot-script.cmd
c4c57d1627dd451213e1ef20d89de9266cd4edcc2d33a69aa9a1f13e16d9f9742036b69dc149fd910d7213f7525c41eb79576d4457bc85cc96eba0d986382d27 weston.ini
......
#!/bin/sh
sed -i 's/sun50i-a64-dontbeevil"/sun50i-a64-dontbeevil-longts"/' /etc/deviceinfo
......@@ -4,7 +4,7 @@ _config="config-${_flavor}.${CARCH}"
pkgname=linux-${_flavor}
pkgver=5.1.0_git20190521
pkgrel=0
pkgrel=1
arch="aarch64"
pkgdesc="Kernel fork with PinePhone Don't be evil patches"
......@@ -17,7 +17,7 @@ _commit="bc1984d747095d285236f0d20f691e421f3bbfc3"
source="
${pkgname}-${_commit}.tar.gz::https://gitlab.com/pine64-org/linux/-/archive/${_commit}/linux-${_commit}.tar.gz
config-${_flavor}.aarch64
sun50i-a64-dontbeevil.dts
touch-dts.patch
"
subpackages=""
......@@ -40,8 +40,6 @@ builddir="$srcdir/linux-${_commit}"
prepare() {
default_prepare
cp "$srcdir"/sun50i-a64-dontbeevil.dts "$builddir"/arch/arm64/boot/dts/allwinner/
REPLACE_GCCH=0 \
downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC"
}
......@@ -87,4 +85,4 @@ package() {
sha512sums="da8d27d3660864584e2910e62f76da7fae4199d79c0c53a90afb5e344045292baeb3755d50523c702e96f2f0950d0feac93aa262d836731a1037485ab570899d linux-postmarketos-allwinner-bc1984d747095d285236f0d20f691e421f3bbfc3.tar.gz
5a04df0f76344b247cab894c8a41b2683e75b08209f1a957948a91f99979080ab07a1695ee266d17a4a85146145cb677ccc63a40722b1ae43ba0a7886f28de92 config-postmarketos-allwinner.aarch64
bbb379b359239dc40a8096c27a1d5f73371e744eeb024ffc50ec6c6de0f28624cfedd44b8eedc2288e70a33c5ff427bbe1a03a5c4d860bed8a9b7df6471c01d4 sun50i-a64-dontbeevil.dts"
5f2285e4eb262a9429c73599871c3fecbb858a388774bc7cba7631987ed1dc4a14cd7606e8fefc655c5128851fc853132f0a081e3d710c9266739af92f4d37e8 touch-dts.patch"
/*
* Copyright (c) 2017 Icenowy Zheng <icenowy@aosc.xyz>
*
* Based on sun50i-a64-pine64.dts, which is:
* Copyright (c) 2016 ARM Ltd.
*
* 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 library 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 library 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 "sun50i-a64-sopine.dtsi"
#include <dt-bindings/pwm/pwm.h>
/ {
model = "PinePhone Don't be evil development kit";
compatible = "pine64,sopine-baseboard", "pine64,sopine",
"allwinner,sun50i-a64";
aliases {
ethernet0 = &emac;
serial0 = &uart0;
};
chosen {
stdout-path = "serial0:115200n8";
};
i2c-csi {
compatible = "i2c-gpio";
sda-gpios = <&pio 4 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; /* CSI0-SDA: PE13 */
scl-gpios = <&pio 4 12 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; /* CSI0-SCK: PE12 */
i2c-gpio,delay-us = <5>;
#address-cells = <1>;
#size-cells = <0>;
ov5640: camera@3c {
compatible = "ovti,ov5640";
reg = <0x3c>;
pinctrl-names = "default";
pinctrl-0 = <&csi_mclk_pin>;
clocks = <&ccu CLK_CSI_MCLK>;
clock-names = "xclk";
AVDD-supply = <&reg_dldo3>;
DOVDD-supply = <&reg_aldo1>;
DVDD-supply = <&reg_eldo3>;
reset-gpios = <&pio 3 3 GPIO_ACTIVE_LOW>; /* PD3 */
powerdown-gpios = <&pio 2 0 GPIO_ACTIVE_HIGH>; /* PC0 */
port {
ov5640_ep: endpoint {
remote-endpoint = <&csi_ep>;
bus-width = <8>;
hsync-active = <1>; /* Active high */
vsync-active = <0>; /* Active low */
data-active = <1>; /* Active high */
pclk-sample = <1>; /* Rising */
};
};
};
};
hdmi-connector {
compatible = "hdmi-connector";
type = "a";
port {
hdmi_con_in: endpoint {
remote-endpoint = <&hdmi_out_con>;
};
};
};
reg_vcc1v8: vcc1v8 {
compatible = "regulator-fixed";
regulator-name = "vcc1v8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};
backlight: backlight {
compatible = "pwm-backlight";
pwms = <&r_pwm 0 50000 PWM_POLARITY_INVERTED>;
brightness-levels = <0 1 2 4 8 16 32 64 128 512>;
default-brightness-level = <2>;
enable-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* LCD-BL-EN: PH10 */
};
};
&ac_power_supply {
status = "okay";
};
&battery_power_supply {
status = "okay";
};
&codec {
status = "okay";
};
&codec_analog {
status = "okay";
};
&csi {
status = "okay";
port {
#address-cells = <1>;
#size-cells = <0>;
csi_ep: endpoint {
remote-endpoint = <&ov5640_ep>;
bus-width = <8>;
hsync-active = <1>; /* Active high */
vsync-active = <0>; /* Active low */
data-active = <1>; /* Active high */
pclk-sample = <1>; /* Rising */
};
};
};
&dai {
status = "okay";
};
&de {
status = "okay";
};
&dphy {
status = "okay";
};
&reg_ldo_io0 {
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcc-ctp";
status = "okay";
};
&dsi {
vcc-dsi-supply = <&reg_dldo1>; /* VCC3V3-DSI */
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
panel@0 {
compatible = "pinephone,jd9365da";
reg = <0>;
avdd-supply = <&reg_dc1sw>; /* VCC-LCD */
dvdd-supply = <&reg_dldo2>; /* VCC-MIPI */
cvdd-supply = <&reg_ldo_io0>; /* VCC-CTP: GPIO0-LDO */
reset-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* LCD-RST: PD24 */
backlight = <&backlight>;
};
};
&r_pwm {
pinctrl-names = "default";
pinctrl-0 = <&r_pwm_pin>;
status = "okay";
};
&ehci0 {
status = "okay";
};
&ehci1 {
status = "okay";
};
&emac {
pinctrl-names = "default";
pinctrl-0 = <&rgmii_pins>;
phy-mode = "rgmii";
phy-handle = <&ext_rgmii_phy>;
phy-supply = <&reg_dc1sw>;
status = "okay";
};
&hdmi {
hvcc-supply = <&reg_dldo1>;
status = "disabled";
};
&hdmi_out {
hdmi_out_con: endpoint {
remote-endpoint = <&hdmi_con_in>;
};
};
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins>;
status = "okay";
ft6236@38 {
compatible = "focaltech,ft6236", "edt,edt-6236";
reg = <0x38>;
vdd-supply = <&reg_ldo_io0>;
pinctrl-names = "default";
pinctrl-0 = <&touch_intr_pin>;
interrupt-parent = <&pio>;
interrupts = <7 4 IRQ_TYPE_EDGE_FALLING>;
irq-gpios = <&pio 7 4 GPIO_ACTIVE_LOW>;
touchscreen-size-x = <720>;
touchscreen-size-y = <1440>;
touchscreen-inverted-x;
};
};
&pio {
touch_intr_pin: touch_intr_pin {
pins = "PH4";
// TODO: perhaps remove this bias
bias-pull-up;
function = "irq";
};
};
&i2c1 {
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins>;
status = "okay";
mpu6050@68 {
compatible = "invensense,mpu6050";
reg = <0x68>;
interrupt-parent = <&pio>;
interrupts = <7 5 IRQ_TYPE_EDGE_FALLING>; /* PH5 */
orientation = <0xff 0 0 0 1 0 0 0 0xff>;
};
lis3mdl@1e {
compatible = "st,lis3mdl-magn";
reg = <0x1e>;
interrupt-parent = <&pio>;
interrupts = <1 1 IRQ_TYPE_EDGE_RISING>; /* PB1 */
};
stk3335@47 {
compatible = "sensortek,STK3335";
reg = <0x47>;
interrupt-parent = <&pio>;
interrupts = <1 0 IRQ_TYPE_EDGE_FALLING>; /* PB0 */
};
};
&mdio {
ext_rgmii_phy: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <1>;
};
};
&mmc1 {
pinctrl-names = "default";
pinctrl-0 = <&mmc1_pins>;
vmmc-supply = <&reg_dcdc1>;
vqmmc-supply = <&reg_dldo4>;
bus-width = <4>;
non-removable;
status = "okay";
rtl8723bs: wifi@1 {
reg = <1>;
};
};
&mmc2 {
pinctrl-names = "default";
pinctrl-0 = <&mmc2_pins>;
vmmc-supply = <&reg_dcdc1>;
vqmmc-supply = <&reg_vcc1v8>;
bus-width = <8>;
non-removable;
cap-mmc-hw-reset;
status = "okay";
};
&ohci0 {
status = "okay";
};
&ohci1 {
status = "okay";
};
&reg_dc1sw {
regulator-name = "vcc-lcd";
};
&reg_dldo1 {
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcc-hdmi";
};
&reg_dldo2 {
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcc-mipi";
};
&reg_dldo4 {
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcc-wifi";
};
&simplefb_hdmi {
vcc-hdmi-supply = <&reg_dldo1>;
};
&sound {
simple-audio-card,aux-devs = <&codec_analog>;
simple-audio-card,widgets = "Microphone", "Microphone Jack",
"Headphone", "Headphone Jack";
simple-audio-card,routing =
"Left DAC", "AIF1 Slot 0 Left",
"Right DAC", "AIF1 Slot 0 Right",
"Headphone Jack", "HP",
"AIF1 Slot 0 Left ADC", "Left ADC",
"AIF1 Slot 0 Right ADC", "Right ADC",
"MIC2", "Microphone Jack";
status = "okay";
};
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pb_pins>;
status = "okay";
};
&usb_otg {
dr_mode = "host";
status = "okay";
};
&usbphy {
status = "okay";
};
&tcon1 {
status = "disabled";
};
&hdmi_phy {
status = "disabled";
};
diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index 34f686f3b2a0..2b8e31c71186 100644
--- a/arch/arm64/boot/dts/allwinner/Makefile
+++ b/arch/arm64/boot/dts/allwinner/Makefile
@@ -8,6 +8,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-lts.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pinebook.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-dontbeevil.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-dontbeevil-longts.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-sopine-baseboard.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-teres-i.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-bananapi-m2-plus.dtb
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-dontbeevil-longts.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-dontbeevil-longts.dts
new file mode 100644
index 000000000000..49f71536649b
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-dontbeevil-longts.dts
@@ -0,0 +1,14 @@
+/dts-v1/;
+
+#include "sun50i-a64-dontbeevil.dts"
+
+/ {
+ model = "PinePhone Don't be evil development kit with long touch cable";
+ compatible = "pine64,sopine-baseboard", "pine64,sopine",
+ "allwinner,sun50i-a64";
+
+};
+
+&touchscreen {
+ touchscreen-inverted-x;
+};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-dontbeevil.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-dontbeevil.dts
index 24c32821572f..6cf8468fff14 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-dontbeevil.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-dontbeevil.dts
@@ -236,7 +236,7 @@
pinctrl-0 = <&i2c0_pins>;
status = "okay";
- ft6236@38 {
+ touchscreen: ft6236@38 {
compatible = "focaltech,ft6236", "edt,edt-6236";
reg = <0x38>;
@@ -251,8 +251,6 @@
touchscreen-size-x = <720>;
touchscreen-size-y = <1440>;
-
- touchscreen-inverted-x;
};
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment