Commit Graph

13676 Commits

Author SHA1 Message Date
Joseph Chen 3f0522ce8f rng: rockchip: add hardware rand library
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Id22c5725158d86cc8a2ff80fdf09b0146d04be41
2021-02-03 17:47:51 +08:00
Jason Zhu 6221c090c7 dm: mmc: add more conditions to judge whether print the info
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I94f60c9102c8708d7fa84e729762bfe2956d4fd5
2021-02-01 10:21:45 +08:00
Jon Lin cc7b616de8 mtd: spinand: Enable FM25S02A QE bits
Change-Id: I247212779443f0166a633968203824e6552d669e
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-02-01 10:21:30 +08:00
Lin Jinhan a3341e9017 drivers: crypto: drop rng api from crypto driver
rng module is not belongs to crypto driver anymore.

Change-Id: I6d837397621267edb586034ff87b82fc33a30d5b
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2021-01-30 09:02:02 +08:00
Lin Jinhan 3ebc872de9 UPSTREAM: rockchip: rng: Add a driver for random number generator(rng) device
Add a driver for the rng device found on rockchip platforms.
Support rng module of crypto v1 and crypto v2.

Change-Id: I5be779aa08452977965d032e366f4e36c930b12e
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
(cherry picked from commit b072d00c225e5b8147ed7444ebeae4ddd336870b)
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2021-01-29 17:50:52 +08:00
Sughosh Ganu 28507ac336 UPSTREAM: dm: rng: Add random number generator(rng) uclass
Add a uclass for reading a random number seed from a random number
generator device.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit a2487684003b0bc380955e1a38cdd71da3ca4366)

Change-Id: Ife2287132db695181d663653f2ceaab0e343b41f
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2021-01-29 17:50:52 +08:00
William Wu 631619a42f usb: dwc3-generic: support host mode if dr_mode is otg
The Rockchip DWC3 controller only support DRD mode (Dual Role
Device), but not support OTG mode. So if the dr_mode in DTS is
configured to OTG, then we force it to Host mode. This patch
does not affect the device function of OTG, such as rockusb.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I806623aa9b0bb8b595417755db7d9c6b6c4f38f1
2021-01-29 14:57:09 +08:00
Wenping Zhang 074c7ac45f video/rk_eink: Don't read image from emmc to ddr if it's already loaded.
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
Change-Id: I02b141e5adb8391bf85ce77c6a7e280f645c96d5
2021-01-28 09:33:56 +08:00
Joseph Chen b978e52ca5 power: pmic: rk8xx: inactive pmic_sleep by default
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ia5729341c5a94d0109a8a28e48ad8eb79b80962e
2021-01-27 17:11:30 +08:00
Joseph Chen 06b61291ba power: charge animation: add pmic suspend/resume
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ia1b6d232b0a9c0d0ce2e8ee47ae84aaa6d40bfac
2021-01-27 17:11:30 +08:00
Joseph Chen 40db74046c power: pmic: rk8xx: implement suspend/resume callback
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I46b13886fcb3e7733155cd6f5fce15473c439da3
2021-01-27 17:11:30 +08:00
Joseph Chen 2a7051be6c dm: pmic: add suspend/resume callback
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Iaa3b0b7f7b3a0563370baace876e095deb64c28f
2021-01-27 17:11:30 +08:00
Jason Zhu 327b5d5723 dm: mmc: print the cmd index when sending cmd error occur
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I08aab678c5e539000fadccf4a8ad9e97e3693894
2021-01-21 18:12:47 +08:00
Jason Zhu 34d21c9ad8 UPSTREAM: mmc: dw_mmc: Calculate timeout from transfer length
The current 4-minute data transfer timeout is misleading and broken.
Instead of such a long wait, calculate the timeout duration based on
the length of the data transfer. The current formula is the transfer
length in bits, divided by a multiplication of bus frequency in Hz,
bus width, DDR mode and converted the mSec. The value is bounded from
the bottom to 10000 mSec.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I168b6ceba917d3e621559a92a63fac78abca6bff
(cherry picked from commit 4e16f0a67d80b4ce11995b870b5d9c8d11266d0d)
2021-01-19 16:57:34 +08:00
Jianqun Xu 7862d7bff3 UPSTREAM: core: uclass: fix to u32 for phandle of fdt
The function has a little fix during upstream review, do fix to sync
with upstream.

