Commit 06f054b1 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull devicetree updates from Rob Herring:
 "DT Bindings:

   - Convert samsung,exynos5-dp, atmel,lcdc, aspeed,ast2400-wdt bindings
     to schemas

   - Add bindings for Allwinner H616 NMI controller, Renesas r8a779g0
     irqc, Renesas R-Car V4M TMU and CMT timers, Freescale S32G3
     linflexuart, and Mediatek MT7988 XHCI

   - Add 'reg' constraints on DSI and SPI display panels

   - More dropping of unnecessary quotes in schemas

   - Use full paths rather than relative paths in schema $refs

   - Drop redundant storing of phandle for reserved memory

  DT Core:

   - Use scope based cleanups for kfree() and of_node_put()

   - Track interrupt-map and power-supplies for fw_devlink

   - Add buffer overflow check in of_modalias()

   - Add and use __of_prop_free() helper for freeing struct property"

* tag 'devicetree-for-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (25 commits)
  of: property: Add fw_devlink support for interrupt-map property
  dt-bindings: display: panel: constrain 'reg' in DSI panels
  dt-bindings: display: panel: constrain 'reg' in SPI panels
  dt-bindings: display: samsung,ams495qa01: add missing SPI properties ref
  dt-bindings: Use full path to other schemas
  dt-bindings: PCI: qcom,pcie-sm8350: Drop redundant 'oneOf' sub-schema
  of: module: add buffer overflow check in of_modalias()
  dt-bindings: PCI: microchip: increase number of items in ranges property
  dt-bindings: Drop unnecessary quotes on keys
  dt-bindings: interrupt-controller: mediatek,mt6577-sysirq: Drop unnecessary quotes
  of: property: Use scope based cleanup on port_node
  of: reserved_mem: Remove the use of phandle from the reserved_mem APIs
  of: property: fw_devlink: Add support for "power-supplies" binding
  dt-bindings: watchdog: aspeed,ast2400-wdt: Convert to DT schema
  dt-bindings: irq: sun7i-nmi: Add binding for the H616 NMI controller
  dt-bindings: interrupt-controller: renesas,irqc: Add r8a779g0 support
  dt-bindings: timer: renesas,tmu: Add R-Car V4M support
  dt-bindings: timer: renesas,cmt: Add R-Car V4M support
  of: Use scope based of_node_put() cleanups
  of: Use scope based kfree() cleanups
  ...
parents 7ee332c9 d976c6f4
Loading
Loading
Loading
Loading
+103 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/atmel,lcdc-display.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Microchip's LCDC Display

maintainers:
  - Nicolas Ferre <nicolas.ferre@microchip.com>
  - Dharma Balasubiramani <dharma.b@microchip.com>

description:
  The LCD Controller (LCDC) consists of logic for transferring LCD image data
  from an external display buffer to a TFT LCD panel. The LCDC has one display
  input buffer per layer that fetches pixels through the single bus host
  interface and a look-up table to allow palletized display configurations. The
  LCDC is programmable on a per layer basis, and supports different LCD
  resolutions, window sizes, image formats and pixel depths.

# We need a select here since this schema is applicable only for nodes with the
# following properties

select:
  anyOf:
    - required: [ 'atmel,dmacon' ]
    - required: [ 'atmel,lcdcon2' ]
    - required: [ 'atmel,guard-time' ]

properties:
  atmel,dmacon:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: dma controller configuration

  atmel,lcdcon2:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: lcd controller configuration

  atmel,guard-time:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: lcd guard time (Delay in frame periods)
    maximum: 127

  bits-per-pixel:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: lcd panel bit-depth.
    enum: [1, 2, 4, 8, 16, 24, 32]

  atmel,lcdcon-backlight:
    $ref: /schemas/types.yaml#/definitions/flag
    description: enable backlight

  atmel,lcdcon-backlight-inverted:
    $ref: /schemas/types.yaml#/definitions/flag
    description: invert backlight PWM polarity

  atmel,lcd-wiring-mode:
    $ref: /schemas/types.yaml#/definitions/string
    description: lcd wiring mode "RGB" or "BRG"
    enum:
      - RGB
      - BRG

  atmel,power-control-gpio:
    description: gpio to power on or off the LCD (as many as needed)
    maxItems: 1

  display-timings:
    $ref: panel/display-timings.yaml#

required:
  - atmel,dmacon
  - atmel,lcdcon2
  - atmel,guard-time
  - bits-per-pixel

additionalProperties: false

