xiaomi-elish: bump to kernel 6.7-rc2

This commit is contained in:
amazingfate
2023-11-26 23:25:28 +08:00
committed by Igor
parent 1f1d77cff3
commit 66bc89b3a3
33 changed files with 6055 additions and 27 deletions

View File

@@ -14,8 +14,8 @@ declare -g BOARD_FIRMWARE_INSTALL="-full"
function post_family_config_branch_sm8250__pmos_kernel() {
display_alert "Setting up kernel for" "${BOARD}" "info"
declare -g KERNEL_MAJOR_MINOR="6.6" # Major and minor versions of this kernel.
declare -g KERNELBRANCH='branch:linux-6.6.y'
declare -g KERNEL_MAJOR_MINOR="6.7" # Major and minor versions of this kernel.
declare -g KERNELBRANCH='tag:v6.7-rc2'
}
function xiaomi-elish_is_userspace_supported() {
@@ -37,6 +37,7 @@ function post_family_tweaks_bsp__xiaomi-elish_firmware() {
mkdir -p $destination/usr/local/bin/
mkdir -p $destination/usr/lib/systemd/system/
install -Dm655 $SRC/packages/bsp/xiaomi-elish/setup-usbgadget-network.sh $destination/usr/local/bin/
install -Dm655 $SRC/packages/bsp/xiaomi-elish/remove-usbgadget-network.sh $destination/usr/local/bin/
install -Dm644 $SRC/packages/bsp/xiaomi-elish/usbgadget-rndis.service $destination/usr/lib/systemd/system/
# Kernel postinst script to update abl boot partition

View File

@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 6.6.0 Kernel Configuration
# Linux/arm64 6.7.0-rc2 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="aarch64-linux-gnu-gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
CONFIG_CC_IS_GCC=y
@@ -314,6 +314,7 @@ CONFIG_BUILTIN_RETURN_ADDRESS_STRIPS_PAC=y
# CONFIG_ARCH_NXP is not set
# CONFIG_ARCH_MA35 is not set
# CONFIG_ARCH_NPCM is not set
# CONFIG_ARCH_PENSANDO is not set
CONFIG_ARCH_QCOM=y
# CONFIG_ARCH_REALTEK is not set
# CONFIG_ARCH_RENESAS is not set
@@ -424,6 +425,7 @@ CONFIG_ARCH_SUPPORTS_KEXEC_SIG=y
CONFIG_ARCH_SUPPORTS_KEXEC_IMAGE_VERIFY_SIG=y
CONFIG_ARCH_DEFAULT_KEXEC_IMAGE_VERIFY_SIG=y
CONFIG_ARCH_SUPPORTS_CRASH_DUMP=y
CONFIG_ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION=y
CONFIG_TRANS_TABLE=y
# CONFIG_XEN is not set
CONFIG_ARCH_FORCE_MAX_ORDER=10
@@ -953,6 +955,7 @@ CONFIG_MIGRATION=y
CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION=y
CONFIG_ARCH_ENABLE_THP_MIGRATION=y
CONFIG_CONTIG_ALLOC=y
CONFIG_PCP_BATCH_SCALE_MAX=5
CONFIG_PHYS_ADDR_T_64BIT=y
CONFIG_KSM=y
CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
@@ -1642,6 +1645,7 @@ CONFIG_VGA_ARB=y
CONFIG_VGA_ARB_MAX_GPUS=16
CONFIG_HOTPLUG_PCI=y
CONFIG_HOTPLUG_PCI_ACPI=y
# CONFIG_HOTPLUG_PCI_ACPI_AMPERE_ALTRA is not set
# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
# CONFIG_HOTPLUG_PCI_CPCI is not set
# CONFIG_HOTPLUG_PCI_SHPC is not set
@@ -1766,7 +1770,6 @@ CONFIG_GENERIC_ARCH_NUMA=y
#
# Bus devices
#
# CONFIG_BRCMSTB_GISB_ARB is not set
# CONFIG_MOXTET is not set
CONFIG_QCOM_EBI2=y
# CONFIG_QCOM_SSC_BLOCK_BUS is not set
@@ -1802,6 +1805,7 @@ CONFIG_ARM_SCMI_TRANSPORT_SMC=y
# CONFIG_ARM_SCMI_TRANSPORT_SMC_ATOMIC_ENABLE is not set
# CONFIG_ARM_SCMI_TRANSPORT_VIRTIO is not set
CONFIG_ARM_SCMI_POWER_DOMAIN=y
CONFIG_ARM_SCMI_PERF_DOMAIN=y
# CONFIG_ARM_SCMI_POWER_CONTROL is not set
# end of ARM System Control and Management Interface Protocol
@@ -1812,8 +1816,6 @@ CONFIG_DMIID=y
# CONFIG_DMI_SYSFS is not set
# CONFIG_ISCSI_IBFT is not set
# CONFIG_FW_CFG_SYSFS is not set
CONFIG_QCOM_SCM=y
# CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT is not set
CONFIG_SYSFB=y
CONFIG_SYSFB_SIMPLEFB=y
# CONFIG_ARM_FFA_TRANSPORT is not set
@@ -1845,6 +1847,15 @@ CONFIG_UEFI_CPER=y
CONFIG_UEFI_CPER_ARM=y
CONFIG_ARM_PSCI_FW=y
# CONFIG_ARM_PSCI_CHECKER is not set
#
# Qualcomm firmware drivers
#
CONFIG_QCOM_SCM=y
# CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT is not set
# CONFIG_QCOM_QSEECOM is not set
# end of Qualcomm firmware drivers
CONFIG_HAVE_ARM_SMCCC=y
CONFIG_HAVE_ARM_SMCCC_DISCOVERY=y
CONFIG_ARM_SMCCC_SOC_ID=y
@@ -1867,7 +1878,6 @@ CONFIG_MTD=y
#
# Partition parsers
#
# CONFIG_MTD_AR7_PARTS is not set
# CONFIG_MTD_CMDLINE_PARTS is not set
CONFIG_MTD_OF_PARTS=y
# CONFIG_MTD_AFS_PARTS is not set
@@ -2093,7 +2103,6 @@ CONFIG_PCI_ENDPOINT_TEST=m
#
CONFIG_EEPROM_AT24=m
CONFIG_EEPROM_AT25=m
# CONFIG_EEPROM_LEGACY is not set
# CONFIG_EEPROM_MAX6875 is not set
# CONFIG_EEPROM_93CX6 is not set
# CONFIG_EEPROM_93XX46 is not set
@@ -2396,6 +2405,7 @@ CONFIG_TAP=m
CONFIG_VETH=m
# CONFIG_VIRTIO_NET is not set
# CONFIG_NLMON is not set
# CONFIG_NETKIT is not set
# CONFIG_NET_VRF is not set
# CONFIG_MHI_NET is not set
# CONFIG_ARCNET is not set
@@ -2816,7 +2826,6 @@ CONFIG_INPUT_PWM_VIBRA=m
# CONFIG_INPUT_DRV260X_HAPTICS is not set
# CONFIG_INPUT_DRV2665_HAPTICS is not set
# CONFIG_INPUT_DRV2667_HAPTICS is not set
CONFIG_XIAOMI_KEYBOARD=y
# CONFIG_RMI4_CORE is not set
#
@@ -3292,7 +3301,6 @@ CONFIG_GPIO_MAX77620=y
# CONFIG_W1 is not set
CONFIG_POWER_RESET=y
# CONFIG_POWER_RESET_BRCMSTB is not set
# CONFIG_POWER_RESET_GPIO is not set
# CONFIG_POWER_RESET_GPIO_RESTART is not set
CONFIG_POWER_RESET_MSM=y
@@ -3338,6 +3346,8 @@ CONFIG_BATTERY_BQ27XXX_I2C=y
# CONFIG_CHARGER_DETECTOR_MAX14656 is not set
# CONFIG_CHARGER_MAX77976 is not set
# CONFIG_CHARGER_QCOM_SMBB is not set
# CONFIG_BATTERY_PM8916_BMS_VM is not set
# CONFIG_CHARGER_PM8916_LBC is not set
# CONFIG_CHARGER_BQ2415X is not set
# CONFIG_CHARGER_BQ24190 is not set
# CONFIG_CHARGER_BQ24257 is not set
@@ -3357,6 +3367,7 @@ CONFIG_BATTERY_BQ27XXX_I2C=y
# CONFIG_CHARGER_BD99954 is not set
# CONFIG_BATTERY_UG3105 is not set
# CONFIG_CHARGER_QCOM_SMB2 is not set
# CONFIG_FUEL_GAUGE_MM8013 is not set
CONFIG_HWMON=y
# CONFIG_HWMON_DEBUG_CHIP is not set
@@ -3408,12 +3419,14 @@ CONFIG_SENSORS_ARM_SCPI=y
# CONFIG_SENSORS_IIO_HWMON is not set
# CONFIG_SENSORS_IT87 is not set
# CONFIG_SENSORS_JC42 is not set
# CONFIG_SENSORS_POWERZ is not set
# CONFIG_SENSORS_POWR1220 is not set
# CONFIG_SENSORS_LINEAGE is not set
# CONFIG_SENSORS_LTC2945 is not set
# CONFIG_SENSORS_LTC2947_I2C is not set
# CONFIG_SENSORS_LTC2947_SPI is not set
# CONFIG_SENSORS_LTC2990 is not set
# CONFIG_SENSORS_LTC2991 is not set
# CONFIG_SENSORS_LTC2992 is not set
# CONFIG_SENSORS_LTC4151 is not set
# CONFIG_SENSORS_LTC4215 is not set
@@ -3776,6 +3789,7 @@ CONFIG_REGULATOR_HI6421V530=y
# CONFIG_REGULATOR_LTC3589 is not set
# CONFIG_REGULATOR_LTC3676 is not set
# CONFIG_REGULATOR_MAX1586 is not set
# CONFIG_REGULATOR_MAX77503 is not set
CONFIG_REGULATOR_MAX77620=y
# CONFIG_REGULATOR_MAX77857 is not set
# CONFIG_REGULATOR_MAX8649 is not set
@@ -3951,6 +3965,10 @@ CONFIG_V4L_MEM2MEM_DRIVERS=y
# Microchip Technology, Inc. media platform drivers
#
#
# Nuvoton media platform drivers
#
#
# NVidia media platform drivers
#
@@ -4127,10 +4145,12 @@ CONFIG_DRM_PANEL=y
# CONFIG_DRM_PANEL_ILITEK_IL9322 is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9341 is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9881C is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9882T is not set
# CONFIG_DRM_PANEL_INNOLUX_EJ030NA is not set
# CONFIG_DRM_PANEL_INNOLUX_P079ZCA is not set
# CONFIG_DRM_PANEL_JADARD_JD9365DA_H3 is not set
# CONFIG_DRM_PANEL_JDI_LT070ME05000 is not set
# CONFIG_DRM_PANEL_JDI_LPM102A188A is not set
# CONFIG_DRM_PANEL_JDI_R63452 is not set
# CONFIG_DRM_PANEL_KHADAS_TS050 is not set
# CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04 is not set
@@ -4158,6 +4178,7 @@ CONFIG_DRM_PANEL_NOVATEK_NT36523=y
# CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set
# CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set
# CONFIG_DRM_PANEL_RAYDIUM_RM68200 is not set
# CONFIG_DRM_PANEL_RAYDIUM_RM692E5 is not set
# CONFIG_DRM_PANEL_RONBO_RB070D30 is not set
# CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20 is not set
# CONFIG_DRM_PANEL_SAMSUNG_DB7430 is not set
@@ -4323,6 +4344,7 @@ CONFIG_FB_SYS_IMAGEBLIT=y
# CONFIG_FB_FOREIGN_ENDIAN is not set
CONFIG_FB_SYS_FOPS=y
CONFIG_FB_DEFERRED_IO=y
CONFIG_FB_IOMEM_FOPS=y
CONFIG_FB_IOMEM_HELPERS=y
CONFIG_FB_SYSMEM_HELPERS=y
CONFIG_FB_SYSMEM_HELPERS_DEFERRED=y
@@ -4531,6 +4553,8 @@ CONFIG_SND_SOC_WM_ADSP=m
# CONFIG_SND_SOC_AW8738 is not set
# CONFIG_SND_SOC_AW88395 is not set
# CONFIG_SND_SOC_AW88261 is not set
# CONFIG_SND_SOC_AW87390 is not set
# CONFIG_SND_SOC_AW88399 is not set
# CONFIG_SND_SOC_BD28623 is not set
# CONFIG_SND_SOC_BT_SCO is not set
# CONFIG_SND_SOC_CHV3_CODEC is not set
@@ -4629,6 +4653,7 @@ CONFIG_SND_SOC_HDMI_CODEC=y
# CONFIG_SND_SOC_RT715_SDW is not set
# CONFIG_SND_SOC_RT715_SDCA_SDW is not set
# CONFIG_SND_SOC_RT9120 is not set
# CONFIG_SND_SOC_RTQ9128 is not set
# CONFIG_SND_SOC_SGTL5000 is not set
# CONFIG_SND_SOC_SIMPLE_AMPLIFIER is not set
# CONFIG_SND_SOC_SIMPLE_MUX is not set
@@ -4877,6 +4902,7 @@ CONFIG_USB_CONN_GPIO=m
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB=y
CONFIG_USB_PCI=y
# CONFIG_USB_PCI_AMD is not set
# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
#
@@ -5004,6 +5030,7 @@ CONFIG_USB_CHIPIDEA_UDC=y
CONFIG_USB_CHIPIDEA_HOST=y
CONFIG_USB_CHIPIDEA_PCI=y
CONFIG_USB_CHIPIDEA_MSM=y
CONFIG_USB_CHIPIDEA_NPCM=y
CONFIG_USB_CHIPIDEA_IMX=y
CONFIG_USB_CHIPIDEA_GENERIC=y
CONFIG_USB_CHIPIDEA_TEGRA=y
@@ -5087,6 +5114,7 @@ CONFIG_USB_SERIAL_OPTION=m
# CONFIG_USB_APPLEDISPLAY is not set
# CONFIG_USB_QCOM_EUD is not set
# CONFIG_APPLE_MFI_FASTCHARGE is not set
# CONFIG_USB_LJCA is not set
# CONFIG_USB_SISUSBVGA is not set
# CONFIG_USB_LD is not set
# CONFIG_USB_TRANCEVIBRATOR is not set
@@ -5220,6 +5248,7 @@ CONFIG_TYPEC_HD3SS3220=m
# CONFIG_TYPEC_MUX_GPIO_SBU is not set
# CONFIG_TYPEC_MUX_PI3USB30532 is not set
# CONFIG_TYPEC_MUX_NB7VPQ904M is not set
# CONFIG_TYPEC_MUX_PTN36502 is not set
# end of USB Type-C Multiplexer/DeMultiplexer Switch support
#
@@ -5313,6 +5342,7 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=y
# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
CONFIG_LEDS_TRIGGER_CPU=y
# CONFIG_LEDS_TRIGGER_ACTIVITY is not set
# CONFIG_LEDS_TRIGGER_GPIO is not set
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
#
@@ -5532,7 +5562,6 @@ CONFIG_VIRTIO=y
# CONFIG_COMEDI is not set
CONFIG_STAGING=y
# CONFIG_PRISM2_USB is not set
# CONFIG_RTL8192U is not set
# CONFIG_RTLLIB is not set
# CONFIG_R8712U is not set
# CONFIG_RTS5208 is not set
@@ -5574,12 +5603,6 @@ CONFIG_STAGING=y
#
# CONFIG_AD5933 is not set
# end of Network Analyzer, Impedance Converters
#
# Resolver to digital converters
#
# CONFIG_AD2S1210 is not set
# end of Resolver to digital converters
# end of IIO staging drivers
# CONFIG_FB_SM750 is not set
@@ -5701,7 +5724,9 @@ CONFIG_QCOM_CLK_RPMH=y
# CONFIG_SM_CAMCC_6350 is not set
# CONFIG_SM_CAMCC_8250 is not set
# CONFIG_SM_CAMCC_8450 is not set
# CONFIG_SM_CAMCC_8550 is not set
CONFIG_SM_DISPCC_8250=y
# CONFIG_SM_GCC_4450 is not set
# CONFIG_SM_GCC_6115 is not set
# CONFIG_SM_GCC_6125 is not set
# CONFIG_SM_GCC_6350 is not set
@@ -5842,7 +5867,6 @@ CONFIG_SOUNDWIRE_QCOM=y
#
# Broadcom SoC drivers
#
# CONFIG_SOC_BRCMSTB is not set
# end of Broadcom SoC drivers
#
@@ -5876,7 +5900,6 @@ CONFIG_FSL_RCPM=y
#
CONFIG_QCOM_AOSS_QMP=y
CONFIG_QCOM_COMMAND_DB=y
CONFIG_QCOM_CPR=y
CONFIG_QCOM_GENI_SE=y
# CONFIG_QCOM_GSBI is not set
CONFIG_QCOM_LLCC=y
@@ -5890,8 +5913,6 @@ CONFIG_QCOM_QMI_HELPERS=y
CONFIG_QCOM_RMTFS_MEM=m
# CONFIG_QCOM_RPM_MASTER_STATS is not set
CONFIG_QCOM_RPMH=y
CONFIG_QCOM_RPMHPD=y
CONFIG_QCOM_RPMPD=y
CONFIG_QCOM_SMEM=y
CONFIG_QCOM_SMD_RPM=y
CONFIG_QCOM_SMEM_STATE=y
@@ -5913,6 +5934,34 @@ CONFIG_QCOM_APR=y
# end of Xilinx SoC drivers
# end of SOC (System On Chip) specific Drivers
#
# PM Domains
#
#
# Amlogic PM Domains
#
# end of Amlogic PM Domains
#
# Broadcom PM Domains
#
# end of Broadcom PM Domains
#
# i.MX PM Domains
#
# end of i.MX PM Domains
#
# Qualcomm PM Domains
#
CONFIG_QCOM_CPR=y
CONFIG_QCOM_RPMHPD=y
CONFIG_QCOM_RPMPD=y
# end of Qualcomm PM Domains
# end of PM Domains
CONFIG_PM_DEVFREQ=y
#
@@ -6039,6 +6088,7 @@ CONFIG_IIO_CONSUMERS_PER_TRIGGER=2
# CONFIG_HI8435 is not set
# CONFIG_HX711 is not set
# CONFIG_INA2XX_ADC is not set
# CONFIG_LTC2309 is not set
# CONFIG_LTC2471 is not set
# CONFIG_LTC2485 is not set
# CONFIG_LTC2496 is not set
@@ -6053,6 +6103,7 @@ CONFIG_IIO_CONSUMERS_PER_TRIGGER=2
CONFIG_MAX9611=m
# CONFIG_MCP320X is not set
# CONFIG_MCP3422 is not set
# CONFIG_MCP3564 is not set
# CONFIG_MCP3911 is not set
# CONFIG_NAU7802 is not set
CONFIG_QCOM_VADC_COMMON=m
@@ -6425,6 +6476,7 @@ CONFIG_IIO_ST_MAGN_SPI_3AXIS=m
# Pressure sensors
#
# CONFIG_ABP060MG is not set
# CONFIG_ROHM_BM1390 is not set
# CONFIG_BMP280 is not set
# CONFIG_DLHL60D is not set
# CONFIG_DPS310 is not set
@@ -6472,6 +6524,7 @@ CONFIG_MPL3115=m
#
# CONFIG_AD2S90 is not set
# CONFIG_AD2S1200 is not set
# CONFIG_AD2S1210 is not set
# end of Resolver to digital converters
#
@@ -6699,6 +6752,7 @@ CONFIG_INTERCONNECT_QCOM_RPMH=y
# CONFIG_INTERCONNECT_QCOM_SDM845 is not set
# CONFIG_INTERCONNECT_QCOM_SDX55 is not set
# CONFIG_INTERCONNECT_QCOM_SDX65 is not set
# CONFIG_INTERCONNECT_QCOM_SDX75 is not set
# CONFIG_INTERCONNECT_QCOM_SM6350 is not set
# CONFIG_INTERCONNECT_QCOM_SM8150 is not set
CONFIG_INTERCONNECT_QCOM_SM8250=y
@@ -6739,7 +6793,6 @@ CONFIG_FS_MBCACHE=y
# CONFIG_OCFS2_FS is not set
CONFIG_BTRFS_FS=y
# CONFIG_BTRFS_FS_POSIX_ACL is not set
# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set
# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set
# CONFIG_BTRFS_DEBUG is not set
# CONFIG_BTRFS_ASSERT is not set
@@ -6755,6 +6808,7 @@ CONFIG_F2FS_FS_POSIX_ACL=y
# CONFIG_F2FS_FS_COMPRESSION is not set
CONFIG_F2FS_IOSTAT=y
# CONFIG_F2FS_UNFAIR_RWSEM is not set
# CONFIG_BCACHEFS_FS is not set
CONFIG_FS_POSIX_ACL=y
CONFIG_EXPORTFS=y
# CONFIG_EXPORTFS_BLOCK_OPS is not set
@@ -7115,7 +7169,7 @@ CONFIG_CRYPTO_CBC=m
# CONFIG_CRYPTO_CFB is not set
CONFIG_CRYPTO_CTR=m
# CONFIG_CRYPTO_CTS is not set
CONFIG_CRYPTO_ECB=m
CONFIG_CRYPTO_ECB=y
# CONFIG_CRYPTO_HCTR2 is not set
# CONFIG_CRYPTO_KEYWRAP is not set
# CONFIG_CRYPTO_LRW is not set
@@ -7192,7 +7246,9 @@ CONFIG_CRYPTO_DRBG_HMAC=y
# CONFIG_CRYPTO_DRBG_CTR is not set
CONFIG_CRYPTO_DRBG=y
CONFIG_CRYPTO_JITTERENTROPY=y
# CONFIG_CRYPTO_JITTERENTROPY_TESTINTERFACE is not set
CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKS=64
CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE=32
CONFIG_CRYPTO_JITTERENTROPY_OSR=1
CONFIG_CRYPTO_KDF800108_CTR=y
# end of Random number generation
@@ -7254,7 +7310,7 @@ CONFIG_CRYPTO_HW=y
# CONFIG_CRYPTO_DEV_QAT_C62XVF is not set
# CONFIG_CRYPTO_DEV_CAVIUM_ZIP is not set
# CONFIG_CRYPTO_DEV_QCE is not set
CONFIG_CRYPTO_DEV_QCOM_RNG=y
CONFIG_CRYPTO_DEV_QCOM_RNG=m
# CONFIG_CRYPTO_DEV_VIRTIO is not set
# CONFIG_CRYPTO_DEV_SAFEXCEL is not set
CONFIG_CRYPTO_DEV_CCREE=m
@@ -7363,7 +7419,6 @@ CONFIG_ZSTD_DECOMPRESS=y
CONFIG_XZ_DEC=y
CONFIG_XZ_DEC_X86=y
CONFIG_XZ_DEC_POWERPC=y
CONFIG_XZ_DEC_IA64=y
CONFIG_XZ_DEC_ARM=y
CONFIG_XZ_DEC_ARMTHUMB=y
CONFIG_XZ_DEC_SPARC=y
@@ -7442,10 +7497,12 @@ CONFIG_SG_POOL=y
CONFIG_ARCH_STACKWALK=y
CONFIG_STACKDEPOT=y
CONFIG_SBITMAP=y
# CONFIG_LWQ_TEST is not set
# end of Library routines
CONFIG_GENERIC_IOREMAP=y
CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
CONFIG_FIRMWARE_TABLE=y
#
# Kernel hacking

View File

@@ -0,0 +1,83 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Date: Sun, 14 Mar 2021 04:52:34 +0300
Subject: drm/msm/dpu1: improve support for active CTLs
- Support setting master interface if several INTFs are to be handled by
a single CTL
- Support setting handling several MERGE_3D instances using a single
CTL.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 15 ++++++++++
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h | 2 ++
2 files changed, 17 insertions(+)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
index 86182c734..4ecffbcdb 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
@@ -510,6 +510,7 @@ static void dpu_hw_ctl_intf_cfg_v1(struct dpu_hw_ctl *ctx,
u32 intf_active = 0;
u32 wb_active = 0;
u32 mode_sel = 0;
+ u32 merge_3d_active = 0;
/* CTL_TOP[31:28] carries group_id to collate CTL paths
* per VM. Explicitly disable it until VM support is
@@ -530,16 +531,30 @@ static void dpu_hw_ctl_intf_cfg_v1(struct dpu_hw_ctl *ctx,
if (cfg->wb)
wb_active |= BIT(cfg->wb - WB_0);
+ merge_3d_active = DPU_REG_READ(c, CTL_MERGE_3D_ACTIVE);
+ if (cfg->merge_3d)
+ merge_3d_active |= BIT(cfg->merge_3d - MERGE_3D_0);
+
DPU_REG_WRITE(c, CTL_TOP, mode_sel);
DPU_REG_WRITE(c, CTL_INTF_ACTIVE, intf_active);
DPU_REG_WRITE(c, CTL_WB_ACTIVE, wb_active);
+ if (cfg->intf_master)
+ DPU_REG_WRITE(c, CTL_INTF_MASTER, BIT(cfg->intf_master - INTF_0));
+
if (cfg->merge_3d)
DPU_REG_WRITE(c, CTL_MERGE_3D_ACTIVE,
BIT(cfg->merge_3d - MERGE_3D_0));
if (cfg->dsc)
DPU_REG_WRITE(c, CTL_DSC_ACTIVE, cfg->dsc);
+ if (cfg->merge_3d)
+ DPU_REG_WRITE(c, CTL_MERGE_3D_ACTIVE, merge_3d_active);
+
+ if (cfg->intf_master)
+ DPU_DEBUG_DRIVER("ACTIVE: %x %x %lx\n", intf_active, merge_3d_active, BIT(cfg->intf_master - INTF_0));
+ else
+ DPU_DEBUG_DRIVER("ACTIVE: %x %x\n", intf_active, merge_3d_active);
}
static void dpu_hw_ctl_intf_cfg(struct dpu_hw_ctl *ctx,
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h
index 1c242298f..36dd4e91a 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h
@@ -36,6 +36,7 @@ struct dpu_hw_stage_cfg {
/**
* struct dpu_hw_intf_cfg :Describes how the DPU writes data to output interface
* @intf : Interface id
+ * @intf_master: Master interface id in the dual pipe topology
* @mode_3d: 3d mux configuration
* @merge_3d: 3d merge block used
* @intf_mode_sel: Interface mode, cmd / vid
@@ -44,6 +45,7 @@ struct dpu_hw_stage_cfg {
*/
struct dpu_hw_intf_cfg {
enum dpu_intf intf;
+ enum dpu_intf intf_master;
enum dpu_wb wb;
enum dpu_3d_blend_mode mode_3d;
enum dpu_merge_3d merge_3d;
--
Armbian

View File

@@ -0,0 +1,136 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Date: Sun, 14 Mar 2021 04:58:32 +0300
Subject: drm/msm/dpu1: use one active CTL if it is available
Unlike previous generation, with newer ("active") CTLs it is possible to
use just one CTL to handle both interfaces. And one has to use single
CTL to support master/slave DSI config. So use one active CTL if it is
available.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h | 1 +
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h | 1 +
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 8 ++++--
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 1 +
drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 14 +++++++---
drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h | 1 +
6 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h
index 9392ad2b4..35b3856f9 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h
@@ -15,6 +15,7 @@ static const struct dpu_caps sm8150_dpu_caps = {
.has_dim_layer = true,
.has_idle_pc = true,
.has_3d_merge = true,
+ .has_active_ctls = true,
.max_linewidth = 4096,
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
.max_hdeci_exp = MAX_HORZ_DECIMATION,
diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h
index 94278a3e3..be95a27c4 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h
@@ -15,6 +15,7 @@ static const struct dpu_caps sm8250_dpu_caps = {
.has_dim_layer = true,
.has_idle_pc = true,
.has_3d_merge = true,
+ .has_active_ctls = true,
.max_linewidth = 4096,
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
};
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
index 1cf7ff6ca..98f46cc98 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
@@ -1117,14 +1117,18 @@ static void dpu_encoder_virt_atomic_mode_set(struct drm_encoder *drm_enc,
return;
}
- if (!hw_ctl[i]) {
+ /* Use first (and only) CTL if active CTLs are supported */
+ if (dpu_kms->catalog->caps->has_active_ctls)
+ phys->hw_ctl = to_dpu_hw_ctl(hw_ctl[0]);
+ else
+ phys->hw_ctl = to_dpu_hw_ctl(hw_ctl[i]);
+ if (!phys->hw_ctl) {
DPU_ERROR_ENC(dpu_enc,
"no ctl block assigned at idx: %d\n", i);
return;
}
phys->hw_pp = dpu_enc->hw_pp[i];
- phys->hw_ctl = to_dpu_hw_ctl(hw_ctl[i]);
phys->cached_mode = crtc_state->adjusted_mode;
if (phys->ops.atomic_mode_set)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
index df024e10d..4e9533c7e 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
@@ -359,6 +359,7 @@ struct dpu_caps {
bool has_dim_layer;
bool has_idle_pc;
bool has_3d_merge;
+ bool has_active_ctls;
/* SSPP limits */
u32 max_linewidth;
u32 pixel_ram_size;
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
index 8759466e2..ba55b4381 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
@@ -196,6 +196,7 @@ int dpu_rm_init(struct dpu_rm *rm,
}
rm->ctl_blks[ctl->id - CTL_0] = &hw->base;
}
+ rm->has_active_ctls = cat->caps->has_active_ctls;
for (i = 0; i < cat->dspp_count; i++) {
struct dpu_hw_dspp *hw;
@@ -418,10 +419,15 @@ static int _dpu_rm_reserve_ctls(
int i = 0, j, num_ctls;
bool needs_split_display;
- /* each hw_intf needs its own hw_ctrl to program its control path */
- num_ctls = top->num_intf;
+ if (rm->has_active_ctls) {
+ num_ctls = 1;
+ needs_split_display = false;
+ } else {
+ /* each hw_intf needs its own hw_ctrl to program its control path */
+ num_ctls = top->num_intf;
- needs_split_display = _dpu_rm_needs_split_display(top);
+ needs_split_display = _dpu_rm_needs_split_display(top);
+ }
for (j = 0; j < ARRAY_SIZE(rm->ctl_blks); j++) {
const struct dpu_hw_ctl *ctl;
@@ -439,7 +445,7 @@ static int _dpu_rm_reserve_ctls(
DPU_DEBUG("ctl %d caps 0x%lX\n", j + CTL_0, features);
- if (needs_split_display != has_split_display)
+ if (!rm->has_active_ctls && needs_split_display != has_split_display)
continue;
ctl_idx[i] = j;
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h
index 2b551566c..6e4777f57 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h
@@ -33,6 +33,7 @@ struct dpu_rm {
struct dpu_hw_blk *merge_3d_blks[MERGE_3D_MAX - MERGE_3D_0];
struct dpu_hw_blk *dsc_blks[DSC_MAX - DSC_0];
struct dpu_hw_sspp *hw_sspp[SSPP_MAX - SSPP_NONE];
+ bool has_active_ctls;
};
/**
--
Armbian

View File

@@ -0,0 +1,53 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Date: Sun, 14 Mar 2021 05:03:35 +0300
Subject: drm/msm/dpu1: dpu_encoder_phys_*: proper suppor for active CTLs
Adapt dpu_encoder_phys_* to properly support active CTLs and their
features.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 2 ++
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 5 ++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
index be185fe69..4eb2cc1e2 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
@@ -57,6 +57,8 @@ static void _dpu_encoder_phys_cmd_update_intf_cfg(
return;
intf_cfg.intf = phys_enc->hw_intf->idx;
+ if (phys_enc->split_role == ENC_ROLE_MASTER)
+ intf_cfg.intf_master = phys_enc->hw_intf->idx;
intf_cfg.intf_mode_sel = DPU_CTL_MODE_SEL_CMD;
intf_cfg.stream_sel = cmd_enc->stream_sel;
intf_cfg.mode_3d = dpu_encoder_helper_get_3d_blend_mode(phys_enc);
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c
index a01fda711..1293b0ea3 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c
@@ -271,6 +271,8 @@ static void dpu_encoder_phys_vid_setup_timing_engine(
DPU_DEBUG_VIDENC(phys_enc, "fmt_fourcc 0x%X\n", fmt_fourcc);
intf_cfg.intf = phys_enc->hw_intf->idx;
+ if (phys_enc->split_role == ENC_ROLE_MASTER)
+ intf_cfg.intf_master = phys_enc->hw_intf->idx;
intf_cfg.intf_mode_sel = DPU_CTL_MODE_SEL_VID;
intf_cfg.stream_sel = 0; /* Don't care value for video mode */
intf_cfg.mode_3d = dpu_encoder_helper_get_3d_blend_mode(phys_enc);
@@ -344,7 +346,8 @@ static void dpu_encoder_phys_vid_underrun_irq(void *arg)
static bool dpu_encoder_phys_vid_needs_single_flush(
struct dpu_encoder_phys *phys_enc)
{
- return phys_enc->split_role != ENC_ROLE_SOLO;
+ return !(phys_enc->hw_ctl->caps->features & BIT(DPU_CTL_ACTIVE_CFG)) &&
+ phys_enc->split_role != ENC_ROLE_SOLO;
}
static void dpu_encoder_phys_vid_atomic_mode_set(
--
Armbian

View File

@@ -0,0 +1,108 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Date: Sun, 20 Dec 2020 18:47:57 +0300
Subject: dt-bindings: mfd: qcom,qca639x: add binding for QCA639x defvice
Qualcomm QCA639x is a family of WiFi + Bluetooth SoCs, with BT part
being controlled through the UART and WiFi being present on PCIe bus.
Both blocks share common power sources. Add binding to describe power
sequencing required to power up this device.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
Documentation/devicetree/bindings/mfd/qcom,qca639x.yaml | 84 ++++++++++
1 file changed, 84 insertions(+)
diff --git a/Documentation/devicetree/bindings/mfd/qcom,qca639x.yaml b/Documentation/devicetree/bindings/mfd/qcom,qca639x.yaml
new file mode 100644
index 000000000..d43c75da1
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/qcom,qca639x.yaml
@@ -0,0 +1,84 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/mfd/qcom,qca639x.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Qualcomm QCA639x WiFi + Bluetoot SoC bindings
+
+maintainers:
+ - Andy Gross <agross@kernel.org>
+ - Bjorn Andersson <bjorn.andersson@linaro.org>
+
+description: |
+ This binding describes thes Qualcomm QCA6390 or QCA6391 power supplies and
+ enablement pins.
+
+properties:
+ compatible:
+ const: qcom,qca639x
+
+ '#power-domain-cells':
+ const: 0
+
+ pinctrl-0: true
+ pinctrl-1: true
+
+ pinctrl-names:
+ items:
+ - const: default
+ - const: active
+
+ vddaon-supply:
+ description:
+ 0.95V always-on LDO power input
+
+ vddpmu-supply:
+ description:
+ 0.95V LDO power input to PMU
+
+ vddrfa1-supply:
+ description:
+ 0.95V LDO power input to RFA
+
+ vddrfa2-supply:
+ description:
+ 1.25V LDO power input to RFA
+
+ vddrfa3-supply:
+ description:
+ 2V LDO power input to RFA
+
+ vddpcie1-supply:
+ description:
+ 1.25V LDO power input to PCIe part
+
+ vddpcie2-supply:
+ description:
+ 2V LDO power input to PCIe part
+
+ vddio-supply:
+ description:
+ 1.8V VIO input
+
+additionalProperties: false
+
+examples:
+ - |
+ qca639x: qca639x {
+ compatible = "qcom,qca639x";
+ #power-domain-cells = <0>;
+
+ vddaon-supply = <&vreg_s6a_0p95>;
+ vddpmu-supply = <&vreg_s2f_0p95>;
+ vddrfa1-supply = <&vreg_s2f_0p95>;
+ vddrfa2-supply = <&vreg_s8c_1p3>;
+ vddrfa3-supply = <&vreg_s5a_1p9>;
+ vddpcie1-supply = <&vreg_s8c_1p3>;
+ vddpcie2-supply = <&vreg_s5a_1p9>;
+ vddio-supply = <&vreg_s4a_1p8>;
+ pinctrl-names = "default", "active";
+ pinctrl-0 = <&wlan_default_state &bt_default_state>;
+ pinctrl-1 = <&wlan_active_state &bt_active_state>;
+ };
+...
--
Armbian

View File

@@ -0,0 +1,223 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Date: Fri, 18 Dec 2020 16:24:56 +0300
Subject: mfd: qca639x: add support for QCA639x powerup sequence
Qualcomm QCA639x is a family of WiFi + Bluetooth SoCs, with BT part
being controlled through the UART and WiFi being present on PCIe
bus. Both blocks share common power sources. So add mfd device driver
handling power sequencing of QCA6390/1.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/mfd/Kconfig | 12 +
drivers/mfd/Makefile | 1 +
drivers/mfd/qcom-qca639x.c | 162 ++++++++++
3 files changed, 175 insertions(+)
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 90ce58fd6..2dd393ff2 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -1123,6 +1123,18 @@ config MFD_PM8XXX
Say M here if you want to include support for PM8xxx chips as a
module. This will build a module called "pm8xxx-core".
+config MFD_QCOM_QCA639X
+ tristate "Qualcomm QCA639x WiFi/Bluetooth module support"
+ depends on REGULATOR && PM_GENERIC_DOMAINS
+ help
+ If you say yes to this option, support will be included for Qualcomm
+ QCA639x family of WiFi and Bluetooth SoCs. Note, this driver supports
+ only power control for this SoC, you still have to enable individual
+ Bluetooth and WiFi drivers.
+
+ Say M here if you want to include support for QCA639x chips as a
+ module. This will build a module called "qcom-qca639x".
+
config MFD_QCOM_RPM
tristate "Qualcomm Resource Power Manager (RPM)"
depends on ARCH_QCOM && OF
diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
index c66f07edc..3e1b32dd0 100644
--- a/drivers/mfd/Makefile
+++ b/drivers/mfd/Makefile
@@ -204,6 +204,7 @@ obj-$(CONFIG_MFD_SI476X_CORE) += si476x-core.o
obj-$(CONFIG_MFD_CS5535) += cs5535-mfd.o
obj-$(CONFIG_MFD_OMAP_USB_HOST) += omap-usb-host.o omap-usb-tll.o
obj-$(CONFIG_MFD_PM8XXX) += qcom-pm8xxx.o ssbi.o
+obj-$(CONFIG_MFD_QCOM_QCA639X) += qcom-qca639x.o
obj-$(CONFIG_MFD_QCOM_RPM) += qcom_rpm.o
obj-$(CONFIG_MFD_SPMI_PMIC) += qcom-spmi-pmic.o
obj-$(CONFIG_TPS65911_COMPARATOR) += tps65911-comparator.o
diff --git a/drivers/mfd/qcom-qca639x.c b/drivers/mfd/qcom-qca639x.c
new file mode 100644
index 000000000..b31e4b65b
--- /dev/null
+++ b/drivers/mfd/qcom-qca639x.c
@@ -0,0 +1,162 @@
+#include <linux/delay.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/pinctrl/consumer.h>
+#include <linux/pinctrl/devinfo.h>
+#include <linux/platform_device.h>
+#include <linux/pm_domain.h>
+#include <linux/regulator/consumer.h>
+#include <linux/slab.h>
+
+#define MAX_NUM_REGULATORS 8
+
+static struct vreg {
+ const char *name;
+ unsigned int load_uA;
+} vregs [MAX_NUM_REGULATORS] = {
+ /* 2.0 V */
+ { "vddpcie2", 15000 },
+ { "vddrfa3", 400000 },
+
+ /* 0.95 V */
+ { "vddaon", 100000 },
+ { "vddpmu", 1250000 },
+ { "vddrfa1", 200000 },
+
+ /* 1.35 V */
+ { "vddrfa2", 400000 },
+ { "vddpcie1", 35000 },
+
+ /* 1.8 V */
+ { "vddio", 20000 },
+};
+
+struct qca639x_data {
+ struct regulator_bulk_data regulators[MAX_NUM_REGULATORS];
+ size_t num_vregs;
+ struct device *dev;
+ struct pinctrl_state *active_state;
+ struct generic_pm_domain pd;
+};
+
+#define domain_to_data(domain) container_of(domain, struct qca639x_data, pd)
+
+static int qca639x_power_on(struct generic_pm_domain *domain)
+{
+ struct qca639x_data *data = domain_to_data(domain);
+ int ret;
+
+ dev_warn(&domain->dev, "DUMMY POWER ON\n");
+
+ ret = regulator_bulk_enable(data->num_vregs, data->regulators);
+ if (ret) {
+ dev_err(data->dev, "Failed to enable regulators");
+ return ret;
+ }
+
+ /* Wait for 1ms before toggling enable pins. */
+ msleep(1);
+
+ ret = pinctrl_select_state(data->dev->pins->p, data->active_state);
+ if (ret) {
+ dev_err(data->dev, "Failed to select active state");
+ return ret;
+ }
+
+ /* Wait for all power levels to stabilize */
+ msleep(6);
+
+ return 0;
+}
+
+static int qca639x_power_off(struct generic_pm_domain *domain)
+{
+ struct qca639x_data *data = domain_to_data(domain);
+
+ dev_warn(&domain->dev, "DUMMY POWER OFF\n");
+
+ pinctrl_select_default_state(data->dev);
+ regulator_bulk_disable(data->num_vregs, data->regulators);
+
+ return 0;
+}
+
+static int qca639x_probe(struct platform_device *pdev)
+{
+ struct qca639x_data *data;
+ struct device *dev = &pdev->dev;
+ int i, ret;
+
+ if (!dev->pins || IS_ERR_OR_NULL(dev->pins->default_state))
+ return -EINVAL;
+
+ data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
+ if (!data)
+ return -ENOMEM;
+
+ data->dev = dev;
+ data->num_vregs = ARRAY_SIZE(vregs);
+
+ data->active_state = pinctrl_lookup_state(dev->pins->p, "active");
+ if (IS_ERR(data->active_state)) {
+ ret = PTR_ERR(data->active_state);
+ dev_err(dev, "Failed to get active_state: %d\n", ret);
+ return ret;
+ }
+
+ for (i = 0; i < data->num_vregs; i++)
+ data->regulators[i].supply = vregs[i].name;
+ ret = devm_regulator_bulk_get(dev, data->num_vregs, data->regulators);
+ if (ret < 0)
+ return ret;
+
+ for (i = 0; i < data->num_vregs; i++) {
+ ret = regulator_set_load(data->regulators[i].consumer, vregs[i].load_uA);
+ if (ret)
+ return ret;
+ }
+
+ data->pd.name = dev_name(dev);
+ data->pd.power_on = qca639x_power_on;
+ data->pd.power_off = qca639x_power_off;
+
+ ret = pm_genpd_init(&data->pd, NULL, true);
+ if (ret < 0)
+ return ret;
+
+ ret = of_genpd_add_provider_simple(dev->of_node, &data->pd);
+ if (ret < 0) {
+ pm_genpd_remove(&data->pd);
+ return ret;
+ }
+
+ platform_set_drvdata(pdev, data);
+
+ return 0;
+}
+
+static int qca639x_remove(struct platform_device *pdev)
+{
+ struct qca639x_data *data = platform_get_drvdata(pdev);
+
+ pm_genpd_remove(&data->pd);
+
+ return 0;
+}
+
+static const struct of_device_id qca639x_of_match[] = {
+ { .compatible = "qcom,qca639x" },
+};
+
+static struct platform_driver qca639x_driver = {
+ .probe = qca639x_probe,
+ .remove = qca639x_remove,
+ .driver = {
+ .name = "qca639x",
+ .of_match_table = qca639x_of_match,
+ },
+};
+
+module_platform_driver(qca639x_driver);
+MODULE_LICENSE("GPL v2");
--
Armbian

View File

@@ -0,0 +1,188 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Date: Sat, 26 Feb 2022 21:13:18 +0300
Subject: mfd: qcom-qca639x: switch to platform config data
Change qcom-qca639x to use platform config data, in preparation to
supporting other devices.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/mfd/qcom-qca639x.c | 74 ++++++----
1 file changed, 46 insertions(+), 28 deletions(-)
diff --git a/drivers/mfd/qcom-qca639x.c b/drivers/mfd/qcom-qca639x.c
index b31e4b65b..22792561d 100644
--- a/drivers/mfd/qcom-qca639x.c
+++ b/drivers/mfd/qcom-qca639x.c
@@ -1,4 +1,5 @@
#include <linux/delay.h>
+#include <linux/gpio/consumer.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
@@ -6,15 +7,21 @@
#include <linux/pinctrl/devinfo.h>
#include <linux/platform_device.h>
#include <linux/pm_domain.h>
+#include <linux/property.h>
#include <linux/regulator/consumer.h>
#include <linux/slab.h>
-#define MAX_NUM_REGULATORS 8
-
-static struct vreg {
+struct vreg {
const char *name;
unsigned int load_uA;
-} vregs [MAX_NUM_REGULATORS] = {
+};
+
+struct qca_cfg_data {
+ const struct vreg *vregs;
+ size_t num_vregs;
+};
+
+static const struct vreg qca6390_vregs[] = {
/* 2.0 V */
{ "vddpcie2", 15000 },
{ "vddrfa3", 400000 },
@@ -32,19 +39,24 @@ static struct vreg {
{ "vddio", 20000 },
};
-struct qca639x_data {
- struct regulator_bulk_data regulators[MAX_NUM_REGULATORS];
+static const struct qca_cfg_data qca6390_cfg_data = {
+ .vregs = qca6390_vregs,
+ .num_vregs = ARRAY_SIZE(qca6390_vregs),
+};
+
+struct qca_data {
size_t num_vregs;
struct device *dev;
struct pinctrl_state *active_state;
struct generic_pm_domain pd;
+ struct regulator_bulk_data regulators[];
};
-#define domain_to_data(domain) container_of(domain, struct qca639x_data, pd)
+#define domain_to_data(domain) container_of(domain, struct qca_data, pd)
-static int qca639x_power_on(struct generic_pm_domain *domain)
+static int qca_power_on(struct generic_pm_domain *domain)
{
- struct qca639x_data *data = domain_to_data(domain);
+ struct qca_data *data = domain_to_data(domain);
int ret;
dev_warn(&domain->dev, "DUMMY POWER ON\n");
@@ -70,9 +82,9 @@ static int qca639x_power_on(struct generic_pm_domain *domain)
return 0;
}
-static int qca639x_power_off(struct generic_pm_domain *domain)
+static int qca_power_off(struct generic_pm_domain *domain)
{
- struct qca639x_data *data = domain_to_data(domain);
+ struct qca_data *data = domain_to_data(domain);
dev_warn(&domain->dev, "DUMMY POWER OFF\n");
@@ -82,21 +94,26 @@ static int qca639x_power_off(struct generic_pm_domain *domain)
return 0;
}
-static int qca639x_probe(struct platform_device *pdev)
+static int qca_probe(struct platform_device *pdev)
{
- struct qca639x_data *data;
+ const struct qca_cfg_data *cfg;
+ struct qca_data *data;
struct device *dev = &pdev->dev;
int i, ret;
+ cfg = device_get_match_data(&pdev->dev);
+ if (!cfg)
+ return -EINVAL;
+
if (!dev->pins || IS_ERR_OR_NULL(dev->pins->default_state))
return -EINVAL;
- data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
+ data = devm_kzalloc(dev, struct_size(data, regulators, cfg->num_vregs), GFP_KERNEL);
if (!data)
return -ENOMEM;
data->dev = dev;
- data->num_vregs = ARRAY_SIZE(vregs);
+ data->num_vregs = cfg->num_vregs;
data->active_state = pinctrl_lookup_state(dev->pins->p, "active");
if (IS_ERR(data->active_state)) {
@@ -106,20 +123,20 @@ static int qca639x_probe(struct platform_device *pdev)
}
for (i = 0; i < data->num_vregs; i++)
- data->regulators[i].supply = vregs[i].name;
+ data->regulators[i].supply = cfg->vregs[i].name;
ret = devm_regulator_bulk_get(dev, data->num_vregs, data->regulators);
if (ret < 0)
return ret;
for (i = 0; i < data->num_vregs; i++) {
- ret = regulator_set_load(data->regulators[i].consumer, vregs[i].load_uA);
+ ret = regulator_set_load(data->regulators[i].consumer, cfg->vregs[i].load_uA);
if (ret)
return ret;
}
data->pd.name = dev_name(dev);
- data->pd.power_on = qca639x_power_on;
- data->pd.power_off = qca639x_power_off;
+ data->pd.power_on = qca_power_on;
+ data->pd.power_off = qca_power_off;
ret = pm_genpd_init(&data->pd, NULL, true);
if (ret < 0)
@@ -136,27 +153,28 @@ static int qca639x_probe(struct platform_device *pdev)
return 0;
}
-static int qca639x_remove(struct platform_device *pdev)
+static int qca_remove(struct platform_device *pdev)
{
- struct qca639x_data *data = platform_get_drvdata(pdev);
+ struct qca_data *data = platform_get_drvdata(pdev);
pm_genpd_remove(&data->pd);
return 0;
}
-static const struct of_device_id qca639x_of_match[] = {
- { .compatible = "qcom,qca639x" },
+static const struct of_device_id qca_of_match[] = {
+ { .compatible = "qcom,qca6390", .data = &qca6390_cfg_data },
+ { },
};
-static struct platform_driver qca639x_driver = {
- .probe = qca639x_probe,
- .remove = qca639x_remove,
+static struct platform_driver qca_driver = {
+ .probe = qca_probe,
+ .remove = qca_remove,
.driver = {
.name = "qca639x",
- .of_match_table = qca639x_of_match,
+ .of_match_table = qca_of_match,
},
};
-module_platform_driver(qca639x_driver);
+module_platform_driver(qca_driver);
MODULE_LICENSE("GPL v2");
--
Armbian

View File

@@ -0,0 +1,88 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Date: Sat, 26 Feb 2022 21:17:22 +0300
Subject: mfd: qcom-qca639x: change qca639x to use gpios rather than pinctrl
Use gpio interface instead of pinctrl interface to toggle enable pins.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/mfd/qcom-qca639x.c | 33 ++++++----
1 file changed, 19 insertions(+), 14 deletions(-)
diff --git a/drivers/mfd/qcom-qca639x.c b/drivers/mfd/qcom-qca639x.c
index 22792561d..4de860e9b 100644
--- a/drivers/mfd/qcom-qca639x.c
+++ b/drivers/mfd/qcom-qca639x.c
@@ -47,8 +47,9 @@ static const struct qca_cfg_data qca6390_cfg_data = {
struct qca_data {
size_t num_vregs;
struct device *dev;
- struct pinctrl_state *active_state;
struct generic_pm_domain pd;
+ struct gpio_desc *wlan_en_gpio;
+ struct gpio_desc *bt_en_gpio;
struct regulator_bulk_data regulators[];
};
@@ -70,11 +71,10 @@ static int qca_power_on(struct generic_pm_domain *domain)
/* Wait for 1ms before toggling enable pins. */
msleep(1);
- ret = pinctrl_select_state(data->dev->pins->p, data->active_state);
- if (ret) {
- dev_err(data->dev, "Failed to select active state");
- return ret;
- }
+ if (data->wlan_en_gpio)
+ gpiod_set_value(data->wlan_en_gpio, 1);
+ if (data->bt_en_gpio)
+ gpiod_set_value(data->bt_en_gpio, 1);
/* Wait for all power levels to stabilize */
msleep(6);
@@ -88,7 +88,11 @@ static int qca_power_off(struct generic_pm_domain *domain)
dev_warn(&domain->dev, "DUMMY POWER OFF\n");
- pinctrl_select_default_state(data->dev);
+ if (data->wlan_en_gpio)
+ gpiod_set_value(data->wlan_en_gpio, 0);
+ if (data->bt_en_gpio)
+ gpiod_set_value(data->bt_en_gpio, 0);
+
regulator_bulk_disable(data->num_vregs, data->regulators);
return 0;
@@ -115,13 +119,6 @@ static int qca_probe(struct platform_device *pdev)
data->dev = dev;
data->num_vregs = cfg->num_vregs;
- data->active_state = pinctrl_lookup_state(dev->pins->p, "active");
- if (IS_ERR(data->active_state)) {
- ret = PTR_ERR(data->active_state);
- dev_err(dev, "Failed to get active_state: %d\n", ret);
- return ret;
- }
-
for (i = 0; i < data->num_vregs; i++)
data->regulators[i].supply = cfg->vregs[i].name;
ret = devm_regulator_bulk_get(dev, data->num_vregs, data->regulators);
@@ -134,6 +131,14 @@ static int qca_probe(struct platform_device *pdev)
return ret;
}
+ data->wlan_en_gpio = devm_gpiod_get_optional(&pdev->dev, "wlan-en", GPIOD_OUT_LOW);
+ if (IS_ERR(data->wlan_en_gpio))
+ return PTR_ERR(data->wlan_en_gpio);
+
+ data->bt_en_gpio = devm_gpiod_get_optional(&pdev->dev, "bt-en", GPIOD_OUT_LOW);
+ if (IS_ERR(data->bt_en_gpio))
+ return PTR_ERR(data->bt_en_gpio);
+
data->pd.name = dev_name(dev);
data->pd.power_on = qca_power_on;
data->pd.power_off = qca_power_off;
--
Armbian

View File

@@ -0,0 +1,29 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Date: Sat, 26 Feb 2022 23:07:54 +0300
Subject: Bluetooth: hci_qca: reopen serial port after toggling power
Reopen the serial port after toggling the power. This saves us from
getting command timeouts on first command submitted.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/bluetooth/hci_qca.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 067e248e3..2d77e6272 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1797,6 +1797,8 @@ static int qca_power_on(struct hci_dev *hdev)
gpiod_set_value_cansleep(qcadev->bt_en, 1);
/* Controller needs time to bootup. */
msleep(150);
+ serdev_device_close(hu->serdev);
+ ret = serdev_device_open(hu->serdev);
}
}
--
Armbian

View File

@@ -0,0 +1,135 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jianhua Lu <lujianhua000@gmail.com>
Date: Thu, 4 Aug 2022 13:26:53 +0800
Subject: drm: Add drm notifier support
---
drivers/gpu/drm/Makefile | 3 +-
drivers/gpu/drm/drm_notifier.c | 57 ++++++++++
include/drm/drm_notifier.h | 37 ++++++
3 files changed, 96 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
index 8e1bde059..3095874a2 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
@@ -45,7 +45,8 @@ drm-y := \
drm_vblank.o \
drm_vblank_work.o \
drm_vma_manager.o \
- drm_writeback.o
+ drm_writeback.o \
+ drm_notifier.o
drm-$(CONFIG_DRM_LEGACY) += \
drm_agpsupport.o \
drm_bufs.o \
diff --git a/drivers/gpu/drm/drm_notifier.c b/drivers/gpu/drm/drm_notifier.c
new file mode 100644
index 000000000..792069640
--- /dev/null
+++ b/drivers/gpu/drm/drm_notifier.c
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ * Copyright (C) 2021 XiaoMi, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program 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.
+ *
+ */
+
+#include <linux/notifier.h>
+
+static BLOCKING_NOTIFIER_HEAD(mi_drm_notifier_list);
+
+/**
+ * mi_drm_register_client - register a client notifier
+ * @nb: notifier block to callback on events
+ *
+ * This function registers a notifier callback function
+ * to msm_drm_notifier_list, which would be called when
+ * received unblank/power down event.
+ */
+int mi_drm_register_client(struct notifier_block *nb)
+{
+ return blocking_notifier_chain_register(&mi_drm_notifier_list, nb);
+}
+EXPORT_SYMBOL(mi_drm_register_client);
+
+/**
+ * mi_drm_unregister_client - unregister a client notifier
+ * @nb: notifier block to callback on events
+ *
+ * This function unregisters the callback function from
+ * msm_drm_notifier_list.
+ */
+int mi_drm_unregister_client(struct notifier_block *nb)
+{
+ return blocking_notifier_chain_unregister(&mi_drm_notifier_list, nb);
+}
+EXPORT_SYMBOL(mi_drm_unregister_client);
+
+/**
+ * mi_drm_notifier_call_chain - notify clients of drm_events
+ * @val: event MSM_DRM_EARLY_EVENT_BLANK or MSM_DRM_EVENT_BLANK
+ * @v: notifier data, inculde display id and display blank
+ * event(unblank or power down).
+ */
+int mi_drm_notifier_call_chain(unsigned long val, void *v)
+{
+ return blocking_notifier_call_chain(&mi_drm_notifier_list, val, v);
+}
+EXPORT_SYMBOL(mi_drm_notifier_call_chain);
\ No newline at end of file
diff --git a/include/drm/drm_notifier.h b/include/drm/drm_notifier.h
new file mode 100644
index 000000000..fd0e97655
--- /dev/null
+++ b/include/drm/drm_notifier.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ * Copyright (C) 2021 XiaoMi, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program 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.
+ *
+ */
+
+#ifndef _DRM_NOTIFIER_H_
+#define _DRM_NOTIFIER_H_
+
+#include <linux/notifier.h>
+
+/* A hardware display blank change occurred */
+#define MI_DRM_EVENT_BLANK 0x01
+/* A hardware display blank early change occurred */
+#define MI_DRM_EARLY_EVENT_BLANK 0x02
+
+enum drm_notifier_data {
+ /* panel: power on */
+ MI_DRM_BLANK_UNBLANK,
+ /* panel: power down */
+ MI_DRM_BLANK_POWERDOWN,
+};
+
+int mi_drm_register_client(struct notifier_block *nb);
+int mi_drm_unregister_client(struct notifier_block *nb);
+int mi_drm_notifier_call_chain(unsigned long val, void *v);
+
+#endif /* _DRM_NOTIFIER_H */
--
Armbian

View File

@@ -0,0 +1,59 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jianhua Lu <lujianhua000@gmail.com>
Date: Mon, 17 Oct 2022 08:02:58 +0800
Subject: drm: dsi: emit panel turn on/off signal to touchscreen
---
drivers/gpu/drm/msm/dsi/dsi_manager.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index 896f369fd..50d788138 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -7,6 +7,7 @@
#include "msm_kms.h"
#include "dsi.h"
+#include "drm/drm_notifier.h"
#define DSI_CLOCK_MASTER DSI_0
#define DSI_CLOCK_SLAVE DSI_1
@@ -303,6 +304,7 @@ static void dsi_mgr_bridge_pre_enable(struct drm_bridge *bridge)
struct mipi_dsi_host *host = msm_dsi->host;
bool is_bonded_dsi = IS_BONDED_DSI();
int ret;
+ enum drm_notifier_data notifier_data;
DBG("id=%d", id);
if (!msm_dsi_device_connected(msm_dsi))
@@ -318,6 +320,9 @@ static void dsi_mgr_bridge_pre_enable(struct drm_bridge *bridge)
return;
}
+ notifier_data = MI_DRM_BLANK_UNBLANK;
+ mi_drm_notifier_call_chain(MI_DRM_EVENT_BLANK, &notifier_data);
+
ret = msm_dsi_host_enable(host);
if (ret) {
pr_err("%s: enable host %d failed, %d\n", __func__, id, ret);
@@ -361,12 +366,16 @@ static void dsi_mgr_bridge_post_disable(struct drm_bridge *bridge)
struct mipi_dsi_host *host = msm_dsi->host;
bool is_bonded_dsi = IS_BONDED_DSI();
int ret;
+ enum drm_notifier_data notifier_data;
DBG("id=%d", id);
if (!msm_dsi_device_connected(msm_dsi))
return;
+ notifier_data = MI_DRM_BLANK_POWERDOWN;
+ mi_drm_notifier_call_chain(MI_DRM_EARLY_EVENT_BLANK, &notifier_data);
+
/*
* Do nothing with the host if it is slave-DSI in case of bonded DSI.
* It is safe to call dsi_mgr_phy_disable() here because a single PHY
--
Armbian

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,106 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jianhua Lu <lujianhua000@gmail.com>
Date: Mon, 6 Mar 2023 23:13:06 +0800
Subject: arm64: dts: qcom: sm8250-xiaomi-elish: enable wifi and bluetooth
Signed-off-by: Jianhua Lu <lujianhua000@gmail.com>
---
arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi | 61 ++++++++++
1 file changed, 61 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
index 85e5cf3dc..d7ec6bdd1 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
@@ -29,6 +29,10 @@ / {
qcom,msm-id = <QCOM_ID_SM8250 0x20001>; /* SM8250 v2.1 */
qcom,board-id = <0x10008 0>;
+ aliases {
+ hsuart0 = &uart6;
+ };
+
chosen {
#address-cells = <2>;
#size-cells = <2>;
@@ -113,6 +117,25 @@ vreg_s6c_0p88: smpc6-regulator {
vin-supply = <&vph_pwr>;
};
+ qca639x: qca639x {
+ compatible = "qcom,qca6390";
+ #power-domain-cells = <0>;
+
+ vddaon-supply = <&vreg_s6a_0p95>;
+ vddpmu-supply = <&vreg_s6a_0p95>;
+ vddrfa1-supply = <&vreg_s6a_0p95>;
+ vddrfa2-supply = <&vreg_s8c_1p35>;
+ vddrfa3-supply = <&vreg_s5a_1p9>;
+ vddpcie1-supply = <&vreg_s8c_1p35>;
+ vddpcie2-supply = <&vreg_s5a_1p9>;
+ vddio-supply = <&vreg_s4a_1p8>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&wlan_en_state>;
+
+ wlan-en-gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>;
+ };
+
reserved-memory {
xbl_aop_mem: xbl-aop@80700000 {
reg = <0x0 0x80600000 0x0 0x260000>;
@@ -615,6 +638,9 @@ &pcie0_phy {
vdda-phy-supply = <&vreg_l5a_0p88>;
vdda-pll-supply = <&vreg_l9a_1p2>;
status = "okay";
+
+ /* Power on QCA639x chip, otherwise PCIe bus timeouts */
+ power-domains = <&qca639x>;
};
&pm8150_gpios {
@@ -655,6 +681,41 @@ &slpi {
&tlmm {
gpio-reserved-ranges = <40 4>;
+
+ bt_en_state: bt-default-state {
+ bt-en-pins {
+ pins = "gpio21";
+ function = "gpio";
+
+ drive-strength = <16>;
+ output-low;
+ bias-pull-up;
+ };
+ };
+
+ wlan_en_state: wlan-default-state {
+ wlan-en-pins {
+ pins = "gpio20";
+ function = "gpio";
+
+ drive-strength = <16>;
+ output-low;
+ bias-pull-up;
+ };
+ };
+};
+
+&uart6 {
+ status = "okay";
+
+ bluetooth {
+ compatible = "qcom,qca6390-bt";
+ pinctrl-names = "default";
+ pinctrl-0 = <&bt_en_state>;
+
+ power-domains = <&qca639x>;
+ enable-gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>;
+ };
};
&usb_1 {
--
Armbian

View File

@@ -0,0 +1,91 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jianhua Lu <lujianhua000@gmail.com>
Date: Mon, 6 Mar 2023 23:23:13 +0800
Subject: arm64: dts: qcom: sm8250-xiaomi-elish: enable touchscreen
Signed-off-by: Jianhua Lu <lujianhua000@gmail.com>
---
arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-boe.dts | 5 ++
arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi | 32 ++++++++++
arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-csot.dts | 5 ++
3 files changed, 42 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-boe.dts b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-boe.dts
index de6101dde..b8d9e9406 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-boe.dts
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-boe.dts
@@ -16,3 +16,8 @@ &display_panel {
compatible = "xiaomi,elish-boe-nt36523", "novatek,nt36523";
status = "okay";
};
+
+&touchscreen {
+ firmware-name = "novatek/nt36523-boe.bin";
+ status = "okay";
+};
diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
index d7ec6bdd1..b0fe139f8 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
@@ -662,6 +662,16 @@ &pon_resin {
status = "okay";
};
+&qup_spi4_cs_gpio {
+ drive-strength = <6>;
+ bias-disable;
+};
+
+&qup_spi4_data_clk {
+ drive-strength = <6>;
+ bias-disable;
+};
+
&qupv3_id_0 {
status = "okay";
};
@@ -679,6 +689,28 @@ &slpi {
status = "okay";
};
+&spi4 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&qup_spi4_data_clk &qup_spi4_cs_gpio>;
+ cs-gpios = <&tlmm 11 GPIO_ACTIVE_LOW>;
+ touchscreen: touchscreen@0 {
+ compatible = "novatek,NVT-ts-spi";
+ reg = <0>; //Same as CS ID
+ status = "disabled";
+
+ spi-max-frequency = <19200000>; //4800000,9600000,15000000,19200000
+ novatek,irq-gpio = <&tlmm 39 0x2001>;
+
+ novatek,pen-support;
+ novatek,wgp-stylus;
+
+ /* 523 */
+ novatek,swrst-n8-addr = <0x03F0FE>;
+ novatek,spi-rd-fast-addr = <0x03F310>;
+ };
+};
+
&tlmm {
gpio-reserved-ranges = <40 4>;
diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-csot.dts b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-csot.dts
index 4cffe9c70..5953f652e 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-csot.dts
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-csot.dts
@@ -16,3 +16,8 @@ &display_panel {
compatible = "xiaomi,elish-csot-nt36523", "novatek,nt36523";
status = "okay";
};
+
+&touchscreen {
+ firmware-name = "novatek/nt36523-csot.bin";
+ status = "okay";
+};
--
Armbian

View File

@@ -0,0 +1,25 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jianhua Lu <lujianhua000@gmail.com>
Date: Wed, 29 Mar 2023 01:57:43 +0800
Subject: arm64: dts: qcom: sm8250-xiaomi-elish: Disable slpi
---
arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
index b0fe139f8..2da3820dd 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
@@ -686,7 +686,7 @@ &qupv3_id_2 {
&slpi {
firmware-name = "qcom/sm8250/xiaomi/elish/slpi.mbn";
- status = "okay";
+ status = "disabled";
};
&spi4 {
--
Armbian

View File

@@ -0,0 +1,147 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jianhua Lu <lujianhua000@gmail.com>
Date: Fri, 17 Feb 2023 21:31:38 +0800
Subject: sound: soc: qcom: sm8250: Add tdm support
---
sound/soc/qcom/sdw.c | 65 ++++++++++
sound/soc/qcom/sm8250.c | 17 +++
2 files changed, 82 insertions(+)
diff --git a/sound/soc/qcom/sdw.c b/sound/soc/qcom/sdw.c
index dd275123d..f9370432c 100644
--- a/sound/soc/qcom/sdw.c
+++ b/sound/soc/qcom/sdw.c
@@ -5,8 +5,11 @@
#include <dt-bindings/sound/qcom,q6afe.h>
#include <linux/module.h>
#include <sound/soc.h>
+#include <sound/pcm_params.h>
#include "sdw.h"
+static unsigned int tdm_slot_offset[8] = {0, 4, 8, 12, 16, 20, 24, 28};
+
int qcom_snd_sdw_prepare(struct snd_pcm_substream *substream,
struct sdw_stream_runtime *sruntime,
bool *stream_prepared)
@@ -58,6 +61,64 @@ int qcom_snd_sdw_prepare(struct snd_pcm_substream *substream,
}
EXPORT_SYMBOL_GPL(qcom_snd_sdw_prepare);
+static int qcom_tdm_snd_hw_params(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params)
+{
+ struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
+ struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
+
+ int ret = 0;
+ int channels, slot_width;
+
+ switch (params_format(params)) {
+ case SNDRV_PCM_FORMAT_S16_LE:
+ slot_width = 32;
+ break;
+ default:
+ dev_err(rtd->dev, "%s: invalid param format 0x%x\n",
+ __func__, params_format(params));
+ return -EINVAL;
+ }
+
+ channels = params_channels(params);
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ ret = snd_soc_dai_set_tdm_slot(cpu_dai, 0, 0x03,
+ 8, slot_width);
+ if (ret < 0) {
+ dev_err(rtd->dev, "%s: failed to set tdm slot, err:%d\n",
+ __func__, ret);
+ goto end;
+ }
+
+ ret = snd_soc_dai_set_channel_map(cpu_dai, 0, NULL,
+ channels, tdm_slot_offset);
+ if (ret < 0) {
+ dev_err(rtd->dev, "%s: failed to set channel map, err:%d\n",
+ __func__, ret);
+ goto end;
+ }
+ } else {
+ ret = snd_soc_dai_set_tdm_slot(cpu_dai, 0xf, 0,
+ 8, slot_width);
+ if (ret < 0) {
+ dev_err(rtd->dev, "%s: failed to set tdm slot, err:%d\n",
+ __func__, ret);
+ goto end;
+ }
+
+ ret = snd_soc_dai_set_channel_map(cpu_dai, channels,
+ tdm_slot_offset, 0, NULL);
+ if (ret < 0) {
+ dev_err(rtd->dev, "%s: failed to set channel map, err:%d\n",
+ __func__, ret);
+ goto end;
+ }
+ }
+
+end:
+ return ret;
+}
+
int qcom_snd_sdw_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct sdw_stream_runtime **psruntime)
@@ -82,6 +143,10 @@ int qcom_snd_sdw_hw_params(struct snd_pcm_substream *substream,
*psruntime = sruntime;
}
break;
+ case TERTIARY_TDM_RX_0:
+ case TERTIARY_TDM_TX_0:
+ qcom_tdm_snd_hw_params(substream, params);
+ break;
}
return 0;
diff --git a/sound/soc/qcom/sm8250.c b/sound/soc/qcom/sm8250.c
index 9cc869fd7..200794057 100644
--- a/sound/soc/qcom/sm8250.c
+++ b/sound/soc/qcom/sm8250.c
@@ -16,6 +16,7 @@
#define DRIVER_NAME "sm8250"
#define MI2S_BCLK_RATE 1536000
+#define TDM_BCLK_RATE 12288000
struct sm8250_snd_data {
bool stream_prepared[AFE_PORT_MAX];
@@ -53,6 +54,7 @@ static int sm8250_snd_startup(struct snd_pcm_substream *substream)
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
+ int ret,j;
switch (cpu_dai->id) {
case TERTIARY_MI2S_RX:
@@ -63,6 +65,21 @@ static int sm8250_snd_startup(struct snd_pcm_substream *substream)
snd_soc_dai_set_fmt(cpu_dai, fmt);
snd_soc_dai_set_fmt(codec_dai, codec_dai_fmt);
break;
+ case TERTIARY_TDM_RX_0:
+ codec_dai_fmt |= SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_DSP_A;
+ snd_soc_dai_set_sysclk(cpu_dai,
+ Q6AFE_LPASS_CLK_ID_TER_TDM_IBIT,
+ TDM_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK);
+
+ for_each_rtd_codec_dais(rtd, j, codec_dai) {
+ ret = snd_soc_dai_set_fmt(codec_dai, codec_dai_fmt);
+ snd_soc_dai_set_sysclk(codec_dai, 0, TDM_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK);
+ if (ret < 0) {
+ dev_err(rtd->dev, "TDM fmt err:%d\n", ret);
+ return ret;
+ }
+ }
+ break;
default:
break;
}
--
Armbian

View File

@@ -0,0 +1,281 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jianhua Lu <lujianhua000@gmail.com>
Date: Sat, 18 Mar 2023 22:26:22 +0800
Subject: arm64: dts: qcom: sm8250-xiaomi-elish: Add sound support
---
arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi | 232 ++++++++++
1 file changed, 232 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
index 2da3820dd..45775428c 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
@@ -6,6 +6,8 @@
#include <dt-bindings/arm/qcom,ids.h>
#include <dt-bindings/phy/phy.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include <dt-bindings/sound/qcom,q6afe.h>
+#include <dt-bindings/sound/qcom,q6asm.h>
#include "sm8250.dtsi"
#include "pm8150.dtsi"
#include "pm8150b.dtsi"
@@ -529,6 +531,152 @@ fuel-gauge@55 {
};
};
+&i2c1 {
+ clock-frequency = <400000>;
+ status = "okay";
+
+ cs35l41_brh: speaker-amp@40 {
+ compatible = "cirrus,cs35l41";
+ reg = <0x40>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
+ reset-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>;
+ cirrus,boost-type = <0>;
+ cirrus,boost-peak-milliamp = <4000>;
+ cirrus,boost-ind-nanohenry = <1000>;
+ cirrus,boost-cap-microfarad = <15>;
+ cirrus,asp-sdout-hiz = <3>;
+ cirrus,gpio2-src-select = <4>;
+ cirrus,gpio2-output-enable;
+ sound-name-prefix = "BRH";
+ #sound-dai-cells = <1>;
+ };
+
+ cs35l41_blh: speaker-amp@41 {
+ compatible = "cirrus,cs35l41";
+ reg = <0x41>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <67 IRQ_TYPE_LEVEL_LOW>;
+ reset-gpios = <&tlmm 62 GPIO_ACTIVE_HIGH>;
+ cirrus,boost-type = <0>;
+ cirrus,boost-peak-milliamp = <4000>;
+ cirrus,boost-ind-nanohenry = <1000>;
+ cirrus,boost-cap-microfarad = <15>;
+ cirrus,asp-sdout-hiz = <3>;
+ cirrus,gpio2-src-select = <4>;
+ cirrus,gpio2-output-enable;
+ sound-name-prefix = "BLH";
+ #sound-dai-cells = <1>;
+ };
+
+ cs35l41_brl: speaker-amp@42 {
+ compatible = "cirrus,cs35l41";
+ reg = <0x42>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <100 IRQ_TYPE_LEVEL_LOW>;
+ reset-gpios = <&tlmm 69 GPIO_ACTIVE_HIGH>;
+ cirrus,boost-type = <0>;
+ cirrus,boost-peak-milliamp = <4000>;
+ cirrus,boost-ind-nanohenry = <1000>;
+ cirrus,boost-cap-microfarad = <15>;
+ cirrus,asp-sdout-hiz = <3>;
+ cirrus,gpio2-src-select = <4>;
+ cirrus,gpio2-output-enable;
+ sound-name-prefix = "BRL";
+ #sound-dai-cells = <1>;
+ };
+
+ cs35l41_bll: speaker-amp@43 {
+ compatible = "cirrus,cs35l41";
+ reg = <0x43>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <126 IRQ_TYPE_LEVEL_LOW>;
+ reset-gpios = <&tlmm 49 GPIO_ACTIVE_HIGH>;
+ cirrus,boost-type = <0>;
+ cirrus,boost-peak-milliamp = <4000>;
+ cirrus,boost-ind-nanohenry = <1000>;
+ cirrus,boost-cap-microfarad = <15>;
+ cirrus,asp-sdout-hiz = <3>;
+ cirrus,gpio2-src-select = <4>;
+ cirrus,gpio2-output-enable;
+ sound-name-prefix = "BLL";
+ #sound-dai-cells = <1>;
+ };
+};
+
+&i2c3 {
+ clock-frequency = <400000>;
+ status = "okay";
+
+ cs35l41_trh: speaker-amp@40 {
+ compatible = "cirrus,cs35l41";
+ reg = <0x40>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
+ reset-gpios = <&tlmm 50 GPIO_ACTIVE_HIGH>;
+ cirrus,boost-type = <0>;
+ cirrus,boost-peak-milliamp = <4000>;
+ cirrus,boost-ind-nanohenry = <1000>;
+ cirrus,boost-cap-microfarad = <15>;
+ cirrus,asp-sdout-hiz = <3>;
+ cirrus,gpio2-src-select = <4>;
+ cirrus,gpio2-output-enable;
+ sound-name-prefix = "TRH";
+ #sound-dai-cells = <1>;
+ };
+
+ cs35l41_tlh: speaker-amp@41 {
+ compatible = "cirrus,cs35l41";
+ reg = <0x41>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <92 IRQ_TYPE_LEVEL_LOW>;
+ reset-gpios = <&tlmm 78 GPIO_ACTIVE_HIGH>;
+ cirrus,boost-type = <0>;
+ cirrus,boost-peak-milliamp = <4000>;
+ cirrus,boost-ind-nanohenry = <1000>;
+ cirrus,boost-cap-microfarad = <15>;
+ cirrus,asp-sdout-hiz = <3>;
+ cirrus,gpio2-src-select = <4>;
+ cirrus,gpio2-output-enable;
+ sound-name-prefix = "TLH";
+ #sound-dai-cells = <1>;
+ };
+
+ cs35l41_tll: speaker-amp@42 {
+ compatible = "cirrus,cs35l41";
+ reg = <0x42>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <112 IRQ_TYPE_LEVEL_LOW>;
+ reset-gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
+ cirrus,boost-type = <0>;
+ cirrus,boost-peak-milliamp = <4000>;
+ cirrus,boost-ind-nanohenry = <1000>;
+ cirrus,boost-cap-microfarad = <15>;
+ cirrus,asp-sdout-hiz = <3>;
+ cirrus,gpio2-src-select = <4>;
+ cirrus,gpio2-output-enable;
+ sound-name-prefix = "TLL";
+ #sound-dai-cells = <1>;
+ };
+
+ cs35l41_trl: speaker-amp@43 {
+ compatible = "cirrus,cs35l41";
+ reg = <0x43>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <129 IRQ_TYPE_LEVEL_LOW>;
+ reset-gpios = <&tlmm 144 GPIO_ACTIVE_HIGH>;
+ cirrus,boost-type = <0>;
+ cirrus,boost-peak-milliamp = <4000>;
+ cirrus,boost-ind-nanohenry = <1000>;
+ cirrus,boost-cap-microfarad = <15>;
+ cirrus,asp-sdout-hiz = <3>;
+ cirrus,gpio2-src-select = <4>;
+ cirrus,gpio2-output-enable;
+ sound-name-prefix = "TRL";
+ #sound-dai-cells = <1>;
+ };
+};
+
&i2c11 {
clock-frequency = <400000>;
status = "okay";
@@ -684,11 +832,63 @@ &qupv3_id_2 {
status = "okay";
};
+&q6afedai {
+ dai@56 {
+ reg = <TERTIARY_TDM_RX_0>;
+ qcom,tdm-sync-mode = <0>;
+ qcom,tdm-sync-src = <1>;
+ qcom,tdm-data-out = <0>;
+ qcom,tdm-invert-sync = <1>;
+ qcom,tdm-data-delay = <1>;
+ qcom,tdm-data-align = <0>;
+ };
+};
+
+&q6asmdai {
+ dai@0 {
+ reg = <0>;
+ };
+};
+
&slpi {
firmware-name = "qcom/sm8250/xiaomi/elish/slpi.mbn";
status = "disabled";
};
+&sound {
+ compatible = "qcom,sm8250-sndcard";
+ model = "Xiaomi Mi Pad 5 Pro";
+ pinctrl-names = "default";
+ pinctrl-0 = <&tert_tdm_active>;
+
+ mm1-dai-link {
+ link-name = "MultiMedia1";
+
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
+ };
+ };
+
+ speaker-dai-link {
+ link-name = "Tertiary TDM Playback";
+
+ cpu {
+ sound-dai = <&q6afedai TERTIARY_TDM_RX_0>;
+ };
+
+ platform {
+ sound-dai = <&q6routing>;
+ };
+
+ codec {
+ sound-dai = <&cs35l41_tlh 0>, <&cs35l41_tll 0>,
+ <&cs35l41_trh 0>, <&cs35l41_trl 0>,
+ <&cs35l41_blh 0>, <&cs35l41_bll 0>,
+ <&cs35l41_brh 0>, <&cs35l41_brl 0>;
+ };
+ };
+};
+
&spi4 {
status = "okay";
pinctrl-names = "default";
@@ -735,6 +935,38 @@ wlan-en-pins {
bias-pull-up;
};
};
+
+ tert_tdm_active: tert-tdm-active-state {
+ sck-pins {
+ pins = "gpio133";
+ function = "mi2s2_sck";
+ drive-strength = <8>;
+ bias-disable;
+ output-high;
+ };
+
+ din-pins {
+ pins = "gpio134";
+ function = "mi2s2_data0";
+ drive-strength = <8>;
+ bias-disable;
+ };
+
+ ws-pins {
+ pins = "gpio135";
+ function = "mi2s2_ws";
+ drive-strength = <8>;
+ bias-disable;
+ output-high;
+ };
+
+ dout-pins {
+ pins = "gpio137";
+ function = "mi2s2_data1";
+ drive-strength = <8>;
+ bias-disable;
+ };
+ };
};
&uart6 {
--
Armbian

View File

@@ -0,0 +1,44 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jianhua Lu <lujianhua000@gmail.com>
Date: Wed, 29 Mar 2023 19:38:33 +0800
Subject: Asoc: wm_adsp: Add prefix support
---
sound/soc/codecs/wm_adsp.c | 14 ++++++++++
1 file changed, 14 insertions(+)
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 236b12b69..06770554e 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -750,6 +750,10 @@ static int wm_adsp_request_firmware_file(struct wm_adsp *dsp,
*filename = kasprintf(GFP_KERNEL, "%s%s-%s-%s-%s.%s", dir, dsp->part,
dsp->fwf_name, wm_adsp_fw[dsp->fw].file, system_name,
filetype);
+ else if (asoc_component_prefix)
+ *filename = kasprintf(GFP_KERNEL, "%s%s-%s-%s-%s.%s", dir, dsp->part,
+ dsp->fwf_name, wm_adsp_fw[dsp->fw].file, asoc_component_prefix,
+ filetype);
else
*filename = kasprintf(GFP_KERNEL, "%s%s-%s-%s.%s", dir, dsp->part, dsp->fwf_name,
wm_adsp_fw[dsp->fw].file, filetype);
@@ -821,6 +825,16 @@ static int wm_adsp_request_firmware_files(struct wm_adsp *dsp,
NULL, "bin");
return 0;
}
+ } else if (asoc_component_prefix) {
+ if (!wm_adsp_request_firmware_file(dsp, wmfw_firmware, wmfw_filename,
+ cirrus_dir, NULL,
+ NULL, "wmfw")) {
+ adsp_dbg(dsp, "Found '%s'\n", *wmfw_filename);
+ wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename,
+ cirrus_dir, NULL,
+ asoc_component_prefix, "bin");
+ return 0;
+ }
}
if (!wm_adsp_request_firmware_file(dsp, wmfw_firmware, wmfw_filename,
--
Armbian

View File

@@ -0,0 +1,100 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Xin Xu <xxsemail@qq.com>
Date: Tue, 22 Aug 2023 00:04:45 +0800
Subject: arm64: dts: qcom: sm8250-xiaomi-elish: Add xiaomi-keyboard support
---
arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi | 56 ++++++++++
1 file changed, 56 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
index 45775428c..a8a684b2d 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
@@ -178,6 +178,14 @@ ramoops@b0000000 {
no-map;
};
};
+
+ extcon_usb: extcon-usb {
+ compatible = "linux,extcon-usb-gpio";
+ id-gpio = <&tlmm 91 GPIO_ACTIVE_HIGH>;
+ vbus-gpio = <&pm8150_gpios 10 GPIO_ACTIVE_HIGH>;
+ pinctrl-0 = <&keyboard_active &usb_2_vbus_det_n>;
+ pinctrl-names = "default";
+ };
};
&adsp {
@@ -792,6 +800,14 @@ &pcie0_phy {
};
&pm8150_gpios {
+ usb_2_vbus_det_n: usb-2-vbus-det-state {
+ pins = "gpio10";
+ function = "normal";
+ power-source = <1>;
+ input-enable;
+ bias-pull-down;
+ };
+
vol_up_n: vol-up-n-state {
pins = "gpio6";
function = "normal";
@@ -967,6 +983,23 @@ dout-pins {
bias-disable;
};
};
+
+ keyboard_active: keyboard-active-state {
+ active-pins {
+ pins = "gpio155";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-pull-up;
+ };
+
+ vdd-pins {
+ pins = "gpio127";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-disable;
+ output-high;
+ };
+ };
};
&uart6 {
@@ -1003,6 +1036,29 @@ &usb_1_hsphy {
status = "okay";
};
+&usb_2 {
+ status = "okay";
+};
+
+&usb_2_dwc3 {
+ dr_mode = "host";
+ maximum-speed = "super-speed";
+ extcon = <&extcon_usb>;
+};
+
+&usb_2_hsphy {
+ vdda-pll-supply = <&vreg_l5a_0p88>;
+ vdda18-supply = <&vreg_l12a_1p8>;
+ vdda33-supply = <&vreg_l2a_3p1>;
+ status = "okay";
+};
+
+&usb_2_qmpphy {
+ vdda-phy-supply = <&vreg_l9a_1p2>;
+ vdda-pll-supply = <&vreg_l18a_0p9>;
+ status = "okay";
+};
+
&ufs_mem_hc {
vcc-supply = <&vreg_l17a_3p0>;
vcc-max-microamp = <800000>;
--
Armbian

View File

@@ -0,0 +1,24 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: amazingfate <liujianfeng1994@gmail.com>
Date: Mon, 16 Oct 2023 13:28:48 +0800
Subject: drm/panel: nt36523: Fix for kernel 6.5
---
drivers/gpu/drm/panel/panel-novatek-nt36523.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36523.c b/drivers/gpu/drm/panel/panel-novatek-nt36523.c
index 9b9a7eb1b..aa006edb2 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt36523.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt36523.c
@@ -1262,6 +1262,7 @@ static int nt36523_probe(struct mipi_dsi_device *dsi)
pinfo->dsi[0] = dsi;
mipi_dsi_set_drvdata(dsi, pinfo);
+ pinfo->panel.prepare_prev_first = true;
drm_panel_init(&pinfo->panel, dev, &nt36523_panel_funcs, DRM_MODE_CONNECTOR_DSI);
ret = of_drm_get_panel_orientation(dev->of_node, &pinfo->orientation);
--
Armbian

View File

@@ -0,0 +1,24 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: amazingfate <liujianfeng1994@gmail.com>
Date: Mon, 16 Oct 2023 13:32:19 +0800
Subject: drivers/spmi/spmi-pmic-arb.c: remove warnings
---
drivers/spmi/spmi-pmic-arb.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c
index dcb675d98..2688ac2a7 100644
--- a/drivers/spmi/spmi-pmic-arb.c
+++ b/drivers/spmi/spmi-pmic-arb.c
@@ -289,7 +289,6 @@ static int pmic_arb_wait_for_done(struct spmi_controller *ctrl,
if (status & PMIC_ARB_STATUS_FAILURE) {
dev_err(&ctrl->dev, "%s: %#x %#x: transaction failed (%#x)\n",
__func__, sid, addr, status);
- WARN_ON(1);
return -EIO;
}
--
Armbian

View File

@@ -0,0 +1,25 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: amazingfate <liujianfeng1994@gmail.com>
Date: Mon, 16 Oct 2023 13:32:58 +0800
Subject: tty: serial: qcom-geni: fix zero dma-rx-len-in
---
drivers/tty/serial/qcom_geni_serial.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
index 7e78f97e8..6ea1a4f8b 100644
--- a/drivers/tty/serial/qcom_geni_serial.c
+++ b/drivers/tty/serial/qcom_geni_serial.c
@@ -820,7 +820,7 @@ static void qcom_geni_serial_handle_rx_dma(struct uart_port *uport, bool drop)
rx_in = readl(uport->membase + SE_DMA_RX_LEN_IN);
if (!rx_in) {
dev_warn(uport->dev, "serial engine reports 0 RX bytes in!\n");
- return;
+ //return;
}
if (!drop)
--
Armbian

View File

@@ -0,0 +1,25 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: amazingfate <liujianfeng1994@gmail.com>
Date: Tue, 24 Oct 2023 01:01:46 +0800
Subject: Asoc: wm_adsp: Use xiaomi-elish firmware name
---
sound/soc/codecs/wm_adsp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 06770554e..ad52dd67c 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -827,7 +827,7 @@ static int wm_adsp_request_firmware_files(struct wm_adsp *dsp,
}
} else if (asoc_component_prefix) {
if (!wm_adsp_request_firmware_file(dsp, wmfw_firmware, wmfw_filename,
- cirrus_dir, NULL,
+ cirrus_dir, "xiaomi-elish",
NULL, "wmfw")) {
adsp_dbg(dsp, "Found '%s'\n", *wmfw_filename);
wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename,
--
Armbian

View File

@@ -0,0 +1,25 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: amazingfate <liujianfeng1994@gmail.com>
Date: Thu, 26 Oct 2023 13:13:34 +0800
Subject: input: nt36523: short the firmware download delay from 14s to 4s
---
drivers/input/touchscreen/nt36523/nt36xxx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/nt36523/nt36xxx.c b/drivers/input/touchscreen/nt36523/nt36xxx.c
index 45500ad5c..27f93e531 100644
--- a/drivers/input/touchscreen/nt36523/nt36xxx.c
+++ b/drivers/input/touchscreen/nt36523/nt36xxx.c
@@ -1452,7 +1452,7 @@ static int32_t nvt_ts_probe(struct spi_device *client)
}
INIT_DELAYED_WORK(&ts->nvt_fwu_work, Boot_Update_Firmware);
// please make sure boot update start after display reset(RESX) sequence
- queue_delayed_work(nvt_fwu_wq, &ts->nvt_fwu_work, msecs_to_jiffies(14000));
+ queue_delayed_work(nvt_fwu_wq, &ts->nvt_fwu_work, msecs_to_jiffies(4000));
#endif
NVT_LOG("NVT_TOUCH_ESD_PROTECT is %d\n", NVT_TOUCH_ESD_PROTECT);
--
Armbian

View File

@@ -0,0 +1,24 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: amazingfate <liujianfeng1994@gmail.com>
Date: Fri, 3 Nov 2023 11:20:40 +0800
Subject: Enable non-coherent dst bufs for Venus V4L2 driver
---
drivers/media/platform/qcom/venus/vdec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
index dbf305cec..14b5d2ebb 100644
--- a/drivers/media/platform/qcom/venus/vdec.c
+++ b/drivers/media/platform/qcom/venus/vdec.c
@@ -1659,6 +1659,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
dst_vq->min_buffers_needed = 0;
dst_vq->dev = inst->core->dev;
dst_vq->lock = &inst->ctx_q_lock;
+ dst_vq->allow_cache_hints = 1;
return vb2_queue_init(dst_vq);
}
--
Armbian

View File

@@ -0,0 +1,30 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: amazingfate <liujianfeng1994@gmail.com>
Date: Sun, 5 Nov 2023 12:23:48 +0800
Subject: bluetooth: fix some blutooth LE devices not pairing
---
net/bluetooth/smp.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index 5f2f97de2..03b2e9e49 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -2969,8 +2969,11 @@ static int smp_sig_channel(struct l2cap_chan *chan, struct sk_buff *skb)
if (code > SMP_CMD_MAX)
goto drop;
- if (smp && !test_and_clear_bit(code, &smp->allow_cmd))
- goto drop;
+ if (smp && !test_and_clear_bit(code, &smp->allow_cmd)) {
+ bt_dev_warn(hcon->hdev, "test_and_clear_bit failed with command code 0x%2.2x", code);
+ if ((code != SMP_CMD_ENCRYPT_INFO) && (code != SMP_CMD_INITIATOR_IDENT))
+ goto drop;
+ }
/* If we don't have a context the only allowed commands are
* pairing request and security request.
--
Armbian

View File

@@ -0,0 +1,40 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jianhua Lu <lujianhua000@gmail.com>
Date: Sun, 26 Nov 2023 10:28:48 +0800
Subject: arm64: dts: qcom: sm8250-xiaomi-elish: Fix typos
There are two typos in this dtsi, so fix it.
classis -> chassis.
80700000 -> 80600000
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Jianhua Lu <lujianhua000@gmail.com>
---
arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
index a8a684b2d..6fcbf387c 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
@@ -25,7 +25,7 @@
/delete-node/ &xbl_aop_mem;
/ {
- classis-type = "tablet";
+ chassis-type = "tablet";
/* required for bootloader to select correct board */
qcom,msm-id = <QCOM_ID_SM8250 0x20001>; /* SM8250 v2.1 */
@@ -139,7 +139,7 @@ qca639x: qca639x {
};
reserved-memory {
- xbl_aop_mem: xbl-aop@80700000 {
+ xbl_aop_mem: xbl-aop@80600000 {
reg = <0x0 0x80600000 0x0 0x260000>;
no-map;
};
--
Armbian

View File

@@ -0,0 +1,97 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jianhua Lu <lujianhua000@gmail.com>
Date: Sun, 26 Nov 2023 10:28:49 +0800
Subject: arm64: dts: qcom: sm8250-xiaomi-elish: Add pm8150b type-c node and
enable usb otg
Add type-c node to feature otg function and set usb-role-switch property
for usb_1_dwc3 to enable usb otg.
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Jianhua Lu <lujianhua000@gmail.com>
---
arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi | 43 +++++++++-
1 file changed, 42 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
index 6fcbf387c..276d5a53d 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
@@ -8,6 +8,7 @@
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include <dt-bindings/sound/qcom,q6afe.h>
#include <dt-bindings/sound/qcom,q6asm.h>
+#include <dt-bindings/usb/pd.h>
#include "sm8250.dtsi"
#include "pm8150.dtsi"
#include "pm8150b.dtsi"
@@ -817,6 +818,41 @@ vol_up_n: vol-up-n-state {
};
};
+&pm8150b_typec {
+ vdd-pdphy-supply = <&vreg_l2a_3p1>;
+ status = "okay";
+
+ connector {
+ compatible = "usb-c-connector";
+
+ power-role = "source";
+ data-role = "dual";
+ self-powered;
+
+ source-pdos = <PDO_FIXED(5000, 3000,
+ PDO_FIXED_DUAL_ROLE |
+ PDO_FIXED_USB_COMM |
+ PDO_FIXED_DATA_SWAP)>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ pm8150b_role_switch_in: endpoint {
+ remote-endpoint = <&usb_1_role_switch_out>;
+ };
+ };
+ };
+ };
+};
+
+&pm8150b_vbus {
+ status = "okay";
+};
+
&pon_pwrkey {
status = "okay";
};
@@ -1022,11 +1058,12 @@ &usb_1 {
};
&usb_1_dwc3 {
- dr_mode = "peripheral";
+ dr_mode = "otg";
maximum-speed = "high-speed";
/* Remove USB3 phy */
phys = <&usb_1_hsphy>;
phy-names = "usb2-phy";
+ usb-role-switch;
};
&usb_1_hsphy {
@@ -1059,6 +1096,10 @@ &usb_2_qmpphy {
status = "okay";
};
+&usb_1_role_switch_out {
+ remote-endpoint = <&pm8150b_role_switch_in>;
+};
+
&ufs_mem_hc {
vcc-supply = <&vreg_l17a_3p0>;
vcc-max-microamp = <800000>;
--
Armbian

View File

@@ -0,0 +1,78 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Date: Sun, 4 Jun 2023 21:44:33 +0300
Subject: drm/msm/dsi: change sync mode to sync on DSI0 rather than DSI1
Change MSM DSI's sync-dual-dsi mode to resync on DSI0 rather than DSI1.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/gpu/drm/msm/dsi/dsi_manager.c | 24 +++++-----
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index 50d788138..500b201c5 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -564,7 +564,7 @@ int msm_dsi_manager_ext_bridge_init(u8 id)
int msm_dsi_manager_cmd_xfer(int id, const struct mipi_dsi_msg *msg)
{
struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
- struct msm_dsi *msm_dsi0 = dsi_mgr_get_dsi(DSI_0);
+ struct msm_dsi *msm_dsi1 = dsi_mgr_get_dsi(DSI_1);
struct mipi_dsi_host *host = msm_dsi->host;
bool is_read = (msg->rx_buf && msg->rx_len);
bool need_sync = (IS_SYNC_NEEDED() && !is_read);
@@ -575,14 +575,14 @@ int msm_dsi_manager_cmd_xfer(int id, const struct mipi_dsi_msg *msg)
/* In bonded master case, panel requires the same commands sent to
* both DSI links. Host issues the command trigger to both links
- * when DSI_1 calls the cmd transfer function, no matter it happens
- * before or after DSI_0 cmd transfer.
+ * when DSI_0 calls the cmd transfer function, no matter it happens
+ * before or after DSI_1 cmd transfer.
*/
- if (need_sync && (id == DSI_0))
+ if (need_sync && (id == DSI_1))
return is_read ? msg->rx_len : msg->tx_len;
- if (need_sync && msm_dsi0) {
- ret = msm_dsi_host_xfer_prepare(msm_dsi0->host, msg);
+ if (need_sync && msm_dsi1) {
+ ret = msm_dsi_host_xfer_prepare(msm_dsi1->host, msg);
if (ret) {
pr_err("%s: failed to prepare non-trigger host, %d\n",
__func__, ret);
@@ -601,8 +601,8 @@ int msm_dsi_manager_cmd_xfer(int id, const struct mipi_dsi_msg *msg)
msm_dsi_host_xfer_restore(host, msg);
restore_host0:
- if (need_sync && msm_dsi0)
- msm_dsi_host_xfer_restore(msm_dsi0->host, msg);
+ if (need_sync && msm_dsi1)
+ msm_dsi_host_xfer_restore(msm_dsi1->host, msg);
return ret;
}
@@ -610,14 +610,14 @@ int msm_dsi_manager_cmd_xfer(int id, const struct mipi_dsi_msg *msg)
bool msm_dsi_manager_cmd_xfer_trigger(int id, u32 dma_base, u32 len)
{
struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
- struct msm_dsi *msm_dsi0 = dsi_mgr_get_dsi(DSI_0);
+ struct msm_dsi *msm_dsi1 = dsi_mgr_get_dsi(DSI_1);
struct mipi_dsi_host *host = msm_dsi->host;
- if (IS_SYNC_NEEDED() && (id == DSI_0))
+ if (IS_SYNC_NEEDED() && (id == DSI_1))
return false;
- if (IS_SYNC_NEEDED() && msm_dsi0)
- msm_dsi_host_cmd_xfer_commit(msm_dsi0->host, dma_base, len);
+ if (IS_SYNC_NEEDED() && msm_dsi1)
+ msm_dsi_host_cmd_xfer_commit(msm_dsi1->host, dma_base, len);
msm_dsi_host_cmd_xfer_commit(host, dma_base, len);
--
Armbian

View File

@@ -0,0 +1,80 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jianhua Lu <lujianhua000@gmail.com>
Date: Fri, 1 Sep 2023 23:29:17 +0800
Subject: arm64: dts: qcom: sm8250-xiaomi-elish: Hook up type-c for usb_1
---
arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi | 14 ++++++--
arch/arm64/boot/dts/qcom/sm8250.dtsi | 17 ++++++++--
2 files changed, 27 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
index 276d5a53d..ae6a2a060 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
@@ -822,6 +822,12 @@ &pm8150b_typec {
vdd-pdphy-supply = <&vreg_l2a_3p1>;
status = "okay";
+ port {
+ pm8150b_role_switch_in: endpoint {
+ remote-endpoint = <&usb_1_role_switch_out>;
+ };
+ };
+
connector {
compatible = "usb-c-connector";
@@ -841,8 +847,8 @@ ports {
port@0 {
reg = <0>;
- pm8150b_role_switch_in: endpoint {
- remote-endpoint = <&usb_1_role_switch_out>;
+ pm8150b_typec_hsphy_in: endpoint {
+ remote-endpoint = <&usb_1_dwc3_hs>;
};
};
};
@@ -1066,6 +1072,10 @@ &usb_1_dwc3 {
usb-role-switch;
};
+&usb_1_dwc3_hs {
+ remote-endpoint = <&pm8150b_typec_hsphy_in>;
+};
+
&usb_1_hsphy {
vdda-pll-supply = <&vreg_l5a_0p88>;
vdda18-supply = <&vreg_l12a_1p8>;
diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index be970472f..d9ac8bc62 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -4158,8 +4158,21 @@ usb_1_dwc3: usb@a600000 {
phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>;
phy-names = "usb2-phy", "usb3-phy";
- port {
- usb_1_role_switch_out: endpoint {};
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ usb_1_role_switch_out: endpoint {};
+ };
+
+ port@1 {
+ reg = <1>;
+
+ usb_1_dwc3_hs: endpoint {};
+ };
};
};
};
--
Armbian

View File

@@ -0,0 +1,111 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jianhua Lu <lujianhua000@gmail.com>
Date: Sat, 2 Sep 2023 14:54:26 +0800
Subject: arm64: dts: qcom: sm8250-xiaomi-elish: Hook up usb keyboard
---
arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi | 31 +++++-----
arch/arm64/boot/dts/qcom/sm8250.dtsi | 17 +++++
2 files changed, 31 insertions(+), 17 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
index ae6a2a060..31031e919 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
@@ -179,14 +179,6 @@ ramoops@b0000000 {
no-map;
};
};
-
- extcon_usb: extcon-usb {
- compatible = "linux,extcon-usb-gpio";
- id-gpio = <&tlmm 91 GPIO_ACTIVE_HIGH>;
- vbus-gpio = <&pm8150_gpios 10 GPIO_ACTIVE_HIGH>;
- pinctrl-0 = <&keyboard_active &usb_2_vbus_det_n>;
- pinctrl-names = "default";
- };
};
&adsp {
@@ -801,14 +793,6 @@ &pcie0_phy {
};
&pm8150_gpios {
- usb_2_vbus_det_n: usb-2-vbus-det-state {
- pins = "gpio10";
- function = "normal";
- power-source = <1>;
- input-enable;
- bias-pull-down;
- };
-
vol_up_n: vol-up-n-state {
pins = "gpio6";
function = "normal";
@@ -851,6 +835,13 @@ pm8150b_typec_hsphy_in: endpoint {
remote-endpoint = <&usb_1_dwc3_hs>;
};
};
+
+ port@1 {
+ reg = <1>;
+ pm8150b_typec_ssphy_in: endpoint {
+ remote-endpoint = <&usb_2_dwc3_ss>;
+ };
+ };
};
};
};
@@ -1090,7 +1081,10 @@ &usb_2 {
&usb_2_dwc3 {
dr_mode = "host";
maximum-speed = "super-speed";
- extcon = <&extcon_usb>;
+};
+
+&usb_2_dwc3_ss {
+ remote-endpoint = <&pm8150b_typec_ssphy_in>;
};
&usb_2_hsphy {
@@ -1104,6 +1098,9 @@ &usb_2_qmpphy {
vdda-phy-supply = <&vreg_l9a_1p2>;
vdda-pll-supply = <&vreg_l18a_0p9>;
status = "okay";
+
+ pinctrl-0 = <&keyboard_active>;
+ pinctrl-names = "default";
};
&usb_1_role_switch_out {
diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index d9ac8bc62..7c27e5c1a 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -4238,6 +4238,23 @@ usb_2_dwc3: usb@a800000 {
snps,dis_enblslpm_quirk;
phys = <&usb_2_hsphy>, <&usb_2_ssphy>;
phy-names = "usb2-phy", "usb3-phy";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ usb_2_dwc3_hs: endpoint {};
+ };
+
+ port@1 {
+ reg = <1>;
+
+ usb_2_dwc3_ss: endpoint {};
+ };
+ };
};
};
--
Armbian

View File

@@ -1 +1 @@
archive/sm8250-6.6
archive/sm8250-6.7