From aeec7a532aa2ebdd4a271f0abed50aec8ef1eff3 Mon Sep 17 00:00:00 2001 From: Jon Lin Date: Sat, 2 Dec 2023 17:26:25 +0800 Subject: [PATCH 1/2] dt-bindings: spi: Document binding for rockchip SPI Slave Add binding documentation for the spi-rockchip-slave driver. This allows a rockchip SPI to be used to slave interface. Change-Id: I5bafd86a96f605b97c89b90f647a1bcac0e5f8a9 Signed-off-by: Jon Lin --- .../bindings/spi/spi-rockchip-slave.yaml | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 Documentation/devicetree/bindings/spi/spi-rockchip-slave.yaml diff --git a/Documentation/devicetree/bindings/spi/spi-rockchip-slave.yaml b/Documentation/devicetree/bindings/spi/spi-rockchip-slave.yaml new file mode 100644 index 000000000000..c5fc1ab887b7 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/spi-rockchip-slave.yaml @@ -0,0 +1,92 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clauseyy +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/spi-rockchip-slave.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Rockchip SPI Slave Controller + +description: + The Rockchip SPI Slave controller is used to interface with SPI Master Controller. + +allOf: + - $ref: "spi-controller.yaml#" + +maintainers: + - Heiko Stuebner + +# Everything else is described in the common file +properties: + compatible: + oneOf: + - const: rockchip,spi-slave + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + items: + - description: transfer-clock + - description: peripheral clock + + clock-names: + items: + - const: spiclk + - const: apb_pclk + - const: sclk_in + + dmas: + items: + - description: TX DMA Channel + - description: RX DMA Channel + + dma-names: + items: + - const: tx + - const: rx + + rockchip,cs-inactive-disable: + description: Add this property to disable the cs inactive interrupt for spi + slave. + type: boolean + + ready-gpios: + description: GPIO spec for the spi slave ready signal. + maxItems: 1 + + rockchip,autosuspend-delay-ms: + default: 0 + description: Set pm runtime autosuspend value in milliseconds. + + rockchip,sram: + description: Specify sram buffer as SPI Slave DMA buffer. + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + spi0: spi@ff110000 { + compatible = "rockchip,spi-slave"; + reg = <0xff110000 0x1000>; + interrupts = ; + clocks = <&cru CLK_SPI0>, <&cru PCLK_SPI0>, <&cru SCLK_IN_SPI0>; + clock-names = "spiclk", "apb_pclk", "sclk_in"; + dmas = <&pdma1 11>, <&pdma1 12>; + dma-names = "tx", "rx"; + #address-cells = <1>; + #size-cells = <0>; + ready-gpios = <&gpio1 RK_PD3 GPIO_ACTIVE_LOW>; + }; From e58f2f0f0527d29448a856ba35be113158236bdc Mon Sep 17 00:00:00 2001 From: Sandy Huang Date: Fri, 8 Dec 2023 16:35:32 +0800 Subject: [PATCH 2/2] drm/rockchip: vop2: add some debug info for ignored crtc For RK356X/RK3588, the VP plane_mask be 0 will have the following two case: 1. The VP is disabled; 2. For some mistake, the VP is enabled but the plane_mask is 0; This will lead to this crtc register be ignored, So add a few reminders log. Signed-off-by: Sandy Huang Change-Id: Ia49db3051e651095350aeba9c2a27ac7086fe06b --- drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c index ff5c26f7b746..b48153442e25 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c @@ -11300,11 +11300,13 @@ static int vop2_create_crtc(struct vop2 *vop2) possible_crtcs = BIT(registered_num_crtcs); /* - * we assume a vp with a zere plane_mask(set from dts or bootloader) + * we assume a vp with a zero plane_mask(set from dts or bootloader) * as unused. */ - if (!vp->plane_mask && bootloader_initialized) + if (!vp->plane_mask && bootloader_initialized) { + DRM_DEV_INFO(vop2->dev, "VP%d plane_mask is zero, so ignore register crtc\n", vp->id); continue; + } if (vop2_soc_is_rk3566()) soc_id = vp_data->soc_id[1];