mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-02-12 19:31:52 +00:00
Add first patches for ipq806x, not yet working
This commit is contained in:
parent
8b0902eedc
commit
7ba6ee7b09
26 changed files with 2950 additions and 0 deletions
505
root/target/linux/ipq806x/config-5.15
Normal file
505
root/target/linux/ipq806x/config-5.15
Normal file
|
@ -0,0 +1,505 @@
|
|||
CONFIG_ALIGNMENT_TRAP=y
|
||||
# CONFIG_APQ_GCC_8084 is not set
|
||||
# CONFIG_APQ_MMCC_8084 is not set
|
||||
CONFIG_AR8216_PHY=y
|
||||
CONFIG_ARCH_32BIT_OFF_T=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
# CONFIG_ARCH_IPQ40XX is not set
|
||||
CONFIG_ARCH_KEEP_MEMBLOCK=y
|
||||
# CONFIG_ARCH_MDM9615 is not set
|
||||
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
|
||||
CONFIG_ARCH_MSM8960=y
|
||||
CONFIG_ARCH_MSM8974=y
|
||||
CONFIG_ARCH_MSM8X60=y
|
||||
CONFIG_ARCH_MULTIPLATFORM=y
|
||||
CONFIG_ARCH_MULTI_V6_V7=y
|
||||
CONFIG_ARCH_MULTI_V7=y
|
||||
CONFIG_ARCH_NR_GPIO=0
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
|
||||
CONFIG_ARCH_QCOM=y
|
||||
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
|
||||
CONFIG_ARCH_SPARSEMEM_ENABLE=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARM_AMBA=y
|
||||
CONFIG_ARM_APPENDED_DTB=y
|
||||
CONFIG_ARM_ARCH_TIMER=y
|
||||
CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
|
||||
CONFIG_ARM_ATAG_DTB_COMPAT=y
|
||||
# CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER is not set
|
||||
CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE=y
|
||||
CONFIG_ARM_CPUIDLE=y
|
||||
CONFIG_ARM_CPU_SUSPEND=y
|
||||
# CONFIG_ARM_CPU_TOPOLOGY is not set
|
||||
CONFIG_ARM_GIC=y
|
||||
CONFIG_ARM_HAS_SG_CHAIN=y
|
||||
CONFIG_ARM_L1_CACHE_SHIFT=6
|
||||
CONFIG_ARM_L1_CACHE_SHIFT_6=y
|
||||
CONFIG_ARM_MODULE_PLTS=y
|
||||
CONFIG_ARM_PATCH_IDIV=y
|
||||
CONFIG_ARM_PATCH_PHYS_VIRT=y
|
||||
# CONFIG_ARM_QCOM_CPUFREQ_HW is not set
|
||||
CONFIG_ARM_QCOM_CPUFREQ_KRAIT=y
|
||||
CONFIG_ARM_QCOM_CPUFREQ_NVMEM=y
|
||||
CONFIG_ARM_QCOM_SPM_CPUIDLE=y
|
||||
# CONFIG_ARM_SMMU is not set
|
||||
CONFIG_ARM_THUMB=y
|
||||
CONFIG_ARM_UNWIND=y
|
||||
CONFIG_ARM_VIRT_EXT=y
|
||||
CONFIG_AT803X_PHY=y
|
||||
CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_BOUNCE=y
|
||||
# CONFIG_CACHE_L2X0 is not set
|
||||
CONFIG_CLKDEV_LOOKUP=y
|
||||
CONFIG_CLKSRC_QCOM=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_CMDLINE_OVERRIDE=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMMON_CLK_QCOM=y
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_CPUFREQ_DT=y
|
||||
CONFIG_CPUFREQ_DT_PLATDEV=y
|
||||
CONFIG_CPU_32v6K=y
|
||||
CONFIG_CPU_32v7=y
|
||||
CONFIG_CPU_ABRT_EV7=y
|
||||
CONFIG_CPU_CACHE_V7=y
|
||||
CONFIG_CPU_CACHE_VIPT=y
|
||||
CONFIG_CPU_COPY_V6=y
|
||||
CONFIG_CPU_CP15=y
|
||||
CONFIG_CPU_CP15_MMU=y
|
||||
CONFIG_CPU_FREQ=y
|
||||
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
|
||||
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
|
||||
CONFIG_CPU_FREQ_GOV_ATTR_SET=y
|
||||
CONFIG_CPU_FREQ_GOV_COMMON=y
|
||||
# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
|
||||
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
|
||||
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
|
||||
# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
|
||||
CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
|
||||
# CONFIG_CPU_FREQ_GOV_USERSPACE is not set
|
||||
CONFIG_CPU_FREQ_STAT=y
|
||||
CONFIG_CPU_HAS_ASID=y
|
||||
CONFIG_CPU_IDLE=y
|
||||
CONFIG_CPU_IDLE_GOV_LADDER=y
|
||||
CONFIG_CPU_IDLE_GOV_MENU=y
|
||||
CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y
|
||||
CONFIG_CPU_PABRT_V7=y
|
||||
CONFIG_CPU_PM=y
|
||||
CONFIG_CPU_RMAP=y
|
||||
CONFIG_CPU_SPECTRE=y
|
||||
CONFIG_CPU_THERMAL=y
|
||||
CONFIG_CPU_THUMB_CAPABLE=y
|
||||
CONFIG_CPU_TLB_V7=y
|
||||
CONFIG_CPU_V7=y
|
||||
CONFIG_CRC16=y
|
||||
# CONFIG_CRC32_SARWATE is not set
|
||||
CONFIG_CRC32_SLICEBY8=y
|
||||
CONFIG_CRYPTO_ACOMP2=y
|
||||
CONFIG_CRYPTO_AEAD=y
|
||||
CONFIG_CRYPTO_AEAD2=y
|
||||
CONFIG_CRYPTO_DEFLATE=y
|
||||
CONFIG_CRYPTO_DEV_QCOM_RNG=y
|
||||
CONFIG_CRYPTO_DRBG=y
|
||||
CONFIG_CRYPTO_DRBG_HMAC=y
|
||||
CONFIG_CRYPTO_DRBG_MENU=y
|
||||
CONFIG_CRYPTO_HASH=y
|
||||
CONFIG_CRYPTO_HASH2=y
|
||||
CONFIG_CRYPTO_HASH_INFO=y
|
||||
CONFIG_CRYPTO_HMAC=y
|
||||
CONFIG_CRYPTO_HW=y
|
||||
CONFIG_CRYPTO_JITTERENTROPY=y
|
||||
CONFIG_CRYPTO_LIB_SHA256=y
|
||||
CONFIG_CRYPTO_LZO=y
|
||||
CONFIG_CRYPTO_MANAGER=y
|
||||
CONFIG_CRYPTO_MANAGER2=y
|
||||
CONFIG_CRYPTO_NULL2=y
|
||||
CONFIG_CRYPTO_RNG=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_CRYPTO_ZSTD=y
|
||||
CONFIG_DCACHE_WORD_ACCESS=y
|
||||
CONFIG_DEBUG_GPIO=y
|
||||
CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
|
||||
# CONFIG_DEVFREQ_GOV_PASSIVE is not set
|
||||
# CONFIG_DEVFREQ_GOV_PERFORMANCE is not set
|
||||
# CONFIG_DEVFREQ_GOV_POWERSAVE is not set
|
||||
# CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND is not set
|
||||
# CONFIG_DEVFREQ_GOV_USERSPACE is not set
|
||||
# CONFIG_DEVFREQ_THERMAL is not set
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_DMA_ENGINE=y
|
||||
CONFIG_DMA_OF=y
|
||||
CONFIG_DMA_OPS=y
|
||||
CONFIG_DMA_REMAP=y
|
||||
CONFIG_DMA_VIRTUAL_CHANNELS=y
|
||||
CONFIG_DTC=y
|
||||
CONFIG_DT_IDLE_STATES=y
|
||||
# CONFIG_DWMAC_GENERIC is not set
|
||||
CONFIG_DWMAC_IPQ806X=y
|
||||
# CONFIG_DWMAC_QCOM_ETHQOS is not set
|
||||
CONFIG_DYNAMIC_DEBUG=y
|
||||
CONFIG_EDAC_ATOMIC_SCRUB=y
|
||||
CONFIG_EDAC_SUPPORT=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FIX_EARLYCON_MEM=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_GENERIC_ALLOCATOR=y
|
||||
CONFIG_GENERIC_BUG=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_EARLY_IOREMAP=y
|
||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
||||
CONFIG_GENERIC_IDLE_POLL_SETUP=y
|
||||
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
||||
CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
|
||||
CONFIG_GENERIC_MSI_IRQ=y
|
||||
CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_PHY=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_GENERIC_PINCTRL_GROUPS=y
|
||||
CONFIG_GENERIC_PINMUX_FUNCTIONS=y
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GENERIC_STRNCPY_FROM_USER=y
|
||||
CONFIG_GENERIC_STRNLEN_USER=y
|
||||
CONFIG_GENERIC_TIME_VSYSCALL=y
|
||||
CONFIG_GENERIC_VDSO_32=y
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_GPIOLIB_IRQCHIP=y
|
||||
CONFIG_GRO_CELLS=y
|
||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||
CONFIG_HARDEN_BRANCH_PREDICTOR=y
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HAVE_SMP=y
|
||||
CONFIG_HIGHMEM=y
|
||||
# CONFIG_HIGHPTE is not set
|
||||
CONFIG_HWMON=y
|
||||
CONFIG_HWSPINLOCK=y
|
||||
CONFIG_HWSPINLOCK_QCOM=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HZ=100
|
||||
CONFIG_HZ_100=y
|
||||
CONFIG_HZ_FIXED=0
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_I2C_HELPER_AUTO=y
|
||||
# CONFIG_I2C_QCOM_CCI is not set
|
||||
CONFIG_I2C_QUP=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
# CONFIG_IOMMU_DEBUGFS is not set
|
||||
# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
|
||||
# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set
|
||||
CONFIG_IOMMU_SUPPORT=y
|
||||
# CONFIG_IPQ_APSS_PLL is not set
|
||||
# CONFIG_IPQ_GCC_4019 is not set
|
||||
# CONFIG_IPQ_GCC_6018 is not set
|
||||
CONFIG_IPQ_GCC_806X=y
|
||||
# CONFIG_IPQ_GCC_8074 is not set
|
||||
# CONFIG_IPQ_LCC_806X is not set
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_DOMAIN_HIERARCHY=y
|
||||
CONFIG_IRQ_FASTEOI_HIERARCHY_HANDLERS=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
CONFIG_KPSS_XCC=y
|
||||
CONFIG_KRAITCC=y
|
||||
CONFIG_KRAIT_CLOCKS=y
|
||||
CONFIG_KRAIT_L2_ACCESSORS=y
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LLD_VERSION=0
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LOCK_SPIN_ON_OWNER=y
|
||||
CONFIG_LZO_COMPRESS=y
|
||||
CONFIG_LZO_DECOMPRESS=y
|
||||
CONFIG_MDIO_BITBANG=y
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MDIO_GPIO=y
|
||||
CONFIG_MDIO_IPQ8064=y
|
||||
# CONFIG_MDM_GCC_9615 is not set
|
||||
# CONFIG_MDM_LCC_9615 is not set
|
||||
CONFIG_MEMFD_CREATE=y
|
||||
# CONFIG_MFD_HI6421_SPMI is not set
|
||||
CONFIG_MFD_QCOM_RPM=y
|
||||
# CONFIG_MFD_SPMI_PMIC is not set
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MIGHT_HAVE_CACHE_L2X0=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_ARMMMCI=y
|
||||
CONFIG_MMC_BLOCK=y
|
||||
CONFIG_MMC_BLOCK_MINORS=16
|
||||
CONFIG_MMC_CQHCI=y
|
||||
CONFIG_MMC_QCOM_DML=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_IO_ACCESSORS=y
|
||||
CONFIG_MMC_SDHCI_MSM=y
|
||||
# CONFIG_MMC_SDHCI_PCI is not set
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
# CONFIG_MMC_TIFM_SD is not set
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
CONFIG_MSM_GCC_8660=y
|
||||
# CONFIG_MSM_GCC_8916 is not set
|
||||
# CONFIG_MSM_GCC_8939 is not set
|
||||
# CONFIG_MSM_GCC_8960 is not set
|
||||
# CONFIG_MSM_GCC_8974 is not set
|
||||
# CONFIG_MSM_GCC_8994 is not set
|
||||
# CONFIG_MSM_GCC_8996 is not set
|
||||
# CONFIG_MSM_GCC_8998 is not set
|
||||
# CONFIG_MSM_GPUCC_8998 is not set
|
||||
# CONFIG_MSM_IOMMU is not set
|
||||
# CONFIG_MSM_LCC_8960 is not set
|
||||
# CONFIG_MSM_MMCC_8960 is not set
|
||||
# CONFIG_MSM_MMCC_8974 is not set
|
||||
# CONFIG_MSM_MMCC_8996 is not set
|
||||
# CONFIG_MSM_MMCC_8998 is not set
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
CONFIG_MTD_NAND_CORE=y
|
||||
CONFIG_MTD_NAND_ECC=y
|
||||
CONFIG_MTD_NAND_ECC_SW_HAMMING=y
|
||||
CONFIG_MTD_NAND_QCOM=y
|
||||
CONFIG_MTD_QCOMSMEM_PARTS=y
|
||||
CONFIG_MTD_RAW_NAND=y
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_MTD_SPLIT_FIRMWARE=y
|
||||
CONFIG_MTD_SPLIT_FIT_FW=y
|
||||
CONFIG_MTD_SPLIT_UIMAGE_FW=y
|
||||
CONFIG_MTD_UBI=y
|
||||
CONFIG_MTD_UBI_BEB_LIMIT=20
|
||||
CONFIG_MTD_UBI_BLOCK=y
|
||||
CONFIG_MTD_UBI_WL_THRESHOLD=4096
|
||||
CONFIG_MUTEX_SPIN_ON_OWNER=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NEON=y
|
||||
CONFIG_NET_DEVLINK=y
|
||||
CONFIG_NET_DSA=y
|
||||
CONFIG_NET_DSA_QCA8K=y
|
||||
CONFIG_NET_DSA_TAG_QCA=y
|
||||
CONFIG_NET_FLOW_LIMIT=y
|
||||
CONFIG_NET_PTP_CLASSIFY=y
|
||||
CONFIG_NET_SWITCHDEV=y
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_NO_HZ_COMMON=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_NR_CPUS=2
|
||||
CONFIG_NVMEM=y
|
||||
# CONFIG_NVMEM_SPMI_SDAM is not set
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_OF_NET=y
|
||||
CONFIG_OLD_SIGACTION=y
|
||||
CONFIG_OLD_SIGSUSPEND3=y
|
||||
CONFIG_PADATA=y
|
||||
CONFIG_PAGE_OFFSET=0xC0000000
|
||||
CONFIG_PAGE_POOL=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCIEAER=y
|
||||
CONFIG_PCIEPORTBUS=y
|
||||
CONFIG_PCIE_DW=y
|
||||
CONFIG_PCIE_DW_HOST=y
|
||||
CONFIG_PCIE_QCOM=y
|
||||
CONFIG_PCI_DEBUG=y
|
||||
CONFIG_PCI_DISABLE_COMMON_QUIRKS=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DOMAINS_GENERIC=y
|
||||
CONFIG_PCI_MSI=y
|
||||
CONFIG_PCI_MSI_IRQ_DOMAIN=y
|
||||
CONFIG_PCS_XPCS=y
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHYLINK=y
|
||||
# CONFIG_PHY_QCOM_APQ8064_SATA is not set
|
||||
# CONFIG_PHY_QCOM_IPQ4019_USB is not set
|
||||
CONFIG_PHY_QCOM_IPQ806X_SATA=y
|
||||
# CONFIG_PHY_QCOM_IPQ806X_USB is not set
|
||||
# CONFIG_PHY_QCOM_PCIE2 is not set
|
||||
# CONFIG_PHY_QCOM_QMP is not set
|
||||
# CONFIG_PHY_QCOM_QUSB2 is not set
|
||||
# CONFIG_PHY_QCOM_USB_HS_28NM is not set
|
||||
# CONFIG_PHY_QCOM_USB_SNPS_FEMTO_V2 is not set
|
||||
# CONFIG_PHY_QCOM_USB_SS is not set
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_APQ8064 is not set
|
||||
# CONFIG_PINCTRL_APQ8084 is not set
|
||||
# CONFIG_PINCTRL_IPQ4019 is not set
|
||||
# CONFIG_PINCTRL_IPQ6018 is not set
|
||||
CONFIG_PINCTRL_IPQ8064=y
|
||||
# CONFIG_PINCTRL_IPQ8074 is not set
|
||||
# CONFIG_PINCTRL_MDM9615 is not set
|
||||
CONFIG_PINCTRL_MSM=y
|
||||
# CONFIG_PINCTRL_MSM8226 is not set
|
||||
# CONFIG_PINCTRL_MSM8660 is not set
|
||||
# CONFIG_PINCTRL_MSM8916 is not set
|
||||
# CONFIG_PINCTRL_MSM8960 is not set
|
||||
# CONFIG_PINCTRL_MSM8976 is not set
|
||||
# CONFIG_PINCTRL_MSM8994 is not set
|
||||
# CONFIG_PINCTRL_MSM8996 is not set
|
||||
# CONFIG_PINCTRL_MSM8998 is not set
|
||||
# CONFIG_PINCTRL_QCOM_SPMI_PMIC is not set
|
||||
# CONFIG_PINCTRL_QCOM_SSBI_PMIC is not set
|
||||
# CONFIG_PINCTRL_QCS404 is not set
|
||||
# CONFIG_PINCTRL_SC7180 is not set
|
||||
# CONFIG_PINCTRL_SDM660 is not set
|
||||
# CONFIG_PINCTRL_SDM845 is not set
|
||||
# CONFIG_PINCTRL_SM8150 is not set
|
||||
# CONFIG_PINCTRL_SM8250 is not set
|
||||
CONFIG_PM_DEVFREQ=y
|
||||
# CONFIG_PM_DEVFREQ_EVENT is not set
|
||||
CONFIG_PM_OPP=y
|
||||
CONFIG_POWER_RESET=y
|
||||
CONFIG_POWER_RESET_MSM=y
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
CONFIG_PPS=y
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_PTP_1588_CLOCK=y
|
||||
# CONFIG_QCOM_A53PLL is not set
|
||||
CONFIG_QCOM_ADM=y
|
||||
CONFIG_QCOM_BAM_DMA=y
|
||||
CONFIG_QCOM_CLK_RPM=y
|
||||
# CONFIG_QCOM_COMMAND_DB is not set
|
||||
# CONFIG_QCOM_CPR is not set
|
||||
# CONFIG_QCOM_EBI2 is not set
|
||||
# CONFIG_QCOM_GENI_SE is not set
|
||||
CONFIG_QCOM_GSBI=y
|
||||
CONFIG_QCOM_HFPLL=y
|
||||
# CONFIG_QCOM_IOMMU is not set
|
||||
# CONFIG_QCOM_LLCC is not set
|
||||
# CONFIG_QCOM_OCMEM is not set
|
||||
# CONFIG_QCOM_PDC is not set
|
||||
CONFIG_QCOM_QFPROM=y
|
||||
# CONFIG_QCOM_RMTFS_MEM is not set
|
||||
CONFIG_QCOM_RPMCC=y
|
||||
# CONFIG_QCOM_RPMH is not set
|
||||
CONFIG_QCOM_SCM=y
|
||||
# CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT is not set
|
||||
CONFIG_QCOM_SMEM=y
|
||||
# CONFIG_QCOM_SMSM is not set
|
||||
# CONFIG_QCOM_SOCINFO is not set
|
||||
CONFIG_QCOM_TCSR=y
|
||||
CONFIG_QCOM_TSENS=y
|
||||
CONFIG_QCOM_WDT=y
|
||||
# CONFIG_QCS_GCC_404 is not set
|
||||
# CONFIG_QCS_Q6SSTOP_404 is not set
|
||||
# CONFIG_QCS_TURING_404 is not set
|
||||
CONFIG_RAS=y
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
# CONFIG_REGULATOR_QCOM_LABIBB is not set
|
||||
CONFIG_REGULATOR_QCOM_RPM=y
|
||||
# CONFIG_REGULATOR_QCOM_SPMI is not set
|
||||
# CONFIG_REGULATOR_QCOM_USB_VBUS is not set
|
||||
# CONFIG_REGULATOR_VQMMC_IPQ4019 is not set
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
# CONFIG_RESET_QCOM_AOSS is not set
|
||||
# CONFIG_RESET_QCOM_PDC is not set
|
||||
CONFIG_RFS_ACCEL=y
|
||||
CONFIG_RPS=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_I2C_AND_SPI=y
|
||||
CONFIG_RTC_MC146818_LIB=y
|
||||
CONFIG_RWSEM_SPIN_ON_OWNER=y
|
||||
# CONFIG_SC_DISPCC_7180 is not set
|
||||
# CONFIG_SC_GCC_7180 is not set
|
||||
# CONFIG_SC_GPUCC_7180 is not set
|
||||
# CONFIG_SC_LPASS_CORECC_7180 is not set
|
||||
# CONFIG_SC_MSS_7180 is not set
|
||||
# CONFIG_SC_VIDEOCC_7180 is not set
|
||||
# CONFIG_SDM_CAMCC_845 is not set
|
||||
# CONFIG_SDM_DISPCC_845 is not set
|
||||
# CONFIG_SDM_GCC_660 is not set
|
||||
# CONFIG_SDM_GCC_845 is not set
|
||||
# CONFIG_SDM_GPUCC_845 is not set
|
||||
# CONFIG_SDM_LPASSCC_845 is not set
|
||||
# CONFIG_SDM_VIDEOCC_845 is not set
|
||||
CONFIG_SERIAL_8250_FSL=y
|
||||
CONFIG_SERIAL_MCTRL_GPIO=y
|
||||
CONFIG_SERIAL_MSM=y
|
||||
CONFIG_SERIAL_MSM_CONSOLE=y
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SMP_ON_UP=y
|
||||
# CONFIG_SM_GCC_8150 is not set
|
||||
# CONFIG_SM_GCC_8250 is not set
|
||||
# CONFIG_SM_GPUCC_8150 is not set
|
||||
# CONFIG_SM_GPUCC_8250 is not set
|
||||
# CONFIG_SM_VIDEOCC_8150 is not set
|
||||
# CONFIG_SM_VIDEOCC_8250 is not set
|
||||
CONFIG_SPARSE_IRQ=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_MEM=y
|
||||
CONFIG_SPI_QUP=y
|
||||
CONFIG_SPMI=y
|
||||
# CONFIG_SPMI_HISI3670 is not set
|
||||
CONFIG_SPMI_MSM_PMIC_ARB=y
|
||||
# CONFIG_SPMI_PMIC_CLKDIV is not set
|
||||
CONFIG_SRCU=y
|
||||
CONFIG_STMMAC_ETH=y
|
||||
CONFIG_STMMAC_PLATFORM=y
|
||||
# CONFIG_STMMAC_SELFTESTS is not set
|
||||
CONFIG_SWCONFIG=y
|
||||
CONFIG_SWCONFIG_LEDS=y
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_SWP_EMULATE=y
|
||||
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
||||
CONFIG_THERMAL=y
|
||||
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
|
||||
CONFIG_THERMAL_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_HWMON=y
|
||||
CONFIG_THERMAL_OF=y
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TIMER_OF=y
|
||||
CONFIG_TIMER_PROBE=y
|
||||
CONFIG_TREE_RCU=y
|
||||
CONFIG_TREE_SRCU=y
|
||||
CONFIG_UBIFS_FS=y
|
||||
CONFIG_UBIFS_FS_ADVANCED_COMPR=y
|
||||
CONFIG_UBIFS_FS_LZO=y
|
||||
CONFIG_UBIFS_FS_ZLIB=y
|
||||
CONFIG_UBIFS_FS_ZSTD=y
|
||||
# CONFIG_UCLAMP_TASK is not set
|
||||
CONFIG_UEVENT_HELPER_PATH=""
|
||||
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
|
||||
CONFIG_UNWINDER_ARM=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USE_OF=y
|
||||
CONFIG_VFP=y
|
||||
CONFIG_VFPv3=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_XPS=y
|
||||
CONFIG_XXHASH=y
|
||||
CONFIG_XZ_DEC_ARM=y
|
||||
CONFIG_XZ_DEC_BCJ=y
|
||||
CONFIG_ZBOOT_ROM_BSS=0
|
||||
CONFIG_ZBOOT_ROM_TEXT=0
|
||||
CONFIG_ZLIB_DEFLATE=y
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
CONFIG_ZSTD_COMPRESS=y
|
||||
CONFIG_ZSTD_DECOMPRESS=y
|
|
@ -0,0 +1,71 @@
|
|||
From 28d0ed88f536dd639adf1b0c7c08e04be3c8f294 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Pedersen <twp@codeaurora.org>
|
||||
Date: Mon, 16 May 2016 17:58:50 -0700
|
||||
Subject: [PATCH 01/69] dtbindings: qcom_adm: Fix channel specifiers
|
||||
|
||||
Original patch from Andy Gross.
|
||||
|
||||
This patch removes the crci information from the dma
|
||||
channel property. At least one client device requires
|
||||
using more than one CRCI value for a channel. This does
|
||||
not match the current binding and the crci information
|
||||
needs to be removed.
|
||||
|
||||
Instead, the client device will provide this information
|
||||
via other means.
|
||||
|
||||
Signed-off-by: Andy Gross <agross@codeaurora.org>
|
||||
Signed-off-by: Thomas Pedersen <twp@codeaurora.org>
|
||||
---
|
||||
Documentation/devicetree/bindings/dma/qcom_adm.txt | 16 ++++++----------
|
||||
1 file changed, 6 insertions(+), 10 deletions(-)
|
||||
|
||||
--- a/Documentation/devicetree/bindings/dma/qcom_adm.txt
|
||||
+++ b/Documentation/devicetree/bindings/dma/qcom_adm.txt
|
||||
@@ -4,8 +4,7 @@ Required properties:
|
||||
- compatible: must contain "qcom,adm" for IPQ/APQ8064 and MSM8960
|
||||
- reg: Address range for DMA registers
|
||||
- interrupts: Should contain one interrupt shared by all channels
|
||||
-- #dma-cells: must be <2>. First cell denotes the channel number. Second cell
|
||||
- denotes CRCI (client rate control interface) flow control assignment.
|
||||
+- #dma-cells: must be <1>. First cell denotes the channel number.
|
||||
- clocks: Should contain the core clock and interface clock.
|
||||
- clock-names: Must contain "core" for the core clock and "iface" for the
|
||||
interface clock.
|
||||
@@ -22,7 +21,7 @@ Example:
|
||||
compatible = "qcom,adm";
|
||||
reg = <0x18300000 0x100000>;
|
||||
interrupts = <0 170 0>;
|
||||
- #dma-cells = <2>;
|
||||
+ #dma-cells = <1>;
|
||||
|
||||
clocks = <&gcc ADM0_CLK>, <&gcc ADM0_PBUS_CLK>;
|
||||
clock-names = "core", "iface";
|
||||
@@ -35,15 +34,12 @@ Example:
|
||||
qcom,ee = <0>;
|
||||
};
|
||||
|
||||
-DMA clients must use the format descripted in the dma.txt file, using a three
|
||||
+DMA clients must use the format descripted in the dma.txt file, using a two
|
||||
cell specifier for each channel.
|
||||
|
||||
-Each dmas request consists of 3 cells:
|
||||
+Each dmas request consists of two cells:
|
||||
1. phandle pointing to the DMA controller
|
||||
2. channel number
|
||||
- 3. CRCI assignment, if applicable. If no CRCI flow control is required, use 0.
|
||||
- The CRCI is used for flow control. It identifies the peripheral device that
|
||||
- is the source/destination for the transferred data.
|
||||
|
||||
Example:
|
||||
|
||||
@@ -55,7 +51,7 @@ Example:
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 0>;
|
||||
|
||||
- dmas = <&adm_dma 6 9>,
|
||||
- <&adm_dma 5 10>;
|
||||
+ dmas = <&adm_dma 6>,
|
||||
+ <&adm_dma 5>;
|
||||
dma-names = "rx", "tx";
|
||||
};
|
|
@ -0,0 +1,29 @@
|
|||
From 48051ece78136e4235a2415a52797db56f8a4478 Mon Sep 17 00:00:00 2001
|
||||
From: Mathieu Olivari <mathieu@codeaurora.org>
|
||||
Date: Tue, 21 Apr 2015 19:09:07 -0700
|
||||
Subject: [PATCH 33/69] ARM: qcom: automatically select PCI_DOMAINS if PCI is
|
||||
enabled
|
||||
|
||||
If multiple PCIe devices are present in the system, the kernel will
|
||||
panic at boot time when trying to scan the PCI buses. This happens on
|
||||
IPQ806x based platforms, which has 3 PCIe ports.
|
||||
|
||||
Enabling this option allows the kernel to assign the pci-domains
|
||||
according to the device-tree content. This allows multiple PCIe
|
||||
controllers to coexist in the system.
|
||||
|
||||
Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>
|
||||
---
|
||||
arch/arm/mach-qcom/Kconfig | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/arch/arm/mach-qcom/Kconfig
|
||||
+++ b/arch/arm/mach-qcom/Kconfig
|
||||
@@ -7,6 +7,7 @@ menuconfig ARCH_QCOM
|
||||
select ARM_AMBA
|
||||
select PINCTRL
|
||||
select QCOM_SCM if SMP
|
||||
+ select PCI_DOMAINS if PCI
|
||||
help
|
||||
Support for Qualcomm's devicetree based systems.
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
From fa71139b55e114aa8c3c4823ff8ee7d49ee810d4 Mon Sep 17 00:00:00 2001
|
||||
From: Mathieu Olivari <mathieu@codeaurora.org>
|
||||
Date: Wed, 29 Apr 2015 15:21:46 -0700
|
||||
Subject: [PATCH 60/69] HACK: arch: arm: force ZRELADDR on arch-qcom
|
||||
|
||||
ARCH_QCOM is using the ARCH_MULTIPLATFORM option, as now recommended
|
||||
on most ARM architectures. This automatically calculate ZRELADDR by
|
||||
masking PHYS_OFFSET with 0xf8000000.
|
||||
|
||||
However, on IPQ806x, the first ~20MB of RAM is reserved for the hardware
|
||||
network accelerators, and the bootloader removes this section from the
|
||||
layout passed from the ATAGS (when used).
|
||||
|
||||
For newer bootloader, when DT is used, this is not a problem, we just
|
||||
reserve this memory in the device tree. But if the bootloader doesn't
|
||||
have DT support, then ATAGS have to be used. In this case, the ARM
|
||||
decompressor will position the kernel in this low mem, which will not be
|
||||
in the RAM section mapped by the bootloader, which means the kernel will
|
||||
freeze in the middle of the boot process trying to map the memory.
|
||||
|
||||
As a work around, this patch allows disabling AUTO_ZRELADDR when
|
||||
ARCH_QCOM is selected. It makes the zImage usage possible on bootloaders
|
||||
which don't support device-tree, which is the case on certain early
|
||||
IPQ806x based designs.
|
||||
|
||||
Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>
|
||||
---
|
||||
arch/arm/Kconfig | 2 +-
|
||||
arch/arm/Makefile | 2 ++
|
||||
arch/arm/mach-qcom/Makefile.boot | 1 +
|
||||
3 files changed, 4 insertions(+), 1 deletion(-)
|
||||
create mode 100644 arch/arm/mach-qcom/Makefile.boot
|
||||
|
||||
--- a/arch/arm/Kconfig
|
||||
+++ b/arch/arm/Kconfig
|
||||
@@ -321,7 +321,7 @@ config ARCH_MULTIPLATFORM
|
||||
select ARCH_SELECT_MEMORY_MODEL
|
||||
select ARM_HAS_SG_CHAIN
|
||||
select ARM_PATCH_PHYS_VIRT
|
||||
- select AUTO_ZRELADDR
|
||||
+ select AUTO_ZRELADDR if !ARCH_QCOM
|
||||
select TIMER_OF
|
||||
select COMMON_CLK
|
||||
select GENERIC_CLOCKEVENTS
|
||||
--- a/arch/arm/Makefile
|
||||
+++ b/arch/arm/Makefile
|
||||
@@ -251,9 +251,11 @@ MACHINE := arch/arm/mach-$(word 1,$(mac
|
||||
else
|
||||
MACHINE :=
|
||||
endif
|
||||
+ifeq ($(CONFIG_ARCH_QCOM),)
|
||||
ifeq ($(CONFIG_ARCH_MULTIPLATFORM),y)
|
||||
MACHINE :=
|
||||
endif
|
||||
+endif
|
||||
|
||||
machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))
|
||||
platdirs := $(patsubst %,arch/arm/plat-%/,$(sort $(plat-y)))
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/mach-qcom/Makefile.boot
|
||||
@@ -0,0 +1 @@
|
||||
+zreladdr-y+= 0x42208000
|
|
@ -0,0 +1,210 @@
|
|||
From 71270226b14733a4b1f2cde58ea9265caa50b38d Mon Sep 17 00:00:00 2001
|
||||
From: Adrian Panella <ianchi74@outlook.com>
|
||||
Date: Thu, 9 Mar 2017 09:37:17 +0100
|
||||
Subject: [PATCH 67/69] generic: Mangle bootloader's kernel arguments
|
||||
|
||||
The command-line arguments provided by the boot loader will be
|
||||
appended to a new device tree property: bootloader-args.
|
||||
If there is a property "append-rootblock" in DT under /chosen
|
||||
and a root= option in bootloaders command line it will be parsed
|
||||
and added to DT bootargs with the form: <append-rootblock>XX.
|
||||
Only command line ATAG will be processed, the rest of the ATAGs
|
||||
sent by bootloader will be ignored.
|
||||
This is usefull in dual boot systems, to get the current root partition
|
||||
without afecting the rest of the system.
|
||||
|
||||
Signed-off-by: Adrian Panella <ianchi74@outlook.com>
|
||||
---
|
||||
arch/arm/Kconfig | 11 +++++
|
||||
arch/arm/boot/compressed/atags_to_fdt.c | 72 ++++++++++++++++++++++++++++++++-
|
||||
init/main.c | 16 ++++++++
|
||||
3 files changed, 98 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/arm/Kconfig
|
||||
+++ b/arch/arm/Kconfig
|
||||
@@ -1780,6 +1780,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN
|
||||
The command-line arguments provided by the boot loader will be
|
||||
appended to the the device tree bootargs property.
|
||||
|
||||
+config ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE
|
||||
+ bool "Append rootblock parsing bootloader's kernel arguments"
|
||||
+ help
|
||||
+ The command-line arguments provided by the boot loader will be
|
||||
+ appended to a new device tree property: bootloader-args.
|
||||
+ If there is a property "append-rootblock" in DT under /chosen
|
||||
+ and a root= option in bootloaders command line it will be parsed
|
||||
+ and added to DT bootargs with the form: <append-rootblock>XX.
|
||||
+ Only command line ATAG will be processed, the rest of the ATAGs
|
||||
+ sent by bootloader will be ignored.
|
||||
+
|
||||
endchoice
|
||||
|
||||
config CMDLINE
|
||||
--- a/arch/arm/boot/compressed/atags_to_fdt.c
|
||||
+++ b/arch/arm/boot/compressed/atags_to_fdt.c
|
||||
@@ -5,6 +5,8 @@
|
||||
|
||||
#if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND)
|
||||
#define do_extend_cmdline 1
|
||||
+#elif defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE)
|
||||
+#define do_extend_cmdline 1
|
||||
#else
|
||||
#define do_extend_cmdline 0
|
||||
#endif
|
||||
@@ -69,6 +71,80 @@ static uint32_t get_cell_size(const void
|
||||
return cell_size;
|
||||
}
|
||||
|
||||
+#if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE)
|
||||
+/**
|
||||
+ * taken from arch/x86/boot/string.c
|
||||
+ * local_strstr - Find the first substring in a %NUL terminated string
|
||||
+ * @s1: The string to be searched
|
||||
+ * @s2: The string to search for
|
||||
+ */
|
||||
+static char *local_strstr(const char *s1, const char *s2)
|
||||
+{
|
||||
+ size_t l1, l2;
|
||||
+
|
||||
+ l2 = strlen(s2);
|
||||
+ if (!l2)
|
||||
+ return (char *)s1;
|
||||
+ l1 = strlen(s1);
|
||||
+ while (l1 >= l2) {
|
||||
+ l1--;
|
||||
+ if (!memcmp(s1, s2, l2))
|
||||
+ return (char *)s1;
|
||||
+ s1++;
|
||||
+ }
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+static char *append_rootblock(char *dest, const char *str, int len, void *fdt)
|
||||
+{
|
||||
+ char *ptr, *end, *tmp;
|
||||
+ char *root="root=";
|
||||
+ char *find_rootblock;
|
||||
+ int i, l;
|
||||
+ const char *rootblock;
|
||||
+
|
||||
+ find_rootblock = getprop(fdt, "/chosen", "find-rootblock", &l);
|
||||
+ if(!find_rootblock)
|
||||
+ find_rootblock = root;
|
||||
+
|
||||
+ //ARM doesn't have __HAVE_ARCH_STRSTR, so it was copied from x86
|
||||
+ ptr = local_strstr(str, find_rootblock);
|
||||
+
|
||||
+ if(!ptr)
|
||||
+ return dest;
|
||||
+
|
||||
+ end = strchr(ptr, ' ');
|
||||
+ end = end ? (end - 1) : (strchr(ptr, 0) - 1);
|
||||
+
|
||||
+ // Some boards ubi.mtd=XX,ZZZZ, so let's check for '," too.
|
||||
+ tmp = strchr(ptr, ',');
|
||||
+
|
||||
+ if(tmp)
|
||||
+ end = end < tmp ? end : tmp - 1;
|
||||
+
|
||||
+ //find partition number (assumes format root=/dev/mtdXX | /dev/mtdblockXX | yy:XX | ubi.mtd=XX,ZZZZ )
|
||||
+ for( i = 0; end >= ptr && *end >= '0' && *end <= '9'; end--, i++);
|
||||
+ ptr = end + 1;
|
||||
+
|
||||
+ /* if append-rootblock property is set use it to append to command line */
|
||||
+ rootblock = getprop(fdt, "/chosen", "append-rootblock", &l);
|
||||
+ if(rootblock != NULL) {
|
||||
+ if(*dest != ' ') {
|
||||
+ *dest = ' ';
|
||||
+ dest++;
|
||||
+ len++;
|
||||
+ }
|
||||
+ if (len + l + i <= COMMAND_LINE_SIZE) {
|
||||
+ memcpy(dest, rootblock, l);
|
||||
+ dest += l - 1;
|
||||
+ memcpy(dest, ptr, i);
|
||||
+ dest += i;
|
||||
+ }
|
||||
+ }
|
||||
+ return dest;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
static void merge_fdt_bootargs(void *fdt, const char *fdt_cmdline)
|
||||
{
|
||||
char cmdline[COMMAND_LINE_SIZE];
|
||||
@@ -88,12 +164,21 @@ static void merge_fdt_bootargs(void *fdt
|
||||
|
||||
/* and append the ATAG_CMDLINE */
|
||||
if (fdt_cmdline) {
|
||||
+
|
||||
+#if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE)
|
||||
+ //save original bootloader args
|
||||
+ //and append ubi.mtd with root partition number to current cmdline
|
||||
+ setprop_string(fdt, "/chosen", "bootloader-args", fdt_cmdline);
|
||||
+ ptr = append_rootblock(ptr, fdt_cmdline, len, fdt);
|
||||
+
|
||||
+#else
|
||||
len = strlen(fdt_cmdline);
|
||||
if (ptr - cmdline + len + 2 < COMMAND_LINE_SIZE) {
|
||||
*ptr++ = ' ';
|
||||
memcpy(ptr, fdt_cmdline, len);
|
||||
ptr += len;
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
*ptr = '\0';
|
||||
|
||||
@@ -168,7 +253,9 @@ int atags_to_fdt(void *atag_list, void *
|
||||
else
|
||||
setprop_string(fdt, "/chosen", "bootargs",
|
||||
atag->u.cmdline.cmdline);
|
||||
- } else if (atag->hdr.tag == ATAG_MEM) {
|
||||
+ }
|
||||
+#ifndef CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE
|
||||
+ else if (atag->hdr.tag == ATAG_MEM) {
|
||||
if (memcount >= sizeof(mem_reg_property)/4)
|
||||
continue;
|
||||
if (!atag->u.mem.size)
|
||||
@@ -212,6 +299,10 @@ int atags_to_fdt(void *atag_list, void *
|
||||
setprop(fdt, "/memory", "reg", mem_reg_property,
|
||||
4 * memcount * memsize);
|
||||
}
|
||||
+#else
|
||||
+
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
return fdt_pack(fdt);
|
||||
}
|
||||
--- a/init/main.c
|
||||
+++ b/init/main.c
|
||||
@@ -110,6 +110,10 @@
|
||||
|
||||
#include <kunit/test.h>
|
||||
|
||||
+#if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE)
|
||||
+#include <linux/of.h>
|
||||
+#endif
|
||||
+
|
||||
static int kernel_init(void *);
|
||||
|
||||
extern void init_IRQ(void);
|
||||
@@ -905,6 +909,18 @@ asmlinkage __visible void __init __no_sa
|
||||
pr_notice("Kernel command line: %s\n", saved_command_line);
|
||||
/* parameters may set static keys */
|
||||
jump_label_init();
|
||||
+
|
||||
+#if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE)
|
||||
+ //Show bootloader's original command line for reference
|
||||
+ if(of_chosen) {
|
||||
+ const char *prop = of_get_property(of_chosen, "bootloader-args", NULL);
|
||||
+ if(prop)
|
||||
+ pr_notice("Bootloader command line (ignored): %s\n", prop);
|
||||
+ else
|
||||
+ pr_notice("Bootloader command line not present\n");
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
parse_early_param();
|
||||
after_dashes = parse_args("Booting kernel",
|
||||
static_command_line, __start___param,
|
|
@ -0,0 +1,40 @@
|
|||
From 8f68331e14dff9a101f2d0e1d6bec84a031f27ee Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <john@phrozen.org>
|
||||
Date: Thu, 9 Mar 2017 11:03:18 +0100
|
||||
Subject: [PATCH 69/69] arm: boot: add dts files
|
||||
|
||||
Signed-off-by: John Crispin <john@phrozen.org>
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -907,9 +907,27 @@ dtb-$(CONFIG_ARCH_QCOM) += \
|
||||
qcom-ipq4019-ap.dk04.1-c3.dtb \
|
||||
qcom-ipq4019-ap.dk07.1-c1.dtb \
|
||||
qcom-ipq4019-ap.dk07.1-c2.dtb \
|
||||
+ qcom-ipq8062-wg2600hp3.dtb \
|
||||
qcom-ipq8064-ap148.dtb \
|
||||
qcom-ipq8064-rb3011.dtb \
|
||||
+ qcom-ipq8064-c2600.dtb \
|
||||
+ qcom-ipq8064-d7800.dtb \
|
||||
+ qcom-ipq8064-db149.dtb \
|
||||
+ qcom-ipq8064-ap161.dtb \
|
||||
+ qcom-ipq8064-ea7500-v1.dtb \
|
||||
+ qcom-ipq8064-ea8500.dtb \
|
||||
+ qcom-ipq8064-g10.dtb \
|
||||
+ qcom-ipq8064-r7500.dtb \
|
||||
+ qcom-ipq8064-r7500v2.dtb \
|
||||
+ qcom-ipq8064-unifi-ac-hd.dtb \
|
||||
+ qcom-ipq8064-wg2600hp.dtb \
|
||||
+ qcom-ipq8064-wpq864.dtb \
|
||||
+ qcom-ipq8064-wxr-2533dhp.dtb \
|
||||
+ qcom-ipq8065-nbg6817.dtb \
|
||||
+ qcom-ipq8065-r7800.dtb \
|
||||
+ qcom-ipq8065-rt4230w-rev6.dtb \
|
||||
+ qcom-ipq8068-ecw5410.dtb \
|
||||
qcom-msm8226-samsung-s3ve3g.dtb \
|
||||
qcom-msm8660-surf.dtb \
|
||||
qcom-msm8960-cdp.dtb \
|
||||
qcom-msm8974-fairphone-fp2.dtb \
|
|
@ -0,0 +1,77 @@
|
|||
--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
|
||||
@@ -128,6 +128,7 @@
|
||||
gpio-ranges = <&qcom_pinmux 0 0 69>;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
+ #address-cells = <0>;
|
||||
#interrupt-cells = <2>;
|
||||
interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
@@ -155,6 +156,7 @@
|
||||
function = "pcie3_rst";
|
||||
drive-strength = <12>;
|
||||
bias-disable;
|
||||
+ output-low;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -190,6 +192,7 @@
|
||||
intc: interrupt-controller@2000000 {
|
||||
compatible = "qcom,msm-qgic2";
|
||||
interrupt-controller;
|
||||
+ #address-cells = <0>;
|
||||
#interrupt-cells = <3>;
|
||||
reg = <0x02000000 0x1000>,
|
||||
<0x02002000 0x1000>;
|
||||
@@ -630,10 +736,13 @@
|
||||
tsens_calib_backup: calib_backup@410 {
|
||||
reg = <0x410 0xb>;
|
||||
};
|
||||
+ speedbin_efuse: speedbin@0c0 {
|
||||
+ reg = <0x0c0 0x4>;
|
||||
+ };
|
||||
};
|
||||
|
||||
gcc: clock-controller@900000 {
|
||||
- compatible = "qcom,gcc-ipq8064";
|
||||
+ compatible = "qcom,gcc-ipq8064", "syscon";
|
||||
reg = <0x00900000 0x4000>;
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
@@ -722,7 +749,7 @@
|
||||
|
||||
gmac0: ethernet@37000000 {
|
||||
device_type = "network";
|
||||
- compatible = "qcom,ipq806x-gmac";
|
||||
+ compatible = "qcom,ipq806x-gmac", "snps,dwmac";
|
||||
reg = <0x37000000 0x200000>;
|
||||
interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "macirq";
|
||||
@@ -745,7 +772,7 @@
|
||||
|
||||
gmac1: ethernet@37200000 {
|
||||
device_type = "network";
|
||||
- compatible = "qcom,ipq806x-gmac";
|
||||
+ compatible = "qcom,ipq806x-gmac", "snps,dwmac";
|
||||
reg = <0x37200000 0x200000>;
|
||||
interrupts = <GIC_SPI 223 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "macirq";
|
||||
@@ -768,7 +795,7 @@
|
||||
|
||||
gmac2: ethernet@37400000 {
|
||||
device_type = "network";
|
||||
- compatible = "qcom,ipq806x-gmac";
|
||||
+ compatible = "qcom,ipq806x-gmac", "snps,dwmac";
|
||||
reg = <0x37400000 0x200000>;
|
||||
interrupts = <GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "macirq";
|
||||
@@ -791,7 +818,7 @@
|
||||
|
||||
gmac3: ethernet@37600000 {
|
||||
device_type = "network";
|
||||
- compatible = "qcom,ipq806x-gmac";
|
||||
+ compatible = "qcom,ipq806x-gmac", "snps,dwmac";
|
||||
reg = <0x37600000 0x200000>;
|
||||
interrupts = <GIC_SPI 229 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "macirq";
|
|
@ -0,0 +1,355 @@
|
|||
--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
|
||||
@@ -8,6 +8,8 @@
|
||||
#include <dt-bindings/reset/qcom,gcc-ipq806x.h>
|
||||
#include <dt-bindings/soc/qcom,gsbi.h>
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
+#include <dt-bindings/mfd/qcom-rpm.h>
|
||||
+#include <dt-bindings/clock/qcom,rpmcc.h>
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
@@ -28,6 +30,16 @@
|
||||
next-level-cache = <&L2>;
|
||||
qcom,acc = <&acc0>;
|
||||
qcom,saw = <&saw0>;
|
||||
+ clocks = <&kraitcc 0>, <&kraitcc 4>;
|
||||
+ clock-names = "cpu", "l2";
|
||||
+ clock-latency = <100000>;
|
||||
+ cpu-supply = <&smb208_s2a>;
|
||||
+ operating-points-v2 = <&opp_table0>;
|
||||
+ voltage-tolerance = <5>;
|
||||
+ cooling-min-state = <0>;
|
||||
+ cooling-max-state = <10>;
|
||||
+ #cooling-cells = <2>;
|
||||
+ cpu-idle-states = <&CPU_SPC>;
|
||||
};
|
||||
|
||||
cpu1: cpu@1 {
|
||||
@@ -38,16 +50,130 @@
|
||||
next-level-cache = <&L2>;
|
||||
qcom,acc = <&acc1>;
|
||||
qcom,saw = <&saw1>;
|
||||
+ clocks = <&kraitcc 1>, <&kraitcc 4>;
|
||||
+ clock-names = "cpu", "l2";
|
||||
+ clock-latency = <100000>;
|
||||
+ cpu-supply = <&smb208_s2b>;
|
||||
+ operating-points-v2 = <&opp_table0>;
|
||||
+ voltage-tolerance = <5>;
|
||||
+ cooling-min-state = <0>;
|
||||
+ cooling-max-state = <10>;
|
||||
+ #cooling-cells = <2>;
|
||||
+ cpu-idle-states = <&CPU_SPC>;
|
||||
+ };
|
||||
+
|
||||
+ idle-states {
|
||||
+ CPU_SPC: spc {
|
||||
+ compatible = "qcom,idle-state-spc";
|
||||
+ status = "disabled";
|
||||
+ entry-latency-us = <400>;
|
||||
+ exit-latency-us = <900>;
|
||||
+ min-residency-us = <3000>;
|
||||
+ };
|
||||
};
|
||||
+ };
|
||||
|
||||
- L2: l2-cache {
|
||||
- compatible = "cache";
|
||||
- cache-level = <2>;
|
||||
+ opp_table_l2: opp_table_l2 {
|
||||
+ compatible = "operating-points-v2";
|
||||
+
|
||||
+ opp-384000000 {
|
||||
+ opp-hz = /bits/ 64 <384000000>;
|
||||
+ opp-microvolt = <1100000>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ opp-level = <0>;
|
||||
+ };
|
||||
+
|
||||
+ opp-1000000000 {
|
||||
+ opp-hz = /bits/ 64 <1000000000>;
|
||||
+ opp-microvolt = <1100000>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ opp-level = <1>;
|
||||
+ };
|
||||
+
|
||||
+ opp-1200000000 {
|
||||
+ opp-hz = /bits/ 64 <1200000000>;
|
||||
+ opp-microvolt = <1150000>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ opp-level = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
+ opp_table0: opp_table0 {
|
||||
+ compatible = "operating-points-v2-kryo-cpu";
|
||||
+ nvmem-cells = <&speedbin_efuse>;
|
||||
+
|
||||
+ /*
|
||||
+ * Voltage thresholds are <target min max>
|
||||
+ */
|
||||
+ opp-384000000 {
|
||||
+ opp-hz = /bits/ 64 <384000000>;
|
||||
+ opp-microvolt-speed0-pvs0-v0 = <1000000 950000 1050000>;
|
||||
+ opp-microvolt-speed0-pvs1-v0 = <925000 878750 971250>;
|
||||
+ opp-microvolt-speed0-pvs2-v0 = <875000 831250 918750>;
|
||||
+ opp-microvolt-speed0-pvs3-v0 = <800000 760000 840000>;
|
||||
+ opp-supported-hw = <0x1>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ opp-level = <0>;
|
||||
+ };
|
||||
+
|
||||
+ opp-600000000 {
|
||||
+ opp-hz = /bits/ 64 <600000000>;
|
||||
+ opp-microvolt-speed0-pvs0-v0 = <1050000 997500 1102500>;
|
||||
+ opp-microvolt-speed0-pvs1-v0 = <975000 926250 1023750>;
|
||||
+ opp-microvolt-speed0-pvs2-v0 = <925000 878750 971250>;
|
||||
+ opp-microvolt-speed0-pvs3-v0 = <850000 807500 892500>;
|
||||
+ opp-supported-hw = <0x1>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ opp-level = <1>;
|
||||
+ };
|
||||
+
|
||||
+ opp-800000000 {
|
||||
+ opp-hz = /bits/ 64 <800000000>;
|
||||
+ opp-microvolt-speed0-pvs0-v0 = <1100000 1045000 1155000>;
|
||||
+ opp-microvolt-speed0-pvs1-v0 = <1025000 973750 1076250>;
|
||||
+ opp-microvolt-speed0-pvs2-v0 = <995000 945250 1044750>;
|
||||
+ opp-microvolt-speed0-pvs3-v0 = <900000 855000 945000>;
|
||||
+ opp-supported-hw = <0x1>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ opp-level = <1>;
|
||||
+ };
|
||||
+
|
||||
+ opp-1000000000 {
|
||||
+ opp-hz = /bits/ 64 <1000000000>;
|
||||
+ opp-microvolt-speed0-pvs0-v0 = <1150000 1092500 1207500>;
|
||||
+ opp-microvolt-speed0-pvs1-v0 = <1075000 1021250 1128750>;
|
||||
+ opp-microvolt-speed0-pvs2-v0 = <1025000 973750 1076250>;
|
||||
+ opp-microvolt-speed0-pvs3-v0 = <950000 902500 997500>;
|
||||
+ opp-supported-hw = <0x1>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ opp-level = <1>;
|
||||
+ };
|
||||
+
|
||||
+ opp-1200000000 {
|
||||
+ opp-hz = /bits/ 64 <1200000000>;
|
||||
+ opp-microvolt-speed0-pvs0-v0 = <1200000 1140000 1260000>;
|
||||
+ opp-microvolt-speed0-pvs1-v0 = <1125000 1068750 1181250>;
|
||||
+ opp-microvolt-speed0-pvs2-v0 = <1075000 1021250 1128750>;
|
||||
+ opp-microvolt-speed0-pvs3-v0 = <1000000 950000 1050000>;
|
||||
+ opp-supported-hw = <0x1>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ opp-level = <2>;
|
||||
+ };
|
||||
+
|
||||
+ opp-1400000000 {
|
||||
+ opp-hz = /bits/ 64 <1400000000>;
|
||||
+ opp-microvolt-speed0-pvs0-v0 = <1250000 1187500 1312500>;
|
||||
+ opp-microvolt-speed0-pvs1-v0 = <1175000 1116250 1233750>;
|
||||
+ opp-microvolt-speed0-pvs2-v0 = <1125000 1068750 1181250>;
|
||||
+ opp-microvolt-speed0-pvs3-v0 = <1050000 997500 1102500>;
|
||||
+ opp-supported-hw = <0x1>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ opp-level = <2>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
thermal-zones {
|
||||
tsens_tz_sensor0 {
|
||||
polling-delay-passive = <0>;
|
||||
polling-delay = <0>;
|
||||
thermal-sensors = <&tsens 0>;
|
||||
@@ -93,6 +441,15 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ fab-scaling {
|
||||
+ compatible = "qcom,fab-scaling";
|
||||
+ clocks = <&rpmcc RPM_APPS_FABRIC_A_CLK>, <&rpmcc RPM_EBI1_A_CLK>;
|
||||
+ clock-names = "apps-fab-clk", "ddr-fab-clk";
|
||||
+ fab_freq_high = <533000000>;
|
||||
+ fab_freq_nominal = <400000000>;
|
||||
+ cpu_freq_threshold = <1000000000>;
|
||||
+ };
|
||||
+
|
||||
firmware {
|
||||
scm {
|
||||
compatible = "qcom,scm-ipq806x", "qcom,scm";
|
||||
@@ -120,6 +477,17 @@
|
||||
reg-names = "lpass-lpaif";
|
||||
};
|
||||
|
||||
+ L2: l2-cache {
|
||||
+ compatible = "qcom,krait-cache", "cache";
|
||||
+ cache-level = <2>;
|
||||
+ qcom,saw = <&saw_l2>;
|
||||
+
|
||||
+ clocks = <&kraitcc 4>;
|
||||
+ clock-names = "l2";
|
||||
+ l2-supply = <&smb208_s1a>;
|
||||
+ operating-points-v2 = <&opp_table_l2>;
|
||||
+ };
|
||||
+
|
||||
qcom_pinmux: pinmux@800000 {
|
||||
compatible = "qcom,ipq8064-pinctrl";
|
||||
reg = <0x800000 0x4000>;
|
||||
@@ -160,6 +589,15 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ i2c4_pins: i2c4_pinmux {
|
||||
+ mux {
|
||||
+ pins = "gpio12", "gpio13";
|
||||
+ function = "gsbi4";
|
||||
+ drive-strength = <12>;
|
||||
+ bias-disable;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
spi_pins: spi_pins {
|
||||
mux {
|
||||
pins = "gpio18", "gpio19", "gpio21";
|
||||
@@ -169,6 +607,28 @@
|
||||
};
|
||||
};
|
||||
|
||||
+
|
||||
+ mdio0_pins: mdio0_pins {
|
||||
+ mux {
|
||||
+ pins = "gpio0", "gpio1";
|
||||
+ function = "mdio";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-disable;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rgmii2_pins: rgmii2_pins {
|
||||
+ mux {
|
||||
+ pins = "gpio27", "gpio28", "gpio29",
|
||||
+ "gpio30", "gpio31", "gpio32",
|
||||
+ "gpio51", "gpio52", "gpio59",
|
||||
+ "gpio60", "gpio61", "gpio62";
|
||||
+ function = "rgmii2";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-disable;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
leds_pins: leds_pins {
|
||||
mux {
|
||||
pins = "gpio7", "gpio8", "gpio9",
|
||||
@@ -243,6 +739,22 @@
|
||||
regulator;
|
||||
};
|
||||
|
||||
+ kraitcc: clock-controller {
|
||||
+ compatible = "qcom,krait-cc-v1";
|
||||
+ #clock-cells = <1>;
|
||||
+ };
|
||||
+
|
||||
+ saw_l2: regulator@02012000 {
|
||||
+ compatible = "qcom,saw2", "syscon";
|
||||
+ reg = <0x02012000 0x1000>;
|
||||
+ regulator;
|
||||
+ };
|
||||
+
|
||||
+ sic_non_secure: sic-non-secure@12100000 {
|
||||
+ compatible = "syscon";
|
||||
+ reg = <0x12100000 0x10000>;
|
||||
+ };
|
||||
+
|
||||
gsbi2: gsbi@12480000 {
|
||||
compatible = "qcom,gsbi-v1.0.0";
|
||||
cell-index = <2>;
|
||||
@@ -478,6 +985,11 @@
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
|
||||
+ sfpb_mutex_block: syscon@1200600 {
|
||||
+ compatible = "syscon";
|
||||
+ reg = <0x01200600 0x100>;
|
||||
+ };
|
||||
+
|
||||
pcie0: pci@1b500000 {
|
||||
compatible = "qcom,pcie-ipq8064";
|
||||
reg = <0x1b500000 0x1000
|
||||
@@ -739,6 +1335,20 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ mdio0: mdio@37000000 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ compatible = "qcom,ipq8064-mdio", "syscon";
|
||||
+ reg = <0x37000000 0x200000>;
|
||||
+ resets = <&gcc GMAC_CORE1_RESET>;
|
||||
+ reset-names = "stmmaceth";
|
||||
+ clocks = <&gcc GMAC_CORE1_CLK>;
|
||||
+ clock-names = "stmmaceth";
|
||||
+
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
vsdcc_fixed: vsdcc-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "SDCC Power";
|
||||
@@ -814,4 +1463,17 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+ sfpb_mutex: sfpb-mutex {
|
||||
+ compatible = "qcom,sfpb-mutex";
|
||||
+ syscon = <&sfpb_mutex_block 4 4>;
|
||||
+
|
||||
+ #hwlock-cells = <1>;
|
||||
+ };
|
||||
+
|
||||
+ smem {
|
||||
+ compatible = "qcom,smem";
|
||||
+ memory-region = <&smem>;
|
||||
+ hwlocks = <&sfpb_mutex 3>;
|
||||
+ };
|
||||
};
|
||||
--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
|
||||
@@ -1020,6 +1020,37 @@
|
||||
compatible = "qcom,rpmcc-ipq806x", "qcom,rpmcc";
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
+ regulators {
|
||||
+ compatible = "qcom,rpm-smb208-regulators";
|
||||
+
|
||||
+ smb208_s1a: s1a {
|
||||
+ regulator-min-microvolt = <1050000>;
|
||||
+ regulator-max-microvolt = <1150000>;
|
||||
+
|
||||
+ qcom,switch-mode-frequency = <1200000>;
|
||||
+ };
|
||||
+
|
||||
+ smb208_s1b: s1b {
|
||||
+ regulator-min-microvolt = <1050000>;
|
||||
+ regulator-max-microvolt = <1150000>;
|
||||
+
|
||||
+ qcom,switch-mode-frequency = <1200000>;
|
||||
+ };
|
||||
+
|
||||
+ smb208_s2a: s2a {
|
||||
+ regulator-min-microvolt = < 800000>;
|
||||
+ regulator-max-microvolt = <1250000>;
|
||||
+
|
||||
+ qcom,switch-mode-frequency = <1200000>;
|
||||
+ };
|
||||
+
|
||||
+ smb208_s2b: s2b {
|
||||
+ regulator-min-microvolt = < 800000>;
|
||||
+ regulator-max-microvolt = <1250000>;
|
||||
+
|
||||
+ qcom,switch-mode-frequency = <1200000>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
tcsr: syscon@1a400000 {
|
|
@ -0,0 +1,89 @@
|
|||
This uses upstream qcom-ipq8064-v1.0.dtsi and modifies it by patches
|
||||
instead of keeping a local version.
|
||||
We drop partitions, LEDs and keys from the file as we will implement
|
||||
them differently anyway.
|
||||
|
||||
--- a/arch/arm/boot/dts/qcom-ipq8064-v1.0.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom-ipq8064-v1.0.dtsi
|
||||
@@ -42,16 +42,6 @@
|
||||
#size-cells = <1>;
|
||||
spi-max-frequency = <50000000>;
|
||||
reg = <0>;
|
||||
-
|
||||
- partition@0 {
|
||||
- label = "rootfs";
|
||||
- reg = <0x0 0x1000000>;
|
||||
- };
|
||||
-
|
||||
- partition@1 {
|
||||
- label = "scratch";
|
||||
- reg = <0x1000000 0x1000000>;
|
||||
- };
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -64,64 +54,5 @@
|
||||
ports-implemented = <0x1>;
|
||||
status = "ok";
|
||||
};
|
||||
-
|
||||
- gpio_keys {
|
||||
- compatible = "gpio-keys";
|
||||
- pinctrl-0 = <&buttons_pins>;
|
||||
- pinctrl-names = "default";
|
||||
-
|
||||
- button@1 {
|
||||
- label = "reset";
|
||||
- linux,code = <KEY_RESTART>;
|
||||
- gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
|
||||
- linux,input-type = <1>;
|
||||
- debounce-interval = <60>;
|
||||
- };
|
||||
- button@2 {
|
||||
- label = "wps";
|
||||
- linux,code = <KEY_WPS_BUTTON>;
|
||||
- gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
|
||||
- linux,input-type = <1>;
|
||||
- debounce-interval = <60>;
|
||||
- };
|
||||
- };
|
||||
-
|
||||
- leds {
|
||||
- compatible = "gpio-leds";
|
||||
- pinctrl-0 = <&leds_pins>;
|
||||
- pinctrl-names = "default";
|
||||
-
|
||||
- led@7 {
|
||||
- label = "led_usb1";
|
||||
- gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
|
||||
- linux,default-trigger = "usbdev";
|
||||
- default-state = "off";
|
||||
- };
|
||||
-
|
||||
- led@8 {
|
||||
- label = "led_usb3";
|
||||
- gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
|
||||
- linux,default-trigger = "usbdev";
|
||||
- default-state = "off";
|
||||
- };
|
||||
-
|
||||
- led@9 {
|
||||
- label = "status_led_fail";
|
||||
- gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
|
||||
- default-state = "off";
|
||||
- };
|
||||
-
|
||||
- led@26 {
|
||||
- label = "sata_led";
|
||||
- gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
|
||||
- default-state = "off";
|
||||
- };
|
||||
-
|
||||
- led@53 {
|
||||
- label = "status_led_pass";
|
||||
- gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
|
||||
- default-state = "off";
|
||||
- };
|
||||
- };
|
||||
};
|
||||
};
|
|
@ -0,0 +1,14 @@
|
|||
This uses upstream qcom-ipq8064-v1.0.dtsi and modifies it by patches
|
||||
instead of keeping a local version. This patch adds our local adjustments
|
||||
for the (local) additional contents of qcom-ipq8064.dtsi
|
||||
|
||||
--- a/arch/arm/boot/dts/qcom-ipq8064-v1.0.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom-ipq8064-v1.0.dtsi
|
||||
@@ -56,3 +56,7 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
+
|
||||
+&CPU_SPC {
|
||||
+ status = "okay";
|
||||
+};
|
|
@ -0,0 +1,145 @@
|
|||
--- a/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts
|
||||
+++ b/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts
|
||||
@@ -24,73 +24,6 @@
|
||||
device_type = "memory";
|
||||
};
|
||||
|
||||
- mdio0: mdio@0 {
|
||||
- status = "okay";
|
||||
- compatible = "virtual,mdio-gpio";
|
||||
- gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>,
|
||||
- <&qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <0>;
|
||||
-
|
||||
- pinctrl-0 = <&mdio0_pins>;
|
||||
- pinctrl-names = "default";
|
||||
-
|
||||
- switch0: switch@10 {
|
||||
- compatible = "qca,qca8337";
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <0>;
|
||||
-
|
||||
- dsa,member = <0 0>;
|
||||
-
|
||||
- pinctrl-0 = <&sw0_reset_pin>;
|
||||
- pinctrl-names = "default";
|
||||
-
|
||||
- reset-gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>;
|
||||
- reg = <0x10>;
|
||||
-
|
||||
- ports {
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <0>;
|
||||
-
|
||||
- switch0cpu: port@0 {
|
||||
- reg = <0>;
|
||||
- label = "cpu";
|
||||
- ethernet = <&gmac0>;
|
||||
- phy-mode = "rgmii-id";
|
||||
- fixed-link {
|
||||
- speed = <1000>;
|
||||
- full-duplex;
|
||||
- };
|
||||
- };
|
||||
-
|
||||
- port@1 {
|
||||
- reg = <1>;
|
||||
- label = "sw1";
|
||||
- };
|
||||
-
|
||||
- port@2 {
|
||||
- reg = <2>;
|
||||
- label = "sw2";
|
||||
- };
|
||||
-
|
||||
- port@3 {
|
||||
- reg = <3>;
|
||||
- label = "sw3";
|
||||
- };
|
||||
-
|
||||
- port@4 {
|
||||
- reg = <4>;
|
||||
- label = "sw4";
|
||||
- };
|
||||
-
|
||||
- port@5 {
|
||||
- reg = <5>;
|
||||
- label = "sw5";
|
||||
- };
|
||||
- };
|
||||
- };
|
||||
- };
|
||||
-
|
||||
mdio1: mdio@1 {
|
||||
status = "okay";
|
||||
compatible = "virtual,mdio-gpio";
|
||||
@@ -216,6 +149,68 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&mdio0 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ pinctrl-0 = <&mdio0_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ switch0: switch@10 {
|
||||
+ compatible = "qca,qca8337";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ dsa,member = <0 0>;
|
||||
+
|
||||
+ pinctrl-0 = <&sw0_reset_pin>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ reset-gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>;
|
||||
+ reg = <0x10>;
|
||||
+
|
||||
+ ports {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ switch0cpu: port@0 {
|
||||
+ reg = <0>;
|
||||
+ label = "cpu";
|
||||
+ ethernet = <&gmac0>;
|
||||
+ phy-mode = "rgmii-id";
|
||||
+ fixed-link {
|
||||
+ speed = <1000>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ reg = <1>;
|
||||
+ label = "sw1";
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ reg = <2>;
|
||||
+ label = "sw2";
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ reg = <3>;
|
||||
+ label = "sw3";
|
||||
+ };
|
||||
+
|
||||
+ port@4 {
|
||||
+ reg = <4>;
|
||||
+ label = "sw4";
|
||||
+ };
|
||||
+
|
||||
+ port@5 {
|
||||
+ reg = <5>;
|
||||
+ label = "sw5";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&gmac0 {
|
||||
status = "okay";
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
From a206d4061f1cc2c5cd17ee45c53a0ba711e48e6d Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Sun, 7 Feb 2021 16:42:52 +0100
|
||||
Subject: [PATCH 3/3] drivers: cpufreq: qcom-cpufreq-nvmem: support specific
|
||||
cpufreq driver
|
||||
|
||||
Add support for specific cpufreq driver for qcom-cpufreq-nvmem driver.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
---
|
||||
drivers/cpufreq/qcom-cpufreq-nvmem.c | 15 +++++++++++++++
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
--- a/drivers/cpufreq/qcom-cpufreq-nvmem.c
|
||||
+++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c
|
||||
@@ -52,6 +52,7 @@ struct qcom_cpufreq_match_data {
|
||||
char **pvs_name,
|
||||
struct qcom_cpufreq_drv *drv);
|
||||
const char **genpd_names;
|
||||
+ const char *cpufreq_driver;
|
||||
};
|
||||
|
||||
struct qcom_cpufreq_drv {
|
||||
@@ -250,6 +251,7 @@ static const struct qcom_cpufreq_match_d
|
||||
|
||||
static const struct qcom_cpufreq_match_data match_data_krait = {
|
||||
.get_version = qcom_cpufreq_krait_name_version,
|
||||
+ .cpufreq_driver = "krait-cpufreq",
|
||||
};
|
||||
|
||||
static const char *qcs404_genpd_names[] = { "cpr", NULL };
|
||||
@@ -385,6 +387,19 @@ static int qcom_cpufreq_probe(struct pla
|
||||
}
|
||||
}
|
||||
|
||||
+ if (drv->data->cpufreq_driver) {
|
||||
+ cpufreq_dt_pdev = platform_device_register_simple(
|
||||
+ drv->data->cpufreq_driver, -1, NULL, 0);
|
||||
+ if (!IS_ERR(cpufreq_dt_pdev)) {
|
||||
+ platform_set_drvdata(pdev, drv);
|
||||
+ return 0;
|
||||
+ } else {
|
||||
+ dev_err(cpu_dev,
|
||||
+ "Failed to register dedicated %s cpufreq\n",
|
||||
+ drv->data->cpufreq_driver);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
cpufreq_dt_pdev = platform_device_register_simple("cpufreq-dt", -1,
|
||||
NULL, 0);
|
||||
if (!IS_ERR(cpufreq_dt_pdev)) {
|
|
@ -0,0 +1,115 @@
|
|||
From 0af44917941cbfecdc86bb9bf05ff01d22a88973 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Sun, 7 Feb 2021 16:52:56 +0100
|
||||
Subject: [PATCH 1/4] ipq806x: gcc: add missing clk flag
|
||||
|
||||
Some flag are missing from the original code.
|
||||
These clk can't be set using the protected-clock proprities as they
|
||||
cause the malfunction of the serial interface.
|
||||
These clks are needed for the rpm interface to work proprely or the
|
||||
cpu regulators starts to fail as soon as they are disabled by the
|
||||
kernel.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
---
|
||||
drivers/clk/qcom/gcc-ipq806x.c | 19 +++++++++++++------
|
||||
1 file changed, 13 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/drivers/clk/qcom/gcc-ipq806x.c
|
||||
+++ b/drivers/clk/qcom/gcc-ipq806x.c
|
||||
@@ -65,6 +65,7 @@ static struct clk_pll pll3 = {
|
||||
.parent_names = (const char *[]){ "pxo" },
|
||||
.num_parents = 1,
|
||||
.ops = &clk_pll_ops,
|
||||
+ .flags = CLK_IS_CRITICAL,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -782,7 +783,7 @@ static struct clk_rcg gsbi4_qup_src = {
|
||||
.parent_names = gcc_pxo_pll8,
|
||||
.num_parents = 2,
|
||||
.ops = &clk_rcg_ops,
|
||||
- .flags = CLK_SET_PARENT_GATE,
|
||||
+ .flags = CLK_SET_PARENT_GATE | CLK_IGNORE_UNUSED,
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -798,7 +799,7 @@ static struct clk_branch gsbi4_qup_clk =
|
||||
.parent_names = (const char *[]){ "gsbi4_qup_src" },
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch_ops,
|
||||
- .flags = CLK_SET_RATE_PARENT,
|
||||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -880,7 +881,7 @@ static struct clk_rcg gsbi6_qup_src = {
|
||||
.parent_names = gcc_pxo_pll8,
|
||||
.num_parents = 2,
|
||||
.ops = &clk_rcg_ops,
|
||||
- .flags = CLK_SET_PARENT_GATE,
|
||||
+ .flags = CLK_SET_PARENT_GATE | CLK_IGNORE_UNUSED,
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -945,7 +946,7 @@ static struct clk_branch gsbi7_qup_clk =
|
||||
.parent_names = (const char *[]){ "gsbi7_qup_src" },
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch_ops,
|
||||
- .flags = CLK_SET_RATE_PARENT,
|
||||
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -991,6 +992,7 @@ static struct clk_branch gsbi4_h_clk = {
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "gsbi4_h_clk",
|
||||
.ops = &clk_branch_ops,
|
||||
+ .flags = CLK_IGNORE_UNUSED,
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -1293,6 +1295,7 @@ static struct clk_rcg sdc1_src = {
|
||||
.parent_names = gcc_pxo_pll8,
|
||||
.num_parents = 2,
|
||||
.ops = &clk_rcg_ops,
|
||||
+ .flags = CLK_SET_RATE_GATE,
|
||||
},
|
||||
}
|
||||
};
|
||||
@@ -1341,6 +1344,7 @@ static struct clk_rcg sdc3_src = {
|
||||
.parent_names = gcc_pxo_pll8,
|
||||
.num_parents = 2,
|
||||
.ops = &clk_rcg_ops,
|
||||
+ .flags = CLK_SET_RATE_GATE,
|
||||
},
|
||||
}
|
||||
};
|
||||
@@ -1424,6 +1428,7 @@ static struct clk_rcg tsif_ref_src = {
|
||||
.parent_names = gcc_pxo_pll8,
|
||||
.num_parents = 2,
|
||||
.ops = &clk_rcg_ops,
|
||||
+ .flags = CLK_SET_RATE_GATE,
|
||||
},
|
||||
}
|
||||
};
|
||||
@@ -2694,7 +2699,8 @@ static struct clk_dyn_rcg ubi32_core1_sr
|
||||
.parent_names = gcc_pxo_pll8_pll14_pll18_pll0,
|
||||
.num_parents = 5,
|
||||
.ops = &clk_dyn_rcg_ops,
|
||||
- .flags = CLK_SET_RATE_PARENT | CLK_GET_RATE_NOCACHE,
|
||||
+ .flags = CLK_SET_RATE_PARENT | CLK_GET_RATE_NOCACHE |
|
||||
+ CLK_IGNORE_UNUSED,
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -2747,7 +2753,8 @@ static struct clk_dyn_rcg ubi32_core2_sr
|
||||
.parent_names = gcc_pxo_pll8_pll14_pll18_pll0,
|
||||
.num_parents = 5,
|
||||
.ops = &clk_dyn_rcg_ops,
|
||||
- .flags = CLK_SET_RATE_PARENT | CLK_GET_RATE_NOCACHE,
|
||||
+ .flags = CLK_SET_RATE_PARENT | CLK_GET_RATE_NOCACHE |
|
||||
+ CLK_IGNORE_UNUSED,
|
||||
},
|
||||
},
|
||||
};
|
|
@ -0,0 +1,59 @@
|
|||
From 3a5f1793c0bf4a6b536751886b0a44589fe05f35 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Sun, 7 Feb 2021 17:00:07 +0100
|
||||
Subject: [PATCH 2/4] ipq806x: lcc: add missing reset
|
||||
|
||||
Add missing reset for ipq806x lcc clk
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
---
|
||||
drivers/clk/qcom/lcc-ipq806x.c | 8 ++++++++
|
||||
include/dt-bindings/clock/qcom,lcc-ipq806x.h | 1 +
|
||||
2 files changed, 9 insertions(+)
|
||||
|
||||
--- a/drivers/clk/qcom/lcc-ipq806x.c
|
||||
+++ b/drivers/clk/qcom/lcc-ipq806x.c
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/regmap.h>
|
||||
+#include <linux/reset-controller.h>
|
||||
|
||||
#include <dt-bindings/clock/qcom,lcc-ipq806x.h>
|
||||
|
||||
@@ -22,6 +23,7 @@
|
||||
#include "clk-branch.h"
|
||||
#include "clk-regmap-divider.h"
|
||||
#include "clk-regmap-mux.h"
|
||||
+#include "reset.h"
|
||||
|
||||
static struct clk_pll pll4 = {
|
||||
.l_reg = 0x4,
|
||||
@@ -39,6 +41,10 @@ static struct clk_pll pll4 = {
|
||||
},
|
||||
};
|
||||
|
||||
+static const struct qcom_reset_map lcc_ipq806x_resets[] = {
|
||||
+ [LCC_PCM_RESET] = { 0x54, 13 },
|
||||
+};
|
||||
+
|
||||
static const struct pll_config pll4_config = {
|
||||
.l = 0xf,
|
||||
.m = 0x91,
|
||||
@@ -417,6 +423,8 @@ static const struct qcom_cc_desc lcc_ipq
|
||||
.config = &lcc_ipq806x_regmap_config,
|
||||
.clks = lcc_ipq806x_clks,
|
||||
.num_clks = ARRAY_SIZE(lcc_ipq806x_clks),
|
||||
+ .resets = lcc_ipq806x_resets,
|
||||
+ .num_resets = ARRAY_SIZE(lcc_ipq806x_resets),
|
||||
};
|
||||
|
||||
static const struct of_device_id lcc_ipq806x_match_table[] = {
|
||||
--- a/include/dt-bindings/clock/qcom,lcc-ipq806x.h
|
||||
+++ b/include/dt-bindings/clock/qcom,lcc-ipq806x.h
|
||||
@@ -19,4 +19,5 @@
|
||||
#define SPDIF_CLK 10
|
||||
#define AHBIX_CLK 11
|
||||
|
||||
+#define LCC_PCM_RESET 0
|
||||
#endif
|
|
@ -0,0 +1,57 @@
|
|||
From f8fdbecdaca97f0f2eebd77256e2eca4a8da6c39 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Sun, 7 Feb 2021 17:08:16 +0100
|
||||
Subject: [PATCH 3/4] clk: qcom: krait: add missing enable disable
|
||||
|
||||
Add missing enable disable mux function. Add extra check to
|
||||
div2_round_rate.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
---
|
||||
drivers/clk/qcom/clk-krait.c | 27 +++++++++++++++++++++++++--
|
||||
1 file changed, 25 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/clk/qcom/clk-krait.c
|
||||
+++ b/drivers/clk/qcom/clk-krait.c
|
||||
@@ -68,7 +68,25 @@ static u8 krait_mux_get_parent(struct cl
|
||||
return clk_mux_val_to_index(hw, mux->parent_map, 0, sel);
|
||||
}
|
||||
|
||||
+static int krait_mux_enable(struct clk_hw *hw)
|
||||
+{
|
||||
+ struct krait_mux_clk *mux = to_krait_mux_clk(hw);
|
||||
+
|
||||
+ __krait_mux_set_sel(mux, mux->en_mask);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void krait_mux_disable(struct clk_hw *hw)
|
||||
+{
|
||||
+ struct krait_mux_clk *mux = to_krait_mux_clk(hw);
|
||||
+
|
||||
+ __krait_mux_set_sel(mux, mux->safe_sel);
|
||||
+}
|
||||
+
|
||||
const struct clk_ops krait_mux_clk_ops = {
|
||||
+ .enable = krait_mux_enable,
|
||||
+ .disable = krait_mux_disable,
|
||||
.set_parent = krait_mux_set_parent,
|
||||
.get_parent = krait_mux_get_parent,
|
||||
.determine_rate = __clk_mux_determine_rate_closest,
|
||||
@@ -79,8 +97,13 @@ EXPORT_SYMBOL_GPL(krait_mux_clk_ops);
|
||||
static long krait_div2_round_rate(struct clk_hw *hw, unsigned long rate,
|
||||
unsigned long *parent_rate)
|
||||
{
|
||||
- *parent_rate = clk_hw_round_rate(clk_hw_get_parent(hw), rate * 2);
|
||||
- return DIV_ROUND_UP(*parent_rate, 2);
|
||||
+ struct clk_hw *hw_parent = clk_hw_get_parent(hw);
|
||||
+
|
||||
+ if (hw_parent) {
|
||||
+ *parent_rate = clk_hw_round_rate(hw_parent, rate * 2);
|
||||
+ return DIV_ROUND_UP(*parent_rate, 2);
|
||||
+ } else
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
static int krait_div2_set_rate(struct clk_hw *hw, unsigned long rate,
|
|
@ -0,0 +1,372 @@
|
|||
From 22a0f55b0e505fbbbb680e451a62878bc97f7ff1 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Sun, 7 Feb 2021 17:23:38 +0100
|
||||
Subject: [PATCH 4/4] ipq806x: gcc: add missing clk and reset for crypto engine
|
||||
|
||||
Add missing clk and reset needed for nss additional core and crypto
|
||||
engine.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
---
|
||||
drivers/clk/qcom/gcc-ipq806x.c | 250 +++++++++++++++++++
|
||||
include/dt-bindings/clock/qcom,gcc-ipq806x.h | 5 +-
|
||||
include/dt-bindings/reset/qcom,gcc-ipq806x.h | 5 +
|
||||
3 files changed, 259 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/clk/qcom/gcc-ipq806x.c
|
||||
+++ b/drivers/clk/qcom/gcc-ipq806x.c
|
||||
@@ -223,7 +223,9 @@ static struct clk_regmap pll14_vote = {
|
||||
|
||||
static struct pll_freq_tbl pll18_freq_tbl[] = {
|
||||
NSS_PLL_RATE(550000000, 44, 0, 1, 0x01495625),
|
||||
+ NSS_PLL_RATE(600000000, 48, 0, 1, 0x01495625),
|
||||
NSS_PLL_RATE(733000000, 58, 16, 25, 0x014b5625),
|
||||
+ NSS_PLL_RATE(800000000, 64, 0, 1, 0x01495625),
|
||||
};
|
||||
|
||||
static struct clk_pll pll18 = {
|
||||
@@ -245,6 +247,22 @@ static struct clk_pll pll18 = {
|
||||
},
|
||||
};
|
||||
|
||||
+static struct clk_pll pll11 = {
|
||||
+ .l_reg = 0x3184,
|
||||
+ .m_reg = 0x3188,
|
||||
+ .n_reg = 0x318c,
|
||||
+ .config_reg = 0x3194,
|
||||
+ .mode_reg = 0x3180,
|
||||
+ .status_reg = 0x3198,
|
||||
+ .status_bit = 16,
|
||||
+ .clkr.hw.init = &(struct clk_init_data){
|
||||
+ .name = "pll11",
|
||||
+ .parent_names = (const char *[]){ "pxo" },
|
||||
+ .num_parents = 1,
|
||||
+ .ops = &clk_pll_ops,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
enum {
|
||||
P_PXO,
|
||||
P_PLL8,
|
||||
@@ -253,6 +271,7 @@ enum {
|
||||
P_CXO,
|
||||
P_PLL14,
|
||||
P_PLL18,
|
||||
+ P_PLL11,
|
||||
};
|
||||
|
||||
static const struct parent_map gcc_pxo_pll8_map[] = {
|
||||
@@ -320,6 +339,42 @@ static const char * const gcc_pxo_pll8_p
|
||||
"pll18",
|
||||
};
|
||||
|
||||
+static const struct parent_map gcc_pxo_pll8_pll0_pll14_pll18_pll11_map[] = {
|
||||
+ { P_PXO, 0 },
|
||||
+ { P_PLL8, 4 },
|
||||
+ { P_PLL0, 2 },
|
||||
+ { P_PLL14, 5 },
|
||||
+ { P_PLL18, 1 },
|
||||
+ { P_PLL11, 3 },
|
||||
+};
|
||||
+
|
||||
+static const char *gcc_pxo_pll8_pll0_pll14_pll18_pll11[] = {
|
||||
+ "pxo",
|
||||
+ "pll8_vote",
|
||||
+ "pll0_vote",
|
||||
+ "pll14",
|
||||
+ "pll18",
|
||||
+ "pll11"
|
||||
+};
|
||||
+
|
||||
+static const struct parent_map gcc_pxo_pll3_pll0_pll14_pll18_pll11_map[] = {
|
||||
+ { P_PXO, 0 },
|
||||
+ { P_PLL3, 6 },
|
||||
+ { P_PLL0, 2 },
|
||||
+ { P_PLL14, 5 },
|
||||
+ { P_PLL18, 1 },
|
||||
+ { P_PLL11, 3 },
|
||||
+};
|
||||
+
|
||||
+static const char *gcc_pxo_pll3_pll0_pll14_pll18_pll11[] = {
|
||||
+ "pxo",
|
||||
+ "pll3",
|
||||
+ "pll0_vote",
|
||||
+ "pll14",
|
||||
+ "pll18",
|
||||
+ "pll11"
|
||||
+};
|
||||
+
|
||||
static struct freq_tbl clk_tbl_gsbi_uart[] = {
|
||||
{ 1843200, P_PLL8, 2, 6, 625 },
|
||||
{ 3686400, P_PLL8, 2, 12, 625 },
|
||||
@@ -1261,6 +1316,7 @@ static const struct freq_tbl clk_tbl_sdc
|
||||
{ 20210000, P_PLL8, 1, 1, 19 },
|
||||
{ 24000000, P_PLL8, 4, 1, 4 },
|
||||
{ 48000000, P_PLL8, 4, 1, 2 },
|
||||
+ { 52000000, P_PLL8, 1, 2, 15 }, /* 51.2 Mhz */
|
||||
{ 64000000, P_PLL8, 3, 1, 2 },
|
||||
{ 96000000, P_PLL8, 4, 0, 0 },
|
||||
{ 192000000, P_PLL8, 2, 0, 0 },
|
||||
@@ -2647,7 +2703,9 @@ static const struct freq_tbl clk_tbl_nss
|
||||
{ 110000000, P_PLL18, 1, 1, 5 },
|
||||
{ 275000000, P_PLL18, 2, 0, 0 },
|
||||
{ 550000000, P_PLL18, 1, 0, 0 },
|
||||
+ { 600000000, P_PLL18, 1, 0, 0 },
|
||||
{ 733000000, P_PLL18, 1, 0, 0 },
|
||||
+ { 800000000, P_PLL18, 1, 0, 0 },
|
||||
{ }
|
||||
};
|
||||
|
||||
@@ -2759,6 +2817,186 @@ static struct clk_dyn_rcg ubi32_core2_sr
|
||||
},
|
||||
};
|
||||
|
||||
+static const struct freq_tbl clk_tbl_ce5_core[] = {
|
||||
+ { 150000000, P_PLL3, 8, 1, 1 },
|
||||
+ { 213200000, P_PLL11, 5, 1, 1 },
|
||||
+ { }
|
||||
+};
|
||||
+
|
||||
+static struct clk_dyn_rcg ce5_core_src = {
|
||||
+ .ns_reg[0] = 0x36C4,
|
||||
+ .ns_reg[1] = 0x36C8,
|
||||
+ .bank_reg = 0x36C0,
|
||||
+ .s[0] = {
|
||||
+ .src_sel_shift = 0,
|
||||
+ .parent_map = gcc_pxo_pll3_pll0_pll14_pll18_pll11_map,
|
||||
+ },
|
||||
+ .s[1] = {
|
||||
+ .src_sel_shift = 0,
|
||||
+ .parent_map = gcc_pxo_pll3_pll0_pll14_pll18_pll11_map,
|
||||
+ },
|
||||
+ .p[0] = {
|
||||
+ .pre_div_shift = 3,
|
||||
+ .pre_div_width = 4,
|
||||
+ },
|
||||
+ .p[1] = {
|
||||
+ .pre_div_shift = 3,
|
||||
+ .pre_div_width = 4,
|
||||
+ },
|
||||
+ .mux_sel_bit = 0,
|
||||
+ .freq_tbl = clk_tbl_ce5_core,
|
||||
+ .clkr = {
|
||||
+ .enable_reg = 0x36C0,
|
||||
+ .enable_mask = BIT(1),
|
||||
+ .hw.init = &(struct clk_init_data){
|
||||
+ .name = "ce5_core_src",
|
||||
+ .parent_names = gcc_pxo_pll3_pll0_pll14_pll18_pll11,
|
||||
+ .num_parents = 6,
|
||||
+ .ops = &clk_dyn_rcg_ops,
|
||||
+ },
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct clk_branch ce5_core_clk = {
|
||||
+ .halt_reg = 0x2FDC,
|
||||
+ .halt_bit = 5,
|
||||
+ .hwcg_reg = 0x36CC,
|
||||
+ .hwcg_bit = 6,
|
||||
+ .clkr = {
|
||||
+ .enable_reg = 0x36CC,
|
||||
+ .enable_mask = BIT(4),
|
||||
+ .hw.init = &(struct clk_init_data){
|
||||
+ .name = "ce5_core_clk",
|
||||
+ .parent_names = (const char *[]){
|
||||
+ "ce5_core_src",
|
||||
+ },
|
||||
+ .num_parents = 1,
|
||||
+ .ops = &clk_branch_ops,
|
||||
+ .flags = CLK_SET_RATE_PARENT,
|
||||
+ },
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static const struct freq_tbl clk_tbl_ce5_a_clk[] = {
|
||||
+ { 160000000, P_PLL0, 5, 1, 1 },
|
||||
+ { 213200000, P_PLL11, 5, 1, 1 },
|
||||
+ { }
|
||||
+};
|
||||
+
|
||||
+static struct clk_dyn_rcg ce5_a_clk_src = {
|
||||
+ .ns_reg[0] = 0x3d84,
|
||||
+ .ns_reg[1] = 0x3d88,
|
||||
+ .bank_reg = 0x3d80,
|
||||
+ .s[0] = {
|
||||
+ .src_sel_shift = 0,
|
||||
+ .parent_map = gcc_pxo_pll8_pll0_pll14_pll18_pll11_map,
|
||||
+ },
|
||||
+ .s[1] = {
|
||||
+ .src_sel_shift = 0,
|
||||
+ .parent_map = gcc_pxo_pll8_pll0_pll14_pll18_pll11_map,
|
||||
+ },
|
||||
+ .p[0] = {
|
||||
+ .pre_div_shift = 3,
|
||||
+ .pre_div_width = 4,
|
||||
+ },
|
||||
+ .p[1] = {
|
||||
+ .pre_div_shift = 3,
|
||||
+ .pre_div_width = 4,
|
||||
+ },
|
||||
+ .mux_sel_bit = 0,
|
||||
+ .freq_tbl = clk_tbl_ce5_a_clk,
|
||||
+ .clkr = {
|
||||
+ .enable_reg = 0x3d80,
|
||||
+ .enable_mask = BIT(1),
|
||||
+ .hw.init = &(struct clk_init_data){
|
||||
+ .name = "ce5_a_clk_src",
|
||||
+ .parent_names = gcc_pxo_pll8_pll0_pll14_pll18_pll11,
|
||||
+ .num_parents = 6,
|
||||
+ .ops = &clk_dyn_rcg_ops,
|
||||
+ },
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct clk_branch ce5_a_clk = {
|
||||
+ .halt_reg = 0x3c20,
|
||||
+ .halt_bit = 12,
|
||||
+ .hwcg_reg = 0x3d8c,
|
||||
+ .hwcg_bit = 6,
|
||||
+ .clkr = {
|
||||
+ .enable_reg = 0x3d8c,
|
||||
+ .enable_mask = BIT(4),
|
||||
+ .hw.init = &(struct clk_init_data){
|
||||
+ .name = "ce5_a_clk",
|
||||
+ .parent_names = (const char *[]){
|
||||
+ "ce5_a_clk_src",
|
||||
+ },
|
||||
+ .num_parents = 1,
|
||||
+ .ops = &clk_branch_ops,
|
||||
+ .flags = CLK_SET_RATE_PARENT,
|
||||
+ },
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static const struct freq_tbl clk_tbl_ce5_h_clk[] = {
|
||||
+ { 160000000, P_PLL0, 5, 1, 1 },
|
||||
+ { 213200000, P_PLL11, 5, 1, 1 },
|
||||
+ { }
|
||||
+};
|
||||
+
|
||||
+static struct clk_dyn_rcg ce5_h_clk_src = {
|
||||
+ .ns_reg[0] = 0x3c64,
|
||||
+ .ns_reg[1] = 0x3c68,
|
||||
+ .bank_reg = 0x3c60,
|
||||
+ .s[0] = {
|
||||
+ .src_sel_shift = 0,
|
||||
+ .parent_map = gcc_pxo_pll8_pll0_pll14_pll18_pll11_map,
|
||||
+ },
|
||||
+ .s[1] = {
|
||||
+ .src_sel_shift = 0,
|
||||
+ .parent_map = gcc_pxo_pll8_pll0_pll14_pll18_pll11_map,
|
||||
+ },
|
||||
+ .p[0] = {
|
||||
+ .pre_div_shift = 3,
|
||||
+ .pre_div_width = 4,
|
||||
+ },
|
||||
+ .p[1] = {
|
||||
+ .pre_div_shift = 3,
|
||||
+ .pre_div_width = 4,
|
||||
+ },
|
||||
+ .mux_sel_bit = 0,
|
||||
+ .freq_tbl = clk_tbl_ce5_h_clk,
|
||||
+ .clkr = {
|
||||
+ .enable_reg = 0x3c60,
|
||||
+ .enable_mask = BIT(1),
|
||||
+ .hw.init = &(struct clk_init_data){
|
||||
+ .name = "ce5_h_clk_src",
|
||||
+ .parent_names = gcc_pxo_pll8_pll0_pll14_pll18_pll11,
|
||||
+ .num_parents = 6,
|
||||
+ .ops = &clk_dyn_rcg_ops,
|
||||
+ },
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct clk_branch ce5_h_clk = {
|
||||
+ .halt_reg = 0x3c20,
|
||||
+ .halt_bit = 11,
|
||||
+ .hwcg_reg = 0x3c6c,
|
||||
+ .hwcg_bit = 6,
|
||||
+ .clkr = {
|
||||
+ .enable_reg = 0x3c6c,
|
||||
+ .enable_mask = BIT(4),
|
||||
+ .hw.init = &(struct clk_init_data){
|
||||
+ .name = "ce5_h_clk",
|
||||
+ .parent_names = (const char *[]){
|
||||
+ "ce5_h_clk_src",
|
||||
+ },
|
||||
+ .num_parents = 1,
|
||||
+ .ops = &clk_branch_ops,
|
||||
+ .flags = CLK_SET_RATE_PARENT,
|
||||
+ },
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
static struct clk_regmap *gcc_ipq806x_clks[] = {
|
||||
[PLL0] = &pll0.clkr,
|
||||
[PLL0_VOTE] = &pll0_vote,
|
||||
@@ -2766,6 +3004,7 @@ static struct clk_regmap *gcc_ipq806x_cl
|
||||
[PLL4_VOTE] = &pll4_vote,
|
||||
[PLL8] = &pll8.clkr,
|
||||
[PLL8_VOTE] = &pll8_vote,
|
||||
+ [PLL11] = &pll11.clkr,
|
||||
[PLL14] = &pll14.clkr,
|
||||
[PLL14_VOTE] = &pll14_vote,
|
||||
[PLL18] = &pll18.clkr,
|
||||
@@ -2880,6 +3119,12 @@ static struct clk_regmap *gcc_ipq806x_cl
|
||||
[PLL9] = &hfpll0.clkr,
|
||||
[PLL10] = &hfpll1.clkr,
|
||||
[PLL12] = &hfpll_l2.clkr,
|
||||
+ [CE5_A_CLK_SRC] = &ce5_a_clk_src.clkr,
|
||||
+ [CE5_A_CLK] = &ce5_a_clk.clkr,
|
||||
+ [CE5_H_CLK_SRC] = &ce5_h_clk_src.clkr,
|
||||
+ [CE5_H_CLK] = &ce5_h_clk.clkr,
|
||||
+ [CE5_CORE_CLK_SRC] = &ce5_core_src.clkr,
|
||||
+ [CE5_CORE_CLK] = &ce5_core_clk.clkr,
|
||||
};
|
||||
|
||||
static const struct qcom_reset_map gcc_ipq806x_resets[] = {
|
||||
@@ -3011,6 +3256,11 @@ static const struct qcom_reset_map gcc_i
|
||||
[GMAC_CORE3_RESET] = { 0x3cfc, 0 },
|
||||
[GMAC_CORE4_RESET] = { 0x3d1c, 0 },
|
||||
[GMAC_AHB_RESET] = { 0x3e24, 0 },
|
||||
+ [CRYPTO_ENG1_RESET] = { 0x3e00, 0},
|
||||
+ [CRYPTO_ENG2_RESET] = { 0x3e04, 0},
|
||||
+ [CRYPTO_ENG3_RESET] = { 0x3e08, 0},
|
||||
+ [CRYPTO_ENG4_RESET] = { 0x3e0c, 0},
|
||||
+ [CRYPTO_AHB_RESET] = { 0x3e10, 0},
|
||||
[NSS_CH0_RST_RX_CLK_N_RESET] = { 0x3b60, 0 },
|
||||
[NSS_CH0_RST_TX_CLK_N_RESET] = { 0x3b60, 1 },
|
||||
[NSS_CH0_RST_RX_125M_N_RESET] = { 0x3b60, 2 },
|
||||
--- a/include/dt-bindings/clock/qcom,gcc-ipq806x.h
|
||||
+++ b/include/dt-bindings/clock/qcom,gcc-ipq806x.h
|
||||
@@ -240,7 +240,7 @@
|
||||
#define PLL14 232
|
||||
#define PLL14_VOTE 233
|
||||
#define PLL18 234
|
||||
-#define CE5_SRC 235
|
||||
+#define CE5_A_CLK 235
|
||||
#define CE5_H_CLK 236
|
||||
#define CE5_CORE_CLK 237
|
||||
#define CE3_SLEEP_CLK 238
|
||||
@@ -283,5 +283,8 @@
|
||||
#define EBI2_AON_CLK 281
|
||||
#define NSSTCM_CLK_SRC 282
|
||||
#define NSSTCM_CLK 283
|
||||
+#define CE5_A_CLK_SRC 285
|
||||
+#define CE5_H_CLK_SRC 286
|
||||
+#define CE5_CORE_CLK_SRC 287
|
||||
|
||||
#endif
|
||||
--- a/include/dt-bindings/reset/qcom,gcc-ipq806x.h
|
||||
+++ b/include/dt-bindings/reset/qcom,gcc-ipq806x.h
|
||||
@@ -163,5 +163,10 @@
|
||||
#define NSS_CAL_PRBS_RST_N_RESET 154
|
||||
#define NSS_LCKDT_RST_N_RESET 155
|
||||
#define NSS_SRDS_N_RESET 156
|
||||
+#define CRYPTO_ENG1_RESET 157
|
||||
+#define CRYPTO_ENG2_RESET 158
|
||||
+#define CRYPTO_ENG3_RESET 159
|
||||
+#define CRYPTO_ENG4_RESET 160
|
||||
+#define CRYPTO_AHB_RESET 161
|
||||
|
||||
#endif
|
|
@ -0,0 +1,237 @@
|
|||
From c9ecd920324a647bf1f2b47f771c8f599cc7b551 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Sat, 22 Feb 2020 18:02:17 +0100
|
||||
Subject: [PATCH 2/8] Documentation: cpufreq: add qcom,krait-cache bindings
|
||||
|
||||
Document dedicated cpufreq for Krait CPUs.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
---
|
||||
.../bindings/cpufreq/qcom-cpufreq-krait.yaml | 221 ++++++++++++++++++
|
||||
1 file changed, 221 insertions(+)
|
||||
create mode 100644 Documentation/devicetree/bindings/cpufreq/qcom-cpufreq-krait.yaml
|
||||
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/cpufreq/qcom-cpufreq-krait.yaml
|
||||
@@ -0,0 +1,221 @@
|
||||
+# SPDX-License-Identifier: GPL-2.0
|
||||
+%YAML 1.2
|
||||
+---
|
||||
+$id: http://devicetree.org/schemas/cpufreq/qcom-cpufreq-krait.yaml#
|
||||
+$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
+
|
||||
+title: CPU Frequency scaling driver for Krait SoCs
|
||||
+
|
||||
+maintainers:
|
||||
+ - Ansuel Smith <ansuelsmth@gmail.com>
|
||||
+
|
||||
+description: |
|
||||
+ The krait cpufreq driver is a dedicated frequency scaling driver
|
||||
+ based on cpufreq-dt generic driver that scale L2 cache and the
|
||||
+ cores. TEST
|
||||
+
|
||||
+ The L2 cache is scaled based on the max clk across all cores and
|
||||
+ the clock is decided based on the opp-level set in the device tree.
|
||||
+
|
||||
+ Different core freq can be linked to a specific l2 freq and the driver
|
||||
+ on frequency change will scale the core and the l2 clk based of the
|
||||
+ linked freq.
|
||||
+
|
||||
+ On Krait SoC is present a bug and on every L2 clk change the driver
|
||||
+ needs to set the clk to the idle freq before changing it to the new value.
|
||||
+
|
||||
+ This requires the qcom cpufreq nvmem driver to parse the different opp
|
||||
+ core clk and an additional opp table for the l2 scaling.
|
||||
+
|
||||
+ If the driver detect broken config (for example missing opp-level) the
|
||||
+ cpufreq driver skips the l2 scaling
|
||||
+
|
||||
+ Referring to this example opp-level can be used to link a range of cpu freq
|
||||
+ to a specific l2 freq:
|
||||
+ cpu opp freq 384000000 has opp-level 0
|
||||
+ l2 opp freq 384000000 has opp-level 0
|
||||
+ The driver will scale l2 to 384000000
|
||||
+
|
||||
+ cpu opp freq 600000000-1000000000 has opp-level 1
|
||||
+ l2 opp freq 1000000000 has opp-level 1
|
||||
+ The driver will scale l2 to 1000000000
|
||||
+
|
||||
+allOf:
|
||||
+ - $ref: /schemas/cache-controller.yaml#
|
||||
+
|
||||
+select:
|
||||
+ properties:
|
||||
+ compatible:
|
||||
+ items:
|
||||
+ - enum:
|
||||
+ - qcom,krait-cache
|
||||
+
|
||||
+ required:
|
||||
+ - compatible
|
||||
+
|
||||
+properties:
|
||||
+ compatible:
|
||||
+ items:
|
||||
+ - const: qcom,krait-cache
|
||||
+ - const: cache
|
||||
+
|
||||
+ cache-level:
|
||||
+ const: 2
|
||||
+
|
||||
+ clocks:
|
||||
+ maxItems: 1
|
||||
+
|
||||
+ clock-names:
|
||||
+ const: l2
|
||||
+
|
||||
+ l2-supply: true
|
||||
+
|
||||
+ operating-points-v2: true
|
||||
+
|
||||
+required:
|
||||
+ - compatible
|
||||
+ - cache-level
|
||||
+ - clocks
|
||||
+ - clock-names
|
||||
+ - l2-supply
|
||||
+ - operating-points-v2
|
||||
+
|
||||
+additionalProperties: false
|
||||
+
|
||||
+examples:
|
||||
+ - |
|
||||
+ cpus {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ cpu0: cpu@0 {
|
||||
+ compatible = "qcom,krait";
|
||||
+ enable-method = "qcom,kpss-acc-v1";
|
||||
+ device_type = "cpu";
|
||||
+ reg = <0>;
|
||||
+ next-level-cache = <&L2>;
|
||||
+ qcom,acc = <&acc0>;
|
||||
+ qcom,saw = <&saw0>;
|
||||
+ clocks = <&kraitcc 0>, <&kraitcc 4>;
|
||||
+ clock-names = "cpu", "l2";
|
||||
+ clock-latency = <100000>;
|
||||
+ cpu-supply = <&smb208_s2a>;
|
||||
+ operating-points-v2 = <&opp_table0>;
|
||||
+ voltage-tolerance = <5>;
|
||||
+ cooling-min-state = <0>;
|
||||
+ cooling-max-state = <10>;
|
||||
+ #cooling-cells = <2>;
|
||||
+ cpu-idle-states = <&CPU_SPC>;
|
||||
+ };
|
||||
+
|
||||
+ /* ... */
|
||||
+
|
||||
+ };
|
||||
+
|
||||
+ opp_table0: opp_table0 {
|
||||
+ compatible = "operating-points-v2-kryo-cpu";
|
||||
+ nvmem-cells = <&speedbin_efuse>;
|
||||
+
|
||||
+ opp-384000000 {
|
||||
+ opp-hz = /bits/ 64 <384000000>;
|
||||
+ opp-microvolt-speed0-pvs0-v0 = <1000000>;
|
||||
+ opp-microvolt-speed0-pvs1-v0 = <925000>;
|
||||
+ opp-microvolt-speed0-pvs2-v0 = <875000>;
|
||||
+ opp-microvolt-speed0-pvs3-v0 = <800000>;
|
||||
+ opp-supported-hw = <0x1>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ opp-level = <0>;
|
||||
+ };
|
||||
+
|
||||
+ opp-600000000 {
|
||||
+ opp-hz = /bits/ 64 <600000000>;
|
||||
+ opp-microvolt-speed0-pvs0-v0 = <1050000>;
|
||||
+ opp-microvolt-speed0-pvs1-v0 = <975000>;
|
||||
+ opp-microvolt-speed0-pvs2-v0 = <925000>;
|
||||
+ opp-microvolt-speed0-pvs3-v0 = <850000>;
|
||||
+ opp-supported-hw = <0x1>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ opp-level = <1>;
|
||||
+ };
|
||||
+
|
||||
+ opp-800000000 {
|
||||
+ opp-hz = /bits/ 64 <800000000>;
|
||||
+ opp-microvolt-speed0-pvs0-v0 = <1100000>;
|
||||
+ opp-microvolt-speed0-pvs1-v0 = <1025000>;
|
||||
+ opp-microvolt-speed0-pvs2-v0 = <995000>;
|
||||
+ opp-microvolt-speed0-pvs3-v0 = <900000>;
|
||||
+ opp-supported-hw = <0x1>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ opp-level = <1>;
|
||||
+ };
|
||||
+
|
||||
+ opp-1000000000 {
|
||||
+ opp-hz = /bits/ 64 <1000000000>;
|
||||
+ opp-microvolt-speed0-pvs0-v0 = <1150000>;
|
||||
+ opp-microvolt-speed0-pvs1-v0 = <1075000>;
|
||||
+ opp-microvolt-speed0-pvs2-v0 = <1025000>;
|
||||
+ opp-microvolt-speed0-pvs3-v0 = <950000>;
|
||||
+ opp-supported-hw = <0x1>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ opp-level = <1>;
|
||||
+ };
|
||||
+
|
||||
+ opp-1200000000 {
|
||||
+ opp-hz = /bits/ 64 <1200000000>;
|
||||
+ opp-microvolt-speed0-pvs0-v0 = <1200000>;
|
||||
+ opp-microvolt-speed0-pvs1-v0 = <1125000>;
|
||||
+ opp-microvolt-speed0-pvs2-v0 = <1075000>;
|
||||
+ opp-microvolt-speed0-pvs3-v0 = <1000000>;
|
||||
+ opp-supported-hw = <0x1>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ opp-level = <2>;
|
||||
+ };
|
||||
+
|
||||
+ opp-1400000000 {
|
||||
+ opp-hz = /bits/ 64 <1400000000>;
|
||||
+ opp-microvolt-speed0-pvs0-v0 = <1250000>;
|
||||
+ opp-microvolt-speed0-pvs1-v0 = <1175000>;
|
||||
+ opp-microvolt-speed0-pvs2-v0 = <1125000>;
|
||||
+ opp-microvolt-speed0-pvs3-v0 = <1050000>;
|
||||
+ opp-supported-hw = <0x1>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ opp-level = <2>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ opp_table_l2: opp_table_l2 {
|
||||
+ compatible = "operating-points-v2";
|
||||
+
|
||||
+ opp-384000000 {
|
||||
+ opp-hz = /bits/ 64 <384000000>;
|
||||
+ opp-microvolt = <1100000>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ opp-level = <0>;
|
||||
+ };
|
||||
+ opp-1000000000 {
|
||||
+ opp-hz = /bits/ 64 <1000000000>;
|
||||
+ opp-microvolt = <1100000>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ opp-level = <1>;
|
||||
+ };
|
||||
+ opp-1200000000 {
|
||||
+ opp-hz = /bits/ 64 <1200000000>;
|
||||
+ opp-microvolt = <1150000>;
|
||||
+ clock-latency-ns = <100000>;
|
||||
+ opp-level = <2>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ soc {
|
||||
+ L2: l2-cache {
|
||||
+ compatible = "qcom,krait-cache", "cache";
|
||||
+ cache-level = <2>;
|
||||
+
|
||||
+ clocks = <&kraitcc 4>;
|
||||
+ clock-names = "l2";
|
||||
+ l2-supply = <&smb208_s1a>;
|
||||
+ operating-points-v2 = <&opp_table_l2>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+...
|
|
@ -0,0 +1,83 @@
|
|||
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
|
||||
@@ -64,6 +64,17 @@
|
||||
#define NSS_COMMON_CLK_DIV_SGMII_100 4
|
||||
#define NSS_COMMON_CLK_DIV_SGMII_10 49
|
||||
|
||||
+#define QSGMII_PCS_ALL_CH_CTL 0x80
|
||||
+#define QSGMII_PCS_CH_SPEED_FORCE 0x2
|
||||
+#define QSGMII_PCS_CH_SPEED_10 0x0
|
||||
+#define QSGMII_PCS_CH_SPEED_100 0x4
|
||||
+#define QSGMII_PCS_CH_SPEED_1000 0x8
|
||||
+#define QSGMII_PCS_CH_SPEED_MASK (QSGMII_PCS_CH_SPEED_FORCE | \
|
||||
+ QSGMII_PCS_CH_SPEED_10 | \
|
||||
+ QSGMII_PCS_CH_SPEED_100 | \
|
||||
+ QSGMII_PCS_CH_SPEED_1000)
|
||||
+#define QSGMII_PCS_CH_SPEED_SHIFT(x) (x * 4)
|
||||
+
|
||||
#define QSGMII_PCS_CAL_LCKDT_CTL 0x120
|
||||
#define QSGMII_PCS_CAL_LCKDT_CTL_RST BIT(19)
|
||||
|
||||
@@ -242,6 +253,36 @@ static void ipq806x_gmac_fix_mac_speed(v
|
||||
ipq806x_gmac_set_speed(gmac, speed);
|
||||
}
|
||||
|
||||
+static int
|
||||
+ipq806x_gmac_get_qsgmii_pcs_speed_val(struct platform_device *pdev) {
|
||||
+ struct device_node *fixed_link_node;
|
||||
+ int rv;
|
||||
+ int fixed_link_speed;
|
||||
+
|
||||
+ if (!of_phy_is_fixed_link(pdev->dev.of_node))
|
||||
+ return 0;
|
||||
+
|
||||
+ fixed_link_node = of_get_child_by_name(pdev->dev.of_node, "fixed-link");
|
||||
+ if (!fixed_link_node)
|
||||
+ return -1;
|
||||
+
|
||||
+ rv = of_property_read_u32(fixed_link_node, "speed", &fixed_link_speed);
|
||||
+ of_node_put(fixed_link_node);
|
||||
+ if (rv)
|
||||
+ return -1;
|
||||
+
|
||||
+ switch (fixed_link_speed) {
|
||||
+ case SPEED_1000:
|
||||
+ return QSGMII_PCS_CH_SPEED_FORCE | QSGMII_PCS_CH_SPEED_1000;
|
||||
+ case SPEED_100:
|
||||
+ return QSGMII_PCS_CH_SPEED_FORCE | QSGMII_PCS_CH_SPEED_100;
|
||||
+ case SPEED_10:
|
||||
+ return QSGMII_PCS_CH_SPEED_FORCE | QSGMII_PCS_CH_SPEED_10;
|
||||
+ }
|
||||
+
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
static int ipq806x_gmac_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct plat_stmmacenet_data *plat_dat;
|
||||
@@ -250,6 +291,7 @@ static int ipq806x_gmac_probe(struct pla
|
||||
struct ipq806x_gmac *gmac;
|
||||
int val;
|
||||
int err;
|
||||
+ int qsgmii_pcs_speed;
|
||||
|
||||
val = stmmac_get_platform_resources(pdev, &stmmac_res);
|
||||
if (val)
|
||||
@@ -346,6 +388,17 @@ static int ipq806x_gmac_probe(struct pla
|
||||
0x1ul << QSGMII_PHY_RX_INPUT_EQU_OFFSET |
|
||||
0x2ul << QSGMII_PHY_CDR_PI_SLEW_OFFSET |
|
||||
0xCul << QSGMII_PHY_TX_DRV_AMP_OFFSET);
|
||||
+
|
||||
+ qsgmii_pcs_speed = ipq806x_gmac_get_qsgmii_pcs_speed_val(pdev);
|
||||
+ if (qsgmii_pcs_speed != -1) {
|
||||
+ regmap_update_bits(
|
||||
+ gmac->qsgmii_csr,
|
||||
+ QSGMII_PCS_ALL_CH_CTL,
|
||||
+ QSGMII_PCS_CH_SPEED_MASK <<
|
||||
+ QSGMII_PCS_CH_SPEED_SHIFT(gmac->id),
|
||||
+ qsgmii_pcs_speed <<
|
||||
+ QSGMII_PCS_CH_SPEED_SHIFT(gmac->id));
|
||||
+ }
|
||||
}
|
||||
|
||||
plat_dat->has_gmac = true;
|
|
@ -0,0 +1,24 @@
|
|||
From 5001f2e1a325b68dbf225bd17f69a4d3d975cca5 Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <john@phrozen.org>
|
||||
Date: Thu, 9 Mar 2017 09:31:44 +0100
|
||||
Subject: [PATCH 61/69] mtd: "rootfs" conflicts with OpenWrt auto mounting
|
||||
|
||||
Signed-off-by: John Crispin <john@phrozen.org>
|
||||
---
|
||||
drivers/mtd/parsers/qcomsmempart.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/drivers/mtd/parsers/qcomsmempart.c
|
||||
+++ b/drivers/mtd/parsers/qcomsmempart.c
|
||||
@@ -132,6 +132,11 @@ static int parse_qcomsmem_part(struct mt
|
||||
parts[i].offset = le32_to_cpu(pentry->offset) * mtd->erasesize;
|
||||
parts[i].mask_flags = pentry->attr;
|
||||
parts[i].size = le32_to_cpu(pentry->length) * mtd->erasesize;
|
||||
+
|
||||
+ /* "rootfs" conflicts with OpenWrt auto mounting */
|
||||
+ if (mtd_type_is_nand(mtd) && !strcmp(name, "rootfs"))
|
||||
+ parts[i].name = "ubi";
|
||||
+
|
||||
pr_debug("%d: %s offs=0x%08x size=0x%08x attr:0x%08x\n",
|
||||
i, pentry->name, le32_to_cpu(pentry->offset),
|
||||
le32_to_cpu(pentry->length), pentry->attr);
|
|
@ -0,0 +1,46 @@
|
|||
From 84909e85881d67244240c9f40974ce12a51e3886 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Tue, 11 May 2021 23:09:45 +0200
|
||||
Subject: [PATCH] ARM: dts: qcom: reduce pci IO size to 64K
|
||||
|
||||
The current value is probably a typo and is actually uncommon to find
|
||||
1MB IO space even on a x86 arch. Also with recent changes to the pci
|
||||
driver, pci1 and pci2 now fails to function as any connected device
|
||||
fails any reg read/write. Reduce this to 64K as it should be more than
|
||||
enough and 3 * 64K of total IO space doesn't exceed the IO_SPACE_LIMIT
|
||||
hardcoded for the ARM arch.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/qcom-ipq8064.dtsi | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
|
||||
@@ -1088,7 +1088,7 @@
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
- ranges = <0x81000000 0 0x0fe00000 0x0fe00000 0 0x00100000 /* downstream I/O */
|
||||
+ ranges = <0x81000000 0 0x0fe00000 0x0fe00000 0 0x00010000 /* downstream I/O */
|
||||
0x82000000 0 0x08000000 0x08000000 0 0x07e00000>; /* non-prefetchable memory */
|
||||
|
||||
interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
|
||||
@@ -1139,7 +1139,7 @@
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
- ranges = <0x81000000 0 0x31e00000 0x31e00000 0 0x00100000 /* downstream I/O */
|
||||
+ ranges = <0x81000000 0 0x31e00000 0x31e00000 0 0x00010000 /* downstream I/O */
|
||||
0x82000000 0 0x2e000000 0x2e000000 0 0x03e00000>; /* non-prefetchable memory */
|
||||
|
||||
interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
|
||||
@@ -1190,7 +1190,7 @@
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
- ranges = <0x81000000 0 0x35e00000 0x35e00000 0 0x00100000 /* downstream I/O */
|
||||
+ ranges = <0x81000000 0 0x35e00000 0x35e00000 0 0x00010000 /* downstream I/O */
|
||||
0x82000000 0 0x32000000 0x32000000 0 0x03e00000>; /* non-prefetchable memory */
|
||||
|
||||
interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
|
|
@ -0,0 +1,41 @@
|
|||
From 8f32d48a309246a80bdca505968085a484d54408 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Mon, 19 Apr 2021 03:01:53 +0200
|
||||
Subject: [thermal-next PATCH v2 1/2] thermal: qcom: tsens: init debugfs only with
|
||||
successful probe
|
||||
|
||||
calibrate and tsens_register can fail or PROBE_DEFER. This will cause a
|
||||
double or a wrong init of the debugfs information. Init debugfs only
|
||||
with successful probe fixing warning about directory already present.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Acked-by: Thara Gopinath <thara.gopinath@linaro.org>
|
||||
---
|
||||
drivers/thermal/qcom/tsens.c | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/thermal/qcom/tsens.c
|
||||
+++ b/drivers/thermal/qcom/tsens.c
|
||||
@@ -918,8 +918,6 @@ int __init init_common(struct tsens_priv
|
||||
if (tsens_version(priv) >= VER_0_1)
|
||||
tsens_enable_irq(priv);
|
||||
|
||||
- tsens_debug_init(op);
|
||||
-
|
||||
err_put_device:
|
||||
put_device(&op->dev);
|
||||
return ret;
|
||||
@@ -1155,7 +1153,12 @@ static int tsens_probe(struct platform_d
|
||||
}
|
||||
}
|
||||
|
||||
- return tsens_register(priv);
|
||||
+ ret = tsens_register(priv);
|
||||
+
|
||||
+ if (!ret)
|
||||
+ tsens_debug_init(pdev);
|
||||
+
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
static int tsens_remove(struct platform_device *pdev)
|
|
@ -0,0 +1,54 @@
|
|||
From 4204f22060f7a5d42c6ccb4d4c25a6a875571099 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Mon, 19 Apr 2021 03:08:37 +0200
|
||||
Subject: [thermal-next PATCH v2 2/2] thermal: qcom: tsens: simplify debugfs init
|
||||
function
|
||||
|
||||
Simplify debugfs init function.
|
||||
- Add check for existing dev directory.
|
||||
- Fix wrong version in dbg_version_show (with version 0.0.0, 0.1.0 was
|
||||
incorrectly reported)
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Thara Gopinath <thara.gopinath@linaro.org>
|
||||
---
|
||||
drivers/thermal/qcom/tsens.c | 16 +++++++---------
|
||||
1 file changed, 7 insertions(+), 9 deletions(-)
|
||||
|
||||
--- a/drivers/thermal/qcom/tsens.c
|
||||
+++ b/drivers/thermal/qcom/tsens.c
|
||||
@@ -692,7 +692,7 @@ static int dbg_version_show(struct seq_f
|
||||
return ret;
|
||||
seq_printf(s, "%d.%d.%d\n", maj_ver, min_ver, step_ver);
|
||||
} else {
|
||||
- seq_puts(s, "0.1.0\n");
|
||||
+ seq_printf(s, "0.%d.0\n", priv->feat->ver_major);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -704,21 +704,17 @@ DEFINE_SHOW_ATTRIBUTE(dbg_sensors);
|
||||
static void tsens_debug_init(struct platform_device *pdev)
|
||||
{
|
||||
struct tsens_priv *priv = platform_get_drvdata(pdev);
|
||||
- struct dentry *root, *file;
|
||||
|
||||
- root = debugfs_lookup("tsens", NULL);
|
||||
- if (!root)
|
||||
+ priv->debug_root = debugfs_lookup("tsens", NULL);
|
||||
+ if (!priv->debug_root)
|
||||
priv->debug_root = debugfs_create_dir("tsens", NULL);
|
||||
- else
|
||||
- priv->debug_root = root;
|
||||
|
||||
- file = debugfs_lookup("version", priv->debug_root);
|
||||
- if (!file)
|
||||
+ if (!debugfs_lookup("version", priv->debug_root))
|
||||
debugfs_create_file("version", 0444, priv->debug_root,
|
||||
pdev, &dbg_version_fops);
|
||||
|
||||
/* A directory for each instance of the TSENS IP */
|
||||
- priv->debug = debugfs_create_dir(dev_name(&pdev->dev), priv->debug_root);
|
||||
+ priv->debug = debugfs_lookup(dev_name(&pdev->dev), priv->debug_root);
|
||||
debugfs_create_file("sensors", 0444, priv->debug, pdev, &dbg_sensors_fops);
|
||||
}
|
||||
#else
|
|
@ -0,0 +1,121 @@
|
|||
From: Christian Lamparter <chunkeey@googlemail.com>
|
||||
Subject: SoC: add qualcomm syscon
|
||||
--- a/drivers/soc/qcom/Makefile
|
||||
+++ b/drivers/soc/qcom/Makefile
|
||||
@@ -21,6 +21,7 @@ obj-$(CONFIG_QCOM_SMP2P) += smp2p.o
|
||||
obj-$(CONFIG_QCOM_SMSM) += smsm.o
|
||||
obj-$(CONFIG_QCOM_SOCINFO) += socinfo.o
|
||||
obj-$(CONFIG_QCOM_WCNSS_CTRL) += wcnss_ctrl.o
|
||||
+obj-$(CONFIG_QCOM_TCSR) += qcom_tcsr.o
|
||||
obj-$(CONFIG_QCOM_APR) += apr.o
|
||||
obj-$(CONFIG_QCOM_LLCC) += llcc-qcom.o
|
||||
obj-$(CONFIG_QCOM_RPMHPD) += rpmhpd.o
|
||||
--- a/drivers/soc/qcom/Kconfig
|
||||
+++ b/drivers/soc/qcom/Kconfig
|
||||
@@ -189,6 +189,13 @@ config QCOM_SOCINFO
|
||||
Say yes here to support the Qualcomm socinfo driver, providing
|
||||
information about the SoC to user space.
|
||||
|
||||
+config QCOM_TCSR
|
||||
+ tristate "QCOM Top Control and Status Registers"
|
||||
+ depends on ARCH_QCOM
|
||||
+ help
|
||||
+ Say y here to enable TCSR support. The TCSR provides control
|
||||
+ functions for various peripherals.
|
||||
+
|
||||
config QCOM_WCNSS_CTRL
|
||||
tristate "Qualcomm WCNSS control driver"
|
||||
depends on ARCH_QCOM || COMPILE_TEST
|
||||
--- /dev/null
|
||||
+++ b/drivers/soc/qcom/qcom_tcsr.c
|
||||
@@ -0,0 +1,64 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2014, The Linux foundation. All rights reserved.
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License rev 2 and
|
||||
+ * only rev 2 as published by the free Software foundation.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or fITNESS fOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/clk.h>
|
||||
+#include <linux/err.h>
|
||||
+#include <linux/io.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/of.h>
|
||||
+#include <linux/of_platform.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+
|
||||
+#define TCSR_USB_PORT_SEL 0xb0
|
||||
+
|
||||
+static int tcsr_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct resource *res;
|
||||
+ const struct device_node *node = pdev->dev.of_node;
|
||||
+ void __iomem *base;
|
||||
+ u32 val;
|
||||
+
|
||||
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
+ base = devm_ioremap_resource(&pdev->dev, res);
|
||||
+ if (IS_ERR(base))
|
||||
+ return PTR_ERR(base);
|
||||
+
|
||||
+ if (!of_property_read_u32(node, "qcom,usb-ctrl-select", &val)) {
|
||||
+ dev_err(&pdev->dev, "setting usb port select = %d\n", val);
|
||||
+ writel(val, base + TCSR_USB_PORT_SEL);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct of_device_id tcsr_dt_match[] = {
|
||||
+ { .compatible = "qcom,tcsr", },
|
||||
+ { },
|
||||
+};
|
||||
+
|
||||
+MODULE_DEVICE_TABLE(of, tcsr_dt_match);
|
||||
+
|
||||
+static struct platform_driver tcsr_driver = {
|
||||
+ .driver = {
|
||||
+ .name = "tcsr",
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .of_match_table = tcsr_dt_match,
|
||||
+ },
|
||||
+ .probe = tcsr_probe,
|
||||
+};
|
||||
+
|
||||
+module_platform_driver(tcsr_driver);
|
||||
+
|
||||
+MODULE_AUTHOR("Andy Gross <agross@codeaurora.org>");
|
||||
+MODULE_DESCRIPTION("QCOM TCSR driver");
|
||||
+MODULE_LICENSE("GPL v2");
|
||||
--- /dev/null
|
||||
+++ b/include/dt-bindings/soc/qcom,tcsr.h
|
||||
@@ -0,0 +1,23 @@
|
||||
+/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License version 2 and
|
||||
+ * only version 2 as published by the Free Software Foundation.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ */
|
||||
+#ifndef __DT_BINDINGS_QCOM_TCSR_H
|
||||
+#define __DT_BINDINGS_QCOM_TCSR_H
|
||||
+
|
||||
+#define TCSR_USB_SELECT_USB3_P0 0x1
|
||||
+#define TCSR_USB_SELECT_USB3_P1 0x2
|
||||
+#define TCSR_USB_SELECT_USB3_DUAL 0x3
|
||||
+
|
||||
+/* TCSR A/B REG */
|
||||
+#define IPQ806X_TCSR_REG_A_ADM_CRCI_MUX_SEL 0
|
||||
+#define IPQ806X_TCSR_REG_B_ADM_CRCI_MUX_SEL 1
|
||||
+
|
||||
+#endif
|
|
@ -0,0 +1,44 @@
|
|||
--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
|
||||
@@ -750,6 +750,41 @@
|
||||
reg = <0x12100000 0x10000>;
|
||||
};
|
||||
|
||||
+ gsbi1: gsbi@12440000 {
|
||||
+ compatible = "qcom,gsbi-v1.0.0";
|
||||
+ cell-index = <1>;
|
||||
+ reg = <0x12440000 0x100>;
|
||||
+ clocks = <&gcc GSBI1_H_CLK>;
|
||||
+ clock-names = "iface";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ ranges;
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ syscon-tcsr = <&tcsr>;
|
||||
+
|
||||
+ gsbi1_serial: serial@12450000 {
|
||||
+ compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
|
||||
+ reg = <0x12450000 0x100>,
|
||||
+ <0x12400000 0x03>;
|
||||
+ interrupts = <GIC_SPI 193 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&gcc GSBI1_UART_CLK>, <&gcc GSBI1_H_CLK>;
|
||||
+ clock-names = "core", "iface";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ gsbi1_i2c: i2c@12460000 {
|
||||
+ compatible = "qcom,i2c-qup-v1.1.1";
|
||||
+ reg = <0x12460000 0x1000>;
|
||||
+ interrupts = <GIC_SPI 194 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&gcc GSBI1_QUP_CLK>, <&gcc GSBI1_H_CLK>;
|
||||
+ clock-names = "core", "iface";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
gsbi2: gsbi@12480000 {
|
||||
compatible = "qcom,gsbi-v1.0.0";
|
||||
cell-index = <2>;
|
|
@ -0,0 +1,37 @@
|
|||
--- a/arch/arm/Kconfig
|
||||
+++ b/arch/arm/Kconfig
|
||||
@@ -1793,6 +1793,14 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_MANGL
|
||||
|
||||
endchoice
|
||||
|
||||
+config CMDLINE_OVERRIDE
|
||||
+ bool "Use alternative cmdline from device tree"
|
||||
+ help
|
||||
+ Some bootloaders may have uneditable bootargs. While CMDLINE_FORCE can
|
||||
+ be used, this is not a good option for kernels that are shared across
|
||||
+ devices. This setting enables using "chosen/cmdline-override" as the
|
||||
+ cmdline if it exists in the device tree.
|
||||
+
|
||||
config CMDLINE
|
||||
string "Default kernel command string"
|
||||
default ""
|
||||
--- a/drivers/of/fdt.c
|
||||
+++ b/drivers/of/fdt.c
|
||||
@@ -1056,6 +1056,17 @@ int __init early_init_dt_scan_chosen(uns
|
||||
if (p != NULL && l > 0)
|
||||
strlcpy(data, p, min(l, COMMAND_LINE_SIZE));
|
||||
|
||||
+ /* CONFIG_CMDLINE_OVERRIDE is used to fallback to a different
|
||||
+ * device tree option of chosen/bootargs-override. This is
|
||||
+ * helpful on boards where u-boot sets bootargs, and is unable
|
||||
+ * to be modified.
|
||||
+ */
|
||||
+#ifdef CONFIG_CMDLINE_OVERRIDE
|
||||
+ p = of_get_flat_dt_prop(node, "bootargs-override", &l);
|
||||
+ if (p != NULL && l > 0)
|
||||
+ strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE));
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* CONFIG_CMDLINE is meant to be a default in case nothing else
|
||||
* managed to set the command line, unless CONFIG_CMDLINE_FORCE
|
|
@ -0,0 +1,12 @@
|
|||
--- a/drivers/of/fdt.c
|
||||
+++ b/drivers/of/fdt.c
|
||||
@@ -1055,6 +1055,9 @@ int __init early_init_dt_scan_chosen(uns
|
||||
p = of_get_flat_dt_prop(node, "bootargs", &l);
|
||||
if (p != NULL && l > 0)
|
||||
strlcpy(data, p, min(l, COMMAND_LINE_SIZE));
|
||||
+ p = of_get_flat_dt_prop(node, "bootargs-append", &l);
|
||||
+ if (p != NULL && l > 0)
|
||||
+ strlcat(data, p, min_t(int, strlen(data) + (int)l, COMMAND_LINE_SIZE));
|
||||
|
||||
/* CONFIG_CMDLINE_OVERRIDE is used to fallback to a different
|
||||
* device tree option of chosen/bootargs-override. This is
|
Loading…
Reference in a new issue