diff options
author | Rui Miguel Silva <rui.silva@linaro.org> | 2021-05-13 10:47:15 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-05-21 20:05:32 +0200 |
commit | 60d789f3bfbb7428e6ba2949de70a6db8e12e8fa (patch) | |
tree | d1ff3b1af72d50cbe755e40f08d93e7740368f84 /drivers/usb/isp1760/isp1760-if.c | |
parent | usb: isp1760: use dr_mode binding (diff) | |
download | linux-60d789f3bfbb7428e6ba2949de70a6db8e12e8fa.tar.xz linux-60d789f3bfbb7428e6ba2949de70a6db8e12e8fa.zip |
usb: isp1760: add support for isp1763
isp1763 have some differences from the isp1760, 8 bit address for
registers and 16 bit for values, no bulk access to memory addresses,
16 PTD's instead of 32.
Following the regmap work done before add the registers, memory access
and add the functions to support differences in setup sequences.
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Link: https://lore.kernel.org/r/20210513084717.2487366-8-rui.silva@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/isp1760/isp1760-if.c')
-rw-r--r-- | drivers/usb/isp1760/isp1760-if.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/usb/isp1760/isp1760-if.c b/drivers/usb/isp1760/isp1760-if.c index cb3e4d782315..7cc349c0b2ad 100644 --- a/drivers/usb/isp1760/isp1760-if.c +++ b/drivers/usb/isp1760/isp1760-if.c @@ -7,6 +7,7 @@ * - PDEV (generic platform device centralized driver model) * * (c) 2007 Sebastian Siewior <bigeasy@linutronix.de> + * Copyright 2021 Linaro, Rui Miguel Silva <rui.silva@linaro.org> * */ @@ -209,10 +210,18 @@ static int isp1760_plat_probe(struct platform_device *pdev) if (of_device_is_compatible(dp, "nxp,usb-isp1761")) devflags |= ISP1760_FLAG_ISP1761; - /* Some systems wire up only 16 of the 32 data lines */ + if (of_device_is_compatible(dp, "nxp,usb-isp1763")) + devflags |= ISP1760_FLAG_ISP1763; + + /* + * Some systems wire up only 8 of 16 data lines or + * 16 of the 32 data lines + */ of_property_read_u32(dp, "bus-width", &bus_width); if (bus_width == 16) devflags |= ISP1760_FLAG_BUS_WIDTH_16; + else if (bus_width == 8) + devflags |= ISP1760_FLAG_BUS_WIDTH_8; if (usb_get_dr_mode(&pdev->dev) == USB_DR_MODE_PERIPHERAL) devflags |= ISP1760_FLAG_PERIPHERAL_EN; @@ -250,6 +259,7 @@ static int isp1760_plat_remove(struct platform_device *pdev) static const struct of_device_id isp1760_of_match[] = { { .compatible = "nxp,usb-isp1760", }, { .compatible = "nxp,usb-isp1761", }, + { .compatible = "nxp,usb-isp1763", }, { }, }; MODULE_DEVICE_TABLE(of, isp1760_of_match); |