mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
bump rockchip edge kernel to 6.4
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm 6.2.8 Kernel Configuration
|
||||
# Linux/arm 6.4.2 Kernel Configuration
|
||||
#
|
||||
CONFIG_CC_VERSION_TEXT="arm-linux-gnueabihf-gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0"
|
||||
CONFIG_CC_IS_GCC=y
|
||||
@@ -131,7 +131,6 @@ CONFIG_CPU_ISOLATION=y
|
||||
CONFIG_TREE_RCU=y
|
||||
CONFIG_PREEMPT_RCU=y
|
||||
# CONFIG_RCU_EXPERT is not set
|
||||
CONFIG_SRCU=y
|
||||
CONFIG_TREE_SRCU=y
|
||||
CONFIG_NEED_SRCU_NMI_SAFE=y
|
||||
CONFIG_TASKS_RCU_GENERIC=y
|
||||
@@ -147,7 +146,6 @@ CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_IKHEADERS=m
|
||||
CONFIG_LOG_BUF_SHIFT=18
|
||||
CONFIG_LOG_CPU_MAX_BUF_SHIFT=12
|
||||
CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13
|
||||
# CONFIG_PRINTK_INDEX is not set
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
|
||||
@@ -159,7 +157,6 @@ CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
|
||||
CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
|
||||
CONFIG_GCC11_NO_ARRAY_BOUNDS=y
|
||||
CONFIG_GCC12_NO_ARRAY_BOUNDS=y
|
||||
CONFIG_CC_NO_ARRAY_BOUNDS=y
|
||||
CONFIG_CGROUPS=y
|
||||
CONFIG_PAGE_COUNTER=y
|
||||
@@ -172,6 +169,7 @@ CONFIG_CGROUP_SCHED=y
|
||||
CONFIG_FAIR_GROUP_SCHED=y
|
||||
CONFIG_CFS_BANDWIDTH=y
|
||||
CONFIG_RT_GROUP_SCHED=y
|
||||
CONFIG_SCHED_MM_CID=y
|
||||
CONFIG_CGROUP_PIDS=y
|
||||
CONFIG_CGROUP_RDMA=y
|
||||
CONFIG_CGROUP_FREEZER=y
|
||||
@@ -192,7 +190,6 @@ CONFIG_PID_NS=y
|
||||
CONFIG_NET_NS=y
|
||||
# CONFIG_CHECKPOINT_RESTORE is not set
|
||||
# CONFIG_SCHED_AUTOGROUP is not set
|
||||
# CONFIG_SYSFS_DEPRECATED is not set
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
@@ -482,7 +479,6 @@ CONFIG_ALIGNMENT_TRAP=y
|
||||
#
|
||||
CONFIG_USE_OF=y
|
||||
CONFIG_ATAGS=y
|
||||
# CONFIG_UNUSED_BOARD_FILES is not set
|
||||
# CONFIG_DEPRECATED_PARAM_STRUCT is not set
|
||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||
@@ -592,7 +588,8 @@ CONFIG_AS_VFP_VMRS_FPINST=y
|
||||
# General architecture-dependent options
|
||||
#
|
||||
CONFIG_KPROBES=y
|
||||
# CONFIG_JUMP_LABEL is not set
|
||||
CONFIG_JUMP_LABEL=y
|
||||
# CONFIG_STATIC_KEYS_SELFTEST is not set
|
||||
CONFIG_OPTPROBES=y
|
||||
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
|
||||
CONFIG_ARCH_USE_BUILTIN_BSWAP=y
|
||||
@@ -619,6 +616,7 @@ CONFIG_HAVE_HW_BREAKPOINT=y
|
||||
CONFIG_HAVE_PERF_REGS=y
|
||||
CONFIG_HAVE_PERF_USER_STACK_DUMP=y
|
||||
CONFIG_HAVE_ARCH_JUMP_LABEL=y
|
||||
CONFIG_MMU_LAZY_TLB_REFCOUNT=y
|
||||
CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y
|
||||
CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
|
||||
CONFIG_HAVE_ARCH_SECCOMP=y
|
||||
@@ -675,6 +673,7 @@ CONFIG_FUNCTION_ALIGNMENT=0
|
||||
CONFIG_RT_MUTEXES=y
|
||||
CONFIG_BASE_SMALL=0
|
||||
CONFIG_MODULES=y
|
||||
# CONFIG_MODULE_DEBUG is not set
|
||||
CONFIG_MODULE_FORCE_LOAD=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
CONFIG_MODULE_FORCE_UNLOAD=y
|
||||
@@ -693,6 +692,7 @@ CONFIG_MODULES_TREE_LOOKUP=y
|
||||
CONFIG_BLOCK=y
|
||||
CONFIG_BLOCK_LEGACY_AUTOLOAD=y
|
||||
CONFIG_BLK_CGROUP_RWSTAT=y
|
||||
CONFIG_BLK_CGROUP_PUNT_BIO=y
|
||||
CONFIG_BLK_DEV_BSG_COMMON=y
|
||||
CONFIG_BLK_DEV_BSGLIB=y
|
||||
CONFIG_BLK_DEV_INTEGRITY=y
|
||||
@@ -795,13 +795,13 @@ CONFIG_ZBUD=y
|
||||
CONFIG_Z3FOLD=y
|
||||
CONFIG_ZSMALLOC=y
|
||||
# CONFIG_ZSMALLOC_STAT is not set
|
||||
CONFIG_ZSMALLOC_CHAIN_SIZE=8
|
||||
|
||||
#
|
||||
# SLAB allocator options
|
||||
#
|
||||
# CONFIG_SLAB is not set
|
||||
CONFIG_SLUB=y
|
||||
# CONFIG_SLOB_DEPRECATED is not set
|
||||
# CONFIG_SLUB_TINY is not set
|
||||
CONFIG_SLAB_MERGE_DEFAULT=y
|
||||
# CONFIG_SLAB_FREELIST_RANDOM is not set
|
||||
@@ -842,6 +842,7 @@ CONFIG_ARCH_HAS_CURRENT_STACK_POINTER=y
|
||||
CONFIG_VM_EVENT_COUNTERS=y
|
||||
# CONFIG_PERCPU_STATS is not set
|
||||
# CONFIG_GUP_TEST is not set
|
||||
# CONFIG_DMAPOOL_TEST is not set
|
||||
CONFIG_KMAP_LOCAL=y
|
||||
CONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y
|
||||
# CONFIG_ANON_VMA_NAME is not set
|
||||
@@ -849,6 +850,7 @@ CONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y
|
||||
CONFIG_LRU_GEN=y
|
||||
CONFIG_LRU_GEN_ENABLED=y
|
||||
# CONFIG_LRU_GEN_STATS is not set
|
||||
CONFIG_LOCK_MM_AND_FIND_VMA=y
|
||||
|
||||
#
|
||||
# Data Access Monitoring
|
||||
@@ -889,6 +891,7 @@ CONFIG_XFRM_IPCOMP=m
|
||||
CONFIG_NET_KEY=m
|
||||
# CONFIG_NET_KEY_MIGRATE is not set
|
||||
# CONFIG_XDP_SOCKETS is not set
|
||||
CONFIG_NET_HANDSHAKE=y
|
||||
CONFIG_INET=y
|
||||
CONFIG_IP_MULTICAST=y
|
||||
CONFIG_IP_ADVANCED_ROUTER=y
|
||||
@@ -998,6 +1001,7 @@ CONFIG_NETFILTER_SKIP_EGRESS=y
|
||||
CONFIG_NETFILTER_NETLINK=m
|
||||
CONFIG_NETFILTER_FAMILY_BRIDGE=y
|
||||
CONFIG_NETFILTER_FAMILY_ARP=y
|
||||
CONFIG_NETFILTER_BPF_LINK=y
|
||||
CONFIG_NETFILTER_NETLINK_HOOK=m
|
||||
CONFIG_NETFILTER_NETLINK_ACCT=m
|
||||
CONFIG_NETFILTER_NETLINK_QUEUE=m
|
||||
@@ -1014,6 +1018,7 @@ CONFIG_NF_CONNTRACK_EVENTS=y
|
||||
CONFIG_NF_CONNTRACK_TIMEOUT=y
|
||||
CONFIG_NF_CONNTRACK_TIMESTAMP=y
|
||||
CONFIG_NF_CONNTRACK_LABELS=y
|
||||
CONFIG_NF_CONNTRACK_OVS=y
|
||||
CONFIG_NF_CT_PROTO_DCCP=y
|
||||
CONFIG_NF_CT_PROTO_GRE=y
|
||||
CONFIG_NF_CT_PROTO_SCTP=y
|
||||
@@ -1267,7 +1272,6 @@ CONFIG_IP_NF_TARGET_MASQUERADE=m
|
||||
CONFIG_IP_NF_TARGET_NETMAP=m
|
||||
CONFIG_IP_NF_TARGET_REDIRECT=m
|
||||
CONFIG_IP_NF_MANGLE=m
|
||||
CONFIG_IP_NF_TARGET_CLUSTERIP=m
|
||||
CONFIG_IP_NF_TARGET_ECN=m
|
||||
CONFIG_IP_NF_TARGET_TTL=m
|
||||
CONFIG_IP_NF_RAW=m
|
||||
@@ -1449,10 +1453,8 @@ CONFIG_NET_SCHED=y
|
||||
#
|
||||
# Queueing/Scheduling
|
||||
#
|
||||
CONFIG_NET_SCH_CBQ=m
|
||||
CONFIG_NET_SCH_HTB=m
|
||||
CONFIG_NET_SCH_HFSC=m
|
||||
CONFIG_NET_SCH_ATM=m
|
||||
CONFIG_NET_SCH_PRIO=m
|
||||
CONFIG_NET_SCH_MULTIQ=m
|
||||
CONFIG_NET_SCH_RED=m
|
||||
@@ -1462,9 +1464,9 @@ CONFIG_NET_SCH_TEQL=m
|
||||
CONFIG_NET_SCH_TBF=m
|
||||
CONFIG_NET_SCH_CBS=m
|
||||
CONFIG_NET_SCH_ETF=m
|
||||
CONFIG_NET_SCH_MQPRIO_LIB=m
|
||||
# CONFIG_NET_SCH_TAPRIO is not set
|
||||
CONFIG_NET_SCH_GRED=m
|
||||
CONFIG_NET_SCH_DSMARK=m
|
||||
CONFIG_NET_SCH_NETEM=m
|
||||
CONFIG_NET_SCH_DRR=m
|
||||
CONFIG_NET_SCH_MQPRIO=m
|
||||
@@ -1499,8 +1501,6 @@ CONFIG_NET_CLS_FW=m
|
||||
CONFIG_NET_CLS_U32=m
|
||||
CONFIG_CLS_U32_PERF=y
|
||||
CONFIG_CLS_U32_MARK=y
|
||||
CONFIG_NET_CLS_RSVP=m
|
||||
CONFIG_NET_CLS_RSVP6=m
|
||||
CONFIG_NET_CLS_FLOW=m
|
||||
CONFIG_NET_CLS_CGROUP=m
|
||||
CONFIG_NET_CLS_BPF=m
|
||||
@@ -1569,6 +1569,7 @@ CONFIG_NET_L3_MASTER_DEV=y
|
||||
# CONFIG_QRTR is not set
|
||||
# CONFIG_NET_NCSI is not set
|
||||
CONFIG_PCPU_DEV_REFCNT=y
|
||||
CONFIG_MAX_SKB_FRAGS=17
|
||||
CONFIG_RPS=y
|
||||
CONFIG_RFS_ACCEL=y
|
||||
CONFIG_SOCK_RX_QUEUE_MAPPING=y
|
||||
@@ -1650,6 +1651,7 @@ CONFIG_BT_MRVL_SDIO=y
|
||||
CONFIG_BT_MTKSDIO=m
|
||||
CONFIG_BT_MTKUART=m
|
||||
CONFIG_BT_VIRTIO=m
|
||||
# CONFIG_BT_NXPUART is not set
|
||||
# end of Bluetooth device drivers
|
||||
|
||||
# CONFIG_AF_RXRPC is not set
|
||||
@@ -1725,7 +1727,7 @@ CONFIG_NET_SELFTESTS=y
|
||||
CONFIG_NET_SOCK_MSG=y
|
||||
CONFIG_NET_DEVLINK=y
|
||||
CONFIG_PAGE_POOL=y
|
||||
# CONFIG_PAGE_POOL_STATS is not set
|
||||
CONFIG_PAGE_POOL_STATS=y
|
||||
CONFIG_FAILOVER=m
|
||||
CONFIG_ETHTOOL_NETLINK=y
|
||||
|
||||
@@ -1778,10 +1780,10 @@ CONFIG_REGMAP_W1=m
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_REGMAP_IRQ=y
|
||||
CONFIG_REGMAP_SCCB=m
|
||||
CONFIG_REGMAP_SPI_AVMM=m
|
||||
CONFIG_DMA_SHARED_BUFFER=y
|
||||
# CONFIG_DMA_FENCE_TRACE is not set
|
||||
CONFIG_GENERIC_ARCH_TOPOLOGY=y
|
||||
# CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT is not set
|
||||
# end of Generic Driver Options
|
||||
|
||||
#
|
||||
@@ -1806,6 +1808,7 @@ CONFIG_PROC_EVENTS=y
|
||||
# ARM System Control and Management Interface Protocol
|
||||
#
|
||||
CONFIG_ARM_SCMI_PROTOCOL=m
|
||||
# CONFIG_ARM_SCMI_RAW_MODE_SUPPORT is not set
|
||||
# CONFIG_ARM_SCMI_TRANSPORT_VIRTIO is not set
|
||||
CONFIG_ARM_SCMI_POWER_DOMAIN=m
|
||||
# CONFIG_ARM_SCMI_POWER_CONTROL is not set
|
||||
@@ -2035,6 +2038,7 @@ CONFIG_TCM_FILEIO=m
|
||||
CONFIG_TCM_PSCSI=m
|
||||
CONFIG_LOOPBACK_TARGET=m
|
||||
CONFIG_ISCSI_TARGET=m
|
||||
# CONFIG_REMOTE_TARGET is not set
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_MII=y
|
||||
CONFIG_NET_CORE=y
|
||||
@@ -2081,10 +2085,14 @@ CONFIG_NET_DSA_BCM_SF2=m
|
||||
CONFIG_NET_DSA_LOOP=m
|
||||
# CONFIG_NET_DSA_LANTIQ_GSWIP is not set
|
||||
CONFIG_NET_DSA_MT7530=m
|
||||
CONFIG_NET_DSA_MT7530_MDIO=m
|
||||
CONFIG_NET_DSA_MT7530_MMIO=m
|
||||
CONFIG_NET_DSA_MV88E6060=m
|
||||
# CONFIG_NET_DSA_MICROCHIP_KSZ_COMMON is not set
|
||||
CONFIG_NET_DSA_MV88E6XXX=m
|
||||
# CONFIG_NET_DSA_MV88E6XXX_PTP is not set
|
||||
CONFIG_NET_DSA_MSCC_FELIX_DSA_LIB=m
|
||||
# CONFIG_NET_DSA_MSCC_OCELOT_EXT is not set
|
||||
CONFIG_NET_DSA_MSCC_SEVILLE=m
|
||||
# CONFIG_NET_DSA_AR9331 is not set
|
||||
# CONFIG_NET_DSA_QCA8K is not set
|
||||
@@ -2131,7 +2139,6 @@ CONFIG_NET_VENDOR_GOOGLE=y
|
||||
# CONFIG_NET_VENDOR_HISILICON is not set
|
||||
# CONFIG_NET_VENDOR_HUAWEI is not set
|
||||
# CONFIG_NET_VENDOR_INTEL is not set
|
||||
CONFIG_NET_VENDOR_WANGXUN=y
|
||||
CONFIG_NET_VENDOR_ADI=y
|
||||
# CONFIG_ADIN1110 is not set
|
||||
CONFIG_NET_VENDOR_LITEX=y
|
||||
@@ -2170,6 +2177,7 @@ CONFIG_DWMAC_INTEL_PLAT=m
|
||||
CONFIG_NET_VENDOR_VERTEXCOM=y
|
||||
# CONFIG_MSE102X is not set
|
||||
# CONFIG_NET_VENDOR_VIA is not set
|
||||
CONFIG_NET_VENDOR_WANGXUN=y
|
||||
# CONFIG_NET_VENDOR_WIZNET is not set
|
||||
CONFIG_NET_VENDOR_XILINX=y
|
||||
CONFIG_XILINX_EMACLITE=m
|
||||
@@ -2179,6 +2187,7 @@ CONFIG_PHYLINK=y
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_LED_TRIGGER_PHY=y
|
||||
CONFIG_PHYLIB_LEDS=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
# CONFIG_SFP is not set
|
||||
|
||||
@@ -2209,13 +2218,16 @@ CONFIG_MARVELL_88X2222_PHY=m
|
||||
CONFIG_MAXLINEAR_GPHY=m
|
||||
CONFIG_MEDIATEK_GE_PHY=m
|
||||
# CONFIG_MICREL_PHY is not set
|
||||
# CONFIG_MICROCHIP_T1S_PHY is not set
|
||||
CONFIG_MICROCHIP_PHY=m
|
||||
CONFIG_MICROCHIP_T1_PHY=m
|
||||
# CONFIG_MICROSEMI_PHY is not set
|
||||
CONFIG_MOTORCOMM_PHY=m
|
||||
# CONFIG_NATIONAL_PHY is not set
|
||||
# CONFIG_NXP_CBTX_PHY is not set
|
||||
CONFIG_NXP_C45_TJA11XX_PHY=m
|
||||
# CONFIG_NXP_TJA11XX_PHY is not set
|
||||
# CONFIG_NCN26000_PHY is not set
|
||||
# CONFIG_AT803X_PHY is not set
|
||||
# CONFIG_QSEMI_PHY is not set
|
||||
CONFIG_REALTEK_PHY=m
|
||||
@@ -2311,6 +2323,7 @@ CONFIG_MDIO_BUS_MUX_MULTIPLEXER=m
|
||||
#
|
||||
CONFIG_PCS_XPCS=y
|
||||
CONFIG_PCS_LYNX=m
|
||||
CONFIG_PCS_MTK_LYNXI=m
|
||||
# end of PCS device drivers
|
||||
|
||||
CONFIG_PPP=m
|
||||
@@ -2502,9 +2515,13 @@ CONFIG_RTL8192C_COMMON=m
|
||||
CONFIG_RTL8XXXU=y
|
||||
# CONFIG_RTL8XXXU_UNTESTED is not set
|
||||
CONFIG_RTW88=m
|
||||
# CONFIG_RTW88_8822BS is not set
|
||||
# CONFIG_RTW88_8822BU is not set
|
||||
# CONFIG_RTW88_8822CS is not set
|
||||
# CONFIG_RTW88_8822CU is not set
|
||||
# CONFIG_RTW88_8723DS is not set
|
||||
# CONFIG_RTW88_8723DU is not set
|
||||
# CONFIG_RTW88_8821CS is not set
|
||||
# CONFIG_RTW88_8821CU is not set
|
||||
# CONFIG_RTW89 is not set
|
||||
CONFIG_WLAN_VENDOR_RSI=y
|
||||
@@ -2520,7 +2537,6 @@ CONFIG_WLAN_VENDOR_TI=y
|
||||
# CONFIG_WLCORE is not set
|
||||
# CONFIG_RTL8723DU is not set
|
||||
CONFIG_RTL8723DS=m
|
||||
CONFIG_RTL8822CS=m
|
||||
CONFIG_RTL8822BU=m
|
||||
CONFIG_RTL8821CU=m
|
||||
CONFIG_88XXAU=m
|
||||
@@ -2532,8 +2548,8 @@ CONFIG_USB_ZD1201=m
|
||||
CONFIG_ZD1211RW=m
|
||||
# CONFIG_ZD1211RW_DEBUG is not set
|
||||
CONFIG_WLAN_VENDOR_QUANTENNA=y
|
||||
# CONFIG_MAC80211_HWSIM is not set
|
||||
CONFIG_USB_NET_RNDIS_WLAN=y
|
||||
# CONFIG_MAC80211_HWSIM is not set
|
||||
CONFIG_VIRT_WIFI=m
|
||||
# CONFIG_WAN is not set
|
||||
|
||||
@@ -2699,6 +2715,7 @@ CONFIG_TOUCHSCREEN_ELAN=y
|
||||
# CONFIG_TOUCHSCREEN_MELFAS_MIP4 is not set
|
||||
CONFIG_TOUCHSCREEN_MSG2638=m
|
||||
# CONFIG_TOUCHSCREEN_MTOUCH is not set
|
||||
# CONFIG_TOUCHSCREEN_NOVATEK_NVT_TS is not set
|
||||
# CONFIG_TOUCHSCREEN_IMAGIS is not set
|
||||
# CONFIG_TOUCHSCREEN_IMX6UL_TSC is not set
|
||||
# CONFIG_TOUCHSCREEN_INEXIO is not set
|
||||
@@ -2857,7 +2874,7 @@ CONFIG_SERIAL_OF_PLATFORM=y
|
||||
#
|
||||
# CONFIG_SERIAL_AMBA_PL010 is not set
|
||||
# CONFIG_SERIAL_AMBA_PL011 is not set
|
||||
# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set
|
||||
# CONFIG_SERIAL_EARLYCON_SEMIHOST is not set
|
||||
# CONFIG_SERIAL_MAX3100 is not set
|
||||
# CONFIG_SERIAL_MAX310X is not set
|
||||
# CONFIG_SERIAL_UARTLITE is not set
|
||||
@@ -2942,7 +2959,7 @@ CONFIG_I2C_DEMUX_PINCTRL=m
|
||||
# end of Multiplexer I2C Chip support
|
||||
|
||||
CONFIG_I2C_HELPER_AUTO=y
|
||||
CONFIG_I2C_ALGOBIT=y
|
||||
CONFIG_I2C_ALGOBIT=m
|
||||
|
||||
#
|
||||
# I2C Hardware Bus support
|
||||
@@ -3000,7 +3017,6 @@ CONFIG_SPI_BITBANG=y
|
||||
# CONFIG_SPI_CADENCE is not set
|
||||
CONFIG_SPI_CADENCE_QUADSPI=m
|
||||
# CONFIG_SPI_DESIGNWARE is not set
|
||||
# CONFIG_SPI_NXP_FLEXSPI is not set
|
||||
# CONFIG_SPI_GPIO is not set
|
||||
# CONFIG_SPI_FSL_SPI is not set
|
||||
# CONFIG_SPI_MICROCHIP_CORE is not set
|
||||
@@ -3078,7 +3094,6 @@ CONFIG_PINCTRL_MADERA=m
|
||||
#
|
||||
# end of Renesas pinctrl drivers
|
||||
|
||||
CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_GPIOLIB_FASTPATH_LIMIT=512
|
||||
CONFIG_OF_GPIO=y
|
||||
@@ -3116,6 +3131,7 @@ CONFIG_GPIO_ROCKCHIP=m
|
||||
# I2C GPIO expanders
|
||||
#
|
||||
# CONFIG_GPIO_ADNP is not set
|
||||
# CONFIG_GPIO_FXL6408 is not set
|
||||
# CONFIG_GPIO_GW_PLD is not set
|
||||
# CONFIG_GPIO_MAX7300 is not set
|
||||
# CONFIG_GPIO_MAX732X is not set
|
||||
@@ -3169,7 +3185,6 @@ CONFIG_W1_CON=y
|
||||
#
|
||||
# CONFIG_W1_MASTER_DS2490 is not set
|
||||
# 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
|
||||
@@ -3216,7 +3231,6 @@ CONFIG_SYSCON_REBOOT_MODE=m
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
# CONFIG_POWER_SUPPLY_DEBUG is not set
|
||||
CONFIG_POWER_SUPPLY_HWMON=y
|
||||
# CONFIG_PDA_POWER is not set
|
||||
# CONFIG_GENERIC_ADC_BATTERY is not set
|
||||
# CONFIG_IP5XXX_POWER is not set
|
||||
# CONFIG_TEST_POWER is not set
|
||||
@@ -3258,6 +3272,8 @@ CONFIG_CHARGER_BQ256XX=m
|
||||
CONFIG_BATTERY_GOLDFISH=m
|
||||
CONFIG_BATTERY_RT5033=m
|
||||
# CONFIG_CHARGER_RT9455 is not set
|
||||
# CONFIG_CHARGER_RT9467 is not set
|
||||
# CONFIG_CHARGER_RT9471 is not set
|
||||
CONFIG_CHARGER_CROS_USBPD=m
|
||||
CONFIG_CHARGER_CROS_PCHG=m
|
||||
CONFIG_CHARGER_UCS1002=m
|
||||
@@ -3339,6 +3355,7 @@ CONFIG_SENSORS_MAX6639=m
|
||||
CONFIG_SENSORS_MAX6650=m
|
||||
CONFIG_SENSORS_MAX6697=m
|
||||
CONFIG_SENSORS_MAX31790=m
|
||||
# CONFIG_SENSORS_MC34VR500 is not set
|
||||
CONFIG_SENSORS_MCP3021=m
|
||||
# CONFIG_SENSORS_TC654 is not set
|
||||
CONFIG_SENSORS_TPS23861=m
|
||||
@@ -3423,7 +3440,6 @@ CONFIG_SENSORS_W83L785TS=m
|
||||
CONFIG_SENSORS_W83L786NG=m
|
||||
CONFIG_SENSORS_W83627HF=m
|
||||
CONFIG_SENSORS_W83627EHF=m
|
||||
CONFIG_SENSORS_INTEL_M10_BMC_HWMON=m
|
||||
CONFIG_THERMAL=y
|
||||
# CONFIG_THERMAL_NETLINK is not set
|
||||
# CONFIG_THERMAL_STATISTICS is not set
|
||||
@@ -3504,12 +3520,12 @@ CONFIG_MFD_CROS_EC_DEV=y
|
||||
CONFIG_MFD_MADERA=m
|
||||
CONFIG_MFD_MADERA_I2C=m
|
||||
# CONFIG_MFD_MADERA_SPI is not set
|
||||
# CONFIG_MFD_MAX597X is not set
|
||||
# CONFIG_MFD_CS47L15 is not set
|
||||
# CONFIG_MFD_CS47L35 is not set
|
||||
# CONFIG_MFD_CS47L85 is not set
|
||||
# CONFIG_MFD_CS47L90 is not set
|
||||
# CONFIG_MFD_CS47L92 is not set
|
||||
# CONFIG_MFD_ASIC3 is not set
|
||||
# CONFIG_PMIC_DA903X is not set
|
||||
# CONFIG_MFD_DA9052_SPI is not set
|
||||
# CONFIG_MFD_DA9052_I2C is not set
|
||||
@@ -3523,7 +3539,6 @@ CONFIG_MFD_MADERA_I2C=m
|
||||
# CONFIG_MFD_MC13XXX_I2C is not set
|
||||
# CONFIG_MFD_MP2629 is not set
|
||||
# CONFIG_MFD_HI6421_PMIC is not set
|
||||
# CONFIG_HTC_PASIC3 is not set
|
||||
# CONFIG_MFD_IQS62X is not set
|
||||
# CONFIG_MFD_KEMPLD is not set
|
||||
# CONFIG_MFD_88PM800 is not set
|
||||
@@ -3589,9 +3604,6 @@ CONFIG_MFD_TPS6586X=y
|
||||
CONFIG_MFD_WL1273_CORE=m
|
||||
# CONFIG_MFD_LM3533 is not set
|
||||
# CONFIG_MFD_TC3589X is not set
|
||||
# CONFIG_MFD_T7L66XB is not set
|
||||
# CONFIG_MFD_TC6387XB is not set
|
||||
# CONFIG_MFD_TC6393XB is not set
|
||||
CONFIG_MFD_TQMX86=m
|
||||
# CONFIG_MFD_LOCHNAGAR is not set
|
||||
# CONFIG_MFD_ARIZONA_I2C is not set
|
||||
@@ -3611,7 +3623,7 @@ CONFIG_MFD_ATC260X_I2C=m
|
||||
CONFIG_MFD_KHADAS_MCU=m
|
||||
# CONFIG_MFD_QCOM_PM8008 is not set
|
||||
# CONFIG_RAVE_SP_CORE is not set
|
||||
CONFIG_MFD_INTEL_M10_BMC=m
|
||||
# CONFIG_MFD_INTEL_M10_BMC_SPI is not set
|
||||
CONFIG_MFD_RSMU_I2C=m
|
||||
CONFIG_MFD_RSMU_SPI=m
|
||||
# end of Multifunction device drivers
|
||||
@@ -3654,6 +3666,7 @@ CONFIG_REGULATOR_MAX8893=m
|
||||
# CONFIG_REGULATOR_MAX8952 is not set
|
||||
# CONFIG_REGULATOR_MAX8973 is not set
|
||||
# CONFIG_REGULATOR_MAX20086 is not set
|
||||
# CONFIG_REGULATOR_MAX20411 is not set
|
||||
# CONFIG_REGULATOR_MAX77826 is not set
|
||||
# CONFIG_REGULATOR_MCP16502 is not set
|
||||
# CONFIG_REGULATOR_MP5416 is not set
|
||||
@@ -3672,8 +3685,10 @@ CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY=m
|
||||
CONFIG_REGULATOR_RK808=y
|
||||
CONFIG_REGULATOR_ROHM=m
|
||||
CONFIG_REGULATOR_RT4801=m
|
||||
# CONFIG_REGULATOR_RT4803 is not set
|
||||
CONFIG_REGULATOR_RT4831=m
|
||||
# CONFIG_REGULATOR_RT5190A is not set
|
||||
# CONFIG_REGULATOR_RT5739 is not set
|
||||
# CONFIG_REGULATOR_RT5759 is not set
|
||||
CONFIG_REGULATOR_RT6160=m
|
||||
# CONFIG_REGULATOR_RT6190 is not set
|
||||
@@ -4098,6 +4113,7 @@ CONFIG_MEDIA_COMMON_OPTIONS=y
|
||||
#
|
||||
CONFIG_CYPRESS_FIRMWARE=m
|
||||
CONFIG_TTPCI_EEPROM=m
|
||||
CONFIG_UVC_COMMON=m
|
||||
CONFIG_VIDEO_CX2341X=m
|
||||
CONFIG_VIDEO_TVEEPROM=m
|
||||
CONFIG_DVB_B2C2_FLEXCOP=m
|
||||
@@ -4133,22 +4149,21 @@ CONFIG_VIDEO_IMX208=m
|
||||
# CONFIG_VIDEO_IMX258 is not set
|
||||
CONFIG_VIDEO_IMX274=m
|
||||
CONFIG_VIDEO_IMX290=m
|
||||
# CONFIG_VIDEO_IMX296 is not set
|
||||
# CONFIG_VIDEO_IMX319 is not set
|
||||
CONFIG_VIDEO_IMX334=m
|
||||
CONFIG_VIDEO_IMX335=m
|
||||
# CONFIG_VIDEO_IMX355 is not set
|
||||
CONFIG_VIDEO_IMX412=m
|
||||
# CONFIG_VIDEO_IMX415 is not set
|
||||
CONFIG_VIDEO_MAX9271_LIB=m
|
||||
CONFIG_VIDEO_MT9M001=m
|
||||
CONFIG_VIDEO_MT9M032=m
|
||||
CONFIG_VIDEO_MT9M111=m
|
||||
CONFIG_VIDEO_MT9P031=m
|
||||
CONFIG_VIDEO_MT9T001=m
|
||||
CONFIG_VIDEO_MT9T112=m
|
||||
CONFIG_VIDEO_MT9V011=m
|
||||
CONFIG_VIDEO_MT9V032=m
|
||||
CONFIG_VIDEO_MT9V111=m
|
||||
CONFIG_VIDEO_NOON010PC30=m
|
||||
# CONFIG_VIDEO_OG01A1B is not set
|
||||
CONFIG_VIDEO_OV02A10=m
|
||||
# CONFIG_VIDEO_OV08D10 is not set
|
||||
@@ -4175,6 +4190,7 @@ CONFIG_VIDEO_OV7670=m
|
||||
CONFIG_VIDEO_OV772X=m
|
||||
CONFIG_VIDEO_OV7740=m
|
||||
CONFIG_VIDEO_OV8856=m
|
||||
# CONFIG_VIDEO_OV8858 is not set
|
||||
CONFIG_VIDEO_OV8865=m
|
||||
CONFIG_VIDEO_OV9282=m
|
||||
CONFIG_VIDEO_OV9640=m
|
||||
@@ -4185,13 +4201,9 @@ CONFIG_VIDEO_RJ54N1=m
|
||||
CONFIG_VIDEO_S5C73M3=m
|
||||
CONFIG_VIDEO_S5K5BAF=m
|
||||
CONFIG_VIDEO_S5K6A3=m
|
||||
CONFIG_VIDEO_S5K6AA=m
|
||||
CONFIG_VIDEO_SR030PC30=m
|
||||
# CONFIG_VIDEO_ST_VGXY61 is not set
|
||||
CONFIG_VIDEO_VS6624=m
|
||||
CONFIG_VIDEO_CCS=m
|
||||
CONFIG_VIDEO_ET8EK8=m
|
||||
CONFIG_VIDEO_M5MOLS=m
|
||||
# end of Camera sensor devices
|
||||
|
||||
#
|
||||
@@ -4280,7 +4292,6 @@ CONFIG_VIDEO_CX25840=m
|
||||
#
|
||||
# Video encoders
|
||||
#
|
||||
CONFIG_VIDEO_AD9389B=m
|
||||
CONFIG_VIDEO_ADV7170=m
|
||||
CONFIG_VIDEO_ADV7175=m
|
||||
CONFIG_VIDEO_ADV7343=m
|
||||
@@ -4542,8 +4553,8 @@ CONFIG_DVB_SP2=m
|
||||
# Graphics support
|
||||
#
|
||||
CONFIG_APERTURE_HELPERS=y
|
||||
CONFIG_VIDEO_CMDLINE=y
|
||||
CONFIG_VIDEO_NOMODESET=y
|
||||
# CONFIG_IMX_IPUV3_CORE is not set
|
||||
CONFIG_DRM=y
|
||||
CONFIG_DRM_MIPI_DBI=m
|
||||
CONFIG_DRM_MIPI_DSI=y
|
||||
@@ -4585,7 +4596,6 @@ CONFIG_DRM_KOMEDA=m
|
||||
|
||||
# CONFIG_DRM_VGEM is not set
|
||||
CONFIG_DRM_VKMS=m
|
||||
# CONFIG_DRM_EXYNOS is not set
|
||||
CONFIG_DRM_ROCKCHIP=y
|
||||
CONFIG_ROCKCHIP_VOP=y
|
||||
# CONFIG_ROCKCHIP_VOP2 is not set
|
||||
@@ -4599,13 +4609,8 @@ CONFIG_ROCKCHIP_LVDS=y
|
||||
# CONFIG_ROCKCHIP_RK3066_HDMI is not set
|
||||
CONFIG_DRM_UDL=y
|
||||
# CONFIG_DRM_ARMADA is not set
|
||||
# CONFIG_DRM_RCAR_DW_HDMI is not set
|
||||
# CONFIG_DRM_RCAR_USE_LVDS is not set
|
||||
# CONFIG_DRM_RCAR_USE_MIPI_DSI is not set
|
||||
# CONFIG_DRM_OMAP is not set
|
||||
# CONFIG_DRM_TILCDC is not set
|
||||
# CONFIG_DRM_FSL_DCU is not set
|
||||
# CONFIG_DRM_STM is not set
|
||||
CONFIG_DRM_PANEL=y
|
||||
|
||||
#
|
||||
@@ -4614,6 +4619,7 @@ CONFIG_DRM_PANEL=y
|
||||
CONFIG_DRM_PANEL_ABT_Y030XX067A=m
|
||||
CONFIG_DRM_PANEL_ARM_VERSATILE=m
|
||||
# CONFIG_DRM_PANEL_ASUS_Z00T_TM5P5_NT35596 is not set
|
||||
# CONFIG_DRM_PANEL_AUO_A030JTN01 is not set
|
||||
# CONFIG_DRM_PANEL_BOE_BF060Y8M_AJ0 is not set
|
||||
# CONFIG_DRM_PANEL_BOE_HIMAX8279D is not set
|
||||
# CONFIG_DRM_PANEL_BOE_TV101WUM_NL6 is not set
|
||||
@@ -4625,6 +4631,7 @@ CONFIG_DRM_PANEL_SIMPLE=y
|
||||
# CONFIG_DRM_PANEL_ELIDA_KD35T133 is not set
|
||||
# CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02 is not set
|
||||
# CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D is not set
|
||||
# CONFIG_DRM_PANEL_HIMAX_HX8394 is not set
|
||||
# CONFIG_DRM_PANEL_ILITEK_IL9322 is not set
|
||||
CONFIG_DRM_PANEL_ILITEK_ILI9341=m
|
||||
CONFIG_DRM_PANEL_ILITEK_ILI9881C=m
|
||||
@@ -4640,16 +4647,19 @@ 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_MAGNACHIP_D53E6EA8966 is not set
|
||||
CONFIG_DRM_PANEL_NEC_NL8048HL11=m
|
||||
# CONFIG_DRM_PANEL_NEWVISION_NV3051D is not set
|
||||
# CONFIG_DRM_PANEL_NEWVISION_NV3052C is not set
|
||||
# CONFIG_DRM_PANEL_NOVATEK_NT35510 is not set
|
||||
# CONFIG_DRM_PANEL_NOVATEK_NT35560 is not set
|
||||
# CONFIG_DRM_PANEL_NOVATEK_NT35950 is not set
|
||||
# CONFIG_DRM_PANEL_NOVATEK_NT36523 is not set
|
||||
CONFIG_DRM_PANEL_NOVATEK_NT36672A=m
|
||||
CONFIG_DRM_PANEL_NOVATEK_NT39016=m
|
||||
CONFIG_DRM_PANEL_MANTIX_MLAF057WE51=m
|
||||
# CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO is not set
|
||||
# CONFIG_DRM_PANEL_ORISETECH_OTA5601A is not set
|
||||
CONFIG_DRM_PANEL_ORISETECH_OTM8009A=m
|
||||
# CONFIG_DRM_PANEL_OSD_OSD101T2587_53TS is not set
|
||||
CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00=m
|
||||
@@ -4676,6 +4686,7 @@ CONFIG_DRM_PANEL_SITRONIX_ST7701=m
|
||||
CONFIG_DRM_PANEL_SITRONIX_ST7703=m
|
||||
# CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set
|
||||
CONFIG_DRM_PANEL_SONY_ACX565AKM=m
|
||||
# CONFIG_DRM_PANEL_SONY_TD4353_JDI is not set
|
||||
# CONFIG_DRM_PANEL_SONY_TULIP_TRULY_NT35521 is not set
|
||||
CONFIG_DRM_PANEL_TDO_TL070WSH30=m
|
||||
CONFIG_DRM_PANEL_TPO_TD028TTEC1=m
|
||||
@@ -4683,6 +4694,7 @@ CONFIG_DRM_PANEL_TPO_TD043MTEA1=m
|
||||
CONFIG_DRM_PANEL_TPO_TPG110=m
|
||||
# CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set
|
||||
# CONFIG_DRM_PANEL_VISIONOX_RM69299 is not set
|
||||
# CONFIG_DRM_PANEL_VISIONOX_VTDR6130 is not set
|
||||
CONFIG_DRM_PANEL_WIDECHIPS_WS2401=m
|
||||
# CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set
|
||||
# end of Display Panels
|
||||
@@ -4693,7 +4705,6 @@ CONFIG_DRM_PANEL_BRIDGE=y
|
||||
#
|
||||
# Display Interface Bridges
|
||||
#
|
||||
CONFIG_DRM_CDNS_DSI=m
|
||||
CONFIG_DRM_CHIPONE_ICN6211=m
|
||||
# CONFIG_DRM_CHRONTEL_CH7033 is not set
|
||||
CONFIG_DRM_CROS_EC_ANX7688=m
|
||||
@@ -4710,6 +4721,7 @@ CONFIG_DRM_ITE_IT66121=m
|
||||
# CONFIG_DRM_NXP_PTN3460 is not set
|
||||
# CONFIG_DRM_PARADE_PS8622 is not set
|
||||
# CONFIG_DRM_PARADE_PS8640 is not set
|
||||
# CONFIG_DRM_SAMSUNG_DSIM is not set
|
||||
CONFIG_DRM_SIL_SII8620=m
|
||||
# CONFIG_DRM_SII902X is not set
|
||||
# CONFIG_DRM_SII9234 is not set
|
||||
@@ -4729,6 +4741,8 @@ CONFIG_DRM_TI_SN65DSI83=m
|
||||
# CONFIG_DRM_ANALOGIX_ANX78XX is not set
|
||||
CONFIG_DRM_ANALOGIX_ANX7625=m
|
||||
# CONFIG_DRM_I2C_ADV7511 is not set
|
||||
CONFIG_DRM_CDNS_DSI=m
|
||||
CONFIG_DRM_CDNS_DSI_J721E=y
|
||||
CONFIG_DRM_CDNS_MHDP8546=m
|
||||
CONFIG_DRM_DW_HDMI=y
|
||||
# CONFIG_DRM_DW_HDMI_AHB_AUDIO is not set
|
||||
@@ -4737,7 +4751,6 @@ CONFIG_DRM_DW_HDMI_I2S_AUDIO=m
|
||||
CONFIG_DRM_DW_HDMI_CEC=m
|
||||
# end of Display Interface Bridges
|
||||
|
||||
# CONFIG_DRM_STI is not set
|
||||
CONFIG_DRM_ETNAVIV=m
|
||||
CONFIG_DRM_ETNAVIV_THERMAL=y
|
||||
# CONFIG_DRM_LOGICVC is not set
|
||||
@@ -4768,7 +4781,6 @@ CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
|
||||
#
|
||||
# Frame buffer Devices
|
||||
#
|
||||
CONFIG_FB_CMDLINE=y
|
||||
CONFIG_FB_NOTIFY=y
|
||||
CONFIG_FB=y
|
||||
# CONFIG_FIRMWARE_EDID is not set
|
||||
@@ -4807,6 +4819,7 @@ CONFIG_FB_MODE_HELPERS=y
|
||||
# CONFIG_LCD_CLASS_DEVICE is not set
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||
CONFIG_BACKLIGHT_KTD253=m
|
||||
# CONFIG_BACKLIGHT_KTZ8866 is not set
|
||||
CONFIG_BACKLIGHT_PWM=y
|
||||
CONFIG_BACKLIGHT_QCOM_WLED=m
|
||||
CONFIG_BACKLIGHT_RT4831=m
|
||||
@@ -4981,6 +4994,7 @@ CONFIG_SND_SOC_AK4458=m
|
||||
CONFIG_SND_SOC_AK5558=m
|
||||
# CONFIG_SND_SOC_ALC5623 is not set
|
||||
# CONFIG_SND_SOC_AW8738 is not set
|
||||
# CONFIG_SND_SOC_AW88395 is not set
|
||||
CONFIG_SND_SOC_BD28623=m
|
||||
# CONFIG_SND_SOC_BT_SCO is not set
|
||||
CONFIG_SND_SOC_CPCAP=m
|
||||
@@ -4994,6 +5008,8 @@ CONFIG_SND_SOC_CS35L36=m
|
||||
# CONFIG_SND_SOC_CS35L41_I2C is not set
|
||||
# CONFIG_SND_SOC_CS35L45_SPI is not set
|
||||
# CONFIG_SND_SOC_CS35L45_I2C is not set
|
||||
# CONFIG_SND_SOC_CS35L56_I2C is not set
|
||||
# CONFIG_SND_SOC_CS35L56_SPI is not set
|
||||
# CONFIG_SND_SOC_CS42L42 is not set
|
||||
# CONFIG_SND_SOC_CS42L51_I2C is not set
|
||||
# CONFIG_SND_SOC_CS42L52 is not set
|
||||
@@ -5024,6 +5040,7 @@ CONFIG_SND_SOC_ES8328_SPI=m
|
||||
# CONFIG_SND_SOC_GTM601 is not set
|
||||
# CONFIG_SND_SOC_HDA is not set
|
||||
CONFIG_SND_SOC_ICS43432=m
|
||||
# CONFIG_SND_SOC_IDT821034 is not set
|
||||
# CONFIG_SND_SOC_INNO_RK3036 is not set
|
||||
# CONFIG_SND_SOC_MAX98088 is not set
|
||||
CONFIG_SND_SOC_MAX98090=m
|
||||
@@ -5052,6 +5069,7 @@ CONFIG_SND_SOC_PCM1789_I2C=m
|
||||
CONFIG_SND_SOC_PCM5102A=m
|
||||
# CONFIG_SND_SOC_PCM512x_I2C is not set
|
||||
# CONFIG_SND_SOC_PCM512x_SPI is not set
|
||||
# CONFIG_SND_SOC_PEB2466 is not set
|
||||
CONFIG_SND_SOC_RK3328=m
|
||||
CONFIG_SND_SOC_RK817=m
|
||||
CONFIG_SND_SOC_RL6231=m
|
||||
@@ -5064,6 +5082,7 @@ CONFIG_SND_SOC_RT5659=m
|
||||
# CONFIG_SND_SOC_SGTL5000 is not set
|
||||
CONFIG_SND_SOC_SIMPLE_AMPLIFIER=m
|
||||
CONFIG_SND_SOC_SIMPLE_MUX=m
|
||||
# CONFIG_SND_SOC_SMA1303 is not set
|
||||
CONFIG_SND_SOC_SPDIF=m
|
||||
# CONFIG_SND_SOC_SRC4XXX_I2C is not set
|
||||
CONFIG_SND_SOC_SSM2305=m
|
||||
@@ -5152,10 +5171,7 @@ CONFIG_SND_SIMPLE_CARD=m
|
||||
# CONFIG_SND_AUDIO_GRAPH_CARD2 is not set
|
||||
# CONFIG_SND_TEST_COMPONENT is not set
|
||||
CONFIG_SND_VIRTIO=m
|
||||
|
||||
#
|
||||
# HID support
|
||||
#
|
||||
CONFIG_HID_SUPPORT=y
|
||||
CONFIG_HID=y
|
||||
CONFIG_HID_BATTERY_STRENGTH=y
|
||||
CONFIG_HIDRAW=y
|
||||
@@ -5192,6 +5208,7 @@ CONFIG_HID_EMS_FF=m
|
||||
CONFIG_HID_ELAN=m
|
||||
CONFIG_HID_ELECOM=m
|
||||
CONFIG_HID_ELO=m
|
||||
# CONFIG_HID_EVISION is not set
|
||||
CONFIG_HID_EZKEY=m
|
||||
CONFIG_HID_FT260=m
|
||||
CONFIG_HID_GEMBIRD=m
|
||||
@@ -5291,6 +5308,11 @@ CONFIG_HID_ALPS=m
|
||||
# CONFIG_HID_MCP2221 is not set
|
||||
# end of Special HID drivers
|
||||
|
||||
#
|
||||
# HID-BPF support
|
||||
#
|
||||
# end of HID-BPF support
|
||||
|
||||
#
|
||||
# USB HID support
|
||||
#
|
||||
@@ -5299,17 +5321,11 @@ CONFIG_USB_HID=y
|
||||
CONFIG_USB_HIDDEV=y
|
||||
# end of USB HID support
|
||||
|
||||
#
|
||||
# I2C HID support
|
||||
#
|
||||
CONFIG_I2C_HID=y
|
||||
CONFIG_I2C_HID_OF=m
|
||||
# CONFIG_I2C_HID_OF_ELAN is not set
|
||||
CONFIG_I2C_HID_OF_GOODIX=m
|
||||
# end of I2C HID support
|
||||
|
||||
CONFIG_I2C_HID_CORE=m
|
||||
# end of HID support
|
||||
|
||||
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USB_COMMON=y
|
||||
@@ -5488,7 +5504,6 @@ CONFIG_USB_LCD=m
|
||||
# CONFIG_USB_CYPRESS_CY7C63 is not set
|
||||
# CONFIG_USB_CYTHERM is not set
|
||||
# CONFIG_USB_IDMOUSE is not set
|
||||
# CONFIG_USB_FTDI_ELAN is not set
|
||||
# CONFIG_USB_APPLEDISPLAY is not set
|
||||
# CONFIG_APPLE_MFI_FASTCHARGE is not set
|
||||
# CONFIG_USB_SISUSBVGA is not set
|
||||
@@ -5614,6 +5629,7 @@ CONFIG_MMC_TEST=y
|
||||
# CONFIG_MMC_DEBUG is not set
|
||||
# CONFIG_MMC_ARMMMCI is not set
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_IO_ACCESSORS=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
# CONFIG_MMC_SDHCI_OF_ARASAN is not set
|
||||
# CONFIG_MMC_SDHCI_OF_AT91 is not set
|
||||
@@ -5678,6 +5694,7 @@ CONFIG_LEDS_LP55XX_COMMON=m
|
||||
# CONFIG_LEDS_DAC124S085 is not set
|
||||
# CONFIG_LEDS_PWM is not set
|
||||
# CONFIG_LEDS_REGULATOR is not set
|
||||
# CONFIG_LEDS_BD2606MVV is not set
|
||||
# CONFIG_LEDS_BD2802 is not set
|
||||
# CONFIG_LEDS_LT3593 is not set
|
||||
# CONFIG_LEDS_TCA6507 is not set
|
||||
@@ -5716,7 +5733,6 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=y
|
||||
CONFIG_LEDS_TRIGGER_BACKLIGHT=y
|
||||
CONFIG_LEDS_TRIGGER_CPU=y
|
||||
CONFIG_LEDS_TRIGGER_ACTIVITY=y
|
||||
CONFIG_LEDS_TRIGGER_GPIO=y
|
||||
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
|
||||
|
||||
#
|
||||
@@ -5841,7 +5857,6 @@ CONFIG_RTC_DRV_RX6110=m
|
||||
# CONFIG_RTC_DRV_MSM6242 is not set
|
||||
# CONFIG_RTC_DRV_BQ4802 is not set
|
||||
# CONFIG_RTC_DRV_RP5C01 is not set
|
||||
# CONFIG_RTC_DRV_V3020 is not set
|
||||
# CONFIG_RTC_DRV_ZYNQMP is not set
|
||||
# CONFIG_RTC_DRV_CROS_EC is not set
|
||||
CONFIG_RTC_DRV_NTXEC=m
|
||||
@@ -5879,6 +5894,7 @@ CONFIG_FSL_QDMA=m
|
||||
# CONFIG_INTEL_IDMA64 is not set
|
||||
# CONFIG_NBPFAXI_DMA is not set
|
||||
CONFIG_PL330_DMA=y
|
||||
# CONFIG_XILINX_XDMA is not set
|
||||
CONFIG_XILINX_ZYNQMP_DPDMA=m
|
||||
# CONFIG_QCOM_HIDMA_MGMT is not set
|
||||
# CONFIG_QCOM_HIDMA is not set
|
||||
@@ -5916,6 +5932,7 @@ CONFIG_VIRTIO=m
|
||||
# CONFIG_VIRTIO_MENU is not set
|
||||
# CONFIG_VDPA is not set
|
||||
CONFIG_VHOST_IOTLB=m
|
||||
CONFIG_VHOST_TASK=y
|
||||
CONFIG_VHOST=m
|
||||
CONFIG_VHOST_MENU=y
|
||||
# CONFIG_VHOST_NET is not set
|
||||
@@ -5934,7 +5951,6 @@ CONFIG_STAGING=y
|
||||
# CONFIG_RTLLIB is not set
|
||||
CONFIG_RTL8723BS=m
|
||||
CONFIG_R8712U=m
|
||||
# CONFIG_R8188EU is not set
|
||||
# CONFIG_VT6656 is not set
|
||||
|
||||
#
|
||||
@@ -5973,12 +5989,6 @@ CONFIG_R8712U=m
|
||||
# CONFIG_AD5933 is not set
|
||||
# end of Network Analyzer, Impedance Converters
|
||||
|
||||
#
|
||||
# Active energy metering IC
|
||||
#
|
||||
# CONFIG_ADE7854 is not set
|
||||
# end of Active energy metering IC
|
||||
|
||||
#
|
||||
# Resolver to digital converters
|
||||
#
|
||||
@@ -6076,6 +6086,7 @@ CONFIG_COMMON_CLK_SI544=m
|
||||
CONFIG_COMMON_CLK_AXI_CLKGEN=m
|
||||
# CONFIG_COMMON_CLK_PWM is not set
|
||||
# CONFIG_COMMON_CLK_RS9_PCIE is not set
|
||||
# CONFIG_COMMON_CLK_SI521XX is not set
|
||||
CONFIG_COMMON_CLK_VC5=m
|
||||
# CONFIG_COMMON_CLK_VC7 is not set
|
||||
# CONFIG_COMMON_CLK_BD718XX is not set
|
||||
@@ -6184,6 +6195,8 @@ CONFIG_LITEX=y
|
||||
CONFIG_LITEX_SOC_CONTROLLER=m
|
||||
# end of Enable LiteX SoC Builder specific drivers
|
||||
|
||||
# CONFIG_WPCM450_SOC is not set
|
||||
|
||||
#
|
||||
# Qualcomm SoC drivers
|
||||
#
|
||||
@@ -6362,11 +6375,14 @@ CONFIG_ROCKCHIP_SARADC=y
|
||||
# CONFIG_TI_ADC128S052 is not set
|
||||
# CONFIG_TI_ADC161S626 is not set
|
||||
# CONFIG_TI_ADS1015 is not set
|
||||
# CONFIG_TI_ADS7924 is not set
|
||||
# CONFIG_TI_ADS1100 is not set
|
||||
# CONFIG_TI_ADS7950 is not set
|
||||
CONFIG_TI_ADS8344=m
|
||||
# CONFIG_TI_ADS8688 is not set
|
||||
CONFIG_TI_ADS124S08=m
|
||||
CONFIG_TI_ADS131E08=m
|
||||
# CONFIG_TI_LMP92064 is not set
|
||||
# CONFIG_TI_TLC4541 is not set
|
||||
CONFIG_TI_TSC2046=m
|
||||
# CONFIG_VF610_ADC is not set
|
||||
@@ -6484,6 +6500,7 @@ CONFIG_AD5766=m
|
||||
# CONFIG_LTC2632 is not set
|
||||
# CONFIG_M62332 is not set
|
||||
# CONFIG_MAX517 is not set
|
||||
# CONFIG_MAX5522 is not set
|
||||
# CONFIG_MAX5821 is not set
|
||||
# CONFIG_MCP4725 is not set
|
||||
# CONFIG_MCP4922 is not set
|
||||
@@ -6627,6 +6644,7 @@ CONFIG_SENSORS_ISL29018=y
|
||||
CONFIG_HID_SENSOR_ALS=m
|
||||
CONFIG_HID_SENSOR_PROX=m
|
||||
# CONFIG_JSA1212 is not set
|
||||
# CONFIG_ROHM_BU27034 is not set
|
||||
# CONFIG_RPR0521 is not set
|
||||
# CONFIG_LTR501 is not set
|
||||
# CONFIG_LTRF216A is not set
|
||||
@@ -6674,6 +6692,7 @@ CONFIG_IIO_ST_MAGN_SPI_3AXIS=m
|
||||
# CONFIG_SENSORS_HMC5843_SPI is not set
|
||||
# CONFIG_SENSORS_RM3100_I2C is not set
|
||||
# CONFIG_SENSORS_RM3100_SPI is not set
|
||||
# CONFIG_TI_TMAG5273 is not set
|
||||
CONFIG_YAMAHA_YAS530=m
|
||||
# end of Magnetometer sensors
|
||||
|
||||
@@ -6877,6 +6896,7 @@ CONFIG_ARM_CCI_PMU=m
|
||||
# CONFIG_ARM_CCI5xx_PMU is not set
|
||||
# CONFIG_ARM_CCN is not set
|
||||
CONFIG_ARM_PMU=y
|
||||
# CONFIG_ARM_PMUV3 is not set
|
||||
# end of Performance monitor support
|
||||
|
||||
# CONFIG_RAS is not set
|
||||
@@ -6890,6 +6910,14 @@ CONFIG_ARM_PMU=y
|
||||
CONFIG_DAX=y
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVMEM_SYSFS=y
|
||||
|
||||
#
|
||||
# Layout Types
|
||||
#
|
||||
# CONFIG_NVMEM_LAYOUT_SL28_VPD is not set
|
||||
# CONFIG_NVMEM_LAYOUT_ONIE_TLV is not set
|
||||
# end of Layout Types
|
||||
|
||||
CONFIG_NVMEM_RMEM=m
|
||||
CONFIG_NVMEM_ROCKCHIP_EFUSE=y
|
||||
# CONFIG_NVMEM_ROCKCHIP_OTP is not set
|
||||
@@ -6934,6 +6962,7 @@ CONFIG_MOST_SND=m
|
||||
CONFIG_DCACHE_WORD_ACCESS=y
|
||||
CONFIG_VALIDATE_FS_PARSER=y
|
||||
CONFIG_FS_IOMAP=y
|
||||
CONFIG_LEGACY_DIRECT_IO=y
|
||||
CONFIG_EXT2_FS=y
|
||||
# CONFIG_EXT2_FS_XATTR is not set
|
||||
CONFIG_EXT3_FS=y
|
||||
@@ -6957,9 +6986,11 @@ CONFIG_JFS_FS=m
|
||||
# CONFIG_JFS_STATISTICS is not set
|
||||
CONFIG_XFS_FS=y
|
||||
CONFIG_XFS_SUPPORT_V4=y
|
||||
CONFIG_XFS_SUPPORT_ASCII_CI=y
|
||||
CONFIG_XFS_QUOTA=y
|
||||
CONFIG_XFS_POSIX_ACL=y
|
||||
CONFIG_XFS_RT=y
|
||||
CONFIG_XFS_DRAIN_INTENTS=y
|
||||
CONFIG_XFS_ONLINE_SCRUB=y
|
||||
# CONFIG_XFS_ONLINE_REPAIR is not set
|
||||
# CONFIG_XFS_WARN is not set
|
||||
@@ -7002,7 +7033,6 @@ CONFIG_INOTIFY_USER=y
|
||||
# CONFIG_FANOTIFY is not set
|
||||
CONFIG_QUOTA=y
|
||||
CONFIG_QUOTA_NETLINK_INTERFACE=y
|
||||
CONFIG_PRINT_QUOTA_WARNING=y
|
||||
# CONFIG_QUOTA_DEBUG is not set
|
||||
CONFIG_QUOTA_TREE=m
|
||||
CONFIG_QFMT_V1=m
|
||||
@@ -7179,7 +7209,11 @@ CONFIG_SUNRPC_GSS=m
|
||||
CONFIG_SUNRPC_BACKCHANNEL=y
|
||||
CONFIG_SUNRPC_SWAP=y
|
||||
CONFIG_RPCSEC_GSS_KRB5=m
|
||||
# CONFIG_SUNRPC_DISABLE_INSECURE_ENCTYPES is not set
|
||||
CONFIG_RPCSEC_GSS_KRB5_CRYPTOSYSTEM=y
|
||||
# CONFIG_RPCSEC_GSS_KRB5_ENCTYPES_DES is not set
|
||||
CONFIG_RPCSEC_GSS_KRB5_ENCTYPES_AES_SHA1=y
|
||||
# CONFIG_RPCSEC_GSS_KRB5_ENCTYPES_CAMELLIA is not set
|
||||
# CONFIG_RPCSEC_GSS_KRB5_ENCTYPES_AES_SHA2 is not set
|
||||
# CONFIG_SUNRPC_DEBUG is not set
|
||||
CONFIG_CEPH_FS=m
|
||||
CONFIG_CEPH_FSCACHE=y
|
||||
@@ -7198,7 +7232,7 @@ CONFIG_CIFS_FSCACHE=y
|
||||
CONFIG_SMB_SERVER=m
|
||||
CONFIG_SMB_SERVER_CHECK_CAP_NET_ADMIN=y
|
||||
CONFIG_SMB_SERVER_KERBEROS5=y
|
||||
CONFIG_SMBFS_COMMON=m
|
||||
CONFIG_SMBFS=m
|
||||
# CONFIG_CODA_FS is not set
|
||||
# CONFIG_AFS_FS is not set
|
||||
CONFIG_NLS=y
|
||||
@@ -7651,6 +7685,7 @@ CONFIG_TEXTSEARCH_FSM=m
|
||||
CONFIG_XARRAY_MULTI=y
|
||||
CONFIG_ASSOCIATIVE_ARRAY=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_DMA_OPS=y
|
||||
@@ -7786,10 +7821,10 @@ CONFIG_SLUB_DEBUG=y
|
||||
# CONFIG_DEBUG_PAGE_REF is not set
|
||||
# CONFIG_DEBUG_RODATA_TEST is not set
|
||||
# CONFIG_DEBUG_WX is not set
|
||||
# CONFIG_DEBUG_OBJECTS is not set
|
||||
# CONFIG_SHRINKER_DEBUG is not set
|
||||
CONFIG_HAVE_DEBUG_KMEMLEAK=y
|
||||
# CONFIG_DEBUG_KMEMLEAK is not set
|
||||
# CONFIG_DEBUG_OBJECTS is not set
|
||||
# CONFIG_SHRINKER_DEBUG is not set
|
||||
# CONFIG_DEBUG_STACK_USAGE is not set
|
||||
# CONFIG_SCHED_STACK_END_CHECK is not set
|
||||
# CONFIG_DEBUG_VM is not set
|
||||
@@ -7881,6 +7916,7 @@ CONFIG_TORTURE_TEST=m
|
||||
CONFIG_RCU_REF_SCALE_TEST=m
|
||||
CONFIG_RCU_CPU_STALL_TIMEOUT=60
|
||||
CONFIG_RCU_EXP_CPU_STALL_TIMEOUT=20
|
||||
# CONFIG_RCU_CPU_STALL_CPUTIME is not set
|
||||
# CONFIG_RCU_TRACE is not set
|
||||
# CONFIG_RCU_EQS_DEBUG is not set
|
||||
# end of RCU Debugging
|
||||
@@ -7935,6 +7971,7 @@ CONFIG_PROBE_EVENTS=y
|
||||
CONFIG_FTRACE_MCOUNT_RECORD=y
|
||||
CONFIG_FTRACE_MCOUNT_USE_RECORDMCOUNT=y
|
||||
# CONFIG_SYNTH_EVENTS is not set
|
||||
# CONFIG_USER_EVENTS is not set
|
||||
# CONFIG_HIST_TRIGGERS is not set
|
||||
# CONFIG_TRACE_EVENT_INJECT is not set
|
||||
# CONFIG_TRACEPOINT_BENCHMARK is not set
|
||||
|
||||
@@ -34,8 +34,8 @@ case $BRANCH in
|
||||
|
||||
edge)
|
||||
|
||||
declare -g KERNEL_MAJOR_MINOR="6.3" # Major and minor versions of this kernel.
|
||||
KERNELBRANCH='branch:linux-6.3.y'
|
||||
declare -g KERNEL_MAJOR_MINOR="6.4" # Major and minor versions of this kernel.
|
||||
KERNELBRANCH='branch:linux-6.4.y'
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
@@ -0,0 +1,378 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Sat, 10 Oct 2020 15:32:18 +0000
|
||||
Subject: [PATCH] phy/rockchip: inno-hdmi: use correct vco_div_5 macro on
|
||||
rk3328
|
||||
|
||||
inno_hdmi_phy_rk3328_clk_set_rate() is using the RK3228 macro
|
||||
when configuring vco_div_5 on RK3328.
|
||||
|
||||
Fix this by using correct vco_div_5 macro for RK3328.
|
||||
|
||||
Fixes: 53706a116863 ("phy: add Rockchip Innosilicon hdmi phy")
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
---
|
||||
drivers/phy/rockchip/phy-rockchip-inno-hdmi.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
|
||||
index 80acca4e9e14..15339338aae3 100644
|
||||
--- a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
|
||||
+++ b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
|
||||
@@ -790,8 +790,8 @@ static int inno_hdmi_phy_rk3328_clk_set_rate(struct clk_hw *hw,
|
||||
RK3328_PRE_PLL_POWER_DOWN);
|
||||
|
||||
/* Configure pre-pll */
|
||||
- inno_update_bits(inno, 0xa0, RK3228_PCLK_VCO_DIV_5_MASK,
|
||||
- RK3228_PCLK_VCO_DIV_5(cfg->vco_div_5_en));
|
||||
+ inno_update_bits(inno, 0xa0, RK3328_PCLK_VCO_DIV_5_MASK,
|
||||
+ RK3328_PCLK_VCO_DIV_5(cfg->vco_div_5_en));
|
||||
inno_write(inno, 0xa1, RK3328_PRE_PLL_PRE_DIV(cfg->prediv));
|
||||
|
||||
val = RK3328_SPREAD_SPECTRUM_MOD_DISABLE;
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Zheng Yang <zhengyang@rock-chips.com>
|
||||
Date: Sat, 10 Oct 2020 15:32:18 +0000
|
||||
Subject: [PATCH] phy/rockchip: inno-hdmi: round fractal pixclock in rk3328
|
||||
recalc_rate
|
||||
|
||||
inno_hdmi_phy_rk3328_clk_recalc_rate() is returning a rate not found
|
||||
in the pre pll config table when the fractal divider is used.
|
||||
This can prevent proper power_on because a tmdsclock for the new rate
|
||||
is not found in the pre pll config table.
|
||||
|
||||
Fix this by saving and returning a rounded pixel rate that exist
|
||||
in the pre pll config table.
|
||||
|
||||
Fixes: 53706a116863 ("phy: add Rockchip Innosilicon hdmi phy")
|
||||
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
---
|
||||
drivers/phy/rockchip/phy-rockchip-inno-hdmi.c | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
|
||||
index 15339338aae3..15a008a1ac7b 100644
|
||||
--- a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
|
||||
+++ b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
|
||||
@@ -745,10 +745,12 @@ unsigned long inno_hdmi_phy_rk3328_clk_recalc_rate(struct clk_hw *hw,
|
||||
do_div(vco, (nd * (no_a == 1 ? no_b : no_a) * no_d * 2));
|
||||
}
|
||||
|
||||
- inno->pixclock = vco;
|
||||
- dev_dbg(inno->dev, "%s rate %lu\n", __func__, inno->pixclock);
|
||||
+ inno->pixclock = DIV_ROUND_CLOSEST((unsigned long)vco, 1000) * 1000;
|
||||
|
||||
- return vco;
|
||||
+ dev_dbg(inno->dev, "%s rate %lu vco %llu\n",
|
||||
+ __func__, inno->pixclock, vco);
|
||||
+
|
||||
+ return inno->pixclock;
|
||||
}
|
||||
|
||||
static long inno_hdmi_phy_rk3328_clk_round_rate(struct clk_hw *hw,
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Sat, 10 Oct 2020 15:32:19 +0000
|
||||
Subject: [PATCH] phy/rockchip: inno-hdmi: remove unused no_c from rk3328
|
||||
recalc_rate
|
||||
|
||||
no_c is not used in any calculation, lets remove it.
|
||||
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
---
|
||||
drivers/phy/rockchip/phy-rockchip-inno-hdmi.c | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
|
||||
index 15a008a1ac7b..4b936ca19920 100644
|
||||
--- a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
|
||||
+++ b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
|
||||
@@ -714,7 +714,7 @@ unsigned long inno_hdmi_phy_rk3328_clk_recalc_rate(struct clk_hw *hw,
|
||||
{
|
||||
struct inno_hdmi_phy *inno = to_inno_hdmi_phy(hw);
|
||||
unsigned long frac;
|
||||
- u8 nd, no_a, no_b, no_c, no_d;
|
||||
+ u8 nd, no_a, no_b, no_d;
|
||||
u64 vco;
|
||||
u16 nf;
|
||||
|
||||
@@ -737,9 +737,6 @@ unsigned long inno_hdmi_phy_rk3328_clk_recalc_rate(struct clk_hw *hw,
|
||||
no_b = inno_read(inno, 0xa5) & RK3328_PRE_PLL_PCLK_DIV_B_MASK;
|
||||
no_b >>= RK3328_PRE_PLL_PCLK_DIV_B_SHIFT;
|
||||
no_b += 2;
|
||||
- no_c = inno_read(inno, 0xa6) & RK3328_PRE_PLL_PCLK_DIV_C_MASK;
|
||||
- no_c >>= RK3328_PRE_PLL_PCLK_DIV_C_SHIFT;
|
||||
- no_c = 1 << no_c;
|
||||
no_d = inno_read(inno, 0xa6) & RK3328_PRE_PLL_PCLK_DIV_D_MASK;
|
||||
|
||||
do_div(vco, (nd * (no_a == 1 ? no_b : no_a) * no_d * 2));
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Sat, 10 Oct 2020 15:32:19 +0000
|
||||
Subject: [PATCH] phy/rockchip: inno-hdmi: do not power on rk3328 post pll on
|
||||
reg write
|
||||
|
||||
inno_write is used to configure 0xaa reg, that also hold the
|
||||
POST_PLL_POWER_DOWN bit.
|
||||
When POST_PLL_REFCLK_SEL_TMDS is configured the power down bit is not
|
||||
taken into consideration.
|
||||
|
||||
Fix this by keeping the power down bit until configuration is complete.
|
||||
Also reorder the reg write order for consistency.
|
||||
|
||||
Fixes: 53706a116863 ("phy: add Rockchip Innosilicon hdmi phy")
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
---
|
||||
drivers/phy/rockchip/phy-rockchip-inno-hdmi.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
|
||||
index 4b936ca19920..620961fcfc1d 100644
|
||||
--- a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
|
||||
+++ b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
|
||||
@@ -1020,9 +1020,10 @@ inno_hdmi_phy_rk3328_power_on(struct inno_hdmi_phy *inno,
|
||||
|
||||
inno_write(inno, 0xac, RK3328_POST_PLL_FB_DIV_7_0(cfg->fbdiv));
|
||||
if (cfg->postdiv == 1) {
|
||||
- inno_write(inno, 0xaa, RK3328_POST_PLL_REFCLK_SEL_TMDS);
|
||||
inno_write(inno, 0xab, RK3328_POST_PLL_FB_DIV_8(cfg->fbdiv) |
|
||||
RK3328_POST_PLL_PRE_DIV(cfg->prediv));
|
||||
+ inno_write(inno, 0xaa, RK3328_POST_PLL_REFCLK_SEL_TMDS |
|
||||
+ RK3328_POST_PLL_POWER_DOWN);
|
||||
} else {
|
||||
v = (cfg->postdiv / 2) - 1;
|
||||
v &= RK3328_POST_PLL_POST_DIV_MASK;
|
||||
@@ -1030,7 +1031,8 @@ inno_hdmi_phy_rk3328_power_on(struct inno_hdmi_phy *inno,
|
||||
inno_write(inno, 0xab, RK3328_POST_PLL_FB_DIV_8(cfg->fbdiv) |
|
||||
RK3328_POST_PLL_PRE_DIV(cfg->prediv));
|
||||
inno_write(inno, 0xaa, RK3328_POST_PLL_POST_DIV_ENABLE |
|
||||
- RK3328_POST_PLL_REFCLK_SEL_TMDS);
|
||||
+ RK3328_POST_PLL_REFCLK_SEL_TMDS |
|
||||
+ RK3328_POST_PLL_POWER_DOWN);
|
||||
}
|
||||
|
||||
for (v = 0; v < 14; v++)
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Huicong Xu <xhc@rock-chips.com>
|
||||
Date: Sat, 10 Oct 2020 15:32:20 +0000
|
||||
Subject: [PATCH] phy/rockchip: inno-hdmi: force set_rate on power_on
|
||||
|
||||
Regular 8-bit and Deep Color video formats mainly differ in TMDS rate and
|
||||
not in pixel clock rate.
|
||||
When the hdmiphy clock is configured with the same pixel clock rate using
|
||||
clk_set_rate() the clock framework do not signal the hdmi phy driver
|
||||
to set_rate when switching between 8-bit and Deep Color.
|
||||
This result in pre/post pll not being re-configured when switching between
|
||||
regular 8-bit and Deep Color video formats.
|
||||
|
||||
Fix this by calling set_rate in power_on to force pre pll re-configuration.
|
||||
|
||||
Signed-off-by: Huicong Xu <xhc@rock-chips.com>
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
---
|
||||
drivers/phy/rockchip/phy-rockchip-inno-hdmi.c | 13 +++++++++++++
|
||||
1 file changed, 13 insertions(+)
|
||||
|
||||
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
|
||||
index 620961fcfc1d..2f01259823ea 100644
|
||||
--- a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
|
||||
+++ b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
|
||||
@@ -245,6 +245,7 @@ struct inno_hdmi_phy {
|
||||
struct clk_hw hw;
|
||||
struct clk *phyclk;
|
||||
unsigned long pixclock;
|
||||
+ unsigned long tmdsclock;
|
||||
};
|
||||
|
||||
struct pre_pll_config {
|
||||
@@ -485,6 +486,8 @@ static int inno_hdmi_phy_power_on(struct phy *phy)
|
||||
|
||||
dev_dbg(inno->dev, "Inno HDMI PHY Power On\n");
|
||||
|
||||
+ inno->plat_data->clk_ops->set_rate(&inno->hw, inno->pixclock, 24000000);
|
||||
+
|
||||
ret = clk_prepare_enable(inno->phyclk);
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -509,6 +512,8 @@ static int inno_hdmi_phy_power_off(struct phy *phy)
|
||||
|
||||
clk_disable_unprepare(inno->phyclk);
|
||||
|
||||
+ inno->tmdsclock = 0;
|
||||
+
|
||||
dev_dbg(inno->dev, "Inno HDMI PHY Power Off\n");
|
||||
|
||||
return 0;
|
||||
@@ -628,6 +633,9 @@ static int inno_hdmi_phy_rk3228_clk_set_rate(struct clk_hw *hw,
|
||||
dev_dbg(inno->dev, "%s rate %lu tmdsclk %lu\n",
|
||||
__func__, rate, tmdsclock);
|
||||
|
||||
+ if (inno->pixclock == rate && inno->tmdsclock == tmdsclock)
|
||||
+ return 0;
|
||||
+
|
||||
cfg = inno_hdmi_phy_get_pre_pll_cfg(inno, rate);
|
||||
if (IS_ERR(cfg))
|
||||
return PTR_ERR(cfg);
|
||||
@@ -670,6 +678,7 @@ static int inno_hdmi_phy_rk3228_clk_set_rate(struct clk_hw *hw,
|
||||
}
|
||||
|
||||
inno->pixclock = rate;
|
||||
+ inno->tmdsclock = tmdsclock;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -781,6 +790,9 @@ static int inno_hdmi_phy_rk3328_clk_set_rate(struct clk_hw *hw,
|
||||
dev_dbg(inno->dev, "%s rate %lu tmdsclk %lu\n",
|
||||
__func__, rate, tmdsclock);
|
||||
|
||||
+ if (inno->pixclock == rate && inno->tmdsclock == tmdsclock)
|
||||
+ return 0;
|
||||
+
|
||||
cfg = inno_hdmi_phy_get_pre_pll_cfg(inno, rate);
|
||||
if (IS_ERR(cfg))
|
||||
return PTR_ERR(cfg);
|
||||
@@ -820,6 +832,7 @@ static int inno_hdmi_phy_rk3328_clk_set_rate(struct clk_hw *hw,
|
||||
}
|
||||
|
||||
inno->pixclock = rate;
|
||||
+ inno->tmdsclock = tmdsclock;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Sun, 17 Feb 2019 22:14:38 +0000
|
||||
Subject: [PATCH] mmc: core: set initial signal voltage on power off
|
||||
|
||||
Some boards have SD card connectors where the power rail cannot be switched
|
||||
off by the driver. If the card has not been power cycled, it may still be
|
||||
using 1.8V signaling after a warm re-boot. Bootroms expecting 3.3V signaling
|
||||
will fail to boot from a UHS card that continue to use 1.8V signaling.
|
||||
|
||||
Set initial signal voltage in mmc_power_off() to allow re-boot to function.
|
||||
|
||||
This fixes re-boot with UHS cards on Asus Tinker Board (Rockchip RK3288),
|
||||
same issue have been seen on some Rockchip RK3399 boards.
|
||||
|
||||
I am sending this as a RFC because I have no insights into SD/MMC subsystem,
|
||||
this change fix a re-boot issue on my boards and does not break emmc/sdio.
|
||||
Is this an acceptable workaround? Any advice is appreciated.
|
||||
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
---
|
||||
drivers/mmc/core/core.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
|
||||
index ef53a2578824..d4c53074154a 100644
|
||||
--- a/drivers/mmc/core/core.c
|
||||
+++ b/drivers/mmc/core/core.c
|
||||
@@ -1358,6 +1358,14 @@ void mmc_power_off(struct mmc_host *host)
|
||||
if (host->ios.power_mode == MMC_POWER_OFF)
|
||||
return;
|
||||
|
||||
+ mmc_set_initial_signal_voltage(host);
|
||||
+
|
||||
+ /*
|
||||
+ * This delay should be sufficient to allow the power supply
|
||||
+ * to reach the minimum voltage.
|
||||
+ */
|
||||
+ mmc_delay(host->ios.power_delay_ms);
|
||||
+
|
||||
mmc_pwrseq_power_off(host);
|
||||
|
||||
host->ios.clock = 0;
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Bee <knaerzche@gmail.com>
|
||||
Date: Wed, 23 Jun 2021 16:59:18 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: Add sdmmc_ext for RK3328
|
||||
|
||||
RK3328 SoC has a fourth mmc controller called SDMMC_EXT. Some
|
||||
boards have sdio wifi connected to it. In order to use it
|
||||
one would have to add the pinctrls from sdmmc0ext group which
|
||||
is done on board level.
|
||||
|
||||
Signed-off-by: Alex Bee <knaerzche@gmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3328.dtsi | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
|
||||
index 49ae15708a0b..60348d517efb 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
|
||||
@@ -993,6 +993,20 @@ usb_host0_ohci: usb@ff5d0000 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ sdmmc_ext: mmc@ff5f0000 {
|
||||
+ compatible = "rockchip,rk3328-dw-mshc", "rockchip,rk3288-dw-mshc";
|
||||
+ reg = <0x0 0xff5f0000 0x0 0x4000>;
|
||||
+ interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&cru HCLK_SDMMC_EXT>, <&cru SCLK_SDMMC_EXT>,
|
||||
+ <&cru SCLK_SDMMC_EXT_DRV>, <&cru SCLK_SDMMC_EXT_SAMPLE>;
|
||||
+ clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
|
||||
+ fifo-depth = <0x100>;
|
||||
+ max-frequency = <150000000>;
|
||||
+ resets = <&cru SRST_SDMMCEXT>;
|
||||
+ reset-names = "reset";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
usbdrd3: usb@ff600000 {
|
||||
compatible = "rockchip,rk3328-dwc3", "snps,dwc3";
|
||||
reg = <0x0 0xff600000 0x0 0x100000>;
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Bee <knaerzche@gmail.com>
|
||||
Date: Wed, 23 Jun 2021 17:02:08 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: Add sdmmc/sdio/emmc reset controls for
|
||||
RK3328
|
||||
|
||||
The DW MCI controller driver will use them to reset the IP block before
|
||||
initialisation.
|
||||
|
||||
Fixes: d717f7352ec6 ("arm64: dts: rockchip: add sdmmc/sdio/emmc nodes for RK3328 SoCs")
|
||||
Signed-off-by: Alex Bee <knaerzche@gmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3328.dtsi | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
|
||||
index 60348d517efb..d7e44d174d7b 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
|
||||
@@ -871,6 +871,8 @@ sdmmc: mmc@ff500000 {
|
||||
clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
|
||||
fifo-depth = <0x100>;
|
||||
max-frequency = <150000000>;
|
||||
+ resets = <&cru SRST_MMC0>;
|
||||
+ reset-names = "reset";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -883,6 +885,8 @@ sdio: mmc@ff510000 {
|
||||
clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
|
||||
fifo-depth = <0x100>;
|
||||
max-frequency = <150000000>;
|
||||
+ resets = <&cru SRST_SDIO>;
|
||||
+ reset-names = "reset";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -895,6 +899,8 @@ emmc: mmc@ff520000 {
|
||||
clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
|
||||
fifo-depth = <0x100>;
|
||||
max-frequency = <150000000>;
|
||||
+ resets = <&cru SRST_EMMC>;
|
||||
+ reset-names = "reset";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -0,0 +1,659 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Mon, 6 Jul 2020 21:54:35 +0000
|
||||
Subject: [PATCH] media: v4l2-common: Add helpers to calculate bytesperline and
|
||||
sizeimage
|
||||
|
||||
Add helper functions to calculate plane bytesperline and sizeimage, these
|
||||
new helpers consider block width and height when calculating plane
|
||||
bytesperline and sizeimage.
|
||||
|
||||
This prepare support for new pixel formats added in next patch that make
|
||||
use of block width and height.
|
||||
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
---
|
||||
drivers/media/v4l2-core/v4l2-common.c | 77 +++++++++++++--------------
|
||||
1 file changed, 38 insertions(+), 39 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/v4l2-core/v4l2-common.c b/drivers/media/v4l2-core/v4l2-common.c
|
||||
index e0fbe6ba4b6c..cb2f1acab7cf 100644
|
||||
--- a/drivers/media/v4l2-core/v4l2-common.c
|
||||
+++ b/drivers/media/v4l2-core/v4l2-common.c
|
||||
@@ -338,6 +338,33 @@ static inline unsigned int v4l2_format_block_height(const struct v4l2_format_inf
|
||||
return info->block_h[plane];
|
||||
}
|
||||
|
||||
+static inline unsigned int v4l2_format_plane_width(const struct v4l2_format_info *info, int plane,
|
||||
+ unsigned int width)
|
||||
+{
|
||||
+ unsigned int hdiv = plane ? info->hdiv : 1;
|
||||
+ unsigned int bytes = DIV_ROUND_UP(width * info->bpp[plane],
|
||||
+ v4l2_format_block_width(info, plane) *
|
||||
+ v4l2_format_block_height(info, plane));
|
||||
+
|
||||
+ return DIV_ROUND_UP(bytes, hdiv);
|
||||
+}
|
||||
+
|
||||
+static inline unsigned int v4l2_format_plane_height(const struct v4l2_format_info *info, int plane,
|
||||
+ unsigned int height)
|
||||
+{
|
||||
+ unsigned int vdiv = plane ? info->vdiv : 1;
|
||||
+ unsigned int lines = ALIGN(height, v4l2_format_block_height(info, plane));
|
||||
+
|
||||
+ return DIV_ROUND_UP(lines, vdiv);
|
||||
+}
|
||||
+
|
||||
+static inline unsigned int v4l2_format_plane_size(const struct v4l2_format_info *info, int plane,
|
||||
+ unsigned int width, unsigned int height)
|
||||
+{
|
||||
+ return v4l2_format_plane_width(info, plane, width) *
|
||||
+ v4l2_format_plane_height(info, plane, height);
|
||||
+}
|
||||
+
|
||||
void v4l2_apply_frmsize_constraints(u32 *width, u32 *height,
|
||||
const struct v4l2_frmsize_stepwise *frmsize)
|
||||
{
|
||||
@@ -373,37 +400,19 @@ int v4l2_fill_pixfmt_mp(struct v4l2_pix_format_mplane *pixfmt,
|
||||
|
||||
if (info->mem_planes == 1) {
|
||||
plane = &pixfmt->plane_fmt[0];
|
||||
- plane->bytesperline = ALIGN(width, v4l2_format_block_width(info, 0)) * info->bpp[0];
|
||||
+ plane->bytesperline = v4l2_format_plane_width(info, 0, width);
|
||||
plane->sizeimage = 0;
|
||||
|
||||
- for (i = 0; i < info->comp_planes; i++) {
|
||||
- unsigned int hdiv = (i == 0) ? 1 : info->hdiv;
|
||||
- unsigned int vdiv = (i == 0) ? 1 : info->vdiv;
|
||||
- unsigned int aligned_width;
|
||||
- unsigned int aligned_height;
|
||||
-
|
||||
- aligned_width = ALIGN(width, v4l2_format_block_width(info, i));
|
||||
- aligned_height = ALIGN(height, v4l2_format_block_height(info, i));
|
||||
-
|
||||
- plane->sizeimage += info->bpp[i] *
|
||||
- DIV_ROUND_UP(aligned_width, hdiv) *
|
||||
- DIV_ROUND_UP(aligned_height, vdiv);
|
||||
- }
|
||||
+ for (i = 0; i < info->comp_planes; i++)
|
||||
+ plane->sizeimage +=
|
||||
+ v4l2_format_plane_size(info, i, width, height);
|
||||
} else {
|
||||
for (i = 0; i < info->comp_planes; i++) {
|
||||
- unsigned int hdiv = (i == 0) ? 1 : info->hdiv;
|
||||
- unsigned int vdiv = (i == 0) ? 1 : info->vdiv;
|
||||
- unsigned int aligned_width;
|
||||
- unsigned int aligned_height;
|
||||
-
|
||||
- aligned_width = ALIGN(width, v4l2_format_block_width(info, i));
|
||||
- aligned_height = ALIGN(height, v4l2_format_block_height(info, i));
|
||||
-
|
||||
plane = &pixfmt->plane_fmt[i];
|
||||
plane->bytesperline =
|
||||
- info->bpp[i] * DIV_ROUND_UP(aligned_width, hdiv);
|
||||
- plane->sizeimage =
|
||||
- plane->bytesperline * DIV_ROUND_UP(aligned_height, vdiv);
|
||||
+ v4l2_format_plane_width(info, i, width);
|
||||
+ plane->sizeimage = plane->bytesperline *
|
||||
+ v4l2_format_plane_height(info, i, height);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
@@ -427,22 +436,12 @@ int v4l2_fill_pixfmt(struct v4l2_pix_format *pixfmt, u32 pixelformat,
|
||||
pixfmt->width = width;
|
||||
pixfmt->height = height;
|
||||
pixfmt->pixelformat = pixelformat;
|
||||
- pixfmt->bytesperline = ALIGN(width, v4l2_format_block_width(info, 0)) * info->bpp[0];
|
||||
+ pixfmt->bytesperline = v4l2_format_plane_width(info, 0, width);
|
||||
pixfmt->sizeimage = 0;
|
||||
|
||||
- for (i = 0; i < info->comp_planes; i++) {
|
||||
- unsigned int hdiv = (i == 0) ? 1 : info->hdiv;
|
||||
- unsigned int vdiv = (i == 0) ? 1 : info->vdiv;
|
||||
- unsigned int aligned_width;
|
||||
- unsigned int aligned_height;
|
||||
-
|
||||
- aligned_width = ALIGN(width, v4l2_format_block_width(info, i));
|
||||
- aligned_height = ALIGN(height, v4l2_format_block_height(info, i));
|
||||
-
|
||||
- pixfmt->sizeimage += info->bpp[i] *
|
||||
- DIV_ROUND_UP(aligned_width, hdiv) *
|
||||
- DIV_ROUND_UP(aligned_height, vdiv);
|
||||
- }
|
||||
+ for (i = 0; i < info->comp_planes; i++)
|
||||
+ pixfmt->sizeimage +=
|
||||
+ v4l2_format_plane_size(info, i, width, height);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(v4l2_fill_pixfmt);
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Mon, 6 Jul 2020 21:54:36 +0000
|
||||
Subject: [PATCH] media: v4l2: Add NV15 and NV20 pixel formats
|
||||
|
||||
Add NV15 and NV20 pixel formats used by the Rockchip Video Decoder for
|
||||
10-bit buffers.
|
||||
|
||||
NV15 and NV20 is a packed 10-bit 4:2:0/4:2:2 semi-planar Y/UV format
|
||||
similar to P010 and P210 but has no padding between components. Instead,
|
||||
luminance and chrominance samples are grouped into 4s so that each group is
|
||||
packed into an integer number of bytes:
|
||||
|
||||
YYYY = UVUV = 4 * 10 bits = 40 bits = 5 bytes
|
||||
|
||||
The '15' and '20' suffix refers to the optimum effective bits per pixel
|
||||
which is achieved when the total number of luminance samples is a multiple
|
||||
of 8 for NV15 and 4 for NV20.
|
||||
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
---
|
||||
drivers/media/v4l2-core/v4l2-common.c | 3 +++
|
||||
drivers/media/v4l2-core/v4l2-ioctl.c | 2 ++
|
||||
include/uapi/linux/videodev2.h | 3 +++
|
||||
3 files changed, 8 insertions(+)
|
||||
|
||||
diff --git a/drivers/media/v4l2-core/v4l2-common.c b/drivers/media/v4l2-core/v4l2-common.c
|
||||
index cb2f1acab7cf..8446a1deffd8 100644
|
||||
--- a/drivers/media/v4l2-core/v4l2-common.c
|
||||
+++ b/drivers/media/v4l2-core/v4l2-common.c
|
||||
@@ -268,6 +268,9 @@ const struct v4l2_format_info *v4l2_format_info(u32 format)
|
||||
{ .format = V4L2_PIX_FMT_NV42, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 1, 2, 0, 0 }, .hdiv = 1, .vdiv = 1 },
|
||||
{ .format = V4L2_PIX_FMT_P010, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 2, 2, 0, 0 }, .hdiv = 2, .vdiv = 1 },
|
||||
|
||||
+ { .format = V4L2_PIX_FMT_NV15, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 5, 5, 0, 0 }, .hdiv = 2, .vdiv = 2, .block_w = { 4, 2, 0, 0 }, .block_h = { 1, 1, 0, 0 } },
|
||||
+ { .format = V4L2_PIX_FMT_NV20, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 5, 5, 0, 0 }, .hdiv = 2, .vdiv = 1, .block_w = { 4, 2, 0, 0 }, .block_h = { 1, 1, 0, 0 } },
|
||||
+
|
||||
{ .format = V4L2_PIX_FMT_YUV410, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 3, .bpp = { 1, 1, 1, 0 }, .hdiv = 4, .vdiv = 4 },
|
||||
{ .format = V4L2_PIX_FMT_YVU410, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 3, .bpp = { 1, 1, 1, 0 }, .hdiv = 4, .vdiv = 4 },
|
||||
{ .format = V4L2_PIX_FMT_YUV411P, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 3, .bpp = { 1, 1, 1, 0 }, .hdiv = 4, .vdiv = 1 },
|
||||
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
|
||||
index e6fd355a2e92..24771edaa4f2 100644
|
||||
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
|
||||
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
|
||||
@@ -1354,6 +1354,8 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
|
||||
case V4L2_PIX_FMT_NV42: descr = "Y/VU 4:4:4"; break;
|
||||
case V4L2_PIX_FMT_P010: descr = "10-bit Y/UV 4:2:0"; break;
|
||||
case V4L2_PIX_FMT_P012: descr = "12-bit Y/UV 4:2:0"; break;
|
||||
+ case V4L2_PIX_FMT_NV15: descr = "10-bit Y/UV 4:2:0 (Packed)"; break;
|
||||
+ case V4L2_PIX_FMT_NV20: descr = "10-bit Y/UV 4:2:2 (Packed)"; break;
|
||||
case V4L2_PIX_FMT_NV12_4L4: descr = "Y/UV 4:2:0 (4x4 Linear)"; break;
|
||||
case V4L2_PIX_FMT_NV12_16L16: descr = "Y/UV 4:2:0 (16x16 Linear)"; break;
|
||||
case V4L2_PIX_FMT_NV12_32L32: descr = "Y/UV 4:2:0 (32x32 Linear)"; break;
|
||||
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
|
||||
index 01e630f2ec78..cea44992aea3 100644
|
||||
--- a/include/uapi/linux/videodev2.h
|
||||
+++ b/include/uapi/linux/videodev2.h
|
||||
@@ -628,6 +628,9 @@ struct v4l2_pix_format {
|
||||
#define V4L2_PIX_FMT_NV42 v4l2_fourcc('N', 'V', '4', '2') /* 24 Y/VU 4:4:4 */
|
||||
#define V4L2_PIX_FMT_P010 v4l2_fourcc('P', '0', '1', '0') /* 24 Y/UV 4:2:0 10-bit per component */
|
||||
|
||||
+#define V4L2_PIX_FMT_NV15 v4l2_fourcc('N', 'V', '1', '5') /* 15 Y/UV 4:2:0 10-bit packed */
|
||||
+#define V4L2_PIX_FMT_NV20 v4l2_fourcc('N', 'V', '2', '0') /* 20 Y/UV 4:2:2 10-bit packed */
|
||||
+
|
||||
/* two non contiguous planes - one Y, one Cr + Cb interleaved */
|
||||
#define V4L2_PIX_FMT_NV12M v4l2_fourcc('N', 'M', '1', '2') /* 12 Y/UV 4:2:0 */
|
||||
#define V4L2_PIX_FMT_NV21M v4l2_fourcc('N', 'M', '2', '1') /* 21 Y/VU 4:2:0 */
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Mon, 6 Jul 2020 21:54:36 +0000
|
||||
Subject: [PATCH] media: rkvdec: h264: Use bytesperline and buffer height to
|
||||
calculate stride
|
||||
|
||||
Use bytesperline and buffer height to calculate the strides configured.
|
||||
|
||||
This does not really change anything other than ensuring the bytesperline
|
||||
that is signaled to userspace matches what is configured in HW.
|
||||
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
---
|
||||
drivers/staging/media/rkvdec/rkvdec-h264.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/media/rkvdec/rkvdec-h264.c b/drivers/staging/media/rkvdec/rkvdec-h264.c
|
||||
index 4fc167b42cf0..a8635105e387 100644
|
||||
--- a/drivers/staging/media/rkvdec/rkvdec-h264.c
|
||||
+++ b/drivers/staging/media/rkvdec/rkvdec-h264.c
|
||||
@@ -896,9 +896,9 @@ static void config_registers(struct rkvdec_ctx *ctx,
|
||||
dma_addr_t rlc_addr;
|
||||
dma_addr_t refer_addr;
|
||||
u32 rlc_len;
|
||||
- u32 hor_virstride = 0;
|
||||
- u32 ver_virstride = 0;
|
||||
- u32 y_virstride = 0;
|
||||
+ u32 hor_virstride;
|
||||
+ u32 ver_virstride;
|
||||
+ u32 y_virstride;
|
||||
u32 yuv_virstride = 0;
|
||||
u32 offset;
|
||||
dma_addr_t dst_addr;
|
||||
@@ -909,8 +909,8 @@ static void config_registers(struct rkvdec_ctx *ctx,
|
||||
|
||||
f = &ctx->decoded_fmt;
|
||||
dst_fmt = &f->fmt.pix_mp;
|
||||
- hor_virstride = (sps->bit_depth_luma_minus8 + 8) * dst_fmt->width / 8;
|
||||
- ver_virstride = round_up(dst_fmt->height, 16);
|
||||
+ hor_virstride = dst_fmt->plane_fmt[0].bytesperline;
|
||||
+ ver_virstride = dst_fmt->height;
|
||||
y_virstride = hor_virstride * ver_virstride;
|
||||
|
||||
if (sps->chroma_format_idc == 0)
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Mon, 6 Jul 2020 21:54:37 +0000
|
||||
Subject: [PATCH] media: rkvdec: Extract rkvdec_fill_decoded_pixfmt helper
|
||||
method
|
||||
|
||||
This extract setting decoded pixfmt into a helper method, current code is
|
||||
replaced with a call to the new helper method.
|
||||
|
||||
The helper method is also called from a new function in next patch.
|
||||
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
---
|
||||
drivers/staging/media/rkvdec/rkvdec.c | 29 ++++++++++++++-------------
|
||||
1 file changed, 15 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c
|
||||
index 7bab7586918c..40cc791aef26 100644
|
||||
--- a/drivers/staging/media/rkvdec/rkvdec.c
|
||||
+++ b/drivers/staging/media/rkvdec/rkvdec.c
|
||||
@@ -27,6 +27,17 @@
|
||||
#include "rkvdec.h"
|
||||
#include "rkvdec-regs.h"
|
||||
|
||||
+static void rkvdec_fill_decoded_pixfmt(struct rkvdec_ctx *ctx,
|
||||
+ struct v4l2_pix_format_mplane *pix_mp)
|
||||
+{
|
||||
+ v4l2_fill_pixfmt_mp(pix_mp, pix_mp->pixelformat,
|
||||
+ pix_mp->width, pix_mp->height);
|
||||
+ pix_mp->plane_fmt[0].sizeimage += 128 *
|
||||
+ DIV_ROUND_UP(pix_mp->width, 16) *
|
||||
+ DIV_ROUND_UP(pix_mp->height, 16);
|
||||
+ pix_mp->field = V4L2_FIELD_NONE;
|
||||
+}
|
||||
+
|
||||
static int rkvdec_try_ctrl(struct v4l2_ctrl *ctrl)
|
||||
{
|
||||
struct rkvdec_ctx *ctx = container_of(ctrl->handler, struct rkvdec_ctx, ctrl_hdl);
|
||||
@@ -192,13 +203,9 @@ static void rkvdec_reset_decoded_fmt(struct rkvdec_ctx *ctx)
|
||||
|
||||
rkvdec_reset_fmt(ctx, f, ctx->coded_fmt_desc->decoded_fmts[0]);
|
||||
f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
|
||||
- v4l2_fill_pixfmt_mp(&f->fmt.pix_mp,
|
||||
- ctx->coded_fmt_desc->decoded_fmts[0],
|
||||
- ctx->coded_fmt.fmt.pix_mp.width,
|
||||
- ctx->coded_fmt.fmt.pix_mp.height);
|
||||
- f->fmt.pix_mp.plane_fmt[0].sizeimage += 128 *
|
||||
- DIV_ROUND_UP(f->fmt.pix_mp.width, 16) *
|
||||
- DIV_ROUND_UP(f->fmt.pix_mp.height, 16);
|
||||
+ f->fmt.pix_mp.width = ctx->coded_fmt.fmt.pix_mp.width;
|
||||
+ f->fmt.pix_mp.height = ctx->coded_fmt.fmt.pix_mp.height;
|
||||
+ rkvdec_fill_decoded_pixfmt(ctx, &f->fmt.pix_mp);
|
||||
}
|
||||
|
||||
static int rkvdec_enum_framesizes(struct file *file, void *priv,
|
||||
@@ -264,13 +271,7 @@ static int rkvdec_try_capture_fmt(struct file *file, void *priv,
|
||||
&pix_mp->height,
|
||||
&coded_desc->frmsize);
|
||||
|
||||
- v4l2_fill_pixfmt_mp(pix_mp, pix_mp->pixelformat,
|
||||
- pix_mp->width, pix_mp->height);
|
||||
- pix_mp->plane_fmt[0].sizeimage +=
|
||||
- 128 *
|
||||
- DIV_ROUND_UP(pix_mp->width, 16) *
|
||||
- DIV_ROUND_UP(pix_mp->height, 16);
|
||||
- pix_mp->field = V4L2_FIELD_NONE;
|
||||
+ rkvdec_fill_decoded_pixfmt(ctx, pix_mp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Mon, 6 Jul 2020 21:54:37 +0000
|
||||
Subject: [PATCH] media: rkvdec: Lock capture pixel format in s_ctrl and s_fmt
|
||||
|
||||
Add an optional valid_fmt operation that should return the valid
|
||||
pixelformat of CAPTURE buffers.
|
||||
|
||||
This is used in next patch to ensure correct pixelformat is used for 10-bit
|
||||
and 4:2:2 content.
|
||||
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
---
|
||||
drivers/staging/media/rkvdec/rkvdec.c | 67 +++++++++++++++++++++++----
|
||||
drivers/staging/media/rkvdec/rkvdec.h | 2 +
|
||||
2 files changed, 61 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c
|
||||
index 40cc791aef26..e93e1cb0f829 100644
|
||||
--- a/drivers/staging/media/rkvdec/rkvdec.c
|
||||
+++ b/drivers/staging/media/rkvdec/rkvdec.c
|
||||
@@ -38,19 +38,56 @@ static void rkvdec_fill_decoded_pixfmt(struct rkvdec_ctx *ctx,
|
||||
pix_mp->field = V4L2_FIELD_NONE;
|
||||
}
|
||||
|
||||
+static u32 rkvdec_valid_fmt(struct rkvdec_ctx *ctx, struct v4l2_ctrl *ctrl)
|
||||
+{
|
||||
+ const struct rkvdec_coded_fmt_desc *coded_desc = ctx->coded_fmt_desc;
|
||||
+
|
||||
+ if (coded_desc->ops->valid_fmt)
|
||||
+ return coded_desc->ops->valid_fmt(ctx, ctrl);
|
||||
+
|
||||
+ return ctx->valid_fmt;
|
||||
+}
|
||||
+
|
||||
static int rkvdec_try_ctrl(struct v4l2_ctrl *ctrl)
|
||||
{
|
||||
struct rkvdec_ctx *ctx = container_of(ctrl->handler, struct rkvdec_ctx, ctrl_hdl);
|
||||
const struct rkvdec_coded_fmt_desc *desc = ctx->coded_fmt_desc;
|
||||
|
||||
- if (desc->ops->try_ctrl)
|
||||
- return desc->ops->try_ctrl(ctx, ctrl);
|
||||
+ if (desc->ops->try_ctrl) {
|
||||
+ int ret;
|
||||
+ ret = desc->ops->try_ctrl(ctx, ctrl);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ if (ctx->valid_fmt && ctx->valid_fmt != rkvdec_valid_fmt(ctx, ctrl))
|
||||
+ /* Only current valid format */
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int rkvdec_s_ctrl(struct v4l2_ctrl *ctrl)
|
||||
+{
|
||||
+ struct rkvdec_ctx *ctx = container_of(ctrl->handler, struct rkvdec_ctx, ctrl_hdl);
|
||||
+
|
||||
+ if (ctrl->id == V4L2_CID_STATELESS_H264_SPS && !ctx->valid_fmt) {
|
||||
+ ctx->valid_fmt = rkvdec_valid_fmt(ctx, ctrl);
|
||||
+ if (ctx->valid_fmt) {
|
||||
+ struct v4l2_pix_format_mplane *pix_mp;
|
||||
+
|
||||
+ pix_mp = &ctx->decoded_fmt.fmt.pix_mp;
|
||||
+ pix_mp->pixelformat = ctx->valid_fmt;
|
||||
+ rkvdec_fill_decoded_pixfmt(ctx, pix_mp);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct v4l2_ctrl_ops rkvdec_ctrl_ops = {
|
||||
.try_ctrl = rkvdec_try_ctrl,
|
||||
+ .s_ctrl = rkvdec_s_ctrl,
|
||||
};
|
||||
|
||||
static const struct rkvdec_ctrl_desc rkvdec_h264_ctrl_descs[] = {
|
||||
@@ -201,6 +238,7 @@ static void rkvdec_reset_decoded_fmt(struct rkvdec_ctx *ctx)
|
||||
{
|
||||
struct v4l2_format *f = &ctx->decoded_fmt;
|
||||
|
||||
+ ctx->valid_fmt = 0;
|
||||
rkvdec_reset_fmt(ctx, f, ctx->coded_fmt_desc->decoded_fmts[0]);
|
||||
f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
|
||||
f->fmt.pix_mp.width = ctx->coded_fmt.fmt.pix_mp.width;
|
||||
@@ -256,13 +294,17 @@ static int rkvdec_try_capture_fmt(struct file *file, void *priv,
|
||||
if (WARN_ON(!coded_desc))
|
||||
return -EINVAL;
|
||||
|
||||
- for (i = 0; i < coded_desc->num_decoded_fmts; i++) {
|
||||
- if (coded_desc->decoded_fmts[i] == pix_mp->pixelformat)
|
||||
- break;
|
||||
- }
|
||||
+ if (ctx->valid_fmt) {
|
||||
+ pix_mp->pixelformat = ctx->valid_fmt;
|
||||
+ } else {
|
||||
+ for (i = 0; i < coded_desc->num_decoded_fmts; i++) {
|
||||
+ if (coded_desc->decoded_fmts[i] == pix_mp->pixelformat)
|
||||
+ break;
|
||||
+ }
|
||||
|
||||
- if (i == coded_desc->num_decoded_fmts)
|
||||
- pix_mp->pixelformat = coded_desc->decoded_fmts[0];
|
||||
+ if (i == coded_desc->num_decoded_fmts)
|
||||
+ pix_mp->pixelformat = coded_desc->decoded_fmts[0];
|
||||
+ }
|
||||
|
||||
/* Always apply the frmsize constraint of the coded end. */
|
||||
pix_mp->width = max(pix_mp->width, ctx->coded_fmt.fmt.pix_mp.width);
|
||||
@@ -326,6 +368,7 @@ static int rkvdec_s_capture_fmt(struct file *file, void *priv,
|
||||
return ret;
|
||||
|
||||
ctx->decoded_fmt = *f;
|
||||
+ ctx->valid_fmt = f->fmt.pix_mp.pixelformat;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -429,6 +472,14 @@ static int rkvdec_enum_capture_fmt(struct file *file, void *priv,
|
||||
if (WARN_ON(!ctx->coded_fmt_desc))
|
||||
return -EINVAL;
|
||||
|
||||
+ if (ctx->valid_fmt) {
|
||||
+ if (f->index)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ f->pixelformat = ctx->valid_fmt;
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
if (f->index >= ctx->coded_fmt_desc->num_decoded_fmts)
|
||||
return -EINVAL;
|
||||
|
||||
diff --git a/drivers/staging/media/rkvdec/rkvdec.h b/drivers/staging/media/rkvdec/rkvdec.h
|
||||
index 633335ebb9c4..b9e219438bc9 100644
|
||||
--- a/drivers/staging/media/rkvdec/rkvdec.h
|
||||
+++ b/drivers/staging/media/rkvdec/rkvdec.h
|
||||
@@ -66,6 +66,7 @@ vb2_to_rkvdec_decoded_buf(struct vb2_buffer *buf)
|
||||
struct rkvdec_coded_fmt_ops {
|
||||
int (*adjust_fmt)(struct rkvdec_ctx *ctx,
|
||||
struct v4l2_format *f);
|
||||
+ u32 (*valid_fmt)(struct rkvdec_ctx *ctx, struct v4l2_ctrl *ctrl);
|
||||
int (*start)(struct rkvdec_ctx *ctx);
|
||||
void (*stop)(struct rkvdec_ctx *ctx);
|
||||
int (*run)(struct rkvdec_ctx *ctx);
|
||||
@@ -101,6 +102,7 @@ struct rkvdec_ctx {
|
||||
struct v4l2_fh fh;
|
||||
struct v4l2_format coded_fmt;
|
||||
struct v4l2_format decoded_fmt;
|
||||
+ u32 valid_fmt;
|
||||
const struct rkvdec_coded_fmt_desc *coded_fmt_desc;
|
||||
struct v4l2_ctrl_handler ctrl_hdl;
|
||||
struct rkvdec_dev *dev;
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Mon, 6 Jul 2020 21:54:37 +0000
|
||||
Subject: [PATCH] media: rkvdec: h264: Support High 10 and 4:2:2 profiles
|
||||
|
||||
Add support and enable decoding of H264 High 10 and 4:2:2 profiles.
|
||||
|
||||
Decoded CAPTURE buffer width is aligned to 64 pixels to accommodate HW
|
||||
requirement on 10-bit format buffers.
|
||||
|
||||
The new valid_fmt operation is implemented and return a valid pixelformat
|
||||
for the provided SPS control.
|
||||
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
---
|
||||
drivers/staging/media/rkvdec/rkvdec-h264.c | 33 ++++++++++++++++------
|
||||
drivers/staging/media/rkvdec/rkvdec.c | 19 +++++++++----
|
||||
2 files changed, 37 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/media/rkvdec/rkvdec-h264.c b/drivers/staging/media/rkvdec/rkvdec-h264.c
|
||||
index a8635105e387..0069d3d198db 100644
|
||||
--- a/drivers/staging/media/rkvdec/rkvdec-h264.c
|
||||
+++ b/drivers/staging/media/rkvdec/rkvdec-h264.c
|
||||
@@ -1031,19 +1031,14 @@ static int rkvdec_h264_validate_sps(struct rkvdec_ctx *ctx,
|
||||
{
|
||||
unsigned int width, height;
|
||||
|
||||
- /*
|
||||
- * TODO: The hardware supports 10-bit and 4:2:2 profiles,
|
||||
- * but it's currently broken in the driver.
|
||||
- * Reject them for now, until it's fixed.
|
||||
- */
|
||||
- if (sps->chroma_format_idc > 1)
|
||||
- /* Only 4:0:0 and 4:2:0 are supported */
|
||||
+ if (sps->chroma_format_idc > 2)
|
||||
+ /* Only 4:0:0, 4:2:0 and 4:2:2 are supported */
|
||||
return -EINVAL;
|
||||
if (sps->bit_depth_luma_minus8 != sps->bit_depth_chroma_minus8)
|
||||
/* Luma and chroma bit depth mismatch */
|
||||
return -EINVAL;
|
||||
- if (sps->bit_depth_luma_minus8 != 0)
|
||||
- /* Only 8-bit is supported */
|
||||
+ if (sps->bit_depth_luma_minus8 != 0 && sps->bit_depth_luma_minus8 != 2)
|
||||
+ /* Only 8-bit and 10-bit is supported */
|
||||
return -EINVAL;
|
||||
|
||||
width = (sps->pic_width_in_mbs_minus1 + 1) * 16;
|
||||
@@ -1064,6 +1059,25 @@ static int rkvdec_h264_validate_sps(struct rkvdec_ctx *ctx,
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static u32 rkvdec_h264_valid_fmt(struct rkvdec_ctx *ctx, struct v4l2_ctrl *ctrl)
|
||||
+{
|
||||
+ const struct v4l2_ctrl_h264_sps *sps = ctrl->p_new.p_h264_sps;
|
||||
+
|
||||
+ if (sps->bit_depth_luma_minus8 == 0) {
|
||||
+ if (sps->chroma_format_idc == 2)
|
||||
+ return V4L2_PIX_FMT_NV16;
|
||||
+ else
|
||||
+ return V4L2_PIX_FMT_NV12;
|
||||
+ } else if (sps->bit_depth_luma_minus8 == 2) {
|
||||
+ if (sps->chroma_format_idc == 2)
|
||||
+ return V4L2_PIX_FMT_NV20;
|
||||
+ else
|
||||
+ return V4L2_PIX_FMT_NV15;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int rkvdec_h264_start(struct rkvdec_ctx *ctx)
|
||||
{
|
||||
struct rkvdec_dev *rkvdec = ctx->dev;
|
||||
@@ -1185,6 +1199,7 @@ static int rkvdec_h264_try_ctrl(struct rkvdec_ctx *ctx, struct v4l2_ctrl *ctrl)
|
||||
|
||||
const struct rkvdec_coded_fmt_ops rkvdec_h264_fmt_ops = {
|
||||
.adjust_fmt = rkvdec_h264_adjust_fmt,
|
||||
+ .valid_fmt = rkvdec_h264_valid_fmt,
|
||||
.start = rkvdec_h264_start,
|
||||
.stop = rkvdec_h264_stop,
|
||||
.run = rkvdec_h264_run,
|
||||
diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c
|
||||
index e93e1cb0f829..4f5436c89e08 100644
|
||||
--- a/drivers/staging/media/rkvdec/rkvdec.c
|
||||
+++ b/drivers/staging/media/rkvdec/rkvdec.c
|
||||
@@ -31,7 +31,7 @@ static void rkvdec_fill_decoded_pixfmt(struct rkvdec_ctx *ctx,
|
||||
struct v4l2_pix_format_mplane *pix_mp)
|
||||
{
|
||||
v4l2_fill_pixfmt_mp(pix_mp, pix_mp->pixelformat,
|
||||
- pix_mp->width, pix_mp->height);
|
||||
+ ALIGN(pix_mp->width, 64), pix_mp->height);
|
||||
pix_mp->plane_fmt[0].sizeimage += 128 *
|
||||
DIV_ROUND_UP(pix_mp->width, 16) *
|
||||
DIV_ROUND_UP(pix_mp->height, 16);
|
||||
@@ -136,8 +136,11 @@ static const struct rkvdec_ctrls rkvdec_h264_ctrls = {
|
||||
.num_ctrls = ARRAY_SIZE(rkvdec_h264_ctrl_descs),
|
||||
};
|
||||
|
||||
-static const u32 rkvdec_h264_vp9_decoded_fmts[] = {
|
||||
+static const u32 rkvdec_h264_decoded_fmts[] = {
|
||||
V4L2_PIX_FMT_NV12,
|
||||
+ V4L2_PIX_FMT_NV15,
|
||||
+ V4L2_PIX_FMT_NV16,
|
||||
+ V4L2_PIX_FMT_NV20,
|
||||
};
|
||||
|
||||
static const struct rkvdec_ctrl_desc rkvdec_vp9_ctrl_descs[] = {
|
||||
@@ -160,6 +163,10 @@ static const struct rkvdec_ctrls rkvdec_vp9_ctrls = {
|
||||
.num_ctrls = ARRAY_SIZE(rkvdec_vp9_ctrl_descs),
|
||||
};
|
||||
|
||||
+static const u32 rkvdec_vp9_decoded_fmts[] = {
|
||||
+ V4L2_PIX_FMT_NV12,
|
||||
+};
|
||||
+
|
||||
static const struct rkvdec_coded_fmt_desc rkvdec_coded_fmts[] = {
|
||||
{
|
||||
.fourcc = V4L2_PIX_FMT_H264_SLICE,
|
||||
@@ -173,8 +180,8 @@ static const struct rkvdec_coded_fmt_desc rkvdec_coded_fmts[] = {
|
||||
},
|
||||
.ctrls = &rkvdec_h264_ctrls,
|
||||
.ops = &rkvdec_h264_fmt_ops,
|
||||
- .num_decoded_fmts = ARRAY_SIZE(rkvdec_h264_vp9_decoded_fmts),
|
||||
- .decoded_fmts = rkvdec_h264_vp9_decoded_fmts,
|
||||
+ .num_decoded_fmts = ARRAY_SIZE(rkvdec_h264_decoded_fmts),
|
||||
+ .decoded_fmts = rkvdec_h264_decoded_fmts,
|
||||
.subsystem_flags = VB2_V4L2_FL_SUPPORTS_M2M_HOLD_CAPTURE_BUF,
|
||||
},
|
||||
{
|
||||
@@ -189,8 +196,8 @@ static const struct rkvdec_coded_fmt_desc rkvdec_coded_fmts[] = {
|
||||
},
|
||||
.ctrls = &rkvdec_vp9_ctrls,
|
||||
.ops = &rkvdec_vp9_fmt_ops,
|
||||
- .num_decoded_fmts = ARRAY_SIZE(rkvdec_h264_vp9_decoded_fmts),
|
||||
- .decoded_fmts = rkvdec_h264_vp9_decoded_fmts,
|
||||
+ .num_decoded_fmts = ARRAY_SIZE(rkvdec_vp9_decoded_fmts),
|
||||
+ .decoded_fmts = rkvdec_vp9_decoded_fmts,
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Bee <knaerzche@gmail.com>
|
||||
Date: Sun, 27 Mar 2022 14:18:07 +0200
|
||||
Subject: [PATCH] media: rkvdec-h264: Don't hardcode SPS/PPS parameters
|
||||
|
||||
Some SPS/PPS parameters are currently hardcoded in the driver
|
||||
even though so do exist in the uapi which is stable by now.
|
||||
|
||||
Use them instead of hardcoding them.
|
||||
|
||||
Signed-off-by: Alex Bee <knaerzche@gmail.com>
|
||||
---
|
||||
drivers/staging/media/rkvdec/rkvdec-h264.c | 13 +++++++------
|
||||
1 file changed, 7 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/media/rkvdec/rkvdec-h264.c b/drivers/staging/media/rkvdec/rkvdec-h264.c
|
||||
index 0069d3d198db..2c27acaba85e 100644
|
||||
--- a/drivers/staging/media/rkvdec/rkvdec-h264.c
|
||||
+++ b/drivers/staging/media/rkvdec/rkvdec-h264.c
|
||||
@@ -655,13 +655,14 @@ static void assemble_hw_pps(struct rkvdec_ctx *ctx,
|
||||
|
||||
#define WRITE_PPS(value, field) set_ps_field(hw_ps->info, field, value)
|
||||
/* write sps */
|
||||
- WRITE_PPS(0xf, SEQ_PARAMETER_SET_ID);
|
||||
- WRITE_PPS(0xff, PROFILE_IDC);
|
||||
- WRITE_PPS(1, CONSTRAINT_SET3_FLAG);
|
||||
+ WRITE_PPS(sps->seq_parameter_set_id, SEQ_PARAMETER_SET_ID);
|
||||
+ WRITE_PPS(sps->profile_idc, PROFILE_IDC);
|
||||
+ WRITE_PPS((sps->constraint_set_flags & 1 << 3) ? 1 : 0, CONSTRAINT_SET3_FLAG);
|
||||
WRITE_PPS(sps->chroma_format_idc, CHROMA_FORMAT_IDC);
|
||||
WRITE_PPS(sps->bit_depth_luma_minus8, BIT_DEPTH_LUMA);
|
||||
WRITE_PPS(sps->bit_depth_chroma_minus8, BIT_DEPTH_CHROMA);
|
||||
- WRITE_PPS(0, QPPRIME_Y_ZERO_TRANSFORM_BYPASS_FLAG);
|
||||
+ WRITE_PPS(!!(sps->flags & V4L2_H264_SPS_FLAG_QPPRIME_Y_ZERO_TRANSFORM_BYPASS),
|
||||
+ QPPRIME_Y_ZERO_TRANSFORM_BYPASS_FLAG);
|
||||
WRITE_PPS(sps->log2_max_frame_num_minus4, LOG2_MAX_FRAME_NUM_MINUS4);
|
||||
WRITE_PPS(sps->max_num_ref_frames, MAX_NUM_REF_FRAMES);
|
||||
WRITE_PPS(sps->pic_order_cnt_type, PIC_ORDER_CNT_TYPE);
|
||||
@@ -688,8 +689,8 @@ static void assemble_hw_pps(struct rkvdec_ctx *ctx,
|
||||
DIRECT_8X8_INFERENCE_FLAG);
|
||||
|
||||
/* write pps */
|
||||
- WRITE_PPS(0xff, PIC_PARAMETER_SET_ID);
|
||||
- WRITE_PPS(0x1f, PPS_SEQ_PARAMETER_SET_ID);
|
||||
+ WRITE_PPS(pps->pic_parameter_set_id, PIC_PARAMETER_SET_ID);
|
||||
+ WRITE_PPS(pps->seq_parameter_set_id, PPS_SEQ_PARAMETER_SET_ID);
|
||||
WRITE_PPS(!!(pps->flags & V4L2_H264_PPS_FLAG_ENTROPY_CODING_MODE),
|
||||
ENTROPY_CODING_MODE_FLAG);
|
||||
WRITE_PPS(!!(pps->flags & V4L2_H264_PPS_FLAG_BOTTOM_FIELD_PIC_ORDER_IN_FRAME_PRESENT),
|
||||
@@ -0,0 +1,236 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Mon, 6 Jul 2020 22:30:13 +0000
|
||||
Subject: [PATCH] drm: drm_fourcc: add NV20 and NV30 YUV formats
|
||||
|
||||
DRM_FORMAT_NV20 and DRM_FORMAT_NV30 formats is the 2x1 and non-subsampled
|
||||
variant of NV15, a 10-bit 2-plane YUV format that has no padding between
|
||||
components. Instead, luminance and chrominance samples are grouped into 4s
|
||||
so that each group is packed into an integer number of bytes:
|
||||
|
||||
YYYY = UVUV = 4 * 10 bits = 40 bits = 5 bytes
|
||||
|
||||
The '20' and '30' suffix refers to the optimum effective bits per pixel
|
||||
which is achieved when the total number of luminance samples is a multiple
|
||||
of 4.
|
||||
|
||||
V2: Added NV30 format
|
||||
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
Reviewed-by: Sandy Huang <hjc@rock-chips.com>
|
||||
---
|
||||
drivers/gpu/drm/drm_fourcc.c | 8 ++++++++
|
||||
include/uapi/drm/drm_fourcc.h | 2 ++
|
||||
2 files changed, 10 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c
|
||||
index 07741b678798..5ec38456dc5d 100644
|
||||
--- a/drivers/gpu/drm/drm_fourcc.c
|
||||
+++ b/drivers/gpu/drm/drm_fourcc.c
|
||||
@@ -261,6 +261,14 @@ const struct drm_format_info *__drm_format_info(u32 format)
|
||||
.num_planes = 2, .char_per_block = { 5, 5, 0 },
|
||||
.block_w = { 4, 2, 0 }, .block_h = { 1, 1, 0 }, .hsub = 2,
|
||||
.vsub = 2, .is_yuv = true },
|
||||
+ { .format = DRM_FORMAT_NV20, .depth = 0,
|
||||
+ .num_planes = 2, .char_per_block = { 5, 5, 0 },
|
||||
+ .block_w = { 4, 2, 0 }, .block_h = { 1, 1, 0 }, .hsub = 2,
|
||||
+ .vsub = 1, .is_yuv = true },
|
||||
+ { .format = DRM_FORMAT_NV30, .depth = 0,
|
||||
+ .num_planes = 2, .char_per_block = { 5, 5, 0 },
|
||||
+ .block_w = { 4, 2, 0 }, .block_h = { 1, 1, 0 }, .hsub = 1,
|
||||
+ .vsub = 1, .is_yuv = true },
|
||||
{ .format = DRM_FORMAT_Q410, .depth = 0,
|
||||
.num_planes = 3, .char_per_block = { 2, 2, 2 },
|
||||
.block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 0,
|
||||
diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h
|
||||
index 0206f812c569..fa49ee98f275 100644
|
||||
--- a/include/uapi/drm/drm_fourcc.h
|
||||
+++ b/include/uapi/drm/drm_fourcc.h
|
||||
@@ -285,6 +285,8 @@ extern "C" {
|
||||
* index 1 = Cr:Cb plane, [39:0] Cr1:Cb1:Cr0:Cb0 little endian
|
||||
*/
|
||||
#define DRM_FORMAT_NV15 fourcc_code('N', 'V', '1', '5') /* 2x2 subsampled Cr:Cb plane */
|
||||
+#define DRM_FORMAT_NV20 fourcc_code('N', 'V', '2', '0') /* 2x1 subsampled Cr:Cb plane */
|
||||
+#define DRM_FORMAT_NV30 fourcc_code('N', 'V', '3', '0') /* non-subsampled Cr:Cb plane */
|
||||
|
||||
/*
|
||||
* 2 plane YCbCr MSB aligned
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Mon, 6 Jul 2020 22:30:13 +0000
|
||||
Subject: [PATCH] drm: rockchip: add NV15, NV20 and NV30 support
|
||||
|
||||
Add support for displaying 10-bit 4:2:0 and 4:2:2 formats produced by the
|
||||
Rockchip Video Decoder on RK322X, RK3288, RK3328, RK3368 and RK3399.
|
||||
Also add support for 10-bit 4:4:4 format while at it.
|
||||
|
||||
V2: Added NV30 support
|
||||
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
Reviewed-by: Sandy Huang <hjc@rock-chips.com>
|
||||
---
|
||||
drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 29 +++++++++++++++++--
|
||||
drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 1 +
|
||||
drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 32 +++++++++++++++++----
|
||||
3 files changed, 54 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
|
||||
index d32117633efe..9e71263ac770 100644
|
||||
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
|
||||
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
|
||||
@@ -280,6 +280,18 @@ static bool has_uv_swapped(uint32_t format)
|
||||
}
|
||||
}
|
||||
|
||||
+static bool is_fmt_10(uint32_t format)
|
||||
+{
|
||||
+ switch (format) {
|
||||
+ case DRM_FORMAT_NV15:
|
||||
+ case DRM_FORMAT_NV20:
|
||||
+ case DRM_FORMAT_NV30:
|
||||
+ return true;
|
||||
+ default:
|
||||
+ return false;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static enum vop_data_format vop_convert_format(uint32_t format)
|
||||
{
|
||||
switch (format) {
|
||||
@@ -295,12 +307,15 @@ static enum vop_data_format vop_convert_format(uint32_t format)
|
||||
case DRM_FORMAT_BGR565:
|
||||
return VOP_FMT_RGB565;
|
||||
case DRM_FORMAT_NV12:
|
||||
+ case DRM_FORMAT_NV15:
|
||||
case DRM_FORMAT_NV21:
|
||||
return VOP_FMT_YUV420SP;
|
||||
case DRM_FORMAT_NV16:
|
||||
+ case DRM_FORMAT_NV20:
|
||||
case DRM_FORMAT_NV61:
|
||||
return VOP_FMT_YUV422SP;
|
||||
case DRM_FORMAT_NV24:
|
||||
+ case DRM_FORMAT_NV30:
|
||||
case DRM_FORMAT_NV42:
|
||||
return VOP_FMT_YUV444SP;
|
||||
default:
|
||||
@@ -954,7 +969,12 @@ static void vop_plane_atomic_update(struct drm_plane *plane,
|
||||
dsp_sty = dest->y1 + crtc->mode.vtotal - crtc->mode.vsync_start;
|
||||
dsp_st = dsp_sty << 16 | (dsp_stx & 0xffff);
|
||||
|
||||
- offset = (src->x1 >> 16) * fb->format->cpp[0];
|
||||
+ if (fb->format->block_w[0])
|
||||
+ offset = (src->x1 >> 16) * fb->format->char_per_block[0] /
|
||||
+ fb->format->block_w[0];
|
||||
+ else
|
||||
+ offset = (src->x1 >> 16) * fb->format->cpp[0];
|
||||
+
|
||||
offset += (src->y1 >> 16) * fb->pitches[0];
|
||||
dma_addr = rk_obj->dma_addr + offset + fb->offsets[0];
|
||||
|
||||
@@ -980,6 +1000,7 @@ static void vop_plane_atomic_update(struct drm_plane *plane,
|
||||
}
|
||||
|
||||
VOP_WIN_SET(vop, win, format, format);
|
||||
+ VOP_WIN_SET(vop, win, fmt_10, is_fmt_10(fb->format->format));
|
||||
VOP_WIN_SET(vop, win, yrgb_vir, DIV_ROUND_UP(fb->pitches[0], 4));
|
||||
VOP_WIN_SET(vop, win, yrgb_mst, dma_addr);
|
||||
VOP_WIN_YUV2YUV_SET(vop, win_yuv2yuv, y2r_en, is_yuv);
|
||||
@@ -996,7 +1017,11 @@ static void vop_plane_atomic_update(struct drm_plane *plane,
|
||||
uv_obj = fb->obj[1];
|
||||
rk_uv_obj = to_rockchip_obj(uv_obj);
|
||||
|
||||
- offset = (src->x1 >> 16) * bpp / hsub;
|
||||
+ if (fb->format->block_w[1])
|
||||
+ offset = (src->x1 >> 16) * bpp /
|
||||
+ fb->format->block_w[1] / hsub;
|
||||
+ else
|
||||
+ offset = (src->x1 >> 16) * bpp / hsub;
|
||||
offset += (src->y1 >> 16) * fb->pitches[1] / vsub;
|
||||
|
||||
dma_addr = rk_uv_obj->dma_addr + offset + fb->offsets[1];
|
||||
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
|
||||
index 8502849833d9..b6eea31109d5 100644
|
||||
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
|
||||
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
|
||||
@@ -181,6 +181,7 @@ struct vop_win_phy {
|
||||
struct vop_reg enable;
|
||||
struct vop_reg gate;
|
||||
struct vop_reg format;
|
||||
+ struct vop_reg fmt_10;
|
||||
struct vop_reg rb_swap;
|
||||
struct vop_reg uv_swap;
|
||||
struct vop_reg act_info;
|
||||
diff --git a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
|
||||
index 014f99e8928e..16e6aa01e400 100644
|
||||
--- a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
|
||||
+++ b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
|
||||
@@ -53,6 +53,23 @@ static const uint32_t formats_win_full[] = {
|
||||
DRM_FORMAT_NV42,
|
||||
};
|
||||
|
||||
+static const uint32_t formats_win_full_10[] = {
|
||||
+ DRM_FORMAT_XRGB8888,
|
||||
+ DRM_FORMAT_ARGB8888,
|
||||
+ DRM_FORMAT_XBGR8888,
|
||||
+ DRM_FORMAT_ABGR8888,
|
||||
+ DRM_FORMAT_RGB888,
|
||||
+ DRM_FORMAT_BGR888,
|
||||
+ DRM_FORMAT_RGB565,
|
||||
+ DRM_FORMAT_BGR565,
|
||||
+ DRM_FORMAT_NV12,
|
||||
+ DRM_FORMAT_NV16,
|
||||
+ DRM_FORMAT_NV24,
|
||||
+ DRM_FORMAT_NV15,
|
||||
+ DRM_FORMAT_NV20,
|
||||
+ DRM_FORMAT_NV30,
|
||||
+};
|
||||
+
|
||||
static const uint64_t format_modifiers_win_full[] = {
|
||||
DRM_FORMAT_MOD_LINEAR,
|
||||
DRM_FORMAT_MOD_INVALID,
|
||||
@@ -621,11 +638,12 @@ static const struct vop_scl_regs rk3288_win_full_scl = {
|
||||
|
||||
static const struct vop_win_phy rk3288_win01_data = {
|
||||
.scl = &rk3288_win_full_scl,
|
||||
- .data_formats = formats_win_full,
|
||||
- .nformats = ARRAY_SIZE(formats_win_full),
|
||||
+ .data_formats = formats_win_full_10,
|
||||
+ .nformats = ARRAY_SIZE(formats_win_full_10),
|
||||
.format_modifiers = format_modifiers_win_full,
|
||||
.enable = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 0),
|
||||
.format = VOP_REG(RK3288_WIN0_CTRL0, 0x7, 1),
|
||||
+ .fmt_10 = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 4),
|
||||
.rb_swap = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 12),
|
||||
.uv_swap = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 15),
|
||||
.act_info = VOP_REG(RK3288_WIN0_ACT_INFO, 0x1fff1fff, 0),
|
||||
@@ -756,11 +774,12 @@ static const struct vop_intr rk3368_vop_intr = {
|
||||
|
||||
static const struct vop_win_phy rk3368_win01_data = {
|
||||
.scl = &rk3288_win_full_scl,
|
||||
- .data_formats = formats_win_full,
|
||||
- .nformats = ARRAY_SIZE(formats_win_full),
|
||||
+ .data_formats = formats_win_full_10,
|
||||
+ .nformats = ARRAY_SIZE(formats_win_full_10),
|
||||
.format_modifiers = format_modifiers_win_full,
|
||||
.enable = VOP_REG(RK3368_WIN0_CTRL0, 0x1, 0),
|
||||
.format = VOP_REG(RK3368_WIN0_CTRL0, 0x7, 1),
|
||||
+ .fmt_10 = VOP_REG(RK3368_WIN0_CTRL0, 0x1, 4),
|
||||
.rb_swap = VOP_REG(RK3368_WIN0_CTRL0, 0x1, 12),
|
||||
.uv_swap = VOP_REG(RK3368_WIN0_CTRL0, 0x1, 15),
|
||||
.x_mir_en = VOP_REG(RK3368_WIN0_CTRL0, 0x1, 21),
|
||||
@@ -924,11 +943,12 @@ static const struct vop_win_yuv2yuv_data rk3399_vop_big_win_yuv2yuv_data[] = {
|
||||
|
||||
static const struct vop_win_phy rk3399_win01_data = {
|
||||
.scl = &rk3288_win_full_scl,
|
||||
- .data_formats = formats_win_full,
|
||||
- .nformats = ARRAY_SIZE(formats_win_full),
|
||||
+ .data_formats = formats_win_full_10,
|
||||
+ .nformats = ARRAY_SIZE(formats_win_full_10),
|
||||
.format_modifiers = format_modifiers_win_full_afbc,
|
||||
.enable = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 0),
|
||||
.format = VOP_REG(RK3288_WIN0_CTRL0, 0x7, 1),
|
||||
+ .fmt_10 = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 4),
|
||||
.rb_swap = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 12),
|
||||
.uv_swap = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 15),
|
||||
.x_mir_en = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 21),
|
||||
3277
patch/kernel/archive/rockchip-6.4/01-linux-1000-drm-rockchip.patch
Normal file
3277
patch/kernel/archive/rockchip-6.4/01-linux-1000-drm-rockchip.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,542 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Sat, 23 May 2020 10:16:01 +0000
|
||||
Subject: [PATCH] WIP: media: rkvdec: pm runtime dont use autosuspend before
|
||||
disable and cleanup
|
||||
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
---
|
||||
drivers/staging/media/rkvdec/rkvdec.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c
|
||||
index 4f5436c89e08..eaf2f133a264 100644
|
||||
--- a/drivers/staging/media/rkvdec/rkvdec.c
|
||||
+++ b/drivers/staging/media/rkvdec/rkvdec.c
|
||||
@@ -1125,9 +1125,9 @@ static int rkvdec_remove(struct platform_device *pdev)
|
||||
|
||||
cancel_delayed_work_sync(&rkvdec->watchdog_work);
|
||||
|
||||
- rkvdec_v4l2_cleanup(rkvdec);
|
||||
- pm_runtime_disable(&pdev->dev);
|
||||
pm_runtime_dont_use_autosuspend(&pdev->dev);
|
||||
+ pm_runtime_disable(&pdev->dev);
|
||||
+ rkvdec_v4l2_cleanup(rkvdec);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Randy Li <ayaka@soulik.info>
|
||||
Date: Sun, 6 Jan 2019 01:48:37 +0800
|
||||
Subject: [PATCH] soc: rockchip: power-domain: export idle request
|
||||
|
||||
We need to put the power status of HEVC IP into IDLE unless
|
||||
we can't reset that IP or the SoC would crash down.
|
||||
rockchip_pmu_idle_request(dev, true)---> enter idle
|
||||
rockchip_pmu_idle_request(dev, false)---> exit idle
|
||||
|
||||
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
|
||||
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
|
||||
Signed-off-by: Randy Li <ayaka@soulik.info>
|
||||
---
|
||||
drivers/soc/rockchip/pm_domains.c | 23 +++++++++++++++++++++++
|
||||
include/linux/rockchip_pmu.h | 15 +++++++++++++++
|
||||
include/soc/rockchip/pm_domains.h | 6 ++++++
|
||||
3 files changed, 44 insertions(+)
|
||||
create mode 100644 include/linux/rockchip_pmu.h
|
||||
|
||||
diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
|
||||
index 89795abac951..ffb5d62c9d52 100644
|
||||
--- a/drivers/soc/rockchip/pm_domains.c
|
||||
+++ b/drivers/soc/rockchip/pm_domains.c
|
||||
@@ -309,6 +309,29 @@ static int rockchip_pmu_set_idle_request(struct rockchip_pm_domain *pd,
|
||||
return 0;
|
||||
}
|
||||
|
||||
+int rockchip_pmu_idle_request(struct device *dev, bool idle)
|
||||
+{
|
||||
+ struct generic_pm_domain *genpd;
|
||||
+ struct rockchip_pm_domain *pd;
|
||||
+ int ret;
|
||||
+
|
||||
+ if (IS_ERR_OR_NULL(dev))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ if (IS_ERR_OR_NULL(dev->pm_domain))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ genpd = pd_to_genpd(dev->pm_domain);
|
||||
+ pd = to_rockchip_pd(genpd);
|
||||
+
|
||||
+ mutex_lock(&pd->pmu->mutex);
|
||||
+ ret = rockchip_pmu_set_idle_request(pd, idle);
|
||||
+ mutex_unlock(&pd->pmu->mutex);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+EXPORT_SYMBOL(rockchip_pmu_idle_request);
|
||||
+
|
||||
static int rockchip_pmu_save_qos(struct rockchip_pm_domain *pd)
|
||||
{
|
||||
int i;
|
||||
diff --git a/include/linux/rockchip_pmu.h b/include/linux/rockchip_pmu.h
|
||||
new file mode 100644
|
||||
index 000000000000..720b3314e71a
|
||||
--- /dev/null
|
||||
+++ b/include/linux/rockchip_pmu.h
|
||||
@@ -0,0 +1,15 @@
|
||||
+/*
|
||||
+ * pm_domain.h - Definitions and headers related to device power domains.
|
||||
+ *
|
||||
+ * Copyright (C) 2017 Randy Li <ayaka@soulik.info>.
|
||||
+ *
|
||||
+ * This file is released under the GPLv2.
|
||||
+ */
|
||||
+
|
||||
+#ifndef _LINUX_ROCKCHIP_PM_H
|
||||
+#define _LINUX_ROCKCHIP_PM_H
|
||||
+#include <linux/device.h>
|
||||
+
|
||||
+int rockchip_pmu_idle_request(struct device *dev, bool idle);
|
||||
+
|
||||
+#endif /* _LINUX_ROCKCHIP_PM_H */
|
||||
diff --git a/include/soc/rockchip/pm_domains.h b/include/soc/rockchip/pm_domains.h
|
||||
index 7dbd941fc937..c5a59dd71754 100644
|
||||
--- a/include/soc/rockchip/pm_domains.h
|
||||
+++ b/include/soc/rockchip/pm_domains.h
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
int rockchip_pmu_block(void);
|
||||
void rockchip_pmu_unblock(void);
|
||||
+int rockchip_pmu_idle_request(struct device *dev, bool idle);
|
||||
|
||||
#else /* CONFIG_ROCKCHIP_PM_DOMAINS */
|
||||
|
||||
@@ -20,6 +21,11 @@ static inline int rockchip_pmu_block(void)
|
||||
|
||||
static inline void rockchip_pmu_unblock(void) { }
|
||||
|
||||
+static inline int rockchip_pmu_idle_request(struct device *dev, bool idle)
|
||||
+{
|
||||
+ return -ENOTSUPP;
|
||||
+}
|
||||
+
|
||||
#endif /* CONFIG_ROCKCHIP_PM_DOMAINS */
|
||||
|
||||
#endif /* __SOC_ROCKCHIP_PM_DOMAINS_H__ */
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Bee <knaerzche@gmail.com>
|
||||
Date: Wed, 20 May 2020 17:04:47 +0200
|
||||
Subject: [PATCH] WIP: media: rkvdec: implement reset controls
|
||||
|
||||
---
|
||||
.../bindings/media/rockchip,vdec.yaml | 19 +++++++
|
||||
drivers/staging/media/rkvdec/rkvdec-regs.h | 5 ++
|
||||
drivers/staging/media/rkvdec/rkvdec.c | 53 +++++++++++++++++++
|
||||
drivers/staging/media/rkvdec/rkvdec.h | 11 +++-
|
||||
4 files changed, 87 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/media/rockchip,vdec.yaml b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml
|
||||
index 3bcfb8e12333..dd6958df1de8 100644
|
||||
--- a/Documentation/devicetree/bindings/media/rockchip,vdec.yaml
|
||||
+++ b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml
|
||||
@@ -53,6 +53,18 @@ properties:
|
||||
iommus:
|
||||
maxItems: 1
|
||||
|
||||
+ resets:
|
||||
+ maxItems: 6
|
||||
+
|
||||
+ reset-names:
|
||||
+ items:
|
||||
+ - const: video_h
|
||||
+ - const: video_a
|
||||
+ - const: video_core
|
||||
+ - const: video_cabac
|
||||
+ - const: niu_a
|
||||
+ - const: niu_h
|
||||
+
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
@@ -60,6 +72,8 @@ required:
|
||||
- clocks
|
||||
- clock-names
|
||||
- power-domains
|
||||
+ - resets
|
||||
+ - reset-names
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
@@ -78,6 +92,11 @@ examples:
|
||||
clock-names = "axi", "ahb", "cabac", "core";
|
||||
power-domains = <&power RK3399_PD_VDU>;
|
||||
iommus = <&vdec_mmu>;
|
||||
+ resets = <&cru SRST_H_VDU>, <&cru SRST_A_VDU>,
|
||||
+ <&cru SRST_VDU_CORE>, <&cru SRST_VDU_CA>,
|
||||
+ <&cru SRST_A_VDU_NOC>, <&cru SRST_H_VDU_NOC>;
|
||||
+ reset-names = "video_h", "video_a", "video_core", "video_cabac",
|
||||
+ "niu_a", "niu_h";
|
||||
};
|
||||
|
||||
...
|
||||
diff --git a/drivers/staging/media/rkvdec/rkvdec-regs.h b/drivers/staging/media/rkvdec/rkvdec-regs.h
|
||||
index 15b9bee92016..3acc914888f6 100644
|
||||
--- a/drivers/staging/media/rkvdec/rkvdec-regs.h
|
||||
+++ b/drivers/staging/media/rkvdec/rkvdec-regs.h
|
||||
@@ -28,6 +28,11 @@
|
||||
#define RKVDEC_SOFTRST_EN_P BIT(20)
|
||||
#define RKVDEC_FORCE_SOFTRESET_VALID BIT(21)
|
||||
#define RKVDEC_SOFTRESET_RDY BIT(22)
|
||||
+#define RKVDEC_ERR_MASK (RKVDEC_BUS_STA \
|
||||
+ | RKVDEC_ERR_STA \
|
||||
+ | RKVDEC_TIMEOUT_STA \
|
||||
+ | RKVDEC_BUF_EMPTY_STA \
|
||||
+ | RKVDEC_COLMV_REF_ERR_STA )
|
||||
|
||||
#define RKVDEC_REG_SYSCTRL 0x008
|
||||
#define RKVDEC_IN_ENDIAN BIT(0)
|
||||
diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c
|
||||
index eaf2f133a264..f55abb7c377f 100644
|
||||
--- a/drivers/staging/media/rkvdec/rkvdec.c
|
||||
+++ b/drivers/staging/media/rkvdec/rkvdec.c
|
||||
@@ -10,12 +10,15 @@
|
||||
*/
|
||||
|
||||
#include <linux/clk.h>
|
||||
+#include <linux/delay.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
+#include <linux/reset.h>
|
||||
+#include <linux/rockchip_pmu.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/videodev2.h>
|
||||
#include <linux/workqueue.h>
|
||||
@@ -717,6 +720,11 @@ static void rkvdec_job_finish(struct rkvdec_ctx *ctx,
|
||||
|
||||
pm_runtime_mark_last_busy(rkvdec->dev);
|
||||
pm_runtime_put_autosuspend(rkvdec->dev);
|
||||
+
|
||||
+ if (result == VB2_BUF_STATE_ERROR &&
|
||||
+ rkvdec->reset_mask == RESET_NONE)
|
||||
+ rkvdec->reset_mask |= RESET_SOFT;
|
||||
+
|
||||
rkvdec_job_finish_no_pm(ctx, result);
|
||||
}
|
||||
|
||||
@@ -754,6 +762,33 @@ static void rkvdec_device_run(void *priv)
|
||||
|
||||
if (WARN_ON(!desc))
|
||||
return;
|
||||
+ if (rkvdec->reset_mask != RESET_NONE) {
|
||||
+
|
||||
+ if (rkvdec->reset_mask & RESET_SOFT) {
|
||||
+ writel(RKVDEC_SOFTRST_EN_P,
|
||||
+ rkvdec->regs + RKVDEC_REG_INTERRUPT);
|
||||
+ udelay(RKVDEC_RESET_DELAY);
|
||||
+ if (readl(rkvdec->regs + RKVDEC_REG_INTERRUPT)
|
||||
+ & RKVDEC_SOFTRESET_RDY)
|
||||
+ dev_info_ratelimited(rkvdec->dev,
|
||||
+ "softreset failed\n");
|
||||
+ }
|
||||
+
|
||||
+ if (rkvdec->reset_mask & RESET_HARD) {
|
||||
+ rockchip_pmu_idle_request(rkvdec->dev, true);
|
||||
+ ret = reset_control_assert(rkvdec->rstc);
|
||||
+ if (!ret) {
|
||||
+ udelay(RKVDEC_RESET_DELAY);
|
||||
+ ret = reset_control_deassert(rkvdec->rstc);
|
||||
+ }
|
||||
+ rockchip_pmu_idle_request(rkvdec->dev, false);
|
||||
+ if (ret)
|
||||
+ dev_notice_ratelimited(rkvdec->dev,
|
||||
+ "hardreset failed\n");
|
||||
+ }
|
||||
+ rkvdec->reset_mask = RESET_NONE;
|
||||
+ pm_runtime_suspend(rkvdec->dev);
|
||||
+ }
|
||||
|
||||
ret = pm_runtime_resume_and_get(rkvdec->dev);
|
||||
if (ret < 0) {
|
||||
@@ -1020,6 +1055,11 @@ static irqreturn_t rkvdec_irq_handler(int irq, void *priv)
|
||||
if (cancel_delayed_work(&rkvdec->watchdog_work)) {
|
||||
struct rkvdec_ctx *ctx;
|
||||
|
||||
+ if (state == VB2_BUF_STATE_ERROR) {
|
||||
+ rkvdec->reset_mask |= (status & RKVDEC_ERR_MASK) ?
|
||||
+ RESET_HARD : RESET_SOFT;
|
||||
+ }
|
||||
+
|
||||
ctx = v4l2_m2m_get_curr_priv(rkvdec->m2m_dev);
|
||||
rkvdec_job_finish(ctx, state);
|
||||
}
|
||||
@@ -1037,6 +1077,7 @@ static void rkvdec_watchdog_func(struct work_struct *work)
|
||||
ctx = v4l2_m2m_get_curr_priv(rkvdec->m2m_dev);
|
||||
if (ctx) {
|
||||
dev_err(rkvdec->dev, "Frame processing timed out!\n");
|
||||
+ rkvdec->reset_mask |= RESET_HARD;
|
||||
writel(RKVDEC_IRQ_DIS, rkvdec->regs + RKVDEC_REG_INTERRUPT);
|
||||
writel(0, rkvdec->regs + RKVDEC_REG_SYSCTRL);
|
||||
rkvdec_job_finish(ctx, VB2_BUF_STATE_ERROR);
|
||||
@@ -1105,6 +1146,18 @@ static int rkvdec_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+
|
||||
+ rkvdec->rstc = devm_reset_control_array_get(&pdev->dev, false, true);
|
||||
+ if (IS_ERR(rkvdec->rstc)) {
|
||||
+ dev_err(&pdev->dev,
|
||||
+ "get resets failed %ld\n", PTR_ERR(rkvdec->rstc));
|
||||
+ return PTR_ERR(rkvdec->rstc);
|
||||
+ } else {
|
||||
+ dev_dbg(&pdev->dev,
|
||||
+ "requested %d resets\n",
|
||||
+ reset_control_get_count(&pdev->dev));
|
||||
+ }
|
||||
+
|
||||
pm_runtime_set_autosuspend_delay(&pdev->dev, 100);
|
||||
pm_runtime_use_autosuspend(&pdev->dev);
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
diff --git a/drivers/staging/media/rkvdec/rkvdec.h b/drivers/staging/media/rkvdec/rkvdec.h
|
||||
index b9e219438bc9..f02f79c405f0 100644
|
||||
--- a/drivers/staging/media/rkvdec/rkvdec.h
|
||||
+++ b/drivers/staging/media/rkvdec/rkvdec.h
|
||||
@@ -11,10 +11,11 @@
|
||||
#ifndef RKVDEC_H_
|
||||
#define RKVDEC_H_
|
||||
|
||||
+#include <linux/clk.h>
|
||||
#include <linux/platform_device.h>
|
||||
+#include <linux/reset.h>
|
||||
#include <linux/videodev2.h>
|
||||
#include <linux/wait.h>
|
||||
-#include <linux/clk.h>
|
||||
|
||||
#include <media/v4l2-ctrls.h>
|
||||
#include <media/v4l2-device.h>
|
||||
@@ -22,6 +23,12 @@
|
||||
#include <media/videobuf2-core.h>
|
||||
#include <media/videobuf2-dma-contig.h>
|
||||
|
||||
+#define RESET_NONE 0
|
||||
+#define RESET_SOFT BIT(0)
|
||||
+#define RESET_HARD BIT(1)
|
||||
+
|
||||
+#define RKVDEC_RESET_DELAY 5
|
||||
+
|
||||
struct rkvdec_ctx;
|
||||
|
||||
struct rkvdec_ctrl_desc {
|
||||
@@ -96,6 +103,8 @@ struct rkvdec_dev {
|
||||
void __iomem *regs;
|
||||
struct mutex vdev_lock; /* serializes ioctls */
|
||||
struct delayed_work watchdog_work;
|
||||
+ struct reset_control *rstc;
|
||||
+ u8 reset_mask;
|
||||
};
|
||||
|
||||
struct rkvdec_ctx {
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Bee <knaerzche@gmail.com>
|
||||
Date: Tue, 18 Aug 2020 11:38:04 +0200
|
||||
Subject: [PATCH] WIP: arm64: dts: add resets to vdec for RK3399
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
|
||||
index 980b12cb0a49..6e3149e587c5 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
|
||||
@@ -1062,7 +1062,10 @@ power-domain@RK3399_PD_VCODEC {
|
||||
power-domain@RK3399_PD_VDU {
|
||||
reg = <RK3399_PD_VDU>;
|
||||
clocks = <&cru ACLK_VDU>,
|
||||
- <&cru HCLK_VDU>;
|
||||
+ <&cru HCLK_VDU>,
|
||||
+ <&cru SCLK_VDU_CA>,
|
||||
+ <&cru SCLK_VDU_CORE>;
|
||||
+
|
||||
pm_qos = <&qos_video_m1_r>,
|
||||
<&qos_video_m1_w>;
|
||||
#power-domain-cells = <0>;
|
||||
@@ -1345,6 +1348,11 @@ vdec: video-codec@ff660000 {
|
||||
clock-names = "axi", "ahb", "cabac", "core";
|
||||
iommus = <&vdec_mmu>;
|
||||
power-domains = <&power RK3399_PD_VDU>;
|
||||
+ resets = <&cru SRST_H_VDU>, <&cru SRST_A_VDU>,
|
||||
+ <&cru SRST_VDU_CORE>, <&cru SRST_VDU_CA>,
|
||||
+ <&cru SRST_A_VDU_NOC>, <&cru SRST_H_VDU_NOC>;
|
||||
+ reset-names = "video_h", "video_a", "video_core", "video_cabac",
|
||||
+ "niu_a", "niu_h";
|
||||
};
|
||||
|
||||
vdec_mmu: iommu@ff660480 {
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Bee <knaerzche@gmail.com>
|
||||
Date: Fri, 1 Jan 2021 12:11:12 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: fix RK3399 vdec register witdh
|
||||
|
||||
Signed-off-by: Alex Bee <knaerzche@gmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
|
||||
index 6e3149e587c5..093ebe070775 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
|
||||
@@ -1341,7 +1341,7 @@ vpu_mmu: iommu@ff650800 {
|
||||
|
||||
vdec: video-codec@ff660000 {
|
||||
compatible = "rockchip,rk3399-vdec";
|
||||
- reg = <0x0 0xff660000 0x0 0x400>;
|
||||
+ reg = <0x0 0xff660000 0x0 0x480>;
|
||||
interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
clocks = <&cru ACLK_VDU>, <&cru HCLK_VDU>,
|
||||
<&cru SCLK_VDU_CA>, <&cru SCLK_VDU_CORE>;
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Bee <knaerzche@gmail.com>
|
||||
Date: Sat, 21 Aug 2021 16:12:36 +0200
|
||||
Subject: [PATCH] media: hantro: rockchip: Increase RK3288's max ACLK
|
||||
|
||||
Required to proper decode H.264@4K
|
||||
|
||||
Signed-off-by: Alex Bee <knaerzche@gmail.com>
|
||||
---
|
||||
drivers/media/platform/verisilicon/rockchip_vpu_hw.c | 14 +++++++++++---
|
||||
1 file changed, 11 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/platform/verisilicon/rockchip_vpu_hw.c b/drivers/media/platform/verisilicon/rockchip_vpu_hw.c
|
||||
index 8de6fd2e8eef..002b1a600f93 100644
|
||||
--- a/drivers/media/platform/verisilicon/rockchip_vpu_hw.c
|
||||
+++ b/drivers/media/platform/verisilicon/rockchip_vpu_hw.c
|
||||
@@ -15,7 +15,8 @@
|
||||
#include "rockchip_vpu2_regs.h"
|
||||
|
||||
#define RK3066_ACLK_MAX_FREQ (300 * 1000 * 1000)
|
||||
-#define RK3288_ACLK_MAX_FREQ (400 * 1000 * 1000)
|
||||
+#define RK3288_ACLK_MAX_FREQ (600 * 1000 * 1000)
|
||||
+#define RK3399_ACLK_MAX_FREQ (400 * 1000 * 1000)
|
||||
|
||||
/*
|
||||
* Supported formats.
|
||||
@@ -346,13 +347,20 @@ static int rk3066_vpu_hw_init(struct hantro_dev *vpu)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int rockchip_vpu_hw_init(struct hantro_dev *vpu)
|
||||
+static int rk3288_vpu_hw_init(struct hantro_dev *vpu)
|
||||
{
|
||||
/* Bump ACLK to max. possible freq. to improve performance. */
|
||||
clk_set_rate(vpu->clocks[0].clk, RK3288_ACLK_MAX_FREQ);
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int rockchip_vpu_hw_init(struct hantro_dev *vpu)
|
||||
+{
|
||||
+ /* Bump ACLK to max. possible freq. to improve performance. */
|
||||
+ clk_set_rate(vpu->clocks[0].clk, RK3399_ACLK_MAX_FREQ);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static void rk3066_vpu_dec_reset(struct hantro_ctx *ctx)
|
||||
{
|
||||
struct hantro_dev *vpu = ctx->dev;
|
||||
@@ -592,7 +600,7 @@ const struct hantro_variant rk3288_vpu_variant = {
|
||||
.codec_ops = rk3288_vpu_codec_ops,
|
||||
.irqs = rockchip_vpu1_irqs,
|
||||
.num_irqs = ARRAY_SIZE(rockchip_vpu1_irqs),
|
||||
- .init = rockchip_vpu_hw_init,
|
||||
+ .init = rk3288_vpu_hw_init,
|
||||
.clk_names = rockchip_vpu_clk_names,
|
||||
.num_clocks = ARRAY_SIZE(rockchip_vpu_clk_names)
|
||||
};
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Bee <knaerzche@gmail.com>
|
||||
Date: Sun, 4 Jul 2021 15:19:44 +0200
|
||||
Subject: [PATCH] media: rkvdec: disable QoS for VP9 (corruptions on RK3328
|
||||
otherwise)
|
||||
|
||||
Signed-off-by: Alex Bee <knaerzche@gmail.com>
|
||||
---
|
||||
drivers/staging/media/rkvdec/rkvdec-regs.h | 2 ++
|
||||
drivers/staging/media/rkvdec/rkvdec-vp9.c | 8 ++++++++
|
||||
2 files changed, 10 insertions(+)
|
||||
|
||||
diff --git a/drivers/staging/media/rkvdec/rkvdec-regs.h b/drivers/staging/media/rkvdec/rkvdec-regs.h
|
||||
index 3acc914888f6..265f5234f4eb 100644
|
||||
--- a/drivers/staging/media/rkvdec/rkvdec-regs.h
|
||||
+++ b/drivers/staging/media/rkvdec/rkvdec-regs.h
|
||||
@@ -222,6 +222,8 @@
|
||||
#define RKVDEC_REG_H264_ERR_E 0x134
|
||||
#define RKVDEC_H264_ERR_EN_HIGHBITS(x) ((x) & 0x3fffffff)
|
||||
|
||||
+#define RKVDEC_QOS_CTRL 0x18C
|
||||
+
|
||||
#define RKVDEC_REG_PREF_LUMA_CACHE_COMMAND 0x410
|
||||
#define RKVDEC_REG_PREF_CHR_CACHE_COMMAND 0x450
|
||||
|
||||
diff --git a/drivers/staging/media/rkvdec/rkvdec-vp9.c b/drivers/staging/media/rkvdec/rkvdec-vp9.c
|
||||
index d8c1c0db15c7..a289bc968e91 100644
|
||||
--- a/drivers/staging/media/rkvdec/rkvdec-vp9.c
|
||||
+++ b/drivers/staging/media/rkvdec/rkvdec-vp9.c
|
||||
@@ -802,6 +802,7 @@ static int rkvdec_vp9_run(struct rkvdec_ctx *ctx)
|
||||
struct rkvdec_dev *rkvdec = ctx->dev;
|
||||
struct rkvdec_vp9_run run = { };
|
||||
int ret;
|
||||
+ u32 reg;
|
||||
|
||||
ret = rkvdec_vp9_run_preamble(ctx, &run);
|
||||
if (ret) {
|
||||
@@ -823,6 +824,13 @@ static int rkvdec_vp9_run(struct rkvdec_ctx *ctx)
|
||||
writel(1, rkvdec->regs + RKVDEC_REG_PREF_CHR_CACHE_COMMAND);
|
||||
|
||||
writel(0xe, rkvdec->regs + RKVDEC_REG_STRMD_ERR_EN);
|
||||
+
|
||||
+ /* disable QOS for RK3328 - no effect on other SoCs */
|
||||
+ reg = readl(rkvdec->regs + RKVDEC_QOS_CTRL);
|
||||
+ reg |= 0xFFFF;
|
||||
+ reg &= (~BIT(12));
|
||||
+ writel(reg, rkvdec->regs + RKVDEC_QOS_CTRL);
|
||||
+
|
||||
/* Start decoding! */
|
||||
writel(RKVDEC_INTERRUPT_DEC_E | RKVDEC_CONFIG_DEC_CLK_GATE_E |
|
||||
RKVDEC_TIMEOUT_E | RKVDEC_BUF_EMPTY_E,
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Bee <knaerzche@gmail.com>
|
||||
Date: Thu, 16 Jun 2022 13:18:22 +0200
|
||||
Subject: [PATCH] WIP: arm64: dts: add resets to vdec for RK3328
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3328.dtsi | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
|
||||
index 5519347232f6..431c4ec198be 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
|
||||
@@ -674,6 +674,11 @@ vdec: video-codec@ff360000 {
|
||||
assigned-clocks = <&cru ACLK_RKVDEC>, <&cru SCLK_VDEC_CABAC>,
|
||||
<&cru SCLK_VDEC_CORE>;
|
||||
assigned-clock-rates = <400000000>, <400000000>, <300000000>;
|
||||
+ resets = <&cru SRST_VDEC_H>, <&cru SRST_VDEC_A>,
|
||||
+ <&cru SRST_VDEC_CORE>, <&cru SRST_VDEC_CABAC>,
|
||||
+ <&cru SRST_VDEC_NIU_A>, <&cru SRST_VDEC_NIU_H>;
|
||||
+ reset-names = "video_h", "video_a", "video_core", "video_cabac",
|
||||
+ "niu_a", "niu_h";
|
||||
iommus = <&vdec_mmu>;
|
||||
power-domains = <&power RK3328_PD_VIDEO>;
|
||||
};
|
||||
@@ -0,0 +1,688 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Bee <knaerzche@gmail.com>
|
||||
Date: Wed, 2 Sep 2020 19:52:02 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: add gpu powerdomain, gpu opp-table and
|
||||
cooling cell for RK3328
|
||||
|
||||
Note: since the regulator that supplies the GPU usually also supplies
|
||||
other SoC components, we have to make sure voltage is never lower then
|
||||
1075 mV - also disable 500 MHz for now, since it will crash if rkvdec
|
||||
is running at the same time (voltage to high)
|
||||
|
||||
Signed-off-by: Alex Bee <knaerzche@gmail.com>
|
||||
---
|
||||
.../arm64/boot/dts/rockchip/rk3328-roc-cc.dts | 4 +++
|
||||
.../arm64/boot/dts/rockchip/rk3328-rock64.dts | 4 +++
|
||||
arch/arm64/boot/dts/rockchip/rk3328.dtsi | 35 +++++++++++++++++++
|
||||
3 files changed, 43 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
|
||||
index aa22a0c22265..51c7723d6762 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
|
||||
@@ -166,6 +166,10 @@ &gmac2io {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&gpu {
|
||||
+ mali-supply = <&vdd_logic>;
|
||||
+};
|
||||
+
|
||||
&hdmi {
|
||||
status = "okay";
|
||||
};
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
|
||||
index f69a38f42d2d..c198a8a7f95a 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
|
||||
@@ -162,6 +162,10 @@ &gmac2io {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&gpu {
|
||||
+ mali-supply = <&vdd_logic>;
|
||||
+};
|
||||
+
|
||||
&hdmi {
|
||||
status = "okay";
|
||||
};
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
|
||||
index 431c4ec198be..eec03adf0902 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
|
||||
@@ -300,6 +300,11 @@ power: power-controller {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
+ power-domain@RK3328_PD_GPU {
|
||||
+ reg = <RK3328_PD_GPU>;
|
||||
+ clocks = <&cru ACLK_GPU>;
|
||||
+ #power-domain-cells = <0>;
|
||||
+ };
|
||||
power-domain@RK3328_PD_HEVC {
|
||||
reg = <RK3328_PD_HEVC>;
|
||||
#power-domain-cells = <0>;
|
||||
@@ -539,6 +544,11 @@ map0 {
|
||||
<&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
contribution = <4096>;
|
||||
};
|
||||
+ map1 {
|
||||
+ trip = <&target>;
|
||||
+ cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
+ contribution = <4096>;
|
||||
+ };
|
||||
};
|
||||
};
|
||||
|
||||
@@ -620,7 +630,32 @@ gpu: gpu@ff300000 {
|
||||
"ppmmu1";
|
||||
clocks = <&cru ACLK_GPU>, <&cru ACLK_GPU>;
|
||||
clock-names = "bus", "core";
|
||||
+ operating-points-v2 = <&gpu_opp_table>;
|
||||
+ power-domains = <&power RK3328_PD_GPU>;
|
||||
resets = <&cru SRST_GPU_A>;
|
||||
+ #cooling-cells = <2>;
|
||||
+ };
|
||||
+
|
||||
+ gpu_opp_table: gpu-opp-table {
|
||||
+ compatible = "operating-points-v2";
|
||||
+
|
||||
+ opp-200000000 {
|
||||
+ opp-hz = /bits/ 64 <200000000>;
|
||||
+ opp-microvolt = <1075000>;
|
||||
+ };
|
||||
+ opp-300000000 {
|
||||
+ opp-hz = /bits/ 64 <300000000>;
|
||||
+ opp-microvolt = <1075000>;
|
||||
+ };
|
||||
+ opp-400000000 {
|
||||
+ opp-hz = /bits/ 64 <400000000>;
|
||||
+ opp-microvolt = <1075000>;
|
||||
+ };
|
||||
+ opp-500000000 {
|
||||
+ opp-hz = /bits/ 64 <500000000>;
|
||||
+ opp-microvolt = <1150000>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
};
|
||||
|
||||
h265e_mmu: iommu@ff330200 {
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Bee <knaerzche@gmail.com>
|
||||
Date: Tue, 2 Feb 2021 17:22:21 +0200
|
||||
Subject: [PATCH] ARM: dts: RK3288 miqi add hdmi sound nodes
|
||||
|
||||
Signed-off-by: Alex Bee <knaerzche@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-miqi.dts | 20 ++++++++++++++++++++
|
||||
1 file changed, 20 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
index 713f55e143c6..8d30c49f406e 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
@@ -78,6 +78,21 @@ vcc_sys: vsys-regulator {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
};
|
||||
+
|
||||
+ sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,format = "i2s";
|
||||
+ simple-audio-card,name = "HDMI";
|
||||
+ simple-audio-card,mclk-fs = <512>;
|
||||
+
|
||||
+ simple-audio-card,codec {
|
||||
+ sound-dai = <&hdmi>;
|
||||
+ };
|
||||
+
|
||||
+ simple-audio-card,cpu {
|
||||
+ sound-dai = <&i2s>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&cpu0 {
|
||||
@@ -284,6 +299,11 @@ &i2c5 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&i2s {
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&io_domains {
|
||||
status = "okay";
|
||||
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Bee <knaerzche@gmail.com>
|
||||
Date: Fri, 2 Apr 2021 17:54:22 +0200
|
||||
Subject: [PATCH] ARM/arm64: dts: rockchip: align sound card names
|
||||
|
||||
Signed-off-by: Alex Bee <knaerzche@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dtsi | 2 +-
|
||||
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
index 09618bb7d872..db9106a3dd22 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -73,7 +73,7 @@ sdio_pwrseq: sdio-pwrseq {
|
||||
sound {
|
||||
compatible = "simple-audio-card";
|
||||
simple-audio-card,format = "i2s";
|
||||
- simple-audio-card,name = "rockchip,tinker-codec";
|
||||
+ simple-audio-card,name = "HDMI";
|
||||
simple-audio-card,mclk-fs = <512>;
|
||||
|
||||
simple-audio-card,codec {
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
|
||||
index 093ebe070775..a10fe60b7680 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
|
||||
@@ -1893,7 +1893,7 @@ hdmi_sound: hdmi-sound {
|
||||
compatible = "simple-audio-card";
|
||||
simple-audio-card,format = "i2s";
|
||||
simple-audio-card,mclk-fs = <256>;
|
||||
- simple-audio-card,name = "hdmi-sound";
|
||||
+ simple-audio-card,name = "HDMI";
|
||||
status = "disabled";
|
||||
|
||||
simple-audio-card,cpu {
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Sun, 25 Mar 2018 22:17:06 +0200
|
||||
Subject: [PATCH] ASoC: hdmi-codec: fix channel allocation
|
||||
|
||||
---
|
||||
sound/soc/codecs/hdmi-codec.c | 113 ++++++++++++++++------------------
|
||||
1 file changed, 52 insertions(+), 61 deletions(-)
|
||||
|
||||
diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c
|
||||
index 5679102de91f..f0cd183f7873 100644
|
||||
--- a/sound/soc/codecs/hdmi-codec.c
|
||||
+++ b/sound/soc/codecs/hdmi-codec.c
|
||||
@@ -194,78 +194,69 @@ static const struct snd_pcm_chmap_elem hdmi_codec_8ch_chmaps[] = {
|
||||
*/
|
||||
static const struct hdmi_codec_cea_spk_alloc hdmi_codec_channel_alloc[] = {
|
||||
{ .ca_id = 0x00, .n_ch = 2,
|
||||
- .mask = FL | FR},
|
||||
- /* 2.1 */
|
||||
- { .ca_id = 0x01, .n_ch = 4,
|
||||
- .mask = FL | FR | LFE},
|
||||
- /* Dolby Surround */
|
||||
+ .mask = FL | FR },
|
||||
+ { .ca_id = 0x03, .n_ch = 4,
|
||||
+ .mask = FL | FR | LFE | FC },
|
||||
{ .ca_id = 0x02, .n_ch = 4,
|
||||
.mask = FL | FR | FC },
|
||||
- /* surround51 */
|
||||
+ { .ca_id = 0x01, .n_ch = 4,
|
||||
+ .mask = FL | FR | LFE },
|
||||
{ .ca_id = 0x0b, .n_ch = 6,
|
||||
- .mask = FL | FR | LFE | FC | RL | RR},
|
||||
- /* surround40 */
|
||||
- { .ca_id = 0x08, .n_ch = 6,
|
||||
- .mask = FL | FR | RL | RR },
|
||||
- /* surround41 */
|
||||
- { .ca_id = 0x09, .n_ch = 6,
|
||||
- .mask = FL | FR | LFE | RL | RR },
|
||||
- /* surround50 */
|
||||
+ .mask = FL | FR | LFE | FC | RL | RR },
|
||||
{ .ca_id = 0x0a, .n_ch = 6,
|
||||
.mask = FL | FR | FC | RL | RR },
|
||||
- /* 6.1 */
|
||||
- { .ca_id = 0x0f, .n_ch = 8,
|
||||
- .mask = FL | FR | LFE | FC | RL | RR | RC },
|
||||
- /* surround71 */
|
||||
+ { .ca_id = 0x09, .n_ch = 6,
|
||||
+ .mask = FL | FR | LFE | RL | RR },
|
||||
+ { .ca_id = 0x08, .n_ch = 6,
|
||||
+ .mask = FL | FR | RL | RR },
|
||||
+ { .ca_id = 0x07, .n_ch = 6,
|
||||
+ .mask = FL | FR | LFE | FC | RC },
|
||||
+ { .ca_id = 0x06, .n_ch = 6,
|
||||
+ .mask = FL | FR | FC | RC },
|
||||
+ { .ca_id = 0x05, .n_ch = 6,
|
||||
+ .mask = FL | FR | LFE | RC },
|
||||
+ { .ca_id = 0x04, .n_ch = 6,
|
||||
+ .mask = FL | FR | RC },
|
||||
{ .ca_id = 0x13, .n_ch = 8,
|
||||
.mask = FL | FR | LFE | FC | RL | RR | RLC | RRC },
|
||||
- /* others */
|
||||
- { .ca_id = 0x03, .n_ch = 8,
|
||||
- .mask = FL | FR | LFE | FC },
|
||||
- { .ca_id = 0x04, .n_ch = 8,
|
||||
- .mask = FL | FR | RC},
|
||||
- { .ca_id = 0x05, .n_ch = 8,
|
||||
- .mask = FL | FR | LFE | RC },
|
||||
- { .ca_id = 0x06, .n_ch = 8,
|
||||
- .mask = FL | FR | FC | RC },
|
||||
- { .ca_id = 0x07, .n_ch = 8,
|
||||
- .mask = FL | FR | LFE | FC | RC },
|
||||
- { .ca_id = 0x0c, .n_ch = 8,
|
||||
- .mask = FL | FR | RC | RL | RR },
|
||||
- { .ca_id = 0x0d, .n_ch = 8,
|
||||
- .mask = FL | FR | LFE | RL | RR | RC },
|
||||
- { .ca_id = 0x0e, .n_ch = 8,
|
||||
- .mask = FL | FR | FC | RL | RR | RC },
|
||||
- { .ca_id = 0x10, .n_ch = 8,
|
||||
- .mask = FL | FR | RL | RR | RLC | RRC },
|
||||
- { .ca_id = 0x11, .n_ch = 8,
|
||||
- .mask = FL | FR | LFE | RL | RR | RLC | RRC },
|
||||
+ { .ca_id = 0x1f, .n_ch = 8,
|
||||
+ .mask = FL | FR | LFE | FC | RL | RR | FLC | FRC },
|
||||
{ .ca_id = 0x12, .n_ch = 8,
|
||||
.mask = FL | FR | FC | RL | RR | RLC | RRC },
|
||||
- { .ca_id = 0x14, .n_ch = 8,
|
||||
- .mask = FL | FR | FLC | FRC },
|
||||
- { .ca_id = 0x15, .n_ch = 8,
|
||||
- .mask = FL | FR | LFE | FLC | FRC },
|
||||
- { .ca_id = 0x16, .n_ch = 8,
|
||||
- .mask = FL | FR | FC | FLC | FRC },
|
||||
- { .ca_id = 0x17, .n_ch = 8,
|
||||
- .mask = FL | FR | LFE | FC | FLC | FRC },
|
||||
- { .ca_id = 0x18, .n_ch = 8,
|
||||
- .mask = FL | FR | RC | FLC | FRC },
|
||||
- { .ca_id = 0x19, .n_ch = 8,
|
||||
- .mask = FL | FR | LFE | RC | FLC | FRC },
|
||||
- { .ca_id = 0x1a, .n_ch = 8,
|
||||
- .mask = FL | FR | RC | FC | FLC | FRC },
|
||||
- { .ca_id = 0x1b, .n_ch = 8,
|
||||
- .mask = FL | FR | LFE | RC | FC | FLC | FRC },
|
||||
- { .ca_id = 0x1c, .n_ch = 8,
|
||||
- .mask = FL | FR | RL | RR | FLC | FRC },
|
||||
- { .ca_id = 0x1d, .n_ch = 8,
|
||||
- .mask = FL | FR | LFE | RL | RR | FLC | FRC },
|
||||
{ .ca_id = 0x1e, .n_ch = 8,
|
||||
.mask = FL | FR | FC | RL | RR | FLC | FRC },
|
||||
- { .ca_id = 0x1f, .n_ch = 8,
|
||||
- .mask = FL | FR | LFE | FC | RL | RR | FLC | FRC },
|
||||
+ { .ca_id = 0x11, .n_ch = 8,
|
||||
+ .mask = FL | FR | LFE | RL | RR | RLC | RRC },
|
||||
+ { .ca_id = 0x1d, .n_ch = 8,
|
||||
+ .mask = FL | FR | LFE | RL | RR | FLC | FRC },
|
||||
+ { .ca_id = 0x10, .n_ch = 8,
|
||||
+ .mask = FL | FR | RL | RR | RLC | RRC },
|
||||
+ { .ca_id = 0x1c, .n_ch = 8,
|
||||
+ .mask = FL | FR | RL | RR | FLC | FRC },
|
||||
+ { .ca_id = 0x0f, .n_ch = 8,
|
||||
+ .mask = FL | FR | LFE | FC | RL | RR | RC },
|
||||
+ { .ca_id = 0x1b, .n_ch = 8,
|
||||
+ .mask = FL | FR | LFE | RC | FC | FLC | FRC },
|
||||
+ { .ca_id = 0x0e, .n_ch = 8,
|
||||
+ .mask = FL | FR | FC | RL | RR | RC },
|
||||
+ { .ca_id = 0x1a, .n_ch = 8,
|
||||
+ .mask = FL | FR | RC | FC | FLC | FRC },
|
||||
+ { .ca_id = 0x0d, .n_ch = 8,
|
||||
+ .mask = FL | FR | LFE | RL | RR | RC },
|
||||
+ { .ca_id = 0x19, .n_ch = 8,
|
||||
+ .mask = FL | FR | LFE | RC | FLC | FRC },
|
||||
+ { .ca_id = 0x0c, .n_ch = 8,
|
||||
+ .mask = FL | FR | RC | RL | RR },
|
||||
+ { .ca_id = 0x18, .n_ch = 8,
|
||||
+ .mask = FL | FR | RC | FLC | FRC },
|
||||
+ { .ca_id = 0x17, .n_ch = 8,
|
||||
+ .mask = FL | FR | LFE | FC | FLC | FRC },
|
||||
+ { .ca_id = 0x16, .n_ch = 8,
|
||||
+ .mask = FL | FR | FC | FLC | FRC },
|
||||
+ { .ca_id = 0x15, .n_ch = 8,
|
||||
+ .mask = FL | FR | LFE | FLC | FRC },
|
||||
+ { .ca_id = 0x14, .n_ch = 8,
|
||||
+ .mask = FL | FR | FLC | FRC },
|
||||
};
|
||||
|
||||
struct hdmi_codec_priv {
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Bee <knaerzche@gmail.com>
|
||||
Date: Sat, 27 Feb 2021 17:52:02 +0100
|
||||
Subject: [PATCH] arm64: dts: rockchip: add SPDIF nodes for RK3328 A1 board
|
||||
|
||||
Signed-off-by: Alex Bee <knaerzche@gmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3328-a1.dts | 23 ++++++++++++++++++++++
|
||||
1 file changed, 23 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3328-a1.dts b/arch/arm64/boot/dts/rockchip/rk3328-a1.dts
|
||||
index 40bf808642b9..27a1799027c2 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-a1.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-a1.dts
|
||||
@@ -57,6 +57,24 @@ ir-receiver {
|
||||
gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>;
|
||||
linux,rc-map-name = "rc-beelink-gs1";
|
||||
};
|
||||
+
|
||||
+ spdif_sound: spdif-sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,name = "SPDIF";
|
||||
+
|
||||
+ simple-audio-card,cpu {
|
||||
+ sound-dai = <&spdif>;
|
||||
+ };
|
||||
+
|
||||
+ simple-audio-card,codec {
|
||||
+ sound-dai = <&spdif_dit>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ spdif_dit: spdif-dit {
|
||||
+ compatible = "linux,spdif-dit";
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ };
|
||||
};
|
||||
|
||||
&analog_sound {
|
||||
@@ -325,6 +343,11 @@ &sdmmc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&spdif {
|
||||
+ pinctrl-0 = <&spdifm0_tx>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&tsadc {
|
||||
rockchip,hw-tshut-mode = <0>;
|
||||
rockchip,hw-tshut-polarity = <0>;
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Bee <knaerzche@gmail.com>
|
||||
Date: Sat, 27 Feb 2021 18:01:13 +0100
|
||||
Subject: [PATCH] arm64: dts: rockchip: Add ir-receiver node for RK3328 ROC CC
|
||||
|
||||
Signed-off-by: Alex Bee <knaerzche@gmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
|
||||
index 51c7723d6762..cf321302daec 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
|
||||
@@ -88,6 +88,13 @@ vcc_phy: vcc-phy-regulator {
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
+ ir-receiver {
|
||||
+ compatible = "gpio-ir-receiver";
|
||||
+ gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>;
|
||||
+ pinctrl-0 = <&ir_int>;
|
||||
+ pinctrl-names = "default";
|
||||
+ };
|
||||
+
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
@@ -312,6 +319,13 @@ &io_domains {
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
+
|
||||
+ ir {
|
||||
+ ir_int: ir-int {
|
||||
+ rockchip,pins = <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
pmic {
|
||||
pmic_int_l: pmic-int-l {
|
||||
rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Bee <knaerzche@gmail.com>
|
||||
Date: Mon, 1 Mar 2021 21:24:15 +0100
|
||||
Subject: [PATCH] ARM: dts: add cec pinctrl for RK3288 miqi board
|
||||
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-miqi.dts | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
index 8d30c49f406e..6d90db5a3b75 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
@@ -145,6 +145,8 @@ &gpu {
|
||||
|
||||
&hdmi {
|
||||
ddc-i2c-bus = <&i2c5>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&hdmi_cec_c0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Bee <knaerzche@gmail.com>
|
||||
Date: Mon, 1 Mar 2021 19:22:15 +0100
|
||||
Subject: [PATCH] HACK: arm64: dts: enable FE phy for Beelink A1 also
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3328-a1.dts | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3328-a1.dts b/arch/arm64/boot/dts/rockchip/rk3328-a1.dts
|
||||
index 27a1799027c2..7de9dfa71d89 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-a1.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-a1.dts
|
||||
@@ -147,6 +147,14 @@ rtl8211f: ethernet-phy@0 {
|
||||
};
|
||||
};
|
||||
|
||||
+&gmac2phy {
|
||||
+ clock_in_out = "output";
|
||||
+ assigned-clock-rate = <50000000>;
|
||||
+ assigned-clocks = <&cru SCLK_MAC2PHY>;
|
||||
+ assigned-clock-parents = <&cru SCLK_MAC2PHY_SRC>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&gpu {
|
||||
mali-supply = <&vdd_logic>;
|
||||
};
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Tue, 26 Feb 2019 20:45:14 +0000
|
||||
Subject: [PATCH] WIP: dw-hdmi-cec: sleep 100ms on error
|
||||
|
||||
---
|
||||
drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c | 18 ++++++++++++++++--
|
||||
1 file changed, 16 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c
|
||||
index c8f44bcb298a..d4280ce4542c 100644
|
||||
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c
|
||||
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c
|
||||
@@ -4,6 +4,7 @@
|
||||
*
|
||||
* Copyright (C) 2015-2017 Russell King.
|
||||
*/
|
||||
+#include <linux/delay.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/module.h>
|
||||
@@ -129,8 +130,15 @@ static irqreturn_t dw_hdmi_cec_hardirq(int irq, void *data)
|
||||
|
||||
dw_hdmi_write(cec, stat, HDMI_IH_CEC_STAT0);
|
||||
|
||||
- if (stat & CEC_STAT_ERROR_INIT) {
|
||||
- cec->tx_status = CEC_TX_STATUS_ERROR;
|
||||
+ /* Status with both done and error_initiator bits have been seen
|
||||
+ * on Rockchip RK3328 devices, transmit attempt seems to have failed
|
||||
+ * when this happens, report as low drive and block cec-framework
|
||||
+ * 100ms before core retransmits the failed message, this seems to
|
||||
+ * mitigate the issue with failed transmit attempts.
|
||||
+ */
|
||||
+ if ((stat & (CEC_STAT_DONE|CEC_STAT_ERROR_INIT)) == (CEC_STAT_DONE|CEC_STAT_ERROR_INIT)) {
|
||||
+ pr_debug("dw_hdmi_cec_hardirq: stat=%02x LOW_DRIVE\n", stat);
|
||||
+ cec->tx_status = CEC_TX_STATUS_LOW_DRIVE;
|
||||
cec->tx_done = true;
|
||||
ret = IRQ_WAKE_THREAD;
|
||||
} else if (stat & CEC_STAT_DONE) {
|
||||
@@ -141,6 +149,10 @@ static irqreturn_t dw_hdmi_cec_hardirq(int irq, void *data)
|
||||
cec->tx_status = CEC_TX_STATUS_NACK;
|
||||
cec->tx_done = true;
|
||||
ret = IRQ_WAKE_THREAD;
|
||||
+ } else if (stat & CEC_STAT_ERROR_INIT) {
|
||||
+ cec->tx_status = CEC_TX_STATUS_ERROR;
|
||||
+ cec->tx_done = true;
|
||||
+ ret = IRQ_WAKE_THREAD;
|
||||
}
|
||||
|
||||
if (stat & CEC_STAT_EOM) {
|
||||
@@ -173,6 +185,8 @@ static irqreturn_t dw_hdmi_cec_thread(int irq, void *data)
|
||||
|
||||
if (cec->tx_done) {
|
||||
cec->tx_done = false;
|
||||
+ if (cec->tx_status == CEC_TX_STATUS_LOW_DRIVE)
|
||||
+ msleep(100);
|
||||
cec_transmit_attempt_done(adap, cec->tx_status);
|
||||
}
|
||||
if (cec->rx_done) {
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Bee <knaerzche@gmail.com>
|
||||
Date: Wed, 5 May 2021 19:11:12 +0200
|
||||
Subject: [PATCH] arm64: boot: dts: Increase ACLK_PERILP0 clock rate for RK3399
|
||||
|
||||
As per vendor kernel. Leaving this clock at the lower rate will
|
||||
result in poor DMA controller performance
|
||||
|
||||
Signed-off-by: Alex Bee <knaerzche@gmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
|
||||
index a10fe60b7680..dbe6a9cb98a5 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
|
||||
@@ -1477,7 +1477,7 @@ cru: clock-controller@ff760000 {
|
||||
<1000000000>,
|
||||
<150000000>, <75000000>,
|
||||
<37500000>,
|
||||
- <100000000>, <100000000>,
|
||||
+ <300000000>, <100000000>,
|
||||
<50000000>, <600000000>,
|
||||
<100000000>, <50000000>,
|
||||
<400000000>, <400000000>,
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Bee <knaerzche@gmail.com>
|
||||
Date: Sat, 21 Aug 2021 17:04:46 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: Enable USB3 for rk3328 Beelink A1
|
||||
|
||||
Signed-off-by: Alex Bee <knaerzche@gmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3328-a1.dts | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3328-a1.dts b/arch/arm64/boot/dts/rockchip/rk3328-a1.dts
|
||||
index 7de9dfa71d89..e857e5a727f4 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-a1.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-a1.dts
|
||||
@@ -389,6 +389,11 @@ &usb_host0_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&usbdrd3 {
|
||||
+ dr_mode = "host";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&vop {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Bee <knaerzche@gmail.com>
|
||||
Date: Sat, 30 Oct 2021 12:19:19 +0200
|
||||
Subject: [PATCH] WIP: drm: bridge: dw-hdmi: switch from .hw_parmas to .prepare
|
||||
for i2s
|
||||
|
||||
Seems to be the only way to get AES bits correctly as set by
|
||||
userspace.
|
||||
TODO: check other consequences.
|
||||
|
||||
Signed-off-by: Alex Bee <knaerzche@gmail.com>
|
||||
---
|
||||
drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c
|
||||
index a2f0860b20bb..8961f9c7885d 100644
|
||||
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c
|
||||
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c
|
||||
@@ -34,9 +34,9 @@ static inline u8 hdmi_read(struct dw_hdmi_i2s_audio_data *audio, int offset)
|
||||
return audio->read(hdmi, offset);
|
||||
}
|
||||
|
||||
-static int dw_hdmi_i2s_hw_params(struct device *dev, void *data,
|
||||
- struct hdmi_codec_daifmt *fmt,
|
||||
- struct hdmi_codec_params *hparms)
|
||||
+static int dw_hdmi_i2s_prepare(struct device *dev, void *data,
|
||||
+ struct hdmi_codec_daifmt *fmt,
|
||||
+ struct hdmi_codec_params *hparms)
|
||||
{
|
||||
struct dw_hdmi_i2s_audio_data *audio = data;
|
||||
struct dw_hdmi *hdmi = audio->hdmi;
|
||||
@@ -178,7 +178,7 @@ static int dw_hdmi_i2s_hook_plugged_cb(struct device *dev, void *data,
|
||||
}
|
||||
|
||||
static const struct hdmi_codec_ops dw_hdmi_i2s_ops = {
|
||||
- .hw_params = dw_hdmi_i2s_hw_params,
|
||||
+ .prepare = dw_hdmi_i2s_prepare,
|
||||
.audio_startup = dw_hdmi_i2s_audio_startup,
|
||||
.audio_shutdown = dw_hdmi_i2s_audio_shutdown,
|
||||
.get_eld = dw_hdmi_i2s_get_eld,
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Bee <knaerzche@gmail.com>
|
||||
Date: Sun, 18 Sep 2022 10:35:52 +0200
|
||||
Subject: [PATCH] arm64: dts: rockchip: Disbake fusb for rk3399-roc-pc
|
||||
|
||||
As it will lead to an unbootable device in case one if those ports
|
||||
is used to power up the device.
|
||||
See https://lkml.org/lkml/2022/6/20/413
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
|
||||
index 2f4b1b2e3ac7..7217ead94d39 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
|
||||
@@ -215,7 +215,7 @@ vdd_log: vdd-log {
|
||||
regulator-name = "vdd_log";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
- regulator-min-microvolt = <450000>;
|
||||
+ regulator-min-microvolt = <430000>;
|
||||
regulator-max-microvolt = <1400000>;
|
||||
pwm-supply = <&vcc3v3_sys>;
|
||||
};
|
||||
@@ -536,7 +536,7 @@ fusb1: usb-typec@22 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&fusb1_int>;
|
||||
vbus-supply = <&vcc_vbus_typec1>;
|
||||
- status = "okay";
|
||||
+ status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -553,7 +553,7 @@ fusb0: usb-typec@22 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&fusb0_int>;
|
||||
vbus-supply = <&vcc_vbus_typec0>;
|
||||
- status = "okay";
|
||||
+ status = "disabled";
|
||||
};
|
||||
|
||||
mp8859: regulator@66 {
|
||||
@@ -0,0 +1,63 @@
|
||||
diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
||||
index 0370bb247fcb..55c0b8dddad5 100644
|
||||
--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c 2023-06-25 03:23:55.724209412 +0000
|
||||
+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c 2023-06-25 04:16:27.469899470 +0000
|
||||
@@ -254,35 +245,31 @@
|
||||
const struct drm_display_info *info,
|
||||
const struct drm_display_mode *mode)
|
||||
{
|
||||
- struct rockchip_hdmi *hdmi = data;
|
||||
- const struct dw_hdmi_mpll_config *mpll_cfg = rockchip_mpll_cfg;
|
||||
- int pclk = mode->clock * 1000;
|
||||
- bool exact_match = hdmi->plat_data->phy_force_vendor;
|
||||
- int i;
|
||||
-
|
||||
- if (hdmi->ref_clk) {
|
||||
- int rpclk = clk_round_rate(hdmi->ref_clk, pclk);
|
||||
-
|
||||
- if (abs(rpclk - pclk) > pclk / 1000)
|
||||
- return MODE_NOCLOCK;
|
||||
- }
|
||||
-
|
||||
- for (i = 0; mpll_cfg[i].mpixelclock != (~0UL); i++) {
|
||||
- /*
|
||||
- * For vendor specific phys force an exact match of the pixelclock
|
||||
- * to preserve the original behaviour of the driver.
|
||||
- */
|
||||
- if (exact_match && pclk == mpll_cfg[i].mpixelclock)
|
||||
- return MODE_OK;
|
||||
- /*
|
||||
- * The Synopsys phy can work with pixelclocks up to the value given
|
||||
- * in the corresponding mpll_cfg entry.
|
||||
- */
|
||||
- if (!exact_match && pclk <= mpll_cfg[i].mpixelclock)
|
||||
- return MODE_OK;
|
||||
+ struct dw_hdmi_plat_data *pdata = (struct dw_hdmi_plat_data *)data;
|
||||
+ const struct dw_hdmi_mpll_config *mpll_cfg = pdata->mpll_cfg;
|
||||
+ int clock = mode->clock;
|
||||
+ unsigned int i = 0;
|
||||
+
|
||||
+ if (pdata->ycbcr_420_allowed && drm_mode_is_420(info, mode) &&
|
||||
+ (info->color_formats & DRM_COLOR_FORMAT_YCBCR420)) {
|
||||
+ clock /= 2;
|
||||
+ mpll_cfg = pdata->mpll_cfg_420;
|
||||
+ }
|
||||
+
|
||||
+ if ((!mpll_cfg && clock > 340000) ||
|
||||
+ (info->max_tmds_clock && clock > info->max_tmds_clock))
|
||||
+ return MODE_CLOCK_HIGH;
|
||||
+
|
||||
+ if (mpll_cfg) {
|
||||
+ while ((clock * 1000) < mpll_cfg[i].mpixelclock &&
|
||||
+ mpll_cfg[i].mpixelclock != (~0UL))
|
||||
+ i++;
|
||||
+
|
||||
+ if (mpll_cfg[i].mpixelclock == (~0UL))
|
||||
+ return MODE_CLOCK_HIGH;
|
||||
}
|
||||
|
||||
- return MODE_BAD;
|
||||
+ return MODE_OK;
|
||||
}
|
||||
|
||||
static void dw_hdmi_rockchip_encoder_disable(struct drm_encoder *encoder)
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,71 @@
|
||||
From 7f2d6a02498ce3fa7771893072e81b31f9bd64b2 Mon Sep 17 00:00:00 2001
|
||||
From: Paolo Sabatino <paolo.sabatino@gmail.com>
|
||||
Date: Fri, 24 Mar 2023 17:15:16 +0000
|
||||
Subject: [PATCH] register act8846 restart handler for SIPC function
|
||||
|
||||
---
|
||||
drivers/regulator/act8865-regulator.c | 27 +++++++++++++++++++++++++++
|
||||
1 file changed, 27 insertions(+)
|
||||
|
||||
diff --git a/drivers/regulator/act8865-regulator.c b/drivers/regulator/act8865-regulator.c
|
||||
index 53f2c75cd..e45ad8430 100644
|
||||
--- a/drivers/regulator/act8865-regulator.c
|
||||
+++ b/drivers/regulator/act8865-regulator.c
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <linux/regulator/of_regulator.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <dt-bindings/regulator/active-semi,8865-regulator.h>
|
||||
+#include <linux/reboot.h>
|
||||
|
||||
/*
|
||||
* ACT8600 Global Register Map.
|
||||
@@ -141,6 +142,8 @@
|
||||
#define ACT8865_VOLTAGE_NUM 64
|
||||
#define ACT8600_SUDCDC_VOLTAGE_NUM 256
|
||||
|
||||
+#define ACT8846_SIPC_MASK 0x01
|
||||
+
|
||||
struct act8865 {
|
||||
struct regmap *regmap;
|
||||
int off_reg;
|
||||
@@ -582,6 +585,22 @@ static void act8865_power_off(void)
|
||||
while (1);
|
||||
}
|
||||
|
||||
+static int act8846_power_cycle(struct notifier_block *this,
|
||||
+ unsigned long code, void *unused)
|
||||
+{
|
||||
+ struct act8865 *act8846;
|
||||
+
|
||||
+ act8846 = i2c_get_clientdata(act8865_i2c_client);
|
||||
+ regmap_write(act8846->regmap, ACT8846_GLB_OFF_CTRL, ACT8846_SIPC_MASK);
|
||||
+
|
||||
+ return NOTIFY_DONE;
|
||||
+}
|
||||
+
|
||||
+static struct notifier_block act8846_restart_handler = {
|
||||
+ .notifier_call = act8846_power_cycle,
|
||||
+ .priority = 129,
|
||||
+};
|
||||
+
|
||||
static int act8600_charger_get_status(struct regmap *map)
|
||||
{
|
||||
unsigned int val;
|
||||
@@ -733,6 +752,14 @@ static int act8865_pmic_probe(struct i2c_client *client)
|
||||
} else {
|
||||
dev_err(dev, "Failed to set poweroff capability, already defined\n");
|
||||
}
|
||||
+
|
||||
+ if (type == ACT8846) {
|
||||
+ act8865_i2c_client = client;
|
||||
+ ret = register_restart_handler(&act8846_restart_handler);
|
||||
+ if (ret)
|
||||
+ pr_err("%s: cannot register restart handler, %d\n",
|
||||
+ __func__, ret);
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Finally register devices */
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
From 604ea7fc311af2b3a41e7fe3b4fbde0ee03dfb9c Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 21:09:50 +0200
|
||||
Subject: [PATCH 04/28] dts: rk3288: miqi: Enabling the Mali GPU node
|
||||
|
||||
Why is the MiQi the only one left without a working mali GPU node ?
|
||||
|
||||
Seriously, is there a rk3288 chipset WITHOUT a mali GPU ? Couldn't
|
||||
they enable it once in the DTSI, instead of defining it as "disabled"
|
||||
and enabling it in every DTS file ?
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-miqi.dts | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
index 4d923aa6..3cd60674 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
@@ -149,6 +149,11 @@
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
+&gpu {
|
||||
+ mali-supply = <&vdd_gpu>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&hdmi {
|
||||
ddc-i2c-bus = <&i2c5>;
|
||||
status = "okay";
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
From 89e5763110ca77d68a4be00cd97a638adc2401d5 Mon Sep 17 00:00:00 2001
|
||||
From: Willy Tarreau <w@1wt.eu>
|
||||
Date: Tue, 2 Aug 2016 08:31:00 +0200
|
||||
Subject: [PATCH 05/28] ARM: dts: rockchip: fix the regulator's voltage range
|
||||
on MiQi board
|
||||
|
||||
The board declared too narrow a voltage range for the CPU and GPU
|
||||
regulators, preventing it from using the full CPU frequency range.
|
||||
The regulators support 712500 to 1500000 microvolts.
|
||||
|
||||
Signed-off-by: Willy Tarreau <w@1wt.eu>
|
||||
(cherry picked from commit 95330e63a9295a2632cee8cce5db80677f01857a)
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-miqi.dts | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
index 3cd60674..a1c3cdaa 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
@@ -168,8 +168,8 @@
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
reg = <0x40>;
|
||||
regulator-name = "vdd_cpu";
|
||||
- regulator-min-microvolt = <850000>;
|
||||
- regulator-max-microvolt = <1350000>;
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-enable-ramp-delay = <300>;
|
||||
@@ -182,8 +182,8 @@
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
reg = <0x41>;
|
||||
regulator-name = "vdd_gpu";
|
||||
- regulator-min-microvolt = <850000>;
|
||||
- regulator-max-microvolt = <1350000>;
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
regulator-always-on;
|
||||
vin-supply = <&vcc_sys>;
|
||||
};
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
From c27e445527e949f3ef46d5326066196969c17d23 Mon Sep 17 00:00:00 2001
|
||||
From: Myy <myy@miouyouyou.fr>
|
||||
Date: Sun, 12 Mar 2017 19:43:15 +0000
|
||||
Subject: [PATCH 06/28] ARM: dts: rockchip: add the MiQi board's fan definition
|
||||
|
||||
The MiQi board is sold with an enclosure in which a fan is connected
|
||||
to the second LED output, and configured by default in "heartbeat"
|
||||
mode so that it rotates slowly and increases when the CPU load
|
||||
increases, ensuring appropriate cooling by default. This LED output
|
||||
is called "Fan" in the original kernel and connected to GPIO18
|
||||
(gpiochip 0, pin 18). Here we called it "miqi:green:fan" to stay
|
||||
consistent with the kernel's naming conventions.
|
||||
|
||||
It's worth noting that without this patch the fan doesn't work at
|
||||
all, risking to make the board overheat.
|
||||
|
||||
Fixes: 162718c (v4.7)
|
||||
Cc: Heiko Stuebner <heiko@sntech.de>
|
||||
Signed-off-by: Willy Tarreau <w@1wt.eu>
|
||||
|
||||
Signed-off-by: Myy <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-miqi.dts | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
index a1c3cdaa..0e383595 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
@@ -67,6 +67,13 @@
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
+ fan {
|
||||
+ gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "miqi:green:fan";
|
||||
+ linux,default-trigger = "heartbeat";
|
||||
+ };
|
||||
+
|
||||
+
|
||||
work_led: led-0 {
|
||||
gpios = <&gpio7 RK_PA2 GPIO_ACTIVE_HIGH>;
|
||||
label = "miqi:green:user";
|
||||
--
|
||||
2.11.0
|
||||
@@ -0,0 +1,31 @@
|
||||
From 062488e4b8fd552c01e1104b3bc91a6f7ffe6c41 Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Thu, 19 Oct 2017 21:24:47 +0200
|
||||
Subject: [PATCH 10/28] RK3288: DTSI: rk3288.dtsi: Add missing SPI2 pinctrl
|
||||
|
||||
The spi2_cs1 pin reference is missing in the spi2 first pin control
|
||||
definition.
|
||||
|
||||
This patch is taken from the patches provided by the ARMbian team.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288.dtsi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index 5b789528..9ed532cc 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -334,7 +334,7 @@
|
||||
dma-names = "tx", "rx";
|
||||
interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
- pinctrl-0 = <&spi2_clk &spi2_tx &spi2_rx &spi2_cs0>;
|
||||
+ pinctrl-0 = <&spi2_clk &spi2_tx &spi2_rx &spi2_cs0 &spi2_cs1>;
|
||||
reg = <0x0 0xff130000 0x0 0x1000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
From d5d5c53173c484a13cda62a537cbf75a5df4b0e4 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 21:58:56 +0100
|
||||
Subject: [PATCH] ARM: DTS: rk3288-tinker: Enabling SDIO and Wifi
|
||||
|
||||
Adding the appropriate nodes in order to exploit the WiFi capabilities
|
||||
of the board.
|
||||
Since these capabilities are provided through SDIO, and the SDIO
|
||||
nodes were not defined, these were added too.
|
||||
|
||||
These seems to depend on each other so they are added in one big
|
||||
patch.
|
||||
|
||||
Split if necessary.
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dts | 62 +++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 62 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index 1e43527aa..d4df13bed 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -6,8 +6,70 @@
|
||||
/dts-v1/;
|
||||
|
||||
#include "rk3288-tinker.dtsi"
|
||||
+#include <dt-bindings/clock/rockchip,rk808.h>
|
||||
|
||||
/ {
|
||||
model = "Rockchip RK3288 Asus Tinker Board";
|
||||
compatible = "asus,rk3288-tinker", "rockchip,rk3288";
|
||||
+
|
||||
+ /* This is essential to get SDIO devices working.
|
||||
+ The Wifi depends on SDIO ! */
|
||||
+ sdio_pwrseq: sdio-pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ clocks = <&rk808 RK808_CLKOUT1>;
|
||||
+ clock-names = "ext_clock";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&chip_enable_h>, <&wifi_enable_h>;
|
||||
+
|
||||
+ /*
|
||||
+ * On the module itself this is one of these (depending
|
||||
+ * on the actual card populated):
|
||||
+ * - SDIO_RESET_L_WL_REG_ON
|
||||
+ * - PDN (power down when low)
|
||||
+ */
|
||||
+ reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>, <&gpio4 27 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ wireless-wlan {
|
||||
+ compatible = "wlan-platdata";
|
||||
+ rockchip,grf = <&grf>;
|
||||
+ sdio_vref = <1800>;
|
||||
+ status = "okay";
|
||||
+ wifi_chip_type = "8723bs";
|
||||
+ WIFI,host_wake_irq = <&gpio4 30 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&io_domains {
|
||||
+ wifi-supply = <&vcc_18>;
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ sdio-pwrseq {
|
||||
+ wifi_enable_h: wifienable-h {
|
||||
+ rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ chip_enable_h: chip-enable-h {
|
||||
+ rockchip,pins = <4 27 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&sdio0 {
|
||||
+ bus-width = <4>;
|
||||
+ cap-sd-highspeed;
|
||||
+ cap-sdio-irq;
|
||||
+ clock-frequency = <50000000>;
|
||||
+ clock-freq-min-max = <200000 50000000>;
|
||||
+ disable-wp;
|
||||
+ keep-power-in-suspend;
|
||||
+ mmc-pwrseq = <&sdio_pwrseq>;
|
||||
+ non-removable;
|
||||
+ num-slots = <1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
|
||||
+ sd-uhs-sdr104;
|
||||
+ status = "okay";
|
||||
+ supports-sdio;
|
||||
};
|
||||
--
|
||||
2.16.4
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
From 2c2e60256f2cbb2fce50a6317f85b1500efd1a6c Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 22:03:26 +0100
|
||||
Subject: [PATCH] ARM: DTS: rk3288-tinker: Setup the Bluetooth UART pins
|
||||
|
||||
The most essential being the RTS pin, which is clearly needed to
|
||||
upload the initial configuration into the Realtek Bluetooth
|
||||
chip, and make the Bluetooth chip work.
|
||||
|
||||
Now, the Bluetooth chip also needs 3 other GPIOS to be enabled.
|
||||
I'll see how I do that through the DTS file in a near future.
|
||||
|
||||
The 3 GPIOS being :
|
||||
Bluetooth Reset : <&gpio4 29 GPIO_ACTIVE_HIGH>
|
||||
Bluetooth Wake : <&gpio4 26 GPIO_ACTIVE_HIGH>
|
||||
Bluetooth Wake_Host_IRQ : <&gpio4 31 GPIO_ACTIVE_HIGH>
|
||||
|
||||
These are currently setup manually, through scripts. But it seems that
|
||||
GPIO handling through /sys entries might not be possible in the long
|
||||
term, the replacement being libgpio.
|
||||
Anyway, if you're interesting in enabling the Bluetooth GPIO by hand,
|
||||
here are the commands :
|
||||
|
||||
cd /sys/class/gpio &&
|
||||
echo 146 > export &&
|
||||
echo 149 > export &&
|
||||
echo 151 > export &&
|
||||
echo high > gpio146/direction &&
|
||||
echo high > gpio149/direction &&
|
||||
echo high > gpio151/direction
|
||||
|
||||
Resetting the chip is done like this :
|
||||
|
||||
echo "Resetting the Bluetooth chip"
|
||||
cd /sys/class/gpio/gpio149 &&
|
||||
echo 0 > value &&
|
||||
sleep 1 &&
|
||||
echo 1 > value &&
|
||||
sleep 1
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dts | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index d4df13bed..b92e59c1e 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -73,3 +73,9 @@
|
||||
status = "okay";
|
||||
supports-sdio;
|
||||
};
|
||||
+
|
||||
+&uart0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
|
||||
+};
|
||||
+
|
||||
--
|
||||
2.16.4
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From ebc29962ac27264772a4227f5abd6900cb72fa79 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 20:16:05 +0100
|
||||
Subject: [PATCH] ARM: DTSI: rk3288-tinker: Improving the CPU max voltage
|
||||
|
||||
Taken from the various patches provided by @TonyMac32 .
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dtsi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
index aa107ee41..3da1c830f 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -164,7 +164,7 @@
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
- regulator-max-microvolt = <1400000>;
|
||||
+ regulator-max-microvolt = <1450000>;
|
||||
regulator-name = "vdd_arm";
|
||||
regulator-ramp-delay = <6000>;
|
||||
regulator-state-mem {
|
||||
--
|
||||
2.16.4
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
From a72e0749acad92df7b854e38e97e1dc7b4799abe Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 22:11:24 +0100
|
||||
Subject: [PATCH] ARM: DTS: rk3288-tinker: Defined the I2C interfaces
|
||||
|
||||
And all the hardware behind.
|
||||
|
||||
Taken from @TonyMac32, Butchered by @Miouyouyou .
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dts | 25 +++++++++++++++++++++++++
|
||||
1 file changed, 25 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index b92e59c1e..96d05fc6b 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -40,6 +40,31 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&i2c1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c2 {
|
||||
+ afc0:af-controller@0 {
|
||||
+ status = "okay";
|
||||
+ compatible = "silicon touch,vm149C-v4l2-i2c-subdev";
|
||||
+ reg = <0x0 0x0c>;
|
||||
+ };
|
||||
+
|
||||
+ eeprom:m24c08@50 {
|
||||
+ compatible = "at,24c08";
|
||||
+ reg = <0x50>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c3 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c4 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&io_domains {
|
||||
wifi-supply = <&vcc_18>;
|
||||
};
|
||||
--
|
||||
2.16.4
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
From b24b8f83e150811ad54ee2a4843e44cd1421fafa Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 22:15:14 +0100
|
||||
Subject: [PATCH] ARM: DTS: rk3288-tinker: Defining the SPI interface
|
||||
|
||||
Taken from, and tested by @TonyMac32 .
|
||||
|
||||
Well, the original one was tested by him but I had to adapt the
|
||||
registers definitions to the new 64-bits LPAE-compliant syntax.
|
||||
|
||||
Therefore that *might* break, along with a few other patches.
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dts | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
index 96d05fc6b..17bfea298 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
|
||||
@@ -99,6 +99,25 @@
|
||||
supports-sdio;
|
||||
};
|
||||
|
||||
+&spi2 {
|
||||
+ max-freq = <50000000>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ spidev@0 {
|
||||
+ compatible = "rockchip,spi_tinker";
|
||||
+ reg = <0x0 0>;
|
||||
+ spi-max-frequency = <50000000>;
|
||||
+ spi-cpha = <1>;
|
||||
+ };
|
||||
+
|
||||
+ spidev@1 {
|
||||
+ compatible = "rockchip,spi_tinker";
|
||||
+ reg = <0x1>;
|
||||
+ spi-max-frequency = <50000000>;
|
||||
+ spi-cpha = <1>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
|
||||
--
|
||||
2.16.4
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From 487db7cefc9861fdaf30579c378a98f0360690ae Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Mon, 5 Nov 2018 20:27:14 +0100
|
||||
Subject: [PATCH] ARM: DTSI: rk3288-tinker: Defining SDMMC properties
|
||||
|
||||
I never knew if these properties were required to fix the dreaded
|
||||
reboot issue...
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dtsi | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
index dd1090728..8edd6f681 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -436,7 +436,12 @@
|
||||
disable-wp; /* wp not hooked up */
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
|
||||
+ sd-uhs-sdr12;
|
||||
+ sd-uhs-sdr25;
|
||||
+ sd-uhs-sdr50;
|
||||
+ sd-uhs-sdr104;
|
||||
status = "okay";
|
||||
+ supports-sd;
|
||||
vmmc-supply = <&vcc33_sd>;
|
||||
vqmmc-supply = <&vccio_sd>;
|
||||
};
|
||||
--
|
||||
2.16.4
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
From 4ab4f88649468dada5d609e1a6f8a71a7d5610c9 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Sat, 29 Sep 2018 02:48:59 +0200
|
||||
Subject: [PATCH 4/6] dts: rk3288: support for dedicating npll to a vop
|
||||
|
||||
This patch is taken from Urja Rannikko ( @urjaman ) patchset here :
|
||||
https://github.com/urjaman/arch-c201/blob/master/linux-c201/0020-RK3288-HDMI-clock-hacks-combined.patch
|
||||
https://www.spinics.net/lists/arm-kernel/msg673156.html
|
||||
|
||||
The original description was :
|
||||
|
||||
Add the VOP DCLKs to the assigned clocks list so their
|
||||
parents can be set in the dts include files for
|
||||
devices that do dedicate npll to a vop.
|
||||
|
||||
https://www.spinics.net/lists/arm-kernel/msg673162.html
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288.dtsi | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index d23c7fa55..ff04aab5e 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -867,12 +867,14 @@
|
||||
rockchip,grf = <&grf>;
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
- assigned-clocks = <&cru PLL_GPLL>, <&cru PLL_CPLL>,
|
||||
+ assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>,
|
||||
+ <&cru PLL_GPLL>, <&cru PLL_CPLL>,
|
||||
<&cru PLL_NPLL>, <&cru ACLK_CPU>,
|
||||
<&cru HCLK_CPU>, <&cru PCLK_CPU>,
|
||||
<&cru ACLK_PERI>, <&cru HCLK_PERI>,
|
||||
<&cru PCLK_PERI>;
|
||||
- assigned-clock-rates = <594000000>, <400000000>,
|
||||
+ assigned-clock-rates = <0>, <0>,
|
||||
+ <594000000>, <400000000>,
|
||||
<500000000>, <300000000>,
|
||||
<150000000>, <75000000>,
|
||||
<300000000>, <150000000>,
|
||||
--
|
||||
2.16.4
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From 9177b30ab083dbda2bede3b3d61ef71ad4b1ffe0 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Thu, 1 Nov 2018 21:31:26 +0100
|
||||
Subject: [PATCH 2/2] arm: dts: veyron: Added a flag to disable cache flush
|
||||
during reset
|
||||
|
||||
Flushing the MMC cache of ASUS Chromebooks during initialization or
|
||||
"recovery" generates 10 minutes hangup, according to @SolidHal.
|
||||
|
||||
This is an adaptation of @SolidHal, in order to pinpoint the fix to
|
||||
Veyron Chromebooks, and avoiding issues other RK3288 boards.
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-veyron.dtsi | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-veyron.dtsi b/arch/arm/boot/dts/rk3288-veyron.dtsi
|
||||
index 2075120cf..fa4951fd7 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-veyron.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-veyron.dtsi
|
||||
@@ -123,6 +123,7 @@
|
||||
mmc-hs200-1_8v;
|
||||
mmc-pwrseq = <&emmc_pwrseq>;
|
||||
non-removable;
|
||||
+ no-recovery-cache-flush;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
|
||||
};
|
||||
--
|
||||
2.16.4
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index 0cd88774d..07681f1f0 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -420,8 +420,6 @@
|
||||
reg-io-width = <4>;
|
||||
clocks = <&cru SCLK_UART0>, <&cru PCLK_UART0>;
|
||||
clock-names = "baudclk", "apb_pclk";
|
||||
- dmas = <&dmac_peri 1>, <&dmac_peri 2>;
|
||||
- dma-names = "tx", "rx";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_xfer>;
|
||||
status = "disabled";
|
||||
@@ -435,8 +433,6 @@
|
||||
reg-io-width = <4>;
|
||||
clocks = <&cru SCLK_UART1>, <&cru PCLK_UART1>;
|
||||
clock-names = "baudclk", "apb_pclk";
|
||||
- dmas = <&dmac_peri 3>, <&dmac_peri 4>;
|
||||
- dma-names = "tx", "rx";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart1_xfer>;
|
||||
status = "disabled";
|
||||
@@ -463,8 +459,6 @@
|
||||
reg-io-width = <4>;
|
||||
clocks = <&cru SCLK_UART3>, <&cru PCLK_UART3>;
|
||||
clock-names = "baudclk", "apb_pclk";
|
||||
- dmas = <&dmac_peri 7>, <&dmac_peri 8>;
|
||||
- dma-names = "tx", "rx";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart3_xfer>;
|
||||
status = "disabled";
|
||||
@@ -478,8 +472,6 @@
|
||||
reg-io-width = <4>;
|
||||
clocks = <&cru SCLK_UART4>, <&cru PCLK_UART4>;
|
||||
clock-names = "baudclk", "apb_pclk";
|
||||
- dmas = <&dmac_peri 9>, <&dmac_peri 10>;
|
||||
- dma-names = "tx", "rx";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart4_xfer>;
|
||||
status = "disabled";
|
||||
@@ -0,0 +1,42 @@
|
||||
From 73258d32daf3a661281bb5c77c5e2e06c7ff714e Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Fri, 3 Jul 2020 02:02:18 +0200
|
||||
Subject: [PATCH] arm: dtsi: rk3288: add GPU 500 Mhz OPP again
|
||||
|
||||
Undoing the very bizarre mainline kernel patch,
|
||||
75481833c6dbab4c29d15452f6b4337c16f5407b
|
||||
which main purpose is to sync some 3.14 kernels hacks to
|
||||
mainline kernels, for reasons that only matter for a few Chromebooks,
|
||||
and shove it down the throat of every RK3288 user.
|
||||
|
||||
If you need to avoid the GPU going to 500 Mhz on Chromebooks,
|
||||
remove the OPP entry inside the DTS that actually matters to RK3288
|
||||
Chromebooks.
|
||||
|
||||
Meanwhile, the 600 Mhz operating point can prove to be unstable on
|
||||
some RK3288 boards, while 500 Mhz works fine.
|
||||
https://forum.armbian.com/topic/13515-panfrost-on-rk3288-and-gpu-on-600mhz-problems/
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288.dtsi | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index a66412547..ef7457f79 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -1312,6 +1312,10 @@ opp-400000000 {
|
||||
opp-hz = /bits/ 64 <400000000>;
|
||||
opp-microvolt = <1100000>;
|
||||
};
|
||||
+ opp-500000000 {
|
||||
+ opp-hz = /bits/ 64 <500000000>;
|
||||
+ opp-microvolt = <1200000>;
|
||||
+ };
|
||||
opp-600000000 {
|
||||
opp-hz = /bits/ 64 <600000000>;
|
||||
opp-microvolt = <1250000>;
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
From 0bcc81848ec1fb34fee9d3c7eb1550495cc8efc9 Mon Sep 17 00:00:00 2001
|
||||
From: Paolo Sabatino <paolo.sabatino@gmail.com>
|
||||
Date: Sat, 18 Sep 2021 12:31:19 +0000
|
||||
Subject: [PATCH 1/2] rockchip: enable hevc, hevc_mmu and rga nodes for
|
||||
tinkerboard (both)
|
||||
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dtsi | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
index aa36aedf9..ff2c6de32 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -150,6 +150,14 @@ &hdmi {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&hevc {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hevc_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&i2c0 {
|
||||
clock-frequency = <400000>;
|
||||
status = "okay";
|
||||
@@ -449,6 +457,10 @@ &pwm0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&rga {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&saradc {
|
||||
vref-supply = <&vcc18_ldo1>;
|
||||
status = "okay";
|
||||
--
|
||||
2.30.2
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
From 2fdd826a704ef70df42d92b38ad88ef869c3729b Mon Sep 17 00:00:00 2001
|
||||
From: Paolo Sabatino <paolo.sabatino@gmail.com>
|
||||
Date: Sat, 18 Sep 2021 12:32:05 +0000
|
||||
Subject: [PATCH 2/2] rockchip: enable hevc, hevc_mmu and rga nodes for miqi
|
||||
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-miqi.dts | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
index 94bc76099..68eb766f0 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
+++ b/arch/arm/boot/dts/rk3288-miqi.dts
|
||||
@@ -162,6 +162,14 @@ &hdmi {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&hevc {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hevc_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&i2c0 {
|
||||
clock-frequency = <400000>;
|
||||
status = "okay";
|
||||
@@ -405,6 +413,10 @@ host_vbus_drv: host-vbus-drv {
|
||||
};
|
||||
};
|
||||
|
||||
+&rga {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&saradc {
|
||||
vref-supply = <&vcc_18>;
|
||||
status = "okay";
|
||||
--
|
||||
2.30.2
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
From e0c5a419cf5464cd02996431afa98e3b22dc6801 Mon Sep 17 00:00:00 2001
|
||||
From: Myy <myy@miouyouyou.fr>
|
||||
Date: Mon, 17 Jul 2017 23:14:48 +0000
|
||||
Subject: [PATCH] clk: rockchip: add all known operating points to the allowed
|
||||
CPU freqs
|
||||
|
||||
Patch from Willy Tarreau
|
||||
|
||||
Original commit message :
|
||||
At least 1920 MHz runs stable on the MiQi even on openssl speed -multi 4,
|
||||
which is by far the most intensive workload, and 1992/2016 work fine on
|
||||
the CS-008 until it starts to heat too much. So add all of them so that
|
||||
the device tree can simply manipulate them.
|
||||
|
||||
Signed-off-by: Myy <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/clk/rockchip/clk-rk3288.c | 17 +++++++++++++++++
|
||||
1 file changed, 17 insertions(+)
|
||||
|
||||
diff --git a/drivers/clk/rockchip/clk-rk3288.c b/drivers/clk/rockchip/clk-rk3288.c
|
||||
index 753c649..fd2058f 100644
|
||||
--- a/drivers/clk/rockchip/clk-rk3288.c
|
||||
+++ b/drivers/clk/rockchip/clk-rk3288.c
|
||||
@@ -145,6 +145,23 @@ static struct rockchip_pll_rate_table rk3288_pll_rates[] = {
|
||||
}
|
||||
|
||||
static struct rockchip_cpuclk_rate_table rk3288_cpuclk_rates[] __initdata = {
|
||||
+ RK3288_CPUCLK_RATE(2208000000U, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(2184000000U, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(2160000000U, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(2136000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(2112000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(2088000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(2064000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(2040000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(2016000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(1992000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(1968000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(1944000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(1920000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(1896000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(1872000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(1848000000, 1, 3, 1, 3, 3),
|
||||
+ RK3288_CPUCLK_RATE(1824000000, 1, 3, 1, 3, 3),
|
||||
RK3288_CPUCLK_RATE(1800000000, 1, 3, 1, 3, 3),
|
||||
RK3288_CPUCLK_RATE(1704000000, 1, 3, 1, 3, 3),
|
||||
RK3288_CPUCLK_RATE(1608000000, 1, 3, 1, 3, 3),
|
||||
--
|
||||
2.10.2
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
From 302cd9b8a9f1f8a7735fabea3b9a7645dc40f9cc Mon Sep 17 00:00:00 2001
|
||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
Date: Sun, 7 Jan 2018 01:52:44 +0100
|
||||
Subject: [PATCH] drivers: mmc: dw-mci-rockchip: Handle ASUS Tinkerboard reboot
|
||||
|
||||
On ASUS Tinkerboard systems, if the SDMMC hardware is shutdown before
|
||||
rebooting, the system will be dead, as the SDMMC is the only way to
|
||||
boot anything, and the hardware doesn't power up the SDMMC hardware
|
||||
automatically when rebooting.
|
||||
|
||||
So, when using an ASUS Tinkerboard system, a new reboot handler is
|
||||
installed. This reboot handler takes care of powering the SDMMC
|
||||
hardware again before restarting the system, resolving the issue.
|
||||
|
||||
The code was inspired by the pwrseq_emmc.c, which seems to overcome
|
||||
similar effects with eMMC hardware.
|
||||
|
||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/mmc/host/dw_mmc-rockchip.c | 66 ++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 66 insertions(+)
|
||||
|
||||
diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c
|
||||
index a3f1c2b30..7eac1f221 100644
|
||||
--- a/drivers/mmc/host/dw_mmc-rockchip.c
|
||||
+++ b/drivers/mmc/host/dw_mmc-rockchip.c
|
||||
@@ -16,6 +16,11 @@
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
+#include <linux/regulator/consumer.h>
|
||||
+#include <linux/reboot.h>
|
||||
+#include <linux/delay.h>
|
||||
+#include "../core/core.h"
|
||||
+
|
||||
#include "dw_mmc.h"
|
||||
#include "dw_mmc-pltfm.h"
|
||||
|
||||
@@ -334,6 +339,66 @@ static const struct of_device_id dw_mci_rockchip_match[] = {
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, dw_mci_rockchip_match);
|
||||
|
||||
+struct dw_mci_rockchip_broken_boards_data {
|
||||
+ struct notifier_block reset_nb;
|
||||
+ struct platform_device *pdev;
|
||||
+};
|
||||
+
|
||||
+/* This reboot handler handles cases where disabling the SDMMC on
|
||||
+ * reboot will cause the hardware to be unable to start correctly
|
||||
+ * after rebooting.
|
||||
+ *
|
||||
+ * This happens with Tinkerboard systems...
|
||||
+ */
|
||||
+static int dw_mci_rockchip_broken_boards_reset_nb(
|
||||
+ struct notifier_block *this,
|
||||
+ unsigned long mode, void *cmd)
|
||||
+{
|
||||
+ struct dw_mci_rockchip_broken_boards_data const *data =
|
||||
+ container_of(this,
|
||||
+ struct dw_mci_rockchip_broken_boards_data,
|
||||
+ reset_nb);
|
||||
+ struct dw_mci *host = platform_get_drvdata(data->pdev);
|
||||
+ struct mmc_host *mmc = host->slot->mmc;
|
||||
+
|
||||
+ printk(KERN_ERR "Meow.\n");
|
||||
+
|
||||
+ mmc_power_off(mmc);
|
||||
+
|
||||
+ mdelay(20);
|
||||
+
|
||||
+ if (!IS_ERR(mmc->supply.vmmc))
|
||||
+ regulator_enable(mmc->supply.vmmc);
|
||||
+
|
||||
+ if (!IS_ERR(mmc->supply.vqmmc))
|
||||
+ regulator_set_voltage(mmc->supply.vqmmc, 3000000, 3300000);
|
||||
+
|
||||
+ printk(KERN_ERR "woeM.\n");
|
||||
+
|
||||
+ return NOTIFY_DONE;
|
||||
+}
|
||||
+
|
||||
+static void dw_mci_rockchip_register_broken_boards_reboot_handler(
|
||||
+ struct platform_device *pdev)
|
||||
+{
|
||||
+ struct dw_mci_rockchip_broken_boards_data *data;
|
||||
+
|
||||
+ if (!of_machine_is_compatible("asus,rk3288-tinker"))
|
||||
+ return;
|
||||
+
|
||||
+ data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
|
||||
+
|
||||
+ if (!data)
|
||||
+ return;
|
||||
+
|
||||
+ data->reset_nb.notifier_call =
|
||||
+ dw_mci_rockchip_broken_boards_reset_nb;
|
||||
+ data->reset_nb.priority = 255;
|
||||
+ register_restart_handler(&data->reset_nb);
|
||||
+
|
||||
+ data->pdev = pdev;
|
||||
+}
|
||||
+
|
||||
static int dw_mci_rockchip_probe(struct platform_device *pdev)
|
||||
{
|
||||
const struct dw_mci_drv_data *drv_data;
|
||||
@@ -361,6 +426,7 @@ static int dw_mci_rockchip_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
pm_runtime_put_autosuspend(&pdev->dev);
|
||||
+ dw_mci_rockchip_register_broken_boards_reboot_handler(pdev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.14.1
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
FROM: Solidhal <hal@halemmerich.com>
|
||||
|
||||
This patch reverses commit 2b721118b7821107757eb1d37af4b60e877b27e7, as can bee seen here:
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2b721118b7821107757eb1d37af4b60e877b27e7
|
||||
|
||||
This commit caused issues on veyron speedy with ath9k and dwc2 drivers. Any ath9k device (ar9271)
|
||||
would intermittently work, most of the time ending in errors as can bee seen here:
|
||||
https://github.com/SolidHal/PrawnOS/issues/38
|
||||
This commit fixes that issue.
|
||||
This is only a temporary work around while a permenant fix is found, as this commit seems to only cause issues
|
||||
with dwc2
|
||||
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
|
||||
index 3f563e02d..903851481 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
|
||||
@@ -118,10 +118,10 @@ static int hif_usb_send_regout(struct hif_device_usb *hif_dev,
|
||||
cmd->skb = skb;
|
||||
cmd->hif_dev = hif_dev;
|
||||
|
||||
- usb_fill_int_urb(urb, hif_dev->udev,
|
||||
- usb_sndintpipe(hif_dev->udev, USB_REG_OUT_PIPE),
|
||||
+ usb_fill_bulk_urb(urb, hif_dev->udev,
|
||||
+ usb_sndbulkpipe(hif_dev->udev, USB_REG_OUT_PIPE),
|
||||
skb->data, skb->len,
|
||||
- hif_usb_regout_cb, cmd, 1);
|
||||
+ hif_usb_regout_cb, cmd);
|
||||
|
||||
usb_anchor_urb(urb, &hif_dev->regout_submitted);
|
||||
ret = usb_submit_urb(urb, GFP_KERNEL);
|
||||
@@ -735,11 +735,11 @@ static void ath9k_hif_usb_reg_in_cb(struct urb *urb)
|
||||
|
||||
rx_buf->skb = skb;
|
||||
|
||||
- usb_fill_int_urb(urb, hif_dev->udev,
|
||||
- usb_rcvintpipe(hif_dev->udev,
|
||||
+ usb_fill_bulk_urb(urb, hif_dev->udev,
|
||||
+ usb_rcvbulkpipe(hif_dev->udev,
|
||||
USB_REG_IN_PIPE),
|
||||
skb->data, MAX_REG_IN_BUF_SIZE,
|
||||
- ath9k_hif_usb_reg_in_cb, rx_buf, 1);
|
||||
+ ath9k_hif_usb_reg_in_cb, rx_buf);
|
||||
}
|
||||
|
||||
resubmit:
|
||||
@@ -944,11 +944,11 @@ static int ath9k_hif_usb_alloc_reg_in_urbs(struct hif_device_usb *hif_dev)
|
||||
rx_buf->hif_dev = hif_dev;
|
||||
rx_buf->skb = skb;
|
||||
|
||||
- usb_fill_int_urb(urb, hif_dev->udev,
|
||||
- usb_rcvintpipe(hif_dev->udev,
|
||||
+ usb_fill_bulk_urb(urb, hif_dev->udev,
|
||||
+ usb_rcvbulkpipe(hif_dev->udev,
|
||||
USB_REG_IN_PIPE),
|
||||
skb->data, MAX_REG_IN_BUF_SIZE,
|
||||
- ath9k_hif_usb_reg_in_cb, rx_buf, 1);
|
||||
+ ath9k_hif_usb_reg_in_cb, skb);
|
||||
|
||||
/* Anchor URB */
|
||||
usb_anchor_urb(urb, &hif_dev->reg_in_submitted);
|
||||
@@ -1069,7 +1069,9 @@ static int ath9k_hif_usb_download_fw(struct hif_device_usb *hif_dev)
|
||||
|
||||
static int ath9k_hif_usb_dev_init(struct hif_device_usb *hif_dev)
|
||||
{
|
||||
- int ret;
|
||||
+ struct usb_host_interface *alt = &hif_dev->interface->altsetting[0];
|
||||
+ struct usb_endpoint_descriptor *endp;
|
||||
+ int ret, idx;
|
||||
|
||||
ret = ath9k_hif_usb_download_fw(hif_dev);
|
||||
if (ret) {
|
||||
@@ -1079,6 +1081,20 @@ static int ath9k_hif_usb_dev_init(struct hif_device_usb *hif_dev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ /* On downloading the firmware to the target, the USB descriptor of EP4
|
||||
+ * is 'patched' to change the type of the endpoint to Bulk. This will
|
||||
+ * bring down CPU usage during the scan period.
|
||||
+ */
|
||||
+ for (idx = 0; idx < alt->desc.bNumEndpoints; idx++) {
|
||||
+ endp = &alt->endpoint[idx].desc;
|
||||
+ if ((endp->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
|
||||
+ == USB_ENDPOINT_XFER_INT) {
|
||||
+ endp->bmAttributes &= ~USB_ENDPOINT_XFERTYPE_MASK;
|
||||
+ endp->bmAttributes |= USB_ENDPOINT_XFER_BULK;
|
||||
+ endp->bInterval = 0;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* Alloc URBs */
|
||||
ret = ath9k_hif_usb_alloc_urbs(hif_dev);
|
||||
if (ret) {
|
||||
@@ -1353,7 +1369,7 @@ static void ath9k_hif_usb_reboot(struct usb_device *udev)
|
||||
if (!buf)
|
||||
return;
|
||||
|
||||
- ret = usb_interrupt_msg(udev, usb_sndintpipe(udev, USB_REG_OUT_PIPE),
|
||||
+ ret = usb_bulk_msg(udev, usb_sndbulkpipe(udev, USB_REG_OUT_PIPE),
|
||||
buf, 4, NULL, USB_MSG_TIMEOUT);
|
||||
if (ret)
|
||||
dev_err(&udev->dev, "ath9k_htc: USB reboot failed\n");
|
||||
@@ -0,0 +1,20 @@
|
||||
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
|
||||
index 5a038c667401..5dd1acf7f12a 100644
|
||||
--- a/drivers/spi/spidev.c
|
||||
+++ b/drivers/spi/spidev.c
|
||||
@@ -713,6 +713,7 @@ static const struct spi_device_id spidev_spi_ids[] = {
|
||||
{ .name = "spi-authenta" },
|
||||
{ .name = "em3581" },
|
||||
{ .name = "si3210" },
|
||||
+ { .name = "spi_tinker" },
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(spi, spidev_spi_ids);
|
||||
@@ -741,6 +742,7 @@ static const struct of_device_id spidev_dt_ids[] = {
|
||||
{ .compatible = "semtech,sx1301", .data = &spidev_of_check },
|
||||
{ .compatible = "silabs,em3581", .data = &spidev_of_check },
|
||||
{ .compatible = "silabs,si3210", .data = &spidev_of_check },
|
||||
+ { .compatible = "rockchip,spi_tinker", .data = &spidev_of_check },
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, spidev_dt_ids);
|
||||
395
patch/kernel/archive/rockchip-6.4/261_gpiomem_driver.patch
Normal file
395
patch/kernel/archive/rockchip-6.4/261_gpiomem_driver.patch
Normal file
@@ -0,0 +1,395 @@
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
index e5b7ef1a5..f88c913ff 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -544,3 +544,6 @@
|
||||
&wdt {
|
||||
status = "okay";
|
||||
};
|
||||
+&gpiomem {
|
||||
+ status = "okay";
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index f3ca55496..14bbcb192 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -1418,6 +1418,12 @@
|
||||
interrupts = <GIC_PPI 9 0xf04>;
|
||||
};
|
||||
|
||||
+ gpiomem: rk3288-gpiomem@ff750000 {
|
||||
+ compatible = "rockchip,rk3288-gpiomem";
|
||||
+ reg = <0x0 0xff750000 0x0 0x1000>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
pinctrl: pinctrl {
|
||||
compatible = "rockchip,rk3288-pinctrl";
|
||||
rockchip,grf = <&grf>;
|
||||
|
||||
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
|
||||
index 3143db5..9c18b74 100644
|
||||
--- a/drivers/char/Kconfig
|
||||
+++ b/drivers/char/Kconfig
|
||||
@@ -5,6 +5,7 @@
|
||||
menu "Character devices"
|
||||
|
||||
source "drivers/tty/Kconfig"
|
||||
+source "drivers/char/rockchip/Kconfig"
|
||||
|
||||
config DEVMEM
|
||||
bool "/dev/mem virtual device support"
|
||||
diff --git a/drivers/char/Makefile b/drivers/char/Makefile
|
||||
index 264eb398f..9fd5f240b 100644
|
||||
--- a/drivers/char/Makefile
|
||||
+++ b/drivers/char/Makefile
|
||||
@@ -43,6 +43,8 @@ obj-$(CONFIG_TCG_TPM) += tpm/
|
||||
|
||||
obj-$(CONFIG_PS3_FLASH) += ps3flash.o
|
||||
|
||||
+obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/
|
||||
+
|
||||
obj-$(CONFIG_XILLYBUS_CLASS) += xillybus/
|
||||
obj-$(CONFIG_POWERNV_OP_PANEL) += powernv-op-panel.o
|
||||
obj-$(CONFIG_ADI) += adi.o
|
||||
diff --git a/drivers/char/rockchip/Kconfig b/drivers/char/rockchip/Kconfig
|
||||
new file mode 100644
|
||||
index 0000000..6e97486
|
||||
--- /dev/null
|
||||
+++ b/drivers/char/rockchip/Kconfig
|
||||
@@ -0,0 +1,16 @@
|
||||
+#
|
||||
+# Broadcom char driver config
|
||||
+#
|
||||
+
|
||||
+menuconfig RK_CHAR_DRIVERS
|
||||
+ bool "Rockchip Char Drivers"
|
||||
+ help
|
||||
+ Rockchip's char drivers
|
||||
+
|
||||
+config RK3288_DEVGPIOMEM
|
||||
+ tristate "/dev/gpiomem rootless GPIO access via mmap() on the RK3288"
|
||||
+ default y
|
||||
+ help
|
||||
+ Provides users with root-free access to the GPIO registers
|
||||
+ on the 3288. Calling mmap(/dev/gpiomem) will map the GPIO
|
||||
+ register page to the user's pointer.
|
||||
\ No newline at end of file
|
||||
diff --git a/drivers/char/rockchip/Makefile b/drivers/char/rockchip/Makefile
|
||||
new file mode 100644
|
||||
index 0000000..2287ec2
|
||||
--- /dev/null
|
||||
+++ b/drivers/char/rockchip/Makefile
|
||||
@@ -0,0 +1 @@
|
||||
+obj-$(CONFIG_RK3288_DEVGPIOMEM)+= rk3288-gpiomem.o
|
||||
\ No newline at end of file
|
||||
diff --git a/drivers/char/rockchip/rk3288-gpiomem.c b/drivers/char/rockchip/rk3288-gpiomem.c
|
||||
new file mode 100644
|
||||
index 0000000..984471c
|
||||
--- /dev/null
|
||||
+++ b/drivers/char/rockchip/rk3288-gpiomem.c
|
||||
@@ -0,0 +1,303 @@
|
||||
+/**
|
||||
+ * GPIO memory device driver
|
||||
+ *
|
||||
+ * Creates a chardev /dev/gpiomem which will provide user access to
|
||||
+ * the rk3288's GPIO registers when it is mmap()'d.
|
||||
+ * No longer need root for user GPIO access, but without relaxing permissions
|
||||
+ * on /dev/mem.
|
||||
+ *
|
||||
+ * Written by Luke Wren <luke@raspberrypi.org>
|
||||
+ * Copyright (c) 2015, Raspberry Pi (Trading) Ltd.
|
||||
+ *
|
||||
+ * Redistribution and use in source and binary forms, with or without
|
||||
+ * modification, are permitted provided that the following conditions
|
||||
+ * are met:
|
||||
+ * 1. Redistributions of source code must retain the above copyright
|
||||
+ * notice, this list of conditions, and the following disclaimer,
|
||||
+ * without modification.
|
||||
+ * 2. Redistributions in binary form must reproduce the above copyright
|
||||
+ * notice, this list of conditions and the following disclaimer in the
|
||||
+ * documentation and/or other materials provided with the distribution.
|
||||
+ * 3. The names of the above-listed copyright holders may not be used
|
||||
+ * to endorse or promote products derived from this software without
|
||||
+ * specific prior written permission.
|
||||
+ *
|
||||
+ * ALTERNATIVELY, this software may be distributed under the terms of the
|
||||
+ * GNU General Public License ("GPL") version 2, as published by the Free
|
||||
+ * Software Foundation.
|
||||
+ *
|
||||
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/of.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/mm.h>
|
||||
+#include <linux/slab.h>
|
||||
+#include <linux/cdev.h>
|
||||
+#include <linux/pagemap.h>
|
||||
+#include <linux/io.h>
|
||||
+
|
||||
+#define DEVICE_NAME "rk3288-gpiomem"
|
||||
+#define DRIVER_NAME "gpiomem-rk3288"
|
||||
+#define DEVICE_MINOR 0
|
||||
+
|
||||
+struct rk3288_gpiomem_instance {
|
||||
+ unsigned long gpio_regs_phys;
|
||||
+ struct device *dev;
|
||||
+};
|
||||
+
|
||||
+static struct cdev rk3288_gpiomem_cdev;
|
||||
+static dev_t rk3288_gpiomem_devid;
|
||||
+static struct class *rk3288_gpiomem_class;
|
||||
+static struct device *rk3288_gpiomem_dev;
|
||||
+static struct rk3288_gpiomem_instance *inst;
|
||||
+
|
||||
+
|
||||
+/****************************************************************************
|
||||
+*
|
||||
+* GPIO mem chardev file ops
|
||||
+*
|
||||
+***************************************************************************/
|
||||
+
|
||||
+static int rk3288_gpiomem_open(struct inode *inode, struct file *file)
|
||||
+{
|
||||
+ int dev = iminor(inode);
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ if (dev != DEVICE_MINOR) {
|
||||
+ dev_err(inst->dev, "Unknown minor device: %d", dev);
|
||||
+ ret = -ENXIO;
|
||||
+ }
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int rk3288_gpiomem_release(struct inode *inode, struct file *file)
|
||||
+{
|
||||
+ int dev = iminor(inode);
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ if (dev != DEVICE_MINOR) {
|
||||
+ dev_err(inst->dev, "Unknown minor device %d", dev);
|
||||
+ ret = -ENXIO;
|
||||
+ }
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static const struct vm_operations_struct rk3288_gpiomem_vm_ops = {
|
||||
+#ifdef CONFIG_HAVE_IOREMAP_PROT
|
||||
+ .access = generic_access_phys
|
||||
+#endif
|
||||
+};
|
||||
+static int address_is_allowed(unsigned long pfn, unsigned long size)
|
||||
+{
|
||||
+ unsigned long address = pfn << PAGE_SHIFT;
|
||||
+
|
||||
+ dev_info(inst->dev, "address_is_allowed.pfn: 0x%08lx", address);
|
||||
+
|
||||
+ switch(address) {
|
||||
+
|
||||
+ case 0xff750000:
|
||||
+ case 0xff760000:
|
||||
+ case 0xff780000:
|
||||
+ case 0xff790000:
|
||||
+ case 0xff7a0000:
|
||||
+ case 0xff7b0000:
|
||||
+ case 0xff7c0000:
|
||||
+ case 0xff7d0000:
|
||||
+ case 0xff7e0000:
|
||||
+ case 0xff7f0000:
|
||||
+ case 0xff7f2000:
|
||||
+ case 0xff770000:
|
||||
+ case 0xff730000:
|
||||
+ case 0xff680000:
|
||||
+ dev_info(inst->dev, "address_is_allowed.return 1");
|
||||
+ return 1;
|
||||
+ break;
|
||||
+ default :
|
||||
+ dev_info(inst->dev, "address_is_allowed.return 0");
|
||||
+ return 0;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int rk3288_gpiomem_mmap(struct file *file, struct vm_area_struct *vma)
|
||||
+{
|
||||
+
|
||||
+ size_t size;
|
||||
+
|
||||
+ size = vma->vm_end - vma->vm_start;
|
||||
+
|
||||
+
|
||||
+ if (!address_is_allowed(vma->vm_pgoff, size))
|
||||
+ return -EPERM;
|
||||
+
|
||||
+ vma->vm_page_prot = phys_mem_access_prot(file, vma->vm_pgoff,
|
||||
+ size,
|
||||
+ vma->vm_page_prot);
|
||||
+
|
||||
+ vma->vm_ops = &rk3288_gpiomem_vm_ops;
|
||||
+
|
||||
+ /* Remap-pfn-range will mark the range VM_IO */
|
||||
+ if (remap_pfn_range(vma,
|
||||
+ vma->vm_start,
|
||||
+ vma->vm_pgoff,
|
||||
+ size,
|
||||
+ vma->vm_page_prot)) {
|
||||
+ return -EAGAIN;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct file_operations
|
||||
+rk3288_gpiomem_fops = {
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .open = rk3288_gpiomem_open,
|
||||
+ .release = rk3288_gpiomem_release,
|
||||
+ .mmap = rk3288_gpiomem_mmap,
|
||||
+};
|
||||
+
|
||||
+static int rk3288_gpiomem_dev_uevent(const struct device *dev, struct kobj_uevent_env *env)
|
||||
+{
|
||||
+ add_uevent_var(env, "DEVMODE=%#o", 0666);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+ /****************************************************************************
|
||||
+*
|
||||
+* Probe and remove functions
|
||||
+*
|
||||
+***************************************************************************/
|
||||
+
|
||||
+
|
||||
+static int rk3288_gpiomem_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ int err;
|
||||
+ void *ptr_err;
|
||||
+ struct device *dev = &pdev->dev;
|
||||
+ struct resource *ioresource;
|
||||
+
|
||||
+ /* Allocate buffers and instance data */
|
||||
+
|
||||
+ inst = kzalloc(sizeof(struct rk3288_gpiomem_instance), GFP_KERNEL);
|
||||
+
|
||||
+ if (!inst) {
|
||||
+ err = -ENOMEM;
|
||||
+ goto failed_inst_alloc;
|
||||
+ }
|
||||
+
|
||||
+ inst->dev = dev;
|
||||
+
|
||||
+ ioresource = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
+ if (ioresource) {
|
||||
+ inst->gpio_regs_phys = ioresource->start;
|
||||
+ } else {
|
||||
+ dev_err(inst->dev, "failed to get IO resource");
|
||||
+ err = -ENOENT;
|
||||
+ goto failed_get_resource;
|
||||
+ }
|
||||
+
|
||||
+ /* Create character device entries */
|
||||
+
|
||||
+ err = alloc_chrdev_region(&rk3288_gpiomem_devid,
|
||||
+ DEVICE_MINOR, 1, DEVICE_NAME);
|
||||
+ if (err != 0) {
|
||||
+ dev_err(inst->dev, "unable to allocate device number");
|
||||
+ goto failed_alloc_chrdev;
|
||||
+ }
|
||||
+ cdev_init(&rk3288_gpiomem_cdev, &rk3288_gpiomem_fops);
|
||||
+ rk3288_gpiomem_cdev.owner = THIS_MODULE;
|
||||
+ err = cdev_add(&rk3288_gpiomem_cdev, rk3288_gpiomem_devid, 1);
|
||||
+ if (err != 0) {
|
||||
+ dev_err(inst->dev, "unable to register device");
|
||||
+ goto failed_cdev_add;
|
||||
+ }
|
||||
+
|
||||
+ /* Create sysfs entries */
|
||||
+
|
||||
+ rk3288_gpiomem_class = class_create(DEVICE_NAME);
|
||||
+ ptr_err = rk3288_gpiomem_class;
|
||||
+ if (IS_ERR(ptr_err))
|
||||
+ goto failed_class_create;
|
||||
+ rk3288_gpiomem_class->dev_uevent = rk3288_gpiomem_dev_uevent;
|
||||
+ rk3288_gpiomem_dev = device_create(rk3288_gpiomem_class, NULL,
|
||||
+ rk3288_gpiomem_devid, NULL,
|
||||
+ "gpiomem");
|
||||
+ ptr_err = rk3288_gpiomem_dev;
|
||||
+ if (IS_ERR(ptr_err))
|
||||
+ goto failed_device_create;
|
||||
+
|
||||
+ dev_info(inst->dev, "Initialised: Registers at 0x%08lx",
|
||||
+ inst->gpio_regs_phys);
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+failed_device_create:
|
||||
+ class_destroy(rk3288_gpiomem_class);
|
||||
+failed_class_create:
|
||||
+ cdev_del(&rk3288_gpiomem_cdev);
|
||||
+ err = PTR_ERR(ptr_err);
|
||||
+failed_cdev_add:
|
||||
+ unregister_chrdev_region(rk3288_gpiomem_devid, 1);
|
||||
+failed_alloc_chrdev:
|
||||
+failed_get_resource:
|
||||
+ kfree(inst);
|
||||
+failed_inst_alloc:
|
||||
+ dev_err(inst->dev, "could not load rk3288_gpiomem");
|
||||
+ return err;
|
||||
+}
|
||||
+
|
||||
+static int rk3288_gpiomem_remove(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct device *dev = inst->dev;
|
||||
+
|
||||
+ kfree(inst);
|
||||
+ device_destroy(rk3288_gpiomem_class, rk3288_gpiomem_devid);
|
||||
+ class_destroy(rk3288_gpiomem_class);
|
||||
+ cdev_del(&rk3288_gpiomem_cdev);
|
||||
+ unregister_chrdev_region(rk3288_gpiomem_devid, 1);
|
||||
+
|
||||
+ dev_info(dev, "GPIO mem driver removed - OK");
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+ /****************************************************************************
|
||||
+*
|
||||
+* Register the driver with device tree
|
||||
+*
|
||||
+***************************************************************************/
|
||||
+
|
||||
+static const struct of_device_id rk3288_gpiomem_of_match[] = {
|
||||
+ {.compatible = "rockchip,rk3288-gpiomem",},
|
||||
+ { /* sentinel */ },
|
||||
+};
|
||||
+
|
||||
+MODULE_DEVICE_TABLE(of, rk3288_gpiomem_of_match);
|
||||
+
|
||||
+static struct platform_driver rk3288_gpiomem_driver = {
|
||||
+ .probe = rk3288_gpiomem_probe,
|
||||
+ .remove = rk3288_gpiomem_remove,
|
||||
+ .driver = {
|
||||
+ .name = DRIVER_NAME,
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .of_match_table = rk3288_gpiomem_of_match,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+module_platform_driver(rk3288_gpiomem_driver);
|
||||
+
|
||||
+MODULE_ALIAS("platform:gpiomem-rk3288");
|
||||
+MODULE_LICENSE("GPL");
|
||||
+MODULE_DESCRIPTION("gpiomem driver for accessing GPIO from userspace");
|
||||
+MODULE_AUTHOR("Luke Wren <luke@raspberrypi.org>");
|
||||
\ No newline at end of file
|
||||
@@ -0,0 +1,32 @@
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index bc3601a..37ae378 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -467,13 +467,6 @@
|
||||
};
|
||||
|
||||
thermal-zones {
|
||||
- reserve_thermal: reserve-thermal {
|
||||
- polling-delay-passive = <1000>; /* milliseconds */
|
||||
- polling-delay = <5000>; /* milliseconds */
|
||||
-
|
||||
- thermal-sensors = <&tsadc 0>;
|
||||
- };
|
||||
-
|
||||
cpu_thermal: cpu-thermal {
|
||||
polling-delay-passive = <100>; /* milliseconds */
|
||||
polling-delay = <5000>; /* milliseconds */
|
||||
@@ -539,6 +532,13 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+ reserve_thermal: reserve-thermal {
|
||||
+ polling-delay-passive = <1000>; /* milliseconds */
|
||||
+ polling-delay = <5000>; /* milliseconds */
|
||||
+
|
||||
+ thermal-sensors = <&tsadc 0>;
|
||||
+ };
|
||||
};
|
||||
|
||||
tsadc: tsadc@ff280000 {
|
||||
@@ -0,0 +1,19 @@
|
||||
diff --git a/sound/usb/card.c b/sound/usb/card.c
|
||||
index 2bfe4e80a..cea93aaf5 100644
|
||||
--- a/sound/usb/card.c
|
||||
+++ b/sound/usb/card.c
|
||||
@@ -382,6 +382,14 @@ static void usb_audio_make_shortname(struct usb_device *dev,
|
||||
}
|
||||
|
||||
strim(card->shortname);
|
||||
+
|
||||
+ /* Tinker Board ALC4040 CODEC */
|
||||
+
|
||||
+ if(USB_ID_VENDOR(chip->usb_id) == 0x0bda &&
|
||||
+ USB_ID_PRODUCT(chip->usb_id) == 0x481a) {
|
||||
+ strlcat(card->shortname, " OnBoard", sizeof(card->shortname));
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
||||
static void usb_audio_make_longname(struct usb_device *dev,
|
||||
@@ -0,0 +1,34 @@
|
||||
From 87313f95f809fc34f499c1ceff1b95cd4efa0f3f Mon Sep 17 00:00:00 2001
|
||||
From: Paolo Sabatino <paolo.sabatino@gmail.com>
|
||||
Date: Tue, 22 Mar 2022 22:02:46 +0000
|
||||
Subject: [PATCH] rockchip: add tinkerboard bluetooth
|
||||
|
||||
---
|
||||
arch/arm/boot/dts/rk3288-tinker.dtsi | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
index ff2c6de3216..23acfdecee7 100644
|
||||
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
|
||||
@@ -510,6 +510,17 @@ &tsadc {
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
|
||||
+ uart-has-rtscts;
|
||||
+
|
||||
+ bluetooth {
|
||||
+ compatible = "realtek,rtl8723bs-bt";
|
||||
+ enable-gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_HIGH>;
|
||||
+ device-wake-gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
|
||||
+ host-wake-gpios = <&gpio4 RK_PD7 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
};
|
||||
|
||||
&uart1 {
|
||||
--
|
||||
2.30.2
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
From e5c9702bd2ffd09e48c118ab40c2764590af7929 Mon Sep 17 00:00:00 2001
|
||||
From: Paolo Sabatino <paolo.sabatino@gmail.com>
|
||||
Date: Sat, 1 May 2021 12:41:14 +0000
|
||||
Subject: [PATCH] Workaround to make several broadcom bluetooth serdev devices
|
||||
work even without proper MAC address
|
||||
|
||||
---
|
||||
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 1b9743b7f..b274f1cdd 100644
|
||||
--- a/drivers/bluetooth/btbcm.c
|
||||
+++ b/drivers/bluetooth/btbcm.c
|
||||
@@ -129,7 +129,7 @@ int btbcm_check_bdaddr(struct hci_dev *hdev)
|
||||
if (btbcm_set_bdaddr_from_efi(hdev) != 0) {
|
||||
bt_dev_info(hdev, "BCM: Using default device address (%pMR)",
|
||||
&bda->bdaddr);
|
||||
- set_bit(HCI_QUIRK_INVALID_BDADDR, &hdev->quirks);
|
||||
+ //set_bit(HCI_QUIRK_INVALID_BDADDR, &hdev->quirks);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From 3c0fe31689c380b1ebaaf7327a2585248eacecad Mon Sep 17 00:00:00 2001
|
||||
From: Paolo Sabatino <paolo.sabatino@gmail.com>
|
||||
Date: Fri, 7 Jul 2023 16:00:15 +0200
|
||||
Subject: [PATCH] prefer 8-bit RGB over YCbCr
|
||||
|
||||
---
|
||||
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
|
||||
index 36c8dc302de1..2944fc0a236e 100644
|
||||
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
|
||||
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
|
||||
@@ -2749,10 +2749,6 @@ static u32 *dw_hdmi_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge,
|
||||
* if supported. In any case the default RGB888 format is added
|
||||
*/
|
||||
|
||||
- /* Default 8bit RGB fallback */
|
||||
- if (is_tmds_allowed(info, mode, MEDIA_BUS_FMT_RGB888_1X24))
|
||||
- output_fmts[i++] = MEDIA_BUS_FMT_RGB888_1X24;
|
||||
-
|
||||
if (max_bpc >= 16 && info->bpc == 16) {
|
||||
if ((info->color_formats & DRM_COLOR_FORMAT_YCBCR444) &&
|
||||
is_tmds_allowed(info, mode, MEDIA_BUS_FMT_YUV16_1X48))
|
||||
@@ -2788,6 +2784,10 @@ static u32 *dw_hdmi_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge,
|
||||
output_fmts[i++] = MEDIA_BUS_FMT_RGB101010_1X30;
|
||||
}
|
||||
|
||||
+ /* Prefer 8-bit RGB over YCbCr formats */
|
||||
+ if (is_tmds_allowed(info, mode, MEDIA_BUS_FMT_RGB888_1X24))
|
||||
+ output_fmts[i++] = MEDIA_BUS_FMT_RGB888_1X24;
|
||||
+
|
||||
if ((info->color_formats & DRM_COLOR_FORMAT_YCBCR422) &&
|
||||
is_tmds_allowed(info, mode, MEDIA_BUS_FMT_UYVY8_1X16))
|
||||
output_fmts[i++] = MEDIA_BUS_FMT_UYVY8_1X16;
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index 58bd91539..9c0dac199 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -153,6 +153,75 @@
|
||||
opp-hz = /bits/ 64 <1608000000>;
|
||||
opp-microvolt = <1350000>;
|
||||
};
|
||||
+ opp@1704000000 {
|
||||
+ opp-hz = /bits/ 64 <1704000000>;
|
||||
+ opp-microvolt = <1350000>;
|
||||
+ };
|
||||
+ opp@1800000000 {
|
||||
+ opp-hz = /bits/ 64 <1800000000>;
|
||||
+ opp-microvolt = <1400000>;
|
||||
+ };
|
||||
+ /* boot-only frequencies below */
|
||||
+ opp@1896000000 {
|
||||
+ opp-hz = /bits/ 64 <1896000000>;
|
||||
+ opp-microvolt = <1425000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@1920000000 {
|
||||
+ opp-hz = /bits/ 64 <1920000000>;
|
||||
+ opp-microvolt = <1425000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@1992000000 {
|
||||
+ opp-hz = /bits/ 64 <1992000000>;
|
||||
+ opp-microvolt = <1450000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2016000000 {
|
||||
+ opp-hz = /bits/ 64 <2016000000>;
|
||||
+ opp-microvolt = <1475000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2040000000 {
|
||||
+ opp-hz = /bits/ 64 <2040000000>;
|
||||
+ opp-microvolt = <1475000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2064000000 {
|
||||
+ opp-hz = /bits/ 64 <2064000000>;
|
||||
+ opp-microvolt = <1475000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2088000000 {
|
||||
+ opp-hz = /bits/ 64 <2088000000>;
|
||||
+ opp-microvolt = <1500000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2112000000 {
|
||||
+ opp-hz = /bits/ 64 <2112000000>;
|
||||
+ opp-microvolt = <1500000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2136000000 {
|
||||
+ opp-hz = /bits/ 64 <2136000000>;
|
||||
+ opp-microvolt = <1500000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2160000000 {
|
||||
+ opp-hz = /bits/ 64 <2160000000>;
|
||||
+ opp-microvolt = <1500000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2184000000 {
|
||||
+ opp-hz = /bits/ 64 <2184000000>;
|
||||
+ opp-microvolt = <1500000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
+ opp@2208000000 {
|
||||
+ opp-hz = /bits/ 64 <2208000000>;
|
||||
+ opp-microvolt = <1500000>;
|
||||
+ turbo-mode;
|
||||
+ };
|
||||
};
|
||||
|
||||
amba {
|
||||
@@ -0,0 +1,23 @@
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
index a907d7b06..ec71996c7 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
@@ -619,13 +619,17 @@ BRCMF_FW_DEF(4354, "brcmfmac4354-sdio");
|
||||
BRCMF_FW_DEF(4356, "brcmfmac4356-sdio");
|
||||
BRCMF_FW_DEF(4373, "brcmfmac4373-sdio");
|
||||
|
||||
+/* AMPAK */
|
||||
+BRCMF_FW_DEF(AP6330, "brcmfmac-ap6330-sdio");
|
||||
+
|
||||
static const struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = {
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43143_CHIP_ID, 0xFFFFFFFF, 43143),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43241_CHIP_ID, 0x0000001F, 43241B0),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43241_CHIP_ID, 0x00000020, 43241B4),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43241_CHIP_ID, 0xFFFFFFC0, 43241B5),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_4329_CHIP_ID, 0xFFFFFFFF, 4329),
|
||||
- BRCMF_FW_ENTRY(BRCM_CC_4330_CHIP_ID, 0xFFFFFFFF, 4330),
|
||||
+ BRCMF_FW_ENTRY(BRCM_CC_4330_CHIP_ID, 0xFFFFFFEF, 4330),
|
||||
+ BRCMF_FW_ENTRY(BRCM_CC_4330_CHIP_ID, 0x10, AP6330),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_4334_CHIP_ID, 0xFFFFFFFF, 4334),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43340_CHIP_ID, 0xFFFFFFFF, 43340),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43341_CHIP_ID, 0xFFFFFFFF, 43340),
|
||||
@@ -0,0 +1,108 @@
|
||||
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 50d580d77..94bd15617 100644
|
||||
--- a/scripts/Makefile.dtbinst
|
||||
+++ b/scripts/Makefile.dtbinst
|
||||
@@ -18,9 +18,12 @@ include scripts/Kbuild.include
|
||||
include $(src)/Makefile
|
||||
|
||||
dtbs := $(addprefix $(dst)/, $(dtb-y) $(if $(CONFIG_OF_ALL_DTBS),$(dtb-)))
|
||||
+dtbos := $(addprefix $(dst)/, $(dtbo-y))
|
||||
+scrs := $(addprefix $(dst)/, $(scr-y))
|
||||
+readmes := $(addprefix $(dst)/, $(dtbotxt-y))
|
||||
subdirs := $(addprefix $(obj)/, $(subdir-y) $(subdir-m))
|
||||
|
||||
-__dtbs_install: $(dtbs) $(subdirs)
|
||||
+__dtbs_install: $(dtbs) $(dtbos) $(scrs) $(readmes) $(subdirs)
|
||||
@:
|
||||
|
||||
quiet_cmd_dtb_install = INSTALL $@
|
||||
@@ -29,6 +32,15 @@ quiet_cmd_dtb_install = INSTALL $@
|
||||
$(dst)/%.dtb: $(obj)/%.dtb
|
||||
$(call cmd,dtb_install)
|
||||
|
||||
+$(dst)/%.dtbo: $(obj)/%.dtbo
|
||||
+ $(call cmd,dtb_install)
|
||||
+
|
||||
+$(dst)/%.scr: $(obj)/%.scr
|
||||
+ $(call cmd,dtb_install)
|
||||
+
|
||||
+$(dst)/README.rockchip-overlays: $(src)/README.rockchip-overlays
|
||||
+ $(call cmd,dtb_install)
|
||||
+
|
||||
PHONY += $(subdirs)
|
||||
$(subdirs):
|
||||
$(Q)$(MAKE) $(dtbinst)=$@ dst=$(patsubst $(obj)/%,$(dst)/%,$@)
|
||||
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
|
||||
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))
|
||||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index 7765310e5000..19bbddff23d6 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -1172,6 +1172,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \
|
||||
rk3288-veyron-speedy.dtb \
|
||||
rk3288-veyron-tiger.dtb \
|
||||
rk3288-vyasa.dtb
|
||||
+subdir-y := $(dts-dirs) overlay
|
||||
dtb-$(CONFIG_ARCH_S3C64XX) += \
|
||||
s3c6410-mini6410.dtb \
|
||||
s3c6410-smdk6410.dtb
|
||||
483
patch/kernel/archive/rockchip-6.4/general-add-overlays.patch
Normal file
483
patch/kernel/archive/rockchip-6.4/general-add-overlays.patch
Normal file
@@ -0,0 +1,483 @@
|
||||
From f714d89ebd3ee718cb7ab8574ec92407b50b5aee Mon Sep 17 00:00:00 2001
|
||||
From: Paolo Sabatino <paolo.sabatino@gmail.com>
|
||||
Date: Sun, 20 Mar 2022 09:30:24 +0000
|
||||
Subject: [PATCH] rk3288: general add overlays
|
||||
|
||||
---
|
||||
arch/arm/boot/dts/overlay/Makefile | 26 +++++++
|
||||
.../boot/dts/overlay/README.rockchip-overlays | 78 +++++++++++++++++++
|
||||
arch/arm/boot/dts/overlay/rockchip-ds1307.dts | 23 ++++++
|
||||
.../boot/dts/overlay/rockchip-fixup.scr-cmd | 4 +
|
||||
arch/arm/boot/dts/overlay/rockchip-i2c1.dts | 16 ++++
|
||||
arch/arm/boot/dts/overlay/rockchip-i2c4.dts | 16 ++++
|
||||
arch/arm/boot/dts/overlay/rockchip-spi0.dts | 16 ++++
|
||||
arch/arm/boot/dts/overlay/rockchip-spi2.dts | 16 ++++
|
||||
.../arm/boot/dts/overlay/rockchip-spidev0.dts | 35 +++++++++
|
||||
.../arm/boot/dts/overlay/rockchip-spidev2.dts | 35 +++++++++
|
||||
arch/arm/boot/dts/overlay/rockchip-uart1.dts | 16 ++++
|
||||
arch/arm/boot/dts/overlay/rockchip-uart2.dts | 16 ++++
|
||||
arch/arm/boot/dts/overlay/rockchip-uart3.dts | 16 ++++
|
||||
arch/arm/boot/dts/overlay/rockchip-uart4.dts | 16 ++++
|
||||
.../arm/boot/dts/overlay/rockchip-w1-gpio.dts | 23 ++++++
|
||||
15 files changed, 352 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/overlay/Makefile
|
||||
create mode 100644 arch/arm/boot/dts/overlay/README.rockchip-overlays
|
||||
create mode 100644 arch/arm/boot/dts/overlay/rockchip-ds1307.dts
|
||||
create mode 100644 arch/arm/boot/dts/overlay/rockchip-fixup.scr-cmd
|
||||
create mode 100644 arch/arm/boot/dts/overlay/rockchip-i2c1.dts
|
||||
create mode 100644 arch/arm/boot/dts/overlay/rockchip-i2c4.dts
|
||||
create mode 100644 arch/arm/boot/dts/overlay/rockchip-spi0.dts
|
||||
create mode 100644 arch/arm/boot/dts/overlay/rockchip-spi2.dts
|
||||
create mode 100644 arch/arm/boot/dts/overlay/rockchip-spidev0.dts
|
||||
create mode 100644 arch/arm/boot/dts/overlay/rockchip-spidev2.dts
|
||||
create mode 100644 arch/arm/boot/dts/overlay/rockchip-uart1.dts
|
||||
create mode 100644 arch/arm/boot/dts/overlay/rockchip-uart2.dts
|
||||
create mode 100644 arch/arm/boot/dts/overlay/rockchip-uart3.dts
|
||||
create mode 100644 arch/arm/boot/dts/overlay/rockchip-uart4.dts
|
||||
create mode 100644 arch/arm/boot/dts/overlay/rockchip-w1-gpio.dts
|
||||
|
||||
diff --git a/arch/arm/boot/dts/overlay/Makefile b/arch/arm/boot/dts/overlay/Makefile
|
||||
new file mode 100644
|
||||
index 00000000000..56d8cb187aa
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/Makefile
|
||||
@@ -0,0 +1,26 @@
|
||||
+# SPDX-License-Identifier: GPL-2.0
|
||||
+dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
|
||||
+ rockchip-ds1307.dtbo \
|
||||
+ rockchip-i2c1.dtbo \
|
||||
+ rockchip-i2c4.dtbo \
|
||||
+ rockchip-spi0.dtbo \
|
||||
+ rockchip-spi2.dtbo \
|
||||
+ rockchip-spidev0.dtbo \
|
||||
+ rockchip-spidev2.dtbo \
|
||||
+ rockchip-uart1.dtbo \
|
||||
+ rockchip-uart2.dtbo \
|
||||
+ rockchip-uart3.dtbo \
|
||||
+ rockchip-uart4.dtbo \
|
||||
+ rockchip-w1-gpio.dtbo
|
||||
+
|
||||
+scr-$(CONFIG_ARCH_ROCKCHIP) += \
|
||||
+ rockchip-fixup.scr
|
||||
+
|
||||
+dtbotxt-$(CONFIG_ARCH_ROCKCHIP) += \
|
||||
+ README.rockchip-overlays
|
||||
+
|
||||
+targets += $(dtbo-y) $(scr-y) $(dtbotxt-y)
|
||||
+
|
||||
+always := $(dtbo-y) $(scr-y) $(dtbotxt-y)
|
||||
+clean-files := *.dtbo *.scr
|
||||
+
|
||||
diff --git a/arch/arm/boot/dts/overlay/README.rockchip-overlays b/arch/arm/boot/dts/overlay/README.rockchip-overlays
|
||||
new file mode 100644
|
||||
index 00000000000..df4559ca262
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/README.rockchip-overlays
|
||||
@@ -0,0 +1,78 @@
|
||||
+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:
|
||||
+
|
||||
+rockchip (Rockchip)
|
||||
+
|
||||
+### Provided overlays:
|
||||
+
|
||||
+- ds1307
|
||||
+- i2c1
|
||||
+- i2c4
|
||||
+- spi0
|
||||
+- spi2
|
||||
+- spidev0
|
||||
+- spidev2
|
||||
+- uart1
|
||||
+- uart2
|
||||
+- uart3
|
||||
+- uart4
|
||||
+- w1-gpio
|
||||
+
|
||||
+### Overlay details:
|
||||
+
|
||||
+### ds1307
|
||||
+
|
||||
+Activates ds1307 rtc on i2c1
|
||||
+
|
||||
+### i2c1
|
||||
+
|
||||
+Activate i2c1
|
||||
+
|
||||
+### i2c4
|
||||
+
|
||||
+Activate i2c4
|
||||
+
|
||||
+### spi0
|
||||
+
|
||||
+Activate spi0
|
||||
+conflicts with uart4
|
||||
+
|
||||
+### spi2
|
||||
+
|
||||
+Activate spi2
|
||||
+
|
||||
+### spidev0
|
||||
+
|
||||
+Activate spidev on spi0
|
||||
+Depends on spi0
|
||||
+
|
||||
+### spidev2
|
||||
+
|
||||
+Activate spidev on spi2
|
||||
+depends on spi2
|
||||
+
|
||||
+### uart1
|
||||
+
|
||||
+Activate uart1
|
||||
+
|
||||
+### uart2
|
||||
+
|
||||
+Activate uart2
|
||||
+
|
||||
+### uart3
|
||||
+
|
||||
+Activate uart3
|
||||
+
|
||||
+### uart4
|
||||
+
|
||||
+Activate uart4
|
||||
+Conflicts with spi0
|
||||
+
|
||||
+### w1-gpio
|
||||
+
|
||||
+Activates 1-wire gpio master on GPIO0 17
|
||||
+
|
||||
+
|
||||
diff --git a/arch/arm/boot/dts/overlay/rockchip-ds1307.dts b/arch/arm/boot/dts/overlay/rockchip-ds1307.dts
|
||||
new file mode 100644
|
||||
index 00000000000..ab7d648c2aa
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/rockchip-ds1307.dts
|
||||
@@ -0,0 +1,23 @@
|
||||
+/* Definitions for ds1307
|
||||
+* From ASUS: https://github.com/TinkerBoard/debian_kernel/commits/develop/arch/arm/boot/dts/overlays/ds1307-overlay.dts
|
||||
+*/
|
||||
+
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "rockchip,rk3288";
|
||||
+
|
||||
+ fragment@0 {
|
||||
+ target = <&i2c1>;
|
||||
+ __overlay__ {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ rtc: ds1307@68 {
|
||||
+ compatible = "dallas,ds1307";
|
||||
+ reg = <0x68>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/overlay/rockchip-fixup.scr-cmd b/arch/arm/boot/dts/overlay/rockchip-fixup.scr-cmd
|
||||
new file mode 100644
|
||||
index 00000000000..d4c39e20a3a
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/rockchip-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/arm/boot/dts/overlay/rockchip-i2c1.dts b/arch/arm/boot/dts/overlay/rockchip-i2c1.dts
|
||||
new file mode 100644
|
||||
index 00000000000..f09f85e42cb
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/rockchip-i2c1.dts
|
||||
@@ -0,0 +1,16 @@
|
||||
+/* Definitions for i2c1
|
||||
+*/
|
||||
+
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "rockchip,rk3288";
|
||||
+
|
||||
+ fragment@0 {
|
||||
+ target = <&i2c1>;
|
||||
+ __overlay__ {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/overlay/rockchip-i2c4.dts b/arch/arm/boot/dts/overlay/rockchip-i2c4.dts
|
||||
new file mode 100644
|
||||
index 00000000000..5b43b85045f
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/rockchip-i2c4.dts
|
||||
@@ -0,0 +1,16 @@
|
||||
+/* Definitions for i2c4
|
||||
+*/
|
||||
+
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "rockchip,rk3288";
|
||||
+
|
||||
+ fragment@0 {
|
||||
+ target = <&i2c4>;
|
||||
+ __overlay__ {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/overlay/rockchip-spi0.dts b/arch/arm/boot/dts/overlay/rockchip-spi0.dts
|
||||
new file mode 100644
|
||||
index 00000000000..d2dfcd6220e
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/rockchip-spi0.dts
|
||||
@@ -0,0 +1,16 @@
|
||||
+/* Definitions for spi0
|
||||
+*/
|
||||
+
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "rockchip,rk3288";
|
||||
+
|
||||
+ fragment@0 {
|
||||
+ target = <&spi0>;
|
||||
+ __overlay__ {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/overlay/rockchip-spi2.dts b/arch/arm/boot/dts/overlay/rockchip-spi2.dts
|
||||
new file mode 100644
|
||||
index 00000000000..2cd50ae4b9d
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/rockchip-spi2.dts
|
||||
@@ -0,0 +1,16 @@
|
||||
+/* Definitions for spi2
|
||||
+*/
|
||||
+
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "rockchip,rk3288";
|
||||
+
|
||||
+ fragment@0 {
|
||||
+ target = <&spi2>;
|
||||
+ __overlay__ {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/overlay/rockchip-spidev0.dts b/arch/arm/boot/dts/overlay/rockchip-spidev0.dts
|
||||
new file mode 100644
|
||||
index 00000000000..728cde52351
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/rockchip-spidev0.dts
|
||||
@@ -0,0 +1,35 @@
|
||||
+/* Definition for SPI0 Spidev
|
||||
+ * spi port for Tinker Board
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/{
|
||||
+ compatible = "rockchip,rk3288";
|
||||
+
|
||||
+ fragment@0 {
|
||||
+
|
||||
+ target = <&spi0>;
|
||||
+ __overlay__ {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ spidev@0 {
|
||||
+ compatible = "rockchip,spi_tinker";
|
||||
+ reg = <0>;
|
||||
+ spi-max-frequency = <50000000>;
|
||||
+ spi-cpha = <1>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ spidev@1 {
|
||||
+ compatible = "rockchip,spi_tinker";
|
||||
+ reg = <1>;
|
||||
+ spi-max-frequency = <50000000>;
|
||||
+ spi-cpha = <1>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/overlay/rockchip-spidev2.dts b/arch/arm/boot/dts/overlay/rockchip-spidev2.dts
|
||||
new file mode 100644
|
||||
index 00000000000..262bb61d959
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/rockchip-spidev2.dts
|
||||
@@ -0,0 +1,35 @@
|
||||
+/* Definition for SPI2 Spidev
|
||||
+ * spi port for Tinker Board
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/{
|
||||
+ compatible = "rockchip,rk3288";
|
||||
+
|
||||
+ fragment@0 {
|
||||
+
|
||||
+ target = <&spi2>;
|
||||
+ __overlay__ {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ spidev@0 {
|
||||
+ compatible = "rockchip,spi_tinker";
|
||||
+ reg = <0>;
|
||||
+ spi-max-frequency = <50000000>;
|
||||
+ spi-cpha = <1>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ spidev@1 {
|
||||
+ compatible = "rockchip,spi_tinker";
|
||||
+ reg = <1>;
|
||||
+ spi-max-frequency = <50000000>;
|
||||
+ spi-cpha = <1>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/overlay/rockchip-uart1.dts b/arch/arm/boot/dts/overlay/rockchip-uart1.dts
|
||||
new file mode 100644
|
||||
index 00000000000..8604ff90d2a
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/rockchip-uart1.dts
|
||||
@@ -0,0 +1,16 @@
|
||||
+/* Definitions for uart1
|
||||
+*/
|
||||
+
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "rockchip,rk3288";
|
||||
+
|
||||
+ fragment@0 {
|
||||
+ target = <&uart1>;
|
||||
+ __overlay__ {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/overlay/rockchip-uart2.dts b/arch/arm/boot/dts/overlay/rockchip-uart2.dts
|
||||
new file mode 100644
|
||||
index 00000000000..a57873d560b
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/rockchip-uart2.dts
|
||||
@@ -0,0 +1,16 @@
|
||||
+/* Definitions for uart2
|
||||
+*/
|
||||
+
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "rockchip,rk3288";
|
||||
+
|
||||
+ fragment@0 {
|
||||
+ target = <&uart2>;
|
||||
+ __overlay__ {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/overlay/rockchip-uart3.dts b/arch/arm/boot/dts/overlay/rockchip-uart3.dts
|
||||
new file mode 100644
|
||||
index 00000000000..d1b77ffbf31
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/rockchip-uart3.dts
|
||||
@@ -0,0 +1,16 @@
|
||||
+/* Definitions for uart3
|
||||
+*/
|
||||
+
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "rockchip,rk3288";
|
||||
+
|
||||
+ fragment@0 {
|
||||
+ target = <&uart3>;
|
||||
+ __overlay__ {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/overlay/rockchip-uart4.dts b/arch/arm/boot/dts/overlay/rockchip-uart4.dts
|
||||
new file mode 100644
|
||||
index 00000000000..13fd8f4eca9
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/rockchip-uart4.dts
|
||||
@@ -0,0 +1,16 @@
|
||||
+/* Definitions for uart4
|
||||
+*/
|
||||
+
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "rockchip,rk3288";
|
||||
+
|
||||
+ fragment@0 {
|
||||
+ target = <&uart4>;
|
||||
+ __overlay__ {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/overlay/rockchip-w1-gpio.dts b/arch/arm/boot/dts/overlay/rockchip-w1-gpio.dts
|
||||
new file mode 100644
|
||||
index 00000000000..cc1f50a91bb
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlay/rockchip-w1-gpio.dts
|
||||
@@ -0,0 +1,23 @@
|
||||
+/* 1-Wire GPIO
|
||||
+* From ASUS: https://github.com/TinkerBoard/debian_kernel/blob/develop/arch/arm/boot/dts/overlays/w1-gpio-overlay.dts
|
||||
+*
|
||||
+*
|
||||
+*/
|
||||
+
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "rockchip,rk3288";
|
||||
+ fragment@0 {
|
||||
+ target-path = "/";
|
||||
+ __overlay__ {
|
||||
+ w1: onewire@0 {
|
||||
+ compatible = "w1-gpio";
|
||||
+ pinctrl-names = "default";
|
||||
+ gpios = <&gpio0 17 0>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
--
|
||||
2.30.2
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
|
||||
index 5bd58b95d..48ebe081f 100644
|
||||
--- a/drivers/mmc/core/core.c
|
||||
+++ b/drivers/mmc/core/core.c
|
||||
@@ -1684,6 +1684,14 @@ void mmc_power_off(struct mmc_host *host)
|
||||
if (host->ios.power_mode == MMC_POWER_OFF)
|
||||
return;
|
||||
|
||||
+ mmc_set_initial_signal_voltage(host);
|
||||
+
|
||||
+ /*
|
||||
+ * This delay should be sufficient to allow the power supply
|
||||
+ * to reach the minimum voltage.
|
||||
+ */
|
||||
+ mmc_delay(host->ios.power_delay_ms);
|
||||
+
|
||||
mmc_pwrseq_power_off(host);
|
||||
|
||||
host->ios.clock = 0;
|
||||
1134
patch/kernel/archive/rockchip-6.4/xt-q8l-v10-add-device-tree.patch
Normal file
1134
patch/kernel/archive/rockchip-6.4/xt-q8l-v10-add-device-tree.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,13 @@
|
||||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index 37a3de760..6bcfceede 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -832,6 +832,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \
|
||||
rk3188-radxarock.dtb \
|
||||
rk3228-evb.dtb \
|
||||
rk3229-evb.dtb \
|
||||
+ rk3288-xt-q8l-v10.dtb \
|
||||
rk3229-xms6.dtb \
|
||||
rk3288-evb-act8846.dtb \
|
||||
rk3288-evb-rk808.dtb \
|
||||
|
||||
118
patch/kernel/archive/rockchip-6.4/xt-q8l-v10-remote-keymap.patch
Normal file
118
patch/kernel/archive/rockchip-6.4/xt-q8l-v10-remote-keymap.patch
Normal file
@@ -0,0 +1,118 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paolo Sabatino <paolo.sabatino@gmail.com>
|
||||
Date: Fri, 10 Jun 2022 15:59:15 +0000
|
||||
Subject: add xt-q8l-v10 keymap and makefile
|
||||
|
||||
---
|
||||
drivers/media/rc/keymaps/Makefile | 1 +
|
||||
drivers/media/rc/keymaps/rc-xt-q8l-v10.c | 76 ++++++++++
|
||||
include/media/rc-map.h | 1 +
|
||||
3 files changed, 78 insertions(+)
|
||||
|
||||
diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile
|
||||
index f513ff5caf4e..198ef8bc2614 100644
|
||||
--- a/drivers/media/rc/keymaps/Makefile
|
||||
+++ b/drivers/media/rc/keymaps/Makefile
|
||||
@@ -136,4 +136,5 @@ obj-$(CONFIG_RC_MAP) += \
|
||||
rc-x96max.o \
|
||||
rc-xbox-360.o \
|
||||
rc-xbox-dvd.o \
|
||||
+ rc-xt-q8l-v10.o \
|
||||
rc-zx-irdec.o
|
||||
diff --git a/drivers/media/rc/keymaps/rc-xt-q8l-v10.c b/drivers/media/rc/keymaps/rc-xt-q8l-v10.c
|
||||
new file mode 100644
|
||||
index 000000000000..19c7d9ec8325
|
||||
--- /dev/null
|
||||
+++ b/drivers/media/rc/keymaps/rc-xt-q8l-v10.c
|
||||
@@ -0,0 +1,76 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+// rc-xt-q8l-v10.c - Keytable for xt-q8l-v10 tv box remote controller
|
||||
+//
|
||||
+// keymap imported from ir-keymaps.c
|
||||
+//
|
||||
+// Copyright (c) 2018 Paolo Sabatino
|
||||
+
|
||||
+#include <media/rc-map.h>
|
||||
+#include <linux/module.h>
|
||||
+
|
||||
+/*
|
||||
+
|
||||
+*/
|
||||
+
|
||||
+static struct rc_map_table xt_q8l_v10[] = {
|
||||
+
|
||||
+ { 0xcc1d11, KEY_ENTER },
|
||||
+ { 0xcc1d00, KEY_POWER },
|
||||
+ { 0xcc1d15, KEY_PLAYPAUSE },
|
||||
+ { 0xcc1d16, KEY_STOP },
|
||||
+ { 0xcc1d06, KEY_PREVIOUSSONG },
|
||||
+ { 0xcc1d0a, KEY_NEXTSONG },
|
||||
+ { 0xcc1d41, KEY_1 },
|
||||
+ { 0xcc1d45, KEY_2 },
|
||||
+ { 0xcc1d4d, KEY_3 },
|
||||
+ { 0xcc1d42, KEY_4 },
|
||||
+ { 0xcc1d46, KEY_5 },
|
||||
+ { 0xcc1d4e, KEY_6 },
|
||||
+ { 0xcc1d43, KEY_7 },
|
||||
+ { 0xcc1d47, KEY_8 },
|
||||
+ { 0xcc1d4f, KEY_9 },
|
||||
+ { 0xcc1d49, KEY_0 },
|
||||
+ { 0xcc1d4a, KEY_BACKSPACE },
|
||||
+ { 0xcc1d48, KEY_F6 },
|
||||
+ { 0xcc1d03, KEY_HOME },
|
||||
+ { 0xcc1d0f, KEY_BACK },
|
||||
+ { 0xcc1d40, KEY_MENU },
|
||||
+ { 0xcc1d4c, KEY_TEXT },
|
||||
+ { 0xcc1d10, KEY_LEFT },
|
||||
+ { 0xcc1d12, KEY_RIGHT },
|
||||
+ { 0xcc1d44, KEY_DOWN },
|
||||
+ { 0xcc1d07, KEY_UP },
|
||||
+ { 0xcc1d02, KEY_VOLUMEDOWN },
|
||||
+ { 0xcc1d0c, KEY_MUTE },
|
||||
+ { 0xcc1d0e, KEY_VOLUMEUP },
|
||||
+ { 0xcc1d01, KEY_F1 },
|
||||
+ { 0xcc1d05, KEY_F2 },
|
||||
+ { 0xcc1d09, KEY_F3 },
|
||||
+ { 0xcc1d0d, KEY_F4 },
|
||||
+
|
||||
+};
|
||||
+
|
||||
+static struct rc_map_list xt_q8l_v10_map = {
|
||||
+ .map = {
|
||||
+ .scan = xt_q8l_v10,
|
||||
+ .size = ARRAY_SIZE(xt_q8l_v10),
|
||||
+ .rc_proto = RC_PROTO_NEC, /* Legacy IR type */
|
||||
+ .name = RC_MAP_XT_Q8L_V10,
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+static int __init init_rc_map_xt_q8l_v10(void)
|
||||
+{
|
||||
+ return rc_map_register(&xt_q8l_v10_map);
|
||||
+}
|
||||
+
|
||||
+static void __exit exit_rc_map_xt_q8l_v10(void)
|
||||
+{
|
||||
+ rc_map_unregister(&xt_q8l_v10_map);
|
||||
+}
|
||||
+
|
||||
+module_init(init_rc_map_xt_q8l_v10)
|
||||
+module_exit(exit_rc_map_xt_q8l_v10)
|
||||
+
|
||||
+MODULE_LICENSE("GPL");
|
||||
+MODULE_AUTHOR("Paolo Sabatino");
|
||||
diff --git a/include/media/rc-map.h b/include/media/rc-map.h
|
||||
index 793b54342dff..ef7f3710eafe 100644
|
||||
--- a/include/media/rc-map.h
|
||||
+++ b/include/media/rc-map.h
|
||||
@@ -343,6 +343,7 @@ struct rc_map *rc_map_get(const char *name);
|
||||
#define RC_MAP_X96MAX "rc-x96max"
|
||||
#define RC_MAP_XBOX_360 "rc-xbox-360"
|
||||
#define RC_MAP_XBOX_DVD "rc-xbox-dvd"
|
||||
+#define RC_MAP_XT_Q8L_V10 "rc-xt-q8l-v10"
|
||||
#define RC_MAP_ZX_IRDEC "rc-zx-irdec"
|
||||
|
||||
/*
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -1 +1 @@
|
||||
archive/rockchip-6.3
|
||||
archive/rockchip-6.4
|
||||
Reference in New Issue
Block a user