examples:
  - |
    display: panel {
      bits-per-pixel = <32>;
      atmel,lcdcon-backlight;
      atmel,dmacon = <0x1>;
      atmel,lcdcon2 = <0x80008002>;
      atmel,guard-time = <9>;
      atmel,lcd-wiring-mode = "RGB";

      display-timings {
        native-mode = <&timing0>;
        timing0: timing0 {
          clock-frequency = <9000000>;
          hactive = <480>;
          vactive = <272>;
          hback-porch = <1>;
          hfront-porch = <1>;
          vback-porch = <40>;
          vfront-porch = <1>;
          hsync-len = <45>;
          vsync-len = <1>;
        };
      };
    };
+0 −87
Original line number Diff line number Diff line
Atmel LCDC Framebuffer
-----------------------------------------------------

Required properties:
- compatible :
	"atmel,at91sam9261-lcdc" , 
	"atmel,at91sam9263-lcdc" ,
	"atmel,at91sam9g10-lcdc" ,
	"atmel,at91sam9g45-lcdc" ,
	"atmel,at91sam9g45es-lcdc" ,
	"atmel,at91sam9rl-lcdc" ,
- reg : Should contain 1 register ranges(address and length).
	Can contain an additional register range(address and length)
	for fixed framebuffer memory. Useful for dedicated memories.
- interrupts : framebuffer controller interrupt
- display: a phandle pointing to the display node

Required nodes:
- display: a display node is required to initialize the lcd panel
	This should be in the board dts.
- default-mode: a videomode within the display with timing parameters
	as specified below.

Optional properties:
- lcd-supply: Regulator for LCD supply voltage.

Example:

	fb0: fb@00500000 {
		compatible = "atmel,at91sam9g45-lcdc";
		reg = <0x00500000 0x1000>;
		interrupts = <23 3 0>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_fb>;
		display = <&display0>;
		#address-cells = <1>;
		#size-cells = <1>;

	};

Example for fixed framebuffer memory:

	fb0: fb@00500000 {
		compatible = "atmel,at91sam9263-lcdc";
		reg = <0x00700000 0x1000 0x70000000 0x200000>;
		[...]
	};

Atmel LCDC Display
-----------------------------------------------------
Required properties (as per of_videomode_helper):

 - atmel,dmacon: dma controller configuration
 - atmel,lcdcon2: lcd controller configuration
 - atmel,guard-time: lcd guard time (Delay in frame periods)
 - bits-per-pixel: lcd panel bit-depth.

Optional properties (as per of_videomode_helper):
 - atmel,lcdcon-backlight: enable backlight
 - atmel,lcdcon-backlight-inverted: invert backlight PWM polarity
 - atmel,lcd-wiring-mode: lcd wiring mode "RGB" or "BRG"
 - atmel,power-control-gpio: gpio to power on or off the LCD (as many as needed)

Example:
	display0: display {
		bits-per-pixel = <32>;
		atmel,lcdcon-backlight;
		atmel,dmacon = <0x1>;
		atmel,lcdcon2 = <0x80008002>;
		atmel,guard-time = <9>;
		atmel,lcd-wiring-mode = <1>;

		display-timings {
			native-mode = <&timing0>;
			timing0: timing0 {
				clock-frequency = <9000000>;
				hactive = <480>;
				vactive = <272>;
				hback-porch = <1>;
				hfront-porch = <1>;
				vback-porch = <40>;
				vfront-porch = <1>;
				hsync-len = <45>;
				vsync-len = <1>;
			};
		};
	};
+70 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/atmel,lcdc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Microchip's LCDC Framebuffer

maintainers:
  - Nicolas Ferre <nicolas.ferre@microchip.com>
  - Dharma Balasubiramani <dharma.b@microchip.com>

description:
  The LCDC works with a framebuffer, which is a section of memory that contains
  a complete frame of data representing pixel values for the display. The LCDC
  reads the pixel data from the framebuffer and sends it to the LCD panel to
  render the image.

properties:
  compatible:
    enum:
      - atmel,at91sam9261-lcdc
      - atmel,at91sam9263-lcdc
      - atmel,at91sam9g10-lcdc
      - atmel,at91sam9g45-lcdc
      - atmel,at91sam9g45es-lcdc
      - atmel,at91sam9rl-lcdc

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    maxItems: 2

  clock-names:
    items:
      - const: hclk
      - const: lcdc_clk

  display:
    $ref: /schemas/types.yaml#/definitions/phandle
    description: A phandle pointing to the display node.

