Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7859228rwd; Tue, 20 Jun 2023 07:10:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5lQgWig2ZlUWmm5CYLPGQwMPjyKPVVO/gevOr4R0qxfVvrmkZ5ntvrYoKh7cdN7nN0kIzm X-Received: by 2002:a05:6a20:7f93:b0:118:eeef:2a25 with SMTP id d19-20020a056a207f9300b00118eeef2a25mr18516837pzj.34.1687270245098; Tue, 20 Jun 2023 07:10:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687270245; cv=none; d=google.com; s=arc-20160816; b=An+nB0lC6TA5DpJqwVnLMAFeIk+wOl1VBME1BDIQVN5qxkEnGdj/s8Mj2y2hUn+4kF AutXAravGJTpsyobaue2b8d5Ax14aUSy6bdhqykIWUxtoxtq+udfG89cQJoSIms59n1S BtV1ckNNb9QnKlDPZuSynY9+jQM9GNL46vuVIiO0/SvqVyZ7aU7YUVXWU5DPuEPtDROT XhxhK+Ue0JMax/mgozPtdMuKEJg8PvnqH9ug/liekel1H3Wi3YZG700AcjVOoPPDlPYK cnO7uQTAE7ahsYENHNTJMHyWWeVNWuPTCL7x9e029wqvkEKXgyLcWz/OPp69Bw0uVW6F 7Riw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=q/KbsrDZwCLVPdQPy4lnm1FCV5FpIxxRPzJUA6ihk/Y=; b=BkbfKQ7mtN1NtwZ6JTsaPoJcrz1eUGuBPj7eYsiFbpvopBdO88WAisNLzV8w+DHv0A uRSfLBd/X1kdX6S3cfshYwwd7MH+07rGI+5H36bmcFk+2gN5dn6ok0G2BvpwG7sYIeYi sGdrl+/5d0bOTmB1mYB4XXXy1CGjwpMmjlT80GWtXUBZeZ3GokXCPPPCtDwAwqu3E8TX 4h2kgRpuHvS5KEEW3OV02rF/y8dbsJMw4X8Yt8qepcFvOCCTEUq03NcyT7SAUvxwE6+2 gKXWZ/0qoL6zI2YNt5eIemBXZrJ9HciaDkS9BbTLzfGKFVmTgQVL4y7kjPx8KnYk87Jb cu4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b71-20020a63344a000000b00543ed2931d2si1826692pga.456.2023.06.20.07.10.03; Tue, 20 Jun 2023 07:10:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233223AbjFTNta (ORCPT + 99 others); Tue, 20 Jun 2023 09:49:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233171AbjFTNtY (ORCPT ); Tue, 20 Jun 2023 09:49:24 -0400 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B01310D0; Tue, 20 Jun 2023 06:49:02 -0700 (PDT) Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-31126037f41so4406276f8f.2; Tue, 20 Jun 2023 06:49:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687268941; x=1689860941; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=q/KbsrDZwCLVPdQPy4lnm1FCV5FpIxxRPzJUA6ihk/Y=; b=cDR/uFa8pSnNgN30UTXMMIyCqM50D8cyP+L/ZqRnwe4bwyxoGcZxxdQd8nLdgUxkiY zKukFYBPfJuUGKaobPgNOc0vGNKl3amNHX0kL327AGDETosHtMiBKEZjG9esymmjOe8T 25H3xbgAfoTb/IdY9hRnz7VJn9YDkHdKXw+J9DHjU3hTdLLVoALj5GjtWJLoezqo0KSJ YkGu+VLjUsJKQSVeYr/hdNHa9Y0OrMNFQwI8BlwShUBoBW/mGGKQZPYQYTebGLZOOxqU 95jkw7WTc6olQ1nvsmK/5uKg22tIsoww6gffx55Uu6vJScFuB6ciyPq3gmiKpmAF9GRp BQpA== X-Gm-Message-State: AC+VfDzBhl4nXgmBBkoaiShtPZG2zaunFkthKp0oTSDvPy73B0PlzjTV 1/whcgnJ3obDD5Aa1od8sAWi7uDyX7NywA== X-Received: by 2002:adf:f882:0:b0:311:15a7:8789 with SMTP id u2-20020adff882000000b0031115a78789mr9849154wrp.56.1687268940653; Tue, 20 Jun 2023 06:49:00 -0700 (PDT) Received: from ryzen.lan (cpc87451-finc19-2-0-cust61.4-2.cable.virginm.net. [82.11.51.62]) by smtp.gmail.com with ESMTPSA id k3-20020a5d4283000000b00312780bedc3sm2038012wrq.56.2023.06.20.06.48.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 06:48:59 -0700 (PDT) From: Lucas Tanure To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Jerome Brunet , Kevin Hilman Cc: Nick , Artem , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Lucas Tanure Subject: [PATCH v2 0/2] Add Amlogic A311D2 and Khadas Vim4 Board Support Date: Tue, 20 Jun 2023 14:48:55 +0100 Message-ID: <20230620134857.238941-1-tanure@linux.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Khadas VIM4 uses the Amlogic A311D2 SoC, based on the Amlogic Meson T7 family. This chip is not the same as A311D used in Vim3 board. Work based on Khadas 5.4 branch: https://github.com/khadas/linux/tree/khadas-vims-5.4.y The current status is Vim4 board booting to emergency shell via uart. Board Features: - 8GB LPDDR4X 2016MHz - 32GB eMMC 5.1 storage - 32MB SPI flash - 10/100/1000 Base-T Ethernet - AP6275S Wireless (802.11 a/b/g/n/ac/ax, BT5.1) - HDMI 2.1 video - HDMI Input - 1x USB 2.0 + 1x USB 3.0 ports - 1x USB-C (power) with USB 2.0 OTG - 3x LED's (1x red, 1x blue, 1x white) - 3x buttons (power, function, reset) - M2 socket with PCIe, USB, ADC & I2C - 40pin GPIO Header - 1x micro SD card slot Changes Since v1: - Drop the T7 clock driver as it is not needed for serial boot. It will later use the S4 clock driver as S4 and T7 seems to be similar chips. - Use "arm,gic-400" for interrupt controller to fix dtb_check - Remove CPU node properties not needed for serial boot - Move UART node to apb4 node - Drop T7 UART compatible line and use S4 uart - Use psci V1 instead of 0.2, it works, but I can't verify is correct as the datasheet I have doesn't contain that information. - Remove compatible from meson-t7.dtsi, move it to vim4 board dts - Add memory node with 8GB. Not sure about this one, works without, but doesn't detect 8GB - Use defines for GIC_CPU_MASK_SIMPLE, IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_HIGH instead of hardcoded values Lucas Tanure (2): dt-bindings: arm: amlogic: add Amlogic A311D2 bindings arm64: dts: meson-t7-a311d2-khadas-vim4: add initial device-tree .../devicetree/bindings/arm/amlogic.yaml | 7 + arch/arm64/boot/dts/amlogic/Makefile | 1 + .../amlogic/meson-t7-a311d2-khadas-vim4.dts | 52 ++++++ arch/arm64/boot/dts/amlogic/meson-t7.dtsi | 158 ++++++++++++++++++ 4 files changed, 218 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/meson-t7-a311d2-khadas-vim4.dts create mode 100644 arch/arm64/boot/dts/amlogic/meson-t7.dtsi -- 2.41.0