From patchwork Wed Jan 3 13:28:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Renner Berthing X-Patchwork-Id: 184746 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp5019052dyb; Wed, 3 Jan 2024 05:31:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IE0L0nZDSmDZUZaHFJFBHvGcVI2ddGS+iqC5PQsUBURs+ThgFf6pZL5ilOa6p3MePgluqZh X-Received: by 2002:a50:8714:0:b0:556:8c9e:5087 with SMTP id i20-20020a508714000000b005568c9e5087mr1614392edb.85.1704288690333; Wed, 03 Jan 2024 05:31:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704288690; cv=none; d=google.com; s=arc-20160816; b=08G8HxkZN/nSLnWLpA+71ZPoh4A/kBFKA5M2NoN0yDc9x1cLUZDzrICOYXPC2MlrYU stA1JHPiCJX+CGbe90CImvCzABL/zAMpcWlikT5SDIqRvD7F1rk5DU4E7GpzhZZkPNWh ZOkd32maD5IFWSg95TYN3tGBlYrmmZMOTjRBLzGxcYZdNUbLLVJ3/Brbpf2GJpqfLCij 0HoELbJZqNfpRubUOfVXMIfxPKeUtin3vx8v3S5ddI+lz0eow1UDV9trgoCXsW4NfrJ3 KsBQvuHof81E0cRIcdFuWofYlMG5XKxfGy2kzpjbELyj6wB5NiZ07UnRL2EouMp1SMeP nNMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=j8polI0w/bjJ8tZqB1jGYw0XXYsOmvLZx8MNesRoCUY=; fh=v+Tej7Da5neO4ppxb9KCbYb3QrHrU+S9AJJBYfP4W+0=; b=HyssnCgLk9FAOKugFdZcp0IkhIRUihs9mckt7TziKa5ZTVQRMVscBOMT80/hXJHz94 2Wj/P6bqhjNvO8pmTDXrfuiixsry0Z5HgvhhLY1eGtTHS9Y2/WFcFy0P/k+PiQkAip8N fWQVm6Iu2sHhss1KZ7wKO7T4fr3jk23w/THxI9gM9FBRJa4h4VlcV+zUcYkXfi6ENqI5 Z1l2Hfz/vEsxT6esMDTPVfacC36HdOGI7BP+8VZJdUMgZ4Jeh2PciPbiwkCC5RI3+aa3 x+5ZKNIfa2c7RZHQPxr0QRJdTgdmD411eccZCKlNo56IdolYZVaTQtOQVpzj2jbAPpwD ZHyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=DnOEVUJD; spf=pass (google.com: domain of linux-kernel+bounces-15576-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15576-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id b12-20020a056402278c00b0055150f8a741si12659473ede.351.2024.01.03.05.31.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 05:31:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15576-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=DnOEVUJD; spf=pass (google.com: domain of linux-kernel+bounces-15576-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15576-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id EE3851F23E80 for ; Wed, 3 Jan 2024 13:31:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 648C71BDDA; Wed, 3 Jan 2024 13:29:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=canonical.com header.i=@canonical.com header.b="DnOEVUJD" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A162C199DE for ; Wed, 3 Jan 2024 13:29:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=canonical.com Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 44FA13F74C for ; Wed, 3 Jan 2024 13:29:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1704288553; bh=j8polI0w/bjJ8tZqB1jGYw0XXYsOmvLZx8MNesRoCUY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DnOEVUJD7eMXhCK/MQ544wTYkmj+RRJXE3d2iW2RbveB84/P/NCR1RPnPu3zu05Gy 6cqnOjY0Hs5CEeJVpmcOMjEGTrSAxuTHHeXyBeM8cchni5s/iD7QIPUx66kKWUBT9y xXrOpGRW8OywWbFo4qKCJbitCm9yBs7hspfEgRI3NxhcYhEFYy/EGvZ0yRSitznMFr Yf9XuJErz/ye29V0YdJAcIZrXLmljwYljny4G7QYN5kIa/kBaMElmWoyokmAmlqNsV qXh+RH/p9Bfe/ECOkMLpU+NcbI9bndeBNyALZTer6pjmeg8J0EyJbmUGBmJZ0mRv5I Bn08yOnXV8nDQ== Received: by mail-lj1-f198.google.com with SMTP id 38308e7fff4ca-2cce9d6ec6bso35251231fa.2 for ; Wed, 03 Jan 2024 05:29:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704288542; x=1704893342; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=j8polI0w/bjJ8tZqB1jGYw0XXYsOmvLZx8MNesRoCUY=; b=tENjBeIGxEvaNyY9zA+Fj7FV0XlCK2PWd/LQP4BBy1YoVEeZQ1uuImPZq+OCehnt9H 5agmmqDkl6ZaDnFIz28hK4oNp95VAVDYScMoUVI5DUqXyCafhoTEPi8lf0hywT9M0T+N 7kZYZjmrDycDimnTADJgKnb218isgdMjjBA+W/q7K3+lIAnxaUXROFWEkTeg6oZILDux Aj0K73ZnRCFNblsVggFcqw9z2sEIXzGHEncfdAnwrp8WWqD0HtxjlxCgTJ3IKjl3PFo5 IRCN/4il6xvMjJxNQyxljtjDcJzFQeME77hj1CNrkafbvZ93AqOdlq3WeN/h78FZZ1eY tySg== X-Gm-Message-State: AOJu0YxeoZGoG9NS20w78lg6ETGhNY+CJRmfxXkoDbRmGhLRljpHoWta 2QiwvfSKCbxqQ1nioGx819XkfxUOMVCsZAQvIdTMVWXGi25h4OGus4UM4k6YYy7fylXuzKw6M8x jJNb/8tLb9CczmmQgXsqF9xqSz6XcdM+EYHEUWQMxhYrRNLHkAIamz/zp X-Received: by 2002:a05:6512:1145:b0:50e:3767:d381 with SMTP id m5-20020a056512114500b0050e3767d381mr7432129lfg.139.1704288541963; Wed, 03 Jan 2024 05:29:01 -0800 (PST) X-Received: by 2002:a05:6512:1145:b0:50e:3767:d381 with SMTP id m5-20020a056512114500b0050e3767d381mr7432116lfg.139.1704288541775; Wed, 03 Jan 2024 05:29:01 -0800 (PST) Received: from stitch.. ([2a01:4262:1ab:c:5af0:999b:bb78:7614]) by smtp.gmail.com with ESMTPSA id eu18-20020a170907299200b00a26e53be089sm9549873ejc.44.2024.01.03.05.29.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 05:29:01 -0800 (PST) From: Emil Renner Berthing To: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org Cc: Linus Walleij , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jisheng Zhang , Guo Ren , Fu Wei , Paul Walmsley , Palmer Dabbelt , Drew Fustini Subject: [PATCH v2 8/8] riscv: dtb: thead: Add BeagleV Ahead LEDs Date: Wed, 3 Jan 2024 14:28:45 +0100 Message-ID: <20240103132852.298964-9-emil.renner.berthing@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240103132852.298964-1-emil.renner.berthing@canonical.com> References: <20240103132852.298964-1-emil.renner.berthing@canonical.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787076217884961188 X-GMAIL-MSGID: 1787076217884961188 Add nodes for the 5 user controllable LEDs on the BeagleV Ahead board. Signed-off-by: Emil Renner Berthing --- .../boot/dts/thead/th1520-beaglev-ahead.dts | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts index c697a50ca9b1..0b309c770202 100644 --- a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts +++ b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts @@ -7,6 +7,8 @@ /dts-v1/; #include "th1520.dtsi" +#include +#include / { model = "BeagleV Ahead"; @@ -34,7 +36,42 @@ chosen { memory@0 { device_type = "memory"; reg = <0x0 0x00000000 0x1 0x00000000>; + }; + leds { + pinctrl-names = "default"; + pinctrl-0 = <&led_pins>; + compatible = "gpio-leds"; + + led-1 { + gpios = <&gpio4 8 GPIO_ACTIVE_LOW>; + color = ; + label = "led1"; + }; + + led-2 { + gpios = <&gpio4 9 GPIO_ACTIVE_LOW>; + color = ; + label = "led2"; + }; + + led-3 { + gpios = <&gpio4 10 GPIO_ACTIVE_LOW>; + color = ; + label = "led3"; + }; + + led-4 { + gpios = <&gpio4 11 GPIO_ACTIVE_LOW>; + color = ; + label = "led4"; + }; + + led-5 { + gpios = <&gpio4 12 GPIO_ACTIVE_LOW>; + color = ; + label = "led5"; + }; }; }; @@ -62,6 +99,24 @@ &dmac0 { status = "okay"; }; +&padctrl_aosys { + led_pins: led-0 { + led-pins { + pins = "AUDIO_PA8", /* GPIO4_8 */ + "AUDIO_PA9", /* GPIO4_9 */ + "AUDIO_PA10", /* GPIO4_10 */ + "AUDIO_PA11", /* GPIO4_11 */ + "AUDIO_PA12"; /* GPIO4_12 */ + function = "gpio"; + bias-disable; + drive-strength = <3>; + input-disable; + input-schmitt-disable; + slew-rate = <0>; + }; + }; +}; + &padctrl0_apsys { uart0_pins: uart0-0 { tx-pins {