From patchwork Sat Nov 12 14:18:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maya Matuszczyk X-Patchwork-Id: 19182 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1292755wru; Sat, 12 Nov 2022 06:25:33 -0800 (PST) X-Google-Smtp-Source: AA0mqf6eSAKWh++kYNukA5RwSSWoa2dkXsNhp5QZvtqRVDW8d+XQJAsycrRL0uMCYV4bk4aboFpE X-Received: by 2002:a62:f250:0:b0:560:8405:a052 with SMTP id y16-20020a62f250000000b005608405a052mr7346053pfl.1.1668263133378; Sat, 12 Nov 2022 06:25:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668263133; cv=none; d=google.com; s=arc-20160816; b=gruK4mA4+vNRCSO0ThlD/19tajzDu3WKRhKFxypF2gHe+d3Sr4C0lSPHDoUNuGJYLq Ak0NgKWyN0mjnmcRDjmX627UumuF2NPJESY8PIlXICSXgTiUb22+YkLKp+UZBxKmtmBe 7iCoMEgkoJIT3SsR/wm36rQ6o7EbyeF4DqHSjP5wIMEbJs/BM2H2w0LXEbOYZHon/iGk hBoZNR5Prc6S+bKw+VrJOl4Kn4EEvXR6AdSX8nMM+QyAHKwgYsd7HE+PiiBccXIuHM3J Ct0CpMPLS7rcs5JkesWxZeIgHcMhwpFUOZicY/piieTZahrFJQW4eviYMxtZ2gc3pyMC HCOg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=chpLDI1QSiEujTU6BUSwWuhdcchu9pHjD9dEecC+fDc=; b=po+6mkf4S9r54qQt1BOyt8S+k1y2TgYTfsgVajC6QBY32mxscDYdQMpDRailHTZjW4 5WH+0Sqs+t4vbqsfHM0+i5fAN3MLW0VNwPYWhmLQ6AhbRfjSGzvXk2hdxsHI3CgElE2F orImOAkZQJHe6qHSXvZtCtyx7hgUV9fb61VWaagUty7ZEY8HSOFYF/ul3BWuXu2+Qyba UjM0twO09zF19H/FxWhEZzCQPHrvYWJBHjER0xUoMV7oMzFLpG/AKWo2nqlHjEv3BH4x n/OK5Bv9SDX0XCgCgDlPPZwRTbZrFnex594WAi4k7RzBjSkTK1PrAHbXcU+D6hsJf3CL KnBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=F4idRvip; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eb9-20020a056a004c8900b0056157a60187si4580923pfb.203.2022.11.12.06.25.18; Sat, 12 Nov 2022 06:25:33 -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=@gmail.com header.s=20210112 header.b=F4idRvip; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234931AbiKLOTU (ORCPT + 99 others); Sat, 12 Nov 2022 09:19:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234859AbiKLOTJ (ORCPT ); Sat, 12 Nov 2022 09:19:09 -0500 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FAE918356; Sat, 12 Nov 2022 06:19:04 -0800 (PST) Received: by mail-ed1-x533.google.com with SMTP id z18so11254893edb.9; Sat, 12 Nov 2022 06:19:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=chpLDI1QSiEujTU6BUSwWuhdcchu9pHjD9dEecC+fDc=; b=F4idRvip/CsGgvKNct52IddLLdl6FStlqOnefHLOFHjHkM/5bBW3aari0FYlXTCtWs tP8HF6eiJhiDchCZFwgbKOGvz1/mdn0Oa1qrUy+1Utw2VinvpmPl3JQSnl5mIZUFceZh CPUF84q7dYfM9tKkXymnCfsUAcZ8jmjYBXekfRqlthdxE9DaIrTtel4hxD2J3lVX4YEI I/SGQHa69Zw9Bp3xXztlUjwfxgZZq1GEkdlBZxxr9BjSMToCexzCBmNp60BN4Ni9qX75 ftzCSPNAX92d8jy7quJTJUGqrlBUSAMqiW6DdxnMalsPb2qo6p4x+FP0bRG2Z6YTCaXK IblA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=chpLDI1QSiEujTU6BUSwWuhdcchu9pHjD9dEecC+fDc=; b=PSzBvD4NyjE/qNUp+3r5uDpxgrdCdeWXYahI49fqGXt/kJoBZaeTbg0a0Fu1ncpnOi tvha6zh8VarlV9WjKdLtXQZwyFppVgvp/rf3hiJzuEjftPcfuzmyOtGSj4rXSKUUc5d+ A3fmGKSz8A3gJj7EdRsUq7Puua41G+uktw42ERKmudbhwEDdCYzzmUItoqx07k5W9cXD 4u8bVAeU7I1dnOFeJbMeq6tFCO9i+Wp/25OvcW7fYMjwq5NkcoHHsLOJ63cYVlu6xMSS xD1wdDd6xcq+5DrGDuaD7WX69r+VrU/qPH6YsdWnI3uFexv4HMF4XxB6BfcR3hDoYXVv cKAg== X-Gm-Message-State: ANoB5pm1hp55aF4t8q9uQKnulYma8mwbM3owJD657rSxQm5iSVwaf/Co gpM0atHsiJ+PG8uIFymcGtg= X-Received: by 2002:a50:d657:0:b0:461:17e9:4ea3 with SMTP id c23-20020a50d657000000b0046117e94ea3mr5469024edj.49.1668262742746; Sat, 12 Nov 2022 06:19:02 -0800 (PST) Received: from localhost.localdomain (83.31.120.236.ipv4.supernova.orange.pl. [83.31.120.236]) by smtp.gmail.com with ESMTPSA id g21-20020a50ee15000000b004677b1b1a70sm1050148eds.61.2022.11.12.06.19.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Nov 2022 06:19:02 -0800 (PST) From: Maya Matuszczyk To: Rob Herring , Krzysztof Kozlowski , Heiko Stuebner Cc: =?utf-8?b?Sm/Do28gSCAuIFNwaWVz?= , Chris Morgan , Maya Matuszczyk , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/5] arm64: dts: rockchip: Add Odroid Go Advance Black Edition Date: Sat, 12 Nov 2022 15:18:39 +0100 Message-Id: <20221112141840.516224-4-maccraft123mc@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221112141840.516224-1-maccraft123mc@gmail.com> References: <20221112141840.516224-1-maccraft123mc@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, 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?1749300683148280516?= X-GMAIL-MSGID: =?utf-8?q?1749300683148280516?= This device is a minor revision of the origin Odroid Go Advance, with added two more buttons and a WiFi card Signed-off-by: Maya Matuszczyk --- arch/arm64/boot/dts/rockchip/Makefile | 1 + .../dts/rockchip/rk3326-odroid-go2-v11.dts | 156 ++++++++++++++++++ 2 files changed, 157 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile index 8c15593c0ca4..12446f531d29 100644 --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile @@ -8,6 +8,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-roc-cc.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-rock-pi-s.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3318-a95x-z2.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2-v11.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb diff --git a/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts new file mode 100644 index 000000000000..139c898e590e --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts @@ -0,0 +1,156 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 Hardkernel Co., Ltd + * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH + * Copyright (c) 2022 Maya Matuszczyk + */ + +/dts-v1/; +#include "rk3326-odroid-go.dtsi" + +/ { + model = "ODROID-GO Advance Black Edition"; + compatible = "hardkernel,rk3326-odroid-go2-v11", "rockchip,rk3326"; + + aliases { + mmc1 = &sdio; + }; + + analog_sticks: adc-joystick { + compatible = "adc-joystick"; + io-channels = <&saradc 1>, + <&saradc 2>; + poll-interval = <60>; + #address-cells = <1>; + #size-cells = <0>; + + axis@0 { + reg = <0>; + abs-flat = <10>; + abs-fuzz = <10>; + abs-range = <172 772>; + linux,code = ; + }; + + axis@1 { + reg = <1>; + abs-flat = <10>; + abs-fuzz = <10>; + abs-range = <278 815>; + linux,code = ; + }; + }; + + battery: battery { + compatible = "simple-battery"; + charge-full-design-microamp-hours = <3000000>; + charge-term-current-microamp = <300000>; + constant-charge-current-max-microamp = <2000000>; + constant-charge-voltage-max-microvolt = <4200000>; + factory-internal-resistance-micro-ohms = <180000>; + voltage-max-design-microvolt = <4100000>; + voltage-min-design-microvolt = <3500000>; + + ocv-capacity-celsius = <20>; + ocv-capacity-table-0 = <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>, + <3888450 80>, <3861850 75>, <3831540 70>, <3799130 65>, + <3768190 60>, <3745650 55>, <3726610 50>, <3711630 45>, + <3696720 40>, <3685660 35>, <3674950 30>, <3663050 25>, + <3649470 20>, <3635260 15>, <3616920 10>, <3592440 5>, + <3574170 0>; + }; + + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_pwrseq_pins>; + reset-gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>; + }; +}; + +&builtin_gamepad { + button-sw20 { + gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; + label = "TOP-LEFT 2"; + linux,code = ; + }; + button-sw21 { + gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>; + label = "TOP-RIGHT 2"; + linux,code = ; + }; +}; + +&internal_display { + compatible = "elida,kd35t133"; +}; + +&rk817 { + regulators { + vcc_wifi: LDO_REG9 { + regulator-name = "vcc_wifi"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3300000>; + }; + }; + }; +}; + +&rk817_charger { + monitored-battery = <&battery>; +}; + +&sdio { + bus-width = <4>; + cap-sd-highspeed; + cap-sdio-irq; + disable-wp; + keep-power-in-suspend; + mmc-pwrseq = <&wifi_pwrseq>; + non-removable; + vmmc-supply = <&vcc_wifi>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + esp8089: wifi@1 { + compatible = "esp,esp8089"; + reg = <1>; + }; +}; + +&pinctrl { + btns { + btn_pins: btn-pins { + rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + wifi { + wifi_pwrseq_pins: wifi-pwrseq-pins { + rockchip,pins = <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PB6 RK_FUNC_GPIO &pcfg_output_high>; + }; + }; +};