From patchwork Tue Jan 9 08:23:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 1884242 X-Patchwork-Delegate: zajec5@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=alJSveWW; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=f7VVUFWB; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T8PFl3W5rz1yP7 for ; Tue, 9 Jan 2024 19:28:09 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=XiZ/wMv4X3rGSA1SU1ra++hrJ+3kJ+dRWIu4WvLwaFw=; b=alJSveWWVHve2R bjtPvlyoAl8IPUihadZw5JtuacUok6zg5+WKb/XZ6RtkvlJd5aWaog5VBmb85649AnSZ4iz43iblP Z3+EIcr5yecZ9TmrAZOweQ2GZ6JqrhODPb0QS0Znvv3T/8Ruz1I0dJhYq2v+JPm7GDpBDyPmd5ZG7 G5E0xOooHqgdn3Mjp7pylzyaSiDU2kbIyv0NgARAsPwuN9+xS9B/afw9spNU8BRrNxmB2K5yQ8ih0 nrgPGp5w3yNR9Cm6mCfzbCemWBC1d5WRxmYvivLefKlMS3EmiiDjvIDJexLkqTC/38GQymDrUYPVG 2a03O6GdiSj1OI34Kvsw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rN7Q0-007J0D-2a; Tue, 09 Jan 2024 08:25:04 +0000 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rN7Px-007IyC-1F for openwrt-devel@lists.openwrt.org; Tue, 09 Jan 2024 08:25:02 +0000 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2ccae380df2so28344421fa.1 for ; Tue, 09 Jan 2024 00:24:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704788697; x=1705393497; darn=lists.openwrt.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=oS16jOTYEmfjKgmQy0OVZ9aEx2EfxubHt6cv7RuAzio=; b=f7VVUFWBS/u/+Zn3WcFhI4AJPsXL0dFpg27HYBOndm07lo3vCwpCKLI52S7YCtXoXF HvozhHN0Jtyw/FD8fbLFkvt1zBJgYuIa6Gpp5hVf3dHFmb2MMJ1e8QUN5aHvWn0AsWl9 tB6cNvPbG+bfkhKm2JRZeTbsMm5iDhb+WxQHt8OXQy6zSxxnOXkZUy19+8Jcpu4EWBzg FRCdG1CEDtEZWWtDVpgdVKLKwWHymXMcK2FRU4le1tFGt8vVwSvAT83s0/J5nP0w3X1P vWTZ9IKduKnBfujeBlodc+VwWi8leQtDxLkXlS4mlVtEHD8LI431teeiM2fz5+wWy2gt A2nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704788697; x=1705393497; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=oS16jOTYEmfjKgmQy0OVZ9aEx2EfxubHt6cv7RuAzio=; b=AezHAMFUczNZBAowjaYFv7xK9Bh9QYTNwkohOv4hjdiQYdONT/wImN+ML/QSKkvx8V Pl9aEFks+2BLnc/VkMuDCrXwNYt12ocPF8WCAzAjlPQ9gz6wfNELWPixQ7/OmWrb5uCf zWZRYod9NxRENhnc2s2o2HuoYClwy5lAGgNZOkLyX+bs3sfZYbe10YCsGHTkIHMmRrtL NimQEceZDOmxTBX7BuP92L43yf/KqNXIW8Jpqmk61xVABm6xe8GvJi0Yqug//Scm8B6g j0jLWop7OZzyw3kEwU60uuqHgZ6+/yCEpAUkm17H5skxxqBRI3ZfXoWLCsgREpi7yS68 168g== X-Gm-Message-State: AOJu0YxqopzmZ4N6QtwmxfAhgsId3J1zxLPlhZrnZQ8mkJP6R+mXhQdB Z1fHLal4gzFU5z/DSEISZ2A= X-Google-Smtp-Source: AGHT+IFkv3rj+4e7K4EAVs0axeb23BF7fwAZsmYAEawsPvIctanXl5Ky9pzu6hd4AvY5vErziW8iEQ== X-Received: by 2002:a05:6512:ba6:b0:50e:a219:e05d with SMTP id b38-20020a0565120ba600b0050ea219e05dmr2421838lfv.12.1704788697092; Tue, 09 Jan 2024 00:24:57 -0800 (PST) Received: from localhost.lan (031011218106.poznan.vectranet.pl. [31.11.218.106]) by smtp.gmail.com with ESMTPSA id l2-20020a1709060e0200b00a26f1f36708sm769094eji.78.2024.01.09.00.24.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 00:24:56 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org Cc: linux-leds@vger.kernel.org, openwrt-devel@lists.openwrt.org, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH dt-schema] schemas: chosen: Add OpenWrt LEDs properties for system states Date: Tue, 9 Jan 2024 09:23:12 +0100 Message-Id: <20240109082312.9989-1-zajec5@gmail.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240109_002501_423067_DEEE943F X-CRM114-Status: GOOD ( 12.59 ) X-Spam-Score: 0.1 (/) X-Spam-Report: =?unknown-8bit?q?Spam_detection_software=2C_running_on_the_sy?= =?unknown-8bit?q?stem_=22bombadil=2Einfradead=2Eorg=22=2C?= =?unknown-8bit?q?_has_NOT_identified_this_incoming_email_as_spam=2E__The_ori?= =?unknown-8bit?q?ginal?= =?unknown-8bit?q?_message_has_been_attached_to_this_so_you_can_view_it_or_la?= =?unknown-8bit?q?bel?= =?unknown-8bit?q?_similar_future_email=2E__If_you_have_any_questions=2C_see?= =?unknown-8bit?q?_the_administrator_of_that_system_for_details=2E?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_preview=3A__From=3A_Rafa=C5=82_Mi=C5=82ecki_OpenWr?= =?unknown-8bit?q?t_project_provides_downstream?= =?unknown-8bit?q?_support_for_thousands_of_embedded_home_network_devices=2E_?= =?unknown-8bit?q?Its_custom_requirement?= =?unknown-8bit?q?_for_DT_is_to_provide_info_about_LEDs_roles=2E_Currently_it?= =?unknown-8bit?q?_does_it_by_using?= =?unknown-8bit?b?IGN1c3RvbSBub24tIFsuLi5dIA==?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_analysis_details=3A___=280=2E1_points=2C_5=2E0_req?= =?unknown-8bit?q?uired=29?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_pts_rule_name______________description?= =?unknown-8bit?q?_----_----------------------_------------------------------?= =?unknown-8bit?q?--------------------?= =?unknown-8bit?q?_-0=2E0_RCVD=5FIN=5FDNSWL=5FNONE_____RBL=3A_Sender_listed_a?= =?unknown-8bit?q?t_https=3A//www=2Ednswl=2Eorg/=2C?= =?unknown-8bit?q?_no_trust?= =?unknown-8bit?b?IFsyYTAwOjE0NTA6NDg2NDoyMDowOjA6MDoyMzEgbGlzdGVkIGluXQ==?= =?unknown-8bit?b?IFtsaXN0LmRuc3dsLm9yZ10=?= =?unknown-8bit?q?_-0=2E0_SPF=5FPASS_______________SPF=3A_sender_matches_SPF_?= =?unknown-8bit?q?record?= =?unknown-8bit?q?_0=2E0_SPF=5FHELO=5FNONE__________SPF=3A_HELO_does_not_publ?= =?unknown-8bit?q?ish_an_SPF_Record?= =?unknown-8bit?q?_0=2E0_FREEMAIL=5FFROM__________Sender_email_is_commonly_ab?= =?unknown-8bit?q?used_enduser_mail?= =?unknown-8bit?q?_provider?= =?unknown-8bit?q?_=5Bzajec5=5Bat=5Dgmail=2Ecom=5D?= =?unknown-8bit?q?_0=2E2_FREEMAIL=5FENVFROM=5FEND=5FDIGIT_Envelope-from_freem?= =?unknown-8bit?q?ail_username_ends?= =?unknown-8bit?q?_in_digit?= =?unknown-8bit?q?_=5Bzajec5=5Bat=5Dgmail=2Ecom=5D?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID=5FAU__________Message_has_a_valid_DKIM?= =?unknown-8bit?q?_or_DK_signature_from?= =?unknown-8bit?q?_author=27s_domain?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID_____________Message_has_at_least_one_v?= =?unknown-8bit?q?alid_DKIM_or_DK_signature?= =?unknown-8bit?q?_0=2E1_DKIM=5FSIGNED____________Message_has_a_DKIM_or_DK_si?= =?unknown-8bit?q?gnature=2C_not_necessarily?= =?unknown-8bit?q?_valid?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID=5FEF__________Message_has_a_valid_DKIM?= =?unknown-8bit?q?_or_DK_signature_from?= =?unknown-8bit?q?_envelope-from_domain?= X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 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 From: Rafał Miłecki OpenWrt project provides downstream support for thousands of embedded home network devices. Its custom requirement for DT is to provide info about LEDs roles. Currently it does it by using custom non-documented aliases. While formally valid (aliases.yaml doesn't limit names or purposes of aliases) it's quite a loose solution. Document 4 precise "chosen" biding properties with clearly documented OpenWrt usage. This will allow upstreaming tons of DTS files that noone cared about so far as those would need to be patched downstream anyway. Signed-off-by: Rafał Miłecki --- A few weeks ago I was seeking for a help regarding OpenWrt's need for specifing LEDs roles in DT, see: Describing LEDs roles in device tree? https://lore.kernel.org/linux-devicetree/ee912a89-4fd7-43c3-a79b-16659a035fe1@gmail.com/T/#u I DON'T think OpenWrt's current solution with aliases is good enough: * It's not clearly documented * It may vary from other projects usa case * It may be refused by random maintainers I think I decided to suggest 4 OpenWrt-prefixed properties for "chosen". I'm hoping this small custom binding is sth we could go with. I'm really looking forward to upstreaming OpenWrt's downstream DTS files so other projects (e.g. Buildroot) can use them. If you have any better fitting solution in mind please let me know. I should be fine with anything that lets me solve this downstream mess situation. dtschema/schemas/chosen.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dtschema/schemas/chosen.yaml b/dtschema/schemas/chosen.yaml index 6d5c3f1..96d0db7 100644 --- a/dtschema/schemas/chosen.yaml +++ b/dtschema/schemas/chosen.yaml @@ -264,4 +264,13 @@ properties: patternProperties: "^framebuffer": true + "^openwrt,led-(boot|failsafe|running|upgrade)$": + $ref: types.yaml#/definitions/string + description: + OpenWrt choice of LED for a given role. Value must be a full path (encoded + as a string) to a relevant LED node. + + Property user may use specified path to control proper LED during current + system boot phase. + additionalProperties: false