Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2836812rwr; Fri, 21 Apr 2023 15:14:00 -0700 (PDT) X-Google-Smtp-Source: AKy350YwiEGv3pEE205RHo6sq5ueGbUxuzaBi54+R1g4RcvBE9DGBZj9QwY7IS90lLivboSAzSVM X-Received: by 2002:a05:6a20:440d:b0:dd:dfe4:f06a with SMTP id ce13-20020a056a20440d00b000dddfe4f06amr7283929pzb.3.1682115239857; Fri, 21 Apr 2023 15:13:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682115239; cv=none; d=google.com; s=arc-20160816; b=QPtFl/6nmsAcG89fPgseq5hz75ES0Pby9ILTZ67oFlkTGMa44ZK1pS3D6OfG84ATdR Wm6gHHMIRN+1kj83gIg7Ex4qJl3Qgo3n5DnamiPs40Oc7wfHZaUUQScQNMsVBtn7nW2M nWtWB69GYEp6w6wg3UxFE2Ujp5RYuGbNauffYjTwIWdcXt8yNw9BM8PS/duAx4jeNfrd VVq7pnvCN7/WO+XYYRf7DOA0yfjV5c0n/n1/rZ4IhT/EKSx3b5VErEjINqjW+596UflN VJrd+juhkck+XXTwuQnlr39tOi0cjvhLyuva4ajYFjX7aN9dzEwhTK0hNyc6PWSHR8Lo OHZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=WqDR0GeRDjCmeGfB4Fz7AUgP7inOrXaAMKhLUK+zsKo=; b=rNFqPTonZZAmCbktPdt/ehUpC4MoZuBAfK4iskjUI1IXYsvPZXmDWu/HYrBFWlPtmd 9irZQ/YZgM8wJIQwCjpaah4Wpwfe1h9iuwuu8+dVSu/+s1zBtELJRYJKS5GZa5xT5M2K Fsm4irebpgHTQJPbxKjyWCJD85YAhL/QFgfg5x1dMQ8pBCigtAqbbkr2feNS+QStyaDr IC9wukba7ZyOIH9vPKXB61L/ZL23OpPf9sjINX01Eexl0Ji6NMni8Zo+6gx6Y6s52rVI 18AzAteR5Je8ugJ5qQVyYTdxct22+gr0coGKV2ZQbAVd+Bx6knGhxzjwxZJAobFnhhIv E+Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brun.one header.s=s1 header.b=OKeZGgK8; 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=REJECT sp=REJECT dis=NONE) header.from=brun.one Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c26-20020a630d1a000000b004dffd0e0409si5390086pgl.518.2023.04.21.15.13.48; Fri, 21 Apr 2023 15:13:59 -0700 (PDT) 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=@brun.one header.s=s1 header.b=OKeZGgK8; 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=REJECT sp=REJECT dis=NONE) header.from=brun.one Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233417AbjDUWFu (ORCPT + 99 others); Fri, 21 Apr 2023 18:05:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230110AbjDUWFt (ORCPT ); Fri, 21 Apr 2023 18:05:49 -0400 X-Greylist: delayed 1603 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 21 Apr 2023 15:05:46 PDT Received: from mx.dolansoft.org (s2.dolansoft.org [212.51.146.245]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D835EAC; Fri, 21 Apr 2023 15:05:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=brun.one; s=s1; h=MIME-Version:Message-Id:Date:Subject:Cc:To:From:In-Reply-To: References:From:To:Subject:Date:Message-ID:Reply-To; bh=WqDR0GeRDjCmeGfB4Fz7AUgP7inOrXaAMKhLUK+zsKo=; b=OKeZGgK8rz/gd/z9Un26pCgh2c CjKEUk7Txai2yQYlLvih+G/wjpz75nD22kAsIJTTHjp0JKWDCaMFHtg4YDgxAC3a0yZCGkNUv2l0n sE/olz9qcde+OBN74YjhwWKQgopGHxLZboy+lvlMnhhtDkV77q2TIO/n98m6/mhc+F0lYP2dd2z+e KA0VFT1yM4gMfd9ulUb3myCIHNefNHEfBxf2YjVsZRoT6i1IUugXYQhiNRrOWZi3xdRFL3Z3ylHUT TljMoSOTRWpWLxu8o8/rK1eZwELXAt2HnoD/JZtWfS5qGOUJ5wMgBgAwDfV+h9MasEgZ5zFK/YvrX nLnfzfJg==; Received: from [212.51.153.89] (helo=blacklava.cluster.local) by mx.dolansoft.org with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1ppyT3-0009hE-1x; Fri, 21 Apr 2023 21:38:57 +0000 From: Lorenz Brun To: Rob Herring , Krzysztof Kozlowski , Heiko Stuebner Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] arm64: dts: rockchip: fix USB regulator on ROCK64 Date: Fri, 21 Apr 2023 23:38:41 +0200 Message-Id: <20230421213841.3079632-1-lorenz@brun.one> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: lorenz@dolansoft.org 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, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Currently the ROCK64 device tree specifies two regulators, vcc_host_5v and vcc_host1_5v for USB VBUS on the device. Both of those are however specified with RK_PA2 as the GPIO enabling them, causing the following error when booting: rockchip-pinctrl pinctrl: pin gpio0-2 already requested by vcc-host-5v-regulator; cannot claim for vcc-host1-5v-regulator rockchip-pinctrl pinctrl: pin-2 (vcc-host1-5v-regulator) status -22 rockchip-pinctrl pinctrl: could not request pin 2 (gpio0-2) from group usb20-host-drv on device rockchip-pinctrl reg-fixed-voltage vcc-host1-5v-regulator: Error applying setting, reverse things back Looking at the schematic, there are in fact three USB regulators, vcc_host_5v, vcc_host1_5v and vcc_otg_v5. But the enable signal for all three is driven by Q2604 which is in turn driven by GPIO_A2/PA2. Since these three regulators are not controllable separately, I removed the second one which was causing the error and added labels for all rails to the single regulator. Signed-off-by: Lorenz Brun --- v1 -> v2: add labels for all rails, change description to match --- arch/arm64/boot/dts/rockchip/rk3328-rock64.dts | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts index f69a38f42d2d..5d608e2776e9 100644 --- a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts +++ b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts @@ -37,7 +37,8 @@ vcc_sd: sdmmc-regulator { vin-supply = <&vcc_io>; }; - vcc_host_5v: vcc-host-5v-regulator { + // Common enable line for all of the rails mentioned in the labels. + vcc_host_5v: vcc_host1_5v: vcc_otg_5v: vcc-host-5v-regulator { compatible = "regulator-fixed"; gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; @@ -48,17 +49,6 @@ vcc_host_5v: vcc-host-5v-regulator { vin-supply = <&vcc_sys>; }; - vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator { - compatible = "regulator-fixed"; - gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; - pinctrl-0 = <&usb20_host_drv>; - regulator-name = "vcc_host1_5v"; - regulator-always-on; - regulator-boot-on; - vin-supply = <&vcc_sys>; - }; - vcc_sys: vcc-sys { compatible = "regulator-fixed"; regulator-name = "vcc_sys"; -- 2.39.2