Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1010037rdb; Wed, 24 Jan 2024 01:53:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IG2PX509U1jG6emBkdyaNTaEcpzYhcXSWQ1W/ORRu/82hj/FIc4DKsdtImqGzfefbs+Sa/L X-Received: by 2002:aa7:da52:0:b0:55a:8dbb:7c2 with SMTP id w18-20020aa7da52000000b0055a8dbb07c2mr1705055eds.29.1706090018330; Wed, 24 Jan 2024 01:53:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706090018; cv=pass; d=google.com; s=arc-20160816; b=aoBEWcvxOTNPydAI195qIqiPA7EUBN1j8MakPSOrC7o05/8vhAtgM88v3yRRUivrt6 gvBsL+rxkgtGwTIGE62xeZmpuEVsfPalyoarNJGtzJNOxpVQ2CE89z85U2rUNPirRvIH XNKv7WQseZNvOcT6IIO+1X5pUkidbaZa9BAw2DrD62dhSKr6LFWaC+1xy+S+jvZWcETb oYrubBrRr8SrhogN4rZc3F3uY84Xkoib5+d24ZGyVMXiGcAQrpLKkECmnjP7o+n5k96K VCN6sZpcWPdmsvhAZgJxuVeYracpc7FlAbF620CECl+epAS2YbQhbHVPNfOUI76+UTCV Osyw== ARC-Message-Signature: i=2; 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:message-id:date:subject:cc:to :from:dkim-signature; bh=3P4SKIph2kaJ1P9uxNmooxsVTdL3TJ4ADsGzchIR86I=; fh=y2MZO0c8MGed1Zpwgs+yzujbHa1nSEfO8Y6FxWEhFdQ=; b=te8BL5g/GxK1dawIvTIc7SvvtpoOot8JYdL/UB9GwsIc5X3VAYuCiyakcSxsfO+ztA j8o5SfQh2MNHJ8lqCwfUcIFie4xCywQBpluJ3IU97nIDfOVuxuo1kIWHDmt51WH408Ny pWl0nd1I2C4cK69FW+yrGioB8UBCX+M6T2YaAHYyg/YkMZEeEJjQ438vfjTHYaUYPD0Y 5UqkUFkXTS7bAMhcbue2E4xrblCQVbJV31bkD1bkHdQKCJBjc1JDP8gUt/fjuZP9TmBV EbCtdXdFMDHioec44wTRvTAuerqgpBsgWPsxoC1yLf3dh1LiTWNTH4z8oxYtJIIKRBlM 6LSw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=DrfYhubb; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-36749-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36749-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ek12-20020a056402370c00b0054cfc9ef6c3si13789079edb.1.2024.01.24.01.53.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 01:53:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-36749-linux.lists.archive=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=@gmail.com header.s=20230601 header.b=DrfYhubb; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-36749-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36749-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 B89921F2DC00 for ; Wed, 24 Jan 2024 09:53:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 743F118C05; Wed, 24 Jan 2024 09:52:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DrfYhubb" Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 677E118625; Wed, 24 Jan 2024 09:52:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706089971; cv=none; b=LtxjExMMHTHAUiLvFfsa4bMJzyiLJ8CqCX2fUCJRfvDDWY5NvIQVXKR2oESjsY/MfojdywGbum97A7G4WIN4IEZtOvti9ikfIkN2kv3ryqpfpVklZs0rHxjmviTGZl0ujNTGFQBgbfcPkHjhJXefCz/WlGGTDMGp8AIDESL9SOY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706089971; c=relaxed/simple; bh=NiIeZZFwIvY0DyQXr6Ns8lr+2tiWC2O7tm2aI4XiJ6c=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=RhevI4TzESlm4mGsZd57lWu0aW5A4IgL/JUDf2t+BNmhfR85q2naqU0ND/r7kv/hXoCnkXFBZZcg+K+9iThNNYv4z1b1eflJRzHbw79HMPJtZm1drqGyTq/9MJhqaNVzdsrNZVTnmVm/sz+YToP8BIzV0kbcpqPCYyZSiKXVzOw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=DrfYhubb; arc=none smtp.client-ip=209.85.208.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-557dcb0f870so6354062a12.2; Wed, 24 Jan 2024 01:52:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706089966; x=1706694766; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=3P4SKIph2kaJ1P9uxNmooxsVTdL3TJ4ADsGzchIR86I=; b=DrfYhubbju74F5rME3DbcZnKMY+sqiHjN4cqe7m+gE1rmXuFowJa38c/sGSWJoFFgG PpdbkSVb71xYgK0mnI1vOtY70bTSu9w4QdW9pfABI4SrHL97Xy5qOE8G38s28HqoTBhB Gyu+REowI2tvXiOmWLpdHieQLGsHLxuuoyVN6It8cB10KZop18y0l84/gbNJjKHEHMZY JrzfxXbgHmqDVH360fYWipIXJIKgcI01FyZG4dDl0ZgYjG/31r3abj0SQOoBATBfQSOW BTYHw3QMrBnB1HFw6B1AT8mEXAX6vDKAybIjz1ecly8wo44iUj2N4drp/3UqEX0j2ZRf 9MpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706089966; x=1706694766; 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=3P4SKIph2kaJ1P9uxNmooxsVTdL3TJ4ADsGzchIR86I=; b=sFFdN7EXK7HeVVkEdFiJBR6/cT23rk3OTNfm7mysaoNQl6oQA3n+7U1eYOkm05lUlk Lru/CPLYpY5+QPs6D7MErsOLeRRwRpbjGHSwesDfY/aoCfyiFbHrYTsJwZzUbkxI/kBm tsJOOYa6JpZu8JgpEcBx+ImHTPBVcKpe0tkR5n+uq7XC/EfV4fwvPeCJGHm3uEsTEUgZ h1miVK9eC44/q1ByqsQABA5jDWsNg6LWeocPHKdKQIUF6w3dzd/bvNC0PCWu2qu9dy+6 7gzRXE43iBZHunjR7wsZIwhLfvDnMm1esPQDKb0lqZQaEhHMDejfydxWUBeji51IuWbr xYUw== X-Gm-Message-State: AOJu0Yx/gJVka5uUogBjNb3rBSEJy7pCZu/HLvgGVAmCLyh+4yaNigo/ TOu5IsJURYUET2dig6vBry4mgBppOnIlM09CVECYIPa0cbJxFaNg X-Received: by 2002:a05:6402:344e:b0:55a:5d43:2ef4 with SMTP id l14-20020a056402344e00b0055a5d432ef4mr1595734edc.72.1706089966311; Wed, 24 Jan 2024 01:52:46 -0800 (PST) Received: from localhost.lan (031011218106.poznan.vectranet.pl. [31.11.218.106]) by smtp.gmail.com with ESMTPSA id eg34-20020a05640228a200b0055c2404fbe4sm507410edb.69.2024.01.24.01.52.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 01:52:45 -0800 (PST) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Matthias Brugger , AngeloGioacchino Del Regno , Sean Wang , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Subject: [PATCH] dt-bindings: media: convert Mediatek consumer IR to the json-schema Date: Wed, 24 Jan 2024 10:52:30 +0100 Message-Id: <20240124095230.25704-1-zajec5@gmail.com> X-Mailer: git-send-email 2.35.3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Rafał Miłecki This helps validating DTS files. Introduced changes: 1. Reworded title 2. Added required #include-s and adjusted "reg" in example Signed-off-by: Rafał Miłecki --- .../bindings/media/mediatek,mt7622-cir.yaml | 81 +++++++++++++++++++ .../devicetree/bindings/media/mtk-cir.txt | 28 ------- 2 files changed, 81 insertions(+), 28 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/mediatek,mt7622-cir.yaml delete mode 100644 Documentation/devicetree/bindings/media/mtk-cir.txt diff --git a/Documentation/devicetree/bindings/media/mediatek,mt7622-cir.yaml b/Documentation/devicetree/bindings/media/mediatek,mt7622-cir.yaml new file mode 100644 index 000000000000..a2d0eed33292 --- /dev/null +++ b/Documentation/devicetree/bindings/media/mediatek,mt7622-cir.yaml @@ -0,0 +1,81 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/mediatek,mt7622-cir.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mediatek consumer IR on-SoC controller + +maintainers: + - Sean Wang + +properties: + compatible: + enum: + - mediatek,mt7622-cir + - mediatek,mt7623-cir + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + minItems: 1 + maxItems: 2 + + clock-names: + minItems: 1 + items: + - const: clk + - const: bus + +required: + - reg + - interrupts + - clocks + - clock-names + +allOf: + - $ref: rc.yaml# + - if: + properties: + compatible: + contains: + const: mediatek,mt7622-cir + then: + properties: + clocks: + minItems: 2 + + clock-names: + minItems: 2 + - if: + properties: + compatible: + contains: + const: mediatek,mt7623-cir + then: + properties: + clocks: + maxItems: 1 + + clock-names: + maxItems: 1 + +unevaluatedProperties: false + +examples: + - | + #include + #include + + ir@10013000 { + compatible = "mediatek,mt7623-cir"; + reg = <0x10013000 0x1000>; + interrupts = ; + clocks = <&infracfg CLK_INFRA_IRRX>; + clock-names = "clk"; + linux,rc-map-name = "rc-rc6-mce"; + }; diff --git a/Documentation/devicetree/bindings/media/mtk-cir.txt b/Documentation/devicetree/bindings/media/mtk-cir.txt deleted file mode 100644 index 5e18087ce11f..000000000000 --- a/Documentation/devicetree/bindings/media/mtk-cir.txt +++ /dev/null @@ -1,28 +0,0 @@ -Device-Tree bindings for Mediatek consumer IR controller -found in Mediatek SoC family - -Required properties: -- compatible : Should be - "mediatek,mt7623-cir": for MT7623 SoC - "mediatek,mt7622-cir": for MT7622 SoC -- clocks : list of clock specifiers, corresponding to - entries in clock-names property; -- clock-names : should contain - - "clk" entries: for MT7623 SoC - - "clk", "bus" entries: for MT7622 SoC -- interrupts : should contain IR IRQ number; -- reg : should contain IO map address for IR. - -Optional properties: -- linux,rc-map-name : see rc.txt file in the same directory. - -Example: - -cir: cir@10013000 { - compatible = "mediatek,mt7623-cir"; - reg = <0 0x10013000 0 0x1000>; - interrupts = ; - clocks = <&infracfg CLK_INFRA_IRRX>; - clock-names = "clk"; - linux,rc-map-name = "rc-rc6-mce"; -}; -- 2.35.3