Browse Source

wrk linux 5.8.x

Reinhard Russinger 2 years ago
parent
commit
4157879d7d

+ 1 - 1
board/GfA/Display001/BUILD

@@ -1 +1 @@
-754
+759

+ 45 - 132
board/GfA/Display001/DTS_5.0/SOPINEA64.dts

@@ -1,47 +1,7 @@
-/*
- * 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.
- */
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+// Copyright (c) 2017 Icenowy Zheng <icenowy@aosc.xyz>
+// Based on sun50i-a64-pine64.dts, which is:
+//   Copyright (c) 2016 ARM Ltd.
 
 /dts-v1/;
 
@@ -53,19 +13,13 @@
 	compatible = "pine64,sopine-baseboard", "pine64,sopine",
 		     "allwinner,sun50i-a64";
 
-	backlight: backlight {
-		compatible = "pwm-backlight";
-		pwms = <&r_pwm 0 50000 PWM_POLARITY_INVERTED>;
-		brightness-levels = <1 2 4 8 16 32 64 128 512>;
-		default-brightness-level = <8>;
-		enable-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* LCD-BL-EN: PH10 */
-	};
-
-
 	aliases {
 		ethernet0 = &emac;
 		serial0 = &uart0;
 		serial1 = &uart1;
+		serial2 = &uart2;
+		serial3 = &uart3;
+		serial4 = &uart4;
 	};
 
 	chosen {
@@ -89,12 +43,6 @@
 		regulator-min-microvolt = <1800000>;
 		regulator-max-microvolt = <1800000>;
 	};
-
- wifi_pwrseq: wifi_pwrseq {
- compatible = "mmc-pwrseq-simple";
- reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
- };
-
 };
 
 &ac_power_supply {
@@ -121,32 +69,6 @@
 	status = "okay";
 };
 
-&dphy {
-	status = "okay";
-};
-
-&dsi {
-	vcc-dsi-supply = <&reg_dldo1>;		/* VCC3V3-DSI */
-	#address-cells = <1>;
-	#size-cells = <0>;
-	status = "okay";
-
-	panel@0 {
-		compatible = "feiyang,fy07024di26a30d";
-		reg = <0>;
-		avdd-supply = <&reg_dc1sw>;	/* VCC-LCD */
-		dvdd-supply = <&reg_dldo2>;	/* VCC-MIPI */
-		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";
 };
@@ -158,7 +80,7 @@
 &emac {
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii_pins>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-txid";
 	phy-handle = <&ext_rgmii_phy>;
 	phy-supply = <&reg_dc1sw>;
 	status = "okay";
@@ -183,16 +105,16 @@
 };
 
 &mmc1 {
- pinctrl-names = "default";
- pinctrl-0 = <&mmc1_pins>;
- vmmc-supply = <&reg_dldo4>;
- vqmmc-supply = <&reg_eldo1>;
- mmc-pwrseq = <&wifi_pwrseq>;
- non-removable;
- bus-width = <4>;
- status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc1_pins>;
+	vmmc-supply = <&reg_dcdc1>;
+	disable-wp;
+        bus-width = <4>;
+        cd-gpios = <&pio 11 3 GPIO_ACTIVE_HIGH>; /* PL3  switch */
+	status="okay";
 };
 
+/*
 &mmc2 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc2_pins>;
@@ -201,8 +123,10 @@
 	bus-width = <8>;
 	non-removable;
 	cap-mmc-hw-reset;
+	mmc-hs200-1_8v;
 	status = "okay";
 };
+*/
 
 &ohci0 {
 	status = "okay";
@@ -213,6 +137,12 @@
 };
 
 &reg_dc1sw {
+	/*
+	 * Ethernet PHY needs 30ms to properly power up and some more
+	 * to initialize. 100ms should be plenty of time to finish
+	 * whole process.
+	 */
+	regulator-enable-ramp-delay = <100000>;
 	regulator-name = "vcc-phy";
 };
 
@@ -234,15 +164,8 @@
 	regulator-name = "vcc-wifi";
 };
 
