From patchwork Fri Feb 10 10:25:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 652336 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp870666wrr; Fri, 10 Feb 2023 02:25:23 -0800 (PST) X-Google-Smtp-Source: AK7set8H9DUL21+UNTrzHRifnuzrxBsEaHWB7I8tU2h6OI0SIYrlHZNskr0OWZ/uTDn633QXDmAV X-Received: by 2002:a05:6830:3357:b0:68d:5bc9:7ac2 with SMTP id l23-20020a056830335700b0068d5bc97ac2mr9055513ott.10.1676024722915; Fri, 10 Feb 2023 02:25:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676024722; cv=none; d=google.com; s=arc-20160816; b=yz+S2HEJmwV7kj+wmlhYCyp7sWjuN8KIFWICPe5ShXO92vmwGUGbd0PmpeG9nbSRaU 8UdoKBWVXu1Tbnb47ZaZ6Q3jCjQC6t97fbo3zVt5AeWhMXwCzCbgL+rYkWQFItTKIPtz YIW/NDACm/UoQ5kkWfHi4YeggsVvSe/GWScE9e2089Sxkc8WQP5rO+FXZm4HhrSTS0rb 00qkIXxAcNp+/2Ef3OHK0LHZozAx84+b1SRj7Id2B/VncaBo9squdL8i8Nmq1XjF3POP Fp1uD/aKkT5ILvK6dzwYioVfvQCMQ3lI0GgugvFJzrKPUj0LmtSxGPNsTdUAuSiN0vmm nIng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=NB2/33kgEn+HQCOrg0iRaMKV5CoxKJ9F2y8Ldb2Ffxc=; b=KhFJvAaOaQXUY7KYMokayDg71InASlFxwedT4U0sovDuOyH3QPJ7lsBq7JCqfzS/fX 5HemnvlfMDqgEgJkyF3NWEP45B45doXBtw/nxYLmcwXrXdSLBoc2G3dTJF1knECWG2FL hNx9IyVp/6aZp52XidZ2cM0SFMMvGs65r3yY6bQEKS4zsxPy+AW/LD1IQATwl73z5kEG oIWAiyDcjYxTZfHWF4EXm3xO3b2SZA0m2xTuRQDFHwFMrIBFx6NVTx+5LsLRUxvQOlPg GHDuitu86CVvSyOVA8rk518c6j0xFCjKPIersItVNSk6Pxw/v8FKJprReACysqa+dIv9 bJrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NAa2AuIv; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id t14-20020a9d66ce000000b0068be5223046si3900330otm.26.2023.02.10.02.25.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Feb 2023 02:25:22 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NAa2AuIv; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7201285F6D; Fri, 10 Feb 2023 11:25:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="NAa2AuIv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1FBDE85F6E; Fri, 10 Feb 2023 11:25:15 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 25AA1857A1 for ; Fri, 10 Feb 2023 11:25:09 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=neil.armstrong@linaro.org Received: by mail-wm1-x330.google.com with SMTP id j29-20020a05600c1c1d00b003dc52fed235so3709755wms.1 for ; Fri, 10 Feb 2023 02:25:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=NB2/33kgEn+HQCOrg0iRaMKV5CoxKJ9F2y8Ldb2Ffxc=; b=NAa2AuIvoUUGAXKFr30p6U7Vum+zBascm5Xvc8pm1xe1JlHxTFIYs5xgSy4ipAjOvV +5VByVLUrEspTdoIzoMfb9Njb14OHGnxSyNvNFgo3A2yUQKb2wjVlBHQcL+MPwGfAnPu FdyzemO8vHOswVUQs3Wu10oTJa2Bfm46cfvfDH1A8BeKceIwLmrJzMT9wWu/G8aUSaqb q0Rf1/4Vxk8fY1oDtcWj81/UQQXfiLtaJTwtfKW8Htwtbz0H9PBRIzFgOh6B1HiTwhnG FDnKTxRAaSj4DiZh5x7wAKFVqC1wfPD3x8b8LSc+vhR1djERkxy0e3Z95LLpu0jxsCHB Fh4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NB2/33kgEn+HQCOrg0iRaMKV5CoxKJ9F2y8Ldb2Ffxc=; b=SUYiS8uh73dQ1iQwpU8cCVXZN8ZSow7ppH7ScdivvR6RSc0VlEWVPD7PD4FtkoUzFi 4r2pWfMAkMsBdBMD0jqzp73lfmVQ9wagaJ+1makkvfvAD440Yre3D7ZQFfEMmelov5YF ZhA7TC/duWD7eJUuEACqyJf3ZIzbgkKNFwlo+kUvGO1qaAti02ABBk8Fz79QjMxrlC/K RoMi3xCbFIfHackPE6K4sB2Uj4fXXUsKnCASfoLA2b4JoipbXUX3mboT/qlcEt3pVSWR dh+nLAPE+KMop2be84nVVDF+8O5dgt7q5P7pXrKI+fTyciwGHU81yIR1CQA/819doTUJ InJg== X-Gm-Message-State: AO0yUKV211LlKlobWLGCwSqzHqT2LNXkapxD/5cCs+hu3+yiEHsgBRiT YPK3I3TM2NoxxcDKvfeBjBkkVw== X-Received: by 2002:a05:600c:2e89:b0:3e1:bfc:d16e with SMTP id p9-20020a05600c2e8900b003e10bfcd16emr9618893wmn.39.1676024708687; Fri, 10 Feb 2023 02:25:08 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id s12-20020a05600c45cc00b003dfe5190376sm4932521wmo.35.2023.02.10.02.25.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Feb 2023 02:25:08 -0800 (PST) From: Neil Armstrong Date: Fri, 10 Feb 2023 11:25:07 +0100 Subject: [PATCH] ARM: meson: odroid-go-ultra: setup PMIC regulators are board init MIME-Version: 1.0 Message-Id: <20230210-u-boot-odroid-go-ultra-pmics-setup-v1-1-1f16d62b76af@linaro.org> X-B4-Tracking: v=1; b=H4sIAIIb5mMC/x2NywrDIBAAfyV47oKx0NevlB7U3SYL1pVVQyHk3 ys9zhxmdlNJmap5TLtR2riy5AHzaTJx9XkhYBxsnHVn62YLHYJIA0EVRlgEemrqoXw4VqjUegF L1zt6dDekixmh4CtBUJ/jOlK5pzRkUXrz939+vo7jB1MhSAOJAAAA To: u-boot-amlogic@groups.io, u-boot@lists.denx.de Cc: Neil Armstrong X-Mailer: b4 0.12.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean The Odroid Go Ultra has 2 chained PMICs RK818 and RK818, and needs an adjustment on the BUCK and LDO values. Add the initial regulators values in -u-boot.dtsi & run the initial regulator setup in a new odroid-go-ultra board. Proper OTG and BOOST regulators are still missing to have USB-A host properly working. Signed-off-by: Neil Armstrong --- .../arm/dts/meson-g12b-odroid-go-ultra-u-boot.dtsi | 8 ++++++++ board/amlogic/odroid-go-ultra/MAINTAINERS | 7 +++++++ board/amlogic/odroid-go-ultra/Makefile | 5 +++++ board/amlogic/odroid-go-ultra/odroid-go-ultra.c | 22 ++++++++++++++++++++++ configs/odroid-go-ultra_defconfig | 4 ++-- 5 files changed, 44 insertions(+), 2 deletions(-) --- base-commit: d1f5dbe6645ad51e318dd322033fe6a08bce357b change-id: 20230210-u-boot-odroid-go-ultra-pmics-setup-0e79dad28de6 Best regards, diff --git a/arch/arm/dts/meson-g12b-odroid-go-ultra-u-boot.dtsi b/arch/arm/dts/meson-g12b-odroid-go-ultra-u-boot.dtsi index 00852f5e54..1c0f9765eb 100644 --- a/arch/arm/dts/meson-g12b-odroid-go-ultra-u-boot.dtsi +++ b/arch/arm/dts/meson-g12b-odroid-go-ultra-u-boot.dtsi @@ -14,3 +14,11 @@ &usb3_pcie_phy { /delete-property/ phy-supply; }; + +&vcc_2v3 { + regulator-init-microvolt = <2400000>; +}; + +&vdd_ee { + regulator-init-microvolt = <875000>; +}; diff --git a/board/amlogic/odroid-go-ultra/MAINTAINERS b/board/amlogic/odroid-go-ultra/MAINTAINERS new file mode 100644 index 0000000000..c22951b4e7 --- /dev/null +++ b/board/amlogic/odroid-go-ultra/MAINTAINERS @@ -0,0 +1,7 @@ +ODROID-GO-ULTRA +M: Neil Armstrong +S: Maintained +L: u-boot-amlogic@groups.io +F: board/amlogic/odroid-go-ultra +F: configs/odroid-go-ultra_defconfig +F: doc/board/amlogic/odroid-go-ultra.rst diff --git a/board/amlogic/odroid-go-ultra/Makefile b/board/amlogic/odroid-go-ultra/Makefile new file mode 100644 index 0000000000..8ebaa0c215 --- /dev/null +++ b/board/amlogic/odroid-go-ultra/Makefile @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# (C) Copyright 2023 Neil Armstrong + +obj-y := odroid-go-ultra.o diff --git a/board/amlogic/odroid-go-ultra/odroid-go-ultra.c b/board/amlogic/odroid-go-ultra/odroid-go-ultra.c new file mode 100644 index 0000000000..bbd23e20fc --- /dev/null +++ b/board/amlogic/odroid-go-ultra/odroid-go-ultra.c @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2023 Neil Armstrong + */ + +#include +#include +#include + +int mmc_get_env_dev(void) +{ + if (meson_get_boot_device() == BOOT_DEVICE_EMMC) + return 1; + return 0; +} + +int board_init(void) +{ + regulators_enable_boot_on(_DEBUG); + + return 0; +} diff --git a/configs/odroid-go-ultra_defconfig b/configs/odroid-go-ultra_defconfig index a4d349fba4..c71c82dd1d 100644 --- a/configs/odroid-go-ultra_defconfig +++ b/configs/odroid-go-ultra_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_SYS_BOARD="w400" +CONFIG_SYS_BOARD="odroid-go-ultra" CONFIG_ARCH_MESON=y CONFIG_TEXT_BASE=0x01000000 CONFIG_NR_DRAM_BANKS=1 @@ -17,7 +17,6 @@ CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x20000000 CONFIG_REMAKE_ELF=y CONFIG_OF_BOARD_SETUP=y # CONFIG_DISPLAY_CPUINFO is not set -CONFIG_MISC_INIT_R=y CONFIG_SYS_MAXARGS=32 # CONFIG_CMD_BDI is not set # CONFIG_CMD_IMI is not set @@ -27,6 +26,7 @@ CONFIG_CMD_MMC=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y # CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_PMIC=y CONFIG_CMD_REGULATOR=y CONFIG_OF_CONTROL=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y