Skip to contentSkip to conversation

arm64: dts: meson: a1: introduce several peripheral IPs

PATCH In review Dmitry Rokosov 3 participants 19 messages Aug 23, 2023 – Sep 11, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v2 cover arm64: dts: meson: a1: introduce several peripheral IPs

This patch series introduces device tree declarations for various peripheral IPs of the A1 SoC family, including clock controllers, EFUSE, USB, SPI Flash Controller, SDIO, and UART_AO:
- CLK: A1 SoC has four types on the board, namely PLL, Peripherals, CPU, and Audio, but only Amlogic A1 PLL and Peripherals clock controllers are currently supported.
- EFUSE: consists of a 4k bit One Time Programmable (OTP) memory divided into 32 128-bit blocks, and data is accessed using the APB bus through software or the Key-ladder integrated with the EFUSE block.
- USB: only one USB 2.0 high-speed port is available in the A1 SoC, supporting both HOST and DEVICE modes for OTG.
- SPI Flash Controller: 4-bit QPI/SPI NOR Flash or NAND FLASH controller.
- SDIO: for WiFi/IEEE802.11 connection.
- UART_AO: for Bluetooth connection.
- HWRNG: hardware random generator integrated into SoC.
- AO SECURE: board info registers.

The above peripherals are integrated to new AD402 board device tree.

Changes v2 since v1 at [1]:
- reorder meson-a1 dtsi includes to keep them sorted
- remove extra empty lines
- purge the unnecessary 'okay' status
- reorder all device tree nodes (existing and new) sorted by 'reg' values
- introduce new saradc definition
- add hwrng dts node
- provide ao secure dts node with board info registers
- include all changes to new AD402 board device tree
- add AD402 board to bindings

Links:

    [1] https://lore.kernel.org/all/[email protected]/

Alexey Romanov (3):
arm64: dts: meson: a1: enable efuse controller and setup its clk
arm64: dts: meson: a1: add hw rng node
arm64: dts: meson: a1: add ao secure node

Dmitry Rokosov (8):
arm64: dts: meson: a1: reorder includes to keep them sorted
arm64: dts: meson: a1: remove extra empty line before reset node
arm64: dts: meson: a1: remove the unnecessary 'okay' status pwrc value
arm64: dts: meson: a1: reorder gpio_intc node definition
arm64: dts: meson: a1: introduce PLL and Peripherals clk controllers
arm64: dts: meson: a1: support USB controller in OTG mode
arm64: dts: introduce Amlogic AD402 reference board based on A113L SoC
dt-bindings: arm: amlogic: add Amlogic AD402 bindings

George Stark (1):
arm64: dts: meson: a1: add saradc definition

Jan Dakinevich (1):
arm64: dts: meson: a1: add eMMC controller and its pins

Martin Kurbanov (1):
arm64: dts: meson: a1: introduce SPI Flash Controller

Oleg Lyovin (1):
arm64: dts: meson: a1: introduce UART_AO mux definitions

 .../devicetree/bindings/arm/amlogic.yaml      |   1 +
 arch/arm64/boot/dts/amlogic/Makefile          |   1 +
 .../arm64/boot/dts/amlogic/meson-a1-ad402.dts | 145 ++++++++++++
 arch/arm64/boot/dts/amlogic/meson-a1.dtsi     | 213 +++++++++++++++++-
 4 files changed, 348 insertions(+), 12 deletions(-)
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-a1-ad402.dts
Signature · 7 lines
2.36.0


_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
#1 lore raw

PATCH v2 1/15 arm64: dts: meson: a1: reorder includes to keep them sorted

It is recommended to alphabetically sort all headers included in the dtsi.

---
 arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/amlogic/meson-a1.dtsi +2 -2
index c8f344596285..5d0c8e3966ce 100644
@@ -3,9 +3,9 @@
  * Copyright (c) 2019 Amlogic, Inc. All rights reserved.
  */
 