-&spi0 {
-	status = "okay";
-	flash@0 {
-		#address-cells = <1>;
-		#size-cells = <1>;
-		compatible = "jedec,spi-nor";
-		reg = <0>;
-		spi-max-frequency = <40000000>;
-	};
+&simplefb_hdmi {
+	vcc-hdmi-supply = <&reg_dldo1>;
 };
 
 &spi1 {
@@ -255,45 +178,35 @@
 	};
 };
 
-&simplefb_hdmi {
-	vcc-hdmi-supply = <&reg_dldo1>;
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pb_pins>;
+	status = "okay";
 };
 
-&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";
+/* On Pi-2 connector */
+&uart2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart2_pins>;
+	status = "disabled";
 };
 
-&uart0 {
+/* On Euler connector */
+&uart3 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&uart0_pb_pins>;
-	status = "okay";
+	pinctrl-0 = <&uart3_pins>;
+	status = "disabled";
 };
 
-&uart1 {
- pinctrl-names = "default";
- pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
- uart-has-rtscts = <1>;
- status = "okay";
-
- bluetooth {
- 	compatible = "realtek,rtl8723bs-bt";
- 	device-wake-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */
- 	host-wake-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
- };
+/* On Euler connector, RTS/CTS optional */
+&uart4 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart4_pins>;
+	status = "disabled";
 };
 
 &usb_otg {
-	dr_mode = "otg";
+	dr_mode = "host";
 	status = "okay";
 };
 

+ 0 - 40
board/GfA/Display001/Linux-5.8/0001-Edid_480.272.patch

