History log of /rk3399_rockchip-uboot/drivers/spi/rk_spi.c (Results 1 – 25 of 37)
Revision Date Author Comments
# b7cc8342 26-Aug-2022 Jon Lin <jon.lin@rock-chips.com>

spi: rockchip: Add quirks for px30

Change-Id: Iff8282d371e1ffc51101ea814dfbb0413de6c1d5
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>


# 7d984abe 26-Aug-2022 Jon Lin <jon.lin@rock-chips.com>

spi: rockchip: Add quirks for controller workaround

Change-Id: I5aed76f9ccf1799be228a7f4dce0f6cad2af0f11
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>


# 941111f2 13-Jul-2022 Jon Lin <jon.lin@rock-chips.com>

spi: rk_spi: Do not output data in RO mode

Change-Id: I9a631c3d36246264ca8b9974572830aaa031a6de
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>


# 64993c87 26-Nov-2021 Jon Lin <jon.lin@rock-chips.com>

spi: rk_spi: Support rx sample delay

Adding a number of spi_clk cycles delay for rx sample.

Change-Id: I4b5e71f1d5d11a085cf54eafd4299b0ca290b642
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>


# 81a1596c 15-Nov-2021 Jon Lin <jon.lin@rock-chips.com>

rockchip: drivers: spi: Support read only

Change-Id: Ib99db168d9ba3566c9e038986af202023a4a5daa
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>


# 1a4f6af8 02-Mar-2020 Joseph Chen <chenjh@rock-chips.com>

Merge branch 'next-dev' into thunder-boot


# 08ab3f3c 23-Oct-2019 Yifeng Zhao <zyf@rock-chips.com>

rockchip: drivers: spi: add compatible info for rk3328 and rk3066

Change-Id: I9ffda6e902f1639f90c5383ed4df5fc8aad11c70
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>


# 204b4e68 12-Nov-2017 Heinrich Schuchardt <xypron.glpk@gmx.de>

UPSTREAM: rockchip: spi: the symbol for Hertz is Hz

fix typo

Change-Id: If467ba2cb4d16a4844400e9046e851ab0b96a4de
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Philipp Tomsich <

UPSTREAM: rockchip: spi: the symbol for Hertz is Hz

fix typo

Change-Id: If467ba2cb4d16a4844400e9046e851ab0b96a4de
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 11f12c17d72499292f6e219ebbf8062faedcc5bb)

show more ...


# a9db6e69 11-Sep-2017 Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

UPSTREAM: rockchip: spi: Convert to livetree

Update the Rockchip SPI driver to support a live device tree.

Change-Id: Ib54a4e52ed7177f342aafdca1c6bc1ddc0b76eaa
Signed-off-by: Philipp Tomsich <phili

UPSTREAM: rockchip: spi: Convert to livetree

Update the Rockchip SPI driver to support a live device tree.

Change-Id: Ib54a4e52ed7177f342aafdca1c6bc1ddc0b76eaa
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit d27c273908c3ca534093e93d7730fc55973a02bc)

show more ...


# c1b62ba9 14-Aug-2017 Tom Rini <trini@konsulko.com>

Merge branch 'master' of git://git.denx.de/u-boot-rockchip


# d16120a6 25-Jul-2017 Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

rockchip: spi: enable support for the rk_spi driver for the RK3368

