[PATCH v1 1/2] meson-a1: dts: add hw rng node

Add support for hardware random number generator of Amlogic Meson SoCs.
Signed-off-by: Alexey Romanov avromanov@sberdevices.ru --- arch/arm/dts/meson-a1.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/arm/dts/meson-a1.dtsi b/arch/arm/dts/meson-a1.dtsi index f3560cbc3a4..1f57c137384 100644 --- a/arch/arm/dts/meson-a1.dtsi +++ b/arch/arm/dts/meson-a1.dtsi @@ -140,6 +140,11 @@ clock-names = "xtal", "pclk", "baud"; status = "disabled"; }; + + hwrng: rng@5118 { + compatible = "amlogic,meson-rng"; + reg = <0x0 0x5118 0x0 0x4>; + }; };
gic: interrupt-controller@ff901000 {

ao-secure node can be used to get information about the board, so, for example, using show_board_info() we can get following information for board with Meson A1 SoC:
SoC: Amlogic Meson A1 (A113L) Revision 2c:a (1:a)
Signed-off-by: Alexey Romanov avromanov@sberdevices.ru --- arch/arm/dts/meson-a1.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/arch/arm/dts/meson-a1.dtsi b/arch/arm/dts/meson-a1.dtsi index 1f57c137384..149cc0e23a3 100644 --- a/arch/arm/dts/meson-a1.dtsi +++ b/arch/arm/dts/meson-a1.dtsi @@ -145,6 +145,12 @@ compatible = "amlogic,meson-rng"; reg = <0x0 0x5118 0x0 0x4>; }; + + sec_AO: ao-secure@5a20 { + compatible = "amlogic,meson-gx-ao-secure", "syscon"; + reg = <0x0 0x5a20 0x0 0x140>; + amlogic,has-chip-id; + }; };
gic: interrupt-controller@ff901000 {

Hi Neil,
On Wed, Jun 21, 2023 at 04:29:53PM +0300, Alexey Romanov wrote:
ao-secure node can be used to get information about the board, so, for example, using show_board_info() we can get following information for board with Meson A1 SoC:
SoC: Amlogic Meson A1 (A113L) Revision 2c:a (1:a)
Signed-off-by: Alexey Romanov avromanov@sberdevices.ru
arch/arm/dts/meson-a1.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/arch/arm/dts/meson-a1.dtsi b/arch/arm/dts/meson-a1.dtsi index 1f57c137384..149cc0e23a3 100644 --- a/arch/arm/dts/meson-a1.dtsi +++ b/arch/arm/dts/meson-a1.dtsi @@ -145,6 +145,12 @@ compatible = "amlogic,meson-rng"; reg = <0x0 0x5118 0x0 0x4>; };
sec_AO: ao-secure@5a20 {
compatible = "amlogic,meson-gx-ao-secure", "syscon";
reg = <0x0 0x5a20 0x0 0x140>;
amlogic,has-chip-id;
};
};
gic: interrupt-controller@ff901000 {
-- 2.38.1
Applied into v6.7/arm64-dt here:
https://lore.kernel.org/all/20230823213630.12936-14-ddrokosov@sberdevices.ru...

On 21/06/2023 15:29, Alexey Romanov wrote:
Add support for hardware random number generator of Amlogic Meson SoCs.
Signed-off-by: Alexey Romanov avromanov@sberdevices.ru
arch/arm/dts/meson-a1.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/arm/dts/meson-a1.dtsi b/arch/arm/dts/meson-a1.dtsi index f3560cbc3a4..1f57c137384 100644 --- a/arch/arm/dts/meson-a1.dtsi +++ b/arch/arm/dts/meson-a1.dtsi @@ -140,6 +140,11 @@ clock-names = "xtal", "pclk", "baud"; status = "disabled"; };
hwrng: rng@5118 {
compatible = "amlogic,meson-rng";
reg = <0x0 0x5118 0x0 0x4>;
};
};
gic: interrupt-controller@ff901000 {
Weird, you introduced amlogic,meson-rng-s4 previously but you don't use it here ?
Anyway please add those to Linux first, them sync the DT to u-boot afterwards,
Thanks, Neil

On Thu, Jun 22, 2023 at 06:19:33PM +0200, neil.armstrong@linaro.org wrote:
On 21/06/2023 15:29, Alexey Romanov wrote:
Add support for hardware random number generator of Amlogic Meson SoCs.
Signed-off-by: Alexey Romanov avromanov@sberdevices.ru
arch/arm/dts/meson-a1.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/arm/dts/meson-a1.dtsi b/arch/arm/dts/meson-a1.dtsi index f3560cbc3a4..1f57c137384 100644 --- a/arch/arm/dts/meson-a1.dtsi +++ b/arch/arm/dts/meson-a1.dtsi @@ -140,6 +140,11 @@ clock-names = "xtal", "pclk", "baud"; status = "disabled"; };
hwrng: rng@5118 {
compatible = "amlogic,meson-rng";
reg = <0x0 0x5118 0x0 0x4>;
}; gic: interrupt-controller@ff901000 {};
Weird, you introduced amlogic,meson-rng-s4 previously but you don't use it here ?
Anyway please add those to Linux first, them sync the DT to u-boot afterwards,
Thanks, Neil
The patch updates the functionality of A1 and the previous one for S4. It seemed logical to me to add changes in different patchsets.
Yeah, I will send changes first for Linux dts. Thank you.

Hi Neil,
On Thu, Jun 22, 2023 at 06:19:33PM +0200, neil.armstrong@linaro.org wrote:
On 21/06/2023 15:29, Alexey Romanov wrote:
Add support for hardware random number generator of Amlogic Meson SoCs.
Signed-off-by: Alexey Romanov avromanov@sberdevices.ru
arch/arm/dts/meson-a1.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/arm/dts/meson-a1.dtsi b/arch/arm/dts/meson-a1.dtsi index f3560cbc3a4..1f57c137384 100644 --- a/arch/arm/dts/meson-a1.dtsi +++ b/arch/arm/dts/meson-a1.dtsi @@ -140,6 +140,11 @@ clock-names = "xtal", "pclk", "baud"; status = "disabled"; };
hwrng: rng@5118 {
compatible = "amlogic,meson-rng";
reg = <0x0 0x5118 0x0 0x4>;
}; gic: interrupt-controller@ff901000 {};
Weird, you introduced amlogic,meson-rng-s4 previously but you don't use it here ?
This is A1 (not S4).
Anyway please add those to Linux first, them sync the DT to u-boot afterwards,
Applied into v6.7/arm64-dt here:
https://lore.kernel.org/all/20230823213630.12936-13-ddrokosov@sberdevices.ru...
Thanks, Neil
participants (4)
-
Alexey Romanov
-
Alexey Romanov
-
Alexey Romanov
-
neil.armstrong@linaro.org