/openbmc/linux/drivers/gpu/drm/tegra/ |
H A D | mipi-phy.c | 1 // SPDX-License-Identifier: GPL-2.0-only 9 #include "mipi-phy.h" 12 * Default D-PHY timings based on MIPI D-PHY specification. Derived from the 13 * valid ranges specified in Section 6.9, Table 14, Page 40 of the D-PHY 16 int mipi_dphy_timing_get_default(struct mipi_dphy_timing *timing, in mipi_dphy_timing_get_default() argument 19 timing->clkmiss = 0; in mipi_dphy_timing_get_default() 20 timing->clkpost = 70 + 52 * period; in mipi_dphy_timing_get_default() 21 timing->clkpre = 8; in mipi_dphy_timing_get_default() 22 timing->clkprepare = 65; in mipi_dphy_timing_get_default() 23 timing->clksettle = 95; in mipi_dphy_timing_get_default() [all …]
|
/openbmc/linux/drivers/gpu/drm/msm/dsi/phy/ |
H A D | dsi_phy.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 #include <linux/clk-provider.h> 8 #include <dt-bindings/phy/phy.h> 13 (((n) >= 0) ? (((n) + (d) - 1) / (d)) : (((n) - (d) + 1) / (d))) 20 v = (tmax - tmin) * percent; in linear_inter() 23 return max_t(s32, min_result, v - 1); in linear_inter() 28 static void dsi_dphy_timing_calc_clk_zero(struct msm_dsi_dphy_timing *timing, in dsi_dphy_timing_calc_clk_zero() argument 35 temp = 300 * coeff - ((timing->clk_prepare >> 1) + 1) * 2 * ui; in dsi_dphy_timing_calc_clk_zero() 36 tmin = S_DIV_ROUND_UP(temp, ui) - 2; in dsi_dphy_timing_calc_clk_zero() 46 temp = (timing->hs_rqst + timing->clk_prepare + clk_z) & 0x7; in dsi_dphy_timing_calc_clk_zero() [all …]
|
H A D | dsi_phy_20nm.c | 1 // SPDX-License-Identifier: GPL-2.0-only 11 struct msm_dsi_dphy_timing *timing) in dsi_20nm_dphy_set_timing() argument 13 void __iomem *base = phy->base; in dsi_20nm_dphy_set_timing() 16 DSI_20nm_PHY_TIMING_CTRL_0_CLK_ZERO(timing->clk_zero)); in dsi_20nm_dphy_set_timing() 18 DSI_20nm_PHY_TIMING_CTRL_1_CLK_TRAIL(timing->clk_trail)); in dsi_20nm_dphy_set_timing() 20 DSI_20nm_PHY_TIMING_CTRL_2_CLK_PREPARE(timing->clk_prepare)); in dsi_20nm_dphy_set_timing() 21 if (timing->clk_zero & BIT(8)) in dsi_20nm_dphy_set_timing() 25 DSI_20nm_PHY_TIMING_CTRL_4_HS_EXIT(timing->hs_exit)); in dsi_20nm_dphy_set_timing() 27 DSI_20nm_PHY_TIMING_CTRL_5_HS_ZERO(timing->hs_zero)); in dsi_20nm_dphy_set_timing() 29 DSI_20nm_PHY_TIMING_CTRL_6_HS_PREPARE(timing->hs_prepare)); in dsi_20nm_dphy_set_timing() [all …]
|
/openbmc/linux/drivers/clk/tegra/ |
H A D | clk-tegra124-emc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * drivers/clk/tegra/clk-emc.c 11 #include <linux/clk-provider.h> 48 * When we change the timing to a timing with a parent that has the same 50 * timing that has a different clock source. 105 val = readl(tegra->clk_regs + CLK_SOURCE_EMC); in emc_recalc_rate() 120 struct emc_timing *timing = NULL; in emc_determine_rate() local 125 for (k = 0; k < tegra->num_timings; k++) { in emc_determine_rate() 126 if (tegra->timings[k].ram_code == ram_code) in emc_determine_rate() 130 for (t = k; t < tegra->num_timings; t++) { in emc_determine_rate() [all …]
|
/openbmc/linux/drivers/gpu/drm/amd/display/dc/link/ |
H A D | link_validation.c | 27 * This file owns timing validation against various link limitations. (ex. 38 static uint32_t get_tmds_output_pixel_clock_100hz(const struct dc_crtc_timing *timing) in get_tmds_output_pixel_clock_100hz() argument 41 uint32_t pxl_clk = timing->pix_clk_100hz; in get_tmds_output_pixel_clock_100hz() 43 if (timing->pixel_encoding == PIXEL_ENCODING_YCBCR420) in get_tmds_output_pixel_clock_100hz() 45 else if (timing->pixel_encoding == PIXEL_ENCODING_YCBCR422) in get_tmds_output_pixel_clock_100hz() 48 if (timing->display_color_depth == COLOR_DEPTH_101010) in get_tmds_output_pixel_clock_100hz() 50 else if (timing->display_color_depth == COLOR_DEPTH_121212) in get_tmds_output_pixel_clock_100hz() 57 const struct dc_crtc_timing *timing, in dp_active_dongle_validate_timing() argument 60 const struct dc_dongle_caps *dongle_caps = &dpcd_caps->dongle_caps; in dp_active_dongle_validate_timing() 62 switch (dpcd_caps->dongle_type) { in dp_active_dongle_validate_timing() [all …]
|
/openbmc/u-boot/drivers/video/tegra124/ |
H A D | display.c | 1 // SPDX-License-Identifier: GPL-2.0+ 20 #include <asm/arch-tegra/dc.h> 21 #include <dm/uclass-internal.h> 25 static int tegra_dc_calc_refresh(const struct display_timing *timing) in tegra_dc_calc_refresh() argument 28 int pclk = timing->pixelclock.typ; in tegra_dc_calc_refresh() 30 h_total = timing->hactive.typ + timing->hfront_porch.typ + in tegra_dc_calc_refresh() 31 timing->hback_porch.typ + timing->hsync_len.typ; in tegra_dc_calc_refresh() 32 v_total = timing->vactive.typ + timing->vfront_porch.typ + in tegra_dc_calc_refresh() 33 timing->vback_porch.typ + timing->vsync_len.typ; in tegra_dc_calc_refresh() 43 static void print_mode(const struct display_timing *timing) in print_mode() argument [all …]
|
/openbmc/u-boot/drivers/video/ |
H A D | atmel_lcdfb.c | 1 // SPDX-License-Identifier: GPL-2.0+ 32 struct display_timing timing; member 108 struct bmp_color_table_entry cte = bmp->color_table[i]; in lcd_set_cmap() 114 static void atmel_fb_init(ulong addr, struct display_timing *timing, int bpix, in atmel_fb_init() argument 134 value = (timing->hactive.typ * timing->vactive.typ * in atmel_fb_init() 136 value |= ((ATMEL_LCDC_DMA_BURST_LEN - 1) << ATMEL_LCDC_BLENGTH_OFFSET); in atmel_fb_init() 140 value = get_lcdc_clk_rate(0) / timing->pixelclock.typ; in atmel_fb_init() 141 if (get_lcdc_clk_rate(0) % timing->pixelclock.typ) in atmel_fb_init() 143 value = (value / 2) - 1; in atmel_fb_init() 156 if (!(timing->flags & DISPLAY_FLAGS_HSYNC_HIGH)) in atmel_fb_init() [all …]
|
/openbmc/linux/drivers/gpu/drm/msm/disp/dpu1/ |
H A D | dpu_encoder_phys_vid.c | 1 // SPDX-License-Identifier: GPL-2.0-only 2 /* Copyright (c) 2015-2018, 2020-2021 The Linux Foundation. All rights reserved. 17 (e) && (e)->parent ? \ 18 (e)->parent->base.id : -1, \ 19 (e) && (e)->hw_intf ? \ 20 (e)->hw_intf->idx - INTF_0 : -1, ##__VA_ARGS__) 23 (e) && (e)->parent ? \ 24 (e)->parent->base.id : -1, \ 25 (e) && (e)->hw_intf ? \ 26 (e)->hw_intf->idx - INTF_0 : -1, ##__VA_ARGS__) [all …]
|
/openbmc/linux/drivers/gpu/drm/nouveau/nvkm/subdev/bios/ |
H A D | timing.c | 26 #include <subdev/bios/timing.h> 33 u32 timing = 0; in nvbios_timingTe() local 37 timing = nvbios_rd32(bios, bit_P.offset + 4); in nvbios_timingTe() 40 timing = nvbios_rd32(bios, bit_P.offset + 8); in nvbios_timingTe() 42 if (timing) { in nvbios_timingTe() 43 *ver = nvbios_rd08(bios, timing + 0); in nvbios_timingTe() 46 *hdr = nvbios_rd08(bios, timing + 1); in nvbios_timingTe() 47 *cnt = nvbios_rd08(bios, timing + 2); in nvbios_timingTe() 48 *len = nvbios_rd08(bios, timing + 3); in nvbios_timingTe() 51 return timing; in nvbios_timingTe() [all …]
|
/openbmc/linux/drivers/gpu/drm/amd/display/dc/dcn201/ |
H A D | dcn201_optc.c | 2 * Copyright 2012-15 Advanced Micro Devices, Inc. 32 optc1->tg_regs->reg 35 optc1->base.ctx 39 optc1->tg_shift->field_name, optc1->tg_mask->field_name 42 bool optc201_is_two_pixels_per_containter(const struct dc_crtc_timing *timing) in optc201_is_two_pixels_per_containter() argument 44 return optc1_is_two_pixels_per_containter(timing); in optc201_is_two_pixels_per_containter() 52 OTG_MASTER_UPDATE_LOCK_SEL, optc->inst); in optc201_triplebuffer_lock() 76 const struct dc_crtc_timing *timing) in optc201_validate_timing() argument 83 ASSERT(timing != NULL); in optc201_validate_timing() 85 v_blank = (timing->v_total - timing->v_addressable - in optc201_validate_timing() [all …]
|
/openbmc/linux/drivers/video/fbdev/ |
H A D | gbefb.c | 4 * Copyright (C) 1999 Silicon Graphics, Inc. - Jeffrey Newquist 5 * Copyright (C) 2002 Vivien Chappelier <vivien.chappelier@linux-mips.org> 14 #include <linux/dma-mapping.h> 37 struct gbe_timing_info timing; member 44 /* macro for fastest write-though access to the framebuffer */ 63 #define TILE_MASK (TILE_SIZE - 1) 87 /* 640x480, 60 Hz, Non-Interlaced (25.175 MHz dotclock) */ 102 .height = -1, 103 .width = -1, 133 .height = -1, [all …]
|
/openbmc/linux/drivers/video/fbdev/via/ |
H A D | via_modesetting.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright 1998-2008 VIA Technologies, Inc. All Rights Reserved. 4 * Copyright 2001-2008 S3 Graphics, Inc. All Rights Reserved. 12 #include <linux/via-core.h> 18 void via_set_primary_timing(const struct via_display_timing *timing) in via_set_primary_timing() argument 22 raw.hor_total = timing->hor_total / 8 - 5; in via_set_primary_timing() 23 raw.hor_addr = timing->hor_addr / 8 - 1; in via_set_primary_timing() 24 raw.hor_blank_start = timing->hor_blank_start / 8 - 1; in via_set_primary_timing() 25 raw.hor_blank_end = timing->hor_blank_end / 8 - 1; in via_set_primary_timing() 26 raw.hor_sync_start = timing->hor_sync_start / 8; in via_set_primary_timing() [all …]
|
/openbmc/linux/drivers/memory/tegra/ |
H A D | tegra124-emc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 9 #include <linux/clk-provider.h> 15 #include <linux/interconnect-provider.h> 512 /* protect shared rate-change code path */ 516 /* Timing change sequence functions */ 521 writel(value, emc->regs + EMC_CCFIFO_DATA); in emc_ccfifo_writel() 522 writel(offset, emc->regs + EMC_CCFIFO_ADDR); in emc_ccfifo_writel() 530 writel(1, emc->regs + EMC_TIMING_CONTROL); in emc_seq_update_timing() 533 value = readl(emc->regs + EMC_STATUS); in emc_seq_update_timing() 539 dev_err(emc->dev, "timing update timed out\n"); in emc_seq_update_timing() [all …]
|
/openbmc/linux/drivers/gpu/drm/sti/ |
H A D | sti_awg_utils.c | 1 // SPDX-License-Identifier: GPL-2.0 11 #define AWG_DELAY (-5) 48 if (fwparams->instruction_offset >= AWG_MAX_INST) { in awg_generate_instr() 50 return -EINVAL; in awg_generate_instr() 57 arg--; /* pixel adjustment */ in awg_generate_instr() 58 arg_tmp--; in awg_generate_instr() 105 return -EINVAL; in awg_generate_instr() 108 arg_tmp = arg_tmp - arg; in awg_generate_instr() 113 fwparams->ram_code[fwparams->instruction_offset] = in awg_generate_instr() 115 fwparams->instruction_offset++; in awg_generate_instr() [all …]
|
/openbmc/u-boot/drivers/ram/ |
H A D | stm32_sdram.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Copyright (C) 2017, STMicroelectronics - All Rights Reserved 21 u32 btr1; /* SRAM/NOR-Flash Chip select timing register 1 */ 23 u32 btr2; /* SRAM/NOR-Flash Chip select timing register 2 */ 25 u32 btr3; /* SRAM/NOR-Flash Chip select timing register 3 */ 27 u32 btr4; /* SRAM/NOR-Flash Chip select timing register 4 */ 33 u32 pmem; /* Common memory space timing register */ 34 u32 patt; /* Attribute memory space timing registers */ 40 u32 bwtr1; /* SRAM/NOR-Flash write timing register 1 */ 42 u32 bwtr2; /* SRAM/NOR-Flash write timing register 2 */ [all …]
|
/openbmc/linux/drivers/gpu/drm/amd/display/dc/dsc/ |
H A D | dc_dsc.c | 52 /* Need to account for padding due to pixel-to-symbol packing 56 const struct dc_crtc_timing *timing, const uint32_t kbps) in apply_128b_132b_stream_overhead() argument 63 if (!timing->flags.DSC) { in apply_128b_132b_stream_overhead() 68 bpp = dc_fixpt_div_int(bpp, timing->pix_clk_100hz / 10); in apply_128b_132b_stream_overhead() 70 /* Symbols_per_HActive = HActive * bpp / (4 lanes * 32-bit symbol size) in apply_128b_132b_stream_overhead() 73 overhead_factor = dc_fixpt_from_int(timing->h_addressable); in apply_128b_132b_stream_overhead() 88 const struct dc_crtc_timing *timing, in dc_bandwidth_in_kbps_from_timing() argument 94 if (timing->flags.DSC) in dc_bandwidth_in_kbps_from_timing() 95 return dc_dsc_stream_bandwidth_in_kbps(timing, in dc_bandwidth_in_kbps_from_timing() 96 timing->dsc_cfg.bits_per_pixel, in dc_bandwidth_in_kbps_from_timing() [all …]
|
/openbmc/linux/drivers/gpu/drm/amd/display/dc/dce110/ |
H A D | dce110_timing_generator_v.c | 42 tg->ctx->logger 45 * DCE11 Timing Generator Implementation 64 dm_write_reg(tg->ctx, in dce110_timing_generator_v_enable_crtc() 69 dm_write_reg(tg->ctx, mmCRTCV_MASTER_UPDATE_MODE, value); in dce110_timing_generator_v_enable_crtc() 74 dm_write_reg(tg->ctx, in dce110_timing_generator_v_enable_crtc() 84 value = dm_read_reg(tg->ctx, in dce110_timing_generator_v_disable_crtc() 90 dm_write_reg(tg->ctx, in dce110_timing_generator_v_disable_crtc() 94 * tg->funcs->disable_stereo(tg); in dce110_timing_generator_v_disable_crtc() 102 uint32_t value = dm_read_reg(tg->ctx, addr); in dce110_timing_generator_v_blank_crtc() 116 dm_write_reg(tg->ctx, addr, value); in dce110_timing_generator_v_blank_crtc() [all …]
|
/openbmc/linux/drivers/media/rc/img-ir/ |
H A D | img-ir-hw.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 5 * Copyright 2010-2014 Imagination Technologies Ltd. 12 #include <media/rc-core.h> 18 #define IMG_IR_CODETYPE_BIPHASE 0x2 /* RC-5/6 */ 19 #define IMG_IR_CODETYPE_2BITPULSEPOS 0x3 /* RC-MM */ 22 /* Timing information */ 25 * struct img_ir_control - Decoder control settings 53 * struct img_ir_timing_range - range of timing values 54 * @min: Minimum timing value 55 * @max: Maximum timing value (if < @min, this will be set to @min during [all …]
|
/openbmc/linux/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ |
H A D | ramnv50.c | 34 #include <subdev/bios/timing.h> 71 #define T(t) cfg->timing_10_##t 73 nv50_ram_timing_calc(struct nv50_ram *ram, u32 *timing) in nv50_ram_timing_calc() argument 75 struct nvbios_ramcfg *cfg = &ram->base.target.bios; in nv50_ram_timing_calc() 76 struct nvkm_subdev *subdev = &ram->base.fb->subdev; in nv50_ram_timing_calc() 77 struct nvkm_device *device = subdev->device; in nv50_ram_timing_calc() 86 switch ((!T(CWL)) * ram->base.type) { in nv50_ram_timing_calc() 88 T(CWL) = T(CL) - 1; in nv50_ram_timing_calc() 96 if (device->chipset == 0xa0) { in nv50_ram_timing_calc() 97 unkt3b = 0x19 + ram->base.next->bios.rammap_00_16_40; in nv50_ram_timing_calc() [all …]
|
/openbmc/u-boot/common/ |
H A D | edid.c | 1 // SPDX-License-Identifier: GPL-2.0+ 21 if ((edid_info == NULL) || (edid_info->version == 0)) in edid_check_info() 22 return -1; in edid_check_info() 24 if (memcmp(edid_info->header, "\x0\xff\xff\xff\xff\xff\xff\x0", 8)) in edid_check_info() 25 return -1; in edid_check_info() 27 if (edid_info->version == 0xff && edid_info->revision == 0xff) in edid_check_info() 28 return -1; in edid_check_info() 41 return (checksum == 0) ? 0 : -EINVAL; in edid_check_checksum() 53 return -1; in edid_get_ranges() 55 for (i = 0; i < ARRAY_SIZE(edid->monitor_details.descriptor); i++) { in edid_get_ranges() [all …]
|
/openbmc/u-boot/board/xilinx/zynqmp/ |
H A D | tap_delays.c | 1 // SPDX-License-Identifier: GPL-2.0 84 static void arasan_zynqmp_tap_sdr104(u8 deviceid, u8 timing, u8 bank) in arasan_zynqmp_tap_sdr104() argument 105 static void arasan_zynqmp_tap_hs(u8 deviceid, u8 timing, u8 bank) in arasan_zynqmp_tap_hs() argument 117 if (timing == MMC_TIMING_MMC_HS) in arasan_zynqmp_tap_hs() 133 if (timing == MMC_TIMING_MMC_HS) in arasan_zynqmp_tap_hs() 142 static void arasan_zynqmp_tap_ddr50(u8 deviceid, u8 timing, u8 bank) in arasan_zynqmp_tap_ddr50() argument 150 if (timing == MMC_TIMING_UHS_DDR50) in arasan_zynqmp_tap_ddr50() 158 if (timing == MMC_TIMING_UHS_DDR50) in arasan_zynqmp_tap_ddr50() 170 if (timing == MMC_TIMING_UHS_DDR50) in arasan_zynqmp_tap_ddr50() 178 if (timing == MMC_TIMING_UHS_DDR50) in arasan_zynqmp_tap_ddr50() [all …]
|
/openbmc/u-boot/drivers/ram/stm32mp1/ |
H A D | stm32mp1_ddr_regs.h | 1 /* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */ 3 * Copyright (C) 2018, STMicroelectronics - All Rights Reserved 13 u8 reserved008[0x10 - 0x8]; 20 u8 reserved028[0x30 - 0x28]; 22 u32 pwrtmg; /* 0x34 Low Power Timing*/ 24 u8 reserved03c[0x50 - 0x3C]; 30 u32 rfshtmg; /* 0x64 Refresh Timing*/ 31 u8 reserved068[0xc0 - 0x68]; 45 u8 reserved0f4[0x100 - 0xf4]; 46 u32 dramtmg0; /* 0x100 SDRAM Timing 0*/ [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/mmc/ |
H A D | sdhci-am654.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 # Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com/ 4 --- 5 $id: http://devicetree.org/schemas/mmc/sdhci-am654.yaml# 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 11 - Ulf Hansson <ulf.hansson@linaro.org> 14 - $ref: sdhci-common.yaml# 19 - enum: 20 - ti,am62-sdhci 21 - ti,am64-sdhci-4bit [all …]
|
/openbmc/linux/drivers/ata/ |
H A D | pata_triflex.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * pata_triflex.c - Compaq PATA for new ATA layer 15 * Copyright (C) 2002 Hewlett-Packard Development Group, L.P. 36 * triflex_prereset - probe begin 50 struct ata_port *ap = link->ap; in triflex_prereset() 51 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in triflex_prereset() 53 if (!pci_test_config_bits(pdev, &triflex_enable_bits[ap->port_no])) in triflex_prereset() 54 return -ENOENT; in triflex_prereset() 62 * triflex_load_timing - timing configuration 75 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in triflex_load_timing() [all …]
|
/openbmc/u-boot/drivers/mmc/ |
H A D | xenon_sdhci.c | 1 // SPDX-License-Identifier: GPL-2.0 8 * Date: 2016-8-24 13 * Ported to from Marvell 2015.01 to mainline U-Boot 2017.01: 26 /* Register Offset of SD Host Controller SOCP self-defined register */ 123 u8 timing; member 133 struct xenon_sdhci_priv *priv = host->mmc->priv; in xenon_mmc_phy_init() 134 u32 clock = priv->clock; in xenon_mmc_phy_init() 141 if ((priv->timing == MMC_TIMING_UHS_SDR50) || in xenon_mmc_phy_init() 142 (priv->timing == MMC_TIMING_UHS_SDR25) || in xenon_mmc_phy_init() 143 (priv->timing == MMC_TIMING_UHS_SDR12) || in xenon_mmc_phy_init() [all …]
|