From patchwork Tue Feb 16 18:34:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathias Kresin X-Patchwork-Id: 1441067 X-Patchwork-Delegate: openwrt@kresin.me 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=JHpIKaTy; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kresin-me.20150623.gappssmtp.com header.i=@kresin-me.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=VFlFRpu9; 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 4Dg8pQ1z3Rz9sRf for ; Wed, 17 Feb 2021 05:37:18 +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=uLZ6C7lOMn0K3Cx2NqkFpXvkJfQDZ2rVnvkK2Vyodj0=; b=JHpIKaTyBqssqeQJl0/Ohs1UCc BIVqyo4NWZ0IhxE6dPf7yJ/7PuAkJIw2MDcDKdGJF1h/HCHG9ro+HO8cLLWpfBTRhVgaMjsy/4+vR x7tLIKJSDulvmfgKda/I3jPZqzJmdERKn9Lo6AaAv9ZqCSsIm1OzX/49pvT4yJVsGY4W32uzkkJVH 1lOkWL5zVmaFYv/G1rwjZ5Z4jUdJI9Fjy+r3wXY9ah25LEYTC7wIl+A8MOI+lakB4iQyDiBo9MkNs SDAaXNGbr/nrfevBig1aTt3fSGe4SMeaxxMrQhxCWHhQszbc2Ot0XZqXvnYk7cHAFxdOQKLl/Rd+0 QoCGmvAg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lC5Bd-0000ow-Ri; Tue, 16 Feb 2021 18:35:01 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lC5BZ-0000nN-UQ for openwrt-devel@lists.openwrt.org; Tue, 16 Feb 2021 18:34:59 +0000 Received: by mail-wm1-x32e.google.com with SMTP id o15so9862470wmq.5 for ; Tue, 16 Feb 2021 10:34:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kresin-me.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=g530fGaIqxgpe7nyMBnZ1g6t2xKpKQk5JTu6v25czok=; b=VFlFRpu94MYq3PiRQNCtWBxj+lwJBrVVMRpWnTpMSgb4cr/lj9bujkdxoi034zJ16w xHtdOiMU00oJd8P8ju8aFSxdcPEW1EjsWy78QgBJoMdaGaXca5TkIM5NmacSs1/cLUej rZ5kJqVM58uEK5NBVDne1TKqepGI9Ec7/xoYIOt/4p7IaGx8lHbmrcO7mJA0jmwslvxF oJ6jpPS5QzNS3lj3a3EJxp+3bmZJLO8KB+zXsvI0jzHBOI9GzKQDKiZk/W8uoBg952ji NiEeDJ4GkgJil9plMtFEhSxtQzAjbOrrohQEhiYKscjJzrz/DmniLhqt+aXphbC4QFRS Ei6A== 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=g530fGaIqxgpe7nyMBnZ1g6t2xKpKQk5JTu6v25czok=; b=CEEO3ah0H58y/eQGBJpMrlHwRxtItN97LnWdGqSaItWdQJxgTZVz0PHhGRlJW2qLsE TOORfDRuXFDWL/mhBSEmYusXQqCn6LEBUPVic9E8pRuFEGQXvL5jIfs78d+BS0G3hRk+ XRuP1vFhR1CxG1IjcA0zabuCpzXpKuUDfemm+RqV3XFI2tz0sGS4vhtNImx2HaXXCK2k eqKG3lBt1/fl+6wTgOlCJHOE8TRj3cXhl3YaKjytboku91PJajSHVn6rCL+53Y7a78cZ IsJy3dtptLx1lP8gzuGbdUDJKI0Kpq1OuxFL0jBsSj2WwyRDWI/atin0e0HGOmW8qXHk kI/g== X-Gm-Message-State: AOAM533t3KBElj2Ilk1R7SuFOSsmwUuE21BI3NVpbIf0VOm+shS7fIUf ISfkeGPT8XNNdzNaE99zc5xxWoW9QK1yxe5L X-Google-Smtp-Source: ABdhPJzgHBf+LBH/WjQK8UDHXT9u7oFU4V+KmpkhG89+k0TAMsFEkkfzuy7538y2KmOx/hV9u+IKrQ== X-Received: by 2002:a1c:770e:: with SMTP id t14mr4374013wmi.45.1613500494622; Tue, 16 Feb 2021 10:34:54 -0800 (PST) Received: from desktop.wvd.kresin.me (p200300ec2f24b900e91f102e315eb599.dip0.t-ipconnect.de. [2003:ec:2f24:b900:e91f:102e:315e:b599]) by smtp.gmail.com with ESMTPSA id r12sm4416032wmg.44.2021.02.16.10.34.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Feb 2021 10:34:54 -0800 (PST) From: Mathias Kresin To: openwrt-devel@lists.openwrt.org Subject: [PATCH] lantiq: ARV752DPW22: set the usb led trigger via devicetree Date: Tue, 16 Feb 2021 19:34:48 +0100 Message-Id: <20210216183448.2333983-1-dev@kresin.me> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210216_133458_102307_C55761EC X-CRM114-Status: GOOD ( 10.96 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 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:32e listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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 Assign the usbdev trigger via devicetree and drop the userspace handling of the usb leds Add the PCI attached usb controller as trigger sources for the usb led as well. Signed-off-by: Mathias Kresin --- .../arch/mips/boot/dts/lantiq/danube.dtsi | 7 +++++ .../lantiq/danube_arcadyan_arv752dpw22.dts | 28 ++++++++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube.dtsi index ced3e3bcb4..bb3e9fb188 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube.dtsi @@ -254,6 +254,8 @@ }; usb: usb@e101000 { + #address-cells = <1>; + #size-cells = <0>; compatible = "lantiq,danube-usb"; reg = <0xe101000 0x1000 0xe120000 0x3f000>; @@ -263,6 +265,11 @@ phys = <&usb_phy>; phy-names = "usb2-phy"; status = "disabled"; + + ehci_port1: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; }; deu@e103100 { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts index 72483e4749..00ac016a42 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts @@ -17,7 +17,6 @@ led-upgrade = &power_red; led-dsl = &internet_red; - led-usb = &umts; led-wifi = &wifi; }; @@ -78,6 +77,9 @@ umts: umts { label = "red:umts"; gpios = <&gpiomm 3 GPIO_ACTIVE_LOW>; + trigger-sources = <&ehci_port1>, + <&ehci_port2>, <&uhci_port2>; + linux,default-trigger = "usbport"; }; wifi: wifi { label = "red:wifi"; @@ -242,6 +244,30 @@ ralink,mtd-eeprom-swap; mtd-mac-address = <&boardconfig 0x16>; }; + + usb@0f,0 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "pci1106,3038"; + reg = <0x7800 0 0 0 0>; /* 0000:00:0f.0: UHCI Host Controller */ + + uhci_port2: port@2 { + reg = <2>; + #trigger-source-cells = <0>; + }; + }; + + usb@0f,2 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "pci1106,3038"; + reg = <0x7a00 0 0 0 0>; /* 0000:00:0f.2: EHCI Host Controller*/ + + ehci_port2: port@2 { + reg = <2>; + #trigger-source-cells = <0>; + }; + }; }; &usb_phy {