Change-Id: I9e1c43a660b2f83395d1639aa962988ca04494e5
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-01-19 10:01:24 +08:00
Jon Lin 2a2a073c3c mtd: spinor: mx25u25635f enable quad read
Change-Id: I66ef7cf13b58b1a3c2a4e8ea78c1c3a8090c57df
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-01-19 10:00:57 +08:00
Jon Lin 8c4105cc49 mtd: spinand: Support BWJX08K
Change-Id: Iddcc569cb4865bc73d0829fd5e6a33c7c85632b5
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-01-19 10:00:49 +08:00
Jon Lin 69bb6ffab4 mtd: mtd_blk: Only reserve for last partition with grow tag
Change-Id: Icd3bd87b45bdb3af6688269a2332463f570f4d46
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-01-18 09:03:19 +08:00
Jon Lin ce9d2743ba mtd: mtd_blk: spinor reserved area aligned to 64KB
1.reserve for GPT
2.kernel spinor erasesize is 64KB

Change-Id: I32a5b26f8f39b4b226ec54342ce5d8d3d71f1c4d
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-01-18 09:03:19 +08:00
Wyon Bi d63e2d24c5 video/drm: analogix_dp: Fix voltage_swing/pre_emphasis level calculation
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I07a071b77a254cbe940b4df4dd6b52b069339076
2021-01-15 15:58:04 +08:00
Tang Yun ping c69667e0e2 drivers: ram: sdram_common: add os reg v3 define
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
Change-Id: I2cedcddcebdfd32da113edd1e18d2498b5813e22
2021-01-14 11:39:53 +08:00
Tang Yun ping 1a6462e18b drivers: ram: sdram_common: add 4rank support for sdram_cap_info
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
Change-Id: Icda7bdc73e6c36c1351f0671b374a9d906dafec8
2021-01-13 16:36:10 +08:00
Weixin Zhou 39c952ae4e video/rk_eink: add poweren for tps65185
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: Icc6059a723f9e5d0b90c623497f0b03adea9e726
2021-01-13 11:40:59 +08:00
Finley Xiao fd7b518283 rockchip: otp: Add support for rk3568
This adds the necessary data for handling otp on the rk3568.

Change-Id: Id5e8a3a1561604bb307ef17e06d11d7e62d8a840
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-01-13 09:32:47 +08:00
Wyon Bi 8d52d662b5 clk: rockchip: rk3288: Fix i2c clk rate calc
Change-Id: I083e2b8ceaa3eee7729174aa2e17b8a08cec9c05
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-01-13 09:00:50 +08:00
Jason Zhu a2875f15a8 dm: blk: fix spi flash uclass different error when use mtd block
Add more condition to decide which dev is "mtd 2".
More info seen in 82ee425415.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Iea84b5a7307969dad785f3136b0af8b9f45e94f6
2021-01-11 11:12:58 +08:00
Shawn Lin fae486e407 power: regulator: Use dev_read_size in gpio-regulator
Change-Id: Iff2e643d6dad6975fe0838dc439a31ecd5299f41
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2021-01-08 09:24:05 +08:00
Yifeng Zhao 7cd717205f drivers: rknand: zftl: fix to support samsung ss14 8GB NAND FLASH
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I86d47db8988b56d36ae76d08997c840b34f0b0d8
2021-01-07 10:39:27 +08:00
Shawn Lin bc58f2110b drivers: pci: Add Rockchip DesignWare based PCIe controller
=> pci enum
PCIe Linking... LTSSM is 0x1
PCIe Link up, LTSSM is 0x230011
PCIE-0: Link up (Gen3-x2, Bus0)

