mbox series

[0/7] arm64: dts: mediatek: Add support for Lenovo IdeaPad Duet Chromebook

Message ID 20200619102757.1358675-1-enric.balletbo@collabora.com
Headers show
Series arm64: dts: mediatek: Add support for Lenovo IdeaPad Duet Chromebook | expand

Message

Enric Balletbo i Serra June 19, 2020, 10:27 a.m. UTC
These series adds basic support for the Lenovo IdeaPad Duet Chromebook, a
2-in-1 detachable devices using the MediaTek MT8183 SoC. The first patch
only adds the new compatible names in the mediatek binding. The second
patch, adds the missing compatible to instantiate the PMIC regulators.
The next patch adds missing devices to support better the board and fixes
some warnings found running dtbs_check. And finally, the latest
introduces support for the board itself.

All the patches has been tested on Lenovo IdeaPad Duet Chromebook with
the patches applied on top of 5.8-rc1 and with serial console, booting
without problems and being able to go to the login prompt.

Best regards,
  Enric

Enric Balletbo i Serra (7):
  dt-bindings: arm64: dts: mediatek: Add mt8183-kukui-krane-sku176
  arm64: dts: mt6358: Add the compatible for the regulators
  arm64: dts: mt8183: Add MediaTek's peripheral configuration controller
  arm64: dts: mt8183: Fix unit name warnings
  arm64: dts: mt8183-evb: Fix unit name warnings
  arm64: dts: mt8183: Add USB3.0 support
  arm64: dts: mt8183: Add krane-sku176 board

 .../devicetree/bindings/arm/mediatek.yaml     |   5 +
 arch/arm64/boot/dts/mediatek/Makefile         |   1 +
 arch/arm64/boot/dts/mediatek/mt6358.dtsi      |   2 +
 arch/arm64/boot/dts/mediatek/mt8183-evb.dts   |   4 +-
 .../mediatek/mt8183-kukui-krane-sku176.dts    |  18 +
 .../boot/dts/mediatek/mt8183-kukui-krane.dtsi | 343 ++++++++
 .../arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 788 ++++++++++++++++++
 arch/arm64/boot/dts/mediatek/mt8183.dtsi      |  68 +-
 8 files changed, 1225 insertions(+), 4 deletions(-)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8183-kukui-krane-sku176.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8183-kukui-krane.dtsi
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi

Comments

