From patchwork Sun Jul 4 17:58:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiaobo Tian X-Patchwork-Id: 1500460 X-Patchwork-Delegate: ykai007@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Am+v1YYU; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GHxQp3kGhz9sT6 for ; Mon, 5 Jul 2021 03:59:11 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6974A82B20; Sun, 4 Jul 2021 19:59:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com 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=gmail.com header.i=@gmail.com header.b="Am+v1YYU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9172882B4E; Sun, 4 Jul 2021 19:58:58 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) (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 CEF2F803B2 for ; Sun, 4 Jul 2021 19:58:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=peterwillcn@gmail.com Received: by mail-pf1-x42b.google.com with SMTP id y4so14487515pfi.9 for ; Sun, 04 Jul 2021 10:58:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xJDId7DUcYNT04q9pfqe75do/hlAms5Geup4zU9Cjr8=; b=Am+v1YYUWz0OJ5uKkVrF37vGJEqfO2AKZ6Icb0WJaDmp3ewh0rg0DImqzSNmWUjhuP M18bv3Xy2YZQq/b5/f1V5TjcZ1ZxIUAhPqODvRshLnP0tJ8AjzBwcE/N7Y2oc3R9GHNg y/cL8k9buDIGZ90hh1kjiYv5dy4DkSvcXqVPptFOpEYSS2Bf+qKH10NQpAEa409jQWVg wGMy850bmgVi1MQK4W39cEOxG9rKX9+qsbQjQrMSCLV2oocobW4Jxvh5s1GQ6fTrEQsz ovfqX2FRLxIz9PXkG4J/WGsG7C8ALBGAYfsk3y40X+v700Wp7fI2FLFghAD655e3SF4q 0hPw== 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:mime-version :content-transfer-encoding; bh=xJDId7DUcYNT04q9pfqe75do/hlAms5Geup4zU9Cjr8=; b=Cc33lqufONSMeIPUs9rCq0x+Kc+MYkn4nBjg5y7ZyB3O+cpKuerRzGJVUtW6Kfgk8D gZprFHnsI9d/X7m53qjn4+pk2NdOAVp6YzdgbV9JCDx2GvrJr6R/AE+zqt1/Yq9mT9Fu sX2ysCobhPZq5znbtSrpsgt775E4tKoRlMc+lz58jeTrNIdpnxDfRxOKS40wcbKY3xlu /5cTSDYcgjfIYCSfX05UEzN8HD2sqNo1nfeJ4F9ucyP7nD5feHZqd7JNDrEdBVbmezSH K6rjeYuqcF5nVJTZEGSfHPyVB3D6qYPcWPkEOpoqsM0bek4Z8ia2V9WUwBXzXeqWr+zC Xwwg== X-Gm-Message-State: AOAM530o3zC7CoH3E01D6M3B+wfCkNxlHK5Pr51oxwYT+94a57nepKak J29j1pbjKgr0y2rVSAIt3CJuXSEKyR4Nog== X-Google-Smtp-Source: ABdhPJzn669Di9KlskxlZZfdwP+CNKndq1Oo+1hSyX8NoE4+YDYW3Re4Y/S9fmKQiC/vf/zMFtXzPA== X-Received: by 2002:a62:7bc2:0:b029:311:47d0:f169 with SMTP id w185-20020a627bc20000b029031147d0f169mr10574014pfc.78.1625421533950; Sun, 04 Jul 2021 10:58:53 -0700 (PDT) Received: from localhost.localdomain (li1891-139.members.linode.com. [172.105.237.139]) by smtp.gmail.com with ESMTPSA id i8sm9702951pfo.154.2021.07.04.10.58.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Jul 2021 10:58:53 -0700 (PDT) From: xiaobo To: u-boot@lists.denx.de, kever.yang@rock-chips.com Cc: xiaobo Subject: [PATCH] rockchip: rk3399: adjust Nanopi R4S board power layout Date: Mon, 5 Jul 2021 01:58:45 +0800 Message-Id: <20210704175845.70224-1-peterwillcn@gmail.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean 1. Modify the VCC VDD power layout 2. Modify Ethernet1 interface of PCIE0 Signed-off-by: xiaobo --- arch/arm/dts/rk3399-nanopi-r4s.dts | 85 ++++++++++++++++++++++-------- 1 file changed, 63 insertions(+), 22 deletions(-) diff --git a/arch/arm/dts/rk3399-nanopi-r4s.dts b/arch/arm/dts/rk3399-nanopi-r4s.dts index 6f2cf17bf1..ae22363072 100644 --- a/arch/arm/dts/rk3399-nanopi-r4s.dts +++ b/arch/arm/dts/rk3399-nanopi-r4s.dts @@ -17,19 +17,65 @@ model = "FriendlyElec NanoPi R4S"; compatible = "friendlyarm,nanopi-r4s", "rockchip,rk3399"; - aliases { - ethernet1 = &r8169; + chosen { + stdout-path = "serial2:1500000n8"; + }; + + vcc1v8_s3: vcc1v8-s3 { + compatible = "regulator-fixed"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcc1v8_s3"; + vin-supply = <&vcc_1v8>; + }; + + vcc3v0_sd: vcc3v0-sd { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc0_pwr_h>; + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "vcc3v0_sd"; + vin-supply = <&vcc3v3_sys>; + }; + + vcc3v3_sys: vcc3v3-sys { + compatible = "regulator-fixed"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc3v3_sys"; + }; + + vcc5v0_sys: vcc5v0-sys { + compatible = "regulator-fixed"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-name = "vcc5v0_sys"; + vin-supply = <&vdd_5v>; }; vdd_5v: vdd-5v { compatible = "regulator-fixed"; - regulator-name = "vdd_5v"; regulator-always-on; regulator-boot-on; + regulator-name = "vdd_5v"; }; fan: pwm-fan { compatible = "pwm-fan"; + /* + * With 20KHz PWM and an EVERCOOL EC4007H12SA fan, these levels + * work out to 0, ~1200, ~3000, and 5000RPM respectively. + */ cooling-levels = <0 12 18 255>; #cooling-cells = <2>; fan-supply = <&vdd_5v>; @@ -73,40 +119,39 @@ status = "disabled"; }; +&i2c4 { + status = "disabled"; +}; + &leds { lan_led: led-1 { gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>; - label = "nanopi-r4s:green:lan"; + label = "green:lan"; + }; + + sys_led: led-sys { + default-state = "on"; + gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; + label = "red:sys"; }; wan_led: led-2 { gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>; - label = "nanopi-r4s:green:wan"; + label = "green:wan"; }; }; &leds_gpio { rockchip,pins = - <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>, <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>, - <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>; + <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>, + <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; }; &pcie0 { max-link-speed = <1>; num-lanes = <1>; vpcie3v3-supply = <&vcc3v3_sys>; - - pcie@0 { - reg = <0x00000000 0 0 0 0>; - #address-cells = <3>; - #size-cells = <2>; - - r8169: pcie@0,0 { - reg = <0x000000 0 0 0 0>; - local-mac-address = [ 00 00 00 00 00 00 ]; - }; - }; }; &sdhci { @@ -132,7 +177,3 @@ &usbdrd_dwc3_0 { dr_mode = "host"; }; - -&vcc3v3_sys { - vin-supply = <&vcc5v0_sys>; -};