9
0
Fork 0
Commit Graph

15322 Commits

Author SHA1 Message Date
Uwe Kleine-König 08dd5af735 of: provide for_each_matching_node_from
This is for_each_matching_node for a given root similar to the other
..._from functions.

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
Enrico Jorns e1e8656a7d bootm: fix magicvar name for global_bootm_verbose
Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-16 08:14:42 +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
Jan Luebbe 4f836c3c3c bootchooser: fix help message
The descriptions of -a and -p were mismatched.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-13 08:28:32 +01:00
Vicente Bergas 2e372b80ad scripts/omap4_usbboot: use libusb
Signed-off-by: Vicente Bergas <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-13 07:56:44 +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 da4801f3e8 i.MX: vf610-twr: Remove MSCM setup code
Recent kernel versions should have appropriate driver code that sets up
interrupt rounting correctly, so there's no need for that to be done in
the bootloader.

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 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 69dbc8b565 i.MX: iomux-vf610: Add missing pad definitions
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 72a4361482 i.MX6: sabresd: Remove magic numbers in setup_uart
Remove magic numbers in setup_uart and replace them with calls to
iomuxv3 helper functions.

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 107d6954a6 i.MX: iomuxv3: Add low-level pad configuration routine
Add low-level pad configuration routine that can be used by early boot
code as well as leveraged by pinmux driver.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-12 07:42:29 +01:00
Andrey Smirnov 17a112fe72 i.MX: iomuxv3: Add helper macros to deconstruct iomux_v3_cfg_t values
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 b2282c18a4 i.MX: iomuxv3: Add low-level pad code to headers
Add a basic low-level pad configuration function that can be used to
implement early boot pin configuration code as well as shared with
various iomuxv3 and vf610 drivers.

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 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 75e9819823 i.MX: Add fusemap for VF610
Add fusemap header for VF610 and move out fuse definitions that are
shared with i.MX6 familiy into a sperate file (ocotp-fusemap.h).

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 189f29c7d8 i.MX: imx6-fusemap: Fix SJC_RESP_LOCK width
According to the datasheet SJC_RESP_LOCK is one bit wide, adjust the
definition correspondingly.

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 afaf9bf09f i.MX: ocotp: Add imx_ocotp_sense_enable()
Add imx_ocotp_sense_enable() function to allow changing that aspect of
OCOTP driver behaviour before calling imx_ocotp_read_field()

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 390f49096e i.MX: ocotp: Initialize OCOTP as early as possible
On Vybrid SoC OCOTP module contains speed grading information that is
needed to correctly adjust CPU clock to its maxumum rate, so we need to
have this information handy as early as possible.

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 75b6972be4 i.MX: ocotp: Add provisions for storing multiple MAC addresses
i.MX SoC variants like Vybrid have more than one built-in Ethernet
interface and as a consequence support storing more than one MAC address
in OCOTP module. Add code to create multiple 'mac_addr<n>' parameters as
well as 'mac_addr' as an "alias" to 'mac_addr0' for backwards
compatibility.

Acked-by: Stefan Lengfeld <s.lengfeld@phytec.de>
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 f36c383bcc i.MX: ocotp: Move memory reversing into a subroutine
Move memory reversing, found in imx_ocotp_get_mac and
imx_ocotp_set_mac, into a subroutine to avoid code duplication.

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
Sascha Hauer 4c46707809 Merge branch 'for-next/dts' 2017-01-11 18:59:57 +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
Andrey Smirnov e8371faca1 i.MX: ocotp: Add Vybrid support
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 278a35ffcb i.MX: ocotp: Account for shadow memory gaps
Shadow memory does not have a true 1:1 mapping to fuse address
space. All i.MX6 devices, with exception of i.MX6SL have a 0x100 byte
gap between banks 5 and 6 (or addresses 0x2f and 0x30), so we need to
account for that when reading data from shadow memory.

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 a44efbc983 i.MX: ocotp: Remove unused #define
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 69c436e0ee i.MX: Kconfig: Enable OCOTP on Vybrid
Enable OCOTP driver on Vybrid as well as i.MX6

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 05f625a9e1 i.MX: esdhc: Request "per" clock explicitly
Calling clk_get() with NULL as the second argument will give us "ipg"
clock as a result. The actual clock feeding into the peripheral is "per"
and, depending on the SoC, "ipg" and "per" may be separated by a clock
divider, so querying "ipg"'s rate may not result in rate that does not
represent the actual peripheral clock rate.

Change the code to request "per" as our peripheral clock to avoid
aforementioned problem.

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 39f7a7ee8b i.MX: esdhc: Do not rely on CPU type for quirks
CPU type is not a reliable indicator of the underlying type of IP core
used, since there's no 1:1 mapping between the two. As example of one
such violation consider Vybrid SoC which contains IP block from i.MX53.

Instead port feature flags from corresponding Linux kernel driver and
use the ones that are relevant.

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 4ed5b778a5 i.MX: i2c: Add Vybrid support
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 a6cf6b3ff0 i.MX: i2c: Use read/write adapter functions
Use read/write adapter functions instead of directly calling to
readb/writeb. This is needed to prepare driver code to support Vybrid
SoC's variant of this 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