* Re: [PATCH v4 01/27] power: supply: add undervoltage health status property
From: Sebastian Reichel @ 2024-09-14 8:38 UTC (permalink / raw)
To: Dzmitry Sankouski
Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, Neil Armstrong,
Jessica Zhang, Sam Ravnborg, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Lee Jones, Dmitry Torokhov, Pavel Machek,
Liam Girdwood, Mark Brown, Uwe Kleine-König,
Krzysztof Kozlowski, Chanwoo Choi, Simona Vetter,
cros-qcom-dts-watchers, Konrad Dybcio, Simona Vetter, linux-pm,
linux-kernel, linux-arm-msm, linux-clk, dri-devel, devicetree,
linux-input, linux-leds, linux-pwm, linux-samsung-soc
In-Reply-To: <20240913-starqltechn_integration_upstream-v4-1-2d2efd5c5877@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1024 bytes --]
Hi,
On Fri, Sep 13, 2024 at 06:07:44PM GMT, Dzmitry Sankouski wrote:
> Add POWER_SUPPLY_HEALTH_UNDERVOLTAGE status for power supply
> to report under voltage lockout failures.
>
> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> ---
This is missing updates to
Documentation/ABI/testing/sysfs-class-power and
drivers/power/supply/power_supply_sysfs.c
(POWER_SUPPLY_HEALTH_TEXT).
Greetings,
-- Sebastian
> include/linux/power_supply.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
> index 910d407ebe63..8682e6466544 100644
> --- a/include/linux/power_supply.h
> +++ b/include/linux/power_supply.h
> @@ -58,6 +58,7 @@ enum {
> POWER_SUPPLY_HEALTH_OVERHEAT,
> POWER_SUPPLY_HEALTH_DEAD,
> POWER_SUPPLY_HEALTH_OVERVOLTAGE,
> + POWER_SUPPLY_HEALTH_UNDERVOLTAGE,
> POWER_SUPPLY_HEALTH_UNSPEC_FAILURE,
> POWER_SUPPLY_HEALTH_COLD,
> POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE,
>
> --
> 2.39.2
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply
* Re: [PATCH v3 2/3] dt-bindings: mfd: mediatek: mt6397: Convert to DT schema format
From: Macpaul Lin @ 2024-09-14 7:25 UTC (permalink / raw)
To: Rob Herring (Arm)
Cc: Bear Wang, Conor Dooley, AngeloGioacchino Del Regno,
Alexandre Belloni, Chen Zhong, linux-leds, Krzysztof Kozlowski,
Sen Chu, Lee Jones, linux-mediatek, Macpaul Lin, Mark Brown,
Chris-qj chen, linux-input, Dmitry Torokhov, linux-rtc,
MediaTek Chromebook Upstream, Sean Wang, Pavel Machek, linux-pm,
Chen-Yu Tsai, Sebastian Reichel, Alexandre Mergnat, devicetree,
Liam Girdwood, linux-kernel, linux-arm-kernel, linux-sound,
Matthias Brugger, Pablo Sun
In-Reply-To: <099c4f3e-0772-3d30-79f7-8b996142cd7c@mediatek.com>
On 9/14/24 15:06, Macpaul Lin wrote:
>
>
> On 9/14/24 03:23, Rob Herring (Arm) wrote:
>>
>>
>> External email : Please do not click links or open attachments until
>> you have verified the sender or the content.
>>
>> On Sat, 14 Sep 2024 01:59:26 +0800, Macpaul Lin wrote:
>>> Convert the mfd: mediatek: mt6397 binding to DT schema format.
>>>
>
> [snip]
>
>>>
>>
>> My bot found errors running 'make dt_binding_check' on your patch:
>>
>> yamllint warnings/errors:
>>
>> dtschema/dtc warnings/errors:
>> Warning: Duplicate compatible "mediatek,mt6357" found in schemas
>> matching "$id":
>
> I'm using dtschema 2024.09 and the dt_bindings_check didn't report this
> issue even the full check has been run.
Hopefully I've found a way to update latest dtschema without bothering
IT. ;)
pip3 install -U git+https://github.com/devicetree-org/dt-schema.git@main
I'll run latest dt_bindings_check for v4 version.
Thanks.
Macpaul Lin
^ permalink raw reply
* Re: [PATCH v3 2/3] dt-bindings: mfd: mediatek: mt6397: Convert to DT schema format
From: Macpaul Lin @ 2024-09-14 7:06 UTC (permalink / raw)
To: Rob Herring (Arm)
Cc: Bear Wang, Conor Dooley, AngeloGioacchino Del Regno,
Alexandre Belloni, Chen Zhong, linux-leds, Krzysztof Kozlowski,
Sen Chu, Lee Jones, linux-mediatek, Macpaul Lin, Mark Brown,
Chris-qj chen, linux-input, Dmitry Torokhov, linux-rtc,
MediaTek Chromebook Upstream, Sean Wang, Pavel Machek, linux-pm,
Chen-Yu Tsai, Sebastian Reichel, Alexandre Mergnat, devicetree,
Liam Girdwood, linux-kernel, linux-arm-kernel, linux-sound,
Matthias Brugger, Pablo Sun
In-Reply-To: <172625540069.478205.2893721075637493498.robh@kernel.org>
On 9/14/24 03:23, Rob Herring (Arm) wrote:
>
>
> External email : Please do not click links or open attachments until you
> have verified the sender or the content.
>
> On Sat, 14 Sep 2024 01:59:26 +0800, Macpaul Lin wrote:
>> Convert the mfd: mediatek: mt6397 binding to DT schema format.
>>
[snip]
>>
>
> My bot found errors running 'make dt_binding_check' on your patch:
>
> yamllint warnings/errors:
>
> dtschema/dtc warnings/errors:
> Warning: Duplicate compatible "mediatek,mt6357" found in schemas matching "$id":
I'm using dtschema 2024.09 and the dt_bindings_check didn't report this
issue even the full check has been run.
However, the compatible "mediatek,mt6357" indeed existed in the old
bindings. Since it is a independent DT schema now, I'll remove this line
and update v4 version to see if it will help.
Is there new version of dtschema used by bot? I guess the base shouldn't
affect this duplicate detection whether using rc-1 or next-20240906.
[snip]
>
> doc reference errors (make refcheckdocs):
>
> See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240913175926.7443-1-macpaul.lin@mediatek.com
>
> The base for the series is generally the latest rc1. A different dependency
> should be noted in *this* patch
The base of this patch set is based on next-20240906 with linux-next/master.
> If you already ran 'make dt_binding_check' and didn't see the above
> error(s), then make sure 'yamllint' is installed and dt-schema is up to
> date:
>
> pip3 install dtschema --upgrade
>
> Please check and re-submit after running the above command yourself. Note
> that DT_SCHEMA_FILES can be set to your schema file to speed up checking
> your schema. However, it must be unset to test all examples with your schema.
>
Thanks
Macpaul Lin
^ permalink raw reply
* Re: [PATCH v2] input: tegra: Use of_property_read_variable_u32_array() and of_property_present()
From: Dmitry Torokhov @ 2024-09-14 6:16 UTC (permalink / raw)
To: Rob Herring (Arm)
Cc: Laxman Dewangan, Thierry Reding, Jonathan Hunter, Thierry Reding,
linux-input, linux-tegra, linux-kernel
In-Reply-To: <20240913200827.546649-1-robh@kernel.org>
On Fri, Sep 13, 2024 at 03:08:26PM -0500, Rob Herring (Arm) wrote:
> There's no need to get the length of an DT array property before
> parsing the array. of_property_read_variable_u32_array() takes a
> minimum and maximum length and returns the actual length (or error
> code).
>
> This is part of a larger effort to remove callers of of_get_property()
> and similar functions. of_get_property() leaks the DT property data
> pointer which is a problem for dynamically allocated nodes which may
> be freed.
>
> Acked-by: Thierry Reding <treding@nvidia.com>
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Applied, thank you.
--
Dmitry
^ permalink raw reply
* Re: (subset) [PATCH HID v2 00/11] HID: bpf: add a new hook to control hid-generic
From: Benjamin Tissoires @ 2024-09-14 5:26 UTC (permalink / raw)
To: Jiri Kosina, Peter Hutterer, Vicki Pfau, Shuah Khan
Cc: linux-input, linux-kselftest, linux-kernel, bpf
In-Reply-To: <etbeblypdylnngwuwjfqkmkduk4iup7uq4c5zkwrssoi6u7jvg@gtf3gpzrloii>
On Sep 13 2024, Benjamin Tissoires wrote:
> On Sep 13 2024, Benjamin Tissoires wrote:
> > On Tue, 10 Sep 2024 23:43:36 +0900, Benjamin Tissoires wrote:
> > > This is a slight change from the fundamentals of HID-BPF.
> > > In theory, HID-BPF is abstract to the kernel itself, and makes
> > > only changes at the HID level (through report descriptors or
> > > events emitted to/from the device).
> > >
> > > However, we have seen a few use cases where HID-BPF might interact with
> > > the running kernel when the target device is already handled by a
> > > specific device.
> > >
> > > [...]
> >
> > Applied to hid/hid.git (for-6.12/bpf), thanks!
> >
> > [01/11] HID: bpf: move HID-BPF report descriptor fixup earlier
> > https://git.kernel.org/hid/hid/c/f10a11b7b599
> > [02/11] HID: core: save one kmemdup during .probe()
> > https://git.kernel.org/hid/hid/c/6941754dbbc7
> > [03/11] HID: core: remove one more kmemdup on .probe()
> > https://git.kernel.org/hid/hid/c/4fe29f36d2a3
> > [04/11] HID: bpf: allow write access to quirks field in struct hid_device
> > https://git.kernel.org/hid/hid/c/b722f588adc6
> > [05/11] selftests/hid: add dependency on hid_common.h
> > https://git.kernel.org/hid/hid/c/3d816765e12e
> > [06/11] selftests/hid: cleanup C tests by adding a common struct uhid_device
> > https://git.kernel.org/hid/hid/c/28023a0f99d1
> > [07/11] selftests/hid: allow to parametrize bus/vid/pid/rdesc on the test device
> > https://git.kernel.org/hid/hid/c/10d3147f9bb1
> > [08/11] HID: add per device quirk to force bind to hid-generic
> > https://git.kernel.org/hid/hid/c/d030f826ea47
> > [09/11] selftests/hid: add test for assigning a given device to hid-generic
> > https://git.kernel.org/hid/hid/c/10929078201f
> >
>
> Just for completeness, I've dropped 10/11 and 11/11 when applying the
> series because even if they are working it's unclear if the use case is
> rock solid, like the first one is.
>
> The patches are still on the LKML, so if anyone believes they required
> it, we can alwasy pull them in later.
And I just dropped them from for-next, I had some KASAN issues in the
testsuite, meaning that something is off in the memory allocation/free.
Cheers,
Benjamin
^ permalink raw reply
* Re: [PATCH v27 01/32] xhci: add helper to stop endpoint and wait for completion
From: Wesley Cheng @ 2024-09-13 22:14 UTC (permalink / raw)
To: Michał Pecio, mathias.nyman
Cc: Thinh.Nguyen, alsa-devel, bgoswami, broonie, conor+dt, corbet,
devicetree, dmitry.torokhov, gregkh, krzk+dt, lgirdwood,
linux-arm-msm, linux-doc, linux-input, linux-kernel, linux-sound,
linux-usb, mathias.nyman, perex, pierre-louis.bossart, robh,
srinivas.kandagatla, tiwai
In-Reply-To: <20240913103237.2f5dc796@foxbook>
Hi Michal,
On 9/13/2024 1:32 AM, Michał Pecio wrote:
> Hi,
>
>> Expose xhci_stop_endpoint_sync() which is a synchronous variant of
>> xhci_queue_stop_endpoint(). This is useful for client drivers that are
>> using the secondary interrupters, and need to stop/clean up the current
>> session. The stop endpoint command handler will also take care of
>> cleaning up the ring.
> I'm not entirely sure what you meant by "cleaning up the ring" (maybe a
> comment would be in order?), but I see nothing being done here after the
> command completes and FYI xhci-ring.c will not run the default handler if
> the command is queued with a completion, like here.
>
> At least that's the case for certain command types and there is probably
> a story behind each of them. I know that xhci_stop_device() queues a
> Stop EP with completion (and also a few without(?)). Maybe it's a bug...
Maybe the last sentence is not needed. When we are using the secondary interrupters, at least in the offload use case that I've verified with, the XHCI is completely unaware of what TDs have been queued, etc... So technically, even if we did call the default handler (ie xhci_handle_cmd_stop_ep), most of the routines to invalidate TDs are going to be no-ops.
Thanks
Wesley Cheng
^ permalink raw reply
* Re: [PATCH v3 2/3] dt-bindings: mfd: mediatek: mt6397: Convert to DT schema format
From: Rob Herring @ 2024-09-13 21:58 UTC (permalink / raw)
To: Macpaul Lin
Cc: Bear Wang, Conor Dooley, AngeloGioacchino Del Regno,
Alexandre Belloni, Chen Zhong, linux-leds, Krzysztof Kozlowski,
Sen Chu, Lee Jones, linux-mediatek, Macpaul Lin, Mark Brown,
Chris-qj chen, linux-input, Dmitry Torokhov, linux-rtc,
MediaTek Chromebook Upstream, Sean Wang, Pavel Machek, linux-pm,
Chen-Yu Tsai, Sebastian Reichel, Alexandre Mergnat, devicetree,
Liam Girdwood, linux-kernel, linux-arm-kernel, linux-sound,
Matthias Brugger, Pablo Sun
In-Reply-To: <172625540069.478205.2893721075637493498.robh@kernel.org>
On Fri, Sep 13, 2024 at 02:23:20PM -0500, Rob Herring (Arm) wrote:
>
> On Sat, 14 Sep 2024 01:59:26 +0800, Macpaul Lin wrote:
> > Convert the mfd: mediatek: mt6397 binding to DT schema format.
> >
> > MT6323, MT6358, and MT6397 are PMIC devices with multiple function
> > subdevices. They share a common PMIC design but have variations in
> > subdevice combinations.
> >
> > Key updates in this conversion:
> >
> > 1. RTC:
> > - Convert rtc-mt6397.txt and merge into parent MT6397 PMIC DT schema.
> >
> > 2. Regulators:
> > - Align to generic name "regulators".
> > - Update references from .txt to .yaml for mt6323, mt6358, and mt6397
> > regulators.
> > - Simplify regulator name labels in device tree examples.
> >
> > 3. Audio Codec:
> > - Convert sound/mt6358.txt and merge into parent MT6397 PMIC DT schema.
> > - Align to generic name "audio-codec" for codec and sound subdevices.
> > - Add "mediatek,dmic-mode" and "Avdd-supply" properties.
> >
> > 4. Clocks:
> > - Align to generic name "clocks" for clockbuffer subdevices.
> >
> > 5. LEDs:
> > - Convert leds-mt6323.txt and merge into parent MT6397 PMIC DT schema.
> > - Update LED binding.
> >
> > 6. Keys:
> > - Add detailed descriptions for power and home keys.
> > - Add compatible: mediatek,mt6358-keys.
> >
> > 7. Power Controller:
> > - Convert mt6323-poweroff.txt and merge into parent MT6397 PMIC DT
> > schema.
> > - Add #power-domain-cells property to fix dt-binding check error.
> > - Clarify "BBPU" as "Baseband power up".
> >
> > 8. Pinctrl:
> > - Align to generic name "pinctrl" instead of "pin-controller".
> >
> > Additional updates:
> > - MAINTAINERS: Add co-maintainers and reference to
> > mfd/mediatek,mt6397.yaml for LED and power-controller drivers.
> > - input/mediatek,pmic-keys.yaml: Update reference to
> > mfd/mediatek,mt6397.yaml.
> >
> > Signed-off-by: Sen Chu <sen.chu@mediatek.com>
> > Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
> > ---
> > .../bindings/input/mediatek,pmic-keys.yaml | 2 +-
> > .../devicetree/bindings/leds/leds-mt6323.txt | 63 -
> > .../bindings/mfd/mediatek,mt6397.yaml | 1078 +++++++++++++++++
> > .../devicetree/bindings/mfd/mt6397.txt | 110 --
> > .../bindings/power/reset/mt6323-poweroff.txt | 20 -
> > .../devicetree/bindings/rtc/rtc-mt6397.txt | 31 -
> > .../devicetree/bindings/sound/mt6358.txt | 26 -
> > MAINTAINERS | 8 +-
> > 8 files changed, 1085 insertions(+), 253 deletions(-)
> > delete mode 100644 Documentation/devicetree/bindings/leds/leds-mt6323.txt
> > create mode 100644 Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
> > delete mode 100644 Documentation/devicetree/bindings/mfd/mt6397.txt
> > delete mode 100644 Documentation/devicetree/bindings/power/reset/mt6323-poweroff.txt
> > delete mode 100644 Documentation/devicetree/bindings/rtc/rtc-mt6397.txt
> > delete mode 100644 Documentation/devicetree/bindings/sound/mt6358.txt
> >
> > Changes for v1:
> > - This patch depends on conversion of mediatek,mt6397-regulator.yaml
> > [1] https://lore.kernel.org/lkml/20240807091738.18387-1-macpaul.lin@mediatek.com/T/
> >
> > Changes for v2:
> > - This patch has been made base on linux-next/master git repo.
> > - Keep the parent and child relationship with mediatek,pwrap in description.
> > [2] https://lore.kernel.org/all/20240826-slurp-earphone-0d5173923ae8@spud/
> > - Keep the $ref for regulators since dt_binding_check didn't report any issue
> > based on linux-next/master repo.
> > - Fix description of mt6397/mt6323 devices, use "power management chip"
> > instead of "multifunction device"
> > - Drop unnecessary comments or description according to the review.
> > - Convert sub-modules to DT Schema:
> > - RTC, LEDs, power-controllers, regulators
> > - Drop duplicate sub node name and description for sub-modules
> > - RTC, Keys
> > - examples:
> > - drop parent pwrap node
> > - Add examples from mediatek,mt6323-regulator.yaml
> > - Add examples from mediatek,mt6358-regulator.yaml
> > - Add examples from mediatek,mt6397-regulator.yaml
> > - Complete the examples as could as possible.
> >
> > Changes for v3:
> > - Rebased on linux-next/master git repo near next-20240906.
> > - Revise commit message.
> > - Regulators:
> > - Use "additionalProperties: true" and add "contains" for matching
> > $ref DT bindings.
> > - Simplify regulator name labels in device tree examples.
> > - LEDs:
> > - Use LED bindings.
> > - Squash following patches in v2 for removing old text format DT bindings
> > into this patch, includes:
> > - leds-mt6323.txt, mt6323-poweroff.txt, rtc-mt6397.txt, sound/mt6358.txt.
> > - Fix file format of DT schemas, add blank between properties.
> > - Fix 'make checkrefdoc' errors, update reference in mediatek,pmic-keys.yaml.
> >
>
> My bot found errors running 'make dt_binding_check' on your patch:
>
> yamllint warnings/errors:
>
> dtschema/dtc warnings/errors:
> Warning: Duplicate compatible "mediatek,mt6357" found in schemas matching "$id":
> http://devicetree.org/schemas/mfd/mediatek,mt6397.yaml#
> http://devicetree.org/schemas/mfd/mediatek,mt6357.yaml#
There's a new warning in dtschema main branch.
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/mediatek,mt6397.example.dtb: pmic: regulators: False schema does not allow {'compatible': ['mediatek,mt6323-regulator'], 'buck_vproc': {'regulator-name': ['vproc'], 'regulator-min-microvolt': [[700000]], 'regulator-max-microvolt': [[1350000]], 'regulator-ramp-delay': 12500, 'regulator-always-on': True, 'regulator-boot-on': True}, 'buck_vsys': {'regulator-name': ['vsys'], 'regulator-min-microvolt': [[1400000]], 'regulator-max-microvolt': [[2987500]], 'regulator-ramp-delay': 25000, 'regulator-always-on': True, 'regulator-boot-on': True}, 'buck_vpa': {'regulator-name': ['vpa'], 'regulator-min-microvolt': [[500000]], 'regulator-max-microvolt': [[3650000]]}, 'ldo_vtcxo': {'regulator-name': ['vtcxo'], 'regulator-min-microvolt': [[2800000]], 'regulator-max-microvolt': [[2800000]], 'regulator-enable-ramp-delay': 90, 'regulator-always-on': True, 'regulator-boot-on': True}, 'ldo_vcn28': {'regulator-name': ['vcn28'], 'regulator-min-microvolt': [[2800000]], 'regulator-max-microvolt': [[2800000]], 'regulator-enable-ramp-delay': 185}, 'ldo_vcn33_bt': {'regulator-name': ['vcn33_bt'], 'regulator-min-microvolt': [[3300000]], 'regulator-max-microvolt': [[3600000]], 'regulator-enable-ramp-delay': 185}, 'ldo_vcn33_wifi': {'regulator-name': ['vcn33_wifi'], 'regulator-min-microvolt': [[3300000]], 'regulator-max-microvolt': [[3600000]], 'regulator-enable-ramp-delay': 185}, 'ldo_va': {'regulator-name': ['va'], 'regulator-min-microvolt': [[2800000]], 'regulator-max-microvolt': [[2800000]], 'regulator-enable-ramp-delay': 216, 'regulator-always-on': True, 'regulator-boot-on': True}, 'ldo_vcama': {'regulator-name': ['vcama'], 'regulator-min-microvolt': [[1500000]], 'regulator-max-microvolt': [[2800000]], 'regulator-enable-ramp-delay': 216}, 'ldo_vio28': {'regulator-name': ['vio28'], 'regulator-min-microvolt': [[2800000]], 'regulator-max-microvolt': [[2800000]], 'regulator-enable-ramp-delay': 216, 'regulator-always-on': True, 'regulator-boot-on': True}, 'ldo_vusb': {'regulator-name': ['vusb'], 'regulator-min-microvolt': [[3300000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 216, 'regulator-boot-on': True}, 'ldo_vmc': {'regulator-name': ['vmc'], 'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 36, 'regulator-boot-on': True}, 'ldo_vmch': {'regulator-name': ['vmch'], 'regulator-min-microvolt': [[3000000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 36, 'regulator-boot-on': True}, 'ldo_vemc3v3': {'regulator-name': ['vemc3v3'], 'regulator-min-microvolt': [[3000000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 36, 'regulator-boot-on': True}, 'ldo_vgp1': {'regulator-name': ['vgp1'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 216}, 'ldo_vgp2': {'regulator-name': ['vgp2'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[3000000]], 'regulator-enable-ramp-delay': 216}, 'ldo_vgp3': {'regulator-name': ['vgp3'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[1800000]], 'regulator-enable-ramp-delay': 216}, 'ldo_vcn18': {'regulator-name': ['vcn18'], 'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[1800000]], 'regulator-enable-ramp-delay': 216}, 'ldo_vsim1': {'regulator-name': ['vsim1'], 'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[3000000]], 'regulator-enable-ramp-delay': 216}, 'ldo_vsim2': {'regulator-name': ['vsim2'], 'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[3000000]], 'regulator-enable-ramp-delay': 216}, 'ldo_vrtc': {'regulator-name': ['vrtc'], 'regulator-min-microvolt': [[2800000]], 'regulator-max-microvolt': [[2800000]], 'regulator-always-on': True, 'regulator-boot-on': True}, 'ldo_vcamaf': {'regulator-name': ['vcamaf'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 216}, 'ldo_vibr': {'regulator-name': ['vibr'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 36}, 'ldo_vrf18': {'regulator-name': ['vrf18'], 'regulator-min-microvolt': [[1825000]], 'regulator-max-microvolt': [[1825000]], 'regulator-enable-ramp-delay': 187}, 'ldo_vm': {'regulator-name': ['vm'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[1800000]], 'regulator-enable-ramp-delay': 216, 'regulator-always-on': True, 'regulator-boot-on': True}, 'ldo_vio18': {'regulator-name': ['vio18'], 'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[1800000]], 'regulator-enable-ramp-delay': 216, 'regulator-always-on': True, 'regulator-boot-on': True}, 'ldo_vcamd': {'regulator-name': ['vcamd'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[1800000]], 'regulator-enable-ramp-delay': 216}, 'ldo_vcamio': {'regulator-name': ['vcamio'], 'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[1800000]], 'regulator-enable-ramp-delay': 216}}
> from schema $id: http://devicetree.org/schemas/mfd/mediatek,mt6397.yaml#
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/mediatek,mt6397.example.dtb: pmic: regulators: False schema does not allow {'compatible': ['mediatek,mt6397-regulator'], 'buck_vpca15': {'regulator-name': ['vpca15'], 'regulator-min-microvolt': [[850000]], 'regulator-max-microvolt': [[1350000]], 'regulator-ramp-delay': 12500, 'regulator-enable-ramp-delay': 200}, 'buck_vpca7': {'regulator-name': ['vpca7'], 'regulator-min-microvolt': [[850000]], 'regulator-max-microvolt': [[1350000]], 'regulator-ramp-delay': 12500, 'regulator-enable-ramp-delay': 115}, 'buck_vsramca15': {'regulator-name': ['vsramca15'], 'regulator-min-microvolt': [[850000]], 'regulator-max-microvolt': [[1350000]], 'regulator-ramp-delay': 12500, 'regulator-enable-ramp-delay': 115}, 'buck_vsramca7': {'regulator-name': ['vsramca7'], 'regulator-min-microvolt': [[850000]], 'regulator-max-microvolt': [[1350000]], 'regulator-ramp-delay': 12500, 'regulator-enable-ramp-delay': 115}, 'buck_vcore': {'regulator-name': ['vcore'], 'regulator-min-microvolt': [[850000]], 'regulator-max-microvolt': [[1350000]], 'regulator-ramp-delay': 12500, 'regulator-enable-ramp-delay': 115}, 'buck_vgpu': {'regulator-name': ['vgpu'], 'regulator-min-microvolt': [[700000]], 'regulator-max-microvolt': [[1350000]], 'regulator-ramp-delay': 12500, 'regulator-enable-ramp-delay': 115}, 'buck_vdrm': {'regulator-name': ['vdrm'], 'regulator-min-microvolt': [[800000]], 'regulator-max-microvolt': [[1400000]], 'regulator-ramp-delay': 12500, 'regulator-enable-ramp-delay': 500}, 'buck_vio18': {'regulator-name': ['vio18'], 'regulator-min-microvolt': [[1500000]], 'regulator-max-microvolt': [[2120000]], 'regulator-ramp-delay': 12500, 'regulator-enable-ramp-delay': 500}, 'ldo_vtcxo': {'regulator-name': ['vtcxo'], 'regulator-min-microvolt': [[2800000]], 'regulator-max-microvolt': [[2800000]], 'regulator-enable-ramp-delay': 90}, 'ldo_va28': {'regulator-name': ['va28'], 'regulator-enable-ramp-delay': 218}, 'ldo_vcama': {'regulator-name': ['vcama'], 'regulator-min-microvolt': [[1500000]], 'regulator-max-microvolt': [[2800000]], 'regulator-enable-ramp-delay': 218}, 'ldo_vio28': {'regulator-name': ['vio28'], 'regulator-enable-ramp-delay': 240}, 'ldo_vusb': {'regulator-name': ['vusb'], 'regulator-enable-ramp-delay': 218}, 'ldo_vmc': {'regulator-name': ['vmc'], 'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 218}, 'ldo_vmch': {'regulator-name': ['vmch'], 'regulator-min-microvolt': [[3000000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 218}, 'ldo_vemc3v3': {'regulator-name': ['vemc_3v3'], 'regulator-min-microvolt': [[3000000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 218}, 'ldo_vgp1': {'regulator-name': ['vcamd'], 'regulator-min-microvolt': [[1220000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 240}, 'ldo_vgp2': {'regulator-name': ['vcamio'], 'regulator-min-microvolt': [[1000000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 218}, 'ldo_vgp3': {'regulator-name': ['vcamaf'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 218}, 'ldo_vgp4': {'regulator-name': ['vgp4'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 218}, 'ldo_vgp5': {'regulator-name': ['vgp5'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[3000000]], 'regulator-enable-ramp-delay': 218}, 'ldo_vgp6': {'regulator-name': ['vgp6'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 218}, 'ldo_vibr': {'regulator-name': ['vibr'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 218}}
> from schema $id: http://devicetree.org/schemas/mfd/mediatek,mt6397.yaml#
This probably fails because the threading of your series seems to be
messed up.
Rob
^ permalink raw reply
* Re: [PATCH v4 05/27] dt-bindings: mfd: add maxim,max77705
From: Rob Herring @ 2024-09-13 21:55 UTC (permalink / raw)
To: Dzmitry Sankouski
Cc: Sebastian Reichel, Bjorn Andersson, Michael Turquette,
Stephen Boyd, Neil Armstrong, Jessica Zhang, Sam Ravnborg,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Dmitry Torokhov,
Pavel Machek, Liam Girdwood, Mark Brown, Uwe Kleine-König,
Krzysztof Kozlowski, Chanwoo Choi, Simona Vetter,
cros-qcom-dts-watchers, Konrad Dybcio, Simona Vetter, linux-pm,
linux-kernel, linux-arm-msm, linux-clk, dri-devel, devicetree,
linux-input, linux-leds, linux-pwm, linux-samsung-soc
In-Reply-To: <20240913-starqltechn_integration_upstream-v4-5-2d2efd5c5877@gmail.com>
On Fri, Sep 13, 2024 at 06:07:48PM +0300, Dzmitry Sankouski wrote:
> Add maxim,max77705 core binding part.
>
> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
>
> ---
> Changes in v4:
> - change dts example intendation from tabs
> to spaces
> - remove interrupt-names property
> - remove obvious reg description
> - split long(>80) lines
> ---
> .../devicetree/bindings/mfd/maxim,max77705.yaml | 169 +++++++++++++++++++++
> MAINTAINERS | 1 +
> 2 files changed, 170 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/mfd/maxim,max77705.yaml b/Documentation/devicetree/bindings/mfd/maxim,max77705.yaml
> new file mode 100644
> index 000000000000..40a67d15e312
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/maxim,max77705.yaml
> @@ -0,0 +1,169 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mfd/maxim,max77705.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Maxim MAX77705 Companion Power Management IC and USB Type-C interface IC
> +
> +maintainers:
> + - Dzmitry Sankouski <dsankouski@gmail.com>
> +
> +description: |
> + This is a part of device tree bindings for Maxim MAX77705 multi functional
> + device.
> +
> + The Maxim MAX77705 is a Companion Power Management and Type-C
> + interface IC which includes charger, fuelgauge, LED, haptic motor driver and
> + Type-C management IC.
> +
> +properties:
> + compatible:
> + const: maxim,max77705
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + charger:
> + $ref: /schemas/power/supply/power-supply.yaml
> + additionalProperties: true
No, true is only valid for incomplete schemas (i.e. common ones included
by another complete schema).
And since you reference another schema, you want 'unevaluatedProperties'
instead if you want to use any properties defined in power-supply.yaml.
> + properties:
> + compatible:
> + const: maxim,max77705-charger
> +
> + required:
> + - compatible
> + - monitored-battery
> +
> + fuel_gauge:
fuel-gauge
> + $ref: /schemas/power/supply/power-supply.yaml
> + type: object
> + additionalProperties: true
> + description: MAX77705 fuel gauge with ModelGauge m5 EZ algorithm support.
blank line
> + properties:
> + compatible:
> + const: maxim,max77705-fuel-gauge
> +
> + shunt-resistor-micro-ohms:
> + description: |
Don't need '|'.
> + The value of current sense resistor in microohms.
> +
> + required:
> + - compatible
> + - shunt-resistor-micro-ohms
> + - monitored-battery
> + - power-supplies
> +
> + haptic:
> + type: object
> + additionalProperties: false
blank line
> + properties:
> + compatible:
> + const: maxim,max77705-haptic
> +
> + haptic-supply: true
> +
> + pwms:
> + maxItems: 1
> +
> + required:
> + - compatible
> + - haptic-supply
> + - pwms
> +
> + leds:
> + type: object
> + additionalProperties: false
> + description:
> + Up to 4 LEDs supported. One LED is represented by one child node.
blank line
> + properties:
> + compatible:
> + const: maxim,max77705-led
> +
> + "#address-cells":
> + const: 1
> +
> + "#size-cells":
> + const: 0
> +
> + patternProperties:
> + "^led@[0-3]$":
> + type: object
> + $ref: /schemas/leds/common.yaml#
blank line
> + properties:
> + reg:
> + description:
> + LED index.
blank line
> + unevaluatedProperties: false
blank line
> + required:
> + - reg
> +
> + required:
> + - compatible
> +
> +required:
> + - compatible
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/irq.h>
> + #include <dt-bindings/leds/common.h>
> +
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + pmic@66 {
> + compatible = "maxim,max77705";
> + reg = <0x66>;
> + interrupt-parent = <&pm8998_gpios>;
> + interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
> + pinctrl-0 = <&chg_int_default>;
> + pinctrl-names = "default";
> +
> + leds {
> + compatible = "maxim,max77705-led";
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + led@1 {
> + reg = <1>;
> + label = "red:usr1";
> + };
> +
> + led@2 {
> + reg = <2>;
> + label = "green:usr2";
> + };
> +
> + led@3 {
> + reg = <3>;
> + label = "blue:usr3";
> + };
> + };
> +
> + max77705_charger: charger {
> + compatible = "maxim,max77705-charger";
> + monitored-battery = <&battery>;
> + };
> +
> + fuel_gauge {
> + compatible = "maxim,max77705-fuel-gauge";
> + monitored-battery = <&battery>;
> + power-supplies = <&max77705_charger>;
> + rsense = <5>;
Not documented.
> + };
> +
> +
> + haptic {
> + compatible = "maxim,max77705-haptic";
> + haptic-supply = <&vib_regulator>;
> + pwms = <&vib_pwm 0 50000>;
> + };
> + };
> + };
> diff --git a/MAINTAINERS b/MAINTAINERS
> index b65cfa1d322d..59d027591e34 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -14064,6 +14064,7 @@ B: mailto:linux-samsung-soc@vger.kernel.org
> F: Documentation/devicetree/bindings/*/maxim,max14577.yaml
> F: Documentation/devicetree/bindings/*/maxim,max77686.yaml
> F: Documentation/devicetree/bindings/*/maxim,max77693.yaml
> +F: Documentation/devicetree/bindings/*/maxim,max77705*.yaml
> F: Documentation/devicetree/bindings/*/maxim,max77843.yaml
> F: Documentation/devicetree/bindings/clock/maxim,max77686.txt
> F: drivers/*/*max77843.c
>
> --
> 2.39.2
>
^ permalink raw reply
* [hid:for-6.12/bpf 6/15] drivers/hid/hid-core.c:2689:52: error: passing 'const __u8 *' (aka 'const unsigned char *') to parameter of type 'u8 *' (aka 'unsigned char *') discards qualifiers
From: kernel test robot @ 2024-09-13 20:10 UTC (permalink / raw)
To: Benjamin Tissoires; +Cc: llvm, oe-kbuild-all, linux-input, Peter Hutterer
tree: https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-6.12/bpf
head: d46a60c7a795ef0a115e27235b88dcecc78b8c26
commit: f10a11b7b599467153f679d35ed4712bbbec918f [6/15] HID: bpf: move HID-BPF report descriptor fixup earlier
config: arm-jornada720_defconfig (https://download.01.org/0day-ci/archive/20240914/202409140413.DizXFslQ-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project bf684034844c660b778f0eba103582f582b710c9)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240914/202409140413.DizXFslQ-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409140413.DizXFslQ-lkp@intel.com/
Note: the hid/for-6.12/bpf HEAD d46a60c7a795ef0a115e27235b88dcecc78b8c26 builds fine.
It only hurts bisectability.
All errors (new ones prefixed by >>):
In file included from drivers/hid/hid-core.c:21:
In file included from include/linux/mm.h:2228:
include/linux/vmstat.h:517:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
517 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
>> drivers/hid/hid-core.c:2689:52: error: passing 'const __u8 *' (aka 'const unsigned char *') to parameter of type 'u8 *' (aka 'unsigned char *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
2689 | hdev->bpf_rdesc = call_hid_bpf_rdesc_fixup(hdev, hdev->dev_rdesc,
| ^~~~~~~~~~~~~~~
include/linux/hid_bpf.h:231:73: note: passing argument to parameter 'rdesc' here
231 | static inline u8 *call_hid_bpf_rdesc_fixup(struct hid_device *hdev, u8 *rdesc,
| ^
1 warning and 1 error generated.
vim +2689 drivers/hid/hid-core.c
2681
2682 static int __hid_device_probe(struct hid_device *hdev, struct hid_driver *hdrv)
2683 {
2684 const struct hid_device_id *id;
2685 int ret;
2686
2687 if (!hdev->bpf_rsize) {
2688 hdev->bpf_rsize = hdev->dev_rsize;
> 2689 hdev->bpf_rdesc = call_hid_bpf_rdesc_fixup(hdev, hdev->dev_rdesc,
2690 &hdev->bpf_rsize);
2691 }
2692
2693 if (!hid_check_device_match(hdev, hdrv, &id))
2694 return -ENODEV;
2695
2696 hdev->devres_group_id = devres_open_group(&hdev->dev, NULL, GFP_KERNEL);
2697 if (!hdev->devres_group_id)
2698 return -ENOMEM;
2699
2700 /* reset the quirks that has been previously set */
2701 hdev->quirks = hid_lookup_quirk(hdev);
2702 hdev->driver = hdrv;
2703
2704 if (hdrv->probe) {
2705 ret = hdrv->probe(hdev, id);
2706 } else { /* default probe */
2707 ret = hid_open_report(hdev);
2708 if (!ret)
2709 ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
2710 }
2711
2712 /*
2713 * Note that we are not closing the devres group opened above so
2714 * even resources that were attached to the device after probe is
2715 * run are released when hid_device_remove() is executed. This is
2716 * needed as some drivers would allocate additional resources,
2717 * for example when updating firmware.
2718 */
2719
2720 if (ret) {
2721 devres_release_group(&hdev->dev, hdev->devres_group_id);
2722 hid_close_report(hdev);
2723 hdev->driver = NULL;
2724 }
2725
2726 return ret;
2727 }
2728
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply
* [PATCH v2] input: tegra: Use of_property_read_variable_u32_array() and of_property_present()
From: Rob Herring (Arm) @ 2024-09-13 20:08 UTC (permalink / raw)
To: Laxman Dewangan, Dmitry Torokhov, Thierry Reding, Jonathan Hunter
Cc: Thierry Reding, linux-input, linux-tegra, linux-kernel
There's no need to get the length of an DT array property before
parsing the array. of_property_read_variable_u32_array() takes a
minimum and maximum length and returns the actual length (or error
code).
This is part of a larger effort to remove callers of of_get_property()
and similar functions. of_get_property() leaks the DT property data
pointer which is a problem for dynamically allocated nodes which may
be freed.
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
v2:
- Fix missing Sob
---
drivers/input/keyboard/tegra-kbc.c | 72 +++++++++++-------------------
1 file changed, 27 insertions(+), 45 deletions(-)
diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c
index 204ba189807e..6776dd94ce76 100644
--- a/drivers/input/keyboard/tegra-kbc.c
+++ b/drivers/input/keyboard/tegra-kbc.c
@@ -484,12 +484,10 @@ static int tegra_kbc_parse_dt(struct tegra_kbc *kbc)
struct device_node *np = kbc->dev->of_node;
u32 prop;
int i;
- u32 num_rows = 0;
- u32 num_cols = 0;
+ int num_rows;
+ int num_cols;
u32 cols_cfg[KBC_MAX_GPIO];
u32 rows_cfg[KBC_MAX_GPIO];
- int proplen;
- int ret;
if (!of_property_read_u32(np, "nvidia,debounce-delay-ms", &prop))
kbc->debounce_cnt = prop;
@@ -503,56 +501,23 @@ static int tegra_kbc_parse_dt(struct tegra_kbc *kbc)
of_property_read_bool(np, "nvidia,wakeup-source")) /* legacy */
kbc->wakeup = true;
- if (!of_get_property(np, "nvidia,kbc-row-pins", &proplen)) {
- dev_err(kbc->dev, "property nvidia,kbc-row-pins not found\n");
- return -ENOENT;
- }
- num_rows = proplen / sizeof(u32);
-
- if (!of_get_property(np, "nvidia,kbc-col-pins", &proplen)) {
- dev_err(kbc->dev, "property nvidia,kbc-col-pins not found\n");
- return -ENOENT;
- }
- num_cols = proplen / sizeof(u32);
-
- if (num_rows > kbc->hw_support->max_rows) {
- dev_err(kbc->dev,
- "Number of rows is more than supported by hardware\n");
- return -EINVAL;
- }
-
- if (num_cols > kbc->hw_support->max_columns) {
- dev_err(kbc->dev,
- "Number of cols is more than supported by hardware\n");
- return -EINVAL;
- }
-
- if (!of_get_property(np, "linux,keymap", &proplen)) {
+ if (!of_property_present(np, "linux,keymap")) {
dev_err(kbc->dev, "property linux,keymap not found\n");
return -ENOENT;
}
- if (!num_rows || !num_cols || ((num_rows + num_cols) > KBC_MAX_GPIO)) {
- dev_err(kbc->dev,
- "keypad rows/columns not properly specified\n");
- return -EINVAL;
- }
-
/* Set all pins as non-configured */
for (i = 0; i < kbc->num_rows_and_columns; i++)
kbc->pin_cfg[i].type = PIN_CFG_IGNORE;
- ret = of_property_read_u32_array(np, "nvidia,kbc-row-pins",
- rows_cfg, num_rows);
- if (ret < 0) {
+ num_rows = of_property_read_variable_u32_array(np, "nvidia,kbc-row-pins",
+ rows_cfg, 1, KBC_MAX_GPIO);
+ if (num_rows < 0) {
dev_err(kbc->dev, "Rows configurations are not proper\n");
- return -EINVAL;
- }
-
- ret = of_property_read_u32_array(np, "nvidia,kbc-col-pins",
- cols_cfg, num_cols);
- if (ret < 0) {
- dev_err(kbc->dev, "Cols configurations are not proper\n");
+ return num_rows;
+ } else if (num_rows > kbc->hw_support->max_rows) {
+ dev_err(kbc->dev,
+ "Number of rows is more than supported by hardware\n");
return -EINVAL;
}
@@ -561,11 +526,28 @@ static int tegra_kbc_parse_dt(struct tegra_kbc *kbc)
kbc->pin_cfg[rows_cfg[i]].num = i;
}
+ num_cols = of_property_read_variable_u32_array(np, "nvidia,kbc-col-pins",
+ cols_cfg, 1, KBC_MAX_GPIO);
+ if (num_cols < 0) {
+ dev_err(kbc->dev, "Cols configurations are not proper\n");
+ return num_cols;
+ } else if (num_cols > kbc->hw_support->max_columns) {
+ dev_err(kbc->dev,
+ "Number of cols is more than supported by hardware\n");
+ return -EINVAL;
+ }
+
for (i = 0; i < num_cols; i++) {
kbc->pin_cfg[cols_cfg[i]].type = PIN_CFG_COL;
kbc->pin_cfg[cols_cfg[i]].num = i;
}
+ if (!num_rows || !num_cols || ((num_rows + num_cols) > KBC_MAX_GPIO)) {
+ dev_err(kbc->dev,
+ "keypad rows/columns not properly specified\n");
+ return -EINVAL;
+ }
+
return 0;
}
--
2.45.2
^ permalink raw reply related
* Re: [PATCH] input: tegra: Use of_property_read_variable_u32_array() and of_property_present()
From: Rob Herring @ 2024-09-13 20:06 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Laxman Dewangan, Jonathan Hunter, linux-input, linux-tegra,
linux-kernel, Thierry Reding
In-Reply-To: <ZtqULBqqDXydmnaL@google.com>
On Fri, Sep 6, 2024 at 12:33 AM Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
>
> On Tue, Aug 27, 2024 at 10:53:38AM -0700, Dmitry Torokhov wrote:
> > >
> > > Applied, thank you.
> >
> > Oh, wait, can I get your SOB please?
>
> Rob, I am still waiting on your SOB please.
Oh, missed this. That's weird it is missing. New patch coming.
Rob
^ permalink raw reply
* Re: [PATCH v3 2/3] dt-bindings: mfd: mediatek: mt6397: Convert to DT schema format
From: Rob Herring (Arm) @ 2024-09-13 19:23 UTC (permalink / raw)
To: Macpaul Lin
Cc: Bear Wang, Conor Dooley, AngeloGioacchino Del Regno,
Alexandre Belloni, Chen Zhong, linux-leds, Krzysztof Kozlowski,
Sen Chu, Lee Jones, linux-mediatek, Macpaul Lin, Mark Brown,
Chris-qj chen, linux-input, Dmitry Torokhov, linux-rtc,
MediaTek Chromebook Upstream, Sean Wang, Pavel Machek, linux-pm,
Chen-Yu Tsai, Sebastian Reichel, Alexandre Mergnat, devicetree,
Liam Girdwood, linux-kernel, linux-arm-kernel, linux-sound,
Matthias Brugger, Pablo Sun
In-Reply-To: <20240913175926.7443-1-macpaul.lin@mediatek.com>
On Sat, 14 Sep 2024 01:59:26 +0800, Macpaul Lin wrote:
> Convert the mfd: mediatek: mt6397 binding to DT schema format.
>
> MT6323, MT6358, and MT6397 are PMIC devices with multiple function
> subdevices. They share a common PMIC design but have variations in
> subdevice combinations.
>
> Key updates in this conversion:
>
> 1. RTC:
> - Convert rtc-mt6397.txt and merge into parent MT6397 PMIC DT schema.
>
> 2. Regulators:
> - Align to generic name "regulators".
> - Update references from .txt to .yaml for mt6323, mt6358, and mt6397
> regulators.
> - Simplify regulator name labels in device tree examples.
>
> 3. Audio Codec:
> - Convert sound/mt6358.txt and merge into parent MT6397 PMIC DT schema.
> - Align to generic name "audio-codec" for codec and sound subdevices.
> - Add "mediatek,dmic-mode" and "Avdd-supply" properties.
>
> 4. Clocks:
> - Align to generic name "clocks" for clockbuffer subdevices.
>
> 5. LEDs:
> - Convert leds-mt6323.txt and merge into parent MT6397 PMIC DT schema.
> - Update LED binding.
>
> 6. Keys:
> - Add detailed descriptions for power and home keys.
> - Add compatible: mediatek,mt6358-keys.
>
> 7. Power Controller:
> - Convert mt6323-poweroff.txt and merge into parent MT6397 PMIC DT
> schema.
> - Add #power-domain-cells property to fix dt-binding check error.
> - Clarify "BBPU" as "Baseband power up".
>
> 8. Pinctrl:
> - Align to generic name "pinctrl" instead of "pin-controller".
>
> Additional updates:
> - MAINTAINERS: Add co-maintainers and reference to
> mfd/mediatek,mt6397.yaml for LED and power-controller drivers.
> - input/mediatek,pmic-keys.yaml: Update reference to
> mfd/mediatek,mt6397.yaml.
>
> Signed-off-by: Sen Chu <sen.chu@mediatek.com>
> Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
> ---
> .../bindings/input/mediatek,pmic-keys.yaml | 2 +-
> .../devicetree/bindings/leds/leds-mt6323.txt | 63 -
> .../bindings/mfd/mediatek,mt6397.yaml | 1078 +++++++++++++++++
> .../devicetree/bindings/mfd/mt6397.txt | 110 --
> .../bindings/power/reset/mt6323-poweroff.txt | 20 -
> .../devicetree/bindings/rtc/rtc-mt6397.txt | 31 -
> .../devicetree/bindings/sound/mt6358.txt | 26 -
> MAINTAINERS | 8 +-
> 8 files changed, 1085 insertions(+), 253 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/leds/leds-mt6323.txt
> create mode 100644 Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
> delete mode 100644 Documentation/devicetree/bindings/mfd/mt6397.txt
> delete mode 100644 Documentation/devicetree/bindings/power/reset/mt6323-poweroff.txt
> delete mode 100644 Documentation/devicetree/bindings/rtc/rtc-mt6397.txt
> delete mode 100644 Documentation/devicetree/bindings/sound/mt6358.txt
>
> Changes for v1:
> - This patch depends on conversion of mediatek,mt6397-regulator.yaml
> [1] https://lore.kernel.org/lkml/20240807091738.18387-1-macpaul.lin@mediatek.com/T/
>
> Changes for v2:
> - This patch has been made base on linux-next/master git repo.
> - Keep the parent and child relationship with mediatek,pwrap in description.
> [2] https://lore.kernel.org/all/20240826-slurp-earphone-0d5173923ae8@spud/
> - Keep the $ref for regulators since dt_binding_check didn't report any issue
> based on linux-next/master repo.
> - Fix description of mt6397/mt6323 devices, use "power management chip"
> instead of "multifunction device"
> - Drop unnecessary comments or description according to the review.
> - Convert sub-modules to DT Schema:
> - RTC, LEDs, power-controllers, regulators
> - Drop duplicate sub node name and description for sub-modules
> - RTC, Keys
> - examples:
> - drop parent pwrap node
> - Add examples from mediatek,mt6323-regulator.yaml
> - Add examples from mediatek,mt6358-regulator.yaml
> - Add examples from mediatek,mt6397-regulator.yaml
> - Complete the examples as could as possible.
>
> Changes for v3:
> - Rebased on linux-next/master git repo near next-20240906.
> - Revise commit message.
> - Regulators:
> - Use "additionalProperties: true" and add "contains" for matching
> $ref DT bindings.
> - Simplify regulator name labels in device tree examples.
> - LEDs:
> - Use LED bindings.
> - Squash following patches in v2 for removing old text format DT bindings
> into this patch, includes:
> - leds-mt6323.txt, mt6323-poweroff.txt, rtc-mt6397.txt, sound/mt6358.txt.
> - Fix file format of DT schemas, add blank between properties.
> - Fix 'make checkrefdoc' errors, update reference in mediatek,pmic-keys.yaml.
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
Warning: Duplicate compatible "mediatek,mt6357" found in schemas matching "$id":
http://devicetree.org/schemas/mfd/mediatek,mt6397.yaml#
http://devicetree.org/schemas/mfd/mediatek,mt6357.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/mediatek,mt6397.example.dtb: pmic: regulators: False schema does not allow {'compatible': ['mediatek,mt6323-regulator'], 'buck_vproc': {'regulator-name': ['vproc'], 'regulator-min-microvolt': [[700000]], 'regulator-max-microvolt': [[1350000]], 'regulator-ramp-delay': 12500, 'regulator-always-on': True, 'regulator-boot-on': True}, 'buck_vsys': {'regulator-name': ['vsys'], 'regulator-min-microvolt': [[1400000]], 'regulator-max-microvolt': [[2987500]], 'regulator-ramp-delay': 25000, 'regulator-always-on': True, 'regulator-boot-on': True}, 'buck_vpa': {'regulator-name': ['vpa'], 'regulator-min-microvolt': [[500000]], 'regulator-max-microvolt': [[3650000]]}, 'ldo_vtcxo': {'regulator-name': ['vtcxo'], 'regulator-min-microvolt': [[2800000]], 'regulator-max-microvolt': [[2800000]], 'regulator-enable-ramp-delay': 90, 'regulator-always-on': True, 'regulator-boot-on': True}, 'ldo_vcn28': {'regulator-name': ['vcn28'], 'regulator-min-microvolt': [[2800000]], 'regulator-max-microvolt': [[2800000]], 'regulator-enable-ramp-delay': 185}, 'ldo_vcn33_bt': {'regulator-name': ['vcn33_bt'], 'regulator-min-microvolt': [[3300000]], 'regulator-max-microvolt': [[3600000]], 'regulator-enable-ramp-delay': 185}, 'ldo_vcn33_wifi': {'regulator-name': ['vcn33_wifi'], 'regulator-min-microvolt': [[3300000]], 'regulator-max-microvolt': [[3600000]], 'regulator-enable-ramp-delay': 185}, 'ldo_va': {'regulator-name': ['va'], 'regulator-min-microvolt': [[2800000]], 'regulator-max-microvolt': [[2800000]], 'regulator-enable-ramp-delay': 216, 'regulator-always-on': True, 'regulator-boot-on': True}, 'ldo_vcama': {'regulator-name': ['vcama'], 'regulator-min-microvolt': [[1500000]], 'regulator-max-microvolt': [[2800000]], 'regulator-enable-ramp-delay': 216}, 'ldo_vio28': {'regulator-name': ['vio28'], 'regulator-min-microvolt': [[2800000]], 'regulator-max-microvolt': [[2800000]], 'regulator-enable-ramp-delay': 216, 'regulator-always-on': True, 'regulator-boot-on': True}, 'ldo_vusb': {'regulator-name': ['vusb'], 'regulator-min-microvolt': [[3300000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 216, 'regulator-boot-on': True}, 'ldo_vmc': {'regulator-name': ['vmc'], 'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 36, 'regulator-boot-on': True}, 'ldo_vmch': {'regulator-name': ['vmch'], 'regulator-min-microvolt': [[3000000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 36, 'regulator-boot-on': True}, 'ldo_vemc3v3': {'regulator-name': ['vemc3v3'], 'regulator-min-microvolt': [[3000000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 36, 'regulator-boot-on': True}, 'ldo_vgp1': {'regulator-name': ['vgp1'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 216}, 'ldo_vgp2': {'regulator-name': ['vgp2'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[3000000]], 'regulator-enable-ramp-delay': 216}, 'ldo_vgp3': {'regulator-name': ['vgp3'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[1800000]], 'regulator-enable-ramp-delay': 216}, 'ldo_vcn18': {'regulator-name': ['vcn18'], 'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[1800000]], 'regulator-enable-ramp-delay': 216}, 'ldo_vsim1': {'regulator-name': ['vsim1'], 'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[3000000]], 'regulator-enable-ramp-delay': 216}, 'ldo_vsim2': {'regulator-name': ['vsim2'], 'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[3000000]], 'regulator-enable-ramp-delay': 216}, 'ldo_vrtc': {'regulator-name': ['vrtc'], 'regulator-min-microvolt': [[2800000]], 'regulator-max-microvolt': [[2800000]], 'regulator-always-on': True, 'regulator-boot-on': True}, 'ldo_vcamaf': {'regulator-name': ['vcamaf'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 216}, 'ldo_vibr': {'regulator-name': ['vibr'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 36}, 'ldo_vrf18': {'regulator-name': ['vrf18'], 'regulator-min-microvolt': [[1825000]], 'regulator-max-microvolt': [[1825000]], 'regulator-enable-ramp-delay': 187}, 'ldo_vm': {'regulator-name': ['vm'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[1800000]], 'regulator-enable-ramp-delay': 216, 'regulator-always-on': True, 'regulator-boot-on': True}, 'ldo_vio18': {'regulator-name': ['vio18'], 'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[1800000]], 'regulator-enable-ramp-delay': 216, 'regulator-always-on': True, 'regulator-boot-on': True}, 'ldo_vcamd': {'regulator-name': ['vcamd'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[1800000]], 'regulator-enable-ramp-delay': 216}, 'ldo_vcamio': {'regulator-name': ['vcamio'], 'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[1800000]], 'regulator-enable-ramp-delay': 216}}
from schema $id: http://devicetree.org/schemas/mfd/mediatek,mt6397.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/mediatek,mt6397.example.dtb: pmic: regulators: False schema does not allow {'compatible': ['mediatek,mt6397-regulator'], 'buck_vpca15': {'regulator-name': ['vpca15'], 'regulator-min-microvolt': [[850000]], 'regulator-max-microvolt': [[1350000]], 'regulator-ramp-delay': 12500, 'regulator-enable-ramp-delay': 200}, 'buck_vpca7': {'regulator-name': ['vpca7'], 'regulator-min-microvolt': [[850000]], 'regulator-max-microvolt': [[1350000]], 'regulator-ramp-delay': 12500, 'regulator-enable-ramp-delay': 115}, 'buck_vsramca15': {'regulator-name': ['vsramca15'], 'regulator-min-microvolt': [[850000]], 'regulator-max-microvolt': [[1350000]], 'regulator-ramp-delay': 12500, 'regulator-enable-ramp-delay': 115}, 'buck_vsramca7': {'regulator-name': ['vsramca7'], 'regulator-min-microvolt': [[850000]], 'regulator-max-microvolt': [[1350000]], 'regulator-ramp-delay': 12500, 'regulator-enable-ramp-delay': 115}, 'buck_vcore': {'regulator-name': ['vcore'], 'regulator-min-microvolt': [[850000]], 'regulator-max-microvolt': [[1350000]], 'regulator-ramp-delay': 12500, 'regulator-enable-ramp-delay': 115}, 'buck_vgpu': {'regulator-name': ['vgpu'], 'regulator-min-microvolt': [[700000]], 'regulator-max-microvolt': [[1350000]], 'regulator-ramp-delay': 12500, 'regulator-enable-ramp-delay': 115}, 'buck_vdrm': {'regulator-name': ['vdrm'], 'regulator-min-microvolt': [[800000]], 'regulator-max-microvolt': [[1400000]], 'regulator-ramp-delay': 12500, 'regulator-enable-ramp-delay': 500}, 'buck_vio18': {'regulator-name': ['vio18'], 'regulator-min-microvolt': [[1500000]], 'regulator-max-microvolt': [[2120000]], 'regulator-ramp-delay': 12500, 'regulator-enable-ramp-delay': 500}, 'ldo_vtcxo': {'regulator-name': ['vtcxo'], 'regulator-min-microvolt': [[2800000]], 'regulator-max-microvolt': [[2800000]], 'regulator-enable-ramp-delay': 90}, 'ldo_va28': {'regulator-name': ['va28'], 'regulator-enable-ramp-delay': 218}, 'ldo_vcama': {'regulator-name': ['vcama'], 'regulator-min-microvolt': [[1500000]], 'regulator-max-microvolt': [[2800000]], 'regulator-enable-ramp-delay': 218}, 'ldo_vio28': {'regulator-name': ['vio28'], 'regulator-enable-ramp-delay': 240}, 'ldo_vusb': {'regulator-name': ['vusb'], 'regulator-enable-ramp-delay': 218}, 'ldo_vmc': {'regulator-name': ['vmc'], 'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 218}, 'ldo_vmch': {'regulator-name': ['vmch'], 'regulator-min-microvolt': [[3000000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 218}, 'ldo_vemc3v3': {'regulator-name': ['vemc_3v3'], 'regulator-min-microvolt': [[3000000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 218}, 'ldo_vgp1': {'regulator-name': ['vcamd'], 'regulator-min-microvolt': [[1220000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 240}, 'ldo_vgp2': {'regulator-name': ['vcamio'], 'regulator-min-microvolt': [[1000000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 218}, 'ldo_vgp3': {'regulator-name': ['vcamaf'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 218}, 'ldo_vgp4': {'regulator-name': ['vgp4'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 218}, 'ldo_vgp5': {'regulator-name': ['vgp5'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[3000000]], 'regulator-enable-ramp-delay': 218}, 'ldo_vgp6': {'regulator-name': ['vgp6'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 218}, 'ldo_vibr': {'regulator-name': ['vibr'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 218}}
from schema $id: http://devicetree.org/schemas/mfd/mediatek,mt6397.yaml#
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240913175926.7443-1-macpaul.lin@mediatek.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply
* Re: [PATCH v4 16/27] arm64: dts: qcom: sdm845: enable gmu
From: Steev Klimaszewski @ 2024-09-13 19:02 UTC (permalink / raw)
To: Dzmitry Sankouski
Cc: Sebastian Reichel, Bjorn Andersson, Michael Turquette,
Stephen Boyd, Neil Armstrong, Jessica Zhang, Sam Ravnborg,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Lee Jones,
Dmitry Torokhov, Pavel Machek, Liam Girdwood, Mark Brown,
Uwe Kleine-König, Krzysztof Kozlowski, Chanwoo Choi,
Simona Vetter, cros-qcom-dts-watchers, Konrad Dybcio,
Simona Vetter, linux-pm, linux-kernel, linux-arm-msm, linux-clk,
dri-devel, devicetree, linux-input, linux-leds, linux-pwm,
linux-samsung-soc
In-Reply-To: <20240913-starqltechn_integration_upstream-v4-16-2d2efd5c5877@gmail.com>
Hi Dzmitry,
On Fri, Sep 13, 2024 at 10:15 AM Dzmitry Sankouski <dsankouski@gmail.com> wrote:
>
> Leave gmu enabled, because it's only probed when
> GPU is.
>
> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> ---
> arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 4 ----
> arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 4 ----
> arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 4 ----
> arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 4 ----
> arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts | 4 ----
> arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama.dtsi | 4 ----
> arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi | 4 ----
> arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts | 4 ----
> arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 --
> 9 files changed, 34 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi b/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi
> index e8276db9eabb..a5149a384167 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi
> @@ -741,10 +741,6 @@ touchscreen@10 {
> };
> };
>
> -&gmu {
> - status = "okay";
> -};
> -
> &gpu {
> status = "okay";
> };
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> index 9a6d3d0c0ee4..59cb6e6e434c 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> @@ -444,10 +444,6 @@ &gcc {
> <GCC_LPASS_SWAY_CLK>;
> };
>
> -&gmu {
> - status = "okay";
> -};
> -
> &gpi_dma0 {
> status = "okay";
> };
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
> index 2391f842c903..d31efad8a321 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts
> @@ -414,10 +414,6 @@ &gcc {
> <GCC_LPASS_SWAY_CLK>;
> };
>
> -&gmu {
> - status = "okay";
> -};
> -
> &gpu {
> status = "okay";
>
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
> index 46e25c53829a..8a0f154bffc3 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
> @@ -345,10 +345,6 @@ &gcc {
> <GCC_LPASS_SWAY_CLK>;
> };
>
> -&gmu {
> - status = "okay";
> -};
> -
> &gpu {
> status = "okay";
>
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts b/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts
> index 486ce175e6bc..87fc4021e024 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts
> @@ -419,10 +419,6 @@ &gcc {
> <GCC_LPASS_SWAY_CLK>;
> };
>
> -&gmu {
> - status = "okay";
> -};
> -
> &gpu {
> status = "okay";
>
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama.dtsi b/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama.dtsi
> index b02a1dc5fecd..a3a304e1ac87 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama.dtsi
> @@ -415,10 +415,6 @@ &gcc {
> <GCC_LPASS_SWAY_CLK>;
> };
>
> -&gmu {
> - status = "okay";
> -};
> -
> &gpi_dma0 {
> status = "okay";
> };
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
> index 617b17b2d7d9..f790eb73abdd 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi
> @@ -239,10 +239,6 @@ &gcc {
> <GCC_LPASS_SWAY_CLK>;
> };
>
> -&gmu {
> - status = "okay";
> -};
> -
> &gpu {
> status = "okay";
>
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
> index e386b504e978..501575c9beda 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts
> @@ -381,10 +381,6 @@ &gcc {
> <GCC_LPASS_SWAY_CLK>;
> };
>
> -&gmu {
> - status = "okay";
> -};
> -
> &gpi_dma0 {
> status = "okay";
> };
> diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> index 54077549b9da..fe154216f138 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> @@ -4948,8 +4948,6 @@ gmu: gmu@506a000 {
>
> operating-points-v2 = <&gmu_opp_table>;
>
> - status = "disabled";
> -
> gmu_opp_table: opp-table {
> compatible = "operating-points-v2";
>
>
> --
> 2.39.2
>
>
This seems like it would also affect the sdm850-lenovo-yoga-c630 which
inherits from sdm850.dtsi which inherits from sdm845.dtsi (they are
sdm845s with 2 higher clock speeds)
-- steev
^ permalink raw reply
* Re: [PATCH v4 02/27] clk: qcom: clk-rcg2: name refactoring
From: Stephen Boyd @ 2024-09-13 18:56 UTC (permalink / raw)
To: Bjorn Andersson, Chanwoo Choi, Conor Dooley, David Airlie,
Dmitry Torokhov, Dzmitry Sankouski, Jessica Zhang, Konrad Dybcio,
Krzysztof Kozlowski, Krzysztof Kozlowski, Lee Jones,
Liam Girdwood, Maarten Lankhorst, Mark Brown, Maxime Ripard,
Michael Turquette, Neil Armstrong, Pavel Machek, Rob Herring,
Sam Ravnborg, Sebastian Reichel, Simona Vetter, Simona Vetter,
Thomas Zimmermann, Uwe Kleine-König, cros-qcom-dts-watchers
Cc: linux-pm, linux-kernel, linux-arm-msm, linux-clk, dri-devel,
devicetree, linux-input, linux-leds, linux-pwm, linux-samsung-soc,
Dzmitry Sankouski
In-Reply-To: <20240913-starqltechn_integration_upstream-v4-2-2d2efd5c5877@gmail.com>
Quoting Dzmitry Sankouski (2024-09-13 08:07:45)
> clk-rcg2.c uses 2 variable names for pre divisor register value:
> pre_div and hid_div.
>
> Replace hid_div with pre_div. Update calc_rate docs to reflect, that
> pre_div is not pure divisor, but a register value, and requires conversion.
>
> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> ---
Nak
hid stands for "half-integer divider" from what I recall. Feel free to
document that, but don't rename it.
^ permalink raw reply
* [PATCH v3 2/3] dt-bindings: mfd: mediatek: mt6397: Convert to DT schema format
From: Macpaul Lin @ 2024-09-13 17:59 UTC (permalink / raw)
To: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Pavel Machek, Lee Jones, Matthias Brugger,
AngeloGioacchino Del Regno, Sen Chu, Sean Wang, Macpaul Lin,
Sebastian Reichel, Alexandre Belloni, Liam Girdwood, Mark Brown,
Chen Zhong, linux-input, devicetree, linux-kernel, linux-leds,
linux-arm-kernel, linux-mediatek, linux-pm, linux-rtc,
linux-sound, Alexandre Mergnat
Cc: Bear Wang, Pablo Sun, Macpaul Lin, Chris-qj chen,
MediaTek Chromebook Upstream, Chen-Yu Tsai
Convert the mfd: mediatek: mt6397 binding to DT schema format.
MT6323, MT6358, and MT6397 are PMIC devices with multiple function
subdevices. They share a common PMIC design but have variations in
subdevice combinations.
Key updates in this conversion:
1. RTC:
- Convert rtc-mt6397.txt and merge into parent MT6397 PMIC DT schema.
2. Regulators:
- Align to generic name "regulators".
- Update references from .txt to .yaml for mt6323, mt6358, and mt6397
regulators.
- Simplify regulator name labels in device tree examples.
3. Audio Codec:
- Convert sound/mt6358.txt and merge into parent MT6397 PMIC DT schema.
- Align to generic name "audio-codec" for codec and sound subdevices.
- Add "mediatek,dmic-mode" and "Avdd-supply" properties.
4. Clocks:
- Align to generic name "clocks" for clockbuffer subdevices.
5. LEDs:
- Convert leds-mt6323.txt and merge into parent MT6397 PMIC DT schema.
- Update LED binding.
6. Keys:
- Add detailed descriptions for power and home keys.
- Add compatible: mediatek,mt6358-keys.
7. Power Controller:
- Convert mt6323-poweroff.txt and merge into parent MT6397 PMIC DT
schema.
- Add #power-domain-cells property to fix dt-binding check error.
- Clarify "BBPU" as "Baseband power up".
8. Pinctrl:
- Align to generic name "pinctrl" instead of "pin-controller".
Additional updates:
- MAINTAINERS: Add co-maintainers and reference to
mfd/mediatek,mt6397.yaml for LED and power-controller drivers.
- input/mediatek,pmic-keys.yaml: Update reference to
mfd/mediatek,mt6397.yaml.
Signed-off-by: Sen Chu <sen.chu@mediatek.com>
Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
---
.../bindings/input/mediatek,pmic-keys.yaml | 2 +-
.../devicetree/bindings/leds/leds-mt6323.txt | 63 -
.../bindings/mfd/mediatek,mt6397.yaml | 1078 +++++++++++++++++
.../devicetree/bindings/mfd/mt6397.txt | 110 --
.../bindings/power/reset/mt6323-poweroff.txt | 20 -
.../devicetree/bindings/rtc/rtc-mt6397.txt | 31 -
.../devicetree/bindings/sound/mt6358.txt | 26 -
MAINTAINERS | 8 +-
8 files changed, 1085 insertions(+), 253 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/leds/leds-mt6323.txt
create mode 100644 Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
delete mode 100644 Documentation/devicetree/bindings/mfd/mt6397.txt
delete mode 100644 Documentation/devicetree/bindings/power/reset/mt6323-poweroff.txt
delete mode 100644 Documentation/devicetree/bindings/rtc/rtc-mt6397.txt
delete mode 100644 Documentation/devicetree/bindings/sound/mt6358.txt
Changes for v1:
- This patch depends on conversion of mediatek,mt6397-regulator.yaml
[1] https://lore.kernel.org/lkml/20240807091738.18387-1-macpaul.lin@mediatek.com/T/
Changes for v2:
- This patch has been made base on linux-next/master git repo.
- Keep the parent and child relationship with mediatek,pwrap in description.
[2] https://lore.kernel.org/all/20240826-slurp-earphone-0d5173923ae8@spud/
- Keep the $ref for regulators since dt_binding_check didn't report any issue
based on linux-next/master repo.
- Fix description of mt6397/mt6323 devices, use "power management chip"
instead of "multifunction device"
- Drop unnecessary comments or description according to the review.
- Convert sub-modules to DT Schema:
- RTC, LEDs, power-controllers, regulators
- Drop duplicate sub node name and description for sub-modules
- RTC, Keys
- examples:
- drop parent pwrap node
- Add examples from mediatek,mt6323-regulator.yaml
- Add examples from mediatek,mt6358-regulator.yaml
- Add examples from mediatek,mt6397-regulator.yaml
- Complete the examples as could as possible.
Changes for v3:
- Rebased on linux-next/master git repo near next-20240906.
- Revise commit message.
- Regulators:
- Use "additionalProperties: true" and add "contains" for matching
$ref DT bindings.
- Simplify regulator name labels in device tree examples.
- LEDs:
- Use LED bindings.
- Squash following patches in v2 for removing old text format DT bindings
into this patch, includes:
- leds-mt6323.txt, mt6323-poweroff.txt, rtc-mt6397.txt, sound/mt6358.txt.
- Fix file format of DT schemas, add blank between properties.
- Fix 'make checkrefdoc' errors, update reference in mediatek,pmic-keys.yaml.
diff --git a/Documentation/devicetree/bindings/input/mediatek,pmic-keys.yaml b/Documentation/devicetree/bindings/input/mediatek,pmic-keys.yaml
index 70567d9..466566a 100644
--- a/Documentation/devicetree/bindings/input/mediatek,pmic-keys.yaml
+++ b/Documentation/devicetree/bindings/input/mediatek,pmic-keys.yaml
@@ -19,7 +19,7 @@ description: |
by the PMIC that is defined as a Multi-Function Device (MFD).
For MediaTek MT6323/MT6397 PMIC bindings see
- Documentation/devicetree/bindings/mfd/mt6397.txt
+ Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
properties:
compatible:
diff --git a/Documentation/devicetree/bindings/leds/leds-mt6323.txt b/Documentation/devicetree/bindings/leds/leds-mt6323.txt
deleted file mode 100644
index 052dccb8..0000000
--- a/Documentation/devicetree/bindings/leds/leds-mt6323.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-Device Tree Bindings for LED support on MT6323 PMIC
-
-MT6323 LED controller is subfunction provided by MT6323 PMIC, so the LED
-controllers are defined as the subnode of the function node provided by MT6323
-PMIC controller that is being defined as one kind of Muti-Function Device (MFD)
-using shared bus called PMIC wrapper for each subfunction to access remote
-MT6323 PMIC hardware.
-
-For MT6323 MFD bindings see:
-Documentation/devicetree/bindings/mfd/mt6397.txt
-For MediaTek PMIC wrapper bindings see:
-Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml
-
-Required properties:
-- compatible : Must be one of
- - "mediatek,mt6323-led"
- - "mediatek,mt6331-led"
- - "mediatek,mt6332-led"
-- address-cells : Must be 1
-- size-cells : Must be 0
-
-Each led is represented as a child node of the mediatek,mt6323-led that
-describes the initial behavior for each LED physically and currently only four
-LED child nodes can be supported.
-
-Required properties for the LED child node:
-- reg : LED channel number (0..3)
-
-Optional properties for the LED child node:
-- label : See Documentation/devicetree/bindings/leds/common.txt
-- linux,default-trigger : See Documentation/devicetree/bindings/leds/common.txt
-- default-state: See Documentation/devicetree/bindings/leds/common.txt
-
-Example:
-
- mt6323: pmic {
- compatible = "mediatek,mt6323";
-
- ...
-
- mt6323led: leds {
- compatible = "mediatek,mt6323-led";
- #address-cells = <1>;
- #size-cells = <0>;
-
- led@0 {
- reg = <0>;
- label = "LED0";
- linux,default-trigger = "timer";
- default-state = "on";
- };
- led@1 {
- reg = <1>;
- label = "LED1";
- default-state = "off";
- };
- led@2 {
- reg = <2>;
- label = "LED2";
- default-state = "on";
- };
- };
- };
diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml b/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
new file mode 100644
index 0000000..3348ea3
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
@@ -0,0 +1,1078 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/mediatek,mt6397.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek MT6397/MT6323 Multifunction Device (PMIC)
+
+maintainers:
+ - Sen Chu <sen.chu@mediatek.com>
+ - Macpaul Lin <macpaul.lin@mediatek.com>
+
+description: |
+ MT6397/MT6323 is a power management system chip.
+ Please see the sub-modules below for supported features.
+
+ MT6397/MT6323 is a multifunction device with the following sub modules:
+ - Regulators
+ - RTC
+ - Audio codec
+ - GPIO
+ - Clock
+ - LED
+ - Keys
+ - Power controller
+
+ It is interfaced to host controller using SPI interface by a proprietary hardware
+ called PMIC wrapper or pwrap. MT6397/MT6323 PMIC is a child device of pwrap.
+ See the following for pwrap node definitions:
+ Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml
+
+properties:
+ compatible:
+ oneOf:
+ - enum:
+ - mediatek,mt6323
+ - mediatek,mt6331 # "mediatek,mt6331" for PMIC MT6331 and MT6332.
+ - mediatek,mt6357
+ - mediatek,mt6358
+ - mediatek,mt6359
+ - mediatek,mt6397
+ - items:
+ - enum:
+ - mediatek,mt6366
+ - const: mediatek,mt6358
+
+ interrupts:
+ maxItems: 1
+
+ interrupt-controller: true
+
+ "#interrupt-cells":
+ const: 2
+
+ rtc:
+ type: object
+ $ref: /schemas/rtc/rtc.yaml#
+ unevaluatedProperties: false
+ description:
+ MT6397 Real Time Clock.
+
+ properties:
+ compatible:
+ oneOf:
+ - enum:
+ - mediatek,mt6323-rtc
+ - mediatek,mt6331-rtc
+ - mediatek,mt6358-rtc
+ - mediatek,mt6397-rtc
+ - items:
+ - enum:
+ - mediatek,mt6366-rtc
+ - const: mediatek,mt6358-rtc
+
+ start-year: true
+
+ required:
+ - compatible
+
+ regulators:
+ type: object
+ description:
+ List of child nodes that specify the regulators.
+ additionalProperties: true
+ properties:
+ compatible:
+ oneOf:
+ - enum:
+ - mediatek,mt6323-regulator
+ - mediatek,mt6358-regulator
+ - mediatek,mt6397-regulator
+ - items:
+ - enum:
+ - mediatek,mt6366-regulator
+ - const: mediatek,mt6358-regulator
+
+ required:
+ - compatible
+
+ allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: mediatek,mt6323-regulator
+
+ then:
+ $ref: /schemas/regulator/mediatek,mt6323-regulator.yaml
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: mediatek,mt6358-regulator
+
+ then:
+ $ref: /schemas/regulator/mediatek,mt6358-regulator.yaml
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: mediatek,mt6397-regulator
+
+ then:
+ $ref: /schemas/regulator/mediatek,mt6397-regulator.yaml
+
+ audio-codec:
+ type: object
+ additionalProperties: false
+ description:
+ Audio codec support with MT6397 and MT6358.
+ properties:
+ compatible:
+ oneOf:
+ - enum:
+ - mediatek,mt6397-codec
+ - mediatek,mt6358-sound
+ - items:
+ - enum:
+ - mediatek,mt6366-sound
+ - const: mediatek,mt6358-sound
+
+ mediatek,dmic-mode:
+ description: |
+ Indicates how many data pins are used to transmit two channels of PDM
+ signal.
+ 0 - two wires;
+ 1 - one wire;
+ Default value is 0.
+ enum: [0, 1]
+ default: 0
+
+ Avdd-supply:
+ description: Power source of AVDD.
+
+ required:
+ - compatible
+
+ clocks:
+ type: object
+ additionalProperties: false
+ description: |
+ This is a clock buffer node for mt6397. However, there are no sub nodes
+ or any public document exposed in public.
+ properties:
+ compatible:
+ const: mediatek,mt6397-clk
+ '#clock-cells':
+ const: 1
+ required:
+ - compatible
+
+ leds:
+ type: object
+ additionalProperties: false
+ description: |
+ MT6323 LED controller is subfunction provided by MT6323 PMIC, so the LED
+ controllers are defined as the subnode of the function node provided by MT6323
+ PMIC controller that is being defined as one kind of Muti-Function Device (MFD)
+ using shared bus called PMIC wrapper for each subfunction to access remote
+ MT6323 PMIC hardware.
+
+ Each led is represented as a child node of the mediatek,mt6323-led that
+ describes the initial behavior for each LED physically and currently only four
+ LED child nodes can be supported.
+
+ properties:
+ compatible:
+ enum:
+ - mediatek,mt6323-led
+ - mediatek,mt6331-led
+ - mediatek,mt6332-led
+
+ reg:
+ maxItems: 1
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
+
+ patternProperties:
+ "^led@[0-3]$":
+ type: object
+ $ref: /schemas/leds/common.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ reg:
+ description:
+ LED channel number (0..3)
+ minimum: 0
+ maximum: 3
+
+ required:
+ - reg
+
+ required:
+ - compatible
+ - '#address-cells'
+ - '#size-cells'
+
+ keys:
+ type: object
+ $ref: /schemas/input/mediatek,pmic-keys.yaml
+ unevaluatedProperties: false
+ description:
+ Power and Home keys.
+ properties:
+ compatible:
+ enum:
+ - mediatek,mt6323-keys
+ - mediatek,mt6331-keys
+ - mediatek,mt6358-keys
+ - mediatek,mt6397-keys
+
+ power-controller:
+ type: object
+ additionalProperties: false
+ description:
+ The power controller which could be found on PMIC is responsible for
+ externally powering off or on the remote MediaTek SoC through the
+ circuit BBPU (baseband power up).
+ properties:
+ compatible:
+ const: mediatek,mt6323-pwrc
+
+ '#power-domain-cells':
+ const: 0
+
+ pinctrl:
+ type: object
+ $ref: /schemas/pinctrl/mediatek,mt65xx-pinctrl.yaml
+ unevaluatedProperties: false
+ description:
+ Pin controller
+ properties:
+ compatible:
+ const: mediatek,mt6397-pinctrl
+
+required:
+ - compatible
+ - regulators
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/leds/common.h>
+
+ pmic {
+ compatible = "mediatek,mt6323";
+ interrupt-parent = <&pio>;
+ interrupts = <150 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+
+ leds {
+ compatible = "mediatek,mt6323-led";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ regulators {
+ compatible = "mediatek,mt6323-regulator";
+
+ buck_vproc {
+ regulator-name = "vproc";
+ regulator-min-microvolt = < 700000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-ramp-delay = <12500>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ buck_vsys {
+ regulator-name = "vsys";
+ regulator-min-microvolt = <1400000>;
+ regulator-max-microvolt = <2987500>;
+ regulator-ramp-delay = <25000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ buck_vpa {
+ regulator-name = "vpa";
+ regulator-min-microvolt = < 500000>;
+ regulator-max-microvolt = <3650000>;
+ };
+
+ ldo_vtcxo {
+ regulator-name = "vtcxo";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-enable-ramp-delay = <90>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ ldo_vcn28 {
+ regulator-name = "vcn28";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-enable-ramp-delay = <185>;
+ };
+
+ ldo_vcn33_bt {
+ regulator-name = "vcn33_bt";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3600000>;
+ regulator-enable-ramp-delay = <185>;
+ };
+
+ ldo_vcn33_wifi {
+ regulator-name = "vcn33_wifi";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3600000>;
+ regulator-enable-ramp-delay = <185>;
+ };
+
+ ldo_va {
+ regulator-name = "va";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-enable-ramp-delay = <216>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ ldo_vcama {
+ regulator-name = "vcama";
+ regulator-min-microvolt = <1500000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-enable-ramp-delay = <216>;
+ };
+
+ ldo_vio28 {
+ regulator-name = "vio28";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-enable-ramp-delay = <216>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ ldo_vusb {
+ regulator-name = "vusb";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-enable-ramp-delay = <216>;
+ regulator-boot-on;
+ };
+
+ ldo_vmc {
+ regulator-name = "vmc";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-enable-ramp-delay = <36>;
+ regulator-boot-on;
+ };
+
+ ldo_vmch {
+ regulator-name = "vmch";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-enable-ramp-delay = <36>;
+ regulator-boot-on;
+ };
+
+ ldo_vemc3v3 {
+ regulator-name = "vemc3v3";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-enable-ramp-delay = <36>;
+ regulator-boot-on;
+ };
+
+ ldo_vgp1 {
+ regulator-name = "vgp1";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-enable-ramp-delay = <216>;
+ };
+
+ ldo_vgp2 {
+ regulator-name = "vgp2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-enable-ramp-delay = <216>;
+ };
+
+ ldo_vgp3 {
+ regulator-name = "vgp3";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-enable-ramp-delay = <216>;
+ };
+
+ ldo_vcn18 {
+ regulator-name = "vcn18";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-enable-ramp-delay = <216>;
+ };
+
+ ldo_vsim1 {
+ regulator-name = "vsim1";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-enable-ramp-delay = <216>;
+ };
+
+ ldo_vsim2 {
+ regulator-name = "vsim2";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-enable-ramp-delay = <216>;
+ };
+
+ ldo_vrtc {
+ regulator-name = "vrtc";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ ldo_vcamaf {
+ regulator-name = "vcamaf";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-enable-ramp-delay = <216>;
+ };
+
+ ldo_vibr {
+ regulator-name = "vibr";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-enable-ramp-delay = <36>;
+ };
+
+ ldo_vrf18 {
+ regulator-name = "vrf18";
+ regulator-min-microvolt = <1825000>;
+ regulator-max-microvolt = <1825000>;
+ regulator-enable-ramp-delay = <187>;
+ };
+
+ ldo_vm {
+ regulator-name = "vm";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-enable-ramp-delay = <216>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ ldo_vio18 {
+ regulator-name = "vio18";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-enable-ramp-delay = <216>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ ldo_vcamd {
+ regulator-name = "vcamd";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-enable-ramp-delay = <216>;
+ };
+
+ ldo_vcamio {
+ regulator-name = "vcamio";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-enable-ramp-delay = <216>;
+ };
+ };
+
+ keys {
+ compatible = "mediatek,mt6323-keys";
+ mediatek,long-press-mode = <1>;
+ power-off-time-sec = <0>;
+
+ power {
+ linux,keycodes = <116>;
+ wakeup-source;
+ };
+
+ home {
+ linux,keycodes = <114>;
+ };
+ };
+
+ power-controller {
+ compatible = "mediatek,mt6323-pwrc";
+ #power-domain-cells = <0>;
+ };
+
+ rtc {
+ compatible = "mediatek,mt6323-rtc";
+ };
+ };
+
+ - |
+ #include <dt-bindings/input/input.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ pmic {
+ compatible = "mediatek,mt6358";
+ interrupt-controller;
+ #interrupt-cells = <2>;
+
+ audio-codec {
+ compatible = "mediatek,mt6358-sound";
+ Avdd-supply = <&mt6358_vaud28_reg>;
+ mediatek,dmic-mode = <0>;
+ };
+
+ regulators {
+ compatible = "mediatek,mt6358-regulator";
+
+ buck_vdram1 {
+ regulator-name = "vdram1";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <2087500>;
+ regulator-ramp-delay = <12500>;
+ regulator-enable-ramp-delay = <0>;
+ regulator-always-on;
+ regulator-allowed-modes = <0 1>;
+ };
+
+ buck_vcore {
+ regulator-name = "vcore";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1293750>;
+ regulator-ramp-delay = <6250>;
+ regulator-enable-ramp-delay = <200>;
+ regulator-always-on;
+ regulator-allowed-modes = <0 1>;
+ };
+
+ buck_vpa {
+ regulator-name = "vpa";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <3650000>;
+ regulator-ramp-delay = <50000>;
+ regulator-enable-ramp-delay = <250>;
+ regulator-allowed-modes = <0 1>;
+ };
+
+ buck_vproc11 {
+ regulator-name = "vproc11";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1293750>;
+ regulator-ramp-delay = <6250>;
+ regulator-enable-ramp-delay = <200>;
+ regulator-always-on;
+ regulator-allowed-modes = <0 1>;
+ };
+
+ buck_vproc12 {
+ regulator-name = "vproc12";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1293750>;
+ regulator-ramp-delay = <6250>;
+ regulator-enable-ramp-delay = <200>;
+ regulator-always-on;
+ regulator-allowed-modes = <0 1>;
+ };
+
+ buck_vgpu {
+ regulator-name = "vgpu";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1293750>;
+ regulator-ramp-delay = <6250>;
+ regulator-enable-ramp-delay = <200>;
+ regulator-allowed-modes = <0 1>;
+ };
+
+ buck_vs2 {
+ regulator-name = "vs2";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <2087500>;
+ regulator-ramp-delay = <12500>;
+ regulator-enable-ramp-delay = <0>;
+ regulator-always-on;
+ };
+
+ buck_vmodem {
+ regulator-name = "vmodem";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1293750>;
+ regulator-ramp-delay = <6250>;
+ regulator-enable-ramp-delay = <900>;
+ regulator-always-on;
+ regulator-allowed-modes = <0 1>;
+ };
+
+ buck_vs1 {
+ regulator-name = "vs1";
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <2587500>;
+ regulator-ramp-delay = <12500>;
+ regulator-enable-ramp-delay = <0>;
+ regulator-always-on;
+ };
+
+ ldo_vdram2 {
+ regulator-name = "vdram2";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-enable-ramp-delay = <3300>;
+ };
+
+ ldo_vsim1 {
+ regulator-name = "vsim1";
+ regulator-min-microvolt = <1700000>;
+ regulator-max-microvolt = <3100000>;
+ regulator-enable-ramp-delay = <540>;
+ };
+
+ ldo_vibr {
+ regulator-name = "vibr";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-enable-ramp-delay = <60>;
+ };
+
+ ldo_vrf12 {
+ regulator-name = "vrf12";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-enable-ramp-delay = <120>;
+ };
+
+ ldo_vio18 {
+ regulator-name = "vio18";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-enable-ramp-delay = <2700>;
+ regulator-always-on;
+ };
+
+ ldo_vusb {
+ regulator-name = "vusb";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3100000>;
+ regulator-enable-ramp-delay = <270>;
+ regulator-always-on;
+ };
+
+ ldo_vcamio {
+ regulator-name = "vcamio";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-enable-ramp-delay = <325>;
+ };
+
+ ldo_vcamd {
+ regulator-name = "vcamd";
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-enable-ramp-delay = <325>;
+ };
+
+ ldo_vcn18 {
+ regulator-name = "vcn18";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-enable-ramp-delay = <270>;
+ };
+
+ ldo_vfe28 {
+ regulator-name = "vfe28";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-enable-ramp-delay = <270>;
+ };
+
+ ldo_vsram_proc11 {
+ regulator-name = "vsram_proc11";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1293750>;
+ regulator-ramp-delay = <6250>;
+ regulator-enable-ramp-delay = <240>;
+ regulator-always-on;
+ };
+
+ ldo_vcn28 {
+ regulator-name = "vcn28";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-enable-ramp-delay = <270>;
+ };
+
+ ldo_vsram_others {
+ regulator-name = "vsram_others";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1293750>;
+ regulator-ramp-delay = <6250>;
+ regulator-enable-ramp-delay = <240>;
+ regulator-always-on;
+ };
+
+ ldo_vsram_gpu {
+ regulator-name = "vsram_gpu";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1293750>;
+ regulator-ramp-delay = <6250>;
+ regulator-enable-ramp-delay = <240>;
+ };
+
+ ldo_vxo22 {
+ regulator-name = "vxo22";
+ regulator-min-microvolt = <2200000>;
+ regulator-max-microvolt = <2200000>;
+ regulator-enable-ramp-delay = <120>;
+ regulator-always-on;
+ };
+
+ ldo_vefuse {
+ regulator-name = "vefuse";
+ regulator-min-microvolt = <1700000>;
+ regulator-max-microvolt = <1900000>;
+ regulator-enable-ramp-delay = <270>;
+ };
+
+ ldo_vaux18 {
+ regulator-name = "vaux18";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-enable-ramp-delay = <270>;
+ };
+
+ ldo_vmch {
+ regulator-name = "vmch";
+ regulator-min-microvolt = <2900000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-enable-ramp-delay = <60>;
+ };
+
+ ldo_vbif28 {
+ regulator-name = "vbif28";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-enable-ramp-delay = <270>;
+ };
+
+ ldo_vsram_proc12 {
+ regulator-name = "vsram_proc12";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1293750>;
+ regulator-ramp-delay = <6250>;
+ regulator-enable-ramp-delay = <240>;
+ regulator-always-on;
+ };
+
+ ldo_vcama1 {
+ regulator-name = "vcama1";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-enable-ramp-delay = <325>;
+ };
+
+ ldo_vemc {
+ regulator-name = "vemc";
+ regulator-min-microvolt = <2900000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-enable-ramp-delay = <60>;
+ };
+
+ ldo_vio28 {
+ regulator-name = "vio28";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-enable-ramp-delay = <270>;
+ };
+
+ ldo_va12 {
+ regulator-name = "va12";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-enable-ramp-delay = <270>;
+ regulator-always-on;
+ };
+
+ ldo_vrf18 {
+ regulator-name = "vrf18";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-enable-ramp-delay = <120>;
+ };
+
+ ldo_vcn33 {
+ regulator-name = "vcn33";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3500000>;
+ regulator-enable-ramp-delay = <270>;
+ };
+
+ ldo_vcama2 {
+ regulator-name = "vcama2";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-enable-ramp-delay = <325>;
+ };
+
+ ldo_vmc {
+ regulator-name = "vmc";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-enable-ramp-delay = <60>;
+ };
+
+ ldo_vldo28 {
+ regulator-name = "vldo28";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-enable-ramp-delay = <270>;
+ };
+
+ ldo_vaud28 {
+ regulator-name = "vaud28";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-enable-ramp-delay = <270>;
+ };
+
+ ldo_vsim2 {
+ regulator-name = "vsim2";
+ regulator-min-microvolt = <1700000>;
+ regulator-max-microvolt = <3100000>;
+ regulator-enable-ramp-delay = <540>;
+ };
+ };
+
+ rtc {
+ compatible = "mediatek,mt6358-rtc";
+ };
+
+ keys {
+ compatible = "mediatek,mt6358-keys";
+ power {
+ linux,keycodes = <KEY_POWER>;
+ wakeup-source;
+ };
+ home {
+ linux,keycodes = <KEY_HOME>;
+ };
+ };
+ };
+
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ pmic {
+ compatible = "mediatek,mt6397";
+
+ interrupt-parent = <&pio>;
+ interrupts-extended = <&pio 222 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+
+ audio-codec {
+ compatible = "mediatek,mt6397-codec";
+ };
+
+ clocks {
+ compatible = "mediatek,mt6397-clk";
+ #clock-cells = <1>;
+ };
+
+ pinctrl {
+ compatible = "mediatek,mt6397-pinctrl";
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+
+ regulators {
+ compatible = "mediatek,mt6397-regulator";
+
+ buck_vpca15 {
+ regulator-name = "vpca15";
+ regulator-min-microvolt = < 850000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-ramp-delay = <12500>;
+ regulator-enable-ramp-delay = <200>;
+ };
+
+ buck_vpca7 {
+ regulator-name = "vpca7";
+ regulator-min-microvolt = < 850000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-ramp-delay = <12500>;
+ regulator-enable-ramp-delay = <115>;
+ };
+
+ buck_vsramca15 {
+ regulator-name = "vsramca15";
+ regulator-min-microvolt = < 850000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-ramp-delay = <12500>;
+ regulator-enable-ramp-delay = <115>;
+ };
+
+ buck_vsramca7 {
+ regulator-name = "vsramca7";
+ regulator-min-microvolt = < 850000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-ramp-delay = <12500>;
+ regulator-enable-ramp-delay = <115>;
+ };
+
+ buck_vcore {
+ regulator-name = "vcore";
+ regulator-min-microvolt = < 850000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-ramp-delay = <12500>;
+ regulator-enable-ramp-delay = <115>;
+ };
+
+ buck_vgpu {
+ regulator-name = "vgpu";
+ regulator-min-microvolt = < 700000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-ramp-delay = <12500>;
+ regulator-enable-ramp-delay = <115>;
+ };
+
+ buck_vdrm {
+ regulator-name = "vdrm";
+ regulator-min-microvolt = < 800000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-ramp-delay = <12500>;
+ regulator-enable-ramp-delay = <500>;
+ };
+
+ buck_vio18 {
+ regulator-name = "vio18";
+ regulator-min-microvolt = <1500000>;
+ regulator-max-microvolt = <2120000>;
+ regulator-ramp-delay = <12500>;
+ regulator-enable-ramp-delay = <500>;
+ };
+
+ ldo_vtcxo {
+ regulator-name = "vtcxo";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-enable-ramp-delay = <90>;
+ };
+
+ ldo_va28 {
+ regulator-name = "va28";
+ /* fixed output 2.8 V */
+ regulator-enable-ramp-delay = <218>;
+ };
+
+ ldo_vcama {
+ regulator-name = "vcama";
+ regulator-min-microvolt = <1500000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-enable-ramp-delay = <218>;
+ };
+
+ ldo_vio28 {
+ regulator-name = "vio28";
+ /* fixed output 2.8 V */
+ regulator-enable-ramp-delay = <240>;
+ };
+
+ ldo_vusb {
+ regulator-name = "vusb";
+ /* fixed output 3.3 V */
+ regulator-enable-ramp-delay = <218>;
+ };
+
+ ldo_vmc {
+ regulator-name = "vmc";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-enable-ramp-delay = <218>;
+ };
+
+ ldo_vmch {
+ regulator-name = "vmch";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-enable-ramp-delay = <218>;
+ };
+
+ ldo_vemc3v3 {
+ regulator-name = "vemc_3v3";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-enable-ramp-delay = <218>;
+ };
+
+ ldo_vgp1 {
+ regulator-name = "vcamd";
+ regulator-min-microvolt = <1220000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-enable-ramp-delay = <240>;
+ };
+
+ ldo_vgp2 {
+ regulator-name = "vcamio";
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-enable-ramp-delay = <218>;
+ };
+
+ ldo_vgp3 {
+ regulator-name = "vcamaf";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-enable-ramp-delay = <218>;
+ };
+
+ ldo_vgp4 {
+ regulator-name = "vgp4";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-enable-ramp-delay = <218>;
+ };
+
+ ldo_vgp5 {
+ regulator-name = "vgp5";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-enable-ramp-delay = <218>;
+ };
+
+ ldo_vgp6 {
+ regulator-name = "vgp6";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-enable-ramp-delay = <218>;
+ };
+
+ ldo_vibr {
+ regulator-name = "vibr";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-enable-ramp-delay = <218>;
+ };
+ };
+
+ rtc {
+ compatible = "mediatek,mt6397-rtc";
+ };
+ };
diff --git a/Documentation/devicetree/bindings/mfd/mt6397.txt b/Documentation/devicetree/bindings/mfd/mt6397.txt
deleted file mode 100644
index 10540aa..0000000
--- a/Documentation/devicetree/bindings/mfd/mt6397.txt
+++ /dev/null
@@ -1,110 +0,0 @@
-MediaTek MT6397/MT6323 Multifunction Device Driver
-
-MT6397/MT6323 is a multifunction device with the following sub modules:
-- Regulator
-- RTC
-- Audio codec
-- GPIO
-- Clock
-- LED
-- Keys
-- Power controller
-
-It is interfaced to host controller using SPI interface by a proprietary hardware
-called PMIC wrapper or pwrap. MT6397/MT6323 MFD is a child device of pwrap.
-See the following for pwarp node definitions:
-../soc/mediatek/mediatek,pwrap.yaml
-
-This document describes the binding for MFD device and its sub module.
-
-Required properties:
-compatible:
- "mediatek,mt6323" for PMIC MT6323
- "mediatek,mt6331" for PMIC MT6331 and MT6332
- "mediatek,mt6357" for PMIC MT6357
- "mediatek,mt6358" for PMIC MT6358
- "mediatek,mt6359" for PMIC MT6359
- "mediatek,mt6366", "mediatek,mt6358" for PMIC MT6366
- "mediatek,mt6397" for PMIC MT6397
-
-Optional subnodes:
-
-- rtc
- Required properties: Should be one of follows
- - compatible: "mediatek,mt6323-rtc"
- - compatible: "mediatek,mt6331-rtc"
- - compatible: "mediatek,mt6358-rtc"
- - compatible: "mediatek,mt6397-rtc"
- For details, see ../rtc/rtc-mt6397.txt
-- regulators
- Required properties:
- - compatible: "mediatek,mt6323-regulator"
- see ../regulator/mt6323-regulator.txt
- - compatible: "mediatek,mt6358-regulator"
- - compatible: "mediatek,mt6366-regulator", "mediatek-mt6358-regulator"
- see ../regulator/mt6358-regulator.txt
- - compatible: "mediatek,mt6397-regulator"
- see ../regulator/mt6397-regulator.txt
-- codec
- Required properties:
- - compatible: "mediatek,mt6397-codec" or "mediatek,mt6358-sound"
-- clk
- Required properties:
- - compatible: "mediatek,mt6397-clk"
-- led
- Required properties:
- - compatible: "mediatek,mt6323-led"
- see ../leds/leds-mt6323.txt
-
-- keys
- Required properties: Should be one of the following
- - compatible: "mediatek,mt6323-keys"
- - compatible: "mediatek,mt6331-keys"
- - compatible: "mediatek,mt6397-keys"
- see ../input/mtk-pmic-keys.txt
-
-- power-controller
- Required properties:
- - compatible: "mediatek,mt6323-pwrc"
- For details, see ../power/reset/mt6323-poweroff.txt
-
-- pin-controller
- Required properties:
- - compatible: "mediatek,mt6397-pinctrl"
- For details, see ../pinctrl/pinctrl-mt65xx.txt
-
-Example:
- pwrap: pwrap@1000f000 {
- compatible = "mediatek,mt8135-pwrap";
-
- ...
-
- pmic {
- compatible = "mediatek,mt6397";
-
- codec: mt6397codec {
- compatible = "mediatek,mt6397-codec";
- };
-
- regulators {
- compatible = "mediatek,mt6397-regulator";
-
- mt6397_vpca15_reg: buck_vpca15 {
- regulator-compatible = "buck_vpca15";
- regulator-name = "vpca15";
- regulator-min-microvolt = <850000>;
- regulator-max-microvolt = <1400000>;
- regulator-ramp-delay = <12500>;
- regulator-always-on;
- };
-
- mt6397_vgp4_reg: ldo_vgp4 {
- regulator-compatible = "ldo_vgp4";
- regulator-name = "vgp4";
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <3300000>;
- regulator-enable-ramp-delay = <218>;
- };
- };
- };
- };
diff --git a/Documentation/devicetree/bindings/power/reset/mt6323-poweroff.txt b/Documentation/devicetree/bindings/power/reset/mt6323-poweroff.txt
deleted file mode 100644
index 933f0c4..0000000
--- a/Documentation/devicetree/bindings/power/reset/mt6323-poweroff.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-Device Tree Bindings for Power Controller on MediaTek PMIC
-
-The power controller which could be found on PMIC is responsible for externally
-powering off or on the remote MediaTek SoC through the circuit BBPU.
-
-Required properties:
-- compatible: Should be one of follows
- "mediatek,mt6323-pwrc": for MT6323 PMIC
-
-Example:
-
- pmic {
- compatible = "mediatek,mt6323";
-
- ...
-
- power-controller {
- compatible = "mediatek,mt6323-pwrc";
- };
- }
diff --git a/Documentation/devicetree/bindings/rtc/rtc-mt6397.txt b/Documentation/devicetree/bindings/rtc/rtc-mt6397.txt
deleted file mode 100644
index 7212076..0000000
--- a/Documentation/devicetree/bindings/rtc/rtc-mt6397.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-Device-Tree bindings for MediaTek PMIC based RTC
-
-MediaTek PMIC based RTC is an independent function of MediaTek PMIC that works
-as a type of multi-function device (MFD). The RTC can be configured and set up
-with PMIC wrapper bus which is a common resource shared with the other
-functions found on the same PMIC.
-
-For MediaTek PMIC MFD bindings, see:
-../mfd/mt6397.txt
-
-For MediaTek PMIC wrapper bus bindings, see:
-../soc/mediatek/pwrap.txt
-
-Required properties:
-- compatible: Should be one of follows
- "mediatek,mt6323-rtc": for MT6323 PMIC
- "mediatek,mt6358-rtc": for MT6358 PMIC
- "mediatek,mt6366-rtc", "mediatek,mt6358-rtc": for MT6366 PMIC
- "mediatek,mt6397-rtc": for MT6397 PMIC
-
-Example:
-
- pmic {
- compatible = "mediatek,mt6323";
-
- ...
-
- rtc {
- compatible = "mediatek,mt6323-rtc";
- };
- };
diff --git a/Documentation/devicetree/bindings/sound/mt6358.txt b/Documentation/devicetree/bindings/sound/mt6358.txt
deleted file mode 100644
index fbe9e55..0000000
--- a/Documentation/devicetree/bindings/sound/mt6358.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-Mediatek MT6358 Audio Codec
-
-The communication between MT6358 and SoC is through Mediatek PMIC wrapper.
-For more detail, please visit Mediatek PMIC wrapper documentation.
-
-Must be a child node of PMIC wrapper.
-
-Required properties:
-
-- compatible - "string" - One of:
- "mediatek,mt6358-sound"
- "mediatek,mt6366-sound"
-- Avdd-supply : power source of AVDD
-
-Optional properties:
-- mediatek,dmic-mode : Indicates how many data pins are used to transmit two
- channels of PDM signal. 0 means two wires, 1 means one wire. Default
- value is 0.
-
-Example:
-
-mt6358_snd {
- compatible = "mediatek,mt6358-sound";
- Avdd-supply = <&mt6358_vaud28_reg>;
- mediatek,dmic-mode = <0>;
-};
diff --git a/MAINTAINERS b/MAINTAINERS
index 0a3d9e1..003f096 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -14365,10 +14365,12 @@ F: Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7921s-bluetooth.ya
F: drivers/bluetooth/btmtkuart.c
MEDIATEK BOARD LEVEL SHUTDOWN DRIVERS
+M: Sen Chu <sen.chu@mediatek.com>
M: Sean Wang <sean.wang@mediatek.com>
+M: Macpaul Lin <macpaul.lin@mediatek.com>
L: linux-pm@vger.kernel.org
S: Maintained
-F: Documentation/devicetree/bindings/power/reset/mt6323-poweroff.txt
+F: Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
F: drivers/power/reset/mt6323-poweroff.c
MEDIATEK CIR DRIVER
@@ -14529,9 +14531,11 @@ F: Documentation/devicetree/bindings/mtd/mediatek,mtk-nfc.yaml
F: drivers/mtd/nand/raw/mtk_*
MEDIATEK PMIC LED DRIVER
+M: Sen Chu <sen.chu@mediatek.com>
M: Sean Wang <sean.wang@mediatek.com>
+M: Macpaul Lin <macpaul.lin@mediatek.com>
S: Maintained
-F: Documentation/devicetree/bindings/leds/leds-mt6323.txt
+F: Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
F: drivers/leds/leds-mt6323.c
MEDIATEK RANDOM NUMBER GENERATOR SUPPORT
--
2.45.2
^ permalink raw reply related
* Re: [PATCH 1/3] Drivers: hv: vmbus: Disable Suspend-to-Idle for VMBus
From: kernel test robot @ 2024-09-13 17:43 UTC (permalink / raw)
To: Erni Sri Satya Vennela, kys, haiyangz, wei.liu, decui, jikos,
bentiss, dmitry.torokhov, linux-hyperv, linux-input, linux-kernel
Cc: oe-kbuild-all, ernis, Erni Sri Satya Vennela, Saurabh Sengar
In-Reply-To: <1726176470-13133-2-git-send-email-ernis@linux.microsoft.com>
Hi Erni,
kernel test robot noticed the following build errors:
[auto build test ERROR on hid/for-next]
[also build test ERROR on dtor-input/next dtor-input/for-linus linus/master v6.11-rc7 next-20240913]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Erni-Sri-Satya-Vennela/Drivers-hv-vmbus-Disable-Suspend-to-Idle-for-VMBus/20240913-053127
base: https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-next
patch link: https://lore.kernel.org/r/1726176470-13133-2-git-send-email-ernis%40linux.microsoft.com
patch subject: [PATCH 1/3] Drivers: hv: vmbus: Disable Suspend-to-Idle for VMBus
config: i386-randconfig-003-20240913 (https://download.01.org/0day-ci/archive/20240914/202409140137.5jZxplAp-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240914/202409140137.5jZxplAp-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409140137.5jZxplAp-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/hv/vmbus_drv.c:985:27: error: 'vmbus_freeze' undeclared here (not in a function); did you mean 'vmbus_remove'?
985 | .suspend_noirq = vmbus_freeze,
| ^~~~~~~~~~~~
| vmbus_remove
vim +985 drivers/hv/vmbus_drv.c
973
974 /*
975 * Note: we must use the "noirq" ops: see the comment before vmbus_bus_pm.
976 *
977 * suspend_noirq/resume_noirq are set to NULL to support Suspend-to-Idle: we
978 * shouldn't suspend the vmbus devices upon Suspend-to-Idle, otherwise there
979 * is no way to wake up a Generation-2 VM.
980 *
981 * The other 4 ops are for hibernation.
982 */
983
984 static const struct dev_pm_ops vmbus_pm = {
> 985 .suspend_noirq = vmbus_freeze,
986 .resume_noirq = NULL,
987 .freeze_noirq = vmbus_suspend,
988 .thaw_noirq = vmbus_resume,
989 .poweroff_noirq = vmbus_suspend,
990 .restore_noirq = vmbus_resume,
991 };
992
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply
* Re: [PATCH] Input: ps2-gpio - Use IRQF_NO_AUTOEN flag in request_irq()
From: Dmitry Torokhov @ 2024-09-13 17:21 UTC (permalink / raw)
To: Jinjie Ruan
Cc: erick.archer, u.kleine-koenig, danilokrummrich, linus.walleij,
robh, linux-input
In-Reply-To: <20240912033013.2610949-1-ruanjinjie@huawei.com>
On Thu, Sep 12, 2024 at 11:30:13AM +0800, Jinjie Ruan wrote:
> disable_irq() after request_irq() still has a time gap in which
> interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will
> disable IRQ auto-enable when request IRQ.
>
> Fixes: 9ee0a0558819 ("Input: PS/2 gpio bit banging driver for serio bus")
> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Applied, thank you.
--
Dmitry
^ permalink raw reply
* Re: [PATCH 1/3] Drivers: hv: vmbus: Disable Suspend-to-Idle for VMBus
From: kernel test robot @ 2024-09-13 17:01 UTC (permalink / raw)
To: Erni Sri Satya Vennela, kys, haiyangz, wei.liu, decui, jikos,
bentiss, dmitry.torokhov, linux-hyperv, linux-input, linux-kernel
Cc: oe-kbuild-all, ernis, Erni Sri Satya Vennela, Saurabh Sengar
In-Reply-To: <1726176470-13133-2-git-send-email-ernis@linux.microsoft.com>
Hi Erni,
kernel test robot noticed the following build errors:
[auto build test ERROR on hid/for-next]
[also build test ERROR on dtor-input/next dtor-input/for-linus linus/master v6.11-rc7 next-20240913]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Erni-Sri-Satya-Vennela/Drivers-hv-vmbus-Disable-Suspend-to-Idle-for-VMBus/20240913-053127
base: https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-next
patch link: https://lore.kernel.org/r/1726176470-13133-2-git-send-email-ernis%40linux.microsoft.com
patch subject: [PATCH 1/3] Drivers: hv: vmbus: Disable Suspend-to-Idle for VMBus
config: x86_64-randconfig-161-20240913 (https://download.01.org/0day-ci/archive/20240914/202409140042.imFE8dSL-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240914/202409140042.imFE8dSL-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409140042.imFE8dSL-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/hv/vmbus_drv.c:985:20: error: use of undeclared identifier 'vmbus_freeze'
985 | .suspend_noirq = vmbus_freeze,
| ^
drivers/hv/vmbus_drv.c:1913:42: warning: shift count >= width of type [-Wshift-count-overflow]
1913 | dma_set_mask(&child_device_obj->device, DMA_BIT_MASK(64));
| ^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:77:54: note: expanded from macro 'DMA_BIT_MASK'
77 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
| ^ ~~~
1 warning and 1 error generated.
vim +/vmbus_freeze +985 drivers/hv/vmbus_drv.c
973
974 /*
975 * Note: we must use the "noirq" ops: see the comment before vmbus_bus_pm.
976 *
977 * suspend_noirq/resume_noirq are set to NULL to support Suspend-to-Idle: we
978 * shouldn't suspend the vmbus devices upon Suspend-to-Idle, otherwise there
979 * is no way to wake up a Generation-2 VM.
980 *
981 * The other 4 ops are for hibernation.
982 */
983
984 static const struct dev_pm_ops vmbus_pm = {
> 985 .suspend_noirq = vmbus_freeze,
986 .resume_noirq = NULL,
987 .freeze_noirq = vmbus_suspend,
988 .thaw_noirq = vmbus_resume,
989 .poweroff_noirq = vmbus_suspend,
990 .restore_noirq = vmbus_resume,
991 };
992
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply
* Re: [PATCH v3 04/23] dt-bindings: mfd: add maxim,max77705
From: Conor Dooley @ 2024-09-13 16:47 UTC (permalink / raw)
To: Dzmitry Sankouski
Cc: Krzysztof Kozlowski, Sebastian Reichel, Bjorn Andersson,
Michael Turquette, Stephen Boyd, Neil Armstrong, Jessica Zhang,
Sam Ravnborg, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Daniel Vetter, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Lee Jones, Dmitry Torokhov, Pavel Machek,
Liam Girdwood, Mark Brown, Uwe Kleine-König, Konrad Dybcio,
Chanwoo Choi, phone-devel, linux-pm, linux-kernel, linux-arm-msm,
linux-clk, dri-devel, devicetree, linux-input, linux-leds,
linux-pwm, linux-samsung-soc
In-Reply-To: <CABTCjFCOTd5V5WyRbD1OCS9Hatk0mOCtNy5WWfp0KkUBgqXs+A@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 902 bytes --]
On Fri, Sep 13, 2024 at 05:51:56PM +0300, Dzmitry Sankouski wrote:
> чт, 20 июн. 2024 г. в 18:46, Krzysztof Kozlowski <krzk@kernel.org>:
> >
> > On 18/06/2024 15:59, Dzmitry Sankouski wrote:
> > > maxim,max77705 is MAX77705 pmic binding part
> > >
> > > Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> > > ---
> > > .../devicetree/bindings/mfd/maxim,max77705.yaml | 112 +++++++++++++++++++++
> >
> > Your patch order is totally messed. Not tested by automation. Only
> > limited review follows.
> >
> Hmm, not sure what was wrong. I sent version 4 to myself with `b4 send
> --reflect`, the order looks good.
I suspect that the order that he is referring to is not what you think,
and that the patches do appear in the order to him that they did to you,
but that order you committed changes is likely not bisectable due
dependencies coming after their users.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply
* Re: [PATCH v4 05/27] dt-bindings: mfd: add maxim,max77705
From: Rob Herring (Arm) @ 2024-09-13 16:37 UTC (permalink / raw)
To: Dzmitry Sankouski
Cc: Bjorn Andersson, Krzysztof Kozlowski, linux-kernel, Simona Vetter,
Chanwoo Choi, Mark Brown, linux-samsung-soc, Jessica Zhang,
Sam Ravnborg, dri-devel, Lee Jones, Thomas Zimmermann,
Krzysztof Kozlowski, linux-pm, Konrad Dybcio, Pavel Machek,
Michael Turquette, linux-pwm, Sebastian Reichel, devicetree,
Dmitry Torokhov, David Airlie, Uwe Kleine-König,
Neil Armstrong, linux-input, Conor Dooley, Maarten Lankhorst,
cros-qcom-dts-watchers, linux-leds, Stephen Boyd, linux-arm-msm,
linux-clk, Simona Vetter, Liam Girdwood, Maxime Ripard
In-Reply-To: <20240913-starqltechn_integration_upstream-v4-5-2d2efd5c5877@gmail.com>
On Fri, 13 Sep 2024 18:07:48 +0300, Dzmitry Sankouski wrote:
> Add maxim,max77705 core binding part.
>
> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
>
> ---
> Changes in v4:
> - change dts example intendation from tabs
> to spaces
> - remove interrupt-names property
> - remove obvious reg description
> - split long(>80) lines
> ---
> .../devicetree/bindings/mfd/maxim,max77705.yaml | 169 +++++++++++++++++++++
> MAINTAINERS | 1 +
> 2 files changed, 170 insertions(+)
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/maxim,max77705.example.dtb: pmic@66: fuel_gauge: 'shunt-resistor-micro-ohms' is a required property
from schema $id: http://devicetree.org/schemas/mfd/maxim,max77705.yaml#
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240913-starqltechn_integration_upstream-v4-5-2d2efd5c5877@gmail.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply
* [PATCH v4 27/27] arm64: dts: qcom: starqltechn: add modem support
From: Dzmitry Sankouski @ 2024-09-13 15:08 UTC (permalink / raw)
To: Sebastian Reichel, Bjorn Andersson, Michael Turquette,
Stephen Boyd, Neil Armstrong, Jessica Zhang, Sam Ravnborg,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Lee Jones,
Dmitry Torokhov, Pavel Machek, Liam Girdwood, Mark Brown,
Uwe Kleine-König, Krzysztof Kozlowski, Chanwoo Choi,
Simona Vetter, cros-qcom-dts-watchers, Konrad Dybcio,
Simona Vetter, Konrad Dybcio
Cc: linux-pm, linux-kernel, linux-arm-msm, linux-clk, dri-devel,
devicetree, linux-input, linux-leds, linux-pwm, linux-samsung-soc,
Dzmitry Sankouski
In-Reply-To: <20240913-starqltechn_integration_upstream-v4-0-2d2efd5c5877@gmail.com>
Add support for modem and ipa(IP Accelerator).
Add spss reserved memory node.
Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
---
.../boot/dts/qcom/sdm845-samsung-starqltechn.dts | 39 ++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
index 2710386a89e1..4614ec5f731f 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
@@ -17,6 +17,8 @@
#include "pm8998.dtsi"
#include "sdm845-wcd9340.dtsi"
+/delete-node/ &rmtfs_mem;
+/delete-node/ &spss_mem;
/delete-node/ &adsp_mem;
/delete-node/ &slpi_mem;
@@ -91,15 +93,39 @@ memory@a1300000 {
pmsg-size = <0x40000>;
};
+ /*
+ * It seems like reserving the old rmtfs_mem region is also needed to prevent
+ * random crashes which are most likely modem related, more testing needed.
+ */
+ removed_region: removed-region@88f00000 {
+ reg = <0 0x88f00000 0 0x1c00000>;
+ no-map;
+ };
+
slpi_mem: slpi@96700000 {
reg = <0 0x96700000 0 0xf00000>;
no-map;
};
+ spss_mem: spss@97700000 {
+ reg = <0 0x97700000 0 0x100000>;
+ no-map;
+ };
+
adsp_mem: memory@97800000 {
reg = <0 0x97800000 0 0x2000000>;
no-map;
};
+
+ rmtfs_mem: rmtfs-mem@fde00000 {
+ compatible = "qcom,rmtfs-mem";
+ reg = <0 0xfde00000 0 0x202000>;
+ qcom,use-guard-pages;
+ no-map;
+
+ qcom,client-id = <1>;
+ qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
+ };
};
gpio_keys {
@@ -837,6 +863,19 @@ dai@5 {
};
};
+&mss_pil {
+ firmware-name = "qcom/sdm845/starqltechn/mba.mbn",
+ "qcom/sdm845/starqltechn/modem.mbn";
+ status = "okay";
+};
+
+&ipa {
+ qcom,gsi-loader = "self";
+ memory-region = <&ipa_fw_mem>;
+ firmware-name = "qcom/sdm845/starqltechn/ipa_fws.mbn";
+ status = "okay";
+};
+
&usb_1 {
status = "okay";
};
--
2.39.2
^ permalink raw reply related
* [PATCH v4 26/27] arm64: dts: qcom: starqltechn: add graphics support
From: Dzmitry Sankouski @ 2024-09-13 15:08 UTC (permalink / raw)
To: Sebastian Reichel, Bjorn Andersson, Michael Turquette,
Stephen Boyd, Neil Armstrong, Jessica Zhang, Sam Ravnborg,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Lee Jones,
Dmitry Torokhov, Pavel Machek, Liam Girdwood, Mark Brown,
Uwe Kleine-König, Krzysztof Kozlowski, Chanwoo Choi,
Simona Vetter, cros-qcom-dts-watchers, Konrad Dybcio,
Simona Vetter, Konrad Dybcio
Cc: linux-pm, linux-kernel, linux-arm-msm, linux-clk, dri-devel,
devicetree, linux-input, linux-leds, linux-pwm, linux-samsung-soc,
Dzmitry Sankouski
In-Reply-To: <20240913-starqltechn_integration_upstream-v4-0-2d2efd5c5877@gmail.com>
Add support for gpu and panel.
Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
---
.../boot/dts/qcom/sdm845-samsung-starqltechn.dts | 67 ++++++++++++++++++++++
1 file changed, 67 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
index c36ad043edf0..2710386a89e1 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
@@ -203,6 +203,52 @@ vib_pwm: pwm {
};
};
+&gpu {
+ status = "okay";
+
+ zap-shader {
+ memory-region = <&gpu_mem>;
+ firmware-name = "qcom/sdm845/starqltechn/a630_zap.mbn";
+ };
+};
+
+&mdss {
+ status = "okay";
+};
+
+&mdss_dsi0 {
+ vdda-supply = <&vreg_l26a_1p2>;
+ status = "okay";
+
+ panel@0 {
+ compatible = "samsung,s6e3ha8";
+ reg = <0>;
+ vci-supply = <&s2dos05_ldo4>;
+ vddr-supply = <&s2dos05_buck1>;
+ vdd3-supply = <&s2dos05_ldo1>;
+ te-gpios = <&tlmm 10 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>;
+ pinctrl-0 = <&sde_dsi_default &sde_te>;
+ pinctrl-1 = <&sde_dsi_suspend &sde_te>;
+ pinctrl-names = "default", "suspend";
+
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&mdss_dsi0_out>;
+ };
+ };
+ };
+};
+
+&mdss_dsi0_out {
+ data-lanes = <0 1 2 3>;
+ remote-endpoint = <&panel_in>;
+};
+
+&mdss_dsi0_phy {
+ vdds-supply = <&vdda_mipi_dsi0_pll>;
+ status = "okay";
+};
&apps_rsc {
regulators-0 {
@@ -837,6 +883,27 @@ &tlmm {
gpio-reserved-ranges = <27 4>, /* SPI (eSE - embedded Secure Element) */
<85 4>; /* SPI (fingerprint reader) */
+ sde_dsi_default: sde-dsi-default-state {
+ pins = "gpio6";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-disable;
+ };
+
+ sde_dsi_suspend: sde-dsi-suspend-state {
+ pins = "gpio6";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ sde_te: sde-te-state {
+ pins = "gpio10";
+ function = "mdp_vsync";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
sdc2_clk_state: sdc2-clk-state {
pins = "sdc2_clk";
bias-disable;
--
2.39.2
^ permalink raw reply related
* [PATCH v4 25/27] arm64: dts: qcom: starqltechn: add initial sound support
From: Dzmitry Sankouski @ 2024-09-13 15:08 UTC (permalink / raw)
To: Sebastian Reichel, Bjorn Andersson, Michael Turquette,
Stephen Boyd, Neil Armstrong, Jessica Zhang, Sam Ravnborg,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Lee Jones,
Dmitry Torokhov, Pavel Machek, Liam Girdwood, Mark Brown,
Uwe Kleine-König, Krzysztof Kozlowski, Chanwoo Choi,
Simona Vetter, cros-qcom-dts-watchers, Konrad Dybcio,
Simona Vetter, Konrad Dybcio
Cc: linux-pm, linux-kernel, linux-arm-msm, linux-clk, dri-devel,
devicetree, linux-input, linux-leds, linux-pwm, linux-samsung-soc,
Dzmitry Sankouski
In-Reply-To: <20240913-starqltechn_integration_upstream-v4-0-2d2efd5c5877@gmail.com>
Add support for sound (headphones and mics only)
Also redefine slpi reserved memory, because adsp_mem overlaps with
slpi_mem inherited from sdm845.dtsi.
Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
---
.../boot/dts/qcom/sdm845-samsung-starqltechn.dts | 213 +++++++++++++++++++++
1 file changed, 213 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
index 37433ef74502..c36ad043edf0 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
@@ -10,8 +10,15 @@
#include <dt-bindings/input/linux-event-codes.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include <dt-bindings/sound/qcom,q6afe.h>
+#include <dt-bindings/sound/qcom,q6asm.h>
+
#include "sdm845.dtsi"
#include "pm8998.dtsi"
+#include "sdm845-wcd9340.dtsi"
+
+/delete-node/ &adsp_mem;
+/delete-node/ &slpi_mem;
/ {
chassis-type = "handset";
@@ -83,6 +90,16 @@ memory@a1300000 {
ftrace-size = <0x40000>;
pmsg-size = <0x40000>;
};
+
+ slpi_mem: slpi@96700000 {
+ reg = <0 0x96700000 0 0xf00000>;
+ no-map;
+ };
+
+ adsp_mem: memory@97800000 {
+ reg = <0 0x97800000 0 0x2000000>;
+ no-map;
+ };
};
gpio_keys {
@@ -578,6 +595,202 @@ touchscreen@48 {
};
};
+&adsp_pas {
+ firmware-name = "qcom/sdm845/starqltechn/adsp.mbn";
+ status = "okay";
+};
+
+&lpasscc {
+ status = "okay";
+};
+
+&wcd9340 {
+ reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
+ vdd-buck-supply = <&vreg_s4a_1p8>;
+ vdd-buck-sido-supply = <&vreg_s4a_1p8>;
+ vdd-tx-supply = <&vreg_s4a_1p8>;
+ vdd-rx-supply = <&vreg_s4a_1p8>;
+ vdd-io-supply = <&vreg_s4a_1p8>;
+ qcom,micbias1-microvolt = <1800000>;
+ qcom,micbias2-microvolt = <2700000>;
+ qcom,micbias3-microvolt = <1800000>;
+ qcom,micbias4-microvolt = <1800000>;
+};
+
+&sound {
+ compatible = "qcom,sdm845-sndcard";
+ model = "Samsung Galaxy S9";
+ pinctrl-0 = <&quat_mi2s_active &quat_mi2s_sd0_active &quat_mi2s_sd1_active>;
+ pinctrl-names = "default";
+ status = "okay";
+
+ audio-routing = "RX_BIAS", "MCLK",
+ "AMIC2", "MIC BIAS2", /* Headset Mic */
+ "AMIC3", "MIC BIAS2", /* FMLeft Tx */
+ "AMIC4", "MIC BIAS2", /* FMRight Tx */
+ "DMIC0", "MIC BIAS1", /* Digital Mic0 */
+ "DMIC5", "MIC BIAS4", /* Digital Mic1 */
+ "DMIC4", "MIC BIAS4", /* Digital Mic2 */
+ "DMIC3", "MIC BIAS3", /* Digital Mic3 */
+ "DMIC2", "MIC BIAS3", /* Digital Mic4 */
+ "DMIC1", "MIC BIAS1"; /* Digital Mic5 */
+
+ mm1-dai-link {
+ link-name = "MultiMedia1";
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
+ };
+ };
+
+ mm2-dai-link {
+ link-name = "MultiMedia2";
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>;
+ };
+ };
+
+ mm3-dai-link {
+ link-name = "MultiMedia3";
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>;
+ };
+ };
+
+ mm4-dai-link {
+ link-name = "MultiMedia4";
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA4>;
+ };
+ };
+
+ mm5-dai-link {
+ link-name = "MultiMedia5";
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA5>;
+ };
+ };
+
+ mm6-dai-link {
+ link-name = "MultiMedia6";
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA6>;
+ };
+ };
+
+ slim-dai-link {
+ link-name = "SLIM Playback 1";
+ cpu {
+ sound-dai = <&q6afedai SLIMBUS_0_RX>;
+ };
+
+ platform {
+ sound-dai = <&q6routing>;
+ };
+
+ codec {
+ sound-dai = <&wcd9340 0>;
+ };
+ };
+
+ slimcap-dai-link {
+ link-name = "SLIM Capture 1";
+ cpu {
+ sound-dai = <&q6afedai SLIMBUS_0_TX>;
+ };
+
+ platform {
+ sound-dai = <&q6routing>;
+ };
+
+ codec {
+ sound-dai = <&wcd9340 1>;
+ };
+ };
+
+ slim2-dai-link {
+ link-name = "SLIM Playback 2";
+ cpu {
+ sound-dai = <&q6afedai SLIMBUS_1_RX>;
+ };
+
+ platform {
+ sound-dai = <&q6routing>;
+ };
+
+ codec {
+ sound-dai = <&wcd9340 2>; /* AIF2_PB */
+ };
+ };
+
+ slimcap2-dai-link {
+ link-name = "SLIM Capture 2";
+ cpu {
+ sound-dai = <&q6afedai SLIMBUS_1_TX>;
+ };
+
+ platform {
+ sound-dai = <&q6routing>;
+ };
+
+ codec {
+ sound-dai = <&wcd9340 3>; /* AIF2_CAP */
+ };
+ };
+
+ slimcap3-dai-link {
+ link-name = "SLIM Capture 3";
+ cpu {
+ sound-dai = <&q6afedai SLIMBUS_2_TX>;
+ };
+
+ platform {
+ sound-dai = <&q6routing>;
+ };
+
+ codec {
+ sound-dai = <&wcd9340 5>; /* AIF3_CAP */
+ };
+ };
+};
+
+&q6afedai {
+ dai@22 {
+ reg = <22>;
+ qcom,sd-lines = <1>;
+ };
+
+ dai@23 {
+ reg = <23>;
+ qcom,sd-lines = <0>;
+ };
+};
+
+&q6asmdai {
+ dai@0 {
+ reg = <0>;
+ };
+
+ dai@1 {
+ reg = <1>;
+ };
+
+ dai@2 {
+ reg = <2>;
+ };
+
+ dai@3 {
+ reg = <3>;
+ };
+
+ dai@4 {
+ reg = <4>;
+ };
+
+ dai@5 {
+ reg = <5>;
+ };
+};
+
&usb_1 {
status = "okay";
};
--
2.39.2
^ permalink raw reply related
* [PATCH v4 24/27] arm64: dts: qcom: starqltechn: add touchscreen support
From: Dzmitry Sankouski @ 2024-09-13 15:08 UTC (permalink / raw)
To: Sebastian Reichel, Bjorn Andersson, Michael Turquette,
Stephen Boyd, Neil Armstrong, Jessica Zhang, Sam Ravnborg,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Lee Jones,
Dmitry Torokhov, Pavel Machek, Liam Girdwood, Mark Brown,
Uwe Kleine-König, Krzysztof Kozlowski, Chanwoo Choi,
Simona Vetter, cros-qcom-dts-watchers, Konrad Dybcio,
Simona Vetter, Konrad Dybcio
Cc: linux-pm, linux-kernel, linux-arm-msm, linux-clk, dri-devel,
devicetree, linux-input, linux-leds, linux-pwm, linux-samsung-soc,
Dzmitry Sankouski
In-Reply-To: <20240913-starqltechn_integration_upstream-v4-0-2d2efd5c5877@gmail.com>
Add support for samsung,s6sy761 touchscreen.
Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
---
.../boot/dts/qcom/sdm845-samsung-starqltechn.dts | 28 ++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
index 5e5684f84ffb..37433ef74502 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
@@ -561,6 +561,23 @@ &sdhc_2 {
status = "okay";
};
+&i2c11 {
+ clock-frequency = <400000>;
+ status = "okay";
+
+ touchscreen@48 {
+ compatible = "samsung,s6sy761";
+ reg = <0x48>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <120 IRQ_TYPE_LEVEL_HIGH>;
+ vdd-supply = <&s2dos05_ldo2>;
+ avdd-supply = <&s2dos05_ldo3>;
+
+ pinctrl-0 = <&touch_irq_state>;
+ pinctrl-names = "default";
+ };
+};
+
&usb_1 {
status = "okay";
};
@@ -665,4 +682,15 @@ i2c21_scl_state: i2c21-scl-state {
drive-strength = <2>;
bias-disable;
};
+
+ touch_irq_state: touch-irq-state {
+ pins = "gpio120";
+ function = "gpio";
+ bias-disable;
+ };
+};
+
+&qup_i2c11_default {
+ drive-strength = <2>;
+ bias-disable;
};
--
2.39.2
^ permalink raw reply related
* [PATCH v4 23/27] arm64: dts: qcom: starqltechn: add display PMIC
From: Dzmitry Sankouski @ 2024-09-13 15:08 UTC (permalink / raw)
To: Sebastian Reichel, Bjorn Andersson, Michael Turquette,
Stephen Boyd, Neil Armstrong, Jessica Zhang, Sam Ravnborg,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Lee Jones,
Dmitry Torokhov, Pavel Machek, Liam Girdwood, Mark Brown,
Uwe Kleine-König, Krzysztof Kozlowski, Chanwoo Choi,
Simona Vetter, cros-qcom-dts-watchers, Konrad Dybcio,
Simona Vetter, Konrad Dybcio
Cc: linux-pm, linux-kernel, linux-arm-msm, linux-clk, dri-devel,
devicetree, linux-input, linux-leds, linux-pwm, linux-samsung-soc,
Dzmitry Sankouski
In-Reply-To: <20240913-starqltechn_integration_upstream-v4-0-2d2efd5c5877@gmail.com>
Add support for s2dos05 display / touchscreen PMIC
Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
---
.../boot/dts/qcom/sdm845-samsung-starqltechn.dts | 77 ++++++++++++++++++++++
1 file changed, 77 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
index 865253d8f0c7..5e5684f84ffb 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
@@ -39,6 +39,9 @@ framebuffer: framebuffer@9d400000 {
height = <2960>;
stride = <(1440 * 4)>;
format = "a8r8g8b8";
+ vci-supply = <&s2dos05_ldo4>;
+ vddr-supply = <&s2dos05_buck1>;
+ vdd3-supply = <&s2dos05_ldo1>;
};
};
@@ -101,6 +104,66 @@ key-wink {
};
};
+ i2c21 {
+ compatible = "i2c-gpio";
+ sda-gpios = <&tlmm 127 GPIO_ACTIVE_HIGH>;
+ scl-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;
+ i2c-gpio,delay-us = <2>;
+ pinctrl-0 = <&i2c21_sda_state &i2c21_scl_state>;
+ pinctrl-names = "default";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pmic@60 {
+ compatible = "samsung,s2dos05";
+ reg = <0x60>;
+
+ regulators {
+ s2dos05_ldo1: ldo1 {
+ regulator-active-discharge = <1>;
+ regulator-enable-ramp-delay = <12000>;
+ regulator-min-microvolt = <1500000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-name = "s2dos05-ldo1";
+ };
+
+ s2dos05_ldo2: ldo2 {
+ regulator-active-discharge = <1>;
+ regulator-boot-on;
+ regulator-enable-ramp-delay = <12000>;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "s2dos05-ldo2";
+ };
+
+ s2dos05_ldo3: ldo3 {
+ regulator-active-discharge = <1>;
+ regulator-boot-on;
+ regulator-enable-ramp-delay = <12000>;
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-name = "s2dos05-ldo3";
+ };
+
+ s2dos05_ldo4: ldo4 {
+ regulator-active-discharge = <1>;
+ regulator-enable-ramp-delay = <12000>;
+ regulator-min-microvolt = <2700000>;
+ regulator-max-microvolt = <3775000>;
+ regulator-name = "s2dos05-ldo4";
+ };
+
+ s2dos05_buck1: buck1 {
+ regulator-active-discharge = <1>;
+ regulator-enable-ramp-delay = <12000>;
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <2100000>;
+ regulator-name = "s2dos05-buck1";
+ };
+ };
+ };
+ };
+
vib_regulator: gpio-regulator {
compatible = "regulator-fixed";
regulator-name = "haptic";
@@ -588,4 +651,18 @@ motor_pwm_suspend_state: motor-pwm-suspend-state {
bias-disable;
output-low;
};
+
+ i2c21_sda_state: i2c21-sda-state {
+ pins = "gpio127";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ i2c21_scl_state: i2c21-scl-state {
+ pins = "gpio128";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
};
--
2.39.2
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox