Compare commits

...

52 Commits
master ... f35

Author SHA1 Message Date
Peter Robinson 99257f551e Merge branch 'rawhide' into f35 2021-11-15 18:25:59 +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 67440bb409 Merge branch 'rawhide' into f35 2021-10-17 22:51:54 +01: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 be937adc4a Merge branch 'rawhide' into f35 2021-10-04 19:03:27 +01:00
Peter Robinson 6487c37f16 2021.10 2021-10-04 18:52:08 +01:00
Peter Robinson cb422ef36c 2021.10 RC5 2021-10-04 08:20:34 +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
Peter Robinson 346fc7533f rpi4 USB fix for some devices 2021-09-15 15:34:17 +01:00
Peter Robinson 677db9a5f7 U-Boot device firmwares don't currently support LTO 2021-09-15 15:30:06 +01:00
Peter Robinson 51c20a4dae 2021.10 RC4, RPi MMC clk fix 2021-09-15 07:59:14 +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
23 changed files with 1293 additions and 4343 deletions

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

View File

@ -0,0 +1,53 @@
From 1c56fc2835e10cdc039a4c1d049c1a6978e036f3 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Thu, 22 Jul 2021 16:22:48 +0100
Subject: [PATCH] Revert "spi: spi-uclass: Add support to manually relocate spi
memory ops"
This reverts commit 346df7d4fa62afc578d820b3a18815eec765074f.
This patch broke booting Rockchip systems from U-Boot residing on SPI
flash, for at least the Pinebook Pro and Rockpro64, and also confirmed
with the not yet upstream Helios64.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Cc: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Cc: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Pratyush Yadav <p.yadav@ti.com>
---
drivers/spi/spi-uclass.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c
index d867b27806..ec7f4652b3 100644
--- a/drivers/spi/spi-uclass.c
+++ b/drivers/spi/spi-uclass.c
@@ -11,7 +11,6 @@
#include <log.h>
#include <malloc.h>
#include <spi.h>
-#include <spi-mem.h>
#include <dm/device_compat.h>
#include <asm/global_data.h>
#include <dm/device-internal.h>
@@ -200,16 +199,6 @@ static int spi_post_probe(struct udevice *bus)
ops->set_mode += gd->reloc_off;
if (ops->cs_info)
ops->cs_info += gd->reloc_off;
- if (ops->mem_ops) {
- struct spi_controller_mem_ops *mem_ops =
- (struct spi_controller_mem_ops *)ops->mem_ops;
- if (mem_ops->adjust_op_size)
- mem_ops->adjust_op_size += gd->reloc_off;
- if (mem_ops->supports_op)
- mem_ops->supports_op += gd->reloc_off;
- if (mem_ops->exec_op)
- mem_ops->exec_op += gd->reloc_off;
- }
reloc_done++;
}
#endif
--
2.31.1

View File

@ -0,0 +1,158 @@
From 42aa88db46fa88db52bbb5a96fc0eaebe695110e Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Mon, 30 Aug 2021 18:20:39 +0100
Subject: [PATCH] enable hs400 and sdma support
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
configs/firefly-rk3399_defconfig | 2 ++
configs/nanopc-t4-rk3399_defconfig | 2 ++
configs/nanopi-m4-2gb-rk3399_defconfig | 2 ++
configs/nanopi-m4-rk3399_defconfig | 2 ++
configs/nanopi-m4b-rk3399_defconfig | 2 ++
configs/nanopi-neo4-rk3399_defconfig | 2 ++
configs/nanopi-r4s-rk3399_defconfig | 2 ++
configs/pinebook-pro-rk3399_defconfig | 1 +
configs/rock960-rk3399_defconfig | 1 +
configs/rockpro64-rk3399_defconfig | 2 ++
10 files changed, 18 insertions(+)
diff --git a/configs/firefly-rk3399_defconfig b/configs/firefly-rk3399_defconfig
index 2ca2ac35e4..84ee690a2d 100644
--- a/configs/firefly-rk3399_defconfig
+++ b/configs/firefly-rk3399_defconfig
@@ -33,7 +33,9 @@ CONFIG_MISC=y
CONFIG_ROCKCHIP_EFUSE=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MMC_HS400_SUPPORT=y
CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_SDMA=y
CONFIG_MMC_SDHCI_ROCKCHIP=y
CONFIG_SF_DEFAULT_SPEED=20000000
CONFIG_DM_ETH=y
diff --git a/configs/nanopc-t4-rk3399_defconfig b/configs/nanopc-t4-rk3399_defconfig
index a94f428def..722377803e 100644
--- a/configs/nanopc-t4-rk3399_defconfig
+++ b/configs/nanopc-t4-rk3399_defconfig
@@ -30,7 +30,9 @@ CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MMC_HS400_SUPPORT=y
CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_SDMA=y
CONFIG_MMC_SDHCI_ROCKCHIP=y
CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/nanopi-m4-2gb-rk3399_defconfig b/configs/nanopi-m4-2gb-rk3399_defconfig
index c9833fdb85..384d7da80c 100644
--- a/configs/nanopi-m4-2gb-rk3399_defconfig
+++ b/configs/nanopi-m4-2gb-rk3399_defconfig
@@ -29,7 +29,9 @@ CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MMC_HS400_SUPPORT=y
CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_SDMA=y
CONFIG_MMC_SDHCI_ROCKCHIP=y
CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/nanopi-m4-rk3399_defconfig b/configs/nanopi-m4-rk3399_defconfig
index 2b2fcac366..b6b8ca8d3a 100644
--- a/configs/nanopi-m4-rk3399_defconfig
+++ b/configs/nanopi-m4-rk3399_defconfig
@@ -29,7 +29,9 @@ CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MMC_HS400_SUPPORT=y
CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_SDMA=y
CONFIG_MMC_SDHCI_ROCKCHIP=y
CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/nanopi-m4b-rk3399_defconfig b/configs/nanopi-m4b-rk3399_defconfig
index 6d3afe1b63..3f83877e0a 100644
--- a/configs/nanopi-m4b-rk3399_defconfig
+++ b/configs/nanopi-m4b-rk3399_defconfig
@@ -29,7 +29,9 @@ CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MMC_HS400_SUPPORT=y
CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_SDMA=y
CONFIG_MMC_SDHCI_ROCKCHIP=y
CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/nanopi-neo4-rk3399_defconfig b/configs/nanopi-neo4-rk3399_defconfig
index 1bf5d1d095..6412cb2d7e 100644
--- a/configs/nanopi-neo4-rk3399_defconfig
+++ b/configs/nanopi-neo4-rk3399_defconfig
@@ -29,7 +29,9 @@ CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MMC_HS400_SUPPORT=y
CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_SDMA=y
CONFIG_MMC_SDHCI_ROCKCHIP=y
CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/nanopi-r4s-rk3399_defconfig b/configs/nanopi-r4s-rk3399_defconfig
index 351d2eb553..7b527d47fa 100644
--- a/configs/nanopi-r4s-rk3399_defconfig
+++ b/configs/nanopi-r4s-rk3399_defconfig
@@ -29,7 +29,9 @@ CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MMC_HS400_SUPPORT=y
CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_SDMA=y
CONFIG_MMC_SDHCI_ROCKCHIP=y
CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/pinebook-pro-rk3399_defconfig b/configs/pinebook-pro-rk3399_defconfig
index f97d5e872b..b0e68c9591 100644
--- a/configs/pinebook-pro-rk3399_defconfig
+++ b/configs/pinebook-pro-rk3399_defconfig
@@ -46,6 +46,7 @@ CONFIG_MISC=y
CONFIG_ROCKCHIP_EFUSE=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MMC_HS400_SUPPORT=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_SDMA=y
CONFIG_MMC_SDHCI_ROCKCHIP=y
diff --git a/configs/rock960-rk3399_defconfig b/configs/rock960-rk3399_defconfig
index 0233e0ea52..624d718f9f 100644
--- a/configs/rock960-rk3399_defconfig
+++ b/configs/rock960-rk3399_defconfig
@@ -36,6 +36,7 @@ CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MMC_HS400_SUPPORT=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_SDMA=y
CONFIG_MMC_SDHCI_ROCKCHIP=y
diff --git a/configs/rockpro64-rk3399_defconfig b/configs/rockpro64-rk3399_defconfig
index ae11a8f5eb..b4e7e9700a 100644
--- a/configs/rockpro64-rk3399_defconfig
+++ b/configs/rockpro64-rk3399_defconfig
@@ -39,7 +39,9 @@ CONFIG_MISC=y
CONFIG_ROCKCHIP_EFUSE=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MMC_HS400_SUPPORT=y
CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_SDMA=y
CONFIG_MMC_SDHCI_ROCKCHIP=y
CONFIG_SF_DEFAULT_BUS=1
CONFIG_SPI_FLASH_GIGADEVICE=y
--
2.31.1