Matthias Brugger June 22, 2020, 10:14 a.m. UTC | #1
On 19/06/2020 12:27, Enric Balletbo i Serra wrote:
> Remove the unit address from the DT nodes that doesn't have a reg
> property. This fixes the following unit name warnings:
> 
>   Warning (unit_address_vs_reg): /cpus/idle-states/cluster-sleep@0: node has a unit name, but no reg or ranges property
>   Warning (unit_address_vs_reg): /cpus/idle-states/cluster-sleep@1: node has a unit name, but no reg or ranges property
> 
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> ---
> 
>  arch/arm64/boot/dts/mediatek/mt8183.dtsi | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
> index 00137ec61164d..e356076749148 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
> @@ -168,7 +168,7 @@ CPU_SLEEP: cpu-sleep {
>  				min-residency-us = <800>;
>  			};
>  
> -			CLUSTER_SLEEP0: cluster-sleep@0 {
> +			CLUSTER_SLEEP0: cluster-sleep0 {

Should be:
cluster-sleep-0

>  				compatible = "arm,idle-state";
>  				local-timer-stop;
>  				arm,psci-suspend-param = <0x01010001>;
> @@ -176,7 +176,7 @@ CLUSTER_SLEEP0: cluster-sleep@0 {
>  				exit-latency-us = <400>;
>  				min-residency-us = <1000>;
>  			};
> -			CLUSTER_SLEEP1: cluster-sleep@1 {
> +			CLUSTER_SLEEP1: cluster-sleep1 {

Same here.

Regards,
Matthias1

>  				compatible = "arm,idle-state";
>  				local-timer-stop;
>  				arm,psci-suspend-param = <0x01010001>;
>
Matthias Brugger June 22, 2020, 10:33 a.m. UTC | #2
On 19/06/2020 12:27, Enric Balletbo i Serra wrote:
> Also known as the Lenovo IdeaPad Duet Chromebook.
> 
> There are different krane boards with shared resources, hence a
> mt8183-kukui-krane.dtsi was created for easily introduce future new
> boards. The same happens with the baseboard codenamed kukui where
> different variants, apart from kukui variant can take advantage of the
> shared resources.
> 
> Signed-off-by: Ben Ho <Ben.Ho@mediatek.com>
> [originally created by Ben Ho but adapted and ported to mainline]
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> ---
> 
>  arch/arm64/boot/dts/mediatek/Makefile         |   1 +
>  .../mediatek/mt8183-kukui-krane-sku176.dts    |  18 +
>  .../boot/dts/mediatek/mt8183-kukui-krane.dtsi | 343 ++++++++
>  .../arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 788 ++++++++++++++++++
>  arch/arm64/boot/dts/mediatek/mt8183.dtsi      |   1 +
>  5 files changed, 1151 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/mediatek/mt8183-kukui-krane-sku176.dts
>  create mode 100644 arch/arm64/boot/dts/mediatek/mt8183-kukui-krane.dtsi
>  create mode 100644 arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
> 
[...]
> diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
> new file mode 100644
> index 0000000000000..f0a070535b340
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
[...]
> +
> +	max98357a: codec0 {
> +		compatible = "maxim,max98357a";
> +		sdmode-gpios = <&pio 175 0>;
> +	};
> +
> +	btsco: codec1 {

bt_sco_codec:
is more clear, I think.

> +		compatible = "linux,bt-sco";
> +	};
> +
> +	wifi_pwrseq: wifi-pwrseq {
> +		compatible = "mmc-pwrseq-simple";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&wifi_pins_pwrseq>;
> +
> +		/* Toggle WIFI_ENABLE to reset the chip. */
> +		reset-gpios = <&pio 119 1>;
> +	};
> +
[...]> diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi
b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
> index a1576f1b5a447..689bce13e0165 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
> @@ -719,6 +719,7 @@ u3phy: usb-phy@11f40000 {
>  			compatible = "mediatek,mt8183-tphy",
>  				     "mediatek,generic-tphy-v2";
>  			#address-cells = <1>;
> +			#phy-cells = <1>;

Wrong patch?

>  			#size-cells = <1>;
>  			ranges = <0 0 0x11f40000 0x1000>;
>  			status = "okay";
> 

Regards,
Matthias
Enric Balletbo i Serra June 25, 2020, 8:39 a.m. UTC | #3
Hi Matthias,

Thank you for you review.

On 22/6/20 12:14, Matthias Brugger wrote:
> 
> 
> On 19/06/2020 12:27, Enric Balletbo i Serra wrote:
>> Remove the unit address from the DT nodes that doesn't have a reg
>> property. This fixes the following unit name warnings:
>>
>>   Warning (unit_address_vs_reg): /cpus/idle-states/cluster-sleep@0: node has a unit name, but no reg or ranges property
>>   Warning (unit_address_vs_reg): /cpus/idle-states/cluster-sleep@1: node has a unit name, but no reg or ranges property
>>
>> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
>> ---
>>
>>  arch/arm64/boot/dts/mediatek/mt8183.dtsi | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
>> index 00137ec61164d..e356076749148 100644
>> --- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi
>> +++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
>> @@ -168,7 +168,7 @@ CPU_SLEEP: cpu-sleep {
>>  				min-residency-us = <800>;
>>  			};
>>  
>> -			CLUSTER_SLEEP0: cluster-sleep@0 {
>> +			CLUSTER_SLEEP0: cluster-sleep0 {
> 
> Should be:
> cluster-sleep-0
> 

Ack, I'll change in next version

>>  				compatible = "arm,idle-state";
>>  				local-timer-stop;
>>  				arm,psci-suspend-param = <0x01010001>;
>> @@ -176,7 +176,7 @@ CLUSTER_SLEEP0: cluster-sleep@0 {
>>  				exit-latency-us = <400>;
>>  				min-residency-us = <1000>;
>>  			};
>> -			CLUSTER_SLEEP1: cluster-sleep@1 {
>> +			CLUSTER_SLEEP1: cluster-sleep1 {
> 
> Same here.
> 

Ack.

> Regards,
> Matthias1
> 
>>  				compatible = "arm,idle-state";
>>  				local-timer-stop;
>>  				arm,psci-suspend-param = <0x01010001>;
>>
Enric Balletbo i Serra June 25, 2020, 8:40 a.m. UTC | #4
Hi Matthias,

Thank you for your review.

On 22/6/20 12:33, Matthias Brugger wrote:
> 
> 
> On 19/06/2020 12:27, Enric Balletbo i Serra wrote:
>> Also known as the Lenovo IdeaPad Duet Chromebook.
>>
>> There are different krane boards with shared resources, hence a
>> mt8183-kukui-krane.dtsi was created for easily introduce future new
>> boards. The same happens with the baseboard codenamed kukui where
>> different variants, apart from kukui variant can take advantage of the
>> shared resources.
>>
>> Signed-off-by: Ben Ho <Ben.Ho@mediatek.com>
>> [originally created by Ben Ho but adapted and ported to mainline]
>> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
>> ---
>>
>>  arch/arm64/boot/dts/mediatek/Makefile         |   1 +
>>  .../mediatek/mt8183-kukui-krane-sku176.dts    |  18 +
>>  .../boot/dts/mediatek/mt8183-kukui-krane.dtsi | 343 ++++++++
>>  .../arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 788 ++++++++++++++++++
>>  arch/arm64/boot/dts/mediatek/mt8183.dtsi      |   1 +
>>  5 files changed, 1151 insertions(+)
>>  create mode 100644 arch/arm64/boot/dts/mediatek/mt8183-kukui-krane-sku176.dts
>>  create mode 100644 arch/arm64/boot/dts/mediatek/mt8183-kukui-krane.dtsi
>>  create mode 100644 arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
>>
> [...]
>> diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
>> new file mode 100644
>> index 0000000000000..f0a070535b340
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
> [...]
>> +
>> +	max98357a: codec0 {
>> +		compatible = "maxim,max98357a";
>> +		sdmode-gpios = <&pio 175 0>;
>> +	};
>> +
>> +	btsco: codec1 {
> 
> bt_sco_codec:
> is more clear, I think.
> 

Ok. I'll change that in next version.

>> +		compatible = "linux,bt-sco";
>> +	};
>> +
>> +	wifi_pwrseq: wifi-pwrseq {
>> +		compatible = "mmc-pwrseq-simple";
>> +		pinctrl-names = "default";
>> +		pinctrl-0 = <&wifi_pins_pwrseq>;
>> +
>> +		/* Toggle WIFI_ENABLE to reset the chip. */
>> +		reset-gpios = <&pio 119 1>;
>> +	};
>> +
> [...]> diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi
> b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
>> index a1576f1b5a447..689bce13e0165 100644
>> --- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi
>> +++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
>> @@ -719,6 +719,7 @@ u3phy: usb-phy@11f40000 {
>>  			compatible = "mediatek,mt8183-tphy",
>>  				     "mediatek,generic-tphy-v2";
>>  			#address-cells = <1>;
>> +			#phy-cells = <1>;
> 
> Wrong patch?
> 

Oh yes, this should go with the USB one. Thank you to catch this, I'll fix in
next version.

>>  			#size-cells = <1>;
>>  			ranges = <0 0 0x11f40000 0x1000>;
>>  			status = "okay";
>>
> 
> Regards,
> Matthias
>