extcon-intel-cht-wc: Don't reset USB data connection at probe
Subsystems (12)
Sasha Levin
maintainerPATCH 1/33 extcon-intel-cht-wc: Don't reset USB data connection at probe
From: Yauhen Kharuzhy <[email protected]>
[ Upstream commit e81b88932985c9134d410f4eaaaa9b81a3b4bd0c ]
Intel Cherry Trail Whiskey Cove extcon driver connect USB data lines to PMIC at driver probing for further charger detection. This causes reset of USB data sessions and removing all devices from bus. If system was booted from Live CD or USB dongle, this makes system unusable.
Check if USB ID pin is floating and re-route data lines in this case only, don't touch otherwise.
--- drivers/extcon/extcon-intel-cht-wc.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)
drivers/extcon/extcon-intel-cht-wc.c +14 -2
@@ -338,6 +338,7 @@ static int cht_wc_extcon_probe(struct platform_device *pdev)struct intel_soc_pmic *pmic =dev_get_drvdata (pdev->dev.parent);struct cht_wc_extcon_data *ext;unsigned long mask = ~(CHT_WC_PWRSRC_VBUS |CHT_WC_PWRSRC_USBID_MASK ); +int pwrsrc_sts, id;int irq, ret; irq =platform_get_irq (pdev,0 );
@@ -387,8 +388,19 @@ static int cht_wc_extcon_probe(struct platform_device *pdev) goto disable_sw_control; } -/* Route D+ and D- to PMIC for initial charger detection */ -cht_wc_extcon_set_phymux (ext,MUX_SEL_PMIC ); + ret =regmap_read (ext->regmap,CHT_WC_PWRSRC_STS , &pwrsrc_sts); +if (ret) { +dev_err (ext->dev,"Error reading pwrsrc status: %d\n" , ret); + goto disable_sw_control; + } + +/* +* If no USB host or device connected, route D+ and D- to PMIC for +* initial charger detection +*/ + id =cht_wc_extcon_get_id (ext, pwrsrc_sts); +if (id !=INTEL_USB_ID_GND ) +cht_wc_extcon_set_phymux (ext,MUX_SEL_PMIC );/* Get initial state */ cht_wc_extcon_pwrsrc_event (ext);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 2/33 ASoC: Intel: cht_bsw_rt5645: Add quirk for boards using pmc_plt_clk_0
From: Sam McNally <[email protected]>
[ Upstream commit adebb11139029ddf1fba6f796c4a476f17eacddc ]
As of commit 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL"), the cht_bsw_rt5645 driver needs to enable the clock it's using for the codec's mclk. It does this from commit 7735bce05a9c ("ASoC: Intel: boards: use devm_clk_get() unconditionally"), enabling pmc_plt_clk_3. However, Strago family Chromebooks use pmc_plt_clk_0 for the codec mclk, resulting in white noise with some digital microphones. Add a DMI-based quirk for Strago family Chromebooks to use pmc_plt_clk_0 instead - mirroring the changes made to cht_bsw_max98090_ti in commit a182ecd3809c ("ASoC: intel: cht_bsw_max98090_ti: Add quirk for boards using pmc_plt_clk_0") and making use of the existing dmi_check_system() call and related infrastructure added in commit 22af29114eb4 ("ASoC: Intel: cht-bsw-rt5645: add quirks for SSP0/AIF1/AIF2 routing").
--- sound/soc/intel/boards/cht_bsw_rt5645.c | 26 +++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-)
sound/soc/intel/boards/cht_bsw_rt5645.c +20 -6
@@ -48,6 +48,7 @@ struct cht_mc_private {#define CHT_RT5645_SSP2_AIF2 BIT(16)/* default is using AIF1 */ #define CHT_RT5645_SSP0_AIF1 BIT(17)#define CHT_RT5645_SSP0_AIF2 BIT(18) +#define CHT_RT5645_PMC_PLT_CLK_0 BIT(19)static unsigned long cht_rt5645_quirk =0 ;
@@ -59,6 +60,8 @@ static void log_quirks(struct device *dev)dev_info (dev,"quirk SSP0_AIF1 enabled" );if (cht_rt5645_quirk &CHT_RT5645_SSP0_AIF2 )dev_info (dev,"quirk SSP0_AIF2 enabled" ); +if (cht_rt5645_quirk &CHT_RT5645_PMC_PLT_CLK_0 ) +dev_info (dev,"quirk PMC_PLT_CLK_0 enabled" ); } static int platform_clock_control(struct snd_soc_dapm_widget *w,
@@ -226,15 +229,21 @@ static int cht_aif1_hw_params(struct snd_pcm_substream *substream,return 0 ; } -/* uncomment when we have a real quirk static int cht_rt5645_quirk_cb (const struct dmi_system_id *id) { cht_rt5645_quirk = (unsigned long )id->driver_data;return 1 ; } -*/ static const struct dmi_system_id cht_rt5645_quirk_table[] = { + { +/* Strago family Chromebooks */ + .callback = cht_rt5645_quirk_cb, + .matches = { +DMI_MATCH (DMI_PRODUCT_FAMILY ,"Intel_Strago" ), + }, + .driver_data = (void *)CHT_RT5645_PMC_PLT_CLK_0 , + }, { }, };
@@ -526,6 +535,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)int dai_index =0 ;int ret_val =0 ;int i; +const char *mclk_name; drv =devm_kzalloc (&pdev->dev,sizeof (*drv),GFP_KERNEL );if (!drv)
@@ -662,11 +672,15 @@ static int snd_cht_mc_probe(struct platform_device *pdev)if (ret_val)return ret_val; - drv->mclk =devm_clk_get (&pdev->dev,"pmc_plt_clk_3" ); +if (cht_rt5645_quirk &CHT_RT5645_PMC_PLT_CLK_0 ) + mclk_name ="pmc_plt_clk_0" ; +else + mclk_name ="pmc_plt_clk_3" ; + + drv->mclk =devm_clk_get (&pdev->dev, mclk_name);if (IS_ERR (drv->mclk)) { -dev_err (&pdev->dev, -"Failed to get MCLK from pmc_plt_clk_3: %ld\n" , -PTR_ERR (drv->mclk)); +dev_err (&pdev->dev,"Failed to get MCLK from %s: %ld\n" , + mclk_name,PTR_ERR (drv->mclk));return PTR_ERR (drv->mclk); }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 3/33 drm/amdgpu/SRIOV: add navi12 pci id for SRIOV (v2)
In reply to Sasha LevinFrom: Jiange Zhao <[email protected]>
[ Upstream commit 57d4f3b7fd65b56f98b62817f27c461142c0bc2a ]
Add Navi12 PCI id support.
v2: flag as experimental for now (Alex)
--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 -0
@@ -1023,6 +1023,7 @@ static const struct pci_device_id pciidlist[] = {/* Navi12 */ {0x1002, 0x7360, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI12|AMD_EXP_HW_SUPPORT}, + {0x1002, 0x7362, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI12|AMD_EXP_HW_SUPPORT}, {0, 0, 0} };
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Sasha Levin
maintainerPATCH 4/33 libbpf: Fix BTF-defined map's __type macro handling of arrays
In reply to Sasha LevinFrom: Andrii Nakryiko <[email protected]>
[ Upstream commit a53ba15d81995868651dd28a85d8045aef3d4e20 ]
Due to a quirky C syntax of declaring pointers to array or function prototype, existing __type() macro doesn't work with map key/value types that are array or function prototype. One has to create a typedef first and use it to specify key/value type for a BPF map. By using typeof(), pointer to type is now handled uniformly for all kinds of types. Convert one of self-tests as a demonstration.
--- tools/testing/selftests/bpf/bpf_helpers.h | 2 +- tools/testing/selftests/bpf/progs/test_get_stack_rawtp.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-)
tools/testing/selftests/bpf/bpf_helpers.h +1 -1
@@ -3,7 +3,7 @@#define __BPF_HELPERS__#define __uint (name, val) int (*name)[val] -#define __type (name, val) val *name +#define __type (name, val) typeof(val) *name/* helper macro to print out debug messages */ #define bpf_printk (fmt, ...) \
tools/testing/selftests/bpf/progs/test_get_stack_rawtp.c +1 -2
@@ -47,12 +47,11 @@ struct {* issue and avoid complicated C programming massaging. * This is an acceptable workaround since there is one entry here. */ -typedef __u64 raw_stack_trace_t [2 *MAX_STACK_RAWTP ];struct { __uint(type, BPF_MAP_TYPE_PERCPU_ARRAY); __uint(max_entries, 1); __type(key, __u32); - __type(value, raw_stack_trace_t); + __type(value, __u64[2 * MAX_STACK_RAWTP]); } rawdata_map SEC(".maps");SEC ("raw_tracepoint/sys_enter" )
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 5/33 staging: mt7621-pci: add quirks for 'E2' revision using 'soc_device_attribute'
In reply to Sasha LevinFrom: Sergio Paracuellos <[email protected]>
[ Upstream commit b483b4e4d3f6bfd5089b9e6dc9ba259879c6ce6f ]
Depending on revision of the chip, reset lines are inverted. Make code more readable making use of 'soc_device_match' in driver probe function.
--- drivers/staging/mt7621-pci/pci-mt7621.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-)
drivers/staging/mt7621-pci/pci-mt7621.c +17 -6
@@ -29,15 +29,14 @@#include <linux/phy/phy.h> #include <linux/platform_device.h> #include <linux/reset.h> +#include <linux/sys_soc.h> #include <mt7621.h> #include <ralink_regs.h> #include "../../pci/pci.h" /* sysctl */ -#define MT7621_CHIP_REV_ID 0x0c#define MT7621_GPIO_MODE 0x60 -#define CHIP_REV_MT7621_E2 0x0101/* MediaTek specific configuration registers */ #define PCIE_FTS_NUM 0x70c
@@ -126,6 +125,8 @@ struct mt7621_pcie_port {* @ports: pointer to PCIe port information * @perst: gpio reset * @rst: pointer to pcie reset +* @resets_inverted: depends on chip revision +* reset lines are inverted. */ struct mt7621_pcie {void __iomem *base;
@@ -140,6 +141,7 @@ struct mt7621_pcie {struct list_head ports;struct gpio_desc *perst;struct reset_control *rst; +bool resets_inverted; };static inline u32 pcie_read (struct mt7621_pcie *pcie,u32 reg)
@@ -229,9 +231,9 @@ static inline void mt7621_pcie_port_clk_disable(struct mt7621_pcie_port *port)static inline void mt7621_control_assert (struct mt7621_pcie_port *port) { -u32 chip_rev_id =rt_sysc_r32 (MT7621_CHIP_REV_ID ); +struct mt7621_pcie *pcie = port->pcie; -if ((chip_rev_id &0xFFFF ) ==CHIP_REV_MT7621_E2 ) +if (pcie->resets_inverted)reset_control_assert (port->pcie_rst);else reset_control_deassert (port->pcie_rst);
@@ -239,9 +241,9 @@ static inline void mt7621_control_assert(struct mt7621_pcie_port *port)static inline void mt7621_control_deassert (struct mt7621_pcie_port *port) { -u32 chip_rev_id =rt_sysc_r32 (MT7621_CHIP_REV_ID ); +struct mt7621_pcie *pcie = port->pcie; -if ((chip_rev_id &0xFFFF ) ==CHIP_REV_MT7621_E2 ) +if (pcie->resets_inverted)reset_control_deassert (port->pcie_rst);else reset_control_assert (port->pcie_rst);
@@ -641,9 +643,14 @@ static int mt7621_pcie_register_host(struct pci_host_bridge *host,return pci_host_probe (host); } +static const struct soc_device_attribute mt7621_pci_quirks_match[] = { + { .soc_id ="mt7621" , .revision ="E2" } +}; +static int mt7621_pci_probe (struct platform_device *pdev) {struct device *dev = &pdev->dev; +const struct soc_device_attribute *attr;struct mt7621_pcie *pcie;struct pci_host_bridge *bridge;int err;
@@ -661,6 +668,10 @@ static int mt7621_pci_probe(struct platform_device *pdev)platform_set_drvdata (pdev, pcie);INIT_LIST_HEAD (&pcie->ports); + attr =soc_device_match (mt7621_pci_quirks_match); +if (attr) + pcie->resets_inverted = true; + err =mt7621_pcie_parse_dt (pcie);if (err) {dev_err (dev,"Parsing DT failed\n" );
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 6/33 platform/x86: dell-laptop: disable kbd backlight on Inspiron 10xx
In reply to Sasha LevinFrom: Pacien TRAN-GIRARD <[email protected]>
[ Upstream commit 10b65e2915b2fcc606d173e98a972850101fb4c4 ]
This patch adds a quirk disabling keyboard backlight support for the Dell Inspiron 1012 and 1018.
Those models wrongly report supporting keyboard backlight control features (through SMBIOS tokens) even though they're not equipped with a backlit keyboard. This led to broken controls being exposed through sysfs by this driver which froze the system when used.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=107651
--- drivers/platform/x86/dell-laptop.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
drivers/platform/x86/dell-laptop.c +26 -0
@@ -33,6 +33,7 @@struct quirk_entry {bool touchpad_led; +bool kbd_led_not_present;bool kbd_led_levels_off_1;bool kbd_missing_ac_tag;
@@ -73,6 +74,10 @@ static struct quirk_entry quirk_dell_latitude_e6410 = { .kbd_led_levels_off_1 = true, }; +static struct quirk_entry quirk_dell_inspiron_1012 = { + .kbd_led_not_present = true, +}; +static struct platform_driver platform_driver = { .driver = { .name ="dell-laptop" ,
@@ -310,6 +315,24 @@ static const struct dmi_system_id dell_quirks[] __initconst = { }, .driver_data = &quirk_dell_latitude_e6410, }, + { + .callback = dmi_matched, + .ident = "Dell Inspiron 1012", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1012"), + }, + .driver_data = &quirk_dell_inspiron_1012, + }, + { + .callback = dmi_matched, + .ident = "Dell Inspiron 1018", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1018"), + }, + .driver_data = &quirk_dell_inspiron_1012, + }, { } };
@@ -1493,6 +1516,9 @@ static void kbd_init(void) {int ret; +if (quirks && quirks->kbd_led_not_present) +return ; + ret =kbd_init_info ();kbd_init_tokens ();
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 7/33 drm: rcar_lvds: Fix color mismatches on R-Car H2 ES2.0 and later
In reply to Sasha LevinFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 3986457110a054466bf02f9c4a85aa2bba96177b ]
Commit 5cca30ebe089be23 ("drm/rcar-du: Add LVDS_LANES quirk") states that LVDS lanes 1 and 3 are inverted on R-Car H2 ES1 only, and that the problem has been fixed in newer revisions.
However, the code didn't take into account the actual hardware revision, thus applying the quirk also on newer hardware revisions, causing green color reversals.
Fix this by applying the quirk when running on R-Car H2 ES1.x only.
--- drivers/gpu/drm/rcar-du/rcar_lvds.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-)
drivers/gpu/drm/rcar-du/rcar_lvds.c +21 -7
@@ -16,6 +16,7 @@#include <linux/of_graph.h> #include <linux/platform_device.h> #include <linux/slab.h> +#include <linux/sys_soc.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h>
@@ -842,8 +843,23 @@ static int rcar_lvds_get_clocks(struct rcar_lvds *lvds)return 0 ; } +static const struct rcar_lvds_device_info rcar_lvds_r8a7790es1_info = { + .gen =2 , + .quirks =RCAR_LVDS_QUIRK_LANES , + .pll_setup = rcar_lvds_pll_setup_gen2, +}; + +static const struct soc_device_attribute lvds_quirk_matches[] = { + { + .soc_id ="r8a7790" , .revision ="ES1.*" , + .data = &rcar_lvds_r8a7790es1_info, + }, + {/* sentinel */ } +}; +static int rcar_lvds_probe (struct platform_device *pdev) { +const struct soc_device_attribute *attr;struct rcar_lvds *lvds;struct resource *mem;int ret;
@@ -857,6 +873,10 @@ static int rcar_lvds_probe(struct platform_device *pdev) lvds->dev = &pdev->dev; lvds->info =of_device_get_match_data (&pdev->dev); + attr =soc_device_match (lvds_quirk_matches); +if (attr) + lvds->info = attr->data; + ret =rcar_lvds_parse_dt (lvds);if (ret <0 )return ret;
@@ -893,12 +913,6 @@ static const struct rcar_lvds_device_info rcar_lvds_gen2_info = { .pll_setup = rcar_lvds_pll_setup_gen2, }; -static const struct rcar_lvds_device_info rcar_lvds_r8a7790_info = { - .gen =2 , - .quirks =RCAR_LVDS_QUIRK_LANES , - .pll_setup = rcar_lvds_pll_setup_gen2, -}; -static const struct rcar_lvds_device_info rcar_lvds_gen3_info = { .gen =3 , .quirks =RCAR_LVDS_QUIRK_PWD ,
@@ -930,7 +944,7 @@ static const struct of_device_id rcar_lvds_of_table[] = { { .compatible = "renesas,r8a7744-lvds", .data = &rcar_lvds_gen2_info }, { .compatible = "renesas,r8a774a1-lvds", .data = &rcar_lvds_gen3_info }, { .compatible = "renesas,r8a774c0-lvds", .data = &rcar_lvds_r8a77990_info }, - { .compatible = "renesas,r8a7790-lvds", .data = &rcar_lvds_r8a7790_info }, + { .compatible = "renesas,r8a7790-lvds", .data = &rcar_lvds_gen2_info }, { .compatible = "renesas,r8a7791-lvds", .data = &rcar_lvds_gen2_info }, { .compatible = "renesas,r8a7793-lvds", .data = &rcar_lvds_gen2_info }, { .compatible = "renesas,r8a7795-lvds", .data = &rcar_lvds_gen3_info },
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Sasha Levin
maintainerPATCH 8/33 PCI: Add DMA alias quirk for Intel VCA NTB
In reply to Sasha LevinFrom: Slawomir Pawlowski <[email protected]>
[ Upstream commit 56b4cd4b7da9ee95778eb5c8abea49f641ebfd91 ]
Intel Visual Compute Accelerator (VCA) is a family of PCIe add-in devices exposing computational units via Non Transparent Bridges (NTB, PEX 87xx).
Similarly to MIC x200, we need to add DMA aliases to allow buffer access when IOMMU is enabled.
Add aliases to allow computational unit access to host memory. These aliases mark the whole VCA device as one IOMMU group.
All possible slot numbers (0x20) are used, since we are unable to tell what slot is used on other side. This quirk is intended for both host and computational unit sides. The VCA devices have up to five functions: four for DMA channels and one additional.
--- drivers/pci/quirks.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+)
drivers/pci/quirks.c +34 -0
@@ -4080,6 +4080,40 @@ static void quirk_mic_x200_dma_alias(struct pci_dev *pdev)DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_INTEL ,0x2260 , quirk_mic_x200_dma_alias);DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_INTEL ,0x2264 , quirk_mic_x200_dma_alias); +/* +* Intel Visual Compute Accelerator (VCA) is a family of PCIe add-in devices +* exposing computational units via Non Transparent Bridges (NTB, PEX 87xx). +* +* Similarly to MIC x200, we need to add DMA aliases to allow buffer access +* when IOMMU is enabled. These aliases allow computational unit access to +* host memory. These aliases mark the whole VCA device as one IOMMU +* group. +* +* All possible slot numbers (0x20) are used, since we are unable to tell +* what slot is used on other side. This quirk is intended for both host +* and computational unit sides. The VCA devices have up to five functions +* (four for DMA channels and one additional). +*/ +static void quirk_pex_vca_alias (struct pci_dev *pdev) +{ +const unsigned int num_pci_slots =0x20 ; +unsigned int slot; + +for (slot =0 ; slot < num_pci_slots; slot++) { +pci_add_dma_alias (pdev,PCI_DEVFN (slot,0x0 )); +pci_add_dma_alias (pdev,PCI_DEVFN (slot,0x1 )); +pci_add_dma_alias (pdev,PCI_DEVFN (slot,0x2 )); +pci_add_dma_alias (pdev,PCI_DEVFN (slot,0x3 )); +pci_add_dma_alias (pdev,PCI_DEVFN (slot,0x4 )); + } +} +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_INTEL ,0x2954 , quirk_pex_vca_alias); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_INTEL ,0x2955 , quirk_pex_vca_alias); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_INTEL ,0x2956 , quirk_pex_vca_alias); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_INTEL ,0x2958 , quirk_pex_vca_alias); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_INTEL ,0x2959 , quirk_pex_vca_alias); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_INTEL ,0x295A , quirk_pex_vca_alias); +/* * The IOMMU and interrupt controller on Broadcom Vulcan/Cavium ThunderX2 are * associated not at the root bus, but at a bridge below. This quirk avoids
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 9/33 media: dvbsky: add support for eyeTV Geniatech T2 lite
In reply to Sasha LevinFrom: Thomas Voegtle <[email protected]>
[ Upstream commit 14494583336880640654300c76d0f5df3360d85f ]
Adds USB ID for the eyeTV Geniatech T2 lite to the dvbsky driver. This is a Geniatech T230C based stick without IR and a different USB ID.
--- drivers/media/usb/dvb-usb-v2/dvbsky.c | 3 +++ include/media/dvb-usb-ids.h | 1 + 2 files changed, 4 insertions(+)
drivers/media/usb/dvb-usb-v2/dvbsky.c +3 -0
@@ -792,6 +792,9 @@ static const struct usb_device_id dvbsky_id_table[] = { {DVB_USB_DEVICE (USB_VID_CONEXANT ,USB_PID_MYGICA_T230C , &mygica_t230c_props,"MyGica Mini DVB-T2 USB Stick T230C" , RC_MAP_TOTAL_MEDIA_IN_HAND_02) }, + { DVB_USB_DEVICE(USB_VID_CONEXANT, USB_PID_MYGICA_T230C_LITE, + &mygica_t230c_props,"MyGica Mini DVB-T2 USB Stick T230C Lite" , + NULL) }, { DVB_USB_DEVICE(USB_VID_CONEXANT, USB_PID_MYGICA_T230C2, &mygica_t230c_props,"MyGica Mini DVB-T2 USB Stick T230C v2" , RC_MAP_TOTAL_MEDIA_IN_HAND_02) },
include/media/dvb-usb-ids.h +1 -0
@@ -389,6 +389,7 @@#define USB_PID_MYGICA_T230 0xc688#define USB_PID_MYGICA_T230C 0xc689#define USB_PID_MYGICA_T230C2 0xc68a +#define USB_PID_MYGICA_T230C_LITE 0xc699#define USB_PID_ELGATO_EYETV_DIVERSITY 0x0011#define USB_PID_ELGATO_EYETV_DTT 0x0021#define USB_PID_ELGATO_EYETV_DTT_2 0x003f
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 10/33 bus: ti-sysc: Handle mstandby quirk and use it for musb
In reply to Sasha LevinFrom: Tony Lindgren <[email protected]>
[ Upstream commit 03856e928b0e1a1c274eece1dfe4330a362c37f3 ]
We need swsup quirks for sidle and mstandby for musb to work properly.
--- drivers/bus/ti-sysc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/bus/ti-sysc.c +8 -2
@@ -917,6 +917,9 @@ set_midle:return -EINVAL ; } +if (ddata->cfg.quirks &SYSC_QUIRK_SWSUP_MSTANDBY ) + best_mode =SYSC_IDLE_NO ; + reg &= ~(SYSC_IDLE_MASK << regbits->midle_shift); reg |= best_mode << regbits->midle_shift;sysc_write (ddata, ddata->offsets[SYSC_SYSCONFIG ], reg);
@@ -978,6 +981,9 @@ static int sysc_disable_module(struct device *dev)return ret; } +if (ddata->cfg.quirks &SYSC_QUIRK_SWSUP_MSTANDBY ) + best_mode =SYSC_IDLE_FORCE ; + reg &= ~(SYSC_IDLE_MASK << regbits->midle_shift); reg |= best_mode << regbits->midle_shift;sysc_write (ddata, ddata->offsets[SYSC_SYSCONFIG ], reg);
@@ -1251,6 +1257,8 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {SYSC_QUIRK ("gpu" ,0x50000000 ,0x14 ,-1 ,-1 ,0x00010201 ,0xffffffff ,0 ),SYSC_QUIRK ("gpu" ,0x50000000 ,0xfe00 ,0xfe10 ,-1 ,0x40000000 ,0xffffffff ,SYSC_MODULE_QUIRK_SGX ), +SYSC_QUIRK ("usb_otg_hs" ,0 ,0x400 ,0x404 ,0x408 ,0x00000050 , +0xffffffff ,SYSC_QUIRK_SWSUP_SIDLE |SYSC_QUIRK_SWSUP_MSTANDBY ),SYSC_QUIRK ("wdt" ,0 ,0 ,0x10 ,0x14 ,0x502a0500 ,0xfffff0f0 , SYSC_MODULE_QUIRK_WDT),/* Watchdog on am3 and am4 */
@@ -1309,8 +1317,6 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {SYSC_QUIRK ("usbhstll" ,0 ,0 ,0x10 ,0x14 ,0x00000008 ,0xffffffff ,0 ),SYSC_QUIRK ("usb_host_hs" ,0 ,0 ,0x10 ,0x14 ,0x50700100 ,0xffffffff ,0 ),SYSC_QUIRK ("usb_host_hs" ,0 ,0 ,0x10 ,-1 ,0x50700101 ,0xffffffff ,0 ), -SYSC_QUIRK ("usb_otg_hs" ,0 ,0x400 ,0x404 ,0x408 ,0x00000050 , -0xffffffff ,0 ), SYSC_QUIRK("vfpe", 0, 0, 0x104, -1, 0x4d001200, 0xffffffff, 0), #endif };
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 11/33 bus: ti-sysc: Use swsup quirks also for am335x musb
In reply to Sasha LevinFrom: Tony Lindgren <[email protected]>
[ Upstream commit 1819ef2e2d12d5b1a6ee54ac1c2afe35cffc677c ]
Also on am335x we need the swsup quirks for musb.
--- drivers/bus/ti-sysc.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/bus/ti-sysc.c +2 -0
@@ -1259,6 +1259,8 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = { SYSC_MODULE_QUIRK_SGX),SYSC_QUIRK ("usb_otg_hs" ,0 ,0x400 ,0x404 ,0x408 ,0x00000050 ,0xffffffff ,SYSC_QUIRK_SWSUP_SIDLE |SYSC_QUIRK_SWSUP_MSTANDBY ), +SYSC_QUIRK ("usb_otg_hs" ,0 ,0 ,0x10 ,-1 ,0x4ea2080d ,0xffffffff , +SYSC_QUIRK_SWSUP_SIDLE |SYSC_QUIRK_SWSUP_MSTANDBY ),SYSC_QUIRK ("wdt" ,0 ,0 ,0x10 ,0x14 ,0x502a0500 ,0xfffff0f0 , SYSC_MODULE_QUIRK_WDT),/* Watchdog on am3 and am4 */
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 12/33 spi: pxa2xx: Add support for Intel Comet Lake-H
In reply to Sasha LevinFrom: Jarkko Nikula <[email protected]>
[ Upstream commit f0cf17ed76cffa365001d263ced1f130ec794917 ]
Add Intel Comet Lake-H LPSS SPI PCI IDs.
--- drivers/spi/spi-pxa2xx.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/spi/spi-pxa2xx.c +4 -0
@@ -1461,6 +1461,10 @@ static const struct pci_device_id pxa2xx_spi_pci_compound_match[] = { { PCI_VDEVICE(INTEL, 0x02aa), LPSS_CNL_SSP }, { PCI_VDEVICE(INTEL, 0x02ab), LPSS_CNL_SSP }, { PCI_VDEVICE(INTEL, 0x02fb), LPSS_CNL_SSP }, +/* CML-H */ + { PCI_VDEVICE(INTEL, 0x06aa), LPSS_CNL_SSP }, + { PCI_VDEVICE(INTEL, 0x06ab), LPSS_CNL_SSP }, + { PCI_VDEVICE(INTEL, 0x06fb), LPSS_CNL_SSP },/* TGL-LP */ { PCI_VDEVICE(INTEL, 0xa0aa), LPSS_CNL_SSP }, { PCI_VDEVICE(INTEL, 0xa0ab), LPSS_CNL_SSP },
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 13/33 iommu/amd: Support multiple PCI DMA aliases in device table
In reply to Sasha LevinFrom: Logan Gunthorpe <[email protected]>
[ Upstream commit 3332364e4ebc0581d133a334645a20fd13b580f1 ]
Non-Transparent Bridge (NTB) devices (among others) may have many DMA aliases seeing the hardware will send requests with different device ids depending on their origin across the bridged hardware.
See commit ad281ecf1c7d ("PCI: Add DMA alias quirk for Microsemi Switchtec NTB") for more information on this.
The AMD IOMMU ignores all the PCI aliases except the last one so DMA transfers from these aliases will be blocked on AMD hardware with the IOMMU enabled.
To fix this, ensure the DTEs are cloned for every PCI alias. This is done by copying the DTE data for each alias as well as the IVRS alias every time it is changed.
--- drivers/iommu/amd_iommu.c | 133 +++++++++++++++----------------- drivers/iommu/amd_iommu_types.h | 2 +- 2 files changed, 62 insertions(+), 73 deletions(-)
drivers/iommu/amd_iommu.c +61 -72
@@ -226,71 +226,61 @@ static struct iommu_dev_data *search_dev_data(u16 devid)return NULL ; } -static int __last_alias (struct pci_dev *pdev,u16 alias,void *data) +static int clone_alias (struct pci_dev *pdev,u16 alias,void *data) { - *(u16 *)data = alias; -return 0 ; -} - -static u16 get_alias (struct device *dev) -{ -struct pci_dev *pdev =to_pci_dev (dev); -u16 devid, ivrs_alias, pci_alias; +u16 devid =pci_dev_id (pdev); -/* The callers make sure that get_device_id() does not fail here */ - devid =get_device_id (dev); - -/* For ACPI HID devices, we simply return the devid as such */ -if (!dev_is_pci (dev)) -return devid; +if (devid == alias) +return 0 ; - ivrs_alias = amd_iommu_alias_table[devid]; + amd_iommu_rlookup_table[alias] = + amd_iommu_rlookup_table[devid]; +memcpy (amd_iommu_dev_table[alias].data, + amd_iommu_dev_table[devid].data, +sizeof (amd_iommu_dev_table[alias].data)); -pci_for_each_dma_alias (pdev, __last_alias, &pci_alias); +return 0 ; +} -if (ivrs_alias == pci_alias) -return ivrs_alias; +static void clone_aliases (struct pci_dev *pdev) +{ +if (!pdev) +return ;/* -* DMA alias showdown -* -* The IVRS is fairly reliable in telling us about aliases, but it -* can't know about every screwy device. If we don't have an IVRS -* reported alias, use the PCI reported alias. In that case we may -* still need to initialize the rlookup and dev_table entries if the -* alias is to a non-existent device. +* The IVRS alias stored in the alias table may not be +* part of the PCI DMA aliases if it's bus differs +* from the original device. */ -if (ivrs_alias == devid) { -if (!amd_iommu_rlookup_table[pci_alias]) { - amd_iommu_rlookup_table[pci_alias] = - amd_iommu_rlookup_table[devid]; -memcpy (amd_iommu_dev_table[pci_alias].data, - amd_iommu_dev_table[devid].data, -sizeof (amd_iommu_dev_table[pci_alias].data)); - } +clone_alias (pdev, amd_iommu_alias_table[pci_dev_id (pdev)],NULL ); -return pci_alias; - } +pci_for_each_dma_alias (pdev, clone_alias,NULL ); +} -pci_info (pdev,"Using IVRS reported alias %02x:%02x.%d " -"for device [%04x:%04x], kernel reported alias " -"%02x:%02x.%d\n" ,PCI_BUS_NUM (ivrs_alias),PCI_SLOT (ivrs_alias), -PCI_FUNC (ivrs_alias), pdev->vendor, pdev->device, -PCI_BUS_NUM (pci_alias),PCI_SLOT (pci_alias), -PCI_FUNC (pci_alias)); +static struct pci_dev *setup_aliases (struct device *dev) +{ +struct pci_dev *pdev =to_pci_dev (dev); +u16 ivrs_alias; + +/* For ACPI HID devices, there are no aliases */ +if (!dev_is_pci (dev)) +return NULL ;/* -* If we don't have a PCI DMA alias and the IVRS alias is on the same -* bus, then the IVRS table may know about a quirk that we don't. +* Add the IVRS alias to the pci aliases if it is on the same +* bus. The IVRS table may know about a quirk that we don't. */ -if (pci_alias == devid && + ivrs_alias = amd_iommu_alias_table[pci_dev_id (pdev)]; +if (ivrs_alias !=pci_dev_id (pdev) &&PCI_BUS_NUM (ivrs_alias) == pdev->bus->number) {pci_add_dma_alias (pdev, ivrs_alias &0xff );pci_info (pdev,"Added PCI DMA alias %02x.%d\n" ,PCI_SLOT (ivrs_alias),PCI_FUNC (ivrs_alias)); } -return ivrs_alias; +clone_aliases (pdev); + +return pdev; }static struct iommu_dev_data *find_dev_data (u16 devid)
@@ -428,7 +418,7 @@ static int iommu_init_device(struct device *dev)if (!dev_data)return -ENOMEM ; - dev_data->alias =get_alias (dev); + dev_data->pdev =setup_aliases (dev);/* * By default we use passthrough mode for IOMMUv2 capable device.
@@ -453,20 +443,16 @@ static int iommu_init_device(struct device *dev)static void iommu_ignore_device (struct device *dev) { -u16 alias;int devid; devid =get_device_id (dev);if (devid <0 )return ; - alias =get_alias (dev); - + amd_iommu_rlookup_table[devid] =NULL ;memset (&amd_iommu_dev_table[devid],0 ,sizeof (struct dev_table_entry )); -memset (&amd_iommu_dev_table[alias],0 ,sizeof (struct dev_table_entry )); - amd_iommu_rlookup_table[devid] =NULL ; - amd_iommu_rlookup_table[alias] =NULL ; +setup_aliases (dev); }static void iommu_uninit_device (struct device *dev)
@@ -1236,6 +1222,13 @@ static int device_flush_iotlb(struct iommu_dev_data *dev_data,return iommu_queue_command (iommu, &cmd); } +static int device_flush_dte_alias (struct pci_dev *pdev,u16 alias,void *data) +{ +struct amd_iommu *iommu = data; + +return iommu_flush_dte (iommu, alias); +} +/* * Command send function for invalidating a device table entry */
@@ -1246,14 +1239,22 @@ static int device_flush_dte(struct iommu_dev_data *dev_data)int ret; iommu = amd_iommu_rlookup_table[dev_data->devid]; - alias = dev_data->alias; - ret =iommu_flush_dte (iommu, dev_data->devid); -if (!ret && alias != dev_data->devid) - ret =iommu_flush_dte (iommu, alias); +if (dev_data->pdev) + ret =pci_for_each_dma_alias (dev_data->pdev, + device_flush_dte_alias, iommu); +else + ret =iommu_flush_dte (iommu, dev_data->devid);if (ret)return ret; + alias = amd_iommu_alias_table[dev_data->devid]; +if (alias != dev_data->devid) { + ret =iommu_flush_dte (iommu, alias); +if (ret) +return ret; + } +if (dev_data->ats.enabled) ret =device_flush_iotlb (dev_data,0 , ~0UL );
@@ -2035,11 +2036,9 @@ static void do_attach(struct iommu_dev_data *dev_data, struct protection_domain *domain) {struct amd_iommu *iommu; -u16 alias;bool ats; iommu = amd_iommu_rlookup_table[dev_data->devid]; - alias = dev_data->alias; ats = dev_data->ats.enabled;/* Update data structures */
@@ -2052,8 +2051,7 @@ static void do_attach(struct iommu_dev_data *dev_data,/* Update device table */ set_dte_entry (dev_data->devid, domain, ats, dev_data->iommu_v2); -if (alias != dev_data->devid) -set_dte_entry (alias, domain, ats, dev_data->iommu_v2); +clone_aliases (dev_data->pdev);device_flush_dte (dev_data); }
@@ -2062,17 +2060,14 @@ static void do_detach(struct iommu_dev_data *dev_data) {struct protection_domain *domain = dev_data->domain;struct amd_iommu *iommu; -u16 alias; iommu = amd_iommu_rlookup_table[dev_data->devid]; - alias = dev_data->alias;/* Update data structures */ dev_data->domain =NULL ;list_del (&dev_data->list);clear_dte_entry (dev_data->devid); -if (alias != dev_data->devid) -clear_dte_entry (alias); +clone_aliases (dev_data->pdev);/* Flush the DTE entry */ device_flush_dte (dev_data);
@@ -2384,13 +2379,7 @@ static void update_device_table(struct protection_domain *domain)list_for_each_entry (dev_data, &domain->dev_list, list) {set_dte_entry (dev_data->devid, domain, dev_data->ats.enabled, dev_data->iommu_v2); - -if (dev_data->devid == dev_data->alias) -continue ; - -/* There is an alias, update device table entry for it */ -set_dte_entry (dev_data->alias, domain, dev_data->ats.enabled, - dev_data->iommu_v2); +clone_aliases (dev_data->pdev); } }
drivers/iommu/amd_iommu_types.h +1 -1
@@ -639,8 +639,8 @@ struct iommu_dev_data {struct list_head list;/* For domain->dev_list */ struct llist_node dev_data_list;/* For global dev_data_list */ struct protection_domain *domain;/* Domain the device is bound to */ +struct pci_dev *pdev;u16 devid;/* PCI Device ID */ -u16 alias;/* Alias Device ID */ bool iommu_v2;/* Device can make use of IOMMUv2 */ bool passthrough;/* Device is identity mapped */ struct {
Signature · 6 lines
2.20.1 _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
Sasha Levin
maintainerPATCH 14/33 iommu/amd: Support multiple PCI DMA aliases in IRQ Remapping
In reply to Sasha LevinFrom: Logan Gunthorpe <[email protected]>
[ Upstream commit 3c124435e8dd516df4b2fc983f4415386fd6edae ]
Non-Transparent Bridge (NTB) devices (among others) may have many DMA aliases seeing the hardware will send requests with different device ids depending on their origin across the bridged hardware.
See commit ad281ecf1c7d ("PCI: Add DMA alias quirk for Microsemi Switchtec NTB") for more information on this.
The AMD IOMMU IRQ remapping functionality ignores all PCI aliases for IRQs so if devices send an interrupt from one of their aliases they will be blocked on AMD hardware with the IOMMU enabled.
To fix this, ensure IRQ remapping is enabled for all aliases with MSI interrupts.
This is analogous to the functionality added to the Intel IRQ remapping code in commit 3f0c625c6ae7 ("iommu/vt-d: Allow interrupts from the entire bus for aliased devices")
--- drivers/iommu/amd_iommu.c | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-)
drivers/iommu/amd_iommu.c +30 -7
@@ -3741,7 +3741,20 @@ static void set_remap_table_entry(struct amd_iommu *iommu, u16 devid,iommu_flush_dte (iommu, devid); } -static struct irq_remap_table *alloc_irq_table (u16 devid) +static int set_remap_table_entry_alias (struct pci_dev *pdev,u16 alias, +void *data) +{ +struct irq_remap_table *table = data; + + irq_lookup_table[alias] = table; +set_dte_irq_entry (alias, table); + +iommu_flush_dte (amd_iommu_rlookup_table[alias], alias); + +return 0 ; +} + +static struct irq_remap_table *alloc_irq_table (u16 devid,struct pci_dev *pdev) {struct irq_remap_table *table =NULL ;struct irq_remap_table *new_table =NULL ;
@@ -3787,7 +3800,12 @@ static struct irq_remap_table *alloc_irq_table(u16 devid) table = new_table; new_table =NULL ; -set_remap_table_entry (iommu, devid, table); +if (pdev) +pci_for_each_dma_alias (pdev, set_remap_table_entry_alias, + table); +else +set_remap_table_entry (iommu, devid, table); +if (devid != alias)set_remap_table_entry (iommu, alias, table);
@@ -3804,7 +3822,8 @@ out_unlock:return table; } -static int alloc_irq_index (u16 devid,int count,bool align) +static int alloc_irq_index (u16 devid,int count,bool align, +struct pci_dev *pdev) {struct irq_remap_table *table;int index, c, alignment =1 ;
@@ -3814,7 +3833,7 @@ static int alloc_irq_index(u16 devid, int count, bool align)if (!iommu)return -ENODEV ; - table =alloc_irq_table (devid); + table =alloc_irq_table (devid, pdev);if (!table)return -ENODEV ;
@@ -4247,7 +4266,7 @@ static int irq_remapping_alloc(struct irq_domain *domain, unsigned int virq,struct irq_remap_table *table;struct amd_iommu *iommu; - table =alloc_irq_table (devid); + table =alloc_irq_table (devid,NULL );if (table) {if (!table->min_index) {/*
@@ -4264,11 +4283,15 @@ static int irq_remapping_alloc(struct irq_domain *domain, unsigned int virq, }else { index = -ENOMEM ; } - }else { + }else if (info->type ==X86_IRQ_ALLOC_TYPE_MSI || + info->type ==X86_IRQ_ALLOC_TYPE_MSIX ) {bool align = (info->type ==X86_IRQ_ALLOC_TYPE_MSI ); - index =alloc_irq_index (devid, nr_irqs, align); + index =alloc_irq_index (devid, nr_irqs, align, info->msi_dev); + }else { + index =alloc_irq_index (devid, nr_irqs, false,NULL ); } +if (index <0 ) {pr_warn ("Failed to allocate IRTE\n" ); ret = index;
Signature · 6 lines
2.20.1 _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
Sasha Levin
maintainerPATCH 15/33 perf/imx_ddr: Add enhanced AXI ID filter support
In reply to Sasha LevinFrom: Joakim Zhang <[email protected]>
[ Upstream commit 44f8bd014a94ed679ddb77d0b92350d4ac4f23a5 ]
With DDR_CAP_AXI_ID_FILTER quirk, indicating HW supports AXI ID filter which only can get bursts from DDR transaction, i.e. DDR read/write requests.
This patch add DDR_CAP_AXI_ID_ENHANCED_FILTER quirk, indicating HW supports AXI ID filter which can get bursts and bytes from DDR transaction at the same time. We hope PMU always return bytes in the driver due to it is more meaningful for users.
--- drivers/perf/fsl_imx8_ddr_perf.c | 63 +++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 21 deletions(-)
drivers/perf/fsl_imx8_ddr_perf.c +42 -21
@@ -45,7 +45,8 @@static DEFINE_IDA (ddr_ida);/* DDR Perf hardware feature */ -#define DDR_CAP_AXI_ID_FILTER 0x1/* support AXI ID filter */ +#define DDR_CAP_AXI_ID_FILTER 0x1/* support AXI ID filter */ +#define DDR_CAP_AXI_ID_FILTER_ENHANCED 0x3/* support enhanced AXI ID filter */ struct fsl_ddr_devtype_data {unsigned int quirks;/* quirks needed for different DDR Perf core */
@@ -178,6 +179,36 @@ static const struct attribute_group *attr_groups[] = { NULL, }; +static bool ddr_perf_is_filtered (struct perf_event *event) +{ +return event->attr.config ==0x41 || event->attr.config ==0x42 ; +} + +static u32 ddr_perf_filter_val (struct perf_event *event) +{ +return event->attr.config1; +} + +static bool ddr_perf_filters_compatible (struct perf_event *a, +struct perf_event *b) +{ +if (!ddr_perf_is_filtered (a)) +return true; +if (!ddr_perf_is_filtered (b)) +return true; +return ddr_perf_filter_val (a) ==ddr_perf_filter_val (b); +} + +static bool ddr_perf_is_enhanced_filtered (struct perf_event *event) +{ +unsigned int filt; +struct ddr_pmu *pmu =to_ddr_pmu (event->pmu); + + filt = pmu->devtype_data->quirks &DDR_CAP_AXI_ID_FILTER_ENHANCED ; +return (filt ==DDR_CAP_AXI_ID_FILTER_ENHANCED ) && +ddr_perf_is_filtered (event); +} +static u32 ddr_perf_alloc_counter (struct ddr_pmu *pmu,int event) {int i;
@@ -209,27 +240,17 @@ static void ddr_perf_free_counter(struct ddr_pmu *pmu, int counter)static u32 ddr_perf_read_counter (struct ddr_pmu *pmu,int counter) { -return readl_relaxed (pmu->base +COUNTER_READ + counter *4 ); -} - -static bool ddr_perf_is_filtered (struct perf_event *event) -{ -return event->attr.config ==0x41 || event->attr.config ==0x42 ; -} +struct perf_event *event = pmu->events[counter]; +void __iomem *base = pmu->base; -static u32 ddr_perf_filter_val (struct perf_event *event) -{ -return event->attr.config1; -} - -static bool ddr_perf_filters_compatible (struct perf_event *a, -struct perf_event *b) -{ -if (!ddr_perf_is_filtered (a)) -return true; -if (!ddr_perf_is_filtered (b)) -return true; -return ddr_perf_filter_val (a) ==ddr_perf_filter_val (b); +/* +* return bytes instead of bursts from ddr transaction for +* axid-read and axid-write event if PMU core supports enhanced +* filter. +*/ + base +=ddr_perf_is_enhanced_filtered (event) ?COUNTER_DPCR1 : +COUNTER_READ ; +return readl_relaxed (base + counter *4 ); }static int ddr_perf_event_init (struct perf_event *event)
Signature · 7 lines
2.20.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Sasha Levin
maintainerPATCH 16/33 mfd: intel-lpss: Add default I2C device properties for Gemini Lake
In reply to Sasha LevinFrom: Jarkko Nikula <[email protected]>
[ Upstream commit 3f31bc67e4dc6a555341dffefe328ddd58e8b431 ]
It turned out Intel Gemini Lake doesn't use the same I2C timing parameters as Broxton.
I got confirmation from the Windows team that Gemini Lake systems should use updated timing parameters that differ from those used in Broxton based systems.
--- drivers/mfd/intel-lpss-pci.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-)
drivers/mfd/intel-lpss-pci.c +20 -8
@@ -122,6 +122,18 @@ static const struct intel_lpss_platform_info apl_i2c_info = { .properties = apl_i2c_properties, }; +static struct property_entry glk_i2c_properties[] = { +PROPERTY_ENTRY_U32 ("i2c-sda-hold-time-ns" ,313 ), +PROPERTY_ENTRY_U32 ("i2c-sda-falling-time-ns" ,171 ), +PROPERTY_ENTRY_U32 ("i2c-scl-falling-time-ns" ,290 ), + { }, +}; + +static const struct intel_lpss_platform_info glk_i2c_info = { + .clk_rate =133000000 , + .properties = glk_i2c_properties, +}; +static const struct intel_lpss_platform_info cnl_i2c_info = { .clk_rate =216000000 , .properties = spt_i2c_properties,
@@ -174,14 +186,14 @@ static const struct pci_device_id intel_lpss_pci_ids[] = { { PCI_VDEVICE(INTEL, 0x1ac6), (kernel_ulong_t)&bxt_info }, { PCI_VDEVICE(INTEL, 0x1aee), (kernel_ulong_t)&bxt_uart_info },/* GLK */ - { PCI_VDEVICE(INTEL, 0x31ac), (kernel_ulong_t)&bxt_i2c_info }, - { PCI_VDEVICE(INTEL, 0x31ae), (kernel_ulong_t)&bxt_i2c_info }, - { PCI_VDEVICE(INTEL, 0x31b0), (kernel_ulong_t)&bxt_i2c_info }, - { PCI_VDEVICE(INTEL, 0x31b2), (kernel_ulong_t)&bxt_i2c_info }, - { PCI_VDEVICE(INTEL, 0x31b4), (kernel_ulong_t)&bxt_i2c_info }, - { PCI_VDEVICE(INTEL, 0x31b6), (kernel_ulong_t)&bxt_i2c_info }, - { PCI_VDEVICE(INTEL, 0x31b8), (kernel_ulong_t)&bxt_i2c_info }, - { PCI_VDEVICE(INTEL, 0x31ba), (kernel_ulong_t)&bxt_i2c_info }, + { PCI_VDEVICE(INTEL, 0x31ac), (kernel_ulong_t)&glk_i2c_info }, + { PCI_VDEVICE(INTEL, 0x31ae), (kernel_ulong_t)&glk_i2c_info }, + { PCI_VDEVICE(INTEL, 0x31b0), (kernel_ulong_t)&glk_i2c_info }, + { PCI_VDEVICE(INTEL, 0x31b2), (kernel_ulong_t)&glk_i2c_info }, + { PCI_VDEVICE(INTEL, 0x31b4), (kernel_ulong_t)&glk_i2c_info }, + { PCI_VDEVICE(INTEL, 0x31b6), (kernel_ulong_t)&glk_i2c_info }, + { PCI_VDEVICE(INTEL, 0x31b8), (kernel_ulong_t)&glk_i2c_info }, + { PCI_VDEVICE(INTEL, 0x31ba), (kernel_ulong_t)&glk_i2c_info }, { PCI_VDEVICE(INTEL, 0x31bc), (kernel_ulong_t)&bxt_uart_info }, { PCI_VDEVICE(INTEL, 0x31be), (kernel_ulong_t)&bxt_uart_info }, { PCI_VDEVICE(INTEL, 0x31c0), (kernel_ulong_t)&bxt_uart_info },
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 17/33 mfd: intel-lpss: Add Intel Comet Lake PCH-H PCI IDs
In reply to Sasha LevinFrom: Andy Shevchenko <[email protected]>
[ Upstream commit dd047dce3a6f5233b98e792e2287cc549da35879 ]
Intel Comet Lake PCH-H has the same LPSS than Intel Cannon Lake. Add the new IDs to the list of supported devices.
--- drivers/mfd/intel-lpss-pci.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
drivers/mfd/intel-lpss-pci.c +12 -1
@@ -140,7 +140,7 @@ static const struct intel_lpss_platform_info cnl_i2c_info = { };static const struct pci_device_id intel_lpss_pci_ids[] = { -/* CML */ +/* CML-LP */ {PCI_VDEVICE (INTEL ,0x02a8 ), (kernel_ulong_t)&spt_uart_info }, {PCI_VDEVICE (INTEL ,0x02a9 ), (kernel_ulong_t)&spt_uart_info }, {PCI_VDEVICE (INTEL ,0x02aa ), (kernel_ulong_t)&spt_info },
@@ -153,6 +153,17 @@ static const struct pci_device_id intel_lpss_pci_ids[] = { { PCI_VDEVICE(INTEL, 0x02ea), (kernel_ulong_t)&cnl_i2c_info }, { PCI_VDEVICE(INTEL, 0x02eb), (kernel_ulong_t)&cnl_i2c_info }, { PCI_VDEVICE(INTEL, 0x02fb), (kernel_ulong_t)&spt_info }, +/* CML-H */ + { PCI_VDEVICE(INTEL, 0x06a8), (kernel_ulong_t)&spt_uart_info }, + { PCI_VDEVICE(INTEL, 0x06a9), (kernel_ulong_t)&spt_uart_info }, + { PCI_VDEVICE(INTEL, 0x06aa), (kernel_ulong_t)&spt_info }, + { PCI_VDEVICE(INTEL, 0x06ab), (kernel_ulong_t)&spt_info }, + { PCI_VDEVICE(INTEL, 0x06c7), (kernel_ulong_t)&spt_uart_info }, + { PCI_VDEVICE(INTEL, 0x06e8), (kernel_ulong_t)&cnl_i2c_info }, + { PCI_VDEVICE(INTEL, 0x06e9), (kernel_ulong_t)&cnl_i2c_info }, + { PCI_VDEVICE(INTEL, 0x06ea), (kernel_ulong_t)&cnl_i2c_info }, + { PCI_VDEVICE(INTEL, 0x06eb), (kernel_ulong_t)&cnl_i2c_info }, + { PCI_VDEVICE(INTEL, 0x06fb), (kernel_ulong_t)&spt_info },/* BXT A-Step */ { PCI_VDEVICE(INTEL, 0x0aac), (kernel_ulong_t)&bxt_i2c_info }, { PCI_VDEVICE(INTEL, 0x0aae), (kernel_ulong_t)&bxt_i2c_info },
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 18/33 ARM: config: aspeed-g5: Enable 8250_DW quirks
In reply to Sasha LevinFrom: Joel Stanley <[email protected]>
[ Upstream commit a5331a7a87ec81d5228b7421acf831b2d0c0de26 ]
This driver option is used by the AST2600 A0 boards to work around a hardware issue.
--- arch/arm/configs/aspeed_g5_defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/configs/aspeed_g5_defconfig +1 -0
@@ -139,6 +139,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=6 CONFIG_SERIAL_8250_EXTENDED=y CONFIG_SERIAL_8250_ASPEED_VUART=y CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_8250_DW=y CONFIG_SERIAL_OF_PLATFORM=y CONFIG_ASPEED_KCS_IPMI_BMC=y CONFIG_ASPEED_BT_IPMI_BMC=y
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 19/33 ARM: OMAP2+: SmartReflex: add omap_sr_pdata definition
In reply to Sasha LevinFrom: Ben Dooks <[email protected]>
[ Upstream commit 2079fe6ea8cbd2fb2fbadba911f1eca6c362eb9b ]
The omap_sr_pdata is not declared but is exported, so add a define for it to fix the following warning:
arch/arm/mach-omap2/pdata-quirks.c:609:36: warning: symbol 'omap_sr_pdata' was not declared. Should it be static?
--- include/linux/power/smartreflex.h | 3 +++ 1 file changed, 3 insertions(+)
include/linux/power/smartreflex.h +3 -0
@@ -293,6 +293,9 @@ struct omap_sr_data {struct voltagedomain *voltdm; }; + +extern struct omap_sr_data omap_sr_pdata[OMAP_SR_NR ]; +#ifdef CONFIG_POWER_AVS_OMAP /* Smartreflex module enable/disable interface */
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 20/33 mmc: sdhci-pci: Quirk for AMD SDHC Device 0x7906
In reply to Sasha LevinFrom: Raul E Rangel <[email protected]>
[ Upstream commit 7a869f00bb15bcefb8804d798a49b086267b03e6 ]
AMD SDHC 0x7906 requires a hard reset to clear all internal state. Otherwise it can get into a bad state where the DATA lines are always read as zeros.
This change requires firmware that can transition the device into D3Cold for it to work correctly. If the firmware does not support transitioning to D3Cold then the power state transitions are a no-op.
--- drivers/mmc/host/sdhci-pci-core.c | 51 ++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-)
drivers/mmc/host/sdhci-pci-core.c +50 -1
@@ -21,6 +21,7 @@#include <linux/mmc/mmc.h> #include <linux/scatterlist.h> #include <linux/io.h> +#include <linux/iopoll.h> #include <linux/gpio.h> #include <linux/pm_runtime.h> #include <linux/mmc/slot-gpio.h>
@@ -1598,11 +1599,59 @@ static int amd_probe(struct sdhci_pci_chip *chip)return 0 ; } +static u32 sdhci_read_present_state (struct sdhci_host *host) +{ +return sdhci_readl (host,SDHCI_PRESENT_STATE ); +} + +void amd_sdhci_reset (struct sdhci_host *host,u8 mask) +{ +struct sdhci_pci_slot *slot =sdhci_priv (host); +struct pci_dev *pdev = slot->chip->pdev; +u32 present_state; + +/* +* SDHC 0x7906 requires a hard reset to clear all internal state. +* Otherwise it can get into a bad state where the DATA lines are always +* read as zeros. +*/ +if (pdev->device ==0x7906 && (mask &SDHCI_RESET_ALL )) { +pci_clear_master (pdev); + +pci_save_state (pdev); + +pci_set_power_state (pdev, PCI_D3cold); +pr_debug ("%s: power_state=%u\n" ,mmc_hostname (host->mmc), + pdev->current_state); +pci_set_power_state (pdev,PCI_D0 ); + +pci_restore_state (pdev); + +/* +* SDHCI_RESET_ALL says the card detect logic should not be +* reset, but since we need to reset the entire controller +* we should wait until the card detect logic has stabilized. +* +* This normally takes about 40ms. +*/ +readx_poll_timeout ( + sdhci_read_present_state, + host, + present_state, + present_state &SDHCI_CD_STABLE , +10000 , +100000 + ); + } + +return sdhci_reset (host, mask); +} +static const struct sdhci_ops amd_sdhci_pci_ops = { .set_clock = sdhci_set_clock, .enable_dma = sdhci_pci_enable_dma, .set_bus_width = sdhci_set_bus_width, - .reset = sdhci_reset, + .reset = amd_sdhci_reset, .set_uhs_signaling = sdhci_set_uhs_signaling, };
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 21/33 mmc: sdhci-pci: Add support for Intel JSL
In reply to Sasha LevinFrom: Adrian Hunter <[email protected]>
[ Upstream commit 315e3bd7ac19b18ba704d96cbb9b79bad485c01f ]
Add PCI Ids for Intel JSL.
--- drivers/mmc/host/sdhci-pci-core.c | 2 ++ drivers/mmc/host/sdhci-pci.h | 2 ++ 2 files changed, 4 insertions(+)
drivers/mmc/host/sdhci-pci-core.c +2 -0
@@ -1730,6 +1730,8 @@ static const struct pci_device_id pci_ids[] = {SDHCI_PCI_DEVICE (INTEL ,CML_EMMC , intel_glk_emmc),SDHCI_PCI_DEVICE (INTEL ,CML_SD , intel_byt_sd),SDHCI_PCI_DEVICE (INTEL ,CMLH_SD , intel_byt_sd), +SDHCI_PCI_DEVICE (INTEL ,JSL_EMMC , intel_glk_emmc), +SDHCI_PCI_DEVICE (INTEL ,JSL_SD , intel_byt_sd),SDHCI_PCI_DEVICE (O2 ,8120 , o2),SDHCI_PCI_DEVICE (O2 ,8220 , o2), SDHCI_PCI_DEVICE(O2, 8221, o2),
drivers/mmc/host/sdhci-pci.h +2 -0
@@ -55,6 +55,8 @@#define PCI_DEVICE_ID_INTEL_CML_EMMC 0x02c4#define PCI_DEVICE_ID_INTEL_CML_SD 0x02f5#define PCI_DEVICE_ID_INTEL_CMLH_SD 0x06f5 +#define PCI_DEVICE_ID_INTEL_JSL_EMMC 0x4dc4 +#define PCI_DEVICE_ID_INTEL_JSL_SD 0x4df8#define PCI_DEVICE_ID_SYSKONNECT_8000 0x8000#define PCI_DEVICE_ID_VIA_95D0 0x95d0
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 22/33 bus: ti-sysc: Add module enable quirk for audio AESS
In reply to Sasha LevinFrom: Tony Lindgren <[email protected]>
[ Upstream commit 020003f763e24e4ed0bb3d8909f3940891536d5d ]
We must set the autogating bit on enable for AESS (Audio Engine SubSystem) when probed with ti-sysc interconnect target module driver. Otherwise it won't idle properly.
--- drivers/bus/ti-sysc.c | 14 +++++++++++++- include/linux/platform_data/ti-sysc.h | 1 + 2 files changed, 14 insertions(+), 1 deletion(-)
drivers/bus/ti-sysc.c +13 -1
@@ -1242,6 +1242,8 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = { SYSC_QUIRK_SWSUP_SIDLE),/* Quirks that need to be set based on detected module */ +SYSC_QUIRK ("aess" ,0 ,0 ,0x10 ,-1 ,0x40000000 ,0xffffffff , +SYSC_MODULE_QUIRK_AESS ),SYSC_QUIRK ("hdq1w" ,0 ,0 ,0x14 ,0x18 ,0x00000006 ,0xffffffff ,SYSC_MODULE_QUIRK_HDQ1W ), SYSC_QUIRK("hdq1w", 0, 0, 0x14, 0x18, 0x0000000a, 0xffffffff,
@@ -1270,7 +1272,6 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {#ifdef DEBUG SYSC_QUIRK ("adc" ,0 ,0 ,0x10 ,-1 ,0x47300001 ,0xffffffff ,0 ),SYSC_QUIRK ("atl" ,0 ,0 ,-1 ,-1 ,0x0a070100 ,0xffffffff ,0 ), -SYSC_QUIRK ("aess" ,0 ,0 ,0x10 ,-1 ,0x40000000 ,0xffffffff ,0 ),SYSC_QUIRK ("cm" ,0 ,0 ,-1 ,-1 ,0x40000301 ,0xffffffff ,0 ),SYSC_QUIRK ("control" ,0 ,0 ,0x10 ,-1 ,0x40000900 ,0xffffffff ,0 ), SYSC_QUIRK("cpgmac", 0, 0x1200, 0x1208, 0x1204, 0x4edb1902,
@@ -1402,6 +1403,14 @@ static void sysc_clk_enable_quirk_hdq1w(struct sysc *ddata)sysc_write (ddata, offset, val); } +/* AESS (Audio Engine SubSystem) needs autogating set after enable */ +static void sysc_module_enable_quirk_aess (struct sysc *ddata) +{ +int offset =0x7c ;/* AESS_AUTO_GATING_ENABLE */ + +sysc_write (ddata, offset,1 ); +} +/* I2C needs extra enable bit toggling for reset */ static void sysc_clk_quirk_i2c (struct sysc *ddata,bool enable) {
@@ -1484,6 +1493,9 @@ static void sysc_init_module_quirks(struct sysc *ddata)return ; } +if (ddata->cfg.quirks &SYSC_MODULE_QUIRK_AESS ) + ddata->module_enable_quirk = sysc_module_enable_quirk_aess; +if (ddata->cfg.quirks &SYSC_MODULE_QUIRK_SGX ) ddata->module_enable_quirk = sysc_module_enable_quirk_sgx;
include/linux/platform_data/ti-sysc.h +1 -0
@@ -49,6 +49,7 @@ struct sysc_regbits {s8 emufree_shift; }; +#define SYSC_MODULE_QUIRK_AESS BIT(19)#define SYSC_MODULE_QUIRK_SGX BIT(18)#define SYSC_MODULE_QUIRK_HDQ1W BIT(17)#define SYSC_MODULE_QUIRK_I2C BIT(16)
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 23/33 mmc: sdio: fix wl1251 vendor id
In reply to Sasha LevinFrom: "H. Nikolaus Schaller" <[email protected]>
[ Upstream commit e5db673e7fe2f971ec82039a28dc0811c2100e87 ]
v4.11-rc1 did introduce a patch series that rearranged the sdio quirks into a header file. Unfortunately this did forget to handle SDIO_VENDOR_ID_TI differently between wl1251 and wl1271 with the result that although the wl1251 was found on the sdio bus, the firmware did not load any more and there was no interface registration.
This patch defines separate constants to be used by sdio quirks and drivers.
--- include/linux/mmc/sdio_ids.h | 2 ++ 1 file changed, 2 insertions(+)
include/linux/mmc/sdio_ids.h +2 -0
@@ -71,6 +71,8 @@#define SDIO_VENDOR_ID_TI 0x0097#define SDIO_DEVICE_ID_TI_WL1271 0x4076 +#define SDIO_VENDOR_ID_TI_WL1251 0x104c +#define SDIO_DEVICE_ID_TI_WL1251 0x9066#define SDIO_VENDOR_ID_STE 0x0020#define SDIO_DEVICE_ID_STE_CW1200 0x2280
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 24/33 mmc: core: fix wl1251 sdio quirks
In reply to Sasha LevinFrom: "H. Nikolaus Schaller" <[email protected]>
[ Upstream commit 16568b4a4f0c34bd35cfadac63303c7af7812764 ]
wl1251 and wl1271 have different vendor id and device id. So we need to handle both with sdio quirks.
--- drivers/mmc/core/quirks.h | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/mmc/core/quirks.h +7 -0
@@ -119,7 +119,14 @@ static const struct mmc_fixup mmc_ext_csd_fixups[] = {END_FIXUP }; +static const struct mmc_fixup sdio_fixup_methods[] = { +SDIO_FIXUP (SDIO_VENDOR_ID_TI_WL1251 ,SDIO_DEVICE_ID_TI_WL1251 , + add_quirk,MMC_QUIRK_NONSTD_FUNC_IF ), + +SDIO_FIXUP (SDIO_VENDOR_ID_TI_WL1251 ,SDIO_DEVICE_ID_TI_WL1251 , + add_quirk,MMC_QUIRK_DISABLE_CD ), +SDIO_FIXUP (SDIO_VENDOR_ID_TI ,SDIO_DEVICE_ID_TI_WL1271 , add_quirk,MMC_QUIRK_NONSTD_FUNC_IF ),
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 25/33 usb-storage: Disable UAS on JMicron SATA enclosure
In reply to Sasha LevinFrom: Laura Abbott <[email protected]>
[ Upstream commit bc3bdb12bbb3492067c8719011576370e959a2e6 ]
Steve Ellis reported incorrect block sizes and alignement offsets with a SATA enclosure. Adding a quirk to disable UAS fixes the problems.
--- drivers/usb/storage/unusual_uas.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/usb/storage/unusual_uas.h +5 -2
@@ -87,12 +87,15 @@ UNUSUAL_DEV(0x2537, 0x1068, 0x0000, 0x9999, USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_IGNORE_UAS), -/* Reported-by: Takeo Nakayama <[email protected]> */ +/* +* Initially Reported-by: Takeo Nakayama <[email protected]> +* UAS Ignore Reported by Steven Ellis <[email protected]> +*/ UNUSUAL_DEV (0x357d ,0x7788 ,0x0000 ,0x9999 ,"JMicron" ,"JMS566" ,USB_SC_DEVICE ,USB_PR_DEVICE ,NULL , -US_FL_NO_REPORT_OPCODES ), +US_FL_NO_REPORT_OPCODES |US_FL_IGNORE_UAS ),/* Reported-by: Hans de Goede <[email protected]> */ UNUSUAL_DEV(0x4971, 0x1012, 0x0000, 0x9999,
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 26/33 ALSA: hda/realtek - Move some alc236 pintbls to fallback table
In reply to Sasha LevinFrom: Hui Wang <[email protected]>
[ Upstream commit d64ebdbfd4f71406f58210f5ccb16977b4cd31d2 ]
We have a new Dell machine which needs to apply the quirk ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, try to use the fallback table to fix it this time. And we could remove all pintbls of alc236 for applying DELL1_MIC_NO_PRESENCE on Dell machines.
--- sound/pci/hda/patch_realtek.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-)
sound/pci/hda/patch_realtek.c +3 -14
@@ -7563,20 +7563,6 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = { {0x19, 0x02a11020}, {0x1a, 0x02a11030}, {0x21, 0x0221101f}), -SND_HDA_PIN_QUIRK (0x10ec0236 ,0x1028 ,"Dell" ,ALC255_FIXUP_DELL1_MIC_NO_PRESENCE , - {0x12, 0x90a60140}, - {0x14, 0x90170110}, - {0x21, 0x02211020}), -SND_HDA_PIN_QUIRK (0x10ec0236 ,0x1028 ,"Dell" ,ALC255_FIXUP_DELL1_MIC_NO_PRESENCE , - {0x12, 0x90a60140}, - {0x14, 0x90170150}, - {0x21, 0x02211020}), -SND_HDA_PIN_QUIRK (0x10ec0236 ,0x1028 ,"Dell" ,ALC255_FIXUP_DELL1_MIC_NO_PRESENCE , - {0x21, 0x02211020}), -SND_HDA_PIN_QUIRK (0x10ec0236 ,0x1028 ,"Dell" ,ALC255_FIXUP_DELL1_MIC_NO_PRESENCE , - {0x12, 0x40000000}, - {0x14, 0x90170110}, - {0x21, 0x02211020}),SND_HDA_PIN_QUIRK (0x10ec0255 ,0x1028 ,"Dell" ,ALC255_FIXUP_DELL2_MIC_NO_PRESENCE , {0x14, 0x90170110}, {0x21, 0x02211020}),
@@ -7901,6 +7887,9 @@ static const struct snd_hda_pin_quirk alc269_fallback_pin_fixup_tbl[] = {SND_HDA_PIN_QUIRK (0x10ec0274 ,0x1028 ,"Dell" ,ALC274_FIXUP_DELL_AIO_LINEOUT_VERB , {0x19, 0x40000000}, {0x1a, 0x40000000}), +SND_HDA_PIN_QUIRK (0x10ec0236 ,0x1028 ,"Dell" ,ALC255_FIXUP_DELL1_MIC_NO_PRESENCE , + {0x19, 0x40000000}, + {0x1a, 0x40000000}), {} };
Signature · 6 lines
2.20.1 _______________________________________________ Alsa-devel mailing list [email protected] https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Sasha Levin
maintainerPATCH 27/33 Bluetooth: Allow combination of BDADDR_PROPERTY and INVALID_BDADDR quirks
In reply to Sasha LevinFrom: Marcel Holtmann <[email protected]>
[ Upstream commit 7fdf6c6a0d0e032aac2aa4537a23af1e04a397ce ]
When utilizing BDADDR_PROPERTY and INVALID_BDADDR quirks together it results in an unconfigured controller even if the bootloader provides a valid address. Fix this by allowing a bootloader provided address to mark the controller as configured.
--- net/bluetooth/hci_core.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-)
net/bluetooth/hci_core.c +24 -2
@@ -1444,11 +1444,20 @@ static int hci_dev_do_open(struct hci_dev *hdev)if (hci_dev_test_flag (hdev,HCI_SETUP ) ||test_bit (HCI_QUIRK_NON_PERSISTENT_SETUP , &hdev->quirks)) { +bool invalid_bdaddr; +hci_sock_dev_event (hdev,HCI_DEV_SETUP );if (hdev->setup) ret = hdev->setup (hdev); +/* The transport driver can set the quirk to mark the +* BD_ADDR invalid before creating the HCI device or in +* its setup callback. +*/ + invalid_bdaddr =test_bit (HCI_QUIRK_INVALID_BDADDR , + &hdev->quirks); +if (ret) goto setup_failed;
@@ -1457,20 +1466,33 @@ static int hci_dev_do_open(struct hci_dev *hdev)hci_dev_get_bd_addr_from_property (hdev);if (bacmp (&hdev->public_addr,BDADDR_ANY ) && - hdev->set_bdaddr) + hdev->set_bdaddr) { ret = hdev->set_bdaddr (hdev, &hdev->public_addr); + +/* If setting of the BD_ADDR from the device +* property succeeds, then treat the address +* as valid even if the invalid BD_ADDR +* quirk indicates otherwise. +*/ +if (!ret) + invalid_bdaddr = false; + } } setup_failed:/* The transport driver can set these quirks before * creating the HCI device or in its setup callback. * +* For the invalid BD_ADDR quirk it is possible that +* it becomes a valid address if the bootloader does +* provide it (see above). +* * In case any of them is set, the controller has to * start up as unconfigured. */ if (test_bit (HCI_QUIRK_EXTERNAL_CONFIG , &hdev->quirks) || -test_bit (HCI_QUIRK_INVALID_BDADDR , &hdev->quirks)) + invalid_bdaddr)hci_dev_set_flag (hdev,HCI_UNCONFIGURED );/* For an unconfigured controller it is required to
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 28/33 Bluetooth: btbcm: Use the BDADDR_PROPERTY quirk
In reply to Sasha LevinFrom: Andre Heider <[email protected]>
[ Upstream commit a4f95f31a9f38d9bb1fd313fcc2d0c0d48116ee3 ]
Some devices ship with the controller default address, like the Orange Pi 3 (BCM4345C5).
Allow the bootloader to set a valid address through the device tree.
--- drivers/bluetooth/btbcm.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/bluetooth/btbcm.c +6 -0
@@ -440,6 +440,12 @@ int btbcm_finalize(struct hci_dev *hdev)set_bit (HCI_QUIRK_STRICT_DUPLICATE_FILTER , &hdev->quirks); +/* Some devices ship with the controller default address. +* Allow the bootloader to set a valid address through the +* device tree. +*/ +set_bit (HCI_QUIRK_USE_BDADDR_PROPERTY , &hdev->quirks); +return 0 ; }EXPORT_SYMBOL_GPL (btbcm_finalize);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 29/33 bus: ti-sysc: Fix missing force mstandby quirk handling
In reply to Sasha LevinFrom: Tony Lindgren <[email protected]>
[ Upstream commit 93c60483b5feefced92b869d5f97769495bc6313 ]
Commit 03856e928b0e ("bus: ti-sysc: Handle mstandby quirk and use it for musb") added quirk handling for mstandby quirk but did not consider that we also need a quirk variant for SYSC_QUIRK_FORCE_MSTANDBY.
We need to use forced idle mode for both SYSC_QUIRK_SWSUP_MSTANDBY and SYSC_QUIRK_FORCE_MSTANDBY, but SYSC_QUIRK_SWSUP_MSTANDBY also need to additionally also configure no-idle mode when enabled.
--- drivers/bus/ti-sysc.c | 3 ++- include/linux/platform_data/ti-sysc.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/bus/ti-sysc.c +2 -1
@@ -981,7 +981,8 @@ static int sysc_disable_module(struct device *dev)return ret; } -if (ddata->cfg.quirks &SYSC_QUIRK_SWSUP_MSTANDBY ) +if (ddata->cfg.quirks & (SYSC_QUIRK_SWSUP_MSTANDBY ) || + ddata->cfg.quirks & (SYSC_QUIRK_FORCE_MSTANDBY )) best_mode =SYSC_IDLE_FORCE ; reg &= ~(SYSC_IDLE_MASK << regbits->midle_shift);
include/linux/platform_data/ti-sysc.h +1 -0
@@ -49,6 +49,7 @@ struct sysc_regbits {s8 emufree_shift; }; +#define SYSC_QUIRK_FORCE_MSTANDBY BIT(20)#define SYSC_MODULE_QUIRK_AESS BIT(19)#define SYSC_MODULE_QUIRK_SGX BIT(18)#define SYSC_MODULE_QUIRK_HDQ1W BIT(17)
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 30/33 HID: Add quirk for Xin-Mo Dual Controller
In reply to Sasha LevinFrom: Priit Laes <[email protected]>
[ Upstream commit c62f7cd8ed066a93a243643ebf57ca99f754388e ]
Without the quirk, joystick shows up as single controller for both first and second player pads/pins.
--- drivers/hid/hid-quirks.c | 1 + 1 file changed, 1 insertion(+)
drivers/hid/hid-quirks.c +1 -0
@@ -174,6 +174,7 @@ static const struct hid_device_id hid_quirks[] = { { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_SIRIUS_BATTERY_FREE_TABLET), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD2, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, + { HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE), HID_QUIRK_MULTI_INPUT }, { 0 } };
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 31/33 HID: ite: Add USB id match for Acer SW5-012 keyboard dock
In reply to Sasha LevinFrom: Hans de Goede <[email protected]>
[ Upstream commit 8f18eca9ebc57d6b150237033f6439242907e0ba ]
The Acer SW5-012 2-in-1 keyboard dock uses a Synaptics S91028 touchpad which is connected to an ITE 8595 USB keyboard controller chip.
This keyboard has the same quirk for its rfkill / airplane mode hotkey as other keyboards with the ITE 8595 chip, it only sends a single release event when pressed and released, it never sends a press event.
This commit adds this keyboards USB id to the hid-ite id-table, fixing the rfkill key not working on this keyboard.
--- drivers/hid/hid-ids.h | 1 + drivers/hid/hid-ite.c | 3 +++ 2 files changed, 4 insertions(+)
drivers/hid/hid-ids.h +1 -0
@@ -1098,6 +1098,7 @@#define USB_DEVICE_ID_SYNAPTICS_LTS2 0x1d10#define USB_DEVICE_ID_SYNAPTICS_HD 0x0ac3#define USB_DEVICE_ID_SYNAPTICS_QUAD_HD 0x1ac3 +#define USB_DEVICE_ID_SYNAPTICS_ACER_SWITCH5_012 0x2968#define USB_DEVICE_ID_SYNAPTICS_TP_V103 0x5710#define USB_DEVICE_ID_SYNAPTICS_ACER_SWITCH5 0x81a7
drivers/hid/hid-ite.c +3 -0
@@ -40,6 +40,9 @@ static int ite_event(struct hid_device *hdev, struct hid_field *field,static const struct hid_device_id ite_devices[] = { {HID_USB_DEVICE (USB_VENDOR_ID_ITE ,USB_DEVICE_ID_ITE8595 ) }, {HID_USB_DEVICE (USB_VENDOR_ID_258A ,USB_DEVICE_ID_258A_6A88 ) }, +/* ITE8595 USB kbd ctlr, with Synaptics touchpad connected to it. */ + {HID_USB_DEVICE (USB_VENDOR_ID_SYNAPTICS , +USB_DEVICE_ID_SYNAPTICS_ACER_SWITCH5_012 ) }, { } };MODULE_DEVICE_TABLE (hid, ite_devices);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 32/33 HID: Add quirk for incorrect input length on Lenovo Y720
In reply to Sasha LevinFrom: Pavel Balan <[email protected]>
[ Upstream commit fd0913768701612fc2b8ab9c8a5c019133e8d978 ]
Apply it to the Lenovo Y720 gaming laptop I2C peripheral then.
This fixes dmesg being flooded with errors visible on un-suspend in Linux Mint 19 Cinnamon.
Example of error log:
<...>
[ 4.326588] i2c_hid i2c-ITE33D1:00: i2c_hid_get_input: incomplete report (2/4) [ 4.326845] i2c_hid i2c-ITE33D1:00: i2c_hid_get_input: incomplete report (2/4) [ 4.327095] i2c_hid i2c-ITE33D1:00: i2c_hid_get_input: incomplete report (2/4) [ 4.327341] i2c_hid i2c-ITE33D1:00: i2c_hid_get_input: incomplete report (2/4) [ 4.327609] i2c_hid i2c-ITE33D1:00: i2c_hid_get_input: incomplete report (2/4)
<...>
Example of fixed log (debug on)
<...>
[ 3731.333183] i2c_hid i2c-ITE33D1:00: input: 02 00 [ 3731.333581] i2c_hid i2c-ITE33D1:00: input: 02 00 [ 3731.333842] i2c_hid i2c-ITE33D1:00: input: 02 00 [ 3731.334107] i2c_hid i2c-ITE33D1:00: input: 02 00 [ 3731.334367] i2c_hid i2c-ITE33D1:00: input: 02 00
<...>
--- drivers/hid/hid-ids.h | 1 + drivers/hid/i2c-hid/i2c-hid-core.c | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-)
drivers/hid/hid-ids.h +1 -0
@@ -631,6 +631,7 @@#define USB_VENDOR_ID_ITE 0x048d#define USB_DEVICE_ID_ITE_LENOVO_YOGA 0x8386#define USB_DEVICE_ID_ITE_LENOVO_YOGA2 0x8350 +#define I2C_DEVICE_ID_ITE_LENOVO_LEGION_Y720 0x837a#define USB_DEVICE_ID_ITE_LENOVO_YOGA900 0x8396#define USB_DEVICE_ID_ITE8595 0x8595
drivers/hid/i2c-hid/i2c-hid-core.c +13 -3
@@ -49,6 +49,8 @@#define I2C_HID_QUIRK_NO_IRQ_AFTER_RESET BIT(1)#define I2C_HID_QUIRK_BOGUS_IRQ BIT(4)#define I2C_HID_QUIRK_RESET_ON_RESUME BIT(5) +#define I2C_HID_QUIRK_BAD_INPUT_SIZE BIT(6) +/* flags */ #define I2C_HID_STARTED 0
@@ -177,6 +179,8 @@ static const struct i2c_hid_quirks { I2C_HID_QUIRK_BOGUS_IRQ }, {USB_VENDOR_ID_ALPS_JP ,HID_ANY_ID , I2C_HID_QUIRK_RESET_ON_RESUME }, + { USB_VENDOR_ID_ITE, I2C_DEVICE_ID_ITE_LENOVO_LEGION_Y720, + I2C_HID_QUIRK_BAD_INPUT_SIZE }, { 0, 0 } };
@@ -498,9 +502,15 @@ static void i2c_hid_get_input(struct i2c_hid *ihid) }if ((ret_size > size) || (ret_size <2 )) { -dev_err (&ihid->client->dev,"%s: incomplete report (%d/%d)\n" , - __func__, size, ret_size); -return ; +if (ihid->quirks &I2C_HID_QUIRK_BAD_INPUT_SIZE ) { + ihid->inbuf[0 ] = size &0xff ; + ihid->inbuf[1 ] = size >>8 ; + ret_size = size; + }else { +dev_err (&ihid->client->dev,"%s: incomplete report (%d/%d)\n" , + __func__, size, ret_size); +return ; + } }i2c_hid_dbg (ihid,"input: %*ph\n" , ret_size, ihid->inbuf);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 33/33 drivers/hid/hid-multitouch.c: fix a possible null pointer access.
In reply to Sasha LevinFrom: Pan Zhang <[email protected]>
[ Upstream commit 306d5acbfc66e7cccb4d8f91fc857206b8df80d1 ]
1002 if ((quirks & MT_QUIRK_IGNORE_DUPLICATES) && mt) {
1003 struct input_mt_slot *i_slot = &mt->slots[slotnum];
1004
1005 if (input_mt_is_active(i_slot) &&
1006 input_mt_is_used(mt, i_slot))
1007 return -EAGAIN;
1008 }
We previously assumed 'mt' could be null (see line 1002).
The following situation is similar, so add a judgement.
--- drivers/hid/hid-multitouch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/hid-multitouch.c +1 -1
@@ -1019,7 +1019,7 @@ static int mt_process_slot(struct mt_device *td, struct input_dev *input, tool =MT_TOOL_DIAL ; else if (unlikely(!confidence_state)) { tool =MT_TOOL_PALM ; -if (!active && +if (!active && mt &&input_mt_is_active (&mt->slots[slotnum])) {/* * The non-confidence was reported for
Signature · 1 line
2.20.1