-#include <dt-bindings/interrupt-controller/irq.h>
-#include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/gpio/meson-a1-gpio.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 
 / {
 	compatible = "amlogic,a1";
Signature · 1 line
2.36.0
#2 lore raw

PATCH v2 2/15 arm64: dts: meson: a1: remove extra empty line before reset node

In reply to Dmitry Rokosov

There should be only one empty line between device tree node definitions.

---
 arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 1 -
 1 file changed, 1 deletion(-)
arch/arm64/boot/dts/amlogic/meson-a1.dtsi +0 -1
index 5d0c8e3966ce..42083d1bc8ca 100644
@@ -83,7 +83,6 @@ apb: bus@fe000000 {
 			#size-cells = <2>;
 			ranges = <0x0 0x0 0x0 0xfe000000 0x0 0x1000000>;
 
-
 			reset: reset-controller@0 {
 				compatible = "amlogic,meson-a1-reset";
 				reg = <0x0 0x0 0x0 0x8c>;
Signature · 7 lines
2.36.0


_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
#3 lore raw

PATCH v2 3/15 arm64: dts: meson: a1: remove the unnecessary 'okay' status pwrc value

In reply to Dmitry Rokosov

In the file 'meson-a1.dtsi,' which is a basic device tree include, it is not necessary to mark the node with 'status = "okay"' because it is enabled by default.

---
 arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 1 -
 1 file changed, 1 deletion(-)
arch/arm64/boot/dts/amlogic/meson-a1.dtsi +0 -1
index 42083d1bc8ca..f740153f3c1e 100644
@@ -66,7 +66,6 @@ sm: secure-monitor {
 		pwrc: power-controller {
 			compatible = "amlogic,meson-a1-pwrc";
 			#power-domain-cells = <1>;
-			status = "okay";
 		};
 	};
 
Signature · 7 lines
2.36.0


_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
#4 lore raw

PATCH v2 4/15 arm64: dts: meson: a1: reorder gpio_intc node definition

In reply to Dmitry Rokosov

It is recommended to maintain a sorted order of device tree entries, so move the gpio_intc node ahead of the uart_AO node.

Fixes ea254644a228 ("arm64: dts: meson-a1: add gpio_intc node")
---
 arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
arch/arm64/boot/dts/amlogic/meson-a1.dtsi +10 -10
index f740153f3c1e..f95f4daef02c 100644
@@ -105,6 +105,16 @@ gpio: bank@400 {
 
 			};
 
+			gpio_intc: interrupt-controller@440 {
+				compatible = "amlogic,meson-a1-gpio-intc",
+					     "amlogic,meson-gpio-intc";
+				reg = <0x0 0x0440 0x0 0x14>;
+				interrupt-controller;
+				#interrupt-cells = <2>;
+				amlogic,channel-interrupts =
+					<49 50 51 52 53 54 55 56>;
+			};
+
 			uart_AO: serial@1c00 {
 				compatible = "amlogic,meson-gx-uart",
 					     "amlogic,meson-ao-uart";
@@ -124,16 +134,6 @@ uart_AO_B: serial@2000 {
 				clock-names = "xtal", "pclk", "baud";
 				status = "disabled";
 			};
-
-			gpio_intc: interrupt-controller@0440 {
-				compatible = "amlogic,meson-a1-gpio-intc",
-					     "amlogic,meson-gpio-intc";
-				reg = <0x0 0x0440 0x0 0x14>;
-				interrupt-controller;
-				#interrupt-cells = <2>;
-				amlogic,channel-interrupts =
-					<49 50 51 52 53 54 55 56>;
-			};
 		};
 
 		gic: interrupt-controller@ff901000 {
Signature · 7 lines
2.36.0


_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
#5 lore raw

PATCH v2 5/15 arm64: dts: meson: a1: introduce PLL and Peripherals clk controllers

In reply to Dmitry Rokosov

This patch adds clkc and clkc_pll dts nodes to A1 SoC main dtsi. The first one is responsible for all SoC peripherals clocks excluding audio clocks. The second one is used by A1 SoC PLLs. Actually, there are two different APB heads, so we have two different drivers.

---
 arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 26 +++++++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm64/boot/dts/amlogic/meson-a1.dtsi +26 -0
index f95f4daef02c..a8a39eeb2581 100644
@@ -3,6 +3,8 @@
  * Copyright (c) 2019 Amlogic, Inc. All rights reserved.
  */
 
+#include <dt-bindings/clock/amlogic,a1-pll-clkc.h>
+#include <dt-bindings/clock/amlogic,a1-peripherals-clkc.h>
 #include <dt-bindings/gpio/meson-a1-gpio.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/interrupt-controller/irq.h>
@@ -115,6 +117,21 @@ gpio_intc: interrupt-controller@440 {
 					<49 50 51 52 53 54 55 56>;
 			};
 
+			clkc_periphs: clock-controller@800 {
+				compatible = "amlogic,a1-peripherals-clkc";
+				reg = <0 0x800 0 0x104>;
+				#clock-cells = <1>;
+				clocks = <&clkc_pll CLKID_FCLK_DIV2>,
+					 <&clkc_pll CLKID_FCLK_DIV3>,
+					 <&clkc_pll CLKID_FCLK_DIV5>,
+					 <&clkc_pll CLKID_FCLK_DIV7>,
+					 <&clkc_pll CLKID_HIFI_PLL>,
+					 <&xtal>;
+				clock-names = "fclk_div2", "fclk_div3",
+					      "fclk_div5", "fclk_div7",
+					      "hifi_pll", "xtal";
+			};
+
 			uart_AO: serial@1c00 {
 				compatible = "amlogic,meson-gx-uart",
 					     "amlogic,meson-ao-uart";
@@ -134,6 +151,15 @@ uart_AO_B: serial@2000 {
 				clock-names = "xtal", "pclk", "baud";
 				status = "disabled";
 			};
+
+			clkc_pll: pll-clock-controller@7c80 {
+				compatible = "amlogic,a1-pll-clkc";
+				reg = <0 0x7c80 0 0x18c>;
+				#clock-cells = <1>;
+				clocks = <&clkc_periphs CLKID_FIXPLL_IN>,
+					 <&clkc_periphs CLKID_HIFIPLL_IN>;
+				clock-names = "fixpll_in", "hifipll_in";
+			};
 		};
 
 		gic: interrupt-controller@ff901000 {
Signature · 1 line
2.36.0
#6 lore raw

PATCH v2 6/15 arm64: dts: meson: a1: support USB controller in OTG mode

In reply to Dmitry Rokosov

Amlogic A1 SoC family has USB2.0 controller based on dwc2 and dwc3 heads. It supports otg/host/peripheral modes.

---
 arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 59 +++++++++++++++++++++++
 1 file changed, 59 insertions(+)
arch/arm64/boot/dts/amlogic/meson-a1.dtsi +59 -0
index a8a39eeb2581..04df5a5b563e 100644
@@ -8,6 +8,8 @@
 #include <dt-bindings/gpio/meson-a1-gpio.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/power/meson-a1-power.h>
+#include <dt-bindings/reset/amlogic,meson-a1-reset.h>
 
 / {
 	compatible = "amlogic,a1";
@@ -152,6 +154,17 @@ uart_AO_B: serial@2000 {
 				status = "disabled";
 			};
 
+			usb2_phy1: phy@4000 {
+				compatible = "amlogic,a1-usb2-phy";
+				clocks = <&clkc_periphs CLKID_USB_PHY_IN>;
+				clock-names = "xtal";
+				reg = <0x0 0x4000 0x0 0x60>;
+				resets = <&reset RESET_USBPHY>;
+				reset-names = "phy";
+				#phy-cells = <0>;
+				power-domains = <&pwrc PWRC_USB_ID>;
+			};
+
 			clkc_pll: pll-clock-controller@7c80 {
 				compatible = "amlogic,a1-pll-clkc";
 				reg = <0 0x7c80 0 0x18c>;
@@ -162,6 +175,52 @@ clkc_pll: pll-clock-controller@7c80 {
 			};
 		};
 
+		usb: usb@fe004400 {
+			status = "disabled";
+			compatible = "amlogic,meson-a1-usb-ctrl";
+			reg = <0x0 0xfe004400 0x0 0xa0>;
+			interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
+			#address-cells = <2>;
+			#size-cells = <2>;
+			ranges;
+
+			clocks = <&clkc_periphs CLKID_USB_CTRL>,
+				 <&clkc_periphs CLKID_USB_BUS>,
+				 <&clkc_periphs CLKID_USB_CTRL_IN>;
+			clock-names = "usb_ctrl", "usb_bus", "xtal_usb_ctrl";
+			resets = <&reset RESET_USBCTRL>;
+			reset-name = "usb_ctrl";
+
+			dr_mode = "otg";
+
+			phys = <&usb2_phy1>;
+			phy-names = "usb2-phy1";
+
+			dwc3: usb@ff400000 {
+				compatible = "snps,dwc3";
+				reg = <0x0 0xff400000 0x0 0x100000>;
+				interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
+				dr_mode = "host";
+				snps,dis_u2_susphy_quirk;
+				snps,quirk-frame-length-adjustment = <0x20>;
+				snps,parkmode-disable-ss-quirk;
+			};
+
+			dwc2: usb@ff500000 {
+				compatible = "amlogic,meson-a1-usb", "snps,dwc2";
+				reg = <0x0 0xff500000 0x0 0x40000>;
+				interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
+				phys = <&usb2_phy1>;
+				phy-names = "usb2-phy";
+				clocks = <&clkc_periphs CLKID_USB_PHY>;
+				clock-names = "otg";
+				dr_mode = "peripheral";
+				g-rx-fifo-size = <192>;
+				g-np-tx-fifo-size = <128>;
+				g-tx-fifo-size = <128 128 16 16 16>;
+			};
+		};
+
 		gic: interrupt-controller@ff901000 {
 			compatible = "arm,gic-400";
 			reg = <0x0 0xff901000 0x0 0x1000>,
Signature · 1 line
2.36.0
#7 lore raw

PATCH v2 7/15 arm64: dts: meson: a1: enable efuse controller and setup its clk

In reply to Dmitry Rokosov

From: Alexey Romanov <[email protected]>

EFUSE A1 controller uses CLKID_OTP clock and PWRC_OTP_ID power domain.

---
 arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/amlogic/meson-a1.dtsi +9 -0
index 04df5a5b563e..d46275a25bfa 100644
@@ -45,6 +45,15 @@ l2: l2-cache0 {
 		};
 	};
 
+	efuse: efuse {
+		compatible = "amlogic,meson-gxbb-efuse";
+		clocks = <&clkc_periphs CLKID_OTP>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		secure-monitor = <&sm>;
+		power-domains = <&pwrc PWRC_OTP_ID>;
+	};
+
 	psci {
 		compatible = "arm,psci-1.0";
 		method = "smc";
Signature · 7 lines
2.36.0


_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
#8 lore raw

PATCH v2 8/15 arm64: dts: meson: a1: introduce SPI Flash Controller

In reply to Dmitry Rokosov

From: Martin Kurbanov <[email protected]>

This controller can be used for spinand flash connection.

---
 arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm64/boot/dts/amlogic/meson-a1.dtsi +10 -0
index d46275a25bfa..8d479bc8e677 100644
@@ -88,6 +88,16 @@ soc {
 		#size-cells = <2>;
 		ranges;
 
+		spifc: spi@fd000400 {
+			compatible = "amlogic,a1-spifc";
+			reg = <0x0 0xfd000400 0x0 0x290>;
+			clocks = <&clkc_periphs CLKID_SPIFC>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			power-domains = <&pwrc PWRC_SPIFC_ID>;
+			status = "disabled";
+		};
+
 		apb: bus@fe000000 {
 			compatible = "simple-bus";
 			reg = <0x0 0xfe000000 0x0 0x1000000>;
Signature · 1 line
2.36.0
#9 lore raw

PATCH v2 9/15 arm64: dts: meson: a1: introduce UART_AO mux definitions

In reply to Dmitry Rokosov

From: Oleg Lyovin <[email protected]>

The Amlogic A1 has a UART_AO port, which can be used, for example, for BT HCI H4 connection.

This patch adds mux definitions for it.

---
 arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/amlogic/meson-a1.dtsi +16 -0
index 8d479bc8e677..1cc34fe003af 100644
@@ -126,6 +126,22 @@ gpio: bank@400 {
 					gpio-ranges = <&periphs_pinctrl 0 0 62>;
 				};
 
+				uart_a_pins: uart-a {
+					mux {
+						groups = "uart_a_tx",
+							 "uart_a_rx";
+						function = "uart_a";
+					};
+				};
+
+				uart_a_cts_rts_pins: uart-a-cts-rts {
+					mux {
+						groups = "uart_a_cts",
+							 "uart_a_rts";
+						function = "uart_a";
+						bias-pull-down;
+					};
+				};
 			};
 
 			gpio_intc: interrupt-controller@440 {
Signature · 1 line
2.36.0
#10 lore raw

PATCH v2 10/15 arm64: dts: meson: a1: add eMMC controller and its pins

In reply to Dmitry Rokosov

From: Jan Dakinevich <[email protected]>

The definition is inspired by a similar one for AXG SoC family. 'sdio_pins' and 'sdio_clk_gate_pins' pinctrls are supposed to be used as "default" and "clk-gate" in board-specific device trees.

During initialization 'meson-gx' driver sets clock to safe low-frequency value (400kHz). However, both source clocks ("clkin0" and "clkin1") are high-frequency by default, and using of eMMC's internal divider is not enough to achieve so low values. To provide low-frequency source, reparent "sd_emmc_sel2" clock using 'assigned-clocks' property.

---
 arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 43 +++++++++++++++++++++++
 1 file changed, 43 insertions(+)
arch/arm64/boot/dts/amlogic/meson-a1.dtsi +43 -0
index 1cc34fe003af..6968fbd33348 100644
@@ -142,6 +142,32 @@ mux {
 						bias-pull-down;
 					};
 				};
+
+				sdio_pins: sdio {
+					mux0 {
+						groups = "sdcard_d0_x",
+							 "sdcard_d1_x",
+							 "sdcard_d2_x",
+							 "sdcard_d3_x",
+							 "sdcard_cmd_x";
+						function = "sdcard";
+						bias-pull-up;
+					};
+
+					mux1 {
+						groups = "sdcard_clk_x";
+						function = "sdcard";
+						bias-disable;
+					};
+				};
+
+				sdio_clk_gate_pins: sdio-clk-gate {
+					mux {
+						groups = "sdcard_clk_x";
+						function = "sdcard";
+						bias-pull-down;
+					};
+				};
 			};
 
 			gpio_intc: interrupt-controller@440 {
@@ -208,6 +234,23 @@ clkc_pll: pll-clock-controller@7c80 {
 					 <&clkc_periphs CLKID_HIFIPLL_IN>;
 				clock-names = "fixpll_in", "hifipll_in";
 			};
+
+			sd_emmc: sd@10000 {
+				compatible = "amlogic,meson-axg-mmc";
+				reg = <0x0 0x10000 0x0 0x800>;
+				interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&clkc_periphs CLKID_SD_EMMC_A>,
+					 <&clkc_periphs CLKID_SD_EMMC>,
+					 <&clkc_pll CLKID_FCLK_DIV2>;
+				clock-names = "core",
+					      "clkin0",
+					      "clkin1";
+				assigned-clocks = <&clkc_periphs CLKID_SD_EMMC_SEL2>;
+				assigned-clock-parents = <&xtal>;
+				resets = <&reset RESET_SD_EMMC_A>;
+				power-domains = <&pwrc PWRC_SD_EMMC_ID>;
+				status = "disabled";
+			};
 		};
 
 		usb: usb@fe004400 {
Signature · 1 line
2.36.0
#11 lore raw

PATCH v2 11/15 arm64: dts: meson: a1: add saradc definition

In reply to Dmitry Rokosov

From: George Stark <[email protected]>

Add saradc node to Amlogic Meson A1 SoC main dtsi. Saradc is Successive Approximation Register (SAR) A/D Converter.

---
 arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/amlogic/meson-a1.dtsi +16 -0
index 6968fbd33348..59ca1f1360fd 100644
@@ -215,6 +215,22 @@ uart_AO_B: serial@2000 {
 				status = "disabled";
 			};
 
+			saradc: adc@2c00 {
+				compatible = "amlogic,meson-g12a-saradc",
+					"amlogic,meson-saradc";
+				reg = <0x0 0x2c00 0x0 0x48>;
+				#io-channel-cells = <1>;
+				power-domains = <&pwrc PWRC_I2C_ID>;
+				interrupts = <GIC_SPI 35 IRQ_TYPE_EDGE_RISING>;
+				clocks = <&xtal>,
+					<&clkc_periphs CLKID_SARADC_EN>,
+					<&clkc_periphs CLKID_SARADC>,
+					<&clkc_periphs CLKID_SARADC_SEL>;
+				clock-names = "clkin", "core",
+					"adc_clk", "adc_sel";
+				status = "disabled";
+			};
+
 			usb2_phy1: phy@4000 {
 				compatible = "amlogic,a1-usb2-phy";
 				clocks = <&clkc_periphs CLKID_USB_PHY_IN>;
Signature · 1 line
2.36.0
#12 lore raw

PATCH v2 12/15 arm64: dts: meson: a1: add hw rng node

In reply to Dmitry Rokosov

From: Alexey Romanov <[email protected]>

Add hardware number generator node. HWRNG access requires OTP power domain being enabled.

---
 arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/amlogic/meson-a1.dtsi +6 -0
index 59ca1f1360fd..edadddacfee0 100644
@@ -242,6 +242,12 @@ usb2_phy1: phy@4000 {
 				power-domains = <&pwrc PWRC_USB_ID>;
 			};
 
+			hwrng: rng@5118 {
+				compatible = "amlogic,meson-rng";
+				reg = <0x0 0x5118 0x0 0x4>;
+				power-domains = <&pwrc PWRC_OTP_ID>;
+			};
+
 			clkc_pll: pll-clock-controller@7c80 {
 				compatible = "amlogic,a1-pll-clkc";
 				reg = <0 0x7c80 0 0x18c>;
Signature · 1 line
2.36.0
#13 lore raw

PATCH v2 13/15 arm64: dts: meson: a1: add ao secure node

In reply to Dmitry Rokosov

From: Alexey Romanov <[email protected]>

Add node for board info registers, which allows getting SoC family and board revision.

For example, with MESON_GX_SOCINFO config enabled we can get the following information for board with Meson A1 SoC:
soc soc0: Amlogic Meson A1 (A113L) Revision 2c:a (1:a) Detected

---
 arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/amlogic/meson-a1.dtsi +6 -0
index edadddacfee0..81abf1762719 100644
@@ -248,6 +248,12 @@ hwrng: rng@5118 {
 				power-domains = <&pwrc PWRC_OTP_ID>;
 			};
 
+			sec_AO: ao-secure@5a20 {
+				compatible = "amlogic,meson-gx-ao-secure", "syscon";
+				reg = <0x0 0x5a20 0x0 0x140>;
+				amlogic,has-chip-id;
+			};
+
 			clkc_pll: pll-clock-controller@7c80 {
 				compatible = "amlogic,a1-pll-clkc";
 				reg = <0 0x7c80 0 0x18c>;
Signature · 1 line
2.36.0
#14 lore raw

PATCH v2 14/15 arm64: dts: introduce Amlogic AD402 reference board based on A113L SoC

In reply to Dmitry Rokosov

Supported IPs: CPU, GIC, IRQ, Timer, UART, Reserved memory for secos, OPTEE client, fixed regulators, UART for HCI, SPI NAND, SARADC, USB and SDIO.

---
 arch/arm64/boot/dts/amlogic/Makefile          |   1 +
 .../arm64/boot/dts/amlogic/meson-a1-ad402.dts | 145 ++++++++++++++++++
 2 files changed, 146 insertions(+)
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-a1-ad402.dts
arch/arm64/boot/dts/amlogic/Makefile +1 -0
index 6f61798a109f..a189b8580cc4 100644
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_MESON) += amlogic-c3-c302x-aw409.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-a1-ad401.dtb
+dtb-$(CONFIG_ARCH_MESON) += meson-a1-ad402.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-axg-jethome-jethub-j100.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-axg-jethome-jethub-j110-rev-2.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-axg-jethome-jethub-j110-rev-3.dtb
arch/arm64/boot/dts/amlogic/meson-a1-ad402.dts new file +145 -0

145 lines not on this page · raw message

Signature · 1 line
2.36.0
#15 lore raw

PATCH v2 15/15 dt-bindings: arm: amlogic: add Amlogic AD402 bindings

In reply to Dmitry Rokosov

Add the compatible for the Amlogic A1 Based AD402 board.

---
 Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/amlogic.yaml +1 -0
index 08d59842655c..15880abb7261 100644
@@ -203,6 +203,7 @@ properties:
         items:
           - enum:
               - amlogic,ad401
+              - amlogic,ad402
           - const: amlogic,a1
 
       - description: Boards with the Amlogic C3 C302X/C308L SoC
Signature · 1 line
2.36.0
Acked-by on v2 15/15
#16 lore raw

Re: [PATCH v2 15/15] dt-bindings: arm: amlogic: add Amlogic AD402 bindings

Quoted 3 lines · Dmitry Rokosov

Add the compatible for the Amlogic A1 Based AD402 board.

Thanks,
Conor.

Quoted 19 lines
---
 Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/amlogic.yaml +1 -0
index 08d59842655c..15880abb7261 100644
@@ -203,6 +203,7 @@ properties:
         items:
           - enum:
               - amlogic,ad401
+              - amlogic,ad402
           - const: amlogic,a1
 
       - description: Boards with the Amlogic C3 C302X/C308L SoC
Signature · 1 line
2.36.0

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic

maintainer Reviewed-by on the v2 series
#17 lore raw
In reply to Dmitry Rokosov
Quoted 63 lines · Dmitry Rokosov

This patch series introduces device tree declarations for various peripheral IPs of the A1 SoC family, including clock controllers, EFUSE, USB, SPI Flash Controller, SDIO, and UART_AO:
- CLK: A1 SoC has four types on the board, namely PLL, Peripherals, CPU, and Audio, but only Amlogic A1 PLL and Peripherals clock controllers are currently supported.
- EFUSE: consists of a 4k bit One Time Programmable (OTP) memory divided into 32 128-bit blocks, and data is accessed using the APB bus through software or the Key-ladder integrated with the EFUSE block.
- USB: only one USB 2.0 high-speed port is available in the A1 SoC, supporting both HOST and DEVICE modes for OTG.
- SPI Flash Controller: 4-bit QPI/SPI NOR Flash or NAND FLASH controller.
- SDIO: for WiFi/IEEE802.11 connection.
- UART_AO: for Bluetooth connection.
- HWRNG: hardware random generator integrated into SoC.
- AO SECURE: board info registers.

The above peripherals are integrated to new AD402 board device tree.

Changes v2 since v1 at [1]:
- reorder meson-a1 dtsi includes to keep them sorted
- remove extra empty lines
- purge the unnecessary 'okay' status
- reorder all device tree nodes (existing and new) sorted by 'reg' values
- introduce new saradc definition
- add hwrng dts node
- provide ao secure dts node with board info registers
- include all changes to new AD402 board device tree
- add AD402 board to bindings

Links:

     [1] https://lore.kernel.org/all/[email protected]/

Alexey Romanov (3):
arm64: dts: meson: a1: enable efuse controller and setup its clk
arm64: dts: meson: a1: add hw rng node
arm64: dts: meson: a1: add ao secure node

Dmitry Rokosov (8):
arm64: dts: meson: a1: reorder includes to keep them sorted
arm64: dts: meson: a1: remove extra empty line before reset node
arm64: dts: meson: a1: remove the unnecessary 'okay' status pwrc value
arm64: dts: meson: a1: reorder gpio_intc node definition
arm64: dts: meson: a1: introduce PLL and Peripherals clk controllers
arm64: dts: meson: a1: support USB controller in OTG mode
arm64: dts: introduce Amlogic AD402 reference board based on A113L SoC
dt-bindings: arm: amlogic: add Amlogic AD402 bindings

George Stark (1):
arm64: dts: meson: a1: add saradc definition

Jan Dakinevich (1):
arm64: dts: meson: a1: add eMMC controller and its pins

Martin Kurbanov (1):
arm64: dts: meson: a1: introduce SPI Flash Controller

Oleg Lyovin (1):
arm64: dts: meson: a1: introduce UART_AO mux definitions

Quoted 7 lines
  .../devicetree/bindings/arm/amlogic.yaml      |   1 +
  arch/arm64/boot/dts/amlogic/Makefile          |   1 +
  .../arm64/boot/dts/amlogic/meson-a1-ad402.dts | 145 ++++++++++++
  arch/arm64/boot/dts/amlogic/meson-a1.dtsi     | 213 +++++++++++++++++-
  4 files changed, 348 insertions(+), 12 deletions(-)

create mode 100644 arch/arm64/boot/dts/amlogic/meson-a1-ad402.dts

For the whole serie:

Thanks !

Neil

#18 lore raw
In reply to Dmitry Rokosov
Quoted 63 lines · Dmitry Rokosov

This patch series introduces device tree declarations for various peripheral IPs of the A1 SoC family, including clock controllers, EFUSE, USB, SPI Flash Controller, SDIO, and UART_AO:
- CLK: A1 SoC has four types on the board, namely PLL, Peripherals, CPU, and Audio, but only Amlogic A1 PLL and Peripherals clock controllers are currently supported.
- EFUSE: consists of a 4k bit One Time Programmable (OTP) memory divided into 32 128-bit blocks, and data is accessed using the APB bus through software or the Key-ladder integrated with the EFUSE block.
- USB: only one USB 2.0 high-speed port is available in the A1 SoC, supporting both HOST and DEVICE modes for OTG.
- SPI Flash Controller: 4-bit QPI/SPI NOR Flash or NAND FLASH controller.
- SDIO: for WiFi/IEEE802.11 connection.
- UART_AO: for Bluetooth connection.
- HWRNG: hardware random generator integrated into SoC.
- AO SECURE: board info registers.

The above peripherals are integrated to new AD402 board device tree.

Changes v2 since v1 at [1]:
- reorder meson-a1 dtsi includes to keep them sorted
- remove extra empty lines
- purge the unnecessary 'okay' status
- reorder all device tree nodes (existing and new) sorted by 'reg' values
- introduce new saradc definition
- add hwrng dts node
- provide ao secure dts node with board info registers
- include all changes to new AD402 board device tree
- add AD402 board to bindings

Links:

     [1] https://lore.kernel.org/all/[email protected]/

Alexey Romanov (3):
arm64: dts: meson: a1: enable efuse controller and setup its clk
arm64: dts: meson: a1: add hw rng node
arm64: dts: meson: a1: add ao secure node

Dmitry Rokosov (8):
arm64: dts: meson: a1: reorder includes to keep them sorted
arm64: dts: meson: a1: remove extra empty line before reset node
arm64: dts: meson: a1: remove the unnecessary 'okay' status pwrc value
arm64: dts: meson: a1: reorder gpio_intc node definition
arm64: dts: meson: a1: introduce PLL and Peripherals clk controllers
arm64: dts: meson: a1: support USB controller in OTG mode
arm64: dts: introduce Amlogic AD402 reference board based on A113L SoC
dt-bindings: arm: amlogic: add Amlogic AD402 bindings

George Stark (1):
arm64: dts: meson: a1: add saradc definition

Jan Dakinevich (1):
arm64: dts: meson: a1: add eMMC controller and its pins

Martin Kurbanov (1):
arm64: dts: meson: a1: introduce SPI Flash Controller

Oleg Lyovin (1):
arm64: dts: meson: a1: introduce UART_AO mux definitions

Quoted 7 lines
  .../devicetree/bindings/arm/amlogic.yaml      |   1 +
  arch/arm64/boot/dts/amlogic/Makefile          |   1 +
  .../arm64/boot/dts/amlogic/meson-a1-ad402.dts | 145 ++++++++++++
  arch/arm64/boot/dts/amlogic/meson-a1.dtsi     | 213 +++++++++++++++++-
  4 files changed, 348 insertions(+), 12 deletions(-)

create mode 100644 arch/arm64/boot/dts/amlogic/meson-a1-ad402.dts

B4 missed it but I applied this patchset into v6.7/arm64-dt.

Thanks,
Neil

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic