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: 8bit Content-Type: text/plain 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 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.dtsi 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 = "amlogic,a1"; + + interrupt-parent = <&gic>; + #address-cells = <1>; + #size-cells = <1>; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu0: cpu@0 { + device_type = "cpu"; + compatible = "arm,cortex-a35"; + reg = <0x0>; + enable-method = "psci"; + next-level-cache = <&l2>; + }; + + cpu1: cpu@1 { + device_type = "cpu"; + compatible = "arm,cortex-a35"; + reg = <0x1>; + enable-method = "psci"; + next-level-cache = <&l2>; + }; + + l2: l2-cache0 { + compatible = "cache"; + }; + }; + + psci { + compatible = "arm,psci-1.0"; + method = "smc"; + }; + + sm: secure-monitor { + compatible = "amlogic,meson-gxbb-sm"; + }; + + soc { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + apb: bus@fe000000 { + compatible = "simple-bus"; + reg = <0xfe000000 0x1000000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0xfe000000 0x1000000>; + + reset: reset-controller@0 { + compatible = "amlogic,meson-a1-reset"; + reg = <0x0 0x8c>; + #reset-cells = <1>; + }; + + periphs_pinctrl: pinctrl@400 { + compatible = "amlogic,meson-a1-periphs-pinctrl"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + gpio: bank@400 { + reg = <0x0400 0x003c>, + <0x0480 0x0118>; + reg-names = "mux", "gpio"; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&periphs_pinctrl 0 0 62>; + }; + + }; + + uart_AO: serial@1c00 { + compatible = "amlogic,meson-gx-uart", + "amlogic,meson-ao-uart"; + reg = <0x1c00 0x18>; + interrupts = ; + clocks = <&xtal>, <&xtal>, <&xtal>; + clock-names = "xtal", "pclk", "baud"; + status = "disabled"; + }; + + uart_AO_B: serial@2000 { + compatible = "amlogic,meson-gx-uart", + "amlogic,meson-ao-uart"; + reg = <0x2000 0x18>; + interrupts = ; + clocks = <&xtal>, <&xtal>, <&xtal>; + clock-names = "xtal", "pclk", "baud"; + status = "disabled"; + }; + + gpio_intc: interrupt-controller@0440 { + compatible = "amlogic,meson-a1-gpio-intc", + "amlogic,meson-gpio-intc"; + reg = <0x0440 0x14>; + interrupt-controller; + #interrupt-cells = <2>; + amlogic,channel-interrupts = + <49 50 51 52 53 54 55 56>; + }; + }; + + gic: interrupt-controller@ff901000 { + compatible = "arm,gic-400"; + reg = <0xff901000 0x1000>, + <0xff902000 0x2000>, + <0xff904000 0x2000>, + <0xff906000 0x2000>; + interrupt-controller; + interrupts = ; + #interrupt-cells = <3>; + #address-cells = <0>; + }; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = , + , + , + ; + }; + + xtal: xtal-clk { + compatible = "fixed-clock"; + clock-frequency = <24000000>; + clock-output-names = "xtal"; + #clock-cells = <0>; + }; +}; -- 2.38.1