9
0
Fork 0
Commit Graph

4339 Commits

Author SHA1 Message Date
Jean-Christophe PLAGNIOL-VILLARD 563b43d11f efi: add minor and major to the bus and display it at boot
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-09 07:36:14 +01:00
Jean-Christophe PLAGNIOL-VILLARD 83c9ce1dbc efi: bus: add firmware vendor and resision and tables info
This alllow us to known where we boot from

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-09 07:36:14 +01:00
Jean-Christophe PLAGNIOL-VILLARD ffdb34022b video: sdl fix typo
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-06 09:11:51 +01:00
Sascha Hauer db5a5e3002 dma: apbh_dma: add missing array termination
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-06 09:00:49 +01:00
Robin van der Gracht e7b1f56263 clk: imx: clk-imx6ul: Use anatop_base pointer for consistency
The anatop_base pointer was unused, but instead of removing it, assign
and use it for readability like clk-imx6 and clk-imx6sx do.

Signed-off-by: Robin van der Gracht <robin@protonic.nl>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-06 08:12:32 +01:00
Bastian Stender 52e9a842e3 video: add support for Solomon SSD1307 OLED controller family
It was ported from linux v4.10. Like the kernel driver only
communication via I2C is supported.

It has only been tested with a SSD1306 and a 96x16 OLED display:

	&i2c0 {
		status = "okay";

		ssd1306: oled@3c {
			compatible = "solomon,ssd1306fb-i2c";
			reg = <0x3c>;
			reset-gpios = <&gpio1 1 0>;
			solomon,height = <16>;
			solomon,width = <96>;
			solomon,page-offset = <0>;
			solomon,com-invdir;
			solomon,com-seq;
		};

Signed-off-by: Bastian Stender <bst@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-06 08:10:36 +01:00
Robin van der Gracht da2ec36e7c clk: imx: clk-imx6ul: Fixed conditional for enabling USB phy clocks
Signed-off-by: Robin van der Gracht <robin@protonic.nl>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-03 11:54:18 +01:00
Bastian Stender 836b99c81b i2c: mv64xxx: simplify mv64xxx_i2c_wait_for_completion
Two nested while loops are not necessary here, so integrate the read,
i2c_fsm and i2c_do_action calls into mv64xxx_i2c_wait_for_completion()
and remove the obsolete interrupt remains.

Signed-off-by: Bastian Stender <bst@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-02 14:03:43 +01:00
Bastian Stender 8d38b5205c i2c: mv64xxx: add software delays
As stated in Marvell's Functional Specifications in MV-S107021-U0 Rev. A
on page 420 ff. software delays are needed. "SW delay represent a delay
of at least 2 internal clock cycles". These delays are hereby
implemented.

The original kernel driver compensates the needed software delays with
the time the interrupts take.

Signed-off-by: Bastian Stender <bst@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-02 14:03:43 +01:00
Uwe Kleine-König 59cce42f38 mvebu: kirkwood: simplify soc init code flow
Similar to the two previous commits, this gets rid of a of-fixup which
is strange because the soc init stuff is rerun then when a new dt for
booting into Linux is loaded.

The initcall must be postponed to post-core to ensure
of_machine_is_compatible is working correctly.

The call to mvebu_mbus_add_range is moved to drivers/bus/mvebu-mbus.c to
ensure it's registered early enough.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-02 14:03:43 +01:00
Uwe Kleine-König f8d4f622c9 mvebu: dove: simplify soc init code flow
Similar to the previous commit, this gets rid of a of-fixup which is
strange because the soc init stuff is rerun then when a new dt for
booting into Linux is loaded.

The initcall must be postponed to post-core to ensure
of_machine_is_compatible is working correctly.

The call to mvebu_mbus_add_range is moved to drivers/bus/mvebu-mbus.c to
ensure it's registered early enough.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-02 14:03:43 +01:00
Uwe Kleine-König 8a5edc9e99 mvebu: armada-370-xp: simplify soc init code flow
This gets rid of a of-fixup which is strange because the soc init stuff
is rerun then when a new dt for booting into Linux is loaded.

The initcall must be postponed to post-core to ensure
of_machine_is_compatible is working correctly.

The call to mvebu_mbus_add_range is moved to drivers/bus/mvebu-mbus.c to
ensure it's registered early enough.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-02 14:03:43 +01:00
Uwe Kleine-König f3acd214a1 ata: new driver to support the internal sata controller on Armada-XP
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-02 14:03:43 +01:00
Enrico Joerns dc9ef03ecb mci-bcm2835: enable devicetree probing
Signed-off-by: Enrico Joerns <ejo@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-02 09:11:24 +01:00
Enrico Joerns 6b4f5b6448 clocksource: bcm2835: use clock-frequency property when available
If the clock frequency is given by a DT property, use this and don't
try to use the clock handle.

Signed-off-by: Enrico Joerns <ejo@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-02 09:11:24 +01:00
Uwe Kleine-König faa369e9c5 nand-bb: fix writing to the end of a .bb device
As nand_bb_write_buf calls mtd_write(bb->mtd, cur_ofs, now, ...) the
limit that now should be checked against is bb->mtd->size - cur_ofs.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-02 08:41:53 +01:00
Bastian Stender b9cf45f00c fb: introduce flush for virtual framebuffer
Some drivers need an explicit sync method to flush the virtual
framebuffer to the display. It is called fb_flush().

fb_flush() gets called on fbc_putc, on fb_close and in the pattern cycle
in the fbtest command.

Signed-off-by: Bastian Stender <bst@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-28 15:52:53 +01:00
Bastian Stender 1233570798 console: replace set_active by open/close
Opening and closing consoles should be independent from setting them
active. This way it is possible to open e.g. a framebuffer console and
display text on it without showing stdout/stderr.

Signed-off-by: Bastian Stender <bst@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-28 15:52:35 +01:00
Bastian Stender 3cade5ec3a fbconsole: implement vt100 cursor shown/hidden
This implements the vt100 show cursor command '[?25h' and the hide
cursor command '[?25l'. It is useful for displaying text on a non-active
(no stdout/stdin/stderr) console with 'echo'.

Signed-off-by: Bastian Stender <bst@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-28 07:45:38 +01:00
Bastian Stender 1e2f65d72a fbconsole: check cursor position before moving
Moving the cursor to x=2, y=2 with "\e[3;3H" on a 12x2 framebuffer
console lead to a barebox crash while drawing the cursor. If the
cursor position is out of bounds clip the cursor to the corresponding
edge.

Signed-off-by: Bastian Stender <bst@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-28 07:44:59 +01:00
Jean-Christophe PLAGNIOL-VILLARD 4c29a9511b efi: move x86 efi boot support to x86 arch
prepare to drop the efi arch as efi boot up is not arch sepecific

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-27 08:33:14 +01:00
Jean-Christophe PLAGNIOL-VILLARD 3858b78c1b efi: move bus driver to driver/efi
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-24 08:21:33 +01:00
Jean-Christophe PLAGNIOL-VILLARD 5596f405ff efi: move clocksource out of arch
as efi is not an arch but a boot mode from where barebox is started

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-24 08:21:33 +01:00
Jean-Christophe PLAGNIOL-VILLARD 40c5c3f8fc efi: move block io driver to driver/block
so it can be reused on any ARCH

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-24 08:21:33 +01:00
Sascha Hauer fc6ce94cda usb: gadget: fastboot: close fd after download
The fd for the downloaded file is never closed. Fix this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-23 14:49:52 +01:00
Alexander Kurz b225bbf295 i.MX: esdhc: fix imx-esdhc driver for non-OF boards
Commit 39f7a7ee8b ("i.MX: esdhc: Do not rely on CPU type for quirks")
made imx-esdhc dependent on OF and broke probing for all non-OF boards.
Since newer platforms like mx6 and vf610 are restricted to OF, the non-OF
probing only needs to distinguish mx5 vs earlier SoC.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-14 08:48:34 +01:00
Alexander Kurz 45164aadfa i.MX: i2c: fix i2c-fsl for non-OF boards
With commit 4ed5b778a5 ("i.MX: i2c: Add Vybrid support") i2c-fsl probe
returns -EINVAL for all non-OF boards.
Since newer planforms, especially vf610 are restricted OF-only it is safe to
assume "fsl,imx21-i2c" if CONFIG_OFDEVICE is not set.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-14 08:48:25 +01:00
Sascha Hauer 4afb09cc67 Merge branch 'for-next/net' 2017-02-13 09:26:04 +01:00
Sascha Hauer 5a30fae8c7 Merge branch 'for-next/mvebu' 2017-02-13 09:26:04 +01:00
Sascha Hauer 2cd2bad2b7 Merge branch 'for-next/misc' 2017-02-13 09:26:04 +01:00
Sascha Hauer 30139163b7 Merge branch 'for-next/imx' 2017-02-13 09:26:04 +01:00
Sascha Hauer bb1a6a2fd3 Merge branch 'for-next/efi' 2017-02-13 09:26:04 +01:00
Sascha Hauer a9ba8a1d0d Merge branch 'for-next/arm' 2017-02-13 09:26:03 +01:00
Wadim Egorov 49b321fb89 serial: ns16550: Set read/write functions depending on reg-io-width
Set proper register read/write functions depending on reg-io-width
device tree property.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-10 13:19:40 +01:00
Sascha Hauer 857f69ba8c ARM: start: Fix image size calculation
In barebox_non_pbl_start() we do not run at the address we are linked
at, so we must read linker variables using ld_var(). Since ld_var()
current is not available on arm64 we create two zero sized arrays,
one at the begin of the image and one at the end. The difference
between both is the image size we are looking for.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-08 12:03:20 +01:00
Sascha Hauer ad200f0dc3 pinctrl: i.MX7: Fix LPSR sel_imput setting
The i.MX7 has two pinmux controllers, the regular and the LPSR
controller. The LPSR pinmux controller doesn't have any sel_input
registers, instead they can be found in the regular pinmux controller.
This means whenever we want to apply the the sel_input setting for
the LPSR controller, we have to apply them to the regular controller
instead.
In barebox take the easy way out and just add the difference of the
two base addresses to the register offset. The same issue is present
in the Kernel aswell, but when the bootloader already configured
the pins correctly nobody notices when the Kernel sel_input setup
effectively is a no-op.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-06 11:51:20 +01:00
Sascha Hauer c82e1f90d2 clk: i.MX7: setup ethernet clocks
Reparent ethernet clocks so that they can be used by the
fec driver. The values are the same as U-Boot uses.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-06 07:41:56 +01:00
Sascha Hauer 75cb02078e clk: i.MX7: do not register PLL bypass clocks as separate clocks
In the Kernel the bypass bits in the PLLs are now registered as
separate clocks and are no longer handled in the PLL code. In
barebox we haven't made this step and there currently seems to
be no reason to do so.
This means that the bypass bits are currently modified in both
the PLL driver and in the separate clocks which does not work
properly. Drop all the bypass clocks to let the bypass bits
be handled in the PLL driver exclusively.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-06 07:41:10 +01:00
Sascha Hauer 23aa31a6d2 clk: i.MX7: Fix ethernet clocks
The original clock code from Linux registers some gates at
base + 0x44e0, 0x44f0, 0x4500, 0x4510. These are not in the reference
manual and do not seem to have any effect on the hardware. The
reference manual lists clocks at 0x4700 and 0x4710 which Linux
does not control at all. These clocks really do have an effect on
the hardware and are needed for ethernet support. Register the
existing clocks rather than the made up clocks to support
ethernet.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-06 07:40:23 +01:00
Sascha Hauer 2225c194ed clk: Add support for shared gates
Sometimes a single software control knob controls multiple gates
in hardware. This patch adds support for shared gates which help
coping this situation. The first gate is registered with the hardware
gate as usual, the others are registered as shared gates which does
not have hardware control itself, but only switches the real hardware
gate.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-06 07:34:03 +01:00
Sascha Hauer bce7942877 clk: i.MX7: do clock reparenting when all clocks are initialized
By the time the i.MX7 clock driver probes the fixed clocks which
are the roots of the clock tree are not yet present, so reparenting
especially to one of the fixed clocks does not work. Move the
tree setup to a later initcall when the fixed clocks are there.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-06 07:32:22 +01:00
Sascha Hauer f5409645e9 clk: i.MX: Pass CLK_OPS_PARENT_ENABLE where necessary
CLK_OPS_PARENT_ENABLE was missing on some i.MX7 specific clocks.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-06 07:31:48 +01:00
Sascha Hauer f573cd5e40 clk: i.MX: clk-gate2: Allow to pass flags
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-06 07:31:25 +01:00
Sascha Hauer bea07a6881 clk: implement CLK_OPS_PARENT_ENABLE
Some clocks may only be modified when their parent clocks are enabled.
The kernel has the CLK_OPS_PARENT_ENABLE flag for this purpose.
Implement it for barebox aswell.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-06 07:31:12 +01:00
Sascha Hauer c21794d0ee clk: Keep enable count consistent over reparent
When reparenting a clock we have to make sure the new parent is enabled
when the clock was enabled on the old parent. Also we have to decrease
the old parents use counter when the clock was enabled.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-06 07:31:00 +01:00
Alexander Kurz 4cb70c729f ARM i.MX: Add i.MX6SL support
Most i.MX6SL infrastructure is already covered in barebox by general i.MX6
support. Missing infrastructure provided in separate commits are
* SoC type detection
* Clock infrastructure

Add the missing fsl,imx6sl-mmdc, so it will not be catched by fsl,imx6q-mmdc
and the remaining bits and pieces to provide barebox i.MX6SL SoC support.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-02 08:13:07 +01:00
Alexander Kurz cb3a2b7be8 ARM: i.MX6SL: import clock infrastructure from linux
Import i.MX6SL clock infrastructure from linux clk-imx6sl.c

To save space, clocks beeing unlikely usefull for bootloader purposes
(SSI, SPDIF, EXTERN_AUDIO) were not imported.
Further, the fixup code from linux mainline commits
a49e6c4b8204 ("ARM: imx: add common clock support for fixup mux")
cbe7fc8aaeef ("ARM: imx: add common clock support for fixup div")
was ignored for this commit.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-02 08:13:07 +01:00
Andrey Smirnov 45e9299b8f spi: i.MX: Add driver for DSPI
Add driver for DSPI - SPI IP core found on various Freescale/NXP
products (including Vybrid/VF610).

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-30 08:09:39 +01:00
Peter Mamonov 6d205422e5 usb: ehci: pass full speed devices to companion controller
According to the "Enhanced Host Controller Interface Specification for
Universal Serial Bus" after a USB port reset the EHCI Driver checks the
PortEnable bit in the PORTSC register. If set to a one, the connected device is
a high-speed device [...]. At the time the EHCI Driver receives the port reset
and enable request the LineStatus bits might indicate a low-speed device.
Additionally, when the port reset process is complete, the PortEnable field may
indicate that a full-speed device is attached. In either case the EHCI driver
sets the PortOwner bit in the PORTSC register to a one to release port
ownership to a companion host controller.

Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-30 07:29:02 +01:00
Peter Mamonov db791c7fb2 mtd: spi-nor: add support for s25fl208k
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-30 07:27:11 +01:00
Alexander Kurz e0d4355b4b ARM i.MX31 clk: add pll_ref_clk and MCU PLL bypass select
The three MX31 PLL may be clocked from either CKIH or a frequency-multiplied
derivate of CKIL generated by the Frequency Pre Multiplier FPM.

Add the pll_ref_clk selection infrastructure and support for MCU PLL bypass
to support clock switching and boards not clocked CKIH.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-26 08:00:06 +01:00
Michael Olbrich 23a90fe3d7 serial: efi: improve input handling
0x08 is the scan-code for 'backspace' not 'delete'.
0x17 indicates the start of an escape sequence, such as "[3~" for
'delete'.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-24 09:34:11 +01:00
Andrey Gusakov 280c65107c video: tc358767: add copyright lines
Add copyright lines for Zodiac who paid for driver development.

Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-20 09:10:31 +01:00
Sascha Hauer 25342f997f regulator: Add pfuze driver
This is not yet a regulator driver, only the register map is
exported as /dev/pfuze* so the registers can be accessed for
debugging purposes.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-20 09:10:31 +01:00
Juergen Borleis 99a464413e pinmmux: i.MX: add pin mux support for i.MX7
Signed-off-by Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-20 09:10:30 +01:00
Sascha Hauer 043bc98c4b watchdog: i.MX: Fix internal/external reset
The watchdog can either reset only the SoC or assert the WDOG_B
output signal instead. On some boards it's necessary to use the
external WDOG_B output to make sure that external devices like the
PMIC are also properly resetted. This has been fixed in the Linux
driver which honours a fsl,ext-reset-output device tree property
to select between both ways. Do the same in the barebox driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-20 09:10:30 +01:00
Sascha Hauer aadb845958 watchdog: i.MX: add soc_reset operation
On i.MX21 watchdog type the reset operation is really different
from the watchdog enable/set timeout operation, so create an
extra callback for this instead of folding both things together.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-20 09:10:30 +01:00
Juergen Borleis 626408b487 serial: i.MX: add i.MX7 support
Signed-off-by Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-19 16:25:54 +01:00
Sascha Hauer f5af044cf0 clk: i.MX7: Add missing USB clocks
The USB clocks are missing in the Kernel clock code. Add them here.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-19 15:23:10 +01:00
Juergen Borleis fdd14bde52 clk: i.MX: Add clock support for i.MX7
Signed-off-by Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-19 15:23:04 +01:00
Sascha Hauer 9a89ed9d28 clk: imx: Add clk-cpu support
Taken from the kernel as of 4.10-rc3. Needed for i.MX7

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-19 15:22:59 +01:00
Sascha Hauer 0ada0c03af clk: i.MX: pllv3: Add support for the i.MX7 enet pll
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-19 15:22:45 +01:00
Sascha Hauer cf6b508794 mci: imx-esdhci: remove wrong write protection test
Testing for the write protection bit to determine if a card is write
protected or not is wrong. The bit may have the wrong value for
permanently plugged cards (eMMC) or for boards using a GPIO for
write protection detection.
Since the core will test for write protection before actually
calling into the driver this test can just be removed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-19 15:21:40 +01:00
Sascha Hauer 6e9a87b394 mci: Allow to partition eMMC boot partitions
So far the eMMC boot partitions cannot be partitioned from the
device tree. Since they are often 4MiB in size they are big enough
to hold a barebox image and the environment. Add partition parsing
to the boot partitions to allow this usecase.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-19 15:21:33 +01:00
Sascha Hauer 32da9097e7 of: partitions: force "partitions" subnode
The binding states that a subnode containing partition subnodes
should have the name "partitions". Enforce this so that we do not
parse nodes with other names which may have partition descriptions
for other disks.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-19 15:21:29 +01:00
Sascha Hauer 1b3fde3983 phy: usb-nop-xceiv: Add clock support
As stated in the FIXME comment this is needed. Get and
enable a "main_clk" just like the kernel does.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-19 15:21:21 +01:00
Sascha Hauer bbe0df90b8 usb: imx: Add clock support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-19 15:21:14 +01:00
Sascha Hauer 2eb99b610b usb: imx: Add usbmisc support for i.MX7
Taken directly from Linux-4.10-rc3

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-19 15:20:50 +01:00
Sascha Hauer fc10539f7d usb: imx: Make usb-misc multi instance safe
i.MX7 has two usbmisc devices, so we cannot use global instance
variables anymore. Create a driver private data struct for it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-19 15:16:30 +01:00
Sascha Hauer 1bcd04831e serial: i.MX: Enable clock
For architectures which do not enable all clocks during initialization.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-19 15:16:25 +01:00
Sascha Hauer 61c6c24958 mci: imx-esdhc: Enable clock
For architectures which do not enable all clocks during initialization.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-19 15:16:21 +01:00
Sascha Hauer 27940deb9a i2c: i.MX: Enable clock
For architectures which do not enable all clocks during initialization.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-19 15:16:15 +01:00
Uwe Kleine-König 55d2952514 ata: ide-sff: don't call free for ide_port in error path
The ide_port is provided by the caller so it's not in the responsibility
of this function to free this memory in case of error.
Actually all callers do the free themselves, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-18 12:01:38 +01:00
Lucas Stach 3cfc8bc9f3 usb: gadget: disable AT91 driver on SAMA5D4
This architecture is missing the right defines for the system
peripherals, that are needed for this driver to build successfully.

Disable it for now until someone with a clue about this architecture
can fill in the gap.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-17 07:58:09 +01:00
Uwe Kleine-König ed6620e7e2 bus: mvebu-mbus: fixup correct device tree
When booting with an external device tree this external tree must
be adapted, not the internal tree again.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-17 07:56:27 +01:00
Ian Abbott 90abfd3fba of_path: only handle no driver for device if it is on a bus
This fixes a regression in __of_find_path() for flash devices created by
the cadence-quadspi driver, which do not have 'dev->driver' set.  Such
devices do not have 'dev->bus' set either, so we can use that to qualify
the existing test.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-13 08:35:12 +01:00
Uwe Kleine-König 2a2ee7aafa net/phy: marvell: add support for 88e1510 to marvell phy driver
This is mostly copied verbatim from the Linux driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-13 07:54:10 +01:00
Uwe Kleine-König ebfd737bf9 net/phy: marvell: improve config_aneg for 88E1121R and 88E1318S
This is taken from the Linux driver

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-13 07:54:10 +01:00
Uwe Kleine-König 3fd488a720 net/phy: marvell: align definition of MII_88E1121_PHY_MSCR to Linux driver
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-13 07:54:10 +01:00
Uwe Kleine-König a1bfa62c20 net/phy: marvell: change spacing to be more similar to the Linux driver
To make the barebox driver more similar to the Linux driver, only use a
single space before the = in member initialisation.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-13 07:54:10 +01:00
Uwe Kleine-König 21b30a2009 net/phy: marvell: rename phy_driver array to match Linux driver
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-13 07:54:10 +01:00
Uwe Kleine-König db4b34e771 net/phy: marvell: 88E1540 LED registers already exist on 88E1121
So rename accordingly to match the definition used by Linux

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-13 07:54:10 +01:00
Uwe Kleine-König 4878ad3512 net/phy: marvell: rename 88E1545 to 88E1540
The Linux driver calls it 88E1540 so do it here, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-13 07:54:10 +01:00
Andrey Smirnov 8108b5a81b i.MX: imx-usb-misc: Add Vybrid support
Add code to do usbmisc initialization on VF610 family of SoCs. Based on
analogous code from Linux kernel.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-12 07:42:33 +01:00
Andrey Smirnov 024f720adc i.MX: Default CONFIG_USB_IMX_PHY to 'y' on Vybrid
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-12 07:42:33 +01:00
Andrey Smirnov 91bfa2dca0 i.MX: imx-usb-phy: Add VF610 OF compatiblity string
From looking at analogous Linux driver code it seems that all of the
differences between code "imx23-usbphy" and "vf610-usbphy" pertain to
suspend/resume functionality, which shouldn't affetct Barebox. As a
result this commit just adds a compatiblity string and no other code.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-12 07:42:32 +01:00
Andrey Smirnov 5d296b98ea i.MX: vf610: Add low-level pin configuration helper
Add low-level pin configuration helper for early boot code, and convert
pinctrl driver to use that code as well.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-12 07:42:32 +01:00
Andrey Smirnov 094820a63b i.MX: iomuxv3: Use helper functions in iomux-v3.h
Avoid code duplication by using helper functions from iomux-v3.h

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-12 07:42:32 +01:00
Andrey Smirnov 21921f7f41 i.MX: vf610: Ramp CPU clock to maximum frequency
Mask ROM leaves the CPU running at 264Mhz, so configure the clock tree
such that CPU runs at maximum supported frequency. Maximum supported
frequncy is determined from speed grading burned into OCOTP fusebox by
the vendor.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-12 07:40:01 +01:00
Andrey Smirnov 7a8d295cdf i.MX: clk: Add IMX_PLLV3_SYS_VF610 subtype
Add IMX_PLLV3_SYS_VF610 subtype to pllv3 code to be able to control and
re-clock PLL1 and PLL2 on Vybrid SoC. This commit also introduces
imx_clk_pllv3_locked which allows the user to create PLLv3 and specify
how it should be polled for "locked" status (used in .set_rate callback)

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-12 07:40:00 +01:00
Andrey Smirnov a97345102e i.MX: esdhc: Enable host->clk during initialization
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-12 07:40:00 +01:00
Sascha Hauer dcedcec375 Merge branch 'for-next/vybrid' 2017-01-12 07:13:47 +01:00
Sascha Hauer 08c62ae2fa Merge branch 'for-next/truncate' 2017-01-11 19:00:04 +01:00
Sascha Hauer 917225203f Merge branch 'for-next/mvebu' 2017-01-11 19:00:04 +01:00
Sascha Hauer e05529dd8b Merge branch 'for-next/misc' 2017-01-11 19:00:03 +01:00
Sascha Hauer 0c3f4d1da2 Merge branch 'for-next/imx' 2017-01-11 19:00:03 +01:00
Sascha Hauer 005a81e173 Merge branch 'for-next/i2c' 2017-01-11 19:00:02 +01:00
Andrey Smirnov 1b2cc689fc gpio: Add GPIO driver for Vybrid
Add GPIO driver for VF610 Family of SoCs (based on analogous driver from
Linux kernel)

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-11 08:07:00 +01:00
Andrey Smirnov 882703195f i.MX: fec: Add support for Vybrid variant
Add support for Vybrid variant of this IP block

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-11 08:07:00 +01:00
Andrey Smirnov 2de277264c i.MX: fec: Enable all clocks specified for FEC
For some i.MX variants more than just "ipg" clock need to be enabled for
Ethernet to function, so change the code to enable all of the clock
defined for FEC node (this is what analogous Linux driver does as well).

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-11 08:07:00 +01:00