summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
...
| * | mtd: cfi_mtd: Use DMA for readsVignesh Raghavendra2020-10-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When possible use DMA for reading from CFI flash, this provides upto 5x improvement in read performance with high speed CFI compliant flashes like HyperFlash. Code will gracefully fallback to CPU copy when DMA is unavailable. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Reviewed-by: Stefan Roese <sr@denx.de>
| * | dma: Reduce error level when DMA channel type does not existVignesh Raghavendra2020-10-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Caller would need gracefully handle failures of dma_get_device(), therefore reduce pr_err() to pr_debug() when DMA device is not found. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Reviewed-by: Stefan Roese <sr@denx.de>
* | | Merge tag 'mips-pull-2020-10-07' of ↵Tom Rini2020-10-0712-3/+14597
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-mips - mips: octeon: add support for DDR4 memory controller - mips: octeon: add support for DWC3 USB - mips: octeon: add support for booting Linux
| * | usb: xhci: octeon: Add DWC3 glue layer for OcteonStefan Roese2020-10-073-0/+403
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the glue layer for the MIPS Octeon SoCs. It's ported mainly from the Linux code. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Marek Vasut <marex@denx.de>
| * | usb: xhci: xhci_bulk_tx: Don't "BUG" when comparing addressesStefan Roese2020-10-071-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Octeon uses mapped addresses for virtual and physical memory. It's not that easy to calculate the resulting addresses here. So let's remove this BUG_ON() completely, as it's not really helpful. Please also note, that BUG_ON() is not recommended any more in the Linux kernel. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Marek Vasut <marex@denx.de>
| * | usb: xhci: xhci-dwc3.c: Use dev_remap_addr() instead of dev_get_addr()Stefan Roese2020-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On MIPS platforms, mapping of the base address is needed. This patch switches from dev_get_addr() to dev_remap_addr() to get the mapped base address of the xHCI controller. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Marek Vasut <marex@denx.de>
| * | ram: octeon: Add MIPS Octeon3 DDR4 support (part 3/3)Aaron Williams2020-10-075-0/+435
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This Octeon 3 DDR driver is ported from the 2013 Cavium / Marvell U-Boot repository. It currently supports DDR4 on Octeon 3. It can be later extended to support also DDR3 and Octeon 2 platforms. Part 3 includes the DIMM SPD handling code and the Kconfig / Makefile integration. Signed-off-by: Aaron Williams <awilliams@marvell.com> Signed-off-by: Stefan Roese <sr@denx.de>
| * | ram: octeon: Add MIPS Octeon3 DDR4 support (part 2/3)Aaron Williams2020-10-071-0/+11030
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This Octeon 3 DDR driver is ported from the 2013 Cavium / Marvell U-Boot repository. It currently supports DDR4 on Octeon 3. It can be later extended to support also DDR3 and Octeon 2 platforms. Part 2 includes the very complex Octeon 3 DDR4 configuration Signed-off-by: Aaron Williams <awilliams@marvell.com> Signed-off-by: Stefan Roese <sr@denx.de>
| * | ram: octeon: Add MIPS Octeon3 DDR4 support (part 1/3)Aaron Williams2020-10-071-0/+2728
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This Octeon 3 DDR driver is ported from the 2013 Cavium / Marvell U-Boot repository. It currently supports DDR4 on Octeon 3. It can be later extended to support also DDR3 and Octeon 2 platforms. Part 1 adds the base U-Boot RAM driver, which will be instantiated by the DT based probing. Signed-off-by: Aaron Williams <awilliams@marvell.com> Signed-off-by: Stefan Roese <sr@denx.de>
* | | Merge tag 'dm-pull-6oct20' of git://git.denx.de/u-boot-dmTom Rini2020-10-0611-19/+26
|\ \ \ | |/ / |/| | | | | | | | | | | bloblist enhancement for alignment Update ofnode/dev_read phandle function sandbox keyboard enhancements and fixes
| * | dm: add cells_count parameter in *_count_phandle_with_argsPatrick Delaunay2020-10-0611-19/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cell_count argument is required when cells_name is NULL. This patch adds this parameter in live tree API - of_count_phandle_with_args - ofnode_count_phandle_with_args - dev_count_phandle_with_args This parameter solves issue when these API is used to count the number of element of a cell without cell name. This parameter allow to force the size cell. For example: count = dev_count_phandle_with_args(dev, "array", NULL, 3); Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | Merge tag 'u-boot-amlogic-20201005' of ↵Tom Rini2020-10-0611-222/+977
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic - generate unique mac address from SoC serial on S400 board - Add USB support for GXL and AXG SoCs - Update Gadget code to use the new GXL and AXG USB glue driver - Add a VIM3 board support to add dynamic PCIe enable in OS DT - Fix AXG pinmux with requesting GPIOs - Add missing GPIOA_18 for AXG pinctrl - Add Amlogic PWM driver
| * | pwm: Add driver for Amlogic Meson PWM controllerNeil Armstrong2020-10-053-0/+536
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the driver for the PWM controller found in the Amlogic SoCs. This PWM is only a set of Gates, Dividers and Counters: PWM output is achieved by calculating a clock that permits calculating two periods (low and high). The counter then has to be set to switch after N cycles for the first half period. The hardware has no "polarity" setting. This driver reverses the period cycles (the low length is inverted with the high length) for PWM_POLARITY_INVERSED. Disabling the PWM stops the output immediately (without waiting for the current period to complete first). Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
| * | pinctrl: meson-axg: add missing GPIOA_18Neil Armstrong2020-10-051-0/+1
| | | | | | | | | | | | | | | | | | Add the missing GPIOA_18 from the missing EE gpio list. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
| * | pinctrl: meson-axg-pmx: fix gpio requestNeil Armstrong2020-10-051-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | The AXG pmx driver gpio request offset needs the pin base to have the correct pin number. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
| * | phy: meson-gxl-usb: depend on Meson AXG aswellNeil Armstrong2020-10-051-1/+1
| | | | | | | | | | | | | | | | | | Enable build of meson-gxl-usb PHY for the AXG architecture aswell. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
| * | phy: meson-gxl: remove invalid USB3 PHY driverNeil Armstrong2020-10-052-220/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The registers which are managed by the meson-gxl-usb3 PHY driver are actually "USB control" registers (which are "glue" registers which manage OTG detection and routing of the OTG capable port between the DWC2 peripheral-only controller and the DWC3 host-only controller). Drop the meson-gxl-usb3 PHY driver now that the dwc3-meson-gxl-usb driver supports the USB control registers on GXL and GXM SoCs (these were previously managed by the meson-gxl-usb3 PHY driver). Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
| * | usb: dwc3: add Amlogic GXL & GXL DWC3 GlueNeil Armstrong2020-10-053-0/+434
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | The USB support was initialy done with a set of PHYs and dwc3-of-simple because the architecture of the USB complex was not understood correctly at the time (and proper documentation was missing...). But with the G12A family, the USB complex was correctly understood and implemented correctly. This adds a proper driver for the glue, based on the G12A one, but with enough changes to require a different driver in U-Boot. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
* | Merge branch 'next'Tom Rini2020-10-05183-2724/+12818
|\ \ | |/ |/| | | | | | | | | Bring in the assorted changes that have been staged in the 'next' branch prior to release. Signed-off-by: Tom Rini <trini@konsulko.com>
| * Merge tag 'u-boot-atmel-2021.01-a' of ↵Tom Rini2020-10-0531-928/+5164
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-atmel into next First set of u-boot-atmel features for 2021.01 cycle: This feature set includes a new CPU driver for at91 family, new driver for PIT64B hardware timer, support for new at91 family SoC named sama7g5 which adds: clock support, including conversion of the clock tree to CCF; SoC support in mach-at91, pinctrl and mmc drivers update. The feature set also includes updates for mmc driver and some other minor fixes and features regarding building without the old Atmel PIT and the possibility to read a secondary MAC address from a second i2c EEPROM.
| | * cpu: at91: add driver for CPUClaudiu Beznea2020-10-052-0/+124
| | | | | | | | | | | | | | | | | | Add basic CPU driver use to retrieve information about CPU itself. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
| | * timer: mchp-pit64b: add support for pit64bClaudiu Beznea2020-09-283-0/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for Microchip PIT64B timer. The timer is 64 bit length and is used as a free running counter (in continuous mode with highest values for period registers). The clock feeding the timer would be no more than 12.5MHz. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
| | * mmc: atmel-sdhci: use mmc_of_parse to get the DT propertiesEugen Hristev2020-09-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Call mmc_of_parse at probe time to fetch all the host properties from the DT. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
| | * mmc: atmel-sdhci: enable the required generic clockEugen Hristev2020-09-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | The second clock of the IP block (the generic clock), must be explicitly enabled. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com> Reviewed-by: Peng Fan <pengfan@nxp.com>
| | * mmc: atmel-sdhci: do not check clk_set_rate return valueEugen Hristev2020-09-251-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clk_set_rate will return rate in case of success and zero in case of error, however it can also return -ev, but it's an ulong function. To avoid any issues, disregard the return value of this call. In case this call actually fails, nothing much we can do anyway, but we can at least try with the previous values (or DT assigned-clocks) Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
| | * mmc: atmel-sdhci: add sama7g5-sdhci compatibility stringEugen Hristev2020-09-251-0/+1
| | | | | | | | | | | | | | | | | | | | | Add new compatibility string for matching sama7g5 product. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
| | * pinctrl: at91-pio4: add compatible for sama7g5 pinctrl blockEugen Hristev2020-09-251-0/+1
| | | | | | | | | | | | | | | | | | Add new compatible to microchip,sama7g5 new SoC. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
| | * clk: at91: sama7g5: add clock supportClaudiu Beznea2020-09-222-0/+1402
| | | | | | | | | | | | | | | | | | Add clock support for SAMA7G5. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
| | * clk: at91: pmc: add generic clock opsClaudiu Beznea2020-09-222-0/+73
| | | | | | | | | | | | | | | | | | | | | Add generic clock ops to be used by every AT91 PMC driver built on top of CCF. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
| | * clk: at91: clk-generic: add driver compatible with ccfClaudiu Beznea2020-09-223-0/+209
| | | | | | | | | | | | | | | | | | Add clk-generic driver compatible with common clock framework. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
| | * clk: at91: clk-peripheral: add driver compatible with ccfClaudiu Beznea2020-09-223-0/+272
| | | | | | | | | | | | | | | | | | Add clk-peripheral compatible with common clock framework. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
| | * clk: at91: clk-system: add driver compatible with ccfClaudiu Beznea2020-09-223-1/+116
| | | | | | | | | | | | | | | | | | Add clk-system driver compatible with common clock framework. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
| | * clk: at91: clk-programmable: add driver compatible with ccfClaudiu Beznea2020-09-223-1/+226
| | | | | | | | | | | | | | | | | | Add clk-programmable driver compatible with common clock framework. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
| | * clk: at91: clk-utmi: add support for sama7g5Claudiu Beznea2020-09-222-1/+73
| | | | | | | | | | | | | | | | | | | | | | | | Add UTMI support for SAMA7G5. SAMA7G5's UTMI control is done via XTALF register. Values written at bits 2..0 in this register correspond to the on board crystal oscillator frequency. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
| | * clk: at91: clk-utmi: add driver compatible with ccfClaudiu Beznea2020-09-223-0/+169
| | | | | | | | | | | | | | | | | | Add clk-utmi driver compatible with common clock framework. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
| | * clk: at91: clk-master: add support for sama7g5Claudiu Beznea2020-09-222-1/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add master clock (MCK1..MCK4) support for SAMA7G5. SAMA7G5's PMC has multiple master clocks feeding different subsystems. One of them feeds image subsystem and is changeable based on image subsystem needs. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
| | * clk: at91: clk-master: add driver compatible with ccfClaudiu Beznea2020-09-223-1/+178
| | | | | | | | | | | | | | | | | | Add clk-master driver compatible with common clock framework. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
| | * clk: at91: sam9x60-pll: add driver compatible with ccfClaudiu Beznea2020-09-224-0/+486
| | | | | | | | | | | | | | | | | | Add sam9x60-pll driver compatible with common clock framework. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
| | * clk: at91: clk-main: add driver compatible with ccfClaudiu Beznea2020-09-223-1/+398
| | | | | | | | | | | | | | | | | | Add clk-main driver compatible with common clock framework. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
| | * clk: at91: sckc: add driver compatible with ccfClaudiu Beznea2020-09-222-1/+173
| | | | | | | | | | | | | | | | | | | | | | | | Add sckc driver compatible with common clock framework. Driver implements slow clock support for SAM9X60 compatible IPs (in this list it is also present SAMA7G5's slow clock IP). Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
| | * clk: at91: move clock code to compat.cClaudiu Beznea2020-09-2216-1163/+1030
| | | | | | | | | | | | | | | | | | | | | | | | Move clock code to compat.c to allow switching to CCF without mixing CCF code with non CCF code. This prepares the field for next commits. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
| | * clk: at91: pmc: add helpers for clock driversClaudiu Beznea2020-09-222-0/+104
| | | | | | | | | | | | | | | | | | | | | Add helper for clock drivers. These will be used by following commits in the process of switching AT91 clock drivers to CCF. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
| | * clk: get clock pointer before proceedingClaudiu Beznea2020-09-221-4/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clk_get_by_indexed_prop() retrieves a clock with dev member being set with the pointer to the udevice for the clock controller driver. But in case of CCF each clock driver has set in dev member the reference to its parent (the root of the clock tree is a fixed clock, every node in clock tree is a clock registered with clk_register()). In this case the subsequent operations like dev_get_clk_ptr() on clocks retrieved by clk_get_by_indexed_prop() will fail. For this, get the pointer to the proper clock registered (with clk_register()) using clk_get_by_id() before proceeding. Fixes: 1d7993d1d0ef ("clk: Port Linux common clock framework [CCF] for imx6q to U-boot (tag: v5.1.12)") Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| | * clk: do not disable clock if it is criticalClaudiu Beznea2020-09-221-0/+3
| | | | | | | | | | | | | | | | | | | | | Do not disable clock if it is a critical one. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| | * clk: bind clk to new parent deviceClaudiu Beznea2020-09-221-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clock re-parenting is not binding the clock's device to its new parent device, it only calls the clock's ops->set_parent() API. The changes in this commit re-parent the clock device to its new parent so that subsequent operations like clk_get_parent() to point to the proper parent. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| | * dm: core: add support for device re-parentingClaudiu Beznea2020-09-221-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In common clock framework the relation b/w parent and child clocks is determined based on the udevice parent/child information. A clock parent could be changed based on devices needs. In case this is happen the functionalities for clock who's parent is changed are broken. Add a function that reparent a device. This will be used in clk-uclass.c to reparent a clock device. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| | * clk: check hw and hw->dev before dereference itClaudiu Beznea2020-09-221-0/+3
| | | | | | | | | | | | | | | | | | | | | Check hw and hw->dev before dereference it. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | Merge tag 'u-boot-stm32-20201003' of ↵Tom Rini2020-10-055-36/+42
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-stm into next - stm32mp: DT alignment with Linux 5.9-rc4 - stm32mp: convert drivers to APIs which support live DT - stm32mp: gpio: minor fixes
| | * | mailbox: stm32_ipcc: Convert to use APIs which support live DTPatrick Delaunay2020-10-021-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use ofnode_ or dev_ APIs instead of fdt_ and fdtdec_ APIs so that the driver can support live DT. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
| | * | video: stm32_dsi: Convert to use APIs which support live DTPatrick Delaunay2020-10-021-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use ofnode_ or dev_ APIs instead of fdt_ and fdtdec_ APIs so that the driver can support live DT. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Yannick Fertré <yannick.fertre@st.com>