View File

@ -0,0 +1,203 @@
From patchwork Thu Jun 17 09:22:03 2021
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Marek Szyprowski <m.szyprowski@samsung.com>
X-Patchwork-Id: 1493284
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;
dkim=pass (1024-bit key;
unprotected) header.d=samsung.com header.i=@samsung.com header.a=rsa-sha256
header.s=mail20170921 header.b=S423zQBA;
dkim-atps=neutral
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))
(No client certificate requested)
by ozlabs.org (Postfix) with ESMTPS id 4G5GmF2YYPz9s1l
for <incoming@patchwork.ozlabs.org>; Thu, 17 Jun 2021 19:22:21 +1000 (AEST)
Received: from h2850616.stratoserver.net (localhost [IPv6:::1])
by phobos.denx.de (Postfix) with ESMTP id 380E981E1C;
Thu, 17 Jun 2021 11:22:15 +0200 (CEST)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=none dis=none) header.from=samsung.com
Authentication-Results: phobos.denx.de;
spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de
Authentication-Results: phobos.denx.de;
dkim=pass (1024-bit key;
unprotected) header.d=samsung.com header.i=@samsung.com header.b="S423zQBA";
dkim-atps=neutral
Received: by phobos.denx.de (Postfix, from userid 109)
id 066B882024; Thu, 17 Jun 2021 11:22:14 +0200 (CEST)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de
X-Spam-Level:
X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,
DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_MSPIKE_H3,
RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=ham autolearn_force=no
version=3.4.2
Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com
[210.118.77.12])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by phobos.denx.de (Postfix) with ESMTPS id 791718020E
for <u-boot@lists.denx.de>; Thu, 17 Jun 2021 11:22:09 +0200 (CEST)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=none dis=none) header.from=samsung.com
Authentication-Results: phobos.denx.de;
spf=pass smtp.mailfrom=m.szyprowski@samsung.com
Received: from eucas1p1.samsung.com (unknown [182.198.249.206])
by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id
20210617092208euoutp02306cccdadbd0a0fa3e360e9b40c870e4~JVDVFtPo90470104701euoutp02N
for <u-boot@lists.denx.de>; Thu, 17 Jun 2021 09:22:08 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com
20210617092208euoutp02306cccdadbd0a0fa3e360e9b40c870e4~JVDVFtPo90470104701euoutp02N
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com;
s=mail20170921; t=1623921728;
bh=g6sGWmD8hHxoWJS92fMYWdZG8PUB5T7hF5BCApkjjtQ=;
h=From:To:Cc:Subject:Date:References:From;
b=S423zQBAD3CJixEJMLt4LIue0UknKK6dcTJTYm0QESnzOGnr8JSiTSWbI42vYfeEr
uPY3rg88YpmiNYbY2UtEBDu9k20/SxO3xqChy69dH5g2tu3FlkC+Y9+355chFE9zhR
YtgdD6ME6PXoo6ju6YGnhtM4h3d1wOCBgZ8DRNHg=
Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by
eucas1p2.samsung.com (KnoxPortal) with ESMTP id
20210617092207eucas1p254ca42a27f671fd370b24d43d77bced7~JVDUqibou0517905179eucas1p28;
Thu, 17 Jun 2021 09:22:07 +0000 (GMT)
Received: from eucas1p1.samsung.com ( [182.198.249.206]) by
eusmges3new.samsung.com (EUCPMTA) with SMTP id 97.82.09439.F341BC06; Thu, 17
Jun 2021 10:22:07 +0100 (BST)
Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by
eucas1p2.samsung.com (KnoxPortal) with ESMTPA id
20210617092207eucas1p2fba39144e5d4890a23ba70f794a25b79~JVDULHlNB0517805178eucas1p2x;
Thu, 17 Jun 2021 09:22:07 +0000 (GMT)
Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by
eusmtrp1.samsung.com (KnoxPortal) with ESMTP id
20210617092207eusmtrp1b3838c7f35a29ad48395199a93d03d9f~JVDUKaS5h2885128851eusmtrp1P;
Thu, 17 Jun 2021 09:22:07 +0000 (GMT)
X-AuditID: cbfec7f5-c03ff700000024df-38-60cb143fddfe
Received: from eusmtip2.samsung.com ( [203.254.199.222]) by
eusmgms1.samsung.com (EUCPMTA) with SMTP id 8C.31.08705.F341BC06; Thu, 17
Jun 2021 10:22:07 +0100 (BST)
Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by
eusmtip2.samsung.com (KnoxPortal) with ESMTPA id
20210617092206eusmtip2389e23cf1a3074d360ad1974f6ed1b53~JVDTufYcj1280412804eusmtip2z;
Thu, 17 Jun 2021 09:22:06 +0000 (GMT)
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: u-boot@lists.denx.de
Cc: Marek Szyprowski <m.szyprowski@samsung.com>, Matthias Brugger
<mbrugger@suse.com>, Sylwester Nawrocki <s.nawrocki@samsung.com>, Nicolas
Saenz Julienne <nsaenzjulienne@suse.de>, Jaehoon Chung
<jh80.chung@samsung.com>, Bartlomiej Zolnierkiewicz
<b.zolnierkie@samsung.com>
Subject: [PATCH] ARM: bcm283x: change the virtual address of the XHCI PCI
device base
Date: Thu, 17 Jun 2021 11:22:03 +0200
Message-Id: <20210617092203.19825-1-m.szyprowski@samsung.com>
X-Mailer: git-send-email 2.17.1
X-Brightmail-Tracker:
H4sIAAAAAAAAA+NgFrrDIsWRmVeSWpSXmKPExsWy7djPc7r2IqcTDB40GFtsnLGe1eLGrzZW
i7VH7rJbLJj8hNVi26zlbBaH37SzWrzd28nuwO5x9s4ORo++LasYPdZvucrisfl0dQBLFJdN
SmpOZllqkb5dAlfG+eermQqO8lT09y5naWC8xtXFyMkhIWAi0X/mMEsXIxeHkMAKRol9356w
dzFyADlfGCVuhkHEPzNKNNycywLT8G/nNkaIxHJGiaWdm1ghHKCGffe+sYNUsQkYSnS97WID
sUUEJCR+9V8F62AWmMkk0dw5kRUkISwQLvH7/2xGEJtFQFWib/cHsAZeAVuJl+e62SDWyUus
3nCAGaRZQuAnu8Si7/sYIRIuEo+6V0LZwhKvjm9hh7BlJE5P7mGBaGhmlHh4bi07hNPDKHG5
aQZUh7XEnXO/2EA+ZRbQlFi/Sx/ElBBwlJg7gR/C5JO48VYQpJgZyJy0bTozRJhXoqNNCGKG
msSs4+vgth68cIkZwvaQuPd4Pdj5QgKxEkcOfWScwCg3C2HVAkbGVYziqaXFuempxcZ5qeV6
xYm5xaV56XrJ+bmbGIEJ4PS/4193MK549VHvECMTB+MhRgkOZiURXt3iEwlCvCmJlVWpRfnx
RaU5qcWHGKU5WJTEeXdtXRMvJJCeWJKanZpakFoEk2Xi4JRqYBJge2bX53WWz1Lf4MPq4pKd
L2Z7TUp3VDv2fwfHf6Y2rg5e979vjNICyxdMeW+qc0OHOVT8Q+3kj7qOC66fOsy4xb61uH4h
951lnRF8exoM9TeGJ715tqduV6XnjaXVPyYtMn03k3MLb92nXs2vNxpuFebsiS62yarPnZ9d
ZPBOU0yvpoR307TFV/niSsVfeYrt4A/k1bB+WKXxd382MxdrGIvDrJUsCSsW7NglYTjXcVbO
1bzaJ8lfWv7511UuqNvpJJ+093bvgWOlqbeVfjW2v3j+fP79PKeNgUle3dO622YUq2S4Cyh/
DZbd7mC8SedY8eZZfxdGrozhnGFmGj9nwTKzJQWb562Rl/9prMRSnJFoqMVcVJwIAFvDw65v
AwAA
X-Brightmail-Tracker:
H4sIAAAAAAAAA+NgFtrCLMWRmVeSWpSXmKPExsVy+t/xe7r2IqcTDNb0CFlsnLGe1eLGrzZW
i7VH7rJbLJj8hNVi26zlbBaH37SzWrzd28nuwO5x9s4ORo++LasYPdZvucrisfl0dQBLlJ5N
UX5pSapCRn5xia1StKGFkZ6hpYWekYmlnqGxeayVkamSvp1NSmpOZllqkb5dgl7G+eermQqO
8lT09y5naWC8xtXFyMkhIWAi8W/nNsYuRi4OIYGljBJP/q5gh0jISJyc1sAKYQtL/LnWxQZR
9IlRYs/8y2AJNgFDia63IAlODhEBCYlf/VfBJjELzGaSeL7iLhNIQlggVOL5jHVgDSwCqhJ9
uz+ANfAK2Eq8PNfNBrFBXmL1hgPMExh5FjAyrGIUSS0tzk3PLTbUK07MLS7NS9dLzs/dxAgM
vm3Hfm7ewTjv1Ue9Q4xMHIyHGCU4mJVEeHWLTyQI8aYkVlalFuXHF5XmpBYfYjQF2jeRWUo0
OR8Y/nkl8YZmBqaGJmaWBqaWZsZK4rxb566JFxJITyxJzU5NLUgtgulj4uCUamAyvS18MHIp
7+EpilHuXy7d3MPzPnfRlSWnFr5+m5lzNSx03owzNw51LmK5Hv4vJ6nPlaHi3Ma1ZubH/23N
uHX0nlWi8bL9jxzLqptsE0+y961tVtRKuvD/QGJR1+3NeoUWKW7rH9pz89YdcnimPGWf7Jb/
fVnJZ6tdbPuu3nv29sWhteIKixdUX1rlHzUtVfyN0ILXawqfTJU7/SR/jtrSjMpvufKfZKb+
3b1sW2hkU2aN9VuDk+52mbFrb3P/1LzhsN309FfG24tY3TjtzFaLf35WI6rUZiAa8lNEtFJE
1a9l8zLRs3wbm574XwmsP111UPfxm4q0yHKuE6GbZm1T/LfpzOkcP6Yg1r+3Vmy8osRSnJFo
qMVcVJwIAKDUsMjHAgAA
X-CMS-MailID: 20210617092207eucas1p2fba39144e5d4890a23ba70f794a25b79
X-Msg-Generator: CA
X-RootMTR: 20210617092207eucas1p2fba39144e5d4890a23ba70f794a25b79
X-EPHeader: CA
CMS-TYPE: 201P
X-CMS-RootMailID: 20210617092207eucas1p2fba39144e5d4890a23ba70f794a25b79
References:
<CGME20210617092207eucas1p2fba39144e5d4890a23ba70f794a25b79@eucas1p2.samsung.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.103.2 at phobos.denx.de
X-Virus-Status: Clean
Move the XHCI PCI device base up in the virtual address space. This fixes
initialization failure observed with newer Raspberry Pi firmware, later
than 63b1922311 ("firmware: arm_loader: Update armstubs with those from
PR 117). It looks that chosing 0xff800000 as the XHCI PCI device base
conflicts with the updated ARM/VideoCore firmware.
This also requires to reduce the size of the mapped PCI device region
from 8MiB to 4MiB to fit into 32bit address space. This is still enough
for the XHCI PCI device.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Tested-by: Stefan Agner <stefan@agner.ch>
---
This fixes the issue observed on ARM 32bit after upgrading the RPi4
firmware files, described some time ago here:
https://lists.denx.de/pipermail/u-boot/2021-February/442317.html
---
arch/arm/mach-bcm283x/init.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-bcm283x/init.c b/arch/arm/mach-bcm283x/init.c
index 49027ce0a2..9803499985 100644
--- a/arch/arm/mach-bcm283x/init.c
+++ b/arch/arm/mach-bcm283x/init.c
@@ -14,7 +14,7 @@
#include <asm/global_data.h>
#define BCM2711_RPI4_PCIE_XHCI_MMIO_PHYS 0x600000000UL
-#define BCM2711_RPI4_PCIE_XHCI_MMIO_SIZE 0x800000UL
+#define BCM2711_RPI4_PCIE_XHCI_MMIO_SIZE 0x400000UL
#ifdef CONFIG_ARM64
#include <asm/armv8/mmu.h>
@@ -148,7 +148,7 @@ int mach_cpu_init(void)
#ifdef CONFIG_ARMV7_LPAE
#ifdef CONFIG_TARGET_RPI_4_32B
-#define BCM2711_RPI4_PCIE_XHCI_MMIO_VIRT 0xff800000UL
+#define BCM2711_RPI4_PCIE_XHCI_MMIO_VIRT 0xffc00000UL
#include <addr_map.h>
#include <asm/system.h>