required:
  - compatible
  - reg
  - interrupts
  - clocks
  - clock-names
  - display

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/at91.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    fb@500000 {
      compatible = "atmel,at91sam9g45-lcdc";
      reg = <0x00500000 0x1000>;
      interrupts = <23 IRQ_TYPE_LEVEL_HIGH 0>;
      pinctrl-names = "default";
      pinctrl-0 = <&pinctrl_fb>;
      clocks = <&pmc PMC_TYPE_PERIPHERAL 23>, <&pmc PMC_TYPE_PERIPHERAL 23>;
      clock-names = "hclk", "lcdc_clk";
      display = <&display>;
    };
+0 −112
Original line number Diff line number Diff line
The Exynos display port interface should be configured based on
the type of panel connected to it.

We use two nodes:
	-dp-controller node
	-dptx-phy node(defined inside dp-controller node)

For the DP-PHY initialization, we use the dptx-phy node.
Required properties for dptx-phy: deprecated, use phys and phy-names
	-reg: deprecated
		Base address of DP PHY register.
	-samsung,enable-mask: deprecated
		The bit-mask used to enable/disable DP PHY.

For the Panel initialization, we read data from dp-controller node.
Required properties for dp-controller:
	-compatible:
		should be "samsung,exynos5-dp".
	-reg:
		physical base address of the controller and length
		of memory mapped region.
	-interrupts:
		interrupt combiner values.
	-clocks:
		from common clock binding: handle to dp clock.
	-clock-names:
		from common clock binding: Shall be "dp".
	-phys:
		from general PHY binding: the phandle for the PHY device.
	-phy-names:
		from general PHY binding: Should be "dp".

Optional properties for dp-controller:
	-interlaced:
		interlace scan mode.
			Progressive if defined, Interlaced if not defined
	-vsync-active-high:
		VSYNC polarity configuration.
			High if defined, Low if not defined
	-hsync-active-high:
		HSYNC polarity configuration.
			High if defined, Low if not defined
	-samsung,hpd-gpio:
		Hotplug detect GPIO.
			Indicates which GPIO should be used for hotplug
			detection
	-video interfaces: Device node can contain video interface port
			nodes according to [1].
	- display-timings: timings for the connected panel as described by
		Documentation/devicetree/bindings/display/panel/display-timing.txt

For the below properties, please refer to Analogix DP binding document:
 * Documentation/devicetree/bindings/display/bridge/analogix,dp.yaml
	-phys (required)
	-phy-names (required)
	-hpd-gpios (optional)
	 force-hpd (optional)

Deprecated properties for DisplayPort:
-interlaced:            deprecated prop that can parsed from drm_display_mode.
-vsync-active-high:     deprecated prop that can parsed from drm_display_mode.
-hsync-active-high:     deprecated prop that can parsed from drm_display_mode.
-samsung,ycbcr-coeff:   deprecated prop that can parsed from drm_display_mode.
-samsung,dynamic-range: deprecated prop that can parsed from drm_display_mode.
-samsung,color-space:   deprecated prop that can parsed from drm_display_info.
-samsung,color-depth:   deprecated prop that can parsed from drm_display_info.
-samsung,link-rate:     deprecated prop that can reading from monitor by dpcd method.
-samsung,lane-count:    deprecated prop that can reading from monitor by dpcd method.
-samsung,hpd-gpio:      deprecated name for hpd-gpios.

-------------------------------------------------------------------------------

Example:

SOC specific portion:
	dp-controller {
		compatible = "samsung,exynos5-dp";
		reg = <0x145b0000 0x10000>;
		interrupts = <10 3>;
		interrupt-parent = <&combiner>;
		clocks = <&clock 342>;
		clock-names = "dp";

		phys = <&dp_phy>;
		phy-names = "dp";
	};

Board Specific portion:
	dp-controller {
		display-timings {
			native-mode = <&lcd_timing>;
			lcd_timing: 1366x768 {
				clock-frequency = <70589280>;
				hactive = <1366>;
				vactive = <768>;
				hfront-porch = <40>;
				hback-porch = <40>;
				hsync-len = <32>;
				vback-porch = <10>;
				vfront-porch = <12>;
				vsync-len = <6>;
			};
		};

		ports {
			port@0 {
				dp_out: endpoint {
					remote-endpoint = <&bridge_in>;
				};
			};
		};
	};
+3 −1
Original line number Diff line number Diff line
@@ -17,10 +17,12 @@ properties:
  compatible:
    const: abt,y030xx067a

  reg:
    maxItems: 1

  backlight: true
  port: true
  power-supply: true
  reg: true
  reset-gpios: true

required:
Loading