diff --git a/Documentation/devicetree/bindings/display/apple,t8011-h9g-display.yaml b/Documentation/devicetree/bindings/display/apple,t8011-h9g-display.yaml index feee15f18d72c9..ca22d9e971b506 100644 --- a/Documentation/devicetree/bindings/display/apple,t8011-h9g-display.yaml +++ b/Documentation/devicetree/bindings/display/apple,t8011-h9g-display.yaml @@ -21,8 +21,46 @@ properties: reg: maxItems: 1 + panel-timing: + $ref: /schemas/display/panel/panel-timing.yaml# + description: | + Native progressive active-scanout timing of the attached internal + panel (two active subframes, i.e. the 120 Hz base scanout). The active + resolution is matched against simple-framebuffer and half the total + vertical line count (lines per subframe) is verified against the + running H9G boot scanout; pixel clock, total horizontal pixels and + subframe line count are used to derive the alternate H9G cadence + modes. Where individual porch and sync pulse splits have not yet been + measured from hardware, total blanking may be carried in the front + porch with zero sync length and back porch (not literal zero-width + hardware pulses). + required: - compatible - reg additionalProperties: false + +examples: + - | + soc { + #address-cells = <2>; + #size-cells = <2>; + + display-controller@206000000 { + compatible = "apple,t8011-h9g-display"; + reg = <0x2 0x06000000 0x0 0xe0000>; + + panel-timing { + clock-frequency = <517107000>; + hactive = <1668>; + vactive = <2224>; + hfront-porch = <62>; + hback-porch = <18>; + hsync-len = <8>; + vfront-porch = <230>; + vback-porch = <0>; + vsync-len = <0>; + }; + }; + }; diff --git a/arch/arm64/boot/dts/apple/t8011-j120.dts b/arch/arm64/boot/dts/apple/t8011-j120.dts index 9a7da541738e1d..a82077de161981 100644 --- a/arch/arm64/boot/dts/apple/t8011-j120.dts +++ b/arch/arm64/boot/dts/apple/t8011-j120.dts @@ -19,6 +19,25 @@ compatible = "apple,j120-bcm4355c0-bt", "brcm,bcm4355c0-bt"; }; +&h9g_display { + panel-timing { + /* + * 12.9-inch iPad Pro 2 native 120 Hz active scanout (two + * 1497-line subframes). Only total blanking (htotal 2088, + * vtotal 2994) is known, carried in the front porches. + */ + clock-frequency = <750001000>; + hactive = <2048>; + vactive = <2732>; + hfront-porch = <40>; + hback-porch = <0>; + hsync-len = <0>; + vfront-porch = <262>; + vback-porch = <0>; + vsync-len = <0>; + }; +}; + &headphones { simple-audio-card,name = "J120 Headphones"; }; diff --git a/arch/arm64/boot/dts/apple/t8011-j121.dts b/arch/arm64/boot/dts/apple/t8011-j121.dts index 242dc7a1459267..d2f1c50d5ed472 100644 --- a/arch/arm64/boot/dts/apple/t8011-j121.dts +++ b/arch/arm64/boot/dts/apple/t8011-j121.dts @@ -19,6 +19,25 @@ compatible = "apple,j121-bcm4355c0-bt", "brcm,bcm4355c0-bt"; }; +&h9g_display { + panel-timing { + /* + * 12.9-inch iPad Pro 2 native 120 Hz active scanout (two + * 1497-line subframes). Only total blanking (htotal 2088, + * vtotal 2994) is known, carried in the front porches. + */ + clock-frequency = <750001000>; + hactive = <2048>; + vactive = <2732>; + hfront-porch = <40>; + hback-porch = <0>; + hsync-len = <0>; + vfront-porch = <262>; + vback-porch = <0>; + vsync-len = <0>; + }; +}; + &headphones { simple-audio-card,name = "J121 Headphones"; }; diff --git a/arch/arm64/boot/dts/apple/t8011-j207.dts b/arch/arm64/boot/dts/apple/t8011-j207.dts index fae86820e3ff05..d12e20b66bab36 100644 --- a/arch/arm64/boot/dts/apple/t8011-j207.dts +++ b/arch/arm64/boot/dts/apple/t8011-j207.dts @@ -19,6 +19,24 @@ compatible = "apple,j207-bcm4355c0-bt", "brcm,bcm4355c0-bt"; }; +&h9g_display { + panel-timing { + /* + * 10.5-inch iPad Pro 2 native 120 Hz active scanout (two + * 1227-line subframes, htotal 1756, vtotal 2454). + */ + clock-frequency = <517107000>; + hactive = <1668>; + vactive = <2224>; + hfront-porch = <62>; + hback-porch = <18>; + hsync-len = <8>; + vfront-porch = <230>; + vback-porch = <0>; + vsync-len = <0>; + }; +}; + &headphones { simple-audio-card,name = "J207 Headphones"; }; diff --git a/arch/arm64/boot/dts/apple/t8011-j208.dts b/arch/arm64/boot/dts/apple/t8011-j208.dts index 041b107c60f39d..ae0b0c5e15c8a6 100644 --- a/arch/arm64/boot/dts/apple/t8011-j208.dts +++ b/arch/arm64/boot/dts/apple/t8011-j208.dts @@ -19,6 +19,24 @@ compatible = "apple,j208-bcm4355c0-bt", "brcm,bcm4355c0-bt"; }; +&h9g_display { + panel-timing { + /* + * 10.5-inch iPad Pro 2 native 120 Hz active scanout (two + * 1227-line subframes, htotal 1756, vtotal 2454). + */ + clock-frequency = <517107000>; + hactive = <1668>; + vactive = <2224>; + hfront-porch = <62>; + hback-porch = <18>; + hsync-len = <8>; + vfront-porch = <230>; + vback-porch = <0>; + vsync-len = <0>; + }; +}; + &headphones { simple-audio-card,name = "J208 Headphones"; }; diff --git a/drivers/gpu/drm/sysfb/Kconfig b/drivers/gpu/drm/sysfb/Kconfig index f7e48178885ee8..d9266e1b874b4e 100644 --- a/drivers/gpu/drm/sysfb/Kconfig +++ b/drivers/gpu/drm/sysfb/Kconfig @@ -62,6 +62,7 @@ config DRM_SIMPLEDRM select DRM_GEM_SHMEM_HELPER select DRM_KMS_HELPER select DRM_SYSFB_HELPER + select VIDEOMODE_HELPERS if OF help DRM driver for simple platform-provided framebuffers. diff --git a/drivers/gpu/drm/sysfb/simpledrm.c b/drivers/gpu/drm/sysfb/simpledrm.c index b34230a7cbe4d6..2326e27014652b 100644 --- a/drivers/gpu/drm/sysfb/simpledrm.c +++ b/drivers/gpu/drm/sysfb/simpledrm.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -14,6 +15,9 @@ #include #include +#include