drivers: video: csi: Drop source device phandle reference
The peer remote device "source_dev" can be retrieved from the remote-endpoint-label. Direct reference via phandle is not needed. Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
This commit is contained in:
parent
1dd96ba9f9
commit
59e253ed4a
7 changed files with 24 additions and 28 deletions
|
@ -192,7 +192,6 @@
|
||||||
|
|
||||||
&csi {
|
&csi {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
source = <&ov7725>;
|
|
||||||
pinctrl-0 = <&pinmux_csi>;
|
pinctrl-0 = <&pinmux_csi>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2024 NXP
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
&dvp_fpc24_interface {
|
|
||||||
source = <&mt9m114>;
|
|
||||||
};
|
|
|
@ -1,9 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2024 NXP
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
&dvp_fpc24_interface {
|
|
||||||
source = <&mt9m114>;
|
|
||||||
};
|
|
|
@ -17,6 +17,16 @@
|
||||||
#include <fsl_cache.h>
|
#include <fsl_cache.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_VIDEO_MCUX_MIPI_CSI2RX)
|
||||||
|
#define DEVICE_DT_INST_GET_SOURCE_DEV(n) \
|
||||||
|
DEVICE_DT_GET(DT_PARENT(DT_GPARENT(DT_NODELABEL(DT_STRING_TOKEN( \
|
||||||
|
DT_CHILD(DT_INST_CHILD(n, port), endpoint), remote_endpoint_label)))))
|
||||||
|
#else
|
||||||
|
#define DEVICE_DT_INST_GET_SOURCE_DEV(n) \
|
||||||
|
DEVICE_DT_GET(DT_GPARENT(DT_NODELABEL(DT_STRING_TOKEN( \
|
||||||
|
DT_CHILD(DT_INST_CHILD(n, port), endpoint), remote_endpoint_label))))
|
||||||
|
#endif
|
||||||
|
|
||||||
struct video_mcux_csi_config {
|
struct video_mcux_csi_config {
|
||||||
CSI_Type *base;
|
CSI_Type *base;
|
||||||
const struct device *source_dev;
|
const struct device *source_dev;
|
||||||
|
@ -491,7 +501,7 @@ PINCTRL_DT_INST_DEFINE(0);
|
||||||
|
|
||||||
static const struct video_mcux_csi_config video_mcux_csi_config_0 = {
|
static const struct video_mcux_csi_config video_mcux_csi_config_0 = {
|
||||||
.base = (CSI_Type *)DT_INST_REG_ADDR(0),
|
.base = (CSI_Type *)DT_INST_REG_ADDR(0),
|
||||||
.source_dev = DEVICE_DT_GET(DT_INST_PHANDLE(0, source)),
|
.source_dev = DEVICE_DT_INST_GET_SOURCE_DEV(0),
|
||||||
.pincfg = PINCTRL_DT_INST_DEV_CONFIG_GET(0),
|
.pincfg = PINCTRL_DT_INST_DEV_CONFIG_GET(0),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -888,7 +888,6 @@
|
||||||
reg = <0x40800000 0x4000>;
|
reg = <0x40800000 0x4000>;
|
||||||
interrupts = <56 1>;
|
interrupts = <56 1>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
source = <&mipi_csi2rx>;
|
|
||||||
|
|
||||||
port {
|
port {
|
||||||
csi_ep_in: endpoint {
|
csi_ep_in: endpoint {
|
||||||
|
|
|
@ -14,12 +14,6 @@ properties:
|
||||||
interrupts:
|
interrupts:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
source:
|
|
||||||
required: true
|
|
||||||
type: phandle
|
|
||||||
description: the connected source device,
|
|
||||||
e.g., a mipi csi or a camera sensor
|
|
||||||
|
|
||||||
child-binding:
|
child-binding:
|
||||||
child-binding:
|
child-binding:
|
||||||
include: video-interfaces.yaml
|
include: video-interfaces.yaml
|
||||||
|
|
|
@ -53,7 +53,12 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
interrupt-parent = <&nvic>;
|
interrupt-parent = <&nvic>;
|
||||||
interrupts = <56 1>;
|
interrupts = <56 1>;
|
||||||
source = <&test_mipi_csi2rx>;
|
|
||||||
|
port {
|
||||||
|
test_csi_ep_in: endpoint {
|
||||||
|
remote-endpoint-label = "test_mipi_csi2rx_ep_out";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
test_mipi_csi2rx: mipi_csi2rx@33334444 {
|
test_mipi_csi2rx: mipi_csi2rx@33334444 {
|
||||||
|
@ -68,6 +73,13 @@
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
port@0 {
|
||||||
|
reg = <0>;
|
||||||
|
test_mipi_csi2rx_ep_out: endpoint {
|
||||||
|
remote-endpoint-label = "test_csi_ep_in";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
port@1 {
|
port@1 {
|
||||||
reg = <1>;
|
reg = <1>;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue