Commit Graph

54469 Commits

Author SHA1 Message Date
Lukasz Majewski
b6a6238f04 Revert "dm: pinctrl: Prevent (re-)configuring pins when already done before relocation"
This reverts commit a7f4b4b344.

As reported by Alex Kiernan the above optimization introduces a
regression in the below use case where:

1. Device has defined 'u-boot,dm-spl' property (@ eMMC DTS node)

2. The device downloads its MLO/SPL via UART (not eMMC - the eMMC pinmux
pins are NOT probed/configured in MLO/SPL).

3. The loaded via UART MLO/SPL wants to load Linux from eMMC. In this case
the DM core and pinctrl uclass checks 'u-boot,dm-spl' and don't
configure pins (as it thinks that those were initialized in MLO/SPL).

As we are very close to release - please revert this commit.

Reported-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2019-01-11 10:03:42 -05:00
Tom Rini
64abfc9b6b Merge branch 'master' of git://git.denx.de/u-boot-sunxi 2019-01-10 09:28:28 -05:00
Tom Rini
e5aa3f4d97 Fixes for 2019.01
-----BEGIN PGP SIGNATURE-----
 
 iQHDBAABCgAtFiEEiZClFGvhzbUNsmAvKMTY0yrV63cFAlw2/EgPHHNiYWJpY0Bk
 ZW54LmRlAAoJECjE2NMq1et32w4MAInrLv5lIvzwlcCxsX25cbWO8TSRemt4Stbl
 g01Cq/yaHkTs/VTpHHqtuAy+PHBx6pFSIJNp8zheNy/VGMHavb+RSVH3d+KM6uU3
 qCfVQq3ZMm4NyvbnrJSW6Uu2qmmEJQssldWuRhIIEFK1nCrYKQp9eyo215miLbFE
 9b1MWFO+XV0Qz+HZQsk2ApiuvmaXu3qpvZ0tRRi9xb2dGJYYTuEcfvbehy7Iejta
 +JKd3wtZaKj1JDdsDFQoJs55OAdJySTSYAeNVzlstQ+1fYArB3Ju4et2QInWbXuF
 x/NdFAzyAtl4xOf8yQ9kbALa3TlofhPu9fJm7bniC3hf+ZPPwdS3jlvEy+DeCJIU
 tX/es+WgUVciiCfRHXS1RgFuHGDDpO5qi2RjSLqq6yRhlBAvXYhET2YCU9RLoLHY
 D57V6lkFl7jWto8xS7GoicKvGPS5MwjARw917TSocJzhJz86PeJBhOW6tR+E2/Zh
 kCDDCrKlyuLRg+2/eFV5H91TalwjQQ==
 =vYKZ
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-imx-20190110' of git://git.denx.de/u-boot-imx

Fixes for 2019.01
2019-01-10 09:28:16 -05:00
Jagan Teki
e8f37f4203 mmc: sunxi: Fix mmc clocks for DM_MMC
Existing clock configure code has been followed based on the
legacy MMC dt node definitions and it cannot work with recent
dts(i) sync from Linux.

So, add clock configure code for Allwinner platforms which support
DM_MMC and eventually this will drop once CLK support is in Mainline.

Fixes: 3c92cca3cd ("ARM: dts: sun4i: Update A10 dts(i) files from Linux-v4.18-rc3")
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Priit Laes <plaes@plaes.org> # Gemei G9 A10 Tablet
Tested-by: Marek Kraus <gamelasterv2@gmail.com> # A10-OLinuXino-Lime
2019-01-10 14:45:15 +05:30
Tom Rini
43a6a1ec90 Merge branch '2019-01-08-master-imports'
- stm32f7 GPIO fixes
- SATA env fixes
- More DM migration deadline warnings
- Regression fix for non-DM MMC drivers
- dma_alloc_coherent size fix on ARM.
2019-01-09 16:02:29 -05:00
Fabio Estevam
d4a0c09892 imx8m: clock: Fix oscillator values
OSC_27M_CLK should return 27MHz and OSC_32K_CLK should return
32768Hz to reflect the reality.

This also keeps the values in sync with the Linux clock tree.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
2019-01-09 17:10:30 +01:00
Peng Fan
f7e475db40 tools: imx8image: set dcd_skip to true
To B0[+] chips, dcd_skip needs to be true. For A0 chip, it needs
to be false, however A0 chip is no longer being supported anymore.
Considering we are moving code from imx-mkimage to uboot mkimage,
to make sure we not introduce some surprise, we still keep dcd_skip
code there.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-01-09 17:04:34 +01:00
Peng Fan
da72574b21 imx8: cpu: correct info
The CPU banner printed is as following:
CPU:   CPU:   Freescale i.MX8QXP RevB A35 at 147228 MHz

