2021-01-06 08:48:25

by Hsin-Yi Wang

[permalink] [raw]
Subject: [PATCH 1/2] arm64: dts: mt8183: config dsi node

Config dsi node for mt8183 kukui. Set panel and ports.

Signed-off-by: Hsin-Yi Wang <[email protected]>
---
.../arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 38 +++++++++++++++++++
1 file changed, 38 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
index bf2ad1294dd30..4cfb3560e5d11 100644
--- a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
@@ -249,6 +249,36 @@ &cpu7 {
proc-supply = <&mt6358_vproc11_reg>;
};

+&dsi0 {
+ status = "okay";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ panel: panel@0 {
+ compatible = "boe,tv101wum-nl6";
+ reg = <0>;
+ enable-gpios = <&pio 45 0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&panel_pins_default>;
+ avdd-supply = <&ppvarn_lcd>;
+ avee-supply = <&ppvarp_lcd>;
+ pp1800-supply = <&pp1800_lcd>;
+ status = "okay";
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&dsi_out>;
+ };
+ };
+ };
+
+ ports {
+ port {
+ dsi_out: endpoint {
+ remote-endpoint = <&panel_in>;
+ };
+ };
+ };
+};
+
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins>;
@@ -547,6 +577,14 @@ pins_clk {
};
};