File diff suppressed because it is too large Load Diff

View File

@ -2,9 +2,9 @@ a64-olinuxino
amarula_a64_relic
bananapi_m2_plus_h5
bananapi_m64
beelink_gs1
dragonboard410c
dragonboard820c
espresso7420
evb-rk3328
evb-rk3399
ficus-rk3399
@ -12,12 +12,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 +29,23 @@ 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-r2s-rk3328
nanopi-r4s-rk3399
odroid-c2
orangepi_3
orangepi_lite2
orangepi_one_plus
orangepi_pc2
orangepi_prime
orangepi-rk3399
orangepi_win
orangepi_zero2
orangepi_zero_plus
orangepi_zero_plus2
p212
@ -50,25 +56,26 @@ pine64-lts
pine64_plus
pinebook
pinebook-pro-rk3399
pine_h64
pinephone
pinetab
pine_h64
poplar
puma-rk3399
roc-cc-rk3328
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
roc-pc-rk3399
rpi_3
rpi_4
rpi_arm64
sopine_baseboard
tanix_tx6
teres_i
turris_mox
vexpress_aemv8a_juno

View File

View File

@ -57,7 +57,6 @@ inet_q972
Itead_Ibox_A20
jesurun_q5
jetson-tk1
kc1
Lamobo_R1
libretech_all_h3_cc_h2_plus
Linksprite_pcDuino
@ -113,8 +112,8 @@ qemu_arm
r7-tv-dongle
riotboard
rock
rock-pi-n8-rk3288
rock2
rock-pi-n8-rk3288
rpi_2
rpi_3_32b
rpi_4_32b
@ -128,16 +127,15 @@ tbs_a711
tinker-rk3288
tinker-s-rk3288
trimslice
turris_omnia
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
Yones_Toptech_BS1078_V2
zeropi

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,115 @@
From patchwork Mon Nov 1 04:43:47 2021
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Yifeng Zhao <yifeng.zhao@rock-chips.com>
X-Patchwork-Id: 1548950
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>)
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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HjL646Yhcz9sS8
for <incoming@patchwork.ozlabs.org>; Mon, 1 Nov 2021 15:44:12 +1100 (AEDT)
Received: from h2850616.stratoserver.net (localhost [IPv6:::1])
by phobos.denx.de (Postfix) with ESMTP id 6212783389;
Mon, 1 Nov 2021 05:44:06 +0100 (CET)
Authentication-Results: phobos.denx.de;
dmarc=none (p=none dis=none) header.from=rock-chips.com
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 26A6483395; Mon, 1 Nov 2021 05:44:05 +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=-0.4 required=5.0 tests=BAYES_00,RCVD_IN_SORBS_WEB,
SPF_HELO_NONE,T_SPF_PERMERROR autolearn=no autolearn_force=no
version=3.4.2
Received: from lucky1.263xmail.com (lucky1.263xmail.com [211.157.147.134])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by phobos.denx.de (Postfix) with ESMTPS id 04D7B83383
for <u-boot@lists.denx.de>; Mon, 1 Nov 2021 05:43:59 +0100 (CET)
Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none)
header.from=rock-chips.com
Authentication-Results: phobos.denx.de;
spf=fail smtp.mailfrom=yifeng.zhao@rock-chips.com
Received: from localhost (unknown [192.168.167.16])
by lucky1.263xmail.com (Postfix) with ESMTP id 1B96CD124A;
Mon, 1 Nov 2021 12:43:55 +0800 (CST)
X-MAIL-GRAY: 0
X-MAIL-DELIVERY: 1
X-ADDR-CHECKED4: 1
X-SKE-CHECKED: 1
X-ANTISPAM-LEVEL: 2
Received: from localhost.localdomain (unknown [58.22.7.114])
by smtp.263.net (postfix) whith ESMTP id
P5172T139932542678784S1635741828952225_;
Mon, 01 Nov 2021 12:43:55 +0800 (CST)
X-IP-DOMAINF: 1
X-RL-SENDER: yifeng.zhao@rock-chips.com
X-SENDER: zyf@rock-chips.com
X-LOGIN-NAME: yifeng.zhao@rock-chips.com
X-FST-TO: kever.yang@rock-chips.com
X-RCPT-COUNT: 7
X-LOCAL-RCPT-COUNT: 2
X-SENDER-IP: 58.22.7.114
X-ATTACHMENT-NUM: 0
X-UNIQUE-TAG: <8beb59827f65d556787d36e0068aa9cb>
X-System-Flag: 0
From: Yifeng Zhao <yifeng.zhao@rock-chips.com>
To: Kever Yang <kever.yang@rock-chips.com>
Cc: sjg <sjg@chromium.org>, Peter Robinson <pbrobinson@gmail.com>,
Philipp Tomsich <philipp.tomsich@theobroma-systems.com>,
u-boot@lists.denx.de, Jack Mitchell <ml@embed.me.uk>,
Yifeng Zhao <yifeng.zhao@rock-chips.com>
Subject: [PATCH] dts: rockchip: rk3399: enable emmc phy for spl
Date: Mon, 1 Nov 2021 12:43:47 +0800
Message-Id: <20211101044347.17822-1-yifeng.zhao@rock-chips.com>
X-Mailer: git-send-email 2.17.1
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.103.2 at phobos.denx.de
X-Virus-Status: Clean
adapting commit ac804143cf ("mmc: rockchip_sdhci: add phy and clock
config for rk3399") to fix the issue "Not found emmc phy device".
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
---
arch/arm/dts/rk3399-u-boot.dtsi | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/dts/rk3399-u-boot.dtsi b/arch/arm/dts/rk3399-u-boot.dtsi
index 73922c328a..716b9a433a 100644
--- a/arch/arm/dts/rk3399-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-u-boot.dtsi
@@ -88,6 +88,10 @@
u-boot,dm-pre-reloc;
};
+&emmc_phy {
+ u-boot,dm-pre-reloc;
+};
+
&grf {
u-boot,dm-pre-reloc;
};

View File

@ -0,0 +1,233 @@
From patchwork Tue Apr 6 15:10:59 2021
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: 1462876
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;
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=unszVtqT;
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=mWwYCh9A;
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) server-digest
SHA256)
(No client certificate requested)
by ozlabs.org (Postfix) with ESMTPS id 4FF9wc3GdNz9sW1
for <incoming@patchwork.ozlabs.org>; Wed, 7 Apr 2021 01:11:42 +1000 (AEST)
Received: from h2850616.stratoserver.net (localhost [IPv6:::1])
by phobos.denx.de (Postfix) with ESMTP id C1F9C8040A;
Tue, 6 Apr 2021 17:11:32 +0200 (CEST)
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="unszVtqT";
dkim=fail reason="signature verification failed" (1024-bit key;
unprotected) header.d=aosc.io header.i=@aosc.io header.b="mWwYCh9A";
dkim-atps=neutral
Received: by phobos.denx.de (Postfix, from userid 109)
id E4F22805B4; Tue, 6 Apr 2021 17:11:30 +0200 (CEST)
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 autolearn=ham
autolearn_force=no version=3.4.2
Received: from relay3.mymailcheap.com (relay3.mymailcheap.com
[217.182.66.161])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by phobos.denx.de (Postfix) with ESMTPS id 2FC4A8039D
for <u-boot@lists.denx.de>; Tue, 6 Apr 2021 17:11:27 +0200 (CEST)
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 relay3.mymailcheap.com (Postfix) with ESMTPS id A6AC13ECDF;
Tue, 6 Apr 2021 17:11:26 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
by filter2.mymailcheap.com (Postfix) with ESMTP id 88D512A915;
Tue, 6 Apr 2021 17:11:26 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mymailcheap.com;
s=default; t=1617721886;
bh=qb5gt5o7M9qjdJd67A3WHGZp/76w4s4FS6+u1VuEh/o=;
h=From:To:Cc:Subject:Date:From;
b=unszVtqTnO9MGZVbgLH5H0cMo3VfQ+g5377blmOUcrtzMSqNbDD5SM25MUhlTUKiB
hTFq4L53gszBYfRPfh7Z5XgNVERULL5Zx0+WnVjZ7kUIp/wS3IQqxe81ChoFEsLTr8
22UB9NN3OSVkuN/jRAzX+lKpugVGBHwOCjZBZukQ=
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 V9lVOgo6gApH; Tue, 6 Apr 2021 17:11:25 +0200 (CEST)
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;
Tue, 6 Apr 2021 17:11:25 +0200 (CEST)
Received: from [213.133.102.83] (ml.mymailcheap.com [213.133.102.83])
by mail20.mymailcheap.com (Postfix) with ESMTP id C9EA3400B6;
Tue, 6 Apr 2021 15:11:24 +0000 (UTC)
Authentication-Results: mail20.mymailcheap.com; dkim=pass (1024-bit key;
unprotected) header.d=aosc.io header.i=@aosc.io header.b="mWwYCh9A";
dkim-atps=neutral
AI-Spam-Status: Not processed
Received: from ice-e5v2.lan (unknown [59.41.163.135])
(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 251F840C16;
Tue, 6 Apr 2021 15:11:10 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=aosc.io; s=default;
t=1617721874; bh=qb5gt5o7M9qjdJd67A3WHGZp/76w4s4FS6+u1VuEh/o=;
h=From:To:Cc:Subject:Date:From;
b=mWwYCh9AM8eRWm9hiEqirytotj/G/C1p9r2fd0zUxPhS0UQH+kw6L3RWZnsfmXAYq
HmYFiM3ktIfwevqQw89tOi8c2ktb49iYOyHXkfi8hTZl1dNsJDS94uyzBiHYY+U7x5
P0aTRRaL5C8ua2c1GedoPx06nrARO/KMEFy39rxI=
From: Icenowy Zheng <icenowy@aosc.io>
To: Simon Glass <sjg@chromium.org>, Kever Yang <kever.yang@rock-chips.com>,
Frank Wang <frank.wang@rock-chips.com>,
Jagan Teki <jagan@amarulasolutions.com>
Cc: u-boot@lists.denx.de,
Icenowy Zheng <icenowy@aosc.io>
Subject: [PATCH] phy: rockchip: inno-usb2: fix hang when multiple controllers
exit
Date: Tue, 6 Apr 2021 23:10:59 +0800
Message-Id: <20210406151059.1187379-1-icenowy@aosc.io>
X-Mailer: git-send-email 2.30.2
MIME-Version: 1.0
X-Rspamd-Server: mail20.mymailcheap.com
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.163.135: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-Queue-Id: C9EA3400B6
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.4 at phobos.denx.de
X-Virus-Status: Clean
The OHCI and EHCI controllers are both bound to the same PHY. They will
both do init and power_on operations when the controller is brought up
and both do power_off and exit when the controller is stopped. However,
the PHY uclass of U-Boot is not as sane as we thought -- they won't
maintain a status mark for PHYs, and thus the functions of the PHYs
could be called for multiple times. Calling init/power_on for multiple
times have no severe problems, however calling power_off/exit for
multiple times have a problem -- the first exit call will stop the PHY
clock, and power_off/exit calls after it still trying to write to PHY
registers. The write operation to PHY registers will fail because clock
is already stopped.
Adapt the count mechanism from phy-sun4i-usb to both init/exit and
power_on/power_off functions to phy-rockchip-inno-usb2 to fix this
problem. With this stopping USB controllers (manually or before booting
a kernel) will work.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Fixes: ac97a9ece14e ("phy: rockchip: Add Rockchip USB2PHY driver")
---
drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 21 +++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
index 62b8ba3a4a..be9cc99d90 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
@@ -62,6 +62,8 @@ struct rockchip_usb2phy {
void *reg_base;
struct clk phyclk;
const struct rockchip_usb2phy_cfg *phy_cfg;
+ int init_count;
+ int power_on_count;
};
static inline int property_enable(void *reg_base,
@@ -92,6 +94,10 @@ static int rockchip_usb2phy_power_on(struct phy *phy)
struct rockchip_usb2phy *priv = dev_get_priv(parent);
const struct rockchip_usb2phy_port_cfg *port_cfg = us2phy_get_port(phy);
+ priv->power_on_count++;
+ if (priv->power_on_count != 1)
+ return 0;
+
property_enable(priv->reg_base, &port_cfg->phy_sus, false);
/* waiting for the utmi_clk to become stable */
@@ -106,6 +112,10 @@ static int rockchip_usb2phy_power_off(struct phy *phy)
struct rockchip_usb2phy *priv = dev_get_priv(parent);
const struct rockchip_usb2phy_port_cfg *port_cfg = us2phy_get_port(phy);
+ priv->power_on_count--;
+ if (priv->power_on_count != 0)
+ return 0;
+
property_enable(priv->reg_base, &port_cfg->phy_sus, true);
return 0;
@@ -118,6 +128,10 @@ static int rockchip_usb2phy_init(struct phy *phy)
const struct rockchip_usb2phy_port_cfg *port_cfg = us2phy_get_port(phy);
int ret;
+ priv->init_count++;
+ if (priv->init_count != 1)
+ return 0;
+
ret = clk_enable(&priv->phyclk);
if (ret) {
dev_err(phy->dev, "failed to enable phyclk (ret=%d)\n", ret);
@@ -140,6 +154,10 @@ static int rockchip_usb2phy_exit(struct phy *phy)
struct udevice *parent = dev_get_parent(phy->dev);
struct rockchip_usb2phy *priv = dev_get_priv(parent);
+ priv->init_count--;
+ if (priv->init_count != 0)
+ return 0;
+
clk_disable(&priv->phyclk);
return 0;
@@ -212,6 +230,9 @@ static int rockchip_usb2phy_probe(struct udevice *dev)
return ret;
}
+ priv->power_on_count = 0;
+ priv->init_count = 0;
+
return 0;
}

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

@ -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

@ -0,0 +1,228 @@
From f3a870bfa075fb880f5e018a0a5ae6f27ca8be49 Mon Sep 17 00:00:00 2001
From: Vincent Fazio <vfazio@xes-inc.com>
Date: Mon, 13 Sep 2021 13:34:45 -0500
Subject: [PATCH] mmc: bcm2835-host: let firmware manage the clock
Newer firmware supports managing the sdhost clock divisor, so leverage
this feature if it is available.
SET_SDHOST_CLOCK is largely undocumented except for its usage within the
Linux kernel, which this change is based on.
https://github.com/raspberrypi/linux/commit/3cd16c39c718e2dda7885c4ed7a20118aed12524
Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>
---
arch/arm/mach-bcm283x/include/mach/mbox.h | 18 ++++++++
arch/arm/mach-bcm283x/include/mach/msg.h | 10 +++++
arch/arm/mach-bcm283x/msg.c | 30 +++++++++++++
drivers/mmc/bcm2835_sdhost.c | 53 ++++++++++++++---------
4 files changed, 90 insertions(+), 21 deletions(-)
diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h
index 7dcac583cc4..9b1943fcfc4 100644
--- a/arch/arm/mach-bcm283x/include/mach/mbox.h
+++ b/arch/arm/mach-bcm283x/include/mach/mbox.h
@@ -252,6 +252,24 @@ struct bcm2835_mbox_tag_get_clock_rate {
} body;
};
+#define BCM2835_MBOX_TAG_SET_SDHOST_CLOCK 0x00038042
+
+struct bcm2835_mbox_tag_set_sdhost_clock {
+ struct bcm2835_mbox_tag_hdr tag_hdr;
+ union {
+ struct {
+ u32 rate_hz;
+ u32 rate_1;
+ u32 rate_2;
+ } req;
+ struct {
+ u32 rate_hz;
+ u32 rate_1;
+ u32 rate_2;
+ } resp;
+ } body;
+};
+
#define BCM2835_MBOX_TAG_ALLOCATE_BUFFER 0x00040001
struct bcm2835_mbox_tag_allocate_buffer {
diff --git a/arch/arm/mach-bcm283x/include/mach/msg.h b/arch/arm/mach-bcm283x/include/mach/msg.h
index e45c1bf010f..ab37abdb6c6 100644
--- a/arch/arm/mach-bcm283x/include/mach/msg.h
+++ b/arch/arm/mach-bcm283x/include/mach/msg.h
@@ -22,6 +22,16 @@ int bcm2835_power_on_module(u32 module);
*/
int bcm2835_get_mmc_clock(u32 clock_id);
+/**
+ * bcm2835_set_sdhost_clock() - determine if firmware controls sdhost cdiv
+ *
+ * @rate_hz: Input clock frequency
+ * @rate_1: Returns a clock frequency
+ * @rate_2: Returns a clock frequency
+ * @return 0 of OK, -EIO on error
+ */
+int bcm2835_set_sdhost_clock(u32 rate_hz, u32 *rate_1, u32 *rate_2);
+
/**
* bcm2835_get_video_size() - get the current display size
*
diff --git a/arch/arm/mach-bcm283x/msg.c b/arch/arm/mach-bcm283x/msg.c
index e2badfecb09..8c1c36a5f15 100644
--- a/arch/arm/mach-bcm283x/msg.c
+++ b/arch/arm/mach-bcm283x/msg.c
@@ -21,6 +21,12 @@ struct msg_get_clock_rate {
u32 end_tag;
};
+struct msg_set_sdhost_clock {
+ struct bcm2835_mbox_hdr hdr;
+ struct bcm2835_mbox_tag_set_sdhost_clock set_sdhost_clock;
+ u32 end_tag;
+};
+
struct msg_query {
struct bcm2835_mbox_hdr hdr;
struct bcm2835_mbox_tag_physical_w_h physical_w_h;
@@ -111,6 +117,30 @@ int bcm2835_get_mmc_clock(u32 clock_id)
return clock_rate;
}
+int bcm2835_set_sdhost_clock(u32 rate_hz, u32 *rate_1, u32 *rate_2)
+{
+ ALLOC_CACHE_ALIGN_BUFFER(struct msg_set_sdhost_clock, msg_sdhost_clk, 1);
+ int ret;
+
+ BCM2835_MBOX_INIT_HDR(msg_sdhost_clk);
+ BCM2835_MBOX_INIT_TAG(&msg_sdhost_clk->set_sdhost_clock, SET_SDHOST_CLOCK);
+
+ msg_sdhost_clk->set_sdhost_clock.body.req.rate_hz = rate_hz;
+ msg_sdhost_clk->set_sdhost_clock.body.req.rate_1 = *rate_1;
+ msg_sdhost_clk->set_sdhost_clock.body.req.rate_2 = *rate_2;
+
+ ret = bcm2835_mbox_call_prop(BCM2835_MBOX_PROP_CHAN, &msg_sdhost_clk->hdr);
+ if (ret) {
+ printf("bcm2835: Could not query sdhost clock rate\n");
+ return -EIO;
+ }
+
+ *rate_1 = msg_sdhost_clk->set_sdhost_clock.body.resp.rate_1;
+ *rate_2 = msg_sdhost_clk->set_sdhost_clock.body.resp.rate_2;
+
+ return 0;
+}
+
int bcm2835_get_video_size(int *widthp, int *heightp)
{
ALLOC_CACHE_ALIGN_BUFFER(struct msg_query, msg_query, 1);
diff --git a/drivers/mmc/bcm2835_sdhost.c b/drivers/mmc/bcm2835_sdhost.c
index 894dbdd6861..3a9cd6f1eb2 100644
--- a/drivers/mmc/bcm2835_sdhost.c
+++ b/drivers/mmc/bcm2835_sdhost.c
@@ -181,6 +181,7 @@ struct bcm2835_host {
struct udevice *dev;
struct mmc *mmc;
struct bcm2835_plat *plat;
+ unsigned int firmware_sets_cdiv:1;
};
static void bcm2835_dumpregs(struct bcm2835_host *host)
@@ -233,7 +234,7 @@ static void bcm2835_reset_internal(struct bcm2835_host *host)
msleep(20);
host->clock = 0;
writel(host->hcfg, host->ioaddr + SDHCFG);
- writel(host->cdiv, host->ioaddr + SDCDIV);
+ writel(SDCDIV_MAX_CDIV, host->ioaddr + SDCDIV);
}
static int bcm2835_wait_transfer_complete(struct bcm2835_host *host)
@@ -598,6 +599,7 @@ static int bcm2835_transmit(struct bcm2835_host *host)
static void bcm2835_set_clock(struct bcm2835_host *host, unsigned int clock)
{
int div;
+ u32 clock_rate[2] = { 0 };
/* The SDCDIV register has 11 bits, and holds (div - 2). But
* in data mode the max is 50MHz wihout a minimum, and only
@@ -620,26 +622,34 @@ static void bcm2835_set_clock(struct bcm2835_host *host, unsigned int clock)
* clock divisor at all times.
*/
- if (clock < 100000) {
- /* Can't stop the clock, but make it as slow as possible
- * to show willing
- */
- host->cdiv = SDCDIV_MAX_CDIV;
- writel(host->cdiv, host->ioaddr + SDCDIV);
- return;
- }
+ if (host->firmware_sets_cdiv) {
+ bcm2835_set_sdhost_clock(clock, &clock_rate[0], &clock_rate[1]);
+ clock = max(clock_rate[0], clock_rate[1]);
+ } else {
+ if (clock < 100000) {
+ /* Can't stop the clock, but make it as slow as possible
+ * to show willing
+ */
+ host->cdiv = SDCDIV_MAX_CDIV;
+ writel(host->cdiv, host->ioaddr + SDCDIV);
+ return;
+ }
- div = host->max_clk / clock;
- if (div < 2)
- div = 2;
- if ((host->max_clk / div) > clock)
- div++;
- div -= 2;
+ div = host->max_clk / clock;
+ if (div < 2)
+ div = 2;
+ if ((host->max_clk / div) > clock)
+ div++;
+ div -= 2;
- if (div > SDCDIV_MAX_CDIV)
- div = SDCDIV_MAX_CDIV;
+ if (div > SDCDIV_MAX_CDIV)
+ div = SDCDIV_MAX_CDIV;
+
+ clock = host->max_clk / (div + 2);
+ host->cdiv = div;
+ writel(host->cdiv, host->ioaddr + SDCDIV);
+ }
- clock = host->max_clk / (div + 2);
host->mmc->clock = clock;
/* Calibrate some delays */
@@ -647,9 +657,6 @@ static void bcm2835_set_clock(struct bcm2835_host *host, unsigned int clock)
host->ns_per_fifo_word = (1000000000 / clock) *
((host->mmc->card_caps & MMC_MODE_4BIT) ? 8 : 32);
- host->cdiv = div;
- writel(host->cdiv, host->ioaddr + SDCDIV);
-
/* Set the timeout to 500ms */
writel(host->mmc->clock / 2, host->ioaddr + SDTOUT);
}
@@ -759,6 +766,7 @@ static int bcm2835_probe(struct udevice *dev)
struct bcm2835_host *host = dev_get_priv(dev);
struct mmc *mmc = mmc_get_mmc_dev(dev);
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
+ u32 clock_rate[2] = { ~0 };
host->dev = dev;
host->mmc = mmc;
@@ -776,6 +784,9 @@ static int bcm2835_probe(struct udevice *dev)
host->max_clk = bcm2835_get_mmc_clock(BCM2835_MBOX_CLOCK_ID_CORE);
+ bcm2835_set_sdhost_clock(0, &clock_rate[0], &clock_rate[1]);
+ host->firmware_sets_cdiv = (clock_rate[0] != ~0);
+
bcm2835_add_host(host);
dev_dbg(dev, "%s -> OK\n", __func__);

