[PATCH 4/6] arm64: dts: qcom: sm6125-xiaomi-ginkgo: Fix reserved gpio ranges

Barnabás Czémán posted 6 patches 4 weeks ago
There is a newer version of this series
[PATCH 4/6] arm64: dts: qcom: sm6125-xiaomi-ginkgo: Fix reserved gpio ranges
Posted by Barnabás Czémán 4 weeks ago
The device was crashing on boot because the reserved gpio ranges
was wrongly defined. Correct the ranges for avoid pinctrl crashing.

Fixes: 9b1a6c925c88 ("arm64: dts: qcom: sm6125: Initial support for xiaomi-ginkgo")
Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
---
 arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts b/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts
index 666daf4a9fdd..163ecdc7fd6c 100644
--- a/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts
+++ b/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts
@@ -296,7 +296,7 @@ &sdhc_2 {
 };
 
 &tlmm {
-	gpio-reserved-ranges = <22 2>, <28 6>;
+	gpio-reserved-ranges = <0 4>, <30 4>;
 };
 
 &usb3 {

-- 
2.52.0

Re: [PATCH 4/6] arm64: dts: qcom: sm6125-xiaomi-ginkgo: Fix reserved gpio ranges
Posted by Konrad Dybcio 3 weeks, 6 days ago
On 1/12/26 9:13 PM, Barnabás Czémán wrote:
> The device was crashing on boot because the reserved gpio ranges
> was wrongly defined. Correct the ranges for avoid pinctrl crashing.
> 
> Fixes: 9b1a6c925c88 ("arm64: dts: qcom: sm6125: Initial support for xiaomi-ginkgo")
> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
> ---

That's odd.. were you able to confirm that these values are alright for
both the Note 8 and the 8T? 

>  arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts b/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts
> index 666daf4a9fdd..163ecdc7fd6c 100644
> --- a/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts
> +++ b/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts
> @@ -296,7 +296,7 @@ &sdhc_2 {
>  };
>  
>  &tlmm {
> -	gpio-reserved-ranges = <22 2>, <28 6>;
> +	gpio-reserved-ranges = <0 4>, <30 4>;

Any chance you know/could deduce what they're connected to and describe
it, like in x1-crd.dtsi?

Konrad
Re: [PATCH 4/6] arm64: dts: qcom: sm6125-xiaomi-ginkgo: Fix reserved gpio ranges
Posted by barnabas.czeman@mainlining.org 3 weeks, 6 days ago
On 2026-01-13 10:01, Konrad Dybcio wrote:
> On 1/12/26 9:13 PM, Barnabás Czémán wrote:
>> The device was crashing on boot because the reserved gpio ranges
>> was wrongly defined. Correct the ranges for avoid pinctrl crashing.
>> 
>> Fixes: 9b1a6c925c88 ("arm64: dts: qcom: sm6125: Initial support for 
>> xiaomi-ginkgo")
>> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
>> ---
> 
> That's odd.. were you able to confirm that these values are alright for
> both the Note 8 and the 8T?
Yes, it was tested on both devices. The original devicetree was never 
boot.
> 
>>  arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts 
>> b/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts
>> index 666daf4a9fdd..163ecdc7fd6c 100644
>> --- a/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts
>> +++ b/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts
>> @@ -296,7 +296,7 @@ &sdhc_2 {
>>  };
>> 
>>  &tlmm {
>> -	gpio-reserved-ranges = <22 2>, <28 6>;
>> +	gpio-reserved-ranges = <0 4>, <30 4>;
> 
> Any chance you know/could deduce what they're connected to and describe
> it, like in x1-crd.dtsi?
https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/willow-p-oss/drivers/pinctrl/qcom/pinctrl-msm.c#L605
https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/ginkgo-p-oss/drivers/pinctrl/qcom/pinctrl-msm.c#L610
> 
> Konrad
Re: [PATCH 4/6] arm64: dts: qcom: sm6125-xiaomi-ginkgo: Fix reserved gpio ranges
Posted by Konrad Dybcio 3 weeks, 6 days ago
On 1/13/26 10:08 AM, barnabas.czeman@mainlining.org wrote:
> On 2026-01-13 10:01, Konrad Dybcio wrote:
>> On 1/12/26 9:13 PM, Barnabás Czémán wrote:
>>> The device was crashing on boot because the reserved gpio ranges
>>> was wrongly defined. Correct the ranges for avoid pinctrl crashing.
>>>
>>> Fixes: 9b1a6c925c88 ("arm64: dts: qcom: sm6125: Initial support for xiaomi-ginkgo")
>>> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
>>> ---
>>
>> That's odd.. were you able to confirm that these values are alright for
>> both the Note 8 and the 8T?
> Yes, it was tested on both devices. The original devicetree was never boot.

Fun..

>>
>>>  arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts b/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts
>>> index 666daf4a9fdd..163ecdc7fd6c 100644
>>> --- a/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts
>>> +++ b/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts
>>> @@ -296,7 +296,7 @@ &sdhc_2 {
>>>  };
>>>
>>>  &tlmm {
>>> -    gpio-reserved-ranges = <22 2>, <28 6>;
>>> +    gpio-reserved-ranges = <0 4>, <30 4>;
>>
>> Any chance you know/could deduce what they're connected to and describe
>> it, like in x1-crd.dtsi?
> https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/willow-p-oss/drivers/pinctrl/qcom/pinctrl-msm.c#L605
> https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/ginkgo-p-oss/drivers/pinctrl/qcom/pinctrl-msm.c#L610

GPIO0-3 sounds like QUP0 and GPIO30-33 sounds like QUP6

My guess would be one goes to a fingerprint scanner and one goes to
NFC eSE (or N/C for the device without NFC)

Could you scan the downstream devicetree for signals of that?

Konrad
Re: [PATCH 4/6] arm64: dts: qcom: sm6125-xiaomi-ginkgo: Fix reserved gpio ranges
Posted by barnabas.czeman@mainlining.org 3 weeks, 6 days ago
On 2026-01-13 10:12, Konrad Dybcio wrote:
> On 1/13/26 10:08 AM, barnabas.czeman@mainlining.org wrote:
>> On 2026-01-13 10:01, Konrad Dybcio wrote:
>>> On 1/12/26 9:13 PM, Barnabás Czémán wrote:
>>>> The device was crashing on boot because the reserved gpio ranges
>>>> was wrongly defined. Correct the ranges for avoid pinctrl crashing.
>>>> 
>>>> Fixes: 9b1a6c925c88 ("arm64: dts: qcom: sm6125: Initial support for 
>>>> xiaomi-ginkgo")
>>>> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
>>>> ---
>>> 
>>> That's odd.. were you able to confirm that these values are alright 
>>> for
>>> both the Note 8 and the 8T?
>> Yes, it was tested on both devices. The original devicetree was never 
>> boot.
> 
> Fun..
> 
>>> 
>>>>  arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts | 2 +-
>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>> 
>>>> diff --git a/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts 
>>>> b/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts
>>>> index 666daf4a9fdd..163ecdc7fd6c 100644
>>>> --- a/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts
>>>> +++ b/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts
>>>> @@ -296,7 +296,7 @@ &sdhc_2 {
>>>>  };
>>>> 
>>>>  &tlmm {
>>>> -    gpio-reserved-ranges = <22 2>, <28 6>;
>>>> +    gpio-reserved-ranges = <0 4>, <30 4>;
>>> 
>>> Any chance you know/could deduce what they're connected to and 
>>> describe
>>> it, like in x1-crd.dtsi?
>> https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/willow-p-oss/drivers/pinctrl/qcom/pinctrl-msm.c#L605
>> https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/ginkgo-p-oss/drivers/pinctrl/qcom/pinctrl-msm.c#L610
> 
> GPIO0-3 sounds like QUP0 and GPIO30-33 sounds like QUP6
> 
> My guess would be one goes to a fingerprint scanner and one goes to
> NFC eSE (or N/C for the device without NFC)
> 
> Could you scan the downstream devicetree for signals of that?
NFC is using gpio83, gpio84, gpio85 and gpio95.
> 
> Konrad
Re: [PATCH 4/6] arm64: dts: qcom: sm6125-xiaomi-ginkgo: Fix reserved gpio ranges
Posted by Konrad Dybcio 3 weeks, 6 days ago
On 1/13/26 10:25 AM, barnabas.czeman@mainlining.org wrote:
> On 2026-01-13 10:12, Konrad Dybcio wrote:
>> On 1/13/26 10:08 AM, barnabas.czeman@mainlining.org wrote:
>>> On 2026-01-13 10:01, Konrad Dybcio wrote:
>>>> On 1/12/26 9:13 PM, Barnabás Czémán wrote:
>>>>> The device was crashing on boot because the reserved gpio ranges
>>>>> was wrongly defined. Correct the ranges for avoid pinctrl crashing.
>>>>>
>>>>> Fixes: 9b1a6c925c88 ("arm64: dts: qcom: sm6125: Initial support for xiaomi-ginkgo")
>>>>> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
>>>>> ---
>>>>
>>>> That's odd.. were you able to confirm that these values are alright for
>>>> both the Note 8 and the 8T?
>>> Yes, it was tested on both devices. The original devicetree was never boot.
>>
>> Fun..
>>
>>>>
>>>>>  arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts | 2 +-
>>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts b/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts
>>>>> index 666daf4a9fdd..163ecdc7fd6c 100644
>>>>> --- a/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts
>>>>> +++ b/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts
>>>>> @@ -296,7 +296,7 @@ &sdhc_2 {
>>>>>  };
>>>>>
>>>>>  &tlmm {
>>>>> -    gpio-reserved-ranges = <22 2>, <28 6>;
>>>>> +    gpio-reserved-ranges = <0 4>, <30 4>;
>>>>
>>>> Any chance you know/could deduce what they're connected to and describe
>>>> it, like in x1-crd.dtsi?
>>> https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/willow-p-oss/drivers/pinctrl/qcom/pinctrl-msm.c#L605
>>> https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/ginkgo-p-oss/drivers/pinctrl/qcom/pinctrl-msm.c#L610
>>
>> GPIO0-3 sounds like QUP0 and GPIO30-33 sounds like QUP6
>>
>> My guess would be one goes to a fingerprint scanner and one goes to
>> NFC eSE (or N/C for the device without NFC)
>>
>> Could you scan the downstream devicetree for signals of that?
> NFC is using gpio83, gpio84, gpio85 and gpio95.

I was referring to the NFC eSE (embedded Secure Element) which usually
has a separate connection to the SoC

Konrad
Re: [PATCH 4/6] arm64: dts: qcom: sm6125-xiaomi-ginkgo: Fix reserved gpio ranges
Posted by Biswapriyo Nath 3 weeks, 6 days ago
On Tue, 13 Jan 2026 10:45:02 +0100 Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:

> I was referring to the NFC eSE (embedded Secure Element) which usually
> has a separate connection to the SoC

Yes, gpio 0-4 are connected to NFC eSE and gpio 30-34 are for
fingerprint scanner. Here is the list of reserved gpio and their
functions according to the device's schematic.

0 - ESE_SPI_MISO
1 - ESE_SPI_MOSI
2 - ESE_SPI_SCLK
3 - ESE_SPI_CS_N

30 - FP_SPI_MISO
31 - FP_SPI_MOSI
32 - FP_SPI_SCLK
33 - FP_SPI_CS_N

Though Redmi Note 8 does not have NFC, kernel crashes if 0-4 gpios
are not reserved.

Tested-by: Biswapriyo Nath <nathbappai@gmail.com>

Thanks.