=> pci scan
Scanning PCI devices on bus 0
BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
_____________________________________________________________
00.00.00   0x1d87     0x3566     Bridge device           0x04

=> pci 1
Scanning PCI devices on bus 1
BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
_____________________________________________________________
01.00.00   0x144d     0xa808     Mass storage controller 0x08

=> nvme scan

=> nvme details
Blk device 0: Optional Admin Command Support:
        Namespace Management/Attachment: no
        Firmware Commit/Image download: yes
        Format NVM: yes
        Security Send/Receive: no
Blk device 0: Optional NVM Command Support:
        Reservation: yes
        Save/Select field in the Set/Get features: yes
        Write Zeroes: yes
        Dataset Management: yes
        Write Uncorrectable: yes
Blk device 0: Format NVM Attributes:
        Support Cryptographic Erase: No
        Support erase a particular namespace: Yes
        Support format a particular namespace: Yes
Blk device 0: LBA Format Support:
Blk device 0: End-to-End DataProtect Capabilities:
        As last eight bytes: No
        As first eight bytes: No
        Support Type3: No
        Support Type2: No
        Support Type1: No
Blk device 0: Metadata capabilities:
        As part of a separate buffer: No
        As part of an extended data LBA: No

=> nvme info
Device 0: Vendor: 0x144d Rev: EXD7201Q Prod: S444NA0M384608
            Type: Hard Disk
            Capacity: 244198.3 MB = 238.4 GB (500118192 x 512)

=> nvme device 0

=> md.l 0x40000000 1
40000000: d08ec033                               3...
=> mw.l 0x40000000 0x55aa55aa
=> md.l 0x40000000 1
40000000: 55aa55aa                               .U.U

=> nvme write 0x40000000 0x0 0x1

nvme write: device 0 block # 0, count 1 ... 1 blocks written: OK

=> md.l 0x44000000 1
44000000: ffffffff                               ....
=> nvme read 0x44000000 0x0 0x1

nvme read: device 0 block # 0, count 1 ... 1 blocks read: OK

=> md.l 0x44000000 1
44000000: 55aa55aa                               .U.U

Change-Id: I645dfc7e88722e9948ecb6e1a3a589eb4b420c1f
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2021-01-07 10:00:59 +08:00
Shawn Lin 76ab734171 phy: Add Rockchip Synopsys PCIe 3.0 PHY
Change-Id: Ie29e4777f8f0603b779cc3387dc5c4b63336deff
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2021-01-07 10:00:59 +08:00
Shawn Lin 80907d3c4c core: device: Add PCIe to bind list if we set GD_FLG_RELOC
Change-Id: Ib115bc6eb52f8a08e28805ea15e2cbf8f27f5f63
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2021-01-07 10:00:59 +08:00
Shawn Lin d504dfb2b1 clk: rockchip: rk3568: Ungate PCIe30phy refclk_m and refclk_n
Change-Id: I718f280cd78235131f3f3ef76e17e498a6e4db8e
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2021-01-07 10:00:59 +08:00
Shawn Lin cd282fabfa power: regulator: Migrate to dev_read_u32_array for gpio-regulator
fdtdec_get_int_array_count is obsoleted and we should use
dev_read_u32_array for seeking node members.

