From nobody Sun Sep 22 04:35:45 2024 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72907C433F5 for ; Tue, 3 May 2022 06:29:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229756AbiECGcp (ORCPT ); Tue, 3 May 2022 02:32:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbiECGcn (ORCPT ); Tue, 3 May 2022 02:32:43 -0400 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C47C25C4D; Mon, 2 May 2022 23:29:11 -0700 (PDT) Received: by mail-pg1-x52c.google.com with SMTP id v10so13310637pgl.11; Mon, 02 May 2022 23:29:11 -0700 (PDT) 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=1ommot/0z42sf3SBGFHfrVoBq7JJGjmk6km0fRERgWs=; b=BBZqsvfXLQMcxnvVKu19OiXFrM/hVM4VZ+TB4sAzS++ZfbcsGgC3gaIgYi3V/CxVyI hTagtqcDHop40+tn6XHh1FfNWGj1H2zX197W8q7SH3W2UjSFujx/4tRPHDTBTJonNB59 1acUkA2RmNGSJP1O2DsYwghR/BvCSDcHfrbhet3gqQjaohsHzguix3TUsxF8g5UuVNDN 42cX0PSkBmTTHScDbzKPD4gcE3amRx4DyJ4OrQdKRsblQHnC4eplMz5oadgNU2TWSllT Pp8ervTrj4BAOPhqAW0uVhaHRyGYWeIwN+OPWaAZNksm0dutDNUEiCZKv8LtEObohI0k fxbg== 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=1ommot/0z42sf3SBGFHfrVoBq7JJGjmk6km0fRERgWs=; b=VIDwkVoHGjEpHTVTBNnUrtk32Tnygq+k1ErnVvkbFqmE7a8rbrJGJxfYNV9uTEbBbH MR+JmEs4FbhOrrC03wF7YAspwARdsOqJN69YbdNB9Yeyr1XAizZs+B+PmLguOB3wO3vX yKbgsLRg7g1OUnHzkYmxmaiSvp4umy4oYfCBOrl7W2f49V+JJTLDk+E6af3WmsmfSbZv 1DTWkE+SR51Af1Pa4gppIQFKdjNGIM7lPNVNHQE5jMR9MeOxD5VNVzjaAZe0WBFdvUVM iHkOo9QTjLA7Bb3HZxl6yGmjM7CE9JuyQNIjTNXvGqE4gqW9V+07XdRJQtaese5TPqFN Oz7A== X-Gm-Message-State: AOAM5309BPjoq5DKLmK2dIq8WhXq7kzSXPmBigd2gYqi3rkliZYQjuma X7OtS4OWcBF7NU3pJjqtfQs= X-Google-Smtp-Source: ABdhPJwVmWB/+4ZbUnTbaekuYC8MZ5UU5EvCLiYkYU2agpKq050H3bedHlbNmKr5ciuIuhR85HqFzw== X-Received: by 2002:a63:87c1:0:b0:3ab:1a17:35b7 with SMTP id i184-20020a6387c1000000b003ab1a1735b7mr12716214pge.313.1651559350797; Mon, 02 May 2022 23:29:10 -0700 (PDT) Received: from genechen-System-Product-Name.richtek.com ([2402:7500:469:f77c:e84b:f663:23:a6cf]) by smtp.gmail.com with ESMTPSA id j14-20020a63fc0e000000b003c260491adesm1313800pgi.82.2022.05.02.23.29.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 23:29:10 -0700 (PDT) From: Gene Chen To: lee.jones@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, matthias.bgg@gmail.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, gene_chen@richtek.com, cy_huang@richtek.com Subject: [PATCH] dt-bindings: mfd: Add bindings child nodes for the Mediatek MT6360 Date: Tue, 3 May 2022 14:28:43 +0800 Message-Id: <20220503062843.12516-1-gene.chen.richtek@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Gene Chen Add bindings child nodes for the Mediatek MT6360 Signed-off-by: Gene Chen Link: https://lore.kernel.org/all/YmqTzlrVL5KaVPuz@robh.at.kernel.org/ --- .../bindings/mfd/mediatek,mt6360.yaml | 212 +++++++++++++++++- 1 file changed, 201 insertions(+), 11 deletions(-) diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mt6360.yaml b/D= ocumentation/devicetree/bindings/mfd/mediatek,mt6360.yaml index 4d8769f3748c..b3eecf661bc1 100644 --- a/Documentation/devicetree/bindings/mfd/mediatek,mt6360.yaml +++ b/Documentation/devicetree/bindings/mfd/mediatek,mt6360.yaml @@ -37,6 +37,18 @@ properties: description: The first cell is the IRQ number. =20 + regulators: + $ref: ../regulator/mt6360-regulator.yaml + + charger: + $ref: ../power/supply/mt6360_charger.yaml + + tcpc: + $ref: ../usb/mediatek,mt6360-tcpc.yaml + + led-controller: + $ref: ../leds/leds-mt6360.yaml + required: - compatible - reg @@ -51,17 +63,195 @@ examples: - | #include #include + #include + #include i2c { - #address-cells =3D <1>; - #size-cells =3D <0>; - - pmic@34 { - compatible =3D "mediatek,mt6360"; - reg =3D <0x34>; - wakeup-source; - interrupts-extended =3D <&gpio26 0 IRQ_TYPE_LEVEL_LOW>; - interrupt-names =3D "IRQB"; - interrupt-controller; - #interrupt-cells =3D <1>; + #address-cells =3D <1>; + #size-cells =3D <0>; + + mt6360@34 { + compatible =3D "mediatek,mt6360"; + reg =3D <0x34>; + wakeup-source; + interrupts-extended =3D <&gpio26 0 IRQ_TYPE_LEVEL_LOW>; + interrupt-names =3D "IRQB"; + interrupt-controller; + #interrupt-cells =3D <1>; + + mt6360_charger: charger { + compatible =3D "mediatek,mt6360-chg"; + richtek,vinovp-microvolt =3D <14500000>; + + otg_vbus_regulator: usb-otg-vbus-regulator { + regulator-compatible =3D "usb-otg-vbus"; + regulator-name =3D "usb-otg-vbus"; + regulator-min-microvolt =3D <4425000>; + regulator-max-microvolt =3D <5825000>; + }; + }; + + led-controller { + compatible =3D "mediatek,mt6360-led"; + #address-cells =3D <1>; + #size-cells =3D <0>; + + multi-led@0 { + reg =3D <0>; + function =3D LED_FUNCTION_INDICATOR; + color =3D ; + led-max-microamp =3D <24000>; + #address-cells =3D <1>; + #size-cells =3D <0>; + led@0 { + reg =3D <0>; + color =3D ; + }; + led@1 { + reg =3D <1>; + color =3D ; + }; + led@2 { + reg =3D <2>; + color =3D ; + }; + }; + led@3 { + reg =3D <3>; + function =3D LED_FUNCTION_INDICATOR; + color =3D ; + led-max-microamp =3D <150000>; + }; + led@4 { + reg =3D <4>; + function =3D LED_FUNCTION_FLASH; + color =3D ; + function-enumerator =3D <1>; + led-max-microamp =3D <200000>; + flash-max-microamp =3D <500000>; + flash-max-timeout-us =3D <1024000>; + }; + led@5 { + reg =3D <5>; + function =3D LED_FUNCTION_FLASH; + color =3D ; + function-enumerator =3D <2>; + led-max-microamp =3D <200000>; + flash-max-microamp =3D <500000>; + flash-max-timeout-us =3D <1024000>; + }; + }; + + regulators { + compatible =3D "mediatek,mt6360-regulator"; + LDO_VIN3-supply =3D <&BUCK2>; + buck1 { + regulator-compatible =3D "BUCK1"; + regulator-name =3D "mt6360,buck1"; + regulator-min-microvolt =3D <300000>; + regulator-max-microvolt =3D <1300000>; + regulator-allowed-modes =3D ; + }; + BUCK2: buck2 { + regulator-compatible =3D "BUCK2"; + regulator-name =3D "mt6360,buck2"; + regulator-min-microvolt =3D <300000>; + regulator-max-microvolt =3D <1300000>; + regulator-allowed-modes =3D ; + }; + ldo6 { + regulator-compatible =3D "LDO6"; + regulator-name =3D "mt6360,ldo6"; + regulator-min-microvolt =3D <500000>; + regulator-max-microvolt =3D <2100000>; + regulator-allowed-modes =3D ; + }; + ldo7 { + regulator-compatible =3D "LDO7"; + regulator-name =3D "mt6360,ldo7"; + regulator-min-microvolt =3D <500000>; + regulator-max-microvolt =3D <2100000>; + regulator-allowed-modes =3D ; + }; + ldo1 { + regulator-compatible =3D "LDO1"; + regulator-name =3D "mt6360,ldo1"; + regulator-min-microvolt =3D <1200000>; + regulator-max-microvolt =3D <3600000>; + regulator-allowed-modes =3D ; + }; + ldo2 { + regulator-compatible =3D "LDO2"; + regulator-name =3D "mt6360,ldo2"; + regulator-min-microvolt =3D <1200000>; + regulator-max-microvolt =3D <3600000>; + regulator-allowed-modes =3D ; + }; + ldo3 { + regulator-compatible =3D "LDO3"; + regulator-name =3D "mt6360,ldo3"; + regulator-min-microvolt =3D <1200000>; + regulator-max-microvolt =3D <3600000>; + regulator-allowed-modes =3D ; + }; + ldo5 { + regulator-compatible =3D "LDO5"; + regulator-name =3D "mt6360,ldo5"; + regulator-min-microvolt =3D <2700000>; + regulator-max-microvolt =3D <3600000>; + regulator-allowed-modes =3D ; + }; }; + + tcpc { + compatible =3D "mediatek,mt6360-tcpc"; + interrupts-extended =3D <&gpio26 3 IRQ_TYPE_LEVEL_LOW>; + interrupt-names =3D "PD_IRQB"; + + connector { + compatible =3D "usb-c-connector"; + label =3D "USB-C"; + data-role =3D "dual"; + power-role =3D "dual"; + try-power-role =3D "sink"; + source-pdos =3D ; + sink-pdos =3D ; + op-sink-microwatt =3D <10000000>; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + endpoint { + remote-endpoint =3D <&usb_hs>; + }; + }; + port@1 { + reg =3D <1>; + endpoint { + remote-endpoint =3D <&usb_ss>; + }; + }; + port@2 { + reg =3D <2>; + endpoint { + remote-endpoint =3D <&dp_aux>; + }; + }; + }; + }; + }; + + }; }; --=20 2.25.1