Skip to contentSkip to conversation

arm64: dts: meson: g12a: add drive strength and hwrng

PATCH Superseded Neil Armstrong 3 participants 11 messages May 20, 2019 – May 23, 2019

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover arm64: dts: meson: g12a: add drive strength and hwrng

This patchset adds :
- drive strength for the HDMI DDC and Ethernet pads
- HWRNG node

Dependencies:
- None

Neil Armstrong (3):
arm64: dts: meson: g12a: add drive-strength hdmi ddc pins
arm64: dts: meson: g12a: add drive strength for eth pins
arm64: dts: meson: g12a: Add hwrng node

 arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
Signature · 1 line
2.21.0
#1 lore raw

PATCH 1/3 arm64: dts: meson: g12a: add drive-strength hdmi ddc pins

With the default boot settings, the DDC drive strength is too weak, set the driver-strengh to 4mA to avoid errors on the DDC line.

---
 arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +1 -0
index 5b4942c73e65..aa678d92238b 100644
@@ -327,6 +327,7 @@
 								 "hdmitx_sck";
 							function = "hdmitx";
 							bias-disable;
+							drive-strength-microamp = <4000>;
 						};
 					};
 
Signature · 1 line
2.21.0
reviewer Reviewed-by on v1 1/3
#2 lore raw

Re: [PATCH 1/3] arm64: dts: meson: g12a: add drive-strength hdmi ddc pins

Quoted 5 lines · Neil Armstrong

With the default boot settings, the DDC drive strength is too weak, set the driver-strengh to 4mA to avoid errors on the DDC line.

Amlogic's vendor kernel (from buildroot-openlinux-A113-201901) does the same so:

maintainer
#3 lore raw

Re: [PATCH 1/3] arm64: dts: meson: g12a: add drive-strength hdmi ddc pins

Quoted 8 lines · Martin Blumenstingl
Quoted 5 lines · Neil Armstrong

With the default boot settings, the DDC drive strength is too weak, set the driver-strengh to 4mA to avoid errors on the DDC line.

Amlogic's vendor kernel (from buildroot-openlinux-A113-201901) does the same so:

Queued for v5.3,

Kevin

#4 lore raw

PATCH 2/3 arm64: dts: meson: g12a: add drive strength for eth pins

In reply to Neil Armstrong

With the X96 Max board using an external Gigabit Ethernet PHY, add the same driver strength to the Ethernet pins as the vendor tree.

---
 arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +2 -0
index aa678d92238b..8fcdd12f684a 100644
@@ -263,6 +263,7 @@
 								 "eth_txd0",
 								 "eth_txd1";
 							function = "eth";
+							drive-strength-microamp = <4000>;
 							bias-disable;
 						};
 					};
@@ -275,6 +276,7 @@
 								 "eth_txd2_rgmii",
 								 "eth_txd3_rgmii";
 							function = "eth";
+							drive-strength-microamp = <4000>;
 							bias-disable;
 						};
 					};
Signature · 1 line
2.21.0
reviewer Reviewed-by on v1 2/3
#5 lore raw

Re: [PATCH 2/3] arm64: dts: meson: g12a: add drive strength for eth pins

Quoted 6 lines · Neil Armstrong

With the X96 Max board using an external Gigabit Ethernet PHY, add the same driver strength to the Ethernet pins as the vendor tree.

Amlogic's vendor kernel (from buildroot-openlinux-A113-201901) does the same so:

maintainer
#6 lore raw

Re: [PATCH 2/3] arm64: dts: meson: g12a: add drive strength for eth pins

Quoted 9 lines · Martin Blumenstingl
Quoted 6 lines · Neil Armstrong

With the X96 Max board using an external Gigabit Ethernet PHY, add the same driver strength to the Ethernet pins as the vendor tree.

Amlogic's vendor kernel (from buildroot-openlinux-A113-201901) does the same so:

Queued for v5.3,

Kevin

#7 lore raw

PATCH 3/3 arm64: dts: meson: g12a: Add hwrng node

In reply to Neil Armstrong

The Amlogic G12A has the hwrng module in an unknown "EFUSE" bus.

The hwrng is not enabled on the vendor G12A DTs, but is enabled on next generation SM1 SoC family sharing the exact same memory mapping.

Let's add the "EFUSE" bus and the hwrng node.