View File

@ -0,0 +1,77 @@
From 71ba043e5c5575f3d86536acade70dab6599489b Mon Sep 17 00:00:00 2001
From: Vincent Fazio <vfazio@xes-inc.com>
Date: Mon, 13 Sep 2021 11:22:30 -0500
Subject: [PATCH] arm: rpi: fallback to max clock rate for MMC clock
In rpi-firmware 25e2b597ebfb2495eab4816a276758dcc6ea21f1 and later,
the GET_CLOCK_RATE mailbox property was changed to return the last
value set by SET_CLOCK_RATE.
https://github.com/raspberrypi/firmware/issues/1619#issuecomment-917025502
U-Boot does not call SET_CLOCK_RATE so bcm2835_get_mmc_clock will
return zero and can cause degraded MMC performance.
Calling SET_CLOCK_RATE fixes the frequency of the clock to a specific
value and disables the firmware's clock scaling so is not an option.
Instead, fallback to GET_MAX_CLOCK_RATE in bcm2835_get_mmc_clock if
GET_CLOCK_RATE returns zero.
Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>
---
arch/arm/mach-bcm283x/include/mach/mbox.h | 2 ++
arch/arm/mach-bcm283x/msg.c | 20 +++++++++++++++++++-
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h
index 2ae2d3d97c3..7dcac583cc4 100644
--- a/arch/arm/mach-bcm283x/include/mach/mbox.h
+++ b/arch/arm/mach-bcm283x/include/mach/mbox.h
@@ -224,6 +224,8 @@ struct bcm2835_mbox_tag_set_power_state {
};
#define BCM2835_MBOX_TAG_GET_CLOCK_RATE 0x00030002
+#define BCM2835_MBOX_TAG_GET_MAX_CLOCK_RATE 0x00030004
+#define BCM2835_MBOX_TAG_GET_MIN_CLOCK_RATE 0x00030007
#define BCM2835_MBOX_CLOCK_ID_EMMC 1
#define BCM2835_MBOX_CLOCK_ID_UART 2
diff --git a/arch/arm/mach-bcm283x/msg.c b/arch/arm/mach-bcm283x/msg.c
index 347aece3cd8..e2badfecb09 100644
--- a/arch/arm/mach-bcm283x/msg.c
+++ b/arch/arm/mach-bcm283x/msg.c
@@ -75,6 +75,7 @@ int bcm2835_get_mmc_clock(u32 clock_id)
{
ALLOC_CACHE_ALIGN_BUFFER(struct msg_get_clock_rate, msg_clk, 1);
int ret;
+ u32 clock_rate = 0;
ret = bcm2835_power_on_module(BCM2835_MBOX_POWER_DEVID_SDHCI);
if (ret)
@@ -90,7 +91,24 @@ int bcm2835_get_mmc_clock(u32 clock_id)
return -EIO;
}
- return msg_clk->get_clock_rate.body.resp.rate_hz;
+ clock_rate = msg_clk->get_clock_rate.body.resp.rate_hz;
+
+ if (clock_rate == 0)
+ {
+ BCM2835_MBOX_INIT_HDR(msg_clk);
+ BCM2835_MBOX_INIT_TAG(&msg_clk->get_clock_rate, GET_MAX_CLOCK_RATE);
+ msg_clk->get_clock_rate.body.req.clock_id = clock_id;
+
+ ret = bcm2835_mbox_call_prop(BCM2835_MBOX_PROP_CHAN, &msg_clk->hdr);
+ if (ret) {
+ printf("bcm2835: Could not query max eMMC clock rate\n");
+ return -EIO;
+ }
+
+ clock_rate = msg_clk->get_clock_rate.body.resp.rate_hz;
+ }
+
+ return clock_rate;
}
int bcm2835_get_video_size(int *widthp, int *heightp)

