From nobody Wed Sep 10 22:07:12 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78C06C61DA4 for ; Wed, 22 Feb 2023 11:50:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231610AbjBVLuq (ORCPT ); Wed, 22 Feb 2023 06:50:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230291AbjBVLuf (ORCPT ); Wed, 22 Feb 2023 06:50:35 -0500 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AE1E32CEA; Wed, 22 Feb 2023 03:50:33 -0800 (PST) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 98DE75FD62; Wed, 22 Feb 2023 14:50:31 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1677066631; bh=UdeT4IMQpdav5+UNKBr3En6Ud+lKewoeO2W5d6ugRCo=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=FNCs88+vv+SiOwI4RlYHySChJ3BxeI8mHNaz9tgquViBGRiAI8JAPsdvoI1LPtqqW c1kDr1Mw9Z+uhALbCEz/ohwZVGYcrfhsAId1aoy/r77VjTYTUuQMD7wrf9d5M4RZyO ksWb5vZYH+HbwIognMi7c+XCZs3G7ggCpeFPiHqTBk97LaJh46S5ecl4chKOw/jGBp 91ArVHxG38OUkBsbMP1dNpdSbQTCZ6jrcNg8sha6JJxIUt1dpBcKW1n9aS/6KNLFe4 39L44IRMlcfTXuJKuz5PQmTbi62pOwlSwyy6mLF/di7SrhZnR92qQ7H7C1H5IRpAQn t9dAo488t7eKA== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Wed, 22 Feb 2023 14:50:31 +0300 (MSK) From: Alexey Romanov To: , , , , , , CC: , , , , , Alexey Romanov Subject: [PATCH v1 1/3] meson: pinctrl: use CONFIG_PINCTRL_A1 with CONFIG_ARM Date: Wed, 22 Feb 2023 14:50:18 +0300 Message-ID: <20230222115020.55867-2-avromanov@sberdevices.ru> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230222115020.55867-1-avromanov@sberdevices.ru> References: <20230222115020.55867-1-avromanov@sberdevices.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH01.sberdevices.ru (172.16.1.4) To S-MS-EXCH01.sberdevices.ru (172.16.1.4) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2023/02/22 06:32:00 #20888384 X-KSMG-AntiVirus-Status: Clean, skipped Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Tested A1 pinctrl support for ARM and it works. Signed-off-by: Alexey Romanov --- drivers/pinctrl/meson/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/meson/Kconfig b/drivers/pinctrl/meson/Kconfig index 64fb9e074ac6..fad688cabd05 100644 --- a/drivers/pinctrl/meson/Kconfig +++ b/drivers/pinctrl/meson/Kconfig @@ -57,7 +57,7 @@ config PINCTRL_MESON_G12A =20 config PINCTRL_MESON_A1 tristate "Meson a1 Soc pinctrl driver" - depends on ARM64 + depends on ARM || ARM64 select PINCTRL_MESON_AXG_PMX default y =20 --=20 2.38.1 From nobody Wed Sep 10 22:07:12 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1EC61C61DA4 for ; Wed, 22 Feb 2023 11:50:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231693AbjBVLut (ORCPT ); Wed, 22 Feb 2023 06:50:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231206AbjBVLug (ORCPT ); Wed, 22 Feb 2023 06:50:36 -0500 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35CEC366A7; Wed, 22 Feb 2023 03:50:35 -0800 (PST) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 8A7665FD63; Wed, 22 Feb 2023 14:50:33 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1677066633; bh=CsQGfUCkH2ZamwaiMkFtrGFlOwLHzQzG+8+VcxmQvAI=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=caAUX07/ARkhhcAYGdi1TUU4bLJuMsAU0bp0VovhAsMfUHcFnog5xxbv5CHjytMf0 9z/F9+WVgw0wbIAFv1Bl0AtUEiWg8XiyueXBrNwNiQr7XUMahjQG4eUnQAMyg4BuGD aNPT4m0MOD5DcOXnXDKATRtBTrtVtFu2J676ONOQHxPDysplknntSZPWbozWmt0mRh Zu0iZiOcu/itWhxh2nDu9bzDruMj9J+hKaFe/KA9M/yVbo8iWvG6H0796ao47zLMfY O2sQOS8D3cw/LpVWtMoMwg/N4rWP+yUqcZVUG8ugyAk/K1+hhkMT4xeQQy3ZUBHiGg UizC/hSUL4Yxw== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Wed, 22 Feb 2023 14:50:33 +0300 (MSK) From: Alexey Romanov To: , , , , , , CC: , , , , , Alexey Romanov Subject: [PATCH v1 2/3] firmware: meson: use CONFIG_MESON_SM with CONFIG_ARM Date: Wed, 22 Feb 2023 14:50:19 +0300 Message-ID: <20230222115020.55867-3-avromanov@sberdevices.ru> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230222115020.55867-1-avromanov@sberdevices.ru> References: <20230222115020.55867-1-avromanov@sberdevices.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH01.sberdevices.ru (172.16.1.4) To S-MS-EXCH01.sberdevices.ru (172.16.1.4) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2023/02/22 06:32:00 #20888384 X-KSMG-AntiVirus-Status: Clean, skipped Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Meson SM driver has one strong disturbing requirement. It's size of the memory page, it should be equal to 4K. ARM 32-bit arch always uses 4K page and doesn't support bigger sizes. So it's not a stop factor. Anyway, meson sm driver was tested in the meson-a1 ARM board and it works correctly. Signed-off-by: Alexey Romanov --- drivers/firmware/meson/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/meson/Kconfig b/drivers/firmware/meson/Kconfig index f2fdd3756648..20303b7394fb 100644 --- a/drivers/firmware/meson/Kconfig +++ b/drivers/firmware/meson/Kconfig @@ -6,6 +6,6 @@ config MESON_SM tristate "Amlogic Secure Monitor driver" depends on ARCH_MESON || COMPILE_TEST default y - depends on ARM64_4K_PAGES + depends on ARM || ARM64_4K_PAGES help Say y here to enable the Amlogic secure monitor driver --=20 2.38.1 From nobody Wed Sep 10 22:07:12 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15A80C61DA4 for ; Wed, 22 Feb 2023 11:50:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229930AbjBVLux (ORCPT ); Wed, 22 Feb 2023 06:50:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231218AbjBVLuh (ORCPT ); Wed, 22 Feb 2023 06:50:37 -0500 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3278311F8; Wed, 22 Feb 2023 03:50:36 -0800 (PST) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 002535FD64; Wed, 22 Feb 2023 14:50:35 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1677066635; bh=Yyq/EadsRRDr4Cn4B6hjT0ghvVGKK0Iz7Oqvfgz081w=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=drPuGdEfS1foAlEwDmZ4JZ/FIZiO/YPWJYfQ5IFyvCIUhIrepI1GdLa3QCHmULr63 2oym3dL0FOxSkQ7ARmTOxjO9b2iJYh0qlPzs7TTp1c4j/RDl/J3vegWBUKQP4TxSNY xnUiiPLmDNubxa4IdADeTUwwWLNhi7OBoEbMuiwWxVE3gSq7YolPnWIdy2LCgHLCr5 8gL9Vu+kQ4clguQvtC/wTFU/OlMbYXEr2iRyIcD4/oo9WnGML4KegxfdZJwsyYysHq XO61/OMBWd1tJHBp7Ofgyd8hQiTRgvw7nmcStgDVMJU/mluG4m7GSCe54DdsDTvEgq EHDV7se7R0u3A== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Wed, 22 Feb 2023 14:50:34 +0300 (MSK) From: Alexey Romanov To: , , , , , , CC: , , , , , Alexey Romanov Subject: [PATCH v1 3/3] arch/arm: dts: introduce meson-a1 device tree Date: Wed, 22 Feb 2023 14:50:20 +0300 Message-ID: <20230222115020.55867-4-avromanov@sberdevices.ru> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230222115020.55867-1-avromanov@sberdevices.ru> References: <20230222115020.55867-1-avromanov@sberdevices.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH01.sberdevices.ru (172.16.1.4) To S-MS-EXCH01.sberdevices.ru (172.16.1.4) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2023/02/22 06:32:00 #20888384 X-KSMG-AntiVirus-Status: Clean, skipped Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Add basic support for the 32-bit Amlogic A1. This device tree describes following compontents: CPU, GIC, IRQ, Timer, UART, PIN controller. It's capable of booting up into the serial console. This is based on arm64 version of meson-a1.dtsi. Signed-off-by: Alexey Romanov --- arch/arm/boot/dts/meson-a1.dtsi | 151 ++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 arch/arm/boot/dts/meson-a1.dtsi diff --git a/arch/arm/boot/dts/meson-a1.dtsi b/arch/arm/boot/dts/meson-a1.d= tsi new file mode 100644 index 000000000000..1d900fe86f8e --- /dev/null +++ b/arch/arm/boot/dts/meson-a1.dtsi @@ -0,0 +1,151 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2023 SberDevices. + * Author: Alexey Romanov + */ + +#include +#include +#include + +/ { + compatible =3D "amlogic,a1"; + + interrupt-parent =3D <&gic>; + #address-cells =3D <1>; + #size-cells =3D <1>; + + cpus { + #address-cells =3D <1>; + #size-cells =3D <0>; + + cpu0: cpu@0 { + device_type =3D "cpu"; + compatible =3D "arm,cortex-a35"; + reg =3D <0x0>; + enable-method =3D "psci"; + next-level-cache =3D <&l2>; + }; + + cpu1: cpu@1 { + device_type =3D "cpu"; + compatible =3D "arm,cortex-a35"; + reg =3D <0x1>; + enable-method =3D "psci"; + next-level-cache =3D <&l2>; + }; + + l2: l2-cache0 { + compatible =3D "cache"; + }; + }; + + psci { + compatible =3D "arm,psci-1.0"; + method =3D "smc"; + }; + + sm: secure-monitor { + compatible =3D "amlogic,meson-gxbb-sm"; + }; + + soc { + compatible =3D "simple-bus"; + #address-cells =3D <1>; + #size-cells =3D <1>; + ranges; + + apb: bus@fe000000 { + compatible =3D "simple-bus"; + reg =3D <0xfe000000 0x1000000>; + #address-cells =3D <1>; + #size-cells =3D <1>; + ranges =3D <0x0 0xfe000000 0x1000000>; + + reset: reset-controller@0 { + compatible =3D "amlogic,meson-a1-reset"; + reg =3D <0x0 0x8c>; + #reset-cells =3D <1>; + }; + + periphs_pinctrl: pinctrl@400 { + compatible =3D "amlogic,meson-a1-periphs-pinctrl"; + #address-cells =3D <1>; + #size-cells =3D <1>; + ranges; + + gpio: bank@400 { + reg =3D <0x0400 0x003c>, + <0x0480 0x0118>; + reg-names =3D "mux", "gpio"; + gpio-controller; + #gpio-cells =3D <2>; + gpio-ranges =3D <&periphs_pinctrl 0 0 62>; + }; + + }; + + uart_AO: serial@1c00 { + compatible =3D "amlogic,meson-gx-uart", + "amlogic,meson-ao-uart"; + reg =3D <0x1c00 0x18>; + interrupts =3D ; + clocks =3D <&xtal>, <&xtal>, <&xtal>; + clock-names =3D "xtal", "pclk", "baud"; + status =3D "disabled"; + }; + + uart_AO_B: serial@2000 { + compatible =3D "amlogic,meson-gx-uart", + "amlogic,meson-ao-uart"; + reg =3D <0x2000 0x18>; + interrupts =3D ; + clocks =3D <&xtal>, <&xtal>, <&xtal>; + clock-names =3D "xtal", "pclk", "baud"; + status =3D "disabled"; + }; + + gpio_intc: interrupt-controller@0440 { + compatible =3D "amlogic,meson-a1-gpio-intc", + "amlogic,meson-gpio-intc"; + reg =3D <0x0440 0x14>; + interrupt-controller; + #interrupt-cells =3D <2>; + amlogic,channel-interrupts =3D + <49 50 51 52 53 54 55 56>; + }; + }; + + gic: interrupt-controller@ff901000 { + compatible =3D "arm,gic-400"; + reg =3D <0xff901000 0x1000>, + <0xff902000 0x2000>, + <0xff904000 0x2000>, + <0xff906000 0x2000>; + interrupt-controller; + interrupts =3D ; + #interrupt-cells =3D <3>; + #address-cells =3D <0>; + }; + }; + + timer { + compatible =3D "arm,armv8-timer"; + interrupts =3D , + , + , + ; + }; + + xtal: xtal-clk { + compatible =3D "fixed-clock"; + clock-frequency =3D <24000000>; + clock-output-names =3D "xtal"; + #clock-cells =3D <0>; + }; +}; --=20 2.38.1