This hwrng has been checked with the rng-tools rngtest FIPS tool :
rngtest: starting FIPS tests...
rngtest: bits received from input: 1630240032
rngtest: FIPS 140-2 successes: 81436
rngtest: FIPS 140-2 failures: 76
rngtest: FIPS 140-2(2001-10-10) Monobit: 10
rngtest: FIPS 140-2(2001-10-10) Poker: 6
rngtest: FIPS 140-2(2001-10-10) Runs: 26
rngtest: FIPS 140-2(2001-10-10) Long run: 34
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0
rngtest: input channel speed: (min=3.784; avg=5687.521; max=19073.486)Mibits/s
rngtest: FIPS tests speed: (min=47.684; avg=52.348; max=52.835)Mibits/s
rngtest: Program run time: 30000987 microseconds

---
 arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +13 -0
index 8fcdd12f684a..19ef6a467d63 100644
@@ -197,6 +197,19 @@
 				};
 			};
 
+			apb_efuse: bus@30000 {
+				compatible = "simple-bus";
+				reg = <0x0 0x30000 0x0 0x1000>;
+				#address-cells = <2>;
+				#size-cells = <2>;
+				ranges = <0x0 0x0 0x0 0x30000 0x0 0x1000>;
+
+				hwrng: rng {
+					compatible = "amlogic,meson-rng";
+					reg = <0x0 0x218 0x0 0x4>;
+				};
+			};
+
 			periphs: bus@34400 {
 				compatible = "simple-bus";
 				reg = <0x0 0x34400 0x0 0x400>;
Signature · 1 line
2.21.0
#8 lore raw

Re: [PATCH 3/3] arm64: dts: meson: g12a: Add hwrng node

Hi Neil,

Quoted 32 lines · Neil Armstrong

The Amlogic G12A has the hwrng module in an unknown "EFUSE" bus.

The hwrng is not enabled on the vendor G12A DTs, but is enabled on next generation SM1 SoC family sharing the exact same memory mapping.

Let's add the "EFUSE" bus and the hwrng node.

This hwrng has been checked with the rng-tools rngtest FIPS tool :
rngtest: starting FIPS tests...
rngtest: bits received from input: 1630240032
rngtest: FIPS 140-2 successes: 81436
rngtest: FIPS 140-2 failures: 76
rngtest: FIPS 140-2(2001-10-10) Monobit: 10
rngtest: FIPS 140-2(2001-10-10) Poker: 6
rngtest: FIPS 140-2(2001-10-10) Runs: 26
rngtest: FIPS 140-2(2001-10-10) Long run: 34
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0
rngtest: input channel speed: (min=3.784; avg=5687.521; max=19073.486)Mibits/s
rngtest: FIPS tests speed: (min=47.684; avg=52.348; max=52.835)Mibits/s
rngtest: Program run time: 30000987 microseconds

---
 arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +0 -0
index 8fcdd12f684a..19ef6a467d63 100644

arch/arm64/boot/dts/amlogic/meson-g12a.dtsi line 202

Quoted 6 lines
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +3 -0
@@ -197,6 +197,19 @@
                                };
                        };
 
+                       apb_efuse: bus@30000 {
+                               compatible = "simple-bus";
+                               reg = <0x0 0x30000 0x0 0x1000>;

the public S922X datasheet lists the range as FF630000 - FF631FFF that translates to a size of 0x2000, which the vendor kernel (kernel/aml-4.9/arch/arm64/boot/dts/amlogic/mesong12a.dtsi from buildroot-openlinux-A113-201901) seems to use as well:

  io_efuse_base{
    reg = <0x0 0xff630000 0x0 0x2000>;

};

where did you take the size from?

arch/arm64/boot/dts/amlogic/meson-g12a.dtsi line 205

Quoted 3 lines
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +3 -0
+                               #address-cells = <2>;
+                               #size-cells = <2>;
+                               ranges = <0x0 0x0 0x0 0x30000 0x0 0x1000>;

(see reg property above)

arch/arm64/boot/dts/amlogic/meson-g12a.dtsi line 207

Quoted 2 lines
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +2 -0
+
+                               hwrng: rng {

this should be rng@218

Martin

#9 lore raw

Re: [PATCH 3/3] arm64: dts: meson: g12a: Add hwrng node

Quoted 45 lines · Martin Blumenstingl

Hi Neil,

Quoted 32 lines · Neil Armstrong

The Amlogic G12A has the hwrng module in an unknown "EFUSE" bus.

The hwrng is not enabled on the vendor G12A DTs, but is enabled on next generation SM1 SoC family sharing the exact same memory mapping.

Let's add the "EFUSE" bus and the hwrng node.

This hwrng has been checked with the rng-tools rngtest FIPS tool :
rngtest: starting FIPS tests...
rngtest: bits received from input: 1630240032
rngtest: FIPS 140-2 successes: 81436
rngtest: FIPS 140-2 failures: 76
rngtest: FIPS 140-2(2001-10-10) Monobit: 10
rngtest: FIPS 140-2(2001-10-10) Poker: 6
rngtest: FIPS 140-2(2001-10-10) Runs: 26
rngtest: FIPS 140-2(2001-10-10) Long run: 34
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0
rngtest: input channel speed: (min=3.784; avg=5687.521; max=19073.486)Mibits/s
rngtest: FIPS tests speed: (min=47.684; avg=52.348; max=52.835)Mibits/s
rngtest: Program run time: 30000987 microseconds

---
 arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +0 -0
index 8fcdd12f684a..19ef6a467d63 100644

arch/arm64/boot/dts/amlogic/meson-g12a.dtsi line 202

Quoted 6 lines
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +3 -0
@@ -197,6 +197,19 @@
                                };
                        };
 
+                       apb_efuse: bus@30000 {
+                               compatible = "simple-bus";
+                               reg = <0x0 0x30000 0x0 0x1000>;

the public S922X datasheet lists the range as FF630000 - FF631FFF that translates to a size of 0x2000, which the vendor kernel (kernel/aml-4.9/arch/arm64/boot/dts/amlogic/mesong12a.dtsi from buildroot-openlinux-A113-201901) seems to use as well:

Quoted 5 lines
  io_efuse_base{
    reg = <0x0 0xff630000 0x0 0x2000>;

};

where did you take the size from?

Another typo, it's 0x2000.

Quoted 9 lines

arch/arm64/boot/dts/amlogic/meson-g12a.dtsi line 205

Quoted 4 lines
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +3 -0
+                               #address-cells = <2>;
+                               #size-cells = <2>;
+                               ranges = <0x0 0x0 0x0 0x30000 0x0 0x1000>;

(see reg property above)

arch/arm64/boot/dts/amlogic/meson-g12a.dtsi line 207

Quoted 2 lines
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +2 -0
+
+                               hwrng: rng {

this should be rng@218

Exact.

Quoted 4 lines

Martin

Neil

maintainer
#10 lore raw

Re: [PATCH 3/3] arm64: dts: meson: g12a: Add hwrng node

Quoted 58 lines · Neil Armstrong
Quoted 45 lines · Martin Blumenstingl

Hi Neil,

Quoted 32 lines · Neil Armstrong

The Amlogic G12A has the hwrng module in an unknown "EFUSE" bus.

The hwrng is not enabled on the vendor G12A DTs, but is enabled on next generation SM1 SoC family sharing the exact same memory mapping.

Let's add the "EFUSE" bus and the hwrng node.

This hwrng has been checked with the rng-tools rngtest FIPS tool :
rngtest: starting FIPS tests...
rngtest: bits received from input: 1630240032
rngtest: FIPS 140-2 successes: 81436
rngtest: FIPS 140-2 failures: 76
rngtest: FIPS 140-2(2001-10-10) Monobit: 10
rngtest: FIPS 140-2(2001-10-10) Poker: 6
rngtest: FIPS 140-2(2001-10-10) Runs: 26
rngtest: FIPS 140-2(2001-10-10) Long run: 34
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0
rngtest: input channel speed: (min=3.784; avg=5687.521; max=19073.486)Mibits/s
rngtest: FIPS tests speed: (min=47.684; avg=52.348; max=52.835)Mibits/s
rngtest: Program run time: 30000987 microseconds

---
 arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +0 -0
index 8fcdd12f684a..19ef6a467d63 100644

arch/arm64/boot/dts/amlogic/meson-g12a.dtsi line 202

Quoted 6 lines
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +3 -0
@@ -197,6 +197,19 @@
                                };
                        };
 
+                       apb_efuse: bus@30000 {
+                               compatible = "simple-bus";
+                               reg = <0x0 0x30000 0x0 0x1000>;

the public S922X datasheet lists the range as FF630000 - FF631FFF that translates to a size of 0x2000, which the vendor kernel (kernel/aml-4.9/arch/arm64/boot/dts/amlogic/mesong12a.dtsi from buildroot-openlinux-A113-201901) seems to use as well:

Quoted 5 lines
  io_efuse_base{
    reg = <0x0 0xff630000 0x0 0x2000>;

};

where did you take the size from?

Another typo, it's 0x2000.

Quoted 4 lines
Quoted 4 lines
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +3 -0
+                               #address-cells = <2>;
+                               #size-cells = <2>;
+                               ranges = <0x0 0x0 0x0 0x30000 0x0 0x1000>;
Quoted 8 lines
Quoted 5 lines

(see reg property above)

arch/arm64/boot/dts/amlogic/meson-g12a.dtsi line 207

Quoted 2 lines
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +2 -0
+
+                               hwrng: rng {

this should be rng@218

Exact.

Will wait for v2 on this one,

Kevin