1. Drop the CPU:
2. Change vendor from Freescale to NXP

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-01-09 17:04:17 +01:00
Peng Fan
026381fc5a misc: imx8: scu: use platdata instead of priv data
priv data has not been allocated when doing bind, so it is
wrong to use dev_get_priv in bind call back.

Let's switch to use platdata in the driver to fix the issue.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2019-01-09 17:04:03 +01:00
Peng Fan
ecab65e4cd misc: imx: scu: avoid write null pointer
When boot_dev is true, fill boot device. However the original logic is when
boot_dev is false, fill boot device, this will trigger data abort.

Also fix sc_misc_get_control when using pointer val.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-01-09 17:03:45 +01:00
Peng Fan
224f745247 clk: imx8: fix build warning
When build clk driver in spl, met the warning:
"
drivers/clk/imx/clk-imx8.c:21:25: warning: ‘imx8_clk_names’ defined but not used [-Wunused-variable]
 static struct imx8_clks imx8_clk_names[] = {
                         ^~~~~~~~~~~~~~
"

Fix with wrapping the array with CONFIG_CMD_CLK.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-01-09 17:03:29 +01:00
Peng Fan
d17b0bedbf MAINTAINERS: update NXP i.MX mail list address
Update NXP i.MX mail list address

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-01-09 17:02:17 +01:00
Soeren Moch
72bc93e1ef board: tbs2910: Remove FIT support in defconfig to reduce u-boot size
The current defconfig build generates a u-boot.imx file that is too large
for the available space on a eMMC/SD card. Installing this file overwrites
the u-boot environment. So disable the unused FIT support to reduce the
size of the u-boot binary.

Signed-off-by: Soeren Moch <smoch@web.de>
2019-01-09 16:55:58 +01:00
Soeren Moch
b82c7c32ef board: tbs2910: Add u-boot.imx size limit check
Check the size of the generated u-boot.imx file. Report an error
if it would be too big and overwrite the u-boot environment.

Signed-off-by: Soeren Moch <smoch@web.de>
2019-01-09 16:55:42 +01:00
Chris Spencer
e3bc7c668f imx: Add Makefile dependency for mkimage_fit_atf.sh
The mkimage_fit_atf.sh SPL FIT generator script requires
u-boot-nodtb.bin, but this was not enforced by the Makefile. This could
cause the generator script to be executed before u-boot-nodtb.bin has
been created.

Signed-off-by: Chris Spencer <christopher.spencer@sea.co.uk>
Cc: NXP i.MX U-Boot Team <uboot-imx@nxp.com>
2019-01-09 16:53:53 +01:00
Marek Vasut
bf413781cf arm: mx5: Enable WDT and bootcounter on M53Menlo
Enable watchdog and bootcounter support on the M53Menlo board.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
2019-01-09 16:50:03 +01:00
Stefan Agner
81653478eb ARM: vf610: ddrmc: do not write CR79 by default
The current value CTLUPD_AREF(0) is the reset value of the register,
so there is no need to write a value. If needed, the register can be
written using board specific CR settings.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
2019-01-09 16:27:39 +01:00
Stefan Agner
52c2c97e7c ARM: vf610: ddrmc: fix initialization completion detection
The CR80 register has multiple interrupt bits, the code is supposed
to check bit 8 but instead uses a logical and. In most cases this
probably did not affect real operations since at that stage typically
none of the other bits are set.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2019-01-09 16:27:23 +01:00
Stefan Agner
b77e368fa2 ARM: vf610: ddrmc: fix CR138 preprocessor define
According to the data sheet bits 10-8 are PHYDRAM_CK_EN. Fix mask
to allow setting PHYDRAM_CK_EN correctly.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
2019-01-09 16:27:08 +01:00
Stefan Agner
fb41ce0db0 toradex: colibri_vf: fix memory initialization
Commit 3f353ceccb ("vf610: refactor DDRMC code") changed on-die
termination (ODT) values from 120 Ohm to 60 Ohm and enabled a static
read/write leveling which has not been tested with this board. This
commit reverts both changes and makes sure that memory gets
initialized as it has been done before the mentioned commit.

Fixes: 3f353ceccb ("vf610: refactor DDRMC code")
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2019-01-09 16:26:50 +01:00
Stefan Agner
a95d444055 ARM: vf610: ddrmc: program Dummy DDRBYTE1/2
The Vybrid reference manual VFXXXRM Rev. 0 10/2016 states in chapter
5.2.6.1 DUMMY PADS (DDR/QuadSPI) that those pads need to be programed
for correct operation of DDR. Assume the default DDR pin configuration
which seems to work well on a Colibri VF50.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2019-01-09 16:19:36 +01:00
Stefan Agner
a1f2779f51 board: toradex: colibri_vf: unset NFS and LOADS/B
Safe some space by not selecting CMD_NFS and CMD_LOADS/B.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
2019-01-09 16:18:19 +01:00
Patrice Chotard
4fb224638d gpio: stm32f7: Fix SPL code size
In order to keep SPL code size below the 32Kb limit,
put under CONFIG_SPL_BUILD flag all unused code in SPL.
This is needed for stm32f7xx board which are using SPL.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-01-09 07:13:33 -05:00
Patrice Chotard
39a8f0be2d gpio: stm32f7: Fix gpio bank hole management
In case "gpio-ranges" property is not present in device tree,
use default value for gpio_count and gpio_range.
This fixes an issue on stm32 F7 and H7 boards where "pinmux status -a"
command didn't return any pin status due to the fact that both stm32 F7
and H7 board DT doesn't use the gpio-ranges property.

Fixes: dbf928dd2634a6("gpio: stm32f7: Add gpio bank holes management")

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-01-09 07:13:32 -05:00
Ye Li
17be909a1b env: sata: Fix saveenv issue
Wrong env buffer was passed into sata write function, cause the saveenv
not work.

Signed-off-by: Ye Li <ye.li@nxp.com>
2019-01-09 07:13:32 -05:00
Sam Protsenko
35e3d2e8a3 arm: ti: boot: Remove legacy Android partitions
Remove unused Android partitions:
  - efs, crypto, cache: we don't use it anymore (images are not built
    in AOSP
  - ipu1, ipu2: IPU firmware is now a part of vendor image and doesn't
    reside as a separate partition

While at it, rename "reserved" partition to "uboot-env", as it's
actually stores U-Boot environment.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2019-01-09 07:13:32 -05:00
Ye Li
9a6a311d2b env: sata: Add missed env location for SATA boot
The env location label ENVL_ESATA is missed in location tables, so
when we configure the ENV in SATA, u-boot fails to get correct env
location and cause boot hang in board_f.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-01-09 07:13:32 -05:00
Ye Li
9d47d1316d arm: Round the dma_alloc_coherent memory size to cache line aligned
When running usb dwc3 gadget driver, we meet random USB enumeration failure in fastboot.
The root cause is a cache coherence issue. When it happens, the ctrl_req in
gadget driver is allocated at 0xfe932f40, and the usb_composite_dev (cdev)
is allocated at 0xfe932f60. So after we submit the setup request (cache flushed) to USB
controller, any accessing to usb_composite_dev variable will cause the cache line refill, then
when setup transfer is completed, reading the setup data in ctrl_req will gets old value from
cache not from memory.

The ctrl_req is allocated by API dma_alloc_coherent, but u-boot don't have cohernet memory.
so it still needs cache maintain operations before/after HW accessing. Since the cache flush or
invalidate bases on cache line, so when the allocated memory size is not cache line aligned,
potentially it may meet such issue.

This patch modifies the dma_alloc_coherent API to round the size to cache line aligned.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-01-09 07:13:31 -05:00
Heinrich Schuchardt
f3ccba3e4e doc: README.commands: fix type
%s/commmand/command/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2019-01-09 07:13:31 -05:00
Simon Glass
3e87ffcffb dm: video: lcd: MIGRATION: Add migration plan for video
Add a migration plan for video which is an important subsystem in U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
2019-01-09 07:13:31 -05:00
Simon Glass
1ce689d950 dm: pci: MIGRATION: Add migration plan for PCI
Add a migration plan for PCI which is an important subsystem in U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
2019-01-09 07:13:31 -05:00
Enric Balletbo i Serra
358fd21fe7 igep003x: MAINTAINER: Remove myself as maintainer and add Javier
I can't continue maintaining the board because I don't have access to the
hardware anymore, so remove myself from the entry and add Javier who has
volunteered to help and maintain the board.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Javier Martínez Canillas <javier@dowhile0.org>
2019-01-09 07:13:30 -05:00
Tom Rini
d66ff4ba00 Add a github template telling people to not use pull requests there
On our mirror account on github we have gotten a handful of pull
requests.  At this time github does not allow you to disable pull
requests on a project.  The generally suggested work-around is to add a
pull request template that tells people to not use that workflow.  Add
one here that points to the wiki page on submitted patches.

Signed-off-by: Tom Rini <trini@konsulko.com>
2019-01-09 07:13:30 -05:00
Andre Przywara
eef05fd3ba mmc: bring back partition init for non-DM MMC drivers
Commit d0851c8937 ("blk: Call part_init() in the post_probe() method")
removed the call to part_init() in mmc.c, as this is done by the DM_MMC
framework.
However Allwinner is (still) relying on a non-DM MMC driver, so we are
now missing the implicit partition init, leading to failing MMC accesses
due to the missing partition information.

Bring the call back just for non-DM MMC driver to fix this regression.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Soeren Moch <smoch@web.de>
2019-01-09 07:13:30 -05:00
Andre Przywara
3b6989b526 sunxi: drop default SPL_LIBDISK_SUPPORT enablement
There is no code for using partition labels in the Allwinner SPL port.
Even so the name is slightly misleading, CONFIG_SPL_LIBDISK_SUPPORT was
meant to guard partition code for the SPL.

Remove the "imply" line in the Kconfig to make this obvious and avoid
unneeded code inclusions, helping to keep the H6 SPL code small.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2019-01-09 07:13:30 -05:00
Tom Rini
ddfe346f4c Makefile: Correct logic for DM_SCSI + unconverted drivers check
When checking for boards that are enabling a SATA driver that isn't
converted to DM yet we need to be sure to not also trip over boards that
do set CONFIG_DM_SCSI by itself, as that is not a bug.

Reported-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Fixes: ea9d7c17fc ("dm: MIGRATION: Add migration plan for CONFIG_SATA")
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-01-08 17:54:53 -05:00
Tom Rini
54707a9420 Prepare v2019.01-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-01-07 22:58:17 -05:00
Tom Rini
1bac199e8c configs: Resync with savedefconfig
Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2019-01-07 18:11:00 -05:00
Tom Rini
7e40d0a38f Merge branch 'master' of git://git.denx.de/u-boot-samsung 2019-01-06 19:42:55 -05:00
Tom Rini
7b84a20e68 Fixes:
- rockchip: rk3399: fix missing braces in full pinctrl
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJcMhBpAAoJECaAFcEOcohNjAwH+wbGhR4gWkBei6YSQBURXl1G
 sV/Md208Y5kU6XRlksbk1lBzc6JKaUdb4gOSri4gPQa8SscVerEAAWbkGgLet78M
 rmjcp7J0ygEwrfWuaH+cFl3V1LYoDtl4Oy0Zzjz3P+gmn9YaKvt/MrJ01p7Mcf0M
 lPkB/5b0oQ7LUVhwfWblzX7tasT4zPRANYGvzV9uda9mjcm0yQQimKnQ82ZR+CZx
 zx2wMYI+ckoxPIGsIwmlsriE0hMo6rxw4IcA1dmGkUnhoQHkoIWklAOyg5pm1OZ0
 uK7FniUdrLTXEFdIwRnL+5UDQsRvc2DY1oSCJVlCOTFuvdFRweQngZnYY98HWKY=
 =ThsE
 -----END PGP SIGNATURE-----

Merge tag 'for-master-20190106' of git://git.denx.de/u-boot-rockchip

Fixes:
 - rockchip: rk3399: fix missing braces in full pinctrl
2019-01-06 10:33:28 -05:00
Philipp Tomsich
33502f371d rockchip: rk3399: fix missing braces in full pinctrl
Braces around the error-case for rk3399_pinctrl_set_pin_pupd lead to
an unconditional (and unintended) return from the function without it
ever setting pin-configurations.

Fix it.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2019-01-06 15:26:31 +01:00
Guillaume GARDET
df1ff4d6ba exynos: Leave the compiler to choose the register to avoid possible r0 corruption
Reported-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>

Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2019-01-04 17:28:50 +09:00
Tom Rini
5324027566 TrueType fixes and documentation
-----BEGIN PGP SIGNATURE-----
 
 iGwEABECACwWIQSC4hxrSoIUVfFO0kRM6ATMmsalXAUCXC5WUQ4cYWd1c3RAZGVu
 eC5kZQAKCRBM6ATMmsalXO9/AJ0R/Ze2CuvvFYb5ScnmtqVn524loQCdG9IgRcVs
 ZDgDWo68ZhCGDoWgLKo=
 =sRmZ
 -----END PGP SIGNATURE-----

Merge tag 'for-v2019.01' of git://git.denx.de/u-boot-video

TrueType fixes and documentation
2019-01-03 15:34:44 -05:00
Tom Rini
7436f5e54d Last-minute fixes for 2019.1:
- clamp DRAM size to below 32bit for 32bit targets to support 4GB
 - fix copyright notice on some Rockchip-contributed files
 - adjust vdd_log for the RK3399-Q7 to improve stability in some workloads
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJcLfBzAAoJECaAFcEOcohNrMoH/ihFAiFblzVN7XPRTpV8+GGJ
 gsljC7DRGkgMT7IOnmCE+/44RGaQnP3bHQH6WG4zVHZ6vhrEyzqPaYzbzLg90ujj
 k1k4N6op3NA6e40FZvHzB/aglx1e5UFnWxstBpT1g82sL8xLSs0ubhsq6+gcr29I
 0qGTILHxwY95qUGDi2zlYNEwv5B0enlucfhB5kTZ7QYZX+Jz1SL4AI0sIapTdMg+
 /Bcu1Qi6B+xVklDhz9NUpYgst8T3J0Gabq7mqMXwommAgejsrjQWOnhDRrrWznd+
 OsJqEEo/TmdT/eqO7SffooKiEUPrw6YmKPtZAXkdlc8Cm+qZRvr/okozALBJizY=
 =v3QG
 -----END PGP SIGNATURE-----

Merge tag 'for-master-20190103' of git://git.denx.de/u-boot-rockchip

Last-minute fixes for 2019.1:
- clamp DRAM size to below 32bit for 32bit targets to support 4GB
- fix copyright notice on some Rockchip-contributed files
- adjust vdd_log for the RK3399-Q7 to improve stability in some workloads
2019-01-03 08:39:44 -05:00
Guillaume GARDET
2a195703d6 exynos: allow SPL to build in thumb mode
Building peach-pi smdk5420 and peach-pit with thumb mode for SPL
ends-up in the following error:

Error: Thumb encoding does not support an immediate here -- `msr cpsr_c,#0x13|0xC0'

Use an intermediate register to be able to use thumb for exynos5 SPL.

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>

Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2019-01-03 09:37:18 +09:00
Christoph Muellner
77012e79ff rockchip: rk3399-puma: Set VDD_LOG to 950 mV.
This patch sets VDD_LOG to 950 mV on RK3399-Q7.
This is required to address stability issues on Puma
in heavy-load use-cases.

Reported-by: Assaf Agmon <assaf@r-go.io>
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2019-01-02 22:40:02 +01:00
Christoph Muellner
7370e84c80 rockchip: rk3399-puma: enable full pinctrl driver in Puma defconfig.
This patch enables the full pinctrl driver in the defconfig
for the RK3399-Q7.

Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2019-01-02 22:39:32 +01:00
Christoph Muellner
8188c83cfa rockchip: rk3399: Add Kconfig option for full pinctrl driver
This patch adds a Kconfig option to enable the full pinctrl driver
for the RK3399. This flag needs to be enabed in order to get the
features of the full pinctrl driver compiled in (i.e. a .set_state()
callback).

Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2019-01-02 22:39:12 +01:00
Christoph Muellner
600888110d rockchip: rk3399: Add improved pinctrl driver.
The current pinctrl driver for the RK3399 has a range of qulity issues.
E.g. it only implements the .set_state_simple() callback, it
does not parse the available pinctrl information from the DTS
(instead uses hardcoded values), is not flexible enough to cover
devices without 'interrupt' field in the DTS (e.g. PWM),
is not written generic enough to make code reusable among other
rockchip SoCs...

This patch addresses these issues by reimplementing the whole driver
from scratch using the .set_state() callback.
The new implementation covers all featurese of the old code
(i.e. it supports pinmuxing and pullup/pulldown configuration).

This patch has been tested on a RK3399-Q7 SoM (Puma).

Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2019-01-02 22:39:04 +01:00
Christoph Muellner
5ff7768892 dm: pinctrl: Add pinctrl_decode_pin_config_dm().
pinctrl_decode_pin_config_dm() is basically a feature-equivalent
implementation of pinctrl_decode_pin_config(), which operates
on struct udevice devices and uses the dev_read_*() API.

Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2019-01-02 22:38:44 +01:00