View File

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

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,44 +1,39 @@
%global candidate rc4
#global candidate rc5
Name: uboot-tools
Version: 2021.01
Release: 0.4%{?candidate:.%{candidate}}%{?dist}
Version: 2021.10
Release: 3%{?candidate:.%{candidate}}%{?dist}
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
ExcludeArch: s390x
Source0: https://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
Source2: aarch64-boards
# Fedoraisms patches
# Needed to find DT on boot partition that's not the first partition
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
# Board fixes and enablement
Patch5: Raspberry-Pi-400-Compute-Module-4-support.patch
Patch6: rng-Add-iProc-RNG200-driver.patch
# RPi - uses RPI firmware device tree for HAT support
Patch2: rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch
Patch3: rpi-fallback-to-max-clock-for-mmc.patch
Patch4: rpi-bcm2835_sdhost-firmware-managed-clock.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
Patch11: 0001-Fix-BeagleAI-detection.patch
# Rockchips improvements
Patch14: arm-rk3399-enable-rng-on-rock960-and-firefly3399.patch
Patch15: rk3399-Pinebook-pro-EDP-support.patch
Patch12: phy-rockchip-inno-usb2-fix-hang-when-multiple-controllers-exit.patch
Patch13: 0001-Revert-spi-spi-uclass-Add-support-to-manually-reloca.patch
Patch14: 0001-enable-hs400-and-sdma-support.patch
Patch15: dts-rockchip-rk3399-enable-emmc-phy-for-spl.patch
BuildRequires: bc
BuildRequires: dtc
BuildRequires: make
BuildRequires: perl-interpreter
# Requirements for building on el7
%if 0%{?rhel} == 7
BuildRequires: devtoolset-7-build
@ -57,9 +52,6 @@ BuildRequires: flex bison
BuildRequires: openssl-devel
BuildRequires: SDL-devel
BuildRequires: swig
%ifarch %{arm} aarch64
BuildRequires: vboot-utils
%endif
%ifarch aarch64
BuildRequires: arm-trusted-firmware-armv8
%endif
@ -90,7 +82,7 @@ U-Boot firmware binaries for armv7 boards
%prep
%autosetup -p1 -n u-boot-%{version}%{?candidate:-%{candidate}}
cp %SOURCE1 %SOURCE2 %SOURCE3 %SOURCE4 .
cp %SOURCE1 %SOURCE2 .
%build
mkdir builds
@ -100,107 +92,137 @@ mkdir builds
%{?enable_devtoolset7:%{enable_devtoolset7}}
%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/
# U-Boot device firmwares don't currently support LTO
%define _lto_cflags %{nil}
%ifarch aarch64 %{arm}
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)
if [[ " ${sun50i[*]} " == *" $board "* ]]; then
echo "Board: $board using sun50i_a64"
cp /usr/share/arm-trusted-firmware/sun50i_a64/* builds/$(echo $board)/
fi
sun50h6=(orangepi_lite2 orangepi_one_plus pine_h64)
sun50h6=(beelink_gs1 orangepi_3 orangepi_lite2 orangepi_one_plus orangepi_zero2 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)/
fi
rk3328=(evb-rk3328 rock64-rk3328 rock-pi-e-rk3328 roc-cc-rk3328)
rk3328=(evb-rk3328 nanopi-r2s-rk3328 rock64-rk3328 rock-pi-e-rk3328 roc-cc-rk3328)
if [[ " ${rk3328[*]} " == *" $board "* ]]; then
echo "Board: $board using rk3328"
cp /usr/share/arm-trusted-firmware/rk3328/* builds/$(echo $board)/
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=(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 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)/
fi
# End ATF
make $(echo $board)_defconfig O=builds/$(echo $board)/
%make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" O=builds/$(echo $board)/
# build spi images for rockchip boards with SPI flash
rkspi=(evb-rk3399 khadas-edge-captain-rk3399 khadas-edge-rk3399 khadas-edge-v-rk3399 nanopc-t4-rk3399 pinebook-pro-rk3399 rockpro64-rk3399 roc-pc-mezzanine-rk3399 roc-pc-rk3399)
if [[ " ${rkspi[*]} " == *" $board "* ]]; then
echo "Board: $board with SPI flash"
builds/$(echo $board)/tools/mkimage -n rk3399 -T rkspi -d builds/$(echo $board)/tpl/u-boot-tpl.bin:builds/$(echo $board)/spl/u-boot-spl.bin builds/$(echo $board)/idbloader.spi
fi
# build spi, and uart images for mvebu boards
# mvebu=(clearfog helios4 turris_omnia)
if [[ " ${mvebu[*]} " == *" $board "* ]]; then
for target in spi uart
do
echo "Board: $board Target: $target"
sed -i -e '/CONFIG_MVEBU_SPL_BOOT_DEVICE_/d' configs/$(echo $board)_defconfig
echo CONFIG_MVEBU_SPL_BOOT_DEVICE_${target^^}=y >> configs/$(echo $board)_defconfig
make $(echo $board)_defconfig O=builds/$(echo $board-$target)/
%make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" O=builds/$(echo $board-$target)/
done
fi
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/
%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/
%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
mkdir -p %{buildroot}%{_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 idbloader.spi spl/boot.bin spl/sunxi-spl.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 -p -m 0644 builds/$(echo $board)/$(echo $file) %{buildroot}%{_datadir}/uboot/$(echo $board)/
fi
done
done
%endif
%ifarch %{arm}
for board in $(cat %{_arch}-boards)
for board in $(ls builds)
do
mkdir -p $RPM_BUILD_ROOT%{_datadir}/uboot/$(echo $board)/
mkdir -p %{buildroot}%{_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)/
install -p -m 0644 builds/$(echo $board)/$(echo $file) %{buildroot}%{_datadir}/uboot/$(echo $board)/
fi
done
done
%endif
# Bit of a hack to remove binaries we don't use as they're large
for board in $(cat %{_arch}-boards)
%ifarch aarch64 %{arm}
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}.*
fi
if [ -f $RPM_BUILD_ROOT%{_datadir}/uboot/$(echo $board)/MLO ]; then
rm -f $RPM_BUILD_ROOT%{_datadir}/uboot/$(echo $board)/u-boot.bin
if [ -f %{buildroot}%{_datadir}/uboot/$(echo $board)/MLO ]; then
rm -f %{buildroot}%{_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
if [ -f %{buildroot}%{_datadir}/uboot/$(echo $board)/SPL ]; then
rm -f %{buildroot}%{_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)/u-boot.imx ]; then
rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot.bin
fi
if [ -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot-spl.kwb ]; then
rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot.*
rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot-spl.bin
fi
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 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 kwboot
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 0755 builds/tools/env/fw_printenv %{buildroot}%{_bindir}
( cd %{buildroot}%{_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
# Copy some 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
@ -216,13 +238,11 @@ cp -p board/warp7/README builds/docs/README.warp7
%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 doc/README.odroid doc/README.rockchip doc/develop/uefi doc/uImage.FIT doc/arch/arm64.rst
%doc builds/docs/* doc/board/amlogic/ doc/board/rockchip/
%{_bindir}/*
%{_mandir}/man1/mkimage.1*
%dir %{_datadir}/uboot/
%config(noreplace) %{_sysconfdir}/fw_env.config
%ifarch aarch64
%files -n uboot-images-armv8
@ -235,6 +255,115 @@ cp -p board/warp7/README builds/docs/README.warp7
%endif
%changelog
* 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

@ -1,7 +1,7 @@
From cc3700b5c65494547308df395fe63166ff48a1e3 Mon Sep 17 00:00:00 2001
From fd3434c754b3b8dddb345352a2434b6b8445343a 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: Sun, 18 Apr 2021 14:05:45 +0100
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 | 35 ++++++++++++++++++++++-----------
1 file changed, 23 insertions(+), 12 deletions(-)
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index ff29ef5a905..769477cd80e 100644
index 2627c2a6a5..eadd1080b3 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -142,24 +142,37 @@
@@ -148,26 +148,37 @@
"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" \
@ -66,7 +68,7 @@ index ff29ef5a905..769477cd80e 100644
+ "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 +80,5 @@ index ff29ef5a905..769477cd80e 100644
"fi; " \
"setenv efi_fdtfile\0"
--
2.29.2
2.31.1

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