From 6f40a90e0bd155b679e9d5cdf1281ec83bd2bee2 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 21 Oct 2021 15:06:02 +0100 Subject: [PATCH 603/634] dtoverlays: Update all image sensor overlays for Media Controller option Add an option to enable configuration via the Media Controller API (rather than the video-node-centric /dev/videoN) as about to be used by libcamera as it enables more complex pipelines to be handled. Any source that has a libcamera tuning merged has MC enabled by default. Sources with no libcamera tuning merged have it disabled by default. In either case it can be overridden with the overlay parameter "media-controller". Signed-off-by: Dave Stevenson --- arch/arm/boot/dts/overlays/README | 27 +++++++++++++++++-- .../boot/dts/overlays/adv7282m-overlay.dts | 8 ++++++ arch/arm/boot/dts/overlays/imx219-overlay.dts | 8 ++++++ .../boot/dts/overlays/imx290_327-overlay.dtsi | 8 ++++++ .../boot/dts/overlays/imx477_378-overlay.dtsi | 8 ++++++ arch/arm/boot/dts/overlays/imx519-overlay.dts | 8 ++++++ .../arm/boot/dts/overlays/irs1125-overlay.dts | 11 ++++++++ arch/arm/boot/dts/overlays/ov5647-overlay.dts | 8 ++++++ arch/arm/boot/dts/overlays/ov7251-overlay.dts | 8 ++++++ arch/arm/boot/dts/overlays/ov9281-overlay.dts | 8 ++++++ .../boot/dts/overlays/tc358743-overlay.dts | 8 ++++++ 11 files changed, 108 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README index 5064d8eb2040..1404de8444f2 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -416,6 +416,8 @@ Info: Analog Devices ADV7282M analogue video to CSI2 bridge. variants. Load: dtoverlay=adv7282m,= Params: addr Overrides the I2C address (default 0x21) + media-controller Configure use of Media Controller API for + configuring the sensor (default off) Name: adv728x-m @@ -426,6 +428,8 @@ Params: addr Overrides the I2C address (default 0x21) adv7280m Select ADV7280-M. adv7281m Select ADV7281-M. adv7281ma Select ADV7281-MA. + media-controller Configure use of Media Controller API for + configuring the sensor (default off) Name: akkordion-iqdacplus @@ -1708,6 +1712,8 @@ Params: rotation Mounting rotation of the camera sensor (0 or 180, default 180) orientation Sensor orientation (0 = front, 1 = rear, 2 = external, default external) + media-controller Configure use of Media Controller API for + configuring the sensor (default on) Name: imx290 @@ -1728,6 +1734,8 @@ Params: 4lane Enable 4 CSI2 lanes. This requires a Compute 2 = external, default external) rotation Mounting rotation of the camera sensor (0 or 180, default 0) + media-controller Configure use of Media Controller API for + configuring the sensor (default on) Name: imx378 @@ -1739,6 +1747,8 @@ Params: rotation Mounting rotation of the camera sensor (0 or 180, default 180) orientation Sensor orientation (0 = front, 1 = rear, 2 = external, default external) + media-controller Configure use of Media Controller API for + configuring the sensor (default on) Name: imx477 @@ -1750,6 +1760,8 @@ Params: rotation Mounting rotation of the camera sensor (0 or 180, default 180) orientation Sensor orientation (0 = front, 1 = rear, 2 = external, default external) + media-controller Configure use of Media Controller API for + configuring the sensor (default on) Name: imx519 @@ -1761,6 +1773,8 @@ Params: rotation Mounting rotation of the camera sensor (0 or 180, default 0) orientation Sensor orientation (0 = front, 1 = rear, 2 = external, default external) + media-controller Configure use of Media Controller API for + configuring the sensor (default on) Name: iqaudio-codec @@ -1824,8 +1838,9 @@ Name: irs1125 Info: Infineon irs1125 TOF camera module. Uses Unicam 1, which is the standard camera connector on most Pi variants. -Load: dtoverlay=irs1125 -Params: +Load: dtoverlay=irs1125,= +Params: media-controller Configure use of Media Controller API for + configuring the sensor (default off) Name: jedec-spi-nor @@ -2237,6 +2252,8 @@ Params: rotation Mounting rotation of the camera sensor (0 or 180, default 0) orientation Sensor orientation (0 = front, 1 = rear, 2 = external, default external) + media-controller Configure use of Media Controller API for + configuring the sensor (default on) Name: ov7251 @@ -2248,6 +2265,8 @@ Params: rotation Mounting rotation of the camera sensor (0 or 180, default 0) orientation Sensor orientation (0 = front, 1 = rear, 2 = external, default external) + media-controller Configure use of Media Controller API for + configuring the sensor (default off) Name: ov9281 @@ -2259,6 +2278,8 @@ Params: rotation Mounting rotation of the camera sensor (0 or 180, default 0) orientation Sensor orientation (0 = front, 1 = rear, 2 = external, default external) + media-controller Configure use of Media Controller API for + configuring the sensor (default on) Name: papirus @@ -3239,6 +3260,8 @@ Params: 4lane Use 4 lanes (only applicable to Compute Modules link-frequency Set the link frequency. Only values of 297000000 (574Mbit/s) and 486000000 (972Mbit/s - default) are supported by the driver. + media-controller Configure use of Media Controller API for + configuring the sensor (default off) Name: tc358743-audio diff --git a/arch/arm/boot/dts/overlays/adv7282m-overlay.dts b/arch/arm/boot/dts/overlays/adv7282m-overlay.dts index 5d85dfd0595c..f7e97c4a13d8 100644 --- a/arch/arm/boot/dts/overlays/adv7282m-overlay.dts +++ b/arch/arm/boot/dts/overlays/adv7282m-overlay.dts @@ -59,7 +59,15 @@ __overlay__ { }; }; + fragment@4 { + target = <&csi1>; + __dormant__ { + brcm,media-controller; + }; + }; + __overrides__ { addr = <&adv728x>,"reg:0"; + media-controller = <0>,"=4"; }; }; diff --git a/arch/arm/boot/dts/overlays/imx219-overlay.dts b/arch/arm/boot/dts/overlays/imx219-overlay.dts index 0c065bf09f54..5b5ba70aff7f 100644 --- a/arch/arm/boot/dts/overlays/imx219-overlay.dts +++ b/arch/arm/boot/dts/overlays/imx219-overlay.dts @@ -108,8 +108,16 @@ __overlay__ { }; }; + fragment@6 { + target = <&csi1>; + __overlay__ { + brcm,media-controller; + }; + }; + __overrides__ { rotation = <&imx219>,"rotation:0"; orientation = <&imx219>,"orientation:0"; + media-controller = <0>,"=6"; }; }; diff --git a/arch/arm/boot/dts/overlays/imx290_327-overlay.dtsi b/arch/arm/boot/dts/overlays/imx290_327-overlay.dtsi index d4a5ed6dbbcf..2696daed523c 100644 --- a/arch/arm/boot/dts/overlays/imx290_327-overlay.dtsi +++ b/arch/arm/boot/dts/overlays/imx290_327-overlay.dtsi @@ -134,11 +134,19 @@ __dormant__ { }; }; + fragment@10 { + target = <&csi1>; + __overlay__ { + brcm,media-controller; + }; + }; + __overrides__ { 4lane = <0>, "-6+7-8+9"; clock-frequency = <&imx290_clk>,"clock-frequency:0", <&imx290>,"clock-frequency:0"; rotation = <&imx290>,"rotation:0"; orientation = <&imx290>,"orientation:0"; + media-controller = <0>,"=10"; }; }; diff --git a/arch/arm/boot/dts/overlays/imx477_378-overlay.dtsi b/arch/arm/boot/dts/overlays/imx477_378-overlay.dtsi index bb9a9acdbbd7..d785e6cb5d82 100644 --- a/arch/arm/boot/dts/overlays/imx477_378-overlay.dtsi +++ b/arch/arm/boot/dts/overlays/imx477_378-overlay.dtsi @@ -103,8 +103,16 @@ __overlay__ { }; }; + fragment@6 { + target = <&csi1>; + __overlay__ { + brcm,media-controller; + }; + }; + __overrides__ { rotation = <&imx477>,"rotation:0"; orientation = <&imx477>,"orientation:0"; + media-controller = <0>,"=6"; }; }; diff --git a/arch/arm/boot/dts/overlays/imx519-overlay.dts b/arch/arm/boot/dts/overlays/imx519-overlay.dts index 693c267af1f0..b8593a980bbf 100644 --- a/arch/arm/boot/dts/overlays/imx519-overlay.dts +++ b/arch/arm/boot/dts/overlays/imx519-overlay.dts @@ -108,8 +108,16 @@ __overlay__ { }; }; + fragment@6 { + target = <&csi1>; + __overlay__ { + brcm,media-controller; + }; + }; + __overrides__ { rotation = <&imx519>,"rotation:0"; orientation = <&imx519>,"orientation:0"; + media-controller = <0>,"=6"; }; }; diff --git a/arch/arm/boot/dts/overlays/irs1125-overlay.dts b/arch/arm/boot/dts/overlays/irs1125-overlay.dts index e926e18e71fc..065569830ded 100644 --- a/arch/arm/boot/dts/overlays/irs1125-overlay.dts +++ b/arch/arm/boot/dts/overlays/irs1125-overlay.dts @@ -82,4 +82,15 @@ irs1125_clk: camera-clk { }; }; }; + + fragment@6 { + target = <&csi1>; + __dormant__ { + brcm,media-controller; + }; + }; + + __overrides__ { + media-controller = <0>,"=6"; + }; }; diff --git a/arch/arm/boot/dts/overlays/ov5647-overlay.dts b/arch/arm/boot/dts/overlays/ov5647-overlay.dts index d7ed4703c9b0..f57b25c38794 100644 --- a/arch/arm/boot/dts/overlays/ov5647-overlay.dts +++ b/arch/arm/boot/dts/overlays/ov5647-overlay.dts @@ -87,8 +87,16 @@ ov5647_clk: camera-clk { }; }; + fragment@6 { + target = <&csi1>; + __overlay__ { + brcm,media-controller; + }; + }; + __overrides__ { rotation = <&ov5647>,"rotation:0"; orientation = <&ov5647>,"orientation:0"; + media-controller = <0>,"=6"; }; }; diff --git a/arch/arm/boot/dts/overlays/ov7251-overlay.dts b/arch/arm/boot/dts/overlays/ov7251-overlay.dts index 09dbeda39d06..6fe652fe011b 100644 --- a/arch/arm/boot/dts/overlays/ov7251-overlay.dts +++ b/arch/arm/boot/dts/overlays/ov7251-overlay.dts @@ -106,8 +106,16 @@ __overlay__ { }; }; + fragment@6 { + target = <&csi1>; + __dormant__ { + brcm,media-controller; + }; + }; + __overrides__ { rotation = <&ov7251>,"rotation:0"; orientation = <&ov7251>,"orientation:0"; + media-controller = <0>,"=6"; }; }; diff --git a/arch/arm/boot/dts/overlays/ov9281-overlay.dts b/arch/arm/boot/dts/overlays/ov9281-overlay.dts index 277236c03358..b2b9a47c6d27 100644 --- a/arch/arm/boot/dts/overlays/ov9281-overlay.dts +++ b/arch/arm/boot/dts/overlays/ov9281-overlay.dts @@ -106,8 +106,16 @@ __overlay__ { }; }; + fragment@6 { + target = <&csi1>; + __overlay__ { + brcm,media-controller; + }; + }; + __overrides__ { rotation = <&ov9281>,"rotation:0"; orientation = <&ov9281>,"orientation:0"; + media-controller = <0>,"=6"; }; }; diff --git a/arch/arm/boot/dts/overlays/tc358743-overlay.dts b/arch/arm/boot/dts/overlays/tc358743-overlay.dts index a1f8af36d2e7..d679d9ba84b6 100644 --- a/arch/arm/boot/dts/overlays/tc358743-overlay.dts +++ b/arch/arm/boot/dts/overlays/tc358743-overlay.dts @@ -100,8 +100,16 @@ __dormant__ { }; }; + fragment@9 { + target = <&csi1>; + __dormant__ { + brcm,media-controller; + }; + }; + __overrides__ { 4lane = <0>, "-2+3-7+8"; link-frequency = <&tc358743>,"link-frequencies#0"; + media-controller = <0>,"=9"; }; }; -- 2.33.1