RK3326 multi dtb, bump mesa, bump linux
This commit is contained in:
parent
fc41343e42
commit
bdb54c1976
11 changed files with 204 additions and 178 deletions
|
@ -17,8 +17,8 @@ case ${DEVICE} in
|
|||
PKG_GIT_CLONE_BRANCH="csf"
|
||||
;;
|
||||
*)
|
||||
PKG_VERSION="23.0.3"
|
||||
PKG_SHA256="386362a5d80df3b096636b67f340e1ce67b705b44767d5bdd11d2ed1037192d5"
|
||||
PKG_VERSION="23.1.0"
|
||||
PKG_SHA256="a9dde3c76571c4806245a05bda1cceee347c3267127e9e549e4f4e225d92e992"
|
||||
PKG_SITE="http://www.mesa3d.org/"
|
||||
PKG_URL="https://mesa.freedesktop.org/archive/mesa-${PKG_VERSION}.tar.xz"
|
||||
;;
|
||||
|
@ -26,8 +26,7 @@ esac
|
|||
|
||||
get_graphicdrivers
|
||||
|
||||
PKG_MESON_OPTS_TARGET="-Ddri-drivers= \
|
||||
-Dgallium-drivers=${GALLIUM_DRIVERS// /,} \
|
||||
PKG_MESON_OPTS_TARGET="-Dgallium-drivers=${GALLIUM_DRIVERS// /,} \
|
||||
-Dgallium-extra-hud=false \
|
||||
-Dgallium-omx=disabled \
|
||||
-Dgallium-nine=false \
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
PKG_NAME="linux"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_VERSION="6.1.27"
|
||||
PKG_VERSION="6.1.28"
|
||||
PKG_URL="https://www.kernel.org/pub/linux/kernel/v6.x/${PKG_NAME}-${PKG_VERSION}.tar.xz"
|
||||
PKG_SITE="http://www.kernel.org"
|
||||
PKG_DEPENDS_HOST="ccache:host rsync:host openssl:host"
|
||||
|
|
|
@ -19,7 +19,7 @@ PKG_PATCH_DIRS+="${DEVICE}"
|
|||
|
||||
case ${DEVICE} in
|
||||
S922X*)
|
||||
PKG_VERSION="6.1.27"
|
||||
PKG_VERSION="6.1.28"
|
||||
PKG_URL="https://www.kernel.org/pub/linux/kernel/v6.x/${PKG_NAME}-${PKG_VERSION}.tar.xz"
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -59,8 +59,8 @@ case "${PKG_SOC}" in
|
|||
;;
|
||||
esac
|
||||
|
||||
case "${PKG_SOC}" in
|
||||
px30)
|
||||
case "${DEVICE}" in
|
||||
RK3326)
|
||||
if [ -n "${PKG_BL31}" ]; then
|
||||
echo "trust: create trust.ini..."
|
||||
cat >trust.ini <<EOF
|
||||
|
@ -89,19 +89,34 @@ if [ "${BOOT_INI}" == true ]
|
|||
then
|
||||
echo "boot: create boot.ini..."
|
||||
cat >${INSTALL}/usr/share/bootloader/boot.ini <<EOF
|
||||
odroidgoa-uboot-config
|
||||
odroidgoa-uboot-config
|
||||
|
||||
setenv bootargs "boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@ ${EXTRA_CMDLINE}"
|
||||
|
||||
setenv fdt_addr_r "0x01f00000"
|
||||
setenv dtb_name "${DEVICE_DTB[0]}.dtb"
|
||||
setenv loadaddr "${PKG_LOAD_ADDR}"
|
||||
setenv scriptaddr "0x00500000"
|
||||
setenv kernel_addr_r "0x02008000"
|
||||
setenv loadaddr "0x02000000"
|
||||
setenv dtb_loadaddr "0x01f00000"
|
||||
|
||||
load mmc 1:1 \${loadaddr} KERNEL
|
||||
|
||||
sysboot mmc ${BOOT_PART} any \${scriptaddr} /extlinux/extlinux.conf
|
||||
if test \${hwrev} = 'v11'; then
|
||||
if gpio input c22; then
|
||||
load mmc 1:1 \${dtb_loadaddr} rk3326-odroid-go2-v11.dtb
|
||||
else
|
||||
load mmc 1:1 \${dtb_loadaddr} rk3326-anbernic-rg351m.dtb
|
||||
fi
|
||||
elif test \${hwrev} = 'v10-go3'; then
|
||||
load mmc 1:1 \${dtb_loadaddr} rk3326-odroid-go3.dtb
|
||||
elif test \${hwrev} = 'v10'; then
|
||||
load mmc 1:1 \${dtb_loadaddr} rk3326-odroid-go2.dtb
|
||||
fi
|
||||
|
||||
booti \${loadaddr} - \${dtb_loadaddr}
|
||||
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ "${EXT_LINUX_CONF}" == true ]
|
||||
then
|
||||
echo "boot: create extlinux.conf..."
|
||||
mkdir -p "${INSTALL}/usr/share/bootloader/extlinux"
|
||||
|
||||
|
@ -118,3 +133,4 @@ LABEL ${DISTRO}
|
|||
${FDTMODE}
|
||||
APPEND boot=UUID=@BOOT_UUID@ disk=UUID=@DISK_UUID@ ${EXTRA_CMDLINE}
|
||||
EOF
|
||||
fi
|
||||
|
|
|
@ -46,9 +46,36 @@ case "${PKG_SOC}" in
|
|||
;;
|
||||
esac
|
||||
|
||||
if [ -f "${RELEASE_DIR}/3rdparty/bootloader/boot.ini" ]; then
|
||||
cp "${RELEASE_DIR}/3rdparty/bootloader/boot.ini" "${LE_TMP}/boot.ini"
|
||||
mcopy -so "${LE_TMP}/boot.ini" ::
|
||||
#Create boot.ini
|
||||
if [ "${BOOT_INI}" == true ]
|
||||
then
|
||||
echo "image: create boot.ini..."
|
||||
cat >"${LE_TMP}/boot.ini" <<EOF
|
||||
odroidgoa-uboot-config
|
||||
|
||||
setenv bootargs "boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} ${EXTRA_CMDLINE}"
|
||||
|
||||
setenv loadaddr "0x02000000"
|
||||
setenv dtb_loadaddr "0x01f00000"
|
||||
|
||||
load mmc 1:1 \${loadaddr} KERNEL
|
||||
|
||||
if test \${hwrev} = 'v11'; then
|
||||
if gpio input c22; then
|
||||
load mmc 1:1 \${dtb_loadaddr} rk3326-odroid-go2-v11.dtb
|
||||
else
|
||||
load mmc 1:1 \${dtb_loadaddr} rk3326-anbernic-rg351m.dtb
|
||||
fi
|
||||
elif test \${hwrev} = 'v10-go3'; then
|
||||
load mmc 1:1 \${dtb_loadaddr} rk3326-odroid-go3.dtb
|
||||
elif test \${hwrev} = 'v10'; then
|
||||
load mmc 1:1 \${dtb_loadaddr} rk3326-odroid-go2.dtb
|
||||
fi
|
||||
|
||||
booti \${loadaddr} - \${dtb_loadaddr}
|
||||
|
||||
EOF
|
||||
mcopy -so "${LE_TMP}/boot.ini" ::
|
||||
fi
|
||||
|
||||
mkdir -p "${LE_TMP}/extlinux"
|
||||
|
@ -63,6 +90,8 @@ do
|
|||
fi
|
||||
done
|
||||
|
||||
if [ "${EXT_LINUX_CONF}" == true ]
|
||||
then
|
||||
mkdir -p "${LE_TMP}/extlinux"
|
||||
|
||||
if [ "${TRUST_LABEL}" = "resource" ]
|
||||
|
@ -83,3 +112,4 @@ LABEL ${DISTRO}
|
|||
EOF
|
||||
|
||||
mcopy -so "${LE_TMP}/extlinux" ::
|
||||
fi
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm64 6.1.2 Kernel Configuration
|
||||
# Linux/arm64 6.1.27 Kernel Configuration
|
||||
#
|
||||
CONFIG_CC_VERSION_TEXT="aarch64-buildroot-linux-gnu-gcc.br_real (Buildroot 2022.11-2386-g2251421ff3) 12.2.0"
|
||||
CONFIG_CC_VERSION_TEXT="aarch64-libreelec-linux-gnueabi-gcc-12.2.0 (GCC) 12.2.0"
|
||||
CONFIG_CC_IS_GCC=y
|
||||
CONFIG_GCC_VERSION=120200
|
||||
CONFIG_CLANG_VERSION=0
|
||||
CONFIG_AS_IS_GNU=y
|
||||
CONFIG_AS_VERSION=23800
|
||||
CONFIG_AS_VERSION=23900
|
||||
CONFIG_LD_IS_BFD=y
|
||||
CONFIG_LD_VERSION=23800
|
||||
CONFIG_LD_VERSION=23900
|
||||
CONFIG_LLD_VERSION=0
|
||||
CONFIG_CC_CAN_LINK=y
|
||||
CONFIG_CC_CAN_LINK_STATIC=y
|
||||
|
@ -157,7 +157,7 @@ CONFIG_GENERIC_SCHED_CLOCK=y
|
|||
CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
|
||||
CONFIG_CC_HAS_INT128=y
|
||||
CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
|
||||
CONFIG_GCC12_NO_ARRAY_BOUNDS=y
|
||||
CONFIG_GCC11_NO_ARRAY_BOUNDS=y
|
||||
CONFIG_CC_NO_ARRAY_BOUNDS=y
|
||||
CONFIG_ARCH_SUPPORTS_INT128=y
|
||||
CONFIG_CGROUPS=y
|
||||
|
@ -199,7 +199,6 @@ CONFIG_BLK_DEV_INITRD=y
|
|||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_INITRAMFS_ROOT_UID=0
|
||||
CONFIG_INITRAMFS_ROOT_GID=0
|
||||
CONFIG_INITRAMFS_COMPRESSION_GZIP=y
|
||||
CONFIG_RD_GZIP=y
|
||||
CONFIG_RD_BZIP2=y
|
||||
CONFIG_RD_LZMA=y
|
||||
|
@ -207,6 +206,14 @@ CONFIG_RD_XZ=y
|
|||
CONFIG_RD_LZO=y
|
||||
CONFIG_RD_LZ4=y
|
||||
CONFIG_RD_ZSTD=y
|
||||
CONFIG_INITRAMFS_COMPRESSION_GZIP=y
|
||||
# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set
|
||||
# CONFIG_INITRAMFS_COMPRESSION_LZMA is not set
|
||||
# CONFIG_INITRAMFS_COMPRESSION_XZ is not set
|
||||
# CONFIG_INITRAMFS_COMPRESSION_LZO is not set
|
||||
# CONFIG_INITRAMFS_COMPRESSION_LZ4 is not set
|
||||
# CONFIG_INITRAMFS_COMPRESSION_ZSTD is not set
|
||||
# CONFIG_INITRAMFS_COMPRESSION_NONE is not set
|
||||
# CONFIG_BOOT_CONFIG is not set
|
||||
CONFIG_INITRAMFS_PRESERVE_MTIME=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y
|
||||
|
@ -1970,6 +1977,7 @@ CONFIG_RTLWIFI=m
|
|||
CONFIG_RTLWIFI_USB=m
|
||||
# CONFIG_RTLWIFI_DEBUG is not set
|
||||
CONFIG_RTL8192C_COMMON=m
|
||||
# CONFIG_RTL8XXXU is not set
|
||||
CONFIG_RTW88=m
|
||||
# CONFIG_RTW89 is not set
|
||||
# CONFIG_WLAN_VENDOR_RSI is not set
|
||||
|
@ -2007,6 +2015,7 @@ CONFIG_NET_FAILOVER=y
|
|||
CONFIG_INPUT=y
|
||||
CONFIG_INPUT_LEDS=y
|
||||
CONFIG_INPUT_FF_MEMLESS=y
|
||||
CONFIG_INPUT_POLLDEV=y
|
||||
# CONFIG_INPUT_SPARSEKMAP is not set
|
||||
CONFIG_INPUT_MATRIXKMAP=y
|
||||
|
||||
|
@ -2095,7 +2104,6 @@ CONFIG_JOYSTICK_ADC=y
|
|||
# CONFIG_JOYSTICK_PXRC is not set
|
||||
# CONFIG_JOYSTICK_QWIIC is not set
|
||||
# CONFIG_JOYSTICK_FSIA6B is not set
|
||||
CONFIG_INPUT_POLLDEV=y
|
||||
CONFIG_JOYSTICK_ODROIDGO2=y
|
||||
CONFIG_JOYSTICK_ODROIDGO2_V11=y
|
||||
CONFIG_JOYSTICK_ODROIDGO3=y
|
||||
|
@ -3271,7 +3279,6 @@ CONFIG_DRM=y
|
|||
CONFIG_DRM_MIPI_DBI=y
|
||||
CONFIG_DRM_MIPI_DSI=y
|
||||
# CONFIG_DRM_DEBUG_MM is not set
|
||||
CONFIG_DRM_USE_DYNAMIC_DEBUG=y
|
||||
CONFIG_DRM_KMS_HELPER=y
|
||||
# CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS is not set
|
||||
# CONFIG_DRM_DEBUG_MODESET_LOCK is not set
|
||||
|
@ -3455,8 +3462,6 @@ CONFIG_DRM_DW_MIPI_DSI=y
|
|||
# CONFIG_DRM_ETNAVIV is not set
|
||||
# CONFIG_DRM_HISI_KIRIN is not set
|
||||
# CONFIG_DRM_LOGICVC is not set
|
||||
# CONFIG_DRM_MXSFB is not set
|
||||
# CONFIG_DRM_IMX_LCDIF is not set
|
||||
# CONFIG_DRM_ARCPGU is not set
|
||||
# CONFIG_DRM_GM12U320 is not set
|
||||
CONFIG_DRM_PANEL_MIPI_DBI=m
|
||||
|
@ -5593,9 +5598,6 @@ CONFIG_TMPFS_XATTR=y
|
|||
CONFIG_ARCH_SUPPORTS_HUGETLBFS=y
|
||||
CONFIG_HUGETLBFS=y
|
||||
CONFIG_HUGETLB_PAGE=y
|
||||
CONFIG_ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP=y
|
||||
CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP=y
|
||||
# CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON is not set
|
||||
CONFIG_MEMFD_CREATE=y
|
||||
CONFIG_ARCH_HAS_GIGANTIC_PAGE=y
|
||||
CONFIG_CONFIGFS_FS=y
|
||||
|
@ -5654,46 +5656,11 @@ CONFIG_PSTORE_RAM=y
|
|||
# CONFIG_UFS_FS is not set
|
||||
# CONFIG_EROFS_FS is not set
|
||||
CONFIG_NETWORK_FILESYSTEMS=y
|
||||
CONFIG_NFS_FS=y
|
||||
CONFIG_NFS_V2=y
|
||||
CONFIG_NFS_V3=y
|
||||
# CONFIG_NFS_V3_ACL is not set
|
||||
CONFIG_NFS_V4=y
|
||||
# CONFIG_NFS_SWAP is not set
|
||||
CONFIG_NFS_V4_1=y
|
||||
CONFIG_NFS_V4_2=y
|
||||
CONFIG_PNFS_FILE_LAYOUT=y
|
||||
CONFIG_PNFS_FLEXFILE_LAYOUT=y
|
||||
CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org"
|
||||
# CONFIG_NFS_V4_1_MIGRATION is not set
|
||||
CONFIG_NFS_V4_SECURITY_LABEL=y
|
||||
CONFIG_ROOT_NFS=y
|
||||
# CONFIG_NFS_USE_LEGACY_DNS is not set
|
||||
CONFIG_NFS_USE_KERNEL_DNS=y
|
||||
CONFIG_NFS_DISABLE_UDP_SUPPORT=y
|
||||
# CONFIG_NFS_V4_2_READ_PLUS is not set
|
||||
# CONFIG_NFS_FS is not set
|
||||
# CONFIG_NFSD is not set
|
||||
CONFIG_GRACE_PERIOD=y
|
||||
CONFIG_LOCKD=y
|
||||
CONFIG_LOCKD_V4=y
|
||||
CONFIG_NFS_COMMON=y
|
||||
CONFIG_NFS_V4_2_SSC_HELPER=y
|
||||
CONFIG_SUNRPC=y
|
||||
CONFIG_SUNRPC_GSS=y
|
||||
CONFIG_SUNRPC_BACKCHANNEL=y
|
||||
# CONFIG_SUNRPC_DEBUG is not set
|
||||
# CONFIG_CEPH_FS is not set
|
||||
CONFIG_CIFS=y
|
||||
CONFIG_CIFS_STATS2=y
|
||||
CONFIG_CIFS_ALLOW_INSECURE_LEGACY=y
|
||||
# CONFIG_CIFS_UPCALL is not set
|
||||
# CONFIG_CIFS_XATTR is not set
|
||||
# CONFIG_CIFS_DEBUG is not set
|
||||
# CONFIG_CIFS_DFS_UPCALL is not set
|
||||
# CONFIG_CIFS_SWN_UPCALL is not set
|
||||
# CONFIG_CIFS_ROOT is not set
|
||||
# CONFIG_CIFS is not set
|
||||
# CONFIG_SMB_SERVER is not set
|
||||
CONFIG_SMBFS_COMMON=y
|
||||
# CONFIG_CODA_FS is not set
|
||||
# CONFIG_AFS_FS is not set
|
||||
CONFIG_NLS=y
|
||||
|
@ -6416,4 +6383,3 @@ CONFIG_MEMTEST=y
|
|||
#
|
||||
# end of Rust hacking
|
||||
# end of Kernel hacking
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
PKG_LOAD_ADDR="0x00200000"
|
||||
BOOT_INI=true
|
||||
BOOT_PART="1:1"
|
||||
EXT_LINUX_CONF=false
|
||||
|
||||
# Additional kernel make parameters (for example to specify the u-boot loadaddress)
|
||||
KERNEL_MAKE_EXTRACMD=""
|
||||
|
|
|
@ -37,11 +37,7 @@ case ${DEVICE} in
|
|||
PKG_GIT_CLONE_BRANCH="main"
|
||||
;;
|
||||
RK3326)
|
||||
# PKG_URL="https://github.com/torvalds/linux.git"
|
||||
# PKG_VERSION="7df047b3f0aa0c0ba730b6be9ab35c0053a3d4fd"
|
||||
# GET_HANDLER_SUPPORT="git"
|
||||
# PKG_GIT_CLONE_BRANCH="master"
|
||||
PKG_VERSION="6.1.27"
|
||||
PKG_VERSION="6.1.28"
|
||||
PKG_URL="https://www.kernel.org/pub/linux/kernel/v6.x/${PKG_NAME}-${PKG_VERSION}.tar.xz"
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -5782,30 +5782,9 @@ diff -rupN linux.orig/drivers/input/joystick/odroidgo3-joypad.c linux/drivers/in
|
|||
+
|
||||
+/*----------------------------------------------------------------------------*/
|
||||
diff -rupN linux.orig/drivers/power/supply/rk817_charger.c linux/drivers/power/supply/rk817_charger.c
|
||||
--- linux.orig/drivers/power/supply/rk817_charger.c 2023-05-10 16:31:21.744014868 +0000
|
||||
+++ linux/drivers/power/supply/rk817_charger.c 2023-05-10 16:31:19.803953529 +0000
|
||||
@@ -335,6 +335,20 @@ static int rk817_bat_calib_cap(struct rk
|
||||
charger->fcc_mah * 1000);
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * Set the SOC to 0 if we are below the minimum system voltage.
|
||||
+ */
|
||||
+ if (volt_avg <= charger->bat_voltage_min_design_uv) {
|
||||
+ charger->soc = 0;
|
||||
+ charge_now_adc = CHARGE_TO_ADC(0, charger->res_div);
|
||||
+ put_unaligned_be32(charge_now_adc, bulk_reg);
|
||||
+ regmap_bulk_write(rk808->regmap,
|
||||
+ RK817_GAS_GAUGE_Q_INIT_H3, bulk_reg, 4);
|
||||
+ dev_warn(charger->dev,
|
||||
+ "Battery voltage %d below minimum voltage %d\n",
|
||||
+ volt_avg, charger->bat_voltage_min_design_uv);
|
||||
+ }
|
||||
+
|
||||
rk817_record_battery_nvram_values(charger);
|
||||
|
||||
return 0;
|
||||
@@ -665,7 +679,7 @@ static enum power_supply_usb_type rk817_
|
||||
--- linux.orig/drivers/power/supply/rk817_charger.c 2023-05-11 17:44:17.890614600 +0000
|
||||
+++ linux/drivers/power/supply/rk817_charger.c 2023-05-11 17:45:11.992273244 +0000
|
||||
@@ -679,7 +679,7 @@ static enum power_supply_usb_type rk817_
|
||||
};
|
||||
|
||||
static const struct power_supply_desc rk817_bat_desc = {
|
||||
|
@ -5814,83 +5793,6 @@ diff -rupN linux.orig/drivers/power/supply/rk817_charger.c linux/drivers/power/s
|
|||
.type = POWER_SUPPLY_TYPE_BATTERY,
|
||||
.properties = rk817_bat_props,
|
||||
.num_properties = ARRAY_SIZE(rk817_bat_props),
|
||||
@@ -710,9 +724,10 @@ static int rk817_read_battery_nvram_valu
|
||||
|
||||
/*
|
||||
* Read the nvram for state of charge. Sanity check for values greater
|
||||
- * than 100 (10000). If the value is off it should get corrected
|
||||
- * automatically when the voltage drops to the min (soc is 0) or when
|
||||
- * the battery is full (soc is 100).
|
||||
+ * than 100 (10000) or less than 0, because other things (BSP kernels,
|
||||
+ * U-Boot, or even i2cset) can write to this register. If the value is
|
||||
+ * off it should get corrected automatically when the voltage drops to
|
||||
+ * the min (soc is 0) or when the battery is full (soc is 100).
|
||||
*/
|
||||
ret = regmap_bulk_read(charger->rk808->regmap,
|
||||
RK817_GAS_GAUGE_BAT_R1, bulk_reg, 3);
|
||||
@@ -721,6 +736,8 @@ static int rk817_read_battery_nvram_valu
|
||||
charger->soc = get_unaligned_le24(bulk_reg);
|
||||
if (charger->soc > 10000)
|
||||
charger->soc = 10000;
|
||||
+ if (charger->soc < 0)
|
||||
+ charger->soc = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -731,8 +748,8 @@ rk817_read_or_set_full_charge_on_boot(st
|
||||
{
|
||||
struct rk808 *rk808 = charger->rk808;
|
||||
u8 bulk_reg[4];
|
||||
- u32 boot_voltage, boot_charge_mah, tmp;
|
||||
- int ret, reg, off_time;
|
||||
+ u32 boot_voltage, boot_charge_mah;
|
||||
+ int ret, reg, off_time, tmp;
|
||||
bool first_boot;
|
||||
|
||||
/*
|
||||
@@ -785,10 +802,12 @@ rk817_read_or_set_full_charge_on_boot(st
|
||||
regmap_bulk_read(rk808->regmap, RK817_GAS_GAUGE_Q_PRES_H3,
|
||||
bulk_reg, 4);
|
||||
tmp = get_unaligned_be32(bulk_reg);
|
||||
+ if (tmp < 0)
|
||||
+ tmp = 0;
|
||||
boot_charge_mah = ADC_TO_CHARGE_UAH(tmp,
|
||||
charger->res_div) / 1000;
|
||||
/*
|
||||
- * Check if the columb counter has been off for more than 300
|
||||
+ * Check if the columb counter has been off for more than 30
|
||||
* minutes as it tends to drift downward. If so, re-init soc
|
||||
* with the boot voltage instead. Note the unit values for the
|
||||
* OFF_CNT register appear to be in decaminutes and stops
|
||||
@@ -799,7 +818,7 @@ rk817_read_or_set_full_charge_on_boot(st
|
||||
* than 0 on a reboot anyway.
|
||||
*/
|
||||
regmap_read(rk808->regmap, RK817_GAS_GAUGE_OFF_CNT, &off_time);
|
||||
- if (off_time >= 30) {
|
||||
+ if (off_time >= 3) {
|
||||
regmap_bulk_read(rk808->regmap,
|
||||
RK817_GAS_GAUGE_PWRON_VOL_H,
|
||||
bulk_reg, 2);
|
||||
@@ -816,19 +835,6 @@ rk817_read_or_set_full_charge_on_boot(st
|
||||
}
|
||||
}
|
||||
|
||||
- regmap_bulk_read(rk808->regmap, RK817_GAS_GAUGE_PWRON_VOL_H,
|
||||
- bulk_reg, 2);
|
||||
- tmp = get_unaligned_be16(bulk_reg);
|
||||
- boot_voltage = (charger->voltage_k * tmp) + 1000 * charger->voltage_b;
|
||||
- regmap_bulk_read(rk808->regmap, RK817_GAS_GAUGE_Q_PRES_H3,
|
||||
- bulk_reg, 4);
|
||||
- tmp = get_unaligned_be32(bulk_reg);
|
||||
- boot_charge_mah = ADC_TO_CHARGE_UAH(tmp, charger->res_div) / 1000;
|
||||
- regmap_bulk_read(rk808->regmap, RK817_GAS_GAUGE_OCV_VOL_H,
|
||||
- bulk_reg, 2);
|
||||
- tmp = get_unaligned_be16(bulk_reg);
|
||||
- boot_voltage = (charger->voltage_k * tmp) + 1000 * charger->voltage_b;
|
||||
-
|
||||
/*
|
||||
* Now we have our full charge capacity and soc, init the columb
|
||||
* counter.
|
||||
diff -rupN linux.orig/include/linux/input-polldev.h linux/include/linux/input-polldev.h
|
||||
--- linux.orig/include/linux/input-polldev.h 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ linux/include/linux/input-polldev.h 2023-05-10 16:31:20.091962635 +0000
|
||||
|
|
|
@ -22,9 +22,10 @@ case ${DEVICE} in
|
|||
PKG_URL="${PKG_SITE}/rk356x-uboot.git"
|
||||
PKG_VERSION="4dbf6b2"
|
||||
;;
|
||||
RK33*)
|
||||
PKG_URL="${PKG_SITE}/rk3326-uboot.git"
|
||||
PKG_VERSION="120aff9560"
|
||||
RK332*)
|
||||
PKG_URL="https://github.com/hardkernel/u-boot.git"
|
||||
PKG_VERSION="0e26e35cb18a80005b7de45c95858c86a2f7f41e"
|
||||
PKG_GIT_CLONE_BRANCH="odroidgoA-v2017.09"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -0,0 +1,115 @@
|
|||
diff -rupN u-boot.orig/Makefile u-boot/Makefile
|
||||
--- u-boot.orig/Makefile 2023-05-11 17:08:32.613932080 +0000
|
||||
+++ u-boot/Makefile 2023-05-11 17:08:01.428935587 +0000
|
||||
@@ -360,6 +360,9 @@ KBUILD_CPPFLAGS := -D__KERNEL__ -D__UBOO
|
||||
KBUILD_CFLAGS := -Wall -Wstrict-prototypes \
|
||||
-Wno-format-security \
|
||||
-fno-builtin -ffreestanding
|
||||
+KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
|
||||
+KBUILD_CFLAGS += $(call cc-disable-warning, dangling-pointer)
|
||||
+KBUILD_CFLAGS += $(call cc-disable-warning, address)
|
||||
KBUILD_CFLAGS += -fshort-wchar -Werror
|
||||
KBUILD_AFLAGS := -D__ASSEMBLY__
|
||||
|
||||
diff -rupN u-boot.orig/arch/arm/dts/Makefile u-boot/arch/arm/dts/Makefile
|
||||
--- u-boot.orig/arch/arm/dts/Makefile 2023-05-11 17:08:32.629932591 +0000
|
||||
+++ u-boot/arch/arm/dts/Makefile 2023-05-11 17:08:01.448936226 +0000
|
||||
@@ -28,11 +28,9 @@ dtb-$(CONFIG_EXYNOS5) += exynos5250-arnd
|
||||
exynos5422-odroidxu3.dtb
|
||||
dtb-$(CONFIG_EXYNOS7420) += exynos7420-espresso7420.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += \
|
||||
- rk3036-sdk.dtb \
|
||||
rk3066a-mk808.dtb \
|
||||
rk3126-evb.dtb \
|
||||
rk3128-evb.dtb \
|
||||
- rk3188-radxarock.dtb \
|
||||
rk3288-evb.dtb \
|
||||
rk3288-fennec.dtb \
|
||||
rk3288-firefly.dtb \
|
||||
@@ -46,11 +44,6 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \
|
||||
rk3288-veyron-minnie.dtb \
|
||||
rk3288-vyasa.dtb \
|
||||
rk3308-evb.dtb \
|
||||
- rk3328-evb.dtb \
|
||||
- rk3368-lion.dtb \
|
||||
- rk3368-sheep.dtb \
|
||||
- rk3368-geekbox.dtb \
|
||||
- rk3368-px5-evb.dtb \
|
||||
rk3399-evb.dtb \
|
||||
rk3399-firefly.dtb \
|
||||
rk3399-puma-ddr1333.dtb \
|
||||
diff -rupN u-boot.orig/board/rockchip/odroidgoa/odroidgoa.c u-boot/board/rockchip/odroidgoa/odroidgoa.c
|
||||
--- u-boot.orig/board/rockchip/odroidgoa/odroidgoa.c 2023-05-11 17:08:32.685934380 +0000
|
||||
+++ u-boot/board/rockchip/odroidgoa/odroidgoa.c 2023-05-11 17:08:01.500937888 +0000
|
||||
@@ -21,6 +21,8 @@
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
+#define RUMBLE_GPIO 15 /* GPIO0_B7 */
|
||||
+
|
||||
#define ALIVE_LED_GPIO 17 /* GPIO0_C1 */
|
||||
#define WIFI_EN_GPIO 110 /* GPIO3_B6 */
|
||||
|
||||
@@ -36,6 +38,14 @@ bool is_odroidgo3(void)
|
||||
return false;
|
||||
}
|
||||
|
||||
+void board_rumble(void)
|
||||
+{
|
||||
+ gpio_request(RUMBLE_GPIO, "rumble");
|
||||
+ gpio_direction_output(RUMBLE_GPIO, 0);
|
||||
+ gpio_free(RUMBLE_GPIO);
|
||||
+}
|
||||
+
|
||||
+
|
||||
void board_alive_led(void)
|
||||
{
|
||||
gpio_request(ALIVE_LED_GPIO, "alive_led");
|
||||
@@ -160,8 +170,9 @@ int rk_board_late_init(void)
|
||||
if (is_odroidgo3())
|
||||
disp_offs = 9;
|
||||
|
||||
+ board_rumble();
|
||||
/* turn on blue led */
|
||||
- board_alive_led();
|
||||
+ //board_alive_led();
|
||||
|
||||
/* set wifi_en as default high */
|
||||
if (!is_odroidgo3())
|
||||
@@ -194,10 +205,10 @@ int rk_board_late_init(void)
|
||||
#endif
|
||||
|
||||
/* show boot logo and version */
|
||||
- lcd_show_logo();
|
||||
- lcd_setfg_color("grey");
|
||||
- lcd_printf(0, 18 + disp_offs, 1, " %s", U_BOOT_VERSION);
|
||||
- lcd_printf(0, 19 + disp_offs, 1, " %s %s", U_BOOT_DATE, U_BOOT_TIME);
|
||||
+ //lcd_show_logo();
|
||||
+ //lcd_setfg_color("red");
|
||||
+ //lcd_printf(0, 18 + disp_offs, 1, " %s", U_BOOT_VERSION);
|
||||
+ //lcd_printf(0, 19 + disp_offs, 1, " %s %s", U_BOOT_DATE, U_BOOT_TIME);
|
||||
|
||||
if (!board_check_autotest()) {
|
||||
board_run_autotest();
|
||||
diff -rupN u-boot.orig/scripts/dtc/dtc-lexer.l u-boot/scripts/dtc/dtc-lexer.l
|
||||
--- u-boot.orig/scripts/dtc/dtc-lexer.l 2023-05-11 17:08:32.809938343 +0000
|
||||
+++ u-boot/scripts/dtc/dtc-lexer.l 2023-05-11 17:08:01.628941978 +0000
|
||||
@@ -38,7 +38,6 @@ LINECOMMENT "//".*\n
|
||||
#include "srcpos.h"
|
||||
#include "dtc-parser.tab.h"
|
||||
|
||||
-YYLTYPE yylloc;
|
||||
extern bool treesource_error;
|
||||
|
||||
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */
|
||||
diff -rupN u-boot.orig/scripts/dtc/dtc-lexer.lex.c_shipped u-boot/scripts/dtc/dtc-lexer.lex.c_shipped
|
||||
--- u-boot.orig/scripts/dtc/dtc-lexer.lex.c_shipped 2023-05-11 17:08:32.809938343 +0000
|
||||
+++ u-boot/scripts/dtc/dtc-lexer.lex.c_shipped 2023-05-11 17:08:01.628941978 +0000
|
||||
@@ -631,7 +631,6 @@ char *yytext;
|
||||
#include "srcpos.h"
|
||||
#include "dtc-parser.tab.h"
|
||||
|
||||
-YYLTYPE yylloc;
|
||||
extern bool treesource_error;
|
||||
|
||||
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */
|
Loading…
Reference in a new issue