Document the Rockchip RK628 (RK628D and RK628F) multi-interface video bridge and scaler IC, including power supplies, optional 24 MHz reference clock, interrupt and reset lines, and OF graph ports for all hardware video interfaces: - port@0: HDMI 1.4/2.0 input (HDMIRX; requires HDMI TMDS framing, raw DVI is not supported) - port@1: Combo TX PHY Channel A output (LVDS ChA, MIPI DSI0, MIPI CSI-2 TX, or GVI) - port@2: Combo TX PHY Channel B output (LVDS ChB or MIPI DSI1) - port@3: HDMI 1.4/2.0 output (HDMITX) - port@4: Parallel 24-bit RGB / YUV / BT.1120 input or output
Signed-off-by: Gianfranco Mariotti <[email protected]> --- .../display/bridge/rockchip,rk628.yaml | 253 ++++++++++++++++++ MAINTAINERS | 8 + 2 files changed, 261 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/rockchip,rk628.yaml diff --git a/Documentation/devicetree/bindings/display/bridge/rockchip,rk628.yaml b/Documentation/devicetree/bindings/display/bridge/rockchip,rk628.yaml new file mode 100644 index 0000000000000..5186a20da7124 --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/rockchip,rk628.yaml @@ -0,0 +1,253 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/rockchip,rk628.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Rockchip RK628 Video Interface Bridge + +maintainers: + - Gianfranco Mariotti <[email protected]> + +description: | + The Rockchip RK628 (RK628D and RK628F) is a multi-interface video bridge and + scaler IC controlled over I2C. It integrates an internal clock and reset unit + (CRU), a line-buffered post-processor (scaler, timing generator, and color + space converter), two video input paths, and multiple video output + interfaces: + - HDMI 1.4/2.0 receiver (input) + - Parallel 24-bit RGB / YUV / BT.1120 interface (input or output) + - Combo TX PHY Channel A (LVDS Channel A, MIPI DSI0, MIPI CSI-2 TX, or GVI) + - Combo TX PHY Channel B (LVDS Channel B or MIPI DSI1) + - HDMI 1.4/2.0 transmitter (output) + +properties: + compatible: + enum: + - rockchip,rk628d + - rockchip,rk628f + + reg: + enum: [0x50, 0x51] + + clocks: + maxItems: 1 + description: + Optional 24 MHz reference clock if driven by an external oscillator + instead of a crystal across OSC_IN/OSC_OUT. + + interrupts: + maxItems: 1 + + reset-gpios: + maxItems: 1 + description: Active-low GPIO connected to the RESETN pin. + + vdd-supply: + description: + Regulator for 1.1V digital core and analog PHY power (DVDD, AVDD_1V1). + + vccio-supply: + description: + Regulator for 3.3V I/O and analog PHY power (VDDIO1, AVDD_3V3). + + vddio2-supply: + description: + Optional 1.8V or 3.3V I/O supply for the parallel RGB/BT.1120 interface + bank (VDDIO2). + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + properties: + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: + HDMI 1.4/2.0 input port (HDMIRX). Requires HDMI TMDS framing with + preambles and guard bands; raw DVI streams are not supported. + + port@1: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: + Combo TX PHY Channel A output port (TX0..TX4), configurable as + single-link LVDS, dual-link LVDS Channel A, MIPI DSI0, MIPI CSI-2 TX, + or GVI. + + properties: + endpoint: + $ref: /schemas/media/video-interfaces.yaml# + unevaluatedProperties: false + + properties: + data-lanes: + minItems: 1 + maxItems: 8 + uniqueItems: true + items: + minimum: 1 + maximum: 8 + description: + Active serial data lanes when operating in MIPI DSI (1..4), + MIPI CSI-2 TX (1..4), or GVI (1..8) mode. + + port@2: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: + Combo TX PHY Channel B output port (TX5..TX9), configurable as + dual-link LVDS Channel B or MIPI DSI1. + + properties: + endpoint: + $ref: /schemas/media/video-interfaces.yaml# + unevaluatedProperties: false + + properties: + data-lanes: + minItems: 1 + maxItems: 4 + uniqueItems: true + items: + minimum: 1 + maximum: 4 + description: + Active serial data lanes when operating in MIPI DSI1 mode. + + port@3: + $ref: /schemas/graph.yaml#/properties/port + description: HDMI 1.4/2.0 output port (HDMITX). + + port@4: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: + Parallel 24-bit RGB / YUV / BT.1120 input or output port + (VOP_D[23:0]). + + properties: + endpoint: + $ref: /schemas/media/video-interfaces.yaml# + unevaluatedProperties: false + + properties: + bus-width: + enum: [16, 18, 24] + + pclk-sample: true + + dependencies: + port@2: [port@1] + + anyOf: + - required: + - port@0 + anyOf: + - required: [port@1] + - required: [port@3] + - required: [port@4] + - required: + - port@4 + anyOf: + - required: [port@1] + - required: [port@3] + +required: + - compatible + - reg + - vdd-supply + - vccio-supply + - ports + +additionalProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + + /* HDMI input to dual-link LVDS output */ + i2c { + #address-cells = <1>; + #size-cells = <0>; + + bridge@51 { + compatible = "rockchip,rk628d"; + reg = <0x51>; + reset-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>; + vdd-supply = <®_1v1>; + vccio-supply = <®_3v3>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + rk628_in_hdmi: endpoint { + remote-endpoint = <&hdmi_out>; + }; + }; + + port@1 { + reg = <1>; + + rk628_out_lvds0: endpoint { + remote-endpoint = <&panel_in_lvds_odd>; + }; + }; + + port@2 { + reg = <2>; + + rk628_out_lvds1: endpoint { + remote-endpoint = <&panel_in_lvds_even>; + }; + }; + }; + }; + }; + + - | + #include <dt-bindings/gpio/gpio.h> + #include <dt-bindings/interrupt-controller/irq.h> + + /* Parallel RGB input to HDMI output */ + i2c { + #address-cells = <1>; + #size-cells = <0>; + + bridge@50 { + compatible = "rockchip,rk628f"; + reg = <0x50>; + interrupt-parent = <&gpio3>; + interrupts = <20 IRQ_TYPE_LEVEL_HIGH>; + reset-gpios = <&gpio1 2 GPIO_ACTIVE_LOW>; + vdd-supply = <®_1v1>; + vccio-supply = <®_3v3>; + vddio2-supply = <®_1v8>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@3 { + reg = <3>; + + rk628_out_hdmi: endpoint { + remote-endpoint = <&hdmi_connector_in>; + }; + }; + + port@4 { + reg = <4>; + + rk628_in_rgb: endpoint { + remote-endpoint = <&dpi_out>; + bus-width = <24>; + }; + }; + }; + }; + }; +... diff --git a/MAINTAINERS b/MAINTAINERS index c00d3612c9acf..0e0caed96838e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -24599,6 +24599,14 @@ S: Maintained F: Documentation/devicetree/bindings/media/rockchip-rga.yaml F: drivers/media/platform/rockchip/rga/ +ROCKCHIP RK628 VIDEO INTERFACE BRIDGE +M: Gianfranco Mariotti <[email protected]> +L: [email protected] +L: [email protected] +S: Maintained +T: git https://gitlab.freedesktop.org/drm/misc/kernel.git +F: Documentation/devicetree/bindings/display/bridge/rockchip,rk628.yaml + ROCKCHIP RKVDEC VIDEO DECODER DRIVER M: Detlev Casanova <[email protected]> M: Ezequiel Garcia <[email protected]> -- 2.25.1
