From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::443; helo=mail-wr1-x443.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id BDA322194D3AE for ; Wed, 26 Dec 2018 05:25:41 -0800 (PST) Received: by mail-wr1-x443.google.com with SMTP id u4so15649110wrp.3 for ; Wed, 26 Dec 2018 05:25:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MxSok9NVRPwVQR3h6BJxf/RKoXDeQwFXKO01r9Gc8cg=; b=IuMWjLvgNB/2lW0YaBM4zxWYDrHpKmqDAvb/HeJknkJ6LX/gRZeVKXeuCYzT+yjI7f 3JuKcszgHoCe7hfxMq3jKCVwIZTaLRkzE3BaM46SYLU4Rtfs0sBuP51rJQkoB+r0Zusp djmdboMhQ1R3YMIWQJqbAXWrUR6mhY+AX6TRA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MxSok9NVRPwVQR3h6BJxf/RKoXDeQwFXKO01r9Gc8cg=; b=iZ5qAkRcdlnQcuI1j5Tiq0wSM5awDsZu/bH9VUvFCZnTqR7ZDmLEUyGHvTKGDSXsXp ihAXFYl++za9FPQlWGGTGIGlZ8liqah1dhPWv0PaCbgbR4jvyIZSp9e5gR6qnatWRWeH cxoFDqaMbKbeIpMDV4fCJPmG3Au4ZjFH0/q+XaPhdFDisme5BNO5dphAfSOxtTskbSMS /vwZBm3ps+9tKvsEeWbVBCD4k3OGdlGEXQSSLC+1tr1r/yP3CMRvLJ6rvqr3WF6RNPFK zBpd6FR/kTJvrqQhzm4feUpXA6dn51JD5wRCPDNnee2TI0CcwmqqbwfZ7UDpndkQv1+V /bOw== X-Gm-Message-State: AJcUuke5DNDlD5Dv1i2AsLBtwSuDuK91FLmqW3sZ3HFYO2xi8MbWhE1V lasqg81wZU6Y8fU+RMaano63Fyw6O1oLAg== X-Google-Smtp-Source: ALg8bN6Fsg5EkzjEhKFl3usEJDHksNuy8T5mGEwQ2DkFYKWGyLjbrucuU5AYdSIm5wcfN0C24bt3Qw== X-Received: by 2002:a5d:5208:: with SMTP id j8mr19424666wrv.188.1545830739223; Wed, 26 Dec 2018 05:25:39 -0800 (PST) Received: from localhost.localdomain (laubervilliers-657-1-83-120.w92-154.abo.wanadoo.fr. [92.154.90.120]) by smtp.gmail.com with ESMTPSA id z17sm22268820wrv.2.2018.12.26.05.25.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Dec 2018 05:25:38 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Wed, 26 Dec 2018 14:25:29 +0100 Message-Id: <20181226132530.8445-3-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181226132530.8445-1-ard.biesheuvel@linaro.org> References: <20181226132530.8445-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Subject: [PATCH edk2-platforms 2/3] Silicon/SynQuacer/AcpiTables: expose second UART to the OS X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Dec 2018 13:25:42 -0000 Content-Transfer-Encoding: 8bit Align the DSDT with the device tree, which already exposes the second UART to the OS. Since existing OSes will not support the SCX0006 HID (which has only been allocated very recently), expose the DesignWare FUART with a compatible ID (CID) of 'HISI0031', which is associated with the same driver in Linux since at least release v4.9. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- Silicon/Socionext/SynQuacer/Include/Platform/MemoryMap.h | 4 ++++ Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/Silicon/Socionext/SynQuacer/Include/Platform/MemoryMap.h b/Silicon/Socionext/SynQuacer/Include/Platform/MemoryMap.h index 28d4afabd2c8..b0fcc306c1ae 100644 --- a/Silicon/Socionext/SynQuacer/Include/Platform/MemoryMap.h +++ b/Silicon/Socionext/SynQuacer/Include/Platform/MemoryMap.h @@ -76,4 +76,8 @@ #define SYNQUACER_UART0_BASE 0x2A400000 #define SYNQUACER_UART0_SIZE SIZE_4KB +// DesignWare FUART +#define SYNQUACER_UART1_BASE 0x51040000 +#define SYNQUACER_UART1_SIZE SIZE_4KB + #endif diff --git a/Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl b/Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl index ddb456d1dc70..aab4fbf0e6b4 100644 --- a/Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl +++ b/Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl @@ -142,6 +142,25 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "SNI", "SYNQUACR", }) } + // DesignWare FUART + Device (COM1) { + Name (_HID, "SCX0006") + Name (_CID, "HISI0031") + Name (_UID, Zero) + Name (_CRS, ResourceTemplate () { + Memory32Fixed (ReadWrite, SYNQUACER_UART1_BASE, SYNQUACER_UART1_SIZE) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 200 } + }) + Name (_DSD, Package () { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package () { "clock-frequency", 62500000 }, + Package () { "reg-io-width", 4 }, + Package () { "reg-shift", 2 }, + } + }) + } + Device (NET0) { Name (_HID, "SCX0001") Name (_UID, Zero) -- 2.19.2