mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-18 12:51:40 +00:00
Merge branch 'master' of https://github.com/armbian/build
This commit is contained in:
commit
50445a44df
89 changed files with 33939 additions and 11970 deletions
|
@ -3,4 +3,4 @@ BOARD_NAME="Espressobin"
|
|||
BOARDFAMILY="mvebu64"
|
||||
BOOTCONFIG="mvebu_espressobin-88f3720_defconfig"
|
||||
BUILD_DESKTOP="no"
|
||||
KERNEL_TARGET="legacy,current"
|
||||
KERNEL_TARGET="legacy,current,dev"
|
||||
|
|
|
@ -3,5 +3,5 @@ BOARD_NAME="Odroid N2"
|
|||
BOARDFAMILY="meson-g12b"
|
||||
BOOTCONFIG="odroidn2_config"
|
||||
MODULES_LEGACY="media_clock firmware #decoder_common #stream_input #amvdec_mh264 #amvdec_h264 #amvdec_h264mvc #amvdec_h265 #amvdec_mmjpeg #amvdec_mpeg12 #amvdec_mmpeg4 #amvdec_mpeg4 #amvdec_vc1 #amvdec_vp9"
|
||||
KERNEL_TARGET="legacy,current"
|
||||
KERNEL_TARGET="legacy,current,dev"
|
||||
FULL_DESKTOP="yes"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm 5.3.6 Kernel Configuration
|
||||
# Linux/arm 5.4.0 Kernel Configuration
|
||||
#
|
||||
|
||||
#
|
||||
|
@ -11,6 +11,7 @@ CONFIG_GCC_VERSION=80300
|
|||
CONFIG_CLANG_VERSION=0
|
||||
CONFIG_CC_CAN_LINK=y
|
||||
CONFIG_CC_HAS_ASM_GOTO=y
|
||||
CONFIG_CC_HAS_ASM_INLINE=y
|
||||
CONFIG_CC_HAS_WARN_MAYBE_UNINITIALIZED=y
|
||||
CONFIG_CC_DISABLE_WARN_MAYBE_UNINITIALIZED=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
|
@ -266,19 +267,13 @@ CONFIG_ARCH_MULTIPLATFORM=y
|
|||
# CONFIG_ARCH_EBSA110 is not set
|
||||
# CONFIG_ARCH_EP93XX is not set
|
||||
# CONFIG_ARCH_FOOTBRIDGE is not set
|
||||
# CONFIG_ARCH_IOP13XX is not set
|
||||
# CONFIG_ARCH_IOP32X is not set
|
||||
# CONFIG_ARCH_IOP33X is not set
|
||||
# CONFIG_ARCH_IXP4XX is not set
|
||||
# CONFIG_ARCH_DOVE is not set
|
||||
# CONFIG_ARCH_KS8695 is not set
|
||||
# CONFIG_ARCH_W90X900 is not set
|
||||
# CONFIG_ARCH_LPC32XX is not set
|
||||
# CONFIG_ARCH_PXA is not set
|
||||
# CONFIG_ARCH_RPC is not set
|
||||
# CONFIG_ARCH_SA1100 is not set
|
||||
# CONFIG_ARCH_S3C24XX is not set
|
||||
# CONFIG_ARCH_DAVINCI is not set
|
||||
# CONFIG_ARCH_OMAP1 is not set
|
||||
|
||||
#
|
||||
|
@ -297,6 +292,7 @@ CONFIG_ARCH_VIRT=y
|
|||
# CONFIG_ARCH_ACTIONS is not set
|
||||
# CONFIG_ARCH_ALPINE is not set
|
||||
# CONFIG_ARCH_ARTPEC is not set
|
||||
# CONFIG_ARCH_ASPEED is not set
|
||||
# CONFIG_ARCH_AT91 is not set
|
||||
CONFIG_ARCH_BCM=y
|
||||
|
||||
|
@ -702,6 +698,7 @@ CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
|
|||
#
|
||||
CONFIG_CPUFREQ_DT=m
|
||||
CONFIG_CPUFREQ_DT_PLATDEV=y
|
||||
# CONFIG_ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM is not set
|
||||
CONFIG_ARM_ARMADA_37XX_CPUFREQ=m
|
||||
# CONFIG_ARM_ARMADA_8K_CPUFREQ is not set
|
||||
CONFIG_ARM_BIG_LITTLE_CPUFREQ=m
|
||||
|
@ -735,6 +732,7 @@ CONFIG_DT_IDLE_STATES=y
|
|||
# ARM CPU Idle Drivers
|
||||
#
|
||||
CONFIG_ARM_CPUIDLE=y
|
||||
# CONFIG_ARM_PSCI_CPUIDLE is not set
|
||||
CONFIG_ARM_BIG_LITTLE_CPUIDLE=y
|
||||
# CONFIG_ARM_HIGHBANK_CPUIDLE is not set
|
||||
CONFIG_ARM_ZYNQ_CPUIDLE=y
|
||||
|
@ -803,6 +801,7 @@ CONFIG_QCOM_SCM=y
|
|||
CONFIG_QCOM_SCM_32=y
|
||||
# CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT is not set
|
||||
CONFIG_TRUSTED_FOUNDATIONS=y
|
||||
CONFIG_TURRIS_MOX_RWTM=m
|
||||
CONFIG_HAVE_ARM_SMCCC=y
|
||||
CONFIG_ARM_PSCI_FW=y
|
||||
# CONFIG_ARM_PSCI_CHECKER is not set
|
||||
|
@ -825,6 +824,7 @@ CONFIG_EFI_ARMSTUB_DTB_LOADER=y
|
|||
# CONFIG_RESET_ATTACK_MITIGATION is not set
|
||||
# end of EFI (Extensible Firmware Interface) Support
|
||||
|
||||
CONFIG_IMX_DSP=y
|
||||
# CONFIG_IMX_SCU is not set
|
||||
|
||||
#
|
||||
|
@ -907,6 +907,7 @@ CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
|
|||
CONFIG_HAVE_ARCH_MMAP_RND_BITS=y
|
||||
CONFIG_HAVE_EXIT_THREAD=y
|
||||
CONFIG_ARCH_MMAP_RND_BITS=8
|
||||
CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_OLD_SIGSUSPEND3=y
|
||||
CONFIG_OLD_SIGACTION=y
|
||||
|
@ -935,6 +936,7 @@ CONFIG_HAVE_GCC_PLUGINS=y
|
|||
|
||||
CONFIG_RT_MUTEXES=y
|
||||
CONFIG_BASE_SMALL=0
|
||||
CONFIG_MODULE_SIG_FORMAT=y
|
||||
CONFIG_MODULES=y
|
||||
# CONFIG_MODULE_FORCE_LOAD is not set
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
|
@ -951,6 +953,8 @@ CONFIG_MODULE_SIG_SHA256=y
|
|||
# CONFIG_MODULE_SIG_SHA512 is not set
|
||||
CONFIG_MODULE_SIG_HASH="sha256"
|
||||
# CONFIG_MODULE_COMPRESS is not set
|
||||
# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set
|
||||
CONFIG_UNUSED_SYMBOLS=y
|
||||
CONFIG_MODULES_TREE_LOOKUP=y
|
||||
CONFIG_BLOCK=y
|
||||
CONFIG_BLK_SCSI_REQUEST=y
|
||||
|
@ -963,6 +967,7 @@ CONFIG_BLK_DEV_THROTTLING=y
|
|||
# CONFIG_BLK_CMDLINE_PARSER is not set
|
||||
CONFIG_BLK_WBT=y
|
||||
CONFIG_BLK_CGROUP_IOLATENCY=y
|
||||
# CONFIG_BLK_CGROUP_IOCOST is not set
|
||||
CONFIG_BLK_WBT_MQ=y
|
||||
CONFIG_BLK_DEBUG_FS=y
|
||||
CONFIG_BLK_DEBUG_FS_ZONED=y
|
||||
|
@ -1584,9 +1589,7 @@ CONFIG_NET_DSA_TAG_GSWIP=m
|
|||
CONFIG_NET_DSA_TAG_DSA=m
|
||||
CONFIG_NET_DSA_TAG_EDSA=m
|
||||
CONFIG_NET_DSA_TAG_MTK=m
|
||||
CONFIG_NET_DSA_TAG_KSZ_COMMON=m
|
||||
CONFIG_NET_DSA_TAG_KSZ=m
|
||||
CONFIG_NET_DSA_TAG_KSZ9477=m
|
||||
CONFIG_NET_DSA_TAG_QCA=m
|
||||
CONFIG_NET_DSA_TAG_LAN9303=m
|
||||
CONFIG_NET_DSA_TAG_SJA1105=m
|
||||
|
@ -1711,6 +1714,7 @@ CONFIG_NET_ACT_CT=m
|
|||
CONFIG_NET_IFE_SKBMARK=m
|
||||
CONFIG_NET_IFE_SKBPRIO=m
|
||||
CONFIG_NET_IFE_SKBTCINDEX=m
|
||||
# CONFIG_NET_TC_SKB_EXT is not set
|
||||
CONFIG_NET_SCH_FIFO=y
|
||||
CONFIG_DCB=y
|
||||
CONFIG_DNS_RESOLVER=m
|
||||
|
@ -1791,6 +1795,7 @@ CONFIG_CAN=m
|
|||
CONFIG_CAN_RAW=m
|
||||
CONFIG_CAN_BCM=m
|
||||
CONFIG_CAN_GW=m
|
||||
CONFIG_CAN_J1939=m
|
||||
|
||||
#
|
||||
# CAN Device Drivers
|
||||
|
@ -1802,6 +1807,7 @@ CONFIG_CAN_DEV=m
|
|||
CONFIG_CAN_CALC_BITTIMING=y
|
||||
CONFIG_CAN_FLEXCAN=m
|
||||
# CONFIG_CAN_GRCAN is not set
|
||||
CONFIG_CAN_KVASER_PCIEFD=m
|
||||
CONFIG_CAN_SUN4I=m
|
||||
# CONFIG_CAN_TI_HECC is not set
|
||||
CONFIG_CAN_XILINXCAN=m
|
||||
|
@ -1813,17 +1819,20 @@ CONFIG_CAN_CC770=m
|
|||
CONFIG_CAN_CC770_PLATFORM=m
|
||||
CONFIG_CAN_IFI_CANFD=m
|
||||
CONFIG_CAN_M_CAN=m
|
||||
CONFIG_CAN_M_CAN_PLATFORM=m
|
||||
CONFIG_CAN_M_CAN_TCAN4X5X=m
|
||||
CONFIG_CAN_PEAK_PCIEFD=m
|
||||
# CONFIG_CAN_RCAR is not set
|
||||
# CONFIG_CAN_RCAR_CANFD is not set
|
||||
CONFIG_CAN_SJA1000=m
|
||||
# CONFIG_CAN_SJA1000_ISA is not set
|
||||
CONFIG_CAN_SJA1000_PLATFORM=m
|
||||
CONFIG_CAN_EMS_PCI=m
|
||||
CONFIG_CAN_F81601=m
|
||||
CONFIG_CAN_KVASER_PCI=m
|
||||
CONFIG_CAN_PEAK_PCI=m
|
||||
CONFIG_CAN_PEAK_PCIEC=y
|
||||
CONFIG_CAN_KVASER_PCI=m
|
||||
CONFIG_CAN_PLX_PCI=m
|
||||
# CONFIG_CAN_SJA1000_ISA is not set
|
||||
CONFIG_CAN_SJA1000_PLATFORM=m
|
||||
CONFIG_CAN_SOFTING=m
|
||||
|
||||
#
|
||||
|
@ -2172,6 +2181,7 @@ CONFIG_ARM_CCI=y
|
|||
CONFIG_ARM_CCI400_COMMON=y
|
||||
CONFIG_ARM_CCI400_PORT_CTRL=y
|
||||
# CONFIG_BRCMSTB_GISB_ARB is not set
|
||||
# CONFIG_MOXTET is not set
|
||||
CONFIG_IMX_WEIM=y
|
||||
CONFIG_MVEBU_MBUS=y
|
||||
CONFIG_OMAP_INTERCONNECT=y
|
||||
|
@ -2190,13 +2200,13 @@ CONFIG_PROC_EVENTS=y
|
|||
# CONFIG_GNSS is not set
|
||||
CONFIG_MTD=m
|
||||
# CONFIG_MTD_TESTS is not set
|
||||
# CONFIG_MTD_CMDLINE_PARTS is not set
|
||||
CONFIG_MTD_OF_PARTS=m
|
||||
# CONFIG_MTD_AR7_PARTS is not set
|
||||
|
||||
#
|
||||
# Partition parsers
|
||||
#
|
||||
# CONFIG_MTD_AR7_PARTS is not set
|
||||
# CONFIG_MTD_CMDLINE_PARTS is not set
|
||||
CONFIG_MTD_OF_PARTS=m
|
||||
# CONFIG_MTD_AFS_PARTS is not set
|
||||
# CONFIG_MTD_SHARPSL_PARTS is not set
|
||||
# CONFIG_MTD_REDBOOT_PARTS is not set
|
||||
|
@ -2257,7 +2267,6 @@ CONFIG_MTD_PHYSMAP=m
|
|||
CONFIG_MTD_DATAFLASH=m
|
||||
CONFIG_MTD_DATAFLASH_WRITE_VERIFY=y
|
||||
CONFIG_MTD_DATAFLASH_OTP=y
|
||||
CONFIG_MTD_M25P80=m
|
||||
# CONFIG_MTD_MCHP23K256 is not set
|
||||
CONFIG_MTD_SST25L=m
|
||||
# CONFIG_MTD_SLRAM is not set
|
||||
|
@ -2295,6 +2304,7 @@ CONFIG_MTD_NAND_TMIO=m
|
|||
CONFIG_MTD_NAND_MXC=m
|
||||
CONFIG_MTD_NAND_SUNXI=m
|
||||
CONFIG_MTD_NAND_QCOM=m
|
||||
# CONFIG_MTD_NAND_MXIC is not set
|
||||
CONFIG_MTD_NAND_TEGRA=m
|
||||
# CONFIG_MTD_NAND_STM32_FMC2 is not set
|
||||
# CONFIG_MTD_NAND_MESON is not set
|
||||
|
@ -2394,7 +2404,6 @@ CONFIG_SENSORS_LIS3LV02D=m
|
|||
# CONFIG_AD525X_DPOT is not set
|
||||
# CONFIG_DUMMY_IRQ is not set
|
||||
# CONFIG_PHANTOM is not set
|
||||
# CONFIG_SGI_IOC4 is not set
|
||||
CONFIG_TIFM_CORE=m
|
||||
CONFIG_TIFM_7XX1=m
|
||||
# CONFIG_ICS932S401 is not set
|
||||
|
@ -2755,6 +2764,7 @@ CONFIG_DM_CACHE=m
|
|||
CONFIG_DM_CACHE_SMQ=m
|
||||
CONFIG_DM_WRITECACHE=m
|
||||
# CONFIG_DM_ERA is not set
|
||||
CONFIG_DM_CLONE=m
|
||||
CONFIG_DM_MIRROR=y
|
||||
CONFIG_DM_LOG_USERSPACE=m
|
||||
CONFIG_DM_RAID=m
|
||||
|
@ -2768,6 +2778,7 @@ CONFIG_DM_INIT=y
|
|||
CONFIG_DM_UEVENT=y
|
||||
CONFIG_DM_FLAKEY=m
|
||||
CONFIG_DM_VERITY=m
|
||||
# CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG is not set
|
||||
CONFIG_DM_VERITY_FEC=y
|
||||
CONFIG_DM_SWITCH=m
|
||||
CONFIG_DM_LOG_WRITES=m
|
||||
|
@ -2852,7 +2863,10 @@ CONFIG_NET_DSA_MT7530=m
|
|||
# CONFIG_NET_DSA_MV88E6060 is not set
|
||||
CONFIG_NET_DSA_MICROCHIP_KSZ_COMMON=m
|
||||
CONFIG_NET_DSA_MICROCHIP_KSZ9477=m
|
||||
CONFIG_NET_DSA_MICROCHIP_KSZ9477_I2C=m
|
||||
CONFIG_NET_DSA_MICROCHIP_KSZ9477_SPI=m
|
||||
CONFIG_NET_DSA_MICROCHIP_KSZ8795=m
|
||||
CONFIG_NET_DSA_MICROCHIP_KSZ8795_SPI=m
|
||||
CONFIG_NET_DSA_MV88E6XXX=m
|
||||
CONFIG_NET_DSA_MV88E6XXX_GLOBAL2=y
|
||||
CONFIG_NET_DSA_MV88E6XXX_PTP=y
|
||||
|
@ -3028,13 +3042,13 @@ CONFIG_ETHOC=m
|
|||
CONFIG_NET_VENDOR_PACKET_ENGINES=y
|
||||
CONFIG_HAMACHI=m
|
||||
CONFIG_YELLOWFIN=m
|
||||
CONFIG_NET_VENDOR_PENSANDO=y
|
||||
CONFIG_NET_VENDOR_QLOGIC=y
|
||||
CONFIG_QLA3XXX=m
|
||||
CONFIG_QLCNIC=m
|
||||
CONFIG_QLCNIC_SRIOV=y
|
||||
CONFIG_QLCNIC_DCB=y
|
||||
CONFIG_QLCNIC_HWMON=y
|
||||
CONFIG_QLGE=m
|
||||
CONFIG_NETXEN_NIC=m
|
||||
CONFIG_QED=m
|
||||
CONFIG_QED_LL2=y
|
||||
|
@ -3132,6 +3146,7 @@ CONFIG_LED_TRIGGER_PHY=y
|
|||
# MII PHY device drivers
|
||||
#
|
||||
CONFIG_SFP=m
|
||||
# CONFIG_ADIN_PHY is not set
|
||||
CONFIG_AMD_PHY=m
|
||||
CONFIG_AQUANTIA_PHY=m
|
||||
CONFIG_AX88796B_PHY=m
|
||||
|
@ -3255,6 +3270,7 @@ CONFIG_ATH9K_DEBUGFS=y
|
|||
CONFIG_ATH9K_RFKILL=y
|
||||
# CONFIG_ATH9K_CHANNEL_CONTEXT is not set
|
||||
CONFIG_ATH9K_PCOEM=y
|
||||
CONFIG_ATH9K_PCI_NO_EEPROM=m
|
||||
CONFIG_ATH9K_HTC=m
|
||||
# CONFIG_ATH9K_HTC_DEBUGFS is not set
|
||||
# CONFIG_ATH9K_HWRNG is not set
|
||||
|
@ -3632,6 +3648,7 @@ CONFIG_JOYSTICK_XPAD_LEDS=y
|
|||
CONFIG_JOYSTICK_PSXPAD_SPI=m
|
||||
CONFIG_JOYSTICK_PSXPAD_SPI_FF=y
|
||||
CONFIG_JOYSTICK_PXRC=m
|
||||
CONFIG_JOYSTICK_FSIA6B=m
|
||||
CONFIG_INPUT_TABLET=y
|
||||
CONFIG_TABLET_USB_ACECAD=m
|
||||
CONFIG_TABLET_USB_AIPTEK=m
|
||||
|
@ -3778,7 +3795,6 @@ CONFIG_INPUT_DA9063_ONKEY=m
|
|||
# CONFIG_INPUT_IMS_PCU is not set
|
||||
CONFIG_INPUT_CMA3000=m
|
||||
CONFIG_INPUT_CMA3000_I2C=m
|
||||
CONFIG_INPUT_SOC_BUTTON_ARRAY=m
|
||||
# CONFIG_INPUT_DRV260X_HAPTICS is not set
|
||||
# CONFIG_INPUT_DRV2665_HAPTICS is not set
|
||||
# CONFIG_INPUT_DRV2667_HAPTICS is not set
|
||||
|
@ -3862,6 +3878,7 @@ CONFIG_SERIAL_8250_MANY_PORTS=y
|
|||
CONFIG_SERIAL_8250_SHARE_IRQ=y
|
||||
# CONFIG_SERIAL_8250_DETECT_IRQ is not set
|
||||
CONFIG_SERIAL_8250_RSA=y
|
||||
CONFIG_SERIAL_8250_DWLIB=y
|
||||
CONFIG_SERIAL_8250_BCM2835AUX=y
|
||||
CONFIG_SERIAL_8250_FSL=y
|
||||
CONFIG_SERIAL_8250_DW=y
|
||||
|
@ -3869,7 +3886,6 @@ CONFIG_SERIAL_8250_DW=y
|
|||
CONFIG_SERIAL_8250_RT288X=y
|
||||
CONFIG_SERIAL_8250_OMAP=y
|
||||
CONFIG_SERIAL_8250_OMAP_TTYO_FIXUP=y
|
||||
CONFIG_SERIAL_8250_MOXA=m
|
||||
CONFIG_SERIAL_8250_PXA=y
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
|
||||
|
@ -3918,6 +3934,7 @@ CONFIG_SERIAL_ARC_NR_PORTS=1
|
|||
# CONFIG_SERIAL_RP2 is not set
|
||||
CONFIG_SERIAL_FSL_LPUART=y
|
||||
CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
|
||||
CONFIG_SERIAL_FSL_LINFLEXUART=m
|
||||
# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set
|
||||
CONFIG_SERIAL_ST_ASC=y
|
||||
CONFIG_SERIAL_ST_ASC_CONSOLE=y
|
||||
|
@ -3967,6 +3984,7 @@ CONFIG_TCG_TIS_I2C_ATMEL=m
|
|||
CONFIG_TCG_TIS_I2C_INFINEON=m
|
||||
# CONFIG_TCG_TIS_I2C_NUVOTON is not set
|
||||
CONFIG_TCG_VTPM_PROXY=m
|
||||
CONFIG_TCG_FTPM_TEE=m
|
||||
# CONFIG_TCG_TIS_ST33ZP24_I2C is not set
|
||||
# CONFIG_TCG_TIS_ST33ZP24_SPI is not set
|
||||
CONFIG_DEVPORT=y
|
||||
|
@ -3975,6 +3993,8 @@ CONFIG_XILLYBUS_PCIE=m
|
|||
CONFIG_XILLYBUS_OF=m
|
||||
# end of Character devices
|
||||
|
||||
# CONFIG_RANDOM_TRUST_BOOTLOADER is not set
|
||||
|
||||
#
|
||||
# I2C support
|
||||
#
|
||||
|
@ -4232,6 +4252,7 @@ CONFIG_PINCTRL_MSM8998=m
|
|||
# CONFIG_PINCTRL_QCS404 is not set
|
||||
CONFIG_PINCTRL_QCOM_SPMI_PMIC=m
|
||||
CONFIG_PINCTRL_QCOM_SSBI_PMIC=m
|
||||
CONFIG_PINCTRL_SC7180=m
|
||||
# CONFIG_PINCTRL_SDM660 is not set
|
||||
# CONFIG_PINCTRL_SDM845 is not set
|
||||
# CONFIG_PINCTRL_SM8150 is not set
|
||||
|
@ -4382,6 +4403,7 @@ CONFIG_W1_MASTER_MXC=m
|
|||
# CONFIG_W1_MASTER_DS1WM is not set
|
||||
CONFIG_W1_MASTER_GPIO=m
|
||||
CONFIG_HDQ_MASTER_OMAP=m
|
||||
CONFIG_W1_MASTER_SGI=m
|
||||
# end of 1-wire Bus Masters
|
||||
|
||||
#
|
||||
|
@ -4400,6 +4422,7 @@ CONFIG_W1_SLAVE_DS2431=m
|
|||
CONFIG_W1_SLAVE_DS2433=m
|
||||
CONFIG_W1_SLAVE_DS2433_CRC=y
|
||||
CONFIG_W1_SLAVE_DS2438=m
|
||||
CONFIG_W1_SLAVE_DS250X=m
|
||||
CONFIG_W1_SLAVE_DS2780=m
|
||||
CONFIG_W1_SLAVE_DS2781=m
|
||||
CONFIG_W1_SLAVE_DS28E04=m
|
||||
|
@ -4480,6 +4503,8 @@ CONFIG_CHARGER_TPS65217=m
|
|||
# CONFIG_CHARGER_RT9455 is not set
|
||||
CONFIG_CHARGER_CROS_USBPD=m
|
||||
CONFIG_CHARGER_UCS1002=m
|
||||
CONFIG_POWER_SEQUENCE=y
|
||||
# CONFIG_PWRSEQ_GENERIC is not set
|
||||
CONFIG_HWMON=y
|
||||
CONFIG_HWMON_VID=m
|
||||
# CONFIG_HWMON_DEBUG_CHIP is not set
|
||||
|
@ -4503,6 +4528,7 @@ CONFIG_SENSORS_ADT7411=m
|
|||
CONFIG_SENSORS_ADT7462=m
|
||||
CONFIG_SENSORS_ADT7470=m
|
||||
CONFIG_SENSORS_ADT7475=m
|
||||
CONFIG_SENSORS_AS370=m
|
||||
CONFIG_SENSORS_ASC7621=m
|
||||
CONFIG_SENSORS_ARM_SCMI=m
|
||||
CONFIG_SENSORS_ARM_SCPI=m
|
||||
|
@ -4585,6 +4611,7 @@ CONFIG_PMBUS=m
|
|||
CONFIG_SENSORS_PMBUS=m
|
||||
CONFIG_SENSORS_ADM1275=m
|
||||
# CONFIG_SENSORS_IBM_CFFPS is not set
|
||||
CONFIG_SENSORS_INSPUR_IPSPS=m
|
||||
# CONFIG_SENSORS_IR35221 is not set
|
||||
# CONFIG_SENSORS_IR38064 is not set
|
||||
# CONFIG_SENSORS_IRPS5401 is not set
|
||||
|
@ -4624,7 +4651,6 @@ CONFIG_SENSORS_SCH5636=m
|
|||
# CONFIG_SENSORS_STTS751 is not set
|
||||
# CONFIG_SENSORS_SMM665 is not set
|
||||
CONFIG_SENSORS_ADC128D818=m
|
||||
# CONFIG_SENSORS_ADS1015 is not set
|
||||
CONFIG_SENSORS_ADS7828=m
|
||||
CONFIG_SENSORS_ADS7871=m
|
||||
CONFIG_SENSORS_AMC6821=m
|
||||
|
@ -4762,6 +4788,7 @@ CONFIG_TWL4030_WATCHDOG=m
|
|||
# CONFIG_TS4800_WATCHDOG is not set
|
||||
# CONFIG_MAX63XX_WATCHDOG is not set
|
||||
CONFIG_IMX2_WDT=m
|
||||
CONFIG_IMX7ULP_WDT=m
|
||||
CONFIG_ST_LPC_WATCHDOG=m
|
||||
CONFIG_TEGRA_WATCHDOG=m
|
||||
CONFIG_QCOM_WDT=m
|
||||
|
@ -4826,8 +4853,7 @@ CONFIG_MFD_AC100=m
|
|||
CONFIG_MFD_AXP20X=y
|
||||
CONFIG_MFD_AXP20X_I2C=y
|
||||
CONFIG_MFD_AXP20X_RSB=m
|
||||
CONFIG_MFD_CROS_EC=m
|
||||
CONFIG_MFD_CROS_EC_CHARDEV=m
|
||||
# CONFIG_MFD_CROS_EC_DEV is not set
|
||||
# CONFIG_MFD_MADERA is not set
|
||||
# CONFIG_MFD_ASIC3 is not set
|
||||
# CONFIG_PMIC_DA903X is not set
|
||||
|
@ -5013,6 +5039,7 @@ CONFIG_REGULATOR_STM32_PWR=y
|
|||
CONFIG_REGULATOR_STPMIC1=m
|
||||
CONFIG_REGULATOR_TI_ABB=m
|
||||
CONFIG_REGULATOR_SY8106A=m
|
||||
CONFIG_REGULATOR_SY8824X=m
|
||||
CONFIG_REGULATOR_TPS51632=m
|
||||
CONFIG_REGULATOR_TPS62360=m
|
||||
CONFIG_REGULATOR_TPS65023=m
|
||||
|
@ -5092,6 +5119,7 @@ CONFIG_MEDIA_CONTROLLER_REQUEST_API=y
|
|||
CONFIG_VIDEO_DEV=m
|
||||
CONFIG_VIDEO_V4L2_SUBDEV_API=y
|
||||
CONFIG_VIDEO_V4L2=m
|
||||
CONFIG_VIDEO_V4L2_I2C=y
|
||||
# CONFIG_VIDEO_ADV_DEBUG is not set
|
||||
# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
|
||||
CONFIG_VIDEO_TUNER=m
|
||||
|
@ -5364,11 +5392,12 @@ CONFIG_VIDEO_EXYNOS4_FIMC_IS=m
|
|||
CONFIG_VIDEO_EXYNOS4_ISP_DMA_CAPTURE=y
|
||||
CONFIG_VIDEO_AM437X_VPFE=m
|
||||
# CONFIG_VIDEO_XILINX is not set
|
||||
# CONFIG_VIDEO_SUN4I_CSI is not set
|
||||
CONFIG_VIDEO_SUN6I_CSI=m
|
||||
CONFIG_V4L_MEM2MEM_DRIVERS=y
|
||||
CONFIG_VIDEO_CODA=m
|
||||
CONFIG_VIDEO_IMX_VDOA=m
|
||||
CONFIG_VIDEO_IMX_PXP=y
|
||||
CONFIG_VIDEO_IMX_PXP=m
|
||||
# CONFIG_VIDEO_MEM2MEM_DEINTERLACE is not set
|
||||
CONFIG_VIDEO_SAMSUNG_S5P_G2D=m
|
||||
CONFIG_VIDEO_SAMSUNG_S5P_JPEG=m
|
||||
|
@ -5450,9 +5479,14 @@ CONFIG_SMS_SIANO_RC=y
|
|||
# Media ancillary drivers (tuners, sensors, i2c, spi, frontends)
|
||||
#
|
||||
CONFIG_MEDIA_SUBDRV_AUTOSELECT=y
|
||||
CONFIG_MEDIA_HIDE_ANCILLARY_SUBDRV=y
|
||||
CONFIG_MEDIA_ATTACH=y
|
||||
CONFIG_VIDEO_IR_I2C=m
|
||||
|
||||
#
|
||||
# I2C drivers hidden by 'Autoselect ancillary drivers'
|
||||
#
|
||||
|
||||
#
|
||||
# Audio decoders, processors and mixers
|
||||
#
|
||||
|
@ -5532,6 +5566,10 @@ CONFIG_VIDEO_SAA6752HS=m
|
|||
#
|
||||
CONFIG_VIDEO_M52790=m
|
||||
|
||||
#
|
||||
# SPI drivers hidden by 'Autoselect ancillary drivers'
|
||||
#
|
||||
|
||||
#
|
||||
# Media SPI Adapters
|
||||
#
|
||||
|
@ -5539,6 +5577,10 @@ CONFIG_CXD2880_SPI_DRV=m
|
|||
# end of Media SPI Adapters
|
||||
|
||||
CONFIG_MEDIA_TUNER=m
|
||||
|
||||
#
|
||||
# Tuner drivers hidden by 'Autoselect ancillary drivers'
|
||||
#
|
||||
CONFIG_MEDIA_TUNER_SIMPLE=m
|
||||
CONFIG_MEDIA_TUNER_TDA18250=m
|
||||
CONFIG_MEDIA_TUNER_TDA8290=m
|
||||
|
@ -5575,6 +5617,10 @@ CONFIG_MEDIA_TUNER_R820T=m
|
|||
CONFIG_MEDIA_TUNER_QM1D1C0042=m
|
||||
CONFIG_MEDIA_TUNER_QM1D1B0004=m
|
||||
|
||||
#
|
||||
# DVB Frontend drivers hidden by 'Autoselect ancillary drivers'
|
||||
#
|
||||
|
||||
#
|
||||
# Multistandard (satellite) frontends
|
||||
#
|
||||
|
@ -5742,6 +5788,7 @@ CONFIG_TEGRA_HOST1X=m
|
|||
CONFIG_TEGRA_HOST1X_FIREWALL=y
|
||||
CONFIG_IMX_IPUV3_CORE=m
|
||||
CONFIG_DRM=m
|
||||
CONFIG_DRM_MIPI_DBI=m
|
||||
CONFIG_DRM_MIPI_DSI=y
|
||||
CONFIG_DRM_DP_AUX_CHARDEV=y
|
||||
# CONFIG_DRM_DEBUG_SELFTEST is not set
|
||||
|
@ -5781,6 +5828,7 @@ CONFIG_DRM_RADEON_USERPTR=y
|
|||
CONFIG_DRM_AMDGPU=m
|
||||
CONFIG_DRM_AMDGPU_SI=y
|
||||
CONFIG_DRM_AMDGPU_CIK=y
|
||||
# CONFIG_DRM_AMDGPU_USERPTR is not set
|
||||
# CONFIG_DRM_AMDGPU_GART_DEBUGFS is not set
|
||||
|
||||
#
|
||||
|
@ -5882,12 +5930,6 @@ CONFIG_DRM_OMAP_ENCODER_TPD12S015=m
|
|||
CONFIG_DRM_OMAP_CONNECTOR_HDMI=m
|
||||
CONFIG_DRM_OMAP_CONNECTOR_ANALOG_TV=m
|
||||
CONFIG_DRM_OMAP_PANEL_DSI_CM=m
|
||||
CONFIG_DRM_OMAP_PANEL_SONY_ACX565AKM=m
|
||||
CONFIG_DRM_OMAP_PANEL_LGPHILIPS_LB035Q02=m
|
||||
CONFIG_DRM_OMAP_PANEL_SHARP_LS037V7DW01=m
|
||||
CONFIG_DRM_OMAP_PANEL_TPO_TD028TTEC1=m
|
||||
CONFIG_DRM_OMAP_PANEL_TPO_TD043MTEA1=m
|
||||
CONFIG_DRM_OMAP_PANEL_NEC_NL8048HL11=m
|
||||
# end of OMAPDRM External Display Device Drivers
|
||||
|
||||
CONFIG_DRM_TILCDC=m
|
||||
|
@ -5926,12 +5968,16 @@ CONFIG_DRM_PANEL_ILITEK_ILI9881C=m
|
|||
# CONFIG_DRM_PANEL_JDI_LT070ME05000 is not set
|
||||
CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04=m
|
||||
CONFIG_DRM_PANEL_SAMSUNG_LD9040=m
|
||||
CONFIG_DRM_PANEL_LG_LB035Q02=m
|
||||
CONFIG_DRM_PANEL_LG_LG4573=m
|
||||
CONFIG_DRM_PANEL_NEC_NL8048HL11=m
|
||||
CONFIG_DRM_PANEL_NOVATEK_NT39016=m
|
||||
CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO=m
|
||||
CONFIG_DRM_PANEL_ORISETECH_OTM8009A=m
|
||||
# CONFIG_DRM_PANEL_OSD_OSD101T2587_53TS is not set
|
||||
CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00=m
|
||||
CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=m
|
||||
CONFIG_DRM_PANEL_RAYDIUM_RM67191=m
|
||||
CONFIG_DRM_PANEL_RAYDIUM_RM68200=m
|
||||
CONFIG_DRM_PANEL_ROCKTECH_JH057N00900=m
|
||||
CONFIG_DRM_PANEL_RONBO_RB070D30=m
|
||||
|
@ -5942,9 +5988,13 @@ CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03=m
|
|||
CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0=m
|
||||
CONFIG_DRM_PANEL_SEIKO_43WVF1G=m
|
||||
CONFIG_DRM_PANEL_SHARP_LQ101R1SX01=m
|
||||
CONFIG_DRM_PANEL_SHARP_LS037V7DW01=m
|
||||
CONFIG_DRM_PANEL_SHARP_LS043T1LE01=m
|
||||
CONFIG_DRM_PANEL_SITRONIX_ST7701=m
|
||||
# CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set
|
||||
CONFIG_DRM_PANEL_SONY_ACX565AKM=m
|
||||
CONFIG_DRM_PANEL_TPO_TD028TTEC1=m
|
||||
CONFIG_DRM_PANEL_TPO_TD043MTEA1=m
|
||||
CONFIG_DRM_PANEL_TPO_TPG110=m
|
||||
# CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set
|
||||
# end of Display Panels
|
||||
|
@ -5977,7 +6027,7 @@ CONFIG_DRM_I2C_ADV7533=y
|
|||
CONFIG_DRM_I2C_ADV7511_CEC=y
|
||||
CONFIG_DRM_DW_HDMI=m
|
||||
CONFIG_DRM_DW_HDMI_AHB_AUDIO=m
|
||||
CONFIG_DRM_DW_HDMI_I2S_AUDIO=y
|
||||
CONFIG_DRM_DW_HDMI_I2S_AUDIO=m
|
||||
CONFIG_DRM_DW_HDMI_CEC=m
|
||||
CONFIG_DRM_DW_MIPI_DSI=m
|
||||
# end of Display Interface Bridges
|
||||
|
@ -5994,13 +6044,11 @@ CONFIG_DRM_VC4_HDMI_CEC=y
|
|||
CONFIG_DRM_ETNAVIV=m
|
||||
CONFIG_DRM_ETNAVIV_THERMAL=y
|
||||
# CONFIG_DRM_ARCPGU is not set
|
||||
# CONFIG_DRM_HISI_HIBMC is not set
|
||||
CONFIG_DRM_MXS=y
|
||||
CONFIG_DRM_MXSFB=m
|
||||
CONFIG_DRM_MESON=m
|
||||
CONFIG_DRM_MESON_DW_HDMI=m
|
||||
CONFIG_DRM_TINYDRM=m
|
||||
CONFIG_TINYDRM_MIPI_DBI=m
|
||||
# CONFIG_DRM_GM12U320 is not set
|
||||
CONFIG_TINYDRM_HX8357D=m
|
||||
CONFIG_TINYDRM_ILI9225=m
|
||||
CONFIG_TINYDRM_ILI9341=m
|
||||
|
@ -6249,6 +6297,7 @@ CONFIG_SND_YMFPCI=m
|
|||
#
|
||||
CONFIG_SND_HDA=m
|
||||
CONFIG_SND_HDA_INTEL=m
|
||||
# CONFIG_SND_HDA_INTEL_DETECT_DMIC is not set
|
||||
CONFIG_SND_HDA_TEGRA=m
|
||||
CONFIG_SND_HDA_HWDEP=y
|
||||
CONFIG_SND_HDA_RECONFIG=y
|
||||
|
@ -6273,6 +6322,7 @@ CONFIG_SND_HDA_POWER_SAVE_DEFAULT=1
|
|||
|
||||
CONFIG_SND_HDA_CORE=m
|
||||
CONFIG_SND_HDA_DSP_LOADER=y
|
||||
CONFIG_SND_HDA_ALIGNED_MMIO=y
|
||||
CONFIG_SND_HDA_COMPONENT=y
|
||||
CONFIG_SND_HDA_PREALLOC_SIZE=4096
|
||||
CONFIG_SND_ARM=y
|
||||
|
@ -6390,6 +6440,7 @@ CONFIG_SND_SOC_ODROID=m
|
|||
CONFIG_SND_SOC_ARNDALE_RT5631_ALC5631=m
|
||||
CONFIG_SND_SOC_SOF_TOPLEVEL=y
|
||||
CONFIG_SND_SOC_SOF_PCI=m
|
||||
# CONFIG_SND_SOC_SOF_OF is not set
|
||||
CONFIG_SND_SOC_SOF_OPTIONS=m
|
||||
# CONFIG_SND_SOC_SOF_NOCODEC_SUPPORT is not set
|
||||
# CONFIG_SND_SOC_SOF_STRICT_ABI_CHECKS is not set
|
||||
|
@ -6593,6 +6644,7 @@ CONFIG_SND_SOC_TSCS42XX=m
|
|||
# CONFIG_SND_SOC_TSCS454 is not set
|
||||
CONFIG_SND_SOC_TWL4030=m
|
||||
CONFIG_SND_SOC_TWL6040=m
|
||||
CONFIG_SND_SOC_UDA1334=m
|
||||
# CONFIG_SND_SOC_WM8510 is not set
|
||||
# CONFIG_SND_SOC_WM8523 is not set
|
||||
CONFIG_SND_SOC_WM8524=m
|
||||
|
@ -6667,6 +6719,7 @@ CONFIG_HID_MACALLY=m
|
|||
CONFIG_HID_PRODIKEYS=m
|
||||
CONFIG_HID_CMEDIA=m
|
||||
CONFIG_HID_CP2112=m
|
||||
# CONFIG_HID_CREATIVE_SB0540 is not set
|
||||
CONFIG_HID_CYPRESS=m
|
||||
CONFIG_HID_DRAGONRISE=m
|
||||
CONFIG_DRAGONRISE_FF=y
|
||||
|
@ -6775,6 +6828,9 @@ CONFIG_I2C_HID=m
|
|||
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_LED_TRIG=y
|
||||
CONFIG_USB_ULPI_BUS=m
|
||||
CONFIG_USB_CONN_GPIO=m
|
||||
CONFIG_USB_ARCH_HAS_HCD=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_PCI=y
|
||||
|
@ -6792,8 +6848,6 @@ CONFIG_USB_OTG_FSM=m
|
|||
CONFIG_USB_LEDS_TRIGGER_USBPORT=m
|
||||
CONFIG_USB_AUTOSUSPEND_DELAY=2
|
||||
CONFIG_USB_MON=y
|
||||
# CONFIG_USB_WUSB is not set
|
||||
# CONFIG_USB_WUSB_CBAF is not set
|
||||
|
||||
#
|
||||
# USB Host Controller Drivers
|
||||
|
@ -6833,8 +6887,6 @@ CONFIG_USB_UHCI_HCD=m
|
|||
CONFIG_USB_SL811_HCD=m
|
||||
CONFIG_USB_SL811_HCD_ISO=y
|
||||
# CONFIG_USB_R8A66597_HCD is not set
|
||||
# CONFIG_USB_WHCI_HCD is not set
|
||||
# CONFIG_USB_HWA_HCD is not set
|
||||
CONFIG_USB_IMX21_HCD=m
|
||||
# CONFIG_USB_HCD_BCMA is not set
|
||||
# CONFIG_USB_HCD_SSB is not set
|
||||
|
@ -6885,6 +6937,7 @@ CONFIG_USBIP_VHCI_NR_HCS=1
|
|||
CONFIG_USBIP_HOST=m
|
||||
CONFIG_USBIP_VUDC=m
|
||||
# CONFIG_USBIP_DEBUG is not set
|
||||
# CONFIG_USB_CDNS3 is not set
|
||||
CONFIG_USB_MUSB_HDRC=m
|
||||
# CONFIG_USB_MUSB_HOST is not set
|
||||
# CONFIG_USB_MUSB_GADGET is not set
|
||||
|
@ -7012,7 +7065,6 @@ CONFIG_USB_EMI62=m
|
|||
CONFIG_USB_EMI26=m
|
||||
CONFIG_USB_ADUTUX=m
|
||||
CONFIG_USB_SEVSEG=m
|
||||
# CONFIG_USB_RIO500 is not set
|
||||
CONFIG_USB_LEGOTOWER=m
|
||||
CONFIG_USB_LCD=m
|
||||
# CONFIG_USB_CYPRESS_CY7C63 is not set
|
||||
|
@ -7163,12 +7215,6 @@ CONFIG_TYPEC_NVIDIA_ALTMODE=m
|
|||
# end of USB Type-C Alternate Mode drivers
|
||||
|
||||
CONFIG_USB_ROLE_SWITCH=m
|
||||
CONFIG_USB_LED_TRIG=y
|
||||
CONFIG_USB_ULPI_BUS=m
|
||||
CONFIG_UWB=m
|
||||
CONFIG_UWB_HWA=m
|
||||
CONFIG_UWB_WHCI=m
|
||||
CONFIG_UWB_I1480U=m
|
||||
CONFIG_MMC=y
|
||||
CONFIG_PWRSEQ_EMMC=y
|
||||
CONFIG_PWRSEQ_SD8787=m
|
||||
|
@ -7191,6 +7237,7 @@ CONFIG_MMC_SDHCI_PCI=m
|
|||
CONFIG_MMC_RICOH_MMC=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=m
|
||||
CONFIG_MMC_SDHCI_OF_ARASAN=m
|
||||
# CONFIG_MMC_SDHCI_OF_ASPEED is not set
|
||||
# CONFIG_MMC_SDHCI_OF_AT91 is not set
|
||||
CONFIG_MMC_SDHCI_OF_ESDHC=m
|
||||
# CONFIG_MMC_SDHCI_OF_DWCMSHC is not set
|
||||
|
@ -7350,6 +7397,7 @@ CONFIG_EDAC_LEGACY_SYSFS=y
|
|||
# CONFIG_EDAC_DEBUG is not set
|
||||
CONFIG_EDAC_HIGHBANK_MC=m
|
||||
CONFIG_EDAC_HIGHBANK_L2=m
|
||||
# CONFIG_EDAC_ARMADA_XP is not set
|
||||
CONFIG_EDAC_SYNOPSYS=m
|
||||
CONFIG_RTC_LIB=y
|
||||
CONFIG_RTC_MC146818_LIB=y
|
||||
|
@ -7387,6 +7435,7 @@ CONFIG_RTC_DRV_MAX6900=m
|
|||
CONFIG_RTC_DRV_MAX8907=m
|
||||
CONFIG_RTC_DRV_MAX8997=m
|
||||
CONFIG_RTC_DRV_MAX77686=m
|
||||
CONFIG_RTC_DRV_MESON_VRTC=m
|
||||
CONFIG_RTC_DRV_RK808=m
|
||||
CONFIG_RTC_DRV_RS5C372=m
|
||||
CONFIG_RTC_DRV_ISL1208=m
|
||||
|
@ -7570,6 +7619,7 @@ CONFIG_DMA_ENGINE_RAID=y
|
|||
CONFIG_SYNC_FILE=y
|
||||
# CONFIG_SW_SYNC is not set
|
||||
CONFIG_UDMABUF=y
|
||||
# CONFIG_DMABUF_SELFTESTS is not set
|
||||
# end of DMABUF options
|
||||
|
||||
CONFIG_AUXDISPLAY=y
|
||||
|
@ -7620,6 +7670,7 @@ CONFIG_VIRTIO_MMIO=m
|
|||
#
|
||||
# end of Microsoft Hyper-V guest support
|
||||
|
||||
# CONFIG_GREYBUS is not set
|
||||
CONFIG_STAGING=y
|
||||
# CONFIG_PRISM2_USB is not set
|
||||
# CONFIG_COMEDI is not set
|
||||
|
@ -7709,7 +7760,6 @@ CONFIG_SERIO_NVEC_PS2=y
|
|||
CONFIG_NVEC_POWER=y
|
||||
CONFIG_NVEC_PAZ00=y
|
||||
CONFIG_STAGING_MEDIA=y
|
||||
# CONFIG_I2C_BCM2048 is not set
|
||||
CONFIG_VIDEO_HANTRO=m
|
||||
CONFIG_VIDEO_HANTRO_ROCKCHIP=y
|
||||
# CONFIG_VIDEO_IMX_MEDIA is not set
|
||||
|
@ -7765,13 +7815,10 @@ CONFIG_FB_TFT_UC1611=m
|
|||
CONFIG_FB_TFT_UC1701=m
|
||||
CONFIG_FB_TFT_UPD161704=m
|
||||
CONFIG_FB_TFT_WATTEROTT=m
|
||||
CONFIG_FB_FLEX=m
|
||||
CONFIG_FB_TFT_FBTFT_DEVICE=m
|
||||
# CONFIG_WILC1000_SDIO is not set
|
||||
# CONFIG_WILC1000_SPI is not set
|
||||
# CONFIG_MOST is not set
|
||||
# CONFIG_KS7010 is not set
|
||||
# CONFIG_GREYBUS is not set
|
||||
CONFIG_BCM_VIDEOCORE=m
|
||||
CONFIG_BCM2835_VCHIQ=m
|
||||
CONFIG_SND_BCM2835=m
|
||||
|
@ -7784,19 +7831,33 @@ CONFIG_VIDEO_BCM2835=m
|
|||
# end of Gasket devices
|
||||
|
||||
# CONFIG_XIL_AXIS_FIFO is not set
|
||||
# CONFIG_EROFS_FS is not set
|
||||
# CONFIG_FIELDBUS_DEV is not set
|
||||
# CONFIG_KPC2000 is not set
|
||||
# CONFIG_USB_WUSB is not set
|
||||
# CONFIG_USB_WUSB_CBAF is not set
|
||||
# CONFIG_USB_WHCI_HCD is not set
|
||||
# CONFIG_USB_HWA_HCD is not set
|
||||
CONFIG_UWB=m
|
||||
CONFIG_UWB_HWA=m
|
||||
CONFIG_UWB_WHCI=m
|
||||
CONFIG_UWB_I1480U=m
|
||||
CONFIG_EXFAT_FS=m
|
||||
CONFIG_EXFAT_DONT_MOUNT_VFAT=y
|
||||
CONFIG_EXFAT_DISCARD=y
|
||||
# CONFIG_EXFAT_DELAYED_SYNC is not set
|
||||
# CONFIG_EXFAT_KERNEL_DEBUG is not set
|
||||
# CONFIG_EXFAT_DEBUG_MSG is not set
|
||||
CONFIG_EXFAT_DEFAULT_CODEPAGE=437
|
||||
CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8"
|
||||
CONFIG_QLGE=m
|
||||
# CONFIG_GOLDFISH is not set
|
||||
CONFIG_MFD_CROS_EC=m
|
||||
CONFIG_CHROME_PLATFORMS=y
|
||||
CONFIG_CROS_EC=m
|
||||
CONFIG_CROS_EC_I2C=m
|
||||
CONFIG_CROS_EC_RPMSG=m
|
||||
CONFIG_CROS_EC_SPI=m
|
||||
CONFIG_CROS_EC_PROTO=y
|
||||
# CONFIG_CROS_EC_LIGHTBAR is not set
|
||||
CONFIG_CROS_EC_VBC=m
|
||||
# CONFIG_CROS_EC_DEBUGFS is not set
|
||||
CONFIG_CROS_EC_SYSFS=m
|
||||
CONFIG_CROS_USBPD_LOGGER=m
|
||||
CONFIG_MELLANOX_PLATFORM=y
|
||||
CONFIG_MLXREG_HOTPLUG=m
|
||||
|
@ -7887,6 +7948,7 @@ CONFIG_SDM_GCC_660=m
|
|||
# CONFIG_SDM_VIDEOCC_845 is not set
|
||||
# CONFIG_SDM_DISPCC_845 is not set
|
||||
# CONFIG_SDM_LPASSCC_845 is not set
|
||||
CONFIG_SM_GCC_8150=m
|
||||
CONFIG_SPMI_PMIC_CLKDIV=m
|
||||
CONFIG_QCOM_HFPLL=m
|
||||
CONFIG_KPSS_XCC=m
|
||||
|
@ -8038,6 +8100,7 @@ CONFIG_MESON_CANVAS=m
|
|||
# CONFIG_MESON_CLK_MEASURE is not set
|
||||
CONFIG_MESON_GX_SOCINFO=y
|
||||
# CONFIG_MESON_GX_PM_DOMAINS is not set
|
||||
CONFIG_MESON_EE_PM_DOMAINS=y
|
||||
CONFIG_MESON_MX_SOCINFO=y
|
||||
# end of Amlogic SoC drivers
|
||||
|
||||
|
@ -8087,6 +8150,7 @@ CONFIG_QCOM_WCNSS_CTRL=m
|
|||
CONFIG_ROCKCHIP_GRF=y
|
||||
CONFIG_ROCKCHIP_PM_DOMAINS=y
|
||||
CONFIG_SOC_SAMSUNG=y
|
||||
CONFIG_EXYNOS_CHIPID=y
|
||||
CONFIG_EXYNOS_PMU=y
|
||||
CONFIG_EXYNOS_PMU_ARM_DRIVERS=y
|
||||
CONFIG_EXYNOS_PM_DOMAINS=y
|
||||
|
@ -8125,6 +8189,7 @@ CONFIG_DEVFREQ_GOV_PASSIVE=m
|
|||
#
|
||||
CONFIG_ARM_EXYNOS_BUS_DEVFREQ=m
|
||||
CONFIG_ARM_TEGRA_DEVFREQ=m
|
||||
# CONFIG_ARM_TEGRA20_DEVFREQ is not set
|
||||
CONFIG_ARM_RK3399_DMC_DEVFREQ=m
|
||||
CONFIG_PM_DEVFREQ_EVENT=y
|
||||
CONFIG_DEVFREQ_EVENT_EXYNOS_NOCP=m
|
||||
|
@ -8459,6 +8524,7 @@ CONFIG_SI7020=m
|
|||
# Inertial measurement units
|
||||
#
|
||||
# CONFIG_ADIS16400 is not set
|
||||
CONFIG_ADIS16460=m
|
||||
# CONFIG_ADIS16480 is not set
|
||||
# CONFIG_BMI160_I2C is not set
|
||||
# CONFIG_BMI160_SPI is not set
|
||||
|
@ -8471,6 +8537,9 @@ CONFIG_IIO_ST_LSM6DSX_I2C=m
|
|||
CONFIG_IIO_ST_LSM6DSX_SPI=m
|
||||
# end of Inertial measurement units
|
||||
|
||||
CONFIG_IIO_ADIS_LIB=m
|
||||
CONFIG_IIO_ADIS_LIB_BUFFER=y
|
||||
|
||||
#
|
||||
# Light sensors
|
||||
#
|
||||
|
@ -8498,6 +8567,7 @@ CONFIG_RPR0521=m
|
|||
CONFIG_LV0104CS=m
|
||||
# CONFIG_MAX44000 is not set
|
||||
CONFIG_MAX44009=m
|
||||
CONFIG_NOA1305=m
|
||||
CONFIG_OPT3001=m
|
||||
CONFIG_PA12203001=m
|
||||
# CONFIG_SI1133 is not set
|
||||
|
@ -8570,6 +8640,7 @@ CONFIG_IIO_SYSFS_TRIGGER=m
|
|||
#
|
||||
CONFIG_AD5272=m
|
||||
# CONFIG_DS1803 is not set
|
||||
CONFIG_MAX5432=m
|
||||
CONFIG_MAX5481=m
|
||||
CONFIG_MAX5487=m
|
||||
CONFIG_MCP4018=m
|
||||
|
@ -8710,6 +8781,7 @@ CONFIG_RESET_MESON=y
|
|||
CONFIG_RESET_MESON_AUDIO_ARB=m
|
||||
# CONFIG_RESET_QCOM_AOSS is not set
|
||||
CONFIG_RESET_QCOM_PDC=m
|
||||
CONFIG_RESET_SCMI=y
|
||||
CONFIG_RESET_SIMPLE=y
|
||||
CONFIG_RESET_STM32MP157=y
|
||||
CONFIG_RESET_SUNXI=y
|
||||
|
@ -8945,6 +9017,7 @@ CONFIG_EXPORTFS_BLOCK_OPS=y
|
|||
CONFIG_FILE_LOCKING=y
|
||||
# CONFIG_MANDATORY_FILE_LOCKING is not set
|
||||
CONFIG_FS_ENCRYPTION=y
|
||||
# CONFIG_FS_VERITY is not set
|
||||
CONFIG_FSNOTIFY=y
|
||||
CONFIG_DNOTIFY=y
|
||||
CONFIG_INOTIFY_USER=y
|
||||
|
@ -8962,6 +9035,7 @@ CONFIG_AUTOFS4_FS=y
|
|||
CONFIG_AUTOFS_FS=y
|
||||
CONFIG_FUSE_FS=m
|
||||
# CONFIG_CUSE is not set
|
||||
# CONFIG_VIRTIO_FS is not set
|
||||
CONFIG_OVERLAY_FS=m
|
||||
# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set
|
||||
CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y
|
||||
|
@ -9104,24 +9178,7 @@ CONFIG_PSTORE_RAM=m
|
|||
CONFIG_UFS_FS=m
|
||||
# CONFIG_UFS_FS_WRITE is not set
|
||||
# CONFIG_UFS_DEBUG is not set
|
||||
CONFIG_AUFS_FS=m
|
||||
CONFIG_AUFS_BRANCH_MAX_127=y
|
||||
# CONFIG_AUFS_BRANCH_MAX_511 is not set
|
||||
# CONFIG_AUFS_BRANCH_MAX_1023 is not set
|
||||
# CONFIG_AUFS_BRANCH_MAX_32767 is not set
|
||||
CONFIG_AUFS_SBILIST=y
|
||||
# CONFIG_AUFS_HNOTIFY is not set
|
||||
# CONFIG_AUFS_EXPORT is not set
|
||||
# CONFIG_AUFS_XATTR is not set
|
||||
# CONFIG_AUFS_FHSM is not set
|
||||
# CONFIG_AUFS_RDU is not set
|
||||
# CONFIG_AUFS_DIRREN is not set
|
||||
# CONFIG_AUFS_SHWH is not set
|
||||
# CONFIG_AUFS_BR_RAMFS is not set
|
||||
# CONFIG_AUFS_BR_FUSE is not set
|
||||
CONFIG_AUFS_BR_HFSPLUS=y
|
||||
CONFIG_AUFS_BDEV_LOOP=y
|
||||
# CONFIG_AUFS_DEBUG is not set
|
||||
# CONFIG_EROFS_FS is not set
|
||||
CONFIG_NETWORK_FILESYSTEMS=y
|
||||
CONFIG_NFS_FS=m
|
||||
# CONFIG_NFS_V2 is not set
|
||||
|
@ -9151,7 +9208,6 @@ CONFIG_NFSD_BLOCKLAYOUT=y
|
|||
CONFIG_NFSD_SCSILAYOUT=y
|
||||
CONFIG_NFSD_FLEXFILELAYOUT=y
|
||||
CONFIG_NFSD_V4_SECURITY_LABEL=y
|
||||
# CONFIG_NFSD_FAULT_INJECTION is not set
|
||||
CONFIG_GRACE_PERIOD=m
|
||||
CONFIG_LOCKD=m
|
||||
CONFIG_LOCKD_V4=y
|
||||
|
@ -9281,6 +9337,7 @@ CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
|
|||
# CONFIG_SECURITY_LOADPIN is not set
|
||||
CONFIG_SECURITY_YAMA=y
|
||||
# CONFIG_SECURITY_SAFESETID is not set
|
||||
# CONFIG_SECURITY_LOCKDOWN_LSM is not set
|
||||
CONFIG_INTEGRITY=y
|
||||
CONFIG_INTEGRITY_SIGNATURE=y
|
||||
CONFIG_INTEGRITY_ASYMMETRIC_KEYS=y
|
||||
|
@ -9304,6 +9361,7 @@ CONFIG_IMA_APPRAISE=y
|
|||
# CONFIG_IMA_ARCH_POLICY is not set
|
||||
# CONFIG_IMA_APPRAISE_BUILD_POLICY is not set
|
||||
CONFIG_IMA_APPRAISE_BOOTPARAM=y
|
||||
# CONFIG_IMA_APPRAISE_MODSIG is not set
|
||||
# CONFIG_IMA_TRUSTED_KEYRING is not set
|
||||
CONFIG_IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY=y
|
||||
# CONFIG_EVM is not set
|
||||
|
@ -9384,10 +9442,7 @@ CONFIG_CRYPTO_CCM=m
|
|||
CONFIG_CRYPTO_GCM=y
|
||||
CONFIG_CRYPTO_CHACHA20POLY1305=m
|
||||
CONFIG_CRYPTO_AEGIS128=m
|
||||
CONFIG_CRYPTO_AEGIS128L=m
|
||||
CONFIG_CRYPTO_AEGIS256=m
|
||||
CONFIG_CRYPTO_MORUS640=m
|
||||
CONFIG_CRYPTO_MORUS1280=m
|
||||
CONFIG_CRYPTO_AEGIS128_SIMD=y
|
||||
CONFIG_CRYPTO_SEQIV=y
|
||||
CONFIG_CRYPTO_ECHAINIV=m
|
||||
|
||||
|
@ -9406,6 +9461,7 @@ CONFIG_CRYPTO_XTS=y
|
|||
CONFIG_CRYPTO_KEYWRAP=m
|
||||
CONFIG_CRYPTO_NHPOLY1305=m
|
||||
CONFIG_CRYPTO_ADIANTUM=m
|
||||
CONFIG_CRYPTO_ESSIV=m
|
||||
|
||||
#
|
||||
# Hash modes
|
||||
|
@ -9432,6 +9488,7 @@ CONFIG_CRYPTO_RMD160=m
|
|||
CONFIG_CRYPTO_RMD256=m
|
||||
CONFIG_CRYPTO_RMD320=m
|
||||
CONFIG_CRYPTO_SHA1=y
|
||||
CONFIG_CRYPTO_LIB_SHA256=y
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_CRYPTO_SHA512=y
|
||||
CONFIG_CRYPTO_SHA3=m
|
||||
|
@ -9443,6 +9500,7 @@ CONFIG_CRYPTO_WP512=m
|
|||
#
|
||||
# Ciphers
|
||||
#
|
||||
CONFIG_CRYPTO_LIB_AES=y
|
||||
CONFIG_CRYPTO_AES=y
|
||||
CONFIG_CRYPTO_AES_TI=m
|
||||
CONFIG_CRYPTO_ANUBIS=m
|
||||
|
@ -9454,6 +9512,7 @@ CONFIG_CRYPTO_CAMELLIA=m
|
|||
CONFIG_CRYPTO_CAST_COMMON=m
|
||||
CONFIG_CRYPTO_CAST5=m
|
||||
CONFIG_CRYPTO_CAST6=m
|
||||
CONFIG_CRYPTO_LIB_DES=m
|
||||
CONFIG_CRYPTO_DES=m
|
||||
CONFIG_CRYPTO_FCRYPT=m
|
||||
CONFIG_CRYPTO_KHAZAD=m
|
||||
|
@ -9533,6 +9592,7 @@ CONFIG_CRYPTO_DEV_VIRTIO=m
|
|||
CONFIG_CRYPTO_DEV_STM32_CRC=m
|
||||
CONFIG_CRYPTO_DEV_STM32_HASH=m
|
||||
CONFIG_CRYPTO_DEV_STM32_CRYP=m
|
||||
CONFIG_CRYPTO_DEV_SAFEXCEL=m
|
||||
CONFIG_CRYPTO_DEV_CCREE=m
|
||||
CONFIG_ASYMMETRIC_KEY_TYPE=y
|
||||
CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y
|
||||
|
@ -9701,10 +9761,9 @@ CONFIG_ENABLE_MUST_CHECK=y
|
|||
CONFIG_FRAME_WARN=1024
|
||||
CONFIG_STRIP_ASM_SYMS=y
|
||||
# CONFIG_READABLE_ASM is not set
|
||||
CONFIG_UNUSED_SYMBOLS=y
|
||||
CONFIG_DEBUG_FS=y
|
||||
# CONFIG_HEADERS_INSTALL is not set
|
||||
# CONFIG_OPTIMIZE_INLINING is not set
|
||||
CONFIG_OPTIMIZE_INLINING=y
|
||||
# CONFIG_DEBUG_SECTION_MISMATCH is not set
|
||||
CONFIG_SECTION_MISMATCH_WARN_ONLY=y
|
||||
# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
linux-meson64-current.config
|
8212
config/kernel/linux-meson64-dev.config
Normal file
8212
config/kernel/linux-meson64-dev.config
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1 +0,0 @@
|
|||
linux-mvebu64-next.config
|
5671
config/kernel/linux-mvebu64-current.config
Normal file
5671
config/kernel/linux-mvebu64-current.config
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,16 +1,17 @@
|
|||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm64 5.3.1 Kernel Configuration
|
||||
# Linux/arm64 5.4.0 Kernel Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# Compiler: aarch64-linux-gnu-gcc (Linaro GCC 7.4-2019.02) 7.4.1 20181213 [linaro-7.4-2019.02 revision 56ec6f6b99cc167ff0c2f8e1a2eed33b1edc85d4]
|
||||
# Compiler: aarch64-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)) 8.3.0
|
||||
#
|
||||
CONFIG_CC_IS_GCC=y
|
||||
CONFIG_GCC_VERSION=70401
|
||||
CONFIG_GCC_VERSION=80300
|
||||
CONFIG_CLANG_VERSION=0
|
||||
CONFIG_CC_CAN_LINK=y
|
||||
CONFIG_CC_HAS_ASM_GOTO=y
|
||||
CONFIG_CC_HAS_ASM_INLINE=y
|
||||
CONFIG_CC_HAS_WARN_MAYBE_UNINITIALIZED=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
CONFIG_BUILDTIME_EXTABLE_SORT=y
|
||||
|
@ -329,6 +330,7 @@ CONFIG_CAVIUM_ERRATUM_23144=y
|
|||
CONFIG_CAVIUM_ERRATUM_23154=y
|
||||
CONFIG_CAVIUM_ERRATUM_27456=y
|
||||
CONFIG_CAVIUM_ERRATUM_30115=y
|
||||
CONFIG_CAVIUM_TX2_ERRATUM_219=y
|
||||
CONFIG_QCOM_FALKOR_ERRATUM_1003=y
|
||||
CONFIG_ARM64_WORKAROUND_REPEAT_TLBI=y
|
||||
CONFIG_QCOM_FALKOR_ERRATUM_1009=y
|
||||
|
@ -389,6 +391,7 @@ CONFIG_HARDEN_EL2_VECTORS=y
|
|||
CONFIG_ARM64_SSBD=y
|
||||
CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
|
||||
# CONFIG_ARM64_SW_TTBR0_PAN is not set
|
||||
CONFIG_ARM64_TAGGED_ADDR_ABI=y
|
||||
CONFIG_COMPAT=y
|
||||
CONFIG_KUSER_HELPERS=y
|
||||
# CONFIG_ARMV8_DEPRECATED is not set
|
||||
|
@ -482,6 +485,7 @@ CONFIG_DT_IDLE_STATES=y
|
|||
# ARM CPU Idle Drivers
|
||||
#
|
||||
CONFIG_ARM_CPUIDLE=y
|
||||
# CONFIG_ARM_PSCI_CPUIDLE is not set
|
||||
# end of ARM CPU Idle Drivers
|
||||
# end of CPU Idle
|
||||
|
||||
|
@ -529,6 +533,7 @@ CONFIG_DMIID=y
|
|||
# CONFIG_DMI_SYSFS is not set
|
||||
# CONFIG_ISCSI_IBFT is not set
|
||||
# CONFIG_FW_CFG_SYSFS is not set
|
||||
# CONFIG_TURRIS_MOX_RWTM is not set
|
||||
CONFIG_HAVE_ARM_SMCCC=y
|
||||
CONFIG_ARM_PSCI_FW=y
|
||||
# CONFIG_ARM_PSCI_CHECKER is not set
|
||||
|
@ -646,6 +651,7 @@ CONFIG_JUMP_LABEL=y
|
|||
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
|
||||
CONFIG_HAVE_KPROBES=y
|
||||
CONFIG_HAVE_KRETPROBES=y
|
||||
CONFIG_HAVE_FUNCTION_ERROR_INJECTION=y
|
||||
CONFIG_HAVE_NMI=y
|
||||
CONFIG_HAVE_ARCH_TRACEHOOK=y
|
||||
CONFIG_HAVE_DMA_CONTIGUOUS=y
|
||||
|
@ -656,6 +662,7 @@ CONFIG_ARCH_HAS_KEEPINITRD=y
|
|||
CONFIG_ARCH_HAS_SET_MEMORY=y
|
||||
CONFIG_ARCH_HAS_SET_DIRECT_MAP=y
|
||||
CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y
|
||||
CONFIG_HAVE_ASM_MODVERSIONS=y
|
||||
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
|
||||
CONFIG_HAVE_RSEQ=y
|
||||
CONFIG_HAVE_FUNCTION_ARG_ACCESS_API=y
|
||||
|
@ -690,6 +697,7 @@ CONFIG_HAVE_ARCH_MMAP_RND_BITS=y
|
|||
CONFIG_ARCH_MMAP_RND_BITS=18
|
||||
CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y
|
||||
CONFIG_ARCH_MMAP_RND_COMPAT_BITS=11
|
||||
CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_OLD_SIGSUSPEND3=y
|
||||
CONFIG_COMPAT_OLD_SIGACTION=y
|
||||
|
@ -727,6 +735,8 @@ CONFIG_MODULE_UNLOAD=y
|
|||
# CONFIG_MODULE_SRCVERSION_ALL is not set
|
||||
# CONFIG_MODULE_SIG is not set
|
||||
# CONFIG_MODULE_COMPRESS is not set
|
||||
# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set
|
||||
# CONFIG_UNUSED_SYMBOLS is not set
|
||||
# CONFIG_TRIM_UNUSED_KSYMS is not set
|
||||
CONFIG_MODULES_TREE_LOOKUP=y
|
||||
CONFIG_BLOCK=y
|
||||
|
@ -740,6 +750,7 @@ CONFIG_BLK_DEV_THROTTLING=y
|
|||
CONFIG_BLK_CMDLINE_PARSER=y
|
||||
# CONFIG_BLK_WBT is not set
|
||||
# CONFIG_BLK_CGROUP_IOLATENCY is not set
|
||||
# CONFIG_BLK_CGROUP_IOCOST is not set
|
||||
CONFIG_BLK_DEBUG_FS=y
|
||||
# CONFIG_BLK_SED_OPAL is not set
|
||||
|
||||
|
@ -844,6 +855,7 @@ CONFIG_ARCH_HAS_PTE_DEVMAP=y
|
|||
CONFIG_FRAME_VECTOR=y
|
||||
# CONFIG_PERCPU_STATS is not set
|
||||
# CONFIG_GUP_BENCHMARK is not set
|
||||
# CONFIG_READ_ONLY_THP_FOR_FS is not set
|
||||
CONFIG_ARCH_HAS_PTE_SPECIAL=y
|
||||
# end of Memory Management options
|
||||
|
||||
|
@ -1386,9 +1398,7 @@ CONFIG_NET_DSA_TAG_GSWIP=m
|
|||
CONFIG_NET_DSA_TAG_DSA=m
|
||||
CONFIG_NET_DSA_TAG_EDSA=m
|
||||
CONFIG_NET_DSA_TAG_MTK=m
|
||||
CONFIG_NET_DSA_TAG_KSZ_COMMON=m
|
||||
CONFIG_NET_DSA_TAG_KSZ=m
|
||||
CONFIG_NET_DSA_TAG_KSZ9477=m
|
||||
CONFIG_NET_DSA_TAG_QCA=m
|
||||
CONFIG_NET_DSA_TAG_LAN9303=m
|
||||
CONFIG_NET_DSA_TAG_SJA1105=m
|
||||
|
@ -1514,6 +1524,7 @@ CONFIG_NET_ACT_CONNMARK=m
|
|||
# CONFIG_NET_ACT_IFE is not set
|
||||
# CONFIG_NET_ACT_TUNNEL_KEY is not set
|
||||
# CONFIG_NET_ACT_CT is not set
|
||||
# CONFIG_NET_TC_SKB_EXT is not set
|
||||
CONFIG_NET_SCH_FIFO=y
|
||||
CONFIG_DCB=y
|
||||
CONFIG_DNS_RESOLVER=y
|
||||
|
@ -1566,6 +1577,7 @@ CONFIG_CAN=m
|
|||
CONFIG_CAN_RAW=m
|
||||
CONFIG_CAN_BCM=m
|
||||
CONFIG_CAN_GW=m
|
||||
CONFIG_CAN_J1939=m
|
||||
|
||||
#
|
||||
# CAN Device Drivers
|
||||
|
@ -1577,6 +1589,7 @@ CONFIG_CAN_DEV=m
|
|||
CONFIG_CAN_CALC_BITTIMING=y
|
||||
CONFIG_CAN_FLEXCAN=m
|
||||
CONFIG_CAN_GRCAN=m
|
||||
CONFIG_CAN_KVASER_PCIEFD=m
|
||||
CONFIG_CAN_XILINXCAN=m
|
||||
CONFIG_CAN_C_CAN=m
|
||||
CONFIG_CAN_C_CAN_PLATFORM=m
|
||||
|
@ -1586,15 +1599,18 @@ CONFIG_CAN_CC770_ISA=m
|
|||
CONFIG_CAN_CC770_PLATFORM=m
|
||||
# CONFIG_CAN_IFI_CANFD is not set
|
||||
CONFIG_CAN_M_CAN=m
|
||||
CONFIG_CAN_M_CAN_PLATFORM=m
|
||||
CONFIG_CAN_M_CAN_TCAN4X5X=m
|
||||
CONFIG_CAN_PEAK_PCIEFD=m
|
||||
CONFIG_CAN_SJA1000=m
|
||||
CONFIG_CAN_SJA1000_ISA=m
|
||||
CONFIG_CAN_SJA1000_PLATFORM=m
|
||||
CONFIG_CAN_EMS_PCI=m
|
||||
CONFIG_CAN_F81601=m
|
||||
CONFIG_CAN_KVASER_PCI=m
|
||||
CONFIG_CAN_PEAK_PCI=m
|
||||
CONFIG_CAN_PEAK_PCIEC=y
|
||||
CONFIG_CAN_KVASER_PCI=m
|
||||
CONFIG_CAN_PLX_PCI=m
|
||||
CONFIG_CAN_SJA1000_ISA=m
|
||||
CONFIG_CAN_SJA1000_PLATFORM=m
|
||||
CONFIG_CAN_SOFTING=m
|
||||
|
||||
#
|
||||
|
@ -1834,6 +1850,7 @@ CONFIG_PCI_HOST_GENERIC=y
|
|||
# CONFIG_PCIE_ARMADA_8K is not set
|
||||
# CONFIG_PCIE_KIRIN is not set
|
||||
# CONFIG_PCI_MESON is not set
|
||||
# CONFIG_PCIE_AL is not set
|
||||
# end of DesignWare PCI Core Support
|
||||
# end of PCI controller drivers
|
||||
|
||||
|
@ -1896,6 +1913,7 @@ CONFIG_GENERIC_ARCH_TOPOLOGY=y
|
|||
#
|
||||
CONFIG_ARM_CCI=y
|
||||
# CONFIG_BRCMSTB_GISB_ARB is not set
|
||||
# CONFIG_MOXTET is not set
|
||||
# CONFIG_SIMPLE_PM_BUS is not set
|
||||
CONFIG_VEXPRESS_CONFIG=y
|
||||
# end of Bus devices
|
||||
|
@ -1904,13 +1922,13 @@ CONFIG_VEXPRESS_CONFIG=y
|
|||
# CONFIG_GNSS is not set
|
||||
CONFIG_MTD=y
|
||||
# CONFIG_MTD_TESTS is not set
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
CONFIG_MTD_OF_PARTS=y
|
||||
# CONFIG_MTD_AR7_PARTS is not set
|
||||
|
||||
#
|
||||
# Partition parsers
|
||||
#
|
||||
# CONFIG_MTD_AR7_PARTS is not set
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
CONFIG_MTD_OF_PARTS=y
|
||||
# CONFIG_MTD_AFS_PARTS is not set
|
||||
# CONFIG_MTD_REDBOOT_PARTS is not set
|
||||
# end of Partition parsers
|
||||
|
@ -1958,7 +1976,6 @@ CONFIG_MTD_CFI_I2=y
|
|||
#
|
||||
# CONFIG_MTD_PMC551 is not set
|
||||
# CONFIG_MTD_DATAFLASH is not set
|
||||
CONFIG_MTD_M25P80=y
|
||||
# CONFIG_MTD_MCHP23K256 is not set
|
||||
# CONFIG_MTD_SST25L is not set
|
||||
# CONFIG_MTD_SLRAM is not set
|
||||
|
@ -1987,6 +2004,7 @@ CONFIG_MTD_RAW_NAND=m
|
|||
# CONFIG_MTD_NAND_CAFE is not set
|
||||
CONFIG_MTD_NAND_MARVELL=m
|
||||
# CONFIG_MTD_NAND_BRCMNAND is not set
|
||||
CONFIG_MTD_NAND_MXIC=m
|
||||
# CONFIG_MTD_NAND_GPIO is not set
|
||||
# CONFIG_MTD_NAND_PLATFORM is not set
|
||||
|
||||
|
@ -2048,6 +2066,7 @@ CONFIG_BLK_DEV_LOOP=y
|
|||
CONFIG_BLK_DEV_LOOP_MIN_COUNT=8
|
||||
CONFIG_BLK_DEV_CRYPTOLOOP=y
|
||||
CONFIG_BLK_DEV_DRBD=m
|
||||
# CONFIG_DRBD_FAULT_INJECTION is not set
|
||||
CONFIG_BLK_DEV_NBD=m
|
||||
# CONFIG_BLK_DEV_SKD is not set
|
||||
# CONFIG_BLK_DEV_SX8 is not set
|
||||
|
@ -2081,7 +2100,6 @@ CONFIG_NVME_TCP=m
|
|||
# CONFIG_AD525X_DPOT is not set
|
||||
# CONFIG_DUMMY_IRQ is not set
|
||||
# CONFIG_PHANTOM is not set
|
||||
# CONFIG_SGI_IOC4 is not set
|
||||
# CONFIG_TIFM_CORE is not set
|
||||
# CONFIG_ICS932S401 is not set
|
||||
# CONFIG_ENCLOSURE_SERVICES is not set
|
||||
|
@ -2389,6 +2407,7 @@ CONFIG_DM_CACHE=m
|
|||
CONFIG_DM_CACHE_SMQ=m
|
||||
CONFIG_DM_WRITECACHE=m
|
||||
# CONFIG_DM_ERA is not set
|
||||
CONFIG_DM_CLONE=m
|
||||
CONFIG_DM_MIRROR=m
|
||||
# CONFIG_DM_LOG_USERSPACE is not set
|
||||
CONFIG_DM_RAID=m
|
||||
|
@ -2465,12 +2484,16 @@ CONFIG_NET_DSA_LOOP=m
|
|||
# CONFIG_NET_DSA_LANTIQ_GSWIP is not set
|
||||
CONFIG_NET_DSA_MT7530=m
|
||||
# CONFIG_NET_DSA_MV88E6060 is not set
|
||||
CONFIG_NET_DSA_MICROCHIP_KSZ_COMMON=m
|
||||
# CONFIG_NET_DSA_MICROCHIP_KSZ9477 is not set
|
||||
CONFIG_NET_DSA_MICROCHIP_KSZ8795=m
|
||||
CONFIG_NET_DSA_MICROCHIP_KSZ8795_SPI=m
|
||||
CONFIG_NET_DSA_MV88E6XXX=m
|
||||
CONFIG_NET_DSA_MV88E6XXX_GLOBAL2=y
|
||||
# CONFIG_NET_DSA_MV88E6XXX_PTP is not set
|
||||
CONFIG_NET_DSA_SJA1105=m
|
||||
# CONFIG_NET_DSA_SJA1105_PTP is not set
|
||||
# CONFIG_NET_DSA_SJA1105_TAS is not set
|
||||
# CONFIG_NET_DSA_QCA8K is not set
|
||||
CONFIG_NET_DSA_REALTEK_SMI=m
|
||||
CONFIG_NET_DSA_SMSC_LAN9303=m
|
||||
|
@ -2630,10 +2653,11 @@ CONFIG_NET_VENDOR_OKI=y
|
|||
CONFIG_NET_VENDOR_PACKET_ENGINES=y
|
||||
# CONFIG_HAMACHI is not set
|
||||
# CONFIG_YELLOWFIN is not set
|
||||
CONFIG_NET_VENDOR_PENSANDO=y
|
||||
CONFIG_IONIC=m
|
||||
CONFIG_NET_VENDOR_QLOGIC=y
|
||||
# CONFIG_QLA3XXX is not set
|
||||
# CONFIG_QLCNIC is not set
|
||||
# CONFIG_QLGE is not set
|
||||
# CONFIG_NETXEN_NIC is not set
|
||||
# CONFIG_QED is not set
|
||||
CONFIG_NET_VENDOR_QUALCOMM=y
|
||||
|
@ -2716,6 +2740,7 @@ CONFIG_SWPHY=y
|
|||
# MII PHY device drivers
|
||||
#
|
||||
# CONFIG_SFP is not set
|
||||
CONFIG_ADIN_PHY=m
|
||||
# CONFIG_AMD_PHY is not set
|
||||
# CONFIG_AQUANTIA_PHY is not set
|
||||
CONFIG_AX88796B_PHY=m
|
||||
|
@ -2842,6 +2867,7 @@ CONFIG_ATH9K_WOW=y
|
|||
CONFIG_ATH9K_RFKILL=y
|
||||
CONFIG_ATH9K_CHANNEL_CONTEXT=y
|
||||
CONFIG_ATH9K_PCOEM=y
|
||||
CONFIG_ATH9K_PCI_NO_EEPROM=m
|
||||
CONFIG_ATH9K_HTC=m
|
||||
# CONFIG_ATH9K_HTC_DEBUGFS is not set
|
||||
# CONFIG_ATH9K_HWRNG is not set
|
||||
|
@ -2942,7 +2968,6 @@ CONFIG_IWLDVM=m
|
|||
CONFIG_IWLMVM=m
|
||||
CONFIG_IWLWIFI_OPMODE_MODULAR=y
|
||||
CONFIG_IWLWIFI_BCAST_FILTERING=y
|
||||
# CONFIG_IWLWIFI_PCIE_RTPM is not set
|
||||
|
||||
#
|
||||
# Debugging Options
|
||||
|
@ -3232,10 +3257,10 @@ CONFIG_SERIAL_8250_NR_UARTS=4
|
|||
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
|
||||
# CONFIG_SERIAL_8250_EXTENDED is not set
|
||||
CONFIG_SERIAL_8250_ASPEED_VUART=m
|
||||
CONFIG_SERIAL_8250_DWLIB=y
|
||||
CONFIG_SERIAL_8250_FSL=y
|
||||
CONFIG_SERIAL_8250_DW=y
|
||||
# CONFIG_SERIAL_8250_RT288X is not set
|
||||
# CONFIG_SERIAL_8250_MOXA is not set
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
|
||||
#
|
||||
|
@ -3262,6 +3287,7 @@ CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y
|
|||
# CONFIG_SERIAL_ARC is not set
|
||||
# CONFIG_SERIAL_RP2 is not set
|
||||
# CONFIG_SERIAL_FSL_LPUART is not set
|
||||
CONFIG_SERIAL_FSL_LINFLEXUART=m
|
||||
# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set
|
||||
CONFIG_SERIAL_MVEBU_UART=y
|
||||
CONFIG_SERIAL_MVEBU_CONSOLE=y
|
||||
|
@ -3292,6 +3318,8 @@ CONFIG_DEVPORT=y
|
|||
# CONFIG_XILLYBUS is not set
|
||||
# end of Character devices
|
||||
|
||||
# CONFIG_RANDOM_TRUST_BOOTLOADER is not set
|
||||
|
||||
#
|
||||
# I2C support
|
||||
#
|
||||
|
@ -3623,6 +3651,7 @@ CONFIG_SENSORS_ADT7411=m
|
|||
CONFIG_SENSORS_ADT7462=m
|
||||
CONFIG_SENSORS_ADT7470=m
|
||||
CONFIG_SENSORS_ADT7475=m
|
||||
CONFIG_SENSORS_AS370=m
|
||||
CONFIG_SENSORS_ASC7621=m
|
||||
CONFIG_SENSORS_ARM_SCPI=m
|
||||
CONFIG_SENSORS_ASPEED=m
|
||||
|
@ -3697,6 +3726,7 @@ CONFIG_PMBUS=m
|
|||
CONFIG_SENSORS_PMBUS=m
|
||||
CONFIG_SENSORS_ADM1275=m
|
||||
# CONFIG_SENSORS_IBM_CFFPS is not set
|
||||
CONFIG_SENSORS_INSPUR_IPSPS=m
|
||||
CONFIG_SENSORS_IR35221=m
|
||||
CONFIG_SENSORS_IR38064=m
|
||||
# CONFIG_SENSORS_IRPS5401 is not set
|
||||
|
@ -3732,7 +3762,6 @@ CONFIG_SENSORS_SMSC47B397=m
|
|||
CONFIG_SENSORS_STTS751=m
|
||||
CONFIG_SENSORS_SMM665=m
|
||||
CONFIG_SENSORS_ADC128D818=m
|
||||
CONFIG_SENSORS_ADS1015=m
|
||||
CONFIG_SENSORS_ADS7828=m
|
||||
CONFIG_SENSORS_ADS7871=m
|
||||
CONFIG_SENSORS_AMC6821=m
|
||||
|
@ -3826,7 +3855,6 @@ CONFIG_MFD_CORE=y
|
|||
# CONFIG_MFD_BCM590XX is not set
|
||||
# CONFIG_MFD_BD9571MWV is not set
|
||||
# CONFIG_MFD_AXP20X_I2C is not set
|
||||
# CONFIG_MFD_CROS_EC is not set
|
||||
CONFIG_MFD_MADERA=m
|
||||
CONFIG_MFD_MADERA_I2C=m
|
||||
# CONFIG_MFD_MADERA_SPI is not set
|
||||
|
@ -3964,6 +3992,7 @@ CONFIG_REGULATOR_MAX77650=m
|
|||
CONFIG_REGULATOR_PWM=m
|
||||
# CONFIG_REGULATOR_SLG51000 is not set
|
||||
# CONFIG_REGULATOR_SY8106A is not set
|
||||
CONFIG_REGULATOR_SY8824X=m
|
||||
# CONFIG_REGULATOR_TPS51632 is not set
|
||||
# CONFIG_REGULATOR_TPS62360 is not set
|
||||
# CONFIG_REGULATOR_TPS65023 is not set
|
||||
|
@ -4002,6 +4031,7 @@ CONFIG_MEDIA_SDR_SUPPORT=y
|
|||
# CONFIG_MEDIA_CONTROLLER is not set
|
||||
CONFIG_VIDEO_DEV=m
|
||||
CONFIG_VIDEO_V4L2=m
|
||||
CONFIG_VIDEO_V4L2_I2C=y
|
||||
# CONFIG_VIDEO_ADV_DEBUG is not set
|
||||
# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
|
||||
|
||||
|
@ -4399,6 +4429,7 @@ CONFIG_HID_CHICONY=y
|
|||
# CONFIG_HID_COUGAR is not set
|
||||
CONFIG_HID_MACALLY=m
|
||||
# CONFIG_HID_CMEDIA is not set
|
||||
CONFIG_HID_CREATIVE_SB0540=m
|
||||
CONFIG_HID_CYPRESS=y
|
||||
# CONFIG_HID_DRAGONRISE is not set
|
||||
# CONFIG_HID_EMS_FF is not set
|
||||
|
@ -4491,6 +4522,9 @@ CONFIG_USB_HID=y
|
|||
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USB_COMMON=y
|
||||
# CONFIG_USB_LED_TRIG is not set
|
||||
# CONFIG_USB_ULPI_BUS is not set
|
||||
# CONFIG_USB_CONN_GPIO is not set
|
||||
CONFIG_USB_ARCH_HAS_HCD=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_PCI=y
|
||||
|
@ -4507,7 +4541,6 @@ CONFIG_USB_DEFAULT_PERSIST=y
|
|||
# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set
|
||||
CONFIG_USB_AUTOSUSPEND_DELAY=2
|
||||
# CONFIG_USB_MON is not set
|
||||
# CONFIG_USB_WUSB_CBAF is not set
|
||||
|
||||
#
|
||||
# USB Host Controller Drivers
|
||||
|
@ -4577,6 +4610,10 @@ CONFIG_USB_UAS=m
|
|||
# CONFIG_USB_MDC800 is not set
|
||||
# CONFIG_USB_MICROTEK is not set
|
||||
# CONFIG_USBIP_CORE is not set
|
||||
CONFIG_USB_CDNS3=m
|
||||
# CONFIG_USB_CDNS3_GADGET is not set
|
||||
# CONFIG_USB_CDNS3_HOST is not set
|
||||
CONFIG_USB_CDNS3_PCI_WRAP=m
|
||||
# CONFIG_USB_MUSB_HDRC is not set
|
||||
# CONFIG_USB_DWC3 is not set
|
||||
# CONFIG_USB_DWC2 is not set
|
||||
|
@ -4652,7 +4689,6 @@ CONFIG_USB_SERIAL_FTDI_SIO=m
|
|||
# CONFIG_USB_EMI26 is not set
|
||||
# CONFIG_USB_ADUTUX is not set
|
||||
# CONFIG_USB_SEVSEG is not set
|
||||
# CONFIG_USB_RIO500 is not set
|
||||
# CONFIG_USB_LEGOTOWER is not set
|
||||
# CONFIG_USB_LCD is not set
|
||||
# CONFIG_USB_CYPRESS_CY7C63 is not set
|
||||
|
@ -4755,9 +4791,6 @@ CONFIG_TYPEC_FUSB302=m
|
|||
# end of USB Type-C Alternate Mode drivers
|
||||
|
||||
CONFIG_USB_ROLE_SWITCH=m
|
||||
# CONFIG_USB_LED_TRIG is not set
|
||||
# CONFIG_USB_ULPI_BUS is not set
|
||||
# CONFIG_UWB is not set
|
||||
CONFIG_MMC=y
|
||||
CONFIG_PWRSEQ_EMMC=y
|
||||
# CONFIG_PWRSEQ_SD8787 is not set
|
||||
|
@ -4778,6 +4811,7 @@ CONFIG_MMC_SDHCI=y
|
|||
CONFIG_MMC_SDHCI_ACPI=m
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
# CONFIG_MMC_SDHCI_OF_ARASAN is not set
|
||||
CONFIG_MMC_SDHCI_OF_ASPEED=m
|
||||
# CONFIG_MMC_SDHCI_OF_AT91 is not set
|
||||
# CONFIG_MMC_SDHCI_OF_DWCMSHC is not set
|
||||
# CONFIG_MMC_SDHCI_CADENCE is not set
|
||||
|
@ -4916,7 +4950,6 @@ CONFIG_RTC_DRV_PCF85363=m
|
|||
# CONFIG_RTC_DRV_PCF8563 is not set
|
||||
# CONFIG_RTC_DRV_PCF8583 is not set
|
||||
# CONFIG_RTC_DRV_M41T80 is not set
|
||||
# CONFIG_RTC_DRV_BD70528 is not set
|
||||
# CONFIG_RTC_DRV_BQ32K is not set
|
||||
# CONFIG_RTC_DRV_S35390A is not set
|
||||
# CONFIG_RTC_DRV_FM3130 is not set
|
||||
|
@ -5032,6 +5065,7 @@ CONFIG_DMA_ENGINE_RAID=y
|
|||
#
|
||||
# CONFIG_SYNC_FILE is not set
|
||||
# CONFIG_UDMABUF is not set
|
||||
CONFIG_DMABUF_SELFTESTS=m
|
||||
# end of DMABUF options
|
||||
|
||||
# CONFIG_AUXDISPLAY is not set
|
||||
|
@ -5085,6 +5119,7 @@ CONFIG_XEN_EFI=y
|
|||
CONFIG_XEN_AUTO_XLATE=y
|
||||
# end of Xen driver support
|
||||
|
||||
# CONFIG_GREYBUS is not set
|
||||
CONFIG_STAGING=y
|
||||
# CONFIG_PRISM2_USB is not set
|
||||
# CONFIG_COMEDI is not set
|
||||
|
@ -5122,7 +5157,6 @@ CONFIG_VT6656=m
|
|||
# CONFIG_WILC1000_SPI is not set
|
||||
# CONFIG_MOST is not set
|
||||
# CONFIG_KS7010 is not set
|
||||
# CONFIG_GREYBUS is not set
|
||||
# CONFIG_PI433 is not set
|
||||
|
||||
#
|
||||
|
@ -5132,9 +5166,20 @@ CONFIG_VT6656=m
|
|||
# end of Gasket devices
|
||||
|
||||
# CONFIG_XIL_AXIS_FIFO is not set
|
||||
# CONFIG_EROFS_FS is not set
|
||||
# CONFIG_FIELDBUS_DEV is not set
|
||||
# CONFIG_USB_WUSB_CBAF is not set
|
||||
# CONFIG_UWB is not set
|
||||
CONFIG_EXFAT_FS=m
|
||||
CONFIG_EXFAT_DONT_MOUNT_VFAT=y
|
||||
CONFIG_EXFAT_DISCARD=y
|
||||
# CONFIG_EXFAT_DELAYED_SYNC is not set
|
||||
# CONFIG_EXFAT_KERNEL_DEBUG is not set
|
||||
# CONFIG_EXFAT_DEBUG_MSG is not set
|
||||
CONFIG_EXFAT_DEFAULT_CODEPAGE=437
|
||||
CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8"
|
||||
# CONFIG_QLGE is not set
|
||||
# CONFIG_GOLDFISH is not set
|
||||
# CONFIG_MFD_CROS_EC is not set
|
||||
# CONFIG_CHROME_PLATFORMS is not set
|
||||
# CONFIG_MELLANOX_PLATFORM is not set
|
||||
CONFIG_CLKDEV_LOOKUP=y
|
||||
|
@ -5164,6 +5209,7 @@ CONFIG_COMMON_CLK_PWM=m
|
|||
# CONFIG_COMMON_CLK_VC5 is not set
|
||||
CONFIG_COMMON_CLK_BD718XX=m
|
||||
# CONFIG_COMMON_CLK_FIXED_MMIO is not set
|
||||
CONFIG_ARMADA_AP_CP_HELPER=y
|
||||
CONFIG_ARMADA_37XX_CLK=y
|
||||
CONFIG_ARMADA_AP806_SYSCON=y
|
||||
CONFIG_ARMADA_CP110_SYSCON=y
|
||||
|
@ -5460,6 +5506,7 @@ CONFIG_EXPORTFS=y
|
|||
CONFIG_FILE_LOCKING=y
|
||||
CONFIG_MANDATORY_FILE_LOCKING=y
|
||||
CONFIG_FS_ENCRYPTION=y
|
||||
# CONFIG_FS_VERITY is not set
|
||||
CONFIG_FSNOTIFY=y
|
||||
CONFIG_DNOTIFY=y
|
||||
CONFIG_INOTIFY_USER=y
|
||||
|
@ -5476,6 +5523,7 @@ CONFIG_AUTOFS4_FS=y
|
|||
CONFIG_AUTOFS_FS=y
|
||||
CONFIG_FUSE_FS=m
|
||||
CONFIG_CUSE=m
|
||||
# CONFIG_VIRTIO_FS is not set
|
||||
CONFIG_OVERLAY_FS=m
|
||||
# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set
|
||||
CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y
|
||||
|
@ -5571,23 +5619,7 @@ CONFIG_UBIFS_FS_SECURITY=y
|
|||
# CONFIG_PSTORE is not set
|
||||
# CONFIG_SYSV_FS is not set
|
||||
# CONFIG_UFS_FS is not set
|
||||
CONFIG_AUFS_FS=m
|
||||
CONFIG_AUFS_BRANCH_MAX_127=y
|
||||
# CONFIG_AUFS_BRANCH_MAX_511 is not set
|
||||
# CONFIG_AUFS_BRANCH_MAX_1023 is not set
|
||||
# CONFIG_AUFS_BRANCH_MAX_32767 is not set
|
||||
CONFIG_AUFS_SBILIST=y
|
||||
# CONFIG_AUFS_HNOTIFY is not set
|
||||
# CONFIG_AUFS_EXPORT is not set
|
||||
# CONFIG_AUFS_XATTR is not set
|
||||
# CONFIG_AUFS_FHSM is not set
|
||||
# CONFIG_AUFS_RDU is not set
|
||||
# CONFIG_AUFS_DIRREN is not set
|
||||
# CONFIG_AUFS_SHWH is not set
|
||||
# CONFIG_AUFS_BR_RAMFS is not set
|
||||
# CONFIG_AUFS_BR_FUSE is not set
|
||||
CONFIG_AUFS_BDEV_LOOP=y
|
||||
# CONFIG_AUFS_DEBUG is not set
|
||||
# CONFIG_EROFS_FS is not set
|
||||
CONFIG_NETWORK_FILESYSTEMS=y
|
||||
CONFIG_NFS_FS=y
|
||||
CONFIG_NFS_V2=y
|
||||
|
@ -5710,6 +5742,7 @@ CONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y
|
|||
# CONFIG_SECURITY_LOADPIN is not set
|
||||
# CONFIG_SECURITY_YAMA is not set
|
||||
# CONFIG_SECURITY_SAFESETID is not set
|
||||
# CONFIG_SECURITY_LOCKDOWN_LSM is not set
|
||||
CONFIG_INTEGRITY=y
|
||||
# CONFIG_INTEGRITY_SIGNATURE is not set
|
||||
CONFIG_INTEGRITY_AUDIT=y
|
||||
|
@ -5791,10 +5824,6 @@ CONFIG_CRYPTO_CCM=m
|
|||
CONFIG_CRYPTO_GCM=m
|
||||
# CONFIG_CRYPTO_CHACHA20POLY1305 is not set
|
||||
# CONFIG_CRYPTO_AEGIS128 is not set
|
||||
CONFIG_CRYPTO_AEGIS128L=m
|
||||
CONFIG_CRYPTO_AEGIS256=m
|
||||
CONFIG_CRYPTO_MORUS640=m
|
||||
CONFIG_CRYPTO_MORUS1280=m
|
||||
CONFIG_CRYPTO_SEQIV=y
|
||||
CONFIG_CRYPTO_ECHAINIV=m
|
||||
|
||||
|
@ -5813,6 +5842,7 @@ CONFIG_CRYPTO_XTS=y
|
|||
CONFIG_CRYPTO_KEYWRAP=m
|
||||
CONFIG_CRYPTO_NHPOLY1305=m
|
||||
# CONFIG_CRYPTO_ADIANTUM is not set
|
||||
CONFIG_CRYPTO_ESSIV=m
|
||||
|
||||
#
|
||||
# Hash modes
|
||||
|
@ -5839,6 +5869,7 @@ CONFIG_CRYPTO_RMD160=y
|
|||
CONFIG_CRYPTO_RMD256=m
|
||||
CONFIG_CRYPTO_RMD320=m
|
||||
CONFIG_CRYPTO_SHA1=y
|
||||
CONFIG_CRYPTO_LIB_SHA256=y
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_CRYPTO_SHA512=y
|
||||
CONFIG_CRYPTO_SHA3=m
|
||||
|
@ -5850,6 +5881,7 @@ CONFIG_CRYPTO_WP512=y
|
|||
#
|
||||
# Ciphers
|
||||
#
|
||||
CONFIG_CRYPTO_LIB_AES=y
|
||||
CONFIG_CRYPTO_AES=y
|
||||
CONFIG_CRYPTO_AES_TI=m
|
||||
CONFIG_CRYPTO_ANUBIS=m
|
||||
|
@ -5861,6 +5893,7 @@ CONFIG_CRYPTO_CAMELLIA=m
|
|||
CONFIG_CRYPTO_CAST_COMMON=m
|
||||
CONFIG_CRYPTO_CAST5=m
|
||||
CONFIG_CRYPTO_CAST6=m
|
||||
CONFIG_CRYPTO_LIB_DES=m
|
||||
CONFIG_CRYPTO_DES=m
|
||||
CONFIG_CRYPTO_FCRYPT=m
|
||||
CONFIG_CRYPTO_KHAZAD=m
|
||||
|
@ -5912,6 +5945,9 @@ CONFIG_CRYPTO_DEV_VIRTIO=m
|
|||
CONFIG_CRYPTO_DEV_SAFEXCEL=m
|
||||
CONFIG_CRYPTO_DEV_CCREE=m
|
||||
# CONFIG_CRYPTO_DEV_HISI_SEC is not set
|
||||
CONFIG_CRYPTO_DEV_HISI_QM=m
|
||||
CONFIG_CRYPTO_HISI_SGL=m
|
||||
CONFIG_CRYPTO_DEV_HISI_ZIP=m
|
||||
CONFIG_ASYMMETRIC_KEY_TYPE=y
|
||||
CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y
|
||||
CONFIG_X509_CERTIFICATE_PARSER=y
|
||||
|
@ -6013,7 +6049,6 @@ CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y
|
|||
CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y
|
||||
CONFIG_ARCH_HAS_DMA_PREP_COHERENT=y
|
||||
CONFIG_ARCH_HAS_DMA_COHERENT_TO_PFN=y
|
||||
CONFIG_ARCH_HAS_DMA_MMAP_PGPROT=y
|
||||
CONFIG_SWIOTLB=y
|
||||
CONFIG_DMA_REMAP=y
|
||||
CONFIG_DMA_DIRECT_REMAP=y
|
||||
|
@ -6035,21 +6070,20 @@ CONFIG_DQL=y
|
|||
CONFIG_GLOB=y
|
||||
# CONFIG_GLOB_SELFTEST is not set
|
||||
CONFIG_NLATTR=y
|
||||
CONFIG_LRU_CACHE=m
|
||||
CONFIG_CLZ_TAB=y
|
||||
# CONFIG_IRQ_POLL is not set
|
||||
CONFIG_MPILIB=y
|
||||
CONFIG_DIMLIB=y
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_OID_REGISTRY=y
|
||||
CONFIG_UCS2_STRING=y
|
||||
CONFIG_HAVE_GENERIC_VDSO=y
|
||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
||||
CONFIG_GENERIC_COMPAT_VDSO=y
|
||||
CONFIG_CROSS_COMPILE_COMPAT_VDSO=""
|
||||
CONFIG_FONT_SUPPORT=y
|
||||
# CONFIG_FONTS is not set
|
||||
CONFIG_FONT_8x8=y
|
||||
CONFIG_FONT_8x16=y
|
||||
CONFIG_SG_SPLIT=y
|
||||
CONFIG_SG_POOL=y
|
||||
CONFIG_SBITMAP=y
|
||||
# CONFIG_STRING_SELFTEST is not set
|
||||
|
@ -6079,10 +6113,9 @@ CONFIG_ENABLE_MUST_CHECK=y
|
|||
CONFIG_FRAME_WARN=2048
|
||||
# CONFIG_STRIP_ASM_SYMS is not set
|
||||
# CONFIG_READABLE_ASM is not set
|
||||
# CONFIG_UNUSED_SYMBOLS is not set
|
||||
CONFIG_DEBUG_FS=y
|
||||
# CONFIG_HEADERS_INSTALL is not set
|
||||
# CONFIG_OPTIMIZE_INLINING is not set
|
||||
CONFIG_OPTIMIZE_INLINING=y
|
||||
# CONFIG_DEBUG_SECTION_MISMATCH is not set
|
||||
CONFIG_SECTION_MISMATCH_WARN_ONLY=y
|
||||
CONFIG_ARCH_WANT_FRAME_POINTERS=y
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
linux-mvebu64-default.config
|
6070
config/kernel/linux-mvebu64-legacy.config
Normal file
6070
config/kernel/linux-mvebu64-legacy.config
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm64 5.3.7 Kernel Configuration
|
||||
# Linux/arm64 5.4.0 Kernel Configuration
|
||||
#
|
||||
|
||||
#
|
||||
|
@ -11,6 +11,7 @@ CONFIG_GCC_VERSION=80300
|
|||
CONFIG_CLANG_VERSION=0
|
||||
CONFIG_CC_CAN_LINK=y
|
||||
CONFIG_CC_HAS_ASM_GOTO=y
|
||||
CONFIG_CC_HAS_ASM_INLINE=y
|
||||
CONFIG_CC_HAS_WARN_MAYBE_UNINITIALIZED=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
CONFIG_BUILDTIME_EXTABLE_SORT=y
|
||||
|
@ -328,6 +329,7 @@ CONFIG_ARM64_ERRATUM_1463225=y
|
|||
# CONFIG_CAVIUM_ERRATUM_23154 is not set
|
||||
# CONFIG_CAVIUM_ERRATUM_27456 is not set
|
||||
# CONFIG_CAVIUM_ERRATUM_30115 is not set
|
||||
CONFIG_CAVIUM_TX2_ERRATUM_219=y
|
||||
# CONFIG_QCOM_FALKOR_ERRATUM_1003 is not set
|
||||
CONFIG_ARM64_WORKAROUND_REPEAT_TLBI=y
|
||||
# CONFIG_QCOM_FALKOR_ERRATUM_1009 is not set
|
||||
|
@ -388,6 +390,7 @@ CONFIG_HARDEN_EL2_VECTORS=y
|
|||
CONFIG_ARM64_SSBD=y
|
||||
CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
|
||||
# CONFIG_ARM64_SW_TTBR0_PAN is not set
|
||||
CONFIG_ARM64_TAGGED_ADDR_ABI=y
|
||||
CONFIG_COMPAT=y
|
||||
CONFIG_KUSER_HELPERS=y
|
||||
# CONFIG_ARMV8_DEPRECATED is not set
|
||||
|
@ -480,6 +483,7 @@ CONFIG_DT_IDLE_STATES=y
|
|||
# ARM CPU Idle Drivers
|
||||
#
|
||||
CONFIG_ARM_CPUIDLE=y
|
||||
# CONFIG_ARM_PSCI_CPUIDLE is not set
|
||||
# end of ARM CPU Idle Drivers
|
||||
# end of CPU Idle
|
||||
|
||||
|
@ -604,6 +608,7 @@ CONFIG_JUMP_LABEL=y
|
|||
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
|
||||
CONFIG_HAVE_KPROBES=y
|
||||
CONFIG_HAVE_KRETPROBES=y
|
||||
CONFIG_HAVE_FUNCTION_ERROR_INJECTION=y
|
||||
CONFIG_HAVE_NMI=y
|
||||
CONFIG_HAVE_ARCH_TRACEHOOK=y
|
||||
CONFIG_HAVE_DMA_CONTIGUOUS=y
|
||||
|
@ -614,6 +619,7 @@ CONFIG_ARCH_HAS_KEEPINITRD=y
|
|||
CONFIG_ARCH_HAS_SET_MEMORY=y
|
||||
CONFIG_ARCH_HAS_SET_DIRECT_MAP=y
|
||||
CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y
|
||||
CONFIG_HAVE_ASM_MODVERSIONS=y
|
||||
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
|
||||
CONFIG_HAVE_RSEQ=y
|
||||
CONFIG_HAVE_FUNCTION_ARG_ACCESS_API=y
|
||||
|
@ -647,6 +653,7 @@ CONFIG_HAVE_ARCH_MMAP_RND_BITS=y
|
|||
CONFIG_ARCH_MMAP_RND_BITS=18
|
||||
CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y
|
||||
CONFIG_ARCH_MMAP_RND_COMPAT_BITS=11
|
||||
CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_OLD_SIGSUSPEND3=y
|
||||
CONFIG_COMPAT_OLD_SIGACTION=y
|
||||
|
@ -684,6 +691,8 @@ CONFIG_MODULE_UNLOAD=y
|
|||
# CONFIG_MODULE_SRCVERSION_ALL is not set
|
||||
# CONFIG_MODULE_SIG is not set
|
||||
# CONFIG_MODULE_COMPRESS is not set
|
||||
# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set
|
||||
# CONFIG_UNUSED_SYMBOLS is not set
|
||||
# CONFIG_TRIM_UNUSED_KSYMS is not set
|
||||
CONFIG_MODULES_TREE_LOOKUP=y
|
||||
CONFIG_BLOCK=y
|
||||
|
@ -697,6 +706,7 @@ CONFIG_BLK_DEV_THROTTLING=y
|
|||
# CONFIG_BLK_CMDLINE_PARSER is not set
|
||||
# CONFIG_BLK_WBT is not set
|
||||
# CONFIG_BLK_CGROUP_IOLATENCY is not set
|
||||
# CONFIG_BLK_CGROUP_IOCOST is not set
|
||||
CONFIG_BLK_DEBUG_FS=y
|
||||
# CONFIG_BLK_SED_OPAL is not set
|
||||
|
||||
|
@ -802,6 +812,7 @@ CONFIG_ARCH_HAS_PTE_DEVMAP=y
|
|||
CONFIG_FRAME_VECTOR=y
|
||||
# CONFIG_PERCPU_STATS is not set
|
||||
# CONFIG_GUP_BENCHMARK is not set
|
||||
# CONFIG_READ_ONLY_THP_FOR_FS is not set
|
||||
CONFIG_ARCH_HAS_PTE_SPECIAL=y
|
||||
# end of Memory Management options
|
||||
|
||||
|
@ -1398,6 +1409,7 @@ CONFIG_NET_ACT_CT=m
|
|||
CONFIG_NET_IFE_SKBMARK=m
|
||||
CONFIG_NET_IFE_SKBPRIO=m
|
||||
CONFIG_NET_IFE_SKBTCINDEX=m
|
||||
# CONFIG_NET_TC_SKB_EXT is not set
|
||||
CONFIG_NET_SCH_FIFO=y
|
||||
# CONFIG_DCB is not set
|
||||
CONFIG_DNS_RESOLVER=y
|
||||
|
@ -1594,6 +1606,7 @@ CONFIG_PCIE_ROCKCHIP_EP=y
|
|||
# CONFIG_PCI_HISI is not set
|
||||
# CONFIG_PCIE_KIRIN is not set
|
||||
# CONFIG_PCI_MESON is not set
|
||||
# CONFIG_PCIE_AL is not set
|
||||
# end of DesignWare PCI Core Support
|
||||
# end of PCI controller drivers
|
||||
|
||||
|
@ -1659,6 +1672,7 @@ CONFIG_GENERIC_ARCH_TOPOLOGY=y
|
|||
#
|
||||
CONFIG_ARM_CCI=y
|
||||
CONFIG_BRCMSTB_GISB_ARB=y
|
||||
# CONFIG_MOXTET is not set
|
||||
# CONFIG_SIMPLE_PM_BUS is not set
|
||||
CONFIG_VEXPRESS_CONFIG=y
|
||||
# end of Bus devices
|
||||
|
@ -1667,13 +1681,13 @@ CONFIG_CONNECTOR=m
|
|||
# CONFIG_GNSS is not set
|
||||
CONFIG_MTD=y
|
||||
# CONFIG_MTD_TESTS is not set
|
||||
# CONFIG_MTD_CMDLINE_PARTS is not set
|
||||
CONFIG_MTD_OF_PARTS=y
|
||||
# CONFIG_MTD_AR7_PARTS is not set
|
||||
|
||||
#
|
||||
# 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
|
||||
# CONFIG_MTD_REDBOOT_PARTS is not set
|
||||
# end of Partition parsers
|
||||
|
@ -1729,7 +1743,6 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
|
|||
#
|
||||
# CONFIG_MTD_PMC551 is not set
|
||||
# CONFIG_MTD_DATAFLASH is not set
|
||||
CONFIG_MTD_M25P80=y
|
||||
# CONFIG_MTD_MCHP23K256 is not set
|
||||
# CONFIG_MTD_SST25L is not set
|
||||
# CONFIG_MTD_SLRAM is not set
|
||||
|
@ -1824,7 +1837,6 @@ CONFIG_NVME_TARGET_FC=m
|
|||
# CONFIG_AD525X_DPOT is not set
|
||||
# CONFIG_DUMMY_IRQ is not set
|
||||
# CONFIG_PHANTOM is not set
|
||||
# CONFIG_SGI_IOC4 is not set
|
||||
# CONFIG_TIFM_CORE is not set
|
||||
# CONFIG_ICS932S401 is not set
|
||||
# CONFIG_ENCLOSURE_SERVICES is not set
|
||||
|
@ -2129,6 +2141,7 @@ CONFIG_DM_CACHE=m
|
|||
# CONFIG_DM_CACHE_SMQ is not set
|
||||
# CONFIG_DM_WRITECACHE is not set
|
||||
CONFIG_DM_ERA=m
|
||||
CONFIG_DM_CLONE=m
|
||||
CONFIG_DM_MIRROR=m
|
||||
CONFIG_DM_LOG_USERSPACE=m
|
||||
CONFIG_DM_RAID=m
|
||||
|
@ -2139,6 +2152,7 @@ CONFIG_DM_DELAY=m
|
|||
CONFIG_DM_UEVENT=y
|
||||
CONFIG_DM_FLAKEY=m
|
||||
CONFIG_DM_VERITY=m
|
||||
# CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG is not set
|
||||
CONFIG_DM_VERITY_FEC=y
|
||||
CONFIG_DM_SWITCH=m
|
||||
CONFIG_DM_LOG_WRITES=m
|
||||
|
@ -2341,10 +2355,11 @@ CONFIG_NET_VENDOR_OKI=y
|
|||
CONFIG_NET_VENDOR_PACKET_ENGINES=y
|
||||
# CONFIG_HAMACHI is not set
|
||||
# CONFIG_YELLOWFIN is not set
|
||||
CONFIG_NET_VENDOR_PENSANDO=y
|
||||
# CONFIG_IONIC is not set
|
||||
CONFIG_NET_VENDOR_QLOGIC=y
|
||||
# CONFIG_QLA3XXX is not set
|
||||
# CONFIG_QLCNIC is not set
|
||||
# CONFIG_QLGE is not set
|
||||
# CONFIG_NETXEN_NIC is not set
|
||||
# CONFIG_QED is not set
|
||||
CONFIG_NET_VENDOR_QUALCOMM=y
|
||||
|
@ -2427,6 +2442,7 @@ CONFIG_SWPHY=y
|
|||
# MII PHY device drivers
|
||||
#
|
||||
CONFIG_SFP=m
|
||||
CONFIG_ADIN_PHY=m
|
||||
# CONFIG_AMD_PHY is not set
|
||||
# CONFIG_AQUANTIA_PHY is not set
|
||||
CONFIG_AX88796B_PHY=m
|
||||
|
@ -2544,6 +2560,7 @@ CONFIG_ATH9K_PCI=y
|
|||
CONFIG_ATH9K_RFKILL=y
|
||||
# CONFIG_ATH9K_CHANNEL_CONTEXT is not set
|
||||
CONFIG_ATH9K_PCOEM=y
|
||||
CONFIG_ATH9K_PCI_NO_EEPROM=m
|
||||
CONFIG_ATH9K_HTC=m
|
||||
# CONFIG_ATH9K_HTC_DEBUGFS is not set
|
||||
# CONFIG_ATH9K_HWRNG is not set
|
||||
|
@ -2870,7 +2887,6 @@ CONFIG_INPUT_RK805_PWRKEY=y
|
|||
# CONFIG_INPUT_IMS_PCU is not set
|
||||
# CONFIG_INPUT_CMA3000 is not set
|
||||
CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
|
||||
# CONFIG_INPUT_SOC_BUTTON_ARRAY is not set
|
||||
# CONFIG_INPUT_DRV260X_HAPTICS is not set
|
||||
# CONFIG_INPUT_DRV2665_HAPTICS is not set
|
||||
# CONFIG_INPUT_DRV2667_HAPTICS is not set
|
||||
|
@ -2934,10 +2950,10 @@ CONFIG_SERIAL_8250_EXTENDED=y
|
|||
CONFIG_SERIAL_8250_SHARE_IRQ=y
|
||||
# CONFIG_SERIAL_8250_DETECT_IRQ is not set
|
||||
# CONFIG_SERIAL_8250_RSA is not set
|
||||
CONFIG_SERIAL_8250_DWLIB=y
|
||||
CONFIG_SERIAL_8250_FSL=y
|
||||
CONFIG_SERIAL_8250_DW=y
|
||||
# CONFIG_SERIAL_8250_RT288X is not set
|
||||
# CONFIG_SERIAL_8250_MOXA is not set
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
|
||||
#
|
||||
|
@ -2964,6 +2980,7 @@ CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y
|
|||
# CONFIG_SERIAL_ARC is not set
|
||||
# CONFIG_SERIAL_RP2 is not set
|
||||
# CONFIG_SERIAL_FSL_LPUART is not set
|
||||
CONFIG_SERIAL_FSL_LINFLEXUART=m
|
||||
# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set
|
||||
# end of Serial drivers
|
||||
|
||||
|
@ -2990,6 +3007,8 @@ CONFIG_DEVPORT=y
|
|||
# CONFIG_XILLYBUS is not set
|
||||
# end of Character devices
|
||||
|
||||
# CONFIG_RANDOM_TRUST_BOOTLOADER is not set
|
||||
|
||||
#
|
||||
# I2C support
|
||||
#
|
||||
|
@ -3248,6 +3267,7 @@ CONFIG_W1_MASTER_MATROX=m
|
|||
# CONFIG_W1_MASTER_DS2482 is not set
|
||||
# CONFIG_W1_MASTER_DS1WM is not set
|
||||
CONFIG_W1_MASTER_GPIO=m
|
||||
CONFIG_W1_MASTER_SGI=m
|
||||
# end of 1-wire Bus Masters
|
||||
|
||||
#
|
||||
|
@ -3266,6 +3286,7 @@ CONFIG_W1_SLAVE_DS2431=m
|
|||
CONFIG_W1_SLAVE_DS2433=m
|
||||
# CONFIG_W1_SLAVE_DS2433_CRC is not set
|
||||
# CONFIG_W1_SLAVE_DS2438 is not set
|
||||
CONFIG_W1_SLAVE_DS250X=m
|
||||
# CONFIG_W1_SLAVE_DS2780 is not set
|
||||
# CONFIG_W1_SLAVE_DS2781 is not set
|
||||
# CONFIG_W1_SLAVE_DS28E04 is not set
|
||||
|
@ -3347,6 +3368,7 @@ CONFIG_HWMON=y
|
|||
# CONFIG_SENSORS_ADT7462 is not set
|
||||
# CONFIG_SENSORS_ADT7470 is not set
|
||||
# CONFIG_SENSORS_ADT7475 is not set
|
||||
CONFIG_SENSORS_AS370=m
|
||||
# CONFIG_SENSORS_ASC7621 is not set
|
||||
CONFIG_SENSORS_ARM_SCPI=y
|
||||
# CONFIG_SENSORS_ASPEED is not set
|
||||
|
@ -3438,7 +3460,6 @@ CONFIG_SENSORS_OCC=m
|
|||
# CONFIG_SENSORS_STTS751 is not set
|
||||
# CONFIG_SENSORS_SMM665 is not set
|
||||
# CONFIG_SENSORS_ADC128D818 is not set
|
||||
# CONFIG_SENSORS_ADS1015 is not set
|
||||
# CONFIG_SENSORS_ADS7828 is not set
|
||||
# CONFIG_SENSORS_ADS7871 is not set
|
||||
# CONFIG_SENSORS_AMC6821 is not set
|
||||
|
@ -3550,8 +3571,7 @@ CONFIG_MFD_CORE=y
|
|||
# CONFIG_MFD_BCM590XX is not set
|
||||
# CONFIG_MFD_BD9571MWV is not set
|
||||
# CONFIG_MFD_AXP20X_I2C is not set
|
||||
CONFIG_MFD_CROS_EC=y
|
||||
# CONFIG_MFD_CROS_EC_CHARDEV is not set
|
||||
# CONFIG_MFD_CROS_EC_DEV is not set
|
||||
# CONFIG_MFD_MADERA is not set
|
||||
# CONFIG_PMIC_DA903X is not set
|
||||
# CONFIG_MFD_DA9052_SPI is not set
|
||||
|
@ -3687,6 +3707,7 @@ CONFIG_REGULATOR_S2MPS11=y
|
|||
# CONFIG_REGULATOR_S5M8767 is not set
|
||||
CONFIG_REGULATOR_SLG51000=m
|
||||
# CONFIG_REGULATOR_SY8106A is not set
|
||||
CONFIG_REGULATOR_SY8824X=m
|
||||
# CONFIG_REGULATOR_TPS51632 is not set
|
||||
# CONFIG_REGULATOR_TPS62360 is not set
|
||||
# CONFIG_REGULATOR_TPS65023 is not set
|
||||
|
@ -3743,6 +3764,7 @@ CONFIG_MEDIA_CONTROLLER_DVB=y
|
|||
CONFIG_VIDEO_DEV=m
|
||||
CONFIG_VIDEO_V4L2_SUBDEV_API=y
|
||||
CONFIG_VIDEO_V4L2=m
|
||||
CONFIG_VIDEO_V4L2_I2C=y
|
||||
# CONFIG_VIDEO_ADV_DEBUG is not set
|
||||
# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
|
||||
CONFIG_VIDEO_TUNER=m
|
||||
|
@ -4053,6 +4075,7 @@ CONFIG_VIDEO_OV2640=m
|
|||
# CONFIG_VIDEO_OV5647 is not set
|
||||
# CONFIG_VIDEO_OV6650 is not set
|
||||
# CONFIG_VIDEO_OV5670 is not set
|
||||
CONFIG_VIDEO_OV5675=m
|
||||
# CONFIG_VIDEO_OV5695 is not set
|
||||
# CONFIG_VIDEO_OV7251 is not set
|
||||
# CONFIG_VIDEO_OV772X is not set
|
||||
|
@ -4357,6 +4380,7 @@ CONFIG_DVB_DUMMY_FE=m
|
|||
CONFIG_VGA_ARB=y
|
||||
CONFIG_VGA_ARB_MAX_GPUS=16
|
||||
CONFIG_DRM=y
|
||||
CONFIG_DRM_MIPI_DBI=m
|
||||
CONFIG_DRM_MIPI_DSI=y
|
||||
# CONFIG_DRM_DP_AUX_CHARDEV is not set
|
||||
# CONFIG_DRM_DEBUG_MM is not set
|
||||
|
@ -4437,12 +4461,16 @@ CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D=m
|
|||
# CONFIG_DRM_PANEL_JDI_LT070ME05000 is not set
|
||||
CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04=m
|
||||
# CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set
|
||||
CONFIG_DRM_PANEL_LG_LB035Q02=m
|
||||
# CONFIG_DRM_PANEL_LG_LG4573 is not set
|
||||
CONFIG_DRM_PANEL_NEC_NL8048HL11=m
|
||||
CONFIG_DRM_PANEL_NOVATEK_NT39016=m
|
||||
CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO=m
|
||||
# CONFIG_DRM_PANEL_ORISETECH_OTM8009A is not set
|
||||
CONFIG_DRM_PANEL_OSD_OSD101T2587_53TS=m
|
||||
# CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00 is not set
|
||||
# CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set
|
||||
CONFIG_DRM_PANEL_RAYDIUM_RM67191=m
|
||||
CONFIG_DRM_PANEL_RAYDIUM_RM68200=m
|
||||
CONFIG_DRM_PANEL_ROCKTECH_JH057N00900=m
|
||||
# CONFIG_DRM_PANEL_RONBO_RB070D30 is not set
|
||||
|
@ -4453,9 +4481,13 @@ CONFIG_DRM_PANEL_SAMSUNG_S6E63M0=m
|
|||
# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set
|
||||
# CONFIG_DRM_PANEL_SEIKO_43WVF1G is not set
|
||||
# CONFIG_DRM_PANEL_SHARP_LQ101R1SX01 is not set
|
||||
CONFIG_DRM_PANEL_SHARP_LS037V7DW01=m
|
||||
# CONFIG_DRM_PANEL_SHARP_LS043T1LE01 is not set
|
||||
CONFIG_DRM_PANEL_SITRONIX_ST7701=m
|
||||
# CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set
|
||||
CONFIG_DRM_PANEL_SONY_ACX565AKM=m
|
||||
CONFIG_DRM_PANEL_TPO_TD028TTEC1=m
|
||||
CONFIG_DRM_PANEL_TPO_TD043MTEA1=m
|
||||
CONFIG_DRM_PANEL_TPO_TPG110=m
|
||||
CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA=m
|
||||
# end of Display Panels
|
||||
|
@ -4497,9 +4529,15 @@ CONFIG_DRM_DW_MIPI_DSI=m
|
|||
# CONFIG_DRM_ARCPGU is not set
|
||||
# CONFIG_DRM_HISI_HIBMC is not set
|
||||
CONFIG_DRM_HISI_KIRIN=y
|
||||
CONFIG_HISI_KIRIN_DW_DSI=y
|
||||
# CONFIG_DRM_MXSFB is not set
|
||||
# CONFIG_DRM_TINYDRM is not set
|
||||
CONFIG_DRM_GM12U320=m
|
||||
CONFIG_TINYDRM_HX8357D=m
|
||||
CONFIG_TINYDRM_ILI9225=m
|
||||
CONFIG_TINYDRM_ILI9341=m
|
||||
CONFIG_TINYDRM_MI0283QT=m
|
||||
CONFIG_TINYDRM_REPAPER=m
|
||||
CONFIG_TINYDRM_ST7586=m
|
||||
CONFIG_TINYDRM_ST7735R=m
|
||||
# CONFIG_DRM_PL111 is not set
|
||||
# CONFIG_DRM_XEN is not set
|
||||
CONFIG_DRM_LIMA=m
|
||||
|
@ -4887,6 +4925,7 @@ CONFIG_SND_SOC_TDA7419=m
|
|||
CONFIG_SND_SOC_TS3A227E=y
|
||||
# CONFIG_SND_SOC_TSCS42XX is not set
|
||||
# CONFIG_SND_SOC_TSCS454 is not set
|
||||
CONFIG_SND_SOC_UDA1334=m
|
||||
# CONFIG_SND_SOC_WM8510 is not set
|
||||
# CONFIG_SND_SOC_WM8523 is not set
|
||||
# CONFIG_SND_SOC_WM8524 is not set
|
||||
|
@ -4955,6 +4994,7 @@ CONFIG_HID_CHICONY=y
|
|||
CONFIG_HID_MACALLY=m
|
||||
# CONFIG_HID_PRODIKEYS is not set
|
||||
# CONFIG_HID_CMEDIA is not set
|
||||
CONFIG_HID_CREATIVE_SB0540=m
|
||||
CONFIG_HID_CYPRESS=y
|
||||
# CONFIG_HID_DRAGONRISE is not set
|
||||
# CONFIG_HID_EMS_FF is not set
|
||||
|
@ -5048,6 +5088,9 @@ CONFIG_USB_HID=y
|
|||
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USB_COMMON=y
|
||||
# CONFIG_USB_LED_TRIG is not set
|
||||
CONFIG_USB_ULPI_BUS=y
|
||||
CONFIG_USB_CONN_GPIO=m
|
||||
CONFIG_USB_ARCH_HAS_HCD=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_PCI=y
|
||||
|
@ -5065,7 +5108,6 @@ CONFIG_USB_OTG=y
|
|||
# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set
|
||||
CONFIG_USB_AUTOSUSPEND_DELAY=2
|
||||
# CONFIG_USB_MON is not set
|
||||
# CONFIG_USB_WUSB_CBAF is not set
|
||||
|
||||
#
|
||||
# USB Host Controller Drivers
|
||||
|
@ -5139,6 +5181,7 @@ CONFIG_USBIP_VHCI_NR_HCS=1
|
|||
CONFIG_USBIP_HOST=m
|
||||
CONFIG_USBIP_VUDC=m
|
||||
# CONFIG_USBIP_DEBUG is not set
|
||||
# CONFIG_USB_CDNS3 is not set
|
||||
# CONFIG_USB_MUSB_HDRC is not set
|
||||
CONFIG_USB_DWC3=y
|
||||
# CONFIG_USB_DWC3_ULPI is not set
|
||||
|
@ -5366,9 +5409,6 @@ CONFIG_TYPEC_DP_ALTMODE=m
|
|||
# end of USB Type-C Alternate Mode drivers
|
||||
|
||||
CONFIG_USB_ROLE_SWITCH=y
|
||||
# CONFIG_USB_LED_TRIG is not set
|
||||
CONFIG_USB_ULPI_BUS=y
|
||||
# CONFIG_UWB is not set
|
||||
CONFIG_MMC=y
|
||||
CONFIG_PWRSEQ_EMMC=y
|
||||
CONFIG_PWRSEQ_SIMPLE=y
|
||||
|
@ -5388,6 +5428,7 @@ CONFIG_MMC_SDHCI_IO_ACCESSORS=y
|
|||
# CONFIG_MMC_SDHCI_PCI is not set
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MMC_SDHCI_OF_ARASAN=y
|
||||
CONFIG_MMC_SDHCI_OF_ASPEED=m
|
||||
# CONFIG_MMC_SDHCI_OF_AT91 is not set
|
||||
# CONFIG_MMC_SDHCI_OF_DWCMSHC is not set
|
||||
CONFIG_MMC_SDHCI_CADENCE=y
|
||||
|
@ -5653,6 +5694,7 @@ CONFIG_DMA_ENGINE_RAID=y
|
|||
CONFIG_SYNC_FILE=y
|
||||
# CONFIG_SW_SYNC is not set
|
||||
# CONFIG_UDMABUF is not set
|
||||
# CONFIG_DMABUF_SELFTESTS is not set
|
||||
# end of DMABUF options
|
||||
|
||||
# CONFIG_AUXDISPLAY is not set
|
||||
|
@ -5704,6 +5746,7 @@ CONFIG_XEN_AUTO_XLATE=y
|
|||
CONFIG_XEN_FRONT_PGDIR_SHBUF=m
|
||||
# end of Xen driver support
|
||||
|
||||
# CONFIG_GREYBUS is not set
|
||||
CONFIG_STAGING=y
|
||||
# CONFIG_PRISM2_USB is not set
|
||||
# CONFIG_COMEDI is not set
|
||||
|
@ -5801,7 +5844,6 @@ CONFIG_FUSB_30X=m
|
|||
# CONFIG_WILC1000_SPI is not set
|
||||
# CONFIG_MOST is not set
|
||||
# CONFIG_KS7010 is not set
|
||||
# CONFIG_GREYBUS is not set
|
||||
# CONFIG_PI433 is not set
|
||||
|
||||
#
|
||||
|
@ -5811,13 +5853,25 @@ CONFIG_FUSB_30X=m
|
|||
# end of Gasket devices
|
||||
|
||||
# CONFIG_XIL_AXIS_FIFO is not set
|
||||
# CONFIG_EROFS_FS is not set
|
||||
CONFIG_FIELDBUS_DEV=m
|
||||
CONFIG_HMS_ANYBUSS_BUS=m
|
||||
# CONFIG_ARCX_ANYBUS_CONTROLLER is not set
|
||||
# CONFIG_HMS_PROFINET is not set
|
||||
# CONFIG_USB_WUSB_CBAF is not set
|
||||
# CONFIG_UWB is not set
|
||||
CONFIG_EXFAT_FS=m
|
||||
CONFIG_EXFAT_DONT_MOUNT_VFAT=y
|
||||
CONFIG_EXFAT_DISCARD=y
|
||||
# CONFIG_EXFAT_DELAYED_SYNC is not set
|
||||
# CONFIG_EXFAT_KERNEL_DEBUG is not set
|
||||
# CONFIG_EXFAT_DEBUG_MSG is not set
|
||||
CONFIG_EXFAT_DEFAULT_CODEPAGE=437
|
||||
CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8"
|
||||
# CONFIG_QLGE is not set
|
||||
# CONFIG_GOLDFISH is not set
|
||||
CONFIG_MFD_CROS_EC=y
|
||||
CONFIG_CHROME_PLATFORMS=y
|
||||
CONFIG_CROS_EC=y
|
||||
# CONFIG_CROS_EC_I2C is not set
|
||||
# CONFIG_CROS_EC_SPI is not set
|
||||
CONFIG_CROS_EC_PROTO=y
|
||||
|
@ -5999,8 +6053,8 @@ CONFIG_IIO=y
|
|||
CONFIG_IIO_BUFFER=y
|
||||
CONFIG_IIO_BUFFER_CB=m
|
||||
# CONFIG_IIO_BUFFER_HW_CONSUMER is not set
|
||||
CONFIG_IIO_KFIFO_BUF=m
|
||||
CONFIG_IIO_TRIGGERED_BUFFER=m
|
||||
CONFIG_IIO_KFIFO_BUF=y
|
||||
CONFIG_IIO_TRIGGERED_BUFFER=y
|
||||
# CONFIG_IIO_CONFIGFS is not set
|
||||
CONFIG_IIO_TRIGGER=y
|
||||
CONFIG_IIO_CONSUMERS_PER_TRIGGER=2
|
||||
|
@ -6024,7 +6078,6 @@ CONFIG_IIO_CONSUMERS_PER_TRIGGER=2
|
|||
# CONFIG_DMARD06 is not set
|
||||
# CONFIG_DMARD09 is not set
|
||||
# CONFIG_DMARD10 is not set
|
||||
# CONFIG_IIO_CROS_EC_ACCEL_LEGACY is not set
|
||||
# CONFIG_IIO_ST_ACCEL_3AXIS is not set
|
||||
# CONFIG_KXSD9 is not set
|
||||
# CONFIG_KXCJK1013 is not set
|
||||
|
@ -6247,6 +6300,7 @@ CONFIG_FXAS21002C_SPI=m
|
|||
# Inertial measurement units
|
||||
#
|
||||
# CONFIG_ADIS16400 is not set
|
||||
CONFIG_ADIS16460=m
|
||||
# CONFIG_ADIS16480 is not set
|
||||
# CONFIG_BMI160_I2C is not set
|
||||
# CONFIG_BMI160_SPI is not set
|
||||
|
@ -6256,6 +6310,9 @@ CONFIG_FXAS21002C_SPI=m
|
|||
# CONFIG_IIO_ST_LSM6DSX is not set
|
||||
# end of Inertial measurement units
|
||||
|
||||
CONFIG_IIO_ADIS_LIB=m
|
||||
CONFIG_IIO_ADIS_LIB_BUFFER=y
|
||||
|
||||
#
|
||||
# Light sensors
|
||||
#
|
||||
|
@ -6280,6 +6337,7 @@ CONFIG_FXAS21002C_SPI=m
|
|||
CONFIG_LV0104CS=m
|
||||
# CONFIG_MAX44000 is not set
|
||||
CONFIG_MAX44009=m
|
||||
CONFIG_NOA1305=m
|
||||
# CONFIG_OPT3001 is not set
|
||||
# CONFIG_PA12203001 is not set
|
||||
CONFIG_SI1133=m
|
||||
|
@ -6341,6 +6399,7 @@ CONFIG_SENSORS_RM3100_SPI=m
|
|||
#
|
||||
CONFIG_AD5272=m
|
||||
# CONFIG_DS1803 is not set
|
||||
CONFIG_MAX5432=m
|
||||
# CONFIG_MAX5481 is not set
|
||||
# CONFIG_MAX5487 is not set
|
||||
CONFIG_MCP4018=m
|
||||
|
@ -6581,6 +6640,7 @@ CONFIG_EXPORTFS_BLOCK_OPS=y
|
|||
CONFIG_FILE_LOCKING=y
|
||||
CONFIG_MANDATORY_FILE_LOCKING=y
|
||||
# CONFIG_FS_ENCRYPTION is not set
|
||||
# CONFIG_FS_VERITY is not set
|
||||
CONFIG_FSNOTIFY=y
|
||||
CONFIG_DNOTIFY=y
|
||||
CONFIG_INOTIFY_USER=y
|
||||
|
@ -6598,6 +6658,7 @@ CONFIG_AUTOFS4_FS=y
|
|||
CONFIG_AUTOFS_FS=y
|
||||
CONFIG_FUSE_FS=y
|
||||
CONFIG_CUSE=y
|
||||
CONFIG_VIRTIO_FS=m
|
||||
CONFIG_OVERLAY_FS=y
|
||||
# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set
|
||||
CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y
|
||||
|
@ -6710,24 +6771,7 @@ CONFIG_PSTORE_COMPRESS_DEFAULT="deflate"
|
|||
# CONFIG_PSTORE_RAM is not set
|
||||
# CONFIG_SYSV_FS is not set
|
||||
# CONFIG_UFS_FS is not set
|
||||
CONFIG_AUFS_FS=m
|
||||
CONFIG_AUFS_BRANCH_MAX_127=y
|
||||
# CONFIG_AUFS_BRANCH_MAX_511 is not set
|
||||
# CONFIG_AUFS_BRANCH_MAX_1023 is not set
|
||||
# CONFIG_AUFS_BRANCH_MAX_32767 is not set
|
||||
CONFIG_AUFS_SBILIST=y
|
||||
# CONFIG_AUFS_HNOTIFY is not set
|
||||
# CONFIG_AUFS_EXPORT is not set
|
||||
# CONFIG_AUFS_XATTR is not set
|
||||
# CONFIG_AUFS_FHSM is not set
|
||||
# CONFIG_AUFS_RDU is not set
|
||||
# CONFIG_AUFS_DIRREN is not set
|
||||
# CONFIG_AUFS_SHWH is not set
|
||||
# CONFIG_AUFS_BR_RAMFS is not set
|
||||
# CONFIG_AUFS_BR_FUSE is not set
|
||||
CONFIG_AUFS_BR_HFSPLUS=y
|
||||
CONFIG_AUFS_BDEV_LOOP=y
|
||||
# CONFIG_AUFS_DEBUG is not set
|
||||
# CONFIG_EROFS_FS is not set
|
||||
CONFIG_NETWORK_FILESYSTEMS=y
|
||||
CONFIG_NFS_FS=y
|
||||
CONFIG_NFS_V2=y
|
||||
|
@ -6756,7 +6800,6 @@ CONFIG_NFSD_BLOCKLAYOUT=y
|
|||
CONFIG_NFSD_SCSILAYOUT=y
|
||||
CONFIG_NFSD_FLEXFILELAYOUT=y
|
||||
CONFIG_NFSD_V4_SECURITY_LABEL=y
|
||||
# CONFIG_NFSD_FAULT_INJECTION is not set
|
||||
CONFIG_GRACE_PERIOD=y
|
||||
CONFIG_LOCKD=y
|
||||
CONFIG_LOCKD_V4=y
|
||||
|
@ -6867,6 +6910,7 @@ CONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y
|
|||
# CONFIG_SECURITY_LOADPIN is not set
|
||||
# CONFIG_SECURITY_YAMA is not set
|
||||
# CONFIG_SECURITY_SAFESETID is not set
|
||||
# CONFIG_SECURITY_LOCKDOWN_LSM is not set
|
||||
CONFIG_INTEGRITY=y
|
||||
# CONFIG_INTEGRITY_SIGNATURE is not set
|
||||
CONFIG_INTEGRITY_AUDIT=y
|
||||
|
@ -6948,10 +6992,7 @@ CONFIG_CRYPTO_CCM=y
|
|||
CONFIG_CRYPTO_GCM=y
|
||||
CONFIG_CRYPTO_CHACHA20POLY1305=y
|
||||
CONFIG_CRYPTO_AEGIS128=m
|
||||
CONFIG_CRYPTO_AEGIS128L=m
|
||||
CONFIG_CRYPTO_AEGIS256=m
|
||||
CONFIG_CRYPTO_MORUS640=m
|
||||
# CONFIG_CRYPTO_MORUS1280 is not set
|
||||
CONFIG_CRYPTO_AEGIS128_SIMD=y
|
||||
CONFIG_CRYPTO_SEQIV=y
|
||||
CONFIG_CRYPTO_ECHAINIV=y
|
||||
|
||||
|
@ -6970,6 +7011,7 @@ CONFIG_CRYPTO_XTS=m
|
|||
CONFIG_CRYPTO_KEYWRAP=y
|
||||
CONFIG_CRYPTO_NHPOLY1305=m
|
||||
CONFIG_CRYPTO_ADIANTUM=m
|
||||
CONFIG_CRYPTO_ESSIV=m
|
||||
|
||||
#
|
||||
# Hash modes
|
||||
|
@ -6996,6 +7038,7 @@ CONFIG_CRYPTO_RMD160=y
|
|||
CONFIG_CRYPTO_RMD256=y
|
||||
CONFIG_CRYPTO_RMD320=y
|
||||
CONFIG_CRYPTO_SHA1=y
|
||||
CONFIG_CRYPTO_LIB_SHA256=y
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_CRYPTO_SHA512=y
|
||||
CONFIG_CRYPTO_SHA3=y
|
||||
|
@ -7007,6 +7050,7 @@ CONFIG_CRYPTO_WP512=y
|
|||
#
|
||||
# Ciphers
|
||||
#
|
||||
CONFIG_CRYPTO_LIB_AES=y
|
||||
CONFIG_CRYPTO_AES=y
|
||||
CONFIG_CRYPTO_AES_TI=y
|
||||
CONFIG_CRYPTO_ANUBIS=y
|
||||
|
@ -7018,6 +7062,7 @@ CONFIG_CRYPTO_CAMELLIA=y
|
|||
CONFIG_CRYPTO_CAST_COMMON=y
|
||||
CONFIG_CRYPTO_CAST5=y
|
||||
CONFIG_CRYPTO_CAST6=y
|
||||
CONFIG_CRYPTO_LIB_DES=y
|
||||
CONFIG_CRYPTO_DES=y
|
||||
CONFIG_CRYPTO_FCRYPT=y
|
||||
CONFIG_CRYPTO_KHAZAD=y
|
||||
|
@ -7065,8 +7110,12 @@ CONFIG_CRYPTO_HW=y
|
|||
# CONFIG_CRYPTO_DEV_CAVIUM_ZIP is not set
|
||||
CONFIG_CRYPTO_DEV_ROCKCHIP=m
|
||||
CONFIG_CRYPTO_DEV_VIRTIO=m
|
||||
CONFIG_CRYPTO_DEV_SAFEXCEL=m
|
||||
CONFIG_CRYPTO_DEV_CCREE=m
|
||||
CONFIG_CRYPTO_DEV_HISI_SEC=m
|
||||
CONFIG_CRYPTO_DEV_HISI_QM=m
|
||||
CONFIG_CRYPTO_HISI_SGL=m
|
||||
CONFIG_CRYPTO_DEV_HISI_ZIP=m
|
||||
CONFIG_ASYMMETRIC_KEY_TYPE=y
|
||||
CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y
|
||||
CONFIG_X509_CERTIFICATE_PARSER=y
|
||||
|
@ -7170,7 +7219,6 @@ CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y
|
|||
CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y
|
||||
CONFIG_ARCH_HAS_DMA_PREP_COHERENT=y
|
||||
CONFIG_ARCH_HAS_DMA_COHERENT_TO_PFN=y
|
||||
CONFIG_ARCH_HAS_DMA_MMAP_PGPROT=y
|
||||
CONFIG_SWIOTLB=y
|
||||
CONFIG_DMA_REMAP=y
|
||||
CONFIG_DMA_DIRECT_REMAP=y
|
||||
|
@ -7195,14 +7243,11 @@ CONFIG_NLATTR=y
|
|||
CONFIG_CLZ_TAB=y
|
||||
# CONFIG_IRQ_POLL is not set
|
||||
CONFIG_MPILIB=y
|
||||
CONFIG_DIMLIB=y
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_OID_REGISTRY=y
|
||||
CONFIG_UCS2_STRING=y
|
||||
CONFIG_HAVE_GENERIC_VDSO=y
|
||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
||||
CONFIG_GENERIC_COMPAT_VDSO=y
|
||||
CONFIG_CROSS_COMPILE_COMPAT_VDSO=""
|
||||
CONFIG_FONT_SUPPORT=y
|
||||
# CONFIG_FONTS is not set
|
||||
CONFIG_FONT_8x8=y
|
||||
|
@ -7237,10 +7282,9 @@ CONFIG_ENABLE_MUST_CHECK=y
|
|||
CONFIG_FRAME_WARN=2048
|
||||
# CONFIG_STRIP_ASM_SYMS is not set
|
||||
# CONFIG_READABLE_ASM is not set
|
||||
# CONFIG_UNUSED_SYMBOLS is not set
|
||||
CONFIG_DEBUG_FS=y
|
||||
# CONFIG_HEADERS_INSTALL is not set
|
||||
# CONFIG_OPTIMIZE_INLINING is not set
|
||||
CONFIG_OPTIMIZE_INLINING=y
|
||||
# CONFIG_DEBUG_SECTION_MISMATCH is not set
|
||||
CONFIG_SECTION_MISMATCH_WARN_ONLY=y
|
||||
CONFIG_ARCH_WANT_FRAME_POINTERS=y
|
||||
|
|
|
@ -4,6 +4,8 @@ GOVERNOR=interactive
|
|||
SERIALCON=ttymxc0
|
||||
UBOOT_TARGET_MAP=';;SPL:SPL.sdhc u-boot.img:u-boot.img.sdhc'
|
||||
|
||||
KERNELBRANCH='branch:linux-5.4.y'
|
||||
|
||||
case $BOARD in
|
||||
|
||||
udoo)
|
||||
|
|
|
@ -18,6 +18,16 @@ CPUMIN=500000
|
|||
CPUMAX=1536000
|
||||
GOVERNOR=conservative
|
||||
|
||||
case $BRANCH in
|
||||
dev)
|
||||
|
||||
KERNELBRANCH='branch:linux-5.4.y'
|
||||
KERNELPATCHDIR='meson64-'$BRANCH
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
# this helper function includes postprocess for p212 and its variants.
|
||||
# $1 PATH for uboot blob repo
|
||||
# $2 dir name in uboot blob repo
|
||||
|
|
|
@ -42,6 +42,7 @@ case $BRANCH in
|
|||
current)
|
||||
|
||||
KERNELPATCHDIR='rockchip64-'$BRANCH
|
||||
KERNELBRANCH="branch:linux-5.4.y"
|
||||
LINUXFAMILY=rockchip64
|
||||
LINUXCONFIG='linux-rockchip64-'$BRANCH
|
||||
|
||||
|
@ -113,6 +114,7 @@ family_tweaks()
|
|||
[[ $BOARD == nanopineo4 ]] && echo "fdtfile=rockchip/rk3399-nanopi-neo4.dtb" >> $SDCARD/boot/armbianEnv.txt
|
||||
[[ $BOARD == orangepi-rk3399 ]] && echo "fdtfile=rockchip/rk3399-orangepi.dtb" >> $SDCARD/boot/armbianEnv.txt
|
||||
[[ $BOARD == roc-rk3399-pc ]] && echo "fdtfile=rockchip/rk3399-roc-pc.dtb" >> $SDCARD/boot/armbianEnv.txt
|
||||
[[ $BOARD == rockpi-4* ]] && echo "fdtfile=rockchip/rk3399-rock-pi-4.dtb" >> $SDCARD/boot/armbianEnv.txt
|
||||
|
||||
if [[ $BOARD == z28pro ]]; then
|
||||
|
||||
|
|
|
@ -32,6 +32,10 @@ case $BRANCH in
|
|||
|
||||
;;
|
||||
|
||||
dev)
|
||||
SERIALCON=ttyAML0
|
||||
BOOTSCRIPT="boot-odroid-n2-mainline.ini:boot.ini"
|
||||
;;
|
||||
esac
|
||||
|
||||
CPUMIN=504000
|
||||
|
|
|
@ -27,7 +27,7 @@ fi
|
|||
|
||||
case $BRANCH in
|
||||
|
||||
legacy|default)
|
||||
legacy)
|
||||
|
||||
KERNELSOURCE='https://github.com/MarvellEmbeddedProcessors/linux-marvell.git'
|
||||
KERNELBRANCH='branch:linux-4.14.22-armada-18.06'
|
||||
|
@ -36,14 +36,14 @@ case $BRANCH in
|
|||
|
||||
;;
|
||||
|
||||
current|next)
|
||||
current)
|
||||
|
||||
KERNELBRANCH='branch:linux-4.19.y'
|
||||
|
||||
;;
|
||||
|
||||
dev)
|
||||
:
|
||||
KERNELBRANCH='branch:linux-5.4.y'
|
||||
;;
|
||||
|
||||
esac
|
||||
|
|
|
@ -51,7 +51,7 @@ compilation_prepare()
|
|||
#
|
||||
# Older versions have AUFS support with a patch
|
||||
|
||||
if linux-version compare $version ge 5.1 && [ "$AUFS" == yes ]; then
|
||||
if linux-version compare $version ge 5.1 && linux-version compare $version le 5.4 && [ "$AUFS" == yes ]; then
|
||||
|
||||
# attach to specifics tag or branch
|
||||
local aufstag=$(echo ${version} | cut -f 1-2 -d ".")
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
meson64-current
|
|
@ -0,0 +1,50 @@
|
|||
From 1cde4e7f788b4ace414c0d6274686a5812425a13 Mon Sep 17 00:00:00 2001
|
||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Date: Mon, 20 May 2019 15:37:49 +0200
|
||||
Subject: [PATCH 1/5] drm/bridge: dw-hdmi: allow ycbcr420 modes for >= 0x200a
|
||||
|
||||
Now the DW-HDMI Controller supports the HDMI2.0 modes, enable support
|
||||
for these modes in the connector if the platform supports them.
|
||||
We limit these modes to DW-HDMI IP version >= 0x200a which
|
||||
are designed to support HDMI2.0 display modes.
|
||||
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Tested-by: Heiko Stuebner <heiko@sntech.de>
|
||||
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
|
||||
---
|
||||
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 6 ++++++
|
||||
include/drm/bridge/dw_hdmi.h | 1 +
|
||||
2 files changed, 7 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
|
||||
index c6490949d9db..8c273270d7ea 100644
|
||||
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
|
||||
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
|
||||
@@ -2719,6 +2719,12 @@ __dw_hdmi_probe(struct platform_device *pdev,
|
||||
hdmi->bridge.of_node = pdev->dev.of_node;
|
||||
#endif
|
||||
|
||||
+ if (hdmi->version >= 0x200a)
|
||||
+ hdmi->connector.ycbcr_420_allowed =
|
||||
+ hdmi->plat_data->ycbcr_420_allowed;
|
||||
+ else
|
||||
+ hdmi->connector.ycbcr_420_allowed = false;
|
||||
+
|
||||
memset(&pdevinfo, 0, sizeof(pdevinfo));
|
||||
pdevinfo.parent = dev;
|
||||
pdevinfo.id = PLATFORM_DEVID_AUTO;
|
||||
diff --git a/include/drm/bridge/dw_hdmi.h b/include/drm/bridge/dw_hdmi.h
|
||||
index c402364aec0d..04e63ed29417 100644
|
||||
--- a/include/drm/bridge/dw_hdmi.h
|
||||
+++ b/include/drm/bridge/dw_hdmi.h
|
||||
@@ -126,6 +126,7 @@ struct dw_hdmi_plat_data {
|
||||
const struct drm_display_mode *mode);
|
||||
unsigned long input_bus_format;
|
||||
unsigned long input_bus_encoding;
|
||||
+ bool ycbcr_420_allowed;
|
||||
|
||||
/* Vendor PHY support */
|
||||
const struct dw_hdmi_phy_ops *phy_ops;
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,112 @@
|
|||
From 057c57825bba67e0d72c19d76a11de9da803db30 Mon Sep 17 00:00:00 2001
|
||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Date: Mon, 20 May 2019 15:37:50 +0200
|
||||
Subject: [PATCH 2/5] drm/bridge: add encoder support to specify bridge input
|
||||
format
|
||||
|
||||
This patch adds a new format_set() callback to the bridge ops permitting
|
||||
the encoder to specify the new input format and encoding.
|
||||
|
||||
This allows supporting the very specific HDMI2.0 YUV420 output mode
|
||||
when the bridge cannot convert from RGB or YUV444 to YUV420.
|
||||
|
||||
In this case, the encode must downsample before the bridge and must
|
||||
specify the bridge the new input bus format differs.
|
||||
|
||||
This will also help supporting the YUV420 mode where the bridge cannot
|
||||
downsample, and also support 10bit, 12bit and 16bit output modes
|
||||
when the bridge cannot convert between different bit depths.
|
||||
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
---
|
||||
drivers/gpu/drm/drm_bridge.c | 35 +++++++++++++++++++++++++++++++++++
|
||||
include/drm/drm_bridge.h | 19 +++++++++++++++++++
|
||||
2 files changed, 54 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c
|
||||
index cba537c99e43..a4458dbfe302 100644
|
||||
--- a/drivers/gpu/drm/drm_bridge.c
|
||||
+++ b/drivers/gpu/drm/drm_bridge.c
|
||||
@@ -307,6 +307,41 @@ void drm_bridge_mode_set(struct drm_bridge *bridge,
|
||||
}
|
||||
EXPORT_SYMBOL(drm_bridge_mode_set);
|
||||
|
||||
+/**
|
||||
+ * drm_bridge_format_set - setup with proposed input format and encoding for
|
||||
+ * all bridges in the encoder chain
|
||||
+ * @bridge: bridge control structure
|
||||
+ * @input_bus_format: proposed input bus format for the bridge
|
||||
+ * @input_encoding: proposed input encoding for this bridge
|
||||
+ *
|
||||
+ * Calls &drm_bridge_funcs.format_set op for all the bridges in the
|
||||
+ * encoder chain, starting from the first bridge to the last.
|
||||
+ *
|
||||
+ * Note: the bridge passed should be the one closest to the encoder
|
||||
+ *
|
||||
+ * RETURNS:
|
||||
+ * true on success, false if one of the bridge cannot handle the format
|
||||
+ */
|
||||
+bool drm_bridge_format_set(struct drm_bridge *bridge,
|
||||
+ const u32 input_bus_format,
|
||||
+ const u32 input_encoding)
|
||||
+{
|
||||
+ bool ret = true;
|
||||
+
|
||||
+ if (!bridge)
|
||||
+ return true;
|
||||
+
|
||||
+ if (bridge->funcs->format_set)
|
||||
+ ret = bridge->funcs->format_set(bridge, input_bus_format,
|
||||
+ input_encoding);
|
||||
+ if (!ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ return drm_bridge_format_set(bridge->next, input_bus_format,
|
||||
+ input_encoding);
|
||||
+}
|
||||
+EXPORT_SYMBOL(drm_bridge_format_set);
|
||||
+
|
||||
/**
|
||||
* drm_bridge_pre_enable - prepares for enabling all
|
||||
* bridges in the encoder chain
|
||||
diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
|
||||
index 7616f6562fe4..161026c9b908 100644
|
||||
--- a/include/drm/drm_bridge.h
|
||||
+++ b/include/drm/drm_bridge.h
|
||||
@@ -198,6 +198,22 @@ struct drm_bridge_funcs {
|
||||
void (*mode_set)(struct drm_bridge *bridge,
|
||||
const struct drm_display_mode *mode,
|
||||
const struct drm_display_mode *adjusted_mode);
|
||||
+
|
||||
+ /**
|
||||
+ * @format_set:
|
||||
+ *
|
||||
+ * This callback should configure the bridge for the given input bus
|
||||
+ * format and encoding. It is called after the @format_set callback
|
||||
+ * for the preceding element in the display pipeline has been called
|
||||
+ * already. If the bridge is the first element then this would be
|
||||
+ * &drm_encoder_helper_funcs.format_set. The display pipe (i.e.
|
||||
+ * clocks and timing signals) is off when this function is called.
|
||||
+ *
|
||||
+ * @returns: true in success, false is a bridge refuses the format
|
||||
+ */
|
||||
+ bool (*format_set)(struct drm_bridge *bridge,
|
||||
+ const u32 input_bus_format,
|
||||
+ const u32 input_encoding);
|
||||
/**
|
||||
* @pre_enable:
|
||||
*
|
||||
@@ -416,6 +432,9 @@ void drm_bridge_post_disable(struct drm_bridge *bridge);
|
||||
void drm_bridge_mode_set(struct drm_bridge *bridge,
|
||||
const struct drm_display_mode *mode,
|
||||
const struct drm_display_mode *adjusted_mode);
|
||||
+bool drm_bridge_format_set(struct drm_bridge *bridge,
|
||||
+ const u32 input_bus_format,
|
||||
+ const u32 input_encoding);
|
||||
void drm_bridge_pre_enable(struct drm_bridge *bridge);
|
||||
void drm_bridge_enable(struct drm_bridge *bridge);
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,209 @@
|
|||
From e42e927075a310f92aa5b2d7861c5ddde84a704a Mon Sep 17 00:00:00 2001
|
||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Date: Mon, 20 May 2019 15:37:51 +0200
|
||||
Subject: [PATCH 3/5] drm/bridge: dw-hdmi: Add support for dynamic output
|
||||
format setup
|
||||
|
||||
In order to support the HDMI2.0 YUV420, YUV422 and the 10bit, 12bit and
|
||||
16bits outpu use cases, add support for the recently introduced bridge
|
||||
callback format_set().
|
||||
|
||||
This callback will setup the new input format and encoding from encoder,
|
||||
then these information will be used instead of the default ones
|
||||
in the dw_hdmi_setup() function.
|
||||
|
||||
To determine the output bus format, has been added :
|
||||
- support for the connector display_info bus_formats, where a fixed
|
||||
output bus format can be enforced by the encoder
|
||||
- support for synami output bus format depending on the input format,
|
||||
especially the YUV420 input bus format, enforcing YUV420 as output
|
||||
with the correct bit depth
|
||||
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
---
|
||||
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 121 ++++++++++++++++++++--
|
||||
1 file changed, 112 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
|
||||
index 8c273270d7ea..eb02191d9f88 100644
|
||||
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
|
||||
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
|
||||
@@ -100,6 +100,8 @@ struct hdmi_vmode {
|
||||
};
|
||||
|
||||
struct hdmi_data_info {
|
||||
+ unsigned int bridge_in_bus_format;
|
||||
+ unsigned int bridge_in_encoding;
|
||||
unsigned int enc_in_bus_format;
|
||||
unsigned int enc_out_bus_format;
|
||||
unsigned int enc_in_encoding;
|
||||
@@ -1909,8 +1911,51 @@ static void hdmi_disable_overflow_interrupts(struct dw_hdmi *hdmi)
|
||||
HDMI_IH_MUTE_FC_STAT2);
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * The DW-HDMI CSC can only interpolate and decimate from 4:2:2 to 4:4:4/RGB
|
||||
+ * and from 4:4:4/RGB to 4:2:2.
|
||||
+ * Default to RGB output except if 4:2:0 as input, which CSC cannot convert.
|
||||
+ */
|
||||
+static unsigned long dw_hdmi_determine_output_bus_format(struct dw_hdmi *hdmi)
|
||||
+{
|
||||
+ unsigned int depth = hdmi_bus_fmt_color_depth(
|
||||
+ hdmi->hdmi_data.enc_in_bus_format);
|
||||
+ bool is_420 = hdmi_bus_fmt_is_yuv420(hdmi->hdmi_data.enc_in_bus_format);
|
||||
+ unsigned long fmt = MEDIA_BUS_FMT_RGB888_1X24;
|
||||
+
|
||||
+ switch (depth) {
|
||||
+ case 8:
|
||||
+ if (is_420)
|
||||
+ fmt = MEDIA_BUS_FMT_UYYVYY8_0_5X24;
|
||||
+ else
|
||||
+ fmt = MEDIA_BUS_FMT_RGB888_1X24;
|
||||
+ break;
|
||||
+ case 10:
|
||||
+ if (is_420)
|
||||
+ fmt = MEDIA_BUS_FMT_UYYVYY10_0_5X30;
|
||||
+ else
|
||||
+ fmt = MEDIA_BUS_FMT_RGB101010_1X30;
|
||||
+ break;
|
||||
+ case 12:
|
||||
+ if (is_420)
|
||||
+ fmt = MEDIA_BUS_FMT_UYYVYY12_0_5X36;
|
||||
+ else
|
||||
+ fmt = MEDIA_BUS_FMT_RGB121212_1X36;
|
||||
+ break;
|
||||
+ case 16:
|
||||
+ if (is_420)
|
||||
+ fmt = MEDIA_BUS_FMT_UYYVYY16_0_5X48;
|
||||
+ else
|
||||
+ fmt = MEDIA_BUS_FMT_RGB161616_1X48;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return fmt;
|
||||
+}
|
||||
+
|
||||
static int dw_hdmi_setup(struct dw_hdmi *hdmi, struct drm_display_mode *mode)
|
||||
{
|
||||
+ struct drm_display_info *display = &hdmi->connector.display_info;
|
||||
int ret;
|
||||
|
||||
hdmi_disable_overflow_interrupts(hdmi);
|
||||
@@ -1924,9 +1969,9 @@ static int dw_hdmi_setup(struct dw_hdmi *hdmi, struct drm_display_mode *mode)
|
||||
}
|
||||
|
||||
if ((hdmi->vic == 6) || (hdmi->vic == 7) ||
|
||||
- (hdmi->vic == 21) || (hdmi->vic == 22) ||
|
||||
- (hdmi->vic == 2) || (hdmi->vic == 3) ||
|
||||
- (hdmi->vic == 17) || (hdmi->vic == 18))
|
||||
+ (hdmi->vic == 21) || (hdmi->vic == 22) ||
|
||||
+ (hdmi->vic == 2) || (hdmi->vic == 3) ||
|
||||
+ (hdmi->vic == 17) || (hdmi->vic == 18))
|
||||
hdmi->hdmi_data.enc_out_encoding = V4L2_YCBCR_ENC_601;
|
||||
else
|
||||
hdmi->hdmi_data.enc_out_encoding = V4L2_YCBCR_ENC_709;
|
||||
@@ -1934,22 +1979,29 @@ static int dw_hdmi_setup(struct dw_hdmi *hdmi, struct drm_display_mode *mode)
|
||||
hdmi->hdmi_data.video_mode.mpixelrepetitionoutput = 0;
|
||||
hdmi->hdmi_data.video_mode.mpixelrepetitioninput = 0;
|
||||
|
||||
- /* TOFIX: Get input format from plat data or fallback to RGB888 */
|
||||
- if (hdmi->plat_data->input_bus_format)
|
||||
+ if (hdmi->hdmi_data.bridge_in_bus_format)
|
||||
+ hdmi->hdmi_data.enc_in_bus_format =
|
||||
+ hdmi->hdmi_data.bridge_in_bus_format;
|
||||
+ else if (hdmi->plat_data->input_bus_format)
|
||||
hdmi->hdmi_data.enc_in_bus_format =
|
||||
hdmi->plat_data->input_bus_format;
|
||||
else
|
||||
hdmi->hdmi_data.enc_in_bus_format = MEDIA_BUS_FMT_RGB888_1X24;
|
||||
|
||||
- /* TOFIX: Get input encoding from plat data or fallback to none */
|
||||
- if (hdmi->plat_data->input_bus_encoding)
|
||||
+ if (hdmi->hdmi_data.bridge_in_encoding)
|
||||
+ hdmi->hdmi_data.enc_in_encoding =
|
||||
+ hdmi->hdmi_data.bridge_in_encoding;
|
||||
+ else if (hdmi->plat_data->input_bus_encoding)
|
||||
hdmi->hdmi_data.enc_in_encoding =
|
||||
hdmi->plat_data->input_bus_encoding;
|
||||
else
|
||||
hdmi->hdmi_data.enc_in_encoding = V4L2_YCBCR_ENC_DEFAULT;
|
||||
|
||||
- /* TOFIX: Default to RGB888 output format */
|
||||
- hdmi->hdmi_data.enc_out_bus_format = MEDIA_BUS_FMT_RGB888_1X24;
|
||||
+ if (display->num_bus_formats)
|
||||
+ hdmi->hdmi_data.enc_out_bus_format = display->bus_formats[0];
|
||||
+ else
|
||||
+ hdmi->hdmi_data.enc_out_bus_format =
|
||||
+ dw_hdmi_determine_output_bus_format(hdmi);
|
||||
|
||||
hdmi->hdmi_data.pix_repet_factor = 0;
|
||||
hdmi->hdmi_data.hdcp_enable = 0;
|
||||
@@ -2211,6 +2263,56 @@ dw_hdmi_bridge_mode_valid(struct drm_bridge *bridge,
|
||||
return mode_status;
|
||||
}
|
||||
|
||||
+static bool dw_hdmi_drm_bridge_format_set(struct drm_bridge *bridge,
|
||||
+ const u32 input_bus_format,
|
||||
+ const u32 input_encoding)
|
||||
+{
|
||||
+ struct dw_hdmi *hdmi = bridge->driver_private;
|
||||
+
|
||||
+ /* Filter supported input bus formats */
|
||||
+ switch (input_bus_format) {
|
||||
+ case MEDIA_BUS_FMT_RGB888_1X24:
|
||||
+ case MEDIA_BUS_FMT_RGB101010_1X30:
|
||||
+ case MEDIA_BUS_FMT_RGB121212_1X36:
|
||||
+ case MEDIA_BUS_FMT_RGB161616_1X48:
|
||||
+ case MEDIA_BUS_FMT_YUV8_1X24:
|
||||
+ case MEDIA_BUS_FMT_YUV10_1X30:
|
||||
+ case MEDIA_BUS_FMT_YUV12_1X36:
|
||||
+ case MEDIA_BUS_FMT_YUV16_1X48:
|
||||
+ case MEDIA_BUS_FMT_UYVY8_1X16:
|
||||
+ case MEDIA_BUS_FMT_UYVY10_1X20:
|
||||
+ case MEDIA_BUS_FMT_UYVY12_1X24:
|
||||
+ case MEDIA_BUS_FMT_UYYVYY8_0_5X24:
|
||||
+ case MEDIA_BUS_FMT_UYYVYY10_0_5X30:
|
||||
+ case MEDIA_BUS_FMT_UYYVYY12_0_5X36:
|
||||
+ case MEDIA_BUS_FMT_UYYVYY16_0_5X48:
|
||||
+ break;
|
||||
+ default:
|
||||
+ dev_dbg(hdmi->dev, "Unsupported Input bus format %x\n",
|
||||
+ input_bus_format);
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ /* Filter supported input bus encoding */
|
||||
+ switch (input_encoding) {
|
||||
+ case V4L2_YCBCR_ENC_DEFAULT:
|
||||
+ case V4L2_YCBCR_ENC_601:
|
||||
+ case V4L2_YCBCR_ENC_709:
|
||||
+ case V4L2_YCBCR_ENC_XV601:
|
||||
+ case V4L2_YCBCR_ENC_XV709:
|
||||
+ break;
|
||||
+ default:
|
||||
+ dev_dbg(hdmi->dev, "Unsupported Input encoding %x\n",
|
||||
+ input_bus_format);
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ hdmi->hdmi_data.bridge_in_bus_format = input_bus_format;
|
||||
+ hdmi->hdmi_data.bridge_in_encoding = input_encoding;
|
||||
+
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
static void dw_hdmi_bridge_mode_set(struct drm_bridge *bridge,
|
||||
const struct drm_display_mode *orig_mode,
|
||||
const struct drm_display_mode *mode)
|
||||
@@ -2253,6 +2355,7 @@ static const struct drm_bridge_funcs dw_hdmi_bridge_funcs = {
|
||||
.disable = dw_hdmi_bridge_disable,
|
||||
.mode_set = dw_hdmi_bridge_mode_set,
|
||||
.mode_valid = dw_hdmi_bridge_mode_valid,
|
||||
+ .format_set = dw_hdmi_drm_bridge_format_set,
|
||||
};
|
||||
|
||||
static irqreturn_t dw_hdmi_i2c_irq(struct dw_hdmi *hdmi)
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,559 @@
|
|||
From e04bc0e4e7ea1f75e9d99f830a3e48bde08f976f Mon Sep 17 00:00:00 2001
|
||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Date: Mon, 20 May 2019 15:37:52 +0200
|
||||
Subject: [PATCH 4/5] drm/meson: Add YUV420 output support
|
||||
|
||||
This patch adds support for the YUV420 output from the Amlogic Meson SoCs
|
||||
Video Processing Unit to the HDMI Controller.
|
||||
|
||||
The YUV420 is obtained by generating a YUV444 pixel stream like
|
||||
the classic HDMI display modes, but then the Video Encoder output
|
||||
can be configured to down-sample the YUV444 pixel stream to a YUV420
|
||||
stream.
|
||||
In addition if pixel stream down-sampling, the Y Cb Cr components must
|
||||
also be mapped differently to align with the HDMI2.0 specifications.
|
||||
|
||||
This mode needs a different clock generation scheme since the TMDS PHY
|
||||
clock must match the 10x ration with the YUV420 pixel clock, but
|
||||
the video encoder must run at 2x the pixel clock.
|
||||
|
||||
This patch adds the TMDS PHY clock value in all the video clock setup
|
||||
in order to better support these specific uses cases and switch
|
||||
to the Common Clock framework for clocks handling in the future.
|
||||
|
||||
When 420 is needed, it calls drm_bridge_format_set() for notify the
|
||||
bridge the input format has changed to YUV420.
|
||||
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
|
||||
---
|
||||
drivers/gpu/drm/meson/meson_dw_hdmi.c | 100 +++++++++++++++++++-----
|
||||
drivers/gpu/drm/meson/meson_vclk.c | 93 ++++++++++++++++------
|
||||
drivers/gpu/drm/meson/meson_vclk.h | 7 +-
|
||||
drivers/gpu/drm/meson/meson_venc.c | 6 +-
|
||||
drivers/gpu/drm/meson/meson_venc.h | 11 +++
|
||||
drivers/gpu/drm/meson/meson_venc_cvbs.c | 3 +-
|
||||
6 files changed, 174 insertions(+), 46 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c
|
||||
index df3f9ddd2234..2ccee05de04a 100644
|
||||
--- a/drivers/gpu/drm/meson/meson_dw_hdmi.c
|
||||
+++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c
|
||||
@@ -147,6 +147,7 @@ struct meson_dw_hdmi {
|
||||
struct regulator *hdmi_supply;
|
||||
u32 irq_stat;
|
||||
struct dw_hdmi *hdmi;
|
||||
+ unsigned long input_bus_format;
|
||||
};
|
||||
#define encoder_to_meson_dw_hdmi(x) \
|
||||
container_of(x, struct meson_dw_hdmi, encoder)
|
||||
@@ -296,6 +297,10 @@ static void meson_hdmi_phy_setup_mode(struct meson_dw_hdmi *dw_hdmi,
|
||||
struct meson_drm *priv = dw_hdmi->priv;
|
||||
unsigned int pixel_clock = mode->clock;
|
||||
|
||||
+ /* For 420, pixel clock is half unlike venc clock */
|
||||
+ if (dw_hdmi->input_bus_format == MEDIA_BUS_FMT_UYYVYY8_0_5X24)
|
||||
+ pixel_clock /= 2;
|
||||
+
|
||||
if (dw_hdmi_is_compatible(dw_hdmi, "amlogic,meson-gxl-dw-hdmi") ||
|
||||
dw_hdmi_is_compatible(dw_hdmi, "amlogic,meson-gxm-dw-hdmi")) {
|
||||
if (pixel_clock >= 371250) {
|
||||
@@ -371,25 +376,36 @@ static void dw_hdmi_set_vclk(struct meson_dw_hdmi *dw_hdmi,
|
||||
{
|
||||
struct meson_drm *priv = dw_hdmi->priv;
|
||||
int vic = drm_match_cea_mode(mode);
|
||||
+ unsigned int phy_freq;
|
||||
unsigned int vclk_freq;
|
||||
unsigned int venc_freq;
|
||||
unsigned int hdmi_freq;
|
||||
|
||||
vclk_freq = mode->clock;
|
||||
|
||||
+ /* For 420, pixel clock is half unlike venc clock */
|
||||
+ if (dw_hdmi->input_bus_format == MEDIA_BUS_FMT_UYYVYY8_0_5X24)
|
||||
+ vclk_freq /= 2;
|
||||
+
|
||||
+ /* TMDS clock is pixel_clock * 10 */
|
||||
+ phy_freq = vclk_freq * 10;
|
||||
+
|
||||
if (!vic) {
|
||||
- meson_vclk_setup(priv, MESON_VCLK_TARGET_DMT, vclk_freq,
|
||||
- vclk_freq, vclk_freq, false);
|
||||
+ meson_vclk_setup(priv, MESON_VCLK_TARGET_DMT, phy_freq,
|
||||
+ vclk_freq, vclk_freq, vclk_freq, false);
|
||||
return;
|
||||
}
|
||||
|
||||
+ /* 480i/576i needs global pixel doubling */
|
||||
if (mode->flags & DRM_MODE_FLAG_DBLCLK)
|
||||
vclk_freq *= 2;
|
||||
|
||||
venc_freq = vclk_freq;
|
||||
hdmi_freq = vclk_freq;
|
||||
|
||||
- if (meson_venc_hdmi_venc_repeat(vic))
|
||||
+ /* VENC double pixels for 1080i, 720p and YUV420 modes */
|
||||
+ if (meson_venc_hdmi_venc_repeat(vic) ||
|
||||
+ dw_hdmi->input_bus_format == MEDIA_BUS_FMT_UYYVYY8_0_5X24)
|
||||
venc_freq *= 2;
|
||||
|
||||
vclk_freq = max(venc_freq, hdmi_freq);
|
||||
@@ -397,11 +413,11 @@ static void dw_hdmi_set_vclk(struct meson_dw_hdmi *dw_hdmi,
|
||||
if (mode->flags & DRM_MODE_FLAG_DBLCLK)
|
||||
venc_freq /= 2;
|
||||
|
||||
- DRM_DEBUG_DRIVER("vclk:%d venc=%d hdmi=%d enci=%d\n",
|
||||
- vclk_freq, venc_freq, hdmi_freq,
|
||||
+ DRM_DEBUG_DRIVER("vclk:%d phy=%d venc=%d hdmi=%d enci=%d\n",
|
||||
+ phy_freq, vclk_freq, venc_freq, hdmi_freq,
|
||||
priv->venc.hdmi_use_enci);
|
||||
|
||||
- meson_vclk_setup(priv, MESON_VCLK_TARGET_HDMI, vclk_freq,
|
||||
+ meson_vclk_setup(priv, MESON_VCLK_TARGET_HDMI, phy_freq, vclk_freq,
|
||||
venc_freq, hdmi_freq, priv->venc.hdmi_use_enci);
|
||||
}
|
||||
|
||||
@@ -434,8 +450,9 @@ static int dw_hdmi_phy_init(struct dw_hdmi *hdmi, void *data,
|
||||
/* Enable normal output to PHY */
|
||||
dw_hdmi->data->top_write(dw_hdmi, HDMITX_TOP_BIST_CNTL, BIT(12));
|
||||
|
||||
- /* TMDS pattern setup (TOFIX Handle the YUV420 case) */
|
||||
- if (mode->clock > 340000) {
|
||||
+ /* TMDS pattern setup */
|
||||
+ if (mode->clock > 340000 &&
|
||||
+ dw_hdmi->input_bus_format == MEDIA_BUS_FMT_YUV8_1X24) {
|
||||
dw_hdmi->data->top_write(dw_hdmi, HDMITX_TOP_TMDS_CLK_PTTN_01,
|
||||
0);
|
||||
dw_hdmi->data->top_write(dw_hdmi, HDMITX_TOP_TMDS_CLK_PTTN_23,
|
||||
@@ -610,6 +627,8 @@ dw_hdmi_mode_valid(struct drm_connector *connector,
|
||||
const struct drm_display_mode *mode)
|
||||
{
|
||||
struct meson_drm *priv = connector->dev->dev_private;
|
||||
+ bool is_hdmi2_sink = connector->display_info.hdmi.scdc.supported;
|
||||
+ unsigned int phy_freq;
|
||||
unsigned int vclk_freq;
|
||||
unsigned int venc_freq;
|
||||
unsigned int hdmi_freq;
|
||||
@@ -618,9 +637,11 @@ dw_hdmi_mode_valid(struct drm_connector *connector,
|
||||
|
||||
DRM_DEBUG_DRIVER("Modeline " DRM_MODE_FMT "\n", DRM_MODE_ARG(mode));
|
||||
|
||||
- /* If sink max TMDS clock, we reject the mode */
|
||||
+ /* If sink does not support 540MHz, reject the non-420 HDMI2 modes */
|
||||
if (connector->display_info.max_tmds_clock &&
|
||||
- mode->clock > connector->display_info.max_tmds_clock)
|
||||
+ mode->clock > connector->display_info.max_tmds_clock &&
|
||||
+ !drm_mode_is_420_only(&connector->display_info, mode) &&
|
||||
+ !drm_mode_is_420_also(&connector->display_info, mode))
|
||||
return MODE_BAD;
|
||||
|
||||
/* Check against non-VIC supported modes */
|
||||
@@ -636,6 +657,15 @@ dw_hdmi_mode_valid(struct drm_connector *connector,
|
||||
|
||||
vclk_freq = mode->clock;
|
||||
|
||||
+ /* For 420, pixel clock is half unlike venc clock */
|
||||
+ if (drm_mode_is_420_only(&connector->display_info, mode) ||
|
||||
+ (!is_hdmi2_sink &&
|
||||
+ drm_mode_is_420_also(&connector->display_info, mode)))
|
||||
+ vclk_freq /= 2;
|
||||
+
|
||||
+ /* TMDS clock is pixel_clock * 10 */
|
||||
+ phy_freq = vclk_freq * 10;
|
||||
+
|
||||
/* 480i/576i needs global pixel doubling */
|
||||
if (mode->flags & DRM_MODE_FLAG_DBLCLK)
|
||||
vclk_freq *= 2;
|
||||
@@ -643,8 +673,11 @@ dw_hdmi_mode_valid(struct drm_connector *connector,
|
||||
venc_freq = vclk_freq;
|
||||
hdmi_freq = vclk_freq;
|
||||
|
||||
- /* VENC double pixels for 1080i and 720p modes */
|
||||
- if (meson_venc_hdmi_venc_repeat(vic))
|
||||
+ /* VENC double pixels for 1080i, 720p and YUV420 modes */
|
||||
+ if (meson_venc_hdmi_venc_repeat(vic) ||
|
||||
+ drm_mode_is_420_only(&connector->display_info, mode) ||
|
||||
+ (!is_hdmi2_sink &&
|
||||
+ drm_mode_is_420_also(&connector->display_info, mode)))
|
||||
venc_freq *= 2;
|
||||
|
||||
vclk_freq = max(venc_freq, hdmi_freq);
|
||||
@@ -652,10 +685,10 @@ dw_hdmi_mode_valid(struct drm_connector *connector,
|
||||
if (mode->flags & DRM_MODE_FLAG_DBLCLK)
|
||||
venc_freq /= 2;
|
||||
|
||||
- dev_dbg(connector->dev->dev, "%s: vclk:%d venc=%d hdmi=%d\n", __func__,
|
||||
- vclk_freq, venc_freq, hdmi_freq);
|
||||
+ dev_dbg(connector->dev->dev, "%s: vclk:%d phy=%d venc=%d hdmi=%d\n",
|
||||
+ __func__, phy_freq, vclk_freq, venc_freq, hdmi_freq);
|
||||
|
||||
- return meson_vclk_vic_supported_freq(vclk_freq);
|
||||
+ return meson_vclk_vic_supported_freq(phy_freq, vclk_freq);
|
||||
}
|
||||
|
||||
/* Encoder */
|
||||
@@ -673,6 +706,24 @@ static int meson_venc_hdmi_encoder_atomic_check(struct drm_encoder *encoder,
|
||||
struct drm_crtc_state *crtc_state,
|
||||
struct drm_connector_state *conn_state)
|
||||
{
|
||||
+ struct meson_dw_hdmi *dw_hdmi = encoder_to_meson_dw_hdmi(encoder);
|
||||
+ struct drm_display_info *info = &conn_state->connector->display_info;
|
||||
+ struct drm_display_mode *mode = &crtc_state->mode;
|
||||
+ bool is_hdmi2_sink =
|
||||
+ conn_state->connector->display_info.hdmi.scdc.supported;
|
||||
+
|
||||
+ if (drm_mode_is_420_only(info, mode) ||
|
||||
+ (!is_hdmi2_sink && drm_mode_is_420_also(info, mode)))
|
||||
+ dw_hdmi->input_bus_format = MEDIA_BUS_FMT_UYYVYY8_0_5X24;
|
||||
+ else
|
||||
+ dw_hdmi->input_bus_format = MEDIA_BUS_FMT_YUV8_1X24;
|
||||
+
|
||||
+ /* Specify the encoder output format to the bridge */
|
||||
+ if (!drm_bridge_format_set(encoder->bridge,
|
||||
+ dw_hdmi->input_bus_format,
|
||||
+ V4L2_YCBCR_ENC_709))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -710,17 +761,29 @@ static void meson_venc_hdmi_encoder_mode_set(struct drm_encoder *encoder,
|
||||
struct meson_dw_hdmi *dw_hdmi = encoder_to_meson_dw_hdmi(encoder);
|
||||
struct meson_drm *priv = dw_hdmi->priv;
|
||||
int vic = drm_match_cea_mode(mode);
|
||||
+ unsigned int ycrcb_map = MESON_VENC_MAP_CB_Y_CR;
|
||||
+ bool yuv420_mode = false;
|
||||
|
||||
DRM_DEBUG_DRIVER("\"%s\" vic %d\n", mode->name, vic);
|
||||
|
||||
+ if (dw_hdmi->input_bus_format == MEDIA_BUS_FMT_UYYVYY8_0_5X24) {
|
||||
+ ycrcb_map = MESON_VENC_MAP_CR_Y_CB;
|
||||
+ yuv420_mode = true;
|
||||
+ }
|
||||
+
|
||||
/* VENC + VENC-DVI Mode setup */
|
||||
- meson_venc_hdmi_mode_set(priv, vic, mode);
|
||||
+ meson_venc_hdmi_mode_set(priv, vic, ycrcb_map, yuv420_mode, mode);
|
||||
|
||||
/* VCLK Set clock */
|
||||
dw_hdmi_set_vclk(dw_hdmi, mode);
|
||||
|
||||
- /* Setup YUV444 to HDMI-TX, no 10bit diphering */
|
||||
- writel_relaxed(0, priv->io_base + _REG(VPU_HDMI_FMT_CTRL));
|
||||
+ if (dw_hdmi->input_bus_format == MEDIA_BUS_FMT_UYYVYY8_0_5X24)
|
||||
+ /* Setup YUV420 to HDMI-TX, no 10bit diphering */
|
||||
+ writel_relaxed(2 | (2 << 2),
|
||||
+ priv->io_base + _REG(VPU_HDMI_FMT_CTRL));
|
||||
+ else
|
||||
+ /* Setup YUV444 to HDMI-TX, no 10bit diphering */
|
||||
+ writel_relaxed(0, priv->io_base + _REG(VPU_HDMI_FMT_CTRL));
|
||||
}
|
||||
|
||||
static const struct drm_encoder_helper_funcs
|
||||
@@ -965,6 +1028,7 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master,
|
||||
dw_plat_data->phy_data = meson_dw_hdmi;
|
||||
dw_plat_data->input_bus_format = MEDIA_BUS_FMT_YUV8_1X24;
|
||||
dw_plat_data->input_bus_encoding = V4L2_YCBCR_ENC_709;
|
||||
+ dw_plat_data->ycbcr_420_allowed = true;
|
||||
|
||||
platform_set_drvdata(pdev, meson_dw_hdmi);
|
||||
|
||||
diff --git a/drivers/gpu/drm/meson/meson_vclk.c b/drivers/gpu/drm/meson/meson_vclk.c
|
||||
index 26732f038d19..72100869f879 100644
|
||||
--- a/drivers/gpu/drm/meson/meson_vclk.c
|
||||
+++ b/drivers/gpu/drm/meson/meson_vclk.c
|
||||
@@ -352,12 +352,17 @@ enum {
|
||||
/* 2970 /1 /1 /1 /5 /2 => /1 /1 */
|
||||
MESON_VCLK_HDMI_297000,
|
||||
/* 5940 /1 /1 /2 /5 /1 => /1 /1 */
|
||||
- MESON_VCLK_HDMI_594000
|
||||
+ MESON_VCLK_HDMI_594000,
|
||||
+/* 2970 /1 /1 /1 /5 /1 => /1 /2 */
|
||||
+ MESON_VCLK_HDMI_594000_YUV420,
|
||||
};
|
||||
|
||||
struct meson_vclk_params {
|
||||
+ unsigned int pll_freq;
|
||||
+ unsigned int phy_freq;
|
||||
+ unsigned int vclk_freq;
|
||||
+ unsigned int venc_freq;
|
||||
unsigned int pixel_freq;
|
||||
- unsigned int pll_base_freq;
|
||||
unsigned int pll_od1;
|
||||
unsigned int pll_od2;
|
||||
unsigned int pll_od3;
|
||||
@@ -365,8 +370,11 @@ struct meson_vclk_params {
|
||||
unsigned int vclk_div;
|
||||
} params[] = {
|
||||
[MESON_VCLK_HDMI_ENCI_54000] = {
|
||||
+ .pll_freq = 4320000,
|
||||
+ .phy_freq = 270000,
|
||||
+ .vclk_freq = 54000,
|
||||
+ .venc_freq = 54000,
|
||||
.pixel_freq = 54000,
|
||||
- .pll_base_freq = 4320000,
|
||||
.pll_od1 = 4,
|
||||
.pll_od2 = 4,
|
||||
.pll_od3 = 1,
|
||||
@@ -374,8 +382,11 @@ struct meson_vclk_params {
|
||||
.vclk_div = 1,
|
||||
},
|
||||
[MESON_VCLK_HDMI_DDR_54000] = {
|
||||
- .pixel_freq = 54000,
|
||||
- .pll_base_freq = 4320000,
|
||||
+ .pll_freq = 4320000,
|
||||
+ .phy_freq = 270000,
|
||||
+ .vclk_freq = 54000,
|
||||
+ .venc_freq = 54000,
|
||||
+ .pixel_freq = 27000,
|
||||
.pll_od1 = 4,
|
||||
.pll_od2 = 4,
|
||||
.pll_od3 = 1,
|
||||
@@ -383,8 +394,11 @@ struct meson_vclk_params {
|
||||
.vclk_div = 1,
|
||||
},
|
||||
[MESON_VCLK_HDMI_DDR_148500] = {
|
||||
- .pixel_freq = 148500,
|
||||
- .pll_base_freq = 2970000,
|
||||
+ .pll_freq = 2970000,
|
||||
+ .phy_freq = 742500,
|
||||
+ .vclk_freq = 148500,
|
||||
+ .venc_freq = 148500,
|
||||
+ .pixel_freq = 74250,
|
||||
.pll_od1 = 4,
|
||||
.pll_od2 = 1,
|
||||
.pll_od3 = 1,
|
||||
@@ -392,8 +406,11 @@ struct meson_vclk_params {
|
||||
.vclk_div = 1,
|
||||
},
|
||||
[MESON_VCLK_HDMI_74250] = {
|
||||
+ .pll_freq = 2970000,
|
||||
+ .phy_freq = 742500,
|
||||
+ .vclk_freq = 74250,
|
||||
+ .venc_freq = 74250,
|
||||
.pixel_freq = 74250,
|
||||
- .pll_base_freq = 2970000,
|
||||
.pll_od1 = 2,
|
||||
.pll_od2 = 2,
|
||||
.pll_od3 = 2,
|
||||
@@ -401,8 +418,11 @@ struct meson_vclk_params {
|
||||
.vclk_div = 1,
|
||||
},
|
||||
[MESON_VCLK_HDMI_148500] = {
|
||||
+ .pll_freq = 2970000,
|
||||
+ .phy_freq = 1485000,
|
||||
+ .vclk_freq = 148500,
|
||||
+ .venc_freq = 148500,
|
||||
.pixel_freq = 148500,
|
||||
- .pll_base_freq = 2970000,
|
||||
.pll_od1 = 1,
|
||||
.pll_od2 = 2,
|
||||
.pll_od3 = 2,
|
||||
@@ -410,8 +430,11 @@ struct meson_vclk_params {
|
||||
.vclk_div = 1,
|
||||
},
|
||||
[MESON_VCLK_HDMI_297000] = {
|
||||
+ .pll_freq = 5940000,
|
||||
+ .phy_freq = 2970000,
|
||||
+ .venc_freq = 297000,
|
||||
+ .vclk_freq = 297000,
|
||||
.pixel_freq = 297000,
|
||||
- .pll_base_freq = 5940000,
|
||||
.pll_od1 = 2,
|
||||
.pll_od2 = 1,
|
||||
.pll_od3 = 1,
|
||||
@@ -419,14 +442,29 @@ struct meson_vclk_params {
|
||||
.vclk_div = 2,
|
||||
},
|
||||
[MESON_VCLK_HDMI_594000] = {
|
||||
+ .pll_freq = 5940000,
|
||||
+ .phy_freq = 5940000,
|
||||
+ .venc_freq = 594000,
|
||||
+ .vclk_freq = 594000,
|
||||
.pixel_freq = 594000,
|
||||
- .pll_base_freq = 5940000,
|
||||
.pll_od1 = 1,
|
||||
.pll_od2 = 1,
|
||||
.pll_od3 = 2,
|
||||
.vid_pll_div = VID_PLL_DIV_5,
|
||||
.vclk_div = 1,
|
||||
},
|
||||
+ [MESON_VCLK_HDMI_594000_YUV420] = {
|
||||
+ .pll_freq = 5940000,
|
||||
+ .phy_freq = 2970000,
|
||||
+ .venc_freq = 594000,
|
||||
+ .vclk_freq = 594000,
|
||||
+ .pixel_freq = 297000,
|
||||
+ .pll_od1 = 2,
|
||||
+ .pll_od2 = 1,
|
||||
+ .pll_od3 = 1,
|
||||
+ .vid_pll_div = VID_PLL_DIV_5,
|
||||
+ .vclk_div = 1,
|
||||
+ },
|
||||
{ /* sentinel */ },
|
||||
};
|
||||
|
||||
@@ -693,6 +731,7 @@ static void meson_hdmi_pll_generic_set(struct meson_drm *priv,
|
||||
unsigned int od, m, frac, od1, od2, od3;
|
||||
|
||||
if (meson_hdmi_pll_find_params(priv, pll_freq, &m, &frac, &od)) {
|
||||
+ /* OD2 goes to the PHY, and needs to be *10, so keep OD3=1 */
|
||||
od3 = 1;
|
||||
if (od < 4) {
|
||||
od1 = 2;
|
||||
@@ -715,21 +754,28 @@ static void meson_hdmi_pll_generic_set(struct meson_drm *priv,
|
||||
}
|
||||
|
||||
enum drm_mode_status
|
||||
-meson_vclk_vic_supported_freq(unsigned int freq)
|
||||
+meson_vclk_vic_supported_freq(unsigned int phy_freq,
|
||||
+ unsigned int vclk_freq)
|
||||
{
|
||||
int i;
|
||||
|
||||
- DRM_DEBUG_DRIVER("freq = %d\n", freq);
|
||||
+ DRM_DEBUG_DRIVER("phy_freq = %d vclk_freq = %d\n",
|
||||
+ phy_freq, vclk_freq);
|
||||
|
||||
for (i = 0 ; params[i].pixel_freq ; ++i) {
|
||||
DRM_DEBUG_DRIVER("i = %d pixel_freq = %d alt = %d\n",
|
||||
i, params[i].pixel_freq,
|
||||
FREQ_1000_1001(params[i].pixel_freq));
|
||||
+ DRM_DEBUG_DRIVER("i = %d phy_freq = %d alt = %d\n",
|
||||
+ i, params[i].phy_freq,
|
||||
+ FREQ_1000_1001(params[i].phy_freq/10)*10);
|
||||
/* Match strict frequency */
|
||||
- if (freq == params[i].pixel_freq)
|
||||
+ if (phy_freq == params[i].phy_freq &&
|
||||
+ vclk_freq == params[i].vclk_freq)
|
||||
return MODE_OK;
|
||||
/* Match 1000/1001 variant */
|
||||
- if (freq == FREQ_1000_1001(params[i].pixel_freq))
|
||||
+ if (phy_freq == (FREQ_1000_1001(params[i].phy_freq/10)*10) &&
|
||||
+ vclk_freq == FREQ_1000_1001(params[i].vclk_freq))
|
||||
return MODE_OK;
|
||||
}
|
||||
|
||||
@@ -957,8 +1003,9 @@ static void meson_vclk_set(struct meson_drm *priv, unsigned int pll_base_freq,
|
||||
}
|
||||
|
||||
void meson_vclk_setup(struct meson_drm *priv, unsigned int target,
|
||||
- unsigned int vclk_freq, unsigned int venc_freq,
|
||||
- unsigned int dac_freq, bool hdmi_use_enci)
|
||||
+ unsigned int phy_freq, unsigned int vclk_freq,
|
||||
+ unsigned int venc_freq, unsigned int dac_freq,
|
||||
+ bool hdmi_use_enci)
|
||||
{
|
||||
bool vic_alternate_clock = false;
|
||||
unsigned int freq;
|
||||
@@ -977,7 +1024,7 @@ void meson_vclk_setup(struct meson_drm *priv, unsigned int target,
|
||||
* - venc_div = 1
|
||||
* - encp encoder
|
||||
*/
|
||||
- meson_vclk_set(priv, vclk_freq * 10, 0, 0, 0,
|
||||
+ meson_vclk_set(priv, phy_freq, 0, 0, 0,
|
||||
VID_PLL_DIV_5, 2, 1, 1, false, false);
|
||||
return;
|
||||
}
|
||||
@@ -999,9 +1046,11 @@ void meson_vclk_setup(struct meson_drm *priv, unsigned int target,
|
||||
}
|
||||
|
||||
for (freq = 0 ; params[freq].pixel_freq ; ++freq) {
|
||||
- if (vclk_freq == params[freq].pixel_freq ||
|
||||
- vclk_freq == FREQ_1000_1001(params[freq].pixel_freq)) {
|
||||
- if (vclk_freq != params[freq].pixel_freq)
|
||||
+ if ((phy_freq == params[freq].phy_freq ||
|
||||
+ phy_freq == FREQ_1000_1001(params[freq].phy_freq/10)*10) &&
|
||||
+ (vclk_freq == params[freq].vclk_freq ||
|
||||
+ vclk_freq == FREQ_1000_1001(params[freq].vclk_freq))) {
|
||||
+ if (vclk_freq != params[freq].vclk_freq)
|
||||
vic_alternate_clock = true;
|
||||
else
|
||||
vic_alternate_clock = false;
|
||||
@@ -1030,7 +1079,7 @@ void meson_vclk_setup(struct meson_drm *priv, unsigned int target,
|
||||
return;
|
||||
}
|
||||
|
||||
- meson_vclk_set(priv, params[freq].pll_base_freq,
|
||||
+ meson_vclk_set(priv, params[freq].pll_freq,
|
||||
params[freq].pll_od1, params[freq].pll_od2,
|
||||
params[freq].pll_od3, params[freq].vid_pll_div,
|
||||
params[freq].vclk_div, hdmi_tx_div, venc_div,
|
||||
diff --git a/drivers/gpu/drm/meson/meson_vclk.h b/drivers/gpu/drm/meson/meson_vclk.h
|
||||
index ed993d20abda..3523d804a008 100644
|
||||
--- a/drivers/gpu/drm/meson/meson_vclk.h
|
||||
+++ b/drivers/gpu/drm/meson/meson_vclk.h
|
||||
@@ -21,10 +21,11 @@ enum {
|
||||
enum drm_mode_status
|
||||
meson_vclk_dmt_supported_freq(struct meson_drm *priv, unsigned int freq);
|
||||
enum drm_mode_status
|
||||
-meson_vclk_vic_supported_freq(unsigned int freq);
|
||||
+meson_vclk_vic_supported_freq(unsigned int phy_freq, unsigned int vclk_freq);
|
||||
|
||||
void meson_vclk_setup(struct meson_drm *priv, unsigned int target,
|
||||
- unsigned int vclk_freq, unsigned int venc_freq,
|
||||
- unsigned int dac_freq, bool hdmi_use_enci);
|
||||
+ unsigned int phy_freq, unsigned int vclk_freq,
|
||||
+ unsigned int venc_freq, unsigned int dac_freq,
|
||||
+ bool hdmi_use_enci);
|
||||
|
||||
#endif /* __MESON_VCLK_H */
|
||||
diff --git a/drivers/gpu/drm/meson/meson_venc.c b/drivers/gpu/drm/meson/meson_venc.c
|
||||
index 7b7a0d8d737c..5710b5bcfe99 100644
|
||||
--- a/drivers/gpu/drm/meson/meson_venc.c
|
||||
+++ b/drivers/gpu/drm/meson/meson_venc.c
|
||||
@@ -946,6 +946,8 @@ bool meson_venc_hdmi_venc_repeat(int vic)
|
||||
EXPORT_SYMBOL_GPL(meson_venc_hdmi_venc_repeat);
|
||||
|
||||
void meson_venc_hdmi_mode_set(struct meson_drm *priv, int vic,
|
||||
+ unsigned int ycrcb_map,
|
||||
+ bool yuv420_mode,
|
||||
struct drm_display_mode *mode)
|
||||
{
|
||||
union meson_hdmi_venc_mode *vmode = NULL;
|
||||
diff --git a/drivers/gpu/drm/meson/meson_venc.h b/drivers/gpu/drm/meson/meson_venc.h
|
||||
index 985642a1678e..2d0b71f99402 100644
|
||||
--- a/drivers/gpu/drm/meson/meson_venc.h
|
||||
+++ b/drivers/gpu/drm/meson/meson_venc.h
|
||||
@@ -21,6 +21,15 @@ enum {
|
||||
MESON_VENC_MODE_HDMI,
|
||||
};
|
||||
|
||||
+enum {
|
||||
+ MESON_VENC_MAP_CR_Y_CB = 0,
|
||||
+ MESON_VENC_MAP_Y_CB_CR,
|
||||
+ MESON_VENC_MAP_Y_CR_CB,
|
||||
+ MESON_VENC_MAP_CB_CR_Y,
|
||||
+ MESON_VENC_MAP_CB_Y_CR,
|
||||
+ MESON_VENC_MAP_CR_CB_Y,
|
||||
+};
|
||||
+
|
||||
struct meson_cvbs_enci_mode {
|
||||
unsigned int mode_tag;
|
||||
unsigned int hso_begin; /* HSO begin position */
|
||||
@@ -58,6 +67,8 @@ extern struct meson_cvbs_enci_mode meson_cvbs_enci_ntsc;
|
||||
void meson_venci_cvbs_mode_set(struct meson_drm *priv,
|
||||
struct meson_cvbs_enci_mode *mode);
|
||||
void meson_venc_hdmi_mode_set(struct meson_drm *priv, int vic,
|
||||
+ unsigned int ycrcb_map,
|
||||
+ bool yuv420_mode,
|
||||
struct drm_display_mode *mode);
|
||||
unsigned int meson_venci_get_field(struct meson_drm *priv);
|
||||
|
||||
diff --git a/drivers/gpu/drm/meson/meson_venc_cvbs.c b/drivers/gpu/drm/meson/meson_venc_cvbs.c
|
||||
index 6313a519f257..60d58d6ba1e7 100644
|
||||
--- a/drivers/gpu/drm/meson/meson_venc_cvbs.c
|
||||
+++ b/drivers/gpu/drm/meson/meson_venc_cvbs.c
|
||||
@@ -206,7 +206,8 @@ static void meson_venc_cvbs_encoder_mode_set(struct drm_encoder *encoder,
|
||||
/* Setup 27MHz vclk2 for ENCI and VDAC */
|
||||
meson_vclk_setup(priv, MESON_VCLK_TARGET_CVBS,
|
||||
MESON_VCLK_CVBS, MESON_VCLK_CVBS,
|
||||
- MESON_VCLK_CVBS, true);
|
||||
+ MESON_VCLK_CVBS, MESON_VCLK_CVBS,
|
||||
+ true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
From e57152836dde170a9da301a2e3d8b70bd6666c0b Mon Sep 17 00:00:00 2001
|
||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Date: Mon, 20 May 2019 15:37:53 +0200
|
||||
Subject: [PATCH 5/5] drm/meson: Output in YUV444 if sink supports it
|
||||
|
||||
With the YUV420 handling, we can dynamically setup the HDMI output
|
||||
pixel format depending on the mode and connector info.
|
||||
So now, we can output in YUV444, which is the native video pipeline
|
||||
format, directly to the HDMI Sink if it's supported without
|
||||
necessarily involving the HDMI Controller CSC.
|
||||
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
|
||||
---
|
||||
drivers/gpu/drm/meson/meson_dw_hdmi.c | 13 ++++++++++++-
|
||||
1 file changed, 12 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c
|
||||
index 2ccee05de04a..72416f8a6170 100644
|
||||
--- a/drivers/gpu/drm/meson/meson_dw_hdmi.c
|
||||
+++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c
|
||||
@@ -711,12 +711,23 @@ static int meson_venc_hdmi_encoder_atomic_check(struct drm_encoder *encoder,
|
||||
struct drm_display_mode *mode = &crtc_state->mode;
|
||||
bool is_hdmi2_sink =
|
||||
conn_state->connector->display_info.hdmi.scdc.supported;
|
||||
+ bool specify_out_format = false;
|
||||
+ u32 out_format;
|
||||
|
||||
if (drm_mode_is_420_only(info, mode) ||
|
||||
(!is_hdmi2_sink && drm_mode_is_420_also(info, mode)))
|
||||
dw_hdmi->input_bus_format = MEDIA_BUS_FMT_UYYVYY8_0_5X24;
|
||||
- else
|
||||
+ else {
|
||||
dw_hdmi->input_bus_format = MEDIA_BUS_FMT_YUV8_1X24;
|
||||
+ if (info->color_formats & DRM_COLOR_FORMAT_YCRCB444) {
|
||||
+ out_format = MEDIA_BUS_FMT_YUV8_1X24;
|
||||
+ specify_out_format = true;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* Set a connector bus format if required */
|
||||
+ drm_display_info_set_bus_formats(info, &out_format,
|
||||
+ (specify_out_format ? 1 : 0));
|
||||
|
||||
/* Specify the encoder output format to the bridge */
|
||||
if (!drm_bridge_format_set(encoder->bridge,
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,594 @@
|
|||
From 7fd7898aab479b3dc5b377837e216456863167da Mon Sep 17 00:00:00 2001
|
||||
From: Maxime Jourdan <mjourdan@baylibre.com>
|
||||
Date: Wed, 29 Aug 2018 15:42:56 +0200
|
||||
Subject: [PATCH 03/14] media: meson: vdec: add H.264 decoding support
|
||||
|
||||
Add support for V4L2_PIX_FMT_H264
|
||||
|
||||
Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
|
||||
---
|
||||
drivers/staging/media/meson/vdec/Makefile | 2 +-
|
||||
drivers/staging/media/meson/vdec/codec_h264.c | 478 ++++++++++++++++++
|
||||
drivers/staging/media/meson/vdec/codec_h264.h | 13 +
|
||||
.../staging/media/meson/vdec/vdec_platform.c | 31 ++
|
||||
4 files changed, 523 insertions(+), 1 deletion(-)
|
||||
create mode 100644 drivers/staging/media/meson/vdec/codec_h264.c
|
||||
create mode 100644 drivers/staging/media/meson/vdec/codec_h264.h
|
||||
|
||||
diff --git a/drivers/staging/media/meson/vdec/Makefile b/drivers/staging/media/meson/vdec/Makefile
|
||||
index 6bea129084b7..711d990c760e 100644
|
||||
--- a/drivers/staging/media/meson/vdec/Makefile
|
||||
+++ b/drivers/staging/media/meson/vdec/Makefile
|
||||
@@ -3,6 +3,6 @@
|
||||
|
||||
meson-vdec-objs = esparser.o vdec.o vdec_helpers.o vdec_platform.o
|
||||
meson-vdec-objs += vdec_1.o
|
||||
-meson-vdec-objs += codec_mpeg12.o
|
||||
+meson-vdec-objs += codec_mpeg12.o codec_h264.o
|
||||
|
||||
obj-$(CONFIG_VIDEO_MESON_VDEC) += meson-vdec.o
|
||||
diff --git a/drivers/staging/media/meson/vdec/codec_h264.c b/drivers/staging/media/meson/vdec/codec_h264.c
|
||||
new file mode 100644
|
||||
index 000000000000..6ac0115afaa3
|
||||
--- /dev/null
|
||||
+++ b/drivers/staging/media/meson/vdec/codec_h264.c
|
||||
@@ -0,0 +1,478 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * Copyright (C) 2018 Maxime Jourdan <maxi.jourdan@wanadoo.fr>
|
||||
+ */
|
||||
+
|
||||
+#include <media/v4l2-mem2mem.h>
|
||||
+#include <media/videobuf2-dma-contig.h>
|
||||
+
|
||||
+#include "vdec_helpers.h"
|
||||
+#include "dos_regs.h"
|
||||
+
|
||||
+#define SIZE_EXT_FW (20 * SZ_1K)
|
||||
+#define SIZE_WORKSPACE 0x1ee000
|
||||
+#define SIZE_SEI (8 * SZ_1K)
|
||||
+
|
||||
+/* Offset added by the firmware which must be substracted
|
||||
+ * from the workspace phyaddr
|
||||
+ */
|
||||
+#define WORKSPACE_BUF_OFFSET 0x1000000
|
||||
+
|
||||
+/* ISR status */
|
||||
+#define CMD_MASK GENMASK(7, 0)
|
||||
+#define CMD_SRC_CHANGE 1
|
||||
+#define CMD_FRAMES_READY 2
|
||||
+#define CMD_FATAL_ERROR 6
|
||||
+#define CMD_BAD_WIDTH 7
|
||||
+#define CMD_BAD_HEIGHT 8
|
||||
+
|
||||
+#define SEI_DATA_READY BIT(15)
|
||||
+
|
||||
+/* Picture type */
|
||||
+#define PIC_TOP_BOT 5
|
||||
+#define PIC_BOT_TOP 6
|
||||
+
|
||||
+/* Size of Motion Vector per macroblock */
|
||||
+#define MB_MV_SIZE 96
|
||||
+
|
||||
+/* Frame status data */
|
||||
+#define PIC_STRUCT_BIT 5
|
||||
+#define PIC_STRUCT_MASK GENMASK(2, 0)
|
||||
+#define BUF_IDX_MASK GENMASK(4, 0)
|
||||
+#define ERROR_FLAG BIT(9)
|
||||
+#define OFFSET_BIT 16
|
||||
+#define OFFSET_MASK GENMASK(15, 0)
|
||||
+
|
||||
+/* Bitstream parsed data */
|
||||
+#define MB_TOTAL_BIT 8
|
||||
+#define MB_TOTAL_MASK GENMASK(15, 0)
|
||||
+#define MB_WIDTH_MASK GENMASK(7, 0)
|
||||
+#define MAX_REF_BIT 24
|
||||
+#define MAX_REF_MASK GENMASK(6, 0)
|
||||
+#define AR_IDC_BIT 16
|
||||
+#define AR_IDC_MASK GENMASK(7, 0)
|
||||
+#define AR_PRESENT_FLAG BIT(0)
|
||||
+#define AR_EXTEND 0xff
|
||||
+
|
||||
+/* Buffer to send to the ESPARSER to signal End Of Stream for H.264.
|
||||
+ * This is a 16x16 encoded picture that will trigger drain firmware-side.
|
||||
+ * There is no known alternative.
|
||||
+ */
|
||||
+static const u8 eos_sequence[SZ_1K] = {
|
||||
+ 0x00, 0x00, 0x00, 0x01, 0x06, 0x05, 0xff, 0xe4, 0xdc, 0x45, 0xe9, 0xbd,
|
||||
+ 0xe6, 0xd9, 0x48, 0xb7, 0x96, 0x2c, 0xd8, 0x20, 0xd9, 0x23, 0xee, 0xef,
|
||||
+ 0x78, 0x32, 0x36, 0x34, 0x20, 0x2d, 0x20, 0x63, 0x6f, 0x72, 0x65, 0x20,
|
||||
+ 0x36, 0x37, 0x20, 0x72, 0x31, 0x31, 0x33, 0x30, 0x20, 0x38, 0x34, 0x37,
|
||||
+ 0x35, 0x39, 0x37, 0x37, 0x20, 0x2d, 0x20, 0x48, 0x2e, 0x32, 0x36, 0x34,
|
||||
+ 0x2f, 0x4d, 0x50, 0x45, 0x47, 0x2d, 0x34, 0x20, 0x41, 0x56, 0x43, 0x20,
|
||||
+ 0x63, 0x6f, 0x64, 0x65, 0x63, 0x20, 0x2d, 0x20, 0x43, 0x6f, 0x70, 0x79,
|
||||
+ 0x6c, 0x65, 0x66, 0x74, 0x20, 0x32, 0x30, 0x30, 0x33, 0x2d, 0x32, 0x30,
|
||||
+ 0x30, 0x39, 0x20, 0x2d, 0x20, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f,
|
||||
+ 0x77, 0x77, 0x77, 0x2e, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x6c, 0x61, 0x6e,
|
||||
+ 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x78, 0x32, 0x36, 0x34, 0x2e, 0x68, 0x74,
|
||||
+ 0x6d, 0x6c, 0x20, 0x2d, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
|
||||
+ 0x3a, 0x20, 0x63, 0x61, 0x62, 0x61, 0x63, 0x3d, 0x31, 0x20, 0x72, 0x65,
|
||||
+ 0x66, 0x3d, 0x31, 0x20, 0x64, 0x65, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x3d,
|
||||
+ 0x31, 0x3a, 0x30, 0x3a, 0x30, 0x20, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73,
|
||||
+ 0x65, 0x3d, 0x30, 0x78, 0x31, 0x3a, 0x30, 0x78, 0x31, 0x31, 0x31, 0x20,
|
||||
+ 0x6d, 0x65, 0x3d, 0x68, 0x65, 0x78, 0x20, 0x73, 0x75, 0x62, 0x6d, 0x65,
|
||||
+ 0x3d, 0x36, 0x20, 0x70, 0x73, 0x79, 0x5f, 0x72, 0x64, 0x3d, 0x31, 0x2e,
|
||||
+ 0x30, 0x3a, 0x30, 0x2e, 0x30, 0x20, 0x6d, 0x69, 0x78, 0x65, 0x64, 0x5f,
|
||||
+ 0x72, 0x65, 0x66, 0x3d, 0x30, 0x20, 0x6d, 0x65, 0x5f, 0x72, 0x61, 0x6e,
|
||||
+ 0x67, 0x65, 0x3d, 0x31, 0x36, 0x20, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x61,
|
||||
+ 0x5f, 0x6d, 0x65, 0x3d, 0x31, 0x20, 0x74, 0x72, 0x65, 0x6c, 0x6c, 0x69,
|
||||
+ 0x73, 0x3d, 0x30, 0x20, 0x38, 0x78, 0x38, 0x64, 0x63, 0x74, 0x3d, 0x30,
|
||||
+ 0x20, 0x63, 0x71, 0x6d, 0x3d, 0x30, 0x20, 0x64, 0x65, 0x61, 0x64, 0x7a,
|
||||
+ 0x6f, 0x6e, 0x65, 0x3d, 0x32, 0x31, 0x2c, 0x31, 0x31, 0x20, 0x63, 0x68,
|
||||
+ 0x72, 0x6f, 0x6d, 0x61, 0x5f, 0x71, 0x70, 0x5f, 0x6f, 0x66, 0x66, 0x73,
|
||||
+ 0x65, 0x74, 0x3d, 0x2d, 0x32, 0x20, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64,
|
||||
+ 0x73, 0x3d, 0x31, 0x20, 0x6e, 0x72, 0x3d, 0x30, 0x20, 0x64, 0x65, 0x63,
|
||||
+ 0x69, 0x6d, 0x61, 0x74, 0x65, 0x3d, 0x31, 0x20, 0x6d, 0x62, 0x61, 0x66,
|
||||
+ 0x66, 0x3d, 0x30, 0x20, 0x62, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x3d,
|
||||
+ 0x30, 0x20, 0x6b, 0x65, 0x79, 0x69, 0x6e, 0x74, 0x3d, 0x32, 0x35, 0x30,
|
||||
+ 0x20, 0x6b, 0x65, 0x79, 0x69, 0x6e, 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x3d,
|
||||
+ 0x32, 0x35, 0x20, 0x73, 0x63, 0x65, 0x6e, 0x65, 0x63, 0x75, 0x74, 0x3d,
|
||||
+ 0x34, 0x30, 0x20, 0x72, 0x63, 0x3d, 0x61, 0x62, 0x72, 0x20, 0x62, 0x69,
|
||||
+ 0x74, 0x72, 0x61, 0x74, 0x65, 0x3d, 0x31, 0x30, 0x20, 0x72, 0x61, 0x74,
|
||||
+ 0x65, 0x74, 0x6f, 0x6c, 0x3d, 0x31, 0x2e, 0x30, 0x20, 0x71, 0x63, 0x6f,
|
||||
+ 0x6d, 0x70, 0x3d, 0x30, 0x2e, 0x36, 0x30, 0x20, 0x71, 0x70, 0x6d, 0x69,
|
||||
+ 0x6e, 0x3d, 0x31, 0x30, 0x20, 0x71, 0x70, 0x6d, 0x61, 0x78, 0x3d, 0x35,
|
||||
+ 0x31, 0x20, 0x71, 0x70, 0x73, 0x74, 0x65, 0x70, 0x3d, 0x34, 0x20, 0x69,
|
||||
+ 0x70, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x3d, 0x31, 0x2e, 0x34, 0x30,
|
||||
+ 0x20, 0x61, 0x71, 0x3d, 0x31, 0x3a, 0x31, 0x2e, 0x30, 0x30, 0x00, 0x80,
|
||||
+ 0x00, 0x00, 0x00, 0x01, 0x67, 0x4d, 0x40, 0x0a, 0x9a, 0x74, 0xf4, 0x20,
|
||||
+ 0x00, 0x00, 0x03, 0x00, 0x20, 0x00, 0x00, 0x06, 0x51, 0xe2, 0x44, 0xd4,
|
||||
+ 0x00, 0x00, 0x00, 0x01, 0x68, 0xee, 0x32, 0xc8, 0x00, 0x00, 0x00, 0x01,
|
||||
+ 0x65, 0x88, 0x80, 0x20, 0x00, 0x08, 0x7f, 0xea, 0x6a, 0xe2, 0x99, 0xb6,
|
||||
+ 0x57, 0xae, 0x49, 0x30, 0xf5, 0xfe, 0x5e, 0x46, 0x0b, 0x72, 0x44, 0xc4,
|
||||
+ 0xe1, 0xfc, 0x62, 0xda, 0xf1, 0xfb, 0xa2, 0xdb, 0xd6, 0xbe, 0x5c, 0xd7,
|
||||
+ 0x24, 0xa3, 0xf5, 0xb9, 0x2f, 0x57, 0x16, 0x49, 0x75, 0x47, 0x77, 0x09,
|
||||
+ 0x5c, 0xa1, 0xb4, 0xc3, 0x4f, 0x60, 0x2b, 0xb0, 0x0c, 0xc8, 0xd6, 0x66,
|
||||
+ 0xba, 0x9b, 0x82, 0x29, 0x33, 0x92, 0x26, 0x99, 0x31, 0x1c, 0x7f, 0x9b
|
||||
+};
|
||||
+
|
||||
+static const u8 *codec_h264_eos_sequence(u32 *len)
|
||||
+{
|
||||
+ *len = ARRAY_SIZE(eos_sequence);
|
||||
+ return eos_sequence;
|
||||
+}
|
||||
+
|
||||
+struct codec_h264 {
|
||||
+ /* H.264 decoder requires an extended firmware */
|
||||
+ void *ext_fw_vaddr;
|
||||
+ dma_addr_t ext_fw_paddr;
|
||||
+
|
||||
+ /* Buffer for the H.264 Workspace */
|
||||
+ void *workspace_vaddr;
|
||||
+ dma_addr_t workspace_paddr;
|
||||
+
|
||||
+ /* Buffer for the H.264 references MV */
|
||||
+ void *ref_vaddr;
|
||||
+ dma_addr_t ref_paddr;
|
||||
+ u32 ref_size;
|
||||
+
|
||||
+ /* Buffer for parsed SEI data */
|
||||
+ void *sei_vaddr;
|
||||
+ dma_addr_t sei_paddr;
|
||||
+
|
||||
+ u32 mb_width;
|
||||
+ u32 mb_height;
|
||||
+ u32 max_refs;
|
||||
+};
|
||||
+
|
||||
+static int codec_h264_can_recycle(struct amvdec_core *core)
|
||||
+{
|
||||
+ return !amvdec_read_dos(core, AV_SCRATCH_7) ||
|
||||
+ !amvdec_read_dos(core, AV_SCRATCH_8);
|
||||
+}
|
||||
+
|
||||
+static void codec_h264_recycle(struct amvdec_core *core, u32 buf_idx)
|
||||
+{
|
||||
+ /* Tell the decoder he can recycle this buffer.
|
||||
+ * AV_SCRATCH_8 serves the same purpose.
|
||||
+ */
|
||||
+ if (!amvdec_read_dos(core, AV_SCRATCH_7))
|
||||
+ amvdec_write_dos(core, AV_SCRATCH_7, buf_idx + 1);
|
||||
+ else
|
||||
+ amvdec_write_dos(core, AV_SCRATCH_8, buf_idx + 1);
|
||||
+}
|
||||
+
|
||||
+static int codec_h264_start(struct amvdec_session *sess) {
|
||||
+ u32 workspace_offset;
|
||||
+ struct amvdec_core *core = sess->core;
|
||||
+ struct codec_h264 *h264 = sess->priv;
|
||||
+
|
||||
+ /* Allocate some memory for the H.264 decoder's state */
|
||||
+ h264->workspace_vaddr = dma_alloc_coherent(core->dev, SIZE_WORKSPACE,
|
||||
+ &h264->workspace_paddr, GFP_KERNEL);
|
||||
+ if (!h264->workspace_vaddr) {
|
||||
+ dev_err(core->dev, "Failed to alloc H.264 Workspace\n");
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
+ /* Allocate some memory for the H.264 SEI dump */
|
||||
+ h264->sei_vaddr = dma_alloc_coherent(core->dev, SIZE_SEI,
|
||||
+ &h264->sei_paddr, GFP_KERNEL);
|
||||
+ if (!h264->sei_vaddr) {
|
||||
+ dev_err(core->dev, "Failed to alloc H.264 SEI\n");
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
+ amvdec_write_dos_bits(core, POWER_CTL_VLD, BIT(9) | BIT(6));
|
||||
+
|
||||
+ workspace_offset = h264->workspace_paddr - WORKSPACE_BUF_OFFSET;
|
||||
+ amvdec_write_dos(core, AV_SCRATCH_1, workspace_offset);
|
||||
+ amvdec_write_dos(core, AV_SCRATCH_G, h264->ext_fw_paddr);
|
||||
+ amvdec_write_dos(core, AV_SCRATCH_I, h264->sei_paddr - workspace_offset);
|
||||
+
|
||||
+ /* Enable "error correction" */
|
||||
+ amvdec_write_dos(core, AV_SCRATCH_F,
|
||||
+ (amvdec_read_dos(core, AV_SCRATCH_F) & 0xffffffc3) |
|
||||
+ BIT(4) | BIT(7));
|
||||
+
|
||||
+ amvdec_write_dos(core, MDEC_PIC_DC_THRESH, 0x404038aa);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int codec_h264_stop(struct amvdec_session *sess)
|
||||
+{
|
||||
+ struct codec_h264 *h264 = sess->priv;
|
||||
+ struct amvdec_core *core = sess->core;
|
||||
+
|
||||
+ if (h264->ext_fw_vaddr)
|
||||
+ dma_free_coherent(core->dev, SIZE_EXT_FW,
|
||||
+ h264->ext_fw_vaddr, h264->ext_fw_paddr);
|
||||
+
|
||||
+ if (h264->workspace_vaddr)
|
||||
+ dma_free_coherent(core->dev, SIZE_WORKSPACE,
|
||||
+ h264->workspace_vaddr, h264->workspace_paddr);
|
||||
+
|
||||
+ if (h264->ref_vaddr)
|
||||
+ dma_free_coherent(core->dev, h264->ref_size,
|
||||
+ h264->ref_vaddr, h264->ref_paddr);
|
||||
+
|
||||
+ if (h264->sei_vaddr)
|
||||
+ dma_free_coherent(core->dev, SIZE_SEI,
|
||||
+ h264->sei_vaddr, h264->sei_paddr);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int codec_h264_load_extended_firmware(struct amvdec_session *sess,
|
||||
+ const u8 *data, u32 len)
|
||||
+{
|
||||
+ struct codec_h264 *h264;
|
||||
+ struct amvdec_core *core = sess->core;
|
||||
+
|
||||
+ if (len < SIZE_EXT_FW)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ h264 = kzalloc(sizeof(*h264), GFP_KERNEL);
|
||||
+ if (!h264)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ h264->ext_fw_vaddr = dma_alloc_coherent(core->dev, SIZE_EXT_FW,
|
||||
+ &h264->ext_fw_paddr, GFP_KERNEL);
|
||||
+ if (!h264->ext_fw_vaddr) {
|
||||
+ dev_err(core->dev, "Failed to alloc H.264 extended fw\n");
|
||||
+ kfree(h264);
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
+ memcpy(h264->ext_fw_vaddr, data, SIZE_EXT_FW);
|
||||
+ sess->priv = h264;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct v4l2_fract par_table[] = {
|
||||
+ { 1, 1 }, { 1, 1 }, { 12, 11 }, { 10, 11 },
|
||||
+ { 16, 11 }, { 40, 33 }, { 24, 11 }, { 20, 11 },
|
||||
+ { 32, 11 }, { 80, 33 }, { 18, 11 }, { 15, 11 },
|
||||
+ { 64, 33 }, { 160, 99 }, { 4, 3 }, { 3, 2 },
|
||||
+ { 2, 1 }
|
||||
+};
|
||||
+
|
||||
+static void codec_h264_set_par(struct amvdec_session *sess)
|
||||
+{
|
||||
+ struct amvdec_core *core = sess->core;
|
||||
+ u32 seq_info = amvdec_read_dos(core, AV_SCRATCH_2);
|
||||
+ u32 ar_idc = (seq_info >> AR_IDC_BIT) & AR_IDC_MASK;
|
||||
+
|
||||
+ if (!(seq_info & AR_PRESENT_FLAG))
|
||||
+ return;
|
||||
+
|
||||
+ if (ar_idc == AR_EXTEND) {
|
||||
+ u32 ar_info = amvdec_read_dos(core, AV_SCRATCH_3);
|
||||
+ sess->pixelaspect.numerator = ar_info & 0xffff;
|
||||
+ sess->pixelaspect.denominator = (ar_info >> 16) & 0xffff;
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (ar_idc >= ARRAY_SIZE(par_table))
|
||||
+ return;
|
||||
+
|
||||
+ sess->pixelaspect = par_table[ar_idc];
|
||||
+}
|
||||
+
|
||||
+static void codec_h264_resume(struct amvdec_session *sess)
|
||||
+{
|
||||
+ struct amvdec_core *core = sess->core;
|
||||
+ struct codec_h264 *h264 = sess->priv;
|
||||
+ u32 mb_width, mb_height, mb_total;
|
||||
+
|
||||
+ amvdec_set_canvases(sess, (u32[]){ ANC0_CANVAS_ADDR, 0 },
|
||||
+ (u32[]){ 24, 0 });
|
||||
+
|
||||
+ dev_dbg(core->dev,
|
||||
+ "max_refs = %u; actual_dpb_size = %u\n",
|
||||
+ h264->max_refs, sess->num_dst_bufs);
|
||||
+
|
||||
+ /* Align to a multiple of 4 macroblocks */
|
||||
+ mb_width = ALIGN(h264->mb_width, 4);
|
||||
+ mb_height = ALIGN(h264->mb_height, 4);
|
||||
+ mb_total = mb_width * mb_height;
|
||||
+
|
||||
+ h264->ref_size = mb_total * MB_MV_SIZE * h264->max_refs;
|
||||
+ h264->ref_vaddr = dma_alloc_coherent(core->dev, h264->ref_size,
|
||||
+ &h264->ref_paddr, GFP_KERNEL);
|
||||
+ if (!h264->ref_vaddr) {
|
||||
+ dev_err(core->dev, "Failed to alloc refs (%u)\n",
|
||||
+ h264->ref_size);
|
||||
+ amvdec_abort(sess);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ /* Address to store the references' MVs */
|
||||
+ amvdec_write_dos(core, AV_SCRATCH_1, h264->ref_paddr);
|
||||
+ /* End of ref MV */
|
||||
+ amvdec_write_dos(core, AV_SCRATCH_4, h264->ref_paddr + h264->ref_size);
|
||||
+
|
||||
+ amvdec_write_dos(core, AV_SCRATCH_0, (h264->max_refs << 24) |
|
||||
+ (sess->num_dst_bufs << 16) |
|
||||
+ ((h264->max_refs - 1) << 8));
|
||||
+}
|
||||
+
|
||||
+/* Configure the H.264 decoder when the parser detected a parameter set change
|
||||
+ */
|
||||
+static void codec_h264_src_change(struct amvdec_session *sess)
|
||||
+{
|
||||
+ struct amvdec_core *core = sess->core;
|
||||
+ struct codec_h264 *h264 = sess->priv;
|
||||
+ u32 parsed_info, mb_total;
|
||||
+ u32 crop_infor, crop_bottom, crop_right;
|
||||
+ u32 frame_width, frame_height;
|
||||
+
|
||||
+ sess->keyframe_found = 1;
|
||||
+
|
||||
+ parsed_info = amvdec_read_dos(core, AV_SCRATCH_1);
|
||||
+
|
||||
+ /* Total number of 16x16 macroblocks */
|
||||
+ mb_total = (parsed_info >> MB_TOTAL_BIT) & MB_TOTAL_MASK;
|
||||
+ /* Number of macroblocks per line */
|
||||
+ h264->mb_width = parsed_info & MB_WIDTH_MASK;
|
||||
+ /* Number of macroblock lines */
|
||||
+ h264->mb_height = mb_total / h264->mb_width;
|
||||
+
|
||||
+ h264->max_refs = ((parsed_info >> MAX_REF_BIT) & MAX_REF_MASK) + 1;
|
||||
+
|
||||
+ crop_infor = amvdec_read_dos(core, AV_SCRATCH_6);
|
||||
+ crop_bottom = (crop_infor & 0xff);
|
||||
+ crop_right = (crop_infor >> 16) & 0xff;
|
||||
+
|
||||
+ frame_width = h264->mb_width * 16 - crop_right;
|
||||
+ frame_height = h264->mb_height * 16 - crop_bottom;
|
||||
+
|
||||
+ dev_info(core->dev, "frame: %ux%u; crop: %u %u\n",
|
||||
+ frame_width, frame_height, crop_right, crop_bottom);
|
||||
+
|
||||
+ codec_h264_set_par(sess);
|
||||
+ amvdec_src_change(sess, frame_width, frame_height, h264->max_refs + 5);
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * The offset is split in half in 2 different registers
|
||||
+ */
|
||||
+static u32 get_offset_msb(struct amvdec_core *core, int frame_num)
|
||||
+{
|
||||
+ int take_msb = frame_num % 2;
|
||||
+ int reg_offset = (frame_num / 2) * 4;
|
||||
+ u32 offset_msb = amvdec_read_dos(core, AV_SCRATCH_A + reg_offset);
|
||||
+
|
||||
+ if (take_msb)
|
||||
+ return offset_msb & 0xffff0000;
|
||||
+
|
||||
+ return (offset_msb & 0x0000ffff) << 16;
|
||||
+}
|
||||
+
|
||||
+static void codec_h264_frames_ready(struct amvdec_session *sess, u32 status)
|
||||
+{
|
||||
+ struct amvdec_core *core = sess->core;
|
||||
+ int error_count;
|
||||
+ int num_frames;
|
||||
+ int i;
|
||||
+
|
||||
+ error_count = amvdec_read_dos(core, AV_SCRATCH_D);
|
||||
+ num_frames = (status >> 8) & 0xff;
|
||||
+ if (error_count) {
|
||||
+ dev_warn(core->dev,
|
||||
+ "decoder error(s) happened, count %d\n", error_count);
|
||||
+ amvdec_write_dos(core, AV_SCRATCH_D, 0);
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < num_frames; i++) {
|
||||
+ u32 frame_status = amvdec_read_dos(core, AV_SCRATCH_1 + i * 4);
|
||||
+ u32 buffer_index = frame_status & BUF_IDX_MASK;
|
||||
+ u32 pic_struct = (frame_status >> PIC_STRUCT_BIT) &
|
||||
+ PIC_STRUCT_MASK;
|
||||
+ u32 offset = (frame_status >> OFFSET_BIT) & OFFSET_MASK;
|
||||
+ u32 field = V4L2_FIELD_NONE;
|
||||
+
|
||||
+ /* A buffer decode error means it was decoded,
|
||||
+ * but part of the picture will have artifacts.
|
||||
+ * Typical reason is a temporarily corrupted bitstream
|
||||
+ */
|
||||
+ if (frame_status & ERROR_FLAG)
|
||||
+ dev_dbg(core->dev, "Buffer %d decode error\n",
|
||||
+ buffer_index);
|
||||
+
|
||||
+ if (pic_struct == PIC_TOP_BOT)
|
||||
+ field = V4L2_FIELD_INTERLACED_TB;
|
||||
+ else if (pic_struct == PIC_BOT_TOP)
|
||||
+ field = V4L2_FIELD_INTERLACED_BT;
|
||||
+
|
||||
+ offset |= get_offset_msb(core, i);
|
||||
+ amvdec_dst_buf_done_idx(sess, buffer_index, offset, field);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static irqreturn_t codec_h264_threaded_isr(struct amvdec_session *sess)
|
||||
+{
|
||||
+ struct amvdec_core *core = sess->core;
|
||||
+ u32 status;
|
||||
+ u32 size;
|
||||
+ u8 cmd;
|
||||
+
|
||||
+ status = amvdec_read_dos(core, AV_SCRATCH_0);
|
||||
+ cmd = status & CMD_MASK;
|
||||
+
|
||||
+ switch (cmd) {
|
||||
+ case CMD_SRC_CHANGE:
|
||||
+ codec_h264_src_change(sess);
|
||||
+ break;
|
||||
+ case CMD_FRAMES_READY:
|
||||
+ codec_h264_frames_ready(sess, status);
|
||||
+ break;
|
||||
+ case CMD_FATAL_ERROR:
|
||||
+ dev_err(core->dev, "H.264 decoder fatal error\n");
|
||||
+ goto abort;
|
||||
+ case CMD_BAD_WIDTH:
|
||||
+ size = (amvdec_read_dos(core, AV_SCRATCH_1) + 1) * 16;
|
||||
+ dev_err(core->dev, "Unsupported video width: %u\n", size);
|
||||
+ goto abort;
|
||||
+ case CMD_BAD_HEIGHT:
|
||||
+ size = (amvdec_read_dos(core, AV_SCRATCH_1) + 1) * 16;
|
||||
+ dev_err(core->dev, "Unsupported video height: %u\n", size);
|
||||
+ goto abort;
|
||||
+ case 0: /* Unused but not worth printing for */
|
||||
+ case 9:
|
||||
+ break;
|
||||
+ default:
|
||||
+ dev_info(core->dev, "Unexpected H264 ISR: %08X\n", cmd);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (cmd && cmd != CMD_SRC_CHANGE)
|
||||
+ amvdec_write_dos(core, AV_SCRATCH_0, 0);
|
||||
+
|
||||
+ /* Decoder has some SEI data for us ; ignore */
|
||||
+ if (amvdec_read_dos(core, AV_SCRATCH_J) & SEI_DATA_READY)
|
||||
+ amvdec_write_dos(core, AV_SCRATCH_J, 0);
|
||||
+
|
||||
+ return IRQ_HANDLED;
|
||||
+abort:
|
||||
+ amvdec_abort(sess);
|
||||
+ return IRQ_HANDLED;
|
||||
+}
|
||||
+
|
||||
+static irqreturn_t codec_h264_isr(struct amvdec_session *sess)
|
||||
+{
|
||||
+ struct amvdec_core *core = sess->core;
|
||||
+
|
||||
+ amvdec_write_dos(core, ASSIST_MBOX1_CLR_REG, 1);
|
||||
+
|
||||
+ return IRQ_WAKE_THREAD;
|
||||
+}
|
||||
+
|
||||
+struct amvdec_codec_ops codec_h264_ops = {
|
||||
+ .start = codec_h264_start,
|
||||
+ .stop = codec_h264_stop,
|
||||
+ .load_extended_firmware = codec_h264_load_extended_firmware,
|
||||
+ .isr = codec_h264_isr,
|
||||
+ .threaded_isr = codec_h264_threaded_isr,
|
||||
+ .can_recycle = codec_h264_can_recycle,
|
||||
+ .recycle = codec_h264_recycle,
|
||||
+ .eos_sequence = codec_h264_eos_sequence,
|
||||
+ .resume = codec_h264_resume,
|
||||
+};
|
||||
diff --git a/drivers/staging/media/meson/vdec/codec_h264.h b/drivers/staging/media/meson/vdec/codec_h264.h
|
||||
new file mode 100644
|
||||
index 000000000000..9211a11b452c
|
||||
--- /dev/null
|
||||
+++ b/drivers/staging/media/meson/vdec/codec_h264.h
|
||||
@@ -0,0 +1,13 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
+/*
|
||||
+ * Copyright (C) 2018 Maxime Jourdan <maxi.jourdan@wanadoo.fr>
|
||||
+ */
|
||||
+
|
||||
+#ifndef __MESON_VDEC_CODEC_H264_H_
|
||||
+#define __MESON_VDEC_CODEC_H264_H_
|
||||
+
|
||||
+#include "vdec.h"
|
||||
+
|
||||
+extern struct amvdec_codec_ops codec_h264_ops;
|
||||
+
|
||||
+#endif
|
||||
diff --git a/drivers/staging/media/meson/vdec/vdec_platform.c b/drivers/staging/media/meson/vdec/vdec_platform.c
|
||||
index 824dbc7f46f5..579d3e48f0b2 100644
|
||||
--- a/drivers/staging/media/meson/vdec/vdec_platform.c
|
||||
+++ b/drivers/staging/media/meson/vdec/vdec_platform.c
|
||||
@@ -9,9 +9,20 @@
|
||||
|
||||
#include "vdec_1.h"
|
||||
#include "codec_mpeg12.h"
|
||||
+#include "codec_h264.h"
|
||||
|
||||
static const struct amvdec_format vdec_formats_gxbb[] = {
|
||||
{
|
||||
+ .pixfmt = V4L2_PIX_FMT_H264,
|
||||
+ .min_buffers = 2,
|
||||
+ .max_buffers = 24,
|
||||
+ .max_width = 1920,
|
||||
+ .max_height = 1080,
|
||||
+ .vdec_ops = &vdec_1_ops,
|
||||
+ .codec_ops = &codec_h264_ops,
|
||||
+ .firmware_path = "meson/gxbb/vh264_mc",
|
||||
+ .pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },
|
||||
+ }, {
|
||||
.pixfmt = V4L2_PIX_FMT_MPEG1,
|
||||
.min_buffers = 8,
|
||||
.max_buffers = 8,
|
||||
@@ -36,6 +47,16 @@ static const struct amvdec_format vdec_formats_gxbb[] = {
|
||||
|
||||
static const struct amvdec_format vdec_formats_gxl[] = {
|
||||
{
|
||||
+ .pixfmt = V4L2_PIX_FMT_H264,
|
||||
+ .min_buffers = 2,
|
||||
+ .max_buffers = 24,
|
||||
+ .max_width = 3840,
|
||||
+ .max_height = 2160,
|
||||
+ .vdec_ops = &vdec_1_ops,
|
||||
+ .codec_ops = &codec_h264_ops,
|
||||
+ .firmware_path = "meson/gxl/vh264_mc",
|
||||
+ .pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },
|
||||
+ }, {
|
||||
.pixfmt = V4L2_PIX_FMT_MPEG1,
|
||||
.min_buffers = 8,
|
||||
.max_buffers = 8,
|
||||
@@ -60,6 +81,16 @@ static const struct amvdec_format vdec_formats_gxl[] = {
|
||||
|
||||
static const struct amvdec_format vdec_formats_gxm[] = {
|
||||
{
|
||||
+ .pixfmt = V4L2_PIX_FMT_H264,
|
||||
+ .min_buffers = 2,
|
||||
+ .max_buffers = 24,
|
||||
+ .max_width = 3840,
|
||||
+ .max_height = 2160,
|
||||
+ .vdec_ops = &vdec_1_ops,
|
||||
+ .codec_ops = &codec_h264_ops,
|
||||
+ .firmware_path = "meson/gxm/vh264_mc",
|
||||
+ .pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },
|
||||
+ }, {
|
||||
.pixfmt = V4L2_PIX_FMT_MPEG1,
|
||||
.min_buffers = 8,
|
||||
.max_buffers = 8,
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,316 @@
|
|||
From 489430ff6ba728be0086a2b4fb85592bee769f93 Mon Sep 17 00:00:00 2001
|
||||
From: Maxime Jourdan <mjourdan@baylibre.com>
|
||||
Date: Wed, 29 Aug 2018 16:01:55 +0200
|
||||
Subject: [PATCH 04/14] media: meson: vdec: add MPEG4 decoding support
|
||||
|
||||
Add support for V4L2_PIX_FMT_MPEG4, V4L2_PIX_FMT_XVID and
|
||||
V4L2_PIX_FMT_H.263
|
||||
|
||||
Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
|
||||
---
|
||||
drivers/staging/media/meson/vdec/Makefile | 2 +-
|
||||
.../staging/media/meson/vdec/codec_mpeg4.c | 139 ++++++++++++++++++
|
||||
.../staging/media/meson/vdec/codec_mpeg4.h | 13 ++
|
||||
.../staging/media/meson/vdec/vdec_platform.c | 91 ++++++++++++
|
||||
4 files changed, 244 insertions(+), 1 deletion(-)
|
||||
create mode 100644 drivers/staging/media/meson/vdec/codec_mpeg4.c
|
||||
create mode 100644 drivers/staging/media/meson/vdec/codec_mpeg4.h
|
||||
|
||||
diff --git a/drivers/staging/media/meson/vdec/Makefile b/drivers/staging/media/meson/vdec/Makefile
|
||||
index 711d990c760e..f167a61acb36 100644
|
||||
--- a/drivers/staging/media/meson/vdec/Makefile
|
||||
+++ b/drivers/staging/media/meson/vdec/Makefile
|
||||
@@ -3,6 +3,6 @@
|
||||
|
||||
meson-vdec-objs = esparser.o vdec.o vdec_helpers.o vdec_platform.o
|
||||
meson-vdec-objs += vdec_1.o
|
||||
-meson-vdec-objs += codec_mpeg12.o codec_h264.o
|
||||
+meson-vdec-objs += codec_mpeg12.o codec_h264.o codec_mpeg4.o
|
||||
|
||||
obj-$(CONFIG_VIDEO_MESON_VDEC) += meson-vdec.o
|
||||
diff --git a/drivers/staging/media/meson/vdec/codec_mpeg4.c b/drivers/staging/media/meson/vdec/codec_mpeg4.c
|
||||
new file mode 100644
|
||||
index 000000000000..1d574e576112
|
||||
--- /dev/null
|
||||
+++ b/drivers/staging/media/meson/vdec/codec_mpeg4.c
|
||||
@@ -0,0 +1,139 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * Copyright (C) 2018 Maxime Jourdan <maxi.jourdan@wanadoo.fr>
|
||||
+ */
|
||||
+
|
||||
+#include <media/v4l2-mem2mem.h>
|
||||
+#include <media/videobuf2-dma-contig.h>
|
||||
+
|
||||
+#include "vdec_helpers.h"
|
||||
+#include "dos_regs.h"
|
||||
+
|
||||
+#define SIZE_WORKSPACE SZ_1M
|
||||
+/* Offset added by firmware, to substract from workspace paddr */
|
||||
+#define DCAC_BUFF_START_IP 0x02b00000
|
||||
+
|
||||
+/* map firmware registers to known MPEG4 functions */
|
||||
+#define MREG_BUFFERIN AV_SCRATCH_8
|
||||
+#define MREG_BUFFEROUT AV_SCRATCH_9
|
||||
+#define MP4_NOT_CODED_CNT AV_SCRATCH_A
|
||||
+#define MP4_OFFSET_REG AV_SCRATCH_C
|
||||
+#define MEM_OFFSET_REG AV_SCRATCH_F
|
||||
+#define MREG_FATAL_ERROR AV_SCRATCH_L
|
||||
+
|
||||
+#define BUF_IDX_MASK GENMASK(2, 0)
|
||||
+#define INTERLACE_FLAG BIT(7)
|
||||
+#define TOP_FIELD_FIRST_FLAG BIT(6)
|
||||
+
|
||||
+struct codec_mpeg4 {
|
||||
+ /* Buffer for the MPEG4 Workspace */
|
||||
+ void *workspace_vaddr;
|
||||
+ dma_addr_t workspace_paddr;
|
||||
+};
|
||||
+
|
||||
+static int codec_mpeg4_can_recycle(struct amvdec_core *core)
|
||||
+{
|
||||
+ return !amvdec_read_dos(core, MREG_BUFFERIN);
|
||||
+}
|
||||
+
|
||||
+static void codec_mpeg4_recycle(struct amvdec_core *core, u32 buf_idx)
|
||||
+{
|
||||
+ amvdec_write_dos(core, MREG_BUFFERIN, ~BIT(buf_idx));
|
||||
+}
|
||||
+
|
||||
+static int codec_mpeg4_start(struct amvdec_session *sess) {
|
||||
+ struct amvdec_core *core = sess->core;
|
||||
+ struct codec_mpeg4 *mpeg4 = sess->priv;
|
||||
+ int ret;
|
||||
+
|
||||
+ mpeg4 = kzalloc(sizeof(*mpeg4), GFP_KERNEL);
|
||||
+ if (!mpeg4)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ /* Allocate some memory for the MPEG4 decoder's state */
|
||||
+ mpeg4->workspace_vaddr = dma_alloc_coherent(core->dev, SIZE_WORKSPACE,
|
||||
+ &mpeg4->workspace_paddr,
|
||||
+ GFP_KERNEL);
|
||||
+ if (!mpeg4->workspace_vaddr) {
|
||||
+ dev_err(core->dev, "Failed to request MPEG4 Workspace\n");
|
||||
+ ret = -ENOMEM;
|
||||
+ goto free_mpeg4;
|
||||
+ }
|
||||
+
|
||||
+ /* Canvas regs: AV_SCRATCH_0-AV_SCRATCH_4;AV_SCRATCH_G-AV_SCRATCH_J */
|
||||
+ amvdec_set_canvases(sess, (u32[]){ AV_SCRATCH_0, AV_SCRATCH_G, 0 },
|
||||
+ (u32[]){ 4, 4, 0 });
|
||||
+
|
||||
+ amvdec_write_dos(core, MEM_OFFSET_REG,
|
||||
+ mpeg4->workspace_paddr - DCAC_BUFF_START_IP);
|
||||
+ amvdec_write_dos(core, PSCALE_CTRL, 0);
|
||||
+ amvdec_write_dos(core, MP4_NOT_CODED_CNT, 0);
|
||||
+ amvdec_write_dos(core, MREG_BUFFERIN, 0);
|
||||
+ amvdec_write_dos(core, MREG_BUFFEROUT, 0);
|
||||
+ amvdec_write_dos(core, MREG_FATAL_ERROR, 0);
|
||||
+ amvdec_write_dos(core, MDEC_PIC_DC_THRESH, 0x404038aa);
|
||||
+
|
||||
+ sess->keyframe_found = 1;
|
||||
+ sess->priv = mpeg4;
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+free_mpeg4:
|
||||
+ kfree(mpeg4);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int codec_mpeg4_stop(struct amvdec_session *sess)
|
||||
+{
|
||||
+ struct codec_mpeg4 *mpeg4 = sess->priv;
|
||||
+ struct amvdec_core *core = sess->core;
|
||||
+
|
||||
+ if (mpeg4->workspace_vaddr) {
|
||||
+ dma_free_coherent(core->dev, SIZE_WORKSPACE,
|
||||
+ mpeg4->workspace_vaddr,
|
||||
+ mpeg4->workspace_paddr);
|
||||
+ mpeg4->workspace_vaddr = 0;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static irqreturn_t codec_mpeg4_isr(struct amvdec_session *sess)
|
||||
+{
|
||||
+ struct amvdec_core *core = sess->core;
|
||||
+ u32 reg;
|
||||
+ u32 buffer_index;
|
||||
+ u32 field = V4L2_FIELD_NONE;
|
||||
+
|
||||
+ reg = amvdec_read_dos(core, MREG_FATAL_ERROR);
|
||||
+ if (reg == 1) {
|
||||
+ dev_err(core->dev, "mpeg4 fatal error\n");
|
||||
+ amvdec_abort(sess);
|
||||
+ return IRQ_HANDLED;
|
||||
+ }
|
||||
+
|
||||
+ reg = amvdec_read_dos(core, MREG_BUFFEROUT);
|
||||
+ if (!reg)
|
||||
+ goto end;
|
||||
+
|
||||
+ buffer_index = reg & BUF_IDX_MASK;
|
||||
+ if (reg & INTERLACE_FLAG)
|
||||
+ field = (reg & TOP_FIELD_FIRST_FLAG) ?
|
||||
+ V4L2_FIELD_INTERLACED_TB :
|
||||
+ V4L2_FIELD_INTERLACED_BT;
|
||||
+
|
||||
+ amvdec_dst_buf_done_idx(sess, buffer_index, -1, field);
|
||||
+ amvdec_write_dos(core, MREG_BUFFEROUT, 0);
|
||||
+
|
||||
+end:
|
||||
+ amvdec_write_dos(core, ASSIST_MBOX1_CLR_REG, 1);
|
||||
+ return IRQ_HANDLED;
|
||||
+}
|
||||
+
|
||||
+struct amvdec_codec_ops codec_mpeg4_ops = {
|
||||
+ .start = codec_mpeg4_start,
|
||||
+ .stop = codec_mpeg4_stop,
|
||||
+ .isr = codec_mpeg4_isr,
|
||||
+ .can_recycle = codec_mpeg4_can_recycle,
|
||||
+ .recycle = codec_mpeg4_recycle,
|
||||
+};
|
||||
diff --git a/drivers/staging/media/meson/vdec/codec_mpeg4.h b/drivers/staging/media/meson/vdec/codec_mpeg4.h
|
||||
new file mode 100644
|
||||
index 000000000000..8dcdcc51fad4
|
||||
--- /dev/null
|
||||
+++ b/drivers/staging/media/meson/vdec/codec_mpeg4.h
|
||||
@@ -0,0 +1,13 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
+/*
|
||||
+ * Copyright (C) 2018 Maxime Jourdan <maxi.jourdan@wanadoo.fr>
|
||||
+ */
|
||||
+
|
||||
+#ifndef __MESON_VDEC_CODEC_MPEG4_H_
|
||||
+#define __MESON_VDEC_CODEC_MPEG4_H_
|
||||
+
|
||||
+#include "vdec.h"
|
||||
+
|
||||
+extern struct amvdec_codec_ops codec_mpeg4_ops;
|
||||
+
|
||||
+#endif
|
||||
diff --git a/drivers/staging/media/meson/vdec/vdec_platform.c b/drivers/staging/media/meson/vdec/vdec_platform.c
|
||||
index 579d3e48f0b2..be307bf5bccd 100644
|
||||
--- a/drivers/staging/media/meson/vdec/vdec_platform.c
|
||||
+++ b/drivers/staging/media/meson/vdec/vdec_platform.c
|
||||
@@ -10,9 +10,40 @@
|
||||
#include "vdec_1.h"
|
||||
#include "codec_mpeg12.h"
|
||||
#include "codec_h264.h"
|
||||
+#include "codec_mpeg4.h"
|
||||
|
||||
static const struct amvdec_format vdec_formats_gxbb[] = {
|
||||
{
|
||||
+ .pixfmt = V4L2_PIX_FMT_MPEG4,
|
||||
+ .min_buffers = 8,
|
||||
+ .max_buffers = 8,
|
||||
+ .max_width = 1920,
|
||||
+ .max_height = 1080,
|
||||
+ .vdec_ops = &vdec_1_ops,
|
||||
+ .codec_ops = &codec_mpeg4_ops,
|
||||
+ .firmware_path = "meson/gx/vmpeg4_mc_5",
|
||||
+ .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
|
||||
+ }, {
|
||||
+ .pixfmt = V4L2_PIX_FMT_H263,
|
||||
+ .min_buffers = 8,
|
||||
+ .max_buffers = 8,
|
||||
+ .max_width = 1920,
|
||||
+ .max_height = 1080,
|
||||
+ .vdec_ops = &vdec_1_ops,
|
||||
+ .codec_ops = &codec_mpeg4_ops,
|
||||
+ .firmware_path = "meson/gx/h263_mc",
|
||||
+ .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
|
||||
+ }, {
|
||||
+ .pixfmt = V4L2_PIX_FMT_XVID,
|
||||
+ .min_buffers = 8,
|
||||
+ .max_buffers = 8,
|
||||
+ .max_width = 1920,
|
||||
+ .max_height = 1080,
|
||||
+ .vdec_ops = &vdec_1_ops,
|
||||
+ .codec_ops = &codec_mpeg4_ops,
|
||||
+ .firmware_path = "meson/gx/vmpeg4_mc_5",
|
||||
+ .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
|
||||
+ }, {
|
||||
.pixfmt = V4L2_PIX_FMT_H264,
|
||||
.min_buffers = 2,
|
||||
.max_buffers = 24,
|
||||
@@ -47,6 +78,36 @@ static const struct amvdec_format vdec_formats_gxbb[] = {
|
||||
|
||||
static const struct amvdec_format vdec_formats_gxl[] = {
|
||||
{
|
||||
+ .pixfmt = V4L2_PIX_FMT_MPEG4,
|
||||
+ .min_buffers = 8,
|
||||
+ .max_buffers = 8,
|
||||
+ .max_width = 1920,
|
||||
+ .max_height = 1080,
|
||||
+ .vdec_ops = &vdec_1_ops,
|
||||
+ .codec_ops = &codec_mpeg4_ops,
|
||||
+ .firmware_path = "meson/gx/vmpeg4_mc_5",
|
||||
+ .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
|
||||
+ }, {
|
||||
+ .pixfmt = V4L2_PIX_FMT_H263,
|
||||
+ .min_buffers = 8,
|
||||
+ .max_buffers = 8,
|
||||
+ .max_width = 1920,
|
||||
+ .max_height = 1080,
|
||||
+ .vdec_ops = &vdec_1_ops,
|
||||
+ .codec_ops = &codec_mpeg4_ops,
|
||||
+ .firmware_path = "meson/gx/h263_mc",
|
||||
+ .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
|
||||
+ }, {
|
||||
+ .pixfmt = V4L2_PIX_FMT_XVID,
|
||||
+ .min_buffers = 8,
|
||||
+ .max_buffers = 8,
|
||||
+ .max_width = 1920,
|
||||
+ .max_height = 1080,
|
||||
+ .vdec_ops = &vdec_1_ops,
|
||||
+ .codec_ops = &codec_mpeg4_ops,
|
||||
+ .firmware_path = "meson/gx/vmpeg4_mc_5",
|
||||
+ .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
|
||||
+ }, {
|
||||
.pixfmt = V4L2_PIX_FMT_H264,
|
||||
.min_buffers = 2,
|
||||
.max_buffers = 24,
|
||||
@@ -81,6 +142,36 @@ static const struct amvdec_format vdec_formats_gxl[] = {
|
||||
|
||||
static const struct amvdec_format vdec_formats_gxm[] = {
|
||||
{
|
||||
+ .pixfmt = V4L2_PIX_FMT_MPEG4,
|
||||
+ .min_buffers = 8,
|
||||
+ .max_buffers = 8,
|
||||
+ .max_width = 1920,
|
||||
+ .max_height = 1080,
|
||||
+ .vdec_ops = &vdec_1_ops,
|
||||
+ .codec_ops = &codec_mpeg4_ops,
|
||||
+ .firmware_path = "meson/gx/vmpeg4_mc_5",
|
||||
+ .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
|
||||
+ }, {
|
||||
+ .pixfmt = V4L2_PIX_FMT_H263,
|
||||
+ .min_buffers = 8,
|
||||
+ .max_buffers = 8,
|
||||
+ .max_width = 1920,
|
||||
+ .max_height = 1080,
|
||||
+ .vdec_ops = &vdec_1_ops,
|
||||
+ .codec_ops = &codec_mpeg4_ops,
|
||||
+ .firmware_path = "meson/gx/h263_mc",
|
||||
+ .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
|
||||
+ }, {
|
||||
+ .pixfmt = V4L2_PIX_FMT_XVID,
|
||||
+ .min_buffers = 8,
|
||||
+ .max_buffers = 8,
|
||||
+ .max_width = 1920,
|
||||
+ .max_height = 1080,
|
||||
+ .vdec_ops = &vdec_1_ops,
|
||||
+ .codec_ops = &codec_mpeg4_ops,
|
||||
+ .firmware_path = "meson/gx/vmpeg4_mc_5",
|
||||
+ .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
|
||||
+ }, {
|
||||
.pixfmt = V4L2_PIX_FMT_H264,
|
||||
.min_buffers = 2,
|
||||
.max_buffers = 24,
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,256 @@
|
|||
From 309ecd66298c41728c7e0de45a86ee6237fed90a Mon Sep 17 00:00:00 2001
|
||||
From: Maxime Jourdan <mjourdan@baylibre.com>
|
||||
Date: Sun, 21 Oct 2018 15:14:27 +0200
|
||||
Subject: [PATCH 05/14] media: meson: vdec: add MJPEG decoding support
|
||||
|
||||
Add support for V4L2_PIX_FMT_MJPEG
|
||||
|
||||
Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
|
||||
---
|
||||
drivers/staging/media/meson/vdec/Makefile | 2 +-
|
||||
.../staging/media/meson/vdec/codec_mjpeg.c | 140 ++++++++++++++++++
|
||||
.../staging/media/meson/vdec/codec_mjpeg.h | 13 ++
|
||||
.../staging/media/meson/vdec/vdec_platform.c | 31 ++++
|
||||
4 files changed, 185 insertions(+), 1 deletion(-)
|
||||
create mode 100644 drivers/staging/media/meson/vdec/codec_mjpeg.c
|
||||
create mode 100644 drivers/staging/media/meson/vdec/codec_mjpeg.h
|
||||
|
||||
diff --git a/drivers/staging/media/meson/vdec/Makefile b/drivers/staging/media/meson/vdec/Makefile
|
||||
index f167a61acb36..20c23f9015eb 100644
|
||||
--- a/drivers/staging/media/meson/vdec/Makefile
|
||||
+++ b/drivers/staging/media/meson/vdec/Makefile
|
||||
@@ -3,6 +3,6 @@
|
||||
|
||||
meson-vdec-objs = esparser.o vdec.o vdec_helpers.o vdec_platform.o
|
||||
meson-vdec-objs += vdec_1.o
|
||||
-meson-vdec-objs += codec_mpeg12.o codec_h264.o codec_mpeg4.o
|
||||
+meson-vdec-objs += codec_mpeg12.o codec_h264.o codec_mpeg4.o codec_mjpeg.o
|
||||
|
||||
obj-$(CONFIG_VIDEO_MESON_VDEC) += meson-vdec.o
|
||||
diff --git a/drivers/staging/media/meson/vdec/codec_mjpeg.c b/drivers/staging/media/meson/vdec/codec_mjpeg.c
|
||||
new file mode 100644
|
||||
index 000000000000..abea9e3f944c
|
||||
--- /dev/null
|
||||
+++ b/drivers/staging/media/meson/vdec/codec_mjpeg.c
|
||||
@@ -0,0 +1,140 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * Copyright (C) 2018 Maxime Jourdan <maxi.jourdan@wanadoo.fr>
|
||||
+ */
|
||||
+
|
||||
+#include <media/v4l2-mem2mem.h>
|
||||
+#include <media/videobuf2-dma-contig.h>
|
||||
+
|
||||
+#include "vdec_helpers.h"
|
||||
+#include "dos_regs.h"
|
||||
+
|
||||
+/* map FW registers to known MJPEG functions */
|
||||
+#define MREG_DECODE_PARAM AV_SCRATCH_2
|
||||
+#define MREG_TO_AMRISC AV_SCRATCH_8
|
||||
+#define MREG_FROM_AMRISC AV_SCRATCH_9
|
||||
+#define MREG_FRAME_OFFSET AV_SCRATCH_A
|
||||
+
|
||||
+static int codec_mjpeg_can_recycle(struct amvdec_core *core)
|
||||
+{
|
||||
+ return !amvdec_read_dos(core, MREG_TO_AMRISC);
|
||||
+}
|
||||
+
|
||||
+static void codec_mjpeg_recycle(struct amvdec_core *core, u32 buf_idx)
|
||||
+{
|
||||
+ amvdec_write_dos(core, MREG_TO_AMRISC, buf_idx + 1);
|
||||
+}
|
||||
+
|
||||
+/* 4 point triangle */
|
||||
+static const uint32_t filt_coef[] = {
|
||||
+ 0x20402000, 0x20402000, 0x1f3f2101, 0x1f3f2101,
|
||||
+ 0x1e3e2202, 0x1e3e2202, 0x1d3d2303, 0x1d3d2303,
|
||||
+ 0x1c3c2404, 0x1c3c2404, 0x1b3b2505, 0x1b3b2505,
|
||||
+ 0x1a3a2606, 0x1a3a2606, 0x19392707, 0x19392707,
|
||||
+ 0x18382808, 0x18382808, 0x17372909, 0x17372909,
|
||||
+ 0x16362a0a, 0x16362a0a, 0x15352b0b, 0x15352b0b,
|
||||
+ 0x14342c0c, 0x14342c0c, 0x13332d0d, 0x13332d0d,
|
||||
+ 0x12322e0e, 0x12322e0e, 0x11312f0f, 0x11312f0f,
|
||||
+ 0x10303010
|
||||
+};
|
||||
+
|
||||
+static void codec_mjpeg_init_scaler(struct amvdec_core *core)
|
||||
+{
|
||||
+ int i;
|
||||
+
|
||||
+ /* PSCALE cbus bmem enable */
|
||||
+ amvdec_write_dos(core, PSCALE_CTRL, 0xc000);
|
||||
+
|
||||
+ amvdec_write_dos(core, PSCALE_BMEM_ADDR, 0);
|
||||
+ for (i = 0; i < ARRAY_SIZE(filt_coef); ++i) {
|
||||
+ amvdec_write_dos(core, PSCALE_BMEM_DAT, 0);
|
||||
+ amvdec_write_dos(core, PSCALE_BMEM_DAT, filt_coef[i]);
|
||||
+ }
|
||||
+
|
||||
+ amvdec_write_dos(core, PSCALE_BMEM_ADDR, 74);
|
||||
+ amvdec_write_dos(core, PSCALE_BMEM_DAT, 0x0008);
|
||||
+ amvdec_write_dos(core, PSCALE_BMEM_DAT, 0x60000000);
|
||||
+
|
||||
+ amvdec_write_dos(core, PSCALE_BMEM_ADDR, 82);
|
||||
+ amvdec_write_dos(core, PSCALE_BMEM_DAT, 0x0008);
|
||||
+ amvdec_write_dos(core, PSCALE_BMEM_DAT, 0x60000000);
|
||||
+
|
||||
+ amvdec_write_dos(core, PSCALE_BMEM_ADDR, 78);
|
||||
+ amvdec_write_dos(core, PSCALE_BMEM_DAT, 0x0008);
|
||||
+ amvdec_write_dos(core, PSCALE_BMEM_DAT, 0x60000000);
|
||||
+
|
||||
+ amvdec_write_dos(core, PSCALE_BMEM_ADDR, 86);
|
||||
+ amvdec_write_dos(core, PSCALE_BMEM_DAT, 0x0008);
|
||||
+ amvdec_write_dos(core, PSCALE_BMEM_DAT, 0x60000000);
|
||||
+
|
||||
+ amvdec_write_dos(core, PSCALE_BMEM_ADDR, 73);
|
||||
+ amvdec_write_dos(core, PSCALE_BMEM_DAT, 0x10000);
|
||||
+ amvdec_write_dos(core, PSCALE_BMEM_ADDR, 81);
|
||||
+ amvdec_write_dos(core, PSCALE_BMEM_DAT, 0x10000);
|
||||
+
|
||||
+ amvdec_write_dos(core, PSCALE_BMEM_ADDR, 77);
|
||||
+ amvdec_write_dos(core, PSCALE_BMEM_DAT, 0x10000);
|
||||
+ amvdec_write_dos(core, PSCALE_BMEM_ADDR, 85);
|
||||
+ amvdec_write_dos(core, PSCALE_BMEM_DAT, 0x10000);
|
||||
+
|
||||
+ amvdec_write_dos(core, PSCALE_RST, 0x7);
|
||||
+ amvdec_write_dos(core, PSCALE_RST, 0);
|
||||
+}
|
||||
+
|
||||
+static int codec_mjpeg_start(struct amvdec_session *sess)
|
||||
+{
|
||||
+ struct amvdec_core *core = sess->core;
|
||||
+
|
||||
+ amvdec_write_dos(core, AV_SCRATCH_0, 12);
|
||||
+ amvdec_write_dos(core, AV_SCRATCH_1, 0x031a);
|
||||
+
|
||||
+ amvdec_set_canvases(sess, (u32[]){ AV_SCRATCH_4, 0 },
|
||||
+ (u32[]){ 4, 0 });
|
||||
+ codec_mjpeg_init_scaler(core);
|
||||
+
|
||||
+ amvdec_write_dos(core, MREG_TO_AMRISC, 0);
|
||||
+ amvdec_write_dos(core, MREG_FROM_AMRISC, 0);
|
||||
+ amvdec_write_dos(core, MCPU_INTR_MSK, 0xffff);
|
||||
+ amvdec_write_dos(core, MREG_DECODE_PARAM,
|
||||
+ (sess->height << 4) | 0x8000);
|
||||
+ amvdec_write_dos(core, VDEC_ASSIST_AMR1_INT8, 8);
|
||||
+
|
||||
+ /* Intra-only codec */
|
||||
+ sess->keyframe_found = 1;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int codec_mjpeg_stop(struct amvdec_session *sess)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static irqreturn_t codec_mjpeg_isr(struct amvdec_session *sess)
|
||||
+{
|
||||
+ struct amvdec_core *core = sess->core;
|
||||
+ u32 reg;
|
||||
+ u32 buffer_index;
|
||||
+ u32 offset;
|
||||
+
|
||||
+ amvdec_write_dos(core, ASSIST_MBOX1_CLR_REG, 1);
|
||||
+
|
||||
+ reg = amvdec_read_dos(core, MREG_FROM_AMRISC);
|
||||
+ if (!(reg & 0x7))
|
||||
+ return IRQ_HANDLED;
|
||||
+
|
||||
+ buffer_index = ((reg & 0x7) - 1) & 3;
|
||||
+ offset = amvdec_read_dos(core, MREG_FRAME_OFFSET);
|
||||
+ amvdec_dst_buf_done_idx(sess, buffer_index, offset, V4L2_FIELD_NONE);
|
||||
+
|
||||
+ amvdec_write_dos(core, MREG_FROM_AMRISC, 0);
|
||||
+ return IRQ_HANDLED;
|
||||
+}
|
||||
+
|
||||
+struct amvdec_codec_ops codec_mjpeg_ops = {
|
||||
+ .start = codec_mjpeg_start,
|
||||
+ .stop = codec_mjpeg_stop,
|
||||
+ .isr = codec_mjpeg_isr,
|
||||
+ .can_recycle = codec_mjpeg_can_recycle,
|
||||
+ .recycle = codec_mjpeg_recycle,
|
||||
+};
|
||||
diff --git a/drivers/staging/media/meson/vdec/codec_mjpeg.h b/drivers/staging/media/meson/vdec/codec_mjpeg.h
|
||||
new file mode 100644
|
||||
index 000000000000..364fa7ee6d9e
|
||||
--- /dev/null
|
||||
+++ b/drivers/staging/media/meson/vdec/codec_mjpeg.h
|
||||
@@ -0,0 +1,13 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
+/*
|
||||
+ * Copyright (C) 2018 Maxime Jourdan <maxi.jourdan@wanadoo.fr>
|
||||
+ */
|
||||
+
|
||||
+#ifndef __MESON_VDEC_CODEC_MJPEG_H_
|
||||
+#define __MESON_VDEC_CODEC_MJPEG_H_
|
||||
+
|
||||
+#include "vdec.h"
|
||||
+
|
||||
+extern struct amvdec_codec_ops codec_mjpeg_ops;
|
||||
+
|
||||
+#endif
|
||||
diff --git a/drivers/staging/media/meson/vdec/vdec_platform.c b/drivers/staging/media/meson/vdec/vdec_platform.c
|
||||
index be307bf5bccd..fb714d74753f 100644
|
||||
--- a/drivers/staging/media/meson/vdec/vdec_platform.c
|
||||
+++ b/drivers/staging/media/meson/vdec/vdec_platform.c
|
||||
@@ -11,9 +11,20 @@
|
||||
#include "codec_mpeg12.h"
|
||||
#include "codec_h264.h"
|
||||
#include "codec_mpeg4.h"
|
||||
+#include "codec_mjpeg.h"
|
||||
|
||||
static const struct amvdec_format vdec_formats_gxbb[] = {
|
||||
{
|
||||
+ .pixfmt = V4L2_PIX_FMT_MJPEG,
|
||||
+ .min_buffers = 4,
|
||||
+ .max_buffers = 4,
|
||||
+ .max_width = 1920,
|
||||
+ .max_height = 1080,
|
||||
+ .vdec_ops = &vdec_1_ops,
|
||||
+ .codec_ops = &codec_mjpeg_ops,
|
||||
+ .firmware_path = "meson/gx/vmjpeg_mc",
|
||||
+ .pixfmts_cap = { V4L2_PIX_FMT_YUV420M, 0 },
|
||||
+ }, {
|
||||
.pixfmt = V4L2_PIX_FMT_MPEG4,
|
||||
.min_buffers = 8,
|
||||
.max_buffers = 8,
|
||||
@@ -78,6 +89,16 @@ static const struct amvdec_format vdec_formats_gxbb[] = {
|
||||
|
||||
static const struct amvdec_format vdec_formats_gxl[] = {
|
||||
{
|
||||
+ .pixfmt = V4L2_PIX_FMT_MJPEG,
|
||||
+ .min_buffers = 4,
|
||||
+ .max_buffers = 4,
|
||||
+ .max_width = 1920,
|
||||
+ .max_height = 1080,
|
||||
+ .vdec_ops = &vdec_1_ops,
|
||||
+ .codec_ops = &codec_mjpeg_ops,
|
||||
+ .firmware_path = "meson/gx/vmjpeg_mc",
|
||||
+ .pixfmts_cap = { V4L2_PIX_FMT_YUV420M, 0 },
|
||||
+ }, {
|
||||
.pixfmt = V4L2_PIX_FMT_MPEG4,
|
||||
.min_buffers = 8,
|
||||
.max_buffers = 8,
|
||||
@@ -142,6 +163,16 @@ static const struct amvdec_format vdec_formats_gxl[] = {
|
||||
|
||||
static const struct amvdec_format vdec_formats_gxm[] = {
|
||||
{
|
||||
+ .pixfmt = V4L2_PIX_FMT_MJPEG,
|
||||
+ .min_buffers = 4,
|
||||
+ .max_buffers = 4,
|
||||
+ .max_width = 1920,
|
||||
+ .max_height = 1080,
|
||||
+ .vdec_ops = &vdec_1_ops,
|
||||
+ .codec_ops = &codec_mjpeg_ops,
|
||||
+ .firmware_path = "meson/gx/vmjpeg_mc",
|
||||
+ .pixfmts_cap = { V4L2_PIX_FMT_YUV420M, 0 },
|
||||
+ }, {
|
||||
.pixfmt = V4L2_PIX_FMT_MPEG4,
|
||||
.min_buffers = 8,
|
||||
.max_buffers = 8,
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
From bcffd88c7d057bf30b53ad3f9f122b50e8d43932 Mon Sep 17 00:00:00 2001
|
||||
From: Maxime Jourdan <mjourdan@baylibre.com>
|
||||
Date: Sun, 21 Oct 2018 15:14:49 +0200
|
||||
Subject: [PATCH 06/14] media: videodev2.h: Add Amlogic compressed format
|
||||
|
||||
Add V4L2_PIX_FMT_AM21C which is a lossless, compressed framebuffer
|
||||
format.
|
||||
|
||||
It is used by the video decoding and the display IP on many Amlogic
|
||||
SoCs.
|
||||
|
||||
Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
|
||||
---
|
||||
drivers/media/v4l2-core/v4l2-ioctl.c | 1 +
|
||||
include/uapi/linux/videodev2.h | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
|
||||
index b4c73e8f23c5..500e7f851317 100644
|
||||
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
|
||||
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
|
||||
@@ -1359,6 +1359,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
|
||||
case V4L2_PIX_FMT_S5C_UYVY_JPG: descr = "S5C73MX interleaved UYVY/JPEG"; break;
|
||||
case V4L2_PIX_FMT_MT21C: descr = "Mediatek Compressed Format"; break;
|
||||
case V4L2_PIX_FMT_SUNXI_TILED_NV12: descr = "Sunxi Tiled NV12 Format"; break;
|
||||
+ case V4L2_PIX_FMT_AM21C: descr = "Amlogic Compressed Format"; break;
|
||||
default:
|
||||
if (fmt->description[0])
|
||||
return;
|
||||
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
|
||||
index 1050a75fb7ef..8cd52287c328 100644
|
||||
--- a/include/uapi/linux/videodev2.h
|
||||
+++ b/include/uapi/linux/videodev2.h
|
||||
@@ -718,6 +718,7 @@ struct v4l2_pix_format {
|
||||
#define V4L2_PIX_FMT_Y12I v4l2_fourcc('Y', '1', '2', 'I') /* Greyscale 12-bit L/R interleaved */
|
||||
#define V4L2_PIX_FMT_Z16 v4l2_fourcc('Z', '1', '6', ' ') /* Depth data 16-bit */
|
||||
#define V4L2_PIX_FMT_MT21C v4l2_fourcc('M', 'T', '2', '1') /* Mediatek compressed block mode */
|
||||
+#define V4L2_PIX_FMT_AM21C v4l2_fourcc('A', 'M', '2', '1') /* Amlogic compressed block mode */
|
||||
#define V4L2_PIX_FMT_INZI v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */
|
||||
#define V4L2_PIX_FMT_SUNXI_TILED_NV12 v4l2_fourcc('S', 'T', '1', '2') /* Sunxi Tiled NV12 Format */
|
||||
#define V4L2_PIX_FMT_CNF4 v4l2_fourcc('C', 'N', 'F', '4') /* Intel 4-bit packed depth confidence information */
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,125 @@
|
|||
From 074266402100ff1764d5a0307616edcd847e8f6d Mon Sep 17 00:00:00 2001
|
||||
From: Maxime Jourdan <mjourdan@baylibre.com>
|
||||
Date: Sun, 21 Oct 2018 15:15:26 +0200
|
||||
Subject: [PATCH 07/14] media: meson: vdec: add support for V4L2_PIX_FMT_AM21C
|
||||
|
||||
Support the lossless framebuffer compression format.
|
||||
|
||||
Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
|
||||
---
|
||||
drivers/staging/media/meson/vdec/vdec.c | 12 +++++++
|
||||
.../staging/media/meson/vdec/vdec_helpers.c | 31 +++++++++++++++++++
|
||||
.../staging/media/meson/vdec/vdec_helpers.h | 4 +++
|
||||
3 files changed, 47 insertions(+)
|
||||
|
||||
diff --git a/drivers/staging/media/meson/vdec/vdec.c b/drivers/staging/media/meson/vdec/vdec.c
|
||||
index 4e4f9d614e41..e466a9905c78 100644
|
||||
--- a/drivers/staging/media/meson/vdec/vdec.c
|
||||
+++ b/drivers/staging/media/meson/vdec/vdec.c
|
||||
@@ -186,6 +186,7 @@ static int vdec_queue_setup(struct vb2_queue *q, unsigned int *num_buffers,
|
||||
{
|
||||
struct amvdec_session *sess = vb2_get_drv_priv(q);
|
||||
u32 output_size = amvdec_get_output_size(sess);
|
||||
+ u32 am21c_size = amvdec_am21c_size(sess->width, sess->height);
|
||||
|
||||
if (*num_planes) {
|
||||
switch (q->type) {
|
||||
@@ -208,6 +209,10 @@ static int vdec_queue_setup(struct vb2_queue *q, unsigned int *num_buffers,
|
||||
sizes[2] < output_size / 4)
|
||||
return -EINVAL;
|
||||
break;
|
||||
+ case V4L2_PIX_FMT_AM21C:
|
||||
+ if (*num_planes != 1 || sizes[0] < am21c_size)
|
||||
+ return -EINVAL;
|
||||
+ break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -237,6 +242,9 @@ static int vdec_queue_setup(struct vb2_queue *q, unsigned int *num_buffers,
|
||||
sizes[2] = output_size / 4;
|
||||
*num_planes = 3;
|
||||
break;
|
||||
+ case V4L2_PIX_FMT_AM21C:
|
||||
+ sizes[0] = am21c_size;
|
||||
+ *num_planes = 1;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -517,6 +525,10 @@ vdec_try_fmt_common(struct amvdec_session *sess, u32 size,
|
||||
get_output_size(pixmp->width, pixmp->height) / 4;
|
||||
pfmt[2].bytesperline = ALIGN(pixmp->width, 64) / 2;
|
||||
pixmp->num_planes = 3;
|
||||
+ } else if (pixmp->pixelformat == V4L2_PIX_FMT_AM21C) {
|
||||
+ pfmt[0].sizeimage =
|
||||
+ amvdec_am21c_size(pixmp->width, pixmp->height);
|
||||
+ pfmt[0].bytesperline = 0;
|
||||
}
|
||||
} else {
|
||||
return NULL;
|
||||
diff --git a/drivers/staging/media/meson/vdec/vdec_helpers.c b/drivers/staging/media/meson/vdec/vdec_helpers.c
|
||||
index f16948bdbf2f..2b554f21e3c1 100644
|
||||
--- a/drivers/staging/media/meson/vdec/vdec_helpers.c
|
||||
+++ b/drivers/staging/media/meson/vdec/vdec_helpers.c
|
||||
@@ -50,6 +50,33 @@ void amvdec_write_parser(struct amvdec_core *core, u32 reg, u32 val)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(amvdec_write_parser);
|
||||
|
||||
+/* 4 KiB per 64x32 block */
|
||||
+u32 amvdec_am21c_body_size(u32 width, u32 height)
|
||||
+{
|
||||
+ u32 width_64 = ALIGN(width, 64) / 64;
|
||||
+ u32 height_32 = ALIGN(height, 32) / 32;
|
||||
+
|
||||
+ return SZ_4K * width_64 * height_32;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(amvdec_am21c_body_size);
|
||||
+
|
||||
+/* 32 bytes per 128x64 block */
|
||||
+u32 amvdec_am21c_head_size(u32 width, u32 height)
|
||||
+{
|
||||
+ u32 width_128 = ALIGN(width, 128) / 128;
|
||||
+ u32 height_64 = ALIGN(height, 64) / 64;
|
||||
+
|
||||
+ return 32 * width_128 * height_64;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(amvdec_am21c_head_size);
|
||||
+
|
||||
+u32 amvdec_am21c_size(u32 width, u32 height)
|
||||
+{
|
||||
+ return ALIGN(amvdec_am21c_body_size(width, height) +
|
||||
+ amvdec_am21c_head_size(width, height), SZ_64K);
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(amvdec_am21c_size);
|
||||
+
|
||||
static int canvas_alloc(struct amvdec_session *sess, u8 *canvas_id)
|
||||
{
|
||||
int ret;
|
||||
@@ -267,6 +294,10 @@ static void dst_buf_done(struct amvdec_session *sess,
|
||||
vbuf->vb2_buf.planes[1].bytesused = output_size / 4;
|
||||
vbuf->vb2_buf.planes[2].bytesused = output_size / 4;
|
||||
break;
|
||||
+ case V4L2_PIX_FMT_AM21C:
|
||||
+ vbuf->vb2_buf.planes[0].bytesused =
|
||||
+ amvdec_am21c_size(sess->width, sess->height);
|
||||
+ break;
|
||||
}
|
||||
|
||||
vbuf->vb2_buf.timestamp = timestamp;
|
||||
diff --git a/drivers/staging/media/meson/vdec/vdec_helpers.h b/drivers/staging/media/meson/vdec/vdec_helpers.h
|
||||
index a455a9ee1cc2..94d2c1ecfe14 100644
|
||||
--- a/drivers/staging/media/meson/vdec/vdec_helpers.h
|
||||
+++ b/drivers/staging/media/meson/vdec/vdec_helpers.h
|
||||
@@ -27,6 +27,10 @@ void amvdec_clear_dos_bits(struct amvdec_core *core, u32 reg, u32 val);
|
||||
u32 amvdec_read_parser(struct amvdec_core *core, u32 reg);
|
||||
void amvdec_write_parser(struct amvdec_core *core, u32 reg, u32 val);
|
||||
|
||||
+u32 amvdec_am21c_body_size(u32 width, u32 height);
|
||||
+u32 amvdec_am21c_head_size(u32 width, u32 height);
|
||||
+u32 amvdec_am21c_size(u32 width, u32 height);
|
||||
+
|
||||
/**
|
||||
* amvdec_dst_buf_done_idx() - Signal that a buffer is done decoding
|
||||
*
|
||||
--
|
||||
2.20.1
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,155 @@
|
|||
From 0f7fb280bd77cef388b15a0f91eb318dc82ee32f Mon Sep 17 00:00:00 2001
|
||||
From: Maxime Jourdan <mjourdan@baylibre.com>
|
||||
Date: Thu, 17 Jan 2019 16:59:11 +0100
|
||||
Subject: [PATCH 09/14] media: meson: vdec: add VP9 input support
|
||||
|
||||
Amlogic VP9 decoder requires an additional 16-byte payload before every
|
||||
frame header.
|
||||
|
||||
Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
|
||||
---
|
||||
drivers/staging/media/meson/vdec/esparser.c | 101 +++++++++++++++++++-
|
||||
1 file changed, 97 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/media/meson/vdec/esparser.c b/drivers/staging/media/meson/vdec/esparser.c
|
||||
index 3a21a8cec799..97a4cd409c5f 100644
|
||||
--- a/drivers/staging/media/meson/vdec/esparser.c
|
||||
+++ b/drivers/staging/media/meson/vdec/esparser.c
|
||||
@@ -52,6 +52,7 @@
|
||||
#define PARSER_VIDEO_HOLE 0x90
|
||||
|
||||
#define SEARCH_PATTERN_LEN 512
|
||||
+#define VP9_HEADER_SIZE 16
|
||||
|
||||
static DECLARE_WAIT_QUEUE_HEAD(wq);
|
||||
static int search_done;
|
||||
@@ -74,14 +75,103 @@ static irqreturn_t esparser_isr(int irq, void *dev)
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * VP9 frame headers need to be appended by a 16-byte long
|
||||
+ * Amlogic custom header
|
||||
+ */
|
||||
+static int vp9_update_header(struct vb2_buffer *buf)
|
||||
+{
|
||||
+ uint8_t *dp;
|
||||
+ uint8_t marker;
|
||||
+ int dsize;
|
||||
+ int num_frames, cur_frame;
|
||||
+ int cur_mag, mag, mag_ptr;
|
||||
+ int frame_size[8], tot_frame_size[8];
|
||||
+ int total_datasize = 0;
|
||||
+ int new_frame_size;
|
||||
+ unsigned char *old_header = NULL;
|
||||
+
|
||||
+ dp = (uint8_t *) vb2_plane_vaddr(buf, 0);
|
||||
+ dsize = vb2_get_plane_payload(buf, 0);
|
||||
+
|
||||
+ marker = dp[dsize - 1];
|
||||
+ if ((marker & 0xe0) == 0xc0) {
|
||||
+ num_frames = (marker & 0x7) + 1;
|
||||
+ mag = ((marker >> 3) & 0x3) + 1;
|
||||
+ mag_ptr = dsize - mag * num_frames - 2;
|
||||
+ if (dp[mag_ptr] != marker) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+ mag_ptr++;
|
||||
+ for (cur_frame = 0; cur_frame < num_frames; cur_frame++) {
|
||||
+ frame_size[cur_frame] = 0;
|
||||
+ for (cur_mag = 0; cur_mag < mag; cur_mag++) {
|
||||
+ frame_size[cur_frame] |= (dp[mag_ptr] << (cur_mag * 8));
|
||||
+ mag_ptr++;
|
||||
+ }
|
||||
+ if (cur_frame == 0)
|
||||
+ tot_frame_size[cur_frame] = frame_size[cur_frame];
|
||||
+ else
|
||||
+ tot_frame_size[cur_frame] = tot_frame_size[cur_frame - 1] + frame_size[cur_frame];
|
||||
+ total_datasize += frame_size[cur_frame];
|
||||
+ }
|
||||
+ } else {
|
||||
+ num_frames = 1;
|
||||
+ frame_size[0] = dsize;
|
||||
+ tot_frame_size[0] = dsize;
|
||||
+ total_datasize = dsize;
|
||||
+ }
|
||||
+
|
||||
+ new_frame_size = total_datasize + num_frames * VP9_HEADER_SIZE;
|
||||
+
|
||||
+ for (cur_frame = num_frames - 1; cur_frame >= 0; cur_frame--) {
|
||||
+ int framesize = frame_size[cur_frame];
|
||||
+ int framesize_header = framesize + 4;
|
||||
+ int oldframeoff = tot_frame_size[cur_frame] - framesize;
|
||||
+ int outheaderoff = oldframeoff + cur_frame * VP9_HEADER_SIZE;
|
||||
+ uint8_t *fdata = dp + outheaderoff;
|
||||
+ uint8_t *old_framedata = dp + oldframeoff;
|
||||
+
|
||||
+ memmove(fdata + VP9_HEADER_SIZE, old_framedata, framesize);
|
||||
+
|
||||
+ fdata[0] = (framesize_header >> 24) & 0xff;
|
||||
+ fdata[1] = (framesize_header >> 16) & 0xff;
|
||||
+ fdata[2] = (framesize_header >> 8) & 0xff;
|
||||
+ fdata[3] = (framesize_header >> 0) & 0xff;
|
||||
+ fdata[4] = ((framesize_header >> 24) & 0xff) ^0xff;
|
||||
+ fdata[5] = ((framesize_header >> 16) & 0xff) ^0xff;
|
||||
+ fdata[6] = ((framesize_header >> 8) & 0xff) ^0xff;
|
||||
+ fdata[7] = ((framesize_header >> 0) & 0xff) ^0xff;
|
||||
+ fdata[8] = 0;
|
||||
+ fdata[9] = 0;
|
||||
+ fdata[10] = 0;
|
||||
+ fdata[11] = 1;
|
||||
+ fdata[12] = 'A';
|
||||
+ fdata[13] = 'M';
|
||||
+ fdata[14] = 'L';
|
||||
+ fdata[15] = 'V';
|
||||
+
|
||||
+ if (!old_header) {
|
||||
+ /* nothing */
|
||||
+ } else if (old_header > fdata + 16 + framesize) {
|
||||
+ printk("data has gaps, setting to 0\n");
|
||||
+ memset(fdata + 16 + framesize, 0, (old_header - fdata + 16 + framesize));
|
||||
+ } else if (old_header < fdata + 16 + framesize) {
|
||||
+ printk("data overwritten\n");
|
||||
+ }
|
||||
+ old_header = fdata;
|
||||
+ }
|
||||
+
|
||||
+ return new_frame_size;
|
||||
+}
|
||||
+
|
||||
/* Pad the packet to at least 4KiB bytes otherwise the VDEC unit won't trigger
|
||||
* ISRs.
|
||||
* Also append a start code 000001ff at the end to trigger
|
||||
* the ESPARSER interrupt.
|
||||
*/
|
||||
-static u32 esparser_pad_start_code(struct vb2_buffer *vb)
|
||||
+static u32 esparser_pad_start_code(struct vb2_buffer *vb, u32 payload_size)
|
||||
{
|
||||
- u32 payload_size = vb2_get_plane_payload(vb, 0);
|
||||
u32 pad_size = 0;
|
||||
u8 *vaddr = vb2_plane_vaddr(vb, 0) + payload_size;
|
||||
|
||||
@@ -190,7 +280,7 @@ esparser_queue(struct amvdec_session *sess, struct vb2_v4l2_buffer *vbuf)
|
||||
if (codec_ops->num_pending_bufs)
|
||||
num_dst_bufs = codec_ops->num_pending_bufs(sess);
|
||||
|
||||
- num_dst_bufs += v4l2_m2m_num_dst_bufs_ready(sess->m2m_ctx);
|
||||
+ num_dst_bufs += v4l2_m2m_num_dst_bufs_ready(sess->m2m_ctx) - 1;
|
||||
|
||||
if (esparser_vififo_get_free_space(sess) < payload_size ||
|
||||
atomic_read(&sess->esparser_queued_bufs) >= num_dst_bufs)
|
||||
@@ -204,7 +294,10 @@ esparser_queue(struct amvdec_session *sess, struct vb2_v4l2_buffer *vbuf)
|
||||
dev_dbg(core->dev, "esparser: ts = %llu pld_size = %u offset = %08X\n",
|
||||
vb->timestamp, payload_size, offset);
|
||||
|
||||
- pad_size = esparser_pad_start_code(vb);
|
||||
+ if (sess->fmt_out->pixfmt == V4L2_PIX_FMT_VP9)
|
||||
+ payload_size = vp9_update_header(vb);
|
||||
+
|
||||
+ pad_size = esparser_pad_start_code(vb, payload_size);
|
||||
ret = esparser_write_data(core, phy, payload_size + pad_size);
|
||||
|
||||
if (ret <= 0) {
|
||||
--
|
||||
2.20.1
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,458 @@
|
|||
From 873e2b7d978ae964d974696ab22a3d6d411d0373 Mon Sep 17 00:00:00 2001
|
||||
From: Maxime Jourdan <mjourdan@baylibre.com>
|
||||
Date: Thu, 7 Feb 2019 17:37:34 +0100
|
||||
Subject: [PATCH 11/14] media: meson: vdec: add g12a platform
|
||||
|
||||
Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
|
||||
---
|
||||
drivers/staging/media/meson/vdec/codec_hevc.c | 38 +++++--
|
||||
.../media/meson/vdec/codec_hevc_common.c | 9 --
|
||||
drivers/staging/media/meson/vdec/codec_vp9.c | 54 ++++++++--
|
||||
drivers/staging/media/meson/vdec/hevc_regs.h | 1 +
|
||||
drivers/staging/media/meson/vdec/vdec.c | 13 ++-
|
||||
drivers/staging/media/meson/vdec/vdec.h | 1 +
|
||||
drivers/staging/media/meson/vdec/vdec_hevc.c | 9 ++
|
||||
.../staging/media/meson/vdec/vdec_platform.c | 101 ++++++++++++++++++
|
||||
.../staging/media/meson/vdec/vdec_platform.h | 2 +
|
||||
9 files changed, 204 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/media/meson/vdec/codec_hevc.c b/drivers/staging/media/meson/vdec/codec_hevc.c
|
||||
index 03f00f969f02..e16e937d56e8 100644
|
||||
--- a/drivers/staging/media/meson/vdec/codec_hevc.c
|
||||
+++ b/drivers/staging/media/meson/vdec/codec_hevc.c
|
||||
@@ -68,7 +68,8 @@
|
||||
#define SWAP_BUF2_SIZE 0x800
|
||||
#define SCALELUT_SIZE 0x8000
|
||||
#define DBLK_PARA_SIZE 0x20000
|
||||
-#define DBLK_DATA_SIZE 0x40000
|
||||
+#define DBLK_DATA_SIZE 0x80000
|
||||
+#define DBLK_DATA2_SIZE 0x80000
|
||||
#define MMU_VBH_SIZE 0x5000
|
||||
#define MPRED_ABV_SIZE 0x8000
|
||||
#define MPRED_MV_SIZE (MPRED_MV_BUF_SIZE * MAX_REF_PIC_NUM)
|
||||
@@ -88,7 +89,8 @@
|
||||
#define SCALELUT_OFFSET (SWAP_BUF2_OFFSET + SWAP_BUF2_SIZE)
|
||||
#define DBLK_PARA_OFFSET (SCALELUT_OFFSET + SCALELUT_SIZE)
|
||||
#define DBLK_DATA_OFFSET (DBLK_PARA_OFFSET + DBLK_PARA_SIZE)
|
||||
-#define MMU_VBH_OFFSET (DBLK_DATA_OFFSET + DBLK_DATA_SIZE)
|
||||
+#define DBLK_DATA2_OFFSET (DBLK_DATA_OFFSET + DBLK_DATA_SIZE)
|
||||
+#define MMU_VBH_OFFSET (DBLK_DATA2_OFFSET + DBLK_DATA2_SIZE)
|
||||
#define MPRED_ABV_OFFSET (MMU_VBH_OFFSET + MMU_VBH_SIZE)
|
||||
#define MPRED_MV_OFFSET (MPRED_ABV_OFFSET + MPRED_ABV_SIZE)
|
||||
#define RPM_OFFSET (MPRED_MV_OFFSET + MPRED_MV_SIZE)
|
||||
@@ -523,6 +525,7 @@ codec_hevc_setup_workspace(struct amvdec_core *core, struct codec_hevc *hevc)
|
||||
amvdec_write_dos(core, HEVC_SCALELUT, wkaddr + SCALELUT_OFFSET);
|
||||
amvdec_write_dos(core, HEVC_DBLK_CFG4, wkaddr + DBLK_PARA_OFFSET);
|
||||
amvdec_write_dos(core, HEVC_DBLK_CFG5, wkaddr + DBLK_DATA_OFFSET);
|
||||
+ amvdec_write_dos(core, HEVC_DBLK_CFGE, wkaddr + DBLK_DATA2_OFFSET);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -547,6 +550,8 @@ static int codec_hevc_start(struct amvdec_session *sess)
|
||||
goto free_hevc;
|
||||
|
||||
amvdec_write_dos_bits(core, HEVC_STREAM_CONTROL, BIT(0));
|
||||
+ if (core->platform->revision == VDEC_REVISION_G12A)
|
||||
+ amvdec_write_dos_bits(core, HEVC_STREAM_CONTROL, (0xf << 25));
|
||||
|
||||
val = amvdec_read_dos(core, HEVC_PARSER_INT_CONTROL) & 0x03ffffff;
|
||||
val |= (3 << 29) | BIT(27) | BIT(24) | BIT(22) | BIT(7) | BIT(4) |
|
||||
@@ -755,6 +760,25 @@ codec_hevc_set_sao(struct amvdec_session *sess, struct hevc_frame *frame)
|
||||
(amvdec_get_output_size(sess) / 2));
|
||||
|
||||
if (frame->cur_slice_idx == 0) {
|
||||
+ if (core->platform->revision >= VDEC_REVISION_G12A) {
|
||||
+ val = 0x54 << 8;
|
||||
+
|
||||
+ /* enable first, compressed write */
|
||||
+ if (codec_hevc_use_fbc(sess->pixfmt_cap, hevc->is_10bit))
|
||||
+ val |= BIT(8);
|
||||
+
|
||||
+ /* enable second, uncompressed write */
|
||||
+ if (sess->pixfmt_cap == V4L2_PIX_FMT_NV12M)
|
||||
+ val |= BIT(9);
|
||||
+
|
||||
+ /* dblk pipeline mode=1 for performance */
|
||||
+ if (hevc->width >= 1280)
|
||||
+ val |= BIT(4);
|
||||
+
|
||||
+ amvdec_write_dos(core, HEVC_DBLK_CFGB, val);
|
||||
+ amvdec_write_dos(core, HEVC_DBLK_STS1 + 4, BIT(28));
|
||||
+ }
|
||||
+
|
||||
amvdec_write_dos(core, HEVC_DBLK_CFG2,
|
||||
hevc->width | (hevc->height << 16));
|
||||
|
||||
@@ -770,10 +794,12 @@ codec_hevc_set_sao(struct amvdec_session *sess, struct hevc_frame *frame)
|
||||
|
||||
val = amvdec_read_dos(core, HEVC_SAO_CTRL1) & ~0x3ff3;
|
||||
val |= 0xff0; /* Set endianness for 2-bytes swaps (nv12) */
|
||||
- if (!codec_hevc_use_fbc(sess->pixfmt_cap, hevc->is_10bit))
|
||||
- val |= BIT(0); /* disable cm compression */
|
||||
- else if (sess->pixfmt_cap == V4L2_PIX_FMT_AM21C)
|
||||
- val |= BIT(1); /* Disable double write */
|
||||
+ if (core->platform->revision < VDEC_REVISION_G12A) {
|
||||
+ if (!codec_hevc_use_fbc(sess->pixfmt_cap, hevc->is_10bit))
|
||||
+ val |= BIT(0); /* disable cm compression */
|
||||
+ else if (sess->pixfmt_cap == V4L2_PIX_FMT_AM21C)
|
||||
+ val |= BIT(1); /* Disable double write */
|
||||
+ }
|
||||
|
||||
amvdec_write_dos(core, HEVC_SAO_CTRL1, val);
|
||||
|
||||
diff --git a/drivers/staging/media/meson/vdec/codec_hevc_common.c b/drivers/staging/media/meson/vdec/codec_hevc_common.c
|
||||
index 2b296beb5d88..5c372a9b0f03 100644
|
||||
--- a/drivers/staging/media/meson/vdec/codec_hevc_common.c
|
||||
+++ b/drivers/staging/media/meson/vdec/codec_hevc_common.c
|
||||
@@ -111,15 +111,6 @@ codec_hevc_setup_buffers_gxl(struct amvdec_session *sess, int is_10bit)
|
||||
}
|
||||
}
|
||||
|
||||
- /* Fill the remaining unused slots with the last buffer's Y addr */
|
||||
- for (i = buf_num; i < MAX_REF_PIC_NUM; ++i) {
|
||||
- amvdec_write_dos(core, HEVCD_MPP_ANC2AXI_TBL_DATA,
|
||||
- buf_y_paddr >> 5);
|
||||
- if (!codec_hevc_use_fbc(sess->pixfmt_cap, is_10bit))
|
||||
- amvdec_write_dos(core, HEVCD_MPP_ANC2AXI_TBL_DATA,
|
||||
- buf_uv_paddr >> 5);
|
||||
- }
|
||||
-
|
||||
amvdec_write_dos(core, HEVCD_MPP_ANC2AXI_TBL_CONF_ADDR, 1);
|
||||
amvdec_write_dos(core, HEVCD_MPP_ANC_CANVAS_ACCCONFIG_ADDR, 1);
|
||||
for (i = 0; i < 32; ++i)
|
||||
diff --git a/drivers/staging/media/meson/vdec/codec_vp9.c b/drivers/staging/media/meson/vdec/codec_vp9.c
|
||||
index 731119b9ee17..39e8eb5937bf 100644
|
||||
--- a/drivers/staging/media/meson/vdec/codec_vp9.c
|
||||
+++ b/drivers/staging/media/meson/vdec/codec_vp9.c
|
||||
@@ -90,8 +90,8 @@ enum FRAME_TYPE {
|
||||
#define DBLK_PARA_OFFSET (SCALELUT_OFFSET + SCALELUT_SIZE)
|
||||
#define DBLK_DATA_OFFSET (DBLK_PARA_OFFSET + DBLK_PARA_SIZE)
|
||||
#define SEG_MAP_OFFSET (DBLK_DATA_OFFSET + DBLK_DATA_SIZE)
|
||||
-#define PROB_OFFSET (SEG_MAP_OFFSET + SEG_MAP_SIZE)
|
||||
-#define COUNT_OFFSET (PROB_OFFSET + PROB_SIZE)
|
||||
+#define PROB_OFFSET (SEG_MAP_OFFSET + SEG_MAP_SIZE)
|
||||
+#define COUNT_OFFSET (PROB_OFFSET + PROB_SIZE)
|
||||
#define MMU_VBH_OFFSET (COUNT_OFFSET + COUNT_SIZE)
|
||||
#define MPRED_ABV_OFFSET (MMU_VBH_OFFSET + MMU_VBH_SIZE)
|
||||
#define MPRED_MV_OFFSET (MPRED_ABV_OFFSET + MPRED_ABV_SIZE)
|
||||
@@ -326,7 +326,11 @@ vp9_loop_filter_init(struct amvdec_core *core, struct codec_vp9 *vp9)
|
||||
amvdec_write_dos(core, HEVC_DBLK_CFG9, thr);
|
||||
}
|
||||
|
||||
- amvdec_write_dos(core, HEVC_DBLK_CFGB, 0x40400001);
|
||||
+ if (core->platform->revision == VDEC_REVISION_G12A)
|
||||
+ /* VP9 video format */
|
||||
+ amvdec_write_dos(core, HEVC_DBLK_CFGB, (0x54 << 8) | BIT(0));
|
||||
+ else
|
||||
+ amvdec_write_dos(core, HEVC_DBLK_CFGB, 0x40400001);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -447,6 +451,13 @@ codec_vp9_setup_workspace(struct amvdec_core *core, struct codec_vp9 *vp9)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
+ memset(vp9->workspace_vaddr + DBLK_PARA_OFFSET, 0, DBLK_PARA_SIZE);
|
||||
+ memset(vp9->workspace_vaddr + COUNT_OFFSET, 0, COUNT_SIZE);
|
||||
+ memset(vp9->workspace_vaddr + PROB_OFFSET, 0, PROB_SIZE);
|
||||
+
|
||||
+ printk("Workspace: %08X-%08X\n", wkaddr, wkaddr + SIZE_WORKSPACE);
|
||||
+ printk("DBLK_PARA: %08X\n", wkaddr + DBLK_PARA_OFFSET);
|
||||
+
|
||||
vp9->workspace_paddr = wkaddr;
|
||||
|
||||
amvdec_write_dos(core, HEVCD_IPP_LINEBUFF_BASE, wkaddr + IPP_OFFSET);
|
||||
@@ -461,11 +472,17 @@ codec_vp9_setup_workspace(struct amvdec_core *core, struct codec_vp9 *vp9)
|
||||
amvdec_write_dos(core, VP9_STREAM_SWAP_BUFFER2,
|
||||
wkaddr + SWAP_BUF2_OFFSET);
|
||||
amvdec_write_dos(core, VP9_SCALELUT, wkaddr + SCALELUT_OFFSET);
|
||||
+
|
||||
+ if (core->platform->revision == VDEC_REVISION_G12A)
|
||||
+ amvdec_write_dos(core, HEVC_DBLK_CFGE,
|
||||
+ wkaddr + DBLK_PARA_OFFSET);
|
||||
+
|
||||
amvdec_write_dos(core, HEVC_DBLK_CFG4, wkaddr + DBLK_PARA_OFFSET);
|
||||
amvdec_write_dos(core, HEVC_DBLK_CFG5, wkaddr + DBLK_DATA_OFFSET);
|
||||
amvdec_write_dos(core, VP9_SEG_MAP_BUFFER, wkaddr + SEG_MAP_OFFSET);
|
||||
amvdec_write_dos(core, VP9_PROB_SWAP_BUFFER, wkaddr + PROB_OFFSET);
|
||||
amvdec_write_dos(core, VP9_COUNT_SWAP_BUFFER, wkaddr + COUNT_OFFSET);
|
||||
+ amvdec_write_dos(core, LMEM_DUMP_ADR, wkaddr + LMEM_OFFSET);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -487,6 +504,9 @@ static int codec_vp9_start(struct amvdec_session *sess)
|
||||
goto free_vp9;
|
||||
|
||||
amvdec_write_dos_bits(core, HEVC_STREAM_CONTROL, BIT(0));
|
||||
+ // stream_fifo_hole
|
||||
+ if (core->platform->revision == VDEC_REVISION_G12A)
|
||||
+ amvdec_write_dos_bits(core, HEVC_STREAM_FIFO_CTL, BIT(29));
|
||||
|
||||
val = amvdec_read_dos(core, HEVC_PARSER_INT_CONTROL) & 0x7fffffff;
|
||||
val |= (3 << 29) | BIT(24) | BIT(22) | BIT(7) | BIT(4) | BIT(0);
|
||||
@@ -597,14 +617,34 @@ static void codec_vp9_set_sao(struct amvdec_session *sess, struct vb2_buffer *vb
|
||||
amvdec_write_dos(core, HEVC_SAO_C_LENGTH,
|
||||
(amvdec_get_output_size(sess) / 2));
|
||||
|
||||
+ if (core->platform->revision >= VDEC_REVISION_G12A) {
|
||||
+ amvdec_clear_dos_bits(core, HEVC_DBLK_CFGB, BIT(4) | BIT(5) | BIT(8) | BIT(9));
|
||||
+ /* enable first, compressed write */
|
||||
+ if (codec_hevc_use_fbc(sess->pixfmt_cap, vp9->is_10bit))
|
||||
+ amvdec_write_dos_bits(core, HEVC_DBLK_CFGB, BIT(8));
|
||||
+
|
||||
+ /* enable second, uncompressed write */
|
||||
+ if (sess->pixfmt_cap == V4L2_PIX_FMT_NV12M)
|
||||
+ amvdec_write_dos_bits(core, HEVC_DBLK_CFGB, BIT(9));
|
||||
+
|
||||
+ /* dblk pipeline mode=1 for performance */
|
||||
+ if (sess->width >= 1280)
|
||||
+ amvdec_write_dos_bits(core, HEVC_DBLK_CFGB, BIT(4));
|
||||
+
|
||||
+ printk("HEVC_DBLK_CFGB: %08X\n", amvdec_read_dos(core, HEVC_DBLK_CFGB));
|
||||
+ }
|
||||
+
|
||||
val = amvdec_read_dos(core, HEVC_SAO_CTRL1) & ~0x3ff3;
|
||||
val |= 0xff0; /* Set endianness for 2-bytes swaps (nv12) */
|
||||
- if (!codec_hevc_use_fbc(sess->pixfmt_cap, vp9->is_10bit))
|
||||
- val |= BIT(0); /* disable cm compression */
|
||||
- else if (sess->pixfmt_cap == V4L2_PIX_FMT_AM21C)
|
||||
- val |= BIT(1); /* Disable double write */
|
||||
+ if (core->platform->revision < VDEC_REVISION_G12A) {
|
||||
+ if (!codec_hevc_use_fbc(sess->pixfmt_cap, vp9->is_10bit))
|
||||
+ val |= BIT(0); /* disable cm compression */
|
||||
+ else if (sess->pixfmt_cap == V4L2_PIX_FMT_AM21C)
|
||||
+ val |= BIT(1); /* Disable double write */
|
||||
+ }
|
||||
|
||||
amvdec_write_dos(core, HEVC_SAO_CTRL1, val);
|
||||
+ printk("HEVC_SAO_CTRL1: %08X\n", val);
|
||||
|
||||
if (!codec_hevc_use_fbc(sess->pixfmt_cap, vp9->is_10bit)) {
|
||||
/* no downscale for NV12 */
|
||||
diff --git a/drivers/staging/media/meson/vdec/hevc_regs.h b/drivers/staging/media/meson/vdec/hevc_regs.h
|
||||
index c80479d7c9c3..dc2c2e085b05 100644
|
||||
--- a/drivers/staging/media/meson/vdec/hevc_regs.h
|
||||
+++ b/drivers/staging/media/meson/vdec/hevc_regs.h
|
||||
@@ -170,6 +170,7 @@
|
||||
#define HEVC_DBLK_STS0 0xd42c
|
||||
#define HEVC_DBLK_CFGB 0xd42c
|
||||
#define HEVC_DBLK_STS1 0xd430
|
||||
+#define HEVC_DBLK_CFGE 0xd438
|
||||
|
||||
#define HEVC_SAO_VERSION 0xd800
|
||||
#define HEVC_SAO_CTRL0 0xd804
|
||||
diff --git a/drivers/staging/media/meson/vdec/vdec.c b/drivers/staging/media/meson/vdec/vdec.c
|
||||
index e466a9905c78..448d2366d6a0 100644
|
||||
--- a/drivers/staging/media/meson/vdec/vdec.c
|
||||
+++ b/drivers/staging/media/meson/vdec/vdec.c
|
||||
@@ -967,6 +967,8 @@ static const struct of_device_id vdec_dt_match[] = {
|
||||
.data = &vdec_platform_gxm },
|
||||
{ .compatible = "amlogic,gxl-vdec",
|
||||
.data = &vdec_platform_gxl },
|
||||
+ { .compatible = "amlogic,g12a-vdec",
|
||||
+ .data = &vdec_platform_g12a },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, vdec_dt_match);
|
||||
@@ -1014,6 +1016,15 @@ static int vdec_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(core->canvas))
|
||||
return PTR_ERR(core->canvas);
|
||||
|
||||
+ of_id = of_match_node(vdec_dt_match, dev->of_node);
|
||||
+ core->platform = of_id->data;
|
||||
+
|
||||
+ if (core->platform->revision == VDEC_REVISION_G12A) {
|
||||
+ core->vdec_hevcf_clk = devm_clk_get(dev, "vdec_hevcf");
|
||||
+ if (IS_ERR(core->vdec_hevcf_clk))
|
||||
+ return -EPROBE_DEFER;
|
||||
+ }
|
||||
+
|
||||
core->dos_parser_clk = devm_clk_get(dev, "dos_parser");
|
||||
if (IS_ERR(core->dos_parser_clk))
|
||||
return -EPROBE_DEFER;
|
||||
@@ -1056,8 +1067,6 @@ static int vdec_probe(struct platform_device *pdev)
|
||||
goto err_vdev_release;
|
||||
}
|
||||
|
||||
- of_id = of_match_node(vdec_dt_match, dev->of_node);
|
||||
- core->platform = of_id->data;
|
||||
core->vdev_dec = vdev;
|
||||
core->dev_dec = dev;
|
||||
mutex_init(&core->lock);
|
||||
diff --git a/drivers/staging/media/meson/vdec/vdec.h b/drivers/staging/media/meson/vdec/vdec.h
|
||||
index 210ab4b755fe..95415212b282 100644
|
||||
--- a/drivers/staging/media/meson/vdec/vdec.h
|
||||
+++ b/drivers/staging/media/meson/vdec/vdec.h
|
||||
@@ -76,6 +76,7 @@ struct amvdec_core {
|
||||
struct clk *dos_clk;
|
||||
struct clk *vdec_1_clk;
|
||||
struct clk *vdec_hevc_clk;
|
||||
+ struct clk *vdec_hevcf_clk;
|
||||
|
||||
struct reset_control *esparser_reset;
|
||||
|
||||
diff --git a/drivers/staging/media/meson/vdec/vdec_hevc.c b/drivers/staging/media/meson/vdec/vdec_hevc.c
|
||||
index b1406a5638da..730ecd771643 100644
|
||||
--- a/drivers/staging/media/meson/vdec/vdec_hevc.c
|
||||
+++ b/drivers/staging/media/meson/vdec/vdec_hevc.c
|
||||
@@ -123,6 +123,8 @@ static int vdec_hevc_stop(struct amvdec_session *sess)
|
||||
regmap_update_bits(core->regmap_ao, AO_RTI_GEN_PWR_SLEEP0,
|
||||
GEN_PWR_VDEC_HEVC, GEN_PWR_VDEC_HEVC);
|
||||
|
||||
+ if (core->platform->revision == VDEC_REVISION_G12A)
|
||||
+ clk_disable_unprepare(core->vdec_hevcf_clk);
|
||||
clk_disable_unprepare(core->vdec_hevc_clk);
|
||||
|
||||
return 0;
|
||||
@@ -139,6 +141,13 @@ static int vdec_hevc_start(struct amvdec_session *sess)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
+ if (core->platform->revision == VDEC_REVISION_G12A) {
|
||||
+ clk_set_rate(core->vdec_hevcf_clk, 666666666);
|
||||
+ ret = clk_prepare_enable(core->vdec_hevcf_clk);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
regmap_update_bits(core->regmap_ao, AO_RTI_GEN_PWR_SLEEP0,
|
||||
GEN_PWR_VDEC_HEVC, 0);
|
||||
udelay(10);
|
||||
diff --git a/drivers/staging/media/meson/vdec/vdec_platform.c b/drivers/staging/media/meson/vdec/vdec_platform.c
|
||||
index 3c51bf991a3b..a1812520421b 100644
|
||||
--- a/drivers/staging/media/meson/vdec/vdec_platform.c
|
||||
+++ b/drivers/staging/media/meson/vdec/vdec_platform.c
|
||||
@@ -290,6 +290,101 @@ static const struct amvdec_format vdec_formats_gxm[] = {
|
||||
},
|
||||
};
|
||||
|
||||
+static const struct amvdec_format vdec_formats_g12a[] = {
|
||||
+ {
|
||||
+ .pixfmt = V4L2_PIX_FMT_VP9,
|
||||
+ .min_buffers = 4,
|
||||
+ .max_buffers = 16,
|
||||
+ .max_width = 3840,
|
||||
+ .max_height = 2160,
|
||||
+ .vdec_ops = &vdec_hevc_ops,
|
||||
+ .codec_ops = &codec_vp9_ops,
|
||||
+ .firmware_path = "meson/vdec/g12a_vp9.bin",
|
||||
+ .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_AM21C, 0 },
|
||||
+ },
|
||||
+ {
|
||||
+ .pixfmt = V4L2_PIX_FMT_HEVC,
|
||||
+ .min_buffers = 16,
|
||||
+ .max_buffers = 24,
|
||||
+ .max_width = 3840,
|
||||
+ .max_height = 2160,
|
||||
+ .vdec_ops = &vdec_hevc_ops,
|
||||
+ .codec_ops = &codec_hevc_ops,
|
||||
+ .firmware_path = "meson/vdec/g12a_hevc.bin",
|
||||
+ .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_AM21C, 0 },
|
||||
+ }, {
|
||||
+ .pixfmt = V4L2_PIX_FMT_MJPEG,
|
||||
+ .min_buffers = 4,
|
||||
+ .max_buffers = 4,
|
||||
+ .max_width = 1920,
|
||||
+ .max_height = 1080,
|
||||
+ .vdec_ops = &vdec_1_ops,
|
||||
+ .codec_ops = &codec_mjpeg_ops,
|
||||
+ .firmware_path = "meson/vdec/gxl_mjpeg.bin",
|
||||
+ .pixfmts_cap = { V4L2_PIX_FMT_YUV420M, 0 },
|
||||
+ }, {
|
||||
+ .pixfmt = V4L2_PIX_FMT_MPEG4,
|
||||
+ .min_buffers = 8,
|
||||
+ .max_buffers = 8,
|
||||
+ .max_width = 1920,
|
||||
+ .max_height = 1080,
|
||||
+ .vdec_ops = &vdec_1_ops,
|
||||
+ .codec_ops = &codec_mpeg4_ops,
|
||||
+ .firmware_path = "meson/vdec/gxl_mpeg4_5.bin",
|
||||
+ .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
|
||||
+ }, {
|
||||
+ .pixfmt = V4L2_PIX_FMT_H263,
|
||||
+ .min_buffers = 8,
|
||||
+ .max_buffers = 8,
|
||||
+ .max_width = 1920,
|
||||
+ .max_height = 1080,
|
||||
+ .vdec_ops = &vdec_1_ops,
|
||||
+ .codec_ops = &codec_mpeg4_ops,
|
||||
+ .firmware_path = "meson/vdec/gxl_h263.bin",
|
||||
+ .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
|
||||
+ }, {
|
||||
+ .pixfmt = V4L2_PIX_FMT_XVID,
|
||||
+ .min_buffers = 8,
|
||||
+ .max_buffers = 8,
|
||||
+ .max_width = 1920,
|
||||
+ .max_height = 1080,
|
||||
+ .vdec_ops = &vdec_1_ops,
|
||||
+ .codec_ops = &codec_mpeg4_ops,
|
||||
+ .firmware_path = "meson/vdec/gxl_mpeg4_5.bin",
|
||||
+ .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
|
||||
+ }, {
|
||||
+ .pixfmt = V4L2_PIX_FMT_H264,
|
||||
+ .min_buffers = 2,
|
||||
+ .max_buffers = 24,
|
||||
+ .max_width = 3840,
|
||||
+ .max_height = 2160,
|
||||
+ .vdec_ops = &vdec_1_ops,
|
||||
+ .codec_ops = &codec_h264_ops,
|
||||
+ .firmware_path = "meson/vdec/g12a_h264.bin",
|
||||
+ .pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },
|
||||
+ }, {
|
||||
+ .pixfmt = V4L2_PIX_FMT_MPEG1,
|
||||
+ .min_buffers = 8,
|
||||
+ .max_buffers = 8,
|
||||
+ .max_width = 1920,
|
||||
+ .max_height = 1080,
|
||||
+ .vdec_ops = &vdec_1_ops,
|
||||
+ .codec_ops = &codec_mpeg12_ops,
|
||||
+ .firmware_path = "meson/vdec/gxl_mpeg12.bin",
|
||||
+ .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
|
||||
+ }, {
|
||||
+ .pixfmt = V4L2_PIX_FMT_MPEG2,
|
||||
+ .min_buffers = 8,
|
||||
+ .max_buffers = 8,
|
||||
+ .max_width = 1920,
|
||||
+ .max_height = 1080,
|
||||
+ .vdec_ops = &vdec_1_ops,
|
||||
+ .codec_ops = &codec_mpeg12_ops,
|
||||
+ .firmware_path = "meson/vdec/gxl_mpeg12.bin",
|
||||
+ .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
const struct vdec_platform vdec_platform_gxbb = {
|
||||
.formats = vdec_formats_gxbb,
|
||||
.num_formats = ARRAY_SIZE(vdec_formats_gxbb),
|
||||
@@ -307,3 +402,9 @@ const struct vdec_platform vdec_platform_gxm = {
|
||||
.num_formats = ARRAY_SIZE(vdec_formats_gxm),
|
||||
.revision = VDEC_REVISION_GXM,
|
||||
};
|
||||
+
|
||||
+const struct vdec_platform vdec_platform_g12a = {
|
||||
+ .formats = vdec_formats_g12a,
|
||||
+ .num_formats = ARRAY_SIZE(vdec_formats_g12a),
|
||||
+ .revision = VDEC_REVISION_G12A,
|
||||
+};
|
||||
diff --git a/drivers/staging/media/meson/vdec/vdec_platform.h b/drivers/staging/media/meson/vdec/vdec_platform.h
|
||||
index f6025326db1d..7c61b941b39f 100644
|
||||
--- a/drivers/staging/media/meson/vdec/vdec_platform.h
|
||||
+++ b/drivers/staging/media/meson/vdec/vdec_platform.h
|
||||
@@ -15,6 +15,7 @@ enum vdec_revision {
|
||||
VDEC_REVISION_GXBB,
|
||||
VDEC_REVISION_GXL,
|
||||
VDEC_REVISION_GXM,
|
||||
+ VDEC_REVISION_G12A,
|
||||
};
|
||||
|
||||
struct vdec_platform {
|
||||
@@ -26,5 +27,6 @@ struct vdec_platform {
|
||||
extern const struct vdec_platform vdec_platform_gxbb;
|
||||
extern const struct vdec_platform vdec_platform_gxm;
|
||||
extern const struct vdec_platform vdec_platform_gxl;
|
||||
+extern const struct vdec_platform vdec_platform_g12a;
|
||||
|
||||
#endif
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,773 @@
|
|||
From 58cd69efd60bbf24e4795ac8635769e96eb3b079 Mon Sep 17 00:00:00 2001
|
||||
From: Maxime Jourdan <mjourdan@baylibre.com>
|
||||
Date: Fri, 1 Mar 2019 12:41:03 +0100
|
||||
Subject: [PATCH 12/14] media: meson: vp9: add IOMMU support
|
||||
|
||||
Starting with GXL (S905X), the HEVC/VP9 decoder hardware supports an
|
||||
IOMMU to access the decoded frames. This IOMMU is controlled by writing
|
||||
the buffer's page IDs to the firmware, which then does the actual work.
|
||||
|
||||
This commit adds support for using the IOMMU with VP9/HEVC on G12A, the
|
||||
first SoC on which it becomes mandatory.
|
||||
|
||||
Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
|
||||
---
|
||||
drivers/staging/media/meson/vdec/codec_hevc.c | 35 ++--
|
||||
.../media/meson/vdec/codec_hevc_common.c | 177 ++++++++++++++----
|
||||
.../media/meson/vdec/codec_hevc_common.h | 31 ++-
|
||||
drivers/staging/media/meson/vdec/codec_vp9.c | 71 ++++---
|
||||
drivers/staging/media/meson/vdec/hevc_regs.h | 5 +
|
||||
drivers/staging/media/meson/vdec/vdec.h | 5 -
|
||||
drivers/staging/media/meson/vdec/vdec_hevc.c | 14 +-
|
||||
7 files changed, 255 insertions(+), 83 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/media/meson/vdec/codec_hevc.c b/drivers/staging/media/meson/vdec/codec_hevc.c
|
||||
index e16e937d56e8..65d2ad4d8345 100644
|
||||
--- a/drivers/staging/media/meson/vdec/codec_hevc.c
|
||||
+++ b/drivers/staging/media/meson/vdec/codec_hevc.c
|
||||
@@ -75,6 +75,7 @@
|
||||
#define MPRED_MV_SIZE (MPRED_MV_BUF_SIZE * MAX_REF_PIC_NUM)
|
||||
#define RPM_BUF_SIZE 0x100
|
||||
#define LMEM_SIZE 0xA00
|
||||
+#define MMU_MAP_SIZE 0x4800
|
||||
|
||||
#define IPP_OFFSET 0x00
|
||||
#define SAO_ABV_OFFSET (IPP_OFFSET + IPP_SIZE)
|
||||
@@ -95,6 +96,7 @@
|
||||
#define MPRED_MV_OFFSET (MPRED_ABV_OFFSET + MPRED_ABV_SIZE)
|
||||
#define RPM_OFFSET (MPRED_MV_OFFSET + MPRED_MV_SIZE)
|
||||
#define LMEM_OFFSET (RPM_OFFSET + RPM_BUF_SIZE)
|
||||
+#define MMU_MAP_OFFSET (LMEM_OFFSET + LMEM_SIZE)
|
||||
|
||||
/* ISR decode status */
|
||||
#define HEVC_DEC_IDLE 0x0
|
||||
@@ -236,6 +238,9 @@ struct hevc_frame {
|
||||
struct codec_hevc {
|
||||
struct mutex lock;
|
||||
|
||||
+ /* Common part of the HEVC decoder */
|
||||
+ struct codec_hevc_common common;
|
||||
+
|
||||
/* Buffer for the HEVC Workspace */
|
||||
void *workspace_vaddr;
|
||||
dma_addr_t workspace_paddr;
|
||||
@@ -517,15 +522,20 @@ codec_hevc_setup_workspace(struct amvdec_core *core, struct codec_hevc *hevc)
|
||||
amvdec_write_dos(core, HEVC_PPS_BUFFER, wkaddr + PPS_OFFSET);
|
||||
amvdec_write_dos(core, HEVC_SAO_UP, wkaddr + SAO_UP_OFFSET);
|
||||
|
||||
+ if (core->platform->revision >= VDEC_REVISION_G12A)
|
||||
+ amvdec_write_dos(core, HEVC_ASSIST_MMU_MAP_ADDR,
|
||||
+ wkaddr + MMU_MAP_OFFSET);
|
||||
+
|
||||
/* No MMU */
|
||||
- amvdec_write_dos(core, HEVC_STREAM_SWAP_BUFFER,
|
||||
+ /*amvdec_write_dos(core, HEVC_STREAM_SWAP_BUFFER,
|
||||
wkaddr + SWAP_BUF_OFFSET);
|
||||
amvdec_write_dos(core, HEVC_STREAM_SWAP_BUFFER2,
|
||||
- wkaddr + SWAP_BUF2_OFFSET);
|
||||
+ wkaddr + SWAP_BUF2_OFFSET);*/
|
||||
amvdec_write_dos(core, HEVC_SCALELUT, wkaddr + SCALELUT_OFFSET);
|
||||
amvdec_write_dos(core, HEVC_DBLK_CFG4, wkaddr + DBLK_PARA_OFFSET);
|
||||
amvdec_write_dos(core, HEVC_DBLK_CFG5, wkaddr + DBLK_DATA_OFFSET);
|
||||
amvdec_write_dos(core, HEVC_DBLK_CFGE, wkaddr + DBLK_DATA2_OFFSET);
|
||||
+ amvdec_write_dos(core, LMEM_DUMP_ADR, wkaddr + LMEM_OFFSET);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -549,9 +559,10 @@ static int codec_hevc_start(struct amvdec_session *sess)
|
||||
if (ret)
|
||||
goto free_hevc;
|
||||
|
||||
- amvdec_write_dos_bits(core, HEVC_STREAM_CONTROL, BIT(0));
|
||||
- if (core->platform->revision == VDEC_REVISION_G12A)
|
||||
- amvdec_write_dos_bits(core, HEVC_STREAM_CONTROL, (0xf << 25));
|
||||
+ val = BIT(0); /* stream_fetch_enable */
|
||||
+ if (core->platform->revision >= VDEC_REVISION_G12A)
|
||||
+ val |= (0xf << 25); /* arwlen_axi_max */
|
||||
+ amvdec_write_dos_bits(core, HEVC_STREAM_CONTROL, val);
|
||||
|
||||
val = amvdec_read_dos(core, HEVC_PARSER_INT_CONTROL) & 0x03ffffff;
|
||||
val |= (3 << 29) | BIT(27) | BIT(24) | BIT(22) | BIT(7) | BIT(4) |
|
||||
@@ -608,9 +619,9 @@ static int codec_hevc_start(struct amvdec_session *sess)
|
||||
goto free_hevc;
|
||||
}
|
||||
|
||||
- amvdec_write_dos(core, HEVC_AUX_ADR, hevc->aux_paddr);
|
||||
+ /*amvdec_write_dos(core, HEVC_AUX_ADR, hevc->aux_paddr);
|
||||
amvdec_write_dos(core, HEVC_AUX_DATA_SIZE,
|
||||
- (((SIZE_AUX) >> 4) << 16) | 0);
|
||||
+ (((SIZE_AUX) >> 4) << 16) | 0);*/
|
||||
mutex_init(&hevc->lock);
|
||||
sess->priv = hevc;
|
||||
|
||||
@@ -652,7 +663,7 @@ static int codec_hevc_stop(struct amvdec_session *sess)
|
||||
dma_free_coherent(core->dev, SIZE_AUX,
|
||||
hevc->aux_vaddr, hevc->aux_paddr);
|
||||
|
||||
- codec_hevc_free_fbc_buffers(sess);
|
||||
+ codec_hevc_free_fbc_buffers(sess, &hevc->common);
|
||||
mutex_unlock(&hevc->lock);
|
||||
mutex_destroy(&hevc->lock);
|
||||
|
||||
@@ -732,7 +743,7 @@ codec_hevc_set_sao(struct amvdec_session *sess, struct hevc_frame *frame)
|
||||
|
||||
if (codec_hevc_use_downsample(sess->pixfmt_cap, hevc->is_10bit))
|
||||
buf_y_paddr =
|
||||
- sess->fbc_buffer_paddr[frame->vbuf->vb2_buf.index];
|
||||
+ hevc->common.fbc_buffer_paddr[frame->vbuf->vb2_buf.index];
|
||||
else
|
||||
buf_y_paddr =
|
||||
vb2_dma_contig_plane_dma_addr(&frame->vbuf->vb2_buf, 0);
|
||||
@@ -776,7 +787,7 @@ codec_hevc_set_sao(struct amvdec_session *sess, struct hevc_frame *frame)
|
||||
val |= BIT(4);
|
||||
|
||||
amvdec_write_dos(core, HEVC_DBLK_CFGB, val);
|
||||
- amvdec_write_dos(core, HEVC_DBLK_STS1 + 4, BIT(28));
|
||||
+ amvdec_write_dos(core, HEVC_DBLK_STS1 + 16, BIT(28));
|
||||
}
|
||||
|
||||
amvdec_write_dos(core, HEVC_DBLK_CFG2,
|
||||
@@ -1323,7 +1334,7 @@ static void codec_hevc_resume(struct amvdec_session *sess)
|
||||
{
|
||||
struct codec_hevc *hevc = sess->priv;
|
||||
|
||||
- if (codec_hevc_setup_buffers(sess, hevc->is_10bit)) {
|
||||
+ if (codec_hevc_setup_buffers(sess, &hevc->common, hevc->is_10bit)) {
|
||||
amvdec_abort(sess);
|
||||
return;
|
||||
}
|
||||
@@ -1340,6 +1351,8 @@ static irqreturn_t codec_hevc_threaded_isr(struct amvdec_session *sess)
|
||||
struct codec_hevc *hevc = sess->priv;
|
||||
u32 dec_status = amvdec_read_dos(core, HEVC_DEC_STATUS_REG);
|
||||
|
||||
+ printk("ISR!\n");
|
||||
+
|
||||
if (!hevc)
|
||||
return IRQ_HANDLED;
|
||||
|
||||
diff --git a/drivers/staging/media/meson/vdec/codec_hevc_common.c b/drivers/staging/media/meson/vdec/codec_hevc_common.c
|
||||
index 5c372a9b0f03..de7eb6cfbe85 100644
|
||||
--- a/drivers/staging/media/meson/vdec/codec_hevc_common.c
|
||||
+++ b/drivers/staging/media/meson/vdec/codec_hevc_common.c
|
||||
@@ -10,6 +10,9 @@
|
||||
#include "vdec_helpers.h"
|
||||
#include "hevc_regs.h"
|
||||
|
||||
+#define MMU_COMPRESS_HEADER_SIZE 0x48000
|
||||
+#define MMU_MAP_SIZE 0x4800
|
||||
+
|
||||
/* Configure decode head read mode */
|
||||
void codec_hevc_setup_decode_head(struct amvdec_session *sess, int is_10bit)
|
||||
{
|
||||
@@ -23,7 +26,12 @@ void codec_hevc_setup_decode_head(struct amvdec_session *sess, int is_10bit)
|
||||
return;
|
||||
}
|
||||
|
||||
- amvdec_write_dos(core, HEVCD_MPP_DECOMP_CTL1, 0);
|
||||
+ if (codec_hevc_use_mmu(core->platform->revision,
|
||||
+ sess->pixfmt_cap, is_10bit))
|
||||
+ amvdec_write_dos(core, HEVCD_MPP_DECOMP_CTL1, BIT(4));
|
||||
+ else
|
||||
+ amvdec_write_dos(core, HEVCD_MPP_DECOMP_CTL1, 0);
|
||||
+
|
||||
amvdec_write_dos(core, HEVCD_MPP_DECOMP_CTL2, body_size / 32);
|
||||
amvdec_write_dos(core, HEVC_CM_BODY_LENGTH, body_size);
|
||||
amvdec_write_dos(core, HEVC_CM_HEADER_OFFSET, body_size);
|
||||
@@ -31,8 +39,9 @@ void codec_hevc_setup_decode_head(struct amvdec_session *sess, int is_10bit)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(codec_hevc_setup_decode_head);
|
||||
|
||||
-static void
|
||||
-codec_hevc_setup_buffers_gxbb(struct amvdec_session *sess, int is_10bit)
|
||||
+static void codec_hevc_setup_buffers_gxbb(struct amvdec_session *sess,
|
||||
+ struct codec_hevc_common *comm,
|
||||
+ int is_10bit)
|
||||
{
|
||||
struct amvdec_core *core = sess->core;
|
||||
struct v4l2_m2m_buffer *buf;
|
||||
@@ -46,22 +55,26 @@ codec_hevc_setup_buffers_gxbb(struct amvdec_session *sess, int is_10bit)
|
||||
amvdec_write_dos(core, HEVCD_MPP_ANC2AXI_TBL_CONF_ADDR, 0);
|
||||
|
||||
v4l2_m2m_for_each_dst_buf(sess->m2m_ctx, buf) {
|
||||
- idx = buf->vb.vb2_buf.index;
|
||||
+ struct vb2_buffer *vb = &buf->vb.vb2_buf;
|
||||
+ idx = vb->index;
|
||||
|
||||
if (codec_hevc_use_downsample(sess->pixfmt_cap, is_10bit))
|
||||
- buf_y_paddr = sess->fbc_buffer_paddr[idx];
|
||||
+ buf_y_paddr = comm->fbc_buffer_paddr[idx];
|
||||
else
|
||||
- buf_y_paddr = vb2_dma_contig_plane_dma_addr(&buf->vb.vb2_buf, 0);
|
||||
+ buf_y_paddr = vb2_dma_contig_plane_dma_addr(vb, 0);
|
||||
|
||||
if (codec_hevc_use_fbc(sess->pixfmt_cap, is_10bit)) {
|
||||
val = buf_y_paddr | (idx << 8) | 1;
|
||||
- amvdec_write_dos(core, HEVCD_MPP_ANC2AXI_TBL_CMD_ADDR, val);
|
||||
+ amvdec_write_dos(core, HEVCD_MPP_ANC2AXI_TBL_CMD_ADDR,
|
||||
+ val);
|
||||
} else {
|
||||
- buf_uv_paddr = vb2_dma_contig_plane_dma_addr(&buf->vb.vb2_buf, 1);
|
||||
+ buf_uv_paddr = vb2_dma_contig_plane_dma_addr(vb, 1);
|
||||
val = buf_y_paddr | ((idx * 2) << 8) | 1;
|
||||
- amvdec_write_dos(core, HEVCD_MPP_ANC2AXI_TBL_CMD_ADDR, val);
|
||||
+ amvdec_write_dos(core, HEVCD_MPP_ANC2AXI_TBL_CMD_ADDR,
|
||||
+ val);
|
||||
val = buf_uv_paddr | ((idx * 2 + 1) << 8) | 1;
|
||||
- amvdec_write_dos(core, HEVCD_MPP_ANC2AXI_TBL_CMD_ADDR, val);
|
||||
+ amvdec_write_dos(core, HEVCD_MPP_ANC2AXI_TBL_CMD_ADDR,
|
||||
+ val);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,32 +93,37 @@ codec_hevc_setup_buffers_gxbb(struct amvdec_session *sess, int is_10bit)
|
||||
amvdec_write_dos(core, HEVCD_MPP_ANC_CANVAS_DATA_ADDR, 0);
|
||||
}
|
||||
|
||||
-static void
|
||||
-codec_hevc_setup_buffers_gxl(struct amvdec_session *sess, int is_10bit)
|
||||
+static void codec_hevc_setup_buffers_gxl(struct amvdec_session *sess,
|
||||
+ struct codec_hevc_common *comm,
|
||||
+ int is_10bit)
|
||||
{
|
||||
struct amvdec_core *core = sess->core;
|
||||
struct v4l2_m2m_buffer *buf;
|
||||
- u32 buf_num = v4l2_m2m_num_dst_bufs_ready(sess->m2m_ctx);
|
||||
- dma_addr_t buf_y_paddr = 0;
|
||||
- dma_addr_t buf_uv_paddr = 0;
|
||||
+ u32 revision = core->platform->revision;
|
||||
+ u32 pixfmt_cap = sess->pixfmt_cap;
|
||||
int i;
|
||||
|
||||
amvdec_write_dos(core, HEVCD_MPP_ANC2AXI_TBL_CONF_ADDR,
|
||||
BIT(2) | BIT(1));
|
||||
|
||||
v4l2_m2m_for_each_dst_buf(sess->m2m_ctx, buf) {
|
||||
- u32 idx = buf->vb.vb2_buf.index;
|
||||
+ struct vb2_buffer *vb = &buf->vb.vb2_buf;
|
||||
+ dma_addr_t buf_y_paddr = 0;
|
||||
+ dma_addr_t buf_uv_paddr = 0;
|
||||
+ u32 idx = vb->index;
|
||||
|
||||
- if (codec_hevc_use_downsample(sess->pixfmt_cap, is_10bit))
|
||||
- buf_y_paddr = sess->fbc_buffer_paddr[idx];
|
||||
+ if (codec_hevc_use_mmu(revision, pixfmt_cap, is_10bit))
|
||||
+ buf_y_paddr = comm->mmu_header_paddr[idx];
|
||||
+ else if (codec_hevc_use_downsample(pixfmt_cap, is_10bit))
|
||||
+ buf_y_paddr = comm->fbc_buffer_paddr[idx];
|
||||
else
|
||||
- buf_y_paddr =
|
||||
- vb2_dma_contig_plane_dma_addr(&buf->vb.vb2_buf, 0);
|
||||
+ buf_y_paddr = vb2_dma_contig_plane_dma_addr(vb, 0);
|
||||
|
||||
amvdec_write_dos(core, HEVCD_MPP_ANC2AXI_TBL_DATA,
|
||||
buf_y_paddr >> 5);
|
||||
- if (!codec_hevc_use_fbc(sess->pixfmt_cap, is_10bit)) {
|
||||
- buf_uv_paddr = vb2_dma_contig_plane_dma_addr(&buf->vb.vb2_buf, 1);
|
||||
+
|
||||
+ if (!codec_hevc_use_fbc(pixfmt_cap, is_10bit)) {
|
||||
+ buf_uv_paddr = vb2_dma_contig_plane_dma_addr(vb, 1);
|
||||
amvdec_write_dos(core, HEVCD_MPP_ANC2AXI_TBL_DATA,
|
||||
buf_uv_paddr >> 5);
|
||||
}
|
||||
@@ -117,24 +135,26 @@ codec_hevc_setup_buffers_gxl(struct amvdec_session *sess, int is_10bit)
|
||||
amvdec_write_dos(core, HEVCD_MPP_ANC_CANVAS_DATA_ADDR, 0);
|
||||
}
|
||||
|
||||
-void codec_hevc_free_fbc_buffers(struct amvdec_session *sess)
|
||||
+void codec_hevc_free_fbc_buffers(struct amvdec_session *sess,
|
||||
+ struct codec_hevc_common *comm)
|
||||
{
|
||||
struct device *dev = sess->core->dev;
|
||||
u32 am21_size = amvdec_am21c_size(sess->width, sess->height);
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MAX_REF_PIC_NUM; ++i) {
|
||||
- if (sess->fbc_buffer_vaddr[i]) {
|
||||
+ if (comm->fbc_buffer_vaddr[i]) {
|
||||
dma_free_coherent(dev, am21_size,
|
||||
- sess->fbc_buffer_vaddr[i],
|
||||
- sess->fbc_buffer_paddr[i]);
|
||||
- sess->fbc_buffer_vaddr[i] = NULL;
|
||||
+ comm->fbc_buffer_vaddr[i],
|
||||
+ comm->fbc_buffer_paddr[i]);
|
||||
+ comm->fbc_buffer_vaddr[i] = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(codec_hevc_free_fbc_buffers);
|
||||
|
||||
-static int codec_hevc_alloc_fbc_buffers(struct amvdec_session *sess)
|
||||
+static int codec_hevc_alloc_fbc_buffers(struct amvdec_session *sess,
|
||||
+ struct codec_hevc_common *comm)
|
||||
{
|
||||
struct device *dev = sess->core->dev;
|
||||
struct v4l2_m2m_buffer *buf;
|
||||
@@ -147,33 +167,118 @@ static int codec_hevc_alloc_fbc_buffers(struct amvdec_session *sess)
|
||||
GFP_KERNEL);
|
||||
if (!vaddr) {
|
||||
dev_err(dev, "Couldn't allocate FBC buffer %u\n", idx);
|
||||
- codec_hevc_free_fbc_buffers(sess);
|
||||
+ codec_hevc_free_fbc_buffers(sess, comm);
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
+ comm->fbc_buffer_vaddr[idx] = vaddr;
|
||||
+ comm->fbc_buffer_paddr[idx] = paddr;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+void codec_hevc_free_mmu_headers(struct amvdec_session *sess,
|
||||
+ struct codec_hevc_common *comm)
|
||||
+{
|
||||
+ struct device *dev = sess->core->dev;
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < MAX_REF_PIC_NUM; ++i) {
|
||||
+ if (comm->mmu_header_vaddr[i]) {
|
||||
+ dma_free_coherent(dev, MMU_COMPRESS_HEADER_SIZE,
|
||||
+ comm->mmu_header_vaddr[i],
|
||||
+ comm->mmu_header_paddr[i]);
|
||||
+ comm->mmu_header_vaddr[i] = NULL;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (comm->mmu_map_vaddr) {
|
||||
+ dma_free_coherent(dev, MMU_MAP_SIZE,
|
||||
+ comm->mmu_map_vaddr,
|
||||
+ comm->mmu_map_paddr);
|
||||
+ comm->mmu_map_vaddr = NULL;
|
||||
+ }
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(codec_hevc_free_mmu_headers);
|
||||
+
|
||||
+static int codec_hevc_alloc_mmu_headers(struct amvdec_session *sess,
|
||||
+ struct codec_hevc_common *comm)
|
||||
+{
|
||||
+ struct device *dev = sess->core->dev;
|
||||
+ struct v4l2_m2m_buffer *buf;
|
||||
+
|
||||
+ comm->mmu_map_vaddr = dma_alloc_coherent(dev, MMU_MAP_SIZE,
|
||||
+ &comm->mmu_map_paddr,
|
||||
+ GFP_KERNEL);
|
||||
+ if (!comm->mmu_map_vaddr)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ v4l2_m2m_for_each_dst_buf(sess->m2m_ctx, buf) {
|
||||
+ u32 idx = buf->vb.vb2_buf.index;
|
||||
+ dma_addr_t paddr;
|
||||
+ void *vaddr = dma_alloc_coherent(dev, MMU_COMPRESS_HEADER_SIZE,
|
||||
+ &paddr, GFP_KERNEL);
|
||||
+ if (!vaddr) {
|
||||
+ dev_err(dev, "Couldn't allocate MMU header %u\n", idx);
|
||||
+ codec_hevc_free_mmu_headers(sess, comm);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
- sess->fbc_buffer_vaddr[idx] = vaddr;
|
||||
- sess->fbc_buffer_paddr[idx] = paddr;
|
||||
+ comm->mmu_header_vaddr[idx] = vaddr;
|
||||
+ comm->mmu_header_paddr[idx] = paddr;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
-int codec_hevc_setup_buffers(struct amvdec_session *sess, int is_10bit)
|
||||
+int codec_hevc_setup_buffers(struct amvdec_session *sess,
|
||||
+ struct codec_hevc_common *comm,
|
||||
+ int is_10bit)
|
||||
{
|
||||
struct amvdec_core *core = sess->core;
|
||||
int ret;
|
||||
|
||||
if (codec_hevc_use_downsample(sess->pixfmt_cap, is_10bit)) {
|
||||
- ret = codec_hevc_alloc_fbc_buffers(sess);
|
||||
+ ret = codec_hevc_alloc_fbc_buffers(sess, comm);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ if (codec_hevc_use_mmu(core->platform->revision,
|
||||
+ sess->pixfmt_cap, is_10bit)) {
|
||||
+ ret = codec_hevc_alloc_mmu_headers(sess, comm);
|
||||
+ if (ret) {
|
||||
+ codec_hevc_free_fbc_buffers(sess, comm);
|
||||
+ return ret;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (core->platform->revision == VDEC_REVISION_GXBB)
|
||||
- codec_hevc_setup_buffers_gxbb(sess, is_10bit);
|
||||
+ codec_hevc_setup_buffers_gxbb(sess, comm, is_10bit);
|
||||
else
|
||||
- codec_hevc_setup_buffers_gxl(sess, is_10bit);
|
||||
+ codec_hevc_setup_buffers_gxl(sess, comm, is_10bit);
|
||||
|
||||
return 0;
|
||||
}
|
||||
-EXPORT_SYMBOL_GPL(codec_hevc_setup_buffers);
|
||||
\ No newline at end of file
|
||||
+EXPORT_SYMBOL_GPL(codec_hevc_setup_buffers);
|
||||
+
|
||||
+void codec_hevc_fill_mmu_map(struct amvdec_session *sess,
|
||||
+ struct codec_hevc_common *comm,
|
||||
+ struct vb2_buffer *vb)
|
||||
+{
|
||||
+ u32 size = amvdec_am21c_size(sess->width, sess->height);
|
||||
+ u32 nb_pages = size / PAGE_SIZE;
|
||||
+ u32 *mmu_map = comm->mmu_map_vaddr;
|
||||
+ u32 first_page;
|
||||
+ u32 i;
|
||||
+
|
||||
+ if (sess->pixfmt_cap == V4L2_PIX_FMT_NV12M)
|
||||
+ first_page = comm->fbc_buffer_paddr[vb->index] >> PAGE_SHIFT;
|
||||
+ else
|
||||
+ first_page = vb2_dma_contig_plane_dma_addr(vb, 0) >> PAGE_SHIFT;
|
||||
+
|
||||
+ for (i = 0; i < nb_pages; ++i)
|
||||
+ mmu_map[i] = first_page + i;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(codec_hevc_fill_mmu_map);
|
||||
diff --git a/drivers/staging/media/meson/vdec/codec_hevc_common.h b/drivers/staging/media/meson/vdec/codec_hevc_common.h
|
||||
index 7c8891529ac8..89c8b61f8a94 100644
|
||||
--- a/drivers/staging/media/meson/vdec/codec_hevc_common.h
|
||||
+++ b/drivers/staging/media/meson/vdec/codec_hevc_common.h
|
||||
@@ -25,6 +25,19 @@ static const u16 vdec_hevc_parser_cmd[] = {
|
||||
0x7C00
|
||||
};
|
||||
|
||||
+#define MAX_REF_PIC_NUM 24
|
||||
+
|
||||
+struct codec_hevc_common {
|
||||
+ void *fbc_buffer_vaddr[MAX_REF_PIC_NUM];
|
||||
+ dma_addr_t fbc_buffer_paddr[MAX_REF_PIC_NUM];
|
||||
+
|
||||
+ void *mmu_header_vaddr[MAX_REF_PIC_NUM];
|
||||
+ dma_addr_t mmu_header_paddr[MAX_REF_PIC_NUM];
|
||||
+
|
||||
+ void *mmu_map_vaddr;
|
||||
+ dma_addr_t mmu_map_paddr;
|
||||
+};
|
||||
+
|
||||
/* Returns 1 if we must use framebuffer compression */
|
||||
static inline int codec_hevc_use_fbc(u32 pixfmt, int is_10bit)
|
||||
{
|
||||
@@ -37,13 +50,27 @@ static inline int codec_hevc_use_downsample(u32 pixfmt, int is_10bit)
|
||||
return pixfmt == V4L2_PIX_FMT_NV12M && is_10bit;
|
||||
}
|
||||
|
||||
+/* Returns 1 if we are decoding using the IOMMU */
|
||||
+static inline int codec_hevc_use_mmu(u32 revision, u32 pixfmt, int is_10bit)
|
||||
+{
|
||||
+ return revision >= VDEC_REVISION_G12A &&
|
||||
+ codec_hevc_use_fbc(pixfmt, is_10bit);
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* Configure decode head read mode
|
||||
*/
|
||||
void codec_hevc_setup_decode_head(struct amvdec_session *sess, int is_10bit);
|
||||
|
||||
-void codec_hevc_free_fbc_buffers(struct amvdec_session *sess);
|
||||
+void codec_hevc_free_fbc_buffers(struct amvdec_session *sess,
|
||||
+ struct codec_hevc_common *comm);
|
||||
+
|
||||
+int codec_hevc_setup_buffers(struct amvdec_session *sess,
|
||||
+ struct codec_hevc_common *comm,
|
||||
+ int is_10bit);
|
||||
|
||||
-int codec_hevc_setup_buffers(struct amvdec_session *sess, int is_10bit);
|
||||
+void codec_hevc_fill_mmu_map(struct amvdec_session *sess,
|
||||
+ struct codec_hevc_common *comm,
|
||||
+ struct vb2_buffer *vb);
|
||||
|
||||
#endif
|
||||
diff --git a/drivers/staging/media/meson/vdec/codec_vp9.c b/drivers/staging/media/meson/vdec/codec_vp9.c
|
||||
index 39e8eb5937bf..b1643cc01f68 100644
|
||||
--- a/drivers/staging/media/meson/vdec/codec_vp9.c
|
||||
+++ b/drivers/staging/media/meson/vdec/codec_vp9.c
|
||||
@@ -219,6 +219,9 @@ struct vp9_frame {
|
||||
struct codec_vp9 {
|
||||
struct mutex lock;
|
||||
|
||||
+ /* Common part with the HEVC decoder */
|
||||
+ struct codec_hevc_common common;
|
||||
+
|
||||
/* Buffer for the VP9 Workspace */
|
||||
void *workspace_vaddr;
|
||||
dma_addr_t workspace_paddr;
|
||||
@@ -438,27 +441,26 @@ static u32 codec_vp9_num_pending_bufs(struct amvdec_session *sess)
|
||||
return vp9->frames_num;
|
||||
}
|
||||
|
||||
-static int
|
||||
-codec_vp9_setup_workspace(struct amvdec_core *core, struct codec_vp9 *vp9)
|
||||
+static int codec_vp9_alloc_workspace(struct amvdec_core *core,
|
||||
+ struct codec_vp9 *vp9)
|
||||
{
|
||||
- dma_addr_t wkaddr;
|
||||
-
|
||||
/* Allocate some memory for the VP9 decoder's state */
|
||||
vp9->workspace_vaddr = dma_alloc_coherent(core->dev, SIZE_WORKSPACE,
|
||||
- &wkaddr, GFP_KERNEL);
|
||||
+ &vp9->workspace_paddr, GFP_KERNEL);
|
||||
if (!vp9->workspace_vaddr) {
|
||||
dev_err(core->dev, "Failed to allocate VP9 Workspace\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
- memset(vp9->workspace_vaddr + DBLK_PARA_OFFSET, 0, DBLK_PARA_SIZE);
|
||||
- memset(vp9->workspace_vaddr + COUNT_OFFSET, 0, COUNT_SIZE);
|
||||
- memset(vp9->workspace_vaddr + PROB_OFFSET, 0, PROB_SIZE);
|
||||
-
|
||||
- printk("Workspace: %08X-%08X\n", wkaddr, wkaddr + SIZE_WORKSPACE);
|
||||
- printk("DBLK_PARA: %08X\n", wkaddr + DBLK_PARA_OFFSET);
|
||||
+ return 0;
|
||||
+}
|
||||
|
||||
- vp9->workspace_paddr = wkaddr;
|
||||
+static void codec_vp9_setup_workspace(struct amvdec_session *sess,
|
||||
+ struct codec_vp9 *vp9)
|
||||
+{
|
||||
+ struct amvdec_core *core = sess->core;
|
||||
+ u32 revision = core->platform->revision;
|
||||
+ dma_addr_t wkaddr = vp9->workspace_paddr;
|
||||
|
||||
amvdec_write_dos(core, HEVCD_IPP_LINEBUFF_BASE, wkaddr + IPP_OFFSET);
|
||||
amvdec_write_dos(core, VP9_RPM_BUFFER, wkaddr + RPM_OFFSET);
|
||||
@@ -466,7 +468,6 @@ codec_vp9_setup_workspace(struct amvdec_core *core, struct codec_vp9 *vp9)
|
||||
amvdec_write_dos(core, VP9_PPS_BUFFER, wkaddr + PPS_OFFSET);
|
||||
amvdec_write_dos(core, VP9_SAO_UP, wkaddr + SAO_UP_OFFSET);
|
||||
|
||||
- /* No MMU */
|
||||
amvdec_write_dos(core, VP9_STREAM_SWAP_BUFFER,
|
||||
wkaddr + SWAP_BUF_OFFSET);
|
||||
amvdec_write_dos(core, VP9_STREAM_SWAP_BUFFER2,
|
||||
@@ -484,7 +485,19 @@ codec_vp9_setup_workspace(struct amvdec_core *core, struct codec_vp9 *vp9)
|
||||
amvdec_write_dos(core, VP9_COUNT_SWAP_BUFFER, wkaddr + COUNT_OFFSET);
|
||||
amvdec_write_dos(core, LMEM_DUMP_ADR, wkaddr + LMEM_OFFSET);
|
||||
|
||||
- return 0;
|
||||
+ if (codec_hevc_use_mmu(revision, sess->pixfmt_cap, vp9->is_10bit)) {
|
||||
+ amvdec_write_dos(core, HEVC_SAO_MMU_VH0_ADDR,
|
||||
+ wkaddr + MMU_VBH_OFFSET);
|
||||
+ amvdec_write_dos(core, HEVC_SAO_MMU_VH1_ADDR,
|
||||
+ wkaddr + MMU_VBH_OFFSET + (MMU_VBH_SIZE / 2));
|
||||
+
|
||||
+ if (revision >= VDEC_REVISION_G12A)
|
||||
+ amvdec_write_dos(core, HEVC_ASSIST_MMU_MAP_ADDR,
|
||||
+ vp9->common.mmu_map_paddr);
|
||||
+ else
|
||||
+ amvdec_write_dos(core, VP9_MMU_MAP_BUFFER,
|
||||
+ vp9->common.mmu_map_paddr);
|
||||
+ }
|
||||
}
|
||||
|
||||
static int codec_vp9_start(struct amvdec_session *sess)
|
||||
@@ -499,10 +512,11 @@ static int codec_vp9_start(struct amvdec_session *sess)
|
||||
if (!vp9)
|
||||
return -ENOMEM;
|
||||
|
||||
- ret = codec_vp9_setup_workspace(core, vp9);
|
||||
+ ret = codec_vp9_alloc_workspace(core, vp9);
|
||||
if (ret)
|
||||
goto free_vp9;
|
||||
|
||||
+ codec_vp9_setup_workspace(sess, vp9);
|
||||
amvdec_write_dos_bits(core, HEVC_STREAM_CONTROL, BIT(0));
|
||||
// stream_fifo_hole
|
||||
if (core->platform->revision == VDEC_REVISION_G12A)
|
||||
@@ -575,7 +589,7 @@ static int codec_vp9_stop(struct amvdec_session *sess)
|
||||
vp9->workspace_vaddr,
|
||||
vp9->workspace_paddr);
|
||||
|
||||
- codec_hevc_free_fbc_buffers(sess);
|
||||
+ codec_hevc_free_fbc_buffers(sess, &vp9->common);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -590,7 +604,7 @@ static void codec_vp9_set_sao(struct amvdec_session *sess, struct vb2_buffer *vb
|
||||
|
||||
if (codec_hevc_use_downsample(sess->pixfmt_cap, vp9->is_10bit))
|
||||
buf_y_paddr =
|
||||
- sess->fbc_buffer_paddr[vb->index];
|
||||
+ vp9->common.fbc_buffer_paddr[vb->index];
|
||||
else
|
||||
buf_y_paddr =
|
||||
vb2_dma_contig_plane_dma_addr(vb, 0);
|
||||
@@ -601,6 +615,7 @@ static void codec_vp9_set_sao(struct amvdec_session *sess, struct vb2_buffer *vb
|
||||
amvdec_write_dos(core, HEVC_CM_BODY_START_ADDR, buf_y_paddr);
|
||||
}
|
||||
|
||||
+
|
||||
if (sess->pixfmt_cap == V4L2_PIX_FMT_NV12M) {
|
||||
buf_y_paddr =
|
||||
vb2_dma_contig_plane_dma_addr(vb, 0);
|
||||
@@ -612,13 +627,22 @@ static void codec_vp9_set_sao(struct amvdec_session *sess, struct vb2_buffer *vb
|
||||
amvdec_write_dos(core, HEVC_SAO_C_WPTR, buf_u_v_paddr);
|
||||
}
|
||||
|
||||
+ if (codec_hevc_use_mmu(core->platform->revision, sess->pixfmt_cap,
|
||||
+ vp9->is_10bit)) {
|
||||
+ amvdec_write_dos(core, HEVC_CM_HEADER_START_ADDR,
|
||||
+ vp9->common.mmu_header_paddr[vb->index]);
|
||||
+ /* use HEVC_CM_HEADER_START_ADDR */
|
||||
+ amvdec_write_dos_bits(core, HEVC_SAO_CTRL5, BIT(10));
|
||||
+ }
|
||||
+
|
||||
amvdec_write_dos(core, HEVC_SAO_Y_LENGTH,
|
||||
amvdec_get_output_size(sess));
|
||||
amvdec_write_dos(core, HEVC_SAO_C_LENGTH,
|
||||
(amvdec_get_output_size(sess) / 2));
|
||||
|
||||
if (core->platform->revision >= VDEC_REVISION_G12A) {
|
||||
- amvdec_clear_dos_bits(core, HEVC_DBLK_CFGB, BIT(4) | BIT(5) | BIT(8) | BIT(9));
|
||||
+ amvdec_clear_dos_bits(core, HEVC_DBLK_CFGB,
|
||||
+ BIT(4) | BIT(5) | BIT(8) | BIT(9));
|
||||
/* enable first, compressed write */
|
||||
if (codec_hevc_use_fbc(sess->pixfmt_cap, vp9->is_10bit))
|
||||
amvdec_write_dos_bits(core, HEVC_DBLK_CFGB, BIT(8));
|
||||
@@ -630,8 +654,6 @@ static void codec_vp9_set_sao(struct amvdec_session *sess, struct vb2_buffer *vb
|
||||
/* dblk pipeline mode=1 for performance */
|
||||
if (sess->width >= 1280)
|
||||
amvdec_write_dos_bits(core, HEVC_DBLK_CFGB, BIT(4));
|
||||
-
|
||||
- printk("HEVC_DBLK_CFGB: %08X\n", amvdec_read_dos(core, HEVC_DBLK_CFGB));
|
||||
}
|
||||
|
||||
val = amvdec_read_dos(core, HEVC_SAO_CTRL1) & ~0x3ff3;
|
||||
@@ -644,7 +666,6 @@ static void codec_vp9_set_sao(struct amvdec_session *sess, struct vb2_buffer *vb
|
||||
}
|
||||
|
||||
amvdec_write_dos(core, HEVC_SAO_CTRL1, val);
|
||||
- printk("HEVC_SAO_CTRL1: %08X\n", val);
|
||||
|
||||
if (!codec_hevc_use_fbc(sess->pixfmt_cap, vp9->is_10bit)) {
|
||||
/* no downscale for NV12 */
|
||||
@@ -919,6 +940,11 @@ static void codec_vp9_process_frame(struct amvdec_session *sess)
|
||||
codec_vp9_update_next_ref(vp9);
|
||||
codec_vp9_show_existing_frame(vp9);
|
||||
|
||||
+ if (codec_hevc_use_mmu(core->platform->revision, sess->pixfmt_cap,
|
||||
+ vp9->is_10bit))
|
||||
+ codec_hevc_fill_mmu_map(sess, &vp9->common,
|
||||
+ &vp9->cur_frame->vbuf->vb2_buf);
|
||||
+
|
||||
intra_only = param->p.show_frame ? 0 : param->p.intra_only;
|
||||
/* clear mpred (for keyframe only) */
|
||||
if (param->p.frame_type != KEY_FRAME && !intra_only) {
|
||||
@@ -971,11 +997,12 @@ static void codec_vp9_resume(struct amvdec_session *sess)
|
||||
{
|
||||
struct codec_vp9 *vp9 = sess->priv;
|
||||
|
||||
- if (codec_hevc_setup_buffers(sess, vp9->is_10bit)) {
|
||||
+ if (codec_hevc_setup_buffers(sess, &vp9->common, vp9->is_10bit)) {
|
||||
amvdec_abort(sess);
|
||||
return;
|
||||
}
|
||||
|
||||
+ codec_vp9_setup_workspace(sess, vp9);
|
||||
codec_hevc_setup_decode_head(sess, vp9->is_10bit);
|
||||
codec_vp9_process_lf(vp9);
|
||||
codec_vp9_process_frame(sess);
|
||||
diff --git a/drivers/staging/media/meson/vdec/hevc_regs.h b/drivers/staging/media/meson/vdec/hevc_regs.h
|
||||
index dc2c2e085b05..0392f41a1eed 100644
|
||||
--- a/drivers/staging/media/meson/vdec/hevc_regs.h
|
||||
+++ b/drivers/staging/media/meson/vdec/hevc_regs.h
|
||||
@@ -6,6 +6,8 @@
|
||||
#ifndef __MESON_VDEC_HEVC_REGS_H_
|
||||
#define __MESON_VDEC_HEVC_REGS_H_
|
||||
|
||||
+#define HEVC_ASSIST_MMU_MAP_ADDR 0xc024
|
||||
+
|
||||
#define HEVC_ASSIST_MBOX1_CLR_REG 0xc1d4
|
||||
#define HEVC_ASSIST_MBOX1_MASK 0xc1d8
|
||||
|
||||
@@ -200,8 +202,11 @@
|
||||
#define HEVC_SAO_CTRL7 0xd894
|
||||
#define HEVC_CM_BODY_START_ADDR 0xd898
|
||||
#define HEVC_CM_BODY_LENGTH 0xd89c
|
||||
+#define HEVC_CM_HEADER_START_ADDR 0xd8a0
|
||||
#define HEVC_CM_HEADER_LENGTH 0xd8a4
|
||||
#define HEVC_CM_HEADER_OFFSET 0xd8ac
|
||||
+#define HEVC_SAO_MMU_VH0_ADDR 0xd8e8
|
||||
+#define HEVC_SAO_MMU_VH1_ADDR 0xd8ec
|
||||
|
||||
#define HEVC_IQIT_CLK_RST_CTRL 0xdc00
|
||||
#define HEVC_IQIT_SCALELUT_WR_ADDR 0xdc08
|
||||
diff --git a/drivers/staging/media/meson/vdec/vdec.h b/drivers/staging/media/meson/vdec/vdec.h
|
||||
index 95415212b282..95b4c5761a27 100644
|
||||
--- a/drivers/staging/media/meson/vdec/vdec.h
|
||||
+++ b/drivers/staging/media/meson/vdec/vdec.h
|
||||
@@ -20,8 +20,6 @@
|
||||
/* 32 buffers in 3-plane YUV420 */
|
||||
#define MAX_CANVAS (32 * 3)
|
||||
|
||||
-#define MAX_REF_PIC_NUM 24
|
||||
-
|
||||
struct amvdec_buffer {
|
||||
struct list_head list;
|
||||
struct vb2_buffer *vb;
|
||||
@@ -261,9 +259,6 @@ struct amvdec_session {
|
||||
u32 wrap_count;
|
||||
u32 fw_idx_to_vb2_idx[32];
|
||||
|
||||
- void *fbc_buffer_vaddr[MAX_REF_PIC_NUM];
|
||||
- dma_addr_t fbc_buffer_paddr[MAX_REF_PIC_NUM];
|
||||
-
|
||||
enum amvdec_status status;
|
||||
void *priv;
|
||||
};
|
||||
diff --git a/drivers/staging/media/meson/vdec/vdec_hevc.c b/drivers/staging/media/meson/vdec/vdec_hevc.c
|
||||
index 730ecd771643..70db09c052c3 100644
|
||||
--- a/drivers/staging/media/meson/vdec/vdec_hevc.c
|
||||
+++ b/drivers/staging/media/meson/vdec/vdec_hevc.c
|
||||
@@ -123,9 +123,9 @@ static int vdec_hevc_stop(struct amvdec_session *sess)
|
||||
regmap_update_bits(core->regmap_ao, AO_RTI_GEN_PWR_SLEEP0,
|
||||
GEN_PWR_VDEC_HEVC, GEN_PWR_VDEC_HEVC);
|
||||
|
||||
+ clk_disable_unprepare(core->vdec_hevc_clk);
|
||||
if (core->platform->revision == VDEC_REVISION_G12A)
|
||||
clk_disable_unprepare(core->vdec_hevcf_clk);
|
||||
- clk_disable_unprepare(core->vdec_hevc_clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -136,11 +136,6 @@ static int vdec_hevc_start(struct amvdec_session *sess)
|
||||
struct amvdec_core *core = sess->core;
|
||||
struct amvdec_codec_ops *codec_ops = sess->fmt_out->codec_ops;
|
||||
|
||||
- clk_set_rate(core->vdec_hevc_clk, 666666666);
|
||||
- ret = clk_prepare_enable(core->vdec_hevc_clk);
|
||||
- if (ret)
|
||||
- return ret;
|
||||
-
|
||||
if (core->platform->revision == VDEC_REVISION_G12A) {
|
||||
clk_set_rate(core->vdec_hevcf_clk, 666666666);
|
||||
ret = clk_prepare_enable(core->vdec_hevcf_clk);
|
||||
@@ -148,6 +143,11 @@ static int vdec_hevc_start(struct amvdec_session *sess)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ clk_set_rate(core->vdec_hevc_clk, 666666666);
|
||||
+ ret = clk_prepare_enable(core->vdec_hevc_clk);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
regmap_update_bits(core->regmap_ao, AO_RTI_GEN_PWR_SLEEP0,
|
||||
GEN_PWR_VDEC_HEVC, 0);
|
||||
udelay(10);
|
||||
@@ -177,7 +177,7 @@ static int vdec_hevc_start(struct amvdec_session *sess)
|
||||
if (ret)
|
||||
goto stop;
|
||||
|
||||
- amvdec_write_dos(core, DOS_SW_RESET3, BIT(12)|BIT(11));
|
||||
+ amvdec_write_dos(core, DOS_SW_RESET3, BIT(12) | BIT(11));
|
||||
amvdec_write_dos(core, DOS_SW_RESET3, 0);
|
||||
amvdec_read_dos(core, DOS_SW_RESET3);
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,138 @@
|
|||
From 7602acfcd7cca5e3c8edb6b87801715a33e99944 Mon Sep 17 00:00:00 2001
|
||||
From: Maxime Jourdan <mjourdan@baylibre.com>
|
||||
Date: Wed, 5 Jun 2019 16:14:36 +0200
|
||||
Subject: [PATCH 14/14] media: meson: vdec: [WIP] HEVC IOMMU support
|
||||
|
||||
Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
|
||||
---
|
||||
drivers/staging/media/meson/vdec/codec_hevc.c | 59 +++++++++++++------
|
||||
1 file changed, 41 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/media/meson/vdec/codec_hevc.c b/drivers/staging/media/meson/vdec/codec_hevc.c
|
||||
index 65d2ad4d8345..20bee7689dbd 100644
|
||||
--- a/drivers/staging/media/meson/vdec/codec_hevc.c
|
||||
+++ b/drivers/staging/media/meson/vdec/codec_hevc.c
|
||||
@@ -500,8 +500,11 @@ static void codec_hevc_output_frames(struct amvdec_session *sess)
|
||||
|
||||
|
||||
static int
|
||||
-codec_hevc_setup_workspace(struct amvdec_core *core, struct codec_hevc *hevc)
|
||||
+codec_hevc_setup_workspace(struct amvdec_session *sess,
|
||||
+ struct codec_hevc *hevc)
|
||||
{
|
||||
+ struct amvdec_core *core = sess->core;
|
||||
+ u32 revision = core->platform->revision;
|
||||
dma_addr_t wkaddr;
|
||||
|
||||
/* Allocate some memory for the HEVC decoder's state */
|
||||
@@ -522,19 +525,32 @@ codec_hevc_setup_workspace(struct amvdec_core *core, struct codec_hevc *hevc)
|
||||
amvdec_write_dos(core, HEVC_PPS_BUFFER, wkaddr + PPS_OFFSET);
|
||||
amvdec_write_dos(core, HEVC_SAO_UP, wkaddr + SAO_UP_OFFSET);
|
||||
|
||||
- if (core->platform->revision >= VDEC_REVISION_G12A)
|
||||
- amvdec_write_dos(core, HEVC_ASSIST_MMU_MAP_ADDR,
|
||||
- wkaddr + MMU_MAP_OFFSET);
|
||||
-
|
||||
- /* No MMU */
|
||||
- /*amvdec_write_dos(core, HEVC_STREAM_SWAP_BUFFER,
|
||||
- wkaddr + SWAP_BUF_OFFSET);
|
||||
- amvdec_write_dos(core, HEVC_STREAM_SWAP_BUFFER2,
|
||||
- wkaddr + SWAP_BUF2_OFFSET);*/
|
||||
+ if (codec_hevc_use_mmu(revision, sess->pixfmt_cap, hevc->is_10bit)) {
|
||||
+ amvdec_write_dos(core, HEVC_SAO_MMU_VH0_ADDR,
|
||||
+ wkaddr + MMU_VBH_OFFSET);
|
||||
+ amvdec_write_dos(core, HEVC_SAO_MMU_VH1_ADDR,
|
||||
+ wkaddr + MMU_VBH_OFFSET + (MMU_VBH_SIZE / 2));
|
||||
+
|
||||
+ if (revision >= VDEC_REVISION_G12A)
|
||||
+ amvdec_write_dos(core, HEVC_ASSIST_MMU_MAP_ADDR,
|
||||
+ hevc->common.mmu_map_paddr);
|
||||
+ else
|
||||
+ amvdec_write_dos(core, H265_MMU_MAP_BUFFER,
|
||||
+ hevc->common.mmu_map_paddr);
|
||||
+ } else if (revision < VDEC_REVISION_G12A) {
|
||||
+ amvdec_write_dos(core, HEVC_STREAM_SWAP_BUFFER,
|
||||
+ wkaddr + SWAP_BUF_OFFSET);
|
||||
+ amvdec_write_dos(core, HEVC_STREAM_SWAP_BUFFER2,
|
||||
+ wkaddr + SWAP_BUF2_OFFSET);
|
||||
+ }
|
||||
+
|
||||
amvdec_write_dos(core, HEVC_SCALELUT, wkaddr + SCALELUT_OFFSET);
|
||||
amvdec_write_dos(core, HEVC_DBLK_CFG4, wkaddr + DBLK_PARA_OFFSET);
|
||||
amvdec_write_dos(core, HEVC_DBLK_CFG5, wkaddr + DBLK_DATA_OFFSET);
|
||||
- amvdec_write_dos(core, HEVC_DBLK_CFGE, wkaddr + DBLK_DATA2_OFFSET);
|
||||
+ if (revision >= VDEC_REVISION_G12A)
|
||||
+ amvdec_write_dos(core, HEVC_DBLK_CFGE,
|
||||
+ wkaddr + DBLK_DATA2_OFFSET);
|
||||
+
|
||||
amvdec_write_dos(core, LMEM_DUMP_ADR, wkaddr + LMEM_OFFSET);
|
||||
|
||||
return 0;
|
||||
@@ -555,7 +571,7 @@ static int codec_hevc_start(struct amvdec_session *sess)
|
||||
INIT_LIST_HEAD(&hevc->ref_frames_list);
|
||||
hevc->curr_poc = INVALID_POC;
|
||||
|
||||
- ret = codec_hevc_setup_workspace(core, hevc);
|
||||
+ ret = codec_hevc_setup_workspace(sess, hevc);
|
||||
if (ret)
|
||||
goto free_hevc;
|
||||
|
||||
@@ -720,6 +736,7 @@ codec_hevc_set_sao(struct amvdec_session *sess, struct hevc_frame *frame)
|
||||
{
|
||||
struct amvdec_core *core = sess->core;
|
||||
struct codec_hevc *hevc = sess->priv;
|
||||
+ struct vb2_buffer *vb = &frame->vbuf->vb2_buf;
|
||||
union rpm_param *param = &hevc->rpm_param;
|
||||
u32 pic_height_cu =
|
||||
(hevc->height + hevc->lcu_size - 1) / hevc->lcu_size;
|
||||
@@ -743,10 +760,10 @@ codec_hevc_set_sao(struct amvdec_session *sess, struct hevc_frame *frame)
|
||||
|
||||
if (codec_hevc_use_downsample(sess->pixfmt_cap, hevc->is_10bit))
|
||||
buf_y_paddr =
|
||||
- hevc->common.fbc_buffer_paddr[frame->vbuf->vb2_buf.index];
|
||||
+ hevc->common.fbc_buffer_paddr[vb->index];
|
||||
else
|
||||
buf_y_paddr =
|
||||
- vb2_dma_contig_plane_dma_addr(&frame->vbuf->vb2_buf, 0);
|
||||
+ vb2_dma_contig_plane_dma_addr(vb, 0);
|
||||
|
||||
if (codec_hevc_use_fbc(sess->pixfmt_cap, hevc->is_10bit)) {
|
||||
val = amvdec_read_dos(core, HEVC_SAO_CTRL5) & ~0xff0200;
|
||||
@@ -756,15 +773,23 @@ codec_hevc_set_sao(struct amvdec_session *sess, struct hevc_frame *frame)
|
||||
|
||||
if (sess->pixfmt_cap == V4L2_PIX_FMT_NV12M) {
|
||||
buf_y_paddr =
|
||||
- vb2_dma_contig_plane_dma_addr(&frame->vbuf->vb2_buf, 0);
|
||||
+ vb2_dma_contig_plane_dma_addr(vb, 0);
|
||||
buf_u_v_paddr =
|
||||
- vb2_dma_contig_plane_dma_addr(&frame->vbuf->vb2_buf, 1);
|
||||
+ vb2_dma_contig_plane_dma_addr(vb, 1);
|
||||
amvdec_write_dos(core, HEVC_SAO_Y_START_ADDR, buf_y_paddr);
|
||||
amvdec_write_dos(core, HEVC_SAO_C_START_ADDR, buf_u_v_paddr);
|
||||
amvdec_write_dos(core, HEVC_SAO_Y_WPTR, buf_y_paddr);
|
||||
amvdec_write_dos(core, HEVC_SAO_C_WPTR, buf_u_v_paddr);
|
||||
}
|
||||
|
||||
+ if (codec_hevc_use_mmu(core->platform->revision, sess->pixfmt_cap,
|
||||
+ hevc->is_10bit)) {
|
||||
+ amvdec_write_dos(core, HEVC_CM_HEADER_START_ADDR,
|
||||
+ hevc->common.mmu_header_paddr[vb->index]);
|
||||
+ /* use HEVC_CM_HEADER_START_ADDR */
|
||||
+ amvdec_write_dos_bits(core, HEVC_SAO_CTRL5, BIT(10));
|
||||
+ }
|
||||
+
|
||||
amvdec_write_dos(core, HEVC_SAO_Y_LENGTH,
|
||||
amvdec_get_output_size(sess));
|
||||
amvdec_write_dos(core, HEVC_SAO_C_LENGTH,
|
||||
@@ -1351,8 +1376,6 @@ static irqreturn_t codec_hevc_threaded_isr(struct amvdec_session *sess)
|
||||
struct codec_hevc *hevc = sess->priv;
|
||||
u32 dec_status = amvdec_read_dos(core, HEVC_DEC_STATUS_REG);
|
||||
|
||||
- printk("ISR!\n");
|
||||
-
|
||||
if (!hevc)
|
||||
return IRQ_HANDLED;
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,303 @@
|
|||
From 8b62f6f976a6d299dac9badfecc66adbf854b6f4 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Thu, 30 Mar 2017 11:49:55 +0200
|
||||
Subject: [PATCH 01/16] ASoC: meson: add meson audio core driver
|
||||
|
||||
This patch adds support for the audio core driver for the Amlogic Meson SoC
|
||||
family. The purpose of this driver is to properly reset the audio block and
|
||||
provide register access for the different devices scattered in this address
|
||||
space. This includes output and input DMAs, pcm, i2s and spdif dai, card
|
||||
level routing, internal codec for the gxl variant
|
||||
|
||||
For more information, please refer to the section 5 of the public datasheet
|
||||
of the S905 (gxbb). This datasheet is available here: [0].
|
||||
|
||||
[0]: http://dn.odroid.com/S905/DataSheet/S905_Public_Datasheet_V1.1.4.pdf
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
sound/soc/Kconfig | 1 +
|
||||
sound/soc/Makefile | 1 +
|
||||
sound/soc/meson-gx/Kconfig | 11 ++
|
||||
sound/soc/meson-gx/Makefile | 3 +
|
||||
sound/soc/meson-gx/audio-core.c | 180 ++++++++++++++++++++++++++++++++
|
||||
sound/soc/meson-gx/audio-core.h | 28 +++++
|
||||
6 files changed, 224 insertions(+)
|
||||
create mode 100644 sound/soc/meson-gx/Kconfig
|
||||
create mode 100644 sound/soc/meson-gx/Makefile
|
||||
create mode 100644 sound/soc/meson-gx/audio-core.c
|
||||
create mode 100644 sound/soc/meson-gx/audio-core.h
|
||||
|
||||
diff --git a/sound/soc/Kconfig b/sound/soc/Kconfig
|
||||
index dc86e4073001..0148a95fd1ce 100644
|
||||
--- a/sound/soc/Kconfig
|
||||
+++ b/sound/soc/Kconfig
|
||||
@@ -57,6 +57,7 @@ source "sound/soc/img/Kconfig"
|
||||
source "sound/soc/intel/Kconfig"
|
||||
source "sound/soc/mediatek/Kconfig"
|
||||
source "sound/soc/meson/Kconfig"
|
||||
+source "sound/soc/meson-gx/Kconfig"
|
||||
source "sound/soc/mxs/Kconfig"
|
||||
source "sound/soc/pxa/Kconfig"
|
||||
source "sound/soc/qcom/Kconfig"
|
||||
diff --git a/sound/soc/Makefile b/sound/soc/Makefile
|
||||
index d90ce8a32887..b8ec8e35f161 100644
|
||||
--- a/sound/soc/Makefile
|
||||
+++ b/sound/soc/Makefile
|
||||
@@ -38,6 +38,7 @@ obj-$(CONFIG_SND_SOC) += img/
|
||||
obj-$(CONFIG_SND_SOC) += intel/
|
||||
obj-$(CONFIG_SND_SOC) += mediatek/
|
||||
obj-$(CONFIG_SND_SOC) += meson/
|
||||
+obj-$(CONFIG_SND_SOC) += meson-gx/
|
||||
obj-$(CONFIG_SND_SOC) += mxs/
|
||||
obj-$(CONFIG_SND_SOC) += nuc900/
|
||||
obj-$(CONFIG_SND_SOC) += kirkwood/
|
||||
diff --git a/sound/soc/meson-gx/Kconfig b/sound/soc/meson-gx/Kconfig
|
||||
new file mode 100644
|
||||
index 000000000000..280e49e7c16f
|
||||
--- /dev/null
|
||||
+++ b/sound/soc/meson-gx/Kconfig
|
||||
@@ -0,0 +1,11 @@
|
||||
+menuconfig SND_SOC_MESON_GX
|
||||
+ tristate "ASoC WIP support for Amlogic GX SoCs"
|
||||
+ depends on ARCH_MESON
|
||||
+ select MFD_CORE
|
||||
+ select REGMAP_MMIO
|
||||
+ help
|
||||
+ Say Y or M if you want to add support for codecs attached to
|
||||
+ the Amlogic Meson SoCs Audio interfaces. You will also need to
|
||||
+ select the audio interfaces to support below. This WIP drivers
|
||||
+ are kept separated from the actual upstream amlogic ASoC driver
|
||||
+ to minimize conflicts until support is submitted and merged
|
||||
diff --git a/sound/soc/meson-gx/Makefile b/sound/soc/meson-gx/Makefile
|
||||
new file mode 100644
|
||||
index 000000000000..6f124c31a85c
|
||||
--- /dev/null
|
||||
+++ b/sound/soc/meson-gx/Makefile
|
||||
@@ -0,0 +1,3 @@
|
||||
+snd-soc-meson-audio-core-objs := audio-core.o
|
||||
+
|
||||
+obj-$(CONFIG_SND_SOC_MESON_GX) += snd-soc-meson-audio-core.o
|
||||
diff --git a/sound/soc/meson-gx/audio-core.c b/sound/soc/meson-gx/audio-core.c
|
||||
new file mode 100644
|
||||
index 000000000000..68f7e0e58f5f
|
||||
--- /dev/null
|
||||
+++ b/sound/soc/meson-gx/audio-core.c
|
||||
@@ -0,0 +1,180 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2017 BayLibre, SAS
|
||||
+ * Author: Jerome Brunet <jbrunet@baylibre.com>
|
||||
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License as
|
||||
+ * published by the Free Software Foundation; either version 2 of the
|
||||
+ * License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This 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.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/clk.h>
|
||||
+#include <linux/mfd/core.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/of.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/regmap.h>
|
||||
+#include <linux/reset.h>
|
||||
+
|
||||
+#include "audio-core.h"
|
||||
+
|
||||
+#define DRV_NAME "meson-gx-audio-core"
|
||||
+
|
||||
+static const char * const acore_clock_names[] = { "aiu_top",
|
||||
+ "aiu_glue",
|
||||
+ "audin" };
|
||||
+
|
||||
+static int meson_acore_init_clocks(struct device *dev)
|
||||
+{
|
||||
+ struct clk *clock;
|
||||
+ int i, ret;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(acore_clock_names); i++) {
|
||||
+ clock = devm_clk_get(dev, acore_clock_names[i]);
|
||||
+ if (IS_ERR(clock)) {
|
||||
+ if (PTR_ERR(clock) != -EPROBE_DEFER)
|
||||
+ dev_err(dev, "Failed to get %s clock\n",
|
||||
+ acore_clock_names[i]);
|
||||
+ return PTR_ERR(clock);
|
||||
+ }
|
||||
+
|
||||
+ ret = clk_prepare_enable(clock);
|
||||
+ if (ret) {
|
||||
+ dev_err(dev, "Failed to enable %s clock\n",
|
||||
+ acore_clock_names[i]);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ ret = devm_add_action_or_reset(dev,
|
||||
+ (void(*)(void *))clk_disable_unprepare,
|
||||
+ clock);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const char * const acore_reset_names[] = { "aiu",
|
||||
+ "audin" };
|
||||
+
|
||||
+static int meson_acore_init_resets(struct device *dev)
|
||||
+{
|
||||
+ struct reset_control *reset;
|
||||
+ int i, ret;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(acore_reset_names); i++) {
|
||||
+ reset = devm_reset_control_get_exclusive(dev,
|
||||
+ acore_reset_names[i]);
|
||||
+ if (IS_ERR(reset)) {
|
||||
+ if (PTR_ERR(reset) != -EPROBE_DEFER)
|
||||
+ dev_err(dev, "Failed to get %s reset\n",
|
||||
+ acore_reset_names[i]);
|
||||
+ return PTR_ERR(reset);
|
||||
+ }
|
||||
+
|
||||
+ ret = reset_control_reset(reset);
|
||||
+ if (ret) {
|
||||
+ dev_err(dev, "Failed to pulse %s reset\n",
|
||||
+ acore_reset_names[i]);
|
||||
+ return ret;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct regmap_config meson_acore_regmap_config = {
|
||||
+ .reg_bits = 32,
|
||||
+ .val_bits = 32,
|
||||
+ .reg_stride = 4,
|
||||
+};
|
||||
+
|
||||
+static const struct mfd_cell meson_acore_devs[] = {
|
||||
+ {
|
||||
+ .name = "meson-aiu-i2s",
|
||||
+ .of_compatible = "amlogic,meson-aiu-i2s",
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "meson-aiu-spdif",
|
||||
+ .of_compatible = "amlogic,meson-aiu-spdif",
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static int meson_acore_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct device *dev = &pdev->dev;
|
||||
+ struct meson_audio_core_data *data;
|
||||
+ struct resource *res;
|
||||
+ void __iomem *regs;
|
||||
+ int ret;
|
||||
+
|
||||
+ data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
|
||||
+ if (!data)
|
||||
+ return -ENOMEM;
|
||||
+ platform_set_drvdata(pdev, data);
|
||||
+
|
||||
+ ret = meson_acore_init_clocks(dev);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = meson_acore_init_resets(dev);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "aiu");
|
||||
+ regs = devm_ioremap_resource(dev, res);
|
||||
+ if (IS_ERR(regs))
|
||||
+ return PTR_ERR(regs);
|
||||
+
|
||||
+ data->aiu = devm_regmap_init_mmio(dev, regs,
|
||||
+ &meson_acore_regmap_config);
|
||||
+ if (IS_ERR(data->aiu)) {
|
||||
+ dev_err(dev, "Couldn't create the AIU regmap\n");
|
||||
+ return PTR_ERR(data->aiu);
|
||||
+ }
|
||||
+
|
||||
+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "audin");
|
||||
+ regs = devm_ioremap_resource(dev, res);
|
||||
+ if (IS_ERR(regs))
|
||||
+ return PTR_ERR(regs);
|
||||
+
|
||||
+ data->audin = devm_regmap_init_mmio(dev, regs,
|
||||
+ &meson_acore_regmap_config);
|
||||
+ if (IS_ERR(data->audin)) {
|
||||
+ dev_err(dev, "Couldn't create the AUDIN regmap\n");
|
||||
+ return PTR_ERR(data->audin);
|
||||
+ }
|
||||
+
|
||||
+ return devm_mfd_add_devices(dev, PLATFORM_DEVID_AUTO, meson_acore_devs,
|
||||
+ ARRAY_SIZE(meson_acore_devs), NULL, 0,
|
||||
+ NULL);
|
||||
+}
|
||||
+
|
||||
+static const struct of_device_id meson_acore_of_match[] = {
|
||||
+ { .compatible = "amlogic,meson-gx-audio-core", },
|
||||
+ {}
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, meson_acore_of_match);
|
||||
+
|
||||
+static struct platform_driver meson_acore_pdrv = {
|
||||
+ .probe = meson_acore_probe,
|
||||
+ .driver = {
|
||||
+ .name = DRV_NAME,
|
||||
+ .of_match_table = meson_acore_of_match,
|
||||
+ },
|
||||
+};
|
||||
+module_platform_driver(meson_acore_pdrv);
|
||||
+
|
||||
+MODULE_DESCRIPTION("Meson Audio Core Driver");
|
||||
+MODULE_AUTHOR("Jerome Brunet <jbrunet@baylibre.com>");
|
||||
+MODULE_LICENSE("GPL v2");
|
||||
diff --git a/sound/soc/meson-gx/audio-core.h b/sound/soc/meson-gx/audio-core.h
|
||||
new file mode 100644
|
||||
index 000000000000..6e7a24cdc4a9
|
||||
--- /dev/null
|
||||
+++ b/sound/soc/meson-gx/audio-core.h
|
||||
@@ -0,0 +1,28 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2017 BayLibre, SAS
|
||||
+ * Author: Jerome Brunet <jbrunet@baylibre.com>
|
||||
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License as
|
||||
+ * published by the Free Software Foundation; either version 2 of the
|
||||
+ * License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This 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.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
+ */
|
||||
+
|
||||
+#ifndef _MESON_AUDIO_CORE_H_
|
||||
+#define _MESON_AUDIO_CORE_H_
|
||||
+
|
||||
+struct meson_audio_core_data {
|
||||
+ struct regmap *aiu;
|
||||
+ struct regmap *audin;
|
||||
+};
|
||||
+
|
||||
+#endif /* _MESON_AUDIO_CORE_H_ */
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,360 @@
|
|||
From 72f72fd01701b388f8afad19b8bf209c03c5735b Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Thu, 30 Mar 2017 12:00:10 +0200
|
||||
Subject: [PATCH 02/16] ASoC: meson: add register definitions
|
||||
|
||||
Add the register definition for the AIU and AUDIN blocks
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
sound/soc/meson-gx/aiu-regs.h | 182 ++++++++++++++++++++++++++++++++
|
||||
sound/soc/meson-gx/audin-regs.h | 148 ++++++++++++++++++++++++++
|
||||
2 files changed, 330 insertions(+)
|
||||
create mode 100644 sound/soc/meson-gx/aiu-regs.h
|
||||
create mode 100644 sound/soc/meson-gx/audin-regs.h
|
||||
|
||||
diff --git a/sound/soc/meson-gx/aiu-regs.h b/sound/soc/meson-gx/aiu-regs.h
|
||||
new file mode 100644
|
||||
index 000000000000..67391e64fe1c
|
||||
--- /dev/null
|
||||
+++ b/sound/soc/meson-gx/aiu-regs.h
|
||||
@@ -0,0 +1,182 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2017 BayLibre, SAS
|
||||
+ * Author: Jerome Brunet <jbrunet@baylibre.com>
|
||||
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License as
|
||||
+ * published by the Free Software Foundation; either version 2 of the
|
||||
+ * License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This 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.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
+ */
|
||||
+
|
||||
+#ifndef _AIU_REGS_H_
|
||||
+#define _AIU_REGS_H_
|
||||
+
|
||||
+#define AIU_958_BPF 0x000
|
||||
+#define AIU_958_BRST 0x004
|
||||
+#define AIU_958_LENGTH 0x008
|
||||
+#define AIU_958_PADDSIZE 0x00C
|
||||
+#define AIU_958_MISC 0x010
|
||||
+#define AIU_958_FORCE_LEFT 0x014 /* Unknown */
|
||||
+#define AIU_958_DISCARD_NUM 0x018
|
||||
+#define AIU_958_DCU_FF_CTRL 0x01C
|
||||
+#define AIU_958_CHSTAT_L0 0x020
|
||||
+#define AIU_958_CHSTAT_L1 0x024
|
||||
+#define AIU_958_CTRL 0x028
|
||||
+#define AIU_958_RPT 0x02C
|
||||
+#define AIU_I2S_MUTE_SWAP 0x030
|
||||
+#define AIU_I2S_SOURCE_DESC 0x034
|
||||
+#define AIU_I2S_MED_CTRL 0x038
|
||||
+#define AIU_I2S_MED_THRESH 0x03C
|
||||
+#define AIU_I2S_DAC_CFG 0x040
|
||||
+#define AIU_I2S_SYNC 0x044 /* Unknown */
|
||||
+#define AIU_I2S_MISC 0x048
|
||||
+#define AIU_I2S_OUT_CFG 0x04C
|
||||
+#define AIU_I2S_FF_CTRL 0x050 /* Unknown */
|
||||
+#define AIU_RST_SOFT 0x054
|
||||
+#define AIU_CLK_CTRL 0x058
|
||||
+#define AIU_MIX_ADCCFG 0x05C
|
||||
+#define AIU_MIX_CTRL 0x060
|
||||
+#define AIU_CLK_CTRL_MORE 0x064
|
||||
+#define AIU_958_POP 0x068
|
||||
+#define AIU_MIX_GAIN 0x06C
|
||||
+#define AIU_958_SYNWORD1 0x070
|
||||
+#define AIU_958_SYNWORD2 0x074
|
||||
+#define AIU_958_SYNWORD3 0x078
|
||||
+#define AIU_958_SYNWORD1_MASK 0x07C
|
||||
+#define AIU_958_SYNWORD2_MASK 0x080
|
||||
+#define AIU_958_SYNWORD3_MASK 0x084
|
||||
+#define AIU_958_FFRDOUT_THD 0x088
|
||||
+#define AIU_958_LENGTH_PER_PAUSE 0x08C
|
||||
+#define AIU_958_PAUSE_NUM 0x090
|
||||
+#define AIU_958_PAUSE_PAYLOAD 0x094
|
||||
+#define AIU_958_AUTO_PAUSE 0x098
|
||||
+#define AIU_958_PAUSE_PD_LENGTH 0x09C
|
||||
+#define AIU_CODEC_DAC_LRCLK_CTRL 0x0A0
|
||||
+#define AIU_CODEC_ADC_LRCLK_CTRL 0x0A4
|
||||
+#define AIU_HDMI_CLK_DATA_CTRL 0x0A8
|
||||
+#define AIU_CODEC_CLK_DATA_CTRL 0x0AC
|
||||
+#define AIU_ACODEC_CTRL 0x0B0
|
||||
+#define AIU_958_CHSTAT_R0 0x0C0
|
||||
+#define AIU_958_CHSTAT_R1 0x0C4
|
||||
+#define AIU_958_VALID_CTRL 0x0C8
|
||||
+#define AIU_AUDIO_AMP_REG0 0x0F0 /* Unknown */
|
||||
+#define AIU_AUDIO_AMP_REG1 0x0F4 /* Unknown */
|
||||
+#define AIU_AUDIO_AMP_REG2 0x0F8 /* Unknown */
|
||||
+#define AIU_AUDIO_AMP_REG3 0x0FC /* Unknown */
|
||||
+#define AIU_AIFIFO2_CTRL 0x100
|
||||
+#define AIU_AIFIFO2_STATUS 0x104
|
||||
+#define AIU_AIFIFO2_GBIT 0x108
|
||||
+#define AIU_AIFIFO2_CLB 0x10C
|
||||
+#define AIU_CRC_CTRL 0x110
|
||||
+#define AIU_CRC_STATUS 0x114
|
||||
+#define AIU_CRC_SHIFT_REG 0x118
|
||||
+#define AIU_CRC_IREG 0x11C
|
||||
+#define AIU_CRC_CAL_REG1 0x120
|
||||
+#define AIU_CRC_CAL_REG0 0x124
|
||||
+#define AIU_CRC_POLY_COEF1 0x128
|
||||
+#define AIU_CRC_POLY_COEF0 0x12C
|
||||
+#define AIU_CRC_BIT_SIZE1 0x130
|
||||
+#define AIU_CRC_BIT_SIZE0 0x134
|
||||
+#define AIU_CRC_BIT_CNT1 0x138
|
||||
+#define AIU_CRC_BIT_CNT0 0x13C
|
||||
+#define AIU_AMCLK_GATE_HI 0x140
|
||||
+#define AIU_AMCLK_GATE_LO 0x144
|
||||
+#define AIU_AMCLK_MSR 0x148
|
||||
+#define AIU_AUDAC_CTRL0 0x14C /* Unknown */
|
||||
+#define AIU_DELTA_SIGMA0 0x154 /* Unknown */
|
||||
+#define AIU_DELTA_SIGMA1 0x158 /* Unknown */
|
||||
+#define AIU_DELTA_SIGMA2 0x15C /* Unknown */
|
||||
+#define AIU_DELTA_SIGMA3 0x160 /* Unknown */
|
||||
+#define AIU_DELTA_SIGMA4 0x164 /* Unknown */
|
||||
+#define AIU_DELTA_SIGMA5 0x168 /* Unknown */
|
||||
+#define AIU_DELTA_SIGMA6 0x16C /* Unknown */
|
||||
+#define AIU_DELTA_SIGMA7 0x170 /* Unknown */
|
||||
+#define AIU_DELTA_SIGMA_LCNTS 0x174 /* Unknown */
|
||||
+#define AIU_DELTA_SIGMA_RCNTS 0x178 /* Unknown */
|
||||
+#define AIU_MEM_I2S_START_PTR 0x180
|
||||
+#define AIU_MEM_I2S_RD_PTR 0x184
|
||||
+#define AIU_MEM_I2S_END_PTR 0x188
|
||||
+#define AIU_MEM_I2S_MASKS 0x18C
|
||||
+#define AIU_MEM_I2S_CONTROL 0x190
|
||||
+#define AIU_MEM_IEC958_START_PTR 0x194
|
||||
+#define AIU_MEM_IEC958_RD_PTR 0x198
|
||||
+#define AIU_MEM_IEC958_END_PTR 0x19C
|
||||
+#define AIU_MEM_IEC958_MASKS 0x1A0
|
||||
+#define AIU_MEM_IEC958_CONTROL 0x1A4
|
||||
+#define AIU_MEM_AIFIFO2_START_PTR 0x1A8
|
||||
+#define AIU_MEM_AIFIFO2_CURR_PTR 0x1AC
|
||||
+#define AIU_MEM_AIFIFO2_END_PTR 0x1B0
|
||||
+#define AIU_MEM_AIFIFO2_BYTES_AVAIL 0x1B4
|
||||
+#define AIU_MEM_AIFIFO2_CONTROL 0x1B8
|
||||
+#define AIU_MEM_AIFIFO2_MAN_WP 0x1BC
|
||||
+#define AIU_MEM_AIFIFO2_MAN_RP 0x1C0
|
||||
+#define AIU_MEM_AIFIFO2_LEVEL 0x1C4
|
||||
+#define AIU_MEM_AIFIFO2_BUF_CNTL 0x1C8
|
||||
+#define AIU_MEM_I2S_MAN_WP 0x1CC
|
||||
+#define AIU_MEM_I2S_MAN_RP 0x1D0
|
||||
+#define AIU_MEM_I2S_LEVEL 0x1D4
|
||||
+#define AIU_MEM_I2S_BUF_CNTL 0x1D8
|
||||
+#define AIU_MEM_I2S_BUF_WRAP_COUNT 0x1DC
|
||||
+#define AIU_MEM_I2S_MEM_CTL 0x1E0
|
||||
+#define AIU_MEM_IEC958_MEM_CTL 0x1E4
|
||||
+#define AIU_MEM_IEC958_WRAP_COUNT 0x1E8
|
||||
+#define AIU_MEM_IEC958_IRQ_LEVEL 0x1EC
|
||||
+#define AIU_MEM_IEC958_MAN_WP 0x1F0
|
||||
+#define AIU_MEM_IEC958_MAN_RP 0x1F4
|
||||
+#define AIU_MEM_IEC958_LEVEL 0x1F8
|
||||
+#define AIU_MEM_IEC958_BUF_CNTL 0x1FC
|
||||
+#define AIU_AIFIFO_CTRL 0x200
|
||||
+#define AIU_AIFIFO_STATUS 0x204
|
||||
+#define AIU_AIFIFO_GBIT 0x208
|
||||
+#define AIU_AIFIFO_CLB 0x20C
|
||||
+#define AIU_MEM_AIFIFO_START_PTR 0x210
|
||||
+#define AIU_MEM_AIFIFO_CURR_PTR 0x214
|
||||
+#define AIU_MEM_AIFIFO_END_PTR 0x218
|
||||
+#define AIU_MEM_AIFIFO_BYTES_AVAIL 0x21C
|
||||
+#define AIU_MEM_AIFIFO_CONTROL 0x220
|
||||
+#define AIU_MEM_AIFIFO_MAN_WP 0x224
|
||||
+#define AIU_MEM_AIFIFO_MAN_RP 0x228
|
||||
+#define AIU_MEM_AIFIFO_LEVEL 0x22C
|
||||
+#define AIU_MEM_AIFIFO_BUF_CNTL 0x230
|
||||
+#define AIU_MEM_AIFIFO_BUF_WRAP_COUNT 0x234
|
||||
+#define AIU_MEM_AIFIFO2_BUF_WRAP_COUNT 0x238
|
||||
+#define AIU_MEM_AIFIFO_MEM_CTL 0x23C
|
||||
+#define AIFIFO_TIME_STAMP_CNTL 0x240
|
||||
+#define AIFIFO_TIME_STAMP_SYNC_0 0x244
|
||||
+#define AIFIFO_TIME_STAMP_SYNC_1 0x248
|
||||
+#define AIFIFO_TIME_STAMP_0 0x24C
|
||||
+#define AIFIFO_TIME_STAMP_1 0x250
|
||||
+#define AIFIFO_TIME_STAMP_2 0x254
|
||||
+#define AIFIFO_TIME_STAMP_3 0x258
|
||||
+#define AIFIFO_TIME_STAMP_LENGTH 0x25C
|
||||
+#define AIFIFO2_TIME_STAMP_CNTL 0x260
|
||||
+#define AIFIFO2_TIME_STAMP_SYNC_0 0x264
|
||||
+#define AIFIFO2_TIME_STAMP_SYNC_1 0x268
|
||||
+#define AIFIFO2_TIME_STAMP_0 0x26C
|
||||
+#define AIFIFO2_TIME_STAMP_1 0x270
|
||||
+#define AIFIFO2_TIME_STAMP_2 0x274
|
||||
+#define AIFIFO2_TIME_STAMP_3 0x278
|
||||
+#define AIFIFO2_TIME_STAMP_LENGTH 0x27C
|
||||
+#define IEC958_TIME_STAMP_CNTL 0x280
|
||||
+#define IEC958_TIME_STAMP_SYNC_0 0x284
|
||||
+#define IEC958_TIME_STAMP_SYNC_1 0x288
|
||||
+#define IEC958_TIME_STAMP_0 0x28C
|
||||
+#define IEC958_TIME_STAMP_1 0x290
|
||||
+#define IEC958_TIME_STAMP_2 0x294
|
||||
+#define IEC958_TIME_STAMP_3 0x298
|
||||
+#define IEC958_TIME_STAMP_LENGTH 0x29C
|
||||
+#define AIU_MEM_AIFIFO2_MEM_CTL 0x2A0
|
||||
+#define AIU_I2S_CBUS_DDR_CNTL 0x2A4
|
||||
+#define AIU_I2S_CBUS_DDR_WDATA 0x2A8
|
||||
+#define AIU_I2S_CBUS_DDR_ADDR 0x2AC
|
||||
+
|
||||
+#endif /* _AIU_REGS_H_ */
|
||||
diff --git a/sound/soc/meson-gx/audin-regs.h b/sound/soc/meson-gx/audin-regs.h
|
||||
new file mode 100644
|
||||
index 000000000000..f224610e80e7
|
||||
--- /dev/null
|
||||
+++ b/sound/soc/meson-gx/audin-regs.h
|
||||
@@ -0,0 +1,148 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2017 BayLibre, SAS
|
||||
+ * Author: Jerome Brunet <jbrunet@baylibre.com>
|
||||
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License as
|
||||
+ * published by the Free Software Foundation; either version 2 of the
|
||||
+ * License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This 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.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
+ */
|
||||
+
|
||||
+#ifndef _AUDIN_REGS_H_
|
||||
+#define _AUDIN_REGS_H_
|
||||
+
|
||||
+/*
|
||||
+ * Note :
|
||||
+ * Datasheet issue page 196
|
||||
+ * AUDIN_MUTE_VAL 0x35 => impossible: Already assigned to AUDIN_FIFO1_PTR
|
||||
+ * AUDIN_FIFO1_PTR is more likely to be correct here since surrounding registers
|
||||
+ * also deal with AUDIN_FIFO1
|
||||
+ *
|
||||
+ * Clarification needed from Amlogic
|
||||
+ */
|
||||
+
|
||||
+#define AUDIN_SPDIF_MODE 0x000
|
||||
+#define AUDIN_SPDIF_FS_CLK_RLTN 0x004
|
||||
+#define AUDIN_SPDIF_CHNL_STS_A 0x008
|
||||
+#define AUDIN_SPDIF_CHNL_STS_B 0x00C
|
||||
+#define AUDIN_SPDIF_MISC 0x010
|
||||
+#define AUDIN_SPDIF_NPCM_PCPD 0x014
|
||||
+#define AUDIN_SPDIF_END 0x03C /* Unknown */
|
||||
+#define AUDIN_I2SIN_CTRL 0x040
|
||||
+#define AUDIN_SOURCE_SEL 0x044
|
||||
+#define AUDIN_DECODE_FORMAT 0x048
|
||||
+#define AUDIN_DECODE_CONTROL_STATUS 0x04C
|
||||
+#define AUDIN_DECODE_CHANNEL_STATUS_A_0 0x050
|
||||
+#define AUDIN_DECODE_CHANNEL_STATUS_A_1 0x054
|
||||
+#define AUDIN_DECODE_CHANNEL_STATUS_A_2 0x058
|
||||
+#define AUDIN_DECODE_CHANNEL_STATUS_A_3 0x05C
|
||||
+#define AUDIN_DECODE_CHANNEL_STATUS_A_4 0x060
|
||||
+#define AUDIN_DECODE_CHANNEL_STATUS_A_5 0x064
|
||||
+#define AUDIN_FIFO0_START 0x080
|
||||
+#define AUDIN_FIFO0_END 0x084
|
||||
+#define AUDIN_FIFO0_PTR 0x088
|
||||
+#define AUDIN_FIFO0_INTR 0x08C
|
||||
+#define AUDIN_FIFO0_RDPTR 0x090
|
||||
+#define AUDIN_FIFO0_CTRL 0x094
|
||||
+#define AUDIN_FIFO0_CTRL1 0x098
|
||||
+#define AUDIN_FIFO0_LVL0 0x09C
|
||||
+#define AUDIN_FIFO0_LVL1 0x0A0
|
||||
+#define AUDIN_FIFO0_LVL2 0x0A4
|
||||
+#define AUDIN_FIFO0_REQID 0x0C0
|
||||
+#define AUDIN_FIFO0_WRAP 0x0C4
|
||||
+#define AUDIN_FIFO1_START 0x0CC
|
||||
+#define AUDIN_FIFO1_END 0x0D0
|
||||
+#define AUDIN_FIFO1_PTR 0x0D4
|
||||
+#define AUDIN_FIFO1_INTR 0x0D8
|
||||
+#define AUDIN_FIFO1_RDPTR 0x0DC
|
||||
+#define AUDIN_FIFO1_CTRL 0x0E0
|
||||
+#define AUDIN_FIFO1_CTRL1 0x0E4
|
||||
+#define AUDIN_FIFO1_LVL0 0x100
|
||||
+#define AUDIN_FIFO1_LVL1 0x104
|
||||
+#define AUDIN_FIFO1_LVL2 0x108
|
||||
+#define AUDIN_FIFO1_REQID 0x10C
|
||||
+#define AUDIN_FIFO1_WRAP 0x110
|
||||
+#define AUDIN_FIFO2_START 0x114
|
||||
+#define AUDIN_FIFO2_END 0x118
|
||||
+#define AUDIN_FIFO2_PTR 0x11C
|
||||
+#define AUDIN_FIFO2_INTR 0x120
|
||||
+#define AUDIN_FIFO2_RDPTR 0x124
|
||||
+#define AUDIN_FIFO2_CTRL 0x128
|
||||
+#define AUDIN_FIFO2_CTRL1 0x12C
|
||||
+#define AUDIN_FIFO2_LVL0 0x130
|
||||
+#define AUDIN_FIFO2_LVL1 0x134
|
||||
+#define AUDIN_FIFO2_LVL2 0x138
|
||||
+#define AUDIN_FIFO2_REQID 0x13C
|
||||
+#define AUDIN_FIFO2_WRAP 0x140
|
||||
+#define AUDIN_INT_CTRL 0x144
|
||||
+#define AUDIN_FIFO_INT 0x148
|
||||
+#define PCMIN_CTRL0 0x180
|
||||
+#define PCMIN_CTRL1 0x184
|
||||
+#define PCMIN1_CTRL0 0x188
|
||||
+#define PCMIN1_CTRL1 0x18C
|
||||
+#define PCMOUT_CTRL0 0x1C0
|
||||
+#define PCMOUT_CTRL1 0x1C4
|
||||
+#define PCMOUT_CTRL2 0x1C8
|
||||
+#define PCMOUT_CTRL3 0x1CC
|
||||
+#define PCMOUT1_CTRL0 0x1D0
|
||||
+#define PCMOUT1_CTRL1 0x1D4
|
||||
+#define PCMOUT1_CTRL2 0x1D8
|
||||
+#define PCMOUT1_CTRL3 0x1DC
|
||||
+#define AUDOUT_CTRL 0x200
|
||||
+#define AUDOUT_CTRL1 0x204
|
||||
+#define AUDOUT_BUF0_STA 0x208
|
||||
+#define AUDOUT_BUF0_EDA 0x20C
|
||||
+#define AUDOUT_BUF0_WPTR 0x210
|
||||
+#define AUDOUT_BUF1_STA 0x214
|
||||
+#define AUDOUT_BUF1_EDA 0x218
|
||||
+#define AUDOUT_BUF1_WPTR 0x21C
|
||||
+#define AUDOUT_FIFO_RPTR 0x220
|
||||
+#define AUDOUT_INTR_PTR 0x224
|
||||
+#define AUDOUT_FIFO_STS 0x228
|
||||
+#define AUDOUT1_CTRL 0x240
|
||||
+#define AUDOUT1_CTRL1 0x244
|
||||
+#define AUDOUT1_BUF0_STA 0x248
|
||||
+#define AUDOUT1_BUF0_EDA 0x24C
|
||||
+#define AUDOUT1_BUF0_WPTR 0x250
|
||||
+#define AUDOUT1_BUF1_STA 0x254
|
||||
+#define AUDOUT1_BUF1_EDA 0x258
|
||||
+#define AUDOUT1_BUF1_WPTR 0x25C
|
||||
+#define AUDOUT1_FIFO_RPTR 0x260
|
||||
+#define AUDOUT1_INTR_PTR 0x264
|
||||
+#define AUDOUT1_FIFO_STS 0x268
|
||||
+#define AUDIN_HDMI_MEAS_CTRL 0x280
|
||||
+#define AUDIN_HDMI_MEAS_CYCLES_M1 0x284
|
||||
+#define AUDIN_HDMI_MEAS_INTR_MASKN 0x288
|
||||
+#define AUDIN_HDMI_MEAS_INTR_STAT 0x28C
|
||||
+#define AUDIN_HDMI_REF_CYCLES_STAT_0 0x290
|
||||
+#define AUDIN_HDMI_REF_CYCLES_STAT_1 0x294
|
||||
+#define AUDIN_HDMIRX_AFIFO_STAT 0x298
|
||||
+#define AUDIN_FIFO0_PIO_STS 0x2C0
|
||||
+#define AUDIN_FIFO0_PIO_RDL 0x2C4
|
||||
+#define AUDIN_FIFO0_PIO_RDH 0x2C8
|
||||
+#define AUDIN_FIFO1_PIO_STS 0x2CC
|
||||
+#define AUDIN_FIFO1_PIO_RDL 0x2D0
|
||||
+#define AUDIN_FIFO1_PIO_RDH 0x2D4
|
||||
+#define AUDIN_FIFO2_PIO_STS 0x2D8
|
||||
+#define AUDIN_FIFO2_PIO_RDL 0x2DC
|
||||
+#define AUDIN_FIFO2_PIO_RDH 0x2E0
|
||||
+#define AUDOUT_FIFO_PIO_STS 0x2E4
|
||||
+#define AUDOUT_FIFO_PIO_WRL 0x2E8
|
||||
+#define AUDOUT_FIFO_PIO_WRH 0x2EC
|
||||
+#define AUDOUT1_FIFO_PIO_STS 0x2F0 /* Unknown */
|
||||
+#define AUDOUT1_FIFO_PIO_WRL 0x2F4 /* Unknown */
|
||||
+#define AUDOUT1_FIFO_PIO_WRH 0x2F8 /* Unknown */
|
||||
+#define AUD_RESAMPLE_CTRL0 0x2FC
|
||||
+#define AUD_RESAMPLE_CTRL1 0x300
|
||||
+#define AUD_RESAMPLE_STATUS 0x304
|
||||
+
|
||||
+#endif /* _AUDIN_REGS_H_ */
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,800 @@
|
|||
From 15f2fa491d81ab9f89a081f57337c2a1489ef48f Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Thu, 30 Mar 2017 12:17:27 +0200
|
||||
Subject: [PATCH 03/16] ASoC: meson: add initial aiu i2s support
|
||||
|
||||
Add support for the aiu i2s found on Amlogic Meson SoC family.
|
||||
With this initial implementation, only playback is supported.
|
||||
Capture will be part of furture work.
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
sound/soc/meson-gx/Kconfig | 8 +
|
||||
sound/soc/meson-gx/Makefile | 3 +
|
||||
sound/soc/meson-gx/aiu-i2s.c | 747 +++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 758 insertions(+)
|
||||
create mode 100644 sound/soc/meson-gx/aiu-i2s.c
|
||||
|
||||
diff --git a/sound/soc/meson-gx/Kconfig b/sound/soc/meson-gx/Kconfig
|
||||
index 280e49e7c16f..8ec683cdf327 100644
|
||||
--- a/sound/soc/meson-gx/Kconfig
|
||||
+++ b/sound/soc/meson-gx/Kconfig
|
||||
@@ -9,3 +9,11 @@ menuconfig SND_SOC_MESON_GX
|
||||
select the audio interfaces to support below. This WIP drivers
|
||||
are kept separated from the actual upstream amlogic ASoC driver
|
||||
to minimize conflicts until support is submitted and merged
|
||||
+
|
||||
+config SND_SOC_MESON_GX_I2S
|
||||
+ tristate "Meson i2s interface"
|
||||
+ depends on SND_SOC_MESON_GX
|
||||
+ help
|
||||
+ Say Y or M if you want to add support for i2s driver for Amlogic
|
||||
+ Meson SoCs.
|
||||
+
|
||||
diff --git a/sound/soc/meson-gx/Makefile b/sound/soc/meson-gx/Makefile
|
||||
index 6f124c31a85c..02f9c4df6348 100644
|
||||
--- a/sound/soc/meson-gx/Makefile
|
||||
+++ b/sound/soc/meson-gx/Makefile
|
||||
@@ -1,3 +1,6 @@
|
||||
snd-soc-meson-audio-core-objs := audio-core.o
|
||||
+snd-soc-meson-aiu-i2s-objs := aiu-i2s.o
|
||||
|
||||
obj-$(CONFIG_SND_SOC_MESON_GX) += snd-soc-meson-audio-core.o
|
||||
+obj-$(CONFIG_SND_SOC_MESON_GX_I2S) += snd-soc-meson-aiu-i2s.o
|
||||
+
|
||||
diff --git a/sound/soc/meson-gx/aiu-i2s.c b/sound/soc/meson-gx/aiu-i2s.c
|
||||
new file mode 100644
|
||||
index 000000000000..d57f351b502f
|
||||
--- /dev/null
|
||||
+++ b/sound/soc/meson-gx/aiu-i2s.c
|
||||
@@ -0,0 +1,747 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2017 BayLibre, SAS
|
||||
+ * Author: Jerome Brunet <jbrunet@baylibre.com>
|
||||
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License as
|
||||
+ * published by the Free Software Foundation; either version 2 of the
|
||||
+ * License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This 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.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/clk.h>
|
||||
+#include <linux/mfd/syscon.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/of.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/regmap.h>
|
||||
+
|
||||
+#include <sound/pcm_params.h>
|
||||
+#include <sound/soc.h>
|
||||
+#include <sound/soc-dai.h>
|
||||
+
|
||||
+#include "aiu-regs.h"
|
||||
+#include "audio-core.h"
|
||||
+
|
||||
+#define DRV_NAME "meson-aiu-i2s"
|
||||
+
|
||||
+struct meson_aiu_i2s {
|
||||
+ struct meson_audio_core_data *core;
|
||||
+ struct clk *mclk;
|
||||
+ struct clk *bclks;
|
||||
+ struct clk *iface;
|
||||
+ struct clk *fast;
|
||||
+ bool bclks_idle;
|
||||
+ int irq;
|
||||
+};
|
||||
+
|
||||
+#define AIU_MEM_I2S_BUF_CNTL_INIT BIT(0)
|
||||
+#define AIU_MEM_I2S_CONTROL_INIT BIT(0)
|
||||
+#define AIU_MEM_I2S_CONTROL_FILL_EN BIT(1)
|
||||
+#define AIU_MEM_I2S_CONTROL_EMPTY_EN BIT(2)
|
||||
+#define AIU_MEM_I2S_CONTROL_MODE_16BIT BIT(6)
|
||||
+#define AIU_MEM_I2S_CONTROL_BUSY BIT(7)
|
||||
+#define AIU_MEM_I2S_CONTROL_DATA_READY BIT(8)
|
||||
+#define AIU_MEM_I2S_CONTROL_LEVEL_CNTL BIT(9)
|
||||
+#define AIU_MEM_I2S_MASKS_IRQ_BLOCK_MASK GENMASK(31, 16)
|
||||
+#define AIU_MEM_I2S_MASKS_IRQ_BLOCK(n) ((n) << 16)
|
||||
+#define AIU_MEM_I2S_MASKS_CH_MEM_MASK GENMASK(15, 8)
|
||||
+#define AIU_MEM_I2S_MASKS_CH_MEM(ch) ((ch) << 8)
|
||||
+#define AIU_MEM_I2S_MASKS_CH_RD_MASK GENMASK(7, 0)
|
||||
+#define AIU_MEM_I2S_MASKS_CH_RD(ch) ((ch) << 0)
|
||||
+#define AIU_RST_SOFT_I2S_FAST_DOMAIN BIT(0)
|
||||
+#define AIU_RST_SOFT_I2S_SLOW_DOMAIN BIT(1)
|
||||
+
|
||||
+/*
|
||||
+ * The DMA works by i2s "blocks" (or DMA burst). The burst size and the memory
|
||||
+ * layout expected depends on the mode of operation.
|
||||
+ *
|
||||
+ * - Normal mode: The channels are expected to be packed in 32 bytes groups
|
||||
+ * interleaved the buffer. AIU_MEM_I2S_MASKS_CH_MEM is a bitfield representing
|
||||
+ * the channels present in memory. AIU_MEM_I2S_MASKS_CH_MEM represents the
|
||||
+ * channels read by the DMA. This is very flexible but the unsual memory layout
|
||||
+ * makes it less easy to deal with. The burst size is 32 bytes times the number
|
||||
+ * of channels read.
|
||||
+ *
|
||||
+ * - Split mode:
|
||||
+ * Classical channel interleaved frame organisation. In this mode,
|
||||
+ * AIU_MEM_I2S_MASKS_CH_MEM and AIU_MEM_I2S_MASKS_CH_MEM must be set to 0xff and
|
||||
+ * the burst size is fixed to 256 bytes. The input can be either 2 or 8
|
||||
+ * channels.
|
||||
+ *
|
||||
+ * The following driver implements the split mode.
|
||||
+ */
|
||||
+
|
||||
+#define AIU_I2S_DMA_BURST 256
|
||||
+
|
||||
+static struct snd_pcm_hardware meson_aiu_i2s_dma_hw = {
|
||||
+ .info = (SNDRV_PCM_INFO_INTERLEAVED |
|
||||
+ SNDRV_PCM_INFO_MMAP |
|
||||
+ SNDRV_PCM_INFO_MMAP_VALID |
|
||||
+ SNDRV_PCM_INFO_PAUSE),
|
||||
+
|
||||
+ .formats = (SNDRV_PCM_FMTBIT_S16_LE |
|
||||
+ SNDRV_PCM_FMTBIT_S24_LE |
|
||||
+ SNDRV_PCM_FMTBIT_S32_LE),
|
||||
+
|
||||
+ /*
|
||||
+ * TODO: The DMA can change the endianness, the msb position
|
||||
+ * and deal with unsigned - support this later on
|
||||
+ */
|
||||
+
|
||||
+ .rate_min = 8000,
|
||||
+ .rate_max = 192000,
|
||||
+ .channels_min = 2,
|
||||
+ .channels_max = 8,
|
||||
+ .period_bytes_min = AIU_I2S_DMA_BURST,
|
||||
+ .period_bytes_max = AIU_I2S_DMA_BURST * 65535,
|
||||
+ .periods_min = 2,
|
||||
+ .periods_max = UINT_MAX,
|
||||
+ .buffer_bytes_max = 1 * 1024 * 1024,
|
||||
+ .fifo_size = 0,
|
||||
+};
|
||||
+
|
||||
+static struct meson_aiu_i2s *meson_aiu_i2s_dma_priv(struct snd_pcm_substream *s)
|
||||
+{
|
||||
+ struct snd_soc_pcm_runtime *rtd = s->private_data;
|
||||
+ struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
|
||||
+
|
||||
+ return snd_soc_component_get_drvdata(component);
|
||||
+}
|
||||
+
|
||||
+static snd_pcm_uframes_t
|
||||
+meson_aiu_i2s_dma_pointer(struct snd_pcm_substream *substream)
|
||||
+{
|
||||
+ struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
+ struct meson_aiu_i2s *priv = meson_aiu_i2s_dma_priv(substream);
|
||||
+ unsigned int addr;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = regmap_read(priv->core->aiu, AIU_MEM_I2S_RD_PTR,
|
||||
+ &addr);
|
||||
+ if (ret)
|
||||
+ return 0;
|
||||
+
|
||||
+ return bytes_to_frames(runtime, addr - (unsigned int)runtime->dma_addr);
|
||||
+}
|
||||
+
|
||||
+static void __dma_enable(struct meson_aiu_i2s *priv, bool enable)
|
||||
+{
|
||||
+ unsigned int en_mask = (AIU_MEM_I2S_CONTROL_FILL_EN |
|
||||
+ AIU_MEM_I2S_CONTROL_EMPTY_EN);
|
||||
+
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_MEM_I2S_CONTROL, en_mask,
|
||||
+ enable ? en_mask : 0);
|
||||
+
|
||||
+}
|
||||
+
|
||||
+static int meson_aiu_i2s_dma_trigger(struct snd_pcm_substream *substream, int cmd)
|
||||
+{
|
||||
+ struct meson_aiu_i2s *priv = meson_aiu_i2s_dma_priv(substream);
|
||||
+
|
||||
+ switch (cmd) {
|
||||
+ case SNDRV_PCM_TRIGGER_START:
|
||||
+ case SNDRV_PCM_TRIGGER_RESUME:
|
||||
+ case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
|
||||
+ __dma_enable(priv, true);
|
||||
+ break;
|
||||
+ case SNDRV_PCM_TRIGGER_SUSPEND:
|
||||
+ case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
|
||||
+ case SNDRV_PCM_TRIGGER_STOP:
|
||||
+ __dma_enable(priv, false);
|
||||
+ break;
|
||||
+ default:
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void __dma_init_mem(struct meson_aiu_i2s *priv)
|
||||
+{
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_MEM_I2S_CONTROL,
|
||||
+ AIU_MEM_I2S_CONTROL_INIT,
|
||||
+ AIU_MEM_I2S_CONTROL_INIT);
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_MEM_I2S_BUF_CNTL,
|
||||
+ AIU_MEM_I2S_BUF_CNTL_INIT,
|
||||
+ AIU_MEM_I2S_BUF_CNTL_INIT);
|
||||
+
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_MEM_I2S_CONTROL,
|
||||
+ AIU_MEM_I2S_CONTROL_INIT,
|
||||
+ 0);
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_MEM_I2S_BUF_CNTL,
|
||||
+ AIU_MEM_I2S_BUF_CNTL_INIT,
|
||||
+ 0);
|
||||
+}
|
||||
+
|
||||
+static int meson_aiu_i2s_dma_prepare(struct snd_pcm_substream *substream)
|
||||
+{
|
||||
+ struct meson_aiu_i2s *priv = meson_aiu_i2s_dma_priv(substream);
|
||||
+
|
||||
+ __dma_init_mem(priv);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int meson_aiu_i2s_dma_hw_params(struct snd_pcm_substream *substream,
|
||||
+ struct snd_pcm_hw_params *params)
|
||||
+{
|
||||
+ struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
+ struct meson_aiu_i2s *priv = meson_aiu_i2s_dma_priv(substream);
|
||||
+ int ret;
|
||||
+ u32 burst_num, mem_ctl;
|
||||
+ dma_addr_t end_ptr;
|
||||
+
|
||||
+ ret = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params));
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ /* Setup memory layout */
|
||||
+ if (params_physical_width(params) == 16)
|
||||
+ mem_ctl = AIU_MEM_I2S_CONTROL_MODE_16BIT;
|
||||
+ else
|
||||
+ mem_ctl = 0;
|
||||
+
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_MEM_I2S_CONTROL,
|
||||
+ AIU_MEM_I2S_CONTROL_MODE_16BIT,
|
||||
+ mem_ctl);
|
||||
+
|
||||
+ /* Initialize memory pointers */
|
||||
+ regmap_write(priv->core->aiu, AIU_MEM_I2S_START_PTR, runtime->dma_addr);
|
||||
+ regmap_write(priv->core->aiu, AIU_MEM_I2S_RD_PTR, runtime->dma_addr);
|
||||
+
|
||||
+ /* The end pointer is the address of the last valid block */
|
||||
+ end_ptr = runtime->dma_addr + runtime->dma_bytes - AIU_I2S_DMA_BURST;
|
||||
+ regmap_write(priv->core->aiu, AIU_MEM_I2S_END_PTR, end_ptr);
|
||||
+
|
||||
+ /* Memory masks */
|
||||
+ burst_num = params_period_bytes(params) / AIU_I2S_DMA_BURST;
|
||||
+ regmap_write(priv->core->aiu, AIU_MEM_I2S_MASKS,
|
||||
+ AIU_MEM_I2S_MASKS_CH_RD(0xff) |
|
||||
+ AIU_MEM_I2S_MASKS_CH_MEM(0xff) |
|
||||
+ AIU_MEM_I2S_MASKS_IRQ_BLOCK(burst_num));
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int meson_aiu_i2s_dma_hw_free(struct snd_pcm_substream *substream)
|
||||
+{
|
||||
+ return snd_pcm_lib_free_pages(substream);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static irqreturn_t meson_aiu_i2s_dma_irq_block(int irq, void *dev_id)
|
||||
+{
|
||||
+ struct snd_pcm_substream *playback = dev_id;
|
||||
+
|
||||
+ snd_pcm_period_elapsed(playback);
|
||||
+
|
||||
+ return IRQ_HANDLED;
|
||||
+}
|
||||
+
|
||||
+static int meson_aiu_i2s_dma_open(struct snd_pcm_substream *substream)
|
||||
+{
|
||||
+ struct meson_aiu_i2s *priv = meson_aiu_i2s_dma_priv(substream);
|
||||
+ int ret;
|
||||
+
|
||||
+ snd_soc_set_runtime_hwparams(substream, &meson_aiu_i2s_dma_hw);
|
||||
+
|
||||
+ /*
|
||||
+ * Make sure the buffer and period size are multiple of the DMA burst
|
||||
+ * size
|
||||
+ */
|
||||
+ ret = snd_pcm_hw_constraint_step(substream->runtime, 0,
|
||||
+ SNDRV_PCM_HW_PARAM_BUFFER_BYTES,
|
||||
+ AIU_I2S_DMA_BURST);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = snd_pcm_hw_constraint_step(substream->runtime, 0,
|
||||
+ SNDRV_PCM_HW_PARAM_PERIOD_BYTES,
|
||||
+ AIU_I2S_DMA_BURST);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ /* Request the I2S DDR irq */
|
||||
+ ret = request_irq(priv->irq, meson_aiu_i2s_dma_irq_block, 0,
|
||||
+ DRV_NAME, substream);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ /* Power up the i2s fast domain - can't write the registers w/o it */
|
||||
+ ret = clk_prepare_enable(priv->fast);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ /* Make sure the dma is initially disabled */
|
||||
+ __dma_enable(priv, false);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int meson_aiu_i2s_dma_close(struct snd_pcm_substream *substream)
|
||||
+{
|
||||
+ struct meson_aiu_i2s *priv = meson_aiu_i2s_dma_priv(substream);
|
||||
+
|
||||
+ clk_disable_unprepare(priv->fast);
|
||||
+ free_irq(priv->irq, substream);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct snd_pcm_ops meson_aiu_i2s_dma_ops = {
|
||||
+ .open = meson_aiu_i2s_dma_open,
|
||||
+ .close = meson_aiu_i2s_dma_close,
|
||||
+ .ioctl = snd_pcm_lib_ioctl,
|
||||
+ .hw_params = meson_aiu_i2s_dma_hw_params,
|
||||
+ .hw_free = meson_aiu_i2s_dma_hw_free,
|
||||
+ .prepare = meson_aiu_i2s_dma_prepare,
|
||||
+ .pointer = meson_aiu_i2s_dma_pointer,
|
||||
+ .trigger = meson_aiu_i2s_dma_trigger,
|
||||
+};
|
||||
+
|
||||
+static int meson_aiu_i2s_dma_new(struct snd_soc_pcm_runtime *rtd)
|
||||
+{
|
||||
+ struct snd_card *card = rtd->card->snd_card;
|
||||
+ size_t size = meson_aiu_i2s_dma_hw.buffer_bytes_max;
|
||||
+
|
||||
+ return snd_pcm_lib_preallocate_pages_for_all(rtd->pcm,
|
||||
+ SNDRV_DMA_TYPE_DEV,
|
||||
+ card->dev, size, size);
|
||||
+}
|
||||
+
|
||||
+#define AIU_CLK_CTRL_I2S_DIV_EN BIT(0)
|
||||
+#define AIU_CLK_CTRL_I2S_DIV_MASK GENMASK(3, 2)
|
||||
+#define AIU_CLK_CTRL_AOCLK_POLARITY_MASK BIT(6)
|
||||
+#define AIU_CLK_CTRL_AOCLK_POLARITY_NORMAL (0 << 6)
|
||||
+#define AIU_CLK_CTRL_AOCLK_POLARITY_INVERTED (1 << 6)
|
||||
+#define AIU_CLK_CTRL_ALRCLK_POLARITY_MASK BIT(7)
|
||||
+#define AIU_CLK_CTRL_ALRCLK_POLARITY_NORMAL (0 << 7)
|
||||
+#define AIU_CLK_CTRL_ALRCLK_POLARITY_INVERTED (1 << 7)
|
||||
+#define AIU_CLK_CTRL_ALRCLK_SKEW_MASK GENMASK(9, 8)
|
||||
+#define AIU_CLK_CTRL_ALRCLK_LEFT_J (0 << 8)
|
||||
+#define AIU_CLK_CTRL_ALRCLK_I2S (1 << 8)
|
||||
+#define AIU_CLK_CTRL_ALRCLK_RIGHT_J (2 << 8)
|
||||
+#define AIU_CLK_CTRL_MORE_I2S_DIV_MASK GENMASK(5, 0)
|
||||
+#define AIU_CLK_CTRL_MORE_I2S_DIV(div) (((div) - 1) << 0)
|
||||
+#define AIU_CODEC_DAC_LRCLK_CTRL_DIV_MASK GENMASK(11, 0)
|
||||
+#define AIU_CODEC_DAC_LRCLK_CTRL_DIV(div) (((div) - 1) << 0)
|
||||
+#define AIU_I2S_DAC_CFG_PAYLOAD_SIZE_MASK GENMASK(1, 0)
|
||||
+#define AIU_I2S_DAC_CFG_AOCLK_32 (0 << 0)
|
||||
+#define AIU_I2S_DAC_CFG_AOCLK_48 (2 << 0)
|
||||
+#define AIU_I2S_DAC_CFG_AOCLK_64 (3 << 0)
|
||||
+#define AIU_I2S_MISC_HOLD_EN BIT(2)
|
||||
+#define AIU_I2S_SOURCE_DESC_MODE_8CH BIT(0)
|
||||
+#define AIU_I2S_SOURCE_DESC_MODE_24BIT BIT(5)
|
||||
+#define AIU_I2S_SOURCE_DESC_MODE_32BIT BIT(9)
|
||||
+#define AIU_I2S_SOURCE_DESC_MODE_SPLIT BIT(11)
|
||||
+
|
||||
+static void __hold(struct meson_aiu_i2s *priv, bool enable)
|
||||
+{
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_I2S_MISC,
|
||||
+ AIU_I2S_MISC_HOLD_EN,
|
||||
+ enable ? AIU_I2S_MISC_HOLD_EN : 0);
|
||||
+}
|
||||
+
|
||||
+static void __divider_enable(struct meson_aiu_i2s *priv, bool enable)
|
||||
+{
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_CLK_CTRL,
|
||||
+ AIU_CLK_CTRL_I2S_DIV_EN,
|
||||
+ enable ? AIU_CLK_CTRL_I2S_DIV_EN : 0);
|
||||
+}
|
||||
+
|
||||
+static void __playback_start(struct meson_aiu_i2s *priv)
|
||||
+{
|
||||
+ __divider_enable(priv, true);
|
||||
+ __hold(priv, false);
|
||||
+}
|
||||
+
|
||||
+static void __playback_stop(struct meson_aiu_i2s *priv, bool clk_force)
|
||||
+{
|
||||
+ __hold(priv, true);
|
||||
+ /* Disable the bit clks if necessary */
|
||||
+ if (clk_force || !priv->bclks_idle)
|
||||
+ __divider_enable(priv, false);
|
||||
+}
|
||||
+
|
||||
+static int meson_aiu_i2s_dai_trigger(struct snd_pcm_substream *substream, int cmd,
|
||||
+ struct snd_soc_dai *dai)
|
||||
+{
|
||||
+ struct meson_aiu_i2s *priv = snd_soc_dai_get_drvdata(dai);
|
||||
+ bool clk_force_stop = false;
|
||||
+
|
||||
+ switch (cmd) {
|
||||
+ case SNDRV_PCM_TRIGGER_START:
|
||||
+ case SNDRV_PCM_TRIGGER_RESUME:
|
||||
+ case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
|
||||
+ __playback_start(priv);
|
||||
+ return 0;
|
||||
+
|
||||
+ case SNDRV_PCM_TRIGGER_STOP:
|
||||
+ case SNDRV_PCM_TRIGGER_SUSPEND:
|
||||
+ clk_force_stop = true;
|
||||
+ case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
|
||||
+ __playback_stop(priv, clk_force_stop);
|
||||
+ return 0;
|
||||
+
|
||||
+ default:
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int __bclks_set_rate(struct meson_aiu_i2s *priv, unsigned int srate,
|
||||
+ unsigned int width)
|
||||
+{
|
||||
+ unsigned int fs;
|
||||
+
|
||||
+ /* Get the oversampling factor */
|
||||
+ fs = DIV_ROUND_CLOSEST(clk_get_rate(priv->mclk), srate);
|
||||
+
|
||||
+ /*
|
||||
+ * This DAI is usually connected to the dw-hdmi which does not support
|
||||
+ * bclk being 32 * lrclk or 48 * lrclk
|
||||
+ * Restrict to blck = 64 * lrclk
|
||||
+ */
|
||||
+ if (fs % 64)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ /* Set the divider between lrclk and bclk */
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_I2S_DAC_CFG,
|
||||
+ AIU_I2S_DAC_CFG_PAYLOAD_SIZE_MASK,
|
||||
+ AIU_I2S_DAC_CFG_AOCLK_64);
|
||||
+
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_CODEC_DAC_LRCLK_CTRL,
|
||||
+ AIU_CODEC_DAC_LRCLK_CTRL_DIV_MASK,
|
||||
+ AIU_CODEC_DAC_LRCLK_CTRL_DIV(64));
|
||||
+
|
||||
+ /* Use CLK_MORE for the i2s divider */
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_CLK_CTRL,
|
||||
+ AIU_CLK_CTRL_I2S_DIV_MASK,
|
||||
+ 0);
|
||||
+
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_CLK_CTRL_MORE,
|
||||
+ AIU_CLK_CTRL_MORE_I2S_DIV_MASK,
|
||||
+ AIU_CLK_CTRL_MORE_I2S_DIV(fs / 64));
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int __setup_desc(struct meson_aiu_i2s *priv, unsigned int width,
|
||||
+ unsigned int channels)
|
||||
+{
|
||||
+ u32 desc = 0;
|
||||
+
|
||||
+ switch (width) {
|
||||
+ case 24:
|
||||
+ /*
|
||||
+ * For some reason, 24 bits wide audio don't play well
|
||||
+ * if the 32 bits mode is not set
|
||||
+ */
|
||||
+ desc |= (AIU_I2S_SOURCE_DESC_MODE_24BIT |
|
||||
+ AIU_I2S_SOURCE_DESC_MODE_32BIT);
|
||||
+ break;
|
||||
+ case 16:
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ switch (channels) {
|
||||
+ case 2: /* Nothing to do */
|
||||
+ break;
|
||||
+ case 8:
|
||||
+ /* TODO: Still requires testing ... */
|
||||
+ desc |= AIU_I2S_SOURCE_DESC_MODE_8CH;
|
||||
+ break;
|
||||
+ default:
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_I2S_SOURCE_DESC,
|
||||
+ AIU_I2S_SOURCE_DESC_MODE_8CH |
|
||||
+ AIU_I2S_SOURCE_DESC_MODE_24BIT |
|
||||
+ AIU_I2S_SOURCE_DESC_MODE_32BIT,
|
||||
+ desc);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int meson_aiu_i2s_dai_hw_params(struct snd_pcm_substream *substream,
|
||||
+ struct snd_pcm_hw_params *params,
|
||||
+ struct snd_soc_dai *dai)
|
||||
+{
|
||||
+ struct meson_aiu_i2s *priv = snd_soc_dai_get_drvdata(dai);
|
||||
+ unsigned int width = params_width(params);
|
||||
+ unsigned int channels = params_channels(params);
|
||||
+ unsigned int rate = params_rate(params);
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = __setup_desc(priv, width, channels);
|
||||
+ if (ret) {
|
||||
+ dev_err(dai->dev, "Unable set to set i2s description\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ ret = __bclks_set_rate(priv, rate, width);
|
||||
+ if (ret) {
|
||||
+ dev_err(dai->dev, "Unable set to the i2s clock rates\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int meson_aiu_i2s_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
+{
|
||||
+ struct meson_aiu_i2s *priv = snd_soc_dai_get_drvdata(dai);
|
||||
+ u32 val;
|
||||
+
|
||||
+ if ((fmt & SND_SOC_DAIFMT_MASTER_MASK) != SND_SOC_DAIFMT_CBS_CFS)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ /* DAI output mode */
|
||||
+ switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
|
||||
+ case SND_SOC_DAIFMT_I2S:
|
||||
+ val = AIU_CLK_CTRL_ALRCLK_I2S;
|
||||
+ break;
|
||||
+ case SND_SOC_DAIFMT_LEFT_J:
|
||||
+ val = AIU_CLK_CTRL_ALRCLK_LEFT_J;
|
||||
+ break;
|
||||
+ case SND_SOC_DAIFMT_RIGHT_J:
|
||||
+ val = AIU_CLK_CTRL_ALRCLK_RIGHT_J;
|
||||
+ break;
|
||||
+ default:
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_CLK_CTRL,
|
||||
+ AIU_CLK_CTRL_ALRCLK_SKEW_MASK,
|
||||
+ val);
|
||||
+
|
||||
+ /* DAI clock polarity */
|
||||
+ switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
|
||||
+ case SND_SOC_DAIFMT_IB_IF:
|
||||
+ /* Invert both clocks */
|
||||
+ val = AIU_CLK_CTRL_ALRCLK_POLARITY_INVERTED |
|
||||
+ AIU_CLK_CTRL_AOCLK_POLARITY_INVERTED;
|
||||
+ break;
|
||||
+ case SND_SOC_DAIFMT_IB_NF:
|
||||
+ /* Invert bit clock */
|
||||
+ val = AIU_CLK_CTRL_ALRCLK_POLARITY_NORMAL |
|
||||
+ AIU_CLK_CTRL_AOCLK_POLARITY_INVERTED;
|
||||
+ break;
|
||||
+ case SND_SOC_DAIFMT_NB_IF:
|
||||
+ /* Invert frame clock */
|
||||
+ val = AIU_CLK_CTRL_ALRCLK_POLARITY_INVERTED |
|
||||
+ AIU_CLK_CTRL_AOCLK_POLARITY_NORMAL;
|
||||
+ break;
|
||||
+ case SND_SOC_DAIFMT_NB_NF:
|
||||
+ /* Normal clocks */
|
||||
+ val = AIU_CLK_CTRL_ALRCLK_POLARITY_NORMAL |
|
||||
+ AIU_CLK_CTRL_AOCLK_POLARITY_NORMAL;
|
||||
+ break;
|
||||
+ default:
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_CLK_CTRL,
|
||||
+ AIU_CLK_CTRL_ALRCLK_POLARITY_MASK |
|
||||
+ AIU_CLK_CTRL_AOCLK_POLARITY_MASK,
|
||||
+ val);
|
||||
+
|
||||
+ switch (fmt & SND_SOC_DAIFMT_CLOCK_MASK) {
|
||||
+ case SND_SOC_DAIFMT_CONT:
|
||||
+ priv->bclks_idle = true;
|
||||
+ break;
|
||||
+ case SND_SOC_DAIFMT_GATED:
|
||||
+ priv->bclks_idle = false;
|
||||
+ break;
|
||||
+ default:
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int meson_aiu_i2s_dai_set_sysclk(struct snd_soc_dai *dai, int clk_id,
|
||||
+ unsigned int freq, int dir)
|
||||
+{
|
||||
+ struct meson_aiu_i2s *priv = snd_soc_dai_get_drvdata(dai);
|
||||
+ int ret;
|
||||
+
|
||||
+ if (WARN_ON(clk_id != 0))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ if (dir == SND_SOC_CLOCK_IN)
|
||||
+ return 0;
|
||||
+
|
||||
+ ret = clk_set_rate(priv->mclk, freq);
|
||||
+ if (ret) {
|
||||
+ dev_err(dai->dev, "Failed to set sysclk to %uHz", freq);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int meson_aiu_i2s_dai_startup(struct snd_pcm_substream *substream,
|
||||
+ struct snd_soc_dai *dai)
|
||||
+{
|
||||
+ struct meson_aiu_i2s *priv = snd_soc_dai_get_drvdata(dai);
|
||||
+ int ret;
|
||||
+
|
||||
+ /* Power up the i2s fast domain - can't write the registers w/o it */
|
||||
+ ret = clk_prepare_enable(priv->fast);
|
||||
+ if (ret)
|
||||
+ goto out_clk_fast;
|
||||
+
|
||||
+ /* Make sure nothing gets out of the DAI yet */
|
||||
+ __hold(priv, true);
|
||||
+
|
||||
+ /* I2S encoder needs the mixer interface gate */
|
||||
+ ret = clk_prepare_enable(priv->iface);
|
||||
+ if (ret)
|
||||
+ goto out_clk_iface;
|
||||
+
|
||||
+ /* Enable the i2s master clock */
|
||||
+ ret = clk_prepare_enable(priv->mclk);
|
||||
+ if (ret)
|
||||
+ goto out_mclk;
|
||||
+
|
||||
+ /* Enable the bit clock gate */
|
||||
+ ret = clk_prepare_enable(priv->bclks);
|
||||
+ if (ret)
|
||||
+ goto out_bclks;
|
||||
+
|
||||
+ /* Make sure the interface expect a memory layout we can work with */
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_I2S_SOURCE_DESC,
|
||||
+ AIU_I2S_SOURCE_DESC_MODE_SPLIT,
|
||||
+ AIU_I2S_SOURCE_DESC_MODE_SPLIT);
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+out_bclks:
|
||||
+ clk_disable_unprepare(priv->mclk);
|
||||
+out_mclk:
|
||||
+ clk_disable_unprepare(priv->iface);
|
||||
+out_clk_iface:
|
||||
+ clk_disable_unprepare(priv->fast);
|
||||
+out_clk_fast:
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static void meson_aiu_i2s_dai_shutdown(struct snd_pcm_substream *substream,
|
||||
+ struct snd_soc_dai *dai)
|
||||
+{
|
||||
+ struct meson_aiu_i2s *priv = snd_soc_dai_get_drvdata(dai);
|
||||
+
|
||||
+ clk_disable_unprepare(priv->bclks);
|
||||
+ clk_disable_unprepare(priv->mclk);
|
||||
+ clk_disable_unprepare(priv->iface);
|
||||
+ clk_disable_unprepare(priv->fast);
|
||||
+}
|
||||
+
|
||||
+static const struct snd_soc_dai_ops meson_aiu_i2s_dai_ops = {
|
||||
+ .startup = meson_aiu_i2s_dai_startup,
|
||||
+ .shutdown = meson_aiu_i2s_dai_shutdown,
|
||||
+ .trigger = meson_aiu_i2s_dai_trigger,
|
||||
+ .hw_params = meson_aiu_i2s_dai_hw_params,
|
||||
+ .set_fmt = meson_aiu_i2s_dai_set_fmt,
|
||||
+ .set_sysclk = meson_aiu_i2s_dai_set_sysclk,
|
||||
+};
|
||||
+
|
||||
+static struct snd_soc_dai_driver meson_aiu_i2s_dai = {
|
||||
+ .playback = {
|
||||
+ .stream_name = "Playback",
|
||||
+ .channels_min = 2,
|
||||
+ .channels_max = 8,
|
||||
+ .rates = SNDRV_PCM_RATE_8000_192000,
|
||||
+ .formats = (SNDRV_PCM_FMTBIT_S16_LE |
|
||||
+ SNDRV_PCM_FMTBIT_S24_LE)
|
||||
+ },
|
||||
+ .ops = &meson_aiu_i2s_dai_ops,
|
||||
+};
|
||||
+
|
||||
+static const struct snd_soc_component_driver meson_aiu_i2s_component = {
|
||||
+ .ops = &meson_aiu_i2s_dma_ops,
|
||||
+ .pcm_new = meson_aiu_i2s_dma_new,
|
||||
+ .name = DRV_NAME,
|
||||
+};
|
||||
+
|
||||
+static int meson_aiu_i2s_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct device *dev = &pdev->dev;
|
||||
+ struct meson_aiu_i2s *priv;
|
||||
+
|
||||
+ priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
|
||||
+ if (!priv)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ platform_set_drvdata(pdev, priv);
|
||||
+ priv->core = dev_get_drvdata(dev->parent);
|
||||
+
|
||||
+ priv->fast = devm_clk_get(dev, "fast");
|
||||
+ if (IS_ERR(priv->fast)) {
|
||||
+ if (PTR_ERR(priv->fast) != -EPROBE_DEFER)
|
||||
+ dev_err(dev, "Can't get the i2s fast domain clock\n");
|
||||
+ return PTR_ERR(priv->fast);
|
||||
+ }
|
||||
+
|
||||
+ priv->iface = devm_clk_get(dev, "iface");
|
||||
+ if (IS_ERR(priv->iface)) {
|
||||
+ if (PTR_ERR(priv->iface) != -EPROBE_DEFER)
|
||||
+ dev_err(dev, "Can't get i2s dai clock gate\n");
|
||||
+ return PTR_ERR(priv->iface);
|
||||
+ }
|
||||
+
|
||||
+ priv->bclks = devm_clk_get(dev, "bclks");
|
||||
+ if (IS_ERR(priv->bclks)) {
|
||||
+ if (PTR_ERR(priv->bclks) != -EPROBE_DEFER)
|
||||
+ dev_err(dev, "Can't get bit clocks gate\n");
|
||||
+ return PTR_ERR(priv->bclks);
|
||||
+ }
|
||||
+
|
||||
+ priv->mclk = devm_clk_get(dev, "mclk");
|
||||
+ if (IS_ERR(priv->mclk)) {
|
||||
+ if (PTR_ERR(priv->mclk) != -EPROBE_DEFER)
|
||||
+ dev_err(dev, "failed to get the i2s master clock\n");
|
||||
+ return PTR_ERR(priv->mclk);
|
||||
+ }
|
||||
+
|
||||
+ priv->irq = platform_get_irq(pdev, 0);
|
||||
+ if (priv->irq <= 0) {
|
||||
+ dev_err(dev, "Can't get i2s ddr irq\n");
|
||||
+ return priv->irq;
|
||||
+ }
|
||||
+
|
||||
+ return devm_snd_soc_register_component(dev, &meson_aiu_i2s_component,
|
||||
+ &meson_aiu_i2s_dai, 1);
|
||||
+}
|
||||
+
|
||||
+static const struct of_device_id meson_aiu_i2s_of_match[] = {
|
||||
+ { .compatible = "amlogic,meson-aiu-i2s", },
|
||||
+ {}
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, meson_aiu_i2s_of_match);
|
||||
+
|
||||
+static struct platform_driver meson_aiu_i2s_pdrv = {
|
||||
+ .probe = meson_aiu_i2s_probe,
|
||||
+ .driver = {
|
||||
+ .name = DRV_NAME,
|
||||
+ .of_match_table = meson_aiu_i2s_of_match,
|
||||
+ },
|
||||
+};
|
||||
+module_platform_driver(meson_aiu_i2s_pdrv);
|
||||
+
|
||||
+MODULE_DESCRIPTION("Meson AIU i2s ASoC Driver");
|
||||
+MODULE_AUTHOR("Jerome Brunet <jbrunet@baylibre.com>");
|
||||
+MODULE_LICENSE("GPL v2");
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,724 @@
|
|||
From a06f1db7439555cfe4f62a6b2a4806b44b9dda7f Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Thu, 30 Mar 2017 13:46:03 +0200
|
||||
Subject: [PATCH 04/16] ASoC: meson: add initial spdif support
|
||||
|
||||
Add support for the spdif found on Amlogic Meson SoC family.
|
||||
With this initial implementation, only uncompressed pcm playback
|
||||
from the spdif dma is supported. Future work will add compressed
|
||||
support, pcm playback from i2s dma and capture.
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
sound/soc/meson-gx/Kconfig | 7 +
|
||||
sound/soc/meson-gx/Makefile | 3 +-
|
||||
sound/soc/meson-gx/aiu-spdif.c | 669 +++++++++++++++++++++++++++++++++
|
||||
3 files changed, 678 insertions(+), 1 deletion(-)
|
||||
create mode 100644 sound/soc/meson-gx/aiu-spdif.c
|
||||
|
||||
diff --git a/sound/soc/meson-gx/Kconfig b/sound/soc/meson-gx/Kconfig
|
||||
index 8ec683cdf327..141afabfacea 100644
|
||||
--- a/sound/soc/meson-gx/Kconfig
|
||||
+++ b/sound/soc/meson-gx/Kconfig
|
||||
@@ -17,3 +17,10 @@ config SND_SOC_MESON_GX_I2S
|
||||
Say Y or M if you want to add support for i2s driver for Amlogic
|
||||
Meson SoCs.
|
||||
|
||||
+config SND_SOC_MESON_GX_SPDIF
|
||||
+ tristate "Meson spdif interface"
|
||||
+ depends on SND_SOC_MESON_GX
|
||||
+ select SND_PCM_IEC958
|
||||
+ help
|
||||
+ Say Y or M if you want to add support for spdif driver for Amlogic
|
||||
+ Meson SoCs.
|
||||
diff --git a/sound/soc/meson-gx/Makefile b/sound/soc/meson-gx/Makefile
|
||||
index 02f9c4df6348..d37672ebe57b 100644
|
||||
--- a/sound/soc/meson-gx/Makefile
|
||||
+++ b/sound/soc/meson-gx/Makefile
|
||||
@@ -1,6 +1,7 @@
|
||||
snd-soc-meson-audio-core-objs := audio-core.o
|
||||
snd-soc-meson-aiu-i2s-objs := aiu-i2s.o
|
||||
+snd-soc-meson-aiu-spdif-objs := aiu-spdif.o
|
||||
|
||||
obj-$(CONFIG_SND_SOC_MESON_GX) += snd-soc-meson-audio-core.o
|
||||
obj-$(CONFIG_SND_SOC_MESON_GX_I2S) += snd-soc-meson-aiu-i2s.o
|
||||
-
|
||||
+obj-$(CONFIG_SND_SOC_MESON_GX_SPDIF) += snd-soc-meson-aiu-spdif.o
|
||||
diff --git a/sound/soc/meson-gx/aiu-spdif.c b/sound/soc/meson-gx/aiu-spdif.c
|
||||
new file mode 100644
|
||||
index 000000000000..17cfe134e8f7
|
||||
--- /dev/null
|
||||
+++ b/sound/soc/meson-gx/aiu-spdif.c
|
||||
@@ -0,0 +1,669 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2017 BayLibre, SAS
|
||||
+ * Author: Jerome Brunet <jbrunet@baylibre.com>
|
||||
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License as
|
||||
+ * published by the Free Software Foundation; either version 2 of the
|
||||
+ * License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This 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.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/clk.h>
|
||||
+#include <linux/mfd/syscon.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/of.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/regmap.h>
|
||||
+
|
||||
+#include <sound/pcm_params.h>
|
||||
+#include <sound/soc.h>
|
||||
+#include <sound/soc-dai.h>
|
||||
+#include <sound/pcm_iec958.h>
|
||||
+
|
||||
+#include "aiu-regs.h"
|
||||
+#include "audio-core.h"
|
||||
+
|
||||
+#define DRV_NAME "meson-aiu-spdif"
|
||||
+
|
||||
+struct meson_aiu_spdif {
|
||||
+ struct meson_audio_core_data *core;
|
||||
+ struct clk *iface;
|
||||
+ struct clk *fast;
|
||||
+ struct clk *mclk_i958;
|
||||
+ struct clk *mclk;
|
||||
+ int irq;
|
||||
+};
|
||||
+
|
||||
+
|
||||
+#define AIU_958_DCU_FF_CTRL_EN BIT(0)
|
||||
+#define AIU_958_DCU_FF_CTRL_AUTO_DISABLE BIT(1)
|
||||
+#define AIU_958_DCU_FF_CTRL_IRQ_MODE_MASK GENMASK(3, 2)
|
||||
+#define AIU_958_DCU_FF_CTRL_IRQ_OUT_THD BIT(2)
|
||||
+#define AIU_958_DCU_FF_CTRL_IRQ_FRAME_READ BIT(3)
|
||||
+#define AIU_958_DCU_FF_CTRL_SYNC_HEAD_EN BIT(4)
|
||||
+#define AIU_958_DCU_FF_CTRL_BYTE_SEEK BIT(5)
|
||||
+#define AIU_958_DCU_FF_CTRL_CONTINUE BIT(6)
|
||||
+#define AIU_MEM_IEC958_BUF_CNTL_INIT BIT(0)
|
||||
+#define AIU_MEM_IEC958_CONTROL_INIT BIT(0)
|
||||
+#define AIU_MEM_IEC958_CONTROL_FILL_EN BIT(1)
|
||||
+#define AIU_MEM_IEC958_CONTROL_EMPTY_EN BIT(2)
|
||||
+#define AIU_MEM_IEC958_CONTROL_ENDIAN_MASK GENMASK(5, 3)
|
||||
+#define AIU_MEM_IEC958_CONTROL_RD_DDR BIT(6)
|
||||
+#define AIU_MEM_IEC958_CONTROL_MODE_16BIT BIT(7)
|
||||
+#define AIU_MEM_IEC958_MASKS_CH_MEM_MASK GENMASK(15, 8)
|
||||
+#define AIU_MEM_IEC958_MASKS_CH_MEM(ch) ((ch) << 8)
|
||||
+#define AIU_MEM_IEC958_MASKS_CH_RD_MASK GENMASK(7, 0)
|
||||
+#define AIU_MEM_IEC958_MASKS_CH_RD(ch) ((ch) << 0)
|
||||
+
|
||||
+#define AIU_SPDIF_DMA_BURST 8
|
||||
+#define AIU_SPDIF_BPF_MAX USHRT_MAX
|
||||
+
|
||||
+static struct snd_pcm_hardware meson_aiu_spdif_dma_hw = {
|
||||
+ .info = (SNDRV_PCM_INFO_INTERLEAVED |
|
||||
+ SNDRV_PCM_INFO_MMAP |
|
||||
+ SNDRV_PCM_INFO_MMAP_VALID |
|
||||
+ SNDRV_PCM_INFO_PAUSE),
|
||||
+
|
||||
+ .formats = (SNDRV_PCM_FMTBIT_S16_LE |
|
||||
+ SNDRV_PCM_FMTBIT_S24_LE |
|
||||
+ SNDRV_PCM_FMTBIT_S32_LE),
|
||||
+
|
||||
+ .rates = (SNDRV_PCM_RATE_32000 |
|
||||
+ SNDRV_PCM_RATE_44100 |
|
||||
+ SNDRV_PCM_RATE_48000 |
|
||||
+ SNDRV_PCM_RATE_96000 |
|
||||
+ SNDRV_PCM_RATE_192000),
|
||||
+ /*
|
||||
+ * TODO: The DMA can change the endianness, the msb position
|
||||
+ * and deal with unsigned - support this later on
|
||||
+ */
|
||||
+
|
||||
+ .channels_min = 2,
|
||||
+ .channels_max = 2,
|
||||
+ .period_bytes_min = AIU_SPDIF_DMA_BURST,
|
||||
+ .period_bytes_max = AIU_SPDIF_BPF_MAX,
|
||||
+ .periods_min = 2,
|
||||
+ .periods_max = UINT_MAX,
|
||||
+ .buffer_bytes_max = 1 * 1024 * 1024,
|
||||
+ .fifo_size = 0,
|
||||
+};
|
||||
+
|
||||
+static struct meson_aiu_spdif *meson_aiu_spdif_dma_priv(struct snd_pcm_substream *s)
|
||||
+{
|
||||
+ struct snd_soc_pcm_runtime *rtd = s->private_data;
|
||||
+ struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
|
||||
+
|
||||
+ return snd_soc_component_get_drvdata(component);
|
||||
+}
|
||||
+
|
||||
+static snd_pcm_uframes_t
|
||||
+meson_aiu_spdif_dma_pointer(struct snd_pcm_substream *substream)
|
||||
+{
|
||||
+ struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
+ struct meson_aiu_spdif *priv = meson_aiu_spdif_dma_priv(substream);
|
||||
+ unsigned int addr;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = regmap_read(priv->core->aiu, AIU_MEM_IEC958_RD_PTR,
|
||||
+ &addr);
|
||||
+ if (ret)
|
||||
+ return 0;
|
||||
+
|
||||
+ return bytes_to_frames(runtime, addr - (unsigned int)runtime->dma_addr);
|
||||
+}
|
||||
+
|
||||
+static void __dma_enable(struct meson_aiu_spdif *priv, bool enable)
|
||||
+{
|
||||
+ unsigned int en_mask = (AIU_MEM_IEC958_CONTROL_FILL_EN |
|
||||
+ AIU_MEM_IEC958_CONTROL_EMPTY_EN);
|
||||
+
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_MEM_IEC958_CONTROL, en_mask,
|
||||
+ enable ? en_mask : 0);
|
||||
+}
|
||||
+
|
||||
+static void __dcu_fifo_enable(struct meson_aiu_spdif *priv, bool enable)
|
||||
+{
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_958_DCU_FF_CTRL,
|
||||
+ AIU_958_DCU_FF_CTRL_EN,
|
||||
+ enable ? AIU_958_DCU_FF_CTRL_EN : 0);
|
||||
+}
|
||||
+
|
||||
+static int meson_aiu_spdif_dma_trigger(struct snd_pcm_substream *substream, int cmd)
|
||||
+{
|
||||
+ struct meson_aiu_spdif *priv = meson_aiu_spdif_dma_priv(substream);
|
||||
+
|
||||
+ switch (cmd) {
|
||||
+ case SNDRV_PCM_TRIGGER_START:
|
||||
+ case SNDRV_PCM_TRIGGER_RESUME:
|
||||
+ case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
|
||||
+ __dcu_fifo_enable(priv, true);
|
||||
+ __dma_enable(priv, true);
|
||||
+ break;
|
||||
+ case SNDRV_PCM_TRIGGER_SUSPEND:
|
||||
+ case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
|
||||
+ case SNDRV_PCM_TRIGGER_STOP:
|
||||
+ __dma_enable(priv, false);
|
||||
+ __dcu_fifo_enable(priv, false);
|
||||
+ break;
|
||||
+ default:
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void __dma_init_mem(struct meson_aiu_spdif *priv)
|
||||
+{
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_MEM_IEC958_CONTROL,
|
||||
+ AIU_MEM_IEC958_CONTROL_INIT,
|
||||
+ AIU_MEM_IEC958_CONTROL_INIT);
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_MEM_IEC958_BUF_CNTL,
|
||||
+ AIU_MEM_IEC958_BUF_CNTL_INIT,
|
||||
+ AIU_MEM_IEC958_BUF_CNTL_INIT);
|
||||
+
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_MEM_IEC958_CONTROL,
|
||||
+ AIU_MEM_IEC958_CONTROL_INIT,
|
||||
+ 0);
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_MEM_IEC958_BUF_CNTL,
|
||||
+ AIU_MEM_IEC958_BUF_CNTL_INIT,
|
||||
+ 0);
|
||||
+}
|
||||
+
|
||||
+static int meson_aiu_spdif_dma_prepare(struct snd_pcm_substream *substream)
|
||||
+{
|
||||
+ struct meson_aiu_spdif *priv = meson_aiu_spdif_dma_priv(substream);
|
||||
+
|
||||
+ __dma_init_mem(priv);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int __setup_memory_layout(struct meson_aiu_spdif *priv,
|
||||
+ unsigned int width)
|
||||
+{
|
||||
+ u32 mem_ctl = AIU_MEM_IEC958_CONTROL_RD_DDR;
|
||||
+
|
||||
+ if (width == 16)
|
||||
+ mem_ctl |= AIU_MEM_IEC958_CONTROL_MODE_16BIT;
|
||||
+
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_MEM_IEC958_CONTROL,
|
||||
+ AIU_MEM_IEC958_CONTROL_ENDIAN_MASK |
|
||||
+ AIU_MEM_IEC958_CONTROL_MODE_16BIT |
|
||||
+ AIU_MEM_IEC958_CONTROL_RD_DDR,
|
||||
+ mem_ctl);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int meson_aiu_spdif_dma_hw_params(struct snd_pcm_substream *substream,
|
||||
+ struct snd_pcm_hw_params *params)
|
||||
+{
|
||||
+ struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
+ struct meson_aiu_spdif *priv = meson_aiu_spdif_dma_priv(substream);
|
||||
+ int ret;
|
||||
+ dma_addr_t end_ptr;
|
||||
+
|
||||
+ ret = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params));
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = __setup_memory_layout(priv, params_physical_width(params));
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ /* Initialize memory pointers */
|
||||
+ regmap_write(priv->core->aiu,
|
||||
+ AIU_MEM_IEC958_START_PTR, runtime->dma_addr);
|
||||
+ regmap_write(priv->core->aiu,
|
||||
+ AIU_MEM_IEC958_RD_PTR, runtime->dma_addr);
|
||||
+
|
||||
+ /* The end pointer is the address of the last valid block */
|
||||
+ end_ptr = runtime->dma_addr + runtime->dma_bytes - AIU_SPDIF_DMA_BURST;
|
||||
+ regmap_write(priv->core->aiu, AIU_MEM_IEC958_END_PTR, end_ptr);
|
||||
+
|
||||
+ /* Memory masks */
|
||||
+ regmap_write(priv->core->aiu, AIU_MEM_IEC958_MASKS,
|
||||
+ AIU_MEM_IEC958_MASKS_CH_RD(0xff) |
|
||||
+ AIU_MEM_IEC958_MASKS_CH_MEM(0xff));
|
||||
+
|
||||
+ /* Setup the number bytes read by the FIFO between each IRQ */
|
||||
+ regmap_write(priv->core->aiu, AIU_958_BPF, params_period_bytes(params));
|
||||
+
|
||||
+ /*
|
||||
+ * AUTO_DISABLE and SYNC_HEAD are enabled by default but
|
||||
+ * this should be disabled in PCM (uncompressed) mode
|
||||
+ */
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_958_DCU_FF_CTRL,
|
||||
+ AIU_958_DCU_FF_CTRL_AUTO_DISABLE |
|
||||
+ AIU_958_DCU_FF_CTRL_IRQ_MODE_MASK |
|
||||
+ AIU_958_DCU_FF_CTRL_SYNC_HEAD_EN,
|
||||
+ AIU_958_DCU_FF_CTRL_IRQ_FRAME_READ);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int meson_aiu_spdif_dma_hw_free(struct snd_pcm_substream *substream)
|
||||
+{
|
||||
+ return snd_pcm_lib_free_pages(substream);
|
||||
+}
|
||||
+
|
||||
+static irqreturn_t meson_aiu_spdif_dma_irq(int irq, void *dev_id)
|
||||
+{
|
||||
+ struct snd_pcm_substream *playback = dev_id;
|
||||
+
|
||||
+ snd_pcm_period_elapsed(playback);
|
||||
+
|
||||
+ return IRQ_HANDLED;
|
||||
+}
|
||||
+
|
||||
+static int meson_aiu_spdif_dma_open(struct snd_pcm_substream *substream)
|
||||
+{
|
||||
+ struct meson_aiu_spdif *priv = meson_aiu_spdif_dma_priv(substream);
|
||||
+ int ret;
|
||||
+
|
||||
+ snd_soc_set_runtime_hwparams(substream, &meson_aiu_spdif_dma_hw);
|
||||
+
|
||||
+ /*
|
||||
+ * Make sure the buffer and period size are multiple of the DMA burst
|
||||
+ * size
|
||||
+ */
|
||||
+ ret = snd_pcm_hw_constraint_step(substream->runtime, 0,
|
||||
+ SNDRV_PCM_HW_PARAM_BUFFER_BYTES,
|
||||
+ AIU_SPDIF_DMA_BURST);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = snd_pcm_hw_constraint_step(substream->runtime, 0,
|
||||
+ SNDRV_PCM_HW_PARAM_PERIOD_BYTES,
|
||||
+ AIU_SPDIF_DMA_BURST);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ /* Request the SPDIF DDR irq */
|
||||
+ ret = request_irq(priv->irq, meson_aiu_spdif_dma_irq, 0,
|
||||
+ DRV_NAME, substream);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ /* Power up the spdif fast domain - can't write the register w/o it */
|
||||
+ ret = clk_prepare_enable(priv->fast);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ /* Make sure the dma is initially halted */
|
||||
+ __dma_enable(priv, false);
|
||||
+ __dcu_fifo_enable(priv, false);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int meson_aiu_spdif_dma_close(struct snd_pcm_substream *substream)
|
||||
+{
|
||||
+ struct meson_aiu_spdif *priv = meson_aiu_spdif_dma_priv(substream);
|
||||
+
|
||||
+ clk_disable_unprepare(priv->fast);
|
||||
+ free_irq(priv->irq, substream);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct snd_pcm_ops meson_aiu_spdif_dma_ops = {
|
||||
+ .open = meson_aiu_spdif_dma_open,
|
||||
+ .close = meson_aiu_spdif_dma_close,
|
||||
+ .ioctl = snd_pcm_lib_ioctl,
|
||||
+ .hw_params = meson_aiu_spdif_dma_hw_params,
|
||||
+ .hw_free = meson_aiu_spdif_dma_hw_free,
|
||||
+ .prepare = meson_aiu_spdif_dma_prepare,
|
||||
+ .pointer = meson_aiu_spdif_dma_pointer,
|
||||
+ .trigger = meson_aiu_spdif_dma_trigger,
|
||||
+};
|
||||
+
|
||||
+static int meson_aiu_spdif_dma_new(struct snd_soc_pcm_runtime *rtd)
|
||||
+{
|
||||
+ struct snd_card *card = rtd->card->snd_card;
|
||||
+ size_t size = meson_aiu_spdif_dma_hw.buffer_bytes_max;
|
||||
+
|
||||
+ return snd_pcm_lib_preallocate_pages_for_all(rtd->pcm,
|
||||
+ SNDRV_DMA_TYPE_DEV,
|
||||
+ card->dev, size, size);
|
||||
+}
|
||||
+
|
||||
+#define AIU_CLK_CTRL_958_DIV_EN BIT(1)
|
||||
+#define AIU_CLK_CTRL_958_DIV_MASK GENMASK(5, 4)
|
||||
+#define AIU_CLK_CTRL_958_DIV_MORE BIT(12)
|
||||
+#define AIU_MEM_IEC958_CONTROL_MODE_LINEAR BIT(8)
|
||||
+#define AIU_958_CTRL_HOLD_EN BIT(0)
|
||||
+#define AIU_958_MISC_NON_PCM BIT(0)
|
||||
+#define AIU_958_MISC_MODE_16BITS BIT(1)
|
||||
+#define AIU_958_MISC_16BITS_ALIGN_MASK GENMASK(6, 5)
|
||||
+#define AIU_958_MISC_16BITS_ALIGN(val) ((val) << 5)
|
||||
+#define AIU_958_MISC_MODE_32BITS BIT(7)
|
||||
+#define AIU_958_MISC_32BITS_SHIFT_MASK GENMASK(10, 8)
|
||||
+#define AIU_958_MISC_32BITS_SHIFT(val) ((val) << 8)
|
||||
+#define AIU_958_MISC_U_FROM_STREAM BIT(12)
|
||||
+#define AIU_958_MISC_FORCE_LR BIT(13)
|
||||
+
|
||||
+#define AIU_CS_WORD_LEN 4
|
||||
+
|
||||
+static void __hold(struct meson_aiu_spdif *priv, bool enable)
|
||||
+{
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_958_CTRL,
|
||||
+ AIU_958_CTRL_HOLD_EN,
|
||||
+ enable ? AIU_958_CTRL_HOLD_EN : 0);
|
||||
+}
|
||||
+
|
||||
+static void __divider_enable(struct meson_aiu_spdif *priv, bool enable)
|
||||
+{
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_CLK_CTRL,
|
||||
+ AIU_CLK_CTRL_958_DIV_EN,
|
||||
+ enable ? AIU_CLK_CTRL_958_DIV_EN : 0);
|
||||
+}
|
||||
+
|
||||
+static void __playback_start(struct meson_aiu_spdif *priv)
|
||||
+{
|
||||
+ __divider_enable(priv, true);
|
||||
+ __hold(priv, false);
|
||||
+}
|
||||
+
|
||||
+static void __playback_stop(struct meson_aiu_spdif *priv)
|
||||
+{
|
||||
+ __hold(priv, true);
|
||||
+ __divider_enable(priv, false);
|
||||
+}
|
||||
+
|
||||
+static int meson_aiu_spdif_dai_trigger(struct snd_pcm_substream *substream, int cmd,
|
||||
+ struct snd_soc_dai *dai)
|
||||
+{
|
||||
+ struct meson_aiu_spdif *priv = snd_soc_dai_get_drvdata(dai);
|
||||
+
|
||||
+ switch (cmd) {
|
||||
+ case SNDRV_PCM_TRIGGER_START:
|
||||
+ case SNDRV_PCM_TRIGGER_RESUME:
|
||||
+ case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
|
||||
+ __playback_start(priv);
|
||||
+ return 0;
|
||||
+
|
||||
+ case SNDRV_PCM_TRIGGER_STOP:
|
||||
+ case SNDRV_PCM_TRIGGER_SUSPEND:
|
||||
+ case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
|
||||
+ __playback_stop(priv);
|
||||
+ return 0;
|
||||
+
|
||||
+ default:
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int __setup_spdif_clk(struct meson_aiu_spdif *priv, unsigned int rate)
|
||||
+{
|
||||
+ unsigned int mrate;
|
||||
+
|
||||
+ /* Leave the internal divisor alone */
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_CLK_CTRL,
|
||||
+ AIU_CLK_CTRL_958_DIV_MASK |
|
||||
+ AIU_CLK_CTRL_958_DIV_MORE,
|
||||
+ 0);
|
||||
+
|
||||
+ /* 2 * 32bits per subframe * 2 channels = 128 */
|
||||
+ mrate = rate * 128;
|
||||
+ return clk_set_rate(priv->mclk, mrate);
|
||||
+}
|
||||
+
|
||||
+static int __setup_cs_word(struct meson_aiu_spdif *priv,
|
||||
+ struct snd_pcm_hw_params *params)
|
||||
+{
|
||||
+ u8 cs[AIU_CS_WORD_LEN];
|
||||
+ u32 val;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = snd_pcm_create_iec958_consumer_hw_params(params, cs,
|
||||
+ AIU_CS_WORD_LEN);
|
||||
+ if (ret < 0)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ /* Write the 1st half word */
|
||||
+ val = cs[1] | cs[0] << 8;
|
||||
+ regmap_write(priv->core->aiu, AIU_958_CHSTAT_L0, val);
|
||||
+ regmap_write(priv->core->aiu, AIU_958_CHSTAT_R0, val);
|
||||
+
|
||||
+ /* Write the 2nd half word */
|
||||
+ val = cs[3] | cs[2] << 8;
|
||||
+ regmap_write(priv->core->aiu, AIU_958_CHSTAT_L1, val);
|
||||
+ regmap_write(priv->core->aiu, AIU_958_CHSTAT_R1, val);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int __setup_pcm_fmt(struct meson_aiu_spdif *priv,
|
||||
+ unsigned int width)
|
||||
+{
|
||||
+ u32 val = 0;
|
||||
+
|
||||
+ switch (width) {
|
||||
+ case 16:
|
||||
+ val |= AIU_958_MISC_MODE_16BITS;
|
||||
+ val |= AIU_958_MISC_16BITS_ALIGN(2);
|
||||
+ break;
|
||||
+ case 32:
|
||||
+ case 24:
|
||||
+ /*
|
||||
+ * Looks like this should only be set for 32bits mode, but the
|
||||
+ * vendor kernel sets it like this for 24bits as well, let's
|
||||
+ * try and see
|
||||
+ */
|
||||
+ val |= AIU_958_MISC_MODE_32BITS;
|
||||
+ break;
|
||||
+ default:
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ /* No idea what this actually does, copying the vendor kernel for now */
|
||||
+ val |= AIU_958_MISC_FORCE_LR;
|
||||
+ val |= AIU_958_MISC_U_FROM_STREAM;
|
||||
+
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_958_MISC,
|
||||
+ AIU_958_MISC_NON_PCM |
|
||||
+ AIU_958_MISC_MODE_16BITS |
|
||||
+ AIU_958_MISC_16BITS_ALIGN_MASK |
|
||||
+ AIU_958_MISC_MODE_32BITS |
|
||||
+ AIU_958_MISC_FORCE_LR,
|
||||
+ val);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int meson_aiu_spdif_dai_hw_params(struct snd_pcm_substream *substream,
|
||||
+ struct snd_pcm_hw_params *params,
|
||||
+ struct snd_soc_dai *dai)
|
||||
+{
|
||||
+ struct meson_aiu_spdif *priv = snd_soc_dai_get_drvdata(dai);
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = __setup_spdif_clk(priv, params_rate(params));
|
||||
+ if (ret) {
|
||||
+ dev_err(dai->dev, "Unable to set the spdif clock\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ ret = __setup_cs_word(priv, params);
|
||||
+ if (ret) {
|
||||
+ dev_err(dai->dev, "Unable to set the channel status word\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ ret = __setup_pcm_fmt(priv, params_width(params));
|
||||
+ if (ret) {
|
||||
+ dev_err(dai->dev, "Unable to set the pcm format\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int meson_aiu_spdif_dai_startup(struct snd_pcm_substream *substream,
|
||||
+ struct snd_soc_dai *dai)
|
||||
+{
|
||||
+ struct meson_aiu_spdif *priv = snd_soc_dai_get_drvdata(dai);
|
||||
+ int ret;
|
||||
+
|
||||
+ /* Power up the spdif fast domain - can't write the registers w/o it */
|
||||
+ ret = clk_prepare_enable(priv->fast);
|
||||
+ if (ret)
|
||||
+ goto out_clk_fast;
|
||||
+
|
||||
+ /* Make sure nothing gets out of the DAI yet*/
|
||||
+ __hold(priv, true);
|
||||
+
|
||||
+ ret = clk_set_parent(priv->mclk, priv->mclk_i958);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ /* Enable the clock gate */
|
||||
+ ret = clk_prepare_enable(priv->iface);
|
||||
+ if (ret)
|
||||
+ goto out_clk_iface;
|
||||
+
|
||||
+ /* Enable the spdif clock */
|
||||
+ ret = clk_prepare_enable(priv->mclk);
|
||||
+ if (ret)
|
||||
+ goto out_mclk;
|
||||
+
|
||||
+ /*
|
||||
+ * Make sure the interface expect a memory layout we can work with
|
||||
+ * MEM prefixed register usually belong to the DMA, but when the spdif
|
||||
+ * DAI takes data from the i2s buffer, we need to make sure it works in
|
||||
+ * split mode and not the "normal mode" (channel samples packed in
|
||||
+ * 32 bytes groups)
|
||||
+ */
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_MEM_IEC958_CONTROL,
|
||||
+ AIU_MEM_IEC958_CONTROL_MODE_LINEAR,
|
||||
+ AIU_MEM_IEC958_CONTROL_MODE_LINEAR);
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+out_mclk:
|
||||
+ clk_disable_unprepare(priv->iface);
|
||||
+out_clk_iface:
|
||||
+ clk_disable_unprepare(priv->fast);
|
||||
+out_clk_fast:
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static void meson_aiu_spdif_dai_shutdown(struct snd_pcm_substream *substream,
|
||||
+ struct snd_soc_dai *dai)
|
||||
+{
|
||||
+ struct meson_aiu_spdif *priv = snd_soc_dai_get_drvdata(dai);
|
||||
+
|
||||
+ clk_disable_unprepare(priv->iface);
|
||||
+ clk_disable_unprepare(priv->mclk);
|
||||
+ clk_disable_unprepare(priv->fast);
|
||||
+}
|
||||
+
|
||||
+static const struct snd_soc_dai_ops meson_aiu_spdif_dai_ops = {
|
||||
+ .startup = meson_aiu_spdif_dai_startup,
|
||||
+ .shutdown = meson_aiu_spdif_dai_shutdown,
|
||||
+ .trigger = meson_aiu_spdif_dai_trigger,
|
||||
+ .hw_params = meson_aiu_spdif_dai_hw_params,
|
||||
+};
|
||||
+
|
||||
+static struct snd_soc_dai_driver meson_aiu_spdif_dai = {
|
||||
+ .playback = {
|
||||
+ .stream_name = "Playback",
|
||||
+ .channels_min = 2,
|
||||
+ .channels_max = 2,
|
||||
+ .rates = (SNDRV_PCM_RATE_32000 |
|
||||
+ SNDRV_PCM_RATE_44100 |
|
||||
+ SNDRV_PCM_RATE_48000 |
|
||||
+ SNDRV_PCM_RATE_96000 |
|
||||
+ SNDRV_PCM_RATE_192000),
|
||||
+ .formats = (SNDRV_PCM_FMTBIT_S16_LE |
|
||||
+ SNDRV_PCM_FMTBIT_S24_LE)
|
||||
+ },
|
||||
+ .ops = &meson_aiu_spdif_dai_ops,
|
||||
+};
|
||||
+
|
||||
+static const struct snd_soc_component_driver meson_aiu_spdif_component = {
|
||||
+ .ops = &meson_aiu_spdif_dma_ops,
|
||||
+ .pcm_new = meson_aiu_spdif_dma_new,
|
||||
+ .name = DRV_NAME,
|
||||
+};
|
||||
+
|
||||
+static int meson_aiu_spdif_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct device *dev = &pdev->dev;
|
||||
+ struct meson_aiu_spdif *priv;
|
||||
+
|
||||
+ priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
|
||||
+ if (!priv)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ platform_set_drvdata(pdev, priv);
|
||||
+ priv->core = dev_get_drvdata(dev->parent);
|
||||
+
|
||||
+ priv->fast = devm_clk_get(dev, "fast");
|
||||
+ if (IS_ERR(priv->fast)) {
|
||||
+ if (PTR_ERR(priv->fast) != -EPROBE_DEFER)
|
||||
+ dev_err(dev, "Can't get spdif fast domain clockt\n");
|
||||
+ return PTR_ERR(priv->fast);
|
||||
+ }
|
||||
+
|
||||
+ priv->iface = devm_clk_get(dev, "iface");
|
||||
+ if (IS_ERR(priv->iface)) {
|
||||
+ if (PTR_ERR(priv->iface) != -EPROBE_DEFER)
|
||||
+ dev_err(dev,
|
||||
+ "Can't get the dai clock gate\n");
|
||||
+ return PTR_ERR(priv->iface);
|
||||
+ }
|
||||
+
|
||||
+ priv->mclk_i958 = devm_clk_get(dev, "mclk_i958");
|
||||
+ if (IS_ERR(priv->mclk_i958)) {
|
||||
+ if (PTR_ERR(priv->mclk_i958) != -EPROBE_DEFER)
|
||||
+ dev_err(dev, "Can't get the spdif master clock\n");
|
||||
+ return PTR_ERR(priv->mclk_i958);
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * TODO: the spdif dai can also get its data from the i2s fifo.
|
||||
+ * For this use-case, the DAI driver will need to get the i2s master
|
||||
+ * clock in order to reparent the spdif clock from cts_mclk_i958 to
|
||||
+ * cts_amclk
|
||||
+ */
|
||||
+
|
||||
+ priv->mclk = devm_clk_get(dev, "mclk");
|
||||
+ if (IS_ERR(priv->mclk)) {
|
||||
+ if (PTR_ERR(priv->mclk) != -EPROBE_DEFER)
|
||||
+ dev_err(dev, "Can't get the spdif input mux clock\n");
|
||||
+ return PTR_ERR(priv->mclk);
|
||||
+ }
|
||||
+
|
||||
+ return devm_snd_soc_register_component(dev, &meson_aiu_spdif_component,
|
||||
+ &meson_aiu_spdif_dai, 1);
|
||||
+}
|
||||
+
|
||||
+static const struct of_device_id meson_aiu_spdif_of_match[] = {
|
||||
+ { .compatible = "amlogic,meson-aiu-spdif", },
|
||||
+ {}
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, meson_aiu_spdif_of_match);
|
||||
+
|
||||
+static struct platform_driver meson_aiu_spdif_pdrv = {
|
||||
+ .probe = meson_aiu_spdif_probe,
|
||||
+ .driver = {
|
||||
+ .name = DRV_NAME,
|
||||
+ .of_match_table = meson_aiu_spdif_of_match,
|
||||
+ },
|
||||
+};
|
||||
+module_platform_driver(meson_aiu_spdif_pdrv);
|
||||
+
|
||||
+MODULE_DESCRIPTION("Meson AIU spdif ASoC Driver");
|
||||
+MODULE_AUTHOR("Jerome Brunet <jbrunet@baylibre.com>");
|
||||
+MODULE_LICENSE("GPL v2");
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
From 46b067ba6da13db7279c861dfc68ee8974a2ae5d Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Fri, 31 Mar 2017 15:55:03 +0200
|
||||
Subject: [PATCH 05/16] ARM64: defconfig: enable audio support for meson SoCs
|
||||
as module
|
||||
|
||||
Add audio support for meson SoCs. This includes the audio core
|
||||
driver and the i2s and spdif output interfaces
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
arch/arm64/configs/defconfig | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
|
||||
index 0e58ef02880c..c1adeafcb19b 100644
|
||||
--- a/arch/arm64/configs/defconfig
|
||||
+++ b/arch/arm64/configs/defconfig
|
||||
@@ -552,6 +552,9 @@ CONFIG_SND_HDA_CODEC_HDMI=m
|
||||
CONFIG_SND_SOC=y
|
||||
CONFIG_SND_BCM2835_SOC_I2S=m
|
||||
CONFIG_SND_MESON_AXG_SOUND_CARD=m
|
||||
+CONFIG_SND_SOC_MESON_GX=m
|
||||
+CONFIG_SND_SOC_MESON_GX_I2S=m
|
||||
+CONFIG_SND_SOC_MESON_GX_SPDIF=m
|
||||
CONFIG_SND_SOC_ROCKCHIP=m
|
||||
CONFIG_SND_SOC_ROCKCHIP_SPDIF=m
|
||||
CONFIG_SND_SOC_ROCKCHIP_RT5645=m
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,155 @@
|
|||
From b0afd0cd4e272d10974ba819268400fdd53ae988 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Thu, 30 Mar 2017 15:19:04 +0200
|
||||
Subject: [PATCH 06/16] ARM64: dts: meson-gx: add audio controller nodes
|
||||
|
||||
Add audio controller nodes for Amlogic meson gxbb and gxl.
|
||||
This includes the audio-core node, the i2s and spdif DAIs
|
||||
|
||||
Audio on this SoC family is still a work in progress. More nodes are likely
|
||||
to be added later on (pcm DAIs, input DMAs, etc ...)
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 23 +++++++++++++++++
|
||||
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 28 +++++++++++++++++++++
|
||||
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 28 +++++++++++++++++++++
|
||||
3 files changed, 79 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
|
||||
index 86e26ed551e0..f2caa324d5aa 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
|
||||
@@ -225,6 +225,29 @@
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
|
||||
+ audio: audio@5400 {
|
||||
+ compatible = "amlogic,meson-gx-audio-core";
|
||||
+ reg = <0x0 0x5400 0x0 0x2ac>,
|
||||
+ <0x0 0xa000 0x0 0x304>;
|
||||
+ reg-names = "aiu", "audin";
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ aiu_i2s: audio-controller-0 {
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ compatible = "amlogic,meson-aiu-i2s";
|
||||
+ interrupts = <GIC_SPI 48 IRQ_TYPE_EDGE_RISING>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ aiu_spdif: audio-controller-1 {
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ compatible = "amlogic,meson-aiu-spdif";
|
||||
+ interrupts = <GIC_SPI 50 IRQ_TYPE_EDGE_RISING>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ };
|
||||
+
|
||||
uart_A: serial@84c0 {
|
||||
compatible = "amlogic,meson-gx-uart";
|
||||
reg = <0x0 0x84c0 0x0 0x18>;
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
|
||||
index 0cb40326b0d3..89391f26e2ca 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
|
||||
@@ -724,6 +724,24 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&audio {
|
||||
+ clocks = <&clkc CLKID_AIU>,
|
||||
+ <&clkc CLKID_AIU_GLUE>,
|
||||
+ <&clkc CLKID_I2S_SPDIF>;
|
||||
+ clock-names = "aiu_top", "aiu_glue", "audin";
|
||||
+ resets = <&reset RESET_AIU>,
|
||||
+ <&reset RESET_AUDIN>;
|
||||
+ reset-names = "aiu", "audin";
|
||||
+};
|
||||
+
|
||||
+&aiu_i2s {
|
||||
+ clocks = <&clkc CLKID_I2S_OUT>,
|
||||
+ <&clkc CLKID_MIXER_IFACE>,
|
||||
+ <&clkc CLKID_AOCLK_GATE>,
|
||||
+ <&clkc CLKID_CTS_AMCLK>;
|
||||
+ clock-names = "fast", "iface", "bclks", "mclk";
|
||||
+};
|
||||
+
|
||||
&pwrc_vpu {
|
||||
resets = <&reset RESET_VIU>,
|
||||
<&reset RESET_VENC>,
|
||||
@@ -812,6 +830,15 @@
|
||||
num-cs = <1>;
|
||||
};
|
||||
|
||||
+&aiu_spdif {
|
||||
+ clocks = <&clkc CLKID_IEC958>,
|
||||
+ <&clkc CLKID_IEC958_GATE>,
|
||||
+ <&clkc CLKID_CTS_MCLK_I958>,
|
||||
+ <&clkc CLKID_CTS_AMCLK>,
|
||||
+ <&clkc CLKID_CTS_I958>;
|
||||
+ clock-names = "fast", "iface", "mclk_i958", "mclk_i2s", "mclk";
|
||||
+};
|
||||
+
|
||||
&spifc {
|
||||
clocks = <&clkc CLKID_SPI>;
|
||||
};
|
||||
@@ -856,3 +883,4 @@
|
||||
resets = <&reset RESET_PARSER>;
|
||||
reset-names = "esparser";
|
||||
};
|
||||
+
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
|
||||
index a09c53aaa0e8..28b1afc24514 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
|
||||
@@ -727,6 +727,24 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&audio {
|
||||
+ clocks = <&clkc CLKID_AIU>,
|
||||
+ <&clkc CLKID_AIU_GLUE>,
|
||||
+ <&clkc CLKID_I2S_SPDIF>;
|
||||
+ clock-names = "aiu_top", "aiu_glue", "audin";
|
||||
+ resets = <&reset RESET_AIU>,
|
||||
+ <&reset RESET_AUDIN>;
|
||||
+ reset-names = "aiu", "audin";
|
||||
+};
|
||||
+
|
||||
+&aiu_i2s {
|
||||
+ clocks = <&clkc CLKID_I2S_OUT>,
|
||||
+ <&clkc CLKID_MIXER_IFACE>,
|
||||
+ <&clkc CLKID_AOCLK_GATE>,
|
||||
+ <&clkc CLKID_CTS_AMCLK>;
|
||||
+ clock-names = "fast", "iface", "bclks", "mclk";
|
||||
+};
|
||||
+
|
||||
&pwrc_vpu {
|
||||
resets = <&reset RESET_VIU>,
|
||||
<&reset RESET_VENC>,
|
||||
@@ -815,6 +833,15 @@
|
||||
num-cs = <1>;
|
||||
};
|
||||
|
||||
+&aiu_spdif {
|
||||
+ clocks = <&clkc CLKID_IEC958>,
|
||||
+ <&clkc CLKID_IEC958_GATE>,
|
||||
+ <&clkc CLKID_CTS_MCLK_I958>,
|
||||
+ <&clkc CLKID_CTS_AMCLK>,
|
||||
+ <&clkc CLKID_CTS_I958>;
|
||||
+ clock-names = "fast", "iface", "mclk_i958", "mclk_i2s", "mclk";
|
||||
+};
|
||||
+
|
||||
&spifc {
|
||||
clocks = <&clkc CLKID_SPI>;
|
||||
};
|
||||
@@ -859,3 +886,4 @@
|
||||
resets = <&reset RESET_PARSER>;
|
||||
reset-names = "esparser";
|
||||
};
|
||||
+
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
From 20723a8da9331b9b0391e727471e7991db41603a Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Fri, 7 Jul 2017 17:39:21 +0200
|
||||
Subject: [PATCH 07/16] snd: meson: activate HDMI audio path
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
sound/soc/meson-gx/aiu-i2s.c | 22 ++++++++++++++++++++++
|
||||
1 file changed, 22 insertions(+)
|
||||
|
||||
diff --git a/sound/soc/meson-gx/aiu-i2s.c b/sound/soc/meson-gx/aiu-i2s.c
|
||||
index d57f351b502f..450f1d20a1d6 100644
|
||||
--- a/sound/soc/meson-gx/aiu-i2s.c
|
||||
+++ b/sound/soc/meson-gx/aiu-i2s.c
|
||||
@@ -332,8 +332,19 @@ static int meson_aiu_i2s_dma_new(struct snd_soc_pcm_runtime *rtd)
|
||||
#define AIU_CLK_CTRL_ALRCLK_RIGHT_J (2 << 8)
|
||||
#define AIU_CLK_CTRL_MORE_I2S_DIV_MASK GENMASK(5, 0)
|
||||
#define AIU_CLK_CTRL_MORE_I2S_DIV(div) (((div) - 1) << 0)
|
||||
+#define AIU_CLK_CTRL_MORE_HDMI_TX_SEL_MASK BIT(6)
|
||||
+#define AIU_CLK_CTRL_MORE_HDMI_TX_I958_CLK (0 << 6)
|
||||
+#define AIU_CLK_CTRL_MORE_HDMI_TX_INT_CLK (1 << 6)
|
||||
#define AIU_CODEC_DAC_LRCLK_CTRL_DIV_MASK GENMASK(11, 0)
|
||||
#define AIU_CODEC_DAC_LRCLK_CTRL_DIV(div) (((div) - 1) << 0)
|
||||
+#define AIU_HDMI_CLK_DATA_CTRL_CLK_SEL_MASK GENMASK(1, 0)
|
||||
+#define AIU_HDMI_CLK_DATA_CTRL_CLK_DISABLE (0 << 0)
|
||||
+#define AIU_HDMI_CLK_DATA_CTRL_CLK_PCM (1 << 0)
|
||||
+#define AIU_HDMI_CLK_DATA_CTRL_CLK_I2S (2 << 0)
|
||||
+#define AIU_HDMI_CLK_DATA_CTRL_DATA_SEL_MASK GENMASK(5, 4)
|
||||
+#define AIU_HDMI_CLK_DATA_CTRL_DATA_MUTE (0 << 4)
|
||||
+#define AIU_HDMI_CLK_DATA_CTRL_DATA_PCM (1 << 4)
|
||||
+#define AIU_HDMI_CLK_DATA_CTRL_DATA_I2S (2 << 4)
|
||||
#define AIU_I2S_DAC_CFG_PAYLOAD_SIZE_MASK GENMASK(1, 0)
|
||||
#define AIU_I2S_DAC_CFG_AOCLK_32 (0 << 0)
|
||||
#define AIU_I2S_DAC_CFG_AOCLK_48 (2 << 0)
|
||||
@@ -497,6 +508,17 @@ static int meson_aiu_i2s_dai_hw_params(struct snd_pcm_substream *substream,
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ /* Quick and dirty hack for HDMI */
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_HDMI_CLK_DATA_CTRL,
|
||||
+ AIU_HDMI_CLK_DATA_CTRL_CLK_SEL_MASK |
|
||||
+ AIU_HDMI_CLK_DATA_CTRL_DATA_SEL_MASK,
|
||||
+ AIU_HDMI_CLK_DATA_CTRL_CLK_I2S |
|
||||
+ AIU_HDMI_CLK_DATA_CTRL_DATA_I2S);
|
||||
+
|
||||
+ regmap_update_bits(priv->core->aiu, AIU_CLK_CTRL_MORE,
|
||||
+ AIU_CLK_CTRL_MORE_HDMI_TX_SEL_MASK,
|
||||
+ AIU_CLK_CTRL_MORE_HDMI_TX_INT_CLK);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
From 861e7b28c7c0986142470e3d984d47229716a173 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Wed, 20 Sep 2017 18:01:26 +0200
|
||||
Subject: [PATCH 08/16] ARM64: dts: meson-gx: add sound-dai-cells to HDMI node
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 1 +
|
||||
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
|
||||
index 89391f26e2ca..504b9a63f10e 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
|
||||
@@ -330,6 +330,7 @@
|
||||
<&clkc CLKID_CLK81>,
|
||||
<&clkc CLKID_GCLK_VENCI_INT0>;
|
||||
clock-names = "isfr", "iahb", "venci";
|
||||
+ #sound-dai-cells = <0>;
|
||||
};
|
||||
|
||||
&sysctrl {
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
|
||||
index 28b1afc24514..6d143db9fd7a 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
|
||||
@@ -280,6 +280,7 @@
|
||||
<&clkc CLKID_CLK81>,
|
||||
<&clkc CLKID_GCLK_VENCI_INT0>;
|
||||
clock-names = "isfr", "iahb", "venci";
|
||||
+ #sound-dai-cells = <0>;
|
||||
};
|
||||
|
||||
&sysctrl {
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,656 @@
|
|||
From 249ddc53a0a0f0e9ae84da7a59c16ed6770691c2 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Wed, 20 Sep 2017 18:10:08 +0200
|
||||
Subject: [PATCH 09/16] ARM64: dts: meson: activate hdmi audio HDMI enabled
|
||||
boards
|
||||
|
||||
This patch activate audio over HDMI on selected boards
|
||||
|
||||
Please note that this audio support is based on WIP changes
|
||||
This should be considered as preview and it does not reflect
|
||||
the audio I expect to see merged
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi
|
||||
index a9b778571..332ac5627 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi
|
||||
@@ -102,6 +102,34 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+ sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,name = "meson-gx-audio";
|
||||
+ assigned-clocks = <&clkc CLKID_MPLL2>,
|
||||
+ <&clkc CLKID_MPLL0>,
|
||||
+ <&clkc CLKID_MPLL1>;
|
||||
+ assigned-clock-parents = <0>, <0>, <0>;
|
||||
+ assigned-clock-rates = <294912000>,
|
||||
+ <270950400>,
|
||||
+ <393216000>;
|
||||
+
|
||||
+ simple-audio-card,dai-link@0 {
|
||||
+ /* HDMI Output */
|
||||
+ format = "i2s";
|
||||
+ mclk-fs = <256>;
|
||||
+ bitclock-master = <&aiu_i2s>;
|
||||
+ frame-master = <&aiu_i2s>;
|
||||
+
|
||||
+ cpu {
|
||||
+ sound-dai = <&aiu_i2s>;
|
||||
+ };
|
||||
+
|
||||
+ codec {
|
||||
+ sound-dai = <&hdmi_tx>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&cec_AO {
|
||||
@@ -111,6 +139,14 @@
|
||||
hdmi-phandle = <&hdmi_tx>;
|
||||
};
|
||||
|
||||
+&audio {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&aiu_i2s {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&cvbs_vdac_port {
|
||||
cvbs_vdac_out: endpoint {
|
||||
remote-endpoint = <&cvbs_connector_in>;
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
|
||||
index c34c1c90c..99ca661da 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
|
||||
@@ -88,6 +88,34 @@
|
||||
clock-names = "ext_clock";
|
||||
};
|
||||
|
||||
+ sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,name = "meson-gx-audio";
|
||||
+ assigned-clocks = <&clkc CLKID_MPLL2>,
|
||||
+ <&clkc CLKID_MPLL0>,
|
||||
+ <&clkc CLKID_MPLL1>;
|
||||
+ assigned-clock-parents = <0>, <0>, <0>;
|
||||
+ assigned-clock-rates = <294912000>,
|
||||
+ <270950400>,
|
||||
+ <393216000>;
|
||||
+
|
||||
+ simple-audio-card,dai-link@0 {
|
||||
+ /* HDMI Output */
|
||||
+ format = "i2s";
|
||||
+ mclk-fs = <256>;
|
||||
+ bitclock-master = <&aiu_i2s>;
|
||||
+ frame-master = <&aiu_i2s>;
|
||||
+
|
||||
+ cpu {
|
||||
+ sound-dai = <&aiu_i2s>;
|
||||
+ };
|
||||
+
|
||||
+ codec {
|
||||
+ sound-dai = <&hdmi_tx>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
vcc1v8: regulator-vcc1v8 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "VCC1.8V";
|
||||
@@ -131,6 +159,14 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&audio {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&aiu_i2s {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&cec_AO {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&ao_cec_pins>;
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts
|
||||
index b636912a2..61307f72a 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts
|
||||
@@ -119,6 +119,34 @@
|
||||
clock-names = "ext_clock";
|
||||
};
|
||||
|
||||
+ sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,name = "meson-gx-audio";
|
||||
+ assigned-clocks = <&clkc CLKID_MPLL2>,
|
||||
+ <&clkc CLKID_MPLL0>,
|
||||
+ <&clkc CLKID_MPLL1>;
|
||||
+ assigned-clock-parents = <0>, <0>, <0>;
|
||||
+ assigned-clock-rates = <294912000>,
|
||||
+ <270950400>,
|
||||
+ <393216000>;
|
||||
+
|
||||
+ simple-audio-card,dai-link@0 {
|
||||
+ /* HDMI Output */
|
||||
+ format = "i2s";
|
||||
+ mclk-fs = <256>;
|
||||
+ bitclock-master = <&aiu_i2s>;
|
||||
+ frame-master = <&aiu_i2s>;
|
||||
+
|
||||
+ cpu {
|
||||
+ sound-dai = <&aiu_i2s>;
|
||||
+ };
|
||||
+
|
||||
+ codec {
|
||||
+ sound-dai = <&hdmi_tx>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
cvbs-connector {
|
||||
compatible = "composite-video-connector";
|
||||
|
||||
@@ -154,6 +182,14 @@
|
||||
hdmi-phandle = <&hdmi_tx>;
|
||||
};
|
||||
|
||||
+&audio {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&aiu_i2s {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
ðmac {
|
||||
status = "okay";
|
||||
pinctrl-0 = <ð_rmii_pins>;
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
||||
index 9972b1515..68fc42bf5 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
||||
@@ -110,6 +110,34 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+ sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,name = "meson-gx-audio";
|
||||
+ assigned-clocks = <&clkc CLKID_MPLL2>,
|
||||
+ <&clkc CLKID_MPLL0>,
|
||||
+ <&clkc CLKID_MPLL1>;
|
||||
+ assigned-clock-parents = <0>, <0>, <0>;
|
||||
+ assigned-clock-rates = <294912000>,
|
||||
+ <270950400>,
|
||||
+ <393216000>;
|
||||
+
|
||||
+ simple-audio-card,dai-link@0 {
|
||||
+ /* HDMI Output */
|
||||
+ format = "i2s";
|
||||
+ mclk-fs = <256>;
|
||||
+ bitclock-master = <&aiu_i2s>;
|
||||
+ frame-master = <&aiu_i2s>;
|
||||
+
|
||||
+ cpu {
|
||||
+ sound-dai = <&aiu_i2s>;
|
||||
+ };
|
||||
+
|
||||
+ codec {
|
||||
+ sound-dai = <&hdmi_tx>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&cec_AO {
|
||||
@@ -119,6 +147,14 @@
|
||||
hdmi-phandle = <&hdmi_tx>;
|
||||
};
|
||||
|
||||
+&audio {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&aiu_i2s {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
ðmac {
|
||||
status = "okay";
|
||||
pinctrl-0 = <ð_rgmii_pins>;
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
|
||||
index e8f925871..830efebb2 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
|
||||
@@ -113,6 +113,34 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+ sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,name = "meson-gx-audio";
|
||||
+ assigned-clocks = <&clkc CLKID_MPLL2>,
|
||||
+ <&clkc CLKID_MPLL0>,
|
||||
+ <&clkc CLKID_MPLL1>;
|
||||
+ assigned-clock-parents = <0>, <0>, <0>;
|
||||
+ assigned-clock-rates = <294912000>,
|
||||
+ <270950400>,
|
||||
+ <393216000>;
|
||||
+
|
||||
+ simple-audio-card,dai-link@0 {
|
||||
+ /* HDMI Output */
|
||||
+ format = "i2s";
|
||||
+ mclk-fs = <256>;
|
||||
+ bitclock-master = <&aiu_i2s>;
|
||||
+ frame-master = <&aiu_i2s>;
|
||||
+
|
||||
+ cpu {
|
||||
+ sound-dai = <&aiu_i2s>;
|
||||
+ };
|
||||
+
|
||||
+ codec {
|
||||
+ sound-dai = <&hdmi_tx>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&cec_AO {
|
||||
@@ -122,6 +150,14 @@
|
||||
hdmi-phandle = <&hdmi_tx>;
|
||||
};
|
||||
|
||||
+&audio {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&aiu_i2s {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&cvbs_vdac_port {
|
||||
cvbs_vdac_out: endpoint {
|
||||
remote-endpoint = <&cvbs_connector_in>;
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
|
||||
index 4c539881f..dfe26b589 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
|
||||
@@ -112,6 +112,42 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+ sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,name = "meson-gx-audio";
|
||||
+ assigned-clocks = <&clkc CLKID_MPLL2>,
|
||||
+ <&clkc CLKID_MPLL0>,
|
||||
+ <&clkc CLKID_MPLL1>;
|
||||
+ assigned-clock-parents = <0>, <0>, <0>;
|
||||
+ assigned-clock-rates = <294912000>,
|
||||
+ <270950400>,
|
||||
+ <393216000>;
|
||||
+
|
||||
+ simple-audio-card,dai-link@0 {
|
||||
+ /* HDMI Output */
|
||||
+ format = "i2s";
|
||||
+ mclk-fs = <256>;
|
||||
+ bitclock-master = <&aiu_i2s>;
|
||||
+ frame-master = <&aiu_i2s>;
|
||||
+
|
||||
+ cpu {
|
||||
+ sound-dai = <&aiu_i2s>;
|
||||
+ };
|
||||
+
|
||||
+ codec {
|
||||
+ sound-dai = <&hdmi_tx>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&audio {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&aiu_i2s {
|
||||
+ status = "okay";
|
||||
};
|
||||
|
||||
&cec_AO {
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
|
||||
index 5499e8de5..ced95e86d 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
|
||||
@@ -65,6 +65,34 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+ sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,name = "meson-gx-audio";
|
||||
+ assigned-clocks = <&clkc CLKID_MPLL2>,
|
||||
+ <&clkc CLKID_MPLL0>,
|
||||
+ <&clkc CLKID_MPLL1>;
|
||||
+ assigned-clock-parents = <0>, <0>, <0>;
|
||||
+ assigned-clock-rates = <294912000>,
|
||||
+ <270950400>,
|
||||
+ <393216000>;
|
||||
+
|
||||
+ simple-audio-card,dai-link@0 {
|
||||
+ /* HDMI Output */
|
||||
+ format = "i2s";
|
||||
+ mclk-fs = <256>;
|
||||
+ bitclock-master = <&aiu_i2s>;
|
||||
+ frame-master = <&aiu_i2s>;
|
||||
+
|
||||
+ cpu {
|
||||
+ sound-dai = <&aiu_i2s>;
|
||||
+ };
|
||||
+
|
||||
+ codec {
|
||||
+ sound-dai = <&hdmi_tx>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&cec_AO {
|
||||
@@ -74,6 +102,14 @@
|
||||
hdmi-phandle = <&hdmi_tx>;
|
||||
};
|
||||
|
||||
+&audio {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&aiu_i2s {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&hdmi_tx {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
|
||||
index 4b8ce738e..f18b22b64 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
|
||||
@@ -84,6 +84,34 @@
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
+ sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,name = "meson-gx-audio";
|
||||
+ assigned-clocks = <&clkc CLKID_MPLL2>,
|
||||
+ <&clkc CLKID_MPLL0>,
|
||||
+ <&clkc CLKID_MPLL1>;
|
||||
+ assigned-clock-parents = <0>, <0>, <0>;
|
||||
+ assigned-clock-rates = <294912000>,
|
||||
+ <270950400>,
|
||||
+ <393216000>;
|
||||
+
|
||||
+ simple-audio-card,dai-link@0 {
|
||||
+ /* HDMI Output */
|
||||
+ format = "i2s";
|
||||
+ mclk-fs = <256>;
|
||||
+ bitclock-master = <&aiu_i2s>;
|
||||
+ frame-master = <&aiu_i2s>;
|
||||
+
|
||||
+ cpu {
|
||||
+ sound-dai = <&aiu_i2s>;
|
||||
+ };
|
||||
+
|
||||
+ codec {
|
||||
+ sound-dai = <&hdmi_tx>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
vcc_3v3: regulator-vcc_3v3 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "VCC_3V3";
|
||||
@@ -132,6 +160,14 @@
|
||||
hdmi-phandle = <&hdmi_tx>;
|
||||
};
|
||||
|
||||
+&audio {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&aiu_i2s {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&cvbs_vdac_port {
|
||||
cvbs_vdac_out: endpoint {
|
||||
remote-endpoint = <&cvbs_connector_in>;
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts
|
||||
index 26907ac82..3c779e33a 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts
|
||||
@@ -102,6 +102,34 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+ sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,name = "meson-gx-audio";
|
||||
+ assigned-clocks = <&clkc CLKID_MPLL2>,
|
||||
+ <&clkc CLKID_MPLL0>,
|
||||
+ <&clkc CLKID_MPLL1>;
|
||||
+ assigned-clock-parents = <0>, <0>, <0>;
|
||||
+ assigned-clock-rates = <294912000>,
|
||||
+ <270950400>,
|
||||
+ <393216000>;
|
||||
+
|
||||
+ simple-audio-card,dai-link@0 {
|
||||
+ /* HDMI Output */
|
||||
+ format = "i2s";
|
||||
+ mclk-fs = <256>;
|
||||
+ bitclock-master = <&aiu_i2s>;
|
||||
+ frame-master = <&aiu_i2s>;
|
||||
+
|
||||
+ cpu {
|
||||
+ sound-dai = <&aiu_i2s>;
|
||||
+ };
|
||||
+
|
||||
+ codec {
|
||||
+ sound-dai = <&hdmi_tx>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&cec_AO {
|
||||
@@ -111,6 +139,14 @@
|
||||
hdmi-phandle = <&hdmi_tx>;
|
||||
};
|
||||
|
||||
+&audio {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&aiu_i2s {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&cvbs_vdac_port {
|
||||
cvbs_vdac_out: endpoint {
|
||||
remote-endpoint = <&cvbs_connector_in>;
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts
|
||||
index 2602940c2..23336f2f2 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts
|
||||
@@ -32,6 +32,34 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+ sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,name = "meson-gx-audio";
|
||||
+ assigned-clocks = <&clkc CLKID_MPLL2>,
|
||||
+ <&clkc CLKID_MPLL0>,
|
||||
+ <&clkc CLKID_MPLL1>;
|
||||
+ assigned-clock-parents = <0>, <0>, <0>;
|
||||
+ assigned-clock-rates = <294912000>,
|
||||
+ <270950400>,
|
||||
+ <393216000>;
|
||||
+
|
||||
+ simple-audio-card,dai-link@0 {
|
||||
+ /* HDMI Output */
|
||||
+ format = "i2s";
|
||||
+ mclk-fs = <256>;
|
||||
+ bitclock-master = <&aiu_i2s>;
|
||||
+ frame-master = <&aiu_i2s>;
|
||||
+
|
||||
+ cpu {
|
||||
+ sound-dai = <&aiu_i2s>;
|
||||
+ };
|
||||
+
|
||||
+ codec {
|
||||
+ sound-dai = <&hdmi_tx>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&cec_AO {
|
||||
@@ -41,6 +69,14 @@
|
||||
hdmi-phandle = <&hdmi_tx>;
|
||||
};
|
||||
|
||||
+&audio {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&aiu_i2s {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&cvbs_vdac_port {
|
||||
cvbs_vdac_out: endpoint {
|
||||
remote-endpoint = <&cvbs_connector_in>;
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
||||
index 989d33ac6..1610d5872 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
||||
@@ -82,6 +82,34 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,name = "meson-gx-audio";
|
||||
+ assigned-clocks = <&clkc CLKID_MPLL2>,
|
||||
+ <&clkc CLKID_MPLL0>,
|
||||
+ <&clkc CLKID_MPLL1>;
|
||||
+ assigned-clock-parents = <0>, <0>, <0>;
|
||||
+ assigned-clock-rates = <294912000>,
|
||||
+ <270950400>,
|
||||
+ <393216000>;
|
||||
+
|
||||
+ simple-audio-card,dai-link@0 {
|
||||
+ /* HDMI Output */
|
||||
+ format = "i2s";
|
||||
+ mclk-fs = <256>;
|
||||
+ bitclock-master = <&aiu_i2s>;
|
||||
+ frame-master = <&aiu_i2s>;
|
||||
+
|
||||
+ cpu {
|
||||
+ sound-dai = <&aiu_i2s>;
|
||||
+ };
|
||||
+
|
||||
+ codec {
|
||||
+ sound-dai = <&hdmi_tx>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
pwmleds {
|
||||
compatible = "pwm-leds";
|
||||
|
||||
@@ -198,6 +226,14 @@
|
||||
hdmi-phandle = <&hdmi_tx>;
|
||||
};
|
||||
|
||||
+&audio {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&aiu_i2s {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&cpu0 {
|
||||
#cooling-cells = <2>;
|
||||
};
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts
|
||||
index c2bd4dbbf..1cfba0cc2 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts
|
||||
@@ -75,6 +75,34 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+ sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,name = "meson-gx-audio";
|
||||
+ assigned-clocks = <&clkc CLKID_MPLL2>,
|
||||
+ <&clkc CLKID_MPLL0>,
|
||||
+ <&clkc CLKID_MPLL1>;
|
||||
+ assigned-clock-parents = <0>, <0>, <0>;
|
||||
+ assigned-clock-rates = <294912000>,
|
||||
+ <270950400>,
|
||||
+ <393216000>;
|
||||
+
|
||||
+ simple-audio-card,dai-link@0 {
|
||||
+ /* HDMI Output */
|
||||
+ format = "i2s";
|
||||
+ mclk-fs = <256>;
|
||||
+ bitclock-master = <&aiu_i2s>;
|
||||
+ frame-master = <&aiu_i2s>;
|
||||
+
|
||||
+ cpu {
|
||||
+ sound-dai = <&aiu_i2s>;
|
||||
+ };
|
||||
+
|
||||
+ codec {
|
||||
+ sound-dai = <&hdmi_tx>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&cec_AO {
|
||||
@@ -84,6 +112,14 @@
|
||||
hdmi-phandle = <&hdmi_tx>;
|
||||
};
|
||||
|
||||
+&audio {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&aiu_i2s {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&cvbs_vdac_port {
|
||||
cvbs_vdac_out: endpoint {
|
||||
remote-endpoint = <&cvbs_connector_in>;
|
|
@ -0,0 +1,33 @@
|
|||
From 08f6312f630120e2dd9aa5d7f3a880826a5686f7 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Thu, 30 Mar 2017 15:28:24 +0200
|
||||
Subject: [PATCH 10/16] ARM64: dts: meson-gxbb-p20x: add i2s codec node
|
||||
|
||||
Add the node for the i2s codec Everest 7134 found on the P20x reference
|
||||
design
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
|
||||
index 44af6eb34095..aa20b020ae89 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
|
||||
@@ -163,6 +163,12 @@
|
||||
cvbs_vdac_out: endpoint {
|
||||
remote-endpoint = <&cvbs_connector_in>;
|
||||
};
|
||||
+
|
||||
+ i2s_codec: external-codec {
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ compatible = "everest,es7134";
|
||||
+ status = "okay";
|
||||
+ };
|
||||
};
|
||||
|
||||
&hdmi_tx {
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
From d29c0f548eea79f9b3b6e0ef5b31d8ff4519b706 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Thu, 30 Mar 2017 15:32:17 +0200
|
||||
Subject: [PATCH 11/16] ARM64: dts: meson-gxbb-p20x: add analog amplifier node
|
||||
|
||||
Add the node for the analog sound amplifier Dioo 2125 found on the p20x
|
||||
reference design
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
|
||||
index aa20b020ae89..da10e86a7625 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
|
||||
@@ -169,6 +169,12 @@
|
||||
compatible = "everest,es7134";
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+ amp: analog-amplifier {
|
||||
+ compatible = "dioo,dio2125";
|
||||
+ enable-gpios = <&gpio GPIOH_3 0>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
};
|
||||
|
||||
&hdmi_tx {
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
From 908688215120b30a35dbee244e892c55200a3fb2 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Thu, 30 Mar 2017 17:49:00 +0200
|
||||
Subject: [PATCH 12/16] ARM64: dts: meson-gxbb-p20x: add spdif codec node
|
||||
|
||||
Add spdif-dit node to the meson gxbb reference design
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
|
||||
index da10e86a7625..a6cb34c28ac8 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
|
||||
@@ -175,6 +175,12 @@
|
||||
enable-gpios = <&gpio GPIOH_3 0>;
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+ spdif_out: spdif-out {
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ compatible = "linux,spdif-dit";
|
||||
+ status = "okay";
|
||||
+ };
|
||||
};
|
||||
|
||||
&hdmi_tx {
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
From a1fdeaf2823e79893551988bd473a155eadaa5ab Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Thu, 30 Mar 2017 15:40:20 +0200
|
||||
Subject: [PATCH 13/16] ARM64: dts: meson-gxbb-p20x: add i2s and spdif output
|
||||
interfaces
|
||||
|
||||
Add the necessary pins for the i2s and spdif audio interface output and
|
||||
enable these interfaces
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
.../arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 17 +++++++++++++++++
|
||||
1 file changed, 17 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
|
||||
index a6cb34c28ac8..74c3efb8102a 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
|
||||
@@ -300,3 +300,20 @@
|
||||
&usb1 {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&audio {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&aiu_i2s {
|
||||
+ pinctrl-0 = <&i2s_am_clk_pins>, <&i2s_out_ao_clk_pins>,
|
||||
+ <&i2s_out_lr_clk_pins>, <&i2s_out_ch01_ao_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&aiu_spdif {
|
||||
+ pinctrl-0 = <&spdif_out_ao_6_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ status = "okay";
|
||||
+};
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
From 9c077ea246e713dcbc99ed37296fc47f2c24e20a Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Thu, 30 Mar 2017 17:53:57 +0200
|
||||
Subject: [PATCH 14/16] ARM64: dts: meson-gxl-p230: add spdif codec node
|
||||
|
||||
Add spdif-dit node to the meson gxl reference design
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts
|
||||
index b08c4537f260..b9a52b716ffc 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts
|
||||
@@ -51,6 +51,12 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+ spdif_out: spdif-out {
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ compatible = "linux,spdif-dit";
|
||||
+ status = "okay";
|
||||
+ };
|
||||
};
|
||||
|
||||
&cec_AO {
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
From 041c1278076a516ee7231c46939bea224e6af2f7 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Thu, 30 Mar 2017 16:04:39 +0200
|
||||
Subject: [PATCH 15/16] ARM64: dts: meson-gxl-p230: add spdif output interface
|
||||
|
||||
Add the necessary pin for the spdif audio interface output and enable it
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts
|
||||
index b9a52b716ffc..5d77ca683d68 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts
|
||||
@@ -115,3 +115,13 @@
|
||||
compatible = "brcm,bcm4329-fmac";
|
||||
};
|
||||
};
|
||||
+
|
||||
+&audio {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&aiu_spdif {
|
||||
+ pinctrl-0 = <&spdif_out_h_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ status = "okay";
|
||||
+};
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
From 475139057d96fd8c5447d22527be1551f9ed398b Mon Sep 17 00:00:00 2001
|
||||
From: Zhang Ning <832666+zhangn1985@users.noreply.github.com>
|
||||
Date: Fri, 9 Aug 2019 11:28:03 +0800
|
||||
Subject: [PATCH 16/16] ASOC: meson fix build error under 5.3.y
|
||||
|
||||
Signed-off-by: Zhang Ning <832666+zhangn1985@users.noreply.github.com>
|
||||
---
|
||||
sound/soc/meson-gx/aiu-i2s.c | 3 ++-
|
||||
sound/soc/meson-gx/aiu-spdif.c | 3 ++-
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/sound/soc/meson-gx/aiu-i2s.c b/sound/soc/meson-gx/aiu-i2s.c
|
||||
index 450f1d20a1d6..21e335498112 100644
|
||||
--- a/sound/soc/meson-gx/aiu-i2s.c
|
||||
+++ b/sound/soc/meson-gx/aiu-i2s.c
|
||||
@@ -313,9 +313,10 @@ static int meson_aiu_i2s_dma_new(struct snd_soc_pcm_runtime *rtd)
|
||||
struct snd_card *card = rtd->card->snd_card;
|
||||
size_t size = meson_aiu_i2s_dma_hw.buffer_bytes_max;
|
||||
|
||||
- return snd_pcm_lib_preallocate_pages_for_all(rtd->pcm,
|
||||
+ snd_pcm_lib_preallocate_pages_for_all(rtd->pcm,
|
||||
SNDRV_DMA_TYPE_DEV,
|
||||
card->dev, size, size);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
#define AIU_CLK_CTRL_I2S_DIV_EN BIT(0)
|
||||
diff --git a/sound/soc/meson-gx/aiu-spdif.c b/sound/soc/meson-gx/aiu-spdif.c
|
||||
index 17cfe134e8f7..a54544d8f065 100644
|
||||
--- a/sound/soc/meson-gx/aiu-spdif.c
|
||||
+++ b/sound/soc/meson-gx/aiu-spdif.c
|
||||
@@ -332,9 +332,10 @@ static int meson_aiu_spdif_dma_new(struct snd_soc_pcm_runtime *rtd)
|
||||
struct snd_card *card = rtd->card->snd_card;
|
||||
size_t size = meson_aiu_spdif_dma_hw.buffer_bytes_max;
|
||||
|
||||
- return snd_pcm_lib_preallocate_pages_for_all(rtd->pcm,
|
||||
+ snd_pcm_lib_preallocate_pages_for_all(rtd->pcm,
|
||||
SNDRV_DMA_TYPE_DEV,
|
||||
card->dev, size, size);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
#define AIU_CLK_CTRL_958_DIV_EN BIT(1)
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
From 95dcad22559d65838826e0f635041037e2407076 Mon Sep 17 00:00:00 2001
|
||||
From: Corentin Labbe <clabbe@baylibre.com>
|
||||
Date: Thu, 25 Jul 2019 19:42:53 +0000
|
||||
Subject: [PATCH 1/4] dt-bindings: crypto: Add DT bindings documentation for
|
||||
amlogic-crypto
|
||||
|
||||
This patch adds documentation for Device-Tree bindings for the
|
||||
Amlogic GXL cryptographic offloader driver.
|
||||
|
||||
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
|
||||
---
|
||||
.../bindings/crypto/amlogic-gxl-crypto.yaml | 45 +++++++++++++++++++
|
||||
1 file changed, 45 insertions(+)
|
||||
create mode 100644 Documentation/devicetree/bindings/crypto/amlogic-gxl-crypto.yaml
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/crypto/amlogic-gxl-crypto.yaml b/Documentation/devicetree/bindings/crypto/amlogic-gxl-crypto.yaml
|
||||
new file mode 100644
|
||||
index 000000000000..41265e57c00b
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/crypto/amlogic-gxl-crypto.yaml
|
||||
@@ -0,0 +1,45 @@
|
||||
+# SPDX-License-Identifier: GPL-2.0
|
||||
+%YAML 1.2
|
||||
+---
|
||||
+$id: http://devicetree.org/schemas/crypto/amlogic-gxl-crypto.yaml#
|
||||
+$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
+
|
||||
+title: Amlogic GXL Cryptographic Offloader
|
||||
+
|
||||
+maintainers:
|
||||
+ - Corentin Labbe <clabbe@baylibre.com>
|
||||
+
|
||||
+properties:
|
||||
+ compatible:
|
||||
+ oneOf:
|
||||
+ - const: amlogic,gxl-crypto
|
||||
+
|
||||
+ reg:
|
||||
+ maxItems: 1
|
||||
+
|
||||
+ interrupts:
|
||||
+ maxItems: 1
|
||||
+
|
||||
+ clocks:
|
||||
+ maxItems: 1
|
||||
+
|
||||
+ clock-names:
|
||||
+ const: blkmv
|
||||
+
|
||||
+required:
|
||||
+ - compatible
|
||||
+ - reg
|
||||
+ - interrupts
|
||||
+ - clocks
|
||||
+ - clock-names
|
||||
+
|
||||
+examples:
|
||||
+ - |
|
||||
+ crypto: crypto@c883e000 {
|
||||
+ compatible = "amlogic,gxl-crypto";
|
||||
+ reg = <0x0 0xc883e000 0x0 0x36>;
|
||||
+ interrupts = <GIC_SPI 188 IRQ_TYPE_EDGE_RISING>,
|
||||
+ <GIC_SPI 189 IRQ_TYPE_EDGE_RISING>;
|
||||
+ clocks = <&clkc CLKID_BLKMV>;
|
||||
+ clock-names = "blkmv";
|
||||
+ };
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,961 @@
|
|||
From a79f8713e99873f1ac7c0e54d0ab9e8f1f5f982a Mon Sep 17 00:00:00 2001
|
||||
From: Corentin Labbe <clabbe@baylibre.com>
|
||||
Date: Thu, 25 Jul 2019 19:42:54 +0000
|
||||
Subject: [PATCH 2/4] crypto: amlogic: Add crypto accelerator for amlogic GXL
|
||||
|
||||
This patch adds support for the amlogic GXL cryptographic offloader present
|
||||
on GXL SoCs.
|
||||
|
||||
This driver supports AES cipher in CBC/ECB mode.
|
||||
|
||||
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
|
||||
---
|
||||
drivers/crypto/Kconfig | 2 +
|
||||
drivers/crypto/Makefile | 1 +
|
||||
drivers/crypto/amlogic/Kconfig | 24 ++
|
||||
drivers/crypto/amlogic/Makefile | 2 +
|
||||
drivers/crypto/amlogic/amlogic-cipher.c | 358 ++++++++++++++++++++++++
|
||||
drivers/crypto/amlogic/amlogic-core.c | 326 +++++++++++++++++++++
|
||||
drivers/crypto/amlogic/amlogic.h | 172 ++++++++++++
|
||||
7 files changed, 885 insertions(+)
|
||||
create mode 100644 drivers/crypto/amlogic/Kconfig
|
||||
create mode 100644 drivers/crypto/amlogic/Makefile
|
||||
create mode 100644 drivers/crypto/amlogic/amlogic-cipher.c
|
||||
create mode 100644 drivers/crypto/amlogic/amlogic-core.c
|
||||
create mode 100644 drivers/crypto/amlogic/amlogic.h
|
||||
|
||||
diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
|
||||
index 603413f28fa3..3b14afbcf092 100644
|
||||
--- a/drivers/crypto/Kconfig
|
||||
+++ b/drivers/crypto/Kconfig
|
||||
@@ -785,4 +785,6 @@ config CRYPTO_DEV_CCREE
|
||||
|
||||
source "drivers/crypto/hisilicon/Kconfig"
|
||||
|
||||
+source "drivers/crypto/amlogic/Kconfig"
|
||||
+
|
||||
endif # CRYPTO_HW
|
||||
diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile
|
||||
index afc4753b5d28..9919fbe0e1d4 100644
|
||||
--- a/drivers/crypto/Makefile
|
||||
+++ b/drivers/crypto/Makefile
|
||||
@@ -48,3 +48,4 @@ obj-$(CONFIG_CRYPTO_DEV_BCM_SPU) += bcm/
|
||||
obj-$(CONFIG_CRYPTO_DEV_SAFEXCEL) += inside-secure/
|
||||
obj-$(CONFIG_CRYPTO_DEV_ARTPEC6) += axis/
|
||||
obj-y += hisilicon/
|
||||
+obj-$(CONFIG_CRYPTO_DEV_AMLOGIC_GXL) += amlogic/
|
||||
diff --git a/drivers/crypto/amlogic/Kconfig b/drivers/crypto/amlogic/Kconfig
|
||||
new file mode 100644
|
||||
index 000000000000..9c4bf96afeb3
|
||||
--- /dev/null
|
||||
+++ b/drivers/crypto/amlogic/Kconfig
|
||||
@@ -0,0 +1,24 @@
|
||||
+config CRYPTO_DEV_AMLOGIC_GXL
|
||||
+ tristate "Support for amlogic cryptographic offloader"
|
||||
+ default y if ARCH_MESON
|
||||
+ select CRYPTO_BLKCIPHER
|
||||
+ select CRYPTO_ENGINE
|
||||
+ select CRYPTO_ECB
|
||||
+ select CRYPTO_CBC
|
||||
+ select CRYPTO_AES
|
||||
+ help
|
||||
+ Select y here for having support for the cryptographic offloader
|
||||
+ availlable on Amlogic GXL SoC.
|
||||
+ This hardware handle AES ciphers in ECB/CBC mode.
|
||||
+
|
||||
+ To compile this driver as a module, choose M here: the module
|
||||
+ will be called amlogic-crypto.
|
||||
+
|
||||
+config CRYPTO_DEV_AMLOGIC_GXL_DEBUG
|
||||
+ bool "Enabled amlogic stats"
|
||||
+ depends on CRYPTO_DEV_AMLOGIC_GXL
|
||||
+ depends on DEBUG_FS
|
||||
+ help
|
||||
+ Say y to enabled amlogic-crypto debug stats.
|
||||
+ This will create /sys/kernel/debug/gxl-crypto/stats for displaying
|
||||
+ the number of requests per flow and per algorithm.
|
||||
diff --git a/drivers/crypto/amlogic/Makefile b/drivers/crypto/amlogic/Makefile
|
||||
new file mode 100644
|
||||
index 000000000000..0ec472c5562e
|
||||
--- /dev/null
|
||||
+++ b/drivers/crypto/amlogic/Makefile
|
||||
@@ -0,0 +1,2 @@
|
||||
+obj-$(CONFIG_CRYPTO_DEV_AMLOGIC_GXL) += amlogic-crypto.o
|
||||
+amlogic-crypto-y := amlogic-core.o amlogic-cipher.o
|
||||
diff --git a/drivers/crypto/amlogic/amlogic-cipher.c b/drivers/crypto/amlogic/amlogic-cipher.c
|
||||
new file mode 100644
|
||||
index 000000000000..84e65b4e9ba9
|
||||
--- /dev/null
|
||||
+++ b/drivers/crypto/amlogic/amlogic-cipher.c
|
||||
@@ -0,0 +1,358 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/*
|
||||
+ * amlogic-cipher.c - hardware cryptographic offloader for Amlogic GXL SoC
|
||||
+ *
|
||||
+ * Copyright (C) 2018-2019 Corentin LABBE <clabbe@baylibre.com>
|
||||
+ *
|
||||
+ * This file add support for AES cipher with 128,192,256 bits keysize in
|
||||
+ * CBC and ECB mode.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/crypto.h>
|
||||
+#include <linux/delay.h>
|
||||
+#include <linux/io.h>
|
||||
+#include <crypto/scatterwalk.h>
|
||||
+#include <linux/scatterlist.h>
|
||||
+#include <linux/dma-mapping.h>
|
||||
+#include <crypto/internal/skcipher.h>
|
||||
+#include "amlogic.h"
|
||||
+
|
||||
+static int get_engine_number(struct meson_dev *mc)
|
||||
+{
|
||||
+ return atomic_inc_return(&mc->flow) % MAXFLOW;
|
||||
+}
|
||||
+
|
||||
+static int meson_cipher(struct skcipher_request *areq)
|
||||
+{
|
||||
+ struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
|
||||
+ struct meson_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm);
|
||||
+ struct meson_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
|
||||
+ struct meson_dev *mc = op->mc;
|
||||
+ struct skcipher_alg *alg = crypto_skcipher_alg(tfm);
|
||||
+ struct meson_alg_template *algt;
|
||||
+ int flow = rctx->flow;
|
||||
+ unsigned int todo, eat, len;
|
||||
+ struct scatterlist *src_sg = areq->src;
|
||||
+ struct scatterlist *dst_sg = areq->dst;
|
||||
+ struct meson_desc *desc;
|
||||
+ bool need_fallback = false;
|
||||
+ int nr_sgs, nr_sgd;
|
||||
+ int i, err = 0;
|
||||
+ unsigned int keyivlen, ivsize, offset, tloffset;
|
||||
+ dma_addr_t phykeyiv;
|
||||
+ void *backup_iv = NULL, *bkeyiv;
|
||||
+
|
||||
+ algt = container_of(alg, struct meson_alg_template, alg.skcipher);
|
||||
+
|
||||
+ dev_dbg(mc->dev, "%s %s %u %x IV(%u) key=%u flow=%d\n", __func__,
|
||||
+ crypto_tfm_alg_name(areq->base.tfm),
|
||||
+ areq->cryptlen,
|
||||
+ rctx->op_dir, crypto_skcipher_ivsize(tfm),
|
||||
+ op->keylen, flow);
|
||||
+
|
||||
+ if (areq->cryptlen == 0)
|
||||
+ need_fallback = true;
|
||||
+
|
||||
+ if (sg_nents(src_sg) != sg_nents(dst_sg))
|
||||
+ need_fallback = true;
|
||||
+
|
||||
+ /* KEY/IV descriptors use 3 desc */
|
||||
+ if (sg_nents(src_sg) > MAXDESC - 3 || sg_nents(dst_sg) > MAXDESC - 3)
|
||||
+ need_fallback = true;
|
||||
+
|
||||
+ while (src_sg && dst_sg && !need_fallback) {
|
||||
+ if ((src_sg->length % 16) != 0)
|
||||
+ need_fallback = true;
|
||||
+ if ((dst_sg->length % 16) != 0)
|
||||
+ need_fallback = true;
|
||||
+ if (src_sg->length != dst_sg->length)
|
||||
+ need_fallback = true;
|
||||
+ if (!IS_ALIGNED(src_sg->offset, sizeof(u32)))
|
||||
+ need_fallback = true;
|
||||
+ if (!IS_ALIGNED(dst_sg->offset, sizeof(u32)))
|
||||
+ need_fallback = true;
|
||||
+ src_sg = sg_next(src_sg);
|
||||
+ dst_sg = sg_next(dst_sg);
|
||||
+ }
|
||||
+
|
||||
+#ifdef CONFIG_CRYPTO_DEV_AMLOGIC_GXL_DEBUG
|
||||
+ algt->stat_req++;
|
||||
+#endif
|
||||
+
|
||||
+ if (need_fallback) {
|
||||
+ SYNC_SKCIPHER_REQUEST_ON_STACK(req, op->fallback_tfm);
|
||||
+#ifdef CONFIG_CRYPTO_DEV_AMLOGIC_GXL_DEBUG
|
||||
+ algt->stat_fb++;
|
||||
+#endif
|
||||
+ skcipher_request_set_sync_tfm(req, op->fallback_tfm);
|
||||
+ skcipher_request_set_callback(req, areq->base.flags, NULL,
|
||||
+ NULL);
|
||||
+ skcipher_request_set_crypt(req, areq->src, areq->dst,
|
||||
+ areq->cryptlen, areq->iv);
|
||||
+ if (rctx->op_dir == MESON_DECRYPT)
|
||||
+ err = crypto_skcipher_decrypt(req);
|
||||
+ else
|
||||
+ err = crypto_skcipher_encrypt(req);
|
||||
+ skcipher_request_zero(req);
|
||||
+ return err;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * The hardware expect a list of meson_desc structures.
|
||||
+ * The 2 first structures store key
|
||||
+ * The third stores IV
|
||||
+ */
|
||||
+ bkeyiv = kzalloc(48, GFP_KERNEL | GFP_DMA);
|
||||
+ if (!bkeyiv)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ memcpy(bkeyiv, op->key, op->keylen);
|
||||
+ keyivlen = op->keylen;
|
||||
+
|
||||
+ ivsize = crypto_skcipher_ivsize(tfm);
|
||||
+ if (areq->iv && ivsize > 0) {
|
||||
+ if (ivsize > areq->cryptlen) {
|
||||
+ dev_err(mc->dev, "invalid ivsize=%d vs len=%d\n", ivsize, areq->cryptlen);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ memcpy(bkeyiv + 32, areq->iv, ivsize);
|
||||
+ keyivlen = 48;
|
||||
+ if (rctx->op_dir == MESON_DECRYPT) {
|
||||
+ backup_iv = kzalloc(ivsize, GFP_KERNEL);
|
||||
+ if (!backup_iv) {
|
||||
+ err = -ENOMEM;
|
||||
+ goto theend;
|
||||
+ }
|
||||
+ offset = areq->cryptlen - ivsize;
|
||||
+ scatterwalk_map_and_copy(backup_iv, areq->src, offset,
|
||||
+ ivsize, 0);
|
||||
+ }
|
||||
+ }
|
||||
+ if (keyivlen == 24)
|
||||
+ keyivlen = 32;
|
||||
+
|
||||
+ phykeyiv = dma_map_single(mc->dev, bkeyiv, keyivlen,
|
||||
+ DMA_TO_DEVICE);
|
||||
+ if (dma_mapping_error(mc->dev, phykeyiv)) {
|
||||
+ dev_err(mc->dev, "Cannot DMA MAP KEY IV\n");
|
||||
+ return -EFAULT;
|
||||
+ }
|
||||
+
|
||||
+ tloffset = 0;
|
||||
+ eat = 0;
|
||||
+ i = 0;
|
||||
+ while (keyivlen > eat) {
|
||||
+ desc = &mc->chanlist[flow].tl[tloffset];
|
||||
+ memset(desc, 0, sizeof(struct meson_desc));
|
||||
+ todo = min(keyivlen - eat, 16u);
|
||||
+ desc->t_src = phykeyiv + i * 16;
|
||||
+ desc->t_dst = i * 16;
|
||||
+ desc->len = 16;
|
||||
+ desc->mode = MODE_KEY;
|
||||
+ desc->owner = 1;
|
||||
+ eat += todo;
|
||||
+ i++;
|
||||
+ tloffset++;
|
||||
+ }
|
||||
+
|
||||
+ if (areq->src == areq->dst) {
|
||||
+ nr_sgs = dma_map_sg(mc->dev, areq->src, sg_nents(areq->src),
|
||||
+ DMA_BIDIRECTIONAL);
|
||||
+ if (nr_sgs < 0) {
|
||||
+ dev_err(mc->dev, "Invalid SG count %d\n", nr_sgs);
|
||||
+ err = -EINVAL;
|
||||
+ goto theend;
|
||||
+ }
|
||||
+ nr_sgd = nr_sgs;
|
||||
+ } else {
|
||||
+ nr_sgs = dma_map_sg(mc->dev, areq->src, sg_nents(areq->src),
|
||||
+ DMA_TO_DEVICE);
|
||||
+ if (nr_sgs < 0 || nr_sgs > MAXDESC - 3) {
|
||||
+ dev_err(mc->dev, "Invalid SG count %d\n", nr_sgs);
|
||||
+ err = -EINVAL;
|
||||
+ goto theend;
|
||||
+ }
|
||||
+ nr_sgd = dma_map_sg(mc->dev, areq->dst, sg_nents(areq->dst),
|
||||
+ DMA_FROM_DEVICE);
|
||||
+ if (nr_sgd < 0 || nr_sgd > MAXDESC - 3) {
|
||||
+ dev_err(mc->dev, "Invalid SG count %d\n", nr_sgd);
|
||||
+ err = -EINVAL;
|
||||
+ goto theend;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+#ifdef CONFIG_CRYPTO_DEV_AMLOGIC_GXL_DEBUG
|
||||
+ mc->chanlist[flow].stat_req++;
|
||||
+#endif
|
||||
+ src_sg = areq->src;
|
||||
+ dst_sg = areq->dst;
|
||||
+ len = areq->cryptlen;
|
||||
+ while (src_sg) {
|
||||
+ desc = &mc->chanlist[flow].tl[tloffset];
|
||||
+ memset(desc, 0, sizeof(struct meson_desc));
|
||||
+
|
||||
+ desc->t_src = sg_dma_address(src_sg);
|
||||
+ desc->t_dst = sg_dma_address(dst_sg);
|
||||
+ todo = min(len, sg_dma_len(src_sg));
|
||||
+ desc->owner = 1;
|
||||
+ desc->len = todo;
|
||||
+ desc->mode = op->keymode;
|
||||
+ desc->op_mode = algt->blockmode;
|
||||
+ desc->enc = rctx->op_dir;
|
||||
+ len -= todo;
|
||||
+
|
||||
+ if (!sg_next(src_sg))
|
||||
+ desc->eoc = 1;
|
||||
+ tloffset++;
|
||||
+ src_sg = sg_next(src_sg);
|
||||
+ dst_sg = sg_next(dst_sg);
|
||||
+ }
|
||||
+
|
||||
+ reinit_completion(&mc->chanlist[flow].complete);
|
||||
+ mc->chanlist[flow].status = 0;
|
||||
+ writel(mc->chanlist[flow].t_phy | 2, mc->base + (flow << 2));
|
||||
+ wait_for_completion_interruptible_timeout(&mc->chanlist[flow].complete,
|
||||
+ msecs_to_jiffies(500));
|
||||
+ if (mc->chanlist[flow].status == 0) {
|
||||
+ dev_err(mc->dev, "DMA timeout for flow %d\n", flow);
|
||||
+ err = -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ dma_unmap_single(mc->dev, phykeyiv, keyivlen, DMA_TO_DEVICE);
|
||||
+
|
||||
+ if (areq->src == areq->dst) {
|
||||
+ dma_unmap_sg(mc->dev, areq->src, nr_sgs, DMA_BIDIRECTIONAL);
|
||||
+ } else {
|
||||
+ dma_unmap_sg(mc->dev, areq->src, nr_sgs, DMA_TO_DEVICE);
|
||||
+ dma_unmap_sg(mc->dev, areq->dst, nr_sgd, DMA_FROM_DEVICE);
|
||||
+ }
|
||||
+
|
||||
+ if (areq->iv && ivsize > 0) {
|
||||
+ if (rctx->op_dir == MESON_DECRYPT) {
|
||||
+ memcpy(areq->iv, backup_iv, ivsize);
|
||||
+ kzfree(backup_iv);
|
||||
+ } else {
|
||||
+ scatterwalk_map_and_copy(areq->iv, areq->dst,
|
||||
+ areq->cryptlen - ivsize,
|
||||
+ ivsize, 0);
|
||||
+ }
|
||||
+ }
|
||||
+theend:
|
||||
+ kzfree(bkeyiv);
|
||||
+
|
||||
+ return err;
|
||||
+}
|
||||
+
|
||||
+static int handle_cipher_request(struct crypto_engine *engine,
|
||||
+ void *areq)
|
||||
+{
|
||||
+ int err;
|
||||
+ struct skcipher_request *breq = container_of(areq, struct skcipher_request, base);
|
||||
+
|
||||
+ err = meson_cipher(breq);
|
||||
+ crypto_finalize_skcipher_request(engine, breq, err);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int meson_skdecrypt(struct skcipher_request *areq)
|
||||
+{
|
||||
+ struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
|
||||
+ struct meson_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm);
|
||||
+ struct meson_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
|
||||
+ int e = get_engine_number(op->mc);
|
||||
+ struct crypto_engine *engine = op->mc->chanlist[e].engine;
|
||||
+
|
||||
+ rctx->op_dir = MESON_DECRYPT;
|
||||
+ rctx->flow = e;
|
||||
+
|
||||
+ return crypto_transfer_skcipher_request_to_engine(engine, areq);
|
||||
+}
|
||||
+
|
||||
+int meson_skencrypt(struct skcipher_request *areq)
|
||||
+{
|
||||
+ struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
|
||||
+ struct meson_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm);
|
||||
+ struct meson_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
|
||||
+ int e = get_engine_number(op->mc);
|
||||
+ struct crypto_engine *engine = op->mc->chanlist[e].engine;
|
||||
+
|
||||
+ rctx->op_dir = MESON_ENCRYPT;
|
||||
+ rctx->flow = e;
|
||||
+
|
||||
+ return crypto_transfer_skcipher_request_to_engine(engine, areq);
|
||||
+}
|
||||
+
|
||||
+int meson_cipher_init(struct crypto_tfm *tfm)
|
||||
+{
|
||||
+ struct meson_cipher_tfm_ctx *op = crypto_tfm_ctx(tfm);
|
||||
+ struct meson_alg_template *algt;
|
||||
+ const char *name = crypto_tfm_alg_name(tfm);
|
||||
+ struct crypto_skcipher *sktfm = __crypto_skcipher_cast(tfm);
|
||||
+ struct skcipher_alg *alg = crypto_skcipher_alg(sktfm);
|
||||
+
|
||||
+ memset(op, 0, sizeof(struct meson_cipher_tfm_ctx));
|
||||
+
|
||||
+ algt = container_of(alg, struct meson_alg_template, alg.skcipher);
|
||||
+ op->mc = algt->mc;
|
||||
+
|
||||
+ sktfm->reqsize = sizeof(struct meson_cipher_req_ctx);
|
||||
+
|
||||
+ op->fallback_tfm = crypto_alloc_sync_skcipher(name, 0, CRYPTO_ALG_NEED_FALLBACK);
|
||||
+ if (IS_ERR(op->fallback_tfm)) {
|
||||
+ dev_err(op->mc->dev, "ERROR: Cannot allocate fallback for %s %ld\n",
|
||||
+ name, PTR_ERR(op->fallback_tfm));
|
||||
+ return PTR_ERR(op->fallback_tfm);
|
||||
+ }
|
||||
+
|
||||
+ op->enginectx.op.do_one_request = handle_cipher_request;
|
||||
+ op->enginectx.op.prepare_request = NULL;
|
||||
+ op->enginectx.op.unprepare_request = NULL;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+void meson_cipher_exit(struct crypto_tfm *tfm)
|
||||
+{
|
||||
+ struct meson_cipher_tfm_ctx *op = crypto_tfm_ctx(tfm);
|
||||
+
|
||||
+ if (op->key) {
|
||||
+ memzero_explicit(op->key, op->keylen);
|
||||
+ kfree(op->key);
|
||||
+ }
|
||||
+ crypto_free_sync_skcipher(op->fallback_tfm);
|
||||
+}
|
||||
+
|
||||
+int meson_aes_setkey(struct crypto_skcipher *tfm, const u8 *key,
|
||||
+ unsigned int keylen)
|
||||
+{
|
||||
+ struct meson_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm);
|
||||
+ struct meson_dev *mc = op->mc;
|
||||
+
|
||||
+ switch (keylen) {
|
||||
+ case 128 / 8:
|
||||
+ op->keymode = MODE_AES_128;
|
||||
+ break;
|
||||
+ case 192 / 8:
|
||||
+ op->keymode = MODE_AES_192;
|
||||
+ break;
|
||||
+ case 256 / 8:
|
||||
+ op->keymode = MODE_AES_256;
|
||||
+ break;
|
||||
+ default:
|
||||
+ dev_dbg(mc->dev, "ERROR: Invalid keylen %u\n", keylen);
|
||||
+ crypto_skcipher_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ if (op->key) {
|
||||
+ memzero_explicit(op->key, op->keylen);
|
||||
+ kfree(op->key);
|
||||
+ }
|
||||
+ op->keylen = keylen;
|
||||
+ op->key = kmalloc(keylen, GFP_KERNEL | GFP_DMA);
|
||||
+ if (!op->key)
|
||||
+ return -ENOMEM;
|
||||
+ memcpy(op->key, key, keylen);
|
||||
+
|
||||
+ return crypto_sync_skcipher_setkey(op->fallback_tfm, key, keylen);
|
||||
+}
|
||||
diff --git a/drivers/crypto/amlogic/amlogic-core.c b/drivers/crypto/amlogic/amlogic-core.c
|
||||
new file mode 100644
|
||||
index 000000000000..94f6e5a520bb
|
||||
--- /dev/null
|
||||
+++ b/drivers/crypto/amlogic/amlogic-core.c
|
||||
@@ -0,0 +1,326 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/*
|
||||
+ * amlgoic-core.c - hardware cryptographic offloader for Amlogic GXL SoC
|
||||
+ *
|
||||
+ * Copyright (C) 2018-2019 Corentin Labbe <clabbe@baylibre.com>
|
||||
+ *
|
||||
+ * Core file which registers crypto algorithms supported by the hardware.
|
||||
+ */
|
||||
+#include <linux/clk.h>
|
||||
+#include <linux/crypto.h>
|
||||
+#include <linux/io.h>
|
||||
+#include <linux/interrupt.h>
|
||||
+#include <linux/irq.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/of.h>
|
||||
+#include <linux/of_device.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/reset.h>
|
||||
+#include <crypto/internal/skcipher.h>
|
||||
+#include <linux/dma-mapping.h>
|
||||
+
|
||||
+#include "amlogic.h"
|
||||
+
|
||||
+static irqreturn_t meson_irq_handler(int irq, void *data)
|
||||
+{
|
||||
+ struct meson_dev *mc = (struct meson_dev *)data;
|
||||
+ int flow;
|
||||
+ u32 p;
|
||||
+
|
||||
+ for (flow = 0; flow < MAXFLOW; flow++) {
|
||||
+ if (mc->irqs[flow] == irq) {
|
||||
+ p = readl(mc->base + ((0x04 + flow) << 2));
|
||||
+ if (p) {
|
||||
+ writel_relaxed(0xF, mc->base + ((0x4 + flow) << 2));
|
||||
+ mc->chanlist[flow].status = 1;
|
||||
+ complete(&mc->chanlist[flow].complete);
|
||||
+ return IRQ_HANDLED;
|
||||
+ }
|
||||
+ dev_err(mc->dev, "%s %d Got irq for flow %d but ctrl is empty\n", __func__, irq, flow);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ dev_err(mc->dev, "%s %d from unknown irq\n", __func__, irq);
|
||||
+ return IRQ_HANDLED;
|
||||
+}
|
||||
+
|
||||
+static struct meson_alg_template mc_algs[] = {
|
||||
+{
|
||||
+ .type = CRYPTO_ALG_TYPE_SKCIPHER,
|
||||
+ .blockmode = MESON_OPMODE_CBC,
|
||||
+ .alg.skcipher = {
|
||||
+ .base = {
|
||||
+ .cra_name = "cbc(aes)",
|
||||
+ .cra_driver_name = "cbc-aes-meson",
|
||||
+ .cra_priority = 400,
|
||||
+ .cra_blocksize = AES_BLOCK_SIZE,
|
||||
+ .cra_flags = CRYPTO_ALG_TYPE_SKCIPHER |
|
||||
+ CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK,
|
||||
+ .cra_ctxsize = sizeof(struct meson_cipher_tfm_ctx),
|
||||
+ .cra_module = THIS_MODULE,
|
||||
+ .cra_alignmask = 0xf,
|
||||
+ .cra_init = meson_cipher_init,
|
||||
+ .cra_exit = meson_cipher_exit,
|
||||
+ },
|
||||
+ .min_keysize = AES_MIN_KEY_SIZE,
|
||||
+ .max_keysize = AES_MAX_KEY_SIZE,
|
||||
+ .ivsize = AES_BLOCK_SIZE,
|
||||
+ .setkey = meson_aes_setkey,
|
||||
+ .encrypt = meson_skencrypt,
|
||||
+ .decrypt = meson_skdecrypt,
|
||||
+ }
|
||||
+},
|
||||
+{
|
||||
+ .type = CRYPTO_ALG_TYPE_SKCIPHER,
|
||||
+ .blockmode = MESON_OPMODE_ECB,
|
||||
+ .alg.skcipher = {
|
||||
+ .base = {
|
||||
+ .cra_name = "ecb(aes)",
|
||||
+ .cra_driver_name = "ecb-aes-meson",
|
||||
+ .cra_priority = 400,
|
||||
+ .cra_blocksize = AES_BLOCK_SIZE,
|
||||
+ .cra_flags = CRYPTO_ALG_TYPE_SKCIPHER |
|
||||
+ CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK,
|
||||
+ .cra_ctxsize = sizeof(struct meson_cipher_tfm_ctx),
|
||||
+ .cra_module = THIS_MODULE,
|
||||
+ .cra_alignmask = 0xf,
|
||||
+ .cra_init = meson_cipher_init,
|
||||
+ .cra_exit = meson_cipher_exit,
|
||||
+ },
|
||||
+ .min_keysize = AES_MIN_KEY_SIZE,
|
||||
+ .max_keysize = AES_MAX_KEY_SIZE,
|
||||
+ .setkey = meson_aes_setkey,
|
||||
+ .encrypt = meson_skencrypt,
|
||||
+ .decrypt = meson_skdecrypt,
|
||||
+ }
|
||||
+},
|
||||
+};
|
||||
+
|
||||
+#ifdef CONFIG_CRYPTO_DEV_AMLOGIC_GXL_DEBUG
|
||||
+static int meson_dbgfs_read(struct seq_file *seq, void *v)
|
||||
+{
|
||||
+ struct meson_dev *mc = seq->private;
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < MAXFLOW; i++)
|
||||
+ seq_printf(seq, "Channel %d: req %lu\n", i, mc->chanlist[i].stat_req);
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(mc_algs); i++) {
|
||||
+ switch (mc_algs[i].type) {
|
||||
+ case CRYPTO_ALG_TYPE_SKCIPHER:
|
||||
+ seq_printf(seq, "%s %s %lu %lu\n",
|
||||
+ mc_algs[i].alg.skcipher.base.cra_driver_name,
|
||||
+ mc_algs[i].alg.skcipher.base.cra_name,
|
||||
+ mc_algs[i].stat_req, mc_algs[i].stat_fb);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int meson_dbgfs_open(struct inode *inode, struct file *file)
|
||||
+{
|
||||
+ return single_open(file, meson_dbgfs_read, inode->i_private);
|
||||
+}
|
||||
+
|
||||
+static const struct file_operations meson_debugfs_fops = {
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .open = meson_dbgfs_open,
|
||||
+ .read = seq_read,
|
||||
+ .llseek = seq_lseek,
|
||||
+ .release = single_release,
|
||||
+};
|
||||
+#endif
|
||||
+
|
||||
+static int meson_crypto_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct resource *res;
|
||||
+ struct meson_dev *mc;
|
||||
+ int err, i;
|
||||
+
|
||||
+ if (!pdev->dev.of_node)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ mc = devm_kzalloc(&pdev->dev, sizeof(*mc), GFP_KERNEL);
|
||||
+ if (!mc)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ mc->dev = &pdev->dev;
|
||||
+ platform_set_drvdata(pdev, mc);
|
||||
+
|
||||
+ dev_info(mc->dev, "GXL crypto driver v1.1\n");
|
||||
+
|
||||
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
+ mc->base = devm_ioremap_resource(&pdev->dev, res);
|
||||
+ if (IS_ERR(mc->base)) {
|
||||
+ err = PTR_ERR(mc->base);
|
||||
+ dev_err(&pdev->dev, "Cannot request MMIO err=%d\n", err);
|
||||
+ return err;
|
||||
+ }
|
||||
+ mc->busclk = devm_clk_get(&pdev->dev, "blkmv");
|
||||
+ if (IS_ERR(mc->busclk)) {
|
||||
+ err = PTR_ERR(mc->busclk);
|
||||
+ dev_err(&pdev->dev, "Cannot get core clock err=%d\n", err);
|
||||
+ return err;
|
||||
+ }
|
||||
+
|
||||
+ mc->irqs = devm_kcalloc(mc->dev, MAXFLOW, sizeof(int), GFP_KERNEL);
|
||||
+ for (i = 0; i < MAXFLOW; i++) {
|
||||
+ mc->irqs[i] = platform_get_irq(pdev, i);
|
||||
+ if (mc->irqs[i] < 0) {
|
||||
+ dev_err(mc->dev, "Cannot get IRQ for flow %d\n", i);
|
||||
+ return mc->irqs[i];
|
||||
+ }
|
||||
+
|
||||
+ err = devm_request_irq(&pdev->dev, mc->irqs[i], meson_irq_handler, 0,
|
||||
+ "gxl-crypto", mc);
|
||||
+ if (err < 0) {
|
||||
+ dev_err(mc->dev, "Cannot request IRQ for flow %d\n", i);
|
||||
+ return err;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ mc->reset = devm_reset_control_get_optional(&pdev->dev, "ahb");
|
||||
+ if (IS_ERR(mc->reset)) {
|
||||
+ if (PTR_ERR(mc->reset) == -EPROBE_DEFER)
|
||||
+ return PTR_ERR(mc->reset);
|
||||
+ dev_info(&pdev->dev, "No reset control found\n");
|
||||
+ mc->reset = NULL;
|
||||
+ }
|
||||
+
|
||||
+ err = clk_prepare_enable(mc->busclk);
|
||||
+ if (err != 0) {
|
||||
+ dev_err(&pdev->dev, "Cannot prepare_enable busclk\n");
|
||||
+ return err;
|
||||
+ }
|
||||
+
|
||||
+ err = reset_control_deassert(mc->reset);
|
||||
+ if (err) {
|
||||
+ dev_err(&pdev->dev, "Cannot deassert reset control\n");
|
||||
+ goto error_clk;
|
||||
+ }
|
||||
+
|
||||
+ mc->chanlist = devm_kcalloc(mc->dev, MAXFLOW,
|
||||
+ sizeof(struct meson_flow), GFP_KERNEL);
|
||||
+ if (!mc->chanlist) {
|
||||
+ err = -ENOMEM;
|
||||
+ goto error_flow;
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < MAXFLOW; i++) {
|
||||
+ init_completion(&mc->chanlist[i].complete);
|
||||
+
|
||||
+ mc->chanlist[i].engine = crypto_engine_alloc_init(mc->dev, 1);
|
||||
+ if (!mc->chanlist[i].engine) {
|
||||
+ dev_err(mc->dev, "Cannot allocate engine\n");
|
||||
+ i--;
|
||||
+ goto error_engine;
|
||||
+ }
|
||||
+ err = crypto_engine_start(mc->chanlist[i].engine);
|
||||
+ if (err) {
|
||||
+ dev_err(mc->dev, "Cannot request engine\n");
|
||||
+ goto error_engine;
|
||||
+ }
|
||||
+ mc->chanlist[i].tl = dma_alloc_coherent(mc->dev,
|
||||
+ sizeof(struct meson_desc) * MAXDESC,
|
||||
+ &mc->chanlist[i].t_phy,
|
||||
+ GFP_KERNEL);
|
||||
+ if (!mc->chanlist[i].tl) {
|
||||
+ dev_err(mc->dev, "Cannot get DMA memory for task %d\n",
|
||||
+ i);
|
||||
+ err = -ENOMEM;
|
||||
+ goto error_engine;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+#ifdef CONFIG_CRYPTO_DEV_AMLOGIC_GXL_DEBUG
|
||||
+ mc->dbgfs_dir = debugfs_create_dir("gxl-crypto", NULL);
|
||||
+ debugfs_create_file("stats", 0444, mc->dbgfs_dir, mc, &meson_debugfs_fops);
|
||||
+#endif
|
||||
+ for (i = 0; i < ARRAY_SIZE(mc_algs); i++) {
|
||||
+ mc_algs[i].mc = mc;
|
||||
+ switch (mc_algs[i].type) {
|
||||
+ case CRYPTO_ALG_TYPE_SKCIPHER:
|
||||
+ err = crypto_register_skcipher(&mc_algs[i].alg.skcipher);
|
||||
+ if (err) {
|
||||
+ dev_err(mc->dev, "Fail to register %s\n",
|
||||
+ mc_algs[i].alg.skcipher.base.cra_name);
|
||||
+ mc_algs[i].mc = NULL;
|
||||
+ goto error_alg;
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+error_alg:
|
||||
+ i--;
|
||||
+ for (; i >= 0; i--) {
|
||||
+ switch (mc_algs[i].type) {
|
||||
+ case CRYPTO_ALG_TYPE_SKCIPHER:
|
||||
+ if (mc_algs[i].mc)
|
||||
+ crypto_unregister_skcipher(&mc_algs[i].alg.skcipher);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+#ifdef CONFIG_CRYPTO_DEV_AMLOGIC_GXL_DEBUG
|
||||
+ debugfs_remove_recursive(mc->dbgfs_dir);
|
||||
+#endif
|
||||
+ i = MAXFLOW;
|
||||
+error_engine:
|
||||
+ while (i >= 0) {
|
||||
+ if (mc->chanlist[i].tl)
|
||||
+ dma_free_coherent(mc->dev, sizeof(struct meson_desc) * MAXDESC,
|
||||
+ mc->chanlist[i].tl, mc->chanlist[i].t_phy);
|
||||
+ i--;
|
||||
+ }
|
||||
+error_flow:
|
||||
+ reset_control_assert(mc->reset);
|
||||
+error_clk:
|
||||
+ clk_disable_unprepare(mc->busclk);
|
||||
+ return err;
|
||||
+}
|
||||
+
|
||||
+static int meson_crypto_remove(struct platform_device *pdev)
|
||||
+{
|
||||
+ int i;
|
||||
+ struct meson_dev *mc = platform_get_drvdata(pdev);
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(mc_algs); i++) {
|
||||
+ switch (mc_algs[i].type) {
|
||||
+ case CRYPTO_ALG_TYPE_SKCIPHER:
|
||||
+ if (mc_algs[i].mc)
|
||||
+ crypto_unregister_skcipher(&mc_algs[i].alg.skcipher);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+#ifdef CONFIG_CRYPTO_DEV_AMLOGIC_GXL_DEBUG
|
||||
+ debugfs_remove_recursive(mc->dbgfs_dir);
|
||||
+#endif
|
||||
+
|
||||
+ reset_control_assert(mc->reset);
|
||||
+ clk_disable_unprepare(mc->busclk);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct of_device_id meson_crypto_of_match_table[] = {
|
||||
+ { .compatible = "amlogic,gxl-crypto", },
|
||||
+ {}
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, meson_crypto_of_match_table);
|
||||
+
|
||||
+static struct platform_driver meson_crypto_driver = {
|
||||
+ .probe = meson_crypto_probe,
|
||||
+ .remove = meson_crypto_remove,
|
||||
+ .driver = {
|
||||
+ .name = "gxl-crypto",
|
||||
+ .of_match_table = meson_crypto_of_match_table,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+module_platform_driver(meson_crypto_driver);
|
||||
+
|
||||
+MODULE_DESCRIPTION("Amlogic GXL cryptographic offloader");
|
||||
+MODULE_LICENSE("GPL");
|
||||
+MODULE_AUTHOR("Corentin Labbe <clabbe@baylibre.com>");
|
||||
diff --git a/drivers/crypto/amlogic/amlogic.h b/drivers/crypto/amlogic/amlogic.h
|
||||
new file mode 100644
|
||||
index 000000000000..23891cc58d7f
|
||||
--- /dev/null
|
||||
+++ b/drivers/crypto/amlogic/amlogic.h
|
||||
@@ -0,0 +1,172 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0 */
|
||||
+/*
|
||||
+ * amlogic.h - hardware cryptographic offloader for Amlogic SoC
|
||||
+ *
|
||||
+ * Copyright (C) 2018-2019 Corentin LABBE <clabbe@baylibre.com>
|
||||
+ */
|
||||
+#include <crypto/aes.h>
|
||||
+#include <crypto/engine.h>
|
||||
+#include <crypto/skcipher.h>
|
||||
+#include <linux/debugfs.h>
|
||||
+#include <linux/crypto.h>
|
||||
+#include <linux/scatterlist.h>
|
||||
+
|
||||
+#define MODE_KEY 1
|
||||
+#define MODE_AES_128 0x8
|
||||
+#define MODE_AES_192 0x9
|
||||
+#define MODE_AES_256 0xa
|
||||
+
|
||||
+#define MESON_DECRYPT 0
|
||||
+#define MESON_ENCRYPT 1
|
||||
+
|
||||
+#define MESON_OPMODE_ECB 0
|
||||
+#define MESON_OPMODE_CBC 1
|
||||
+
|
||||
+#define MAXFLOW 2
|
||||
+
|
||||
+#define MAXDESC 64
|
||||
+
|
||||
+/*
|
||||
+ * struct meson_desc - Descriptor for DMA operations
|
||||
+ * Note that without datasheet, some are unknown
|
||||
+ * @len: length of data to operate
|
||||
+ * @irq: Ignored by hardware
|
||||
+ * @eoc: End of descriptor
|
||||
+ * @loop: Unknown
|
||||
+ * @mode: Type of algorithm (AES, SHA)
|
||||
+ * @begin: Unknown
|
||||
+ * @end: Unknown
|
||||
+ * @op_mode: Blockmode (CBC, ECB)
|
||||
+ * @block: Unknown
|
||||
+ * @error: Unknown
|
||||
+ * @owner: owner of the descriptor, 1 own by HW
|
||||
+ * @t_src: Physical address of data to read
|
||||
+ * @t_dst: Physical address of data to write
|
||||
+ */
|
||||
+struct meson_desc {
|
||||
+ union {
|
||||
+ u32 t_status;
|
||||
+ struct {
|
||||
+ u32 len:17;
|
||||
+ u32 irq:1;
|
||||
+ u32 eoc:1;
|
||||
+ u32 loop:1;
|
||||
+ u32 mode:4;
|
||||
+ u32 begin:1;
|
||||
+ u32 end:1;
|
||||
+ u32 op_mode:2;
|
||||
+ u32 enc:1;
|
||||
+ u32 block:1;
|
||||
+ u32 error:1;
|
||||
+ u32 owner:1;
|
||||
+ };
|
||||
+ };
|
||||
+ u32 t_src;
|
||||
+ u32 t_dst;
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * struct meson_flow - Information used by each flow
|
||||
+ * @engine: ptr to the crypto_engine for this flow
|
||||
+ * @keylen: keylen for this flow operation
|
||||
+ * @complete: completion for the current task on this flow
|
||||
+ * @status: set to 1 by interrupt if task is done
|
||||
+ * @t_phy: Physical address of task
|
||||
+ * @tl: pointer to the current ce_task for this flow
|
||||
+ * @stat_req: number of request done by this flow
|
||||
+ */
|
||||
+struct meson_flow {
|
||||
+ struct crypto_engine *engine;
|
||||
+ struct completion complete;
|
||||
+ int status;
|
||||
+ unsigned int keylen;
|
||||
+ dma_addr_t t_phy;
|
||||
+ struct meson_desc *tl;
|
||||
+#ifdef CONFIG_CRYPTO_DEV_AMLOGIC_GXL_DEBUG
|
||||
+ unsigned long stat_req;
|
||||
+#endif
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * struct meson_dev - main container for all this driver information
|
||||
+ * @base: base address of amlogic-crypto
|
||||
+ * @busclk: bus clock for amlogic-crypto
|
||||
+ * @reset: pointer to reset controller
|
||||
+ * @dev: the platform device
|
||||
+ * @chanlist: array of all flow
|
||||
+ * @flow: flow to use in next request
|
||||
+ * @irqs: IRQ numbers for amlogic-crypto
|
||||
+ * @dbgfs_dir: Debugfs dentry for statistic directory
|
||||
+ * @dbgfs_stats: Debugfs dentry for statistic counters
|
||||
+ */
|
||||
+struct meson_dev {
|
||||
+ void __iomem *base;
|
||||
+ struct clk *busclk;
|
||||
+ struct reset_control *reset;
|
||||
+ struct device *dev;
|
||||
+ struct meson_flow *chanlist;
|
||||
+ atomic_t flow;
|
||||
+ int *irqs;
|
||||
+#ifdef CONFIG_CRYPTO_DEV_AMLOGIC_GXL_DEBUG
|
||||
+ struct dentry *dbgfs_dir;
|
||||
+#endif
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * struct meson_cipher_req_ctx - context for a skcipher request
|
||||
+ * @op_dir: direction (encrypt vs decrypt) for this request
|
||||
+ * @flow: the flow to use for this request
|
||||
+ */
|
||||
+struct meson_cipher_req_ctx {
|
||||
+ u32 op_dir;
|
||||
+ int flow;
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * struct meson_cipher_tfm_ctx - context for a skcipher TFM
|
||||
+ * @enginectx: crypto_engine used by this TFM
|
||||
+ * @key: pointer to key data
|
||||
+ * @keylen: len of the key
|
||||
+ * @keymode: The keymode(type and size of key) associated with this TFM
|
||||
+ * @mc: pointer to the private data of driver handling this TFM
|
||||
+ * @fallback_tfm: pointer to the fallback TFM
|
||||
+ */
|
||||
+struct meson_cipher_tfm_ctx {
|
||||
+ struct crypto_engine_ctx enginectx;
|
||||
+ u32 *key;
|
||||
+ u32 keylen;
|
||||
+ u32 keymode;
|
||||
+ struct meson_dev *mc;
|
||||
+ struct crypto_sync_skcipher *fallback_tfm;
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * struct meson_alg_template - crypto_alg template
|
||||
+ * @type: the CRYPTO_ALG_TYPE for this template
|
||||
+ * @blockmode: the type of block operation
|
||||
+ * @mc: pointer to the meson_dev structure associated with this template
|
||||
+ * @alg: one of sub struct must be used
|
||||
+ * @stat_req: number of request done on this template
|
||||
+ * @stat_fb: total of all data len done on this template
|
||||
+ */
|
||||
+struct meson_alg_template {
|
||||
+ u32 type;
|
||||
+ u32 blockmode;
|
||||
+ union {
|
||||
+ struct skcipher_alg skcipher;
|
||||
+ } alg;
|
||||
+ struct meson_dev *mc;
|
||||
+#ifdef CONFIG_CRYPTO_DEV_AMLOGIC_GXL_DEBUG
|
||||
+ unsigned long stat_req;
|
||||
+ unsigned long stat_fb;
|
||||
+#endif
|
||||
+};
|
||||
+
|
||||
+int meson_enqueue(struct crypto_async_request *areq, u32 type);
|
||||
+
|
||||
+int meson_aes_setkey(struct crypto_skcipher *tfm, const u8 *key,
|
||||
+ unsigned int keylen);
|
||||
+int meson_cipher_init(struct crypto_tfm *tfm);
|
||||
+void meson_cipher_exit(struct crypto_tfm *tfm);
|
||||
+int meson_skdecrypt(struct skcipher_request *areq);
|
||||
+int meson_skencrypt(struct skcipher_request *areq);
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
From ea26c1dd64b66cd5917fdf4b416d7d04c4590c7a Mon Sep 17 00:00:00 2001
|
||||
From: Corentin Labbe <clabbe@baylibre.com>
|
||||
Date: Thu, 25 Jul 2019 19:42:55 +0000
|
||||
Subject: [PATCH 3/4] MAINTAINERS: Add myself as maintainer of amlogic crypto
|
||||
|
||||
I will maintain the amlogic crypto driver.
|
||||
|
||||
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
|
||||
---
|
||||
MAINTAINERS | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/MAINTAINERS b/MAINTAINERS
|
||||
index a2c343ee3b2c..277a3f020959 100644
|
||||
--- a/MAINTAINERS
|
||||
+++ b/MAINTAINERS
|
||||
@@ -1445,6 +1445,13 @@ F: drivers/mmc/host/meson*
|
||||
F: drivers/soc/amlogic/
|
||||
N: meson
|
||||
|
||||
+ARM/Amlogic Meson SoC Crypto Drivers
|
||||
+M: Corentin Labbe <clabbe@baylibre.com>
|
||||
+L: linux-crypto@vger.kernel.org
|
||||
+S: Maintained
|
||||
+F: drivers/crypto/amlogic/
|
||||
+F: Documentation/devicetree/bindings/crypto/amlogic*
|
||||
+
|
||||
ARM/Amlogic Meson SoC Sound Drivers
|
||||
M: Jerome Brunet <jbrunet@baylibre.com>
|
||||
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
From e71297718cc4a387e6f062ce44d9d187747cf129 Mon Sep 17 00:00:00 2001
|
||||
From: Corentin Labbe <clabbe@baylibre.com>
|
||||
Date: Thu, 25 Jul 2019 19:42:56 +0000
|
||||
Subject: [PATCH 4/4] ARM64: dts: amlogic: adds crypto hardware node
|
||||
|
||||
This patch adds the GXL crypto hardware node for all GXL SoCs.
|
||||
|
||||
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
|
||||
index a09c53aaa0e8..905771a463f9 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
|
||||
@@ -36,6 +36,17 @@
|
||||
phys = <&usb3_phy>, <&usb2_phy0>, <&usb2_phy1>;
|
||||
};
|
||||
};
|
||||
+
|
||||
+ crypto: crypto@c883e000 {
|
||||
+ compatible = "amlogic,gxl-crypto";
|
||||
+ reg = <0x0 0xc883e000 0x0 0x36>;
|
||||
+ interrupts = <GIC_SPI 188 IRQ_TYPE_EDGE_RISING>,
|
||||
+ <GIC_SPI 189 IRQ_TYPE_EDGE_RISING>;
|
||||
+ clocks = <&clkc CLKID_BLKMV>;
|
||||
+ clock-names = "blkmv";
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
};
|
||||
};
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
71
patch/kernel/meson64-dev/board-VIM1-0069-fix.patch
Normal file
71
patch/kernel/meson64-dev/board-VIM1-0069-fix.patch
Normal file
|
@ -0,0 +1,71 @@
|
|||
From 12c5dbdae16c4cd2d9914b7a4e31275f3d2070c6 Mon Sep 17 00:00:00 2001
|
||||
From: balbes150 <balbes-150@yandex.ru>
|
||||
Date: Mon, 18 Mar 2019 17:40:57 +0300
|
||||
Subject: [PATCH 69/91] fix
|
||||
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 1 +
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c | 1 +
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 ++
|
||||
include/linux/mmc/sdio_ids.h | 1 +
|
||||
4 files changed, 5 insertions(+)
|
||||
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
|
||||
index d64bf23..0e80530 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
|
||||
@@ -982,6 +982,7 @@ static const struct sdio_device_id brcmf_sdmmc_ids[] = {
|
||||
BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_43455),
|
||||
BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4354),
|
||||
BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4356),
|
||||
+ BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4359),
|
||||
BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_CYPRESS_4373),
|
||||
BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_CYPRESS_43012),
|
||||
{ /* end: all zeroes */ }
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
|
||||
index 22534bf..1461794 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
|
||||
@@ -1348,6 +1348,7 @@ bool brcmf_chip_sr_capable(struct brcmf_chip *pub)
|
||||
switch (pub->chip) {
|
||||
case BRCM_CC_4354_CHIP_ID:
|
||||
case BRCM_CC_4356_CHIP_ID:
|
||||
+ case BRCM_CC_4359_CHIP_ID:
|
||||
case BRCM_CC_4345_CHIP_ID:
|
||||
/* explicitly check SR engine enable bit */
|
||||
pmu_cc3_mask = BIT(2);
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
index 0cd5b8d..7809aa1 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
@@ -624,6 +624,7 @@ BRCMF_FW_DEF(43430A1, "brcmfmac43430-sdio");
|
||||
BRCMF_FW_DEF(43455, "brcmfmac43455-sdio");
|
||||
BRCMF_FW_DEF(4354, "brcmfmac4354-sdio");
|
||||
BRCMF_FW_DEF(4356, "brcmfmac4356-sdio");
|
||||
+BRCMF_FW_DEF(4359, "brcmfmac4359-sdio");
|
||||
BRCMF_FW_DEF(4373, "brcmfmac4373-sdio");
|
||||
BRCMF_FW_DEF(43012, "brcmfmac43012-sdio");
|
||||
|
||||
@@ -645,6 +646,7 @@ static const struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = {
|
||||
BRCMF_FW_ENTRY(BRCM_CC_4345_CHIP_ID, 0xFFFFFFC0, 43455),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_4354_CHIP_ID, 0xFFFFFFFF, 4354),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_4356_CHIP_ID, 0xFFFFFFFF, 4356),
|
||||
+ BRCMF_FW_ENTRY(BRCM_CC_4359_CHIP_ID, 0xFFFFFFFF, 4359),
|
||||
BRCMF_FW_ENTRY(CY_CC_4373_CHIP_ID, 0xFFFFFFFF, 4373),
|
||||
BRCMF_FW_ENTRY(CY_CC_43012_CHIP_ID, 0xFFFFFFFF, 43012)
|
||||
};
|
||||
diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h
|
||||
index 4332199..93a5ac7 100644
|
||||
--- a/include/linux/mmc/sdio_ids.h
|
||||
+++ b/include/linux/mmc/sdio_ids.h
|
||||
@@ -41,6 +41,7 @@
|
||||
#define SDIO_DEVICE_ID_BROADCOM_43455 0xa9bf
|
||||
#define SDIO_DEVICE_ID_BROADCOM_4354 0x4354
|
||||
#define SDIO_DEVICE_ID_BROADCOM_4356 0x4356
|
||||
+#define SDIO_DEVICE_ID_BROADCOM_4359 0x4359
|
||||
#define SDIO_DEVICE_ID_CYPRESS_4373 0x4373
|
||||
#define SDIO_DEVICE_ID_CYPRESS_43012 43012
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
25
patch/kernel/meson64-dev/board-VIM1-fixup-btbcm.patch
Normal file
25
patch/kernel/meson64-dev/board-VIM1-fixup-btbcm.patch
Normal file
|
@ -0,0 +1,25 @@
|
|||
From 198ba00ac6a46645a083baad7ddca790a3a1cb94 Mon Sep 17 00:00:00 2001
|
||||
From: Nick <nick@khadas.com>
|
||||
Date: Mon, 25 Mar 2019 10:58:49 +0800
|
||||
Subject: [PATCH 78/91] VIM1: fixup btbcm
|
||||
|
||||
---
|
||||
drivers/bluetooth/btbcm.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c
|
||||
index d5d6e6e..244ca4d 100644
|
||||
--- a/drivers/bluetooth/btbcm.c
|
||||
+++ b/drivers/bluetooth/btbcm.c
|
||||
@@ -337,7 +337,7 @@ static const struct bcm_subver_table bcm_uart_subver_table[] = {
|
||||
{ 0x6109, "BCM4335C0" }, /* 003.001.009 */
|
||||
{ 0x610c, "BCM4354" }, /* 003.001.012 */
|
||||
{ 0x2122, "BCM4343A0" }, /* 001.001.034 */
|
||||
- { 0x2209, "BCM43430A1" }, /* 001.002.009 */
|
||||
+ { 0x2209, "BCM43438A1" }, /* 001.002.009 */
|
||||
{ 0x6119, "BCM4345C0" }, /* 003.001.025 */
|
||||
{ 0x230f, "BCM4356A2" }, /* 001.003.015 */
|
||||
{ 0x220e, "BCM20702A1" }, /* 001.002.014 */
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
diff --git a/drivers/media/rc/meson-ir.c b/drivers/media/rc/meson-ir.c
|
||||
index f449b35d25e7..9747426719b2 100644
|
||||
--- a/drivers/media/rc/meson-ir.c
|
||||
+++ b/drivers/media/rc/meson-ir.c
|
||||
@@ -97,7 +97,8 @@ static irqreturn_t meson_ir_irq(int irqno, void *dev_id)
|
||||
status = readl_relaxed(ir->reg + IR_DEC_STATUS);
|
||||
rawir.pulse = !!(status & STATUS_IR_DEC_IN);
|
||||
|
||||
- ir_raw_event_store_with_timeout(ir->rc, &rawir);
|
||||
+ if (ir_raw_event_store_with_filter(ir->rc, &rawir))
|
||||
+ ir_raw_event_handle(ir->rc);
|
||||
|
||||
spin_unlock(&ir->lock);
|
||||
|
22
patch/kernel/meson64-dev/board-nanopi_k2_enable_emmc.patch
Normal file
22
patch/kernel/meson64-dev/board-nanopi_k2_enable_emmc.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
|
||||
index 80c87e0bb..340559727 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
|
||||
@@ -382,7 +382,7 @@
|
||||
|
||||
/* eMMC */
|
||||
&sd_emmc_c {
|
||||
- status = "disabled";
|
||||
+ status = "okay";
|
||||
pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
|
||||
pinctrl-1 = <&emmc_clk_gate_pins>;
|
||||
pinctrl-names = "default", "clk-gate";
|
||||
@@ -392,8 +392,6 @@
|
||||
non-removable;
|
||||
disable-wp;
|
||||
cap-mmc-highspeed;
|
||||
- mmc-ddr-1_8v;
|
||||
- mmc-hs200-1_8v;
|
||||
|
||||
mmc-pwrseq = <&emmc_pwrseq>;
|
||||
vmmc-supply = <&vcc3v3>;
|
|
@ -0,0 +1,12 @@
|
|||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
|
||||
index cbe99bd..80c87e0 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
aliases {
|
||||
serial0 = &uart_AO;
|
||||
+ serial2 = &uart_C;
|
||||
ethernet0 = ðmac;
|
||||
};
|
||||
|
25
patch/kernel/meson64-dev/board-odroidc2-add-uartA.patch
Normal file
25
patch/kernel/meson64-dev/board-odroidc2-add-uartA.patch
Normal file
|
@ -0,0 +1,25 @@
|
|||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
||||
index 1cc9dc6..9f48dff 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
aliases {
|
||||
serial0 = &uart_AO;
|
||||
+ serial1 = &uart_A;
|
||||
ethernet0 = ðmac;
|
||||
};
|
||||
|
||||
@@ -290,6 +355,12 @@
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
+&uart_A {
|
||||
+ status = "disabled";
|
||||
+ pinctrl-0 = <&uart_a_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+};
|
||||
+
|
||||
&usb0_phy {
|
||||
status = "okay";
|
||||
phy-supply = <&usb_otg_pwr>;
|
37
patch/kernel/meson64-dev/board-odroidc2-enable-SPI.patch
Normal file
37
patch/kernel/meson64-dev/board-odroidc2-enable-SPI.patch
Normal file
|
@ -0,0 +1,37 @@
|
|||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
||||
index c3c875a73..55c7dd3f4 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
||||
@@ -135,6 +135,32 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+ spi-gpio {
|
||||
+ compatible = "spi-gpio";
|
||||
+ #address-cells = <0x1>;
|
||||
+ #size-cells = <0x0>;
|
||||
+ ranges;
|
||||
+ status = "ok";
|
||||
+ sck-gpios = <&gpio GPIOX_2 0>;
|
||||
+ miso-gpios = <&gpio GPIOX_4 0>;
|
||||
+ mosi-gpios = <&gpio GPIOX_7 0>;
|
||||
+ cs-gpios = <&gpio GPIOX_1 0
|
||||
+ &gpio GPIOY_14 0>;
|
||||
+ num-chipselects = <2>;
|
||||
+
|
||||
+ /* clients */
|
||||
+ spidev0@0 {
|
||||
+ compatible = "spidev";
|
||||
+ reg = <0>;
|
||||
+ spi-max-frequency = <500000>;
|
||||
+ };
|
||||
+ spidev0@1 {
|
||||
+ compatible = "spidev";
|
||||
+ reg = <1>;
|
||||
+ spi-max-frequency = <500000>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&cec_AO {
|
|
@ -0,0 +1,14 @@
|
|||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
||||
index d147c853a..dbde670ba 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
||||
@@ -246,7 +246,8 @@
|
||||
};
|
||||
|
||||
&scpi_clocks {
|
||||
- status = "disabled";
|
||||
+ /* Works only with new blobs that have limited DVFS table */
|
||||
+ status = "okay";
|
||||
};
|
||||
|
||||
/* SD */
|
38
patch/kernel/meson64-dev/board_nanopi_k2_add_spidev.patch
Normal file
38
patch/kernel/meson64-dev/board_nanopi_k2_add_spidev.patch
Normal file
|
@ -0,0 +1,38 @@
|
|||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
|
||||
index fa4d9f927..b498186a5 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
|
||||
@@ -162,6 +162,32 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+ spi-gpio {
|
||||
+ compatible = "spi-gpio";
|
||||
+ #address-cells = <0x1>;
|
||||
+ #size-cells = <0x0>;
|
||||
+ ranges;
|
||||
+ status = "ok";
|
||||
+ sck-gpios = <&gpio GPIOY_9 0>;
|
||||
+ miso-gpios = <&gpio GPIOY_7 0>;
|
||||
+ mosi-gpios = <&gpio GPIOY_5 0>;
|
||||
+ cs-gpios = <&gpio GPIOY_8 0
|
||||
+ &gpio GPIOY_10 0>;
|
||||
+ num-chipselects = <2>;
|
||||
+
|
||||
+ /* clients */
|
||||
+ spidev0@0 {
|
||||
+ compatible = "spidev";
|
||||
+ reg = <0>;
|
||||
+ spi-max-frequency = <500000>;
|
||||
+ };
|
||||
+ spidev0@1 {
|
||||
+ compatible = "spidev";
|
||||
+ reg = <1>;
|
||||
+ spi-max-frequency = <500000>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&audio {
|
||||
|
326
patch/kernel/meson64-dev/general-add-configfs-overlay.patch
Normal file
326
patch/kernel/meson64-dev/general-add-configfs-overlay.patch
Normal file
|
@ -0,0 +1,326 @@
|
|||
diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig
|
||||
index bc07ad3..e9da9cf 100644
|
||||
--- a/drivers/of/Kconfig
|
||||
+++ b/drivers/of/Kconfig
|
||||
@@ -113,6 +113,13 @@ config OF_OVERLAY
|
||||
While this option is selected automatically when needed, you can
|
||||
enable it manually to improve device tree unit test coverage.
|
||||
|
||||
+config OF_CONFIGFS
|
||||
+ bool "Device Tree Overlay ConfigFS interface"
|
||||
+ select CONFIGFS_FS
|
||||
+ depends on OF_OVERLAY
|
||||
+ help
|
||||
+ Enable a simple user-space driven DT overlay interface.
|
||||
+
|
||||
config OF_NUMA
|
||||
bool
|
||||
|
||||
diff --git a/drivers/of/Makefile b/drivers/of/Makefile
|
||||
index d7efd9d..a06cc35 100644
|
||||
--- a/drivers/of/Makefile
|
||||
+++ b/drivers/of/Makefile
|
||||
@@ -13,6 +13,7 @@ obj-$(CONFIG_OF_PCI_IRQ) += of_pci_irq.o
|
||||
obj-$(CONFIG_OF_RESERVED_MEM) += of_reserved_mem.o
|
||||
obj-$(CONFIG_OF_RESOLVE) += resolver.o
|
||||
obj-$(CONFIG_OF_OVERLAY) += overlay.o
|
||||
+obj-$(CONFIG_OF_CONFIGFS) += configfs.o
|
||||
obj-$(CONFIG_OF_NUMA) += of_numa.o
|
||||
|
||||
obj-$(CONFIG_OF_UNITTEST) += unittest-data/
|
||||
diff --git a/drivers/of/configfs.c b/drivers/of/configfs.c
|
||||
new file mode 100644
|
||||
index 0000000..68f889d
|
||||
--- /dev/null
|
||||
+++ b/drivers/of/configfs.c
|
||||
@@ -0,0 +1,277 @@
|
||||
+/*
|
||||
+ * Configfs entries for device-tree
|
||||
+ *
|
||||
+ * Copyright (C) 2013 - Pantelis Antoniou <panto@antoniou-consulting.com>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License
|
||||
+ * as published by the Free Software Foundation; either version
|
||||
+ * 2 of the License, or (at your option) any later version.
|
||||
+ */
|
||||
+#include <linux/ctype.h>
|
||||
+#include <linux/cpu.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/of.h>
|
||||
+#include <linux/of_fdt.h>
|
||||
+#include <linux/spinlock.h>
|
||||
+#include <linux/slab.h>
|
||||
+#include <linux/proc_fs.h>
|
||||
+#include <linux/configfs.h>
|
||||
+#include <linux/types.h>
|
||||
+#include <linux/stat.h>
|
||||
+#include <linux/limits.h>
|
||||
+#include <linux/file.h>
|
||||
+#include <linux/vmalloc.h>
|
||||
+#include <linux/firmware.h>
|
||||
+#include <linux/sizes.h>
|
||||
+
|
||||
+#include "of_private.h"
|
||||
+
|
||||
+struct cfs_overlay_item {
|
||||
+ struct config_item item;
|
||||
+
|
||||
+ char path[PATH_MAX];
|
||||
+
|
||||
+ const struct firmware *fw;
|
||||
+ struct device_node *overlay;
|
||||
+ int ov_id;
|
||||
+
|
||||
+ void *dtbo;
|
||||
+ int dtbo_size;
|
||||
+};
|
||||
+
|
||||
+static inline struct cfs_overlay_item *to_cfs_overlay_item(
|
||||
+ struct config_item *item)
|
||||
+{
|
||||
+ return item ? container_of(item, struct cfs_overlay_item, item) : NULL;
|
||||
+}
|
||||
+
|
||||
+static ssize_t cfs_overlay_item_path_show(struct config_item *item,
|
||||
+ char *page)
|
||||
+{
|
||||
+ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item);
|
||||
+ return sprintf(page, "%s\n", overlay->path);
|
||||
+}
|
||||
+
|
||||
+static ssize_t cfs_overlay_item_path_store(struct config_item *item,
|
||||
+ const char *page, size_t count)
|
||||
+{
|
||||
+ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item);
|
||||
+ const char *p = page;
|
||||
+ char *s;
|
||||
+ int err;
|
||||
+
|
||||
+ /* if it's set do not allow changes */
|
||||
+ if (overlay->path[0] != '\0' || overlay->dtbo_size > 0)
|
||||
+ return -EPERM;
|
||||
+
|
||||
+ /* copy to path buffer (and make sure it's always zero terminated */
|
||||
+ count = snprintf(overlay->path, sizeof(overlay->path) - 1, "%s", p);
|
||||
+ overlay->path[sizeof(overlay->path) - 1] = '\0';
|
||||
+
|
||||
+ /* strip trailing newlines */
|
||||
+ s = overlay->path + strlen(overlay->path);
|
||||
+ while (s > overlay->path && *--s == '\n')
|
||||
+ *s = '\0';
|
||||
+
|
||||
+ pr_debug("%s: path is '%s'\n", __func__, overlay->path);
|
||||
+
|
||||
+ err = request_firmware(&overlay->fw, overlay->path, NULL);
|
||||
+ if (err != 0)
|
||||
+ goto out_err;
|
||||
+
|
||||
+ err = of_overlay_fdt_apply((void *)overlay->fw->data,
|
||||
+ (u32)overlay->fw->size, &overlay->ov_id);
|
||||
+ if (err != 0)
|
||||
+ goto out_err;
|
||||
+
|
||||
+ return count;
|
||||
+
|
||||
+out_err:
|
||||
+
|
||||
+ release_firmware(overlay->fw);
|
||||
+ overlay->fw = NULL;
|
||||
+
|
||||
+ overlay->path[0] = '\0';
|
||||
+ return err;
|
||||
+}
|
||||
+
|
||||
+static ssize_t cfs_overlay_item_status_show(struct config_item *item,
|
||||
+ char *page)
|
||||
+{
|
||||
+ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item);
|
||||
+
|
||||
+ return sprintf(page, "%s\n",
|
||||
+ overlay->ov_id > 0 ? "applied" : "unapplied");
|
||||
+}
|
||||
+
|
||||
+CONFIGFS_ATTR(cfs_overlay_item_, path);
|
||||
+CONFIGFS_ATTR_RO(cfs_overlay_item_, status);
|
||||
+
|
||||
+static struct configfs_attribute *cfs_overlay_attrs[] = {
|
||||
+ &cfs_overlay_item_attr_path,
|
||||
+ &cfs_overlay_item_attr_status,
|
||||
+ NULL,
|
||||
+};
|
||||
+
|
||||
+ssize_t cfs_overlay_item_dtbo_read(struct config_item *item,
|
||||
+ void *buf, size_t max_count)
|
||||
+{
|
||||
+ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item);
|
||||
+
|
||||
+ pr_debug("%s: buf=%p max_count=%zu\n", __func__,
|
||||
+ buf, max_count);
|
||||
+
|
||||
+ if (overlay->dtbo == NULL)
|
||||
+ return 0;
|
||||
+
|
||||
+ /* copy if buffer provided */
|
||||
+ if (buf != NULL) {
|
||||
+ /* the buffer must be large enough */
|
||||
+ if (overlay->dtbo_size > max_count)
|
||||
+ return -ENOSPC;
|
||||
+
|
||||
+ memcpy(buf, overlay->dtbo, overlay->dtbo_size);
|
||||
+ }
|
||||
+
|
||||
+ return overlay->dtbo_size;
|
||||
+}
|
||||
+
|
||||
+ssize_t cfs_overlay_item_dtbo_write(struct config_item *item,
|
||||
+ const void *buf, size_t count)
|
||||
+{
|
||||
+ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item);
|
||||
+ int err;
|
||||
+
|
||||
+ /* if it's set do not allow changes */
|
||||
+ if (overlay->path[0] != '\0' || overlay->dtbo_size > 0)
|
||||
+ return -EPERM;
|
||||
+
|
||||
+ /* copy the contents */
|
||||
+ overlay->dtbo = kmemdup(buf, count, GFP_KERNEL);
|
||||
+ if (overlay->dtbo == NULL)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ overlay->dtbo_size = count;
|
||||
+
|
||||
+ err = of_overlay_fdt_apply(overlay->dtbo, overlay->dtbo_size,
|
||||
+ &overlay->ov_id);
|
||||
+ if (err != 0)
|
||||
+ goto out_err;
|
||||
+
|
||||
+ return count;
|
||||
+
|
||||
+out_err:
|
||||
+ kfree(overlay->dtbo);
|
||||
+ overlay->dtbo = NULL;
|
||||
+ overlay->dtbo_size = 0;
|
||||
+ overlay->ov_id = 0;
|
||||
+
|
||||
+ return err;
|
||||
+}
|
||||
+
|
||||
+CONFIGFS_BIN_ATTR(cfs_overlay_item_, dtbo, NULL, SZ_1M);
|
||||
+
|
||||
+static struct configfs_bin_attribute *cfs_overlay_bin_attrs[] = {
|
||||
+ &cfs_overlay_item_attr_dtbo,
|
||||
+ NULL,
|
||||
+};
|
||||
+
|
||||
+static void cfs_overlay_release(struct config_item *item)
|
||||
+{
|
||||
+ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item);
|
||||
+
|
||||
+ if (overlay->ov_id > 0)
|
||||
+ of_overlay_remove(&overlay->ov_id);
|
||||
+ if (overlay->fw)
|
||||
+ release_firmware(overlay->fw);
|
||||
+ /* kfree with NULL is safe */
|
||||
+ kfree(overlay->dtbo);
|
||||
+ kfree(overlay);
|
||||
+}
|
||||
+
|
||||
+static struct configfs_item_operations cfs_overlay_item_ops = {
|
||||
+ .release = cfs_overlay_release,
|
||||
+};
|
||||
+
|
||||
+static struct config_item_type cfs_overlay_type = {
|
||||
+ .ct_item_ops = &cfs_overlay_item_ops,
|
||||
+ .ct_attrs = cfs_overlay_attrs,
|
||||
+ .ct_bin_attrs = cfs_overlay_bin_attrs,
|
||||
+ .ct_owner = THIS_MODULE,
|
||||
+};
|
||||
+
|
||||
+static struct config_item *cfs_overlay_group_make_item(
|
||||
+ struct config_group *group, const char *name)
|
||||
+{
|
||||
+ struct cfs_overlay_item *overlay;
|
||||
+
|
||||
+ overlay = kzalloc(sizeof(*overlay), GFP_KERNEL);
|
||||
+ if (!overlay)
|
||||
+ return ERR_PTR(-ENOMEM);
|
||||
+
|
||||
+ config_item_init_type_name(&overlay->item, name, &cfs_overlay_type);
|
||||
+ return &overlay->item;
|
||||
+}
|
||||
+
|
||||
+static void cfs_overlay_group_drop_item(struct config_group *group,
|
||||
+ struct config_item *item)
|
||||
+{
|
||||
+ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item);
|
||||
+
|
||||
+ config_item_put(&overlay->item);
|
||||
+}
|
||||
+
|
||||
+static struct configfs_group_operations overlays_ops = {
|
||||
+ .make_item = cfs_overlay_group_make_item,
|
||||
+ .drop_item = cfs_overlay_group_drop_item,
|
||||
+};
|
||||
+
|
||||
+static struct config_item_type overlays_type = {
|
||||
+ .ct_group_ops = &overlays_ops,
|
||||
+ .ct_owner = THIS_MODULE,
|
||||
+};
|
||||
+
|
||||
+static struct configfs_group_operations of_cfs_ops = {
|
||||
+ /* empty - we don't allow anything to be created */
|
||||
+};
|
||||
+
|
||||
+static struct config_item_type of_cfs_type = {
|
||||
+ .ct_group_ops = &of_cfs_ops,
|
||||
+ .ct_owner = THIS_MODULE,
|
||||
+};
|
||||
+
|
||||
+struct config_group of_cfs_overlay_group;
|
||||
+
|
||||
+static struct configfs_subsystem of_cfs_subsys = {
|
||||
+ .su_group = {
|
||||
+ .cg_item = {
|
||||
+ .ci_namebuf = "device-tree",
|
||||
+ .ci_type = &of_cfs_type,
|
||||
+ },
|
||||
+ },
|
||||
+ .su_mutex = __MUTEX_INITIALIZER(of_cfs_subsys.su_mutex),
|
||||
+};
|
||||
+
|
||||
+static int __init of_cfs_init(void)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ pr_info("%s\n", __func__);
|
||||
+
|
||||
+ config_group_init(&of_cfs_subsys.su_group);
|
||||
+ config_group_init_type_name(&of_cfs_overlay_group, "overlays",
|
||||
+ &overlays_type);
|
||||
+ configfs_add_default_group(&of_cfs_overlay_group,
|
||||
+ &of_cfs_subsys.su_group);
|
||||
+
|
||||
+ ret = configfs_register_subsystem(&of_cfs_subsys);
|
||||
+ if (ret != 0) {
|
||||
+ pr_err("%s: failed to register subsys\n", __func__);
|
||||
+ goto out;
|
||||
+ }
|
||||
+ pr_info("%s: OK\n", __func__);
|
||||
+out:
|
||||
+ return ret;
|
||||
+}
|
||||
+late_initcall(of_cfs_init);
|
||||
diff --git a/drivers/of/fdt_address.c b/drivers/of/fdt_address.c
|
||||
index dca8f9b..ec7e167 100644
|
||||
--- a/drivers/of/fdt_address.c
|
||||
+++ b/drivers/of/fdt_address.c
|
||||
@@ -161,7 +161,7 @@ static int __init fdt_translate_one(const void *blob, int parent,
|
||||
* that can be mapped to a cpu physical address). This is not really specified
|
||||
* that way, but this is traditionally the way IBM at least do things
|
||||
*/
|
||||
-static u64 __init fdt_translate_address(const void *blob, int node_offset)
|
||||
+u64 __init fdt_translate_address(const void *blob, int node_offset)
|
||||
{
|
||||
int parent, len;
|
||||
const struct of_bus *bus, *pbus;
|
|
@ -0,0 +1,84 @@
|
|||
diff --git a/arch/arm/boot/.gitignore b/arch/arm/boot/.gitignore
|
||||
index 3c79f859..4e5c1d59 100644
|
||||
--- a/arch/arm/boot/.gitignore
|
||||
+++ b/arch/arm/boot/.gitignore
|
||||
@@ -3,3 +3,5 @@ zImage
|
||||
xipImage
|
||||
bootpImage
|
||||
uImage
|
||||
+*.dtb*
|
||||
+*.scr
|
||||
diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst
|
||||
index 34614a48..8a8313d6 100644
|
||||
--- a/scripts/Makefile.dtbinst
|
||||
+++ b/scripts/Makefile.dtbinst
|
||||
@@ -20,6 +20,9 @@ include scripts/Kbuild.include
|
||||
include $(src)/Makefile
|
||||
|
||||
dtbinst-files := $(sort $(dtb-y) $(if $(CONFIG_OF_ALL_DTBS), $(dtb-)))
|
||||
+dtboinst-files := $(dtbo-y)
|
||||
+script-files := $(scr-y)
|
||||
+readme-files := $(dtbotxt-y)
|
||||
dtbinst-dirs := $(subdir-y) $(subdir-m)
|
||||
|
||||
# Helper targets for Installing DTBs into the boot directory
|
||||
@@ -32,10 +35,19 @@ install-dir = $(patsubst $(dtbinst-root)%,$(INSTALL_DTBS_PATH)%,$(obj))
|
||||
$(dtbinst-files): %.dtb: $(obj)/%.dtb
|
||||
$(call cmd,dtb_install,$(install-dir))
|
||||
|
||||
+$(dtboinst-files): %.dtbo: $(obj)/%.dtbo
|
||||
+ $(call cmd,dtb_install,$(install-dir))
|
||||
+
|
||||
+$(script-files): %.scr: $(obj)/%.scr
|
||||
+ $(call cmd,dtb_install,$(install-dir))
|
||||
+
|
||||
+$(readme-files): %: $(src)/%
|
||||
+ $(call cmd,dtb_install,$(install-dir))
|
||||
+
|
||||
$(dtbinst-dirs):
|
||||
$(Q)$(MAKE) $(dtbinst)=$(obj)/$@
|
||||
|
||||
-PHONY += $(dtbinst-files) $(dtbinst-dirs)
|
||||
-__dtbs_install: $(dtbinst-files) $(dtbinst-dirs)
|
||||
+PHONY += $(dtbinst-files) $(dtboinst-files) $(script-files) $(readme-files) $(dtbinst-dirs)
|
||||
+__dtbs_install: $(dtbinst-files) $(dtboinst-files) $(script-files) $(readme-files) $(dtbinst-dirs)
|
||||
|
||||
.PHONY: $(PHONY)
|
||||
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
|
||||
index 58c05e5d..2b95dda9 100644
|
||||
--- a/scripts/Makefile.lib
|
||||
+++ b/scripts/Makefile.lib
|
||||
@@ -278,6 +278,9 @@ cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -n -f -9 > $@) || \
|
||||
# ---------------------------------------------------------------------------
|
||||
DTC ?= $(objtree)/scripts/dtc/dtc
|
||||
|
||||
+# Overlay support
|
||||
+DTC_FLAGS += -@ -Wno-unit_address_format -Wno-simple_bus_reg
|
||||
+
|
||||
# Disable noisy checks by default
|
||||
ifeq ($(KBUILD_ENABLE_EXTRA_GCC_CHECKS),)
|
||||
DTC_FLAGS += -Wno-unit_address_vs_reg \
|
||||
@@ -324,6 +327,23 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
|
||||
$(obj)/%.dtb: $(src)/%.dts FORCE
|
||||
$(call if_changed_dep,dtc)
|
||||
|
||||
+quiet_cmd_dtco = DTCO $@
|
||||
+cmd_dtco = mkdir -p $(dir ${dtc-tmp}) ; \
|
||||
+ $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
|
||||
+ $(DTC) -O dtb -o $@ -b 0 \
|
||||
+ -i $(dir $<) $(DTC_FLAGS) \
|
||||
+ -d $(depfile).dtc.tmp $(dtc-tmp) ; \
|
||||
+ cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
|
||||
+
|
||||
+$(obj)/%.dtbo: $(src)/%.dts FORCE
|
||||
+ $(call if_changed_dep,dtco)
|
||||
+
|
||||
+quiet_cmd_scr = MKIMAGE $@
|
||||
+cmd_scr = mkimage -C none -A $(ARCH) -T script -d $< $@
|
||||
+
|
||||
+$(obj)/%.scr: $(src)/%.scr-cmd FORCE
|
||||
+ $(call if_changed,scr)
|
||||
+
|
||||
dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
|
||||
|
||||
# Bzip2
|
|
@ -0,0 +1,12 @@
|
|||
diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
|
||||
index bf7052e03..93561a2df 100644
|
||||
--- a/drivers/usb/dwc2/params.c
|
||||
+++ b/drivers/usb/dwc2/params.c
|
||||
@@ -110,6 +110,7 @@ static void dwc2_set_amlogic_params(struct dwc2_hsotg *hsotg)
|
||||
p->phy_type = DWC2_PHY_TYPE_PARAM_UTMI;
|
||||
p->ahbcfg = GAHBCFG_HBSTLEN_INCR8 <<
|
||||
GAHBCFG_HBSTLEN_SHIFT;
|
||||
+ p->power_down = false;
|
||||
}
|
||||
|
||||
static void dwc2_set_amcc_params(struct dwc2_hsotg *hsotg)
|
|
@ -0,0 +1,22 @@
|
|||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
|
||||
index 98cbba6..48ca119 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
|
||||
@@ -321,6 +322,8 @@
|
||||
|
||||
&i2c_A {
|
||||
clocks = <&clkc CLKID_I2C>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2c_a_pins>;
|
||||
};
|
||||
|
||||
&i2c_AO {
|
||||
@@ -329,6 +332,8 @@
|
||||
|
||||
&i2c_B {
|
||||
clocks = <&clkc CLKID_I2C>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2c_b_pins>;
|
||||
};
|
||||
|
||||
&i2c_C {
|
262
patch/kernel/meson64-dev/general-meson64-overlays.patch
Normal file
262
patch/kernel/meson64-dev/general-meson64-overlays.patch
Normal file
|
@ -0,0 +1,262 @@
|
|||
From 58c5526eb1798e61e4e76d37140cf10c8d325bc7 Mon Sep 17 00:00:00 2001
|
||||
From: Zhang Ning <832666+zhangn1985@users.noreply.github.com>
|
||||
Date: Thu, 19 Sep 2019 16:20:31 +0800
|
||||
Subject: [PATCH] general: meson64 overlays
|
||||
|
||||
Signed-off-by: Zhang Ning <832666+zhangn1985@users.noreply.github.com>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/Makefile | 2 ++
|
||||
arch/arm64/boot/dts/amlogic/overlay/Makefile | 20 ++++++++++++
|
||||
.../dts/amlogic/overlay/README.meson-overlays | 20 ++++++++++++
|
||||
.../dts/amlogic/overlay/meson-fixup.scr-cmd | 4 +++
|
||||
.../boot/dts/amlogic/overlay/meson-i2cA.dts | 17 ++++++++++
|
||||
.../boot/dts/amlogic/overlay/meson-i2cB.dts | 17 ++++++++++
|
||||
.../boot/dts/amlogic/overlay/meson-uartA.dts | 11 +++++++
|
||||
.../boot/dts/amlogic/overlay/meson-uartC.dts | 11 +++++++
|
||||
.../dts/amlogic/overlay/meson-w1-gpio.dts | 20 ++++++++++++
|
||||
.../dts/amlogic/overlay/meson-w1AB-gpio.dts | 32 +++++++++++++++++++
|
||||
scripts/Makefile.lib | 3 ++
|
||||
12 files changed, 165 insertions(+)
|
||||
create mode 100644 arch/arm64/boot/dts/amlogic/overlay/Makefile
|
||||
create mode 100644 arch/arm64/boot/dts/amlogic/overlay/README.meson-overlays
|
||||
create mode 100644 arch/arm64/boot/dts/amlogic/overlay/meson-fixup.scr-cmd
|
||||
create mode 100644 arch/arm64/boot/dts/amlogic/overlay/meson-i2cA.dts
|
||||
create mode 100644 arch/arm64/boot/dts/amlogic/overlay/meson-i2cB.dts
|
||||
create mode 100644 arch/arm64/boot/dts/amlogic/overlay/meson-uartA.dts
|
||||
create mode 100644 arch/arm64/boot/dts/amlogic/overlay/meson-uartC.dts
|
||||
create mode 100644 arch/arm64/boot/dts/amlogic/overlay/meson-w1-gpio.dts
|
||||
create mode 100644 arch/arm64/boot/dts/amlogic/overlay/meson-w1AB-gpio.dts
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
|
||||
index 07b861f..9d12b15 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
||||
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
||||
@@ -32,3 +32,5 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q200.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-vega-s96.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-sei610.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-khadas-vim3l.dtb
|
||||
+
|
||||
+subdir-y := $(dts-dirs) overlay
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/overlay/Makefile b/arch/arm64/boot/dts/amlogic/overlay/Makefile
|
||||
new file mode 100644
|
||||
index 000000000000..8630fd1a182d
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/amlogic/overlay/Makefile
|
||||
@@ -0,0 +1,20 @@
|
||||
+# SPDX-License-Identifier: GPL-2.0
|
||||
+dtbo-$(CONFIG_ARCH_MESON) += \
|
||||
+ meson-i2cA.dtbo \
|
||||
+ meson-i2cB.dtbo \
|
||||
+ meson-uartA.dtbo \
|
||||
+ meson-uartC.dtbo \
|
||||
+ meson-w1-gpio.dtbo \
|
||||
+ meson-w1AB-gpio.dtbo
|
||||
+
|
||||
+scr-$(CONFIG_ARCH_MESON) += \
|
||||
+ meson-fixup.scr
|
||||
+
|
||||
+dtbotxt-$(CONFIG_ARCH_MESON) += \
|
||||
+ README.meson-overlays
|
||||
+
|
||||
+targets += $(dtbo-y) $(scr-y) $(dtbotxt-y)
|
||||
+
|
||||
+always := $(dtbo-y) $(scr-y) $(dtbotxt-y)
|
||||
+clean-files := *.dtbo *.scr
|
||||
+
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/overlay/README.meson-overlays b/arch/arm64/boot/dts/amlogic/overlay/README.meson-overlays
|
||||
new file mode 100644
|
||||
index 000000000000..1b169a7a1525
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/amlogic/overlay/README.meson-overlays
|
||||
@@ -0,0 +1,20 @@
|
||||
+This document describes overlays provided in the kernel packages
|
||||
+For generic Armbian overlays documentation please see
|
||||
+https://docs.armbian.com/User-Guide_Allwinner_overlays/
|
||||
+
|
||||
+### Platform:
|
||||
+
|
||||
+meson (Amlogic)
|
||||
+
|
||||
+### Provided overlays:
|
||||
+
|
||||
+- i2c8
|
||||
+
|
||||
+### Overlay details:
|
||||
+
|
||||
+### i2c8
|
||||
+
|
||||
+Activates TWI/I2C bus 8
|
||||
+
|
||||
+I2C8 pins (SCL, SDA): GPIO1-C4, GPIO1-C5
|
||||
+
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/overlay/meson-fixup.scr-cmd b/arch/arm64/boot/dts/amlogic/overlay/meson-fixup.scr-cmd
|
||||
new file mode 100644
|
||||
index 000000000000..d4c39e20a3a2
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/amlogic/overlay/meson-fixup.scr-cmd
|
||||
@@ -0,0 +1,4 @@
|
||||
+# overlays fixup script
|
||||
+# implements (or rather substitutes) overlay arguments functionality
|
||||
+# using u-boot scripting, environment variables and "fdt" command
|
||||
+
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/overlay/meson-i2cA.dts b/arch/arm64/boot/dts/amlogic/overlay/meson-i2cA.dts
|
||||
new file mode 100644
|
||||
index 000000000000..bfb72feb7e36
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/amlogic/overlay/meson-i2cA.dts
|
||||
@@ -0,0 +1,17 @@
|
||||
+/dts-v1/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "amlogic,meson-gxbb";
|
||||
+ fragment@0 {
|
||||
+ target-path = "/aliases";
|
||||
+ __overlay__ {
|
||||
+ i2cA = "/soc/bus@c1100000/i2c@8500";
|
||||
+ };
|
||||
+ };
|
||||
+ fragment@1 {
|
||||
+ target-path = "/soc/bus@c1100000/i2c@8500";
|
||||
+ __overlay__ {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/overlay/meson-i2cB.dts b/arch/arm64/boot/dts/amlogic/overlay/meson-i2cB.dts
|
||||
new file mode 100644
|
||||
index 000000000000..d75867bce99b
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/amlogic/overlay/meson-i2cB.dts
|
||||
@@ -0,0 +1,17 @@
|
||||
+/dts-v1/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "amlogic,meson-gxbb";
|
||||
+ fragment@0 {
|
||||
+ target-path = "/aliases";
|
||||
+ __overlay__ {
|
||||
+ i2cA = "/soc/bus@c1100000/i2c@87c0";
|
||||
+ };
|
||||
+ };
|
||||
+ fragment@1 {
|
||||
+ target-path = "/soc/bus@c1100000/i2c@87c0";
|
||||
+ __overlay__ {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/overlay/meson-uartA.dts b/arch/arm64/boot/dts/amlogic/overlay/meson-uartA.dts
|
||||
new file mode 100644
|
||||
index 000000000000..3aecd60aaf64
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/amlogic/overlay/meson-uartA.dts
|
||||
@@ -0,0 +1,11 @@
|
||||
+/dts-v1/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "amlogic,meson-gxbb";
|
||||
+ fragment@0 {
|
||||
+ target-path = "/soc/bus@c1100000/serial@84c0";
|
||||
+ __overlay__ {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/overlay/meson-uartC.dts b/arch/arm64/boot/dts/amlogic/overlay/meson-uartC.dts
|
||||
new file mode 100644
|
||||
index 000000000000..2b40ee4c02d3
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/amlogic/overlay/meson-uartC.dts
|
||||
@@ -0,0 +1,11 @@
|
||||
+/dts-v1/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "amlogic,meson-gxbb";
|
||||
+ fragment@0 {
|
||||
+ target-path = "/soc/bus@c1100000/serial@8700";
|
||||
+ __overlay__ {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/overlay/meson-w1-gpio.dts b/arch/arm64/boot/dts/amlogic/overlay/meson-w1-gpio.dts
|
||||
new file mode 100644
|
||||
index 000000000000..ac76a4f20ab7
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/amlogic/overlay/meson-w1-gpio.dts
|
||||
@@ -0,0 +1,20 @@
|
||||
+// Definitions for w1-gpio module (without external pullup)
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "amlogic,meson-gxbb";
|
||||
+
|
||||
+ fragment@0 {
|
||||
+ target-path = "/";
|
||||
+ __overlay__ {
|
||||
+
|
||||
+ w1: onewire@0 {
|
||||
+ compatible = "w1-gpio";
|
||||
+ pinctrl-names = "default";
|
||||
+ gpios = <&gpio 91 6>; // GPIOY_16
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/overlay/meson-w1AB-gpio.dts b/arch/arm64/boot/dts/amlogic/overlay/meson-w1AB-gpio.dts
|
||||
new file mode 100644
|
||||
index 000000000000..f6b0d7eff158
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/amlogic/overlay/meson-w1AB-gpio.dts
|
||||
@@ -0,0 +1,32 @@
|
||||
+// Definitions for w1-gpio module (without external pullup)
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "amlogic,meson-gxbb";
|
||||
+
|
||||
+ fragment@0 {
|
||||
+ target-path = "/";
|
||||
+ __overlay__ {
|
||||
+
|
||||
+ w1a: onewire@0 {
|
||||
+ compatible = "w1-gpio";
|
||||
+ pinctrl-names = "default";
|
||||
+ gpios = <&gpio 91 6>; // GPIOY_16
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ fragment@1 {
|
||||
+ target-path = "/";
|
||||
+ __overlay__ {
|
||||
+
|
||||
+ w1b: onewire@1 {
|
||||
+ compatible = "w1-gpio";
|
||||
+ pinctrl-names = "default";
|
||||
+ gpios = <&gpio 90 6>; // GPIOY_15
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
|
||||
index 41c50f9461e5..387659d5b252 100644
|
||||
--- a/scripts/Makefile.lib
|
||||
+++ b/scripts/Makefile.lib
|
||||
@@ -79,6 +79,9 @@ header-test-y += $(filter-out $(header-test-), \
|
||||
|
||||
extra-$(CONFIG_HEADER_TEST) += $(addsuffix .s, $(header-test-y) $(header-test-m))
|
||||
|
||||
+# Overlay targets
|
||||
+extra-y += $(dtbo-y) $(scr-y) $(dtbotxt-y)
|
||||
+
|
||||
# Add subdir path
|
||||
|
||||
extra-y := $(addprefix $(obj)/,$(extra-y))
|
||||
--
|
||||
2.20.1
|
||||
|
16
patch/kernel/meson64-dev/kernel-odroidn2-current.patch
Normal file
16
patch/kernel/meson64-dev/kernel-odroidn2-current.patch
Normal file
|
@ -0,0 +1,16 @@
|
|||
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
|
||||
index 3b80bd3f6..79bb8de6d 100755
|
||||
--- a/scripts/package/builddeb
|
||||
+++ b/scripts/package/builddeb
|
||||
@@ -285,6 +285,11 @@ if [ "$ARCH" != "um" ]; then
|
||||
create_package "$dtb_packagename" "$dtb_dir"
|
||||
fi
|
||||
|
||||
+sed -e "s/exit 0//g" -i $tmpdir/DEBIAN/postinst
|
||||
+cat >> $tmpdir/DEBIAN/postinst <<EOT
|
||||
+mkimage -A arm64 -O linux -T kernel -C none -a 0x1080000 -e 0x1080000 -n "Linux" -d /$installed_image_path /boot/uImage > /dev/null 2>&1
|
||||
+exit 0
|
||||
+EOT
|
||||
create_package "$packagename" "$tmpdir"
|
||||
|
||||
if [ -n "$BUILD_DEBUG" ] ; then
|
12
patch/kernel/meson64-dev/meson64_fclk_div3.patch
Normal file
12
patch/kernel/meson64-dev/meson64_fclk_div3.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c
|
||||
index 4c8925dee..496fcd82b 100644
|
||||
--- a/drivers/clk/meson/gxbb.c
|
||||
+++ b/drivers/clk/meson/gxbb.c
|
||||
@@ -523,6 +523,7 @@ static struct clk_regmap gxbb_fclk_div3 = {
|
||||
.ops = &clk_regmap_gate_ops,
|
||||
.parent_names = (const char *[]){ "fclk_div3_div" },
|
||||
.num_parents = 1,
|
||||
+ .flags = CLK_IS_CRITICAL,
|
||||
},
|
||||
};
|
||||
|
17
patch/kernel/meson64-dev/meson64_remove_spidev_warning.patch
Normal file
17
patch/kernel/meson64-dev/meson64_remove_spidev_warning.patch
Normal file
|
@ -0,0 +1,17 @@
|
|||
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
|
||||
index b0c76e262..f8f91353f 100644
|
||||
--- a/drivers/spi/spidev.c
|
||||
+++ b/drivers/spi/spidev.c
|
||||
@@ -725,9 +725,9 @@ static int spidev_probe(struct spi_device *spi)
|
||||
* compatible string, it is a Linux implementation thing
|
||||
* rather than a description of the hardware.
|
||||
*/
|
||||
- WARN(spi->dev.of_node &&
|
||||
- of_device_is_compatible(spi->dev.of_node, "spidev"),
|
||||
- "%pOF: buggy DT: spidev listed directly in DT\n", spi->dev.of_node);
|
||||
+ if (spi->dev.of_node && !of_match_device(spidev_dt_ids, &spi->dev)) {
|
||||
+ dev_info(&spi->dev, "probing from DT");
|
||||
+ }
|
||||
|
||||
spidev_probe_acpi(spi);
|
||||
|
26
patch/kernel/meson64-dev/usb3.patch
Normal file
26
patch/kernel/meson64-dev/usb3.patch
Normal file
|
@ -0,0 +1,26 @@
|
|||
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
|
||||
index c9bb93a2c..8252923d8 100644
|
||||
--- a/drivers/usb/dwc3/core.c
|
||||
+++ b/drivers/usb/dwc3/core.c
|
||||
@@ -983,6 +983,8 @@ static int dwc3_core_init(struct dwc3 *dwc)
|
||||
if (dwc->dis_tx_ipgap_linecheck_quirk)
|
||||
reg |= DWC3_GUCTL1_TX_IPGAP_LINECHECK_DIS;
|
||||
|
||||
+ reg |= (DWC3_GUCTL_NAKPERENHHS | DWC3_GUCTL_PARKMODEDISABLESS);
|
||||
+
|
||||
dwc3_writel(dwc->regs, DWC3_GUCTL1, reg);
|
||||
}
|
||||
|
||||
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
|
||||
index 3dd783b88..ff09d19ee 100644
|
||||
--- a/drivers/usb/dwc3/core.h
|
||||
+++ b/drivers/usb/dwc3/core.h
|
||||
@@ -247,6 +247,8 @@
|
||||
|
||||
/* Global User Control Register */
|
||||
#define DWC3_GUCTL_HSTINAUTORETRY BIT(14)
|
||||
+#define DWC3_GUCTL_PARKMODEDISABLESS BIT(17)
|
||||
+#define DWC3_GUCTL_NAKPERENHHS BIT(18)
|
||||
|
||||
/* Global User Control 1 Register */
|
||||
#define DWC3_GUCTL1_TX_IPGAP_LINECHECK_DIS BIT(28)
|
26
patch/kernel/meson64-dev/x-0059-fix-chmap_idx.patch
Normal file
26
patch/kernel/meson64-dev/x-0059-fix-chmap_idx.patch
Normal file
|
@ -0,0 +1,26 @@
|
|||
From 6b0ff7f03dab0d987da7685dc5afed7e5434f6bf Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Sun, 23 Dec 2018 02:24:38 +0100
|
||||
Subject: [PATCH 59/91] fix chmap_idx
|
||||
|
||||
---
|
||||
sound/soc/codecs/hdmi-codec.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c
|
||||
index 3bf9fb0..918e0d9 100644
|
||||
--- a/sound/soc/codecs/hdmi-codec.c
|
||||
+++ b/sound/soc/codecs/hdmi-codec.c
|
||||
@@ -373,7 +373,8 @@ static int hdmi_codec_chmap_ctl_get(struct snd_kcontrol *kcontrol,
|
||||
struct snd_pcm_chmap *info = snd_kcontrol_chip(kcontrol);
|
||||
struct hdmi_codec_priv *hcp = info->private_data;
|
||||
|
||||
- map = info->chmap[hcp->chmap_idx].map;
|
||||
+ if (hcp->chmap_idx != HDMI_CODEC_CHMAP_IDX_UNKNOWN)
|
||||
+ map = info->chmap[hcp->chmap_idx].map;
|
||||
|
||||
for (i = 0; i < info->max_channels; i++) {
|
||||
if (hcp->chmap_idx == HDMI_CODEC_CHMAP_IDX_UNKNOWN)
|
||||
--
|
||||
2.7.4
|
||||
|
28
patch/kernel/meson64-dev/x-0147-si2168-fix-cmd-timeout.patch
Normal file
28
patch/kernel/meson64-dev/x-0147-si2168-fix-cmd-timeout.patch
Normal file
|
@ -0,0 +1,28 @@
|
|||
From 2e01cc074cc426da4b390af025a736eda9aef80c Mon Sep 17 00:00:00 2001
|
||||
From: Koumes <koumes@centrum.cz>
|
||||
Date: Sat, 1 Jun 2019 21:20:26 +0000
|
||||
Subject: [PATCH] si2168: fix cmd timeout
|
||||
|
||||
Some demuxer si2168 commands may take 130-140 ms.
|
||||
(DVB-T/T2 tuner MyGica T230C v2).
|
||||
Details: https://github.com/CoreELEC/CoreELEC/pull/208
|
||||
---
|
||||
drivers/media/dvb-frontends/si2168.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c
|
||||
index b05e6772c..ffaba6f81 100644
|
||||
--- a/drivers/media/dvb-frontends/si2168.c
|
||||
+++ b/drivers/media/dvb-frontends/si2168.c
|
||||
@@ -42,7 +42,7 @@ static int si2168_cmd_execute(struct i2c_client *client, struct si2168_cmd *cmd)
|
||||
|
||||
if (cmd->rlen) {
|
||||
/* wait cmd execution terminate */
|
||||
- #define TIMEOUT 70
|
||||
+ #define TIMEOUT 200
|
||||
timeout = jiffies + msecs_to_jiffies(TIMEOUT);
|
||||
while (!time_after(jiffies, timeout)) {
|
||||
ret = i2c_master_recv(client, cmd->args, cmd->rlen);
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -1 +0,0 @@
|
|||
mvebu64-current
|
|
@ -0,0 +1,33 @@
|
|||
From d71549275ca1e2bee8e7914501526b625e9f8a53 Mon Sep 17 00:00:00 2001
|
||||
From: Marc Zyngier <Marc.Zyngier@arm.com>
|
||||
Date: Sat, 1 Jul 2017 15:16:37 +0100
|
||||
Subject: [PATCH 04/11] ARM64: dts: marvell: armada37xx: Enable USB2 on
|
||||
espressobin
|
||||
|
||||
The Espressobin SBC has a USB2 interface available on J8. Let's
|
||||
enable it.
|
||||
|
||||
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
|
||||
---
|
||||
arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
|
||||
index e3a136ed77b0..b1af3f988b29 100644
|
||||
--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
|
||||
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
|
||||
@@ -81,6 +81,11 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+/* J8 */
|
||||
+&usb2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&mdio {
|
||||
switch0: switch0@1 {
|
||||
compatible = "marvell,mv88e6085";
|
||||
--
|
||||
2.13.3
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
From 8440f9edeb29c10cc0ec29c55c07d4e5e5b67c5b Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Tue, 4 Jul 2017 19:25:28 -0600
|
||||
Subject: [PATCH 07/11] arm64: dts: marvell: armada37xx: Add eth0 alias
|
||||
|
||||
Signed-off-by: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
---
|
||||
arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
|
||||
index a78195b4ef7a..14248957b2dd 100644
|
||||
--- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
|
||||
+++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
|
||||
@@ -54,6 +54,7 @@
|
||||
#size-cells = <2>;
|
||||
|
||||
aliases {
|
||||
+ ethernet0 = ð0;
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
--
|
||||
2.13.3
|
||||
|
20
patch/kernel/mvebu64-dev/0011-espressobin-enable-emmc.patch
Normal file
20
patch/kernel/mvebu64-dev/0011-espressobin-enable-emmc.patch
Normal file
|
@ -0,0 +1,20 @@
|
|||
diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
|
||||
index 2ce52ba..a759fd1 100644
|
||||
--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
|
||||
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
|
||||
@@ -96,6 +96,15 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&sdhci0 {
|
||||
+ non-removable;
|
||||
+ bus-width = <8>;
|
||||
+ mmc-ddr-1_8v;
|
||||
+ mmc-hs400-1_8v;
|
||||
+ marvell,pad-type = "fixed-1-8v";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
/* Exported on the micro USB connector J5 through an FTDI */
|
||||
&uart0 {
|
||||
status = "okay";
|
|
@ -0,0 +1,17 @@
|
|||
diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
|
||||
index b3cf091a..ab2d8e2e 100644
|
||||
--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
|
||||
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
|
||||
@@ -86,6 +86,12 @@
|
||||
label = "ubootenv";
|
||||
reg = <0x180000 0x10000>;
|
||||
};
|
||||
+
|
||||
+ partition@190000 {
|
||||
+ label = "Linux";
|
||||
+ reg = <0x190000 0xDF0000>;
|
||||
+ };
|
||||
+
|
||||
};
|
||||
};
|
||||
};
|
|
@ -0,0 +1,70 @@
|
|||
From d9d95e78cff80c3fe43e757ba90644cd766302ac Mon Sep 17 00:00:00 2001
|
||||
From: Miquel Raynal <miquel.raynal@bootlin.com>
|
||||
Date: Fri, 13 Jul 2018 15:44:45 +0200
|
||||
Subject: clk: mvebu: armada-37xx-periph: save the IP base address in the
|
||||
driver data
|
||||
|
||||
Prepare the introduction of suspend/resume hooks by having an easy way
|
||||
to access all the registers in one go just from a device: add the IP
|
||||
base address in the driver data.
|
||||
|
||||
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
|
||||
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
---
|
||||
drivers/clk/mvebu/armada-37xx-periph.c | 15 +++++++--------
|
||||
1 file changed, 7 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/drivers/clk/mvebu/armada-37xx-periph.c b/drivers/clk/mvebu/armada-37xx-periph.c
|
||||
index 499f5962c8b0..78048c2e3774 100644
|
||||
--- a/drivers/clk/mvebu/armada-37xx-periph.c
|
||||
+++ b/drivers/clk/mvebu/armada-37xx-periph.c
|
||||
@@ -56,6 +56,7 @@
|
||||
struct clk_periph_driver_data {
|
||||
struct clk_hw_onecell_data *hw_data;
|
||||
spinlock_t lock;
|
||||
+ void __iomem *reg;
|
||||
};
|
||||
|
||||
struct clk_double_div {
|
||||
@@ -680,7 +681,6 @@ static int armada_3700_periph_clock_probe(struct platform_device *pdev)
|
||||
struct device *dev = &pdev->dev;
|
||||
int num_periph = 0, i, ret;
|
||||
struct resource *res;
|
||||
- void __iomem *reg;
|
||||
|
||||
data = of_device_get_match_data(dev);
|
||||
if (!data)
|
||||
@@ -689,11 +689,6 @@ static int armada_3700_periph_clock_probe(struct platform_device *pdev)
|
||||
while (data[num_periph].name)
|
||||
num_periph++;
|
||||
|
||||
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
- reg = devm_ioremap_resource(dev, res);
|
||||
- if (IS_ERR(reg))
|
||||
- return PTR_ERR(reg);
|
||||
-
|
||||
driver_data = devm_kzalloc(dev, sizeof(*driver_data), GFP_KERNEL);
|
||||
if (!driver_data)
|
||||
return -ENOMEM;
|
||||
@@ -706,12 +701,16 @@ static int armada_3700_periph_clock_probe(struct platform_device *pdev)
|
||||
return -ENOMEM;
|
||||
driver_data->hw_data->num = num_periph;
|
||||
|
||||
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
+ driver_data->reg = devm_ioremap_resource(dev, res);
|
||||
+ if (IS_ERR(driver_data->reg))
|
||||
+ return PTR_ERR(driver_data->reg);
|
||||
+
|
||||
spin_lock_init(&driver_data->lock);
|
||||
|
||||
for (i = 0; i < num_periph; i++) {
|
||||
struct clk_hw **hw = &driver_data->hw_data->hws[i];
|
||||
-
|
||||
- if (armada_3700_add_composite_clk(&data[i], reg,
|
||||
+ if (armada_3700_add_composite_clk(&data[i], driver_data->reg,
|
||||
&driver_data->lock, dev, hw))
|
||||
dev_err(dev, "Can't register periph clock %s\n",
|
||||
data[i].name);
|
||||
--
|
||||
cgit 1.2-0.3.lf.el7
|
||||
|
219
patch/kernel/mvebu64-dev/add-board-espressobinv7.patch
Normal file
219
patch/kernel/mvebu64-dev/add-board-espressobinv7.patch
Normal file
|
@ -0,0 +1,219 @@
|
|||
diff --git a/arch/arm64/boot/dts/marvell/Makefile b/arch/arm64/boot/dts/marvell/Makefile
|
||||
index ea9d49f2a911..d80da8f5d82d 100644
|
||||
--- a/arch/arm64/boot/dts/marvell/Makefile
|
||||
+++ b/arch/arm64/boot/dts/marvell/Makefile
|
||||
@@ -2,6 +2,7 @@
|
||||
# Mvebu SoC Family
|
||||
dtb-$(CONFIG_ARCH_MVEBU) += armada-3720-db.dtb
|
||||
dtb-$(CONFIG_ARCH_MVEBU) += armada-3720-espressobin.dtb
|
||||
+dtb-$(CONFIG_ARCH_MVEBU) += armada-3720-espressobinv7.dtb
|
||||
dtb-$(CONFIG_ARCH_MVEBU) += armada-3720-turris-mox.dtb
|
||||
dtb-$(CONFIG_ARCH_MVEBU) += armada-3720-uDPU.dtb
|
||||
dtb-$(CONFIG_ARCH_MVEBU) += armada-7040-db.dtb
|
||||
diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobinv7.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobinv7.dts
|
||||
new file mode 100644
|
||||
index 000000000000..6385b2488e45
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobinv7.dts
|
||||
@@ -0,0 +1,201 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Device Tree file for Globalscale Marvell ESPRESSOBin Board
|
||||
+ * Copyright (C) 2016 Marvell
|
||||
+ *
|
||||
+ * Romain Perier <romain.perier@free-electrons.com>
|
||||
+ *
|
||||
+ */
|
||||
+/*
|
||||
+ * Schematic available at http://espressobin.net/wp-content/uploads/2017/08/ESPRESSObin_V5_Schematics.pdf
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include "armada-372x.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "Globalscale Marvell ESPRESSOBin Board";
|
||||
+ compatible = "globalscale,espressobin", "marvell,armada3720", "marvell,armada3710";
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
+ memory@0 {
|
||||
+ device_type = "memory";
|
||||
+ reg = <0x00000000 0x00000000 0x00000000 0x20000000>;
|
||||
+ };
|
||||
+
|
||||
+ vcc_sd_reg1: regulator {
|
||||
+ compatible = "regulator-gpio";
|
||||
+ regulator-name = "vcc_sd1";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ gpios = <&gpionb 4 GPIO_ACTIVE_HIGH>;
|
||||
+ gpios-states = <0>;
|
||||
+ states = <1800000 0x1
|
||||
+ 3300000 0x0>;
|
||||
+ enable-active-high;
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ red {
|
||||
+ label = "espressobin:red:usr";
|
||||
+ gpios = <&gpionb 2 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+/* J9 */
|
||||
+&pcie0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+/* J6 */
|
||||
+&sata {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+/* J1 */
|
||||
+&sdhci1 {
|
||||
+ wp-inverted;
|
||||
+ bus-width = <4>;
|
||||
+ cd-gpios = <&gpionb 3 GPIO_ACTIVE_LOW>;
|
||||
+ marvell,pad-type = "sd";
|
||||
+ vqmmc-supply = <&vcc_sd_reg1>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&spi0 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ flash@0 {
|
||||
+ reg = <0>;
|
||||
+ /*
|
||||
+ * Originally "winbond,w25q32dw", but since the manufacturer is known
|
||||
+ * to have replaced the part with "macronix,mx25u3235f" in some board
|
||||
+ * batches, just use the generic "jedec,spi-nor" and let the actual
|
||||
+ * chip type be probed. The partition table still depends on the chip
|
||||
+ * being 4 MiB in size.
|
||||
+ */
|
||||
+ compatible = "jedec,spi-nor";
|
||||
+ spi-max-frequency = <104000000>;
|
||||
+ m25p,fast-read;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ partition@0 {
|
||||
+ label = "uboot";
|
||||
+ reg = <0 0x3f0000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@3f0000 {
|
||||
+ label = "ubootenv";
|
||||
+ reg = <0x3f0000 0x10000>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+/* Exported on the micro USB connector J5 through an FTDI */
|
||||
+&uart0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart1_pins>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * Connector J17 and J18 expose a number of different features. Some pins are
|
||||
+ * multiplexed. This is the case for instance for the following features:
|
||||
+ * - UART1 (pin 24 = RX, pin 26 = TX). See armada-3720-db.dts for an example of
|
||||
+ * how to enable it. Beware that the signals are 1.8V TTL.
|
||||
+ * - I2C
|
||||
+ * - SPI
|
||||
+ * - MMC
|
||||
+ */
|
||||
+
|
||||
+/* J7 */
|
||||
+&usb3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+/* J8 */
|
||||
+&usb2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&mdio {
|
||||
+ switch0: switch0@1 {
|
||||
+ compatible = "marvell,mv88e6085";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ reg = <1>;
|
||||
+
|
||||
+ dsa,member = <0 0>;
|
||||
+
|
||||
+ ports {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ port@0 {
|
||||
+ reg = <0>;
|
||||
+ label = "cpu";
|
||||
+ ethernet = <ð0>;
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ reg = <1>;
|
||||
+ label = "lan1";
|
||||
+ phy-handle = <&switch0phy0>;
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ reg = <2>;
|
||||
+ label = "lan0";
|
||||
+ phy-handle = <&switch0phy1>;
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ reg = <3>;
|
||||
+ label = "wan";
|
||||
+ phy-handle = <&switch0phy2>;
|
||||
+ };
|
||||
+
|
||||
+ };
|
||||
+
|
||||
+ mdio {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ switch0phy0: switch0phy0@11 {
|
||||
+ reg = <0x11>;
|
||||
+ };
|
||||
+ switch0phy1: switch0phy1@12 {
|
||||
+ reg = <0x12>;
|
||||
+ };
|
||||
+ switch0phy2: switch0phy2@13 {
|
||||
+ reg = <0x13>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+ð0 {
|
||||
+ phy-mode = "rgmii-id";
|
||||
+ status = "okay";
|
||||
+
|
||||
+ fixed-link {
|
||||
+ speed = <1000>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+};
|
91
patch/kernel/mvebu64-dev/adjust-espresso-dts.patch
Normal file
91
patch/kernel/mvebu64-dev/adjust-espresso-dts.patch
Normal file
|
@ -0,0 +1,91 @@
|
|||
diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
|
||||
index cd5fbfa38..a81391164 100644
|
||||
--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
|
||||
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
|
||||
@@ -41,6 +41,16 @@
|
||||
3300000 0x0>;
|
||||
enable-active-high;
|
||||
};
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ red {
|
||||
+ label = "espressobin:red:usr";
|
||||
+ gpios = <&gpionb 2 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
};
|
||||
|
||||
/* J9 */
|
||||
@@ -95,19 +105,35 @@
|
||||
|
||||
flash@0 {
|
||||
reg = <0>;
|
||||
+ /*
|
||||
+ * Originally "winbond,w25q32dw", but since the manufacturer is known
|
||||
+ * to have replaced the part with "macronix,mx25u3235f" in some board
|
||||
+ * batches, just use the generic "jedec,spi-nor" and let the actual
|
||||
+ * chip type be probed. The partition table still depends on the chip
|
||||
+ * being 4 MiB in size.
|
||||
+ */
|
||||
compatible = "jedec,spi-nor";
|
||||
spi-max-frequency = <104000000>;
|
||||
m25p,fast-read;
|
||||
- };
|
||||
-};
|
||||
+ status = "okay";
|
||||
+
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
|
||||
-&sdhci0 {
|
||||
- non-removable;
|
||||
- bus-width = <8>;
|
||||
- mmc-ddr-1_8v;
|
||||
- mmc-hs400-1_8v;
|
||||
- marvell,pad-type = "fixed-1-8v";
|
||||
- status = "okay";
|
||||
+ partition@0 {
|
||||
+ label = "uboot";
|
||||
+ reg = <0 0x3f0000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@180000 {
|
||||
+ label = "ubootenv";
|
||||
+ reg = <0x3f0000 0x10000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ };
|
||||
};
|
||||
|
||||
/* Exported on the micro USB connector J5 through an FTDI */
|
||||
@@ -137,11 +163,6 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
-/* J8 */
|
||||
-&usb2 {
|
||||
- status = "okay";
|
||||
-};
|
||||
-
|
||||
&mdio {
|
||||
switch0: switch0@1 {
|
||||
compatible = "marvell,mv88e6085";
|
||||
@@ -199,12 +220,6 @@
|
||||
switch0phy2: switch0phy2@13 {
|
||||
reg = <0x13>;
|
||||
};
|
||||
-
|
||||
- partition@190000 {
|
||||
- label = "Linux";
|
||||
- reg = <0x190000 0xDF0000>;
|
||||
- };
|
||||
-
|
||||
};
|
||||
};
|
||||
};
|
80
patch/kernel/mvebu64-dev/armada-37xx-cpufreq.patch.disabled
Normal file
80
patch/kernel/mvebu64-dev/armada-37xx-cpufreq.patch.disabled
Normal file
|
@ -0,0 +1,80 @@
|
|||
diff --git a/drivers/cpufreq/armada-37xx-cpufreq.c b/drivers/cpufreq/armada-37xx-cpufreq.c
|
||||
index 75491fc84..c2adf380b 100644
|
||||
--- a/drivers/cpufreq/armada-37xx-cpufreq.c
|
||||
+++ b/drivers/cpufreq/armada-37xx-cpufreq.c
|
||||
@@ -162,11 +162,25 @@ static void __init armada37xx_cpufreq_dvfs_setup(struct regmap *base,
|
||||
}
|
||||
|
||||
/*
|
||||
- * Set cpu clock source, for all the level we keep the same
|
||||
- * clock source that the one already configured. For this one
|
||||
- * we need to use the clock framework
|
||||
- */
|
||||
+ * Set CPU clock source, for all the level we keep the same
|
||||
+ * clock source that the one already configured with DVS
|
||||
+ * disabled. For this one we need to use the clock framewor
|
||||
+ */
|
||||
parent = clk_get_parent(clk);
|
||||
+
|
||||
+ /*
|
||||
+ * Unset parent clock to force the clock framework setting again
|
||||
+ * the clock parent
|
||||
+ */
|
||||
+ clk_set_parent(clk, NULL);
|
||||
+
|
||||
+ /*
|
||||
+ * For the Armada 37xx CPU clocks, setting the parent will
|
||||
+ * actually configure the parent when DVFS is enabled. At
|
||||
+ * hardware level it will be a different register from the one
|
||||
+ * read when doing clk_get_parent that will be set with
|
||||
+ * clk_set_parent.
|
||||
+ */
|
||||
clk_set_parent(clk, parent);
|
||||
}
|
||||
|
||||
@@ -359,11 +373,11 @@ static int __init armada37xx_cpufreq_driver_init(void)
|
||||
struct armada_37xx_dvfs *dvfs;
|
||||
struct platform_device *pdev;
|
||||
unsigned long freq;
|
||||
- unsigned int cur_frequency;
|
||||
+ unsigned int cur_frequency, base_frequency;
|
||||
struct regmap *nb_pm_base, *avs_base;
|
||||
struct device *cpu_dev;
|
||||
int load_lvl, ret;
|
||||
- struct clk *clk;
|
||||
+ struct clk *clk, *parent;
|
||||
|
||||
nb_pm_base =
|
||||
syscon_regmap_lookup_by_compatible("marvell,armada-3700-nb-pm");
|
||||
@@ -399,6 +413,22 @@ static int __init armada37xx_cpufreq_driver_init(void)
|
||||
return PTR_ERR(clk);
|
||||
}
|
||||
|
||||
+ parent = clk_get_parent(clk);
|
||||
+ if (IS_ERR(parent)) {
|
||||
+ dev_err(cpu_dev, "Cannot get parent clock for CPU0\n");
|
||||
+ clk_put(clk);
|
||||
+ return PTR_ERR(parent);
|
||||
+ }
|
||||
+
|
||||
+ /* Get parent CPU frequency */
|
||||
+ base_frequency = clk_get_rate(parent);
|
||||
+
|
||||
+ if (!base_frequency) {
|
||||
+ dev_err(cpu_dev, "Failed to get parent clock rate for CPU\n");
|
||||
+ clk_put(clk);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
/* Get nominal (current) CPU frequency */
|
||||
cur_frequency = clk_get_rate(clk);
|
||||
if (!cur_frequency) {
|
||||
@@ -431,7 +461,7 @@ static int __init armada37xx_cpufreq_driver_init(void)
|
||||
for (load_lvl = ARMADA_37XX_DVFS_LOAD_0; load_lvl < LOAD_LEVEL_NR;
|
||||
load_lvl++) {
|
||||
unsigned long u_volt = avs_map[dvfs->avs[load_lvl]] * 1000;
|
||||
- freq = cur_frequency / dvfs->divider[load_lvl];
|
||||
+ freq = base_frequency / dvfs->divider[load_lvl];
|
||||
ret = dev_pm_opp_add(cpu_dev, freq, u_volt);
|
||||
if (ret)
|
||||
goto remove_opp;
|
30
patch/kernel/mvebu64-dev/armada-37xx-xtal-correct-pin.patch
Normal file
30
patch/kernel/mvebu64-dev/armada-37xx-xtal-correct-pin.patch
Normal file
|
@ -0,0 +1,30 @@
|
|||
From 80d4cec4cef8282e5ac3aaf98ce3e68fb299a134 Mon Sep 17 00:00:00 2001
|
||||
From: Terry Zhou <bjzhou@marvell.com>
|
||||
Date: Mon, 29 Jan 2018 15:01:31 +0800
|
||||
Subject: [PATCH] clk: mvebu: a3700: fix the XTAL MODE pin to SB MPP9
|
||||
|
||||
There is an error in the current code that the XTAL MODE
|
||||
pin was set to SB MPP31 which should be SB MPP9
|
||||
The latch register of SB MPP9 has different offset of 0x8
|
||||
|
||||
Change-Id: I73d41d0c053808fd18944ed1d191aea817b6d21a
|
||||
Signed-off-by: Terry Zhou <bjzhou@marvell.com>
|
||||
---
|
||||
drivers/clk/mvebu/armada-37xx-xtal.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/clk/mvebu/armada-37xx-xtal.c b/drivers/clk/mvebu/armada-37xx-xtal.c
|
||||
index 612d65ede10a..5370514959e1 100644
|
||||
--- a/drivers/clk/mvebu/armada-37xx-xtal.c
|
||||
+++ b/drivers/clk/mvebu/armada-37xx-xtal.c
|
||||
@@ -15,8 +15,8 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/regmap.h>
|
||||
|
||||
-#define NB_GPIO1_LATCH 0xC
|
||||
-#define XTAL_MODE BIT(31)
|
||||
+#define NB_GPIO1_LATCH 0x8
|
||||
+#define XTAL_MODE BIT(9)
|
||||
|
||||
static int armada_3700_xtal_clock_probe(struct platform_device *pdev)
|
||||
{
|
16
patch/kernel/mvebu64-dev/enable_ath10_cards.patch
Normal file
16
patch/kernel/mvebu64-dev/enable_ath10_cards.patch
Normal file
|
@ -0,0 +1,16 @@
|
|||
diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controller/pci-aardvark.c
|
||||
index a42a040..1754456
|
||||
--- a/drivers/pci/controller/pci-aardvark.c
|
||||
+++ b/drivers/pci/controller/pci-aardvark.c
|
||||
@@ -312,9 +312,10 @@ static void advk_pcie_setup_hw(struct advk_pcie *pcie)
|
||||
advk_writel(pcie, reg, PCIE_CORE_CTRL2_REG);
|
||||
|
||||
/* Set GEN2 */
|
||||
+ /* Set GEN1 */
|
||||
reg = advk_readl(pcie, PCIE_CORE_CTRL0_REG);
|
||||
reg &= ~PCIE_GEN_SEL_MSK;
|
||||
- reg |= SPEED_GEN_2;
|
||||
+ reg |= SPEED_GEN_1;
|
||||
advk_writel(pcie, reg, PCIE_CORE_CTRL0_REG);
|
||||
|
||||
/* Set lane X1 */
|
|
@ -0,0 +1,57 @@
|
|||
From 8fe9a4c4a024a6353e810a1dbb5e4bc78bff60a8 Mon Sep 17 00:00:00 2001
|
||||
From: FlashBurnGitHub <33546258+FlashBurnGitHub@users.noreply.github.com>
|
||||
Date: Wed, 6 Mar 2019 17:25:46 +0100
|
||||
Subject: [PATCH] Fix problem with cpu scaling not working
|
||||
|
||||
This fixes a problem that the cpu scaling is not working.
|
||||
|
||||
First one needs to first unset the parent clock, before setting the same old parent clock again. This solves the problem that the wrong TBG clock source was used for the cpu.
|
||||
|
||||
Also one needs to multiply the current cpu frequency with the used divider so that the right cpu frequency gets calculated when applying the dividers. This was need for a 600MHz final cpu frequency to work
|
||||
---
|
||||
drivers/cpufreq/armada-37xx-cpufreq.c | 11 ++++++++++-
|
||||
1 file changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/cpufreq/armada-37xx-cpufreq.c b/drivers/cpufreq/armada-37xx-cpufreq.c
|
||||
index 75491fc841a6..5c744092f819 100644
|
||||
--- a/drivers/cpufreq/armada-37xx-cpufreq.c
|
||||
+++ b/drivers/cpufreq/armada-37xx-cpufreq.c
|
||||
@@ -167,6 +167,11 @@ static void __init armada37xx_cpufreq_dvfs_setup(struct regmap *base,
|
||||
* we need to use the clock framework
|
||||
*/
|
||||
parent = clk_get_parent(clk);
|
||||
+
|
||||
+ /* Unset parent clock */
|
||||
+ clk_set_parent(clk, NULL);
|
||||
+
|
||||
+ /* set old parent; this triggers setting needed values for right CPU clock in hardware regs */
|
||||
clk_set_parent(clk, parent);
|
||||
}
|
||||
|
||||
@@ -360,6 +365,7 @@ static int __init armada37xx_cpufreq_driver_init(void)
|
||||
struct platform_device *pdev;
|
||||
unsigned long freq;
|
||||
unsigned int cur_frequency;
|
||||
+ unsigned int base_frequency;
|
||||
struct regmap *nb_pm_base, *avs_base;
|
||||
struct device *cpu_dev;
|
||||
int load_lvl, ret;
|
||||
@@ -412,6 +418,9 @@ static int __init armada37xx_cpufreq_driver_init(void)
|
||||
clk_put(clk);
|
||||
return -EINVAL;
|
||||
}
|
||||
+
|
||||
+ /* Get base CPU frequency without divider */
|
||||
+ base_frequency = cur_frequency * dvfs->divider[ARMADA_37XX_DVFS_LOAD_0];
|
||||
|
||||
armada37xx_cpufreq_state = kmalloc(sizeof(*armada37xx_cpufreq_state),
|
||||
GFP_KERNEL);
|
||||
@@ -431,7 +440,7 @@ static int __init armada37xx_cpufreq_driver_init(void)
|
||||
for (load_lvl = ARMADA_37XX_DVFS_LOAD_0; load_lvl < LOAD_LEVEL_NR;
|
||||
load_lvl++) {
|
||||
unsigned long u_volt = avs_map[dvfs->avs[load_lvl]] * 1000;
|
||||
- freq = cur_frequency / dvfs->divider[load_lvl];
|
||||
+ freq = base_frequency / dvfs->divider[load_lvl];
|
||||
ret = dev_pm_opp_add(cpu_dev, freq, u_volt);
|
||||
if (ret)
|
||||
goto remove_opp;
|
12
patch/kernel/mvebu64-dev/spi-nor.c.patch
Normal file
12
patch/kernel/mvebu64-dev/spi-nor.c.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff --git linux-4.18.7/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
|
||||
index f028277fb..e4886c95c 100644
|
||||
--- linux-4.18.7/drivers/mtd/spi-nor/spi-nor.c
|
||||
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||
@@ -1085,6 +1085,7 @@ static const struct flash_info spi_nor_ids[] = {
|
||||
{ "mx25u2033e", INFO(0xc22532, 0, 64 * 1024, 4, SECT_4K) },
|
||||
{ "mx25u4035", INFO(0xc22533, 0, 64 * 1024, 8, SECT_4K) },
|
||||
{ "mx25u8035", INFO(0xc22534, 0, 64 * 1024, 16, SECT_4K) },
|
||||
+ { "mx25u3235f", INFO(0xc22536, 0, 64 * 1024, 64, SECT_4K) },
|
||||
{ "mx25u6435f", INFO(0xc22537, 0, 64 * 1024, 128, SECT_4K) },
|
||||
{ "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) },
|
||||
{ "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) },
|
|
@ -0,0 +1,72 @@
|
|||
diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c
|
||||
index ccc4c71..71a4d00 100644
|
||||
--- a/drivers/net/wireless/ath/regd.c
|
||||
+++ b/drivers/net/wireless/ath/regd.c
|
||||
@@ -49,12 +49,9 @@ static int __ath_regd_init(struct ath_regulatory *reg);
|
||||
#define ATH9K_5GHZ_5725_5850 REG_RULE(5725-10, 5850+10, 40, 0, 30,\
|
||||
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)
|
||||
|
||||
-#define ATH9K_2GHZ_ALL ATH9K_2GHZ_CH01_11, \
|
||||
- ATH9K_2GHZ_CH12_13, \
|
||||
- ATH9K_2GHZ_CH14
|
||||
+#define ATH9K_2GHZ_ALL REG_RULE(2400, 2483, 40, 0, 30, 0)
|
||||
|
||||
-#define ATH9K_5GHZ_ALL ATH9K_5GHZ_5150_5350, \
|
||||
- ATH9K_5GHZ_5470_5850
|
||||
+#define ATH9K_5GHZ_ALL REG_RULE(5140, 5860, 40, 0, 30, 0)
|
||||
|
||||
/* This one skips what we call "mid band" */
|
||||
#define ATH9K_5GHZ_NO_MIDBAND ATH9K_5GHZ_5150_5350, \
|
||||
@@ -76,9 +73,8 @@ static const struct ieee80211_regdomain ath_world_regdom_63_65 = {
|
||||
.n_reg_rules = 4,
|
||||
.alpha2 = "99",
|
||||
.reg_rules = {
|
||||
- ATH9K_2GHZ_CH01_11,
|
||||
- ATH9K_2GHZ_CH12_13,
|
||||
- ATH9K_5GHZ_NO_MIDBAND,
|
||||
+ ATH9K_2GHZ_ALL,
|
||||
+ ATH9K_5GHZ_ALL,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -87,8 +83,8 @@ static const struct ieee80211_regdomain ath_world_regdom_64 = {
|
||||
.n_reg_rules = 3,
|
||||
.alpha2 = "99",
|
||||
.reg_rules = {
|
||||
- ATH9K_2GHZ_CH01_11,
|
||||
- ATH9K_5GHZ_NO_MIDBAND,
|
||||
+ ATH9K_2GHZ_ALL,
|
||||
+ ATH9K_5GHZ_ALL,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -97,7 +93,7 @@ static const struct ieee80211_regdomain ath_world_regdom_66_69 = {
|
||||
.n_reg_rules = 3,
|
||||
.alpha2 = "99",
|
||||
.reg_rules = {
|
||||
- ATH9K_2GHZ_CH01_11,
|
||||
+ ATH9K_2GHZ_ALL,
|
||||
ATH9K_5GHZ_ALL,
|
||||
}
|
||||
};
|
||||
@@ -107,8 +103,7 @@ static const struct ieee80211_regdomain ath_world_regdom_67_68_6A_6C = {
|
||||
.n_reg_rules = 4,
|
||||
.alpha2 = "99",
|
||||
.reg_rules = {
|
||||
- ATH9K_2GHZ_CH01_11,
|
||||
- ATH9K_2GHZ_CH12_13,
|
||||
+ ATH9K_2GHZ_ALL,
|
||||
ATH9K_5GHZ_ALL,
|
||||
}
|
||||
};
|
||||
@@ -253,9 +253,7 @@ static bool ath_is_radar_freq(u16 center_freq,
|
||||
struct ath_regulatory *reg)
|
||||
|
||||
{
|
||||
- if (reg->country_code == CTRY_INDIA)
|
||||
- return (center_freq >= 5500 && center_freq <= 5700);
|
||||
- return (center_freq >= 5260 && center_freq <= 5700);
|
||||
+ return false;
|
||||
}
|
||||
|
||||
static void ath_force_clear_no_ir_chan(struct wiphy *wiphy,
|
|
@ -0,0 +1,29 @@
|
|||
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
index 4906fd0a..48731f52 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/Makefile
|
||||
+++ b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
@@ -92,6 +92,8 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-mid-818-android.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-pinebook-pro-v1.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-pinebook-pro.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock960-ab.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rockpi4b.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-pi-4.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rockpro64.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rv1-android.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator-box-android-6.0.dtb
|
||||
@@ -102,7 +104,6 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator-edp.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator-edp-avb.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator-linux.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator-linux-for-rk1808-cascade.dtb
|
||||
-dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rockpi4b.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-tve1030g.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-tve1030g-avb.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-tve1205g.dtb
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dts b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dts
|
||||
new file mode 120000
|
||||
index 00000000..d365c482
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dts
|
||||
@@ -0,0 +1 @@
|
||||
+rk3399-rockpi4b.dts
|
||||
\ No newline at end of file
|
|
@ -1,13 +1,26 @@
|
|||
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
|
||||
index 2c0238ce0..1b55633a9 100644
|
||||
--- a/arch/arm64/Makefile
|
||||
+++ b/arch/arm64/Makefile
|
||||
@@ -125,7 +125,7 @@ core-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
|
||||
|
||||
# Default target when executing plain make
|
||||
boot := arch/arm64/boot
|
||||
-KBUILD_IMAGE := $(boot)/Image.gz
|
||||
+KBUILD_IMAGE := $(boot)/Image
|
||||
|
||||
all: Image.gz
|
||||
|
||||
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
|
||||
index 90c9a8a..3c79b90 100755
|
||||
index c4c580f54..351a33958 100755
|
||||
--- a/scripts/package/builddeb
|
||||
+++ b/scripts/package/builddeb
|
||||
@@ -29,6 +29,27 @@ create_package() {
|
||||
@@ -41,6 +41,27 @@ create_package() {
|
||||
# in case we are in a restrictive umask environment like 0077
|
||||
chmod -R a+rX "$pdir"
|
||||
|
||||
+ # Create preinstall and post install script to remove dtb
|
||||
+ if [[ "$1" == *dtb* ]]; then
|
||||
+ if [ "$3" = "dtb" ]; then
|
||||
+ echo "if [ -d /boot/dtb-$version ]; then mv /boot/dtb-$version /boot/dtb-$version.old; fi" >> $pdir/DEBIAN/preinst
|
||||
+ echo "if [ -d /boot/dtb.old ]; then rm -rf /boot/dtb.old; fi" >> $pdir/DEBIAN/preinst
|
||||
+ echo "if [ -d /boot/dtb ]; then mv /boot/dtb /boot/dtb.old; fi" >> $pdir/DEBIAN/preinst
|
||||
|
@ -21,7 +34,7 @@ index 90c9a8a..3c79b90 100755
|
|||
+ fi
|
||||
+
|
||||
+ # Create postinstall script for headers
|
||||
+ if [[ "$1" == *headers* ]]; then
|
||||
+ if [ "$3" = "headers" ]; then
|
||||
+ echo "cd /usr/src/linux-headers-$version; echo \"Compiling headers - please wait ...\"; find -type f -exec touch {} +;make -s scripts >/dev/null 2>&1; make -s M=scripts/mod/ >/dev/null 2>&1" >> $pdir/DEBIAN/postinst
|
||||
+ echo "exit 0" >> $pdir/DEBIAN/postinst
|
||||
+ chmod 775 $pdir/DEBIAN/postinst
|
||||
|
@ -30,7 +43,7 @@ index 90c9a8a..3c79b90 100755
|
|||
# Create the package
|
||||
dpkg-gencontrol -p$pname -P"$pdir"
|
||||
dpkg --build "$pdir" ..
|
||||
@@ -39,9 +60,11 @@ tmpdir="$objtree/debian/tmp"
|
||||
@@ -51,9 +72,11 @@ tmpdir="$objtree/debian/tmp"
|
||||
kernel_headers_dir="$objtree/debian/hdrtmp"
|
||||
libc_headers_dir="$objtree/debian/headertmp"
|
||||
dbg_dir="$objtree/debian/dbgtmp"
|
||||
|
@ -45,7 +58,7 @@ index 90c9a8a..3c79b90 100755
|
|||
dbg_packagename=$packagename-dbg
|
||||
|
||||
if [ "$ARCH" = "um" ] ; then
|
||||
@@ -52,6 +75,15 @@ fi
|
||||
@@ -64,6 +87,15 @@ fi
|
||||
# XXX: have each arch Makefile export a variable of the canonical image install
|
||||
# path instead
|
||||
case $ARCH in
|
||||
|
@ -61,8 +74,8 @@ index 90c9a8a..3c79b90 100755
|
|||
um)
|
||||
installed_image_path="usr/bin/linux-$version"
|
||||
;;
|
||||
@@ -65,7 +97,9 @@ esac
|
||||
BUILD_DEBUG="$(grep -s '^CONFIG_DEBUG_INFO=y' $KCONFIG_CONFIG || true)"
|
||||
@@ -77,7 +109,9 @@ esac
|
||||
BUILD_DEBUG=$(if_enabled_echo CONFIG_DEBUG_INFO Yes)
|
||||
|
||||
# Setup the directory structure
|
||||
-rm -rf "$tmpdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" $objtree/debian/files
|
||||
|
@ -72,7 +85,7 @@ index 90c9a8a..3c79b90 100755
|
|||
mkdir -m 755 -p "$tmpdir/DEBIAN"
|
||||
mkdir -p "$tmpdir/lib" "$tmpdir/boot"
|
||||
mkdir -p "$kernel_headers_dir/lib/modules/$version/"
|
||||
@@ -118,6 +152,11 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
|
||||
@@ -129,6 +163,11 @@ if is_enabled CONFIG_MODULES; then
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -82,9 +95,9 @@ index 90c9a8a..3c79b90 100755
|
|||
+fi
|
||||
+
|
||||
if [ "$ARCH" != "um" ]; then
|
||||
$MAKE headers_check KBUILD_SRC=
|
||||
$MAKE headers_install KBUILD_SRC= INSTALL_HDR_PATH="$libc_headers_dir/usr"
|
||||
@@ -137,7 +176,7 @@ fi
|
||||
$MAKE -f $srctree/Makefile headers
|
||||
$MAKE -f $srctree/Makefile headers_install INSTALL_HDR_PATH="$libc_headers_dir/usr"
|
||||
@@ -148,7 +187,7 @@ debhookdir=${KDEB_HOOKDIR:-/etc/kernel}
|
||||
for script in postinst postrm preinst prerm ; do
|
||||
mkdir -p "$tmpdir$debhookdir/$script.d"
|
||||
cat <<EOF > "$tmpdir/DEBIAN/$script"
|
||||
|
@ -93,7 +106,7 @@ index 90c9a8a..3c79b90 100755
|
|||
|
||||
set -e
|
||||
|
||||
@@ -153,9 +192,60 @@ EOF
|
||||
@@ -164,9 +203,60 @@ EOF
|
||||
chmod 755 "$tmpdir/DEBIAN/$script"
|
||||
done
|
||||
|
||||
|
@ -153,8 +166,8 @@ index 90c9a8a..3c79b90 100755
|
|||
+(cd $srctree; find security/*/include -type f) >> "$objtree/debian/hdrsrcfiles"
|
||||
(cd $srctree; find arch/$SRCARCH -name module.lds -o -name Kbuild.platforms -o -name Platform) >> "$objtree/debian/hdrsrcfiles"
|
||||
(cd $srctree; find $(find arch/$SRCARCH -name include -o -name scripts -type d) -type f) >> "$objtree/debian/hdrsrcfiles"
|
||||
if grep -q '^CONFIG_STACK_VALIDATION=y' $KCONFIG_CONFIG ; then
|
||||
@@ -167,15 +257,19 @@ if grep -q '^CONFIG_GCC_PLUGINS=y' $KCONFIG_CONFIG ; then
|
||||
if is_enabled CONFIG_STACK_VALIDATION; then
|
||||
@@ -178,15 +268,18 @@ if is_enabled CONFIG_GCC_PLUGINS; then
|
||||
fi
|
||||
destdir=$kernel_headers_dir/usr/src/linux-headers-$version
|
||||
mkdir -p "$destdir"
|
||||
|
@ -168,18 +181,18 @@ index 90c9a8a..3c79b90 100755
|
|||
+(cd $destdir; make M=scripts clean)
|
||||
+
|
||||
if [ "$ARCH" != "um" ]; then
|
||||
create_package "$kernel_headers_packagename" "$kernel_headers_dir"
|
||||
- create_package "$kernel_headers_packagename" "$kernel_headers_dir"
|
||||
- create_package "$libc_headers_packagename" "$libc_headers_dir"
|
||||
+ # create_package "$libc_headers_packagename" "$libc_headers_dir"
|
||||
+ create_package "$dtb_packagename" "$dtb_dir"
|
||||
+ create_package "$kernel_headers_packagename" "$kernel_headers_dir" "headers"
|
||||
+ create_package "$dtb_packagename" "$dtb_dir" "dtb"
|
||||
fi
|
||||
|
||||
create_package "$packagename" "$tmpdir"
|
||||
diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
|
||||
index 6adb3a1..00e12eb 100755
|
||||
index e0750b704..6ac0114c0 100755
|
||||
--- a/scripts/package/mkdebian
|
||||
+++ b/scripts/package/mkdebian
|
||||
@@ -61,10 +61,12 @@ else
|
||||
@@ -94,10 +94,12 @@ else
|
||||
packageversion=$version-$revision
|
||||
fi
|
||||
sourcename=$KDEB_SOURCENAME
|
||||
|
@ -194,7 +207,7 @@ index 6adb3a1..00e12eb 100755
|
|||
set_debarch
|
||||
|
||||
if [ "$ARCH" = "um" ] ; then
|
||||
@@ -168,6 +170,11 @@ Architecture: $debarch
|
||||
@@ -205,6 +207,11 @@ Architecture: $debarch
|
||||
Description: Linux kernel debugging symbols for $version
|
||||
This package will come in handy if you need to debug the kernel. It provides
|
||||
all the necessary debug symbols for the kernel and its modules.
|
||||
|
@ -206,16 +219,3 @@ index 6adb3a1..00e12eb 100755
|
|||
EOF
|
||||
|
||||
cat <<EOF > debian/rules
|
||||
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
|
||||
index f839ecd9..cd276162 100644
|
||||
--- a/arch/arm64/Makefile
|
||||
+++ b/arch/arm64/Makefile
|
||||
@@ -103,7 +103,7 @@ core-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
|
||||
|
||||
# Default target when executing plain make
|
||||
boot := arch/arm64/boot
|
||||
-KBUILD_IMAGE := $(boot)/Image.gz
|
||||
+KBUILD_IMAGE := $(boot)/Image
|
||||
|
||||
all: Image.gz $(KBUILD_DTBS)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue