Compare commits

...

138 Commits

Author SHA1 Message Date
David Abdurachmanov 1c8925125d
Add u-boot-spl.bin.normal.out for VisionFive 2
See documentation for more information:
https://docs.u-boot.org/en/latest/board/starfive/visionfive2.html

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2024-04-26 08:43:55 +03:00
David Abdurachmanov e9602bfe2d
Merge remote-tracking branch 'up/f40' into f40-riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2024-04-11 16:11:23 +03:00
Peter Robinson dcafedfd49 2024.04 GA, rk3328 USB fixes 2024-04-03 05:55:01 +01:00
Peter Robinson 2a31c9025b 2024.04 RC5 2024-03-27 04:44:15 +00:00
David Abdurachmanov 6f42a4097e
Separate riscv64 and aarch64 installs
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2024-03-22 10:25:44 +02:00
David Abdurachmanov 33652e520b
Add riscv64
U-Boot configuration changes:
  - Enable "sbi" command.
  - Enable SBI reset and poweroff from U-Boot prompt.
  - Set max CPUs on QEMU to 32 for now.
  - Enable relocation and use firmware FDT/DTB (i.e. generated by QEMU)
    for QEMU.

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2024-03-22 09:28:58 +02:00
Peter Robinson d91245dd1c Updated patch for DTB loading 2024-03-21 13:56:18 +00:00
Peter Robinson bda7eb94be Updated fix for FDT load 2024-03-15 16:43:39 +00:00
Peter Robinson 59b16b4988 Fixes for Rockchip rk3399 autoboot 2024-03-13 19:18:40 +00:00
Peter Robinson 7f2aed2f98 2024.04 RC4, upstream fixes 2024-03-12 00:18:30 +00:00
Peter Robinson 622b0b089d Merge branch 'rawhide' of ssh://pkgs.fedoraproject.org/rpms/uboot-tools into rawhide 2024-03-01 08:59:04 +00:00
Peter Robinson 9dc8c9ae3c Update to 2024.04 RC3
Enable a number of new upstream devices
Upstream now builds Rockchip SPI artifacts
Various cleanups
Fix ESP partition detection to enable EFI vars
2024-02-29 19:53:30 +00:00
Peter Robinson 69b6819f2e drop another patch 2024-02-15 13:05:33 +00:00
Peter Robinson 0c3fb4e23d drop old patches 2024-02-15 12:57:23 +00:00
Peter Robinson 6d54ac747c 2024.04 RC2 2024-02-14 15:10:30 +00:00
Fedora Release Engineering 2be69fdb80 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-27 06:56:21 +00:00
Peter Robinson 7b44a7f95b 2024.01 2024-01-08 22:20:39 +00:00
Daan De Meyer eafba21345 Enable qemu aarch64 board
Useful for testing aarch64 uboot stuff with qemu's aarch64 virt
machine.
2023-12-14 14:28:34 +01:00
Peter Robinson 6bcb24bf3d cleanup board specific docs 2023-12-08 12:22:27 +00:00
Peter Robinson cb6dd9961d 2024.01 RC4 2023-12-07 14:49:13 +00:00
Peter Robinson 2989b728b0 Rebase patches for new release 2023-11-25 09:18:23 +00:00
Peter Robinson 69521310e4 2024.01 RC3 2023-11-24 17:34:22 +00:00
Peter Robinson f1d098b8a0 Add epoch 2023-10-31 11:41:30 +00:00
Peter Robinson d9dd20bdd0 Further potential upstream fixes 2023-10-23 15:42:39 +01:00
Peter Robinson 6cd0d073d6 2023.10, initial pass at DT detection fix 2023-10-21 10:16:31 +01:00
Peter Robinson 4798befe95 2023.10 RC3 2023-08-21 22:05:15 +01:00
Peter Robinson c151f709de Add patch to speed up firmware UEFI video output 2023-08-21 20:11:07 +01:00
Peter Robinson 99f3204130 Raspberry Pi standard boot 2023-08-19 14:33:37 +01:00
Peter Robinson c7752f4a32 2023.10 RC2 2023-08-19 12:52:49 +01:00
Fedora Release Engineering 1a686adf37 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-22 16:57:06 +00:00
Peter Robinson bb667eb6c9 2023.07 GA 2023-07-11 15:37:44 +01:00
Peter Robinson a66ab5dbb0 Disable NFS 2023-06-16 10:43:01 +01:00
Peter Robinson 9f5ba74ae0 2023.07 RC4 2023-06-12 22:33:53 +01:00
Peter Robinson 0d5f023cd6 Fixes for the Pinephone Pro, RockPro64 2023-06-11 21:27:31 +01:00
Peter Robinson 181c3671e7 2023.07 RC3 2023-05-29 22:02:20 +01:00
Peter Robinson 4bf4670e83 2023.07 RC2 2023-05-17 23:06:15 +01:00
Peter Robinson 2a1c71298b 2023.04 GA 2023-04-05 23:03:46 +01:00
Peter Robinson 33708bf7f4 2023.04 RC5 2023-04-02 22:33:04 +01:00
Peter Robinson 8e7afdbb87 2023.04 RC4 2023-03-14 17:19:11 +00:00
Peter Robinson 8a0d41132e drop xway-swap-bytes 2023-02-20 11:01:34 +00:00
Peter Robinson 4adcd6c9bf drop ubsha1 2023-02-20 10:19:35 +00:00
Peter Robinson 7a9f14f8e7 2023.04 RC2 2023-02-17 16:03:02 +00:00
Peter Robinson de2eac07ba upadte source hash 2023-01-31 13:11:34 +00:00
Peter Robinson 65896be74a Update to 2023.04 rc1 2023-01-31 10:29:14 +00:00
Fedora Release Engineering 8798072f53 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-21 05:38:21 +00:00
Peter Robinson 8376d2cf3a fix release 2023-01-18 16:05:48 +00:00
Peter Robinson 5b281a96f0 2023.01 GA 2023-01-18 15:06:40 +00:00
Peter Robinson eee75bb934 Update PinePhone Pro to latest rev 2022-12-31 11:06:47 +00:00
Peter Robinson c811eec4b7 Use SDL2 2022-12-20 03:57:41 +00:00
Peter Robinson d245dbb379 drop upstreamed PBP patch 2022-12-20 03:51:10 +00:00
Peter Robinson bc28006c89 2023.01 RC4 2022-12-20 03:30:32 +00:00
Peter Robinson 70b0c177c3 2023.01 RC3 2022-12-05 21:08:19 +00:00
Peter Robinson 8bcd936f72 disable PPP for the moment as it's seemingly locking up the builds 2022-11-24 16:25:37 +00:00
Peter Robinson 47aa93aa34 fix uefi patch rebase 2022-11-24 14:16:39 +00:00
Peter Robinson a56399745c Fix building utils 2022-11-24 14:02:10 +00:00
Peter Robinson 56a26f9cc4 2023.01 RC2 2022-11-24 13:10:24 +00:00
Peter Robinson 716e4d578e 2022.10 GA 2022-10-10 20:43:56 +01:00
Peter Robinson 3b11dffa4f Update SMBIOS patch 2022-09-06 17:31:51 +01:00
Peter Robinson 6134477ebc 2022.10 RC4, rockchip PMIC revert 2022-09-06 08:51:21 +01:00
Peter Robinson d2c989dc32 2022.10 RC3 2022-08-23 15:29:38 +01:00
Davide Cavalca 48ddd14c80 Install nodtb variant for Apple M1
Fixes: rhbz#2068958
2022-08-22 07:56:36 -07:00
Peter Robinson 8522759e85 Fix for DT property propogation via firmware 2022-08-16 20:10:33 +01:00
Peter Robinson 8bfc149984 2022.10 RC1 2022-07-28 10:11:26 +01:00
Fedora Release Engineering c7412f83bd Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-23 11:13:36 +00:00
Peter Robinson 6c3ac9b229 2022.07 GA 2022-07-17 11:16:46 +01:00
Peter Robinson 49a3b5d27c Update to 2022.07 RC6 2022-07-04 13:23:43 +01:00
Peter Robinson dc41daecba 2022.07 RC5 2022-06-26 17:40:50 +01:00
Peter Robinson 832d64676b Fix for Pinebook Pro when booting with FW DT 2022-06-12 16:46:57 +01:00
Peter Robinson cefa60ce7f 2022.07 RC4, rk3328 spi builds, PBP/Rockpro64 fixes 2022-06-12 14:58:18 +01:00
Peter Robinson fa86e10d71 2022.07 RC3 2022-05-25 15:46:30 +01:00
Peter Robinson 0e7b564081 2022.07 RC2 2022-05-14 10:17:26 +01:00
Peter Robinson f0b776d4d6 2022.07 RC2
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2022-05-13 19:24:42 +01:00
Peter Robinson 41e28cf922 fix version 2022-04-27 01:49:46 +01:00
Peter Robinson f02cd13691 2022.07 RC1 2022-04-27 01:39:32 +01:00
Peter Robinson 9cc572a2b0 Drop ARMv7 builds 2022-04-26 12:49:33 +01:00
Peter Robinson ab63b19049 2022.04 GA 2022-04-04 15:37:35 +01:00
Peter Robinson b6626c87f4 cleanup some old patches 2022-03-29 21:36:14 +01:00
Peter Robinson 7b988dd8fc Upload fixes source, add ncurses-devel 2022-03-28 17:48:50 +01:00
Peter Robinson 2a3a46103d 2022.04 RC5 2022-03-28 17:37:15 +01:00
Peter Robinson 1b64b89c2d Add the ability to do a tools only build, drop old el7 support 2022-03-11 14:40:53 +00:00
Peter Robinson 6706eb16a4 2022.04 RC3 2022-03-08 09:53:45 +00:00
Javier Martinez Canillas 359979e25b
Add support for another rk3399 device 2022-02-19 14:45:00 +01:00
Peter Robinson be009d9316 add gnutls-devel 2022-02-15 18:51:20 +00:00
Peter Robinson e06a81622d BR: libuuid-devel 2022-02-15 17:06:52 +00:00
Peter Robinson 93f0ff8c4f 2022.04 RC2 2022-02-15 16:48:19 +00:00
Peter Robinson 18e07ba9f6 2022.04 RC1 2022-02-02 23:04:35 +00:00
Fedora Release Engineering b27a96095d - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-22 03:22:08 +00:00
Peter Robinson c1b0bbe361 Upload source 2022-01-11 10:11:22 +00:00
Peter Robinson cc4e21b64c 2022.01 2022-01-11 10:04:15 +00:00
Peter Robinson 1457c7c78e fixes for UEFI and improved upstream fix for PHY shutdown lockups 2022-01-05 17:40:47 +00:00
Peter Robinson d98cfa77d6 2022.01 RC4 2021-12-20 19:55:40 +00:00
Peter Robinson c08df485fa Update names of shipped docs 2021-11-15 22:12:48 +00:00
Peter Robinson 89bd41507e 2022.01 RC2 2021-11-15 21:11:49 +00:00
Peter Robinson 9eb973e7d2 upstream rk3399 MMC fix, build against new ATF for rk3399 suspend fix 2021-11-15 18:24:46 +00:00
Peter Robinson 684d579249 Drop any vestigate of an idea we build U-Boot for Chromebooks, if someone gets the time it can be added back 2021-10-27 13:43:20 +01:00
Javier Martinez Canillas e708510df1
Drop vboot-utils build dependency
The package contains tools to build and sign FIT (Flat Image Tree) images
that are used in u-boot based Chromebooks. But it isn't really needded to
build u-boot, since FIT images are not shipped in uboot-images-armv{7,8}.

Also, the vboot-utils package has as build dependency the trousers-devel
package and this gets pulled as a dependency to build u-boot as well.

But the trousers package is really deprecated since TPM 1.2 chips aren't
used anymore nowadays. Let's just drop that unneeded build dependency.
2021-10-27 14:00:22 +02:00
Peter Robinson 37df227bc0 Fixes for Rockchip devices
Fix booting from MMC for Rockchip 3399 (rhbz #2014182)
Enable new rk3399 devices (Leez, NanoPi-M4B, NanoPi-4S, NanoPi-T4) (rhbz #2009126)
2021-10-17 15:57:39 +01:00
Peter Robinson 6487c37f16 2021.10 2021-10-04 18:52:08 +01:00
Peter Robinson 33afbf3788 2021.10 RC5 2021-10-04 08:09:41 +01:00
Peter Robinson 82d32758b4 Update sources 2021-09-16 12:44:57 +01:00
Peter Robinson b73fa7b980 2021.10 RC4, Proposed fix for RPi MMC clock issue 2021-09-16 12:40:49 +01:00
Sahana Prasad ae47304273 Rebuilt with OpenSSL 3.0.0 2021-09-14 19:17:15 +02:00
Peter Robinson a320cf868c rockchip rk3399: enable hs400 and sdma support 2021-08-30 18:28:42 +01:00
Peter Robinson c455dea8f2 2021.10 RC3 2021-08-30 18:09:53 +01:00
Peter Robinson 319f8123df Fix for Raspberry Pi firmware properties 2021-08-24 14:08:33 +01:00
Peter Robinson e63667d6b3 add patch 2021-08-23 21:34:51 +01:00
Peter Robinson 2bd8d4cdb4 Fix for rockchip SPI 2021-08-23 21:33:21 +01:00
Peter Robinson e006fd5035 2021.10 RC2 2021-08-16 20:03:59 +01:00
Peter Robinson 70da6a0757 2021.10 RC1 2021-08-14 10:04:14 +01:00
Peter Robinson e3985d3d2e Fix regression for Rockchip devices running firmware from SPI flash 2021-07-22 16:44:12 +01:00
Peter Robinson dd361c8ed3 2021.07 2021-07-05 20:09:30 +01:00
Peter Robinson 8cca325513 2021.07 RC5 2021-06-28 20:52:12 +01:00
Peter Robinson 52be77ca6b 2021.07 RC4 2021-06-07 16:44:07 +01:00
Peter Robinson 6c925bc315 AllWinner devices booting from mSD/MMC 2021-06-05 21:23:11 +01:00
Peter Robinson 896c46870f 2021.07 RC3 2021-05-25 10:01:27 +01:00
Peter Robinson c74ab1fc05 Build against new ATF 2.5-rc1 2021-05-13 12:50:05 +01:00
Peter Robinson bff9338fe9 Update docs locations 2021-05-10 23:13:33 +01:00
Peter Robinson d6fc5ecb4b 2021.07 RC2 2021-05-10 22:20:20 +01:00
Peter Robinson 6209cab21a Upstream fix for console regression, Fix for fallback.efi crash 2021-04-28 22:49:10 +01:00
Peter Robinson b6c02ba2ca add revert patch 2021-04-21 16:20:56 +01:00
Peter Robinson d512ddd572 fix keyboard regression but reverting upstream commit (rhbz 1946278) 2021-04-21 16:20:29 +01:00
Peter Robinson 060f78f396 2021.04 GA, DTB load fix, add Turris Omnia, rockchip fixes 2021-04-19 14:07:58 +01:00
Peter Robinson 610279571c 2021.04 RC4, upstream rpi3 smp fix 2021-03-17 09:10:48 +00:00
Peter Robinson 2abadc5169 Fixes for SMP on RPi3, initial patch for pinepohone 3g 2021-03-13 21:21:20 +00:00
Peter Robinson f458c5418f 2021.04 RC3 2021-03-08 14:59:13 +00:00
Peter Robinson 3fb46c33cd 2021.04 RC2 2021-02-16 09:53:49 +00:00
Peter Robinson 422d33a878 spec file cleanups 2021-02-16 09:40:03 +00:00
Dennis Gilmore eb1de640aa build SPI and UART images for helios4 and clearfog
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2021-02-15 19:28:30 -06:00
Peter Robinson f9b692a09e few more fixes, this time for a83t SoC devices 2021-02-10 14:01:29 +00:00
Peter Robinson 53c3d27d79 drop sun9i boards which never had eth support anyway 2021-02-10 12:02:50 +00:00
Peter Robinson 82aabc8bb2 Allwinner network fixes 2021-02-10 11:05:10 +00:00
Peter Robinson a05d9090bf fix iproc_rng200 driver for upstream changes 2021-02-02 09:42:30 +00:00
Peter Robinson 65ed4db407 2021.04 RC1, new devices 2021-02-01 22:31:25 +00:00
Fedora Release Engineering 6be7eb2066 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-27 22:31:46 +00:00
Peter Robinson 90614b00ce Sort target list files 2021-01-18 14:54:46 +00:00
Peter Robinson 12eb6a489a Add RPi-4 pcie patch 2021-01-18 13:27:20 +00:00
Peter Robinson 74de6cf1a5 2021.01, RPi4 series updates, minor sunxi fixes 2021-01-18 13:22:47 +00:00
Peter Robinson f5f44b6446 2021.01 RC5 2021-01-10 17:49:00 +00:00
32 changed files with 5132 additions and 4832 deletions

View File

@ -1,29 +0,0 @@
From 1849ef423238aeb1732eb3b8e67eb46bc21401c7 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Thu, 10 Sep 2020 14:24:12 +0100
Subject: [PATCH] Fix BeagleAI detection
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
board/ti/am57xx/board.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
index 7809875510..3232812a97 100644
--- a/board/ti/am57xx/board.c
+++ b/board/ti/am57xx/board.c
@@ -527,8 +527,10 @@ void do_board_detect(void)
rc = ti_i2c_eeprom_am_get(CONFIG_EEPROM_BUS_ADDRESS,
CONFIG_EEPROM_CHIP_ADDRESS);
- if (rc)
+ if (rc) {
printf("ti_i2c_eeprom_init failed %d\n", rc);
+ ti_i2c_eeprom_am_set("BBONE-AI", "A");
+ }
#ifdef CONFIG_SUPPORT_EMMC_BOOT
rc = board_bootmode_has_emmc();
--
2.26.2

View File

@ -1,518 +0,0 @@
From 25ce28126444900b7b3efef36c6b9d15a6ab9af1 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Wed, 28 Oct 2020 10:08:44 +0000
Subject: [PATCH] Fixes for AllWinner ethernet network interfaces
The upstream kernel in fixing stuff has broken stuff.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
arch/arm/dts/sun50i-a64-bananapi-m64.dts | 2 +-
arch/arm/dts/sun50i-a64-nanopi-a64.dts | 2 +-
arch/arm/dts/sun50i-a64-oceanic-5205-5inmfd.dts | 2 +-
arch/arm/dts/sun50i-a64-olinuxino.dts | 2 +-
arch/arm/dts/sun50i-a64-orangepi-win.dts | 2 +-
arch/arm/dts/sun50i-a64-pine64-plus.dts | 2 +-
arch/arm/dts/sun50i-a64-sopine-baseboard.dts | 2 +-
arch/arm/dts/sun50i-h5-libretech-all-h5-cc.dts | 2 +-
arch/arm/dts/sun50i-h5-nanopi-neo-plus2.dts | 2 +-
arch/arm/dts/sun50i-h5-nanopi-neo2.dts | 2 +-
arch/arm/dts/sun50i-h5-orangepi-pc2.dts | 2 +-
arch/arm/dts/sun50i-h5-orangepi-prime.dts | 2 +-
arch/arm/dts/sun50i-h5-orangepi-zero-plus.dts | 2 +-
arch/arm/dts/sun50i-h6-beelink-gs1.dts | 2 +-
arch/arm/dts/sun50i-h6-pine-h64.dts | 2 +-
arch/arm/dts/sun7i-a20-bananapi-m1-plus.dts | 2 +-
arch/arm/dts/sun7i-a20-bananapi.dts | 2 +-
arch/arm/dts/sun7i-a20-bananapro.dts | 2 +-
arch/arm/dts/sun7i-a20-cubietruck.dts | 2 +-
arch/arm/dts/sun7i-a20-hummingbird.dts | 2 +-
arch/arm/dts/sun7i-a20-lamobo-r1.dts | 2 +-
arch/arm/dts/sun7i-a20-olimex-som-evb.dts | 2 +-
arch/arm/dts/sun7i-a20-olimex-som204-evb.dts | 2 +-
arch/arm/dts/sun7i-a20-olinuxino-lime2.dts | 2 +-
arch/arm/dts/sun7i-a20-orangepi-mini.dts | 2 +-
arch/arm/dts/sun7i-a20-orangepi.dts | 2 +-
arch/arm/dts/sun7i-a20-pcduino3-nano.dts | 2 +-
arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts | 2 +-
arch/arm/dts/sun8i-a83t-bananapi-m3.dts | 2 +-
arch/arm/dts/sun8i-a83t-cubietruck-plus.dts | 2 +-
arch/arm/dts/sun8i-h3-nanopi-m1-plus.dts | 2 +-
arch/arm/dts/sun8i-h3-orangepi-plus.dts | 2 +-
arch/arm/dts/sun8i-h3-orangepi-plus2e.dts | 2 +-
arch/arm/dts/sun8i-r40-bananapi-m2-ultra.dts | 2 +-
arch/arm/dts/sun8i-v40-bananapi-m2-berry.dts | 2 +-
arch/arm/dts/sunxi-bananapi-m2-plus.dtsi | 2 +-
36 files changed, 36 insertions(+), 36 deletions(-)
diff --git a/arch/arm/dts/sun50i-a64-bananapi-m64.dts b/arch/arm/dts/sun50i-a64-bananapi-m64.dts
index ef1c90401b..e1c22aeb29 100644
--- a/arch/arm/dts/sun50i-a64-bananapi-m64.dts
+++ b/arch/arm/dts/sun50i-a64-bananapi-m64.dts
@@ -112,7 +112,7 @@
&emac {
pinctrl-names = "default";
pinctrl-0 = <&rgmii_pins>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-handle = <&ext_rgmii_phy>;
phy-supply = <&reg_dc1sw>;
status = "okay";
diff --git a/arch/arm/dts/sun50i-a64-nanopi-a64.dts b/arch/arm/dts/sun50i-a64-nanopi-a64.dts
index 31884dbc88..03ebe3e44b 100644
--- a/arch/arm/dts/sun50i-a64-nanopi-a64.dts
+++ b/arch/arm/dts/sun50i-a64-nanopi-a64.dts
@@ -102,7 +102,7 @@
&emac {
pinctrl-names = "default";
pinctrl-0 = <&rgmii_pins>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-handle = <&ext_rgmii_phy>;
phy-supply = <&reg_dcdc1>;
status = "okay";
diff --git a/arch/arm/dts/sun50i-a64-oceanic-5205-5inmfd.dts b/arch/arm/dts/sun50i-a64-oceanic-5205-5inmfd.dts
index 6a2154525d..94caf110ab 100644
--- a/arch/arm/dts/sun50i-a64-oceanic-5205-5inmfd.dts
+++ b/arch/arm/dts/sun50i-a64-oceanic-5205-5inmfd.dts
@@ -30,7 +30,7 @@
&emac {
pinctrl-names = "default";
pinctrl-0 = <&rgmii_pins>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-handle = <&ext_rgmii_phy>;
phy-supply = <&reg_dc1sw>;
allwinner,tx-delay-ps = <600>;
diff --git a/arch/arm/dts/sun50i-a64-olinuxino.dts b/arch/arm/dts/sun50i-a64-olinuxino.dts
index f7a4bccaa5..2396d9b797 100644
--- a/arch/arm/dts/sun50i-a64-olinuxino.dts
+++ b/arch/arm/dts/sun50i-a64-olinuxino.dts
@@ -102,7 +102,7 @@
&emac {
pinctrl-names = "default";
pinctrl-0 = <&rgmii_pins>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-handle = <&ext_rgmii_phy>;
phy-supply = <&reg_dcdc1>;
allwinner,tx-delay-ps = <600>;
diff --git a/arch/arm/dts/sun50i-a64-orangepi-win.dts b/arch/arm/dts/sun50i-a64-orangepi-win.dts
index b0c64f7579..5b5d4f31b6 100644
--- a/arch/arm/dts/sun50i-a64-orangepi-win.dts
+++ b/arch/arm/dts/sun50i-a64-orangepi-win.dts
@@ -127,7 +127,7 @@
&emac {
pinctrl-names = "default";
pinctrl-0 = <&rgmii_pins>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-handle = <&ext_rgmii_phy>;
phy-supply = <&reg_gmac_3v3>;
status = "okay";
diff --git a/arch/arm/dts/sun50i-a64-pine64-plus.dts b/arch/arm/dts/sun50i-a64-pine64-plus.dts
index 24f1aac366..b09b4276f1 100644
--- a/arch/arm/dts/sun50i-a64-pine64-plus.dts
+++ b/arch/arm/dts/sun50i-a64-pine64-plus.dts
@@ -52,7 +52,7 @@
&emac {
pinctrl-names = "default";
pinctrl-0 = <&rgmii_pins>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-txid";
phy-handle = <&ext_rgmii_phy>;
status = "okay";
};
diff --git a/arch/arm/dts/sun50i-a64-sopine-baseboard.dts b/arch/arm/dts/sun50i-a64-sopine-baseboard.dts
index 53fcc9098d..4a50a18128 100644
--- a/arch/arm/dts/sun50i-a64-sopine-baseboard.dts
+++ b/arch/arm/dts/sun50i-a64-sopine-baseboard.dts
@@ -95,7 +95,7 @@
&emac {
pinctrl-names = "default";
pinctrl-0 = <&rgmii_pins>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-handle = <&ext_rgmii_phy>;
phy-supply = <&reg_dc1sw>;
status = "okay";
diff --git a/arch/arm/dts/sun50i-h5-libretech-all-h5-cc.dts b/arch/arm/dts/sun50i-h5-libretech-all-h5-cc.dts
index df1b9263ad..6e30a564c8 100644
--- a/arch/arm/dts/sun50i-h5-libretech-all-h5-cc.dts
+++ b/arch/arm/dts/sun50i-h5-libretech-all-h5-cc.dts
@@ -36,7 +36,7 @@
pinctrl-0 = <&emac_rgmii_pins>;
phy-supply = <&reg_gmac_3v3>;
phy-handle = <&ext_rgmii_phy>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
/delete-property/ allwinner,leds-active-low;
status = "okay";
};
diff --git a/arch/arm/dts/sun50i-h5-nanopi-neo-plus2.dts b/arch/arm/dts/sun50i-h5-nanopi-neo-plus2.dts
index 4f9ba53ffa..9d93fe1536 100644
--- a/arch/arm/dts/sun50i-h5-nanopi-neo-plus2.dts
+++ b/arch/arm/dts/sun50i-h5-nanopi-neo-plus2.dts
@@ -96,7 +96,7 @@
pinctrl-0 = <&emac_rgmii_pins>;
phy-supply = <&reg_gmac_3v3>;
phy-handle = <&ext_rgmii_phy>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
status = "okay";
};
diff --git a/arch/arm/dts/sun50i-h5-nanopi-neo2.dts b/arch/arm/dts/sun50i-h5-nanopi-neo2.dts
index b059e20813..e8ab8c2df5 100644
--- a/arch/arm/dts/sun50i-h5-nanopi-neo2.dts
+++ b/arch/arm/dts/sun50i-h5-nanopi-neo2.dts
@@ -75,7 +75,7 @@
pinctrl-0 = <&emac_rgmii_pins>;
phy-supply = <&reg_gmac_3v3>;
phy-handle = <&ext_rgmii_phy>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
status = "okay";
};
diff --git a/arch/arm/dts/sun50i-h5-orangepi-pc2.dts b/arch/arm/dts/sun50i-h5-orangepi-pc2.dts
index 70b5f09984..6cc567ea99 100644
--- a/arch/arm/dts/sun50i-h5-orangepi-pc2.dts
+++ b/arch/arm/dts/sun50i-h5-orangepi-pc2.dts
@@ -118,7 +118,7 @@
pinctrl-0 = <&emac_rgmii_pins>;
phy-supply = <&reg_gmac_3v3>;
phy-handle = <&ext_rgmii_phy>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
status = "okay";
};
diff --git a/arch/arm/dts/sun50i-h5-orangepi-prime.dts b/arch/arm/dts/sun50i-h5-orangepi-prime.dts
index cb44bfa598..33ab44072e 100644
--- a/arch/arm/dts/sun50i-h5-orangepi-prime.dts
+++ b/arch/arm/dts/sun50i-h5-orangepi-prime.dts
@@ -124,7 +124,7 @@
pinctrl-0 = <&emac_rgmii_pins>;
phy-supply = <&reg_gmac_3v3>;
phy-handle = <&ext_rgmii_phy>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
status = "okay";
};
diff --git a/arch/arm/dts/sun50i-h5-orangepi-zero-plus.dts b/arch/arm/dts/sun50i-h5-orangepi-zero-plus.dts
index ef5ca64442..de448ca51e 100644
--- a/arch/arm/dts/sun50i-h5-orangepi-zero-plus.dts
+++ b/arch/arm/dts/sun50i-h5-orangepi-zero-plus.dts
@@ -69,7 +69,7 @@
pinctrl-0 = <&emac_rgmii_pins>;
phy-supply = <&reg_gmac_3v3>;
phy-handle = <&ext_rgmii_phy>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
status = "okay";
};
diff --git a/arch/arm/dts/sun50i-h6-beelink-gs1.dts b/arch/arm/dts/sun50i-h6-beelink-gs1.dts
index 0dc33c90dd..024035d36e 100644
--- a/arch/arm/dts/sun50i-h6-beelink-gs1.dts
+++ b/arch/arm/dts/sun50i-h6-beelink-gs1.dts
@@ -64,7 +64,7 @@
&emac {
pinctrl-names = "default";
pinctrl-0 = <&ext_rgmii_pins>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-handle = <&ext_rgmii_phy>;
phy-supply = <&reg_aldo2>;
status = "okay";
diff --git a/arch/arm/dts/sun50i-h6-pine-h64.dts b/arch/arm/dts/sun50i-h6-pine-h64.dts
index 1898345183..13fbf26817 100644
--- a/arch/arm/dts/sun50i-h6-pine-h64.dts
+++ b/arch/arm/dts/sun50i-h6-pine-h64.dts
@@ -66,7 +66,7 @@
&emac {
pinctrl-names = "default";
pinctrl-0 = <&ext_rgmii_pins>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-handle = <&ext_rgmii_phy>;
phy-supply = <&reg_aldo2>;
allwinner,rx-delay-ps = <200>;
diff --git a/arch/arm/dts/sun7i-a20-bananapi-m1-plus.dts b/arch/arm/dts/sun7i-a20-bananapi-m1-plus.dts
index e2bfe00588..4dbcad1343 100644
--- a/arch/arm/dts/sun7i-a20-bananapi-m1-plus.dts
+++ b/arch/arm/dts/sun7i-a20-bananapi-m1-plus.dts
@@ -130,7 +130,7 @@
pinctrl-names = "default";
pinctrl-0 = <&gmac_rgmii_pins>;
phy = <&phy1>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-supply = <&reg_gmac_3v3>;
status = "okay";
diff --git a/arch/arm/dts/sun7i-a20-bananapi.dts b/arch/arm/dts/sun7i-a20-bananapi.dts
index 81bc85d398..33040c43bc 100644
--- a/arch/arm/dts/sun7i-a20-bananapi.dts
+++ b/arch/arm/dts/sun7i-a20-bananapi.dts
@@ -132,7 +132,7 @@
pinctrl-names = "default";
pinctrl-0 = <&gmac_rgmii_pins>;
phy = <&phy1>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-supply = <&reg_gmac_3v3>;
status = "okay";
diff --git a/arch/arm/dts/sun7i-a20-bananapro.dts b/arch/arm/dts/sun7i-a20-bananapro.dts
index 0176e9de01..8a75545e22 100644
--- a/arch/arm/dts/sun7i-a20-bananapro.dts
+++ b/arch/arm/dts/sun7i-a20-bananapro.dts
@@ -110,7 +110,7 @@
pinctrl-names = "default";
pinctrl-0 = <&gmac_rgmii_pins>;
phy = <&phy1>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-supply = <&reg_gmac_3v3>;
status = "okay";
diff --git a/arch/arm/dts/sun7i-a20-cubietruck.dts b/arch/arm/dts/sun7i-a20-cubietruck.dts
index 99f531b8d2..46a9f4669e 100644
--- a/arch/arm/dts/sun7i-a20-cubietruck.dts
+++ b/arch/arm/dts/sun7i-a20-cubietruck.dts
@@ -151,7 +151,7 @@
pinctrl-names = "default";
pinctrl-0 = <&gmac_rgmii_pins>;
phy = <&phy1>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
status = "okay";
phy1: ethernet-phy@1 {
diff --git a/arch/arm/dts/sun7i-a20-hummingbird.dts b/arch/arm/dts/sun7i-a20-hummingbird.dts
index fd0153f656..5c3d107094 100644
--- a/arch/arm/dts/sun7i-a20-hummingbird.dts
+++ b/arch/arm/dts/sun7i-a20-hummingbird.dts
@@ -101,7 +101,7 @@
pinctrl-names = "default";
pinctrl-0 = <&gmac_rgmii_pins>;
phy = <&phy1>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-supply = <&reg_gmac_vdd>;
/* phy reset config */
snps,reset-gpio = <&pio 0 17 GPIO_ACTIVE_HIGH>; /* PA17 */
diff --git a/arch/arm/dts/sun7i-a20-lamobo-r1.dts b/arch/arm/dts/sun7i-a20-lamobo-r1.dts
index f91e1bee44..8173d77c12 100644
--- a/arch/arm/dts/sun7i-a20-lamobo-r1.dts
+++ b/arch/arm/dts/sun7i-a20-lamobo-r1.dts
@@ -120,7 +120,7 @@
&gmac {
pinctrl-names = "default";
pinctrl-0 = <&gmac_rgmii_pins>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-supply = <&reg_gmac_3v3>;
status = "okay";
/delete-property/#address-cells;
diff --git a/arch/arm/dts/sun7i-a20-olimex-som-evb.dts b/arch/arm/dts/sun7i-a20-olimex-som-evb.dts
index f0e6a96e57..f0c5160ff8 100644
--- a/arch/arm/dts/sun7i-a20-olimex-som-evb.dts
+++ b/arch/arm/dts/sun7i-a20-olimex-som-evb.dts
@@ -112,7 +112,7 @@
pinctrl-names = "default";
pinctrl-0 = <&gmac_rgmii_pins>;
phy = <&phy1>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
status = "okay";
phy1: ethernet-phy@1 {
diff --git a/arch/arm/dts/sun7i-a20-olimex-som204-evb.dts b/arch/arm/dts/sun7i-a20-olimex-som204-evb.dts
index 823aabce04..ff42708137 100644
--- a/arch/arm/dts/sun7i-a20-olimex-som204-evb.dts
+++ b/arch/arm/dts/sun7i-a20-olimex-som204-evb.dts
@@ -106,7 +106,7 @@
pinctrl-names = "default";
pinctrl-0 = <&gmac_rgmii_pins>;
phy = <&phy3>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-supply = <&reg_vcc3v3>;
snps,reset-gpio = <&pio 0 17 GPIO_ACTIVE_HIGH>;
diff --git a/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
index 4e1c590eb0..996201665b 100644
--- a/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
+++ b/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
@@ -112,7 +112,7 @@
pinctrl-names = "default";
pinctrl-0 = <&gmac_rgmii_pins>;
phy = <&phy1>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
status = "okay";
phy1: ethernet-phy@1 {
diff --git a/arch/arm/dts/sun7i-a20-orangepi-mini.dts b/arch/arm/dts/sun7i-a20-orangepi-mini.dts
index 15881081ca..b80215c61c 100644
--- a/arch/arm/dts/sun7i-a20-orangepi-mini.dts
+++ b/arch/arm/dts/sun7i-a20-orangepi-mini.dts
@@ -121,7 +121,7 @@
pinctrl-names = "default";
pinctrl-0 = <&gmac_rgmii_pins>;
phy = <&phy1>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-supply = <&reg_gmac_3v3>;
status = "okay";
diff --git a/arch/arm/dts/sun7i-a20-orangepi.dts b/arch/arm/dts/sun7i-a20-orangepi.dts
index d64de2e73a..66efb7d1ab 100644
--- a/arch/arm/dts/sun7i-a20-orangepi.dts
+++ b/arch/arm/dts/sun7i-a20-orangepi.dts
@@ -97,7 +97,7 @@
pinctrl-names = "default";
pinctrl-0 = <&gmac_rgmii_pins>;
phy = <&phy1>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-supply = <&reg_gmac_3v3>;
status = "okay";
diff --git a/arch/arm/dts/sun7i-a20-pcduino3-nano.dts b/arch/arm/dts/sun7i-a20-pcduino3-nano.dts
index 538ea15fa3..205eaae44a 100644
--- a/arch/arm/dts/sun7i-a20-pcduino3-nano.dts
+++ b/arch/arm/dts/sun7i-a20-pcduino3-nano.dts
@@ -115,7 +115,7 @@
pinctrl-names = "default";
pinctrl-0 = <&gmac_rgmii_pins>;
phy = <&phy1>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
status = "okay";
phy1: ethernet-phy@1 {
diff --git a/arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts b/arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts
index c27e56091f..56cc5791c4 100644
--- a/arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts
+++ b/arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts
@@ -82,7 +82,7 @@
pinctrl-names = "default";
pinctrl-0 = <&gmac_rgmii_pins>;
phy = <&phy1>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
status = "okay";
phy1: ethernet-phy@1 {
diff --git a/arch/arm/dts/sun8i-a83t-bananapi-m3.dts b/arch/arm/dts/sun8i-a83t-bananapi-m3.dts
index eaff6fa401..2beafe3a31 100644
--- a/arch/arm/dts/sun8i-a83t-bananapi-m3.dts
+++ b/arch/arm/dts/sun8i-a83t-bananapi-m3.dts
@@ -123,7 +123,7 @@
pinctrl-0 = <&emac_rgmii_pins>;
phy-supply = <&reg_sw>;
phy-handle = <&rgmii_phy>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
allwinner,rx-delay-ps = <700>;
allwinner,tx-delay-ps = <700>;
status = "okay";
diff --git a/arch/arm/dts/sun8i-a83t-cubietruck-plus.dts b/arch/arm/dts/sun8i-a83t-cubietruck-plus.dts
index 5dba4fc310..ecd9ff38a8 100644
--- a/arch/arm/dts/sun8i-a83t-cubietruck-plus.dts
+++ b/arch/arm/dts/sun8i-a83t-cubietruck-plus.dts
@@ -160,7 +160,7 @@
pinctrl-0 = <&emac_rgmii_pins>;
phy-supply = <&reg_dldo4>;
phy-handle = <&rgmii_phy>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
status = "okay";
};
diff --git a/arch/arm/dts/sun8i-h3-nanopi-m1-plus.dts b/arch/arm/dts/sun8i-h3-nanopi-m1-plus.dts
index 4ba533b034..bc370d4ea1 100644
--- a/arch/arm/dts/sun8i-h3-nanopi-m1-plus.dts
+++ b/arch/arm/dts/sun8i-h3-nanopi-m1-plus.dts
@@ -96,7 +96,7 @@
pinctrl-0 = <&emac_rgmii_pins>;
phy-supply = <&reg_gmac_3v3>;
phy-handle = <&ext_rgmii_phy>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
status = "okay";
};
diff --git a/arch/arm/dts/sun8i-h3-orangepi-plus.dts b/arch/arm/dts/sun8i-h3-orangepi-plus.dts
index 97f497854e..d05fa679dc 100644
--- a/arch/arm/dts/sun8i-h3-orangepi-plus.dts
+++ b/arch/arm/dts/sun8i-h3-orangepi-plus.dts
@@ -85,7 +85,7 @@
pinctrl-0 = <&emac_rgmii_pins>;
phy-supply = <&reg_gmac_3v3>;
phy-handle = <&ext_rgmii_phy>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
status = "okay";
};
diff --git a/arch/arm/dts/sun8i-h3-orangepi-plus2e.dts b/arch/arm/dts/sun8i-h3-orangepi-plus2e.dts
index 6dbf7b2e0c..b6ca45d18e 100644
--- a/arch/arm/dts/sun8i-h3-orangepi-plus2e.dts
+++ b/arch/arm/dts/sun8i-h3-orangepi-plus2e.dts
@@ -67,7 +67,7 @@
pinctrl-0 = <&emac_rgmii_pins>;
phy-supply = <&reg_gmac_3v3>;
phy-handle = <&ext_rgmii_phy>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
status = "okay";
};
diff --git a/arch/arm/dts/sun8i-r40-bananapi-m2-ultra.dts b/arch/arm/dts/sun8i-r40-bananapi-m2-ultra.dts
index c488aaacbd..9c20245eef 100644
--- a/arch/arm/dts/sun8i-r40-bananapi-m2-ultra.dts
+++ b/arch/arm/dts/sun8i-r40-bananapi-m2-ultra.dts
@@ -129,7 +129,7 @@
pinctrl-names = "default";
pinctrl-0 = <&gmac_rgmii_pins>;
phy-handle = <&phy1>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-supply = <&reg_dc1sw>;
status = "okay";
};
diff --git a/arch/arm/dts/sun8i-v40-bananapi-m2-berry.dts b/arch/arm/dts/sun8i-v40-bananapi-m2-berry.dts
index 15c22b06fc..3ab6f47cea 100644
--- a/arch/arm/dts/sun8i-v40-bananapi-m2-berry.dts
+++ b/arch/arm/dts/sun8i-v40-bananapi-m2-berry.dts
@@ -120,7 +120,7 @@
pinctrl-names = "default";
pinctrl-0 = <&gmac_rgmii_pins>;
phy-handle = <&phy1>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-supply = <&reg_dc1sw>;
status = "okay";
};
diff --git a/arch/arm/dts/sunxi-bananapi-m2-plus.dtsi b/arch/arm/dts/sunxi-bananapi-m2-plus.dtsi
index 39263e74fb..8e5cb3b3fd 100644
--- a/arch/arm/dts/sunxi-bananapi-m2-plus.dtsi
+++ b/arch/arm/dts/sunxi-bananapi-m2-plus.dtsi
@@ -126,7 +126,7 @@
pinctrl-0 = <&emac_rgmii_pins>;
phy-supply = <&reg_gmac_3v3>;
phy-handle = <&ext_rgmii_phy>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
status = "okay";
};
--
2.28.0

File diff suppressed because it is too large Load Diff

View File

@ -1,45 +0,0 @@
From 6bf15552c2b6becb48ce7732120e0ddb2078cb1a Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Tue, 14 Apr 2020 09:53:07 +0100
Subject: [PATCH 9/9] initial pinetab support
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
configs/pinetab_defconfig | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
create mode 100644 configs/pinetab_defconfig
diff --git a/configs/pinetab_defconfig b/configs/pinetab_defconfig
new file mode 100644
index 0000000000..5b9620f3e5
--- /dev/null
+++ b/configs/pinetab_defconfig
@@ -0,0 +1,26 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_SPL=y
+CONFIG_MACH_SUN50I=y
+CONFIG_SUNXI_DRAM_LPDDR3_STOCK=y
+CONFIG_DRAM_CLK=552
+CONFIG_DRAM_ZQ=3881949
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+CONFIG_R_I2C_ENABLE=y
+CONFIG_SPL_SPI_SUNXI=y
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_USE_PREBOOT=y
+# CONFIG_SPL_DOS_PARTITION is not set
+# CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pinetab"
+CONFIG_OF_LIST="sun50i-a64-pinetab"
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_PWM=y
+CONFIG_PWM_SUNXI=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
--
2.26.0

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,16 @@
a64-olinuxino
a64-olinuxino-emmc
amarula_a64_relic
apple_m1
bananapi_m2_plus_h5
bananapi_m64
beelink_gs1
dragonboard410c
dragonboard820c
espresso7420
dragonboard845c
eaidk-610-rk3399
emlid_neutis_n5_devboard
evb-px5
evb-rk3328
evb-rk3399
ficus-rk3399
@ -12,12 +18,13 @@ firefly-rk3399
geekbox
hikey
khadas-edge-captain-rk3399
khadas-edge-v-rk3399
khadas-edge-rk3399
khadas-edge-v-rk3399
khadas-vim
khadas-vim2
khadas-vim3
khadas-vim3l
leez-rk3399
libretech-ac
libretech_all_h3_cc_h5
libretech_all_h3_it_h5
@ -28,18 +35,30 @@ mvebu_mcbin-88f8040
nanopc-t4-rk3399
nanopi_a64
nanopi-k2
nanopi-m4-rk3399
nanopi-m4-2gb-rk3399
nanopi-m4b-rk3399
nanopi-m4-rk3399
nanopi_neo2
nanopi-neo4-rk3399
nanopi_neo_plus2
nanopi_r1s_h5
nanopi-r2c-plus-rk3328
nanopi-r2c-rk3328
nanopi-r2s-rk3328
nanopi-r4s-rk3399
oceanic_5205_5inmfd
odroid-c2
orangepi_3
orangepi_lite2
orangepi_one_plus
orangepi_pc2
orangepi_prime
orangepi-r1-plus-lts-rk3328
orangepi-r1-plus-rk3328
orangepi-rk3399
orangepi_win
orangepi_zero2
orangepi_zero3
orangepi_zero_plus
orangepi_zero_plus2
p212
@ -50,26 +69,32 @@ pine64-lts
pine64_plus
pinebook
pinebook-pro-rk3399
pinephone
pinetab
pine_h64
pinephone
pinephone-pro-rk3399
pinetab
poplar
puma-rk3399
qemu_arm64
roc-cc-rk3328
rock-4c-plus-rk3399
rock-4se-rk3399
rock64-rk3328
rock960-rk3399
rock-pi-4-rk3399
rock-pi-4c-rk3399
rock-pi-4-rk3399
rock-pi-e-rk3328
rock-pi-n10-rk3399pro
rockpro64-rk3399
roc-cc-rk3328
roc-pc-rk3399
roc-pc-mezzanine-rk3399
rpi_3
rpi_4
roc-pc-rk3399
rpi_arm64
sopine_baseboard
starqltechn
tanix_tx6
teres_i
transpeed-8k618-t
turris_mox
vexpress_aemv8a_juno
x96_mate
xilinx_zynqmp_virt

View File

View File

@ -1,143 +0,0 @@
A10-OLinuXino-Lime
A10s-OLinuXino-M
A13-OLinuXino
A13-OLinuXinoM
A20-Olimex-SOM-EVB
A20-OLinuXino-Lime
A20-OLinuXino-Lime2
A20-OLinuXino_MICRO
am335x_evm
am57xx_evm
Ampe_A76
apalis_imx6
arndale
Auxtek-T003
Auxtek-T004
ba10_tv_box
Bananapi
bananapi_m1_plus
bananapi_m2_berry
Bananapi_m2m
bananapi_m2_plus_h3
Bananapi_M2_Ultra
bananapi_m2_zero
Bananapro
chiliboard
CHIP
Chuwi_V7_CW0825
clearfog
cm_fx6
Colombus
colorfly_e708_q1
CSQ_CS908
Cubieboard
Cubieboard2
Cubieboard4
Cubietruck
Cubietruck_plus
db-mv784mp-gp
difrnce_dit4350
dserve_dsrv9703c
evb-rk3229
firefly-rk3288
helios4
Hummingbird_A31
Hyundai_A7HD
i12-tvbox
icnova-a20-swac
inet1
iNet_3F
iNet_3W
inet86dz
iNet_86VS
inet97fv2
inet98v_rev2
inet9f_rev03
inet_q972
Itead_Ibox_A20
jesurun_q5
jetson-tk1
kc1
Lamobo_R1
libretech_all_h3_cc_h2_plus
Linksprite_pcDuino
Linksprite_pcDuino3
Linksprite_pcDuino3_Nano
liteboard
marsboard
Marsboard_A10
Mele_A1000
Mele_A1000G_quad
Mele_I7
Mele_M3
Mele_M5
Mele_M9
Mini-X
mk802
mk802_a10s
mk802ii
MK808C
MSI_Primo73
MSI_Primo81
mx6cuboxi
nanopi_m1
nanopi_m1_plus
nanopi_neo
novena
odroid
odroid-xu3
omap3_beagle
omap4_panda
omap5_uevm
Orangepi
orangepi_2
orangepi_lite
Orangepi_mini
orangepi_one
orangepi_pc
orangepi_pc_plus
orangepi_plus
orangepi_plus2e
orangepi_r1
orangepi_zero
origen
paz00
pinecube
polaroid_mid2809pxe04
pov_protab2_ips9
q8_a13_tablet
q8_a23_tablet_800x480
q8_a33_tablet_1024x600
q8_a33_tablet_800x480
qemu_arm
r7-tv-dongle
riotboard
rock
rock-pi-n8-rk3288
rock2
rpi_2
rpi_3_32b
rpi_4_32b
Sinlinx_SinA31s
Sinovoip_BPI_M2
Sinovoip_BPI_M3
stih410-b2260
stm32mp15_basic
sunxi_Gemei_G9
tbs_a711
tinker-rk3288
tinker-s-rk3288
trimslice
udoo
udoo_neo
usbarmory
UTOO_P66
vexpress_ca15_tc2
vexpress_ca9x4
wandboard
warp
warp7
Wexler_TAB7200
Wits_Pro_A20_DKT
Yones_Toptech_BS1078_V2
xilinx_zynq_virt

View File

@ -1,8 +0,0 @@
chromebit_mickey_defconfig
chromebook_jerry_defconfig
chromebook_minnie_defconfig
nyan-big_defconfig
peach-pi_defconfig
peach-pit_defconfig
snow_defconfig
spring_defconfig

View File

@ -1,135 +0,0 @@
From 5cb3ca7ebd46c1983d0929b5ba027a03c1f5e51e Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Wed, 16 Dec 2020 15:22:34 +0000
Subject: [PATCH 1/2] arm: dts: rockchip: rk3399: enable rng at the SoC level
The rng is embedded in the SoC so enable it in the device tree
universally, the use of it can be controlled by enabling/disabling
at the device config level.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
arch/arm/dts/rk3399-evb-u-boot.dtsi | 4 ----
arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi | 4 ----
arch/arm/dts/rk3399-rockpro64-u-boot.dtsi | 4 ----
arch/arm/dts/rk3399-u-boot.dtsi | 2 +-
4 files changed, 1 insertion(+), 13 deletions(-)
diff --git a/arch/arm/dts/rk3399-evb-u-boot.dtsi b/arch/arm/dts/rk3399-evb-u-boot.dtsi
index 8056dc843e..398b205ec2 100644
--- a/arch/arm/dts/rk3399-evb-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-evb-u-boot.dtsi
@@ -13,10 +13,6 @@
};
};
-&rng {
- status = "okay";
-};
-
&i2c0 {
u-boot,dm-pre-reloc;
};
diff --git a/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi b/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi
index ded7db0aef..c3e866a779 100644
--- a/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi
@@ -28,10 +28,6 @@
u-boot,dm-pre-reloc;
};
-&rng {
- status = "okay";
-};
-
&sdhci {
max-frequency = <25000000>;
u-boot,dm-pre-reloc;
diff --git a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi
index 6317b47e41..37dff04adf 100644
--- a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi
@@ -15,10 +15,6 @@
};
};
-&rng {
- status = "okay";
-};
-
&spi1 {
spi_flash: flash@0 {
u-boot,dm-pre-reloc;
diff --git a/arch/arm/dts/rk3399-u-boot.dtsi b/arch/arm/dts/rk3399-u-boot.dtsi
index ecd230c720..73922c328a 100644
--- a/arch/arm/dts/rk3399-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-u-boot.dtsi
@@ -32,7 +32,7 @@
rng: rng@ff8b8000 {
compatible = "rockchip,cryptov1-rng";
reg = <0x0 0xff8b8000 0x0 0x1000>;
- status = "disabled";
+ status = "okay";
};
dmc: dmc {
--
2.29.2
From 62093137fcbe760d009cf2757feda7ccf328fbb7 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Wed, 16 Dec 2020 15:37:21 +0000
Subject: [PATCH 2/2] configs: rk3399: enable rng on firefly/rock960/rockpro64
Enable the RNG on the Firefly, rock960 and RockPro64 devices
to enable KASLR on devices that support it.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
configs/firefly-rk3399_defconfig | 2 ++
configs/rock960-rk3399_defconfig | 2 ++
configs/rockpro64-rk3399_defconfig | 2 ++
3 files changed, 6 insertions(+)
diff --git a/configs/firefly-rk3399_defconfig b/configs/firefly-rk3399_defconfig
index c453b82dc5..cfbaae40aa 100644
--- a/configs/firefly-rk3399_defconfig
+++ b/configs/firefly-rk3399_defconfig
@@ -35,6 +35,8 @@ CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_ROCKCHIP=y
+CONFIG_DM_RNG=y
+CONFIG_RNG_ROCKCHIP=y
CONFIG_SF_DEFAULT_SPEED=20000000
CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/rock960-rk3399_defconfig b/configs/rock960-rk3399_defconfig
index 65dce3cd73..aadbc55f57 100644
--- a/configs/rock960-rk3399_defconfig
+++ b/configs/rock960-rk3399_defconfig
@@ -39,6 +39,8 @@ CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_SDMA=y
CONFIG_MMC_SDHCI_ROCKCHIP=y
+CONFIG_DM_RNG=y
+CONFIG_RNG_ROCKCHIP=y
CONFIG_DM_ETH=y
CONFIG_NVME=y
CONFIG_PCI=y
diff --git a/configs/rockpro64-rk3399_defconfig b/configs/rockpro64-rk3399_defconfig
index 575b7a20d5..f78dfcc8f7 100644
--- a/configs/rockpro64-rk3399_defconfig
+++ b/configs/rockpro64-rk3399_defconfig
@@ -42,6 +42,8 @@ CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_ROCKCHIP=y
+CONFIG_DM_RNG=y
+CONFIG_RNG_ROCKCHIP=y
CONFIG_SF_DEFAULT_BUS=1
CONFIG_SPI_FLASH_GIGADEVICE=y
CONFIG_DM_ETH=y
--
2.29.2

View File

@ -0,0 +1,28 @@
From 02513d9ecc38d11ffc051ed59529e11f82164785 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Fri, 18 Aug 2023 13:28:05 +0100
Subject: [PATCH] disable VBE by default
Fedora doesn't support the VBE boot method, disable it
to reduce size and remove a possible boot attack vector.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
boot/Kconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/boot/Kconfig b/boot/Kconfig
index e8fb03b8016..467b09e2350 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -526,7 +526,6 @@ config BOOTMETH_EFILOADER
config BOOTMETH_VBE
bool "Bootdev support for Verified Boot for Embedded"
depends on FIT
- default y
select BOOTMETH_GLOBAL
select EVENT
help
--
2.41.0

View File

@ -1,115 +0,0 @@
From 8b0274a733cd1ce39ad9ad18e1bd8efdd02a40b7 Mon Sep 17 00:00:00 2001
From: Rob Clark <robdclark@gmail.com>
Date: Wed, 21 Jun 2017 14:21:15 -0400
Subject: [PATCH 1/3] WIP: fix usb
---
common/usb_storage.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/usb_storage.c b/common/usb_storage.c
index d92ebb6eb19..9df3c3daaf4 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -1016,7 +1016,7 @@ static int usb_request_sense(struct scsi_cmd *srb, struct us_data *ss)
static int usb_test_unit_ready(struct scsi_cmd *srb, struct us_data *ss)
{
- int retries = 10;
+ int retries = 20;
do {
memset(&srb->cmd[0], 0, 12);
@@ -1039,7 +1039,7 @@ static int usb_test_unit_ready(struct scsi_cmd *srb, struct us_data *ss)
if ((srb->sense_buf[2] == 0x02) &&
(srb->sense_buf[12] == 0x3a))
return -1;
- mdelay(100);
+ mdelay(250);
} while (retries--);
return -1;
--
2.19.1
From 7bf41d74ca9d58bc2243b7688f8987c1d373ea56 Mon Sep 17 00:00:00 2001
From: Rob Clark <robdclark@gmail.com>
Date: Mon, 3 Jul 2017 08:34:37 -0400
Subject: [PATCH 2/3] HACK: disable emmc
Hitting some timeout which makes boot take much longer. And
uefi/boot/rootfs partitions will be on sd-card or usb disk, etc,
so we can just ignore emmc.
---
arch/arm/dts/dragonboard410c.dts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/dts/dragonboard410c.dts b/arch/arm/dts/dragonboard410c.dts
index fa348bc621e..bfe7f15d5ed 100644
--- a/arch/arm/dts/dragonboard410c.dts
+++ b/arch/arm/dts/dragonboard410c.dts
@@ -106,6 +106,7 @@
#phy-cells = <0>;
};
+/*
sdhci@07824000 {
compatible = "qcom,sdhci-msm-v4";
reg = <0x7824900 0x11c 0x7824000 0x800>;
@@ -115,6 +116,7 @@
clock = <&clkc 0>;
clock-frequency = <100000000>;
};
+*/
sdhci@07864000 {
compatible = "qcom,sdhci-msm-v4";
--
2.19.1
From 871fe802cf3ab593b9332c4f36ab2b3f179d51ae Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Tue, 4 Sep 2018 12:21:59 +0100
Subject: [PATCH 3/3] add options for dm410c config
---
configs/dragonboard410c_defconfig | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/configs/dragonboard410c_defconfig b/configs/dragonboard410c_defconfig
index a55abaf8df5..4ece0cafbe4 100644
--- a/configs/dragonboard410c_defconfig
+++ b/configs/dragonboard410c_defconfig
@@ -7,6 +7,8 @@ CONFIG_NR_DRAM_BANKS=1
# CONFIG_ANDROID_BOOT_IMAGE is not set
CONFIG_FIT=y
CONFIG_OF_BOARD_SETUP=y
+CONFIG_FAT_WRITE=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
CONFIG_MISC_INIT_R=y
# CONFIG_DISPLAY_CPUINFO is not set
# CONFIG_DISPLAY_BOARDINFO is not set
@@ -41,6 +43,13 @@ CONFIG_DM_PMIC=y
CONFIG_PMIC_PM8916=y
CONFIG_MSM_SERIAL=y
CONFIG_SPMI_MSM=y
+CONFIG_DM_ETH=y
+CONFIG_DM_KEYBOARD=y
+CONFIG_DM_VIDEO=y
+# CONFG_VIDEO_BPP8 is not set
+CONFIG_NO_FB_CLEAR=y
+CONFIG_VIDEO_SIMPLE=y
+CONFIG_USB_KEYBOARD=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_EHCI_HCD=y
@@ -57,5 +66,6 @@ CONFIG_USB_HOST_ETHER=y
CONFIG_USB_ETHER_ASIX=y
CONFIG_USB_ETHER_ASIX88179=y
CONFIG_USB_ETHER_MCS7830=y
+CONFIG_USB_ETHER_RTL8152=y
CONFIG_USB_ETHER_SMSC95XX=y
CONFIG_OF_LIBFDT_OVERLAY=y
--
2.19.1

View File

@ -0,0 +1,49 @@
From a956480a6d52ae90ef4a46275c2ee29a4074de36 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Fri, 18 Aug 2023 23:10:42 +0100
Subject: [PATCH] enable bootmenu by default
We want the boot menu on all Fedora devices as it makes
it a whole lot more user friendly.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
boot/Kconfig | 2 ++
cmd/Kconfig | 1 +
2 files changed, 3 insertions(+)
diff --git a/boot/Kconfig b/boot/Kconfig
index 467b09e2350..ad67b1f65a6 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -1281,6 +1281,7 @@ config BOOTDELAY
config AUTOBOOT_KEYED
bool "Stop autobooting via specific input key / string"
+ default y
help
This option enables stopping (aborting) of the automatic
boot feature only by issuing a specific input key or
@@ -1433,6 +1434,7 @@ config AUTOBOOT_MENUKEY
config AUTOBOOT_MENU_SHOW
bool "Show a menu on boot"
+ default y
depends on CMD_BOOTMENU
help
This enables the boot menu, controlled by environment variables
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 43ca10f69cc..3d39f2914cc 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -413,6 +413,7 @@ source lib/efi_selftest/Kconfig
config CMD_BOOTMENU
bool "bootmenu"
+ default y
select MENU
select CHARSET
help
--
2.41.0

View File

@ -0,0 +1,81 @@
diff --git a/configs/qemu-riscv64_defconfig b/configs/qemu-riscv64_defconfig
index b8ccf8f4..c4463115 100644
--- a/configs/qemu-riscv64_defconfig
+++ b/configs/qemu-riscv64_defconfig
@@ -20,3 +20,12 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_DM_MTD=y
CONFIG_FLASH_SHOW_PROGRESS=0
CONFIG_SYS_MAX_FLASH_BANKS=2
+CONFIG_NR_CPUS=32
+CONFIG_USE_PREBOOT=y
+CONFIG_PREBOOT="cp.l ${fdtcontroladdr} ${fdt_addr_r} 0x20000;"
+CONFIG_CMD_SBI=y
+CONFIG_SYSRESET=y
+CONFIG_SYSRESET_SBI=y
+CONFIG_CMD_POWEROFF=y
+CONFIG_SYSRESET_CMD_POWEROFF=y
+CONFIG_FS_BTRFS=y
diff --git a/configs/qemu-riscv64_smode_defconfig b/configs/qemu-riscv64_smode_defconfig
index 6baad1de..71c443d2 100644
--- a/configs/qemu-riscv64_smode_defconfig
+++ b/configs/qemu-riscv64_smode_defconfig
@@ -23,3 +23,8 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_DM_MTD=y
CONFIG_FLASH_SHOW_PROGRESS=0
CONFIG_SYS_MAX_FLASH_BANKS=2
+CONFIG_CMD_SBI=y
+CONFIG_SYSRESET=y
+CONFIG_SYSRESET_SBI=y
+CONFIG_CMD_POWEROFF=y
+CONFIG_SYSRESET_CMD_POWEROFF=y
diff --git a/configs/qemu-riscv64_spl_defconfig b/configs/qemu-riscv64_spl_defconfig
index f663a137..5365b874 100644
--- a/configs/qemu-riscv64_spl_defconfig
+++ b/configs/qemu-riscv64_spl_defconfig
@@ -25,3 +25,6 @@ CONFIG_DM_MTD=y
CONFIG_FLASH_SHOW_PROGRESS=0
CONFIG_SYS_MAX_FLASH_BANKS=2
# CONFIG_BINMAN_FDT is not set
+CONFIG_NR_CPUS=32
+CONFIG_USE_PREBOOT=y
+CONFIG_PREBOOT="cp.l ${fdtcontroladdr} ${fdt_addr_r} 0x20000;"
diff --git a/configs/sifive_unleashed_defconfig b/configs/sifive_unleashed_defconfig
index f68171c9..9ff2666c 100644
--- a/configs/sifive_unleashed_defconfig
+++ b/configs/sifive_unleashed_defconfig
@@ -40,3 +40,8 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_SPL_DM_SEQ_ALIAS=y
CONFIG_SPL_CLK=y
CONFIG_DM_MTD=y
+CONFIG_CMD_SBI=y
+CONFIG_SYSRESET=y
+CONFIG_SYSRESET_SBI=y
+CONFIG_CMD_POWEROFF=y
+CONFIG_SYSRESET_CMD_POWEROFF=y
diff --git a/configs/sifive_unmatched_defconfig b/configs/sifive_unmatched_defconfig
index 7c6c5b4d..c822f9d5 100644
--- a/configs/sifive_unmatched_defconfig
+++ b/configs/sifive_unmatched_defconfig
@@ -63,3 +63,9 @@ CONFIG_SCSI=y
CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_PCI=y
+CONFIG_CMD_SBI=y
+CONFIG_SYSRESET=y
+CONFIG_SYSRESET_SBI=y
+CONFIG_CMD_POWEROFF=y
+CONFIG_SYSRESET_CMD_POWEROFF=y
+CONFIG_FS_BTRFS=y
diff --git a/include/configs/qemu-riscv.h b/include/configs/qemu-riscv.h
index 2f594bfc..c3ce49ba 100644
--- a/include/configs/qemu-riscv.h
+++ b/include/configs/qemu-riscv.h
@@ -31,8 +31,6 @@
#define CFG_EXTRA_ENV_SETTINGS \
CFG_STD_DEVICES_SETTINGS \
- "fdt_high=0xffffffffffffffff\0" \
- "initrd_high=0xffffffffffffffff\0" \
"kernel_addr_r=0x84000000\0" \
"kernel_comp_addr_r=0x88000000\0" \
"kernel_comp_size=0x4000000\0" \

View File

@ -0,0 +1,572 @@
From patchwork Sun Feb 25 22:10:19 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Jonas Karlman <jonas@kwiboo.se>
X-Patchwork-Id: 1903989
X-Patchwork-Delegate: ykai007@gmail.com
Return-Path: <u-boot-bounces@lists.denx.de>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.ozlabs.org;
dkim=pass (2048-bit key;
secure) header.d=kwiboo.se header.i=@kwiboo.se header.a=rsa-sha256
header.s=fe-e1b5cab7be header.b=yOZt1tiR;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de
(client-ip=85.214.62.61; helo=phobos.denx.de;
envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)
Received: from phobos.denx.de (phobos.denx.de [85.214.62.61])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384)
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4TjdHl4wttz23cw
for <incoming@patchwork.ozlabs.org>; Mon, 26 Feb 2024 09:11:15 +1100 (AEDT)
Received: from h2850616.stratoserver.net (localhost [IPv6:::1])
by phobos.denx.de (Postfix) with ESMTP id 91BCF87E23;
Sun, 25 Feb 2024 23:10:57 +0100 (CET)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=none dis=none) header.from=kwiboo.se
Authentication-Results: phobos.denx.de;
spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de
Authentication-Results: phobos.denx.de;
dkim=pass (2048-bit key;
secure) header.d=kwiboo.se header.i=@kwiboo.se header.b="yOZt1tiR";
dkim-atps=neutral
Received: by phobos.denx.de (Postfix, from userid 109)
id BFA6B87DA4; Sun, 25 Feb 2024 23:10:53 +0100 (CET)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de
X-Spam-Level:
X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,
T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2
Received: from smtp.forwardemail.net (smtp.forwardemail.net [149.28.215.223])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(No client certificate requested)
by phobos.denx.de (Postfix) with ESMTPS id 217BA87DFA
for <u-boot@lists.denx.de>; Sun, 25 Feb 2024 23:10:49 +0100 (CET)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=none dis=none) header.from=kwiboo.se
Authentication-Results: phobos.denx.de; spf=pass
smtp.mailfrom=SRS0=31c0=KD=kwiboo.se=jonas@fe-bounces.kwiboo.se
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se;
h=Content-Transfer-Encoding: MIME-Version: References: In-Reply-To:
Message-ID: Date: Subject: Cc: To: From; q=dns/txt; s=fe-e1b5cab7be;
t=1708899036; bh=AzFTi2bcYYAtXfClfRKD6v/Yh+iTeLs39b0UoXgmBwI=;
b=yOZt1tiRwOXYRO3mwXmOiJo897JN79a+B1jEzPSXrDGT/XlOaEYuhCBCO4IIUTSOg1irZCZD0
XierFKG1DECIT3JlIXV16mU6P9Dsg/amgtgJp8QQmuACEJ6JERBNINdt0i7+i0oUF0bmiYupJ+U
VY5LPHhscKquVc3LCEo/DcIMMX+gh3zOF15G4QPE6ldeQbs/Ys4bqYQ/cMe+X4ijANkou6hqNSw
VY/TylYiKqrMyUW8SKJ6oXRxluNhrYpWWde3hoCc0zjTEWW9dGzSbxX8NLmmhqTT0uGKH6/RrB0
nNeuIgaMGTk7jCCUtbi4Vp99P9HYFnlfmTRXoVLEofxw==
From: Jonas Karlman <jonas@kwiboo.se>
To: Kever Yang <kever.yang@rock-chips.com>, Simon Glass <sjg@chromium.org>,
Philipp Tomsich <philipp.tomsich@vrull.eu>, Tom Rini <trini@konsulko.com>,
Ren Jianing <jianing.ren@rock-chips.com>, Manoj Sai
<abbaraju.manojsai@amarulasolutions.com>, Jagan Teki
<jagan@amarulasolutions.com>, Eugen Hristev <eugen.hristev@collabora.com>,
Frank Wang <frank.wang@rock-chips.com>, Xavier Drudis Ferran
<xdrudis@tinet.cat>
Cc: u-boot@lists.denx.de, Jonas Karlman <jonas@kwiboo.se>
Subject: [PATCH 1/2] phy: rockchip-inno-usb2: Write to correct GRF
Date: Sun, 25 Feb 2024 22:10:19 +0000
Message-ID: <20240225221024.1974853-2-jonas@kwiboo.se>
X-Mailer: git-send-email 2.43.0
In-Reply-To: <20240225221024.1974853-1-jonas@kwiboo.se>
References: <20240225221024.1974853-1-jonas@kwiboo.se>
MIME-Version: 1.0
X-Report-Abuse-To: abuse@forwardemail.net
X-Report-Abuse: abuse@forwardemail.net
X-Complaints-To: abuse@forwardemail.net
X-ForwardEmail-Version: 0.4.40
X-ForwardEmail-Sender: rfc822; jonas@kwiboo.se, smtp.forwardemail.net,
149.28.215.223
X-ForwardEmail-ID: 65dbbada46c899733a83b3ec
X-BeenThere: u-boot@lists.denx.de
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: U-Boot discussion <u-boot.lists.denx.de>
List-Unsubscribe: <https://lists.denx.de/options/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>
List-Archive: <https://lists.denx.de/pipermail/u-boot/>
List-Post: <mailto:u-boot@lists.denx.de>
List-Help: <mailto:u-boot-request@lists.denx.de?subject=help>
List-Subscribe: <https://lists.denx.de/listinfo/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=subscribe>
Errors-To: u-boot-bounces@lists.denx.de
Sender: "U-Boot" <u-boot-bounces@lists.denx.de>
X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de
X-Virus-Status: Clean
On RK3399 the USB2PHY regs are located in the common GRF, remaining SoCs
that is supported by this driver have the USB2PHY regs in a different
GRF.
When support for RK356x, RK3588 and RK3328 was added this driver was
never updated to use correct GRF and have instead incorrectly written
to wrong GRF for these SoCs.
The default reset values for the USB2PHY have made USB mostly working
even when wrong GRF was used, however, following have been observed:
scanning bus usb@fd840000 for devices...
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)
ERROR: USB-error: DEVICENOTRESPONDING: Device did not respond to token (IN) or did
not provide a handshake (OUT) (5)
unable to get device descriptor (error=-1)
Fix this by using a regmap from rockchip,usbgrf prop and fall back to
getting a regmap for parent udevice instead of always getting the
common GRF.
Also protect against accidental clear of bit 0 in a reg with offset 0,
only bind driver to enabled otg/host-ports and remove unused headers.
Fixes: 3da15f0b49a2 ("phy: rockchip-inno-usb2: Add USB2 PHY for rk3568")
Fixes: cdf9010f6e17 ("phy: rockchip-inno-usb2: add initial support for rk3588 PHY")
Fixes: 9aa93d84038b ("phy: rockchip-inno-usb2: Add USB2 PHY for RK3328")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
---
drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 41 ++++++++++---------
1 file changed, 22 insertions(+), 19 deletions(-)
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
index 70e61eccb79a..7317128d135e 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
@@ -6,23 +6,16 @@
* Copyright (C) 2020 Amarula Solutions(India)
*/
-#include <common.h>
#include <clk-uclass.h>
#include <dm.h>
-#include <asm/global_data.h>
#include <dm/device_compat.h>
#include <dm/device-internal.h>
#include <dm/lists.h>
#include <generic-phy.h>
-#include <reset.h>
+#include <regmap.h>
#include <syscon.h>
-#include <asm/gpio.h>
-#include <asm/io.h>
-#include <linux/iopoll.h>
#include <asm/arch-rockchip/clock.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define usleep_range(a, b) udelay((b))
#define BIT_WRITEABLE_SHIFT 16
@@ -61,30 +54,39 @@ struct rockchip_usb2phy_cfg {
};
struct rockchip_usb2phy {
- void *reg_base;
+ struct regmap *reg_base;
struct clk phyclk;
const struct rockchip_usb2phy_cfg *phy_cfg;
};
-static inline int property_enable(void *reg_base,
+static inline int property_enable(struct regmap *base,
const struct usb2phy_reg *reg, bool en)
{
unsigned int val, mask, tmp;
+ if (!reg->offset && !reg->enable && !reg->disable)
+ return 0;
+
tmp = en ? reg->enable : reg->disable;
mask = GENMASK(reg->bitend, reg->bitstart);
val = (tmp << reg->bitstart) | (mask << BIT_WRITEABLE_SHIFT);
- return writel(val, reg_base + reg->offset);
+ return regmap_write(base, reg->offset, val);
}
-static inline bool property_enabled(void *reg_base,
+static inline bool property_enabled(struct regmap *base,
const struct usb2phy_reg *reg)
{
+ int ret;
unsigned int tmp, orig;
unsigned int mask = GENMASK(reg->bitend, reg->bitstart);
- orig = readl(reg_base + reg->offset);
+ if (!reg->offset && !reg->enable && !reg->disable)
+ return false;
+
+ ret = regmap_read(base, reg->offset, &orig);
+ if (ret)
+ return false;
tmp = (orig & mask) >> reg->bitstart;
return tmp != reg->disable;
@@ -248,7 +250,11 @@ static int rockchip_usb2phy_probe(struct udevice *dev)
unsigned int reg;
int index, ret;
- priv->reg_base = syscon_get_first_range(ROCKCHIP_SYSCON_GRF);
+ if (dev_read_bool(dev, "rockchip,usbgrf"))
+ priv->reg_base =
+ syscon_regmap_lookup_by_phandle(dev, "rockchip,usbgrf");
+ else
+ priv->reg_base = syscon_get_regmap(dev_get_parent(dev));
if (IS_ERR(priv->reg_base))
return PTR_ERR(priv->reg_base);
@@ -305,11 +311,8 @@ static int rockchip_usb2phy_bind(struct udevice *dev)
int ret = 0;
dev_for_each_subnode(node, dev) {
- if (!ofnode_valid(node)) {
- dev_info(dev, "subnode %s not found\n", dev->name);
- ret = -ENXIO;
- goto bind_fail;
- }
+ if (!ofnode_is_enabled(node))
+ continue;
name = ofnode_get_name(node);
dev_dbg(dev, "subnode %s\n", name);
From patchwork Sun Feb 25 22:10:20 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Jonas Karlman <jonas@kwiboo.se>
X-Patchwork-Id: 1903988
X-Patchwork-Delegate: ykai007@gmail.com
Return-Path: <u-boot-bounces@lists.denx.de>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.ozlabs.org;
dkim=pass (2048-bit key;
secure) header.d=kwiboo.se header.i=@kwiboo.se header.a=rsa-sha256
header.s=fe-e1b5cab7be header.b=Bv1sBawV;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de
(client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;
envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)
Received: from phobos.denx.de (phobos.denx.de
[IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384)
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4TjdHW2kk5z23cw
for <incoming@patchwork.ozlabs.org>; Mon, 26 Feb 2024 09:11:03 +1100 (AEDT)
Received: from h2850616.stratoserver.net (localhost [IPv6:::1])
by phobos.denx.de (Postfix) with ESMTP id EC90A87DF4;
Sun, 25 Feb 2024 23:10:54 +0100 (CET)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=none dis=none) header.from=kwiboo.se
Authentication-Results: phobos.denx.de;
spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de
Authentication-Results: phobos.denx.de;
dkim=pass (2048-bit key;
secure) header.d=kwiboo.se header.i=@kwiboo.se header.b="Bv1sBawV";
dkim-atps=neutral
Received: by phobos.denx.de (Postfix, from userid 109)
id 445F387E21; Sun, 25 Feb 2024 23:10:51 +0100 (CET)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de
X-Spam-Level:
X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,
T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2
Received: from smtp.forwardemail.net (smtp.forwardemail.net [149.28.215.223])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(No client certificate requested)
by phobos.denx.de (Postfix) with ESMTPS id 9C54487DF4
for <u-boot@lists.denx.de>; Sun, 25 Feb 2024 23:10:48 +0100 (CET)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=none dis=none) header.from=kwiboo.se
Authentication-Results: phobos.denx.de; spf=pass
smtp.mailfrom=SRS0=31c0=KD=kwiboo.se=jonas@fe-bounces.kwiboo.se
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se;
h=Content-Transfer-Encoding: MIME-Version: References: In-Reply-To:
Message-ID: Date: Subject: Cc: To: From; q=dns/txt; s=fe-e1b5cab7be;
t=1708899040; bh=DyusC9ORAR+XZuJiPJ/3cQGjPsGAIRRpa763lcRm9QI=;
b=Bv1sBawVhXXIyoD7RTT7PpAz6+xCx17DjVExzdjGWsgUube7Xho69mue9hWqeTSU0bCFYYtv7
HD7t7qbOmnYD+L0UVg+SHdibpC38eSbz+ucYsZrMhZL1IiRJNWWlFyb0IZacRz+AeagLdc75goJ
qTiFcN9xKXoHBJKpyqXiwsuJJMOXWwg9aOhGc9HZ91jwYEXSai2WfZYxtzx23bl5U4pDvpDuJd9
ijrjK7DdsrJyRm4ALrkvjlr2/gZguEXEzOiHrFbbIZn+QIZjKhbbSdTQOScvPdvnFFKG8F3wZsX
rdxXOykD/CZU8ni3ZAYh20CBo6kwKIBdthaDsbYR18nw==
From: Jonas Karlman <jonas@kwiboo.se>
To: Kever Yang <kever.yang@rock-chips.com>, Simon Glass <sjg@chromium.org>,
Philipp Tomsich <philipp.tomsich@vrull.eu>, Tom Rini <trini@konsulko.com>
Cc: u-boot@lists.denx.de, Jonas Karlman <jonas@kwiboo.se>
Subject: [PATCH 2/2] phy: rockchip-inno-usb2: Limit changes made to regs
Date: Sun, 25 Feb 2024 22:10:20 +0000
Message-ID: <20240225221024.1974853-3-jonas@kwiboo.se>
X-Mailer: git-send-email 2.43.0
In-Reply-To: <20240225221024.1974853-1-jonas@kwiboo.se>
References: <20240225221024.1974853-1-jonas@kwiboo.se>
MIME-Version: 1.0
X-Report-Abuse-To: abuse@forwardemail.net
X-Report-Abuse: abuse@forwardemail.net
X-Complaints-To: abuse@forwardemail.net
X-ForwardEmail-Version: 0.4.40
X-ForwardEmail-Sender: rfc822; jonas@kwiboo.se, smtp.forwardemail.net,
149.28.215.223
X-ForwardEmail-ID: 65dbbade46c899733a83b3fe
X-BeenThere: u-boot@lists.denx.de
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: U-Boot discussion <u-boot.lists.denx.de>
List-Unsubscribe: <https://lists.denx.de/options/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>
List-Archive: <https://lists.denx.de/pipermail/u-boot/>
List-Post: <mailto:u-boot@lists.denx.de>
List-Help: <mailto:u-boot-request@lists.denx.de?subject=help>
List-Subscribe: <https://lists.denx.de/listinfo/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=subscribe>
Errors-To: u-boot-bounces@lists.denx.de
Sender: "U-Boot" <u-boot-bounces@lists.denx.de>
X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de
X-Virus-Status: Clean
The USB2PHY regs already contain working default reset values for RK3328
and RK35xx as evidenced by the fact that this driver never has changed a
single value for these SoCs.
Reduce to only configure utmi_suspend_n and utmi_sel bits similar to
what is currently done on RK3399. Also add missing clkout_ctl for RK3588.
When enabled utmi_suspend_n is changed to normal mode and utmi_sel to
use otg/host controller utmi interface to phy. When disabled
utmi_suspend_n is changed to suspend mode and utmi_sel to use GRF utmi
interface to phy.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
---
drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 117 +++---------------
1 file changed, 14 insertions(+), 103 deletions(-)
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
index 7317128d135e..d392aed2d4de 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
@@ -35,16 +35,6 @@ struct usb2phy_reg {
struct rockchip_usb2phy_port_cfg {
struct usb2phy_reg phy_sus;
- struct usb2phy_reg bvalid_det_en;
- struct usb2phy_reg bvalid_det_st;
- struct usb2phy_reg bvalid_det_clr;
- struct usb2phy_reg ls_det_en;
- struct usb2phy_reg ls_det_st;
- struct usb2phy_reg ls_det_clr;
- struct usb2phy_reg utmi_avalid;
- struct usb2phy_reg utmi_bvalid;
- struct usb2phy_reg utmi_ls;
- struct usb2phy_reg utmi_hstdet;
};
struct rockchip_usb2phy_cfg {
@@ -131,7 +121,6 @@ static int rockchip_usb2phy_init(struct phy *phy)
{
struct udevice *parent = dev_get_parent(phy->dev);
struct rockchip_usb2phy *priv = dev_get_priv(parent);
- const struct rockchip_usb2phy_port_cfg *port_cfg = us2phy_get_port(phy);
int ret;
ret = clk_enable(&priv->phyclk);
@@ -140,14 +129,6 @@ static int rockchip_usb2phy_init(struct phy *phy)
return ret;
}
- if (phy->id == USB2PHY_PORT_OTG) {
- property_enable(priv->reg_base, &port_cfg->bvalid_det_clr, true);
- property_enable(priv->reg_base, &port_cfg->bvalid_det_en, true);
- } else if (phy->id == USB2PHY_PORT_HOST) {
- property_enable(priv->reg_base, &port_cfg->bvalid_det_clr, true);
- property_enable(priv->reg_base, &port_cfg->bvalid_det_en, true);
- }
-
return 0;
}
@@ -351,27 +332,13 @@ bind_fail:
static const struct rockchip_usb2phy_cfg rk3328_usb2phy_cfgs[] = {
{
.reg = 0x100,
- .clkout_ctl = { 0x108, 4, 4, 1, 0 },
+ .clkout_ctl = { 0x0108, 4, 4, 1, 0 },
.port_cfgs = {
[USB2PHY_PORT_OTG] = {
- .phy_sus = { 0x0100, 15, 0, 0, 0x1d1 },
- .bvalid_det_en = { 0x0110, 3, 2, 0, 3 },
- .bvalid_det_st = { 0x0114, 3, 2, 0, 3 },
- .bvalid_det_clr = { 0x0118, 3, 2, 0, 3 },
- .ls_det_en = { 0x0110, 0, 0, 0, 1 },
- .ls_det_st = { 0x0114, 0, 0, 0, 1 },
- .ls_det_clr = { 0x0118, 0, 0, 0, 1 },
- .utmi_avalid = { 0x0120, 10, 10, 0, 1 },
- .utmi_bvalid = { 0x0120, 9, 9, 0, 1 },
- .utmi_ls = { 0x0120, 5, 4, 0, 1 },
+ .phy_sus = { 0x0100, 1, 0, 2, 1 },
},
[USB2PHY_PORT_HOST] = {
- .phy_sus = { 0x104, 15, 0, 0, 0x1d1 },
- .ls_det_en = { 0x110, 1, 1, 0, 1 },
- .ls_det_st = { 0x114, 1, 1, 0, 1 },
- .ls_det_clr = { 0x118, 1, 1, 0, 1 },
- .utmi_ls = { 0x120, 17, 16, 0, 1 },
- .utmi_hstdet = { 0x120, 19, 19, 0, 1 }
+ .phy_sus = { 0x0104, 1, 0, 2, 1 },
}
},
},
@@ -385,19 +352,9 @@ static const struct rockchip_usb2phy_cfg rk3399_usb2phy_cfgs[] = {
.port_cfgs = {
[USB2PHY_PORT_OTG] = {
.phy_sus = { 0xe454, 1, 0, 2, 1 },
- .bvalid_det_en = { 0xe3c0, 3, 3, 0, 1 },
- .bvalid_det_st = { 0xe3e0, 3, 3, 0, 1 },
- .bvalid_det_clr = { 0xe3d0, 3, 3, 0, 1 },
- .utmi_avalid = { 0xe2ac, 7, 7, 0, 1 },
- .utmi_bvalid = { 0xe2ac, 12, 12, 0, 1 },
},
[USB2PHY_PORT_HOST] = {
- .phy_sus = { 0xe458, 1, 0, 0x2, 0x1 },
- .ls_det_en = { 0xe3c0, 6, 6, 0, 1 },
- .ls_det_st = { 0xe3e0, 6, 6, 0, 1 },
- .ls_det_clr = { 0xe3d0, 6, 6, 0, 1 },
- .utmi_ls = { 0xe2ac, 22, 21, 0, 1 },
- .utmi_hstdet = { 0xe2ac, 23, 23, 0, 1 }
+ .phy_sus = { 0xe458, 1, 0, 2, 1 },
}
},
},
@@ -407,19 +364,9 @@ static const struct rockchip_usb2phy_cfg rk3399_usb2phy_cfgs[] = {
.port_cfgs = {
[USB2PHY_PORT_OTG] = {
.phy_sus = { 0xe464, 1, 0, 2, 1 },
- .bvalid_det_en = { 0xe3c0, 8, 8, 0, 1 },
- .bvalid_det_st = { 0xe3e0, 8, 8, 0, 1 },
- .bvalid_det_clr = { 0xe3d0, 8, 8, 0, 1 },
- .utmi_avalid = { 0xe2ac, 10, 10, 0, 1 },
- .utmi_bvalid = { 0xe2ac, 16, 16, 0, 1 },
},
[USB2PHY_PORT_HOST] = {
- .phy_sus = { 0xe468, 1, 0, 0x2, 0x1 },
- .ls_det_en = { 0xe3c0, 11, 11, 0, 1 },
- .ls_det_st = { 0xe3e0, 11, 11, 0, 1 },
- .ls_det_clr = { 0xe3d0, 11, 11, 0, 1 },
- .utmi_ls = { 0xe2ac, 26, 25, 0, 1 },
- .utmi_hstdet = { 0xe2ac, 27, 27, 0, 1 }
+ .phy_sus = { 0xe468, 1, 0, 2, 1 },
}
},
},
@@ -432,24 +379,10 @@ static const struct rockchip_usb2phy_cfg rk3568_phy_cfgs[] = {
.clkout_ctl = { 0x0008, 4, 4, 1, 0 },
.port_cfgs = {
[USB2PHY_PORT_OTG] = {
- .phy_sus = { 0x0000, 8, 0, 0x052, 0x1d1 },
- .bvalid_det_en = { 0x0080, 2, 2, 0, 1 },
- .bvalid_det_st = { 0x0084, 2, 2, 0, 1 },
- .bvalid_det_clr = { 0x0088, 2, 2, 0, 1 },
- .ls_det_en = { 0x0080, 0, 0, 0, 1 },
- .ls_det_st = { 0x0084, 0, 0, 0, 1 },
- .ls_det_clr = { 0x0088, 0, 0, 0, 1 },
- .utmi_avalid = { 0x00c0, 10, 10, 0, 1 },
- .utmi_bvalid = { 0x00c0, 9, 9, 0, 1 },
- .utmi_ls = { 0x00c0, 5, 4, 0, 1 },
+ .phy_sus = { 0x0000, 1, 0, 2, 1 },
},
[USB2PHY_PORT_HOST] = {
- .phy_sus = { 0x0004, 8, 0, 0x1d2, 0x1d1 },
- .ls_det_en = { 0x0080, 1, 1, 0, 1 },
- .ls_det_st = { 0x0084, 1, 1, 0, 1 },
- .ls_det_clr = { 0x0088, 1, 1, 0, 1 },
- .utmi_ls = { 0x00c0, 17, 16, 0, 1 },
- .utmi_hstdet = { 0x00c0, 19, 19, 0, 1 }
+ .phy_sus = { 0x0004, 1, 0, 2, 1 },
}
},
},
@@ -458,20 +391,10 @@ static const struct rockchip_usb2phy_cfg rk3568_phy_cfgs[] = {
.clkout_ctl = { 0x0008, 4, 4, 1, 0 },
.port_cfgs = {
[USB2PHY_PORT_OTG] = {
- .phy_sus = { 0x0000, 8, 0, 0x1d2, 0x1d1 },
- .ls_det_en = { 0x0080, 0, 0, 0, 1 },
- .ls_det_st = { 0x0084, 0, 0, 0, 1 },
- .ls_det_clr = { 0x0088, 0, 0, 0, 1 },
- .utmi_ls = { 0x00c0, 5, 4, 0, 1 },
- .utmi_hstdet = { 0x00c0, 7, 7, 0, 1 }
+ .phy_sus = { 0x0000, 1, 0, 2, 1 },
},
[USB2PHY_PORT_HOST] = {
- .phy_sus = { 0x0004, 8, 0, 0x1d2, 0x1d1 },
- .ls_det_en = { 0x0080, 1, 1, 0, 1 },
- .ls_det_st = { 0x0084, 1, 1, 0, 1 },
- .ls_det_clr = { 0x0088, 1, 1, 0, 1 },
- .utmi_ls = { 0x00c0, 17, 16, 0, 1 },
- .utmi_hstdet = { 0x00c0, 19, 19, 0, 1 }
+ .phy_sus = { 0x0004, 1, 0, 2, 1 },
}
},
},
@@ -481,49 +404,37 @@ static const struct rockchip_usb2phy_cfg rk3568_phy_cfgs[] = {
static const struct rockchip_usb2phy_cfg rk3588_phy_cfgs[] = {
{
.reg = 0x0000,
+ .clkout_ctl = { 0x0000, 0, 0, 1, 0 },
.port_cfgs = {
[USB2PHY_PORT_OTG] = {
.phy_sus = { 0x000c, 11, 11, 0, 1 },
- .ls_det_en = { 0x0080, 0, 0, 0, 1 },
- .ls_det_st = { 0x0084, 0, 0, 0, 1 },
- .ls_det_clr = { 0x0088, 0, 0, 0, 1 },
- .utmi_ls = { 0x00c0, 10, 9, 0, 1 },
}
},
},
{
.reg = 0x4000,
+ .clkout_ctl = { 0x0000, 0, 0, 1, 0 },
.port_cfgs = {
[USB2PHY_PORT_OTG] = {
- .phy_sus = { 0x000c, 11, 11, 0, 0 },
- .ls_det_en = { 0x0080, 0, 0, 0, 1 },
- .ls_det_st = { 0x0084, 0, 0, 0, 1 },
- .ls_det_clr = { 0x0088, 0, 0, 0, 1 },
- .utmi_ls = { 0x00c0, 10, 9, 0, 1 },
+ .phy_sus = { 0x000c, 11, 11, 0, 1 },
}
},
},
{
.reg = 0x8000,
+ .clkout_ctl = { 0x0000, 0, 0, 1, 0 },
.port_cfgs = {
[USB2PHY_PORT_HOST] = {
.phy_sus = { 0x0008, 2, 2, 0, 1 },
- .ls_det_en = { 0x0080, 0, 0, 0, 1 },
- .ls_det_st = { 0x0084, 0, 0, 0, 1 },
- .ls_det_clr = { 0x0088, 0, 0, 0, 1 },
- .utmi_ls = { 0x00c0, 10, 9, 0, 1 },
}
},
},
{
.reg = 0xc000,
+ .clkout_ctl = { 0x0000, 0, 0, 1, 0 },
.port_cfgs = {
[USB2PHY_PORT_HOST] = {
.phy_sus = { 0x0008, 2, 2, 0, 1 },
- .ls_det_en = { 0x0080, 0, 0, 0, 1 },
- .ls_det_st = { 0x0084, 0, 0, 0, 1 },
- .ls_det_clr = { 0x0088, 0, 0, 0, 1 },
- .utmi_ls = { 0x00c0, 10, 9, 0, 1 },
}
},
},

6
riscv64-boards Normal file
View File

@ -0,0 +1,6 @@
qemu-riscv64
qemu-riscv64_smode
qemu-riscv64_spl
sifive_unleashed
sifive_unmatched
starfive_visionfive2

File diff suppressed because it is too large Load Diff

View File

@ -1,450 +0,0 @@
From patchwork Tue Dec 15 09:49:23 2020
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: mbrugger <matthias.bgg@kernel.org>
X-Patchwork-Id: 1416366
X-Patchwork-Delegate: matthias.bgg@gmail.com
Return-Path: <u-boot-bounces@lists.denx.de>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@bilbo.ozlabs.org
Authentication-Results: ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de
(client-ip=85.214.62.61; helo=phobos.denx.de;
envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>)
Authentication-Results: ozlabs.org;
dmarc=fail (p=none dis=none) header.from=kernel.org
Received: from phobos.denx.de (phobos.denx.de [85.214.62.61])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits))
(No client certificate requested)
by ozlabs.org (Postfix) with ESMTPS id 4CwD58649Dz9s0b
for <incoming@patchwork.ozlabs.org>; Tue, 15 Dec 2020 20:49:53 +1100 (AEDT)
Received: from h2850616.stratoserver.net (localhost [IPv6:::1])
by phobos.denx.de (Postfix) with ESMTP id 4EC6082956;
Tue, 15 Dec 2020 10:49:42 +0100 (CET)
Authentication-Results: phobos.denx.de;
dmarc=fail (p=none dis=none) header.from=kernel.org
Authentication-Results: phobos.denx.de;
spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de
Received: by phobos.denx.de (Postfix, from userid 109)
id B1A738295E; Tue, 15 Dec 2020 10:49:40 +0100 (CET)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de
X-Spam-Level:
X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI,
SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2
Received: from mail.kernel.org (mail.kernel.org [198.145.29.99])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by phobos.denx.de (Postfix) with ESMTPS id 38FB382955
for <u-boot@lists.denx.de>; Tue, 15 Dec 2020 10:49:37 +0100 (CET)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=none dis=none) header.from=kernel.org
Authentication-Results: phobos.denx.de;
spf=pass smtp.mailfrom=matthias.bgg@kernel.org
From: matthias.bgg@kernel.org
Authentication-Results: mail.kernel.org;
dkim=permerror (bad message/signature format)
To: sughosh.ganu@linaro.org,
xypron.glpk@gmx.de
Cc: u-boot@lists.denx.de,
Matthias Brugger <mbrugger@suse.com>
Subject: [PATCH v2 1/2] rng: Add iProc RNG200 driver
Date: Tue, 15 Dec 2020 10:49:23 +0100
Message-Id: <20201215094924.30072-1-matthias.bgg@kernel.org>
X-Mailer: git-send-email 2.29.2
MIME-Version: 1.0
X-BeenThere: u-boot@lists.denx.de
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: U-Boot discussion <u-boot.lists.denx.de>
List-Unsubscribe: <https://lists.denx.de/options/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>
List-Archive: <https://lists.denx.de/pipermail/u-boot/>
List-Post: <mailto:u-boot@lists.denx.de>
List-Help: <mailto:u-boot-request@lists.denx.de?subject=help>
List-Subscribe: <https://lists.denx.de/listinfo/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=subscribe>
Errors-To: u-boot-bounces@lists.denx.de
Sender: "U-Boot" <u-boot-bounces@lists.denx.de>
X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de
X-Virus-Status: Clean
From: Matthias Brugger <mbrugger@suse.com>
Add support for random number generator RNG200.
This is for example found on RPi4.
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
Changes in v2: None
drivers/rng/Kconfig | 6 ++
drivers/rng/Makefile | 1 +
drivers/rng/iproc_rng200.c | 186 +++++++++++++++++++++++++++++++++++++
3 files changed, 193 insertions(+)
create mode 100644 drivers/rng/iproc_rng200.c
diff --git a/drivers/rng/Kconfig b/drivers/rng/Kconfig
index 11001c8ae7..94915d45b3 100644
--- a/drivers/rng/Kconfig
+++ b/drivers/rng/Kconfig
@@ -46,4 +46,10 @@ config RNG_ROCKCHIP
Enable random number generator for rockchip.This driver is
support rng module of crypto v1 and crypto v2.
+config RNG_IPROC200
+ bool "Broadcom iProc RNG200 random number generator"
+ depends on DM_RNG
+ default n
+ help
+ Enable random number generator for RPI4.
endif
diff --git a/drivers/rng/Makefile b/drivers/rng/Makefile
index 8953406882..39f7ee3f03 100644
--- a/drivers/rng/Makefile
+++ b/drivers/rng/Makefile
@@ -9,3 +9,4 @@ obj-$(CONFIG_RNG_SANDBOX) += sandbox_rng.o
obj-$(CONFIG_RNG_MSM) += msm_rng.o
obj-$(CONFIG_RNG_STM32MP1) += stm32mp1_rng.o
obj-$(CONFIG_RNG_ROCKCHIP) += rockchip_rng.o
+obj-$(CONFIG_RNG_IPROC200) += iproc_rng200.o
diff --git a/drivers/rng/iproc_rng200.c b/drivers/rng/iproc_rng200.c
new file mode 100644
index 0000000000..1063f43953
--- /dev/null
+++ b/drivers/rng/iproc_rng200.c
@@ -0,0 +1,186 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright 2020, Matthias Brugger <mbrugger@suse.com>
+ *
+ * Driver for Raspberry Pi hardware random number generator
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <linux/delay.h>
+#include <rng.h>
+#include <asm/io.h>
+
+#define usleep_range(a, b) udelay((b))
+
+#define RNG_CTRL_OFFSET 0x00
+#define RNG_CTRL_RNG_RBGEN_MASK 0x00001FFF
+#define RNG_CTRL_RNG_RBGEN_ENABLE 0x00000001
+#define RNG_CTRL_RNG_RBGEN_DISABLE 0x00000000
+
+#define RNG_SOFT_RESET_OFFSET 0x04
+#define RNG_SOFT_RESET 0x00000001
+
+#define RBG_SOFT_RESET_OFFSET 0x08
+#define RBG_SOFT_RESET 0x00000001
+
+#define RNG_INT_STATUS_OFFSET 0x18
+#define RNG_INT_STATUS_MASTER_FAIL_LOCKOUT_IRQ_MASK 0x80000000
+#define RNG_INT_STATUS_NIST_FAIL_IRQ_MASK 0x00000020
+
+#define RNG_FIFO_DATA_OFFSET 0x20
+
+#define RNG_FIFO_COUNT_OFFSET 0x24
+#define RNG_FIFO_COUNT_RNG_FIFO_COUNT_MASK 0x000000FF
+
+struct iproc_rng200_platdata {
+ fdt_addr_t base;
+};
+
+static void iproc_rng200_enable(struct iproc_rng200_platdata *pdata, bool enable)
+{
+ fdt_addr_t rng_base = pdata->base;
+ u32 val;
+
+ val = readl(rng_base + RNG_CTRL_OFFSET);
+ val &= ~RNG_CTRL_RNG_RBGEN_MASK;
+ if (enable)
+ val |= RNG_CTRL_RNG_RBGEN_ENABLE;
+ else
+ val &= ~RNG_CTRL_RNG_RBGEN_ENABLE;
+
+ writel(val, rng_base + RNG_CTRL_OFFSET);
+
+}
+
+static void iproc_rng200_restart(struct iproc_rng200_platdata *pdata)
+{
+ fdt_addr_t rng_base = pdata->base;
+ u32 val;
+
+ iproc_rng200_enable(pdata, false);
+
+ /* Clear all interrupt status */
+ writel(0xFFFFFFFFUL, rng_base + RNG_INT_STATUS_OFFSET);
+
+ /* Reset RNG and RBG */
+ val = readl(rng_base + RBG_SOFT_RESET_OFFSET);
+ val |= RBG_SOFT_RESET;
+ writel(val, rng_base + RBG_SOFT_RESET_OFFSET);
+
+ val = readl(rng_base + RNG_SOFT_RESET_OFFSET);
+ val |= RNG_SOFT_RESET;
+ writel(val, rng_base + RNG_SOFT_RESET_OFFSET);
+
+ val = readl(rng_base + RNG_SOFT_RESET_OFFSET);
+ val &= ~RNG_SOFT_RESET;
+ writel(val, rng_base + RNG_SOFT_RESET_OFFSET);
+
+ val = readl(rng_base + RBG_SOFT_RESET_OFFSET);
+ val &= ~RBG_SOFT_RESET;
+ writel(val, rng_base + RBG_SOFT_RESET_OFFSET);
+
+ iproc_rng200_enable(pdata, true);
+}
+
+static int iproc_rng200_read(struct udevice *dev, void *data, size_t len)
+{
+ struct iproc_rng200_platdata *priv = dev_get_platdata(dev);
+ char *buf = (char *)data;
+ u32 num_remaining = len;
+ u32 status;
+
+ #define MAX_RESETS_PER_READ 1
+ u32 num_resets = 0;
+
+ while (num_remaining > 0) {
+
+ /* Is RNG sane? If not, reset it. */
+ status = readl(priv->base + RNG_INT_STATUS_OFFSET);
+ if ((status & (RNG_INT_STATUS_MASTER_FAIL_LOCKOUT_IRQ_MASK |
+ RNG_INT_STATUS_NIST_FAIL_IRQ_MASK)) != 0) {
+
+ if (num_resets >= MAX_RESETS_PER_READ)
+ return len - num_remaining;
+
+ iproc_rng200_restart(priv);
+ num_resets++;
+ }
+
+ /* Are there any random numbers available? */
+ if ((readl(priv->base + RNG_FIFO_COUNT_OFFSET) &
+ RNG_FIFO_COUNT_RNG_FIFO_COUNT_MASK) > 0) {
+
+ if (num_remaining >= sizeof(u32)) {
+ /* Buffer has room to store entire word */
+ *(u32 *)buf = readl(priv->base +
+ RNG_FIFO_DATA_OFFSET);
+ buf += sizeof(u32);
+ num_remaining -= sizeof(u32);
+ } else {
+ /* Buffer can only store partial word */
+ u32 rnd_number = readl(priv->base +
+ RNG_FIFO_DATA_OFFSET);
+ memcpy(buf, &rnd_number, num_remaining);
+ buf += num_remaining;
+ num_remaining = 0;
+ }
+
+ } else {
+ /* Can wait, give others chance to run */
+ usleep_range(min(num_remaining * 10, 500U), 500);
+ }
+ }
+
+ return 0;
+}
+
+static int iproc_rng200_probe(struct udevice *dev)
+{
+ struct iproc_rng200_platdata *priv = dev_get_platdata(dev);
+
+ iproc_rng200_enable(priv, true);
+
+ return 0;
+}
+
+static int iproc_rng200_remove(struct udevice *dev)
+{
+ struct iproc_rng200_platdata *priv = dev_get_platdata(dev);
+
+ iproc_rng200_enable(priv, false);
+
+ return 0;
+}
+
+static int iproc_rng200_ofdata_to_platdata(struct udevice *dev)
+{
+ struct iproc_rng200_platdata *pdata = dev_get_platdata(dev);
+
+ pdata->base = dev_read_addr(dev);
+ if (!pdata->base)
+ return -ENODEV;
+
+ return 0;
+}
+
+static const struct dm_rng_ops iproc_rng200_ops = {
+ .read = iproc_rng200_read,
+};
+
+static const struct udevice_id iproc_rng200_rng_match[] = {
+ { .compatible = "brcm,bcm2711-rng200", },
+ { .compatible = "brcm,iproc-rng200", },
+ {},
+};
+
+U_BOOT_DRIVER(iproc_rng200_rng) = {
+ .name = "iproc_rng200-rng",
+ .id = UCLASS_RNG,
+ .of_match = iproc_rng200_rng_match,
+ .ops = &iproc_rng200_ops,
+ .probe = iproc_rng200_probe,
+ .remove = iproc_rng200_remove,
+ .platdata_auto_alloc_size = sizeof(struct iproc_rng200_platdata),
+ .ofdata_to_platdata = iproc_rng200_ofdata_to_platdata,
+};
From patchwork Tue Dec 15 09:49:24 2020
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: mbrugger <matthias.bgg@kernel.org>
X-Patchwork-Id: 1416367
X-Patchwork-Delegate: matthias.bgg@gmail.com
Return-Path: <u-boot-bounces@lists.denx.de>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@bilbo.ozlabs.org
Authentication-Results: ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de
(client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;
envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>)
Authentication-Results: ozlabs.org;
dmarc=fail (p=none dis=none) header.from=kernel.org
Received: from phobos.denx.de (phobos.denx.de
[IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest
SHA256)
(No client certificate requested)
by ozlabs.org (Postfix) with ESMTPS id 4CwD5D4Gf2z9s0b
for <incoming@patchwork.ozlabs.org>; Tue, 15 Dec 2020 20:50:08 +1100 (AEDT)
Received: from h2850616.stratoserver.net (localhost [IPv6:::1])
by phobos.denx.de (Postfix) with ESMTP id A25E782961;
Tue, 15 Dec 2020 10:49:46 +0100 (CET)
Authentication-Results: phobos.denx.de;
dmarc=fail (p=none dis=none) header.from=kernel.org
Authentication-Results: phobos.denx.de;
spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de
Received: by phobos.denx.de (Postfix, from userid 109)
id 9EC418295C; Tue, 15 Dec 2020 10:49:41 +0100 (CET)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de
X-Spam-Level:
X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI,
SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2
Received: from mail.kernel.org (mail.kernel.org [198.145.29.99])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by phobos.denx.de (Postfix) with ESMTPS id BCF5682956
for <u-boot@lists.denx.de>; Tue, 15 Dec 2020 10:49:38 +0100 (CET)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=none dis=none) header.from=kernel.org
Authentication-Results: phobos.denx.de;
spf=pass smtp.mailfrom=matthias.bgg@kernel.org
From: matthias.bgg@kernel.org
Authentication-Results: mail.kernel.org;
dkim=permerror (bad message/signature format)
To: sughosh.ganu@linaro.org,
xypron.glpk@gmx.de
Cc: u-boot@lists.denx.de,
Matthias Brugger <mbrugger@suse.com>
Subject: [PATCH v2 2/2] config: Enable iProc RNG200 driver in RPi4 configs
Date: Tue, 15 Dec 2020 10:49:24 +0100
Message-Id: <20201215094924.30072-2-matthias.bgg@kernel.org>
X-Mailer: git-send-email 2.29.2
In-Reply-To: <20201215094924.30072-1-matthias.bgg@kernel.org>
References: <20201215094924.30072-1-matthias.bgg@kernel.org>
MIME-Version: 1.0
X-BeenThere: u-boot@lists.denx.de
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: U-Boot discussion <u-boot.lists.denx.de>
List-Unsubscribe: <https://lists.denx.de/options/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>
List-Archive: <https://lists.denx.de/pipermail/u-boot/>
List-Post: <mailto:u-boot@lists.denx.de>
List-Help: <mailto:u-boot-request@lists.denx.de?subject=help>
List-Subscribe: <https://lists.denx.de/listinfo/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=subscribe>
Errors-To: u-boot-bounces@lists.denx.de
Sender: "U-Boot" <u-boot-bounces@lists.denx.de>
X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de
X-Virus-Status: Clean
From: Matthias Brugger <mbrugger@suse.com>
We find the iProc RNG200 in the Raspberry Pi 4. Add it to all it's
config so that it can be used.
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
---
Changes in v2:
- fix defconfigs using savedefconfig (Heinrich)
configs/rpi_4_32b_defconfig | 2 ++
configs/rpi_4_defconfig | 2 ++
configs/rpi_arm64_defconfig | 2 ++
drivers/rng/iproc_rng200.c | 1 -
4 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/configs/rpi_4_32b_defconfig b/configs/rpi_4_32b_defconfig
index 5ddd838fd5..4039e46c81 100644
--- a/configs/rpi_4_32b_defconfig
+++ b/configs/rpi_4_32b_defconfig
@@ -36,6 +36,8 @@ CONFIG_PCI_BRCMSTB=y
CONFIG_PINCTRL=y
# CONFIG_PINCTRL_GENERIC is not set
CONFIG_DM_RESET=y
+CONFIG_DM_RNG=y
+CONFIG_RNG_IPROC200=y
# CONFIG_REQUIRE_SERIAL_CONSOLE is not set
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig
index 2590d0a696..46b6cc3046 100644
--- a/configs/rpi_4_defconfig
+++ b/configs/rpi_4_defconfig
@@ -36,6 +36,8 @@ CONFIG_PCI_BRCMSTB=y
CONFIG_PINCTRL=y
# CONFIG_PINCTRL_GENERIC is not set
CONFIG_DM_RESET=y
+CONFIG_DM_RNG=y
+CONFIG_RNG_IPROC200=y
# CONFIG_REQUIRE_SERIAL_CONSOLE is not set
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/rpi_arm64_defconfig b/configs/rpi_arm64_defconfig
index 2639219a1a..b75144036d 100644
--- a/configs/rpi_arm64_defconfig
+++ b/configs/rpi_arm64_defconfig
@@ -33,6 +33,8 @@ CONFIG_PCI_BRCMSTB=y
CONFIG_PINCTRL=y
# CONFIG_PINCTRL_GENERIC is not set
CONFIG_DM_RESET=y
+CONFIG_DM_RNG=y
+CONFIG_RNG_IPROC200=y
# CONFIG_REQUIRE_SERIAL_CONSOLE is not set
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/drivers/rng/iproc_rng200.c b/drivers/rng/iproc_rng200.c
index 1063f43953..378f6cf48d 100644
--- a/drivers/rng/iproc_rng200.c
+++ b/drivers/rng/iproc_rng200.c
@@ -50,7 +50,6 @@ static void iproc_rng200_enable(struct iproc_rng200_platdata *pdata, bool enable
val &= ~RNG_CTRL_RNG_RBGEN_ENABLE;
writel(val, rng_base + RNG_CTRL_OFFSET);
-
}
static void iproc_rng200_restart(struct iproc_rng200_platdata *pdata)

View File

@ -0,0 +1,236 @@
From 72400858605c085cf94a6cf5599269c8c39e3e72 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Tue, 14 Mar 2023 12:30:36 +0000
Subject: [PATCH] rockchip: pinephone pro: add initial display support
Add proposed upstream DT patches for display, disable edp,
enable mipi and backlight, add required clocks.
Clocks may not be required based on upstream review. Still
need to add panel pieces, the rk3288-evb has an example for
panel DT for u-boot, or may need to do a mipi addition to
simple-panel, or something else.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
arch/arm/dts/rk3399-pinephone-pro.dts | 123 +++++++++++++++++++++++++
configs/pinephone-pro-rk3399_defconfig | 3 +-
include/dt-bindings/clock/rk3399-cru.h | 2 +
3 files changed, 127 insertions(+), 1 deletion(-)
diff --git a/arch/arm/dts/rk3399-pinephone-pro.dts b/arch/arm/dts/rk3399-pinephone-pro.dts
index 04403a76238..d0609d1b534 100644
--- a/arch/arm/dts/rk3399-pinephone-pro.dts
+++ b/arch/arm/dts/rk3399-pinephone-pro.dts
@@ -29,6 +29,12 @@
stdout-path = "serial2:115200n8";
};
+ backlight: backlight {
+ compatible = "pwm-backlight";
+ pwms = <&pwm0 0 1000000 0>;
+ pwm-delay-us = <10000>;
+ };
+
gpio-keys {
compatible = "gpio-keys";
pinctrl-names = "default";
@@ -102,6 +108,32 @@
/* WL_REG_ON on module */
reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
};
+
+ /* MIPI DSI panel 1.8v supply */
+ vcc1v8_lcd: vcc1v8-lcd-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ regulator-name = "vcc1v8_lcd";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ vin-supply = <&vcc3v3_sys>;
+ gpio = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&display_pwren1>;
+ };
+
+ /* MIPI DSI panel 2.8v supply */
+ vcc2v8_lcd: vcc2v8-lcd-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ regulator-name = "vcc2v8_lcd";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ vin-supply = <&vcc3v3_sys>;
+ gpio = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&display_pwren>;
+ };
};
&cpu_l0 {
@@ -132,6 +164,11 @@
status = "okay";
};
+&gpu {
+ mali-supply = <&vdd_gpu>;
+ status = "okay";
+};
+
&i2c0 {
clock-frequency = <400000>;
i2c-scl-rising-time-ns = <168>;
@@ -214,6 +251,9 @@
regulator-name = "vcc3v0_touch";
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
};
vcca1v8_codec: LDO_REG3 {
@@ -347,6 +387,25 @@
};
};
+&i2c3 {
+ i2c-scl-rising-time-ns = <450>;
+ i2c-scl-falling-time-ns = <15>;
+ status = "okay";
+
+ touchscreen@14 {
+ compatible = "goodix,gt917s";
+ reg = <0x14>;
+ interrupt-parent = <&gpio3>;
+ interrupts = <RK_PB5 IRQ_TYPE_EDGE_RISING>;
+ irq-gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_HIGH>;
+ AVDD28-supply = <&vcc3v0_touch>;
+ VDDIO-supply = <&vcc3v0_touch>;
+ touchscreen-size-x = <720>;
+ touchscreen-size-y = <1440>;
+ };
+};
+
&io_domains {
bt656-supply = <&vcc1v8_dvp>;
audio-supply = <&vcca1v8_codec>;
@@ -355,6 +414,40 @@
status = "okay";
};
+&mipi_dsi {
+ status = "okay";
+ clock-master;
+
+ ports {
+ mipi_out: port@1 {
+ #address-cells = <0>;
+ #size-cells = <0>;
+ reg = <1>;
+
+ mipi_out_panel: endpoint {
+ remote-endpoint = <&mipi_in_panel>;
+ };
+ };
+ };
+
+ panel@0 {
+ compatible = "hannstar,hsd060bhw4";
+ reg = <0>;
+ backlight = <&backlight>;
+ reset-gpios = <&gpio4 RK_PD1 GPIO_ACTIVE_LOW>;
+ vcc-supply = <&vcc2v8_lcd>;
+ iovcc-supply = <&vcc1v8_lcd>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&display_rst_l>;
+
+ port {
+ mipi_in_panel: endpoint {
+ remote-endpoint = <&mipi_out_panel>;
+ };
+ };
+ };
+};
+
&pmu_io_domains {
pmu1830-supply = <&vcc_1v8>;
status = "okay";
@@ -387,6 +480,20 @@
};
};
+ dsi {
+ display_rst_l: display-rst-l {
+ rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_down>;
+ };
+
+ display_pwren: display-pwren {
+ rockchip,pins = <3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_down>;
+ };
+
+ display_pwren1: display-pwren1 {
+ rockchip,pins = <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_down>;
+ };
+ };
+
sound {
vcc1v8_codec_en: vcc1v8-codec-en {
rockchip,pins = <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_down>;
@@ -422,6 +529,10 @@
status = "okay";
};
+&pwm0 {
+ status = "okay";
+};
+
&sdmmc {
bus-width = <4>;
cap-sd-highspeed;
@@ -472,3 +583,15 @@
&uart2 {
status = "okay";
};
+
+&vopb {
+ status = "okay";
+ assigned-clocks = <&cru DCLK_VOP0_DIV>, <&cru DCLK_VOP0>,
+ <&cru ACLK_VOP0>, <&cru HCLK_VOP0>;
+ assigned-clock-rates = <0>, <0>, <400000000>, <100000000>;
+ assigned-clock-parents = <&cru PLL_CPLL>, <&cru DCLK_VOP0_FRAC>;
+};
+
+&vopb_mmu {
+ status = "okay";
+};
diff --git a/configs/pinephone-pro-rk3399_defconfig b/configs/pinephone-pro-rk3399_defconfig
index 54f9b90536c..1982131c805 100644
--- a/configs/pinephone-pro-rk3399_defconfig
+++ b/configs/pinephone-pro-rk3399_defconfig
@@ -96,6 +96,7 @@ CONFIG_USB_ETHER_RTL8152=y
CONFIG_VIDEO=y
CONFIG_DISPLAY=y
CONFIG_VIDEO_ROCKCHIP=y
-CONFIG_DISPLAY_ROCKCHIP_EDP=y
+CONFIG_DISPLAY_ROCKCHIP_MIPI=y
+CONFIG_BACKLIGHT_PWM=y
CONFIG_SPL_TINY_MEMSET=y
CONFIG_ERRNO_STR=y
diff --git a/include/dt-bindings/clock/rk3399-cru.h b/include/dt-bindings/clock/rk3399-cru.h
index 211faf8fa89..7866e5266d2 100644
--- a/include/dt-bindings/clock/rk3399-cru.h
+++ b/include/dt-bindings/clock/rk3399-cru.h
@@ -131,6 +131,8 @@
#define DCLK_VOP0_DIV 182
#define DCLK_VOP1_DIV 183
#define DCLK_M0_PERILP 184
+#define DCLK_VOP0_FRAC 185
+#define DCLK_VOP1_FRAC 186
#define FCLK_CM0S 190
--
2.39.2

View File

@ -0,0 +1,166 @@
From 367b3afc360e6fc92bd4cdca643ed2e4d928472d Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Wed, 13 Mar 2024 19:14:50 +0000
Subject: [PATCH] rockchip: Enable preboot start for pci/usb
Enable the preboot so nvme works OOTB
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
configs/firefly-rk3399_defconfig | 2 ++
configs/nanopc-t4-rk3399_defconfig | 2 ++
configs/pinebook-pro-rk3399_defconfig | 1 +
configs/roc-pc-mezzanine-rk3399_defconfig | 2 ++
configs/rock-4c-plus-rk3399_defconfig | 2 ++
configs/rock-4se-rk3399_defconfig | 2 ++
configs/rock-pi-4-rk3399_defconfig | 2 ++
configs/rock-pi-4c-rk3399_defconfig | 2 ++
configs/rock-pi-n10-rk3399pro_defconfig | 2 ++
configs/rock960-rk3399_defconfig | 1 +
configs/rockpro64-rk3399_defconfig | 2 ++
11 files changed, 20 insertions(+)
diff --git a/configs/firefly-rk3399_defconfig b/configs/firefly-rk3399_defconfig
index b7c8e95b7b8..1e33083c138 100644
--- a/configs/firefly-rk3399_defconfig
+++ b/configs/firefly-rk3399_defconfig
@@ -18,6 +18,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_SYS_LOAD_ADDR=0x800800
CONFIG_PCI=y
CONFIG_DEBUG_UART=y
+CONFIG_USE_PREBOOT=y
+CONFIG_PREBOOT="pci enum; usb start; nvme scan;"
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-firefly.dtb"
CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_MISC_INIT_R=y
diff --git a/configs/nanopc-t4-rk3399_defconfig b/configs/nanopc-t4-rk3399_defconfig
index c18e7b1bd16..e9a18eb3e9f 100644
--- a/configs/nanopc-t4-rk3399_defconfig
+++ b/configs/nanopc-t4-rk3399_defconfig
@@ -17,6 +17,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_SYS_LOAD_ADDR=0x800800
CONFIG_PCI=y
CONFIG_DEBUG_UART=y
+CONFIG_USE_PREBOOT=y
+CONFIG_PREBOOT="pci enum; usb start; nvme scan;"
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-nanopc-t4.dtb"
CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_SPL_MAX_SIZE=0x2e000
diff --git a/configs/pinebook-pro-rk3399_defconfig b/configs/pinebook-pro-rk3399_defconfig
index de357415fbe..4168adb1935 100644
--- a/configs/pinebook-pro-rk3399_defconfig
+++ b/configs/pinebook-pro-rk3399_defconfig
@@ -24,6 +24,7 @@ CONFIG_PCI=y
CONFIG_DEBUG_UART=y
CONFIG_BOOTDELAY=3
CONFIG_USE_PREBOOT=y
+CONFIG_PREBOOT="pci enum; usb start; nvme scan;"
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-pinebook-pro.dtb"
CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_MISC_INIT_R=y
diff --git a/configs/roc-pc-mezzanine-rk3399_defconfig b/configs/roc-pc-mezzanine-rk3399_defconfig
index de6539bedf4..61c6182d27e 100644
--- a/configs/roc-pc-mezzanine-rk3399_defconfig
+++ b/configs/roc-pc-mezzanine-rk3399_defconfig
@@ -23,6 +23,8 @@ CONFIG_SPL_SPI=y
CONFIG_SYS_LOAD_ADDR=0x800800
CONFIG_PCI=y
CONFIG_DEBUG_UART=y
+CONFIG_USE_PREBOOT=y
+CONFIG_PREBOOT="pci enum; usb start; nvme scan;"
# CONFIG_ANDROID_BOOT_IMAGE is not set
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-roc-pc-mezzanine.dtb"
CONFIG_DISPLAY_BOARDINFO_LATE=y
diff --git a/configs/rock-4c-plus-rk3399_defconfig b/configs/rock-4c-plus-rk3399_defconfig
index 18525c8bf50..89e9f69eb63 100644
--- a/configs/rock-4c-plus-rk3399_defconfig
+++ b/configs/rock-4c-plus-rk3399_defconfig
@@ -18,6 +18,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_SYS_LOAD_ADDR=0x800800
CONFIG_PCI=y
CONFIG_DEBUG_UART=y
+CONFIG_USE_PREBOOT=y
+CONFIG_PREBOOT="pci enum; usb start; nvme scan;"
# CONFIG_ANDROID_BOOT_IMAGE is not set
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rock-4c-plus.dtb"
CONFIG_DISPLAY_BOARDINFO_LATE=y
diff --git a/configs/rock-4se-rk3399_defconfig b/configs/rock-4se-rk3399_defconfig
index 171de23ec8f..d2769a2f516 100644
--- a/configs/rock-4se-rk3399_defconfig
+++ b/configs/rock-4se-rk3399_defconfig
@@ -18,6 +18,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_SYS_LOAD_ADDR=0x800800
CONFIG_PCI=y
CONFIG_DEBUG_UART=y
+CONFIG_USE_PREBOOT=y
+CONFIG_PREBOOT="pci enum; usb start; nvme scan;"
# CONFIG_ANDROID_BOOT_IMAGE is not set
CONFIG_SPL_FIT_SIGNATURE=y
CONFIG_LEGACY_IMAGE_FORMAT=y
diff --git a/configs/rock-pi-4-rk3399_defconfig b/configs/rock-pi-4-rk3399_defconfig
index 83fc4ad7dab..24ca614fe5a 100644
--- a/configs/rock-pi-4-rk3399_defconfig
+++ b/configs/rock-pi-4-rk3399_defconfig
@@ -18,6 +18,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_SYS_LOAD_ADDR=0x800800
CONFIG_PCI=y
CONFIG_DEBUG_UART=y
+CONFIG_USE_PREBOOT=y
+CONFIG_PREBOOT="pci enum; usb start; nvme scan;"
# CONFIG_ANDROID_BOOT_IMAGE is not set
CONFIG_SPL_FIT_SIGNATURE=y
CONFIG_LEGACY_IMAGE_FORMAT=y
diff --git a/configs/rock-pi-4c-rk3399_defconfig b/configs/rock-pi-4c-rk3399_defconfig
index 089344097e0..83c2cfba157 100644
--- a/configs/rock-pi-4c-rk3399_defconfig
+++ b/configs/rock-pi-4c-rk3399_defconfig
@@ -18,6 +18,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_SYS_LOAD_ADDR=0x800800
CONFIG_PCI=y
CONFIG_DEBUG_UART=y
+CONFIG_USE_PREBOOT=y
+CONFIG_PREBOOT="pci enum; usb start; nvme scan;"
# CONFIG_ANDROID_BOOT_IMAGE is not set
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rock-pi-4c.dtb"
CONFIG_DISPLAY_BOARDINFO_LATE=y
diff --git a/configs/rock-pi-n10-rk3399pro_defconfig b/configs/rock-pi-n10-rk3399pro_defconfig
index dc4b3b40380..db34bc70a22 100644
--- a/configs/rock-pi-n10-rk3399pro_defconfig
+++ b/configs/rock-pi-n10-rk3399pro_defconfig
@@ -18,6 +18,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_SYS_LOAD_ADDR=0x800800
CONFIG_PCI=y
CONFIG_DEBUG_UART=y
+CONFIG_USE_PREBOOT=y
+CONFIG_PREBOOT="pci enum; usb start; nvme scan;"
# CONFIG_ANDROID_BOOT_IMAGE is not set
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399pro-rock-pi-n10.dtb"
# CONFIG_CONSOLE_MUX is not set
diff --git a/configs/rock960-rk3399_defconfig b/configs/rock960-rk3399_defconfig
index b93dda56593..6d1b352a855 100644
--- a/configs/rock960-rk3399_defconfig
+++ b/configs/rock960-rk3399_defconfig
@@ -17,6 +17,7 @@ CONFIG_SYS_LOAD_ADDR=0x800800
CONFIG_PCI=y
CONFIG_DEBUG_UART=y
CONFIG_USE_PREBOOT=y
+CONFIG_PREBOOT="pci enum; usb start; nvme scan;"
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rock960.dtb"
CONFIG_SYS_PBSIZE=1052
CONFIG_DISPLAY_BOARDINFO_LATE=y
diff --git a/configs/rockpro64-rk3399_defconfig b/configs/rockpro64-rk3399_defconfig
index 711541f8462..8c1ea1a0b63 100644
--- a/configs/rockpro64-rk3399_defconfig
+++ b/configs/rockpro64-rk3399_defconfig
@@ -21,6 +21,8 @@ CONFIG_SPL_SPI=y
CONFIG_SYS_LOAD_ADDR=0x800800
CONFIG_PCI=y
CONFIG_DEBUG_UART=y
+CONFIG_USE_PREBOOT=y
+CONFIG_PREBOOT="pci enum; usb start; nvme scan;"
CONFIG_SPL_FIT_SIGNATURE=y
CONFIG_LEGACY_IMAGE_FORMAT=y
CONFIG_BOOTSTAGE=y
--
2.44.0

View File

@ -0,0 +1,691 @@
From 0149cf303734fad55f1d733628f76a6994d1436d Mon Sep 17 00:00:00 2001
From: Jonas Karlman <jonas@kwiboo.se>
Date: Sun, 10 Mar 2024 18:50:57 +0000
Subject: [PATCH 1/4] rockchip: Update the default USB Product ID value
RK3036 is using the USB product id normally used by RK3066B, and RK3328
is using the product id normally used by RK3368.
Fix this and update the default USB_GADGET_PRODUCT_NUM Kconfig option
for remaining supported Rockchip SoCs to match the product id used in
Maskrom mode.
Also remove a reference to an undefined ROCKCHIP_RK3229 Kconfig symbol.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
---
drivers/usb/gadget/Kconfig | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index c72a8047635..4621a6fd5e6 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -70,12 +70,21 @@ config USB_GADGET_PRODUCT_NUM
hex "Product ID of the USB device"
default 0x701a if ARCH_TEGRA
default 0x1010 if ARCH_SUNXI
- default 0x310a if ROCKCHIP_RK3036
+ default 0x110a if ROCKCHIP_RV1108
+ default 0x110b if ROCKCHIP_RV1126
default 0x300a if ROCKCHIP_RK3066
+ default 0x301a if ROCKCHIP_RK3036
+ default 0x310b if ROCKCHIP_RK3188
default 0x310c if ROCKCHIP_RK3128
- default 0x320a if ROCKCHIP_RK3229 || ROCKCHIP_RK3288
- default 0x330a if ROCKCHIP_RK3328
+ default 0x320a if ROCKCHIP_RK3288
+ default 0x320b if ROCKCHIP_RK322X
+ default 0x320c if ROCKCHIP_RK3328
+ default 0x330a if ROCKCHIP_RK3368
default 0x330c if ROCKCHIP_RK3399
+ default 0x330d if ROCKCHIP_PX30
+ default 0x330e if ROCKCHIP_RK3308
+ default 0x350a if ROCKCHIP_RK3568
+ default 0x350b if ROCKCHIP_RK3588
default 0x0
help
Product ID of the USB device emulated, reported to the host device.
--
2.44.0
From 3b4d52ef627bb3899c331ff24fe31cec5f445069 Mon Sep 17 00:00:00 2001
From: Jonas Karlman <jonas@kwiboo.se>
Date: Sun, 10 Mar 2024 18:50:58 +0000
Subject: [PATCH 2/4] rockchip: board: Prepare for use of DM_USB_GADGET with
DWC2_OTG
The board_usb_init() and board_usb_cleanup() functions is always
included when USB_GADGET and USB_GADGET_DWC2_OTG is enabled.
Prepare for a change to use DM_USB_GADGET with DWC2_OTG by adding an
extra ifdef condition. The extra separate ifdef for USB_GADGET prepare
for next patch that adds a g_dnl_bind_fixup() function.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
---
arch/arm/mach-rockchip/board.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c
index 2620530e03f..2ec670dde69 100644
--- a/arch/arm/mach-rockchip/board.c
+++ b/arch/arm/mach-rockchip/board.c
@@ -205,7 +205,8 @@ void enable_caches(void)
}
#endif
-#if defined(CONFIG_USB_GADGET) && defined(CONFIG_USB_GADGET_DWC2_OTG)
+#if IS_ENABLED(CONFIG_USB_GADGET)
+#if IS_ENABLED(CONFIG_USB_GADGET_DWC2_OTG) && !IS_ENABLED(CONFIG_DM_USB_GADGET)
#include <usb.h>
#include <linux/usb/otg.h>
#include <usb/dwc2_udc.h>
@@ -281,6 +282,7 @@ int board_usb_cleanup(int index, enum usb_init_type init)
return 0;
}
#endif /* CONFIG_USB_GADGET_DWC2_OTG */
+#endif /* CONFIG_USB_GADGET */
#if IS_ENABLED(CONFIG_FASTBOOT)
int fastboot_set_reboot_flag(enum fastboot_reboot_reason reason)
--
2.44.0
From 201da409a8c879482a00867010b772327aba6a51 Mon Sep 17 00:00:00 2001
From: Jonas Karlman <jonas@kwiboo.se>
Date: Sun, 10 Mar 2024 18:50:59 +0000
Subject: [PATCH 3/4] rockchip: board: Use a common USB Product ID for UMS
Change to use the common Product ID 0x0010 when the ums command is used.
This matches downstream vendor U-Boot and is a Product ID that tools
such as rkdeveloptool and RKDevTool will identify as MSC mode.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
---
arch/arm/mach-rockchip/board.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c
index 2ec670dde69..2db746b27fb 100644
--- a/arch/arm/mach-rockchip/board.c
+++ b/arch/arm/mach-rockchip/board.c
@@ -206,8 +206,23 @@ void enable_caches(void)
#endif
#if IS_ENABLED(CONFIG_USB_GADGET)
-#if IS_ENABLED(CONFIG_USB_GADGET_DWC2_OTG) && !IS_ENABLED(CONFIG_DM_USB_GADGET)
#include <usb.h>
+
+#if IS_ENABLED(CONFIG_USB_GADGET_DOWNLOAD)
+#define ROCKCHIP_G_DNL_UMS_PRODUCT_NUM 0x0010
+
+int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name)
+{
+ if (!strcmp(name, "usb_dnl_ums"))
+ put_unaligned(ROCKCHIP_G_DNL_UMS_PRODUCT_NUM, &dev->idProduct);
+ else
+ put_unaligned(CONFIG_USB_GADGET_PRODUCT_NUM, &dev->idProduct);
+
+ return 0;
+}
+#endif /* CONFIG_USB_GADGET_DOWNLOAD */
+
+#if IS_ENABLED(CONFIG_USB_GADGET_DWC2_OTG) && !IS_ENABLED(CONFIG_DM_USB_GADGET)
#include <linux/usb/otg.h>
#include <usb/dwc2_udc.h>
--
2.44.0
From 2cb2428ae571956dfafb2eeed8b54857b12e17d0 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Wed, 3 Apr 2024 05:29:20 +0100
Subject: [PATCH 4/4] rockchip: Migrate to use DM_USB_GADGET on RK3328
USB gadget is not working fully as expected on RK3328, it uses a
board_usb_init() function to initialize the DWC2 OTG port.
The board_usb_init() function does not intgrate with the generic phy
framework and as a result the USB phy is not properly configured before
or after USB gadget use.
Having both USB_DWC2 and DWC2_OTG enabled for the same board is also
causing some issues.
Trying to use rockusb or ums command after usb stop result in a freeze
due to usb stop is putting the phy in a suspended state.
=> usb start
=> usb stop
=> ums 0 mmc 0
--> freeze due to usb phy is suspended <--
Fix this by only using one of USB_DWC2 (host) or DWC2_OTG (peripheral)
depending on the most likely usage of the otg port and by migrating to
use DM_USB_GADGET instead of a board_usb_init() function.
The nanopi-r2 and orangepi-r1-plus variants share OTG and power using a
Type-C connector, mark these boards dr_mode as peripheral, the most
likely usage is for recovery and image download.
The rock64 and roc-cc currently use dr_mode as host, remove the DWC2_OTG
driver from these boards to ensure that the USB_DWC2 driver is used.
The rock-pi-e board does not enable the usb20_otg node so both USB_DWC2
and DWC2_OTG is removed from this board.
Enable RockUSB and UMS on all boards with a otg port in peripheral mode.
Also with the migration to DM_USB_GADGET completed the U-Boot specific
change to reorder usb nodes in the soc device tree can be reverted.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi | 4 ++
.../rk3328-orangepi-r1-plus-lts-u-boot.dtsi | 4 ++
.../dts/rk3328-orangepi-r1-plus-u-boot.dtsi | 4 ++
arch/arm/dts/rk3328-roc-cc-u-boot.dtsi | 4 ++
arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi | 9 ++++
arch/arm/dts/rk3328-rock64-u-boot.dtsi | 4 ++
arch/arm/dts/rk3328-u-boot.dtsi | 4 --
arch/arm/dts/rk3328.dtsi | 41 ++++++++-----------
configs/evb-rk3328_defconfig | 7 +++-
configs/nanopi-r2c-plus-rk3328_defconfig | 7 +++-
configs/nanopi-r2c-rk3328_defconfig | 7 +++-
configs/nanopi-r2s-rk3328_defconfig | 7 +++-
configs/orangepi-r1-plus-lts-rk3328_defconfig | 7 +++-
configs/orangepi-r1-plus-rk3328_defconfig | 7 +++-
configs/roc-cc-rk3328_defconfig | 7 ----
configs/rock-pi-e-rk3328_defconfig | 7 ----
configs/rock64-rk3328_defconfig | 6 ---
17 files changed, 75 insertions(+), 61 deletions(-)
diff --git a/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi b/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi
index 78d37ab4755..3a16f86c18a 100644
--- a/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi
+++ b/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi
@@ -28,6 +28,10 @@
bootph-pre-ram;
};
+&usb20_otg {
+ dr_mode = "peripheral";
+};
+
/* Need this and all the pinctrl/gpio stuff above to set pinmux */
&vcc_sd {
bootph-pre-ram;
diff --git a/arch/arm/dts/rk3328-orangepi-r1-plus-lts-u-boot.dtsi b/arch/arm/dts/rk3328-orangepi-r1-plus-lts-u-boot.dtsi
index ebe33e48cb9..2247daebc13 100644
--- a/arch/arm/dts/rk3328-orangepi-r1-plus-lts-u-boot.dtsi
+++ b/arch/arm/dts/rk3328-orangepi-r1-plus-lts-u-boot.dtsi
@@ -28,6 +28,10 @@
bootph-pre-ram;
};
+&usb20_otg {
+ dr_mode = "peripheral";
+};
+
/* Need this and all the pinctrl/gpio stuff above to set pinmux */
&vcc_sd {
bootph-pre-ram;
diff --git a/arch/arm/dts/rk3328-orangepi-r1-plus-u-boot.dtsi b/arch/arm/dts/rk3328-orangepi-r1-plus-u-boot.dtsi
index 637c70adf19..79942a49a29 100644
--- a/arch/arm/dts/rk3328-orangepi-r1-plus-u-boot.dtsi
+++ b/arch/arm/dts/rk3328-orangepi-r1-plus-u-boot.dtsi
@@ -28,6 +28,10 @@
bootph-pre-ram;
};
+&usb20_otg {
+ dr_mode = "peripheral";
+};
+
/* Need this and all the pinctrl/gpio stuff above to set pinmux */
&vcc_sd {
bootph-pre-ram;
diff --git a/arch/arm/dts/rk3328-roc-cc-u-boot.dtsi b/arch/arm/dts/rk3328-roc-cc-u-boot.dtsi
index 2062f34bf82..1aeb0083631 100644
--- a/arch/arm/dts/rk3328-roc-cc-u-boot.dtsi
+++ b/arch/arm/dts/rk3328-roc-cc-u-boot.dtsi
@@ -48,6 +48,10 @@
bootph-pre-ram;
};
+&usb20_otg {
+ hnp-srp-disable;
+};
+
/* Need this and all the pinctrl/gpio stuff above to set pinmux */
&vcc_sd {
bootph-pre-ram;
diff --git a/arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi b/arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi
index 1f220c6dcd0..c2371fb1688 100644
--- a/arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi
+++ b/arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi
@@ -45,6 +45,15 @@
bootph-pre-ram;
};
+&u2phy_host {
+ phy-supply = <&vcc_host_5v>;
+};
+
+&vcc_host_5v {
+ /delete-property/ regulator-always-on;
+ /delete-property/ regulator-boot-on;
+};
+
/* Need this and all the pinctrl/gpio stuff above to set pinmux */
&vcc_sd {
bootph-pre-ram;
diff --git a/arch/arm/dts/rk3328-rock64-u-boot.dtsi b/arch/arm/dts/rk3328-rock64-u-boot.dtsi
index 6904515b969..1e4649ae120 100644
--- a/arch/arm/dts/rk3328-rock64-u-boot.dtsi
+++ b/arch/arm/dts/rk3328-rock64-u-boot.dtsi
@@ -48,6 +48,10 @@
bootph-pre-ram;
};
+&usb20_otg {
+ hnp-srp-disable;
+};
+
/* Need this and all the pinctrl/gpio stuff above to set pinmux */
&vcc_sd {
bootph-pre-ram;
diff --git a/arch/arm/dts/rk3328-u-boot.dtsi b/arch/arm/dts/rk3328-u-boot.dtsi
index a9f2536de2a..b5da4518ec9 100644
--- a/arch/arm/dts/rk3328-u-boot.dtsi
+++ b/arch/arm/dts/rk3328-u-boot.dtsi
@@ -61,10 +61,6 @@
u-boot,spl-fifo-mode;
};
-&usb20_otg {
- hnp-srp-disable;
-};
-
&spi0 {
bootph-all;
};
diff --git a/arch/arm/dts/rk3328.dtsi b/arch/arm/dts/rk3328.dtsi
index e8d8f00be8a..8c821acb21f 100644
--- a/arch/arm/dts/rk3328.dtsi
+++ b/arch/arm/dts/rk3328.dtsi
@@ -944,6 +944,22 @@
};
};
+ usb20_otg: usb@ff580000 {
+ compatible = "rockchip,rk3328-usb", "rockchip,rk3066-usb",
+ "snps,dwc2";
+ reg = <0x0 0xff580000 0x0 0x40000>;
+ interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cru HCLK_OTG>;
+ clock-names = "otg";
+ dr_mode = "otg";
+ g-np-tx-fifo-size = <16>;
+ g-rx-fifo-size = <280>;
+ g-tx-fifo-size = <256 128 128 64 32 16>;
+ phys = <&u2phy_otg>;
+ phy-names = "usb2-phy";
+ status = "disabled";
+ };
+
usb_host0_ehci: usb@ff5c0000 {
compatible = "generic-ehci";
reg = <0x0 0xff5c0000 0x0 0x10000>;
@@ -983,31 +999,6 @@
status = "disabled";
};
- /*
- * U-Boot Specific Change
- *
- * The OTG controller must come after the USB host pair for it
- * to work. This is likely due to lack of support for the USB
- * PHYs. This must be manually changed after each device tree
- * sync. There is no clean way to handle this in -u-boot.dtsi
- * files.
- */
- usb20_otg: usb@ff580000 {
- compatible = "rockchip,rk3328-usb", "rockchip,rk3066-usb",
- "snps,dwc2";
- reg = <0x0 0xff580000 0x0 0x40000>;
- interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&cru HCLK_OTG>;
- clock-names = "otg";
- dr_mode = "otg";
- g-np-tx-fifo-size = <16>;
- g-rx-fifo-size = <280>;
- g-tx-fifo-size = <256 128 128 64 32 16>;
- phys = <&u2phy_otg>;
- phy-names = "usb2-phy";
- status = "disabled";
- };
-
gic: interrupt-controller@ff811000 {
compatible = "arm,gic-400";
#interrupt-cells = <3>;
diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
index b9c541a92a1..ed2e2b7aa6f 100644
--- a/configs/evb-rk3328_defconfig
+++ b/configs/evb-rk3328_defconfig
@@ -46,6 +46,8 @@ CONFIG_CMD_BOOTZ=y
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
+CONFIG_CMD_ROCKUSB=y
+CONFIG_CMD_USB_MASS_STORAGE=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_SPL_OF_CONTROL=y
@@ -93,17 +95,18 @@ CONFIG_SYS_NS16550_MEM32=y
CONFIG_SYSRESET=y
# CONFIG_TPL_SYSRESET is not set
CONFIG_USB=y
+CONFIG_DM_USB_GADGET=y
CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
-CONFIG_USB_DWC2=y
CONFIG_USB_DWC3=y
# CONFIG_USB_DWC3_GADGET is not set
-CONFIG_USB_DWC3_GENERIC=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DWC2_OTG=y
+CONFIG_USB_FUNCTION_ROCKUSB=y
CONFIG_SPL_TINY_MEMSET=y
CONFIG_TPL_TINY_MEMSET=y
CONFIG_ERRNO_STR=y
diff --git a/configs/nanopi-r2c-plus-rk3328_defconfig b/configs/nanopi-r2c-plus-rk3328_defconfig
index 320ed8b434a..015bcfef369 100644
--- a/configs/nanopi-r2c-plus-rk3328_defconfig
+++ b/configs/nanopi-r2c-plus-rk3328_defconfig
@@ -48,6 +48,8 @@ CONFIG_CMD_BOOTZ=y
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
+CONFIG_CMD_ROCKUSB=y
+CONFIG_CMD_USB_MASS_STORAGE=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_SPL_OF_CONTROL=y
@@ -98,17 +100,18 @@ CONFIG_SYSINFO=y
CONFIG_SYSRESET=y
# CONFIG_TPL_SYSRESET is not set
CONFIG_USB=y
+CONFIG_DM_USB_GADGET=y
CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
-CONFIG_USB_DWC2=y
CONFIG_USB_DWC3=y
# CONFIG_USB_DWC3_GADGET is not set
-CONFIG_USB_DWC3_GENERIC=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DWC2_OTG=y
+CONFIG_USB_FUNCTION_ROCKUSB=y
CONFIG_SPL_TINY_MEMSET=y
CONFIG_TPL_TINY_MEMSET=y
CONFIG_ERRNO_STR=y
diff --git a/configs/nanopi-r2c-rk3328_defconfig b/configs/nanopi-r2c-rk3328_defconfig
index 583179d7c54..5742567a3d4 100644
--- a/configs/nanopi-r2c-rk3328_defconfig
+++ b/configs/nanopi-r2c-rk3328_defconfig
@@ -48,6 +48,8 @@ CONFIG_CMD_BOOTZ=y
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
+CONFIG_CMD_ROCKUSB=y
+CONFIG_CMD_USB_MASS_STORAGE=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_SPL_OF_CONTROL=y
@@ -98,17 +100,18 @@ CONFIG_SYSINFO=y
CONFIG_SYSRESET=y
# CONFIG_TPL_SYSRESET is not set
CONFIG_USB=y
+CONFIG_DM_USB_GADGET=y
CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
-CONFIG_USB_DWC2=y
CONFIG_USB_DWC3=y
# CONFIG_USB_DWC3_GADGET is not set
-CONFIG_USB_DWC3_GENERIC=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DWC2_OTG=y
+CONFIG_USB_FUNCTION_ROCKUSB=y
CONFIG_SPL_TINY_MEMSET=y
CONFIG_TPL_TINY_MEMSET=y
CONFIG_ERRNO_STR=y
diff --git a/configs/nanopi-r2s-rk3328_defconfig b/configs/nanopi-r2s-rk3328_defconfig
index f7ed71e4122..180a76e0eeb 100644
--- a/configs/nanopi-r2s-rk3328_defconfig
+++ b/configs/nanopi-r2s-rk3328_defconfig
@@ -48,6 +48,8 @@ CONFIG_CMD_BOOTZ=y
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
+CONFIG_CMD_ROCKUSB=y
+CONFIG_CMD_USB_MASS_STORAGE=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_SPL_OF_CONTROL=y
@@ -98,17 +100,18 @@ CONFIG_SYSINFO=y
CONFIG_SYSRESET=y
# CONFIG_TPL_SYSRESET is not set
CONFIG_USB=y
+CONFIG_DM_USB_GADGET=y
CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
-CONFIG_USB_DWC2=y
CONFIG_USB_DWC3=y
# CONFIG_USB_DWC3_GADGET is not set
-CONFIG_USB_DWC3_GENERIC=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DWC2_OTG=y
+CONFIG_USB_FUNCTION_ROCKUSB=y
CONFIG_SPL_TINY_MEMSET=y
CONFIG_TPL_TINY_MEMSET=y
CONFIG_ERRNO_STR=y
diff --git a/configs/orangepi-r1-plus-lts-rk3328_defconfig b/configs/orangepi-r1-plus-lts-rk3328_defconfig
index d3d9417509e..a1a96bf2f28 100644
--- a/configs/orangepi-r1-plus-lts-rk3328_defconfig
+++ b/configs/orangepi-r1-plus-lts-rk3328_defconfig
@@ -48,6 +48,8 @@ CONFIG_CMD_BOOTZ=y
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
+CONFIG_CMD_ROCKUSB=y
+CONFIG_CMD_USB_MASS_STORAGE=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_SPL_OF_CONTROL=y
@@ -99,17 +101,18 @@ CONFIG_SYSINFO=y
CONFIG_SYSRESET=y
# CONFIG_TPL_SYSRESET is not set
CONFIG_USB=y
+CONFIG_DM_USB_GADGET=y
CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
-CONFIG_USB_DWC2=y
CONFIG_USB_DWC3=y
# CONFIG_USB_DWC3_GADGET is not set
-CONFIG_USB_DWC3_GENERIC=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DWC2_OTG=y
+CONFIG_USB_FUNCTION_ROCKUSB=y
CONFIG_SPL_TINY_MEMSET=y
CONFIG_TPL_TINY_MEMSET=y
CONFIG_ERRNO_STR=y
diff --git a/configs/orangepi-r1-plus-rk3328_defconfig b/configs/orangepi-r1-plus-rk3328_defconfig
index 9356e87132e..04273a0491c 100644
--- a/configs/orangepi-r1-plus-rk3328_defconfig
+++ b/configs/orangepi-r1-plus-rk3328_defconfig
@@ -48,6 +48,8 @@ CONFIG_CMD_BOOTZ=y
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
+CONFIG_CMD_ROCKUSB=y
+CONFIG_CMD_USB_MASS_STORAGE=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_SPL_OF_CONTROL=y
@@ -99,17 +101,18 @@ CONFIG_SYSINFO=y
CONFIG_SYSRESET=y
# CONFIG_TPL_SYSRESET is not set
CONFIG_USB=y
+CONFIG_DM_USB_GADGET=y
CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
-CONFIG_USB_DWC2=y
CONFIG_USB_DWC3=y
# CONFIG_USB_DWC3_GADGET is not set
-CONFIG_USB_DWC3_GENERIC=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DWC2_OTG=y
+CONFIG_USB_FUNCTION_ROCKUSB=y
CONFIG_SPL_TINY_MEMSET=y
CONFIG_TPL_TINY_MEMSET=y
CONFIG_ERRNO_STR=y
diff --git a/configs/roc-cc-rk3328_defconfig b/configs/roc-cc-rk3328_defconfig
index 4ac3c9403b0..0e4edcc999d 100644
--- a/configs/roc-cc-rk3328_defconfig
+++ b/configs/roc-cc-rk3328_defconfig
@@ -23,7 +23,6 @@ CONFIG_DEBUG_UART_BASE=0xFF130000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_SYS_LOAD_ADDR=0x800800
CONFIG_DEBUG_UART=y
-# CONFIG_ANDROID_BOOT_IMAGE is not set
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_SPL_LOAD_FIT=y
@@ -48,7 +47,6 @@ CONFIG_CMD_BOOTZ=y
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
-CONFIG_CMD_USB_MASS_STORAGE=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_SPL_OF_CONTROL=y
@@ -68,8 +66,6 @@ CONFIG_SPL_SYSCON=y
CONFIG_TPL_SYSCON=y
CONFIG_CLK=y
CONFIG_SPL_CLK=y
-CONFIG_FASTBOOT_BUF_ADDR=0x800800
-CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_MISC=y
@@ -110,10 +106,7 @@ CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
CONFIG_USB_DWC2=y
CONFIG_USB_DWC3=y
-# CONFIG_USB_DWC3_GADGET is not set
CONFIG_USB_DWC3_GENERIC=y
-CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_DWC2_OTG=y
CONFIG_SPL_TINY_MEMSET=y
CONFIG_TPL_TINY_MEMSET=y
CONFIG_ERRNO_STR=y
diff --git a/configs/rock-pi-e-rk3328_defconfig b/configs/rock-pi-e-rk3328_defconfig
index 6dda900a9b4..6a4284120d2 100644
--- a/configs/rock-pi-e-rk3328_defconfig
+++ b/configs/rock-pi-e-rk3328_defconfig
@@ -24,7 +24,6 @@ CONFIG_DEBUG_UART_BASE=0xFF130000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_SYS_LOAD_ADDR=0x800800
CONFIG_DEBUG_UART=y
-# CONFIG_ANDROID_BOOT_IMAGE is not set
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_SPL_LOAD_FIT=y
@@ -69,8 +68,6 @@ CONFIG_SPL_SYSCON=y
CONFIG_TPL_SYSCON=y
CONFIG_CLK=y
CONFIG_SPL_CLK=y
-CONFIG_FASTBOOT_BUF_ADDR=0x800800
-CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_MISC=y
@@ -109,12 +106,8 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
-CONFIG_USB_DWC2=y
CONFIG_USB_DWC3=y
-# CONFIG_USB_DWC3_GADGET is not set
CONFIG_USB_DWC3_GENERIC=y
-CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_DWC2_OTG=y
CONFIG_SPL_TINY_MEMSET=y
CONFIG_TPL_TINY_MEMSET=y
CONFIG_ERRNO_STR=y
diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
index 0297d098761..fd42059565a 100644
--- a/configs/rock64-rk3328_defconfig
+++ b/configs/rock64-rk3328_defconfig
@@ -23,7 +23,6 @@ CONFIG_DEBUG_UART_BASE=0xFF130000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_SYS_LOAD_ADDR=0x800800
CONFIG_DEBUG_UART=y
-# CONFIG_ANDROID_BOOT_IMAGE is not set
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_SPL_LOAD_FIT=y
@@ -67,8 +66,6 @@ CONFIG_SPL_SYSCON=y
CONFIG_TPL_SYSCON=y
CONFIG_CLK=y
CONFIG_SPL_CLK=y
-CONFIG_FASTBOOT_BUF_ADDR=0x800800
-CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_MISC=y
@@ -111,10 +108,7 @@ CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_GENERIC=y
CONFIG_USB_DWC2=y
CONFIG_USB_DWC3=y
-# CONFIG_USB_DWC3_GADGET is not set
CONFIG_USB_DWC3_GENERIC=y
-CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_DWC2_OTG=y
CONFIG_SPL_TINY_MEMSET=y
CONFIG_TPL_TINY_MEMSET=y
CONFIG_ERRNO_STR=y
--
2.44.0

View File

@ -1,11 +0,0 @@
--- u-boot-2020.10/common/spl/Kconfig.orig 2020-10-07 12:08:54.972632715 +0100
+++ u-boot-2020.10/common/spl/Kconfig 2020-10-07 12:08:59.100672506 +0100
@@ -324,7 +324,7 @@
default 0x200 if ARCH_SOCFPGA || ARCH_AT91
default 0x300 if ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || OMAP44XX || \
OMAP54XX || AM33XX || AM43XX || ARCH_K3
- default 0x4000 if ARCH_ROCKCHIP
+ default 0x200 if ARCH_ROCKCHIP
default 0x822 if TARGET_SIFIVE_FU540
help
Address on the MMC to load U-Boot from, when the MMC is being used

View File

@ -1,96 +0,0 @@
From f10f94831450671a77f61fe413b4a57459963860 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Mon, 10 Aug 2020 22:20:29 +0100
Subject: [PATCH] rpi: Use firmware provided device tree
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
configs/rpi_0_w_defconfig | 2 +-
configs/rpi_2_defconfig | 2 +-
configs/rpi_3_32b_defconfig | 2 +-
configs/rpi_3_b_plus_defconfig | 2 +-
configs/rpi_3_defconfig | 2 +-
configs/rpi_defconfig | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/configs/rpi_0_w_defconfig b/configs/rpi_0_w_defconfig
index bba5e12b12..0241f4c6d3 100644
--- a/configs/rpi_0_w_defconfig
+++ b/configs/rpi_0_w_defconfig
@@ -17,7 +17,7 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
CONFIG_CMD_FS_UUID=y
-CONFIG_OF_EMBED=y
+CONFIG_OF_BOARD=y
CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig
index 1c2bbb29ce..9573e475f4 100644
--- a/configs/rpi_2_defconfig
+++ b/configs/rpi_2_defconfig
@@ -17,7 +17,7 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
CONFIG_CMD_FS_UUID=y
-CONFIG_OF_EMBED=y
+CONFIG_OF_BOARD=y
CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig
index b8a3d17f43..252df994e6 100644
--- a/configs/rpi_3_32b_defconfig
+++ b/configs/rpi_3_32b_defconfig
@@ -18,7 +18,7 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
CONFIG_CMD_FS_UUID=y
-CONFIG_OF_EMBED=y
+CONFIG_OF_BOARD=y
CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
diff --git a/configs/rpi_3_b_plus_defconfig b/configs/rpi_3_b_plus_defconfig
index 4c361438fa..3b2996a2f9 100644
--- a/configs/rpi_3_b_plus_defconfig
+++ b/configs/rpi_3_b_plus_defconfig
@@ -18,7 +18,7 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
CONFIG_CMD_FS_UUID=y
-CONFIG_OF_EMBED=y
+CONFIG_OF_BOARD=y
CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig
index 9b281a4f15..1e9ee6122e 100644
--- a/configs/rpi_3_defconfig
+++ b/configs/rpi_3_defconfig
@@ -18,7 +18,7 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
CONFIG_CMD_FS_UUID=y
-CONFIG_OF_EMBED=y
+CONFIG_OF_BOARD=y
CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig
index b5ad53c37b..223fc03275 100644
--- a/configs/rpi_defconfig
+++ b/configs/rpi_defconfig
@@ -17,7 +17,7 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
CONFIG_CMD_FS_UUID=y
-CONFIG_OF_EMBED=y
+CONFIG_OF_BOARD=y
CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
--
2.26.2

View File

@ -0,0 +1,154 @@
From 5aaa4c98be87eef370a0c50bf6d4ab7f9fcde886 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Mon, 8 Jan 2024 22:13:59 +0000
Subject: [PATCH] rpi: Switch to OF_HAS_PRIOR_STAGE by default
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
On all Raspberry Pi platforms, we're loaded by a prior stage firmware
that has assembled and passed on a device tree binary for us to use.
Switch to using this tree by default.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Cc: Matthias Brugger <mbrugger@suse.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: François Ozog <francois.ozog@linaro.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tested-by: Simon Glass <sjg@chromium.org>
---
To be clear, this is on top of current -next where I've applied v8 of
Simon's series that introduces OF_HAS_PRIOR_STAGE.
I've only been able to test this on my Raspberry Pi 3 boards but this
should work everywhere. What may, or may not, be a problem is that
arch/arm/dts/bcm283x-u-boot.dtsi is never used now. On the other hand,
I believe this should stop the problems we have where changes made to
the device tree via config.txt or similar aren't reflected when booting
U-Boot or Linux since we will be using that tree for certain now.
---
arch/arm/Kconfig | 1 +
arch/arm/mach-bcm283x/Kconfig | 3 ---
configs/rpi_0_w_defconfig | 1 -
configs/rpi_2_defconfig | 1 -
configs/rpi_3_32b_defconfig | 1 -
configs/rpi_3_b_plus_defconfig | 1 -
configs/rpi_3_defconfig | 1 -
configs/rpi_defconfig | 1 -
8 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 1fd7aacc380..33bbe7b4898 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -645,6 +645,7 @@ config ARCH_BCM283X
select SERIAL_SEARCH_ALL
imply CMD_DM
imply FAT_WRITE
+ imply OF_HAS_PRIOR_STAGE
config ARCH_BCMSTB
bool "Broadcom BCM7XXX family"
diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig
index 6ce278c6d29..b3287ce8bce 100644
--- a/arch/arm/mach-bcm283x/Kconfig
+++ b/arch/arm/mach-bcm283x/Kconfig
@@ -163,7 +163,6 @@ config TARGET_RPI_4_32B
This option creates a build targeting the ARMv7/AArch32 ISA.
select BCM2711_32B
- imply OF_HAS_PRIOR_STAGE
config TARGET_RPI_4
bool "Raspberry Pi 4 64-bit build"
@@ -189,7 +188,6 @@ config TARGET_RPI_4
This option creates a build targeting the ARMv8/AArch64 ISA.
select BCM2711_64B
- imply OF_HAS_PRIOR_STAGE
config TARGET_RPI_ARM64
bool "Raspberry Pi one binary 64-bit build"
@@ -197,7 +195,6 @@ config TARGET_RPI_ARM64
Support for all armv8 based Raspberry Pi variants, such as
the RPi 4 model B, in AArch64 (64-bit) mode.
select ARM64
- imply OF_HAS_PRIOR_STAGE
endchoice
diff --git a/configs/rpi_0_w_defconfig b/configs/rpi_0_w_defconfig
index bed143d64d6..98f8904c918 100644
--- a/configs/rpi_0_w_defconfig
+++ b/configs/rpi_0_w_defconfig
@@ -24,7 +24,6 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
CONFIG_CMD_FS_UUID=y
-CONFIG_OF_EMBED=y
CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig
index e4e4843e8cd..1b8676e1d10 100644
--- a/configs/rpi_2_defconfig
+++ b/configs/rpi_2_defconfig
@@ -25,7 +25,6 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
CONFIG_CMD_FS_UUID=y
-CONFIG_OF_EMBED=y
CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig
index 215396599e4..abc10a79ada 100644
--- a/configs/rpi_3_32b_defconfig
+++ b/configs/rpi_3_32b_defconfig
@@ -24,7 +24,6 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
CONFIG_CMD_FS_UUID=y
-CONFIG_OF_EMBED=y
CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
diff --git a/configs/rpi_3_b_plus_defconfig b/configs/rpi_3_b_plus_defconfig
index d1ec55e558a..3c8f8fc1bb7 100644
--- a/configs/rpi_3_b_plus_defconfig
+++ b/configs/rpi_3_b_plus_defconfig
@@ -23,7 +23,6 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
CONFIG_CMD_FS_UUID=y
-CONFIG_OF_EMBED=y
CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig
index 8e9c35b3cef..9853c448809 100644
--- a/configs/rpi_3_defconfig
+++ b/configs/rpi_3_defconfig
@@ -23,7 +23,6 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
CONFIG_CMD_FS_UUID=y
-CONFIG_OF_EMBED=y
CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig
index 89d6372c1de..060a8809506 100644
--- a/configs/rpi_defconfig
+++ b/configs/rpi_defconfig
@@ -24,7 +24,6 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
CONFIG_CMD_FS_UUID=y
-CONFIG_OF_EMBED=y
CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
--
2.43.0

View File

@ -1 +1 @@
SHA512 (u-boot-2021.01-rc4.tar.bz2) = 6de2c60d02276f4eed31b5baf2d8239ad0af30c9d341339a4cd7fa0786068cb5faa1ab8bd0b4155e536962e1a4869906f60f1d2a1e50b0ed15e98c2e84d6a97b
SHA512 (u-boot-2024.04.tar.bz2) = a71270302b38e9e68a83b3acdf8f7635f72d9fa75169e3c2241cdfa21eab834b8f25dfd35c281191bccb2fcec1e86d6b64afcf1d2ed5cd4fdc02258cd75fc236

View File

@ -1,222 +0,0 @@
From patchwork Wed Nov 18 10:27:17 2020
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Icenowy Zheng <icenowy@aosc.io>
X-Patchwork-Id: 1402159
X-Patchwork-Delegate: andre.przywara@arm.com
Return-Path: <u-boot-bounces@lists.denx.de>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@bilbo.ozlabs.org
Authentication-Results: ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de
(client-ip=85.214.62.61; helo=phobos.denx.de;
envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>)
Authentication-Results: ozlabs.org;
dmarc=none (p=none dis=none) header.from=aosc.io
Authentication-Results: ozlabs.org;
dkim=fail reason="signature verification failed" (1024-bit key;
unprotected) header.d=mymailcheap.com header.i=@mymailcheap.com
header.a=rsa-sha256 header.s=default header.b=YYrkSpBD;
dkim=fail reason="signature verification failed" (1024-bit key;
unprotected) header.d=aosc.io header.i=@aosc.io header.a=rsa-sha256
header.s=default header.b=o7lHQ4SZ;
dkim-atps=neutral
Received: from phobos.denx.de (phobos.denx.de [85.214.62.61])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits))
(No client certificate requested)
by ozlabs.org (Postfix) with ESMTPS id 4CbfCp3G62z9s1l
for <incoming@patchwork.ozlabs.org>; Wed, 18 Nov 2020 21:28:22 +1100 (AEDT)
Received: from h2850616.stratoserver.net (localhost [IPv6:::1])
by phobos.denx.de (Postfix) with ESMTP id 00D6D82304;
Wed, 18 Nov 2020 11:28:16 +0100 (CET)
Authentication-Results: phobos.denx.de;
dmarc=none (p=none dis=none) header.from=aosc.io
Authentication-Results: phobos.denx.de;
spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de
Authentication-Results: phobos.denx.de;
dkim=fail reason="signature verification failed" (1024-bit key;
unprotected) header.d=mymailcheap.com header.i=@mymailcheap.com
header.b="YYrkSpBD";
dkim=fail reason="signature verification failed" (1024-bit key;
unprotected) header.d=aosc.io header.i=@aosc.io header.b="o7lHQ4SZ";
dkim-atps=neutral
Received: by phobos.denx.de (Postfix, from userid 109)
id 2E5B282309; Wed, 18 Nov 2020 11:28:11 +0100 (CET)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de
X-Spam-Level:
X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham
autolearn_force=no version=3.4.2
Received: from relay1.mymailcheap.com (relay1.mymailcheap.com
[144.217.248.100])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by phobos.denx.de (Postfix) with ESMTPS id EC082808F1
for <u-boot@lists.denx.de>; Wed, 18 Nov 2020 11:28:05 +0100 (CET)
Authentication-Results: phobos.denx.de;
dmarc=none (p=none dis=none) header.from=aosc.io
Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=icenowy@aosc.io
Received: from filter2.mymailcheap.com (filter2.mymailcheap.com
[91.134.140.82])
by relay1.mymailcheap.com (Postfix) with ESMTPS id 18A423F201;
Wed, 18 Nov 2020 10:27:59 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by filter2.mymailcheap.com (Postfix) with ESMTP id 6377C2A7E9;
Wed, 18 Nov 2020 11:27:58 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mymailcheap.com;
s=default; t=1605695278;
bh=vA5tPn4fjpXJj/OQnRg+m708mrodc5u5TJSDVOSBnHo=;
h=From:To:Cc:Subject:Date:From;
b=YYrkSpBDGdpkLi16yGwNw7yMTXXW566rTdXX2RSRxCe6FylY99qiYDmZR+PZFqCX0
t3yDL0nO6zMKUvJVqZaTwsroyblAKNCaLz1AfCURNqCwohtJcIkDsegRYz9slzT9Qu
BQkTT6dosAIQFtAVrc48QBX38eHXMYreqkbHXz5g=
Received: from filter2.mymailcheap.com ([127.0.0.1])
by localhost (filter2.mymailcheap.com [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id eCMZCx2FVDgE; Wed, 18 Nov 2020 11:27:57 +0100 (CET)
Received: from mail20.mymailcheap.com (mail20.mymailcheap.com [51.83.111.147])
(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by filter2.mymailcheap.com (Postfix) with ESMTPS;
Wed, 18 Nov 2020 11:27:57 +0100 (CET)
Received: from [213.133.102.83] (ml.mymailcheap.com [213.133.102.83])
by mail20.mymailcheap.com (Postfix) with ESMTP id A597A400BE;
Wed, 18 Nov 2020 10:27:56 +0000 (UTC)
Authentication-Results: mail20.mymailcheap.com; dkim=pass (1024-bit key;
unprotected) header.d=aosc.io header.i=@aosc.io header.b="o7lHQ4SZ";
dkim-atps=neutral
AI-Spam-Status: Not processed
Received: from ice-e5v2.lan (unknown [59.41.160.51])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest
SHA256) (No client certificate requested)
by mail20.mymailcheap.com (Postfix) with ESMTPSA id 3B979400BE;
Wed, 18 Nov 2020 10:27:45 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=aosc.io; s=default;
t=1605695270; bh=vA5tPn4fjpXJj/OQnRg+m708mrodc5u5TJSDVOSBnHo=;
h=From:To:Cc:Subject:Date:From;
b=o7lHQ4SZ+kcNlSGrF+USzZxRQhtIEcZFQPjvsiu+MiK+TTjArUzo5bRKHH0I4ZcDM
a4Ywg6IcctT99QEZGbRIHqhvjH6/Kvj4lWM77Bb0DrlHXfEdOj3LC7KiAF1vVGFfPI
0oTEacf71O2OWPmQBqEH/uaV/IiGI4rZvgWiMPkk=
From: Icenowy Zheng <icenowy@aosc.io>
To: Jagan Teki <jagan@amarulasolutions.com>,
Andre Przywara <andre.przywara@arm.com>,
Hans de Goede <hdegoede@redhat.com>
Cc: u-boot@lists.denx.de, linux-sunxi@googlegroups.com,
Icenowy Zheng <icenowy@aosc.io>
Subject: [PATCH v3] sunxi: add PineCube board
Date: Wed, 18 Nov 2020 18:27:17 +0800
Message-Id: <20201118102717.635129-1-icenowy@aosc.io>
X-Mailer: git-send-email 2.28.0
MIME-Version: 1.0
X-Rspamd-Queue-Id: A597A400BE
X-Spamd-Result: default: False [4.90 / 20.00]; RCVD_VIA_SMTP_AUTH(0.00)[];
ARC_NA(0.00)[]; R_DKIM_ALLOW(0.00)[aosc.io:s=default];
RECEIVED_SPAMHAUS_PBL(0.00)[59.41.160.51:received];
FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[];
R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[];
MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[aosc.io];
BROKEN_CONTENT_TYPE(1.50)[]; R_SPF_SOFTFAIL(0.00)[~all];
RCPT_COUNT_FIVE(0.00)[6]; ML_SERVERS(-3.10)[213.133.102.83];
DKIM_TRACE(0.00)[aosc.io:+]; MID_CONTAINS_FROM(1.00)[];
RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[];
MIME_TRACE(0.00)[0:+];
ASN(0.00)[asn:24940, ipnet:213.133.96.0/19, country:DE];
RCVD_COUNT_TWO(0.00)[2];
HFILTER_HELO_BAREIP(3.00)[213.133.102.83,1]
X-Rspamd-Server: mail20.mymailcheap.com
X-BeenThere: u-boot@lists.denx.de
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: U-Boot discussion <u-boot.lists.denx.de>
List-Unsubscribe: <https://lists.denx.de/options/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>
List-Archive: <https://lists.denx.de/pipermail/u-boot/>
List-Post: <mailto:u-boot@lists.denx.de>
List-Help: <mailto:u-boot-request@lists.denx.de?subject=help>
List-Subscribe: <https://lists.denx.de/listinfo/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=subscribe>
Errors-To: u-boot-bounces@lists.denx.de
Sender: "U-Boot" <u-boot-bounces@lists.denx.de>
X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de
X-Virus-Status: Clean
PineCube is an IP camera development kit released by Pine64.
It comes with the following compoents:
- A mainboard with Sochip S3 SoC, a 16MByte SPI Flash, AXP209 PMIC,
a power-only microUSB connector, a USB Type-A connector, a 10/100Mbps
Ethernet port and FPC connectors for camera and daughter board.
- An OV5640-based camera module which is connected to the parallel CSI
bus of the mainboard.
- A daughterboard with several buttons, a SD slot, some IR LEDs, a
microphone and a speaker connector.
As the device tree is synchronized in a previous commit, just add it to
Makefile, create a new MAINTAINER item and provide a defconfig.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
---
Changes since v2:
- Add Makefile reference to DT.
Changes since v1:
- Dropped LDO3 quirk.
arch/arm/dts/Makefile | 1 +
board/sunxi/MAINTAINERS | 5 +++++
configs/pinecube_defconfig | 15 +++++++++++++++
3 files changed, 21 insertions(+)
create mode 100644 configs/pinecube_defconfig
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 7d1a369845..e6993733b0 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -587,6 +587,7 @@ dtb-$(CONFIG_MACH_SUN8I_R40) += \
sun8i-r40-bananapi-m2-ultra.dtb \
sun8i-v40-bananapi-m2-berry.dtb
dtb-$(CONFIG_MACH_SUN8I_V3S) += \
+ sun8i-s3-pinecube.dtb \
sun8i-v3s-licheepi-zero.dtb
dtb-$(CONFIG_MACH_SUN50I_H5) += \
sun50i-h5-bananapi-m2-plus.dtb \
diff --git a/board/sunxi/MAINTAINERS b/board/sunxi/MAINTAINERS
index d3755ae41a..735801ae1d 100644
--- a/board/sunxi/MAINTAINERS
+++ b/board/sunxi/MAINTAINERS
@@ -440,6 +440,11 @@ M: Vasily Khoruzhick <anarsoul@gmail.com>
S: Maintained
F: configs/pinebook_defconfig
+PINECUBE BOARD:
+M: Icenowy Zheng <icenowy@aosc.io>
+S: Maintained
+F: configs/pinecube_defconfig
+
PINE64 BOARDS
M: Andre Przywara <andre.przywara@arm.com>
S: Maintained
diff --git a/configs/pinecube_defconfig b/configs/pinecube_defconfig
new file mode 100644
index 0000000000..a8c404f6b1
--- /dev/null
+++ b/configs/pinecube_defconfig
@@ -0,0 +1,15 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_SPL=y
+CONFIG_MACH_SUN8I_V3S=y
+CONFIG_SUNXI_DRAM_DDR3_1333=y
+CONFIG_DRAM_CLK=504
+CONFIG_DRAM_ODT_EN=y
+CONFIG_I2C0_ENABLE=y
+CONFIG_DEFAULT_DEVICE_TREE="sun8i-s3-pinecube"
+CONFIG_SPL_I2C_SUPPORT=y
+# CONFIG_NETDEVICES is not set
+CONFIG_AXP209_POWER=y
+CONFIG_AXP_DCDC2_VOLT=1250
+CONFIG_AXP_DCDC3_VOLT=3300
+CONFIG_CONS_INDEX=3

View File

@ -1,74 +1,82 @@
%global candidate rc4
#global candidate rc5
%if 0%{?rhel}
%bcond_with toolsonly
%else
%bcond_without toolsonly
%endif
# Set it to "opensbi" (stable) or opensbi-unstable (unstable, git)
%global opensbi opensbi-unstable
Name: uboot-tools
Version: 2021.01
Release: 0.4%{?candidate:.%{candidate}}%{?dist}
Version: 2024.04
Release: 1%{?candidate:.%{candidate}}.1.riscv64%{?dist}
Epoch: 1
Summary: U-Boot utilities
License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+
URL: http://www.denx.de/wiki/U-Boot
Source0: ftp://ftp.denx.de/pub/u-boot/u-boot-%{version}%{?candidate:-%{candidate}}.tar.bz2
Source1: arm-boards
Source2: arm-chromebooks
Source3: aarch64-boards
Source4: aarch64-chromebooks
ExcludeArch: s390x
Source0: https://ftp.denx.de/pub/u-boot/u-boot-%{version}%{?candidate:-%{candidate}}.tar.bz2
Source1: aarch64-boards
Source2: riscv64-boards
# Fedoraisms patches
# Needed to find DT on boot partition that's not the first partition
# This is now legacy, most devices use bootflow, we keep this for the laggards
Patch1: uefi-distro-load-FDT-from-any-partition-on-boot-device.patch
# Needed due to issues with shim
Patch2: uefi-use-Fedora-specific-path-name.patch
# RPi - uses RPI firmware device tree for HAT support
Patch3: rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch
# Ajust the U-Boot offsets in SPL to take less space
#Patch4: rockchip-spl-u-boot-itb-offset.patch
# Identify VFAT partitions as ESP, allows EFI setvar on our images
Patch2: uefi-Add-all-options-for-EFI-System-Partitions.patch
# New function to find fdt for loading from disk
Patch3: uefi-initial-find_fdt_location-for-finding-the-DT-on-disk.patch
# Fedora patches to enable/disable features
Patch4: disable-VBE-by-default.patch
Patch5: enable-bootmenu-by-default.patch
# Should be upstream but it's taking time
Patch6: Add-video-damage-tracking.patch
# Board fixes and enablement
Patch5: Raspberry-Pi-400-Compute-Module-4-support.patch
Patch6: rng-Add-iProc-RNG200-driver.patch
# AllWinner improvements
Patch10: AllWinner-PineTab.patch
Patch11: sunxi-add-PineCube-board.patch
Patch12: 0001-Fixes-for-AllWinner-ethernet-network-interfaces.patch
# TI fixes
Patch13: 0001-Fix-BeagleAI-detection.patch
# RPi - uses RPI firmware device tree for HAT support
Patch10: rpi-Switch-to-OF_HAS_PRIOR_STAGE-by-default.patch
# Rockchips improvements
Patch14: arm-rk3399-enable-rng-on-rock960-and-firefly3399.patch
Patch15: rk3399-Pinebook-pro-EDP-support.patch
Patch11: rockchip-Add-initial-support-for-the-PinePhone-Pro.patch
Patch12: rockchip-Enable-preboot-start-for-pci-usb.patch
Patch13: phy-rockchip-inno-usb2-Write-to-correct-GRF.patch
Patch14: rockchip-Migrate-to-use-DM_USB_GADGET-on-RK3328.patch
# RISCV (riscv64):
Patch20: improve-riscv64-configs.patch
BuildRequires: bc
BuildRequires: bison
BuildRequires: dtc
BuildRequires: make
# Requirements for building on el7
%if 0%{?rhel} == 7
BuildRequires: devtoolset-7-build
BuildRequires: devtoolset-7-binutils
BuildRequires: devtoolset-7-gcc
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python2-libfdt
%else
BuildRequires: flex
BuildRequires: gcc
BuildRequires: gnutls-devel
BuildRequires: libuuid-devel
BuildRequires: make
BuildRequires: ncurses-devel
BuildRequires: openssl-devel
BuildRequires: perl-interpreter
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-libfdt
%endif
BuildRequires: flex bison
BuildRequires: openssl-devel
BuildRequires: SDL-devel
BuildRequires: SDL2-devel
BuildRequires: swig
%ifarch %{arm} aarch64
BuildRequires: vboot-utils
%endif
%if %{with toolsonly}
%ifarch aarch64
BuildRequires: arm-trusted-firmware-armv8
BuildRequires: python3-pyelftools
%endif
%endif
Requires: dtc
%ifarch riscv64
BuildRequires: %{opensbi}
%endif
%description
This package contains a few U-Boot utilities - mkimage for creating boot images
and fw_printenv/fw_setenv for manipulating the boot environment variables.
%if %{with toolsonly}
%ifarch aarch64
%package -n uboot-images-armv8
Summary: U-Boot firmware images for aarch64 boards
@ -78,163 +86,469 @@ BuildArch: noarch
U-Boot firmware binaries for aarch64 boards
%endif
%ifarch %{arm}
%package -n uboot-images-armv7
Summary: U-Boot firmware images for armv7 boards
%ifarch riscv64
%package -n uboot-images-riscv64
Summary: U-Boot firmware images for riscv64 boards
BuildArch: noarch
%description -n uboot-images-armv7
U-Boot firmware binaries for armv7 boards
%description -n uboot-images-riscv64
U-Boot firmware binaries for riscv64 boards
%endif
%endif
%prep
%autosetup -p1 -n u-boot-%{version}%{?candidate:-%{candidate}}
cp %SOURCE1 %SOURCE2 %SOURCE3 %SOURCE4 .
cp %SOURCE1 %SOURCE2 .
%build
mkdir builds
%if 0%{?rhel} == 7
#Enabling DTS for .el7
%{?enable_devtoolset7:%{enable_devtoolset7}}
%make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" tools-only_defconfig O=builds/
%make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" tools-all O=builds/
%if %{with toolsonly}
# OpenSBI firmware is distributed in U-Boot SPL images
%ifarch riscv64
export OPENSBI=%{_datadir}/%{opensbi}/generic/firmware/fw_dynamic.bin
%endif
%ifarch aarch64 %{arm}
%ifarch aarch64 riscv64
for board in $(cat %{_arch}-boards)
do
echo "Building board: $board"
mkdir builds/$(echo $board)/
# ATF selection, needs improving, suggestions of ATF SoC to Board matrix welcome
sun50i=(a64-olinuxino amarula_a64_relic bananapi_m2_plus_h5 bananapi_m64 libretech_all_h3_cc_h5 nanopi_a64 nanopi_neo2 nanopi_neo_plus2 orangepi_pc2 orangepi_prime orangepi_win orangepi_zero_plus orangepi_zero_plus2 pine64-lts pine64_plus pinebook pinephone pinetab sopine_baseboard teres_i)
sun50i=(a64-olinuxino a64-olinuxino-emmc amarula_a64_relic bananapi_m2_plus_h5 bananapi_m64 libretech_all_h3_cc_h5 nanopi_a64 nanopi_neo2 nanopi_neo_plus2 oceanic_5205_5inmfd orangepi_pc2 orangepi_prime orangepi_win orangepi_zero_plus orangepi_zero_plus2 pine64-lts pine64_plus pinebook pinephone pinetab sopine_baseboard teres_i)
if [[ " ${sun50i[*]} " == *" $board "* ]]; then
echo "Board: $board using sun50i_a64"
cp /usr/share/arm-trusted-firmware/sun50i_a64/* builds/$(echo $board)/
cp /usr/share/arm-trusted-firmware/sun50i_a64/bl31.bin builds/$(echo $board)/atf-bl31
fi
sun50h6=(orangepi_lite2 orangepi_one_plus pine_h64)
sun50h6=(beelink_gs1 emlid_neutis_n5_devboard orangepi_3 orangepi_lite2 orangepi_one_plus pine_h64 tanix_tx6)
if [[ " ${sun50h6[*]} " == *" $board "* ]]; then
echo "Board: $board using sun50i_h6"
cp /usr/share/arm-trusted-firmware/sun50i_h6/* builds/$(echo $board)/
cp /usr/share/arm-trusted-firmware/sun50i_h6/bl31.bin builds/$(echo $board)/atf-bl31
fi
rk3328=(evb-rk3328 rock64-rk3328 rock-pi-e-rk3328 roc-cc-rk3328)
sun50i_h616=(orangepi_zero2 orangepi_zero3 transpeed-8k618-t x96_mate)
if [[ " ${sun50i_h616[*]} " == *" $board "* ]]; then
echo "Board: $board using sun50i_h616"
cp /usr/share/arm-trusted-firmware/sun50i_h616/bl31.bin builds/$(echo $board)/atf-bl31
fi
rk3328=(evb-rk3328 nanopi-r2c-plus-rk3328 nanopi-r2c-rk3328 nanopi-r2s-rk3328 orangepi-r1-plus-lts-rk3328 orangepi-r1-plus-rk3328 roc-cc-rk3328 rock64-rk3328 rock-pi-e-rk3328)
if [[ " ${rk3328[*]} " == *" $board "* ]]; then
echo "Board: $board using rk3328"
cp /usr/share/arm-trusted-firmware/rk3328/* builds/$(echo $board)/
cp /usr/share/arm-trusted-firmware/rk3328/bl31.elf builds/$(echo $board)/atf-bl31
fi
rk3399=(evb-rk3399 ficus-rk3399 firefly-rk3399 khadas-edge-captain-rk3399 khadas-edge-rk3399 khadas-edge-v-rk3399 nanopc-t4-rk3399 nanopi-m4-2gb-rk3399 nanopi-m4-rk3399 nanopi-neo4-rk3399 orangepi-rk3399 pinebook-pro-rk3399 puma-rk3399 rock960-rk3399 rock-pi-4c-rk3399 rock-pi-4-rk3399 rock-pi-n10-rk3399pro rockpro64-rk3399 roc-pc-mezzanine-rk3399 roc-pc-rk3399)
rk3399=(eaidk-610-rk3399 evb-rk3399 ficus-rk3399 firefly-rk3399 khadas-edge-captain-rk3399 khadas-edge-rk3399 khadas-edge-v-rk3399 leez-rk3399 nanopc-t4-rk3399 nanopi-m4-2gb-rk3399 nanopi-m4b-rk3399 nanopi-m4-rk3399 nanopi-neo4-rk3399 nanopi-r4s-rk3399 orangepi-rk3399 pinebook-pro-rk3399 pinephone-pro-rk3399 puma-rk3399 rock960-rk3399 rock-pi-4c-rk3399 rock-pi-4-rk3399 rock-pi-n10-rk3399pro rockpro64-rk3399 roc-pc-mezzanine-rk3399 roc-pc-rk3399)
if [[ " ${rk3399[*]} " == *" $board "* ]]; then
echo "Board: $board using rk3399"
cp /usr/share/arm-trusted-firmware/rk3399/* builds/$(echo $board)/
cp builds/$(echo $board)/bl31.elf builds/$(echo $board)/atf-bl31
fi
# End ATF
make $(echo $board)_defconfig O=builds/$(echo $board)/
%make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" O=builds/$(echo $board)/
BINMAN_ALLOW_MISSING=1 make $(echo $board)_defconfig O=builds/$(echo $board)/
BINMAN_ALLOW_MISSING=1 %make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" O=builds/$(echo $board)/
done
%endif
%make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" tools-only_defconfig O=builds/
%make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" tools-all O=builds/
%endif
%install
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
mkdir -p $RPM_BUILD_ROOT%{_datadir}/uboot/
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_mandir}/man1
mkdir -p %{buildroot}%{_datadir}/uboot/
%if %{with toolsonly}
%ifarch aarch64
for board in $(cat %{_arch}-boards)
for board in $(ls builds)
do
mkdir -p $RPM_BUILD_ROOT%{_datadir}/uboot/$(echo $board)/
for file in u-boot.bin u-boot.dtb u-boot.img u-boot-dtb.img u-boot.itb u-boot-sunxi-with-spl.bin u-boot-rockchip.bin idbloader.img spl/boot.bin spl/sunxi-spl.bin
for file in u-boot.bin u-boot.img u-boot-dtb.img u-boot.itb u-boot-sunxi-with-spl.bin u-boot-rockchip-spi.bin u-boot-rockchip.bin idbloader.img idbloader-spi.img spl/boot.bin
do
if [ -f builds/$(echo $board)/$(echo $file) ]; then
install -p -m 0644 builds/$(echo $board)/$(echo $file) $RPM_BUILD_ROOT%{_datadir}/uboot/$(echo $board)/
install -pD -m 0644 builds/$(echo $board)/$(echo $file) %{buildroot}%{_datadir}/uboot/$(echo $board)/$(echo $file)
fi
done
done
# For Apple M-series we also need the nodtb variant
install -pD -m 0644 builds/apple_m1/u-boot-nodtb.bin %{buildroot}%{_datadir}/uboot/apple_m1/u-boot-nodtb.bin
%endif
%ifarch riscv64
for board in $(ls builds)
do
for file in u-boot.bin u-boot.dtb u-boot.img u-boot-nodtb.bin u-boot-dtb.bin u-boot.itb u-boot-dtb.img u-boot.its spl/u-boot-spl.bin spl/u-boot-spl-nodtb.bin spl/u-boot-spl.dtb spl/u-boot-spl-dtb.bin spl/u-boot-spl.bin.normal.out
do
if [ -f builds/$(echo $board)/$(echo $file) ]; then
install -pD -m 0644 builds/$(echo $board)/$(echo $file) %{buildroot}%{_datadir}/uboot/$(echo $board)/$(echo $file)
fi
done
done
%endif
%ifarch %{arm}
for board in $(cat %{_arch}-boards)
do
mkdir -p $RPM_BUILD_ROOT%{_datadir}/uboot/$(echo $board)/
for file in MLO SPL spl/arndale-spl.bin spl/origen-spl.bin spl/*spl.bin u-boot.bin u-boot.dtb u-boot-dtb-tegra.bin u-boot.img u-boot.imx u-boot-spl.kwb u-boot-rockchip.bin u-boot-sunxi-with-spl.bin spl/boot.bin
do
if [ -f builds/$(echo $board)/$(echo $file) ]; then
install -p -m 0644 builds/$(echo $board)/$(echo $file) $RPM_BUILD_ROOT%{_datadir}/uboot/$(echo $board)/
fi
done
done
# Bit of a hack to remove binaries we don't use as they're large
for board in $(cat %{_arch}-boards)
for board in $(ls builds)
do
if [ -f $RPM_BUILD_ROOT%{_datadir}/uboot/$(echo $board)/u-boot-sunxi-with-spl.bin ]; then
rm -f $RPM_BUILD_ROOT%{_datadir}/uboot/$(echo $board)/u-boot.*
rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot.dtb
if [ -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot-sunxi-with-spl.bin ]; then
rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot{,-dtb}.*
rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/sunxi-spl.bin
fi
if [ -f $RPM_BUILD_ROOT%{_datadir}/uboot/$(echo $board)/MLO ]; then
rm -f $RPM_BUILD_ROOT%{_datadir}/uboot/$(echo $board)/u-boot.bin
fi
if [ -f $RPM_BUILD_ROOT%{_datadir}/uboot/$(echo $board)/SPL ]; then
rm -f $RPM_BUILD_ROOT%{_datadir}/uboot/$(echo $board)/u-boot.bin
fi
if [ -f $RPM_BUILD_ROOT%{_datadir}/uboot/$(echo $board)/u-boot.imx ]; then
rm -f $RPM_BUILD_ROOT%{_datadir}/uboot/$(echo $board)/u-boot.bin
if [ -f %{buildroot}%{_datadir}/uboot/$(echo $board)/idbloader.img ]; then
rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot.bin
rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot{,-dtb}.img
fi
done
%endif
for tool in bmp_logo dumpimage env/fw_printenv fit_check_sign fit_info gdb/gdbcont gdb/gdbsend gen_eth_addr gen_ethaddr_crc img2srec mkenvimage mkimage mksunxiboot ncb proftool sunxi-spl-image-builder ubsha1 xway-swap-bytes
for tool in dumpimage env/fw_printenv fit_check_sign fit_info gdb/gdbcont gdb/gdbsend gen_eth_addr gen_ethaddr_crc ifwitool img2srec kwboot mkeficapsule mkenvimage mkimage mksunxiboot ncb proftool sunxi-spl-image-builder
do
install -p -m 0755 builds/tools/$tool $RPM_BUILD_ROOT%{_bindir}
install -p -m 0755 builds/tools/$tool %{buildroot}%{_bindir}
done
install -p -m 0644 doc/mkimage.1 $RPM_BUILD_ROOT%{_mandir}/man1
install -p -m 0644 doc/mkimage.1 %{buildroot}%{_mandir}/man1
install -p -m 0755 builds/tools/env/fw_printenv $RPM_BUILD_ROOT%{_bindir}
( cd $RPM_BUILD_ROOT%{_bindir}; ln -sf fw_printenv fw_setenv )
install -p -m 0644 tools/env/fw_env.config $RPM_BUILD_ROOT%{_sysconfdir}
# Copy sone useful docs over
mkdir -p builds/docs
cp -p board/hisilicon/hikey/README builds/docs/README.hikey
cp -p board/hisilicon/hikey/README builds/docs/README.hikey
cp -p board/Marvell/db-88f6820-gp/README builds/docs/README.mvebu-db-88f6820
cp -p board/rockchip/evb_rk3399/README builds/docs/README.evb_rk3399
cp -p board/solidrun/clearfog/README builds/docs/README.clearfog
cp -p board/solidrun/mx6cuboxi/README builds/docs/README.mx6cuboxi
cp -p board/sunxi/README.sunxi64 builds/docs/README.sunxi64
cp -p board/sunxi/README.nand builds/docs/README.sunxi-nand
cp -p board/ti/am335x/README builds/docs/README.am335x
cp -p board/ti/omap5_uevm/README builds/docs/README.omap5_uevm
cp -p board/udoo/README builds/docs/README.udoo
cp -p board/wandboard/README builds/docs/README.wandboard
cp -p board/warp/README builds/docs/README.warp
cp -p board/warp7/README builds/docs/README.warp7
install -p -m 0755 builds/tools/env/fw_printenv %{buildroot}%{_bindir}
( cd %{buildroot}%{_bindir}; ln -sf fw_printenv fw_setenv )
%files
%doc README doc/README.kwbimage doc/README.distro doc/README.gpt
%doc doc/README.odroid doc/README.rockchip doc/uefi doc/uImage.FIT doc/arch/arm64.rst
%doc doc/README.chromium builds/docs/*
%doc doc/board/amlogic/ doc/board/rockchip/
%doc README doc/develop/distro.rst doc/README.gpt
%doc doc/develop/uefi doc/usage doc/arch/arm64.rst
%{_bindir}/*
%{_mandir}/man1/mkimage.1*
%dir %{_datadir}/uboot/
%config(noreplace) %{_sysconfdir}/fw_env.config
%if %{with toolsonly}
%ifarch aarch64
%files -n uboot-images-armv8
%dir %{_datadir}/uboot/
%{_datadir}/uboot/*
%endif
%ifarch %{arm}
%files -n uboot-images-armv7
%ifarch riscv64
%files -n uboot-images-riscv64
%dir %{_datadir}/uboot/
%{_datadir}/uboot/*
%endif
%endif
%changelog
* Fri Apr 26 2024 David Abdurachmanov <davidlt@rivosinc.com> - 1:2024.04-1.1.riscv64
- Add u-boot-spl.bin.normal.out for riscv64 (VisionFive 2)
* Thu Apr 11 2024 David Abdurachmanov <davidlt@rivosinc.com> - 1:2024.04-1.0.riscv64
- Add support for riscv64
* Wed Apr 03 2024 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2024.04-1
- Update to 2024.04 GA
- Rockchip rk3328 USB fixes
* Wed Mar 27 2024 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2024.04-0.8.rc5
- Update to 2024.04 RC5
* Thu Mar 21 2024 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2024.04-0.7.rc4
- Updated patch for DTB loading
* Fri Mar 15 2024 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2024.04-0.6.rc4
- Updated fix for FDT load
* Wed Mar 13 2024 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2024.04-0.5.rc4
- Fixes for Rockchip rk3399 autoboot
* Tue Mar 12 2024 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2024.04-0.4.rc4
- Update to 2024.04 RC4
- Initial fix for loading DT off /boot (rhbz 2247873)
* Thu Feb 29 2024 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2024.04-0.3.rc3
- Update to 2024.04 RC3
- Enable a number of new upstream devices
- Upstream now builds Rockchip SPI artifacts
- Various cleanups
- Fix ESP partition detection to enable EFI vars
* Wed Feb 14 2024 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2024.04-0.2.rc2
- Update to 2024.04 RC2
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:2024.01-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 08 2024 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2024.01-1
- Update to 2024.01
* Thu Dec 07 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2024.01-0.2.rc4
- Update to 2024.01 RC4
- Rebase SMBIOS patch to latest rev
* Fri Nov 24 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2024.01-0.1.rc3
- Update to 2024.01 RC3
* Tue Oct 31 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2023.10-0.9
- Rebuild
* Mon Oct 23 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 2023.10-0.8
- Further potential upstream fixes
* Mon Oct 02 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 2023.10-0.7
- Update to 2023.10 GA
- Some upstream fixes
* Mon Aug 21 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 2023.10-0.4.rc3
- Update to 2023.10 RC3
* Mon Aug 21 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 2023.10-0.3.rc2
- Add patch to speed up firmware UEFI video output
* Sat Aug 19 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 2023.10-0.2.rc2
- Add patch for Raspberry Pi boot
* Fri Aug 18 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 2023.10-0.1.rc2
- Update to 2023.10 RC2
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2023.07-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jul 11 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 2023.07-1
- Update to 2023.07 GA
* Fri Jun 16 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 2023.07-0.4.rc4
- Disable NFS by default
* Mon Jun 12 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 2023.07-0.3.rc4
- Update to 2023.07 RC4
* Sun Jun 11 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 2023.07-0.2.rc3
- Update to 2023.07 RC3
- Fixes for the Pinephone Pro, RockPro64
* Wed May 17 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 2023.07-0.1.rc2
- Update to 2023.07 RC2
* Tue Apr 04 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 2023.04-1
- Update to 2023.04 GA
* Tue Mar 28 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 2023.04-0.4.rc5
- Update to 2023.04 RC5
- Drop upstreamed patches
- Rockchip boot fixes
* Tue Mar 14 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 2023.04-0.3.rc4
- Update to 2023.04 RC4
* Fri Feb 17 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 2023.04-0.2.rc2
- Update to 2023.04 RC2
* Tue Jan 31 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 2023.04-0.1.rc1
- Update to 2023.04 RC1
- Drop bmp_logo tool
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2023.01-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Wed Jan 18 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 2023.01-1
- Update to 2023.01 GA
* Sat Dec 31 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2023.01-0.4.rc4
- Update PinePhone Pro to latest rev
* Tue Dec 20 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2023.01-0.3.rc4
- Update to 2023.01 RC4
* Mon Dec 05 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2023.01-0.2.rc3
- Update to 2023.01 RC3
* Thu Nov 24 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2023.01-0.1.rc2
- Update to U-Boot 2023.01 RC2
- Update Pinephone Pro patches
* Mon Oct 10 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2022.10-1
- Update to 2022.10 GA
* Tue Sep 06 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2022.10-0.6.rc4
- Update SMBIOS patch
* Tue Sep 06 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2022.10-0.5.rc4
- Update to 2022.10 RC4
- Fix for booting Rockchip devices from NVME
* Tue Aug 23 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2022.10-0.4.rc3
- Update to 2022.10 RC3
* Mon Aug 22 2022 Davide Cavalca <dcavalca@fedoraproject.org> - 2022.10-0.3.rc1
- Install nodtb variant for Apple M1 (rhbz#2068958)
* Tue Aug 16 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2022.10-0.2.rc1
- Fix for DT property propogation via firmware
* Thu Jul 28 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2022.10-0.1.rc1
- Update to 2022.10 RC1
- Enable LTO for firmware builds
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2022.07-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Sun Jul 17 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2022.07-1
- Update to 2022.07 GA
* Mon Jul 04 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2022.07-0.6.rc6
- Update to 2022.07 RC6
* Mon Jun 20 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2022.07-0.5.rc5
- Update to 2022.07 RC5
* Sun Jun 12 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2022.07-0.4.rc4
- Update to 2022.07 RC4
- Some minor Rockchips device fixes
* Wed May 25 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2022.07-0.3.rc3
- Update to 2022.07 RC3
* Sat May 14 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2022.07-0.2.rc2
- Update to 2022.07 RC2
* Tue Apr 26 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2022.07-0.1.rc1
- Update to 2022.07 RC1
* Mon Apr 04 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2022.04-1
- Update to 2022.04 GA
* Mon Mar 28 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2022.04-0.4.rc5
- Update to 2022.04 RC5
* Tue Mar 08 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2022.04-0.3.rc3
- Update to 2022.04 RC3
- Enable new Rockchip devices
* Tue Feb 15 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2022.04-0.2.rc2
- Update to 2022.04 RC2
* Wed Feb 02 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2022.04-0.1.rc1
- Update to 2022.04 RC1
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2022.01-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Mon Jan 10 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2022.01-1
- Update to 2022.01
* Wed Jan 05 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2022.01-0.3.rc4
- Upstream fixes for PHY and UEFI
* Mon Dec 20 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2022.01-0.2.rc4
- Update to 2022.01 RC4
* Mon Nov 15 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2022.01-0.1.rc2
- Update to 2022.01 RC2
* Mon Nov 15 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.10-3
- Fixes for rk3399 devices
* Thu Oct 14 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.10-2
- Fix booting from MMC for Rockchip 3399 (rhbz #2014182)
- Enable new rk3399 devices (Leez, NanoPi-M4B, NanoPi-4S, NanoPi-T4) (rhbz #2009126)
* Mon Oct 04 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.10-1
- Update to 2021.10
* Mon Sep 27 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.10-0.7.rc5
- Update to 2021.10 RC5
* Wed Sep 15 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.10-0.6.rc4
- Update to 2021.10 RC4
- Proposed fix for RPi MMC clock issue
* Tue Sep 14 2021 Sahana Prasad <sahana@redhat.com> - 2021.10-0.6.rc3
- Rebuilt with OpenSSL 3.0.0
* Mon Aug 30 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.10-0.5.rc3
- Update to 2021.10 RC3
* Tue Aug 24 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.10-0.4.rc2
- Fix for Raspberry Pi firmware properties
* Mon Aug 23 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.10-0.3.rc2
- Fix for rockchip SPI
* Mon Aug 16 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.10-0.2.rc2
- Update to 2021.10 RC2
* Sun Aug 08 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.10-0.1.rc1
- Update to 2021.10 RC1
* Thu Jul 22 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.07-2
- Fix regression for Rockchip devices running firmware from SPI flash
* Mon Jul 05 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.07-1
- Update to 2021.07 GA
* Mon Jun 28 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.07-0.6.rc5
- Update to 2021.07 RC5
- Build SPI fash images for ROC-PC-RK3399
* Mon Jun 07 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.07-0.5.rc4
- Update to 2021.07 RC4
* Sat Jun 05 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.07-0.4.rc3
- Fix AllWinner devices booting from mSD/MMC
* Tue May 25 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.07-0.3.rc3
- Update to 2021.07 RC3
- Build against ATF 2.5 GA
* Thu May 13 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.07-0.2.rc2
- Build against new ATF 2.5-rc1
* Mon May 10 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.07-0.1.rc2
- Update to 2021.07 RC2
* Wed Apr 28 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.04-3
- Upstream fix for console regression (rhbz 1946278)
- Fix for fallback.efi crash (rhbz 1733817)
* Wed Apr 21 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.04-2
- Revert keyboard console regression change (rhbz 1946278)
* Sun Apr 18 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.04-1
- Update to 2021.04 GA
- Fix DTB load check (rhbz 1946278)
- Build Rockchip SPI support as idbloader.spi
- Fixes for Rockchip devices
- Build Turris Omnia for MMC/SPI/UART
* Wed Mar 17 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.04-0.6.rc4
- Update to 2021.04 RC4
- Move to upstream fix for SMP on RPi3B and RPi3B+
* Sat Mar 13 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.04-0.5.rc3
- Fix for SMP on RPi3B and RPi3B+
- Initial support for Pinephone 3Gb edition
* Mon Mar 08 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.04-0.4.rc3
- Update to 2021.04 RC3
* Tue Feb 16 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.04-0.3.rc2
- Update to 2021.04 RC2
* Mon Feb 15 2021 Dennis Gilmore <dennis@ausil.us>
- build spi and uart images in addition to mmc for helios4 and clearfog
* Wed Feb 10 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.04-0.2.rc1
- Fixes for network issues on some Allwinner devices
* Mon Feb 01 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.04-0.1.rc1
- Update to 2021.04 RC1
- Add new upstream devices
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2021.01-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jan 11 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.01-1
- Update to 2021.01 GA
- Updates for Raspberry Pi 4 Series of devices
* Tue Jan 5 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.01-0.5.rc5
- Update to 2021.01 RC5
* Sun Dec 27 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 2021.01-0.4.rc4
- Update to 2021.01 RC4
- Latest RPi-400/CM4 support patch

View File

@ -0,0 +1,57 @@
From 86782e882e9542f5f402e00cd87efb36ad0552d3 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Sat, 2 Mar 2024 11:17:42 +0000
Subject: [PATCH v4] disk: dos: Add all options for EFI System Partitions
The EFI spec states that the ESP can be any of FAT12/16/32 but for
compatibility doesn't necssarily require the partition to be the
EFI partition table ID of 0xef. A number of arm devices will not
find their firmware on a FAT partition with an ID of 0xef so also
allow the original FAT12/16/32 partition IDs as they are also
permissable for an ESP.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
v2:
- Add 0x0c option
- Make hex constants consistent
- Move from if to switch statement
v3:
- Fix switch brain fart
v4:
- Drop boot_ind out of switch
disk/part_dos.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/disk/part_dos.c b/disk/part_dos.c
index 567ead7511d..a35181dff4f 100644
--- a/disk/part_dos.c
+++ b/disk/part_dos.c
@@ -40,10 +40,21 @@ static int get_bootable(dos_partition_t *p)
{
int ret = 0;
- if (p->sys_ind == 0xef)
+ switch (p->sys_ind) {
+ case 0x01:
+ case 0x06:
+ case 0x0b:
+ case 0x0c:
+ case 0xef:
ret |= PART_EFI_SYSTEM_PARTITION;
+ break;
+ default:
+ break;
+ }
+
if (p->boot_ind == 0x80)
ret |= PART_BOOTABLE;
+
return ret;
}
--
2.44.0

View File

@ -1,7 +1,7 @@
From cc3700b5c65494547308df395fe63166ff48a1e3 Mon Sep 17 00:00:00 2001
From 4306c538d4a00dd1aa46c55c3c4005c2b0bf7cd5 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Tue, 24 Nov 2020 10:35:48 +0000
Subject: [PATCH 1/2] distro: load FDT from any partition on boot device
Date: Thu, 24 Nov 2022 12:57:55 +0000
Subject: [PATCH] distro: load FDT from any partition on boot device
In the EFI_LOADER boot path, we were only checking the FAT partition
containing the EFI payload for dtb files. But this is somewhat of a
@ -22,17 +22,19 @@ knows) and SoC/board specific ${fdtfile} (which grub does not know).
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
include/config_distro_bootcmd.h | 33 +++++++++++++++++++++++----------
1 file changed, 23 insertions(+), 10 deletions(-)
include/config_distro_bootcmd.h | 37 +++++++++++++++++++++------------
1 file changed, 24 insertions(+), 13 deletions(-)
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index ff29ef5a905..769477cd80e 100644
index fcb319a20ae..e71004fad9c 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -142,24 +142,37 @@
@@ -155,28 +155,39 @@
"fi\0" \
\
"load_efi_dtb=" \
"load ${devtype} ${devnum}:${distro_bootpart} " \
"${fdt_addr_r} ${prefix}${efi_fdtfile}\0" \
- "load ${devtype} ${devnum}:${distro_bootpart} " \
- "${fdt_addr_r} ${prefix}${efi_fdtfile}\0" \
+ "load ${devtype} ${devnum}:${dtb_devp} " \
+ "${fdt_addr_r} ${prefix}${efi_fdtfile} && " \
+ "run boot_efi_binary\0" \
@ -42,11 +44,13 @@ index ff29ef5a905..769477cd80e 100644
+ "scan_dev_for_dtb=" \
"setenv efi_fdtfile ${fdtfile}; " \
BOOTENV_EFI_SET_FDTFILE_FALLBACK \
BOOTENV_RUN_EXTENSION_INIT \
- "for prefix in ${efi_dtb_prefixes}; do " \
- "if test -e ${devtype} " \
- "${devnum}:${distro_bootpart} " \
- "${prefix}${efi_fdtfile}; then " \
- "run load_efi_dtb; " \
- BOOTENV_RUN_EXTENSION_APPLY \
- "fi;" \
- "done;" \
- "run boot_efi_bootmgr;" \
@ -63,10 +67,11 @@ index ff29ef5a905..769477cd80e 100644
+ "${devnum}:${dtb_devp} " \
+ "${prefix}${efi_fdtfile};"\
+ "run load_efi_dtb; " \
+ BOOTENV_RUN_EXTENSION_APPLY \
+ "fi;" \
+ "done; " \
+ "done; " \
+ "run boot_efi_bootmgr\0" \
+ "run boot_efi_binary\0" \
+ "scan_dev_for_efi=" \
"if test -e ${devtype} ${devnum}:${distro_bootpart} " \
"efi/boot/"BOOTEFI_NAME"; then " \
@ -78,5 +83,5 @@ index ff29ef5a905..769477cd80e 100644
"fi; " \
"setenv efi_fdtfile\0"
--
2.29.2
2.38.1

View File

@ -0,0 +1,202 @@
From 8abb44f89aefd25cda27c54c08b68b3a60bea7c3 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Thu, 21 Mar 2024 13:43:24 +0000
Subject: [PATCH] initial find_fdt_location for finding the DT on disk
The old distro boot looked for a DT on the first boot partition
in the /dtb or /dtb/current directories, and Fedora extended this
to look not just on the boot partition but all the partitions on
that disk.
The new ways of booting, both bootstd and bootefi bootmgr processes
don't properly look for those options. This provides a function
to search for the DTB on disk so that if the other DT mechanisms
don't work this will look for one on disk to provide a working DT
so that devices will continue to work as they did previously.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
cmd/bootefi.c | 1 +
cmd/bootmenu.c | 5 ++
include/efi_loader.h | 2 +
lib/efi_loader/efi_helper.c | 105 +++++++++++++++++++++++++++++++++++-
4 files changed, 112 insertions(+), 1 deletion(-)
diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index 9cf9027bf40..8b6194a8702 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -144,6 +144,7 @@ static int do_bootefi(struct cmd_tbl *cmdtp, int flag, int argc,
if (argc > 2) {
uintptr_t fdt_addr;
+ /* Do we need to run find_fdt_location here?*/
fdt_addr = hextoul(argv[2], NULL);
fdt = map_sysmem(fdt_addr, 0);
} else {
diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c
index 78184fccab2..48368c8d42e 100644
--- a/cmd/bootmenu.c
+++ b/cmd/bootmenu.c
@@ -448,6 +448,11 @@ static void handle_uefi_bootnext(void)
u16 bootnext;
efi_status_t ret;
efi_uintn_t size;
+ const char *fdt_opt;
+
+ /* Find the DTB on disk */
+ log_debug("We will load the DTB\n");
+ fdt_opt = find_fdt_location();
/* Initialize EFI drivers */
ret = efi_init_obj_list();
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 7daca0afba2..a969378ff2f 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -524,6 +524,8 @@ struct efi_register_notify_event {
struct list_head handles;
};
+/* Find the FDT on any partition */
+char *find_fdt_location(void);
/* called at pre-initialization */
int efi_init_early(void);
/* Initialize efi execution environment */
diff --git a/lib/efi_loader/efi_helper.c b/lib/efi_loader/efi_helper.c
index 5dd9cc876e4..a33ec39ff74 100644
--- a/lib/efi_loader/efi_helper.c
+++ b/lib/efi_loader/efi_helper.c
@@ -12,6 +12,7 @@
#include <mapmem.h>
#include <dm.h>
#include <fs.h>
+#include <part.h>
#include <efi_api.h>
#include <efi_load_initrd.h>
#include <efi_loader.h>
@@ -24,6 +25,99 @@
const efi_guid_t efi_lf2_initrd_guid = EFI_INITRD_MEDIA_GUID;
#endif
+/* We need to pass a blk device in and return a location, or a loaded DT */
+char *find_fdt_location(void)
+{
+ const char *fdt_filename;
+ /* FIXME: dynamic size */
+ char fdt_fullpath[60];
+ const char *prefix;
+ struct udevice *blk;
+ /* FIXME: Fedora really only cares about first 2*/
+ int MAX_PART = 8;
+ int part;
+ struct disk_partition info;
+ int fdtext;
+ int ret;
+ int retfdt;
+ int retload;
+ loff_t fdtsize;
+ ulong pbraddr;
+ loff_t len_read;
+
+ /* step one logic: we have the DT name we're hunting for */
+ fdt_filename = env_get("fdtfile");
+ if (fdt_filename) {
+ log_debug("FFL: We're looking for the DTB now!: %s\n", fdt_filename);
+
+ /* probe all block disks to search for fdt */
+ uclass_foreach_dev_probe(UCLASS_BLK, blk) {
+ log_debug("FFL: dev name: %s\n", blk->name);
+ struct blk_desc *desc;
+ desc = dev_get_uclass_plat(blk);
+ /* we should get a partition count here for looping */
+ /* For loop for each partition */
+ /* Need to also deal with zero part whole disk - part_get_info_whole_disk */
+ for (part = 1; part <= MAX_PART; part++) {
+ log_debug("FFL: part num: %d\n", part);
+ ret = part_get_info(desc, part, &info);
+ /* if we have partition check it for DT */
+ if (ret < 0) {
+ log_debug("FFL: no partition\n");
+ } else {
+ log_debug("FFL: we have a partition\n");
+ /* we should have a case/for prefix in =/ /dtb/ /dtb/current/ */
+ /* but for now we hard code if for Fedora */
+ prefix = "/dtb";
+ snprintf(fdt_fullpath, sizeof(fdt_fullpath), "%s/%s", prefix, fdt_filename);
+ log_debug("FFL: full name: %s\n", fdt_fullpath);
+ /* search for DT on partition and either find and exit or continue */
+ if (fs_set_blk_dev_with_part(desc, part) == 0){
+ log_debug("FFL: set block part pass\n");
+ fdtext = fs_exists(fdt_fullpath);
+ if (fdtext) {
+ /* we have a fdt!*/
+ if (fs_set_blk_dev_with_part(desc, part) == 0){
+ retfdt = fs_size(fdt_fullpath, &fdtsize);
+ if (retfdt == 0) {
+ log_debug("FFL: we have found a DT on disk, size %lld\n", fdtsize);
+ /* Get the main fdt and map it */
+ const char *fdt_pbr;
+ fdt_pbr = env_get("fdt_addr_r");
+ pbraddr = hextoul(fdt_pbr, NULL);
+ log_debug("FFL: fdr addr: %s\n", fdt_pbr);
+ if (fs_set_blk_dev_with_part(desc, part) == 0){
+ retload = fs_read(fdt_fullpath, pbraddr, 0, fdtsize, &len_read);
+ if (retload == 0) {
+ log_debug("FFL: we have a loaded DT, size %lld we can return\n", fdtsize);
+ log_info("Found DTB: %s\n", fdt_filename);
+ return fdt_pbr;
+ } else {
+ log_debug("FFL: DT load failed\n");
+ }
+ }
+ } else {
+ log_debug("FFL: we DON'T have a DT with size\n");
+ }
+ }
+ } else {
+ /* we don't have a fdt!*/
+ log_debug("FFL: we DON'T have a DT\n");
+ }
+ } else {
+ log_debug("FFL: set block part FAIL\n");
+ }
+ }
+ }
+ }
+ } else {
+ log_debug("FFL: fdt_filename not defined!!\n");
+ }
+
+ /* We didn't find a FDT */
+ return NULL;
+}
+
/**
* efi_create_current_boot_var() - Return Boot#### name were #### is replaced by
* the value of BootCurrent
@@ -432,11 +526,20 @@ efi_status_t efi_install_fdt(void *fdt)
/* Look for device tree that is already installed */
if (efi_get_configuration_table(&efi_guid_fdt))
return EFI_SUCCESS;
+ /* Check if there is device tree loaded from disk */
+ fdt_opt = find_fdt_location();
+ if (fdt_opt)
+ log_debug("Found DTB on disk\n");
/* Check if there is a hardware device tree */
- fdt_opt = env_get("fdt_addr");
+ if (!fdt_opt) {
+ fdt_opt = env_get("fdt_addr");
+ if (fdt_opt)
+ log_info("Found DTB: Prior firmware\n");
+ }
/* Use our own device tree as fallback */
if (!fdt_opt) {
fdt_opt = env_get("fdtcontroladdr");
+ log_debug("Using DT from U-Boot\n");
if (!fdt_opt) {
log_err("ERROR: need device tree\n");
return EFI_NOT_FOUND;
--
2.44.0

View File

@ -1,50 +0,0 @@
From d8fcb72d566b0ebca1613555ac13c0798817487e Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Tue, 24 Nov 2020 10:37:28 +0000
Subject: [PATCH 2/2] use Fedora specific EFI path/name
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
include/config_distro_bootcmd.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index 769477cd80e..22ce3685758 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -92,9 +92,9 @@
#ifdef CONFIG_EFI_LOADER
#if defined(CONFIG_ARM64)
-#define BOOTEFI_NAME "bootaa64.efi"
+#define BOOTEFI_NAME "grubaa64.efi"
#elif defined(CONFIG_ARM)
-#define BOOTEFI_NAME "bootarm.efi"
+#define BOOTEFI_NAME "grubarm.efi"
#elif defined(CONFIG_X86_RUN_32BIT)
#define BOOTEFI_NAME "bootia32.efi"
#elif defined(CONFIG_X86_RUN_64BIT)
@@ -132,7 +132,7 @@
\
"boot_efi_binary=" \
"load ${devtype} ${devnum}:${distro_bootpart} " \
- "${kernel_addr_r} efi/boot/"BOOTEFI_NAME"; " \
+ "${kernel_addr_r} efi/fedora/"BOOTEFI_NAME"; " \
"if fdt addr ${fdt_addr_r}; then " \
"bootefi ${kernel_addr_r} ${fdt_addr_r};" \
"else " \
@@ -169,9 +169,9 @@
"run boot_efi_bootmgr\0" \
"scan_dev_for_efi=" \
"if test -e ${devtype} ${devnum}:${distro_bootpart} " \
- "efi/boot/"BOOTEFI_NAME"; then " \
+ "efi/fedora/"BOOTEFI_NAME"; then " \
"echo Found EFI removable media binary " \
- "efi/boot/"BOOTEFI_NAME"; " \
+ "efi/fedora/"BOOTEFI_NAME"; " \
"run scan_dev_for_dtb; " \
"echo EFI LOAD FAILED: continuing...; " \
"fi; " \
--
2.29.2

View File

@ -1,115 +0,0 @@
From a49845f198af088c4e5e0019edbf519344d78c97 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Tue, 4 Dec 2018 15:29:14 +0000
Subject: [PATCH] usb kbd fixes
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
common/usb_kbd.c | 66 +++++++++++++++++++++++++++++++++++------------
include/console.h | 2 --
2 files changed, 50 insertions(+), 18 deletions(-)
diff --git a/common/usb_kbd.c b/common/usb_kbd.c
index 020f0d4117f..47674ce4458 100644
--- a/common/usb_kbd.c
+++ b/common/usb_kbd.c
@@ -518,25 +518,59 @@ static int probe_usb_keyboard(struct usb_device *dev)
return error;
stdinname = env_get("stdin");
-#if CONFIG_IS_ENABLED(CONSOLE_MUX)
- error = iomux_doenv(stdin, stdinname);
- if (error)
- return error;
-#else
- /* Check if this is the standard input device. */
- if (strcmp(stdinname, DEVNAME))
- return 1;
+ if (CONFIG_IS_ENABLED(CONSOLE_MUX)) {
+ char *devname = DEVNAME;
+ char *newstdin = NULL;
+ /*
+ * stdin might not be set yet.. either way, with console-
+ * mux the sensible thing to do is add ourselves to the
+ * list of stdio devices:
+ */
+ if (stdinname && !strstr(stdinname, DEVNAME)) {
+ newstdin = malloc(strlen(stdinname) +
+ strlen(","DEVNAME) + 1);
+ sprintf(newstdin, "%s,"DEVNAME, stdinname);
+ stdinname = newstdin;
+ } else if (!stdinname) {
+ stdinname = devname;
+ }
+ error = iomux_doenv(stdin, stdinname);
+ free(newstdin);
+ if (error)
+ goto unregister_stdio;
+ } else {
+ /* Check if this is the standard input device. */
+ if (strcmp(stdinname, DEVNAME)) {
+ error = -1;
+ goto unregister_stdio;
+ }
- /* Reassign the console */
- if (overwrite_console())
- return 1;
+ /* Reassign the console */
+ if (overwrite_console()) {
+ error = -1;
+ goto unregister_stdio;
+ }
- error = console_assign(stdin, DEVNAME);
- if (error)
- return error;
-#endif
+ error = console_assign(stdin, DEVNAME);
+ if (error)
+ goto unregister_stdio;
+ }
+
+ return 0;
+unregister_stdio:
+ /*
+ * If probe fails, the device will be removed.. leaving dangling
+ * pointers if the stdio device is not unregistered. If u-boot
+ * is built without stdio_deregister(), just pretend to succeed
+ * in order to avoid dangling pointers.
+ */
+#if CONFIG_IS_ENABLED(SYS_STDIO_DEREGISTER)
+ stdio_deregister(DEVNAME, 1);
+ return error;
+#else
return 0;
+#endif
}
#if !CONFIG_IS_ENABLED(DM_USB)
@@ -642,7 +676,7 @@ static int usb_kbd_remove(struct udevice *dev)
return 0;
err:
- printf("%s: warning, ret=%d", __func__, ret);
+ printf("%s: warning, ret=%d\n", __func__, ret);
return ret;
}
diff --git a/include/console.h b/include/console.h
index e935c601f12..6382ec8e0d6 100644
--- a/include/console.h
+++ b/include/console.h
@@ -56,8 +56,6 @@ int console_announce_r(void);
/*
* CONSOLE multiplexing.
*/
-#ifdef CONFIG_CONSOLE_MUX
#include <iomux.h>
-#endif
#endif
--
2.19.2