From patchwork Mon Jul 5 00:42:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiaobo Tian X-Patchwork-Id: 1500539 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=85.214.62.61; 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=cs6r8pZC; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4GJ6P247M6z9sW8 for ; Mon, 5 Jul 2021 10:43:16 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6D1C082B36; Mon, 5 Jul 2021 02:43:08 +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="cs6r8pZC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9FB5182B74; Mon, 5 Jul 2021 02:43:06 +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-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) (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 5CB4282B30 for ; Mon, 5 Jul 2021 02:43:03 +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-pg1-x52d.google.com with SMTP id t9so16704060pgn.4 for ; Sun, 04 Jul 2021 17:43:03 -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=fcsx4XIZ6zjSd1nqZpfM8eO2GbptDGaFxid4WPY6sow=; b=cs6r8pZCjDpkQZIE1dNtgb9MuEH/8/K2Ecjil8iH3fEjnP7gVHxcwQzzD6Ou+Ara1p l2k6bX0/9K090fRFeOZaUeRI9ru5SFe2RdRvA3TEeMe9Pmdy8NegRfw/VuVzz422JyNk Pewdk97SFd9t5wnGGvD8XgU5feZYFOCW+hyZs8DgtKo5Pq+Rsc0T4FZtY8t/EHW2JC3z mTj5+DYf2kzpucCrdRZPtPqcuWuIn3X6SPi/Ybk20VKPQb/1t/4muak5NSsOGaEmAJbF ecCPWxFy3g5E9vr9AbjpMNeFFXyyTTWIf7+XT+rXgYgIcbH91z32Wy9iees/wQLsE2t5 MaQg== 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=fcsx4XIZ6zjSd1nqZpfM8eO2GbptDGaFxid4WPY6sow=; b=AGU7u1jZ3g2fqG8gWkfZQYh13j2C5tJOQUv0JrxXItWWjorOoHYNDXynoZpO7RUZKW 9lhlQDx8F1ob+wUuP7/jEAQuDSqaAZ3hq0wDM0WkxtQmmxoa1PFECi7eYdYO/KkEso5Q QCzxXxkziBExNLTcVk0edt03xhyvN/3q16Mc6VvzB0CjhtU9syA+RTgtKin8iC/Q2P5X 2T/7SQe8zM1nJ3lTaAWasjQOzJ37JB22KlqZMD1yKAGKeHfOG9PhziTH3+qFIYb73e/U tWwrbNM3bnNHtOZTnStV58kVrQIk19egR+rvYLpkcXhHjMwOSRRTmlGqWA+0d0H0nhvs QOnw== X-Gm-Message-State: AOAM532WCiKdp2DLcmptypT9L5iEWmNMNhkgTOE8ST7KInRscMvZMpqL Knc4pVMSc9WwIFEbKZagw5s+5isZ/OXEsQ== X-Google-Smtp-Source: ABdhPJxUdfHYhhAK5BlFTWgt0VpnEsHO4aSjg4pHgi3JwwyvkyiW4N/cGMtBcbPV4bBuf17PLVgaeg== X-Received: by 2002:a65:4242:: with SMTP id d2mr12608695pgq.243.1625445781532; Sun, 04 Jul 2021 17:43:01 -0700 (PDT) Received: from MacBook-Pro.lan (li1891-139.members.linode.com. [172.105.237.139]) by smtp.gmail.com with ESMTPSA id l7sm11925494pgb.19.2021.07.04.17.42.59 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Jul 2021 17:43:01 -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 08:42:53 +0800 Message-Id: <20210705004253.71955-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 Reviewed-by: Kever Yang 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>; -};