For the RK3368, we can reuse the SPI driver (although we'll have to
eventually investigate whether it can be merged with the
design

rockchip: spi: enable support for the rk_spi driver for the RK3368

For the RK3368, we can reuse the SPI driver (although we'll have to
eventually investigate whether it can be merged with the
designware_spi.c driver) also used for the RK3288 and RK3399.
This adds the necessary compatible string to support the RK3368.

Note that the assumption that GPLL will be clocked at 594MHz is not
true for the RK3368, but this will not lead to incorrect functioning
(just to a lower-than-expected SPI operating frequency): this has been
documented in the driver, so it doesn't cause any headaches when
someone next needs to touch the clock code of this driver.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

show more ...


# d43ef73b 11-Jul-2017 Tom Rini <trini@konsulko.com>

Merge branch 'master' of git://git.denx.de/u-boot-rockchip


# 6c65577c 07-Jun-2017 Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

rockchip: spi: dm: convert fdt_get to dev_read

With the new dev_read functions available, we can convert the rockchip
architecture-specific drivers and common drivers used by these devices
over to t

rockchip: spi: dm: convert fdt_get to dev_read

With the new dev_read functions available, we can convert the rockchip
architecture-specific drivers and common drivers used by these devices
over to the dev_read family of calls.

This change covers the rk_spi.c (SPI driver) used in Rockchip devices.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

show more ...


# a821c4af 17-May-2017 Simon Glass <sjg@chromium.org>

dm: Rename dev_addr..() functions

These support the flat device tree. We want to use the dev_read_..()
prefix for functions that support both flat tree and live tree. So rename
the existing function

dm: Rename dev_addr..() functions

These support the flat device tree. We want to use the dev_read_..()
prefix for functions that support both flat tree and live tree. So rename
the existing functions to avoid confusion.

In the end we will have:

1. dev_read_addr...() - works on devices, supports flat/live tree
2. devfdt_get_addr...() - current functions, flat tree only
3. of_get_address() etc. - new functions, live tree only

All drivers will be written to use 1. That function will in turn call
either 2 or 3 depending on whether the flat or live tree is in use.

Note this involves changing some dead code - the imx_lpi2c.c file.

Signed-off-by: Simon Glass <sjg@chromium.org>

show more ...


# 1f5541c8 10-May-2017 Tom Rini <trini@konsulko.com>

Merge git://git.denx.de/u-boot-rockchip

This adds a new firefly-rk3399 board, MIPI support for rk3399 and
rk3288, rk818 pmic support, mkimage improvements for rockchip and a few
other things.


# cdeb4d78 20-Apr-2017 Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>

rockchip: spi: enable support for the rk_spi driver for the RK3399

The existing Rockchip SPI (rk_spi.c) driver also matches the hardware
block found in the RK3399. This has been confirmed both with

rockchip: spi: enable support for the rk_spi driver for the RK3399

The existing Rockchip SPI (rk_spi.c) driver also matches the hardware
block found in the RK3399. This has been confirmed both with SPI NOR
flashes and general SPI transfers on the RK3399-Q7 for SPI1 and SPI5.

This change adds the 'rockchip,rk3399-spi' string to its compatible
list to allow reuse of the existing driver.

X-AffectedPlatforms: RK3399-Q7
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
Acked-by: Simon Glass <sjg@chromium.org>

show more ...


# 9fc354e2 20-Apr-2017 Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

rockchip: spi: rewrite rkspi_set_clk for a more conservative baudrate setting

The baudrate in rkspi was calculated by using an integer division
(which implicitly discarded any fractional result), th

rockchip: spi: rewrite rkspi_set_clk for a more conservative baudrate setting

The baudrate in rkspi was calculated by using an integer division
(which implicitly discarded any fractional result), then rounding to
an even number and finally clamping to 0xfffe using a bitwise AND
operator. This introduced two issues:
1) for very small baudrates (overflowing the 0xfffe range), the
bitwise-AND generates rather random-looking (wildly varying)
actual output bitrates
2) for higher baudrates, the calculation tends to 'err towards a
higher baudrate' with the actual error increasing as the dividers
become very small. E.g., with a 99MHz input clock, a request
for a 20MBit baudrate (99/20 = 4.95), a 24.75 MBit would be use
(which amounts to a 23.75% error)... for a 34 MBit request this
would be an actual outbout of 49.5 Mbit (i.e. a 45% error).

This change rewrites the divider selection (i.e. baudrate calculation)
by making sure that
a) for the normal case: the largest representable baudrate below the
requested rate will be chosen;
b) for the denormal case (i.e. when the divider can no longer be
represented), the lowest representable baudrate is chosen.

