From patchwork Sun Apr 26 15:19:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1277081 X-Patchwork-Delegate: bmeng.cn@gmail.com 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.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=OrgqRQ0g; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 499BS55g0qz9sRY for ; Mon, 27 Apr 2020 01:20:37 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 55E6C81D36; Sun, 26 Apr 2020 17:20:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="OrgqRQ0g"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5EA2F81D25; Sun, 26 Apr 2020 17:20:07 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4D79581D00 for ; Sun, 26 Apr 2020 17:19:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x142.google.com with SMTP id i16so14296001ils.12 for ; Sun, 26 Apr 2020 08:19:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QWr4rz6ZlpelM6rNgKZZnSZQWUhfGKF+Kr9TQPKIFpg=; b=OrgqRQ0gPztBFjrXZUqXnjrgKmPD5GlzWOy/h0OcOixRSpHZEh4ovlsVmacz6bQ4GI TmbfS2vNumA7VgVeuGybOJOUi+bWdwsXV49dYzls5tKH6GqAIequHZ8layUgtcO7rL8Q 4o+lbI6+kM1J4u1JSi9Q1VkkmPxeIWw6icUic= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QWr4rz6ZlpelM6rNgKZZnSZQWUhfGKF+Kr9TQPKIFpg=; b=V/PkwzMRLY5R/sixL7o2/XRYEhfGlq1TtFYhh4dpLFvlqU7vkuSXMAZvfSr06dh4Gl vXWTCcKy43PXhf+/yMD+hWlwiqP4qswnGNuCqX3yemF1dqOJkFvwc/UCXekmzv24/1gx PI8j1miQ9U0SM8XkPE0wgU4GTX2IXVzzMY83ZJR8bn9u+sryW3hGOkWeYdLAzLbc42kQ O0VWwcdTVieQWNcOkEUU239VhdrEKBMi2X/3GEWlMXlmgJmhgov5qN0yAzQhJttorT0k QrHYPPazLPUoUsnuhjAviboWag9Ld8tC7mbGb8bQWu5+bhQ+5M2HO/8OtgpQupQzndj6 Kg0Q== X-Gm-Message-State: AGi0Pub4MomWBwAtlV5YbbcHcy7wMSkojtIge9Gy8C/U/lvZkbLPsUwS +E6JDwFge1sEz5+zgj13Nq51bbWPducuwA== X-Google-Smtp-Source: APiQypL5HKWIWYzqlOK5S6FIwGVTApPL+NSPKViOZZLktQL4wP+C1HjYYyiDQXg+KUh1by4YWBwouA== X-Received: by 2002:a92:c6c4:: with SMTP id v4mr15985272ilm.18.1587914397892; Sun, 26 Apr 2020 08:19:57 -0700 (PDT) Received: from localhost.localdomain (c-73-14-175-90.hsd1.co.comcast.net. [73.14.175.90]) by smtp.gmail.com with ESMTPSA id x11sm4402653ilm.64.2020.04.26.08.19.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Apr 2020 08:19:57 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Bin Meng , Leif Lindholm , Andy Shevchenko , Wolfgang Wallner , Simon Glass Subject: [PATCH v8 1/9] acpi: Add a binding for ACPI settings in the device tree Date: Sun, 26 Apr 2020 09:19:45 -0600 Message-Id: <20200426091948.v8.1.I7842b2dd0d6b475301fc044c6640d8089873053f@changeid> X-Mailer: git-send-email 2.26.2.303.gf8c07b1a785-goog In-Reply-To: <20200426151953.123850-1-sjg@chromium.org> References: <20200426151953.123850-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Devices need to report various identifiers in the ACPI tables. Rather than hard-coding these in drivers it is typically better to put them in the device tree. Add a binding file to describe this. Signed-off-by: Simon Glass --- Changes in v8: None Changes in v7: None Changes in v5: None Changes in v4: - Put 'interrupts-extended' property on one line - Rename acpi-probed to linux,probed - Note that linux,probed is an out-of-tree feature Changes in v3: - Drop mention of PRIC - Rename acpi,desc to acpi,ddn - Correct description of acpi,probed - Drop hid-descr-addr - Just add the device.txt binding file in this patch - Change the example to ELAN - Add a pointer to information about acpi,compatible Changes in v2: - Fix definition of HID - Infer hid-over-i2c CID value - Add the hid-over-i2c binding document doc/device-tree-bindings/device.txt | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 doc/device-tree-bindings/device.txt diff --git a/doc/device-tree-bindings/device.txt b/doc/device-tree-bindings/device.txt new file mode 100644 index 0000000000..27bd3978d9 --- /dev/null +++ b/doc/device-tree-bindings/device.txt @@ -0,0 +1,36 @@ +Devices +======= + +Device bindings are described by their own individual binding files. + +U-Boot provides for some optional properties which are documented here. See +also hid-over-i2c.txt which describes HID devices. See also +Documentation/firmware-guide/acpi/enumeration.rst in the Linux kernel for +the acpi,compatible property. + + - acpi,has-power-resource : (boolean) true if this device has a power resource. + This causes an ACPI PowerResource to be written containing the properties + provided by this binding, to describe how to handle powering the device up + and down using GPIOs + - acpi,compatible : compatible string to report + - acpi,ddn : Contains the string to use as the _DDN (DOS (Disk Operating + System) Device Name) + - acpi,hid : Contains the string to use as the HID (Hardware ID) + identifier _HID + - acpi,uid : _UID value for device + - linux,probed : Tells U-Boot to add 'linux,probed' to the ACPI tables so that + Linux will only load the driver if the device can be detected (e.g. on I2C + bus). Note that this is an out-of-tree Linux feature. + + +Example +------- + +elan_touchscreen: elan-touchscreen@10 { + compatible = "i2c-chip"; + reg = <0x10>; + acpi,hid = "ELAN0001"; + acpi,ddn = "ELAN Touchscreen"; + interrupts-extended = <&acpi_gpe GPIO_21_IRQ IRQ_TYPE_EDGE_FALLING>; + linux,probed; +};