@@ -1,40 +0,0 @@
-diff --git a/drivers/gpu/drm/drm_edid_load.c b/drivers/gpu/drm/drm_edid_load.c
-index 37d8ba3..e2e00c1 100644
---- a/drivers/gpu/drm/drm_edid_load.c
-+++ b/drivers/gpu/drm/drm_edid_load.c
-@@ -38,8 +38,9 @@ int __drm_get_edid_firmware_path(char *buf, size_t bufsize)
- }
- EXPORT_SYMBOL(__drm_get_edid_firmware_path);
- 
--#define GENERIC_EDIDS 6
-+#define GENERIC_EDIDS 7
- static const char * const generic_edid_name[GENERIC_EDIDS] = {
-+	"edid/480x272.bin",
- 	"edid/800x600.bin",
- 	"edid/1024x768.bin",
- 	"edid/1280x1024.bin",
-@@ -50,6 +51,24 @@ static const char * const generic_edid_name[GENERIC_EDIDS] = {
- 
- static const u8 generic_edid[GENERIC_EDIDS][128] = {
- 	{
-+	0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
-+	0x04, 0x81, 0x43, 0x00, 0x01, 0x00, 0x00, 0x00,
-+	0x0C, 0x17, 0x01, 0x03, 0x81, 0x0A, 0x06, 0x78,
-+	0x8A, 0xA5, 0x8E, 0xA6, 0x54, 0x4A, 0x9C, 0x26,
-+	0x12, 0x45, 0x46, 0x00, 0x00, 0x00, 0x01, 0x01,
-+	0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-+	0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xC4, 0x09,
-+	0xE0, 0x33, 0x10, 0x10, 0x14, 0x10, 0x08, 0x05,
-+	0x4A, 0x00, 0x5F, 0x36, 0x00, 0x00, 0x00, 0x18,
-+	0x00, 0x00, 0x00, 0xFC, 0x00, 0x41, 0x44, 0x41,
-+	0x46, 0x52, 0x55, 0x49, 0x54, 0x20, 0x34, 0x33,
-+	0x20, 0x20, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
-+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
-+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42
-+	},
-+	{
- 	0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
- 	0x31, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 	0x05, 0x16, 0x01, 0x03, 0x6d, 0x1b, 0x14, 0x78,

+ 1 - 1
board/GfA/Display001/post-build_4.4.sh

@@ -8,7 +8,7 @@ echo ">>>$TARGETDIR<<<"
 
 BUILD=`cat $GFA_PATH/BUILD`
 BUILDDATE=`date +"%Y-%m-%d %H:%M"`
-BUILD=$((BUILD+1))
+#BUILD=$((BUILD+1))
 echo $BUILD > $GFA_PATH/BUILD
 
 chmod 600  $GFA_ROOT_PATH/root/.ssh/id*

+ 1 - 10
board/GfA/Display001/rootfs/etc/init.d/rcS

@@ -1,16 +1,7 @@
 #!/bin/sh
-# -- set tcp socket timeouts
-echo 10 > /proc/sys/net/ipv4/tcp_keepalive_time
-echo 5 > /proc/sys/net/ipv4/tcp_keepalive_probes
-echo 15 >  /proc/sys/net/ipv4/tcp_keepalive_intvl
-echo 2 > /proc/sys/net/ipv4/tcp_retries2
-echo 1 > /proc/sys/net/ipv4/tcp_orphan_retries
-echo 5 > /proc/sys/net/ipv4/tcp_reordering
-echo 0 > /proc/sys/net/ipv4/tcp_retrans_collapse
-# --
-# Start all init scripts in /etc/init.d
 # executing them in numerical order.
 #
+modprobe uinput
 modprobe industrialio
 #===ToDo: get baseboard version
 

+ 1 - 1
board/GfA/Display001/rootfs/etc/inittab

@@ -30,7 +30,7 @@ tty2::respawn:/sbin/getty -L  tty2 115200 linux
 tty3::respawn:/sbin/getty -L  tty3 115200 linux
 
 #tty6::respawn:/root/startbrowser.sh
-tty8::respawn:/var/GfA/Display_GSM 
+##tty8::respawn:/var/GfA/Display_GSM 
 # Stuff to do for the 3-finger salute
 ::ctrlaltdel:/sbin/reboot
 

+ 1 - 1
board/GfA/Display001/sopine/boot.cmd

@@ -1,4 +1,4 @@
-setenv bootargs console=tty1 cma=256M drm_kms_helper.edid_firmware=GfA/GfAHDMI.bin earlyprintk root=/dev/mmcblk0p2 rootwait
+setenv bootargs console=tty0 consoleblank=0 loglevel=0 cma=256M drm_kms_helper.edid_firmware=GfA/GfAHDMI.bin earlyprintk root=/dev/mmcblk0p2 rootwait
 
 fatload mmc 0 $kernel_addr_r Image
 fatload mmc 0 $fdt_addr_r SOPINEA64.dtb

+ 1 - 5
configs/SOPINEA64_L50_Qt5.15_WRK_defconfig

@@ -1,6 +1,5 @@
 BR2_aarch64=y
 BR2_ARM_FPU_VFPV4=y
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_8=y
 BR2_TOOLCHAIN_BUILDROOT_CXX=y
 BR2_PACKAGE_HOST_GDB=y
 BR2_PACKAGE_HOST_GDB_TUI=y
@@ -23,7 +22,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
 BR2_ROOTFS_POST_SCRIPT_ARGS="-c ../GfA/board/GfA/Display001/sopine/genimage.cfg"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.7"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.1.2"
 BR2_LINUX_KERNEL_PATCH="../GfA/board/GfA/Display001/Linux-5.8"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="../GfA/board/GfA/Display001/SOPINEA64_defconfig"
@@ -436,7 +435,4 @@ BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y
 BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="../GfA/board/GfA/Display001/sopine/boot.cmd"
 # BR2_PACKAGE_LIBGFAIPC is not set
 # BR2_PACKAGE_LIBGFATIMER is not set
-BR2_PACKAGE_GFANET=y
-BR2_PACKAGE_DRVGFASPI=y
-BR2_PACKAGE_GFASPISTUB=y
 BR2_PACKAGE_LIBULFIUS=y

+ 1 - 1
patches/0107-CrossCompile-for-aarch64.patch

@@ -7,7 +7,7 @@ index c068ea1081..e0965cb385 100755
  export CROSS=${CROSS_COMPILE}
  
 -export ARCH=arm
-+export ARCH=aarch64
++export ARCH=arm64
  _KERNELDIR=`grep BR2_LINUX_KERNEL_VERSION\= .config | awk -F\= -F\" '{print $2}'`
  export KERNELDIR=${CMDDIR}/output/build/linux-${_KERNELDIR}
  export BB_KERNEL_SOURCES=$KERNELDIR

+ 1 - 1
patches/0108-MakeTOOLCHAN-for-aarch64.patch

@@ -7,7 +7,7 @@ index 134f9f1d99..bf95ddc5f5 100755
  export CROSS=${CROSS_COMPILE}
  
 -export ARCH=arm
-+export ARCH=aarch64
++export ARCH=arm64
  export SYSROOTARM=`grep BR2_HOST_DIR .config | awk -F\= -F\" '{print $2}'`/usr/${_GNU_TARGET_NAME}/sysroot
  export CC_FULLPATH="${SYSROOT}/${CROSS_COMPILE}"
  export CC=${CROSS_COMPILE}gcc

+ 65 - 0
patches/0109-wrk1.patch

@@ -0,0 +1,65 @@
+diff --git a/MakeIMAGE.sh b/MakeIMAGE.sh
+index 9612418756..74b92234fa 100755
+--- a/MakeIMAGE.sh
++++ b/MakeIMAGE.sh
+@@ -62,9 +62,8 @@ mount ${DRIVE1} /tmp/boot
+ du -h ${DRIVE1}
+ 
+ cp ./output/images/*.dtb /tmp/boot 
+-cp ./output/images/uImage /tmp/boot
+-cp ./output/images/MLO /tmp/boot
+-cp ./output/images/u-boot.img /tmp/boot   
++cp ./output/images/Image /tmp/boot
++cp ./output/images/boot.scr /tmp/boot
+                                         
+ ls -alh /tmp/boot
+ 
+diff --git a/MapSdcard.sh b/MapSdcard.sh
+new file mode 100755
+index 0000000000..28ac66d48b
+--- /dev/null
++++ b/MapSdcard.sh
+@@ -0,0 +1,42 @@
++#!/bin/sh
++
++SAVE_LC=$LC_ALL
++export LC_ALL=C
++
++BUILD=`cat ../GfA/board/GfA/Display001/BUILD`
++#IMAGEFILE=../Display001_Build_$BUILD-img
++IMAGEFILE=./output/images/sdcard.img
++echo ">>> $IMAGEFILE <<<"
++#-- map partitions
++DRIVE1=/dev/mapper/`kpartx -s -l $IMAGEFILE | head -n +1| awk '{print $1}'`
++DRIVE2=/dev/mapper/`kpartx -s -l $IMAGEFILE | tail -n +2 | head -n +1| awk '{print $1}'`
++
++echo ">>>>>>>>>>>>>>>>>>"
++echo $DRIVE1
++echo $DRIVE2
++echo ">>>>>>>>>>>>>>>>>>"
++
++kpartx -asv $IMAGEFILE
++#-- mount partitions
++umount /tmp/boot
++umount /tmp/rootfs
++
++rm -rf /tmp/boot  
++rm -rf /tmp/rootfs
++
++mkdir /tmp/boot  
++mkdir /tmp/rootfs
++
++mount ${DRIVE1} /tmp/boot
++mount ${DRIVE2} /tmp/rootfs
++
++bash
++
++umount ${DRIVE1}
++umount ${DRIVE2}
++                                                        
++#-- unmap partitions
++kpartx -dsv $IMAGEFILE
++
++export LC_ALL=$SAVE_LC
++                                                                                                                
+\ No newline at end of file