From patchwork Wed Jun 21 13:32:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Tanure X-Patchwork-Id: 11101 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp4375324vqr; Wed, 21 Jun 2023 06:44:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7iFVi+wmIb61OoNXuXC5Y0NNk5m1UQP2sdJMOI/izFeRvsSUbLCOODOeLUPgkW9ZsUKH6i X-Received: by 2002:a05:6a20:1044:b0:123:7989:ba4b with SMTP id gt4-20020a056a20104400b001237989ba4bmr630503pzc.41.1687355099097; Wed, 21 Jun 2023 06:44:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687355099; cv=none; d=google.com; s=arc-20160816; b=Y4/9XNOBkvr5SFprapnnZQuSYDgrVEIOz5zGasI+rW56bKwNez7voyw/DEUQVRJ1fg 3DGZDhdcZkxcWg2QVqNYbqNn6LY21/yvABO5ohxHaqUiAHXLPi+n9axu7+hgAWj3Yw8Q KtJykUuM+a08RmFaDh63pLjqGSp+FORq8FpEl3bPQR/dgAO7n4TFUIg8qtonvwpNoVVT yYNn0q+45q/zcyQH6fXeEOg/4pU8nxdVvvn6rwuFF23pDEXrwNJwp1Q/1/RwNYai6RKa GTHXcq22HBc/XxSLwljEalmDzzmJXmivunAQ1LP0/RXIYREydqJgbamv7gQg/huJjvJx 8/bw== 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=/IJMn0/zhbPXvpTVANrT1cs8Ypc7FJHdchkV1z/m0Hg=; b=aJ61oXrXtdTrevof50J5f19IVLwoR4WuWnpwkJOFZYi1sow6FrSJBSOczePpZAyOgG zwf/oCaYyFpSAvuVTsEXq6kr5uMHBAdCYa+pEQ2uLrjiA1iMJMgiPQoefBMytLPyz9Xs bYSbTIHadSh4+fu4J1t39O4w3+ATzHakTh25IDkIR1YABwxb/dn5RjXeWO2+ZdjH9rNg 5q6zmPgFxVz/3PohoooV8KFLPlKxp/ovIwGZALly/ocRRkMH5mc5cmkbCHbDfor8ME8g PY1ZEpvIKsnw7ANJS20CppojU9PvV3D1q5bJzdzlVkP+JdWKkjkup2poVZAv/Ux1/RON hTAg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s189-20020a625ec6000000b006689d5c5953si538457pfb.112.2023.06.21.06.44.44; Wed, 21 Jun 2023 06:44:59 -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 S229925AbjFUNcZ (ORCPT + 99 others); Wed, 21 Jun 2023 09:32:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229602AbjFUNcX (ORCPT ); Wed, 21 Jun 2023 09:32:23 -0400 Received: from mail-oi1-f180.google.com (mail-oi1-f180.google.com [209.85.167.180]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF2531981; Wed, 21 Jun 2023 06:32:22 -0700 (PDT) Received: by mail-oi1-f180.google.com with SMTP id 5614622812f47-3a03ff70c1aso1095470b6e.1; Wed, 21 Jun 2023 06:32:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687354342; x=1689946342; 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=/IJMn0/zhbPXvpTVANrT1cs8Ypc7FJHdchkV1z/m0Hg=; b=hgPhc6i1L+dMuKShv/QYYl14XtrwkypfPbagW42p++z6j8bK9EOl6KjPQ8gq7xkhGO wTh9cHXL3W8vi59H0WX7APoHx6jmMwX/f0JlhKpF2LU16XQo4zi6b4Foxfau95wZPbo2 vYIP6TziUUhrRqBTZo8V44K1rwZgqCNlHmoh4WB15PObLT3QHjE1IfphPk0M2BFh9cml BOX9+58fAQdwVxasNfnOCouqZoq6hhVO0IiIKSKUFETEi6Rfnutxs8wkPuZ8NqOj9aWG ZH7VPLdNJOTZSfqJpeKVdwWdPeFccIfg6rNXZIingyQKHkYPUwlbTcDQppeEY62lOC1e AKJA== X-Gm-Message-State: AC+VfDx2r1fOFQP6Grx8L0GA62jSa4lPQAtML2ywnfrHKtd696+wAKdi dgh01A+hlpeYuzsCZ6VQPcw= X-Received: by 2002:aca:d0a:0:b0:3a0:30e8:f069 with SMTP id 10-20020aca0d0a000000b003a030e8f069mr6942247oin.30.1687354341857; Wed, 21 Jun 2023 06:32:21 -0700 (PDT) Received: from localhost.localdomain (cpc87451-finc19-2-0-cust61.4-2.cable.virginm.net. [82.11.51.62]) by smtp.gmail.com with ESMTPSA id bf24-20020a056808191800b00395f2c84b81sm2114206oib.54.2023.06.21.06.32.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jun 2023 06:32:21 -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 v3 0/3] Add Amlogic A311D2 and Khadas Vim4 Board Support Date: Wed, 21 Jun 2023 14:32:12 +0100 Message-ID: <20230621133215.109254-1-tanure@linux.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769320060162071833?= X-GMAIL-MSGID: =?utf-8?q?1769320060162071833?= 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 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 (3): dt-bindings: arm: amlogic: add Amlogic A311D2 bindings dt-bindings: serial: amlogic,meson-uart: Add compatible string for T7 arm64: dts: meson-t7-a311d2-khadas-vim4: add initial device-tree .../devicetree/bindings/arm/amlogic.yaml | 7 + .../bindings/serial/amlogic,meson-uart.yaml | 2 + arch/arm64/boot/dts/amlogic/Makefile | 1 + .../amlogic/meson-t7-a311d2-khadas-vim4.dts | 52 ++++++ arch/arm64/boot/dts/amlogic/meson-t7.dtsi | 158 ++++++++++++++++++ 5 files changed, 220 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