Change-Id: I666bd7317cfa203229454d24c910049c24bf8a2f
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2021-01-07 10:00:59 +08:00
Yifeng Zhao 813156ed32 drivers: mtd: nand: support slc nand for rk3568
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: Id9bc21f8fb443574ad150c32b9c6980e2e038ca7
2021-01-07 09:28:32 +08:00
Elaine Zhang 2f5dff11cb thermal: rockchip: support rk3568
Change-Id: Icb4d127a9d9c3f599a141c69c7c759da6e38cf36
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-01-07 09:24:58 +08:00
Jon Lin 43f2461c06 mtd: spinand: Add optional configuration for different devices
Change-Id: If3d66f2f48f7322493175cdfba46d563b760b44c
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-01-06 15:34:03 +08:00
Jason Zhu 5b4dcfe0cf spi: rockchip_sfc: set clock depended on CONFIG_IS_ENABLED(CLK)
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Icb3662d97eeea8db1e1a62f633f9ba4de9b72dde
2021-01-06 15:29:39 +08:00
Jason Zhu a0166cc6be mtd: Kconfig: add a Kconfig option to enable the support for MTD block write operations
This allows using CONFIG_IS_ENABLED(SPLMTD_WRITE) to compile out code
needed only if write support is required.
The option is added for u-boot and for SPL.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ia48169fcd601ad51d1723923ed71d610901275e1
2021-01-06 15:29:34 +08:00
Yifeng Zhao c7c3548ddf drivers: Makefile: add block layer while enable rknand
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I8fc7b3d27e32d767da3597d3d5b7a6aa4a48ca40
2021-01-06 14:54:48 +08:00
Jean-Jacques Hiblot 9127fbf440 UPSTREAM: mmc: add a Kconfig option to enable the support for MMC write operations
This allows using CONFIG_IS_ENABLED(MMC_WRITE) to compile out code
needed only if write support is required.
The option is added for u-boot and for SPL

Change-Id: Ibb3836ed8713e491238460783a85ee1808770f66
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
(cherry picked from commit d6400c3f8520bb9a203fe397039279c80f093c27)
2021-01-04 17:12:30 +08:00
Ziyuan Xu 658285c1fb clk: rockchip: rv1126: mux aclk_pdbus according to frequency
Aim to reduce power consumption, cpll should be gated and the clocks
will mux to non-cpll.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: If9d1b48cdb237cf38133523a4fc20fa6e87e8e62
2020-12-31 14:39:56 +08:00
Algea Cao 5ccad8f6bf drm/rockchip: hdmi: Support RK3568 dw-hdmi
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I3c9275a44c519c3927ea7199147a738d4c2a1334
2020-12-31 14:38:43 +08:00
Algea Cao 10ee9f5b51 drm/rockchip: vop2: Add support for hdmi
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I6043fad382c48670c765bce67a3f291a0fc66bd5
2020-12-31 14:38:43 +08:00
Wenping Zhang 449de1d380 video/rk_eink: Only initilize the eink driver on the first time.
This commit fix hardware without eink screen continue outputing
eink log during charging.

Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
Change-Id: I1b14f0cd921342d1efb83dc72be6829a157be6d9
2020-12-30 16:05:17 +08:00
David Wu 33a014bdc9 net: gmac_rockchip: Add rk3568 gmac support
Change-Id: I3de9899a27160f5acccc04cd1ac03b406e4b3296
Signed-off-by: David Wu <david.wu@rock-chips.com>
2020-12-29 18:06:54 +08:00
David Wu befcb6277d net: gmac_rockchip: Prepare for rk3568 gmac support
Change-Id: Iada7af00c052a7ebe7e6b702ada2bd2ef585a913
Signed-off-by: David Wu <david.wu@rock-chips.com>
2020-12-29 18:06:54 +08:00
David Wu ee1ce3c58a pinctrl: rockchip: Use gmac1_rxd0 to select M0 and M1
Change-Id: Idba7d638d4fc55b1c163a3fa104c04345a74e51c
Signed-off-by: David Wu <david.wu@rock-chips.com>
2020-12-29 18:06:54 +08:00
Joseph Chen 00f93bdf98 drivers: pci: separate SPL & U-Boot proper build
It fixes SPL compile issue after PCI enabled.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ic3d4a464defd2074be083effd25f513ae19d2e01
2020-12-29 16:35:35 +08:00
Jon Lin 9148182d3c mtd: mtd_blk: Support SPI Nor blk_derase
Change-Id: I1be6dfc1fa7acd25f98031f48002abf13479418c
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-12-29 14:45:29 +08:00
Guochun Huang bee25ee674 video/drm: remove DSI special assign
these flags will be used by other output interface, so remove
DSI special assign.

Change-Id: Ieb3a20e62c2b899e6757635eced86b85e1fb22f7
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2020-12-29 14:43:12 +08:00