From patchwork Wed Nov 24 11:19:51 2021 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: 12693539 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 44363C433F5 for ; Wed, 24 Nov 2021 11:21:35 +0000 (UTC) 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=N2Tu28ORuhI9napE8VgB1Cgm9vr6CScHMSGKpCJyzfM=; b=Dx2/x/wApYzG5X OfZVBK1kILLiNZ8ks7E4CTHKNrj7EKGPUxSSKSPl/Nt8+eeXqYXHFlM2hUjytEV5QRjcY7QmZrc/z 4nMcBhpfJSnhYMPoVarOgN0483iKLfVfMDQXsldPN+t4FFveCxMZjyj2RWbDfVfiUaVmN+3G6JP7R VrbZ4yPPTV0Uf2AS0eLebFTtAaEkvWRjKwMYZT8spRKQZS4JGKA3obkxaT653iVgczYukR6OGIxdK 2lbi12eJIoPCFRQfm+IK381lLhZzlUuOAb5BAHY1aEpevSrVG4h4Xakb3viZt9x+LwzUi7pk4QaWu 5tA0Iu7CwDGZU6C96Zyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpqJn-004ZTZ-MU; Wed, 24 Nov 2021 11:20:03 +0000 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpqJj-004ZRp-PV for linux-arm-kernel@lists.infradead.org; Wed, 24 Nov 2021 11:20:01 +0000 Received: by mail-lj1-x22a.google.com with SMTP id u22so4673799lju.7 for ; Wed, 24 Nov 2021 03:19:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=IZsEpOVVfiGIRoNJT482zVDXMB2Izb1XOnZ3syryS50=; b=hhi9jLeUBLMgFy2tjcZO9NXe6AGglXyYOhpOgywPfPDDM0V6bGlINYJOYQHWQoMRMO 23CyipaNgeFDeOKJ93B7BuTrvKwyA9/gjTherwYbUaWnbtZ348Nh8rGG1g97vUWF2KQM ffzAks9znHEi7RkMK5CZoFssvTAA0UkuTxzS/EIsUBRYumZfVmoHKJ8FQlvicUSB2ygI O54NG4n31rTXpcMWhbcoCX9wPvc4ogZcc/iTskRhz513Rs4I0BM4WEM2o8hTwq3Phy6H DZmtEeicBqMwOMaQjQ2o4+bV0AymsTpJi8w1g9kHxOascGdj+zm5JyMWta9KXRbkCeK2 cgRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=IZsEpOVVfiGIRoNJT482zVDXMB2Izb1XOnZ3syryS50=; b=4iITCXcW1g7cKheybql7291TbhOIMdoX/MsXa4YxmunumaSAAO9+bMCmj/9D7Rgjk4 xXRDD9wVKsgR95JsXwGLM+adtu5exzLfSfuU4S4M3ABpFIkp+s+enw9cmxjrSOEqWwh1 6Kwy2bRP0yLEmTZYRwSGc75m/ev3nD6s0E7gIXtDp/wbRQGeoTjAqUuHhgcBYmBwVN54 tFrXU5uD2ShX6rp4BMrRu1ardkSLWo9WffVM8oInwIX7r04vGfOteYvjxsnODfGSXWsB B/MgdOfmtliwpw64LOv8Bax+UYKyn0+ooJcfbY1/rQcpqDfdV+4PdxOZXJrh1tKywdZx wXVA== X-Gm-Message-State: AOAM533udsWjsXnye5OPgwaPMn50k297ZJzfw81UQ2xnVjWdZ/vBYnIO M7EnekZxgu5uNqVr14v6YIjIGjh2b6A= X-Google-Smtp-Source: ABdhPJwuzjxSIEvogfqLN5ftOQT8Fc55nvgdAlaEsRJ6wHjl/CBTrWPcP9mSY2pWWvUC59i1VDE/YQ== X-Received: by 2002:a2e:7319:: with SMTP id o25mr14570678ljc.320.1637752798034; Wed, 24 Nov 2021 03:19:58 -0800 (PST) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id f15sm1578512lfq.236.2021.11.24.03.19.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Nov 2021 03:19:57 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Pavel Machek , Rob Herring Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org, Florian Fainelli , linux-arm-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH V2 1/2] dt-bindings: leds: add Broadcom's BCM63138 controller Date: Wed, 24 Nov 2021 12:19:51 +0100 Message-Id: <20211124111952.22419-1-zajec5@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211124_031959_887308_78B71640 X-CRM114-Status: GOOD ( 16.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Rafał Miłecki Broadcom used 2 LEDs hardware blocks for their BCM63xx SoCs: 1. Older one (BCM6318, BCM6328, BCM6362, BCM63268, BCM6838) 2. Newer one (BCM6848, BCM6858, BCM63138, BCM63148, BCM63381, BCM68360) The newer one was also later also used on BCM4908 SoC. Old block is already documented in the leds-bcm6328.yaml. This binding documents the new one which uses different registers & programming. It's first used in BCM63138 thus the binding name. Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring Reviewed-by: Florian Fainelli --- V2: Rename to bcm63138 & make "brcm,bcm63138-leds" the main compatible --- .../bindings/leds/leds-bcm63138.yaml | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-bcm63138.yaml diff --git a/Documentation/devicetree/bindings/leds/leds-bcm63138.yaml b/Documentation/devicetree/bindings/leds/leds-bcm63138.yaml new file mode 100644 index 000000000000..99cd4ba9b0ca --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-bcm63138.yaml @@ -0,0 +1,95 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/leds-bcm63138.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom's BCM63138 LEDs controller + +maintainers: + - Rafał Miłecki + +description: | + This LEDs controller was first used on BCM63138 and later reused on BCM4908, + BCM6848, BCM6858, BCM63138, BCM63148, BCM63381 and BCM68360 SoCs. + + It supports up to 32 LEDs that can be connected parallelly or serially. It + also includes limited support for hardware blinking. + + Binding serially connected LEDs isn't documented yet. + +properties: + compatible: + oneOf: + - items: + - enum: + - brcm,bcm4908-leds + - brcm,bcm6848-leds + - brcm,bcm6858-leds + - brcm,bcm63148-leds + - brcm,bcm63381-leds + - brcm,bcm68360-leds + - const: brcm,bcm63138-leds + - const: brcm,bcm63138-leds + + reg: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +patternProperties: + "^led@[a-f0-9]+$": + type: object + + $ref: common.yaml# + + properties: + reg: + maxItems: 1 + description: LED pin number + + active-low: + type: boolean + description: Makes LED active low. + + required: + - reg + + unevaluatedProperties: false + +required: + - reg + - "#address-cells" + - "#size-cells" + +additionalProperties: false + +examples: + - | + #include + + leds@ff800800 { + compatible = "brcm,bcm4908-leds", "brcm,bcm63138-leds"; + reg = <0xff800800 0xdc>; + + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0x0>; + function = LED_FUNCTION_POWER; + color = ; + default-state = "on"; + }; + + led@3 { + reg = <0x3>; + function = LED_FUNCTION_STATUS; + color = ; + active-low; + }; + };