From patchwork Thu Jan 21 21:06:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Daniel_Gonz=C3=A1lez_Cabanelas?= X-Patchwork-Id: 1430102 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.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=OL5uxGw5; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=e+gwUA7o; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (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 4DMFR756dkz9sCq for ; Fri, 22 Jan 2021 08:10:26 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:MIME-Version:Message-ID:Date:Subject:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=vUFwiiJupQsyNt1OT31y3LnJGYDU9ajyc6Qox3a+0Q8=; b=OL5uxGw5aW/LQVP4tW68pc2llw hkzPfuEs0j/z7SmkQOImdr4Te3lRiNdnwpDL/SXlp+KC4tjVz4qaJ8lgGR9Usg0Q0Q9Li8BG2Ugdi Pg5h00O6j0cLpSNK3QRr/U5XPdyYAUz15mJ/l6NFuG/o4cxgo7bPvfpnuj0gxdvnCi/EbP0ZLsv9L j+Wuhm8UTxzwr8D7Dl9hu2pOXqUAFHa6ILxQE3BEMEugdm5/AvCLe5d3GXMh5JrbX93Y3sKAb33SQ vF9PfShd/+wUy+SbjKZt/NGNHgzw6+AEBkXuTbxYgLUcdKrhVllppApbPkylEKUKfh21sqmwkpWmS 8xPosAaA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2hBn-0000Lv-7K; Thu, 21 Jan 2021 21:08:23 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2hBk-0000LC-H4 for openwrt-devel@lists.openwrt.org; Thu, 21 Jan 2021 21:08:21 +0000 Received: by mail-wr1-x430.google.com with SMTP id g10so3117670wrx.1 for ; Thu, 21 Jan 2021 13:08:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=GLX6ecZmO77jCywhS1F4dPzifJXZDGHUB7CW5ZzTkGI=; b=e+gwUA7oh27HWQN5zXSSalkq/MIA+MMw8/xOx469Bj3lz50ARPAasOKob5KjTzsFwJ d6ntvFWDQNqdN/oct3mF7aOrt7Mg1aDVCxH9iWA1fHWygBR5FXxZ5RRVk+iNoUTKjcI2 SogyAsvGY2nKvaSHw6GVAJt4RDwcovkDy3vCU9tTeMwmMTspnUZh/folTgb7XP1ZLBpV hg43Gs/Pe6BQUDTXAi8VdOlP2YkReR9KA2COwRu7GDv8pZ7nsSKBcUtXrqFlD7FLIb0T TL2HTT2a5VDn04c+TG1f3gTmfezPsji5og/riZuNssiNmZH3KkVJ1kOD45cAozIrcm1a pONQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=GLX6ecZmO77jCywhS1F4dPzifJXZDGHUB7CW5ZzTkGI=; b=Za256klNx9Vuxyosa0+OqZ7EwHrFoOG3+8WMFRY8jCZ1rajEjqKjQmvoXLVU8l1nn9 tUpYukSL+LRPb+qHE8OpPpGVgrXFN+u6R+6/E/0N4Au7K/VyI9iNZexs1hFJoxk8bXxI cFS0sf8XSvAnMZU1gVzYuunXLMWw8S9RlQBwgud/G67uk8JbGZvC6uyRDSFkzxiJSXF+ HdFCPbGnfdurv2Ral8Y65yhJjy4ljwqvZi7brbuyyVDr/oTPdpt+uIR8CeG80pX/lS79 r4U9zmm/VYEBcMts5+Va5sJGZ5EYIl99TUZPBPzakNNvObilSHFGx9O2Dpji1GZL00tP 2P9A== X-Gm-Message-State: AOAM533Xy5kAD0RkL3YbE1LX6SOSooM94WW0+FuUxfxPkqvGzP+sPWDZ 1U+gdoYOOop5Hbx+njK6ka7Jxb16chA= X-Google-Smtp-Source: ABdhPJy3heQ2+fOyYmUsN8NwYc5fEikqaxzGhRFbxzNfXk9rzHnVvUX9CvnBZcnB585HWEzSThANSw== X-Received: by 2002:a5d:62c7:: with SMTP id o7mr1223915wrv.257.1611263297482; Thu, 21 Jan 2021 13:08:17 -0800 (PST) Received: from tool.localnet ([213.177.198.100]) by smtp.gmail.com with ESMTPSA id d199sm9320121wmd.1.2021.01.21.13.08.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jan 2021 13:08:16 -0800 (PST) From: Daniel =?iso-8859-1?q?Gonz=E1lez?= Cabanelas To: openwrt-devel@lists.openwrt.org, noltari@gmail.com, ynezz@true.cz Subject: [PATCH 18.06 2/2] bcm63xx: VH4032N: fix non working LEDs and GPIOs Date: Thu, 21 Jan 2021 22:06:07 +0100 Message-ID: <11743114.t3shAEcxbS@tool> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210121_160820_580395_5DEAAAB3 X-CRM114-Status: GOOD ( 11.13 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:430 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [dgcbueu[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The GPIO hog feature is broken for bcm63xx in the 18.06 release. As a result of this, the whole GPIO infrastructure will fail, causing a non working LEDs problem and empty GPIOs when a hog is requested at boot time. [0.537448] requesting hog GPIO usb-hub-reset-gpio (chip bcm63xx-gpio.0, offset 27) failed, -517 [0.546564] gpiochip_add_data: GPIOs 480..511 (bcm63xx-gpio.0) failed to register The GPIO hog is used in this device to pull out of reset the USB hub. There is a kernel fix for the 19.07 release, 6d6127e537 commit. But to avoid unexpected behavior on other devices, we'll use a simple workaround to enable the USB hub. A fake LED is used instead. Signed-off-by: Daniel González Cabanelas --- target/linux/brcm63xx/dts/vh4032n.dts | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/target/linux/brcm63xx/dts/vh4032n.dts b/target/linux/brcm63xx/dts/vh4032n.dts index a17db77..0eb935a 100644 --- a/target/linux/brcm63xx/dts/vh4032n.dts +++ b/target/linux/brcm63xx/dts/vh4032n.dts @@ -68,6 +68,12 @@ label = "VH4032N:red:voice"; gpios = <&pinctrl 26 1>; }; + /* Workaround: enable the USB hub using a fake LED */ + usb-hub-reset { + label = "usb-hub-reset-gpio"; + gpios = <&pinctrl 27 0>; + default-state = "on"; + }; }; }; @@ -76,12 +82,16 @@ pinctrl-0 = <&pinctrl_pci &pinctrl_ephy0_led &pinctrl_ephy1_led &pinctrl_ephy2_led &pinctrl_ephy3_led>; - usb_hub_reset { - gpio-hog; - gpios = <27 0>; - output-high; - line-name = "usb-hub-reset-gpio"; - }; + /* + * GPIO hog is broken in 18.06, disable this node and use a fake + * LED instead. (Fixed in 19.07, commit 6d6127e537) + * usb_hub_reset { + * gpio-hog; + * gpios = <27 0>; + * output-high; + * line-name = "usb-hub-reset-gpio"; + * }; + */ }; &pflash {