+ panel_pins_default: panel_pins_default {
+ panel_reset {
+ pinmux = <PINMUX_GPIO45__FUNC_GPIO45>;
+ output-low;
+ bias-pull-up;
+ };
+ };
+
pwm0_pin_default: pwm0_pin_default {
pins1 {
pinmux = <PINMUX_GPIO176__FUNC_GPIO176>;
--
2.29.2.729.g45daf8777d-goog


2021-01-06 08:50:33

by Hsin-Yi Wang

[permalink] [raw]
Subject: [PATCH 2/2] arm64: dts: mt8183: Add krane-sku0 board.

Similar to krane-sku176 but using a different panel source.

Signed-off-by: Hsin-Yi Wang <[email protected]>
---
.../devicetree/bindings/arm/mediatek.yaml | 1 +
arch/arm64/boot/dts/mediatek/Makefile | 1 +
.../dts/mediatek/mt8183-kukui-krane-sku0.dts | 30 +++++++++++++++++++
3 files changed, 32 insertions(+)
create mode 100644 arch/arm64/boot/dts/mediatek/mt8183-kukui-krane-sku0.dts

diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Documentation/devicetree/bindings/arm/mediatek.yaml
index 53f0d4e3ea982..3276f7a2ce672 100644
--- a/Documentation/devicetree/bindings/arm/mediatek.yaml
+++ b/Documentation/devicetree/bindings/arm/mediatek.yaml
@@ -120,6 +120,7 @@ properties:
- const: mediatek,mt8183
- description: Google Krane (Lenovo IdeaPad Duet, 10e,...)
items:
+ - const: google,krane-sku0
- const: google,krane-sku176
- const: google,krane
- const: mediatek,mt8183
diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
index 18f7b46c4095b..deba27ab76574 100644
--- a/arch/arm64/boot/dts/mediatek/Makefile
+++ b/arch/arm64/boot/dts/mediatek/Makefile
@@ -13,6 +13,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8173-elm-hana.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8173-elm-hana-rev7.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8173-evb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-evb.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku0.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku176.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-evb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8516-pumpkin.dtb
diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui-krane-sku0.dts b/arch/arm64/boot/dts/mediatek/mt8183-kukui-krane-sku0.dts
new file mode 100644
index 0000000000000..4497291889506
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt8183-kukui-krane-sku0.dts
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2019 Google LLC
+ *
+ * Device-tree for Krane sku0.
+ *
+ * SKU is a 8-bit value (0x00 == 0):
+ * - Bits 7..4: Panel ID: 0x0 (AUO)
+ * - Bits 3..0: SKU ID: 0x0 (default)
+ */
+
+/dts-v1/;
+#include "mt8183-kukui-krane.dtsi"
+
+/ {
+ model = "MediaTek krane sku0 board";
+ compatible = "google,krane-sku0", "google,krane", "mediatek,mt8183";
+};
+
+&panel {
+ status = "okay";
+ compatible = "auo,kd101n80-45na";
+ reg = <0>;
+ enable-gpios = <&pio 45 0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&panel_pins_default>;
+ avdd-supply = <&ppvarn_lcd>;
+ avee-supply = <&ppvarp_lcd>;
+ pp1800-supply = <&pp1800_lcd>;
+};
--
2.29.2.729.g45daf8777d-goog

2021-01-06 10:50:25

by Nicolas Boichat

[permalink] [raw]
Subject: Re: [PATCH 1/2] arm64: dts: mt8183: config dsi node

On Wed, Jan 6, 2021 at 4:46 PM Hsin-Yi Wang <[email protected]> wrote:
>
> Config dsi node for mt8183 kukui. Set panel and ports.
>
> Signed-off-by: Hsin-Yi Wang <[email protected]>
> ---
> .../arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 38 +++++++++++++++++++
> 1 file changed, 38 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
> index bf2ad1294dd30..4cfb3560e5d11 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
> @@ -249,6 +249,36 @@ &cpu7 {
> proc-supply = <&mt6358_vproc11_reg>;
> };
>
> +&dsi0 {
> + status = "okay";
> + #address-cells = <1>;
> + #size-cells = <0>;
> + panel: panel@0 {
> + compatible = "boe,tv101wum-nl6";

We're going to have many panels in the kukui family, so I think I'd
prefer it if you moved the compatible string to krane-sku0 dts: it
makes it easier to figure out what's different with sku0.

Then maybe leave all the other properties in this file, as it seems
like all MIPI panels use the exact same pin/supplies?

(And add a comment here saying that the compatible needs to be set in
board dts?)

> + reg = <0>;
> + enable-gpios = <&pio 45 0>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&panel_pins_default>;
> + avdd-supply = <&ppvarn_lcd>;
> + avee-supply = <&ppvarp_lcd>;
> + pp1800-supply = <&pp1800_lcd>;
> + status = "okay";
> + port {
> + panel_in: endpoint {
> + remote-endpoint = <&dsi_out>;
> + };
> + };
> + };
> +
> + ports {
> + port {
> + dsi_out: endpoint {
> + remote-endpoint = <&panel_in>;
> + };
> + };
> + };
> +};
> +
> &i2c0 {
> pinctrl-names = "default";
> pinctrl-0 = <&i2c0_pins>;
> @@ -547,6 +577,14 @@ pins_clk {
> };
> };
>
> + panel_pins_default: panel_pins_default {
> + panel_reset {
> + pinmux = <PINMUX_GPIO45__FUNC_GPIO45>;
> + output-low;
> + bias-pull-up;
> + };
> + };
> +
> pwm0_pin_default: pwm0_pin_default {
> pins1 {
> pinmux = <PINMUX_GPIO176__FUNC_GPIO176>;
> --
> 2.29.2.729.g45daf8777d-goog
>

2021-01-06 10:51:15

by Nicolas Boichat

[permalink] [raw]
Subject: Re: [PATCH 1/2] arm64: dts: mt8183: config dsi node

On Wed, Jan 6, 2021 at 6:47 PM Nicolas Boichat <[email protected]> wrote:
>
> On Wed, Jan 6, 2021 at 4:46 PM Hsin-Yi Wang <[email protected]> wrote:
> >
> > Config dsi node for mt8183 kukui. Set panel and ports.
> >
> > Signed-off-by: Hsin-Yi Wang <[email protected]>
> > ---
> > .../arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 38 +++++++++++++++++++
> > 1 file changed, 38 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
> > index bf2ad1294dd30..4cfb3560e5d11 100644
> > --- a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
> > +++ b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
> > @@ -249,6 +249,36 @@ &cpu7 {
> > proc-supply = <&mt6358_vproc11_reg>;
> > };
> >
> > +&dsi0 {
> > + status = "okay";
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > + panel: panel@0 {
> > + compatible = "boe,tv101wum-nl6";
>
> We're going to have many panels in the kukui family, so I think I'd
> prefer it if you moved the compatible string to krane-sku0 dts: it
> makes it easier to figure out what's different with sku0.

I meant sku176 (since you are adding sku0 with a different panel
compatible later).

>
> Then maybe leave all the other properties in this file, as it seems
> like all MIPI panels use the exact same pin/supplies?
>
> (And add a comment here saying that the compatible needs to be set in
> board dts?)
>
> > + reg = <0>;
> > + enable-gpios = <&pio 45 0>;
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&panel_pins_default>;
> > + avdd-supply = <&ppvarn_lcd>;
> > + avee-supply = <&ppvarp_lcd>;
> > + pp1800-supply = <&pp1800_lcd>;
> > + status = "okay";
> > + port {
> > + panel_in: endpoint {
> > + remote-endpoint = <&dsi_out>;
> > + };
> > + };
> > + };
> > +
> > + ports {
> > + port {
> > + dsi_out: endpoint {
> > + remote-endpoint = <&panel_in>;
> > + };
> > + };
> > + };
> > +};
> > +
> > &i2c0 {
> > pinctrl-names = "default";
> > pinctrl-0 = <&i2c0_pins>;
> > @@ -547,6 +577,14 @@ pins_clk {
> > };
> > };
> >
> > + panel_pins_default: panel_pins_default {
> > + panel_reset {
> > + pinmux = <PINMUX_GPIO45__FUNC_GPIO45>;
> > + output-low;
> > + bias-pull-up;
> > + };
> > + };
> > +
> > pwm0_pin_default: pwm0_pin_default {
> > pins1 {
> > pinmux = <PINMUX_GPIO176__FUNC_GPIO176>;
> > --
> > 2.29.2.729.g45daf8777d-goog
> >