From patchwork Fri Nov 18 15:50:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 22387 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp278650wrr; Fri, 18 Nov 2022 08:07:22 -0800 (PST) X-Google-Smtp-Source: AA0mqf5Zx9gHffMzATe3p6aPAcD93khvHvxrCq/aVTJijV66Iig1TpzfveZo4HbUaR0S1voJYtMp X-Received: by 2002:a17:902:7204:b0:188:e773:1347 with SMTP id ba4-20020a170902720400b00188e7731347mr92568plb.111.1668787642220; Fri, 18 Nov 2022 08:07:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668787642; cv=none; d=google.com; s=arc-20160816; b=b0KgVy2Hl01X7F3v7cyGh705+09xS+WpOUd2cma63+DuKiEdypgVDfk2GUuw1iIkM4 xJWok0pdoVbXksHqSRwtXftU0HVU59scGHdSXjJ0L/dpE1PT4uO/LspJhAW9ynd9m/O6 vaHOpp8sylfQNHtZk6qQB1o/32Sm8yEnFnIcGgPlSdxrDbW6TNIhbtiEHTaLmgJrZbT/ zuPOcx93a0jprjx6BnBbu+CrtzqP841h2mUCxeXMy7mfAQPKK/D9BNNltZq99/rjA8Gy lrScJ75SYkMqxaCNYqHQXapLGFeJgsU4kNkcJApf524kGTUIYKbRA6Z3RerGF0KckCgV YRFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=qZLQieUidZlNqVrKwu39po09Jc+DVA7oSfqP+BkaPT0=; b=gvXbmqfDXsiu78jGCh4sDwRuUFaLAmLmzONbvTmaY5XWX6dosNiiFQj6qQ+YUdSUxZ fuCi2L2GGdWAUmRYblJuBfGfjMkSZ07Rf3AbXH7tESd5jSdNSTe9QNMneFAjCgO1Eqdk 6Y0gYYc0B89vz7LT/EARV4DPpU2m/7GgnSXliAZqN5JJmqnNeC6+dwzjJb39w0iq2Mel kbQ6xzIYRJaacPmGPGQrA34/gRJFTuKjoE7dbk26Tpmhjg3s1a8cAGRLP6kxWCsetPGt mqBSOSUOoS9O9ByIdNDXa8bM4U6TD6pdc/LNVaIRONx6V+p7qu5RFY7N7z5orIi5ZLmq B6dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XqNd0uAy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i16-20020a635850000000b00476f91a316asi4257922pgm.513.2022.11.18.08.06.43; Fri, 18 Nov 2022 08:07:22 -0800 (PST) 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; dkim=pass header.i=@linaro.org header.s=google header.b=XqNd0uAy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242225AbiKRPuZ (ORCPT + 99 others); Fri, 18 Nov 2022 10:50:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242297AbiKRPuP (ORCPT ); Fri, 18 Nov 2022 10:50:15 -0500 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 966738B124 for ; Fri, 18 Nov 2022 07:50:09 -0800 (PST) Received: by mail-wm1-x32e.google.com with SMTP id i186-20020a1c3bc3000000b003cfe29a5733so7815078wma.3 for ; Fri, 18 Nov 2022 07:50:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=qZLQieUidZlNqVrKwu39po09Jc+DVA7oSfqP+BkaPT0=; b=XqNd0uAyJhWFtotx7vjCSEtvyrwCBbOy730MU2iqH9Bb6DXPmJEGFeKr4QtZDd7Tjy 7IejBtA0HLuYABlkkjh2YvpHHI+g4jgWFpeisHhAFvP4jeomO1tNgCvNn433rh9zJiBi Fsoc1TOdRPVBBwRGj6Os62dOucnSbPdirCII9CdDD4kwp6Dlzck+KwQiXqPnZMIWJX4V 96psaJA9hMsp1STUmWWHdfwi6SPcY5+T3t10yf7W+5dx9+UDHw0z4PkLIqGbueZbDDyo U2b3pzo25Kyup8PT1V9FKlQAQHrKHRzwH8CgHOtBdTKEpN3xPCAb1ckxA8uf4UXmMV71 eZxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qZLQieUidZlNqVrKwu39po09Jc+DVA7oSfqP+BkaPT0=; b=oI7BEu+UVNrFAbwtU61PbeBX+6xLA5en/SIu5YLfJcndo8fjm0HbKWzN1p0FmzzaUM 5k5ca2naBrVy495cWJTQE3H32WZeqQVZx4L7oYvYIO46/t1rZOa0AdXC5XWXrdd8GmC8 cqwp721iAI8HVpGWTrXRKCru6ddLQ3rSSqxRbBw0k87x6XKdSlXkIngxd4ch7jY5c3WL ewhNCngD6QBIpwxhgcjAgns3HST5sym0XfRcsl3kq+ZPjGfcW3Zxk93rcNUDg+TRxgYY CBZI+/WBRWISKGRJoU3RDaOLif68Ay90KN1nFpPOU7iebXK0ygzdtWegCDkQYSOQOIhG CAqA== X-Gm-Message-State: ANoB5pl0fB3fdi3wEYHDXAzBE36siNoKulxUobB0RW1MS0XQ6ymRtzr4 L8SRYWmyBOyUMMwBCZbas2fGQw== X-Received: by 2002:a1c:f401:0:b0:3c7:84d:72d with SMTP id z1-20020a1cf401000000b003c7084d072dmr8854319wma.181.1668786607821; Fri, 18 Nov 2022 07:50:07 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id a13-20020a5d53cd000000b002383edcde09sm3812465wrw.59.2022.11.18.07.50.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Nov 2022 07:50:07 -0800 (PST) From: Neil Armstrong Date: Fri, 18 Nov 2022 16:50:05 +0100 Subject: [PATCH v2 1/2] dt-bindings: amlogic: document Odroid Go Ultra compatible MIME-Version: 1.0 Message-Id: <20221031-b4-odroid-go-ultra-initial-v2-1-a3df1e09b0af@linaro.org> References: <20221031-b4-odroid-go-ultra-initial-v2-0-a3df1e09b0af@linaro.org> In-Reply-To: <20221031-b4-odroid-go-ultra-initial-v2-0-a3df1e09b0af@linaro.org> To: Jerome Brunet , Rob Herring , Krzysztof Kozlowski , Kevin Hilman , Sebastian Reichel , Martin Blumenstingl Cc: linux-pm@vger.kernel.org, Rob Herring , linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Neil Armstrong , linux-kernel@vger.kernel.org X-Mailer: b4 0.10.1 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham 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?1749850670383159536?= X-GMAIL-MSGID: =?utf-8?q?1749850670383159536?= This documents the Odroid Go Ultra, a portable gaming device, with the following characteristics: - Amlogic S922X SoC - RK817 & RK818 PMICs - 2GiB LPDDR4 - On board 16GiB eMMC - Micro SD Card slot - 5inch 854×480 MIPI-DSI TFT LCD - Earphone stereo jack, 0.5Watt 8Ω Mono speaker - Li-Polymer 3.7V/4000mAh Battery - USB-A 2.0 Host Connector - x16 GPIO Input Buttons - 2x ADC Analog Joysticks - USB-C Port for USB2 Device and Charging Signed-off-by: Neil Armstrong Acked-by: Rob Herring --- Documentation/devicetree/bindings/arm/amlogic.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml index 9fda2436c618..e16b5fa55847 100644 --- a/Documentation/devicetree/bindings/arm/amlogic.yaml +++ b/Documentation/devicetree/bindings/arm/amlogic.yaml @@ -163,6 +163,7 @@ properties: - azw,gsking-x - azw,gtking - azw,gtking-pro + - hardkernel,odroid-go-ultra - hardkernel,odroid-n2 - hardkernel,odroid-n2-plus - khadas,vim3 From patchwork Fri Nov 18 15:50:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 22386 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp277340wrr; Fri, 18 Nov 2022 08:05:26 -0800 (PST) X-Google-Smtp-Source: AA0mqf6Ko0OgLrzEJ4bQscE5qxubfTSB2LeRuOUFztzQLkcrEg7S9ZS4MI5Nym+glFMpJy4RQQTQ X-Received: by 2002:aa7:8b4d:0:b0:56c:411f:b699 with SMTP id i13-20020aa78b4d000000b0056c411fb699mr8439856pfd.48.1668787525669; Fri, 18 Nov 2022 08:05:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668787525; cv=none; d=google.com; s=arc-20160816; b=Iul66bFNSOmyQgHbYeoOk5aY4cLlHUx0FrnFEoxitkraphfWk22Xt/1bcKq4C37QPL SxCP6PjdcMZ5XnCrElLwiiVRXAfQ63H0oUulzovuKSHLWwR6xBwh3JsNwK0pkZ4ZPMh/ YupHALAdTqKgzXMLjXAnXGGIvBeg9pSlR4VDV1Y/ITE5xdjVuFWF9VvtcRWRXJaiMPOl CcH6cguTIJfPtb8ONjEWrk0MtFL4jfNnE4muHRYh/kiryweAs6JeHAzBSFbgQM/r9q22 /Atzrf1QH2McZ0ggAVnk9qA+U+BmDo75KZla1QSpEOjz9z5Ex9/DlE6824jDRJxcIheU Y0KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=hFycxYZ41zzcSWXUMUqzeyTTOR1oiuIa3bzxOOEAhro=; b=KpOKv34j5glstPZxMeLn2AIj+1qRLILFmsrh51KwZOG2qmCzcsyXwneUPxTU0eotAE C8k3S+fNlRHL1sPNtndgmN06kVD/k3uUKQNO37/6WYmPL5VdjHKr82TbXnfnfXI/IwYR zz7HduF9nx8qtsGZJ22EGBbXkO+xt87FIHi/K0L26nrOzwTPsj/7P7E2C6WTB13A25dn kxjLTpi4Q6fA6eu5eksePQlpDRRQ1s+ccPJvhySBYqfw4OrdedNxhVkHutml7taVxNtc voy/ksVdT1vq7iww3xzJOxcmd5llG0JrwV0JpMgiSbUuL8i46gMoRG6N4/pm2jQ/K5CP xRHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eVzNuSgR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o17-20020a170902d4d100b00188e9ec511dsi4702282plg.397.2022.11.18.08.04.56; Fri, 18 Nov 2022 08:05:25 -0800 (PST) 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; dkim=pass header.i=@linaro.org header.s=google header.b=eVzNuSgR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242308AbiKRPu3 (ORCPT + 99 others); Fri, 18 Nov 2022 10:50:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242371AbiKRPuQ (ORCPT ); Fri, 18 Nov 2022 10:50:16 -0500 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96A7F8C49F for ; Fri, 18 Nov 2022 07:50:10 -0800 (PST) Received: by mail-wr1-x42f.google.com with SMTP id k8so9929860wrh.1 for ; Fri, 18 Nov 2022 07:50:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=hFycxYZ41zzcSWXUMUqzeyTTOR1oiuIa3bzxOOEAhro=; b=eVzNuSgRg514rS+txbNGXcGwWVbdC6ROZJ4JT/ejN3xvH620v4olmru+a+m2smMhMC 6bUy/1u8YF74HtkpMJFubA7a+sHAz3styxufs9V3MeKcgsZ2k0750azpEI6Z44hbFbqq H1HFGE9mUGXkUHCx/B2at4/lSM24MM4hBwYrG/sZ9Yqgq2iSmTrmEywA/fEQ43J7J4RV F3qzVyOEOzl++M3ilrQJ0dc/jtDamdHEznJCShuboszs1CLbGJ74oS2c/k1M7W+2ds03 X0Q2XziZsTKOhDtkyVtOe4NkIQEj/ok9iRl1G4KixT8QycXO+mTKvGj/zRFFfnd+nozO oTOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hFycxYZ41zzcSWXUMUqzeyTTOR1oiuIa3bzxOOEAhro=; b=3RAwu7NjgQYLqm5Y/H0Z2arWdfTCEquSzDXh36YDHTAD3lp7g3ADr+AzYVVq3FASdM tA+O8Q+2kwECu3Gc2tMsmdwYP9Dl/s7UEyu9ZKSqJXHCKWM2Ggb++0+djvyhfdAs0zJO 2UrUZQmp4cVw87VknDsu3CVMYybazP7ijQO9KEFqL41889iagGFirfXUerJeJPVdr2Pv UQAzcCXcLfxg6Ck+646SP++9acO8ANbF71o3eRbgeFjld3OGatTt+nCkrKFgezZj3qRc WstbvAlMz4+4kt2/yTTsIuEWCrLhMzeXK4GgsvWId64QSWfgoNO91gvaoP6aiKQSFHPd HTPw== X-Gm-Message-State: ANoB5pkFtuPMDu+7uk6qPyynxmazY+TVPenVltD2GzKqookgQBWKaqHO xAv7GAhoiFXEIdtirteCg7dnpg== X-Received: by 2002:a5d:56d2:0:b0:236:cdf8:1e3f with SMTP id m18-20020a5d56d2000000b00236cdf81e3fmr4515770wrw.80.1668786608720; Fri, 18 Nov 2022 07:50:08 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id a13-20020a5d53cd000000b002383edcde09sm3812465wrw.59.2022.11.18.07.50.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Nov 2022 07:50:08 -0800 (PST) From: Neil Armstrong Date: Fri, 18 Nov 2022 16:50:06 +0100 Subject: [PATCH v2 2/2] arm64: dts: amlogic: add initial Odroid Go Ultra DTS MIME-Version: 1.0 Message-Id: <20221031-b4-odroid-go-ultra-initial-v2-2-a3df1e09b0af@linaro.org> References: <20221031-b4-odroid-go-ultra-initial-v2-0-a3df1e09b0af@linaro.org> In-Reply-To: <20221031-b4-odroid-go-ultra-initial-v2-0-a3df1e09b0af@linaro.org> To: Jerome Brunet , Rob Herring , Krzysztof Kozlowski , Kevin Hilman , Sebastian Reichel , Martin Blumenstingl Cc: linux-pm@vger.kernel.org, Rob Herring , linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Neil Armstrong , linux-kernel@vger.kernel.org X-Mailer: b4 0.10.1 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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?1749850548893448159?= X-GMAIL-MSGID: =?utf-8?q?1749850548893448159?= This adds initial support for the Hardkernel Odroid Go Ultra. The Odroid Go Ultra is a portable gaming device with the following characteristics: - Amlogic S922X SoC - RK817 & RK818 PMICs - 2GiB LPDDR4 - On board 16GiB eMMC - Micro SD Card slot - 5inch 854×480 MIPI-DSI TFT LCD - Earphone stereo jack, 0.5Watt 8Ω Mono speaker - Li-Polymer 3.7V/4000mAh Battery - USB-A 2.0 Host Connector - x16 GPIO Input Buttons - 2x ADC Analog Joysticks - USB-C Port for USB2 Device and Charging The following are not yet handled: - Battery RK818 Gauge and Charging - Earphone stereo jack detect - 5inch 854×480 MIPI-DSI TFT LCD Signed-off-by: Neil Armstrong --- arch/arm64/boot/dts/amlogic/Makefile | 1 + .../dts/amlogic/meson-g12b-odroid-go-ultra.dts | 722 +++++++++++++++++++++ 2 files changed, 723 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile index e213aeebb774..97b42e2100e0 100644 --- a/arch/arm64/boot/dts/amlogic/Makefile +++ b/arch/arm64/boot/dts/amlogic/Makefile @@ -12,6 +12,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gsking-x.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking-pro.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking.dtb +dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-go-ultra.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2-plus.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts new file mode 100644 index 000000000000..1e40709610c5 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts @@ -0,0 +1,722 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2022 Neil Armstrong + */ + +/dts-v1/; + +#include "meson-g12b-s922x.dtsi" +#include +#include +#include +#include +#include + +/ { + compatible = "hardkernel,odroid-go-ultra", "amlogic,s922x", "amlogic,g12b"; + model = "Hardkernel ODROID-GO-Ultra"; + + aliases { + serial0 = &uart_AO; + rtc0 = &vrtc; + }; + + adc-joystick-left { + compatible = "adc-joystick"; + io-channels = <&saradc 2>, <&saradc 3>; + poll-interval = <10>; + #address-cells = <1>; + #size-cells = <0>; + + axis@0 { + reg = <0>; + linux,code = ; + abs-range = <3150 950>; + abs-fuzz = <32>; + abs-flat = <64>; + }; + axis@1 { + reg = <1>; + linux,code = ; + abs-range = <700 2900>; + abs-fuzz = <32>; + abs-flat = <64>; + }; + }; + + adc-joystick-right { + compatible = "adc-joystick"; + io-channels = <&saradc 0>, <&saradc 1>; + poll-interval = <10>; + #address-cells = <1>; + #size-cells = <0>; + + axis@0 { + reg = <0>; + linux,code = ; + abs-range = <3150 950>; + abs-fuzz = <32>; + abs-flat = <64>; + }; + axis@1 { + reg = <1>; + linux,code = ; + abs-range = <800 3000>; + abs-fuzz = <32>; + abs-flat = <64>; + }; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + codec_clk: codec-clk { + compatible = "fixed-clock"; + clock-frequency = <12288000>; + clock-output-names = "codec_clk"; + #clock-cells = <0>; + }; + + gpio-keys { + compatible = "gpio-keys-polled"; + poll-interval = <10>; + pinctrl-0 = <&keypad_gpio_pins>; + pinctrl-names = "default"; + + volume-up-button { + label = "VOLUME-UP"; + linux,code = ; + gpios = <&gpio GPIOX_8 GPIO_ACTIVE_LOW>; + }; + volume-down-button { + label = "VOLUME-DOWN"; + linux,code = ; + gpios = <&gpio GPIOX_9 GPIO_ACTIVE_LOW>; + }; + dpad-up-button { + label = "DPAD-UP"; + linux,code = ; + gpios = <&gpio GPIOX_0 GPIO_ACTIVE_LOW>; + }; + dpad-down-button { + label = "DPAD-DOWN"; + linux,code = ; + gpios = <&gpio GPIOX_1 GPIO_ACTIVE_LOW>; + }; + dpad-left-button { + label = "DPAD-LEFT"; + linux,code = ; + gpios = <&gpio GPIOX_2 GPIO_ACTIVE_LOW>; + }; + dpad-right-button { + label = "DPAD-RIGHT"; + linux,code = ; + gpios = <&gpio GPIOX_3 GPIO_ACTIVE_LOW>; + }; + a-button { + label = "A"; + linux,code = ; + gpios = <&gpio GPIOX_4 GPIO_ACTIVE_LOW>; + }; + b-button { + label = "B"; + linux,code = ; + gpios = <&gpio GPIOX_5 GPIO_ACTIVE_LOW>; + }; + y-button { + label = "Y"; + linux,code = ; + gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>; + }; + x-button { + label = "X"; + linux,code = ; + gpios = <&gpio GPIOX_7 GPIO_ACTIVE_LOW>; + }; + f1-button { + label = "F1"; + linux,code = ; + gpios = <&gpio GPIOX_17 GPIO_ACTIVE_LOW>; + }; + f2-button { + label = "F2"; + linux,code = ; + gpios = <&gpio GPIOX_10 GPIO_ACTIVE_LOW>; + }; + f3-button { + label = "F3"; + linux,code = ; + gpios = <&gpio GPIOX_11 GPIO_ACTIVE_LOW>; + }; + f4-button { + label = "F4"; + linux,code = ; + gpios = <&gpio GPIOX_12 GPIO_ACTIVE_LOW>; + }; + f5-button { + label = "F5"; + linux,code = ; + gpios = <&gpio GPIOX_13 GPIO_ACTIVE_LOW>; + }; + f6-button { + label = "F6"; + linux,code = ; + gpios = <&gpio GPIOX_16 GPIO_ACTIVE_LOW>; + }; + top-left-button { + label = "TOP Left"; + linux,code = ; + gpios = <&gpio GPIOX_14 GPIO_ACTIVE_LOW>; + }; + top-left2-button { + label = "TOP Left 2"; + linux,code = ; + gpios = <&gpio GPIOX_19 GPIO_ACTIVE_LOW>; + }; + top-right-button { + label = "TOP Right"; + linux,code = ; + gpios = <&gpio GPIOX_15 GPIO_ACTIVE_LOW>; + }; + top-right2-button { + label = "TOP Right 2"; + linux,code = ; + gpios = <&gpio GPIOX_18 GPIO_ACTIVE_LOW>; + }; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x0 0x0 0x40000000>; + }; + + emmc_pwrseq: emmc-pwrseq { + compatible = "mmc-pwrseq-emmc"; + reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>; + }; + + leds { + compatible = "gpio-leds"; + + led-blue { + color = ; + gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "heartbeat"; + }; + }; + + vdd_sys: regulator-vdd-sys { + compatible = "regulator-fixed"; + regulator-name = "VDD_SYS"; + regulator-min-microvolt = <3800000>; + regulator-max-microvolt = <3800000>; + regulator-always-on; + }; + + sound { + compatible = "amlogic,axg-sound-card"; + model = "Odroid GO Ultra"; + audio-widgets = "Microphone", "Mic Jack", + "Headphone", "Headphones", + "Speaker", "Internal Speakers"; + audio-aux-devs = <&tdmout_b>, <&tdmin_b>, <&speaker_amp>; + audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", + "TDM_B Playback", "TDMOUT_B OUT", + "TDMIN_B IN 1", "TDM_B Capture", + "TDMIN_B IN 4", "TDM_B Loopback", + "TODDR_A IN 1", "TDMIN_B OUT", + "MICL", "Mic Jack", + "Headphones", "HPOL", + "Headphones", "HPOR", + "Speaker Amplifier INL", "HPOL", + "Speaker Amplifier INR", "HPOR", + "Internal Speakers", "Speaker Amplifier OUTL", + "Internal Speakers", "Speaker Amplifier OUTR"; + + assigned-clocks = <&clkc CLKID_MPLL2>, + <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>; + assigned-clock-parents = <0>, <0>, <0>; + assigned-clock-rates = <294912000>, + <270950400>, + <393216000>; + + dai-link-0 { + sound-dai = <&frddr_a>; + }; + + dai-link-1 { + sound-dai = <&toddr_a>; + }; + + dai-link-2 { + sound-dai = <&tdmif_b>; + dai-format = "i2s"; + dai-tdm-slot-tx-mask-0 = <1 1>; + mclk-fs = <256>; + + codec-0 { + sound-dai = <&rk817>; + }; + }; + }; + + speaker_amp: speaker-amplifier { + compatible = "simple-audio-amplifier"; + sound-name-prefix = "Speaker Amplifier"; + VCC-supply = <&hp_5v>; + }; +}; + +&arb { + status = "okay"; +}; + +&cpu0 { + cpu-supply = <&vddcpu_b>; + operating-points-v2 = <&cpu_opp_table_0>; + clocks = <&clkc CLKID_CPU_CLK>; + clock-latency = <50000>; +}; + +&cpu1 { + cpu-supply = <&vddcpu_b>; + operating-points-v2 = <&cpu_opp_table_0>; + clocks = <&clkc CLKID_CPU_CLK>; + clock-latency = <50000>; +}; + +&cpu100 { + cpu-supply = <&vddcpu_a>; + operating-points-v2 = <&cpub_opp_table_1>; + clocks = <&clkc CLKID_CPUB_CLK>; + clock-latency = <50000>; +}; + +&cpu101 { + cpu-supply = <&vddcpu_a>; + operating-points-v2 = <&cpub_opp_table_1>; + clocks = <&clkc CLKID_CPUB_CLK>; + clock-latency = <50000>; +}; + +&cpu102 { + cpu-supply = <&vddcpu_a>; + operating-points-v2 = <&cpub_opp_table_1>; + clocks = <&clkc CLKID_CPUB_CLK>; + clock-latency = <50000>; +}; + +&cpu103 { + cpu-supply = <&vddcpu_a>; + operating-points-v2 = <&cpub_opp_table_1>; + clocks = <&clkc CLKID_CPUB_CLK>; + clock-latency = <50000>; +}; + +/* RK817 only supports 12.5mV steps, round up the values */ +&cpu_opp_table_0 { + opp-1000000000 { + opp-microvolt = <737500>; + }; + opp-1200000000 { + opp-microvolt = <737500>; + }; + opp-1398000000 { + opp-microvolt = <762500>; + }; + opp-1512000000 { + opp-microvolt = <800000>; + }; + opp-1608000000 { + opp-microvolt = <837500>; + }; + opp-1704000000 { + opp-microvolt = <862500>; + }; + opp-1896000000 { + opp-microvolt = <987500>; + }; + opp-1992000000 { + opp-microvolt = <1012500>; + }; +}; + +/* RK818 only supports 12.5mV steps, round up the values */ +&cpub_opp_table_1 { + opp-1000000000 { + opp-microvolt = <775000>; + }; + opp-1200000000 { + opp-microvolt = <775000>; + }; + opp-1398000000 { + opp-microvolt = <800000>; + }; + opp-1512000000 { + opp-microvolt = <825000>; + }; + opp-1608000000 { + opp-microvolt = <862500>; + }; + opp-1704000000 { + opp-microvolt = <900000>; + }; + opp-1800000000 { + opp-microvolt = <987500>; + }; + opp-1908000000 { + opp-microvolt = <1025000>; + }; +}; + +&i2c_AO { + status = "okay"; + pinctrl-0 = <&i2c_ao_sck_pins>, <&i2c_ao_sda_pins>; + pinctrl-names = "default"; + + rk818: pmic@1c { + compatible = "rockchip,rk818"; + reg = <0x1c>; + interrupt-parent = <&gpio_intc>; + interrupts = <7 IRQ_TYPE_LEVEL_LOW>; /* GPIOAO_7 */ + + vcc1-supply = <&vdd_sys>; + vcc2-supply = <&vdd_sys>; + vcc3-supply = <&vdd_sys>; + vcc4-supply = <&vdd_sys>; + vcc6-supply = <&vdd_sys>; + vcc7-supply = <&vcc_2v3>; + vcc8-supply = <&vcc_2v3>; + vcc9-supply = <&vddao_3v3>; + boost-supply = <&vdd_sys>; + switch-supply = <&vdd_sys>; + + regulators { + vddcpu_a: DCDC_REG1 { + regulator-name = "vddcpu_a"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <775000>; + regulator-max-microvolt = <1025000>; + regulator-ramp-delay = <6001>; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <775000>; + }; + }; + + vdd_ee: DCDC_REG2 { + regulator-name = "vdd_ee"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <875000>; + regulator-max-microvolt = <1250000>; + regulator-ramp-delay = <6001>; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <875000>; + }; + }; + + vddq_1v1: DCDC_REG3 { + regulator-name = "vddq_1v1"; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + vddao_3v3: DCDC_REG4 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vddao_3v3"; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3300000>; + }; + }; + + hp_5v: DCDC_BOOST { + regulator-always-on; + regulator-boot-on; + regulator-name = "hp_5v"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vddio_ao1v8: LDO_REG5 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vddio_ao1v8"; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vddq_1v8: LDO_REG7 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vddq_1v8"; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vddio_c: LDO_REG9 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vddio_c"; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3300000>; + }; + }; + + vcc_sd: SWITCH_REG { + regulator-name = "vcc_sd"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + OTG_SWITCH { + regulator-name = "otg_switch"; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + }; + }; +}; + +&i2c3 { + status = "okay"; + pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>; + pinctrl-names = "default"; + + rk817: pmic@20 { + compatible = "rockchip,rk817"; + reg = <0x20>; + interrupt-parent = <&gpio_intc>; + + interrupts = <5 IRQ_TYPE_LEVEL_LOW>; /* GPIOAO_5 */ + + vcc1-supply = <&vdd_sys>; + vcc2-supply = <&vdd_sys>; + vcc3-supply = <&vdd_sys>; + vcc4-supply = <&vdd_sys>; + vcc5-supply = <&vdd_sys>; + vcc6-supply = <&vdd_sys>; + vcc7-supply = <&vdd_sys>; + vcc8-supply = <&vdd_sys>; + vcc9-supply = <&rk817_boost>; + + #sound-dai-cells = <0>; + clocks = <&codec_clk>; + clock-names = "mclk"; + + #clock-cells = <1>; + + regulators { + vddcpu_b: DCDC_REG2 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <737500>; + regulator-max-microvolt = <1012500>; + regulator-ramp-delay = <6001>; + regulator-initial-mode = <0x2>; + regulator-name = "vddcpu_b"; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1000000>; + }; + }; + + vcc_2v3: DCDC_REG3 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <2300000>; + regulator-max-microvolt = <2400000>; + regulator-initial-mode = <0x2>; + regulator-name = "vcc_2v3"; + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + LDO_REG4 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vdd_codec"; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc_lcd: LDO_REG8 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc_lcd"; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + rk817_boost: BOOST { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5400000>; + regulator-name = "rk817_boost"; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + usb_host: OTG_SWITCH { + regulator-name = "usb_host"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + }; + }; +}; + +&clkc_audio { + status = "okay"; +}; + +ð_phy { + status = "disabled"; +}; + +&frddr_a { + status = "okay"; +}; + +&periphs_pinctrl { + keypad_gpio_pins: keypad-gpio { + mux { + groups = "GPIOX_0", "GPIOX_1", "GPIOX_2", "GPIOX_3", + "GPIOX_4", "GPIOX_5", "GPIOX_6", "GPIOX_7", + "GPIOX_8", "GPIOX_9", "GPIOX_10", "GPIOX_11", + "GPIOX_12", "GPIOX_13", "GPIOX_14", "GPIOX_15", + "GPIOX_16", "GPIOX_17", "GPIOX_18", "GPIOX_19"; + function = "gpio_periphs"; + bias-pull-up; + output-disable; + }; + }; +}; + +&saradc { + status = "okay"; + vref-supply = <&vddio_ao1v8>; +}; + +/* SD card */ +&sd_emmc_b { + status = "okay"; + pinctrl-0 = <&sdcard_c_pins>; + pinctrl-1 = <&sdcard_clk_gate_c_pins>; + pinctrl-names = "default", "clk-gate"; + + bus-width = <4>; + cap-sd-highspeed; + max-frequency = <50000000>; + disable-wp; + + cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>; + vmmc-supply = <&vcc_sd>; + vqmmc-supply = <&vddio_c>; + +}; + +/* eMMC */ +&sd_emmc_c { + status = "okay"; + pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>; + pinctrl-1 = <&emmc_clk_gate_pins>; + pinctrl-names = "default", "clk-gate"; + + bus-width = <8>; + cap-mmc-highspeed; + mmc-ddr-1_8v; + mmc-hs200-1_8v; + max-frequency = <200000000>; + disable-wp; + + mmc-pwrseq = <&emmc_pwrseq>; + vmmc-supply = <&vcc_sd>; + vqmmc-supply = <&vddio_ao1v8>; +}; + + +&tdmif_b { + pinctrl-0 = <&tdm_b_dout0_pins>, <&tdm_b_fs_pins>, <&tdm_b_sclk_pins>, <&tdm_b_din1_pins>; + pinctrl-names = "default"; + status = "okay"; + + assigned-clocks = <&clkc_audio AUD_CLKID_TDM_SCLK_PAD1>, + <&clkc_audio AUD_CLKID_TDM_LRCLK_PAD1>; + assigned-clock-parents = <&clkc_audio AUD_CLKID_MST_B_SCLK>, + <&clkc_audio AUD_CLKID_MST_B_LRCLK>; + assigned-clock-rates = <0>, <0>; +}; + +&tdmin_b { + status = "okay"; +}; + +&tdmout_b { + status = "okay"; +}; + +&toddr_a { + status = "okay"; +}; + +&uart_AO { + status = "okay"; + pinctrl-0 = <&uart_ao_a_pins>; + pinctrl-names = "default"; +}; + +&usb { + status = "okay"; + dr_mode = "peripheral"; +}; + +&usb2_phy0 { + status = "okay"; +}; + +&usb2_phy1 { + status = "okay"; + phy-supply = <&usb_host>; +};