Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp12116101rwd; Fri, 23 Jun 2023 01:21:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ470COD5ytkq6KBiNthF3i/rNDxKZZG0YbJsRZ5U5hTXO2+6tv2gYvSHbzyYc8qdyN1813L X-Received: by 2002:a17:903:646:b0:1a9:86ca:38cd with SMTP id kh6-20020a170903064600b001a986ca38cdmr12955442plb.2.1687508512973; Fri, 23 Jun 2023 01:21:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687508512; cv=none; d=google.com; s=arc-20160816; b=zVCjvfk9A30iFDWq8Ot9/FgeOn90kCyth4jLuwdL+zy4imwNg0yPZlf7uYyn+I35ho ZUh9AxKjlaDN2rp2Z8VOQ8vps0NLCzPFuQAw70sZCStuhQ5lBz3WMoADh1N2voPUyj+C 0NPEqp1mZX8veWaBC5Ih950C23gu01uMOkabJ1/XM+boitye0FeK/FwJlSv4BQUkaQaa wMF36NvlTWrGjKgZH4GiA6KskhqHRLMKIHw3DRj4e9AuP8n9dJhhfBwEM18mPx+lcA0F t/pu1eRKjHprfL/uARhGlqQKWjkLlUojl1+3jniXE/ekAnftcnYUiklpPgLE611Hpyts yPXg== 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=l/dYwrBL+Qkk5ymGNSlPa75MZ37M5uNwNxJYrXJbylM=; b=McsYXbnaRmb7yO+4ybEjKdIS9vughiGHWzXSLrfX+eyQfdFNPFgx8y9ZepX0krCC5y Gpu2Z4IaE1UPPnGlIRHfbrXokvL0m/nlU7zfr7yO33dZQKFg9jM2hz1i5viR6uyvw/F4 5pklaxk4ytD4NV5docWBJX4ZK6xFkOo2CImxpogdf9fPHuk+g6HSrOHNB5gL9w9/JL4P BS4kPmkJMMlq1e4P4OWc+6XZBESA+kf5MRUZRz4/KaxG5At+FFLQ5eRQ67kAapTZXp1y ljlKWFfzvLvfZCUt0jybP2ycOOPgbqot98OclfBzIqgte5EzXbcgckWM/yxpDlbJaXH4 29Ng== 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 c2-20020a170902d90200b001a043389a7asi7725393plz.310.2023.06.23.01.21.39; Fri, 23 Jun 2023 01:21:52 -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 S231734AbjFWIMu (ORCPT + 99 others); Fri, 23 Jun 2023 04:12:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230481AbjFWIMs (ORCPT ); Fri, 23 Jun 2023 04:12:48 -0400 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8327B2100; Fri, 23 Jun 2023 01:12:46 -0700 (PDT) Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-3fa7cd95dacso3686535e9.3; Fri, 23 Jun 2023 01:12:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687507965; x=1690099965; 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=l/dYwrBL+Qkk5ymGNSlPa75MZ37M5uNwNxJYrXJbylM=; b=lE7IE8IkbUUhJH1ss2evldGkN6CiKihB6Iqty213clEt+vW1y7HwPWrrWtXoY8oCM2 QcH5L5ok85zXLGnbH/xUpusyZLjPuXf+SC3lAXFuAxsLjPQAeFARE3xuSLHPpmj2fXeX QPuCwP3rDART+rGreWbywtAtJMGXgG+1i5RBmbiLJoIp4kTuJsLZqt0zMp19PZ9iCeFV YaRraOGhn2pdXBUiqp6f6XaVHopQx2RT/IP1DCuuf0uoR1u6PuPbVkRuLTUfjqTGy5K4 YyL2uD/8KS3jxZT5/lAf7KvG7GLS+/9VywC2xuc1GKlSY5TCOPqo9QKFlaSV+JHx0yYq PMwA== X-Gm-Message-State: AC+VfDxi/LZaOt8ZedUbSGAEQ1BIplBRP1efRbwv9M+2o00r83g/hSsK aqLkG1mMm+f1a+xHwdUzanM= X-Received: by 2002:a05:600c:220b:b0:3f9:b0fe:7e11 with SMTP id z11-20020a05600c220b00b003f9b0fe7e11mr10846336wml.28.1687507964681; Fri, 23 Jun 2023 01:12:44 -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 l21-20020a7bc455000000b003f9b29ba838sm1594141wmi.35.2023.06.23.01.12.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jun 2023 01:12:44 -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 v5 0/4] Add Amlogic A311D2 and Khadas Vim4 Board Support Date: Fri, 23 Jun 2023 09:12:38 +0100 Message-ID: <20230623081242.109131-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 v4: - Use S4 instead of G12a for uart fallback - Add OF_EARLYCON_DECLARE for T7 uart Changes Since v3: - Fix issues with "amlogic,meson-t7-uart" documentation Changes Since v2: - Add "amlogic,meson-t7-uart" documentation 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 (4): dt-bindings: arm: amlogic: add Amlogic A311D2 bindings dt-bindings: serial: amlogic,meson-uart: Add compatible string for T7 tty: serial: meson: Add a earlycon for the T7 SoC arm64: dts: meson-t7-a311d2-khadas-vim4: add initial device-tree .../devicetree/bindings/arm/amlogic.yaml | 7 + .../bindings/serial/amlogic,meson-uart.yaml | 4 + arch/arm64/boot/dts/amlogic/Makefile | 1 + .../amlogic/meson-t7-a311d2-khadas-vim4.dts | 52 ++++++ arch/arm64/boot/dts/amlogic/meson-t7.dtsi | 158 ++++++++++++++++++ drivers/tty/serial/meson_uart.c | 2 + 6 files changed, 224 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