From patchwork Thu Feb 23 14:54:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 61010 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp358800wrd; Thu, 23 Feb 2023 07:03:17 -0800 (PST) X-Google-Smtp-Source: AK7set+X0mKEyGDQd2bz899yR/aV5m2yhltjOuKOs0QCQqcCbyD8EmG4zw95h4fmd0yvdR/HW/4E X-Received: by 2002:a05:6402:34d5:b0:4ab:dde:dea7 with SMTP id w21-20020a05640234d500b004ab0ddedea7mr13216955edc.2.1677164597648; Thu, 23 Feb 2023 07:03:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677164597; cv=none; d=google.com; s=arc-20160816; b=IQ6pQ0bpO2Rtyy23toqHS8rJ9ALCPPk54LFa3Jirui4kVBD7m0dw0/sZCsuqjaFKpY SublRW5D8zZUl8IwL9FWlY0gWdZUTW5r9r2BUBtIDEBw75J9erXjygwBnu6j7G3dt+v3 Dsh/EXfF+SXC4zcQQ9s5FAp9tsyT0403dolkFLRkgN4uenYKQ7HFDW5haVmhDn12AZWd N5pIgs/0kzJ5Y4OjLAJzBylH3x2JYWoHSlejW8Kq9oQTZBnzQKZ3BcOIZ2HYKex6e9XM Csr8RzTJrSvv3aBXdCZU6lw7OwpyMHETP9tqQoRjZBY2rFI2za+oIKYzt4IW83KwwfbX ZJLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EcyN8mwkynLnEcZ0mwlJ8EUC8lbw508/JbLNFp7NmP4=; b=klZZZhXNgUDweULSvn1AYV7C6QKr/GvXP7cx/apV99DHWM94QJWNDMEVMIVN5mKX53 cYONdOUKBNwmrejTmjz5KTxPPj2jM7rwRnrOzXRVKYfUrh/bFnRrRybFXhvIqomuPweN tzTkleq7A8JSifz+SdN9i6RiWzpSuLg8phViZxq2CTTEQ2SV+2yHdOgYy9DNAv6/Zbd6 oJuHpf+6AfkdyMsO8AF6vhtJcGb56ovTu+dU/2w6Ui4WPjLcXZx85iSjb9H4mlv8xhdw USsEdbGtpIYX7SLeFMcHmmHnux1gjtADP548+MtYKGvDIw1W7LH6p2om8+3gLz3J/Urx nQzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=auXFFpiD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fb10-20020a1709073a0a00b008dbcb6cde41si9611638ejc.909.2023.02.23.07.02.46; Thu, 23 Feb 2023 07:03:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=auXFFpiD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234732AbjBWOys (ORCPT + 99 others); Thu, 23 Feb 2023 09:54:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234147AbjBWOyi (ORCPT ); Thu, 23 Feb 2023 09:54:38 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5032552DF4; Thu, 23 Feb 2023 06:54:36 -0800 (PST) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 8C37E6602216; Thu, 23 Feb 2023 14:54:34 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677164075; bh=6pu9qitOcCueSg/XyeyLzoSlFZ5o/IQW+VQsBZPX1lk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=auXFFpiDZrBUMlDFrM3ayviuKcXeH9Y3WZXwAIeHZbbeKfuzs9pa7F1x+JZs9GsIa BYbexjJNUdLaXsyCABnXFPF/r3R4fDv7AeFNfohN9k3XkNf1Om0geQyJlOXWP38tX4 1YyyUvaa08utDnHFamt6ki0jy0kMBnEW/TeCScSvd4H0x33aBoH4XYlEtzNgX1a6E9 CWHWhaS5F2wr5wn7tmAmW7vniNsK7rHEmL5zH+VaXANNN+mYKGEQp098+DM2t3xKcF Q3nemt77J+0QcSSGvoPcBVUTJTvhIxyMl+yHoG0DGtW5fYsV6ivZTFiSjBxNlb+Q1d Xh4BGHz0ufAtw== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, AngeloGioacchino Del Regno Subject: [PATCH v1 1/4] arm64: dts: mediatek: cherry: Add platform thermal configuration Date: Thu, 23 Feb 2023 15:54:23 +0100 Message-Id: <20230223145426.193590-2-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230223145426.193590-1-angelogioacchino.delregno@collabora.com> References: <20230223145426.193590-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758634545218183471?= X-GMAIL-MSGID: =?utf-8?q?1758634545218183471?= This platform has three auxiliary NTC thermistors, connected to the SoC's ADC pins. Enable the auxadc in order to be able to read the ADC values, add a generic-adc-thermal LUT for each and finally assign them to the SoC's thermal zones. Signed-off-by: AngeloGioacchino Del Regno --- .../boot/dts/mediatek/mt8195-cherry.dtsi | 124 ++++++++++++++++++ 1 file changed, 124 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi index 24669093fbed..ae2052a7160d 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi @@ -104,6 +104,108 @@ ppvar_sys: regulator-ppvar-sys { regulator-boot-on; }; + tboard_thermistor1: thermal-sensor-t1 { + compatible = "generic-adc-thermal"; + #thermal-sensor-cells = <0>; + io-channels = <&auxadc 0>; + io-channel-names = "sensor-channel"; + temperature-lookup-table = < (-5000) 4241 + 0 4063 + 5000 3856 + 10000 3621 + 15000 3364 + 20000 3091 + 25000 2810 + 30000 2526 + 35000 2247 + 40000 1982 + 45000 1734 + 50000 1507 + 55000 1305 + 60000 1122 + 65000 964 + 70000 827 + 75000 710 + 80000 606 + 85000 519 + 90000 445 + 95000 382 + 100000 330 + 105000 284 + 110000 245 + 115000 213 + 120000 183 + 125000 161>; + }; + + tboard_thermistor2: thermal-sensor-t2 { + compatible = "generic-adc-thermal"; + #thermal-sensor-cells = <0>; + io-channels = <&auxadc 0>; + io-channel-names = "sensor-channel"; + temperature-lookup-table = < (-5000) 4241 + 0 4063 + 5000 3856 + 10000 3621 + 15000 3364 + 20000 3091 + 25000 2810 + 30000 2526 + 35000 2247 + 40000 1982 + 45000 1734 + 50000 1507 + 55000 1305 + 60000 1122 + 65000 964 + 70000 827 + 75000 710 + 80000 606 + 85000 519 + 90000 445 + 95000 382 + 100000 330 + 105000 284 + 110000 245 + 115000 213 + 120000 183 + 125000 161>; + }; + + tboard_thermistor3: thermal-sensor-t3 { + compatible = "generic-adc-thermal"; + #thermal-sensor-cells = <0>; + io-channels = <&auxadc 0>; + io-channel-names = "sensor-channel"; + temperature-lookup-table = < (-5000) 4241 + 0 4063 + 5000 3856 + 10000 3621 + 15000 3364 + 20000 3091 + 25000 2810 + 30000 2526 + 35000 2247 + 40000 1982 + 45000 1734 + 50000 1507 + 55000 1305 + 60000 1122 + 65000 964 + 70000 827 + 75000 710 + 80000 606 + 85000 519 + 90000 445 + 95000 382 + 100000 330 + 105000 284 + 110000 245 + 115000 213 + 120000 183 + 125000 161>; + }; + usb_vbus: regulator-5v0-usb-vbus { compatible = "regulator-fixed"; regulator-name = "usb-vbus"; @@ -243,6 +345,10 @@ &gpu { mali-supply = <&mt6315_7_vbuck1>; }; +&auxadc { + status = "okay"; +}; + &i2c0 { status = "okay"; @@ -1074,6 +1180,24 @@ mt6315_7_vbuck1: vbuck1 { }; }; +&thermal_zones { + ap_ntc1 { + polling-delay = <1000>; + polling-delay-passive = <0>; + thermal-sensors = <&tboard_thermistor1>; + }; + ap_ntc2 { + polling-delay = <1000>; + polling-delay-passive = <0>; + thermal-sensors = <&tboard_thermistor2>; + }; + ap_ntc3 { + polling-delay = <1000>; + polling-delay-passive = <0>; + thermal-sensors = <&tboard_thermistor3>; + }; +}; + &u3phy0 { status = "okay"; }; From patchwork Thu Feb 23 14:54:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 61009 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp358323wrd; Thu, 23 Feb 2023 07:02:38 -0800 (PST) X-Google-Smtp-Source: AK7set9ggFZNp77AIUd8Fx46yqDS54UU82f755PL0rMa8dqrnGRko3SBX7PO8xuMBbie0x6ujuau X-Received: by 2002:a05:6a20:9383:b0:cb:af96:9436 with SMTP id x3-20020a056a20938300b000cbaf969436mr8042077pzh.0.1677164558537; Thu, 23 Feb 2023 07:02:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677164558; cv=none; d=google.com; s=arc-20160816; b=pBP9sNdCc7MkrTRgLZ+WHJxKJVQEbGnMnJ6gMWlSVIr4Ql6BvKzoZCQ7MFg5Enig+y ntBVIqiZ66XObm4qhhd0ujk7jzjL3+OSHxGsU3m1gNaukSzdPn+E+teQSNhpTIFkcEt1 hwejJX5IWZjdSIMDrZuGZ/Ztg8FS2vaZ6W2uBCWMNKcUbw0lSWYlFlz3qAK3TyKGSoUt 9/FWWUE4dauDGa7pTdDHZZFG8t4nj96W3T4yOKBKC879rxkn9ih5N6z72ZeY0FSIdxf/ pIEGMdXBkHlktfY1yIN45tbW+5cClSjaPvGoliujizakUQ5g0LrbMTwZrpEbyLwqf3/K m4Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=REFzH4DWkHdEnZccByxIxMNmMKixf1wmFUH99pmAcUo=; b=iqa3U00tYSXwUO91Ta/TrHOiJlVo8NSMTGUWmA7G9NlX2asBm0jBlhR3+6LQU0Q/Ln 9DV6NSQ6s/B2TEcxQVlUhxkOGqbmr66dNWdISfx8BtifxY8DfHSIE4tOLWDMPP2h9nBz ZvmMHsg2BvRB30x2mopkyDYs+T5C1ncs2mo8z7yp94xAKMu0p8f75eDLhKs7KyMpKV0D WlrWhN+G2GO50KgYlQAIBkBWMXVV+fUJ0CL1okarhodW97hoyqWQwD2rIy0XyF/RRsw8 NZ9rv/e5+1ZFl59XIIKXV3zHv/LBrjnaA+41HQfhr+NDx5Sh+CEBi9GpD5Ka2XCwNr1p Ko/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=a2Qw7uaK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i23-20020a63e457000000b00502e2343db2si5648706pgk.150.2023.02.23.07.01.57; Thu, 23 Feb 2023 07:02:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=a2Qw7uaK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234559AbjBWOyk (ORCPT + 99 others); Thu, 23 Feb 2023 09:54:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234302AbjBWOyi (ORCPT ); Thu, 23 Feb 2023 09:54:38 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF83853295; Thu, 23 Feb 2023 06:54:36 -0800 (PST) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 2AAD56602217; Thu, 23 Feb 2023 14:54:35 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677164075; bh=r1iG8jDPuaedm/CyEheNxI1t1kS8LDRLHJXYGo1C1oo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a2Qw7uaKoarbfSpT2X7FiJ21QT6UUJdak/MAff4DhFgjRfqWMPOuJKVz1InWreYDT Qky9OzsU22SRt/iWayRt0EOgnFd72XXq82HfSQkNlpLwEFC7kxietNn10TZwjypv6P PlCZFHQ0DkUd1dNgfNsv1PAcEX5OX1G5woVvW3YVGIsWlDWwO626OFxN12x35rkd7+ XCE+AxIswCRNKi5SqhNXybHS1pSUU32G/I24hni3fJ2a93OMM46AeSqMzU6KGViHrQ K/aidOSGZGq9PAURMbcWacrhkzZpEQ4ZZt3WAfYaBRQAXbhfrizbgggNTn1Xwu16B1 NaQda17tZO68Q== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, AngeloGioacchino Del Regno Subject: [PATCH v1 2/4] arm64: dts: mediatek: cherry: Enable PCI-Express ports for WiFi Date: Thu, 23 Feb 2023 15:54:24 +0100 Message-Id: <20230223145426.193590-3-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230223145426.193590-1-angelogioacchino.delregno@collabora.com> References: <20230223145426.193590-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758634504393488817?= X-GMAIL-MSGID: =?utf-8?q?1758634504393488817?= On the Cherry platform, a MT7621 WiFi+Bluetooth combo is connected over PCI-Express (for WiFi) and USB (for BT): enable the PCIe ports to enable enumerating this chip. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai --- .../dts/mediatek/mt8195-cherry-tomato-r1.dts | 7 ++++++ .../boot/dts/mediatek/mt8195-cherry.dtsi | 25 +++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dts b/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dts index 2d5e8f371b6d..11fc83ddf236 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dts +++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dts @@ -20,6 +20,13 @@ &sound { model = "mt8195_r1019_5682"; }; +&pcie0 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&pcie0_pins_default>; +}; + &ts_10 { status = "okay"; }; diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi index ae2052a7160d..d679a04207d8 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi @@ -553,6 +553,13 @@ flash@0 { }; }; +&pcie1 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&pcie1_pins_default>; +}; + &pio { mediatek,rsel-resistance-in-si-unit; pinctrl-names = "default"; @@ -934,6 +941,24 @@ pins-cs { }; }; + pcie0_pins_default: pcie0-default-pins { + pins-bus { + pinmux = , + , + ; + bias-pull-up; + }; + }; + + pcie1_pins_default: pcie1-default-pins { + pins-bus { + pinmux = , + , + ; + bias-pull-up; + }; + }; + pio_default: pio-default-pins { pins-wifi-enable { pinmux = ; From patchwork Thu Feb 23 14:54:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 61011 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp358930wrd; Thu, 23 Feb 2023 07:03:24 -0800 (PST) X-Google-Smtp-Source: AK7set8Q31vw9BKecvhkikDB5DErYD8ddaLze2/wNz4L2wbXtYXsiytIuUOEOeiPd1CfZahsmFhr X-Received: by 2002:a05:6402:11c6:b0:4af:593c:c07f with SMTP id j6-20020a05640211c600b004af593cc07fmr10708147edw.3.1677164603132; Thu, 23 Feb 2023 07:03:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677164603; cv=none; d=google.com; s=arc-20160816; b=d571dOUPM3ApeottDc7fRYOpbNeF8lC/1oZ9iItz/HSyZ11gPRuEn3UHts8IDedkhP 5XFula90wmNc1jkyL8GXe2ieTNDVOeMLfvv8GfsWu6dCLroXpjucW/zYbSmAOsvmmbFS Q2qh3BXIYwm1o1fZ0ErkGqA9nTbPrO7aylkZpDKpuOJgxbOHlkTxFgKTPHswBDYQKDKa Ye43DTtgxZNSl7xB9V2jYY4PQ+bp90NjAj+NGjZct8UHETdaz4+7PWWkzVjPktHodKeK NIP2Uo6HHTm06AkUBJP+vmFUh7XQdpAXV2qFWFiHNggVbDjquIqsSJ2fQldvbDEmkVgS Qnzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fqRLzlPTEnQUVqEhTxeICvt3kSVg5OnjTVSkVV6x8I8=; b=FyA9JvxPnlgLIOg9JxqUTykxTSuqS9Fw4Z/2uHulOwCQSz+uv6N/yJevq37gw1FZLd eroYR37v8FHL0d4Y/qvNNLAQ7mITeYBTBIdxqxUKhIElNY4JBSkCcNhQqgKkHJGW0S8q XQGGbJ1PNma5fpV+hSkmugbA58irRZwvsJe0kq+Qq9UIjD/tYmdr6Q3tLzXKN971D4th y/6vC3SjDvVSiUCN2BDGkEpB42xXN6g4RrD3/MYwmLn6v814E4NbkR73Cy+k7jRPSQja j8x4tNsh0UFhJsB/YFgDMKwS4cJ0XxlAhLN5Y3esz06ZMO+O5xN5oye4ueYb5GCksifU IB+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=hDuVc56t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p8-20020a056402074800b004af65fa8733si3840168edy.113.2023.02.23.07.02.52; Thu, 23 Feb 2023 07:03:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=hDuVc56t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234671AbjBWOyq (ORCPT + 99 others); Thu, 23 Feb 2023 09:54:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234306AbjBWOyi (ORCPT ); Thu, 23 Feb 2023 09:54:38 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B15952DE6; Thu, 23 Feb 2023 06:54:37 -0800 (PST) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id BCEE06602218; Thu, 23 Feb 2023 14:54:35 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677164076; bh=2FDlNqFMvv568OceJDLOHaVPuNkoQcOewFS48O2E3K8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hDuVc56t9YVqQsWw8Z293SKRKZ++z7sXiXURKBM0uIr8fSXw2qoC0Flal9G2n9Bcg SJlLEncNL/dQTjNkoAB0Qt+TbHNsxdhXxzPkWqHT5LNMdaIStRygUpMt9pGEU2K0qH GX/rEaCMSNZZrP+4LW1dvGsAazCto1QUVBQrkGKm6n833DL1oN5pKUtODo9/CQfhDX eA/DBDYqicqHknC5cwT0n7F+sRhsU+PFKKUiIAyKGaKGJ88BVhQ11nuFdcPPX6HXf9 QwYGebToYhxPkP0bV1voaQDykZpFsLMF5eVw67S91vtBG+WPaobCGd+ng9l+NX22Qb u31Q5TMDaTu5w== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, AngeloGioacchino Del Regno Subject: [PATCH v1 3/4] arm64: dts: mediatek: mt8195: Add display pwm nodes Date: Thu, 23 Feb 2023 15:54:25 +0100 Message-Id: <20230223145426.193590-4-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230223145426.193590-1-angelogioacchino.delregno@collabora.com> References: <20230223145426.193590-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758634551017659835?= X-GMAIL-MSGID: =?utf-8?q?1758634551017659835?= Add the two hardware PWMs for display backlighting but keep them disabled by default, as usage is board-specific. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai --- arch/arm64/boot/dts/mediatek/mt8195.dtsi | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi index fecb41104193..c86c4b48dc3f 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi @@ -1102,6 +1102,29 @@ lvts_ap: thermal-sensor@1100b000 { #thermal-sensor-cells = <1>; }; + disp_pwm0: pwm@1100e000 { + compatible = "mediatek,mt8195-disp-pwm", "mediatek,mt8183-disp-pwm"; + reg = <0 0x1100e000 0 0x1000>; + interrupts = ; + power-domains = <&spm MT8195_POWER_DOMAIN_VDOSYS0>; + #pwm-cells = <2>; + clocks = <&topckgen CLK_TOP_DISP_PWM0>, + <&infracfg_ao CLK_INFRA_AO_DISP_PWM>; + clock-names = "main", "mm"; + status = "disabled"; + }; + + disp_pwm1: pwm@1100f000 { + compatible = "mediatek,mt8195-disp-pwm", "mediatek,mt8183-disp-pwm"; + reg = <0 0x1100f000 0 0x1000>; + interrupts = ; + #pwm-cells = <2>; + clocks = <&topckgen CLK_TOP_DISP_PWM1>, + <&infracfg_ao CLK_INFRA_AO_DISP_PWM1>; + clock-names = "main", "mm"; + status = "disabled"; + }; + spi1: spi@11010000 { compatible = "mediatek,mt8195-spi", "mediatek,mt6765-spi"; From patchwork Thu Feb 23 14:54:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 61008 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp358238wrd; Thu, 23 Feb 2023 07:02:31 -0800 (PST) X-Google-Smtp-Source: AK7set8pocHdvwvxNt+oEHFYJkyuXlr81kd0dHQIkcvsj0aZJ4/TbLAnCjXjhf7TS0rRnDMWUFhB X-Received: by 2002:a17:906:225d:b0:8aa:c0d5:25b1 with SMTP id 29-20020a170906225d00b008aac0d525b1mr18023747ejr.5.1677164551306; Thu, 23 Feb 2023 07:02:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677164551; cv=none; d=google.com; s=arc-20160816; b=zYVcyslN+LAHrcDsGlrgnefrQNEJsgheTJsNh0ea4y2aVLOgWVpm4TDWVJkib+DRGb TLSFbccdvEPOJaFSFqIPiZqR0VTNvLB+KxUEg+PuiR4+x0MRyMtkt+JkCp0DU7GuxOjo pbZWfFuUr08aa1J5Mi/uNnCCRwXfapDDF1j07no4K+HfAoHIOzoaw2Li+ekPenuswF5t oag5duXcIwWdQ05YPWVUx4x5WFmrZNz6nWmf9ScVr6r4Lm1Hwaj9LU95KDauk58HfI1M /IFDlEIH/mvKe6HzcPpjefvqpxma7UjYOFupapKQcG8KHGOEvHAZhmqSJWUFzYJonI6d JV/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HmaSZLeZjSQ/sfj0NzDmxDJsic9p5DXbQ+3CHJs5uhg=; b=jcYugolTAw6u9Up5Q8dRFV0G7uDs6UXk7SAISyXtuI8hqNvldwc4j477OTZ3aVUvAC 9+P4408Z4f2/iK7R6CWmsjutaOdFgS1yvn6NBGIWAj6Iur3ZxB2ODUuhV0VT2yljmkPo q8Vyxb6ZGwKKZFhJS/olbtETUn4GtGqQSsDGdBGppNcN33DLNd6htMeh9y6uCHsdJuTT MX5hWCLPiu38ajsDuQyFl8BSfEqDxdxcNh53kIJoPu6bDi1IssJ4oIIoOmHZ6qixfcJa KTY5TksFSz85sn1TIYPxb+agI60fS6qEQVETWBMZVPTQ563sec7bi7QTqS3y2DmJZzvE mwWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=KruIvXwf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z1-20020a50eb41000000b004af5153cd4asi8517526edp.26.2023.02.23.07.02.02; Thu, 23 Feb 2023 07:02:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=KruIvXwf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234185AbjBWOym (ORCPT + 99 others); Thu, 23 Feb 2023 09:54:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234409AbjBWOyi (ORCPT ); Thu, 23 Feb 2023 09:54:38 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA80C4ECDE; Thu, 23 Feb 2023 06:54:37 -0800 (PST) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 5B5306602219; Thu, 23 Feb 2023 14:54:36 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677164076; bh=EMwmDgqiKXB9Dx2NxJ/NhHjgvpsexC8a5B3Qc0K2qvw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KruIvXwfhBJ1KgQJ8MomBQ7ddTMRxdJFkotOKOZNKWW2puLevwEou1ipTyayhMYWD +RG5lQP49nVFlAmbJqLdHw6tddeqQx3O966PhIeYsTHtLsjONtLEKZCeuxstRVtlXl GgBxgCU107vCmvk288rcgohAJoP5oc5e0YcUYLCUiKlYVlY7gSMx7ip+WZraEazNIP fDumET3XZBY1J6PrGU0yI1d8nV2V1Bu3T/HsFrZIkGXrPpz05xc1uNMq/MNXHhGcOG e8hu3/KYlj9qvPWO+VqfTI97mkRag8BJuQty6SgdBhKI4f7QEXDE5lH7pjqlsJ9JPG 9vItNLGbkzOkQ== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, AngeloGioacchino Del Regno Subject: [PATCH v1 4/4] arm64: dts: mediatek: cherry: Add configuration for display backlight Date: Thu, 23 Feb 2023 15:54:26 +0100 Message-Id: <20230223145426.193590-5-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230223145426.193590-1-angelogioacchino.delregno@collabora.com> References: <20230223145426.193590-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758634496744506863?= X-GMAIL-MSGID: =?utf-8?q?1758634496744506863?= Configure the hardware PWM for the integrated display's backlight: all Cherry devices enable the backlight with GPIO82 and manage the PWM via MediaTek disp-pwm on GPIO97. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai --- .../boot/dts/mediatek/mt8195-cherry.dtsi | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi index d679a04207d8..c50f1e2914b2 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi @@ -22,6 +22,16 @@ aliases { serial0 = &uart0; }; + backlight_lcd0: backlight-lcd0 { + compatible = "pwm-backlight"; + brightness-levels = <0 1023>; + default-brightness-level = <576>; + enable-gpios = <&pio 82 GPIO_ACTIVE_HIGH>; + num-interpolated-steps = <1023>; + pwms = <&disp_pwm0 0 500000>; + power-supply = <&ppvar_sys>; + }; + chosen { stdout-path = "serial0:115200n8"; }; @@ -349,6 +359,13 @@ &auxadc { status = "okay"; }; +&disp_pwm0 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&disp_pwm0_pin_default>; +}; + &i2c0 { status = "okay"; @@ -773,6 +790,13 @@ pins-cmd-dat { }; }; + disp_pwm0_pin_default: disp-pwm0-default-pins { + pins-disp-pwm { + pinmux = , + ; + }; + }; + i2c0_pins: i2c0-default-pins { pins-bus { pinmux = ,