Even though the denormal case (b) may be of little concern in real
world applications (even with a 198MHz input clock, this will only
happen at below approx. 3kHz/3kBit), our board-verification team kept
complaining.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Klaus Goger <klaus.goger@theobroma-systems.com>

show more ...


# bd376714 20-Apr-2017 Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

rockchip: spi: rk_spi: dynamically select an module input rate

The original clock/bitrate selection code for the rk_spi driver was a
bit limited, as it always selected a 99MHz input clock rate (whic

rockchip: spi: rk_spi: dynamically select an module input rate

The original clock/bitrate selection code for the rk_spi driver was a
bit limited, as it always selected a 99MHz input clock rate (which
would allow for a maximum bitrate of 49.5MBit/s), but returned -EINVAL
if a bitrate higher than 48MHz was requested.

To give us better control over the bitrate (i.e. add more operating
points, especially at "higher" bitrate---such as above 9MBit/s), we
try to choose 4x the maximum frequency (clamped to 50MBit) from the
DTS instead of 99MHz... for most use-cases this will yield a frequency
of 198MHz, but is flexible to go beyond this in future configurations.

This also rewrites the check to allow frequencies of up to half the
SPI module rate as bitrates and then clamps to whatever the DTS allows
as a maximum (board-specific) frequency and does away with the -EINVAL
when trying to select a bitrate (for cases that exceeded the hard
limit) and instead consistently clamps to the lower of the hard limit,
the soft limit for the SPI bus (from the DTS) or the soft limit for
the SPI slave device.

This replaces
"rockchip: spi: rk_spi: select 198MHz input to the SPI module for the RK3399"
"rockchip: spi: rk_spi: improve clocking code for the RK3399"
from earlier versions of this series.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

show more ...


# 21342d4a 08-Feb-2017 Tom Rini <trini@konsulko.com>

Merge git://git.denx.de/u-boot-dm


# e160f7d4 17-Jan-2017 Simon Glass <sjg@chromium.org>

dm: core: Replace of_offset with accessor

At present devices use a simple integer offset to record the device tree
node associated with the device. In preparation for supporting a live
device tree,

dm: core: Replace of_offset with accessor

At present devices use a simple integer offset to record the device tree
node associated with the device. In preparation for supporting a live
device tree, which uses a node pointer instead, refactor existing code to
access this field through an inline function.

Signed-off-by: Simon Glass <sjg@chromium.org>

show more ...


# 2d221489 29-Nov-2016 Stefano Babic <sbabic@denx.de>

Merge branch 'master' of git://git.denx.de/u-boot

Signed-off-by: Stefano Babic <sbabic@denx.de>


# 8d089854 26-Nov-2016 Tom Rini <trini@konsulko.com>

Merge git://git.denx.de/u-boot-rockchip


# b4252474 13-Nov-2016 Simon Glass <sjg@chromium.org>

rockchip: spi: Honour the deactivation delay

This is not currently implemented. Add support for this so that the Chrome
OS EC can be used on jerry.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 6e019c4f 13-Nov-2016 Simon Glass <sjg@chromium.org>

rockchip: spi: Add support for of-platdata

Allow this driver to be used with of-platdata on rk3288.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1221ce45 21-Sep-2016 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: replace #include <asm/errno.h> with <linux/errno.h>

Now, arch/${ARCH}/include/asm/errno.h and include/linux/errno.h have
the same content. (both just wrap <asm-generic/errno.h>)

Replace

treewide: replace #include <asm/errno.h> with <linux/errno.h>

Now, arch/${ARCH}/include/asm/errno.h and include/linux/errno.h have
the same content. (both just wrap <asm-generic/errno.h>)

Replace all include directives for <asm/errno.h> with <linux/errno.h>.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[trini: Fixup include/clk.]
Signed-off-by: Tom Rini <trini@konsulko.com>

show more ...


12